- update to 2.6.1-rc2 -- first cut.
authorGerd Hoffmann <kraxel@suse.de>
Tue, 6 Jan 2004 10:20:30 +0000 (10:20 +0000)
committerGerd Hoffmann <kraxel@suse.de>
Tue, 6 Jan 2004 10:20:30 +0000 (10:20 +0000)
- disabled usb-2.5 patches (doesn't apply, partly merged).
- disabled ia64 update (doesn't apply, partly merged).
- disabled amd64 patches (doesn't apply, partly merged).
- fixed patches.arch/ppc32.lxppc.patch
- disabled ppc64 patches (rejects in arch/ppc64/kernel/irq.c).
- disabled uml patches (also irq.c rejects).
- deleted patches.fixes/gencpio.offset (merged).
- deleted patches.fixes/no-Werror (not needed any more).
- deleted patches.fixes/unimap_set (merged).
- disabled patches.fixes/s390-ibm-40_compat.diff (doesn't apply, partly merged).
- disabled patches.arch/s390-compat_wrapper (doesn't apply).
- disabled patches.rpmify/kbuild-out-of-tree (doesn't apply).
- disabled patches.suse/bootsplash (doesn't apply).

suse-commit: 90d2454695dbedb4abf8c5f25218fbecdb1e83f3

1200 files changed:
Documentation/DocBook/kernel-locking.tmpl
Documentation/MSI-HOWTO.txt [new file with mode: 0644]
Documentation/SubmittingDrivers
Documentation/block/biodoc.txt
Documentation/devices.txt
Documentation/dvb/bt8xx.txt [new file with mode: 0644]
Documentation/dvb/cards.txt [new file with mode: 0644]
Documentation/dvb/contributors.txt [new file with mode: 0644]
Documentation/dvb/faq.txt [new file with mode: 0644]
Documentation/dvb/firmware.txt [new file with mode: 0644]
Documentation/dvb/readme.txt [new file with mode: 0644]
Documentation/dvb/ttusb-dec.txt [new file with mode: 0644]
Documentation/fb/aty128fb.txt
Documentation/fb/matroxfb.txt
Documentation/filesystems/Locking
Documentation/i2c/i2c-velleman
Documentation/i2c/summary
Documentation/i386/zero-page.txt
Documentation/input/input.txt
Documentation/kbuild/kconfig-language.txt
Documentation/kbuild/modules.txt
Documentation/kernel-parameters.txt
Documentation/networking/ip-sysctl.txt
Documentation/scsi/BusLogic.txt
Documentation/scsi/aic79xx.txt
Documentation/scsi/aic7xxx.txt
Documentation/scsi/st.txt
Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
Documentation/sound/oss/CMI8330
Documentation/sound/oss/INSTALL.awe
Documentation/sound/oss/Introduction
Documentation/sound/oss/PAS16
Documentation/sound/oss/SoundPro
Documentation/sound/oss/Wavefront
Documentation/watchdog/watchdog-api.txt
MAINTAINERS
Makefile
README
arch/alpha/kernel/irq.c
arch/arm/Makefile
arch/arm/boot/compressed/Makefile
arch/arm/boot/compressed/head-integrator.S [deleted file]
arch/arm/boot/compressed/head.S
arch/arm/common/sa1111.c
arch/arm/configs/netwinder_defconfig [new file with mode: 0644]
arch/arm/configs/shark_defconfig
arch/arm/kernel/armksyms.c
arch/arm/kernel/calls.S
arch/arm/kernel/dma-isa.c
arch/arm/kernel/fiq.c
arch/arm/kernel/irq.c
arch/arm/kernel/module.c
arch/arm/lib/div64.S
arch/arm/mach-clps711x/time.c
arch/arm/mach-integrator/cpu.c
arch/arm/mach-integrator/integrator_ap.c
arch/arm/mach-sa1100/Kconfig
arch/arm/mm/cache-v3.S
arch/arm/mm/cache-v4.S
arch/arm/mm/cache-v4wb.S
arch/arm/mm/cache-v4wt.S
arch/arm/mm/mm-armv.c
arch/arm26/kernel/irq.c
arch/cris/kernel/irq.c
arch/h8300/Kconfig
arch/h8300/Makefile
arch/h8300/platform/h8300h/ints.c
arch/h8300/platform/h8s/ints.c
arch/i386/Kconfig
arch/i386/kernel/Makefile
arch/i386/kernel/acpi/boot.c
arch/i386/kernel/cpu/common.c
arch/i386/kernel/cpu/cpufreq/acpi.c
arch/i386/kernel/cpu/cpufreq/longhaul.c
arch/i386/kernel/cpu/cpufreq/p4-clockmod.c
arch/i386/kernel/cpu/cpufreq/powernow-k7.c
arch/i386/kernel/cpu/cpufreq/powernow-k8.c
arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
arch/i386/kernel/cpu/cpufreq/speedstep-lib.c
arch/i386/kernel/cpu/cpufreq/speedstep-lib.h
arch/i386/kernel/cpu/cpufreq/speedstep-smi.c
arch/i386/kernel/efi.c [new file with mode: 0644]
arch/i386/kernel/efi_stub.S [new file with mode: 0644]
arch/i386/kernel/i8259.c
arch/i386/kernel/io_apic.c
arch/i386/kernel/irq.c
arch/i386/kernel/module.c
arch/i386/kernel/mpparse.c
arch/i386/kernel/process.c
arch/i386/kernel/reboot.c
arch/i386/kernel/setup.c
arch/i386/kernel/summit.c
arch/i386/kernel/time.c
arch/i386/kernel/timers/timer_cyclone.c
arch/i386/kernel/timers/timer_hpet.c
arch/i386/kernel/timers/timer_none.c
arch/i386/kernel/timers/timer_pit.c
arch/i386/kernel/timers/timer_tsc.c
arch/i386/kernel/vm86.c
arch/i386/lib/usercopy.c
arch/i386/mm/highmem.c
arch/i386/mm/hugetlbpage.c
arch/i386/mm/init.c
arch/i386/pci/irq.c
arch/ia64/Kconfig
arch/ia64/defconfig
arch/ia64/hp/sim/boot/fw-emu.c
arch/ia64/ia32/binfmt_elf32.c
arch/ia64/ia32/ia32_entry.S
arch/ia64/ia32/ia32priv.h
arch/ia64/ia32/sys_ia32.c
arch/ia64/kernel/entry.S
arch/ia64/kernel/entry.h
arch/ia64/kernel/irq.c
arch/ia64/kernel/ivt.S
arch/ia64/kernel/mca.c
arch/ia64/kernel/mca_asm.S
arch/ia64/kernel/perfmon_default_smpl.c
arch/ia64/kernel/ptrace.c
arch/ia64/kernel/salinfo.c
arch/ia64/kernel/setup.c
arch/ia64/kernel/signal.c
arch/ia64/kernel/traps.c
arch/ia64/mm/hugetlbpage.c
arch/m68k/Kconfig
arch/m68k/kernel/ints.c
arch/m68knommu/platform/5307/ints.c
arch/m68knommu/platform/68328/ints.c
arch/m68knommu/platform/68360/ints.c
arch/mips/Kconfig
arch/mips/kernel/irq.c
arch/mips/mm/highmem.c
arch/parisc/Kconfig
arch/parisc/configs/712_defconfig [new file with mode: 0644]
arch/parisc/defconfig
arch/parisc/kernel/Makefile
arch/parisc/kernel/cache.c
arch/parisc/kernel/drivers.c
arch/parisc/kernel/entry.S
arch/parisc/kernel/firmware.c
arch/parisc/kernel/hardware.c
arch/parisc/kernel/head.S
arch/parisc/kernel/head64.S
arch/parisc/kernel/inventory.c
arch/parisc/kernel/ioctl32.c
arch/parisc/kernel/irq.c
arch/parisc/kernel/pacache.S
arch/parisc/kernel/parisc_ksyms.c
arch/parisc/kernel/pdc_chassis.c
arch/parisc/kernel/pdc_cons.c
arch/parisc/kernel/process.c
arch/parisc/kernel/processor.c
arch/parisc/kernel/real2.S
arch/parisc/kernel/signal.c
arch/parisc/kernel/signal32.c
arch/parisc/kernel/signal32.h [new file with mode: 0644]
arch/parisc/kernel/smp.c
arch/parisc/kernel/sys_parisc.c
arch/parisc/kernel/sys_parisc32.c
arch/parisc/kernel/syscall_table.S
arch/parisc/kernel/time.c
arch/parisc/kernel/traps.c
arch/parisc/kernel/unaligned.c
arch/parisc/lib/lusercopy.S
arch/ppc/boot/simple/Makefile
arch/ppc/boot/utils/mkprep.c
arch/ppc/kernel/irq.c
arch/ppc/kernel/misc.S
arch/ppc/kernel/ppc_ksyms.c
arch/ppc64/Kconfig
arch/ppc64/Makefile
arch/ppc64/boot/ppc32-types.h
arch/ppc64/defconfig
arch/ppc64/kdb/Makefile [deleted file]
arch/ppc64/kdb/ansidecl.h [deleted file]
arch/ppc64/kdb/bfd.h [deleted file]
arch/ppc64/kdb/kdba_bp.c [deleted file]
arch/ppc64/kdb/kdba_bt.c [deleted file]
arch/ppc64/kdb/kdba_id.c [deleted file]
arch/ppc64/kdb/kdba_io.c [deleted file]
arch/ppc64/kdb/kdbasupport.c [deleted file]
arch/ppc64/kdb/opintl.h [deleted file]
arch/ppc64/kdb/ppc-dis.c [deleted file]
arch/ppc64/kdb/ppc-opc.c [deleted file]
arch/ppc64/kdb/ppc.h [deleted file]
arch/ppc64/kdb/privinst.h [deleted file]
arch/ppc64/kdb/symcat.h [deleted file]
arch/ppc64/kernel/HvCall.c
arch/ppc64/kernel/ItLpQueue.c
arch/ppc64/kernel/LparData.c
arch/ppc64/kernel/Makefile
arch/ppc64/kernel/XmPciLpEvent.c
arch/ppc64/kernel/asm-offsets.c
arch/ppc64/kernel/chrp_setup.c
arch/ppc64/kernel/cputable.c
arch/ppc64/kernel/eeh.c
arch/ppc64/kernel/entry.S
arch/ppc64/kernel/head.S
arch/ppc64/kernel/htab.c [new file with mode: 0644]
arch/ppc64/kernel/i8259.c
arch/ppc64/kernel/iSeries_IoMmTable.c
arch/ppc64/kernel/iSeries_IoMmTable.h
arch/ppc64/kernel/iSeries_VpdInfo.c
arch/ppc64/kernel/iSeries_htab.c [deleted file]
arch/ppc64/kernel/iSeries_irq.c
arch/ppc64/kernel/iSeries_pci.c
arch/ppc64/kernel/iSeries_pci_reset.c
arch/ppc64/kernel/iSeries_proc.c
arch/ppc64/kernel/iSeries_setup.c
arch/ppc64/kernel/iSeries_setup.h
arch/ppc64/kernel/idle.c
arch/ppc64/kernel/irq.c
arch/ppc64/kernel/lparcfg.c [deleted file]
arch/ppc64/kernel/mf.c
arch/ppc64/kernel/mf_proc.c
arch/ppc64/kernel/misc.S
arch/ppc64/kernel/nvram.c
arch/ppc64/kernel/open_pic.c
arch/ppc64/kernel/open_pic.h
arch/ppc64/kernel/pSeries_htab.c
arch/ppc64/kernel/pSeries_hvCall.S
arch/ppc64/kernel/pSeries_lpar.c
arch/ppc64/kernel/pSeries_pci.c
arch/ppc64/kernel/pci.c
arch/ppc64/kernel/pci_dma.c
arch/ppc64/kernel/pci_dn.c
arch/ppc64/kernel/ppc_ksyms.c
arch/ppc64/kernel/proc_pmc.c
arch/ppc64/kernel/proc_ppc64.c
arch/ppc64/kernel/process.c
arch/ppc64/kernel/prom.c
arch/ppc64/kernel/ras.c
arch/ppc64/kernel/rtas-proc.c
arch/ppc64/kernel/rtas.c
arch/ppc64/kernel/rtas_flash.c
arch/ppc64/kernel/rtasd.c
arch/ppc64/kernel/rtc.c
arch/ppc64/kernel/scanlog.c
arch/ppc64/kernel/setup.c
arch/ppc64/kernel/signal.c
arch/ppc64/kernel/signal32.c
arch/ppc64/kernel/smp.c
arch/ppc64/kernel/stab.c
arch/ppc64/kernel/sys_ppc32.c
arch/ppc64/kernel/syscalls.c
arch/ppc64/kernel/time.c
arch/ppc64/kernel/traps.c
arch/ppc64/kernel/udbg.c
arch/ppc64/kernel/vio.c [deleted file]
arch/ppc64/kernel/viopath.c [deleted file]
arch/ppc64/kernel/vmlinux.lds.S
arch/ppc64/kernel/xics.c
arch/ppc64/mm/Makefile
arch/ppc64/mm/hash_low.S [deleted file]
arch/ppc64/mm/hash_utils.c [deleted file]
arch/ppc64/mm/hugetlbpage.c
arch/ppc64/mm/imalloc.c
arch/ppc64/mm/init.c
arch/ppc64/mm/numa.c
arch/s390/kernel/compat_ioctl.c
arch/s390/kernel/compat_linux.c
arch/s390/kernel/compat_wrapper.S
arch/s390/kernel/setup.c
arch/s390/kernel/syscalls.S
arch/s390/lib/uaccess.S
arch/s390/lib/uaccess64.S
arch/sh/Kconfig
arch/sh/kernel/irq.c
arch/sparc/Makefile
arch/sparc/boot/Makefile
arch/sparc/kernel/asm-offsets.c
arch/sparc/kernel/entry.S
arch/sparc/kernel/etrap.S
arch/sparc/kernel/irq.c
arch/sparc/kernel/process.c
arch/sparc/kernel/ptrace.c
arch/sparc/kernel/rtrap.S
arch/sparc/kernel/setup.c
arch/sparc/kernel/signal.c
arch/sparc/kernel/sun4d_irq.c
arch/sparc/kernel/traps.c
arch/sparc/kernel/windows.c
arch/sparc/kernel/wof.S
arch/sparc/kernel/wuf.S
arch/sparc/mm/fault.c
arch/sparc/mm/highmem.c
arch/sparc/mm/init.c
arch/sparc/mm/sun4c.c
arch/sparc64/Kconfig
arch/sparc64/defconfig
arch/sparc64/kernel/ebus.c
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/pci_sabre.c
arch/sparc64/kernel/setup.c
arch/sparc64/kernel/systbls.S
arch/sparc64/mm/hugetlbpage.c
arch/um/Kconfig
arch/um/Kconfig_block
arch/um/Kconfig_net
arch/um/Makefile
arch/um/Makefile-i386
arch/um/Makefile-skas
arch/um/config.release
arch/um/defconfig
arch/um/drivers/Makefile
arch/um/drivers/chan_kern.c
arch/um/drivers/chan_user.c
arch/um/drivers/cow.h [deleted file]
arch/um/drivers/cow_kern.c [deleted file]
arch/um/drivers/cow_sys.h [deleted file]
arch/um/drivers/cow_user.c [deleted file]
arch/um/drivers/hostaudio_kern.c
arch/um/drivers/line.c
arch/um/drivers/mconsole_kern.c
arch/um/drivers/mconsole_user.c
arch/um/drivers/mmapper_kern.c
arch/um/drivers/net_kern.c
arch/um/drivers/port_kern.c
arch/um/drivers/ssl.c
arch/um/drivers/stdio_console.c
arch/um/drivers/ubd_kern.c
arch/um/drivers/ubd_user.c
arch/um/drivers/xterm.c
arch/um/drivers/xterm_kern.c
arch/um/dyn.lds.S
arch/um/include/irq_kern.h [deleted file]
arch/um/include/kern_util.h
arch/um/include/line.h
arch/um/include/mconsole.h
arch/um/include/mem.h
arch/um/include/mem_user.h
arch/um/include/os.h
arch/um/include/sysdep-i386/sigcontext.h
arch/um/include/ubd_user.h
arch/um/include/user.h
arch/um/include/user_util.h
arch/um/kernel/Makefile
arch/um/kernel/config.c.in
arch/um/kernel/exec_kern.c
arch/um/kernel/init_task.c
arch/um/kernel/irq.c
arch/um/kernel/ksyms.c
arch/um/kernel/mem.c
arch/um/kernel/mem_user.c
arch/um/kernel/process.c
arch/um/kernel/process_kern.c
arch/um/kernel/ptrace.c
arch/um/kernel/sigio_kern.c
arch/um/kernel/signal_kern.c
arch/um/kernel/skas/Makefile
arch/um/kernel/skas/include/mode.h
arch/um/kernel/skas/include/uaccess.h
arch/um/kernel/skas/process.c
arch/um/kernel/skas/process_kern.c
arch/um/kernel/skas/util/mk_ptregs.c
arch/um/kernel/smp.c
arch/um/kernel/sys_call_table.c
arch/um/kernel/syscall_kern.c
arch/um/kernel/sysrq.c
arch/um/kernel/time.c
arch/um/kernel/time_kern.c
arch/um/kernel/trap_kern.c
arch/um/kernel/trap_user.c
arch/um/kernel/tt/exec_kern.c
arch/um/kernel/tt/include/uaccess.h
arch/um/kernel/tt/process_kern.c
arch/um/kernel/tt/ptproxy/proxy.c
arch/um/kernel/tt/tracer.c
arch/um/kernel/tt/uaccess_user.c
arch/um/kernel/tty_log.c
arch/um/kernel/um_arch.c
arch/um/kernel/umid.c
arch/um/kernel/user_syms.c
arch/um/kernel/user_util.c
arch/um/os-Linux/drivers/tuntap_user.c
arch/um/os-Linux/file.c
arch/um/sys-i386/Makefile
arch/um/sys-i386/bugs.c
arch/um/sys-i386/ptrace_user.c
arch/um/uml.lds.S
arch/um/util/mk_constants_kern.c
arch/v850/kernel/irq.c
arch/x86_64/Kconfig
arch/x86_64/boot/install.sh
arch/x86_64/defconfig
arch/x86_64/ia32/Makefile
arch/x86_64/ia32/ia32_aout.c [new file with mode: 0644]
arch/x86_64/ia32/ia32_ioctl.c
arch/x86_64/ia32/ia32_signal.c
arch/x86_64/ia32/ia32entry.S
arch/x86_64/ia32/sys_ia32.c
arch/x86_64/kernel/acpi/sleep.c
arch/x86_64/kernel/acpi/wakeup.S
arch/x86_64/kernel/i8259.c
arch/x86_64/kernel/io_apic.c
arch/x86_64/kernel/irq.c
arch/x86_64/kernel/mpparse.c
arch/x86_64/kernel/pci-gart.c
arch/x86_64/kernel/smpboot.c
arch/x86_64/kernel/time.c
arch/x86_64/kernel/traps.c
arch/x86_64/kernel/vmlinux.lds.S
arch/x86_64/kernel/vsyscall.c
arch/x86_64/lib/memset.S
crypto/tcrypt.c
crypto/tcrypt.h
drivers/acorn/char/i2c.c
drivers/acpi/Kconfig
drivers/acpi/osl.c
drivers/acpi/pci_irq.c
drivers/acpi/tables.c
drivers/base/bus.c
drivers/base/class.c
drivers/base/core.c
drivers/base/driver.c
drivers/base/firmware_class.c
drivers/base/node.c
drivers/base/platform.c
drivers/base/power/sysfs.c
drivers/base/sys.c
drivers/block/DAC960.c
drivers/block/DAC960.h
drivers/block/Makefile
drivers/block/floppy.c
drivers/block/floppy98.c
drivers/block/genhd.c
drivers/block/ll_rw_blk.c
drivers/block/viodasd.c [deleted file]
drivers/char/Kconfig
drivers/char/Makefile
drivers/char/agp/alpha-agp.c
drivers/char/agp/amd64-agp.c
drivers/char/agp/generic.c
drivers/char/agp/intel-agp.c
drivers/char/agp/nvidia-agp.c
drivers/char/drm/Kconfig
drivers/char/drm/drmP.h
drivers/char/drm/drm_vm.h
drivers/char/fjkeyinf.c [deleted file]
drivers/char/keyboard.c
drivers/char/mem.c
drivers/char/misc.c
drivers/char/n_tty.c
drivers/char/ppdev.c
drivers/char/sx.c
drivers/char/sysrq.c
drivers/char/tty_io.c
drivers/char/vc_screen.c
drivers/char/viocons.c [deleted file]
drivers/char/vt.c
drivers/char/watchdog/Kconfig
drivers/char/watchdog/Makefile
drivers/char/watchdog/i810-tco.c
drivers/char/watchdog/ib700wdt.c
drivers/char/watchdog/indydog.c
drivers/char/watchdog/machzwd.c
drivers/char/watchdog/mixcomwd.c
drivers/char/watchdog/pcwd.c
drivers/char/watchdog/sa1100_wdt.c
drivers/char/watchdog/softdog.c
drivers/char/watchdog/w83627hf_wdt.c [new file with mode: 0644]
drivers/char/watchdog/wdt.c
drivers/cpufreq/Kconfig
drivers/i2c/algos/i2c-algo-ite.c
drivers/i2c/busses/Kconfig
drivers/i2c/busses/i2c-elektor.c
drivers/i2c/busses/i2c-ibm_iic.c
drivers/i2c/busses/i2c-ite.c
drivers/i2c/busses/i2c-piix4.c
drivers/i2c/busses/i2c-velleman.c
drivers/i2c/chips/Kconfig
drivers/i2c/chips/Makefile
drivers/i2c/chips/lm83.c
drivers/i2c/chips/lm85.c
drivers/i2c/chips/sensors_vid.h [deleted file]
drivers/i2c/chips/smbus-arp.c [deleted file]
drivers/i2c/i2c-core.c
drivers/i2c/i2c-dev.c
drivers/ide/Kconfig
drivers/ide/arm/icside.c
drivers/ide/ide-cd.c
drivers/ide/ide-dma.c
drivers/ide/ide-iops.c
drivers/ide/ide-tape.c
drivers/ide/ide.c
drivers/ide/pci/Makefile
drivers/ide/pci/piix.c
drivers/ide/pci/sgiioc4.c [new file with mode: 0644]
drivers/ide/setup-pci.c
drivers/ieee1394/Kconfig
drivers/ieee1394/dma.c
drivers/ieee1394/eth1394.c
drivers/ieee1394/highlevel.c
drivers/ieee1394/highlevel.h
drivers/ieee1394/hosts.c
drivers/ieee1394/hosts.h
drivers/ieee1394/ieee1394_core.c
drivers/ieee1394/ieee1394_core.h
drivers/ieee1394/ieee1394_transactions.c
drivers/ieee1394/iso.c
drivers/ieee1394/iso.h
drivers/ieee1394/nodemgr.c
drivers/ieee1394/nodemgr.h
drivers/ieee1394/ohci1394.c
drivers/ieee1394/oui.db
drivers/ieee1394/pcilynx.c
drivers/ieee1394/raw1394.c
drivers/ieee1394/raw1394.h
drivers/ieee1394/sbp2.c
drivers/ieee1394/video1394.c
drivers/input/gameport/Kconfig
drivers/input/input.c
drivers/input/joydev.c
drivers/input/keyboard/atkbd.c
drivers/input/mouse/Kconfig
drivers/input/mouse/logips2pp.c
drivers/input/mouse/logips2pp.h
drivers/input/mouse/psmouse-base.c
drivers/input/mouse/psmouse.h
drivers/input/mouse/synaptics.c
drivers/input/mouse/synaptics.h
drivers/input/serio/i8042.c
drivers/input/serio/serio.c
drivers/isdn/eicon/Kconfig
drivers/isdn/eicon/eicon_mod.c
drivers/isdn/i4l/isdn_ppp_ccp.c
drivers/md/Kconfig
drivers/md/dm-ioctl-v1.c
drivers/md/dm-ioctl-v4.c
drivers/md/dm-table.c
drivers/md/dm.c
drivers/md/dm.h
drivers/md/linear.c
drivers/md/multipath.c
drivers/md/raid0.c
drivers/md/raid1.c
drivers/md/raid5.c
drivers/media/common/saa7146_core.c
drivers/media/common/saa7146_fops.c
drivers/media/common/saa7146_hlp.c
drivers/media/common/saa7146_i2c.c
drivers/media/common/saa7146_vbi.c
drivers/media/common/saa7146_video.c
drivers/media/dvb/Kconfig
drivers/media/dvb/Makefile
drivers/media/dvb/b2c2/skystar2.c
drivers/media/dvb/bt8xx/Kconfig [new file with mode: 0644]
drivers/media/dvb/bt8xx/Makefile [new file with mode: 0644]
drivers/media/dvb/bt8xx/bt878.c [new file with mode: 0644]
drivers/media/dvb/bt8xx/bt878.h [new file with mode: 0644]
drivers/media/dvb/bt8xx/dvb-bt8xx.c [new file with mode: 0644]
drivers/media/dvb/bt8xx/dvb-bt8xx.h [new file with mode: 0644]
drivers/media/dvb/dvb-core/demux.h
drivers/media/dvb/dvb-core/dvb_demux.c
drivers/media/dvb/dvb-core/dvb_demux.h
drivers/media/dvb/dvb-core/dvb_filter.c
drivers/media/dvb/dvb-core/dvb_filter.h
drivers/media/dvb/dvb-core/dvb_i2c.c
drivers/media/dvb/dvb-core/dvb_ksyms.c
drivers/media/dvb/dvb-core/dvb_ringbuffer.c
drivers/media/dvb/dvb-core/dvb_ringbuffer.h
drivers/media/dvb/frontends/Kconfig
drivers/media/dvb/frontends/Makefile
drivers/media/dvb/frontends/alps_tdmb7.c
drivers/media/dvb/frontends/at76c651.c
drivers/media/dvb/frontends/cx24110.c
drivers/media/dvb/frontends/dst-bt878.h [new file with mode: 0644]
drivers/media/dvb/frontends/dst.c [new file with mode: 0644]
drivers/media/dvb/frontends/mt312.c
drivers/media/dvb/frontends/mt312.h
drivers/media/dvb/frontends/nxt6000.c
drivers/media/dvb/frontends/nxt6000.h
drivers/media/dvb/frontends/sp887x.c
drivers/media/dvb/frontends/stv0299.c
drivers/media/dvb/frontends/tda1004x.c
drivers/media/dvb/frontends/ves1820.c
drivers/media/dvb/frontends/ves1x93.c
drivers/media/dvb/ttpci/Kconfig
drivers/media/dvb/ttpci/Makefile
drivers/media/dvb/ttpci/av7110.c
drivers/media/dvb/ttpci/av7110.h
drivers/media/dvb/ttpci/av7110_firm.h [deleted file]
drivers/media/dvb/ttpci/budget-ci.c
drivers/media/dvb/ttpci/budget.h
drivers/media/dvb/ttpci/fdump.c [new file with mode: 0644]
drivers/media/dvb/ttpci/ttpci-eeprom.c
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
drivers/media/dvb/ttusb-dec/Kconfig
drivers/media/dvb/ttusb-dec/Makefile
drivers/media/dvb/ttusb-dec/dec2000_frontend.c [deleted file]
drivers/media/dvb/ttusb-dec/fdump.c [deleted file]
drivers/media/dvb/ttusb-dec/ttusb_dec.c
drivers/media/dvb/ttusb-dec/ttusb_dec.h [deleted file]
drivers/media/radio/Makefile
drivers/media/radio/dummy.c [deleted file]
drivers/media/video/Makefile
drivers/media/video/dummy.c [deleted file]
drivers/media/video/video-buf.c
drivers/message/fusion/isense.c
drivers/message/fusion/mptbase.c
drivers/message/fusion/mptbase.h
drivers/message/fusion/mptctl.c
drivers/message/fusion/mptctl.h
drivers/message/fusion/mptlan.c
drivers/message/fusion/mptscsih.c
drivers/message/fusion/mptscsih.h
drivers/message/fusion/scsi3.h
drivers/mtd/chips/jedec_probe.c
drivers/net/8139too.c
drivers/net/Kconfig
drivers/net/Makefile
drivers/net/bonding/bond_main.c
drivers/net/cs89x0.c
drivers/net/e100/e100_config.c
drivers/net/e100/e100_main.c
drivers/net/e100/e100_phy.c
drivers/net/e100/e100_test.c
drivers/net/hamradio/scc.c
drivers/net/ibmveth.c [deleted file]
drivers/net/ibmveth.h [deleted file]
drivers/net/irda/ali-ircc.c
drivers/net/iseries_veth.c [deleted file]
drivers/net/iseries_veth.h [deleted file]
drivers/net/pcmcia/3c574_cs.c
drivers/net/pcmcia/pcnet_cs.c
drivers/net/pppoe.c
drivers/net/sis900.c
drivers/net/tg3.c
drivers/net/tokenring/Kconfig
drivers/net/tulip/media.c
drivers/net/typhoon.c
drivers/net/wan/Kconfig
drivers/net/wan/cycx_drv.c
drivers/net/wireless/atmel.c
drivers/parisc/Kconfig
drivers/parisc/ccio-dma.c
drivers/parisc/dino.c
drivers/parisc/led.c
drivers/parisc/superio.c
drivers/pci/Makefile
drivers/pci/bus.c
drivers/pci/hotplug/Kconfig
drivers/pci/hotplug/Makefile
drivers/pci/hotplug/acpiphp_glue.c
drivers/pci/hotplug/amdshpc.h [deleted file]
drivers/pci/hotplug/amdshpc_core.c [deleted file]
drivers/pci/hotplug/amdshpc_ctrl.c [deleted file]
drivers/pci/hotplug/amdshpc_ddi.c [deleted file]
drivers/pci/hotplug/amdshpc_ddi.h [deleted file]
drivers/pci/hotplug/amdshpc_dsb.c [deleted file]
drivers/pci/hotplug/amdshpc_enb.c [deleted file]
drivers/pci/hotplug/amdshpc_int.c [deleted file]
drivers/pci/hotplug/amdshpc_led.c [deleted file]
drivers/pci/hotplug/amdshpc_pci.c [deleted file]
drivers/pci/hotplug/dummyphp.c [deleted file]
drivers/pci/hotplug/pcihp_skeleton.c
drivers/pci/hotplug/rpadlpar.h [deleted file]
drivers/pci/hotplug/rpadlpar_core.c [deleted file]
drivers/pci/hotplug/rpadlpar_sysfs.c [deleted file]
drivers/pci/hotplug/rpaphp.h [deleted file]
drivers/pci/hotplug/rpaphp_core.c [deleted file]
drivers/pci/hotplug/rpaphp_pci.c [deleted file]
drivers/pci/msi.c [new file with mode: 0644]
drivers/pci/pci-sysfs.c
drivers/pci/pci.ids
drivers/pci/probe.c
drivers/pci/proc.c
drivers/pci/remove.c
drivers/pci/search.c
drivers/pci/setup-res.c
drivers/pcmcia/cistpl.c
drivers/pcmcia/cs.c
drivers/pcmcia/i82365.c
drivers/pcmcia/sa1100_stork.c
drivers/pcmcia/yenta_socket.c
drivers/scsi/BusLogic.c
drivers/scsi/Kconfig
drivers/scsi/aacraid/README
drivers/scsi/aacraid/aachba.c
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/commctrl.c
drivers/scsi/aacraid/comminit.c
drivers/scsi/aacraid/commsup.c
drivers/scsi/aacraid/dpcsup.c
drivers/scsi/aacraid/linit.c
drivers/scsi/aacraid/rx.c
drivers/scsi/aacraid/sa.c
drivers/scsi/aha152x.c
drivers/scsi/aha1740.c
drivers/scsi/aic7xxx/Kconfig.aic7xxx
drivers/scsi/aic7xxx/Makefile
drivers/scsi/aic7xxx/aic7770.c
drivers/scsi/aic7xxx/aic7770_osm.c
drivers/scsi/aic7xxx/aic79xx.h
drivers/scsi/aic7xxx/aic79xx.reg
drivers/scsi/aic7xxx/aic79xx.seq
drivers/scsi/aic7xxx/aic79xx_core.c
drivers/scsi/aic7xxx/aic79xx_inline.h
drivers/scsi/aic7xxx/aic79xx_osm.c
drivers/scsi/aic7xxx/aic79xx_osm.h
drivers/scsi/aic7xxx/aic79xx_osm_pci.c
drivers/scsi/aic7xxx/aic79xx_pci.c
drivers/scsi/aic7xxx/aic79xx_proc.c
drivers/scsi/aic7xxx/aic79xx_reg.h_shipped
drivers/scsi/aic7xxx/aic79xx_reg_print.c_shipped
drivers/scsi/aic7xxx/aic79xx_seq.h_shipped
drivers/scsi/aic7xxx/aic7xxx.h
drivers/scsi/aic7xxx/aic7xxx_core.c
drivers/scsi/aic7xxx/aic7xxx_osm.c
drivers/scsi/aic7xxx/aic7xxx_osm.h
drivers/scsi/aic7xxx/aic7xxx_osm_pci.c
drivers/scsi/aic7xxx/aic7xxx_pci.c
drivers/scsi/aic7xxx/aic7xxx_proc.c
drivers/scsi/aic7xxx/aic7xxx_reg_print.c_shipped
drivers/scsi/aic7xxx/aicasm/aicasm_macro_scan.l
drivers/scsi/aic7xxx/aicasm/aicasm_scan.l
drivers/scsi/ata_piix.c
drivers/scsi/cpqfcTSinit.c
drivers/scsi/dc390.h
drivers/scsi/hosts.c
drivers/scsi/i60uscsi.c
drivers/scsi/ini9100u.c
drivers/scsi/inia100.c
drivers/scsi/inia100.h
drivers/scsi/libata-core.c
drivers/scsi/libata-scsi.c
drivers/scsi/libata.h
drivers/scsi/megaraid.c
drivers/scsi/megaraid.h
drivers/scsi/osst.c
drivers/scsi/osst.h
drivers/scsi/osst_options.h
drivers/scsi/pcmcia/Kconfig
drivers/scsi/sata_promise.c
drivers/scsi/sata_sil.c
drivers/scsi/sata_svw.c
drivers/scsi/sata_via.c
drivers/scsi/scsi.c
drivers/scsi/scsi_debug.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_logging.h
drivers/scsi/scsi_priv.h
drivers/scsi/scsiiom.c
drivers/scsi/sg.c
drivers/scsi/st.c
drivers/scsi/st.h
drivers/scsi/sym53c8xx_2/sym53c8xx.h
drivers/scsi/sym53c8xx_2/sym_fw.c
drivers/scsi/sym53c8xx_2/sym_fw.h
drivers/scsi/sym53c8xx_2/sym_fw1.h
drivers/scsi/sym53c8xx_2/sym_fw2.h
drivers/scsi/sym53c8xx_2/sym_glue.c
drivers/scsi/sym53c8xx_2/sym_glue.h
drivers/scsi/sym53c8xx_2/sym_hipd.c
drivers/scsi/sym53c8xx_2/sym_hipd.h
drivers/scsi/sym53c8xx_2/sym_malloc.c
drivers/scsi/sym53c8xx_2/sym_nvram.c
drivers/scsi/tmscsim.c
drivers/scsi/tmscsim.h
drivers/serial/8250.c
drivers/serial/8250_pnp.c
drivers/serial/sa1100.c
drivers/serial/serial_core.c
drivers/serial/sunsu.c
drivers/serial/sunzilog.c
drivers/usb/Makefile
drivers/usb/gadget/Kconfig
drivers/usb/gadget/Makefile
drivers/usb/gadget/ether.c
drivers/usb/gadget/serial.c [deleted file]
drivers/usb/gadget/zero.c
drivers/usb/host/uhci-hcd.c
drivers/usb/image/scanner.c
drivers/usb/input/hid-core.c
drivers/usb/input/hiddev.c
drivers/usb/net/Kconfig
drivers/usb/net/usbnet.c
drivers/usb/serial/ipaq.c
drivers/usb/serial/mct_u232.c
drivers/usb/serial/mct_u232.h
drivers/usb/serial/pl2303.c
drivers/usb/serial/pl2303.h
drivers/usb/storage/unusual_devs.h
drivers/video/Kconfig
drivers/video/Makefile
drivers/video/aty/aty128fb.c
drivers/video/bootsplash/Kconfig [deleted file]
drivers/video/bootsplash/Makefile [deleted file]
drivers/video/bootsplash/bootsplash.c [deleted file]
drivers/video/bootsplash/bootsplash.h [deleted file]
drivers/video/bootsplash/decode-jpg.c [deleted file]
drivers/video/bootsplash/decode-jpg.h [deleted file]
drivers/video/bootsplash/render.c [deleted file]
drivers/video/cirrusfb.c
drivers/video/console/fbcon.c
drivers/video/console/fbcon.h
drivers/video/cyber2000fb.c
drivers/video/fbmem.c
drivers/video/fbmon.c
drivers/video/hgafb.c
drivers/video/i810/i810_main.c
drivers/video/igafb.c
drivers/video/imsttfb.c
drivers/video/matrox/matroxfb_crtc2.c
drivers/video/neofb.c
drivers/video/radeonfb.c
drivers/video/riva/fbdev.c
drivers/video/sis/init301.c
drivers/video/sis/sis_main.c
drivers/video/sstfb.c
drivers/video/tdfxfb.c
drivers/video/tgafb.c
drivers/video/tridentfb.c
drivers/video/vesafb.c
fs/Kconfig
fs/Kconfig.binfmt
fs/Makefile
fs/binfmt_elf.c
fs/binfmt_som.c
fs/buffer.c
fs/char_dev.c
fs/compat.c
fs/compat_ioctl.c
fs/dcache.c
fs/direct-io.c
fs/dquot.c
fs/exec.c
fs/ext3/balloc.c
fs/ext3/super.c
fs/fat/file.c
fs/fat/inode.c
fs/fat/misc.c
fs/file_table.c
fs/hostfs/Makefile [deleted file]
fs/hostfs/hostfs.h [deleted file]
fs/hostfs/hostfs_kern.c [deleted file]
fs/hostfs/hostfs_user.c [deleted file]
fs/hppfs/Makefile [deleted file]
fs/hppfs/hppfs_kern.c [deleted file]
fs/isofs/inode.c
fs/jbd/commit.c
fs/locks.c
fs/msdos/namei.c
fs/ncpfs/Kconfig
fs/ncpfs/mmap.c
fs/nls/Kconfig
fs/nls/nls_base.c
fs/pipe.c
fs/proc/base.c
fs/proc/generic.c
fs/proc/proc_devtree.c
fs/proc/proc_misc.c
fs/proc/proc_tty.c
fs/proc/task_mmu.c
fs/reiserfs/journal.c
fs/reiserfs/namei.c
fs/reiserfs/procfs.c
fs/reiserfs/super.c
fs/stat.c
fs/sysfs/dir.c
fs/udf/super.c
fs/vfat/namei.c
include/asm-alpha/cpumask.h [new file with mode: 0644]
include/asm-arm/arch-ebsa285/time.h
include/asm-arm/arch-pxa/time.h
include/asm-arm/arch-sa1100/time.h
include/asm-arm/arch-shark/time.h
include/asm-arm/cpumask.h [new file with mode: 0644]
include/asm-arm/div64.h
include/asm-arm/kmap_types.h
include/asm-arm/pgtable.h
include/asm-arm/unaligned.h
include/asm-arm/unistd.h
include/asm-arm26/cpumask.h [new file with mode: 0644]
include/asm-arm26/keyboard.h.old [deleted file]
include/asm-cris/cpumask.h [new file with mode: 0644]
include/asm-generic/cpumask.h [new file with mode: 0644]
include/asm-generic/cpumask_arith.h
include/asm-generic/cpumask_array.h
include/asm-generic/cpumask_const_value.h
include/asm-generic/cpumask_up.h
include/asm-h8300/bitops.h
include/asm-h8300/cpumask.h [new file with mode: 0644]
include/asm-i386/cpumask.h [new file with mode: 0644]
include/asm-i386/hw_irq.h
include/asm-i386/io_apic.h
include/asm-i386/ioctl.h
include/asm-i386/irq.h
include/asm-i386/mach-default/irq_vectors.h
include/asm-i386/mach-default/mach_apic.h
include/asm-i386/mach-es7000/mach_apic.h
include/asm-i386/mach-summit/mach_mpparse.h
include/asm-i386/mach-voyager/irq_vectors.h
include/asm-i386/mpspec.h
include/asm-i386/processor.h
include/asm-i386/setup.h
include/asm-i386/string.h
include/asm-i386/timer.h
include/asm-ia64/cpumask.h [new file with mode: 0644]
include/asm-ia64/ia32.h
include/asm-ia64/mmu_context.h
include/asm-ia64/page.h
include/asm-ia64/pgtable.h
include/asm-ia64/processor.h
include/asm-ia64/statfs.h
include/asm-m68k/cpumask.h [new file with mode: 0644]
include/asm-m68knommu/cpumask.h [new file with mode: 0644]
include/asm-mips/cpumask.h [new file with mode: 0644]
include/asm-parisc/cpumask.h [new file with mode: 0644]
include/asm-parisc/dma-mapping.h
include/asm-parisc/ioctl.h
include/asm-parisc/uaccess.h
include/asm-parisc/ucontext.h
include/asm-parisc/unistd.h
include/asm-ppc/cpumask.h [new file with mode: 0644]
include/asm-ppc/highmem.h
include/asm-ppc/ioctl.h
include/asm-ppc/unistd.h
include/asm-ppc64/bootinfo.h
include/asm-ppc64/cpumask.h [new file with mode: 0644]
include/asm-ppc64/cputable.h
include/asm-ppc64/elf.h
include/asm-ppc64/hvcall.h
include/asm-ppc64/hw_irq.h
include/asm-ppc64/iSeries/HvCall.h
include/asm-ppc64/iSeries/HvCallCfg.h
include/asm-ppc64/iSeries/HvCallEvent.h
include/asm-ppc64/iSeries/HvCallHpt.h
include/asm-ppc64/iSeries/HvCallPci.h
include/asm-ppc64/iSeries/HvCallSc.h
include/asm-ppc64/iSeries/HvCallSm.h
include/asm-ppc64/iSeries/HvCallXm.h
include/asm-ppc64/iSeries/HvLpConfig.h
include/asm-ppc64/iSeries/HvLpEvent.h
include/asm-ppc64/iSeries/HvReleaseData.h
include/asm-ppc64/iSeries/HvTypes.h
include/asm-ppc64/iSeries/IoHriProcessorVpd.h
include/asm-ppc64/iSeries/ItExtVpdPanel.h
include/asm-ppc64/iSeries/ItIplParmsReal.h
include/asm-ppc64/iSeries/ItLpNaca.h
include/asm-ppc64/iSeries/ItLpPaca.h
include/asm-ppc64/iSeries/ItLpQueue.h
include/asm-ppc64/iSeries/ItLpRegSave.h
include/asm-ppc64/iSeries/ItVpdAreas.h
include/asm-ppc64/iSeries/LparMap.h
include/asm-ppc64/iSeries/iSeries_dma.h
include/asm-ppc64/iSeries/iSeries_io.h
include/asm-ppc64/iSeries/iSeries_irq.h
include/asm-ppc64/iSeries/iSeries_pci.h
include/asm-ppc64/iSeries/iSeries_proc.h
include/asm-ppc64/iSeries/mf.h
include/asm-ppc64/iSeries/mf_proc.h [new file with mode: 0644]
include/asm-ppc64/iSeries/veth-proc.h [new file with mode: 0644]
include/asm-ppc64/iSeries/vio.h [deleted file]
include/asm-ppc64/io.h
include/asm-ppc64/ioctl.h
include/asm-ppc64/irq.h
include/asm-ppc64/kdb.h [deleted file]
include/asm-ppc64/kdbprivate.h [deleted file]
include/asm-ppc64/machdep.h
include/asm-ppc64/memory.h
include/asm-ppc64/mmu.h
include/asm-ppc64/mmu_context.h
include/asm-ppc64/naca.h
include/asm-ppc64/nvram.h
include/asm-ppc64/paca.h
include/asm-ppc64/page.h
include/asm-ppc64/pci.h
include/asm-ppc64/pgalloc.h
include/asm-ppc64/pgtable.h
include/asm-ppc64/ppc32.h
include/asm-ppc64/ppc_asm.h
include/asm-ppc64/proc_fs.h
include/asm-ppc64/processor.h
include/asm-ppc64/prom.h
include/asm-ppc64/ptrace.h
include/asm-ppc64/rtas.h
include/asm-ppc64/sigcontext.h
include/asm-ppc64/smp.h
include/asm-ppc64/spinlock.h
include/asm-ppc64/system.h
include/asm-ppc64/tlb.h
include/asm-ppc64/unistd.h
include/asm-ppc64/vio.h [deleted file]
include/asm-ppc64/xics.h
include/asm-s390/ccwdev.h
include/asm-s390/cpumask.h [new file with mode: 0644]
include/asm-s390/uaccess.h
include/asm-sh/cpumask.h [new file with mode: 0644]
include/asm-sparc/cpumask.h [new file with mode: 0644]
include/asm-sparc/processor.h
include/asm-sparc/thread_info.h
include/asm-sparc/winmacro.h
include/asm-sparc64/cpumask.h [new file with mode: 0644]
include/asm-sparc64/pgtable.h
include/asm-um/archparam-i386.h
include/asm-um/common.lds.S
include/asm-um/cpufeature.h [deleted file]
include/asm-um/cpumask.h [new file with mode: 0644]
include/asm-um/current.h
include/asm-um/fixmap.h
include/asm-um/irq.h
include/asm-um/local.h [deleted file]
include/asm-um/module-generic.h [deleted file]
include/asm-um/module-i386.h [deleted file]
include/asm-um/page.h
include/asm-um/pgtable.h
include/asm-um/processor-generic.h
include/asm-um/processor-i386.h
include/asm-um/sections.h [deleted file]
include/asm-um/smp.h
include/asm-um/system-generic.h
include/asm-um/thread_info.h
include/asm-um/timex.h
include/asm-v850/cpumask.h [new file with mode: 0644]
include/asm-x86_64/a.out.h
include/asm-x86_64/apic.h
include/asm-x86_64/bitops.h
include/asm-x86_64/cpumask.h [new file with mode: 0644]
include/asm-x86_64/desc.h
include/asm-x86_64/fixmap.h
include/asm-x86_64/hw_irq.h
include/asm-x86_64/io.h
include/asm-x86_64/io_apic.h
include/asm-x86_64/irq.h
include/asm-x86_64/msr.h
include/asm-x86_64/pgalloc.h
include/asm-x86_64/pgtable.h
include/asm-x86_64/processor.h
include/asm-x86_64/stat.h
include/asm-x86_64/system.h
include/asm-x86_64/timex.h
include/asm-x86_64/topology.h
include/asm-x86_64/uaccess.h
include/asm-x86_64/vsyscall.h
include/linux/bio.h
include/linux/compat.h
include/linux/compat_ioctl.h
include/linux/console.h
include/linux/console_struct.h
include/linux/cpufreq.h
include/linux/cpumask.h
include/linux/device.h
include/linux/efi.h
include/linux/fb.h
include/linux/fs.h
include/linux/hugetlb.h
include/linux/i2c-dev.h
include/linux/ide.h
include/linux/input.h
include/linux/jiffies.h
include/linux/kernel.h
include/linux/keyboard.h
include/linux/kmod.h
include/linux/libata.h
include/linux/list.h
include/linux/major.h
include/linux/miscdevice.h
include/linux/mm.h
include/linux/mmzone.h
include/linux/module.h
include/linux/moduleparam.h
include/linux/msdos_fs.h
include/linux/msdos_fs_sb.h
include/linux/nbd.h
include/linux/netfilter_bridge.h
include/linux/nfs_fs.h
include/linux/page-flags.h
include/linux/pagemap.h
include/linux/parser.h
include/linux/pci.h
include/linux/pci_ids.h
include/linux/pci_msi.h [new file with mode: 0644]
include/linux/percpu_counter.h
include/linux/proc_fs.h
include/linux/proc_mm.h [deleted file]
include/linux/quota.h
include/linux/reiserfs_fs.h
include/linux/sched.h
include/linux/serio.h
include/linux/skbuff.h
include/linux/sysctl.h
include/linux/tcp.h
include/linux/timex.h
include/linux/usb_gadget.h
include/media/saa7146.h
include/media/saa7146_vv.h
include/net/ax25.h
include/net/pkt_cls.h
include/net/sctp/sctp.h
include/net/sock.h
include/net/xfrm.h
include/scsi/scsi.h
init/Kconfig
init/do_mounts.c
init/main.c
ipc/sem.c
kernel/compat.c
kernel/exit.c
kernel/fork.c
kernel/futex.c
kernel/kmod.c
kernel/panic.c
kernel/power/Kconfig
kernel/power/swsusp.c
kernel/printk.c
kernel/sched.c
kernel/sys.c
kernel/timer.c
lib/Kconfig
lib/Makefile
lib/inflate.c
lib/int_sqrt.c [new file with mode: 0644]
lib/kobject.c
lib/mask.c [new file with mode: 0644]
lib/parser.c
mm/Makefile
mm/filemap.c
mm/highmem.c
mm/memory.c
mm/mmap.c
mm/mprotect.c
mm/mremap.c
mm/oom_kill.c
mm/page_alloc.c
mm/proc_mm.c [deleted file]
mm/readahead.c
mm/shmem.c
mm/slab.c
mm/swap.c
mm/vmscan.c
net/appletalk/sysctl_net_atalk.c
net/ax25/af_ax25.c
net/ax25/ax25_in.c
net/bluetooth/af_bluetooth.c
net/bluetooth/bnep/core.c
net/bridge/br_netfilter.c
net/bridge/netfilter/Kconfig
net/core/dev.c
net/core/neighbour.c
net/core/sock.c
net/core/sysctl_net_core.c
net/ipv4/esp4.c
net/ipv4/ip_output.c
net/ipv4/netfilter/ipt_recent.c
net/ipv4/xfrm4_input.c
net/ipv6/addrconf.c
net/ipv6/ip6_output.c
net/ipv6/ndisc.c
net/netrom/af_netrom.c
net/netrom/nr_dev.c
net/packet/af_packet.c
net/rose/af_rose.c
net/sched/cls_api.c
net/sched/sch_atm.c
net/sched/sch_cbq.c
net/sched/sch_csz.c
net/sched/sch_dsmark.c
net/sched/sch_htb.c
net/sched/sch_ingress.c
net/sched/sch_prio.c
net/sched/sch_tbf.c
net/sctp/associola.c
net/sctp/outqueue.c
net/sctp/socket.c
net/sctp/transport.c
net/xfrm/xfrm_policy.c
net/xfrm/xfrm_state.c
scripts/Makefile.lib
scripts/Makefile.modpost
scripts/kconfig/conf.c
scripts/kconfig/gconf.c
scripts/lxdialog/textbox.c
scripts/mkspec
scripts/modpost.c
scripts/modpost.h
security/selinux/hooks.c
security/selinux/include/av_perm_to_string.h
security/selinux/include/av_permissions.h
security/selinux/ss/Makefile
security/selinux/ss/avtab.c
security/selinux/ss/ebitmap.c
security/selinux/ss/global.h [deleted file]
security/selinux/ss/hashtab.c
security/selinux/ss/mls.c
security/selinux/ss/policydb.c
security/selinux/ss/services.c
security/selinux/ss/sidtab.c
security/selinux/ss/symtab.c
sound/core/pcm_native.c
sound/core/sound.c
sound/oss/Kconfig
sound/oss/cmpci.c
sound/oss/dmasound/Kconfig
sound/oss/emu10k1/audio.c
sound/oss/via82cxxx_audio.c
sound/oss/vidc.c
sound/oss/vwsnd.c
sound/sound_core.c
sound/usb/usbaudio.h

index 6d22c66..811e062 100644 (file)
@@ -6,8 +6,7 @@
   
   <authorgroup>
    <author>
-    <firstname>Paul</firstname>
-    <othername>Rusty</othername>
+    <firstname>Rusty</firstname>
     <surname>Russell</surname>
     <affiliation>
      <address>
@@ -18,8 +17,8 @@
   </authorgroup>
 
   <copyright>
-   <year>2000</year>
-   <holder>Paul Russell</holder>
+   <year>2003</year>
+   <holder>Rusty Russell</holder>
   </copyright>
 
   <legalnotice>
    <para>
      Welcome, to Rusty's Remarkably Unreliable Guide to Kernel
      Locking issues.  This document describes the locking systems in
-     the Linux Kernel as we approach 2.4.
+     the Linux Kernel in 2.6.
    </para>
    <para>
-     It looks like <firstterm linkend="gloss-smp"><acronym>SMP</acronym>
-     </firstterm> is here to stay; so everyone hacking on the kernel 
-     these days needs to know the fundamentals of concurrency and locking 
-     for SMP.
+     With the wide availability of HyperThreading, and <firstterm
+     linkend="gloss-preemption">preemption </firstterm> in the Linux
+     Kernel, everyone hacking on the kernel needs to know the
+     fundamentals of concurrency and locking for
+     <firstterm linkend="gloss-smp"><acronym>SMP</acronym></firstterm>.
    </para>
 
-   <sect1 id="races">
+   <chapter id="races">
     <title>The Problem With Concurrency</title>
     <para>
       (Skip this if you know what a Race Condition is).
      </tgroup>
     </table>
 
+    <sect1 id="race-condition">
+    <title>Race Conditions and Critical Regions</title>
     <para>
-      This overlap, where what actually happens depends on the
-      relative timing of multiple tasks, is called a race condition.
+      This overlap, where the result depends on the
+      relative timing of multiple tasks, is called a <firstterm>race condition</firstterm>.
       The piece of code containing the concurrency issue is called a
-      critical region.  And especially since Linux starting running
+      <firstterm>critical region</firstterm>.  And especially since Linux starting running
       on SMP machines, they became one of the major issues in kernel
       design and implementation.
     </para>
     <para>
+      Preemption can have the same effect, even if there is only one
+      CPU: by preempting one task during the critical region, we have
+      exactly the same race condition.  In this case the thread which
+      preempts might run the critical region itself.
+    </para>
+    <para>
       The solution is to recognize when these simultaneous accesses
       occur, and use locks to make sure that only one instance can
       enter the critical region at any time.  There are many
       And then there are the unfriendly primitives, but I'll pretend
       they don't exist.
     </para>
-   </sect1>
   </chapter>
 
   <chapter id="locks">
+   <title>Locking in the Linux Kernel</title>
+
+   <para>
+     If I could give you one piece of advice: never sleep with anyone
+     crazier than yourself.  But if I had to give you advice on
+     locking: <emphasis>keep it simple</emphasis>.
+   </para>
+
+   <para>
+     Be reluctant to introduce new locks.
+   </para>
+
+   <para>
+     Strangely enough, this last one is the exact reverse of my advice when
+     you <emphasis>have</emphasis> slept with someone crazier than yourself.
+     And you should think about getting a big dog.
+   </para>
+
+   <sect1 id="lock-intro">
    <title>Two Main Types of Kernel Locks: Spinlocks and Semaphores</title>
 
    <para>
    </para>
    <para>
      Neither type of lock is recursive: see
-     <xref linkend="techniques-deadlocks">.
+     <xref linkend="deadlock">.
    </para>
+   </sect1>
  
    <sect1 id="uniprocessor">
     <title>Locks and Uniprocessor Kernels</title>
 
     <para>
-      For kernels compiled without <symbol>CONFIG_SMP</symbol>, spinlocks 
-      do not exist at all.  This is an excellent design decision: when
-      no-one else can run at the same time, there is no reason to
-      have a lock at all.
+      For kernels compiled without <symbol>CONFIG_SMP</symbol>, and
+      without <symbol>CONFIG_PREEMPT</symbol> spinlocks do not exist at
+      all.  This is an excellent design decision: when no-one else can
+      run at the same time, there is no reason to have a lock.
+    </para>
+
+    <para>
+      If the kernel is compiled without <symbol>CONFIG_SMP</symbol>,
+      but <symbol>CONFIG_PREEMPT</symbol> is set, then spinlocks
+      simply disable preemption, which is sufficient to prevent any
+      races.  For most purposes, we can think of preemption as
+      equivalent to SMP, and not worry about it separately.
     </para>
 
     <para>
       You should always test your locking code with <symbol>CONFIG_SMP</symbol>
-      enabled, even if you don't have an SMP test box, because it
-      will still catch some (simple) kinds of deadlock.
+      and <symbol>CONFIG_PREEMPT</symbol> enabled, even if you don't have an SMP test box, because it
+      will still catch some kinds of locking bugs.
     </para>
 
     <para>
     </para>
    </sect1>
 
-   <sect1 id="rwlocks">
-    <title>Read/Write Lock Variants</title>
-
-    <para>
-      Both spinlocks and semaphores have read/write variants:
-      <type>rwlock_t</type> and <structname>struct rw_semaphore</structname>. 
-      These divide users into two classes: the readers and the writers.  If 
-      you are only reading the data, you can get a read lock, but to write to 
-      the data you need the write lock.  Many people can hold a read lock,
-      but a writer must be sole holder.
-    </para>
-
-    <para>
-      This means much smoother locking if your code divides up
-      neatly along reader/writer lines.  All the discussions below
-      also apply to read/write variants.
-    </para>
-   </sect1>
-
     <sect1 id="usercontextlocking">
      <title>Locking Only In User Context</title>
 
    </sect1>
 
    <sect1 id="lock-user-bh">
-    <title>Locking Between User Context and BHs</title>
+    <title>Locking Between User Context and Softirqs</title>
 
     <para>
-      If a <firstterm linkend="gloss-bh">bottom half</firstterm> shares 
+      If a <firstterm linkend="gloss-softirq">softirq</firstterm> shares
       data with user context, you have two problems.  Firstly, the current 
-      user context can be interrupted by a bottom half, and secondly, the 
+      user context can be interrupted by a softirq, and secondly, the
       critical region could be entered from another CPU.  This is where
       <function>spin_lock_bh()</function> 
       (<filename class=headerfile>include/linux/spinlock.h</filename>) is 
-      used.  It disables bottom halves on that CPU, then grabs the lock.
-      <function>spin_unlock_bh()</function> does the reverse.
+      used.  It disables softirqs on that CPU, then grabs the lock.
+      <function>spin_unlock_bh()</function> does the reverse.  (The
+      '_bh' suffix is a historical reference to "Bottom Halves", the
+      old name for software interrupts.  It should really be
+      called spin_lock_softirq()' in a perfect world).
+    </para>
+
+    <para>
+      Note that you can also use <function>spin_lock_irq()</function>
+      or <function>spin_lock_irqsave()</function> here, which stop
+      hardware interrupts as well: see <xref linkend="hardirq-context">.
     </para>
 
     <para>
       </acronym></firstterm> as well: the spin lock vanishes, and this macro 
       simply becomes <function>local_bh_disable()</function>
       (<filename class=headerfile>include/linux/interrupt.h</filename>), which
-      protects you from the bottom half being run.
+      protects you from the softirq being run.
     </para>
    </sect1>
 
    <sect1 id="lock-user-tasklet">
-    <title>Locking Between User Context and Tasklets/Soft IRQs</title>
+    <title>Locking Between User Context and Tasklets</title>
 
     <para>
-      This is exactly the same as above, because
-      <function>local_bh_disable()</function> actually disables all 
-      softirqs and <firstterm linkend="gloss-tasklet">tasklets</firstterm>
-      on that CPU as well.  It should really be 
-      called `local_softirq_disable()', but the name has been preserved 
-      for historical reasons.  Similarly,
-      <function>spin_lock_bh()</function> would now be called 
-      spin_lock_softirq() in a perfect world.
+      This is exactly the same as above, because <firstterm
+      linkend="gloss-tasklet">tasklets</firstterm> are actually run
+      from a softirq.
     </para>
    </sect1>
 
-   <sect1 id="lock-bh">
-    <title>Locking Between Bottom Halves</title>
+   <sect1 id="lock-user-timers">
+    <title>Locking Between User Context and Timers</title>
 
     <para>
-      Sometimes a bottom half might want to share data with
-      another bottom half (especially remember that timers are run
-      off a bottom half).
+      This, too, is exactly the same as above, because <firstterm
+      linkend="gloss-timers">timers</firstterm> are actually run from
+      a softirq.  From a locking point of view, tasklets and timers
+      are identical.
     </para>
-
-    <sect2 id="lock-bh-same">
-     <title>The Same BH</title>
-
-     <para>
-       Since a bottom half is never run on two CPUs at once, you
-       don't need to worry about your bottom half being run twice
-       at once, even on SMP.
-     </para>
-    </sect2>
-
-    <sect2 id="lock-bh-different">
-     <title>Different BHs</title>
-
-     <para>
-       Since only one bottom half ever runs at a time once, you
-       don't need to worry about race conditions with other bottom
-       halves.  Beware that things might change under you, however,
-       if someone changes your bottom half to a tasklet.  If you
-       want to make your code future-proof, pretend you're already
-       running from a tasklet (see below), and doing the extra
-       locking.  Of course, if it's five years before that happens,
-       you're gonna look like a damn fool.
-     </para>
-    </sect2>
    </sect1>
 
    <sect1 id="lock-tasklets">
-    <title>Locking Between Tasklets</title>
+    <title>Locking Between Tasklets/Timers</title>
 
     <para>
-      Sometimes a tasklet might want to share data with another
-      tasklet, or a bottom half.
+      Sometimes a tasklet or timer might want to share data with
+      another tasklet or timer.
     </para>
 
     <sect2 id="lock-tasklets-same">
-     <title>The Same Tasklet</title>
+     <title>The Same Tasklet/Timer</title>
      <para>
        Since a tasklet is never run on two CPUs at once, you don't
        need to worry about your tasklet being reentrant (running
     </sect2>
 
     <sect2 id="lock-tasklets-different">
-     <title>Different Tasklets</title>
+     <title>Different Tasklets/Timers</title>
      <para>
-       If another tasklet (or bottom half, such as a timer) wants
-       to share data with your tasklet, you will both need to use
+       If another tasklet/timer wants
+       to share data with your tasklet or timer , you will both need to use
        <function>spin_lock()</function> and
        <function>spin_unlock()</function> calls.  
        <function>spin_lock_bh()</function> is
     <title>Locking Between Softirqs</title>
 
     <para>
-      Often a <firstterm linkend="gloss-softirq">softirq</firstterm> might 
-      want to share data with itself, a tasklet, or a bottom half.
+      Often a softirq might
+      want to share data with itself or a tasklet/timer.
     </para>
 
     <sect2 id="lock-softirqs-same">
      <title>Different Softirqs</title>
 
      <para>
-       You'll need to use <function>spin_lock()</function> and 
-       <function>spin_unlock()</function> for shared data, whether it 
-       be a timer (which can be running on a different CPU), bottom half, 
-       tasklet or the same or another softirq.
+       You'll need to use <function>spin_lock()</function> and
+       <function>spin_unlock()</function> for shared data, whether it
+       be a timer, tasklet, different softirq or the same or another
+       softirq: any of them could be running on a different CPU.
      </para>
     </sect2>
    </sect1>
    <title>Hard IRQ Context</title>
 
    <para>
-     Hardware interrupts usually communicate with a bottom half,
+     Hardware interrupts usually communicate with a
      tasklet or softirq.  Frequently this involves putting work in a
-     queue, which the BH/softirq will take out.
+     queue, which the softirq will take out.
    </para>
 
    <sect1 id="hardirq-softirq">
-    <title>Locking Between Hard IRQ and Softirqs/Tasklets/BHs</title>
+    <title>Locking Between Hard IRQ and Softirqs/Tasklets</title>
 
     <para>
       If a hardware irq handler shares data with a softirq, you have
     </para>
 
     <para>
+      The irq handler does not to use
+      <function>spin_lock_irq()</function>, because the softirq cannot
+      run while the irq handler is running: it can use
+      <function>spin_lock()</function>, which is slightly faster.  The
+      only exception would be if a different hardware irq handler uses
+      the same lock: <function>spin_lock_irq()</function> will stop
+      that from interrupting us.
+    </para>
+
+    <para>
       This works perfectly for UP as well: the spin lock vanishes,
       and this macro simply becomes <function>local_irq_disable()</function>
       (<filename class=headerfile>include/asm/smp.h</filename>), which 
       interrupts are already off) and in softirqs (where the irq
       disabling is required).
     </para>
+
+    <para>
+      Note that softirqs (and hence tasklets and timers) are run on
+      return from hardware interrupts, so
+      <function>spin_lock_irq()</function> also stops these.  In that
+      sense, <function>spin_lock_irqsave()</function> is the most
+      general and powerful locking function.
+    </para>
+
+   </sect1>
+   <sect1 id="hardirq-hardirq">
+    <title>Locking Between Two Hard IRQ Handlers</title>
+    <para>
+      It is rare to have to share data between two IRQ handlers, but
+      if you do, <function>spin_lock_irqsave()</function> should be
+      used: it is architecture-specific whether all interrupts are
+      disabled inside irq handlers themselves.
+    </para>
    </sect1>
-  </chapter>
 
-  <chapter id="common-techniques">
-   <title>Common Techniques</title>
+  </chapter>
 
+  <chapter id="cheatsheet">
+   <title>Cheat Sheet For Locking</title>
    <para>
-     This section lists some common dilemmas and the standard
-     solutions used in the Linux kernel code.  If you use these,
-     people will find your code simpler to understand.
+     Pete Zaitcev gives the following summary:
    </para>
+   <itemizedlist>
+      <listitem>
+       <para>
+          If you are in a process context (any syscall) and want to
+       lock other process out, use a semaphore.  You can take a semaphore
+       and sleep (<function>copy_from_user*(</function> or
+       <function>kmalloc(x,GFP_KERNEL)</function>).
+      </para>
+      </listitem>
+      <listitem>
+       <para>
+       Otherwise (== data can be touched in an interrupt), use
+       <function>spin_lock_irqsave()</function> and
+       <function>spin_unlock_irqrestore()</function>.
+       </para>
+      </listitem>
+      <listitem>
+       <para>
+       Avoid holding spinlock for more than 5 lines of code and
+       across any function call (except accessors like
+       <function>readb</function>).
+       </para>
+      </listitem>
+    </itemizedlist>
 
-   <para>
-     If I could give you one piece of advice: never sleep with anyone
-     crazier than yourself.  But if I had to give you advice on
-     locking: <emphasis>keep it simple</emphasis>.
-   </para>
+   <sect1 id="minimum-lock-reqirements">
+   <title>Table of Minimum Requirements</title>
 
-   <para>
-     Lock data, not code.
+   <para> The following table lists the <emphasis>minimum</emphasis>
+       locking requirements between various contexts.  In some cases,
+       the same context can only be running on one CPU at a time, so
+       no locking is required for that context (eg. a particular
+       thread can only run on one CPU at a time, but if it needs
+       shares data with another thread, locking is required).
    </para>
-
    <para>
-     Be reluctant to introduce new locks.
+       Remember the advice above: you can always use
+       <function>spin_lock_irqsave()</function>, which is a superset
+       of all other spinlock primitives.
    </para>
+   <table>
+<title>Table of Locking Requirements</title>
+<TGROUP COLS=11>
+<TBODY>
+<ROW>
+<ENTRY></ENTRY>
+<ENTRY>IRQ Handler A</ENTRY>
+<ENTRY>IRQ Handler B</ENTRY>
+<ENTRY>Softirq A</ENTRY>
+<ENTRY>Softirq B</ENTRY>
+<ENTRY>Tasklet A</ENTRY>
+<ENTRY>Tasklet B</ENTRY>
+<ENTRY>Timer A</ENTRY>
+<ENTRY>Timer B</ENTRY>
+<ENTRY>User Context A</ENTRY>
+<ENTRY>User Context B</ENTRY>
+</ROW>
+
+<ROW>
+<ENTRY>IRQ Handler A</ENTRY>
+<ENTRY>None</ENTRY>
+</ROW>
+
+<ROW>
+<ENTRY>IRQ Handler B</ENTRY>
+<ENTRY>spin_lock_irqsave</ENTRY>
+<ENTRY>None</ENTRY>
+</ROW>
+
+<ROW>
+<ENTRY>Softirq A</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+</ROW>
+
+<ROW>
+<ENTRY>Softirq B</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+</ROW>
+
+<ROW>
+<ENTRY>Tasklet A</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>None</ENTRY>
+</ROW>
+
+<ROW>
+<ENTRY>Tasklet B</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>None</ENTRY>
+</ROW>
+
+<ROW>
+<ENTRY>Timer A</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>None</ENTRY>
+</ROW>
+
+<ROW>
+<ENTRY>Timer B</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>spin_lock</ENTRY>
+<ENTRY>None</ENTRY>
+</ROW>
+
+<ROW>
+<ENTRY>User Context A</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>None</ENTRY>
+</ROW>
+
+<ROW>
+<ENTRY>User Context B</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock_irq</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>spin_lock_bh</ENTRY>
+<ENTRY>down_interruptible</ENTRY>
+<ENTRY>None</ENTRY>
+</ROW>
+
+</TBODY>
+</TGROUP>
+</TABLE>
+</chapter>
+
+  <chapter id="Examples">
+   <title>Common Examples</title>
+    <para>
+Let's step through a simple example: a cache of number to name
+mappings.  The cache keeps a count of how often each of the objects is
+used, and when it gets full, throws out the least used one.
 
-   <para>
-     Strangely enough, this is the exact reverse of my advice when
-     you <emphasis>have</emphasis> slept with someone crazier than yourself.
-   </para>
+    </para>
 
-   <sect1 id="techniques-no-writers">
-    <title>No Writers in Interrupt Context</title>
+   <sect1 id="examples-usercontext">
+    <title>All In User Context</title>
+    <para>
+For our first example, we assume that all operations are in user
+context (ie. from system calls), so we can sleep.  This means we can
+use a semaphore to protect the cache and all the objects within
+it.  Here's the code:
+    </para>
 
+    <programlisting>
+#include &lt;linux/list.h&gt;
+#include &lt;linux/slab.h&gt;
+#include &lt;linux/string.h&gt;
+#include &lt;asm/semaphore.h&gt;
+#include &lt;asm/errno.h&gt;
+
+struct object
+{
+        struct list_head list;
+        int id;
+        char name[32];
+        int popularity;
+};
+
+/* Protects the cache, cache_num, and the objects within it */
+static DECLARE_MUTEX(cache_lock);
+static LIST_HEAD(cache);
+static unsigned int cache_num = 0;
+#define MAX_CACHE_SIZE 10
+
+/* Must be holding cache_lock */
+static struct object *__cache_find(int id)
+{
+        struct object *i;
+
+        list_for_each_entry(i, &amp;cache, list)
+                if (i-&gt;id == id) {
+                        i-&gt;popularity++;
+                        return i;
+                }
+        return NULL;
+}
+
+/* Must be holding cache_lock */
+static void __cache_delete(struct object *obj)
+{
+        BUG_ON(!obj);
+        list_del(&amp;obj-&gt;list);
+        kfree(obj);
+        cache_num--;
+}
+
+/* Must be holding cache_lock */
+static void __cache_add(struct object *obj)
+{
+        list_add(&amp;obj-&gt;list, &amp;cache);
+        if (++cache_num > MAX_CACHE_SIZE) {
+                struct object *i, *outcast = NULL;
+                list_for_each_entry(i, &amp;cache, list) {
+                        if (!outcast || i-&gt;popularity &lt; outcast-&gt;popularity)
+                                outcast = i;
+                }
+                __cache_delete(outcast);
+        }
+}
+
+int cache_add(int id, const char *name)
+{
+        struct object *obj;
+
+        if ((obj = kmalloc(sizeof(*obj), GFP_KERNEL)) == NULL)
+                return -ENOMEM;
+
+        strlcpy(obj-&gt;name, name, sizeof(obj-&gt;name));
+        obj-&gt;id = id;
+        obj-&gt;popularity = 0;
+
+        down(&amp;cache_lock);
+        __cache_add(obj);
+        up(&amp;cache_lock);
+        return 0;
+}
+
+void cache_delete(int id)
+{
+        down(&amp;cache_lock);
+        __cache_delete(__cache_find(id));
+        up(&amp;cache_lock);
+}
+
+int cache_find(int id, char *name)
+{
+        struct object *obj;
+        int ret = -ENOENT;
+
+        down(&amp;cache_lock);
+        obj = __cache_find(id);
+        if (obj) {
+                ret = 0;
+                strcpy(name, obj-&gt;name);
+        }
+        up(&amp;cache_lock);
+        return ret;
+}
+</programlisting>
+
+    <para>
+Note that we always make sure we have the cache_lock when we add,
+delete, or look up the cache: both the cache infrastructure itself and
+the contents of the objects are protected by the lock.  In this case
+it's easy, since we copy the data for the user, and never let them
+access the objects directly.
+    </para>
     <para>
-      There is a fairly common case where an interrupt handler needs
-      access to a critical region, but does not need write access.
-      In this case, you do not need to use
-      <function>read_lock_irq()</function>, but only
-      <function>read_lock()</function> everywhere (since if an interrupt 
-      occurs, the irq handler will only try to grab a read lock, which 
-      won't deadlock).  You will still need to use 
-      <function>write_lock_irq()</function>.
+There is a slight (and common) optimization here: in
+<function>cache_add</function> we set up the fields of the object
+before grabbing the lock.  This is safe, as no-one else can access it
+until we put it in cache.
     </para>
+    </sect1>
 
+   <sect1 id="examples-interrupt">
+    <title>Accessing From Interrupt Context</title>
     <para>
-      Similar logic applies to locking between softirqs/tasklets/BHs
-      which never need a write lock, and user context: 
-      <function>read_lock()</function> and
-      <function>write_lock_bh()</function>.
+Now consider the case where <function>cache_find</function> can be
+called from interrupt context: either a hardware interrupt or a
+softirq.  An example would be a timer which deletes object from the
+cache.
+    </para>
+    <para>
+The change is shown below, in standard patch format: the
+<symbol>-</symbol> are lines which are taken away, and the
+<symbol>+</symbol> are lines which are added.
+    </para>
+<programlisting>
+--- cache.c.usercontext        2003-12-09 13:58:54.000000000 +1100
++++ cache.c.interrupt  2003-12-09 14:07:49.000000000 +1100
+@@ -12,7 +12,7 @@
+         int popularity;
+ };
+
+-static DECLARE_MUTEX(cache_lock);
++static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
+ static LIST_HEAD(cache);
+ static unsigned int cache_num = 0;
+ #define MAX_CACHE_SIZE 10
+@@ -55,6 +55,7 @@
+ int cache_add(int id, const char *name)
+ {
+         struct object *obj;
++        unsigned long flags;
+
+         if ((obj = kmalloc(sizeof(*obj), GFP_KERNEL)) == NULL)
+                 return -ENOMEM;
+@@ -63,30 +64,33 @@
+         obj-&gt;id = id;
+         obj-&gt;popularity = 0;
+
+-        down(&amp;cache_lock);
++        spin_lock_irqsave(&amp;cache_lock, flags);
+         __cache_add(obj);
+-        up(&amp;cache_lock);
++        spin_unlock_irqrestore(&amp;cache_lock, flags);
+         return 0;
+ }
+
+ void cache_delete(int id)
+ {
+-        down(&amp;cache_lock);
++        unsigned long flags;
++
++        spin_lock_irqsave(&amp;cache_lock, flags);
+         __cache_delete(__cache_find(id));
+-        up(&amp;cache_lock);
++        spin_unlock_irqrestore(&amp;cache_lock, flags);
+ }
+
+ int cache_find(int id, char *name)
+ {
+         struct object *obj;
+         int ret = -ENOENT;
++        unsigned long flags;
+
+-        down(&amp;cache_lock);
++        spin_lock_irqsave(&amp;cache_lock, flags);
+         obj = __cache_find(id);
+         if (obj) {
+                 ret = 0;
+                 strcpy(name, obj-&gt;name);
+         }
+-        up(&amp;cache_lock);
++        spin_unlock_irqrestore(&amp;cache_lock, flags);
+         return ret;
+ }
+</programlisting>
+
+    <para>
+Note that the <function>spin_lock_irqsave</function> will turn off
+interrupts if they are on, otherwise does nothing (if we are already
+in an interrupt handler), hence these functions are safe to call from
+any context.
+    </para>
+    <para>
+Unfortunately, <function>cache_add</function> calls
+<function>kmalloc</function> with the <symbol>GFP_KERNEL</symbol>
+flag, which is only legal in user context.  I have assumed that
+<function>cache_add</function> is still only called in user context,
+otherwise this should become a parameter to
+<function>cache_add</function>.
+    </para>
+  </sect1>
+   <sect1 id="examples-refcnt">
+    <title>Exposing Objects Outside This File</title>
+    <para>
+If our objects contained more information, it might not be sufficient
+to copy the information in and out: other parts of the code might want
+to keep pointers to these objects, for example, rather than looking up
+the id every time.  This produces two problems.
+    </para>
+    <para>
+The first problem is that we use the <symbol>cache_lock</symbol> to
+protect objects: we'd need to make this non-static so the rest of the
+code can use it.  This makes locking trickier, as it is no longer all
+in one place.
+    </para>
+    <para>
+The second problem is the lifetime problem: if another structure keeps
+a pointer to an object, it presumably expects that pointer to remain
+valid.  Unfortunately, this is only guaranteed while you hold the
+lock, otherwise someone might call <function>cache_delete</function>
+and even worse, add another object, re-using the same address.
+    </para>
+    <para>
+As there is only one lock, you can't hold it forever: no-one else would
+get any work done.
+    </para>
+    <para>
+The solution to this problem is to use a reference count: everyone who
+has a pointer to the object increases it when they first get the
+object, and drops the reference count when they're finished with it.
+Whoever drops it to zero knows it is unused, and can actually delete it.
+    </para>
+    <para>
+Here is the code:
     </para>
-   </sect1>
 
-   <sect1 id="techniques-deadlocks">
+<programlisting>
+--- cache.c.interrupt  2003-12-09 14:25:43.000000000 +1100
++++ cache.c.refcnt     2003-12-09 14:33:05.000000000 +1100
+@@ -7,6 +7,7 @@
+ struct object
+ {
+         struct list_head list;
++        unsigned int refcnt;
+         int id;
+         char name[32];
+         int popularity;
+@@ -17,6 +18,35 @@
+ static unsigned int cache_num = 0;
+ #define MAX_CACHE_SIZE 10
+
++static void __object_put(struct object *obj)
++{
++        if (--obj-&gt;refcnt == 0)
++                kfree(obj);
++}
++
++static void __object_get(struct object *obj)
++{
++        obj-&gt;refcnt++;
++}
++
++void object_put(struct object *obj)
++{
++        unsigned long flags;
++
++        spin_lock_irqsave(&amp;cache_lock, flags);
++        __object_put(obj);
++        spin_unlock_irqrestore(&amp;cache_lock, flags);
++}
++
++void object_get(struct object *obj)
++{
++        unsigned long flags;
++
++        spin_lock_irqsave(&amp;cache_lock, flags);
++        __object_get(obj);
++        spin_unlock_irqrestore(&amp;cache_lock, flags);
++}
++
+ /* Must be holding cache_lock */
+ static struct object *__cache_find(int id)
+ {
+@@ -35,6 +65,7 @@
+ {
+         BUG_ON(!obj);
+         list_del(&amp;obj-&gt;list);
++        __object_put(obj);
+         cache_num--;
+ }
+
+@@ -63,6 +94,7 @@
+         strlcpy(obj-&gt;name, name, sizeof(obj-&gt;name));
+         obj-&gt;id = id;
+         obj-&gt;popularity = 0;
++        obj-&gt;refcnt = 1; /* The cache holds a reference */
+
+         spin_lock_irqsave(&amp;cache_lock, flags);
+         __cache_add(obj);
+@@ -79,18 +111,15 @@
+         spin_unlock_irqrestore(&amp;cache_lock, flags);
+ }
+
+-int cache_find(int id, char *name)
++struct object *cache_find(int id)
+ {
+         struct object *obj;
+-        int ret = -ENOENT;
+         unsigned long flags;
+
+         spin_lock_irqsave(&amp;cache_lock, flags);
+         obj = __cache_find(id);
+-        if (obj) {
+-                ret = 0;
+-                strcpy(name, obj-&gt;name);
+-        }
++        if (obj)
++                __object_get(obj);
+         spin_unlock_irqrestore(&amp;cache_lock, flags);
+-        return ret;
++        return obj;
+ }
+</programlisting>
+
+<para>
+We encapsulate the reference counting in the standard 'get' and 'put'
+functions.  Now we can return the object itself from
+<function>cache_find</function> which has the advantage that the user
+can now sleep holding the object (eg. to
+<function>copy_to_user</function> to name to userspace).
+</para>
+<para>
+The other point to note is that I said a reference should be held for
+every pointer to the object: thus the reference count is 1 when first
+inserted into the cache.  In some versions the framework does not hold
+a reference count, but they are more complicated.
+</para>
+
+   <sect2 id="examples-refcnt-atomic">
+    <title>Using Atomic Operations For The Reference Count</title>
+<para>
+In practice, <type>atomic_t</type> would usually be used for
+<structfield>refcnt</structfield>.  There are a number of atomic
+operations defined in
+
+<filename class=headerfile>include/asm/atomic.h</filename>: these are
+guaranteed to be seen atomically from all CPUs in the system, so no
+lock is required.  In this case, it is simpler than using spinlocks,
+although for anything non-trivial using spinlocks is clearer.  The
+<function>atomic_inc</function> and
+<function>atomic_dec_and_test</function> are used instead of the
+standard increment and decrement operators, and the lock is no longer
+used to protect the reference count itself.
+</para>
+
+<programlisting>
+--- cache.c.refcnt     2003-12-09 15:00:35.000000000 +1100
++++ cache.c.refcnt-atomic      2003-12-11 15:49:42.000000000 +1100
+@@ -7,7 +7,7 @@
+ struct object
+ {
+         struct list_head list;
+-        unsigned int refcnt;
++        atomic_t refcnt;
+         int id;
+         char name[32];
+         int popularity;
+@@ -18,33 +18,15 @@
+ static unsigned int cache_num = 0;
+ #define MAX_CACHE_SIZE 10
+
+-static void __object_put(struct object *obj)
+-{
+-        if (--obj-&gt;refcnt == 0)
+-                kfree(obj);
+-}
+-
+-static void __object_get(struct object *obj)
+-{
+-        obj-&gt;refcnt++;
+-}
+-
+ void object_put(struct object *obj)
+ {
+-        unsigned long flags;
+-
+-        spin_lock_irqsave(&amp;cache_lock, flags);
+-        __object_put(obj);
+-        spin_unlock_irqrestore(&amp;cache_lock, flags);
++        if (atomic_dec_and_test(&amp;obj-&gt;refcnt))
++                kfree(obj);
+ }
+
+ void object_get(struct object *obj)
+ {
+-        unsigned long flags;
+-
+-        spin_lock_irqsave(&amp;cache_lock, flags);
+-        __object_get(obj);
+-        spin_unlock_irqrestore(&amp;cache_lock, flags);
++        atomic_inc(&amp;obj-&gt;refcnt);
+ }
+
+ /* Must be holding cache_lock */
+@@ -65,7 +47,7 @@
+ {
+         BUG_ON(!obj);
+         list_del(&amp;obj-&gt;list);
+-        __object_put(obj);
++        object_put(obj);
+         cache_num--;
+ }
+
+@@ -94,7 +76,7 @@
+         strlcpy(obj-&gt;name, name, sizeof(obj-&gt;name));
+         obj-&gt;id = id;
+         obj-&gt;popularity = 0;
+-        obj-&gt;refcnt = 1; /* The cache holds a reference */
++        atomic_set(&amp;obj-&gt;refcnt, 1); /* The cache holds a reference */
+
+         spin_lock_irqsave(&amp;cache_lock, flags);
+         __cache_add(obj);
+@@ -119,7 +101,7 @@
+         spin_lock_irqsave(&amp;cache_lock, flags);
+         obj = __cache_find(id);
+         if (obj)
+-                __object_get(obj);
++                object_get(obj);
+         spin_unlock_irqrestore(&amp;cache_lock, flags);
+         return obj;
+ }
+</programlisting>
+</sect1>
+
+   <sect1 id="examples-lock-per-obj">
+    <title>Protecting The Objects Themselves</title>
+    <para>
+In these examples, we assumed that the objects (except the reference
+counts) never changed once they are created.  If we wanted to allow
+the name to change, there are three possibilities:
+    </para>
+    <itemizedlist>
+      <listitem>
+       <para>
+You can make <symbol>cache_lock</symbol> non-static, and tell people
+to grab that lock before changing the name in any object.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+You can provide a <function>cache_obj_rename</function> which grabs
+this lock and changes the name for the caller, and tell everyone to
+use that function.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+You can make the <symbol>cache_lock</symbol> protect only the cache
+itself, and use another lock to protect the name.
+        </para>
+      </listitem>
+    </itemizedlist>
+
+      <para>
+Theoretically, you can make the locks as fine-grained as one lock for
+every field, for every object.  In practice, the most common variants
+are:
+</para>
+    <itemizedlist>
+      <listitem>
+       <para>
+One lock which protects the infrastructure (the <symbol>cache</symbol>
+list in this example) and all the objects.  This is what we have done
+so far.
+       </para>
+      </listitem>
+      <listitem>
+        <para>
+One lock which protects the infrastructure (including the list
+pointers inside the objects), and one lock inside the object which
+protects the rest of that object.
+        </para>
+      </listitem>
+      <listitem>
+        <para>
+Multiple locks to protect the infrastructure (eg. one lock per hash
+chain), possibly with a separate per-object lock.
+        </para>
+      </listitem>
+    </itemizedlist>
+
+<para>
+Here is the "lock-per-object" implementation:
+</para>
+<programlisting>
+--- cache.c.refcnt-atomic      2003-12-11 15:50:54.000000000 +1100
++++ cache.c.perobjectlock      2003-12-11 17:15:03.000000000 +1100
+@@ -6,11 +6,17 @@
+
+ struct object
+ {
++        /* These two protected by cache_lock. */
+         struct list_head list;
++        int popularity;
++
+         atomic_t refcnt;
++
++        /* Doesn't change once created. */
+         int id;
++
++        spinlock_t lock; /* Protects the name */
+         char name[32];
+-        int popularity;
+ };
+
+ static spinlock_t cache_lock = SPIN_LOCK_UNLOCKED;
+@@ -77,6 +84,7 @@
+         obj-&gt;id = id;
+         obj-&gt;popularity = 0;
+         atomic_set(&amp;obj-&gt;refcnt, 1); /* The cache holds a reference */
++        spin_lock_init(&amp;obj-&gt;lock);
+
+         spin_lock_irqsave(&amp;cache_lock, flags);
+         __cache_add(obj);
+</programlisting>
+
+<para>
+Note that I decide that the <structfield>popularity</structfield>
+count should be protected by the <symbol>cache_lock</symbol> rather
+than the per-object lock: this is because it (like the
+<structname>struct list_head</structname> inside the object) is
+logically part of the infrastructure.  This way, I don't need to grab
+the lock of every object in <function>__cache_add</function> when
+seeking the least popular.
+</para>
+
+<para>
+I also decided that the <structfield>id</structfield> member is
+unchangeable, so I don't need to grab each object lock in
+<function>__cache_find()</function> to examine the
+<structfield>id</structfield>: the object lock is only used by a
+caller who wants to read or write the <structfield>name</structfield>
+field.
+</para>
+
+<para>
+Note also that I added a comment describing what data was protected by
+which locks.  This is extremely important, as it describes the runtime
+behavior of the code, and can be hard to gain from just reading.  And
+as Alan Cox says, <quote>Lock data, not code</quote>.
+</para>
+</chapter>
+
+   <chapter id="common-problems">
+    <title>Common Problems</title>
+    <sect1 id="deadlock">
     <title>Deadlock: Simple and Advanced</title>
 
     <para>
 
     <para>
       For a slightly more complex case, imagine you have a region
-      shared by a bottom half and user context.  If you use a
+      shared by a softirq and user context.  If you use a
       <function>spin_lock()</function> call to protect it, it is 
-      possible that the user context will be interrupted by the bottom 
-      half while it holds the lock, and the bottom half will then spin 
+      possible that the user context will be interrupted by the softirq
+      while it holds the lock, and the softirq will then spin
       forever trying to get the same lock.
     </para>
 
     </para>
 
     <para>
-      A more complex problem is the so-called `deadly embrace',
+      A more complex problem is the so-called 'deadly embrace',
       involving two or more locks.  Say you have a hash table: each
       entry in the table is a spinlock, and a chain of hashed
       objects.  Inside a softirq handler, you sometimes want to
       their lock.  It will look, smell, and feel like a crash.
     </para>
 
-    <sect2 id="techs-deadlock-prevent">
+    <sect1 id="techs-deadlock-prevent">
      <title>Preventing Deadlock</title>
 
      <para>
        will do?).  Remember, the other programmers are out to get
        you, so don't do this.
      </para>
-    </sect2>
 
     <sect2 id="techs-deadlock-overprevent">
      <title>Overzealous Prevention Of Deadlocks</title>
        If you don't see why, please stay the fuck away from my code.
      </para>
     </sect2>
-   </sect1>
+    </sect1>
+
+   <sect1 id="racing-timers">
+    <title>Racing Timers: A Kernel Pastime</title>
 
-   <sect1 id="per-cpu">
-    <title>Per-CPU Data</title>
-      
     <para>
-      A great technique for avoiding locking which is used fairly
-      widely is to duplicate information for each CPU.  For example,
-      if you wanted to keep a count of a common condition, you could
-      use a spin lock and a single counter.  Nice and simple.
+      Timers can produce their own special problems with races.
+      Consider a collection of objects (list, hash, etc) where each
+      object has a timer which is due to destroy it.
     </para>
 
     <para>
-      If that was too slow [it's probably not], you could instead
-      use a counter for each CPU [don't], then none of them need an
-      exclusive lock [you're wasting your time here].  To make sure
-      the CPUs don't have to synchronize caches all the time, align
-      the counters to cache boundaries by appending
-      `__cacheline_aligned' to the declaration
-      (<filename class=headerfile>include/linux/cache.h</filename>). 
-      [Can't you think of anything better to do?]
+      If you want to destroy the entire collection (say on module
+      removal), you might do the following:
     </para>
 
+    <programlisting>
+        /* THIS CODE BAD BAD BAD BAD: IF IT WAS ANY WORSE IT WOULD USE
+           HUNGARIAN NOTATION */
+        spin_lock_bh(&amp;list_lock);
+
+        while (list) {
+                struct foo *next = list-&gt;next;
+                del_timer(&amp;list-&gt;timer);
+                kfree(list);
+                list = next;
+        }
+
+        spin_unlock_bh(&amp;list_lock);
+    </programlisting>
+
+    <para>
+      Sooner or later, this will crash on SMP, because a timer can
+      have just gone off before the <function>spin_lock_bh()</function>,
+      and it will only get the lock after we
+      <function>spin_unlock_bh()</function>, and then try to free
+      the element (which has already been freed!).
+    </para>
+
+    <para>
+      This can be avoided by checking the result of
+      <function>del_timer()</function>: if it returns
+      <returnvalue>1</returnvalue>, the timer has been deleted.
+      If <returnvalue>0</returnvalue>, it means (in this
+      case) that it is currently running, so we can do:
+    </para>
+
+    <programlisting>
+        retry:
+                spin_lock_bh(&amp;list_lock);
+
+                while (list) {
+                        struct foo *next = list-&gt;next;
+                        if (!del_timer(&amp;list-&gt;timer)) {
+                                /* Give timer a chance to delete this */
+                                spin_unlock_bh(&amp;list_lock);
+                                goto retry;
+                        }
+                        kfree(list);
+                        list = next;
+                }
+
+                spin_unlock_bh(&amp;list_lock);
+    </programlisting>
+
     <para>
-      They will need a read lock to access their own counters,
-      however.  That way you can use a write lock to grant exclusive
-      access to all of them at once, to tally them up.
+      Another common problem is deleting timers which restart
+      themselves (by calling <function>add_timer()</function> at the end
+      of their timer function).  Because this is a fairly common case
+      which is prone to races, you should use <function>del_timer_sync()</function>
+      (<filename class=headerfile>include/linux/timer.h</filename>)
+      to handle this case.  It returns the number of times the timer
+      had to be deleted before we finally stopped it from adding itself back
+      in.
     </para>
    </sect1>
 
-   <sect1 id="brlock">
-    <title>Big Reader Locks</title>
+   <sect1 id="sparc">
+    <title>The Fucked Up Sparc</title>
 
     <para>
-      A classic example of per-CPU information is Ingo's `big
-      reader' locks 
-      (<filename class=headerfile>linux/include/brlock.h</filename>).  These 
-      use the Per-CPU Data techniques described above to create a lock which 
-      is very fast to get a read lock, but agonizingly slow for a write
-      lock.
+      Alan Cox says <quote>the irq disable/enable is in the register
+      window on a sparc</quote>.  Andi Kleen says <quote>when you do
+      restore_flags in a different function you mess up all the
+      register windows</quote>.
     </para>
 
     <para>
-      Fortunately, there are a limited number of these locks
-      available: you have to go through a strict interview process
-      to get one.
+      So never pass the flags word set by
+      <function>spin_lock_irqsave()</function> and brethren to another
+      function (unless it's declared <type>inline</type>).  Usually no-one
+      does this, but now you've been warned.  Dave Miller can never do
+      anything in a straightforward manner (I can say that, because I have
+      pictures of him and a certain PowerPC maintainer in a compromising
+      position).
     </para>
    </sect1>
 
-   <sect1 id="lock-avoidance-rw">
-    <title>Avoiding Locks: Read And Write Ordering</title>
+  </chapter>
+
+ <chapter id="Efficiency">
+    <title>Locking Speed</title>
 
     <para>
-      Sometimes it is possible to avoid locking.  Consider the
-      following case from the 2.2 firewall code, which inserted an
-      element into a single linked list in user context:
+There are three main things to worry about when considering speed of
+some code which does locking.  First is concurrency: how many things
+are going to be waiting while someone else is holding a lock.  Second
+is the time taken to actually acquire and release an uncontended lock.
+Third is using fewer, or smarter locks.  I'm assuming that the lock is
+used fairly often: otherwise, you wouldn't be concerned about
+efficiency.
+</para>
+    <para>
+Concurrency depends on how long the lock is usually held: you should
+hold the lock for as long as needed, but no longer.  In the cache
+example, we always create the object without the lock held, and then
+grab the lock only when we are ready to insert it in the list.
+</para>
+    <para>
+Acquisition times depend on how much damage the lock operations do to
+the pipeline (pipeline stalls) and how likely it is that this CPU was
+the last one to grab the lock (ie. is the lock cache-hot for this
+CPU): on a machine with more CPUs, this likelihood drops fast.
+Consider a 700MHz Intel Pentium III: an instruction takes about 0.7ns,
+an atomic increment takes about 58ns, a lock which is cache-hot on
+this CPU takes 160ns, and a cacheline transfer from another CPU takes
+an additional 170 to 360ns.  (These figures from Paul McKenney's
+<ulink url="http://www.linuxjournal.com/article.php?sid=6993"> Linux
+Journal RCU article</ulink>).
+</para>
+    <para>
+These two aims conflict: holding a lock for a short time might be done
+by splitting locks into parts (such as in our final per-object-lock
+example), but this increases the number of lock acquisitions, and the
+results are often slower than having a single lock.  This is another
+reason to advocate locking simplicity.
+</para>
+    <para>
+The third concern is addressed below: there are some methods to reduce
+the amount of locking which needs to be done.
+</para>
+
+  <sect1 id="efficiency-rwlocks">
+   <title>Read/Write Lock Variants</title>
+
+   <para>
+      Both spinlocks and semaphores have read/write variants:
+      <type>rwlock_t</type> and <structname>struct rw_semaphore</structname>.
+      These divide users into two classes: the readers and the writers.  If
+      you are only reading the data, you can get a read lock, but to write to
+      the data you need the write lock.  Many people can hold a read lock,
+      but a writer must be sole holder.
     </para>
 
-    <programlisting>
-        new-&gt;next = i-&gt;next;
-        i-&gt;next = new;
-    </programlisting>
+   <para>
+      If your code divides neatly along reader/writer lines (as our
+      cache code does), and the lock is held by readers for
+      significant lengths of time, using these locks can help.  They
+      are slightly slower than the normal locks though, so in practice
+      <type>rwlock_t</type> is not usually worthwhile.
+    </para>
+   </sect1>
+
+   <sect1 id="efficiency-read-copy-update">
+    <title>Avoiding Locks: Read Copy Update</title>
 
     <para>
-      Here the author (Alan Cox, who knows what he's doing) assumes
-      that the pointer assignments are atomic.  This is important,
-      because networking packets would traverse this list on bottom
-      halves without a lock.  Depending on their exact timing, they
-      would either see the new element in the list with a valid 
-      <structfield>next</structfield> pointer, or it would not be in the 
-      list yet.  A lock is still required against other CPUs inserting
-      or deleting from the list, of course.
+      There is a special method of read/write locking called Read Copy
+      Update.  Using RCU, the readers can avoid taking a lock
+      altogether: as we expect our cache to be read more often than
+      updated (otherwise the cache is a waste of time), it is a
+      candidate for this optimization.
     </para>
 
     <para>
-      Of course, the writes <emphasis>must</emphasis> be in this
-      order, otherwise the new element appears in the list with an
-      invalid <structfield>next</structfield> pointer, and any other 
-      CPU iterating at the wrong time will jump through it into garbage.  
-      Because modern CPUs reorder, Alan's code actually read as follows:
+      How do we get rid of read locks?  Getting rid of read locks
+      means that writers may be changing the list underneath the
+      readers.  That is actually quite simple: we can read a linked
+      list while an element is being added if the writer adds the
+      element very carefully.  For example, adding
+      <symbol>new</symbol> to a single linked list called
+      <symbol>list</symbol>:
     </para>
-      
+
     <programlisting>
-        new-&gt;next = i-&gt;next;
+        new-&gt;next = list-&gt;next;
         wmb();
-        i-&gt;next = new;
+        list-&gt;next = new;
     </programlisting>
 
     <para>
-      The <function>wmb()</function> is a write memory barrier 
-      (<filename class=headerfile>include/asm/system.h</filename>): neither 
-      the compiler nor the CPU will allow any writes to memory after the 
-      <function>wmb()</function> to be visible to other hardware
-      before any of the writes before the <function>wmb()</function>.
+      The <function>wmb()</function> is a write memory barrier.  It
+      ensures that the first operation (setting the new element's
+      <symbol>next</symbol> pointer) is complete and will be seen by
+      all CPUs, before the second operation is (putting the new
+      element into the list).  This is important, since modern
+      compilers and modern CPUs can both reorder instructions unless
+      told otherwise: we want a reader to either not see the new
+      element at all, or see the new element with the
+      <symbol>next</symbol> pointer correctly pointing at the rest of
+      the list.
     </para>
-
     <para>
-      As i386 does not do write reordering, this bug would never
-      show up on that platform.  On other SMP platforms, however, it
-      will.
+      Fortunately, there is a function to do this for standard
+      <structname>struct list_head</structname> lists:
+      <function>list_add_rcu()</function>
+      (<filename>include/linux/list.h</filename>).
     </para>
-
     <para>
-      There is also <function>rmb()</function> for read ordering: to ensure 
-      any previous variable reads occur before following reads.  The simple
-      <function>mb()</function> macro combines both 
-      <function>rmb()</function> and <function>wmb()</function>.
+      Removing an element from the list is even simpler: we replace
+      the pointer to the old element with a pointer to its successor,
+      and readers will either see it, or skip over it.
     </para>
-
+    <programlisting>
+        list-&gt;next = old-&gt;next;
+    </programlisting>
     <para>
-      Some atomic operations are defined to act as a memory barrier
-      (ie. as per the <function>mb()</function> macro, but if in
-      doubt, be explicit.
-      <!-- Rusty Russell 2 May 2001, 2.4.4 -->
-      Also,
-      spinlock operations act as partial barriers: operations after
-      gaining a spinlock will never be moved to precede the
-      <function>spin_lock()</function> call, and operations before
-      releasing a spinlock will never be moved after the
-      <function>spin_unlock()</function> call.
-      <!-- Manfred Spraul <manfreds@colorfullife.com>
-           24 May 2000 2.3.99-pre9 -->
+      There is <function>list_del_rcu()</function>
+      (<filename>include/linux/list.h</filename>) which does this (the
+      normal version poisons the old object, which we don't want).
     </para>
-   </sect1>
-
-   <sect1 id="lock-avoidance-atomic-ops">
-    <title>Avoiding Locks: Atomic Operations</title>
-
     <para>
-      There are a number of atomic operations defined in
-      <filename class=headerfile>include/asm/atomic.h</filename>: these 
-      are guaranteed to be seen atomically from all CPUs in the system, thus 
-      avoiding races. If your shared data consists of a single counter, say, 
-      these operations might be simpler than using spinlocks (although for
-      anything non-trivial using spinlocks is clearer).
+      The reader must also be careful: some CPUs can look through the
+      <symbol>next</symbol> pointer to start reading the contents of
+      the next element early, but don't realize that the pre-fetched
+      contents is wrong when the <symbol>next</symbol> pointer changes
+      underneath them.  Once again, there is a
+      <function>list_for_each_entry_rcu()</function>
+      (<filename>include/linux/list.h</filename>) to help you.  Of
+      course, writers can just use
+      <function>list_for_each_entry()</function>, since there cannot
+      be two simultaneous writers.
     </para>
-
     <para>
-      Note that the atomic operations do in general not act as memory
-      barriers. Instead you can insert a memory barrier before or
-      after <function>atomic_inc()</function> or
-      <function>atomic_dec()</function> by inserting
-      <function>smp_mb__before_atomic_inc()</function>,
-      <function>smp_mb__after_atomic_inc()</function>,
-      <function>smp_mb__before_atomic_dec()</function> or
-      <function>smp_mb__after_atomic_dec()</function>
-      respectively. The advantage of using those macros instead of
-      <function>smp_mb()</function> is, that they are cheaper on some
-      platforms.    
-      <!-- Sebastian Wilhelmi <seppi@seppi.de> 2002-03-04 -->
+      Our final dilemma is this: when can we actually destroy the
+      removed element?  Remember, a reader might be stepping through
+      this element in the list right now: it we free this element and
+      the <symbol>next</symbol> pointer changes, the reader will jump
+      off into garbage and crash.  We need to wait until we know that
+      all the readers who were traversing the list when we deleted the
+      element are finished.  We use <function>call_rcu()</function> to
+      register a callback which will actually destroy the object once
+      the readers are finished.
+    </para>
+    <para>
+      But how does Read Copy Update know when the readers are
+      finished?  The method is this: firstly, the readers always
+      traverse the list inside
+      <function>rcu_read_lock()</function>/<function>rcu_read_unlock()</function>
+      pairs: these simply disable preemption so the reader won't go to
+      sleep while reading the list.
+    </para>
+    <para>
+      RCU then waits until every other CPU has slept at least once:
+      since readers cannot sleep, we know that any readers which were
+      traversing the list during the deletion are finished, and the
+      callback is triggered.  The real Read Copy Update code is a
+      little more optimized than this, but this is the fundamental
+      idea.
     </para>
-   </sect1>
 
-   <sect1 id="ref-counts">
-    <title>Protecting A Collection of Objects: Reference Counts</title>
+<programlisting>
+--- cache.c.perobjectlock      2003-12-11 17:15:03.000000000 +1100
++++ cache.c.rcupdate   2003-12-11 17:55:14.000000000 +1100
+@@ -1,15 +1,18 @@
+ #include &lt;linux/list.h&gt;
+ #include &lt;linux/slab.h&gt;
+ #include &lt;linux/string.h&gt;
++#include &lt;linux/rcupdate.h&gt;
+ #include &lt;asm/semaphore.h&gt;
+ #include &lt;asm/errno.h&gt;
+
+ struct object
+ {
+-        /* These two protected by cache_lock. */
++        /* This is protected by RCU */
+         struct list_head list;
+         int popularity;
+
++        struct rcu_head rcu;
++
+         atomic_t refcnt;
+
+         /* Doesn't change once created. */
+@@ -40,7 +43,7 @@
+ {
+         struct object *i;
+
+-        list_for_each_entry(i, &amp;cache, list) {
++        list_for_each_entry_rcu(i, &amp;cache, list) {
+                 if (i-&gt;id == id) {
+                         i-&gt;popularity++;
+                         return i;
+@@ -49,19 +52,25 @@
+         return NULL;
+ }
+
++/* Final discard done once we know no readers are looking. */
++static void cache_delete_rcu(void *arg)
++{
++        object_put(arg);
++}
++
+ /* Must be holding cache_lock */
+ static void __cache_delete(struct object *obj)
+ {
+         BUG_ON(!obj);
+-        list_del(&amp;obj-&gt;list);
+-        object_put(obj);
++        list_del_rcu(&amp;obj-&gt;list);
+         cache_num--;
++        call_rcu(&amp;obj-&gt;rcu, cache_delete_rcu, obj);
+ }
+
+ /* Must be holding cache_lock */
+ static void __cache_add(struct object *obj)
+ {
+-        list_add(&amp;obj-&gt;list, &amp;cache);
++        list_add_rcu(&amp;obj-&gt;list, &amp;cache);
+         if (++cache_num > MAX_CACHE_SIZE) {
+                 struct object *i, *outcast = NULL;
+                 list_for_each_entry(i, &amp;cache, list) {
+@@ -85,6 +94,7 @@
+         obj-&gt;popularity = 0;
+         atomic_set(&amp;obj-&gt;refcnt, 1); /* The cache holds a reference */
+         spin_lock_init(&amp;obj-&gt;lock);
++        INIT_RCU_HEAD(&amp;obj-&gt;rcu);
+
+         spin_lock_irqsave(&amp;cache_lock, flags);
+         __cache_add(obj);
+@@ -104,12 +114,11 @@
+ struct object *cache_find(int id)
+ {
+         struct object *obj;
+-        unsigned long flags;
+
+-        spin_lock_irqsave(&amp;cache_lock, flags);
++        rcu_read_lock();
+         obj = __cache_find(id);
+         if (obj)
+                 object_get(obj);
+-        spin_unlock_irqrestore(&amp;cache_lock, flags);
++        rcu_read_unlock();
+         return obj;
+ }
+</programlisting>
+
+<para>
+Note that the reader will alter the
+<structfield>popularity</structfield> member in
+<function>__cache_find()</function>, and now it doesn't hold a lock.
+One solution would be to make it an <type>atomic_t</type>, but for
+this usage, we don't really care about races: an approximate result is
+good enough, so I didn't change it.
+</para>
+
+<para>
+The result is that <function>cache_find()</function> requires no
+synchronization with any other functions, so is almost as fast on SMP
+as it would be on UP.
+</para>
+
+<para>
+There is a furthur optimization possible here: remember our original
+cache code, where there were no reference counts and the caller simply
+held the lock whenever using the object?  This is still possible: if
+you hold the lock, noone can delete the object, so you don't need to
+get and put the reference count.
+</para>
+
+<para>
+Now, because the 'read lock' in RCU is simply disabling preemption, a
+caller which always has preemption disabled between calling
+<function>cache_find()</function> and
+<function>object_put()</function> does not need to actually get and
+put the reference count: we could expose
+<function>__cache_find()</function> by making it non-static, and
+such callers could simply call that.
+</para>
+<para>
+The benefit here is that the reference count is not written to: the
+object is not altered in any way, which is much faster on SMP
+machines due to caching.
+</para>
+  </sect1>
+
+   <sect1 id="per-cpu">
+    <title>Per-CPU Data</title>
 
     <para>
-      Locking a collection of objects is fairly easy: you get a
-      single spinlock, and you make sure you grab it before
-      searching, adding or deleting an object.
+      Another technique for avoiding locking which is used fairly
+      widely is to duplicate information for each CPU.  For example,
+      if you wanted to keep a count of a common condition, you could
+      use a spin lock and a single counter.  Nice and simple.
     </para>
 
     <para>
-      The purpose of this lock is not to protect the individual
-      objects: you might have a separate lock inside each one for
-      that.  It is to protect the <emphasis>data structure
-      containing the objects</emphasis> from race conditions.  Often
-      the same lock is used to protect the contents of all the
-      objects as well, for simplicity, but they are inherently
-      orthogonal (and many other big words designed to confuse).
+      If that was too slow (it's usually not, but if you've got a
+      really big machine to test on and can show that it is), you
+      could instead use a counter for each CPU, then none of them need
+      an exclusive lock.  See <function>DEFINE_PER_CPU()</function>,
+      <function>get_cpu_var()</function> and
+      <function>put_cpu_var()</function>
+      (<filename class=headerfile>include/linux/percpu.h</filename>).
     </para>
 
     <para>
-      Changing this to a read-write lock will often help markedly if
-      reads are far more common that writes.  If not, there is
-      another approach you can use to reduce the time the lock is
-      held: reference counts.
+      Of particular use for simple per-cpu counters is the
+      <type>local_t</type> type, and the
+      <function>cpu_local_inc()</function> and related functions,
+      which are more efficient than simple code on some architectures
+      (<filename class=headerfile>include/asm/local.h</filename>).
     </para>
 
     <para>
-      In this approach, an object has an owner, who sets the
-      reference count to one.  Whenever you get a pointer to the
-      object, you increment the reference count (a `get' operation).
-      Whenever you relinquish a pointer, you decrement the reference
-      count (a `put' operation).  When the owner wants to destroy
-      it, they mark it dead, and do a put.
+      Note that there is no simple, reliable way of getting an exact
+      value of such a counter, without introducing more locks.  This
+      is not a problem for some uses.
     </para>
+   </sect1>
+
+   <sect1 id="mostly-hardirq">
+    <title>Data Which Mostly Used By An IRQ Handler</title>
 
     <para>
-      Whoever drops the reference count to zero (usually implemented
-      with <function>atomic_dec_and_test()</function>) actually cleans 
-      up and frees the object.
+      If data is always accessed from within the same IRQ handler, you
+      don't need a lock at all: the kernel already guarantees that the
+      irq handler will not run simultaneously on multiple CPUs.
     </para>
-
     <para>
-      This means that you are guaranteed that the object won't
-      vanish underneath you, even though you no longer have a lock
-      for the collection.
+      Manfred Spraul points out that you can still do this, even if
+      the data is very occasionally accessed in user context or
+      softirqs/tasklets.  The irq handler doesn't use a lock, and
+      all other accesses are done as so:
     </para>
 
+<programlisting>
+       spin_lock(&amp;lock);
+       disable_irq(irq);
+       ...
+       enable_irq(irq);
+       spin_unlock(&amp;lock);
+</programlisting>
     <para>
-      Here's some skeleton code:
+      The <function>disable_irq()</function> prevents the irq handler
+      from running (and waits for it to finish if it's currently
+      running on other CPUs).  The spinlock prevents any other
+      accesses happening at the same time.  Naturally, this is slower
+      than just a <function>spin_lock_irq()</function> call, so it
+      only makes sense if this type of access happens extremely
+      rarely.
     </para>
+   </sect1>
+  </chapter>
 
-    <programlisting>
-        void create_foo(struct foo *x)
-        {
-                atomic_set(&amp;x-&gt;use, 1);
-                spin_lock_bh(&amp;list_lock);
-                ... insert in list ...
-                spin_unlock_bh(&amp;list_lock);
-        }
-
-        struct foo *get_foo(int desc)
-        {
-                struct foo *ret;
-
-                spin_lock_bh(&amp;list_lock);
-                ... find in list ...
-                if (ret) atomic_inc(&amp;ret-&gt;use);
-                spin_unlock_bh(&amp;list_lock);
-
-                return ret;
-        }
-
-        void put_foo(struct foo *x)
-        {
-                if (atomic_dec_and_test(&amp;x-&gt;use))
-                        kfree(foo);
-        }
+ <chapter id="sleeping-things">
+    <title>What Functions Are Safe To Call From Interrupts?</title>
 
-        void destroy_foo(struct foo *x)
-        {
-                spin_lock_bh(&amp;list_lock);
-                ... remove from list ...
-                spin_unlock_bh(&amp;list_lock);
-
-                put_foo(x);
-        }
-    </programlisting>
+    <para>
+      Many functions in the kernel sleep (ie. call schedule())
+      directly or indirectly: you can never call them while holding a
+      spinlock, or with preemption disabled.  This also means you need
+      to be in user context: calling them from an interrupt is illegal.
+    </para>
 
-    <sect2 id="helpful-macros">
-     <title>Macros To Help You</title>
-     <para>
-       There are a set of debugging macros tucked inside
-       <filename class=headerfile>include/linux/netfilter_ipv4/lockhelp.h</filename>
-       and <filename class=headerfile>listhelp.h</filename>: these are very
-       useful for ensuring that locks are held in the right places to protect
-       infrastructure.
-     </para>
-    </sect2>
-   </sect1>
-   
-   <sect1 id="sleeping-things">
-    <title>Things Which Sleep</title>
+   <sect1 id="sleeping">
+    <title>Some Functions Which Sleep</title>
 
     <para>
-      You can never call the following routines while holding a
-      spinlock, as they may sleep.  This also means you need to be in
-      user context.
+      The most common ones are listed below, but you usually have to
+      read the code to find out if other calls are safe.  If everyone
+      else who calls it can sleep, you probably need to be able to
+      sleep, too.  In particular, registration and deregistration
+      functions usually expect to be called from user context, and can
+      sleep.
     </para>
 
     <itemizedlist>
      </listitem>
     </itemizedlist>
 
-    <para>
-     <function>printk()</function> can be called in
-     <emphasis>any</emphasis> context, interestingly enough.
-    </para>
-   </sect1>
-
-   <sect1 id="sparc">
-    <title>The Fucked Up Sparc</title>
+   <sect1 id="dont-sleep">
+    <title>Some Functions Which Don't Sleep</title>
 
     <para>
-      Alan Cox says <quote>the irq disable/enable is in the register
-      window on a sparc</quote>.  Andi Kleen says <quote>when you do
-      restore_flags in a different function you mess up all the
-      register windows</quote>.
+     Some functions are safe to call from any context, or holding
+     almost any lock.
     </para>
 
-    <para>
-      So never pass the flags word set by 
-      <function>spin_lock_irqsave()</function> and brethren to another 
-      function (unless it's declared <type>inline</type>.  Usually no-one 
-      does this, but now you've been warned.  Dave Miller can never do 
-      anything in a straightforward manner (I can say that, because I have
-      pictures of him and a certain PowerPC maintainer in a compromising 
-      position).
-    </para>
-   </sect1>
-
-   <sect1 id="racing-timers">
-    <title>Racing Timers: A Kernel Pastime</title>
-
-    <para>
-      Timers can produce their own special problems with races.
-      Consider a collection of objects (list, hash, etc) where each
-      object has a timer which is due to destroy it.
-    </para>
-
-    <para>
-      If you want to destroy the entire collection (say on module
-      removal), you might do the following:
-    </para>
-
-    <programlisting>
-        /* THIS CODE BAD BAD BAD BAD: IF IT WAS ANY WORSE IT WOULD USE
-           HUNGARIAN NOTATION */
-        spin_lock_bh(&amp;list_lock);
-
-        while (list) {
-                struct foo *next = list-&gt;next;
-                del_timer(&amp;list-&gt;timer);
-                kfree(list);
-                list = next;
-        }
-
-        spin_unlock_bh(&amp;list_lock);
-    </programlisting>
-
-    <para>
-      Sooner or later, this will crash on SMP, because a timer can
-      have just gone off before the <function>spin_lock_bh()</function>, 
-      and it will only get the lock after we 
-      <function>spin_unlock_bh()</function>, and then try to free
-      the element (which has already been freed!).
-    </para>
-
-    <para>
-      This can be avoided by checking the result of 
-      <function>del_timer()</function>: if it returns
-      <returnvalue>1</returnvalue>, the timer has been deleted.  
-      If <returnvalue>0</returnvalue>, it means (in this
-      case) that it is currently running, so we can do:
-    </para>
-
-    <programlisting>
-        retry:  
-                spin_lock_bh(&amp;list_lock);
-
-                while (list) {
-                        struct foo *next = list-&gt;next;
-                        if (!del_timer(&amp;list-&gt;timer)) {
-                                /* Give timer a chance to delete this */
-                                spin_unlock_bh(&amp;list_lock);
-                                goto retry;
-                        }
-                        kfree(list);
-                        list = next;
-                }
-
-                spin_unlock_bh(&amp;list_lock);
-    </programlisting>
-
-    <para>
-      Another common problem is deleting timers which restart
-      themselves (by calling <function>add_timer()</function> at the end 
-      of their timer function).  Because this is a fairly common case 
-      which is prone to races, you should use <function>del_timer_sync()</function> 
-      (<filename class=headerfile>include/linux/timer.h</filename>) 
-      to handle this case.  It returns the number of times the timer 
-      had to be deleted before we finally stopped it from adding itself back 
-      in.
-    </para>
+    <itemizedlist>
+     <listitem>
+      <para>
+       <function>printk()</function>
+      </para>
+     </listitem>
+     <listitem>
+      <para>
+        <function>kfree()</function>
+      </para>
+     </listitem>
+     <listitem>
+      <para>
+       <function>add_timer()</function> and <function>del_timer()</function>
+      </para>
+     </listitem>
+    </itemizedlist>
    </sect1>
   </chapter>
 
 
     <para>
       Thanks to Martin Pool, Philipp Rumpf, Stephen Rothwell, Paul
-      Mackerras, Ruedi Aschwanden, Alan Cox, Manfred Spraul and Tim
-      Waugh for proofreading, correcting, flaming, commenting.
+      Mackerras, Ruedi Aschwanden, Alan Cox, Manfred Spraul, Tim
+      Waugh, Pete Zaitcev, James Morris, Robert Love, Paul McKenney,
+      John Ashby for proofreading, correcting, flaming, commenting.
     </para>
 
     <para>
   <glossary id="glossary">
    <title>Glossary</title>
 
+   <glossentry id="gloss-preemption">
+    <glossterm>preemption</glossterm>
+     <glossdef>
+      <para>
+        Prior to 2.5, or when <symbol>CONFIG_PREEMPT</symbol> is
+        unset, processes in user context inside the kernel would not
+        preempt each other (ie. you had that CPU until you have it up,
+        except for interrupts).  With the addition of
+        <symbol>CONFIG_PREEMPT</symbol> in 2.5.4, this changed: when
+        in user context, higher priority tasks can "cut in": spinlocks
+        were changed to disable preemption, even on UP.
+     </para>
+    </glossdef>
+   </glossentry>
+
    <glossentry id="gloss-bh">
     <glossterm>bh</glossterm>
      <glossdef>
       <para>
         Bottom Half: for historical reasons, functions with
-        `_bh' in them often now refer to any software interrupt, e.g.
+        '_bh' in them often now refer to any software interrupt, e.g.
         <function>spin_lock_bh()</function> blocks any software interrupt 
         on the current CPU.  Bottom halves are deprecated, and will 
         eventually be replaced by tasklets.  Only one bottom half will be 
     <glossdef>
      <para>
        Hardware interrupt request.  <function>in_irq()</function> returns 
-       <returnvalue>true</returnvalue> in a hardware interrupt handler (it 
-       also returns true when interrupts are blocked).
+       <returnvalue>true</returnvalue> in a hardware interrupt handler.
      </para>
     </glossdef>
    </glossentry>
      <para>
        Not user context: processing a hardware irq or software irq.
        Indicated by the <function>in_interrupt()</function> macro 
-       returning <returnvalue>true</returnvalue> (although it also
-       returns true when interrupts or BHs are blocked).
+       returning <returnvalue>true</returnvalue>.
      </para>
     </glossdef>
    </glossentry>
    </glossentry>
 
    <glossentry id="gloss-softirq">
-    <glossterm>softirq</glossterm>
+    <glossterm>Software Interrupt / softirq</glossterm>
     <glossdef>
      <para>
-       Strictly speaking, one of up to 32 enumerated software
+       Software interrupt handler.  <function>in_irq()</function> returns
+       <returnvalue>false</returnvalue>; <function>in_softirq()</function>
+       returns <returnvalue>true</returnvalue>.  Tasklets and softirqs
+       both fall into the category of 'software interrupts'.
+     </para>
+     <para>
+       Strictly speaking a softirq is one of up to 32 enumerated software
        interrupts which can run on multiple CPUs at once.
-       Sometimes used to refer to tasklets and bottom halves as
+       Sometimes used to refer to tasklets as
        well (ie. all software interrupts).
      </para>
     </glossdef>
    </glossentry>
 
-   <glossentry id="gloss-swinterrupt">
-    <glossterm>Software Interrupt / Software IRQ</glossterm>
+   <glossentry id="gloss-tasklet">
+    <glossterm>tasklet</glossterm>
     <glossdef>
      <para>
-       Software interrupt handler.  <function>in_irq()</function> returns 
-       <returnvalue>false</returnvalue>; <function>in_softirq()</function>
-       returns <returnvalue>true</returnvalue>.  Tasklets, softirqs and 
-       bottom halves all fall into the category of `software interrupts'.
+       A dynamically-registrable software interrupt,
+       which is guaranteed to only run on one CPU at a time.
      </para>
     </glossdef>
    </glossentry>
 
-   <glossentry id="gloss-tasklet">
-    <glossterm>tasklet</glossterm>
+   <glossentry id="gloss-timers">
+    <glossterm>timer</glossterm>
     <glossdef>
      <para>
-       A dynamically-registrable software interrupt,
-       which is guaranteed to only run on one CPU at a time.
+       A dynamically-registrable software interrupt, which is run at
+       (or close to) a given time.  When running, it is just like a
+       tasklet (in fact, they are called from the TIMER_SOFTIRQ).
      </para>
     </glossdef>
    </glossentry>
     <glossterm>User Context</glossterm>
     <glossdef>
      <para>
-       The kernel executing on behalf of a particular
-       process or kernel thread (given by the <function>current()</function>
-       macro.)  Not to be confused with userspace.  Can be interrupted by 
-       software  or hardware interrupts.
+       The kernel executing on behalf of a particular process (ie. a
+       system call or trap) or kernel thread.  You can tell which
+       process with the <symbol>current</symbol> macro.)  Not to
+       be confused with userspace.  Can be interrupted by software or
+       hardware interrupts.
      </para>
     </glossdef>
    </glossentry>
diff --git a/Documentation/MSI-HOWTO.txt b/Documentation/MSI-HOWTO.txt
new file mode 100644 (file)
index 0000000..0dfcc56
--- /dev/null
@@ -0,0 +1,321 @@
+               The MSI Driver Guide HOWTO
+       Tom L Nguyen tom.l.nguyen@intel.com
+                       10/03/2003
+
+1. About this guide
+
+This guide describes the basics of Message Signaled Interrupts(MSI), the
+advantages of using MSI over traditional interrupt mechanisms, and how
+to enable your driver to use MSI or MSI-X. Also included is a Frequently
+Asked Questions.
+
+2. Copyright 2003 Intel Corporation
+
+3. What is MSI/MSI-X?
+
+Message Signaled Interrupt (MSI), as described in the PCI Local Bus
+Specification Revision 2.3 or latest, is an optional feature, and a
+required feature for PCI Express devices. MSI enables a device function
+to request service by sending an Inbound Memory Write on its PCI bus to
+the FSB as a Message Signal Interrupt transaction. Because MSI is
+generated in the form of a Memory Write, all transaction conditions,
+such as a Retry, Master-Abort, Target-Abort or normal completion, are
+supported.
+
+A PCI device that supports MSI must also support pin IRQ assertion
+interrupt mechanism to provide backward compatibility for systems that
+do not support MSI. In Systems, which support MSI, the bus driver is
+responsible for initializing the message address and message data of
+the device function's MSI/MSI-X capability structure during device
+initial configuration.
+
+An MSI capable device function indicates MSI support by implementing
+the MSI/MSI-X capability structure in its PCI capability list. The
+device function may implement both the MSI capability structure and
+the MSI-X capability structure; however, the bus driver should not
+enable both, but instead enable only the MSI-X capability structure.
+
+The MSI capability structure contains Message Control register,
+Message Address register and Message Data register. These registers
+provide the bus driver control over MSI. The Message Control register
+indicates the MSI capability supported by the device. The Message
+Address register specifies the target address and the Message Data
+register specifies the characteristics of the message. To request
+service, the device function writes the content of the Message Data
+register to the target address. The device and its software driver
+are prohibited from writing to these registers.
+
+The MSI-X capability structure is an optional extension to MSI. It
+uses an independent and separate capability structure. There are
+some key advantages to implementing the MSI-X capability structure
+over the MSI capability structure as described below.
+
+       - Support a larger maximum number of vectors per function.
+
+       - Provide the ability for system software to configure
+       each vector with an independent message address and message
+       data, specified by a table that resides in Memory Space.
+
+        - MSI and MSI-X both support per-vector masking. Per-vector
+       masking is an optional extension of MSI but a required
+       feature for MSI-X. Per-vector masking provides the kernel
+       the ability to mask/unmask MSI when servicing its software
+       interrupt service routing handler. If per-vector masking is
+       not supported, then the device driver should provide the
+       hardware/software synchronization to ensure that the device
+       generates MSI when the driver wants it to do so.
+
+4. Why use MSI?
+
+As a benefit the simplification of board design, MSI allows board
+designers to remove out of band interrupt routing. MSI is another
+step towards a legacy-free environment.
+
+Due to increasing pressure on chipset and processor packages to
+reduce pin count, the need for interrupt pins is expected to
+diminish over time. Devices, due to pin constraints, may implement
+messages to increase performance.
+
+PCI Express endpoints uses INTx emulation (in-band messages) instead
+of IRQ pin assertion. Using INTx emulation requires interrupt
+sharing among devices connected to the same node (PCI bridge) while
+MSI is unique (non-shared) and does not require BIOS configuration
+support. As a result, the PCI Express technology requires MSI
+support for better interrupt performance.
+
+Using MSI enables the device functions to support two or more
+vectors, which can be configure to target different CPU's to
+increase scalability.
+
+5. Configuring a driver to use MSI/MSI-X
+
+By default, the kernel will not enable MSI/MSI-X on all devices that
+support this capability once the patch is installed. A kernel
+configuration option must be selected to enable MSI/MSI-X support.
+
+5.1 Including MSI support into the kernel
+
+To include MSI support into the kernel requires users to patch the
+VECTOR-base patch first and then the MSI patch because the MSI
+support needs VECTOR based scheme. Once these patches are installed,
+setting CONFIG_PCI_USE_VECTOR enables the VECTOR based scheme and
+the option for MSI-capable device drivers to selectively enable MSI
+(using pci_enable_msi as desribed below).
+
+Since the target of the inbound message is the local APIC, providing
+CONFIG_PCI_USE_VECTOR is dependent on whether CONFIG_X86_LOCAL_APIC
+is enabled or not.
+
+int pci_enable_msi(struct pci_dev *)
+
+With this new API, any existing device driver, which like to have
+MSI enabled on its device function, must call this explicitly. A
+successful call will initialize the MSI/MSI-X capability structure
+with ONE vector, regardless of whether the device function is
+capable of supporting multiple messages. This vector replaces the
+pre-assigned dev->irq with a new MSI vector. To avoid the conflict
+of new assigned vector with existing pre-assigned vector requires
+the device driver to call this API before calling request_irq(...).
+
+The below diagram shows the events, which switches the interrupt
+mode on the MSI-capable device function between MSI mode and
+PIN-IRQ assertion mode.
+
+        ------------   pci_enable_msi   ------------------------
+       |            | <=============== |                        |
+       | MSI MODE   |                  | PIN-IRQ ASSERTION MODE |
+       |            | ===============> |                        |
+        ------------   free_irq         ------------------------
+
+5.2 Configuring for MSI support
+
+Due to the non-contiguous fashion in vector assignment of the
+existing Linux kernel, this patch does not support multiple
+messages regardless of the device function is capable of supporting
+more than one vector. The bus driver initializes only entry 0 of
+this capability if pci_enable_msi(...) is called successfully by
+the device driver.
+
+5.3 Configuring for MSI-X support
+
+Both the MSI capability structure and the MSI-X capability structure
+share the same above semantics; however, due to the ability of the
+system software to configure each vector of the MSI-X capability
+structure with an independent message address and message data, the
+non-contiguous fashion in vector assignment of the existing Linux
+kernel has no impact on supporting multiple messages on an MSI-X
+capable device functions. By default, as mentioned above, ONE vector
+should be always allocated to the MSI-X capability structure at
+entry 0. The bus driver does not initialize other entries of the
+MSI-X table.
+
+Note that the PCI subsystem should have full control of a MSI-X
+table that resides in Memory Space. The software device driver
+should not access this table.
+
+To request for additional vectors, the device software driver should
+call function msi_alloc_vectors(). It is recommended that the
+software driver should call this function once during the
+initialization phase of the device driver.
+
+The function msi_alloc_vectors(), once invoked, enables either
+all or nothing, depending on the current availability of vector
+resources. If no vector resources are available, the device function
+still works with ONE vector. If the vector resources are available
+for the number of vectors requested by the driver, this function
+will reconfigure the MSI-X capability structure of the device with
+additional messages, starting from entry 1. To emphasize this
+reason, for example, the device may be capable for supporting the
+maximum of 32 vectors while its software driver usually may request
+4 vectors.
+
+For each vector, after this successful call, the device driver is
+responsible to call other functions like request_irq(), enable_irq(),
+etc. to enable this vector with its corresponding interrupt service
+handler. It is the device driver's choice to have all vectors shared
+the same interrupt service handler or each vector with a unique
+interrupt service handler.
+
+In addition to the function msi_alloc_vectors(), another function
+msi_free_vectors() is provided to allow the software driver to
+release a number of vectors back to the vector resources. Once
+invoked, the PCI subsystem disables (masks) each vector released.
+These vectors are no longer valid for the hardware device and its
+software driver to use. Like free_irq, it recommends that the
+device driver should also call msi_free_vectors to release all
+additional vectors previously requested.
+
+int msi_alloc_vectors(struct pci_dev *dev, int *vector, int nvec)
+
+This API enables the software driver to request the PCI subsystem
+for additional messages. Depending on the number of vectors
+available, the PCI subsystem enables either all or nothing.
+
+Argument dev points to the device (pci_dev) structure.
+Argument vector is a pointer of integer type. The number of
+elements is indicated in argument nvec.
+Argument nvec is an integer indicating the number of messages
+requested.
+A return of zero indicates that the number of allocated vector is
+successfully allocated. Otherwise, indicate resources not
+available.
+
+int msi_free_vectors(struct pci_dev* dev, int *vector, int nvec)
+
+This API enables the software driver to inform the PCI subsystem
+that it is willing to release a number of vectors back to the
+MSI resource pool. Once invoked, the PCI subsystem disables each
+MSI-X entry associated with each vector stored in the argument 2.
+These vectors are no longer valid for the hardware device and
+its software driver to use.
+
+Argument dev points to the device (pci_dev) structure.
+Argument vector is a pointer of integer type. The number of
+elements is indicated in argument nvec.
+Argument nvec is an integer indicating the number of messages
+released.
+A return of zero indicates that the number of allocated vectors
+is successfully released. Otherwise, indicates a failure.
+
+5.4 Hardware requirements for MSI support
+MSI support requires support from both system hardware and
+individual hardware device functions.
+
+5.4.1 System hardware support
+Since the target of MSI address is the local APIC CPU, enabling
+MSI support in Linux kernel is dependent on whether existing
+system hardware supports local APIC. Users should verify their
+system whether it runs when CONFIG_X86_LOCAL_APIC=y.
+
+In SMP environment, CONFIG_X86_LOCAL_APIC is automatically set;
+however, in UP environment, users must manually set
+CONFIG_X86_LOCAL_APIC. Once CONFIG_X86_LOCAL_APIC=y, setting
+CONFIG_PCI_USE_VECTOR enables the VECTOR based scheme and
+the option for MSI-capable device drivers to selectively enable
+MSI (using pci_enable_msi as desribed below).
+
+Note that CONFIG_X86_IO_APIC setting is irrelevant because MSI
+vector is allocated new during runtime and MSI support does not
+depend on BIOS support. This key independency enables MSI support
+on future IOxAPIC free platform.
+
+5.4.2 Device hardware support
+The hardware device function supports MSI by indicating the
+MSI/MSI-X capability structure on its PCI capability list. By
+default, this capability structure will not be initialized by
+the kernel to enable MSI during the system boot. In other words,
+the device function is running on its default pin assertion mode.
+Note that in many cases the hardware supporting MSI have bugs,
+which may result in system hang. The software driver of specific
+MSI-capable hardware is responsible for whether calling
+pci_enable_msi or not. A return of zero indicates the kernel
+successfully initializes the MSI/MSI-X capability structure of the
+device funtion. The device function is now running on MSI mode.
+
+5.5 How to tell whether MSI is enabled on device function
+
+At the driver level, a return of zero from pci_enable_msi(...)
+indicates to the device driver that its device function is
+initialized successfully and ready to run in MSI mode.
+
+At the user level, users can use command 'cat /proc/interrupts'
+to display the vector allocated for the device and its interrupt
+mode, as shown below.
+
+           CPU0       CPU1
+  0:     324639          0    IO-APIC-edge  timer
+  1:       1186          0    IO-APIC-edge  i8042
+  2:          0          0          XT-PIC  cascade
+ 12:       2797          0    IO-APIC-edge  i8042
+ 14:       6543          0    IO-APIC-edge  ide0
+ 15:          1          0    IO-APIC-edge  ide1
+169:          0          0   IO-APIC-level  uhci-hcd
+185:          0          0   IO-APIC-level  uhci-hcd
+193:        138         10         PCI MSI  aic79xx
+201:         30          0         PCI MSI  aic79xx
+225:         30          0   IO-APIC-level  aic7xxx
+233:         30          0   IO-APIC-level  aic7xxx
+NMI:          0          0
+LOC:     324553     325068
+ERR:          0
+MIS:          0
+
+6. FAQ
+
+Q1. Are there any limitations on using the MSI?
+
+A1. If the PCI device supports MSI and conforms to the
+specification and the platform supports the APIC local bus,
+then using MSI should work.
+
+Q2. Will it work on all the Pentium processors (P3, P4, Xeon,
+AMD processors)? In P3 IPI's are transmitted on the APIC local
+bus and in P4 and Xeon they are transmitted on the system
+bus. Are there any implications with this?
+
+A2. MSI support enables a PCI device sending an inbound
+memory write (0xfeexxxxx as target address) on its PCI bus
+directly to the FSB. Since the message address has a
+redirection hint bit cleared, it should work.
+
+Q3. The target address 0xfeexxxxx will be translated by the
+Host Bridge into an interrupt message. Are there any
+limitations on the chipsets such as Intel 8xx, Intel e7xxx,
+or VIA?
+
+A3. If these chipsets support an inbound memory write with
+target address set as 0xfeexxxxx, as conformed to PCI
+specification 2.3 or latest, then it should work.
+
+Q4. From the driver point of view, if the MSI is lost because
+of the errors occur during inbound memory write, then it may
+wait for ever. Is there a mechanism for it to recover?
+
+A4. Since the target of the transaction is an inbound memory
+write, all transaction termination conditions (Retry,
+Master-Abort, Target-Abort, or normal completion) are
+supported. A device sending an MSI must abide by all the PCI
+rules and conditions regarding that inbound memory write. So,
+if a retry is signaled it must retry, etc... We believe that
+the recommendation for Abort is also a retry (refer to PCI
+specification 2.3 or latest).
index 820e073..8145891 100644 (file)
@@ -34,14 +34,13 @@ Linux 2.2:
        maintainer then please contact Alan Cox <alan@lxorguk.ukuu.org.uk>
 
 Linux 2.4:
-       The same rules apply as 2.2 but this kernel tree is under active
-       development. The final contact point for Linux 2.4 submissions is
-       Marcelo Tosatti <marcelo@conectiva.com.br>.
+       The same rules apply as 2.2. The final contact point for Linux 2.4
+       submissions is Marcelo Tosatti <marcelo.tosatti@cyclades.com>.
 
-Linux 2.5:
+Linux 2.6:
        The same rules apply as 2.4 except that you should follow linux-kernel
-       to track changes in API's. The final contact point for Linux 2.5
-       submissions is Linus Torvalds <torvalds@osdl.org>.
+       to track changes in API's. The final contact point for Linux 2.6
+       submissions is Andrew Morton <akpm@osdl.org>.
 
 What Criteria Determine Acceptance
 ----------------------------------
index 13691ba..f24dbca 100644 (file)
@@ -323,7 +323,7 @@ involved. In the latter case, the driver would modify and manage the
 request->buffer, request->sector and request->nr_sectors or
 request->current_nr_sectors fields itself rather than using the block layer
 end_request or end_that_request_first completion interfaces.
-(See 2.3 or Documentation/bio/request.txt for a brief explanation of
+(See 2.3 or Documentation/block/request.txt for a brief explanation of
 the request structure fields)
 
 [TBD: end_that_request_last should be usable even in this case;
@@ -517,7 +517,7 @@ request structure.
 Only some relevant fields (mainly those which changed or may be referred
 to in some of the discussion here) are listed below, not necessarily in
 the order in which they occur in the structure (see include/linux/blkdev.h)
-Refer to Documentation/bio/request.txt for details about all the request
+Refer to Documentation/block/request.txt for details about all the request
 structure fields and a quick reference about the layers which are
 supposed to use or modify those fields.
 
index bd5cee3..ab76dac 100644 (file)
@@ -2165,27 +2165,16 @@ Your cooperation is appreciated.
                  0 = /dev/usb/lp0      First USB printer
                    ...
                 15 = /dev/usb/lp15     16th USB printer
-                32 = /dev/usb/mdc800   MDC800 USB camera
+                16 = /dev/usb/mouse0   First USB mouse
+                   ...
+                31 = /dev/usb/mouse15  16th USB mouse
+                32 = /dev/usb/ez0      First USB firmware loader
+                   ...
+                47 = /dev/usb/ez15     16th USB firmware loader
                 48 = /dev/usb/scanner0 First USB scanner
                    ...
                 63 = /dev/usb/scanner15 16th USB scanner
                 64 = /dev/usb/rio500   Diamond Rio 500
-                96 = /dev/usb/hiddev0  1st USB HID device
-                   ...
-               111 = /dev/usb/hiddev15 16th USB HID device
-               112 = /dev/usb/auer0    1st auerswald ISDN device
-                   ...
-               127 = /dev/usb/auer15   16th auerswald ISDN device
-               128 = /dev/usb/brlvgr0  First Braille Voyager device
-                   ...
-               131 = /dev/usb/brlvgr3  Fourth Braille Voyager device
-               144 = /dev/usb/lcd      USB LCD device
-               160 = /dev/usb/legousbtower0    1st USB Legotower device
-                   ...
-               175 = /dev/usb/legousbtower15   16th USB Legotower device
-               240 = /dev/usb/dabusb0  First daubusb device
-                   ...
-               243 = /dev/usb/dabusb3  Fourth dabusb device
 
 181 char       Conrad Electronic parallel port radio clocks
                  0 = /dev/pcfclock0    First Conrad radio clock
diff --git a/Documentation/dvb/bt8xx.txt b/Documentation/dvb/bt8xx.txt
new file mode 100644 (file)
index 0000000..e3cacf4
--- /dev/null
@@ -0,0 +1,90 @@
+How to get the Nebula, PCTV and Twinhan DST cards working
+=========================================================
+
+This class of cards has a bt878a as the PCI interface, and
+require the bttv driver.
+
+Please pay close attention to the warning about the bttv module
+options below for the DST card.
+
+1) General informations
+=======================
+
+These drivers require the bttv driver to provide the means to access
+the i2c bus and the gpio pins of the bt8xx chipset.
+
+Because of this, you need to enable
+"Device drivers" => "Multimedia devices"
+  => "Video For Linux" => "BT848 Video For Linux"
+
+2) Loading Modules
+==================
+
+In general you need to load the bttv driver, which will handle the gpio and
+i2c communication for us. Next you need the common dvb-bt8xx device driver
+and one frontend driver.
+
+The bttv driver will HANG YOUR SYSTEM IF YOU DO NOT SPECIFY THE CORRECT 
+CARD ID!
+
+(If you don't get your card running and you suspect that the card id you're
+using is wrong, have a look at "bttv-cards.c" for a list of possible card
+ids.)
+
+Pay attention to failures when you load the frontend drivers
+(e.g. dmesg, /var/log/messages).
+
+3a) Nebula / Pinnacle PCTV
+--------------------------
+
+   $ modprobe bttv i2c_hw=1 card=0x68
+   $ modprobe dvb-bt8xx
+   
+For Nebula cards use the "nxt6000" frontend driver:
+   $ modprobe nxt6000
+
+For Pinnacle PCTV cards use the "cx24110" frontend driver:
+   $ modprobe cx24110
+
+3b) TwinHan
+-----------
+
+   $ modprobe bttv i2c_hw=1 card=0x71
+   $ modprobe dvb-bt8xx
+   $ modprobe dst
+
+The value 0x71 will override the PCI type detection for dvb-bt8xx, which 
+is necessary for TwinHan cards.#
+
+If you're having an older card (blue color circuit) and card=0x71 locks your
+machine, try using 0x68, too. If that does not work, ask on the DVB mailing list.
+
+The DST module takes a couple of useful parameters, in case the
+dst drivers fails to detect your type of card correctly.
+
+dst_type takes values 0 (satellite), 1 (terrestial TV), 2 (cable).
+
+dst_type_flags takes bit combined values:
+1 = new tuner type packets. You can use this if your card is detected
+    and you have debug and you continually see the tuner packets not
+    working (make sure not a basic problem like dish alignment etc.)
+
+2 = TS 204. If your card tunes OK, but the picture is terrible, seemingly
+    breaking up in one half continually, and crc fails a lot, then
+    this is worth a try (or trying to turn off)
+
+4 = has symdiv. Some cards, mostly without new tuner packets, require
+    a symbol division algorithm. Doesn't apply to terrestial TV.
+
+You can also specify a value to have the autodetected values turned off
+(e.g. 0). The autodected values are determined bythe cards 'response
+string' which you can see in your logs e.g.
+
+dst_check_ci: recognize DST-MOT
+
+or 
+
+dst_check_ci: unable to recognize DSTXCI or STXCI
+
+--
+Authors: Richard Walker, Jamie Honan, Michael Hunold
diff --git a/Documentation/dvb/cards.txt b/Documentation/dvb/cards.txt
new file mode 100644 (file)
index 0000000..3742638
--- /dev/null
@@ -0,0 +1,63 @@
+Hardware supported by the linuxtv.org DVB drivers
+=================================================
+
+  Generally, the DVB hardware manufacturers frequently change the
+  frontends (i.e. tuner / demodulator units) used, usually without
+  changing the product name, revision number or specs. Some cards
+  are also available in versions with different frontends for
+  DVB-S/DVB-C/DVB-T. Thus the frontend drivers are listed seperately.
+
+  Note 1: There is no guarantee that every frontend driver works
+  out-of-the box with every card, because of different wiring.
+
+  Note 2: The demodulator chips can be used with a variety of
+  tuner/PLL chips, and not all combinations are supported. Often
+  the demodulator and tuner/PLL chip are inside a metal box for
+  shielding, and the whole metal box has its own part number.
+
+
+o Frontends drivers: 
+  - dvb_dummy_fe: for testing...
+  DVB-S:
+   - alps_bsrv2                : Alps BSRV2 (ves1893 demodulator)
+   - cx24110           : Conexant HM1221/HM1811 (cx24110 or cx24106 demod, cx24108 PLL)
+   - grundig_29504-491 : Grundig 29504-491 (Philips TDA8083 demodulator), tsa5522 PLL
+   - mt312             : Zarlink mt312 or Mitel vp310 demodulator, sl1935 or tsa5059 PLL
+   - stv0299           : Alps BSRU6 (tsa5059 PLL), LG TDQB-S00x (tsa5059 PLL),
+                         LG TDQF-S001F (sl1935 PLL), Philips SU1278 (tua6100 PLL), 
+                         Philips SU1278SH (tsa5059 PLL)
+  DVB-C:
+   - ves1820           : various (ves1820 demodulator, sp5659c or spXXXX PLL)
+   - at76c651          : Atmel AT76c651(B) with DAT7021 PLL
+  DVB-T:
+   - alps_tdlb7                : Alps TDLB7 (sp8870 demodulator, sp5659 PLL)
+   - alps_tdmb7                : Alps TDMB7 (cx22700 demodulator)
+   - grundig_29504-401 : Grundig 29504-401 (LSI L64781 demodulator), tsa5060 PLL
+   - tda1004x          : Philips tda10045h (td1344 or tdm1316l PLL)
+   - nxt6000           : Alps TDME7 (MITEL SP5659 PLL), Alps TDED4 (TI ALP510 PLL),
+                                 Comtech DVBT-6k07 (SP5730 PLL)
+                                 (NxtWave Communications NXT6000 demodulator)
+
+
+o Cards based on the Phillips saa7146 multimedia PCI bridge chip:
+  - TI AV7110 based cards (i.e. with hardware MPEG decoder):
+    - Siemens/Technotrend/Hauppauge PCI DVB card revision 1.1, 1.3, 1.5, 1.6, 2.1
+      (aka Hauppauge Nexus)
+  - "budget" cards (i.e. without hardware MPEG decoder):
+    - Technotrend Budget / Hauppauge WinTV-Nova PCI Cards
+    - SATELCO Multimedia PCI
+    - KNC1 DVB-S
+
+o Cards based on the B2C2 Inc. FlexCopII:
+  - Technisat SkyStar2 PCI DVB
+
+o Cards based on the Conexant Bt8xx PCI bridge:
+  - Pinnacle PCTV Sat DVB
+  - Nebula Electronics DigiTV
+
+o Technotrend / Hauppauge DVB USB devices:
+  - Nova USB
+  - DEC 2000-T
+
+o Preliminary support for the analog module of the Siemens DVB-C PCI card
+
diff --git a/Documentation/dvb/contributors.txt b/Documentation/dvb/contributors.txt
new file mode 100644 (file)
index 0000000..923d937
--- /dev/null
@@ -0,0 +1,62 @@
+Thanks go to the following people for patches and contributions:
+
+Michael Hunold <m.hunold@gmx.de>
+  for the initial saa7146 driver and it's recent overhaul
+
+Christian Theiss
+  for his work on the initial Linux DVB driver
+
+Marcus Metzler <mocm@metzlerbros.de>
+Ralph Metzler <rjkm@metzlerbros.de>
+  for their contining work on the DVB driver
+
+Michael Holzt <kju@debian.org>
+  for his contributions to the dvb-net driver
+
+Diego Picciani <d.picciani@novacomp.it>
+  for CyberLogin for Linux which allows logging onto EON
+  (in case you are wondering where CyberLogin is, EON changed its login 
+  procedure and CyberLogin is no longer used.)
+
+Martin Schaller <martin@smurf.franken.de>
+  for patching the cable card decoder driver
+
+Klaus Schmidinger <Klaus.Schmidinger@cadsoft.de>
+  for various fixes regarding tuning, OSD and CI stuff and his work on VDR
+
+Steve Brown <sbrown@cortland.com>
+  for his AFC kernel thread
+
+Christoph Martin <martin@uni-mainz.de>
+  for his LIRC infrared handler
+
+Andreas Oberritter <obi@linuxtv.org>
+Dennis Noermann <dennis.noermann@noernet.de>
+Felix Domke <tmbinc@elitedvb.net>
+Florian Schirmer <jolt@tuxbox.org>
+Ronny Strutz <3des@elitedvb.de>
+Wolfram Joost <dbox2@frokaschwei.de>
+...and all the other dbox2 people
+  for many bugfixes in the generic DVB Core, frontend drivers and
+  their work on the dbox2 port of the DVB driver
+
+Oliver Endriss <o.endriss@gmx.de>
+  for many bugfixes
+
+Andrew de Quincey <adq_dvb@lidskialf.net>
+  for the tda1004x frontend driver, and various bugfixes
+
+Peter Schildmann <peter.schildmann@web.de>
+  for the driver for the Technisat SkyStar2 PCI DVB card
+
+Vadim Catana <skystar@moldova.cc>
+Roberto Ragusa <r.ragusa@libero.it>
+Augusto Cardoso <augusto@carhil.net>
+  for all the work for the FlexCopII chipset by B2C2,Inc.
+
+Davor Emard <emard@softhome.net>
+  for his work on the budget drivers, the demux code,
+  the module unloading problems, ...
+  
+(If you think you should be in this list, but you are not, drop a
+ line to the DVB mailing list)
diff --git a/Documentation/dvb/faq.txt b/Documentation/dvb/faq.txt
new file mode 100644 (file)
index 0000000..28e63ec
--- /dev/null
@@ -0,0 +1,109 @@
+Some very frequently asked questions about linuxtv-dvb
+
+1. The signal seems to die a few seconds after tuning.
+
+       It's not a bug, it's a feature. Because the frontends have
+       significant power requirements (and hence get very hot), they
+       are powered down if they are unused (i.e. if the frontend device
+       is closed). The dvb-core.o module paramter "dvb_shutdown_timeout"
+       allow you to change the timeout (default 5 seconds). Setting the
+       timeout to 0 disables the timeout feature.
+
+2. How can I watch TV?
+
+       The driver distribution includes some simple utilities which
+       are mainly intended for testing and to demonstrate how the
+       DVB API works.
+
+       Depending on whether you have a DVB-S, DVB-C or DVB-T card, use
+       apps/szap/szap, czap or tzap. You must supply a channel list
+       in ~/.[sct]zap/channels.conf. If you are lucky you can just copy
+       one of the supplied channel lists, or you can create a new one
+       by running apps/scan/scan. If you run scan on an unknown network
+       you might have to supply some start data in apps/scan/initial.h.
+
+       If you have a card with a built-in hardware MPEG-decoder the
+       drivers create a video4linux device (/dev/v4l/video0) which
+       you can use to watch TV with any v4l application. xawtv is known
+       to work. Note that you cannot change channels with xawtv, you
+       have to zap using [sct]zap. If you want a nice application for
+       TV watching and record/playback, have a look at VDR.
+
+       If your card does not have a hardware MPEG decoder you need
+       a software MPEG decoder. Mplayer or xine are known to work.
+       Newsflash: MythTV also has DVB support now.
+       Note: Only very recent versions of Mplayer and xine can decode.
+       MPEG2 transport streams (TS) directly. Then, run
+       '[sct]zap channelname -r' in one xterm, and keep it running,
+       and start 'mplayer - < /dev/dvb/adapter0/dvr0' or 
+       'xine stdin://mpeg2 < /dev/dvb/adapter0/dvr0' in a second xterm.
+       That's all far from perfect, but it seems no one has written
+       a nice DVB application which includes a builtin software MPEG
+       decoder yet.
+
+       Newsflash: Newest xine directly supports DVB. Just copy your
+       channels.conf to ~/.xine and start 'xine dvb://', or select
+       the DVB button in the xine GUI. Channel switching works using the
+       numpad pgup/pgdown (NP9 / NP3) keys to scroll through the channel osd
+       menu and pressing numpad-enter to switch to the selected channel.
+
+       Note: Older versions of xine and mplayer understand MPEG program
+       streams (PS) only, and can be used in conjunction with the
+       ts2ps tool from the Metzler Brother's dvb-mpegtools package.
+
+3. Which other DVB applications exist?
+
+       http://www.cadsoft.de/people/kls/vdr/
+               Klaus Schmidinger's Video Disk Recorder
+
+       http://www.metzlerbros.org/dvb/
+               Metzler Bros. DVB development; alternate drivers and
+               DVB utilities, include dvb-mpegtools and tuxzap.
+
+       http://www.linuxstb.org/
+       http://sourceforge.net/projects/dvbtools/
+               Dave Chapman's dvbtools package, including
+               dvbstream and dvbtune
+
+       http://www.linuxdvb.tv/
+               Henning Holtschneider's site with many interesting
+               links and docs
+
+       http://www.dbox2.info/
+               LinuxDVB on the dBox2
+
+       http://www.tuxbox.org/
+       http://cvs.tuxbox.org/
+               the TuxBox CVS many interesting DVB applications and the dBox2
+               DVB source
+
+       http://sourceforge.net/projects/dvbsak/
+               DVB Swiss Army Knife library and utilities
+
+       http://www.nenie.org/misc/mpsys/
+               MPSYS: a MPEG2 system library and tools
+
+       http://mplayerhq.hu/
+               mplayer
+
+       http://xine.sourceforge.net/
+       http://xinehq.de/
+               xine
+
+       http://www.mythtv.org/
+               MythTV - analog TV PVR, but now with DVB support, too
+               (with software MPEG decode)
+
+4. Can't get a signal tuned correctly
+
+       If you are using a Technotrend/Hauppauge DVB-C card *without* analog
+       module, you might have to use module parameter adac=-1 (dvb-ttpci.o).
+
+5. The dvb_net device doesn't give me any multicast packets
+
+       Check your routes if they include the multicast address range.
+       Additionally make sure that "source validation by reversed path
+       lookup" is disabled:
+         $ "echo 0 > /proc/sys/net/ipv4/conf/dvb0/rp_filter"
+
+eof
diff --git a/Documentation/dvb/firmware.txt b/Documentation/dvb/firmware.txt
new file mode 100644 (file)
index 0000000..3a85c0b
--- /dev/null
@@ -0,0 +1,116 @@
+Some DVB cards and many newer frontends require proprietary,
+binary-only firmware.
+
+The DVB drivers will be converted to use the request_firmware()
+hotplug interface (see linux/Documentation/firmware_class/).
+(CONFIG_FW_LOADER)
+
+The firmware can be loaded automatically via the hotplug manager
+or manually with the steps described below.
+
+Currently the drivers still use various different methods
+to load their firmwares, so here's just a short list of the
+current state:
+
+- dvb-ttpci: driver uses firmware hotplug interface
+- ttusb-budget: firmware is compiled in (dvb-ttusb-dspbootcode.h)
+- sp887x: firmware is compiled in (sp887x_firm.h)
+- alps_tdlb7: firmware is loaded from path specified by
+               "mcfile" module parameter; the binary must be
+               extracted from the Windows driver (Sc_main.mc).
+- tda1004x: firmware is loaded from path specified in
+               DVB_TDA1004X_FIRMWARE_FILE kernel config
+               variable (default /etc/dvb/tda1004x.bin); the
+               firmware binary must be extracted from the windows
+               driver
+- ttusb-dec: see "ttusb-dec.txt" for details
+
+1) Automatic firmware loading
+
+You need to install recent hotplug scripts if your distribution did not do it
+for you already, especially the  /etc/hotplug/firmware.agent.
+http://linux-hotplug.sourceforge.net/ (Call /sbin/hotplug without arguments
+to find out if the firmware agent is installed.)
+
+The firmware.agent script expects firmware binaries in
+/usr/lib/hotplug/firmware/. To avoid naming and versioning
+conflicts we propose the following naming scheme:
+
+  /usr/lib/hotplug/firmware/dvb-{driver}-{ver}.fw      for MPEG decoders etc.
+  /usr/lib/hotplug/firmware/dvb-fe-{driver}-{ver}.fw   for frontends
+
+  {driver} name is the basename of the driver kernel module (e.g. dvb-ttpci)
+  {ver} is a version number/name that should change only when the
+  driver/firmware internal API changes (so users are free to install the
+  latest firmware compatible with the driver).
+
+2) Manually loading the firmware into a driver
+   (currently only the dvb-ttpci / av7110 driver supports this)
+   
+Step a) Mount sysfs-filesystem.
+
+Sysfs provides a means to export kernel data structures, their attributes,
+and the linkages between them to userspace. 
+
+For detailed informations have a look at Documentation/filesystems/sysfs.txt 
+All you need to know at the moment is that firmware loading only works through
+sysfs.
+
+> mkdir /sys
+> mount -t sysfs sysfs /sys
+
+Step b) Exploring the firmware loading facilities
+
+Firmware_class support is located in
+/sys/class/firmware
+
+> dir /sys/class/firmware
+
+The "timeout" values specifies the amount of time that is waited before the
+firmware upload  process is cancelled. The default values is 10 seconds. If
+you use a hotplug script for the firmware upload, this is sufficient. If
+you want to upload the firmware by hand, however, this might be too fast.
+
+> echo "180" > /sys/class/firmware/timeout
+
+Step c) Getting a usable firmware file for the dvb-ttpci driver/av7110 card.
+
+You can download the firmware files from
+http://www.linuxtv.org/download/dvb/
+
+Please note that in case of the dvb-ttpci driver this is *not* the "Root"
+file you probably know from the 2.4 DVB releases driver.
+
+> wget http://www.linuxtv.org/download/dvb/dvb-ttpci-01.fw
+gets you the version 01 of the firmware fot the ttpci driver.
+
+Step d) Loading the dvb-ttpci driver and loading the firmware
+
+"modprobe" will take care that every needed module will be loaded
+automatically (except the frontend driver)
+
+> modprobe dvb-ttpci
+
+The "modprobe" process will hang until
+a) you upload the firmware or
+b) the timeout occurs.
+
+Change to another terminal and have a look at 
+
+> dir /sys/class/firmware/
+
+total 0
+drwxr-xr-x    2 root     root            0 Jul 29 11:00 0000:03:05.0
+-rw-r--r--    1 root     root            0 Jul 29 10:41 timeout
+
+"0000:03:05.0" is the id for my dvb-c card. It depends on the pci slot,
+so it changes if you plug the card to different slots.
+
+You can upload the firmware like that:
+
+> export DEVDIR=/sys/class/firmware/0000\:03\:05.0
+> echo 1 > $DEVDIR/loading
+> cat dvb-ttpci-01.fw > $DEVDIR/data
+> echo 0 > $DEVDIR/loading
+
+That's it. The driver should be up and running now.
diff --git a/Documentation/dvb/readme.txt b/Documentation/dvb/readme.txt
new file mode 100644 (file)
index 0000000..720aa8c
--- /dev/null
@@ -0,0 +1,44 @@
+Linux Digital Video Broadcast (DVB) subsystem
+=============================================
+
+The main development site and CVS repository for these
+drivers is http://linuxtv.org/.
+
+The developer mailing list linux-dvb is also hosted there,
+see http://linuxtv.org/mailinglists.xml. Please check
+the archive http://linuxtv.org/mailinglists/linux-dvb/
+before asking newbie questions on the list.
+
+API documentation, utilities and test/example programs
+are available as part of the old driver package for Linux 2.4
+(linuxtv-dvb-1.0.x.tar.gz), or from CVS (module DVB).
+We plan to split this into separate packages, but it's not
+been done yet.
+
+http://linuxtv.org/download/dvb/
+
+What's inside this directory:
+
+"cards.txt" 
+contains a list of supported hardware.
+
+"contributors.txt"
+is the who-is-who of DVB development
+
+"faq.txt"
+contains frequently asked questions and their answers.
+
+"firmware.txt" 
+contains informations for required external firmware
+files and where to get them.
+
+"ttusb-dec.txt"
+contains detailed informations about the
+TT DEC2000/DEC3000 USB DVB hardware.
+
+"bt8xx.txt" 
+contains detailed installation instructions for the
+various bt8xx based "budget" DVB cards
+(Nebula, Pinnacle PCTV, Twinhan DST)
+
+Good luck and have fun!
diff --git a/Documentation/dvb/ttusb-dec.txt b/Documentation/dvb/ttusb-dec.txt
new file mode 100644 (file)
index 0000000..e2fefb6
--- /dev/null
@@ -0,0 +1,49 @@
+TechnoTrend/Hauppauge DEC USB Driver
+====================================
+
+Driver Status
+-------------
+
+Supported:
+       DEC2000-t
+       Linux Kernels 2.4 and 2.6
+       Video Streaming
+       Audio Streaming
+       Section Filters
+       Channel Zapping
+       Hotplug firmware loader under 2.6 kernels
+
+In Progress:
+       DEC3000-s
+
+To Do:
+       Tuner status information
+       DVB network interface
+       Streaming video PC->DEC
+
+Getting the Firmware
+--------------------
+Currently, the driver only works with v2.15a of the firmware.  The firmwares
+can be obtained in this way:
+
+wget http://hauppauge.lightpath.net/de/dec215a.exe
+unzip -j dec215a.exe Software/Oem/STB/App/Boot/STB_PC_T.bin
+unzip -j dec215a.exe Software/Oem/STB/App/Boot/STB_PC_S.bin
+
+
+Compilation Notes for 2.4 kernels
+---------------------------------
+For 2.4 kernels the firmware for the DECs is compiled into the driver itself.
+The firmwares are expected to be in /etc/dvb at compilation time.
+
+mv STB_PC_T.bin /etc/dvb/dec2000t.bin
+mv STB_PC_S.bin /etc/dvb/dec3000s.bin
+
+
+Hotplug Firmware Loading for 2.6 kernels
+----------------------------------------
+For 2.6 kernels the firmware is loaded at the point that the driver module is
+loaded.  See linux/Documentation/dvb/firmware.txt for more information.
+
+mv STB_PC_T.bin /usr/lib/hotplug/firmware/dvb-ttusb-dec-2000t-2.15a.fw
+mv STB_PC_S.bin /usr/lib/hotplug/firmware/dvb-ttusb-dec-3000s-2.15a.fw
index 3382565..069262f 100644 (file)
@@ -32,7 +32,7 @@ resolutions.
 You should compile in both vgacon (to boot if you remove your Rage128 from
 box) and aty128fb (for graphics mode). You should not compile-in vesafb
 unless you have primary display on non-Rage128 VBE2.0 device (see 
-Documentation/vesafb.txt for details).
+Documentation/fb/vesafb.txt for details).
 
 
 X11
index 2747d59..621e3b3 100644 (file)
@@ -31,7 +31,7 @@ pass to the kernel this command line: "video=matroxfb:vesa:0x1BB".
 You should compile in both vgacon (to boot if you remove you Matrox from
 box) and matroxfb (for graphics mode). You should not compile-in vesafb
 unless you have primary display on non-Matrox VBE2.0 device (see 
-Documentation/vesafb.txt for details).
+Documentation/fb/vesafb.txt for details).
 
 Currently supported video modes are (through vesa:... interface, PowerMac
 has [as addon] compatibility code):
index 4c426bd..83e6a8f 100644 (file)
@@ -420,7 +420,7 @@ transfer:   no
 prototypes:
        void (*open)(struct vm_area_struct*);
        void (*close)(struct vm_area_struct*);
-       struct page *(*nopage)(struct vm_area_struct*, unsigned long, int);
+       struct page *(*nopage)(struct vm_area_struct*, unsigned long, int *);
 
 locking rules:
                BKL     mmap_sem
index 8a633ea..04be638 100644 (file)
@@ -1,6 +1,6 @@
 i2c-velleman driver
 -------------------
-This is a driver for i2c-hw access for Velleman K9000 and other adapters.
+This is a driver for i2c-hw access for Velleman K8000 and other adapters.
 
 Useful links
 ------------
@@ -10,18 +10,14 @@ Velleman:
 Velleman K8000 Howto:
        http://howto.htlw16.ac.at/k8000-howto.html
 
-
 K8000 and K8005 libraries
 -------------------------
-The project has lead to new libs for the Velleman K8000 and K8005..
+The project has lead to new libs for the Velleman K8000 and K8005:
 LIBK8000 v1.99.1 and LIBK8005 v0.21
 
-With these libs you can control the K8000 and K8005 with the original
-simple commands which are in the original Velleman software.
-Like SetIOchannel, ReadADchannel, SendStepCCWFull and many more.
-Via i2c kernel device /dev/velleman
+With these libs, you can control the K8000 interface card and the K8005
+stepper motor card with the simple commands which are in the original
+Velleman software, like SetIOchannel, ReadADchannel, SendStepCCWFull and
+many more, using /dev/velleman.
 
 The libs can be found on http://groups.yahoo.com/group/k8000/files/linux/
-
-The Velleman K8000 interface card on http://www.velleman.be/kits/k8000.htm
-The Velleman K8005 steppermotorcard on http://www.velleman.be/kits/k8005.htm
index c0288bb..41dde87 100644 (file)
@@ -71,5 +71,5 @@ i2c-philips-par: Philips style parallel port adapter (uses i2c-algo-bit)
 i2c-adap-ibm_ocp: IBM 4xx processor I2C device (uses i2c-algo-ibm_ocp) (NOT BUILT BY DEFAULT)
 i2c-pport:       Primitive parallel port adapter (uses i2c-algo-bit)
 i2c-rpx:         RPX board Motorola 8xx I2C device (uses i2c-algo-8xx) (NOT BUILT BY DEFAULT)
-i2c-velleman:    Velleman K9000 parallel port adapter (uses i2c-algo-bit)
+i2c-velleman:    Velleman K8000 parallel port adapter (uses i2c-algo-bit)
 
index 634365a..b6291db 100644 (file)
@@ -22,6 +22,7 @@ Offset        Type            Description
                          0x90000 + contents of CL_OFFSET
                        (only taken, when CL_MAGIC = 0xA33F)
  0x40  20 bytes        struct apm_bios_info, APM_BIOS_INFO
+ 0x60  16 bytes        Intel SpeedStep (IST) BIOS support information
  0x80  16 bytes        hd0-disk-parameter from intvector 0x41
  0x90  16 bytes        hd1-disk-parameter from intvector 0x46
 
index 6e08145..a2aef36 100644 (file)
@@ -255,7 +255,7 @@ driver.
 is also emulated, characters should appear if you move it.
 
   You can test the joystick emulation with the 'jstest' utility,
-available in the joystick package (see Documentation/joystick.txt).
+available in the joystick package (see Documentation/input/joystick.txt).
 
   You can test the event devices with the 'evtest' utility available
 in the LinuxConsole project CVS archive (see the URL below).
index 371dc92..da51c0e 100644 (file)
@@ -141,8 +141,8 @@ Expressions are listed in decreasing order of precedence.
     otherwise 'y'.
 (4) Returns the value of the expression. Used to override precedence.
 (5) Returns the result of (2-/expr/).
-(6) Returns the result of max(/expr/, /expr/).
-(7) Returns the result of min(/expr/, /expr/).
+(6) Returns the result of min(/expr/, /expr/).
+(7) Returns the result of max(/expr/, /expr/).
 
 An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2
 respectively for calculations). A menu entry becomes visible when it's
index e9b3f02..bcda6f4 100644 (file)
@@ -1,4 +1,4 @@
-For now this is a raw copy from the old Documentation/modules.txt,
+For now this is a raw copy from the old Documentation/kbuild/modules.txt,
 which was removed in 2.6.0-test5.
 The information herein is correct but not complete.
 
index 5c763ce..46b80e3 100644 (file)
@@ -24,6 +24,7 @@ restrictions referred to are that the relevant option is valid if:
        HW      Appropriate hardware is enabled.
        IA-32   IA-32 aka i386 architecture is enabled.
        IA-64   IA-64 architecture is enabled.
+       IOSCHED More than one I/O scheduler is enabled.
        IP_PNP  IP DCHP, BOOTP, or RARP is enabled.
        ISAPNP  ISA PnP code is enabled.
        ISDN    Appropriate ISDN support is enabled.
@@ -303,6 +304,10 @@ running once the system is up.
                        See comment before function elanfreq_setup() in
                        arch/i386/kernel/cpu/cpufreq/elanfreq.c.
 
+       elevator=       [IOSCHED]
+                       Format: {"as"|"cfq"|"deadline"|"noop"}
+                       See Documentation/as-iosched.txt for details
+
        es1370=         [HW,OSS]
                        Format: <lineout>[,<micbias>]
                        See also header of sound/oss/es1370.c.
@@ -790,7 +795,8 @@ running once the system is up.
                        before loading.
                        See Documentation/ramdisk.txt.
 
-       psmouse_noext   [HW,MOUSE] Disable probing for PS2 mouse protocol extensions
+       psmouse_proto=  [HW,MOUSE] Highest PS2 mouse protocol extension to
+                       probe for (bare|imps|exps).
 
        psmouse_resetafter=
                        [HW,MOUSE] Try to reset Synaptics Touchpad after so many
@@ -1144,7 +1150,7 @@ running once the system is up.
                        See header of drivers/scsi/wd7000.c.
 
        wdt=            [WDT] Watchdog
-                       See Documentation/watchdog.txt.
+                       See Documentation/watchdog/watchdog.txt.
 
        xd=             [HW,XT] Original XT pre-IDE (RLL encoded) disks.
        xd_geo=         See header of drivers/block/xd.c.
index bbe9902..030a5b6 100644 (file)
@@ -678,4 +678,23 @@ IPv6 Update by:
 Pekka Savola <pekkas@netcore.fi>
 YOSHIFUJI Hideaki / USAGI Project <yoshfuji@linux-ipv6.org>
 
+
+/proc/sys/net/bridge/* Variables:
+
+bridge-nf-call-arptables - BOOLEAN
+       1 : pass bridged ARP traffic to arptables' FORWARD chain.
+       0 : disable this.
+       Default: 1
+
+bridge-nf-call-iptables - BOOLEAN
+       1 : pass bridged IPv4 traffic to iptables' chains.
+       0 : disable this.
+       Default: 1
+
+bridge-nf-filter-vlan-tagged - BOOLEAN
+       1 : pass bridged vlan-tagged ARP/IP traffic to arptables/iptables.
+       0 : disable this.
+       Default: 1
+
+
 $Id: ip-sysctl.txt,v 1.20 2001/12/13 09:00:18 davem Exp $
index 2ef5db0..f44b8fd 100644 (file)
@@ -577,7 +577,7 @@ LILO Linux Boot Loader (in /etc/lilo.conf):
 INSMOD Loadable Kernel Module Installation Facility:
 
   insmod BusLogic.o \
-      'BusLogic_Options="QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"'
+      'BusLogic="QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"'
 
 NOTE: Module Utilities 2.1.71 or later is required for correct parsing
       of driver options containing commas.
index aa953bb..486c98d 100644 (file)
@@ -1,5 +1,5 @@
 ====================================================================
-=             Adaptec Ultra320 Family Manager Set v1.3.0           =
+=             Adaptec Ultra320 Family Manager Set v1.3.11          =
 =                                                                  =
 =                            README for                            =
 =                    The Linux Operating System                    =
@@ -19,57 +19,169 @@ The following information is available in this file:
    The following Adaptec SCSI Host Adapters are supported by this 
    driver set. 
 
-   Ultra320 Adapters         Description
+   Ultra320 ASIC              Description
    ----------------------------------------------------------------
-   Adaptec SCSI Card 39320   Dual Channel 64-bit PCI-X 133MHz to
-                             Ultra320 SCSI Card (one external 
-                             68-pin, two internal 68-pin)
-   Adaptec SCSI Card 39320D  Dual Channel 64-bit PCI-X 133MHz to
-                             Ultra320 SCSI Card (two external VHDC
-                             and one internal 68-pin)
-   Adaptec SCSI Card 39320D  Dual Channel 64-bit PCI-X 133MHz to
-                             Ultra320 SCSI Card (two external VHDC
-                             and one internal 68-pin) based on the
-                             AIC-7902B ASIC
-   Adaptec SCSI Card 29320   Single Channel 64-bit PCI-X 133MHz to
-                             Ultra320 SCSI Card (one external 
-                             68-pin, two internal 68-pin, one
-                             internal 50-pin)
-   Adaptec SCSI Card 29320LP Single Channel 64-bit Low Profile
-                             PCI-X 133MHz to Ultra320 SCSI Card
-                             (One external VHDC, one internal
-                             68-pin)
-   AIC-7901A                 Single Channel 64-bit PCI-X 133MHz to 
-                             Ultra320 SCSI ASIC
-   AIC-7902A4                Dual Channel 64-bit PCI-X 133MHz to 
-                             Ultra320 SCSI ASIC
-   AIC-7902B                 Dual Channel 64-bit PCI-X 133MHz to
-                             Ultra320 SCSI ASIC
-
+   AIC-7901A                  Single Channel 64-bit PCI-X 133MHz to 
+                              Ultra320 SCSI ASIC
+   AIC-7901B                  Single Channel 64-bit PCI-X 133MHz to 
+                              Ultra320 SCSI ASIC with Retained Training
+   AIC-7902A4                 Dual Channel 64-bit PCI-X 133MHz to 
+                              Ultra320 SCSI ASIC
+   AIC-7902B                  Dual Channel 64-bit PCI-X 133MHz to
+                              Ultra320 SCSI ASIC with Retained Training
+
+   Ultra320 Adapters          Description                              ASIC
+   --------------------------------------------------------------------------
+   Adaptec SCSI Card 39320    Dual Channel 64-bit PCI-X 133MHz to   7902A4/7902B
+                              Ultra320 SCSI Card (one external 
+                              68-pin, two internal 68-pin)
+   Adaptec SCSI Card 39320A   Dual Channel 64-bit PCI-X 133MHz to      7902B
+                              Ultra320 SCSI Card (one external 
+                              68-pin, two internal 68-pin)
+   Adaptec SCSI Card 39320D   Dual Channel 64-bit PCI-X 133MHz to      7902A4
+                              Ultra320 SCSI Card (two external VHDC
+                              and one internal 68-pin)
+   Adaptec SCSI Card 39320D   Dual Channel 64-bit PCI-X 133MHz to      7902A4
+                              Ultra320 SCSI Card (two external VHDC
+                              and one internal 68-pin) based on the
+                              AIC-7902B ASIC
+   Adaptec SCSI Card 29320    Single Channel 64-bit PCI-X 133MHz to    7901A
+                              Ultra320 SCSI Card (one external 
+                              68-pin, two internal 68-pin, one
+                              internal 50-pin)
+   Adaptec SCSI Card 29320A   Single Channel 64-bit PCI-X 133MHz to    7901B
+                              Ultra320 SCSI Card (one external 
+                              68-pin, two internal 68-pin, one
+                              internal 50-pin)
+   Adaptec SCSI Card 29320LP  Single Channel 64-bit Low Profile        7901A
+                              PCI-X 133MHz to Ultra320 SCSI Card
+                              (One external VHDC, one internal
+                              68-pin)
+   Adaptec SCSI Card 29320ALP Single Channel 64-bit Low Profile        7901B
+                              PCI-X 133MHz to Ultra320 SCSI Card
+                              (One external VHDC, one internal
+                              68-pin)
 2. Version History
 
-   (V1.3.0, January 2003) Full regression testing for all U320 products
-   completed.
-
-   (V1.3.0 ALPHA, November 2002) Initial Alpha release.
-   Added abort and target/lun reset error recovery handler and
-   interrupt coalessing.
-
-   (V1.2.0, November 2002) Added support for Domain Validation and
-   Hewlett-Packard version of the 39320D and AIC-7902 adapters.
-   Support for previous adapters has not been fully tested and should
-   only be used at the customer's own risk.
-
-   (V1.1.1, September 2002) Added support for the Linux 2.5.X kernel series
-
-   (V1.1.0, August 2002) Added support for four additional SCSI
-   products: ASC-39320, ASC-29320, ASC-29320LP, AIC-7901.
-
-   (V1.1, August 2002) Added support for four additional SCSI
-   products: ASC-39320, ASC-29320, ASC-29320LP, AIC-7901.
-
-   (V1.0, May 2002) This is the initial release of the 
-   Ultra320 FMS.  The following is a list of supported features:
+   1.3.11 (July 11, 2003)
+        - Fix several deadlock issues.
+        - Add 29320ALP and 39320B Id's.
+
+   1.3.10 (June 3rd, 2003)
+        - Align the SCB_TAG field on a 16byte boundary.  This avoids
+          SCB corruption on some PCI-33 busses.
+        - Correct non-zero luns on Rev B. hardware.
+        - Update for change in 2.5.X SCSI proc FS interface.
+        - When negotiation async via an 8bit WDTR message, send
+          an SDTR with an offset of 0 to be sure the target
+          knows we are async.  This works around a firmware defect
+          in the Quantum Atlas 10K.
+        - Implement controller susupend and resume.
+        - Clear PCI error state during driver attach so that we
+          don't disable memory mapped I/O due to a stray write
+          by some other driver probe that occurred before we
+          claimed the controller.
+
+   1.3.9 (May 22nd, 2003)
+        - Fix compiler errors.
+        - Remove S/G splitting for segments that cross a 4GB boundary.
+          This is guaranteed not to happen in Linux.
+        - Add support for scsi_report_device_reset() found in
+          2.5.X kernels.
+        - Add 7901B support.
+        - Simplify handling of the packtized lun Rev A workaround.
+        - Correct and simplify handling of the ignore wide residue
+          message.  The previous code would fail to report a residual
+          if the transaction data length was even and we received
+          an IWR message.
+
+   1.3.8 (April 29th, 2003)
+        - Fix types accessed via the command line interface code.
+        - Perform a few firmware optimizations.
+        - Fix "Unexpected PKT busfree" errors.
+        - Use a sequencer interrupt to notify the host of
+          commands with bad status.  We defer the notification
+          until there are no outstanding selections to ensure
+          that the host is interrupted for as short a time as
+          possible.
+        - Remove pre-2.2.X support.
+        - Add support for new 2.5.X interrupt API.
+        - Correct big-endian architecture support.
+
+   1.3.7 (April 16th, 2003)
+        - Use del_timer_sync() to ensure that no timeouts
+          are pending during controller shutdown.
+        - For pre-2.5.X kernels, carefully adjust our segment
+          list size to avoid SCSI malloc pool fragmentation.
+        - Cleanup channel display in our /proc output.
+        - Workaround duplicate device entries in the mid-layer
+          devlice list during add-single-device.
+
+   1.3.6 (March 28th, 2003)
+        - Correct a double free in the Domain Validation code.
+        - Correct a reference to free'ed memory during controller
+          shutdown.
+        - Reset the bus on an SE->LVD change.  This is required
+          to reset our transcievers.
+
+   1.3.5 (March 24th, 2003)
+        - Fix a few register window mode bugs.
+        - Include read streaming in the PPR flags we display in
+          diagnostics as well as /proc.
+        - Add PCI hot plug support for 2.5.X kernels.
+        - Correct default precompensation value for RevA hardware.
+        - Fix Domain Validation thread shutdown.
+        - Add a firmware workaround to make the LED blink
+          brighter during packetized operations on the H2A4.
+        - Correct /proc display of user read streaming settings.
+        - Simplify driver locking by releasing the io_request_lock
+          upon driver entry from the mid-layer.
+        - Cleanup command line parsing and move much of this code
+          to aiclib.
+
+   1.3.4 (February 28th, 2003)
+        - Correct a race condition in our error recovery handler.
+        - Allow Test Unit Ready commands to take a full 5 seconds
+          during Domain Validation.
+
+   1.3.2 (February 19th, 2003)
+        - Correct a Rev B. regression due to the GEM318
+          compatibility fix included in 1.3.1.
+          
+   1.3.1 (February 11th, 2003)
+        - Add support for the 39320A.
+        - Improve recovery for certain PCI-X errors.
+        - Fix handling of LQ/DATA/LQ/DATA for the
+          same write transaction that can occur without
+          interveining training.
+        - Correct compatibility issues with the GEM318
+          enclosure services device.
+        - Correct data corruption issue that occurred under
+          high tag depth write loads.
+        - Adapt to a change in the 2.5.X daemonize() API.
+        - Correct a "Missing case in ahd_handle_scsiint" panic.
+
+   1.3.0 (January 21st, 2003)
+        - Full regression testing for all U320 products completed.
+        - Added abort and target/lun reset error recovery handler and
+          interrupt coalessing.
+
+   1.2.0 (November 14th, 2002)
+        - Added support for Domain Validation
+        - Add support for the Hewlett-Packard version of the 39320D
+          and AIC-7902 adapters.
+        Support for previous adapters has not been fully tested and should
+        only be used at the customer's own risk.
+
+   1.1.1 (September 24th, 2002)
+        - Added support for the Linux 2.5.X kernel series
+
+   1.1.0 (September 17th, 2002)
+        - Added support for four additional SCSI products:
+          ASC-39320, ASC-29320, ASC-29320LP, AIC-7901.
+
+   1.0.0 (May 30th, 2002)
+        - Initial driver release.
 
    2.1. Software/Hardware Features
         - Support for the SPI-4 "Ultra320" standard:
@@ -82,6 +194,7 @@ The following information is available in this file:
           supported)
         - Support for the PCI-X standard up to 133MHz
         - Support for the PCI v2.2 standard
+       - Domain Validation
 
    2.2. Operating System Support:
         - Redhat Linux 7.2, 7.3, 8.0, Advanced Server 2.1
index 4e88255..bd60597 100644 (file)
@@ -131,27 +131,54 @@ The following information is available in this file:
       SCSI "stub" effects.
 
 2. Version History
+   6.2.36 (June 3rd, 2003)
+        - Correct code that disables PCI parity error checking.
+        - Correct and simplify handling of the ignore wide residue
+          message.  The previous code would fail to report a residual
+          if the transaction data length was even and we received
+          an IWR message.
+        - Add support for the 2.5.X EISA framework.
+        - Update for change in 2.5.X SCSI proc FS interface.
+        - Correct Domain Validation command-line option parsing.
+        - When negotiation async via an 8bit WDTR message, send
+          an SDTR with an offset of 0 to be sure the target
+          knows we are async.  This works around a firmware defect
+          in the Quantum Atlas 10K.
+        - Clear PCI error state during driver attach so that we
+          don't disable memory mapped I/O due to a stray write
+          by some other driver probe that occurred before we
+          claimed the controller.
 
-        6.2.34 - Fix locking regression instroduced in 6.2.29 that
-                 could cuase a lock order reversal between the io_request_lock
-                 and our per-softc lock.  This was only possible on RH9,
-                 SuSE, and kernel.org 2.4.X kernels.
+   6.2.35 (May 14th, 2003)
+        - Fix a few GCC 3.3 compiler warnings.
+        - Correct operation on EISA Twin Channel controller.
+        - Add support for 2.5.X's scsi_report_device_reset().
 
-        6.2.33 - Dynamically disable PCI parity error reporting after
-                10 errors are reported to the user.  These errors are
-                the result of some other device issuing PCI transactions
-                with bad parity.  Once the user has been informed of the
-                problem, continuing to report the errors just degrades
-                our performance.
+   6.2.34 (May 5th, 2003)
+        - Fix locking regression instroduced in 6.2.29 that
+          could cuase a lock order reversal between the io_request_lock
+          and our per-softc lock.  This was only possible on RH9,
+          SuSE, and kernel.org 2.4.X kernels.
 
-        6.2.32 - Dynamically sized S/G lists to avoid SCSI malloc
-                pool fragmentation and SCSI mid-layer deadlock.
+   6.2.33 (April 30th, 2003)
+        - Dynamically disable PCI parity error reporting after
+          10 errors are reported to the user.  These errors are
+          the result of some other device issuing PCI transactions
+          with bad parity.  Once the user has been informed of the
+          problem, continuing to report the errors just degrades
+          our performance.
 
-        6.2.28 - Domain Validation Fixes
-                 PCI parity error disable
-                 Enhanced Memory Mapped I/O probe
+   6.2.32 (March 28th, 2003)
+        - Dynamically sized S/G lists to avoid SCSI malloc
+          pool fragmentation and SCSI mid-layer deadlock.
 
-        6.2.20 - Added Domain Validation
+   6.2.28 (January 20th, 2003)
+        - Domain Validation Fixes
+        - Add ability to disable PCI parity error checking.
+        - Enhanced Memory Mapped I/O probe
+
+   6.2.20 (November 7th, 2002)
+        - Added Domain Validation.
 
 3. Command Line Options
 
index d5a0ac9..a09b0e7 100644 (file)
@@ -2,7 +2,7 @@ This file contains brief information about the SCSI tape driver.
 The driver is currently maintained by Kai Mäkisara (email
 Kai.Makisara@kolumbus.fi)
 
-Last modified: Sat Apr 12 20:26:37 2003 by makisara
+Last modified: Sun Nov  9 22:36:02 2003 by makisara
 
 
 BASICS
@@ -95,6 +95,24 @@ tape in the drive (commands trying to write something return error if
 attempted).
 
 
+MINOR NUMBERS
+
+The tape driver currently supports 128 drives by default. This number
+can be increased by editing st.h and recompiling the driver if
+necessary. The upper limit is 2^17 drives if 4 modes for each drive
+are used.
+
+The minor numbers consist of the following bit fields:
+
+dev_upper non-rew mode dev-lower
+  20 -  8     7    6 5  4      0
+The non-rewind bit is always bit 7 (the uppermost bit in the lowermost
+byte). The bits defining the mode are next to the non-rewind bits. The
+remaining bits define the tape device number. This numbering is
+backward compatible with the numbering used when the minor number was
+only 8 bits wide.
+
+
 BSD AND SYS V SEMANTICS
 
 The user can choose between these two behaviours of the tape driver by
index c2c3d8d..37a82e9 100644 (file)
@@ -3623,7 +3623,7 @@ struct _snd_pcm_runtime {
 
         <para>
           More precise information can be found in
-        <filename>alsa-kernel/Documentation/ControlNames.txt</filename>.
+        <filename>alsa-kernel/Documentation/sound/alsa/ControlNames.txt</filename>.
         </para>
       </section>
     </section>
index 2877998..add986d 100644 (file)
@@ -2,7 +2,7 @@ Documentation for CMI 8330 (SoundPRO)
 -------------------------------------
 Alessandro Zummo <azummo@ita.flashnet.it>
 
-( Be sure to read Documentation/sound/SoundPro too )
+( Be sure to read Documentation/sound/oss/SoundPro too )
 
 
 This adapter is now directly supported by the sb driver.
index 72219ac..3bf7861 100644 (file)
@@ -114,7 +114,7 @@ See INSTALL.RH for more details.
                # insmod awe_wave
                (Be sure to load awe_wave after sb!)
 
-               See /usr/src/linux/Documentation/sound/AWE32 for
+               See /usr/src/linux/Documentation/sound/oss/AWE32 for
                more details.
 
   9. (only for obsolete systems) If you don't have /dev/sequencer
index 3e649dc..a267792 100644 (file)
@@ -24,7 +24,7 @@ History:
 ========
 0.1.0  11/20/1998  First version, draft
 1.0.0  11/1998     Alan Cox changes, incorporation in 2.2.0
-                   as /usr/src/linux/Documentation/sound/Introduction
+                   as /usr/src/linux/Documentation/sound/oss/Introduction
 1.1.0  6/30/1999   Second version, added notes on making the drivers,
                    added info on multiple sound cards of similar types,]
                    added more diagnostics info, added info about esd.
index 7a42ad7..0fbf716 100644 (file)
@@ -9,7 +9,7 @@ and others whose names I could not find.
 This documentation is relevant for the PAS16 driver (pas2_card.c and
 friends) under kernel version 2.3.99 and later.  If you are
 unfamiliar with configuring sound under Linux, please read the
-Sound-HOWTO, linux/Documentation/sound/Introduction and other 
+Sound-HOWTO, linux/Documentation/sound/oss/Introduction and other
 relevant docs first.
 
 The following information is relevant information from README.OSS
@@ -73,8 +73,8 @@ CONFIG_SOUND
   You want to read the Sound-HOWTO, available from
   http://www.tldp.org/docs.html#howto . General information
   about the modular sound system is contained in the files
-  Documentation/sound/Introduction. The file
-  Documentation/sound/README.OSS contains some slightly outdated but
+  Documentation/sound/oss/Introduction. The file
+  Documentation/sound/oss/README.OSS contains some slightly outdated but
   still useful information as well.
 
 OSS sound modules
@@ -119,7 +119,7 @@ CONFIG_SOUND_YM3812
   cards may have software (TSR) FM emulation. Enabling FM support with
   these cards may cause trouble (I don't currently know of any such
   cards, however).
-  Please read the file Documentation/sound/OPL3 if your card has an
+  Please read the file Documentation/sound/oss/OPL3 if your card has an
   OPL3 chip.
   If you compile the driver into the kernel, you have to add
   "opl3=<io>" to the kernel command line.
index 61b9a91..9d4db1f 100644 (file)
@@ -1,7 +1,7 @@
 Documentation for the SoundPro CMI8330 extensions in the WSS driver (ad1848.o)
 ------------------------------------------------------------------------------
 
-( Be sure to read Documentation/sound/CMI8330 too )
+( Be sure to read Documentation/sound/oss/CMI8330 too )
 
 Ion Badulescu, ionut@cs.columbia.edu
 February 24, 1999
index 803ffd4..b2389bd 100644 (file)
@@ -105,7 +105,7 @@ design and implementation of the driver.
    drivers/sound/wf_midi.c              -- the "uart401" driver 
                                              to support virtual MIDI mode.
    include/wavefront.h                  -- the header file
-   Documentation/sound/Tropez+          -- short docs on configuration
+   Documentation/sound/oss/Tropez+          -- short docs on configuration
 
 **********************************************************************
 4) How do I compile/install/use it ?
index 8161073..28388aa 100644 (file)
@@ -358,6 +358,15 @@ w83877f_wdt.c -- W83877F Computer
 
        No bits set in GETSUPPORT
 
+w83627hf_wdt.c -- w83627hf watchdog
+
+       Timeout that defaults to 60 seconds, supports SETTIMEOUT.
+
+       Supports CONFIG_WATCHDOG_NOWAYOUT
+
+       GETSUPPORT returns WDIOF_KEEPALIVEPING and WDIOF_SETTIMEOUT.
+       The GETSTATUS call returns if the device is open or not.
+
 wdt.c -- ICS WDT500/501 ISA and
 wdt_pci.c -- ICS WDT500/501 PCI
 
index 754de3a..69753c9 100644 (file)
@@ -73,7 +73,7 @@ S: Status, one of the following:
 3C359 NETWORK DRIVER
 P:     Mike Phillips
 M:     mikep@linuxtr.net
-L:     linux-net@vger.rutgers.edu
+L:     linux-net@vger.kernel.org
 L:     linux-tr@linuxtr.net
 W:     http://www.linuxtr.net
 S:     Maintained
@@ -980,25 +980,28 @@ IEEE 1394 SUBSYSTEM
 P:     Ben Collins
 M:     bcollins@debian.org
 L:     linux1394-devel@lists.sourceforge.net
-W:     http://linux1394.sourceforge.net/
+W:     http://www.linux1394.org/
 S:     Maintained
 
 IEEE 1394 OHCI DRIVER
 P:     Ben Collins
 M:     bcollins@debian.org
 L:     linux1394-devel@lists.sourceforge.net
+W:     http://www.linux1394.org/
 S:     Maintained
 
 IEEE 1394 PCILYNX DRIVER
 P:     Andreas Bombe
 M:     andreas.bombe@munich.netsurf.de
 L:     linux1394-devel@lists.sourceforge.net
+W:     http://www.linux1394.org/
 S:     Maintained
 
 IEEE 1394 RAW I/O DRIVER
-P:     Andreas Bombe
-M:     andreas.bombe@munich.netsurf.de
+P:     Ben Collins
+M:     bcollins@debian.org
 L:     linux1394-devel@lists.sourceforge.net
+W:     http://www.linux1394.org/
 S:     Maintained
 
 IMS TWINTURBO FRAMEBUFFER DRIVER
@@ -1235,8 +1238,8 @@ W:        http://ldm.sourceforge.net
 S:     Maintained
 
 LSILOGIC/SYMBIOS/NCR 53C8XX and 53C1010 PCI-SCSI drivers
-P:     Gerard Roudier
-M:     groudier@free.fr
+P:     Matthew Wilcox
+M:     matthew@wil.cx
 L:     linux-scsi@vger.kernel.org
 S:     Maintained
 
@@ -1469,7 +1472,7 @@ ONSTREAM SCSI TAPE DRIVER
 P:     Willem Riede
 M:     osst@riede.org
 L:     osst@linux1.onstream.nl
-L:     linux-scsi@vger.rutgers.edu
+L:     linux-scsi@vger.kernel.org
 S:     Maintained
 
 OPL3-SA2, SA3, and SAx DRIVER
@@ -1557,11 +1560,8 @@ M:       greg@kroah.com
 S:     Maintained
 
 PCMCIA SUBSYSTEM
-P:     David Hinds
-M:     dahinds@users.sourceforge.net
-L:     linux-kernel@vger.kernel.org
-W:     http://pcmcia-cs.sourceforge.net
-S:     Maintained
+L:     http://lists.infradead.org/mailman/listinfo/linux-pcmcia
+S:     Unmaintained
 
 PCNET32 NETWORK DRIVER
 P:     Thomas Bogendörfer
@@ -1853,8 +1853,10 @@ L:       ultralinux@vger.kernel.org
 S:     Maintained
 
 SPARC (sparc32):
+P:     Keith M. Wesolowski
+M:     wesolows@foobazco.org
 L:     sparclinux@vger.kernel.org
-S:     Unmaintained - please send patches to mailing list
+S:     Maintained
 
 SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER
 P:     Roger Wolff
index ddc6d9f..6bc0696 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -276,7 +276,7 @@ CPPFLAGS        := -D__KERNEL__ -Iinclude \
                   $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) \
                   $(if $(CONFIG_CFGNAME),-DCONFIG_FLAVOR_$(shell echo $(CONFIG_CFGNAME) |tr a-z A-Z))
 
-CFLAGS                 := -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
+CFLAGS                 := -Wall -Wstrict-prototypes -Wno-trigraphs \
                   -fno-strict-aliasing -fno-common
 AFLAGS         := -D__ASSEMBLY__
 
@@ -289,10 +289,7 @@ export CPPFLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS
 export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE 
 export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
 
-# When compiling out-of-tree modules, put MODVERDIR in the module source
-# tree rather than in the kernel source tree. The kernel source tree might
-# even be read-only.
-export MODVERDIR := $(shell D="$(firstword $(SUBDIRS))"; test "$${D:0:1}" = / -a "$${D\#$$PWD}" = "$$D" && echo "$$D/").tmp_versions
+export MODVERDIR := .tmp_versions
 
 # The temporary file to save gcc -MD generated dependencies must not
 # contain a comma
@@ -440,6 +437,12 @@ libs-y             := $(libs-y1) $(libs-y2)
 # ---------------------------------------------------------------------------
 
 
+ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE
+CFLAGS         += -Os
+else
+CFLAGS         += -O2
+endif
+
 ifndef CONFIG_FRAME_POINTER
 CFLAGS         += -fomit-frame-pointer
 endif
@@ -910,7 +913,7 @@ rpm:        clean spec
        $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version;\
        mv -f $(objtree)/.tmp_version $(objtree)/.version;
 
-       $(RPM) -ta ../$(KERNELPATH).tar.gz
+       $(RPM) --target $(UTS_MACHINE) -ta ../$(KERNELPATH).tar.gz
        rm ../$(KERNELPATH).tar.gz
 
 # Brief documentation of the typical targets used
@@ -1038,13 +1041,12 @@ define filechk
        @set -e;                                \
        echo '  CHK     $@';                    \
        mkdir -p $(dir $@);                     \
-       tmp=$$(/bin/mktemp /tmp/kbuild.XXXXXX); \
-       $(filechk_$(1)) < $< > $$tmp;           \
-       if [ -r $@ ] && cmp -s $@ $$tmp; then   \
-               rm -f $$tmp;                    \
+       $(filechk_$(1)) < $< > $@.tmp;          \
+       if [ -r $@ ] && cmp -s $@ $@.tmp; then  \
+               rm -f $@.tmp;                   \
        else                                    \
                echo '  UPD     $@';            \
-               mv -f $$tmp $@;         \
+               mv -f $@.tmp $@;                \
        fi
 endef
 
diff --git a/README b/README
index e369bb9..6bcd444 100644 (file)
--- a/README
+++ b/README
@@ -119,7 +119,7 @@ BUILD directory for the kernel:
    cd /usr/src/linux-2.6.N
    make O=/home/name/build/kernel menuconfig
    make O=/home/name/build/kernel
-   sudo make O=/home/name/build/kernel install_modules install
+   sudo make O=/home/name/build/kernel modules_install install
 
    Please note: If the 'O=output/dir' option is used then it must be
    used for all invocations of make.
index f165203..a5c151a 100644 (file)
@@ -252,9 +252,11 @@ static int
 irq_affinity_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, irq_affinity[(long)data]);
+       if (count - len < 2)
                return -EINVAL;
-       return sprintf (page, "%016lx\n", irq_affinity[(long)data]);
+       len += sprintf(page + len, "\n");
+       return len;
 }
 
 static unsigned int
@@ -331,10 +333,11 @@ static int
 prof_cpu_mask_read_proc(char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       unsigned long *mask = (unsigned long *) data;
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, *(cpumask_t *)data);
+       if (count - len < 2)
                return -EINVAL;
-       return sprintf (page, "%016lx\n", *mask);
+       len += sprintf(page + len, "\n");
+       return len;
 }
 
 static int
@@ -529,19 +532,21 @@ show_interrupts(struct seq_file *p, void *v)
 #ifdef CONFIG_SMP
        int j;
 #endif
-       int i;
+       int i = *(loff_t *) v;
        struct irqaction * action;
        unsigned long flags;
 
 #ifdef CONFIG_SMP
-       seq_puts(p, "           ");
-       for (i = 0; i < NR_CPUS; i++)
-               if (cpu_online(i))
-                       seq_printf(p, "CPU%d       ", i);
-       seq_putc(p, '\n');
+       if (i == 0) {
+               seq_puts(p, "           ");
+               for (i = 0; i < NR_CPUS; i++)
+                       if (cpu_online(i))
+                               seq_printf(p, "CPU%d       ", i);
+               seq_putc(p, '\n');
+       }
 #endif
 
-       for (i = 0; i < ACTUAL_NR_IRQS; i++) {
+       if (i < ACTUAL_NR_IRQS) {
                spin_lock_irqsave(&irq_desc[i].lock, flags);
                action = irq_desc[i].action;
                if (!action) 
@@ -568,15 +573,16 @@ show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
 unlock:
                spin_unlock_irqrestore(&irq_desc[i].lock, flags);
-       }
+       } else if (i == ACTUAL_NR_IRQS) {
 #ifdef CONFIG_SMP
-       seq_puts(p, "IPI: ");
-       for (i = 0; i < NR_CPUS; i++)
-               if (cpu_online(i))
-                       seq_printf(p, "%10lu ", cpu_data[i].ipi_count);
-       seq_putc(p, '\n');
+               seq_puts(p, "IPI: ");
+               for (i = 0; i < NR_CPUS; i++)
+                       if (cpu_online(i))
+                               seq_printf(p, "%10lu ", cpu_data[i].ipi_count);
+               seq_putc(p, '\n');
 #endif
-       seq_printf(p, "ERR: %10lu\n", irq_err_count);
+               seq_printf(p, "ERR: %10lu\n", irq_err_count);
+       }
        return 0;
 }
 
index dcdd353..371a4b1 100644 (file)
@@ -14,8 +14,6 @@ OBJCOPYFLAGS  :=-O binary -R .note -R .comment -S
 GZFLAGS                :=-9
 #CFLAGS                +=-pipe
 
-CFLAGS         :=$(CFLAGS:-O2=-Os)
-
 ifeq ($(CONFIG_FRAME_POINTER),y)
 CFLAGS         +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
 endif
index 2af1754..892e71f 100644 (file)
@@ -23,10 +23,6 @@ ifeq ($(CONFIG_ARCH_SHARK),y)
 OBJS           += head-shark.o ofw-shark.o
 endif
 
-ifeq ($(CONFIG_ARCH_INTEGRATOR),y)
-OBJS           += head-integrator.o
-endif
-
 ifeq ($(CONFIG_ARCH_CAMELOT),y)
 OBJS           += head-epxa10db.o
 endif
diff --git a/arch/arm/boot/compressed/head-integrator.S b/arch/arm/boot/compressed/head-integrator.S
deleted file mode 100644 (file)
index e9bf350..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#include <asm/mach-types.h>
-
-               .section        ".start", "ax"
-               mov     r7, #MACH_TYPE_INTEGRATOR
index 596c509..ebeaced 100644 (file)
@@ -503,12 +503,6 @@ proc_types:
 
                @ Everything from here on will be the new ID system.
 
-               .word   0x41129200              @ ARM920T
-               .word   0xff00fff0
-               b       __armv4_cache_on
-               b       __armv4_cache_off
-               b       __armv4_cache_flush
-
                .word   0x4401a100              @ sa110 / sa1100
                .word   0xffffffe0
                b       __armv4_cache_on
@@ -523,6 +517,12 @@ proc_types:
 
                @ These match on the architecture ID
 
+               .word   0x00020000              @ ARMv4T
+               .word   0x000f0000
+               b       __armv4_cache_on
+               b       __armv4_cache_off
+               b       __armv4_cache_flush
+
                .word   0x00050000              @ ARMv5TE
                .word   0x000f0000
                b       __armv4_cache_on
index d2dd8ae..934c42f 100644 (file)
@@ -34,6 +34,8 @@
 
 #include <asm/hardware/sa1111.h>
 
+extern void __init sa1110_mb_enable(void);
+
 /*
  * We keep the following data for the overall SA1111.  Note that the
  * struct device and struct resource are "fake"; they should be supplied
@@ -561,6 +563,8 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent,
        dev->res.name    = dev->dev.bus_id;
        dev->res.flags   = IORESOURCE_MEM;
        dev->mapbase     = sachip->base + info->offset;
+       dev->skpcr_mask  = info->skpcr_mask;
+       memmove(dev->irq, info->irq, sizeof(dev->irq));
 
        ret = request_resource(parent, &dev->res);
        if (ret) {
diff --git a/arch/arm/configs/netwinder_defconfig b/arch/arm/configs/netwinder_defconfig
new file mode 100644 (file)
index 0000000..33b0f9b
--- /dev/null
@@ -0,0 +1,968 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_ARM=y
+CONFIG_MMU=y
+CONFIG_UID16=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+
+#
+# Loadable module support
+#
+# CONFIG_MODULES is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_ADIFCC is not set
+# CONFIG_ARCH_ANAKIN is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_CAMELOT is not set
+CONFIG_ARCH_FOOTBRIDGE=y
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_SHARK is not set
+
+#
+# CLPS711X/EP721X Implementations
+#
+
+#
+# Epxa10db
+#
+
+#
+# Footbridge Implementations
+#
+# CONFIG_ARCH_CATS is not set
+# CONFIG_ARCH_PERSONAL_SERVER is not set
+# CONFIG_ARCH_EBSA285_ADDIN is not set
+# CONFIG_ARCH_EBSA285_HOST is not set
+CONFIG_ARCH_NETWINDER=y
+
+#
+# IOP3xx Implementation Options
+#
+# CONFIG_ARCH_IOP310 is not set
+# CONFIG_ARCH_IOP321 is not set
+
+#
+# IOP3xx Chipset Features
+#
+
+#
+# Intel PXA250/210 Implementations
+#
+
+#
+# SA11x0 Implementations
+#
+CONFIG_FOOTBRIDGE=y
+CONFIG_FOOTBRIDGE_HOST=y
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_SA110=y
+CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WB=y
+
+#
+# Processor Features
+#
+
+#
+# General setup
+#
+CONFIG_PCI=y
+CONFIG_ISA=y
+CONFIG_ISA_DMA=y
+# CONFIG_ZBOOT_ROM is not set
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_PCI_LEGACY_PROC=y
+CONFIG_PCI_NAMES=y
+# CONFIG_HOTPLUG is not set
+
+#
+# At least one math emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=y
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Generic Driver Options
+#
+# CONFIG_PM is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_ARTHUR is not set
+CONFIG_CMDLINE="root=0x301"
+CONFIG_LEDS=y
+# CONFIG_LEDS_TIMER is not set
+CONFIG_LEDS_CPU=y
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+CONFIG_PARPORT_PC_CML1=y
+# CONFIG_PARPORT_SERIAL is not set
+# CONFIG_PARPORT_PC_FIFO is not set
+CONFIG_PARPORT_PC_SUPERIO=y
+# CONFIG_PARPORT_ARC is not set
+# CONFIG_PARPORT_OTHER is not set
+# CONFIG_PARPORT_1284 is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM 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_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+CONFIG_NETLINK_DEV=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# 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=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+
+#
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+# CONFIG_IPV6 is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
+# IP: Netfilter Configuration
+#
+CONFIG_IP_NF_CONNTRACK=y
+CONFIG_IP_NF_FTP=y
+# CONFIG_IP_NF_IRC is not set
+# CONFIG_IP_NF_TFTP is not set
+# CONFIG_IP_NF_AMANDA is not set
+CONFIG_IP_NF_QUEUE=y
+CONFIG_IP_NF_IPTABLES=y
+# CONFIG_IP_NF_MATCH_LIMIT is not set
+# CONFIG_IP_NF_MATCH_IPRANGE is not set
+# CONFIG_IP_NF_MATCH_MAC is not set
+# CONFIG_IP_NF_MATCH_PKTTYPE is not set
+# CONFIG_IP_NF_MATCH_MARK is not set
+# CONFIG_IP_NF_MATCH_MULTIPORT is not set
+# CONFIG_IP_NF_MATCH_TOS is not set
+# CONFIG_IP_NF_MATCH_RECENT is not set
+# CONFIG_IP_NF_MATCH_ECN is not set
+# CONFIG_IP_NF_MATCH_DSCP is not set
+# CONFIG_IP_NF_MATCH_AH_ESP is not set
+# CONFIG_IP_NF_MATCH_LENGTH is not set
+# CONFIG_IP_NF_MATCH_TTL is not set
+# CONFIG_IP_NF_MATCH_TCPMSS is not set
+# CONFIG_IP_NF_MATCH_HELPER is not set
+# CONFIG_IP_NF_MATCH_STATE is not set
+# CONFIG_IP_NF_MATCH_CONNTRACK is not set
+# CONFIG_IP_NF_MATCH_OWNER is not set
+# CONFIG_IP_NF_FILTER is not set
+# CONFIG_IP_NF_NAT is not set
+# CONFIG_IP_NF_MANGLE is not set
+# CONFIG_IP_NF_TARGET_LOG is not set
+# CONFIG_IP_NF_TARGET_ULOG is not set
+# CONFIG_IP_NF_TARGET_TCPMSS is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q 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_FASTROUTE 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_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_SMC91X is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+
+#
+# Tulip family network device support
+#
+CONFIG_NET_TULIP=y
+# CONFIG_DE2104X is not set
+CONFIG_TULIP=y
+# CONFIG_TULIP_MWI is not set
+CONFIG_TULIP_MMIO=y
+# CONFIG_DE4X5 is not set
+# CONFIG_WINBOND_840 is not set
+# CONFIG_DM9102 is not set
+# CONFIG_AT1700 is not set
+# CONFIG_DEPCA is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_ISA is not set
+CONFIG_NET_PCI=y
+# CONFIG_PCNET32 is not set
+# CONFIG_AMD8111_ETH is not set
+# CONFIG_ADAPTEC_STARFIRE is not set
+# CONFIG_AC3200 is not set
+# CONFIG_APRICOT is not set
+# CONFIG_B44 is not set
+# CONFIG_CS89x0 is not set
+# CONFIG_DGRS is not set
+# CONFIG_EEPRO100 is not set
+# CONFIG_E100 is not set
+# CONFIG_FEALNX is not set
+# CONFIG_NATSEMI is not set
+CONFIG_NE2K_PCI=y
+# CONFIG_8139CP is not set
+# CONFIG_8139TOO is not set
+# CONFIG_SIS900 is not set
+# CONFIG_EPIC100 is not set
+# CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
+# CONFIG_VIA_RHINE is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+# CONFIG_HOSTAP is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BT is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+# CONFIG_IDEDISK_STROKE is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_TASKFILE_IO is not set
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_BLK_DEV_IDEPCI=y
+# CONFIG_IDEPCI_SHARE_IRQ is not set
+# CONFIG_BLK_DEV_OFFBOARD is not set
+# CONFIG_BLK_DEV_GENERIC is not set
+# CONFIG_BLK_DEV_OPTI621 is not set
+CONFIG_BLK_DEV_SL82C105=y
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+CONFIG_IDEDMA_PCI_AUTO=y
+# CONFIG_IDEDMA_ONLYDISK is not set
+# CONFIG_IDEDMA_PCI_WIP is not set
+CONFIG_BLK_DEV_ADMA=y
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_CHIPSETS is not set
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_IVB is not set
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_DMA_NONPCI is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
+# SCSI device support
+#
+# CONFIG_SCSI is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+# CONFIG_INPUT_TSLIBDEV is not set
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_SERPORT=y
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+# CONFIG_SERIO_PCIPS2 is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_PS2_SYNAPTICS is not set
+CONFIG_MOUSE_SERIAL=y
+# CONFIG_MOUSE_INPORT is not set
+# CONFIG_MOUSE_LOGIBM is not set
+# CONFIG_MOUSE_PC110PAD is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
+CONFIG_INPUT_UINPUT=y
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_DZ is not set
+# CONFIG_SERIAL_21285 is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+CONFIG_PRINTER=y
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+# CONFIG_TIPAR is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# I2C Algorithms
+#
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+
+#
+# L3 serial bus support
+#
+# CONFIG_L3 is not set
+
+#
+# Mice
+#
+CONFIG_BUSMOUSE=y
+# CONFIG_QIC02_TAPE is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+CONFIG_WATCHDOG=y
+# CONFIG_WATCHDOG_NOWAYOUT is not set
+# CONFIG_SOFT_WATCHDOG is not set
+# CONFIG_WDT is not set
+# CONFIG_WDTPCI is not set
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_ACQUIRE_WDT is not set
+# CONFIG_ADVANTECH_WDT is not set
+# CONFIG_21285_WATCHDOG is not set
+CONFIG_977_WATCHDOG=y
+# CONFIG_EUROTECH_WDT is not set
+# CONFIG_IB700_WDT is not set
+# CONFIG_I810_TCO is not set
+# CONFIG_MIXCOMWD is not set
+# CONFIG_SCx200_WDT is not set
+# CONFIG_60XX_WDT is not set
+# CONFIG_W83877F_WDT is not set
+# CONFIG_MACHZ_WDT is not set
+# CONFIG_SC520_WDT is not set
+# CONFIG_AMD7XX_TCO is not set
+# CONFIG_ALIM7101_WDT is not set
+# CONFIG_ALIM1535_WDT is not set
+# CONFIG_SC1200_WDT is not set
+# CONFIG_WAFER_WDT is not set
+# CONFIG_CPU5_WDT is not set
+CONFIG_DS1620=y
+CONFIG_NWBUTTON=y
+CONFIG_NWBUTTON_REBOOT=y
+CONFIG_NWFLASH=y
+# CONFIG_NVRAM is not set
+CONFIG_RTC=y
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+# CONFIG_DRM is not set
+# CONFIG_RAW_DRIVER is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+CONFIG_AUTOFS_FS=y
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_FAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFS_V4=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V4 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_SMB_FS=y
+# CONFIG_SMB_NLS_DEFAULT is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_BSD_DISKLABEL is not set
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL 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_EFI_PARTITION is not set
+CONFIG_SMB_NLS=y
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_CODEPAGE_852=y
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_ISO8859_2=y
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+CONFIG_NLS_ISO8859_15=y
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=y
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_CYBER2000=y
+# CONFIG_FB_IMSTT is not set
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+CONFIG_VGA_CONSOLE=y
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+# CONFIG_FONT_6x11 is not set
+# CONFIG_FONT_PEARL_8x8 is not set
+# CONFIG_FONT_ACORN_8x8 is not set
+# CONFIG_FONT_MINI_4x6 is not set
+# CONFIG_FONT_SUN8x16 is not set
+# CONFIG_FONT_SUN12x22 is not set
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+
+#
+# Sound
+#
+CONFIG_SOUND=y
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+CONFIG_SOUND_PRIME=y
+# CONFIG_SOUND_BT878 is not set
+# CONFIG_SOUND_CMPCI is not set
+# CONFIG_SOUND_EMU10K1 is not set
+# CONFIG_SOUND_FUSION is not set
+# CONFIG_SOUND_CS4281 is not set
+# CONFIG_SOUND_ES1370 is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
+# CONFIG_SOUND_MAESTRO3 is not set
+# CONFIG_SOUND_ICH is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_TRIDENT is not set
+# CONFIG_SOUND_VIA82CXXX is not set
+CONFIG_SOUND_OSS=y
+CONFIG_SOUND_TRACEINIT=y
+CONFIG_SOUND_DMAP=y
+# CONFIG_SOUND_AD1816 is not set
+# CONFIG_SOUND_AD1889 is not set
+# CONFIG_SOUND_SGALAXY is not set
+# CONFIG_SOUND_ADLIB is not set
+# CONFIG_SOUND_ACI_MIXER is not set
+# CONFIG_SOUND_CS4232 is not set
+# CONFIG_SOUND_SSCAPE is not set
+# CONFIG_SOUND_GUS is not set
+# CONFIG_SOUND_VMIDI is not set
+# CONFIG_SOUND_TRIX is not set
+# CONFIG_SOUND_MSS is not set
+# CONFIG_SOUND_MPU401 is not set
+# CONFIG_SOUND_NM256 is not set
+# CONFIG_SOUND_MAD16 is not set
+# CONFIG_SOUND_PAS is not set
+# CONFIG_SOUND_PSS is not set
+# CONFIG_SOUND_SB is not set
+# CONFIG_SOUND_AWE32_SYNTH is not set
+# CONFIG_SOUND_MAUI is not set
+CONFIG_SOUND_YM3812=y
+# CONFIG_SOUND_OPL3SA1 is not set
+# CONFIG_SOUND_OPL3SA2 is not set
+# CONFIG_SOUND_YMFPCI is not set
+# CONFIG_SOUND_UART6850 is not set
+# CONFIG_SOUND_AEDSP16 is not set
+CONFIG_SOUND_WAVEARTIST=y
+# CONFIG_SOUND_ALI5455 is not set
+# CONFIG_SOUND_FORTE is not set
+# CONFIG_SOUND_RME96XX is not set
+# CONFIG_SOUND_AD1980 is not set
+
+#
+# Misc devices
+#
+
+#
+# Multimedia Capabilities Port drivers
+#
+# CONFIG_MCP is not set
+
+#
+# Console Switches
+#
+# CONFIG_SWITCHES is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+# CONFIG_USB_GADGET is not set
+
+#
+# Kernel hacking
+#
+CONFIG_FRAME_POINTER=y
+CONFIG_DEBUG_USER=y
+# CONFIG_DEBUG_INFO is not set
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+# CONFIG_DEBUG_SPINLOCK is not set
+# CONFIG_DEBUG_WAITQ is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_ERRORS is not set
+# CONFIG_DEBUG_LL is not set
+
+#
+# Security options
+#
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+CONFIG_CRC32=y
index cd5fc9c..0e47b7f 100644 (file)
@@ -10,6 +10,10 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
+# CONFIG_CLEAN_COMPILE is not set
+# CONFIG_STANDALONE is not set
+CONFIG_BROKEN=y
+CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
@@ -19,6 +23,14 @@ CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
 CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
 
 #
 # Loadable module support
@@ -35,7 +47,6 @@ CONFIG_KMOD=y
 #
 # CONFIG_ARCH_ADIFCC is not set
 # CONFIG_ARCH_ANAKIN is not set
-# CONFIG_ARCH_ARCA5K is not set
 # CONFIG_ARCH_CLPS7500 is not set
 # CONFIG_ARCH_CLPS711X is not set
 # CONFIG_ARCH_CO285 is not set
@@ -44,21 +55,13 @@ CONFIG_KMOD=y
 # CONFIG_ARCH_CAMELOT is not set
 # CONFIG_ARCH_FOOTBRIDGE is not set
 # CONFIG_ARCH_INTEGRATOR is not set
-# CONFIG_ARCH_IOP310 is not set
+# CONFIG_ARCH_IOP3XX is not set
 # CONFIG_ARCH_L7200 is not set
 # CONFIG_ARCH_RPC is not set
 # CONFIG_ARCH_SA1100 is not set
 CONFIG_ARCH_SHARK=y
 
 #
-# Archimedes/A5000 Implementations
-#
-
-#
-# Archimedes/A5000 Implementations (select only ONE)
-#
-
-#
 # CLPS711X/EP721X Implementations
 #
 
@@ -71,11 +74,13 @@ CONFIG_ARCH_SHARK=y
 #
 
 #
-# IOP310 Implementation Options
+# IOP3xx Implementation Options
 #
+# CONFIG_ARCH_IOP310 is not set
+# CONFIG_ARCH_IOP321 is not set
 
 #
-# IOP310 Chipset Features
+# IOP3xx Chipset Features
 #
 
 #
@@ -92,6 +97,10 @@ CONFIG_ARCH_SHARK=y
 CONFIG_CPU_32=y
 CONFIG_CPU_SA110=y
 CONFIG_CPU_32v4=y
+CONFIG_CPU_ABRT_EV4=y
+CONFIG_CPU_CACHE_V4WB=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WB=y
 
 #
 # Processor Features
@@ -116,11 +125,13 @@ CONFIG_PCI_LEGACY_PROC=y
 #
 # CONFIG_FPE_NWFPE is not set
 CONFIG_FPE_FASTFPE=y
-CONFIG_KCORE_ELF=y
-# CONFIG_KCORE_AOUT is not set
-# CONFIG_BINFMT_AOUT is not set
 CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
 # CONFIG_BINFMT_MISC is not set
+
+#
+# Generic Driver Options
+#
 # CONFIG_PM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_ARTHUR is not set
@@ -164,6 +175,7 @@ CONFIG_PARPORT_PC_CML1=y
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM 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_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=4096
@@ -185,7 +197,6 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 # CONFIG_NETLINK_DEV is not set
-# CONFIG_NETFILTER is not set
 CONFIG_UNIX=y
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
@@ -199,8 +210,11 @@ CONFIG_INET=y
 # CONFIG_SYN_COOKIES is not set
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
 # CONFIG_IPV6 is not set
-# CONFIG_XFRM_USER is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NETFILTER is not set
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -209,9 +223,9 @@ CONFIG_IPV6_SCTP__=y
 # CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
 # CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE 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
@@ -239,13 +253,13 @@ CONFIG_NETDEVICES=y
 # CONFIG_BONDING is not set
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
-# CONFIG_ETHERTAP is not set
 
 #
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
 # CONFIG_MII is not set
+# CONFIG_SMC91X is not set
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
@@ -294,8 +308,14 @@ CONFIG_CS89x0=y
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
 # CONFIG_SK98LIN is not set
 # CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PLIP is not set
@@ -306,10 +326,12 @@ CONFIG_CS89x0=y
 # Wireless LAN (non-hamradio)
 #
 # CONFIG_NET_RADIO is not set
+# CONFIG_HOSTAP is not set
 
 #
-# Token Ring devices (depends on LLC=y)
+# Token Ring devices
 #
+# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -320,47 +342,54 @@ CONFIG_CS89x0=y
 # CONFIG_WAN is not set
 
 #
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
 # IrDA (infrared) support
 #
 # CONFIG_IRDA is not set
 
 #
-# Amateur Radio support
+# Bluetooth support
 #
-# CONFIG_HAMRADIO is not set
+# CONFIG_BT is not set
 
 #
 # ATA/ATAPI/MFM/RLL support
 #
 CONFIG_IDE=y
-
-#
-# IDE, ATA and ATAPI Block devices
-#
 CONFIG_BLK_DEV_IDE=y
 
 #
 # Please see Documentation/ide.txt for help/info on IDE drives
 #
-# CONFIG_BLK_DEV_HD is not set
 CONFIG_BLK_DEV_IDEDISK=y
 # CONFIG_IDEDISK_MULTI_MODE is not set
 # CONFIG_IDEDISK_STROKE is not set
 CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
 CONFIG_BLK_DEV_IDEFLOPPY=y
 # CONFIG_BLK_DEV_IDESCSI is not set
 # CONFIG_IDE_TASK_IOCTL is not set
+# CONFIG_IDE_TASKFILE_IO is not set
 
 #
 # IDE chipset support/bugfixes
 #
 # CONFIG_BLK_DEV_IDEPCI is not set
 # CONFIG_IDE_CHIPSETS is not set
+# CONFIG_BLK_DEV_IDEDMA is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_DMA_NONPCI is not set
+# CONFIG_BLK_DEV_HD is not set
 
 #
-# SCSI support
+# SCSI device support
 #
 CONFIG_SCSI=m
+CONFIG_SCSI_PROC_FS=y
 
 #
 # SCSI support type (disk, tape, CD-ROM)
@@ -395,7 +424,6 @@ CONFIG_CHR_DEV_SG=m
 # CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_IN2000 is not set
-# CONFIG_SCSI_AM53C974 is not set
 # CONFIG_SCSI_MEGARAID is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
@@ -407,15 +435,13 @@ CONFIG_CHR_DEV_SG=m
 # CONFIG_SCSI_GDTH is not set
 # CONFIG_SCSI_GENERIC_NCR5380 is not set
 # CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
+# CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_PPA is not set
 # CONFIG_SCSI_IMM is not set
 # CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_NCR53C7xx is not set
 # CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_NCR53C8XX is not set
-# CONFIG_SCSI_SYM53C8XX is not set
 # CONFIG_SCSI_PAS16 is not set
 # CONFIG_SCSI_PCI2000 is not set
 # CONFIG_SCSI_PCI2220I is not set
@@ -425,6 +451,7 @@ CONFIG_CHR_DEV_SG=m
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 # CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_DC395x is not set
 # CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_T128 is not set
 # CONFIG_SCSI_U14_34F is not set
@@ -486,6 +513,7 @@ CONFIG_KEYBOARD_ATKBD=y
 # CONFIG_KEYBOARD_NEWTON is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_PS2_SYNAPTICS is not set
 # CONFIG_MOUSE_SERIAL is not set
 # CONFIG_MOUSE_INPORT is not set
 # CONFIG_MOUSE_LOGIBM is not set
@@ -497,7 +525,9 @@ CONFIG_MOUSE_PS2=y
 #
 # Character devices
 #
-# CONFIG_VT is not set
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
 # CONFIG_SERIAL_NONSTANDARD is not set
 
 #
@@ -505,6 +535,7 @@ CONFIG_MOUSE_PS2=y
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
 # CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
@@ -526,12 +557,17 @@ CONFIG_PRINTER=m
 # CONFIG_I2C is not set
 
 #
-# I2C Hardware Sensors Mainboard support
+# I2C Algorithms
+#
+
+#
+# I2C Hardware Bus support
 #
 
 #
 # I2C Hardware Sensors Chip support
 #
+# CONFIG_I2C_SENSOR is not set
 
 #
 # L3 serial bus support
@@ -566,7 +602,6 @@ CONFIG_RTC=y
 # CONFIG_AGP is not set
 # CONFIG_DRM is not set
 # CONFIG_RAW_DRIVER is not set
-# CONFIG_HANGCHECK_TIMER is not set
 
 #
 # Multimedia devices
@@ -574,6 +609,16 @@ CONFIG_RTC=y
 # CONFIG_VIDEO_DEV is not set
 
 #
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# MMC/SD Card support
+#
+# CONFIG_MMC is not set
+
+#
 # File systems
 #
 CONFIG_EXT2_FS=y
@@ -581,6 +626,7 @@ CONFIG_EXT2_FS=y
 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_JBD=y
 # CONFIG_JBD_DEBUG is not set
 CONFIG_FS_MBCACHE=y
@@ -618,6 +664,8 @@ CONFIG_DEVFS_MOUNT=y
 # CONFIG_DEVFS_DEBUG is not set
 # CONFIG_DEVPTS_FS is not set
 # CONFIG_TMPFS is not set
+# CONFIG_HUGETLBFS is not set
+# CONFIG_HUGETLB_PAGE is not set
 CONFIG_RAMFS=y
 
 #
@@ -642,6 +690,7 @@ CONFIG_RAMFS=y
 CONFIG_NFS_FS=y
 # CONFIG_NFS_V3 is not set
 # CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
 # CONFIG_NFSD is not set
 CONFIG_LOCKD=y
 # CONFIG_EXPORTFS is not set
@@ -740,9 +789,24 @@ CONFIG_FB_CYBER2000=y
 # CONFIG_FB_VIRTUAL is not set
 
 #
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
 # Logo configuration
 #
-# CONFIG_LOGO is not set
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+CONFIG_LOGO_LINUX_CLUT224=y
 
 #
 # Sound
@@ -769,7 +833,6 @@ CONFIG_SOUND_PRIME=m
 # CONFIG_SOUND_MAESTRO is not set
 # CONFIG_SOUND_MAESTRO3 is not set
 # CONFIG_SOUND_ICH is not set
-# CONFIG_SOUND_RME96XX is not set
 # CONFIG_SOUND_SONICVIBES is not set
 # CONFIG_SOUND_TRIDENT is not set
 # CONFIG_SOUND_MSNDCLAS is not set
@@ -779,6 +842,7 @@ CONFIG_SOUND_OSS=m
 # CONFIG_SOUND_TRACEINIT is not set
 # CONFIG_SOUND_DMAP is not set
 # CONFIG_SOUND_AD1816 is not set
+# CONFIG_SOUND_AD1889 is not set
 # CONFIG_SOUND_SGALAXY is not set
 CONFIG_SOUND_ADLIB=m
 # CONFIG_SOUND_ACI_MIXER is not set
@@ -803,6 +867,11 @@ CONFIG_SOUND_SB=m
 # CONFIG_SOUND_YMFPCI is not set
 # CONFIG_SOUND_UART6850 is not set
 # CONFIG_SOUND_AEDSP16 is not set
+# CONFIG_SOUND_KAHLUA is not set
+# CONFIG_SOUND_ALI5455 is not set
+# CONFIG_SOUND_FORTE is not set
+# CONFIG_SOUND_RME96XX is not set
+# CONFIG_SOUND_AD1980 is not set
 
 #
 # Misc devices
@@ -822,11 +891,7 @@ CONFIG_SOUND_SB=m
 # USB support
 #
 # CONFIG_USB is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
+# CONFIG_USB_GADGET is not set
 
 #
 # Kernel hacking
index 753e80f..78ff74c 100644 (file)
@@ -68,8 +68,8 @@ extern void __umoddi3(void);
 extern void __udivmoddi4(void);
 extern void __udivsi3(void);
 extern void __umodsi3(void);
+extern void __do_div64(void);
 extern void abort(void);
-extern void do_div64(void);
 
 extern void ret_from_exception(void);
 extern void fpundefinstr(void);
@@ -223,7 +223,7 @@ EXPORT_SYMBOL_NOVERS(__umoddi3);
 EXPORT_SYMBOL_NOVERS(__udivmoddi4);
 EXPORT_SYMBOL_NOVERS(__udivsi3);
 EXPORT_SYMBOL_NOVERS(__umodsi3);
-EXPORT_SYMBOL_NOVERS(do_div64);
+EXPORT_SYMBOL_NOVERS(__do_div64);
 
        /* bitops */
 EXPORT_SYMBOL(_set_bit_le);
index 2c13b70..7cf08c2 100644 (file)
@@ -271,6 +271,20 @@ __syscall_start:
                .long   sys_ni_syscall  /* sys_set_thread_area */
 /* 255 */      .long   sys_ni_syscall  /* sys_get_thread_area */
                .long   sys_ni_syscall  /* sys_set_tid_address */
+               .long   sys_timer_create
+               .long   sys_timer_settime
+               .long   sys_timer_gettime
+/* 260 */      .long   sys_timer_getoverrun
+               .long   sys_timer_delete
+               .long   sys_clock_settime
+               .long   sys_clock_gettime
+               .long   sys_clock_getres
+/* 265 */      .long   sys_clock_nanosleep
+               .long   sys_statfs64
+               .long   sys_fstatfs64
+               .long   sys_tgkill
+               .long   sys_utimes
+/* 270 */      .long   sys_fadvise64_64
 __syscall_end:
 
                .rept   NR_syscalls - (__syscall_end - __syscall_start) / 4
index d75e8a9..e9a3630 100644 (file)
@@ -85,6 +85,7 @@ static void isa_enable_dma(dmach_t channel, dma_t *dma)
                        break;
 
                default:
+                       direction = PCI_DMA_NONE;
                        break;
                }
 
index 6241a43..ba35f51 100644 (file)
@@ -112,12 +112,12 @@ void set_fiq_regs(struct pt_regs *regs)
 {
        register unsigned long tmp, tmp2;
        __asm__ volatile (
-       "mrs    %0, cpsr
-       mov     %1, %3
-       msr     cpsr_c, %1      @ select FIQ mode
-       mov     r0, r0
-       ldmia   %2, {r8 - r14}
-       msr     cpsr_c, %0      @ return to SVC mode
+       "mrs    %0, cpsr\n\
+       mov     %1, %3\n\
+       msr     cpsr_c, %1      @ select FIQ mode\n\
+       mov     r0, r0\n\
+       ldmia   %2, {r8 - r14}\n\
+       msr     cpsr_c, %0      @ return to SVC mode\n\
        mov     r0, r0"
        : "=&r" (tmp), "=&r" (tmp2)
        : "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)
@@ -132,12 +132,12 @@ void get_fiq_regs(struct pt_regs *regs)
 {
        register unsigned long tmp, tmp2;
        __asm__ volatile (
-       "mrs    %0, cpsr
-       mov     %1, %3
-       msr     cpsr_c, %1      @ select FIQ mode
-       mov     r0, r0
-       stmia   %2, {r8 - r14}
-       msr     cpsr_c, %0      @ return to SVC mode
+       "mrs    %0, cpsr\n\
+       mov     %1, %3\n\
+       msr     cpsr_c, %1      @ select FIQ mode\n\
+       mov     r0, r0\n\
+       stmia   %2, {r8 - r14}\n\
+       msr     cpsr_c, %0      @ return to SVC mode\n\
        mov     r0, r0"
        : "=&r" (tmp), "=&r" (tmp2)
        : "r" (&regs->ARM_r8), "I" (PSR_I_BIT | PSR_F_BIT | FIQ_MODE)
index dc68c93..4a9e1ea 100644 (file)
@@ -169,11 +169,11 @@ void disable_irq_wake(unsigned int irq)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
        struct irqaction * action;
        unsigned long flags;
 
-       for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                spin_lock_irqsave(&irq_controller_lock, flags);
                action = irq_desc[i].action;
                if (!action)
@@ -187,12 +187,12 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
 unlock:
                spin_unlock_irqrestore(&irq_controller_lock, flags);
-       }
-
+       } else if (i == NR_IRQS) {
 #ifdef CONFIG_ARCH_ACORN
-       show_fiq_list(p, v);
+               show_fiq_list(p, v);
 #endif
-       seq_printf(p, "Err: %10lu\n", irq_err_count);
+               seq_printf(p, "Err: %10lu\n", irq_err_count);
+       }
        return 0;
 }
 
index 6d1f4a8..a16951f 100644 (file)
@@ -123,9 +123,10 @@ apply_relocate(Elf32_Shdr *sechdrs, const char *strtab, unsigned int symindex,
                        if (offset & 3 ||
                            offset <= (s32)0xfc000000 ||
                            offset >= (s32)0x04000000) {
-                               printk(KERN_ERR "%s: unable to fixup "
-                                      "relocation: out of range\n",
-                                      module->name);
+                               printk(KERN_ERR
+                                      "%s: relocation out of range, section "
+                                      "%d reloc %d sym '%s'\n", module->name,
+                                      relindex, i, strtab + sym->st_name);
                                return -ENOEXEC;
                        }
 
index 0870b84..ec9a1cd 100644 (file)
+/*
+ *  linux/arch/arm/lib/div64.S
+ *
+ *  Optimized computation of 64-bit dividend / 32-bit divisor
+ *
+ *  Author:    Nicolas Pitre
+ *  Created:   Oct 5, 2003
+ *  Copyright: Monta Vista Software, Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ */
+
 #include <linux/linkage.h>
 
-#ifndef __ARMEB__
-ql     .req    r0                      @ quotient low
-qh     .req    r1                      @ quotient high
-onl    .req    r0                      @ original dividend low
-onh    .req    r1                      @ original dividend high
-nl     .req    r4                      @ dividend low
-nh     .req    r5                      @ dividend high
-res    .req    r4                      @ result
+#ifdef __ARMEB__
+#define xh r0
+#define xl r1
+#define yh r2
+#define yl r3
 #else
-ql     .req    r1
-qh     .req    r0
-onl    .req    r1
-onh    .req    r0
-nl     .req    r5
-nh     .req    r4
-res    .req    r5
+#define xl r0
+#define xh r1
+#define yl r2
+#define yh r3
 #endif
 
-dl     .req    r3                      @ divisor low
-dh     .req    r2                      @ divsor high
-
-
-ENTRY(do_div64)
-       stmfd   sp!, {r4, r5, lr}
-       mov     nl, onl
-       movs    nh, onh                 @ if high bits are zero
-       movne   lr, #33
-       moveq   lr, #1                  @ only divide low bits
-       moveq   nh, onl
-
-       tst     dh, #0x80000000
-       bne     2f
-1:     cmp     nh, dh
-       bls     2f
-       add     lr, lr, #1
-       movs    dh, dh, lsl #1          @ left justify disor
-       bpl     1b
-
-2:     movs    nh, onh
-       moveq   dl, dh
-       moveq   dh, #0
-       movne   dl, #0
-       mov     ql, #0
-       mov     qh, #0
-3:     subs    ip, nl, dl              @ trial subtraction
-       sbcs    ip, nh, dh
-       movcs   nh, ip                  @ only update if successful
-       subcs   nl, nl, dl              @ (repeat the subtraction)
-       adcs    ql, ql, ql              @ C=1 if successful, shift into
-       adc     qh, qh, qh              @ quotient
-       movs    dh, dh, lsr #1          @ shift base high part right
-       mov     dl, dl, rrx             @ shift base low part right
-       subs    lr, lr, #1
-       bne     3b
-
-       mov     r2, res
-       ldmfd   sp!, {r4, r5, pc}
+/*
+ * __do_div64: perform a division with 64-bit dividend and 32-bit divisor.
+ *
+ * Note: Calling convention is totally non standard for optimal code.
+ *       This is meant to be used by do_div() from include/asm/div64.h only.
+ *
+ * Input parameters:
+ *     xh-xl   = dividend (clobbered)
+ *     r4      = divisor (preserved)
+ *
+ * Output values:
+ *     yh-yl   = result
+ *     xh      = remainder
+ *
+ * Clobbered regs: xl, ip
+ */
+
+ENTRY(__do_div64)
+
+       @ Test for easy paths first.
+       subs    ip, r4, #1
+       bls     9f                      @ divisor is 0 or 1
+       tst     ip, r4
+       beq     8f                      @ divisor is power of 2
+
+       @ See if we need to handle upper 32-bit result.
+       cmp     xh, r4
+       mov     yh, #0
+       blo     3f
+
+       @ Align divisor with upper part of dividend.
+       @ The aligned divisor is stored in yl preserving the original.
+       @ The bit position is stored in ip.
+
+#if __LINUX_ARM_ARCH__ >= 5
+
+       clz     yl, r4
+       clz     ip, xh
+       sub     yl, yl, ip
+       mov     ip, #1
+       mov     ip, ip, lsl yl
+       mov     yl, r4, lsl yl
+
+#else
+
+       mov     yl, r4
+       mov     ip, #1
+1:     cmp     yl, #0x80000000
+       cmpcc   yl, xh
+       movcc   yl, yl, lsl #1
+       movcc   ip, ip, lsl #1
+       bcc     1b
+
+#endif
+
+       @ The division loop for needed upper bit positions.
+       @ Break out early if dividend reaches 0.
+2:     cmp     xh, yl
+       orrcs   yh, yh, ip
+       subcss  xh, xh, yl
+       movnes  ip, ip, lsr #1
+       mov     yl, yl, lsr #1
+       bne     2b
+
+       @ See if we need to handle lower 32-bit result.
+3:     cmp     xh, #0
+       mov     yl, #0
+       cmpeq   xl, r4
+       movlo   xh, xl
+       movlo   pc, lr
+
+       @ The division loop for lower bit positions.
+       @ Here we shift remainer bits leftwards rather than moving the
+       @ divisor for comparisons, considering the carry-out bit as well.
+       mov     ip, #0x80000000
+4:     movs    xl, xl, lsl #1
+       adcs    xh, xh, xh
+       beq     6f
+       cmpcc   xh, r4
+5:     orrcs   yl, yl, ip
+       subcs   xh, xh, r4
+       movs    ip, ip, lsr #1
+       bne     4b
+       mov     pc, lr
+
+       @ The top part of remainder became zero.  If carry is set
+       @ (the 33th bit) this is a false positive so resume the loop.
+       @ Otherwise, if lower part is also null then we are done.
+6:     bcs     5b
+       cmp     xl, #0
+       moveq   pc, lr
+
+       @ We still have remainer bits in the low part.  Bring them up.
+
+#if __LINUX_ARM_ARCH__ >= 5
+
+       clz     xh, xl                  @ we know xh is zero here so...
+       add     xh, xh, #1
+       mov     xl, xl, lsl xh
+       mov     ip, ip, lsr xh
+
+#else
+
+7:     movs    xl, xl, lsl #1
+       mov     ip, ip, lsr #1
+       bcc     7b
+
+#endif
+
+       @ Current remainder is now 1.  It is worthless to compare with
+       @ divisor at this point since divisor can not be smaller than 3 here.
+       @ If possible, branch for another shift in the division loop.
+       @ If no bit position left then we are done.
+       movs    ip, ip, lsr #1
+       mov     xh, #1
+       bne     4b
+       mov     pc, lr
+
+8:     @ Division by a power of 2: determine what that divisor order is
+       @ then simply shift values around
+
+#if __LINUX_ARM_ARCH__ >= 5
+
+       clz     ip, r4
+       rsb     ip, ip, #31
+
+#else
+
+       mov     yl, r4
+       cmp     r4, #(1 << 16)
+       mov     ip, #0
+       movhs   yl, yl, lsr #16
+       movhs   ip, #16
+
+       cmp     yl, #(1 << 8)
+       movhs   yl, yl, lsr #8
+       addhs   ip, ip, #8
+
+       cmp     yl, #(1 << 4)
+       movhs   yl, yl, lsr #4
+       addhs   ip, ip, #4
+
+       cmp     yl, #(1 << 2)
+       addhi   ip, ip, #3
+       addls   ip, ip, yl, lsr #1
+
+#endif
+
+       mov     yh, xh, lsr ip
+       mov     yl, xl, lsr ip
+       rsb     ip, ip, #32
+       orr     yl, yl, xh, lsl ip
+       mov     xh, xl, lsl ip
+       mov     xh, xh, lsr ip
+       mov     pc, lr
+
+       @ eq -> division by 1: obvious enough...
+9:     moveq   yl, xl
+       moveq   yh, xh
+       moveq   xh, #0
+       moveq   pc, lr
+
+       @ Division by 0:
+       str     lr, [sp, #-4]!
+       bl      __div0
+
+       @ as wrong as it could be...
+       mov     yl, #0
+       mov     yh, #0
+       mov     xh, #0
+       ldr     pc, [sp], #4
+
index caedd7b..8a02e18 100644 (file)
@@ -40,6 +40,7 @@ static unsigned long clps711x_gettimeoffset(void)
 
 void __init clps711x_setup_timer(void)
 {
+       struct timespec tv;
        unsigned int syscon;
 
        gettimeoffset = clps711x_gettimeoffset;
@@ -50,5 +51,7 @@ void __init clps711x_setup_timer(void)
 
        clps_writel(LATCH-1, TC2D); /* 512kHz / 100Hz - 1 */
 
-       xtime.tv_sec = clps_readl(RTCDR);
+       tv.tv_nsec = 0;
+       tv.tv_sec = clps_readl(RTCDR);
+       do_settimeofday(&tv);
 }
index 69456d0..a33722e 100644 (file)
@@ -172,7 +172,7 @@ static int integrator_cpufreq_init(struct cpufreq_policy *policy)
        policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
        policy->cpuinfo.max_freq = 160000;
        policy->cpuinfo.min_freq = 12000;
-       policy->cpuinfo.transition_latency = 1000; /* 1 ms, assumed */
+       policy->cpuinfo.transition_latency = 1000000; /* 1 ms, assumed */
        policy->cur = policy->min = policy->max =
                icst525_khz(&cclk_params, vco); /* current freq */
 
index 149c626..bc48318 100644 (file)
@@ -126,7 +126,7 @@ static void __init ap_init_irq(void)
        writel(-1, VA_IC_BASE + FIQ_ENABLE_CLEAR);
 
        for (i = 0; i < NR_IRQS; i++) {
-               if (((1 << i) && INTEGRATOR_SC_VALID_INT) != 0) {
+               if (((1 << i) & INTEGRATOR_SC_VALID_INT) != 0) {
                        set_irq_chip(i, &sc_chip);
                        set_irq_handler(i, do_level_IRQ);
                        set_irq_flags(i, IRQF_VALID | IRQF_PROBE);
index f409cb9..39c13fc 100644 (file)
@@ -304,7 +304,7 @@ config SA1100_YOPY
        depends on ARCH_SA1100
        help
          Say Y here to support the Yopy PDA.  Product information at
-         <http://www.yopy.com/>.  See Documentation/arm/SA110/Yopy
+         <http://www.yopy.com/>.  See Documentation/arm/SA1100/Yopy
          for more.
 
 config SA1100_STORK
index 45aa716..6659439 100644 (file)
@@ -32,14 +32,14 @@ ENTRY(v3_flush_kern_cache_all)
        /* FALLTHROUGH */
 
 /*
- *     flush_user_cache_range(start, end, vm_flags)
+ *     flush_user_cache_range(start, end, flags)
  *
  *     Invalidate a range of cache entries in the specified
  *     address space.
  *
  *     - start - start address (may not be aligned)
  *     - end   - end address (exclusive, may not be aligned)
- *     - vma   - vma_area_struct describing address space
+ *     - flags - vma_area_struct flags describing address space
  */
 ENTRY(v3_flush_user_cache_range)
        mov     ip, #0
index f948859..bbc822f 100644 (file)
@@ -34,14 +34,14 @@ ENTRY(v4_flush_kern_cache_all)
        mov     pc, lr
 
 /*
- *     flush_user_cache_range(start, end, vma)
+ *     flush_user_cache_range(start, end, flags)
  *
  *     Invalidate a range of cache entries in the specified
  *     address space.
  *
  *     - start - start address (may not be aligned)
  *     - end   - end address (exclusive, may not be aligned)
- *     - vma   - vma_area_struct describing address space
+ *     - flags - vma_area_struct flags describing address space
  */
 ENTRY(v4_flush_user_cache_range)
        mov     ip, #0
index b6422ef..4f7c918 100644 (file)
@@ -72,14 +72,14 @@ __flush_whole_cache:
        mov     pc, lr
 
 /*
- *     flush_user_cache_range(start, end, vm_flags)
+ *     flush_user_cache_range(start, end, flags)
  *
  *     Invalidate a range of cache entries in the specified
  *     address space.
  *
  *     - start - start address (inclusive, page aligned)
  *     - end   - end address (exclusive, page aligned)
- *     - vma   - vma_area_struct describing address space
+ *     - flags - vma_area_struct flags describing address space
  */
 ENTRY(v4wb_flush_user_cache_range)
        sub     r3, r1, r0                      @ calculate total size
index 63db623..61c9fc6 100644 (file)
@@ -64,14 +64,14 @@ __flush_whole_cache:
        mov     pc, lr
 
 /*
- *     flush_user_cache_range(start, end, vm_flags)
+ *     flush_user_cache_range(start, end, flags)
  *
  *     Clean and invalidate a range of cache entries in the specified
  *     address space.
  *
  *     - start - start address (inclusive, page aligned)
  *     - end   - end address (exclusive, page aligned)
- *     - vma   - vma_area_struct describing address space
+ *     - flags - vma_area_struct flags describing address space
  */
 ENTRY(v4wt_flush_user_cache_range)
        sub     r3, r1, r0                      @ calculate total size
index a50e83d..b20af80 100644 (file)
@@ -10,6 +10,7 @@
  *  Page table sludge for ARM v3 and v4 processor architectures.
  */
 #include <linux/config.h>
+#include <linux/module.h>
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/bootmem.h>
 
 #include <asm/mach/map.h>
 
-static unsigned int cachepolicy __initdata = PMD_SECT_WB;
+#define CPOLICY_UNCACHED       0
+#define CPOLICY_BUFFERED       1
+#define CPOLICY_WRITETHROUGH   2
+#define CPOLICY_WRITEBACK      3
+#define CPOLICY_WRITEALLOC     4
+
+static unsigned int cachepolicy __initdata = CPOLICY_WRITEBACK;
 static unsigned int ecc_mask __initdata = 0;
+pgprot_t pgprot_kernel;
+
+EXPORT_SYMBOL(pgprot_kernel);
 
 struct cachepolicy {
-       char            *policy;
+       const char      policy[16];
        unsigned int    cr_mask;
        unsigned int    pmd;
+       unsigned int    pte;
 };
 
 static struct cachepolicy cache_policies[] __initdata = {
-       { "uncached",           CR_W|CR_C,      PMD_SECT_UNCACHED },
-       { "buffered",           CR_C,           PMD_SECT_BUFFERED },
-       { "writethrough",       0,              PMD_SECT_WT       },
-#ifndef CONFIG_CPU_DCACHE_WRITETHROUGH
-       { "writeback",          0,              PMD_SECT_WB       },
-       { "writealloc",         0,              PMD_SECT_WBWA     }
-#endif
+       {
+               .policy         = "uncached",
+               .cr_mask        = CR_W|CR_C,
+               .pmd            = PMD_SECT_UNCACHED,
+               .pte            = 0,
+       }, {
+               .policy         = "buffered",
+               .cr_mask        = CR_C,
+               .pmd            = PMD_SECT_BUFFERED,
+               .pte            = PTE_BUFFERABLE,
+       }, {
+               .policy         = "writethrough",
+               .cr_mask        = 0,
+               .pmd            = PMD_SECT_WT,
+               .pte            = PTE_CACHEABLE,
+       }, {
+               .policy         = "writeback",
+               .cr_mask        = 0,
+               .pmd            = PMD_SECT_WB,
+               .pte            = PTE_BUFFERABLE|PTE_CACHEABLE,
+       }, {
+               .policy         = "writealloc",
+               .cr_mask        = 0,
+               .pmd            = PMD_SECT_WBWA,
+               .pte            = PTE_BUFFERABLE|PTE_CACHEABLE,
+       }
 };
 
 /*
@@ -58,7 +88,7 @@ static void __init early_cachepolicy(char **p)
                int len = strlen(cache_policies[i].policy);
 
                if (memcmp(*p, cache_policies[i].policy, len) == 0) {
-                       cachepolicy = cache_policies[i].pmd;
+                       cachepolicy = i;
                        cr_alignment &= ~cache_policies[i].cr_mask;
                        cr_no_alignment &= ~cache_policies[i].cr_mask;
                        *p += len;
@@ -306,9 +336,23 @@ static struct mem_types mem_types[] __initdata = {
  */
 static void __init build_mem_type_table(void)
 {
+       struct cachepolicy *cp;
        unsigned int cr = get_cr();
        int cpu_arch = cpu_architecture();
-       const char *policy;
+       int i;
+
+#if defined(CONFIG_CPU_DCACHE_DISABLE)
+       if (cachepolicy > CPOLICY_BUFFERED)
+               cachepolicy = CPOLICY_BUFFERED;
+#elif defined(CONFIG_CPU_DCACHE_WRITETHROUGH)
+       if (cachepolicy > CPOLICY_WRITETHROUGH)
+               cachepolicy = CPOLICY_WRITETHROUGH;
+#endif
+       if (cpu_arch < CPU_ARCH_ARMv5) {
+               if (cachepolicy >= CPOLICY_WRITEALLOC)
+                       cachepolicy = CPOLICY_WRITEBACK;
+               ecc_mask = 0;
+       }
 
        /*
         * ARMv6 and above have extended page tables.
@@ -327,56 +371,39 @@ static void __init build_mem_type_table(void)
                mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_APX|PMD_SECT_AP_WRITE;
        }
 
-       /*
-        * ARMv6 can map the vectors as write-through.
-        */
-       if (cpu_arch >= CPU_ARCH_ARMv6)
-               mem_types[MT_VECTORS].prot_pte |= PTE_CACHEABLE;
-       else
-               mem_types[MT_VECTORS].prot_pte |= PTE_BUFFERABLE|PTE_CACHEABLE;
+       cp = &cache_policies[cachepolicy];
 
-       /*
-        * ARMv5 and higher can use ECC memory.
-        */
        if (cpu_arch >= CPU_ARCH_ARMv5) {
-               mem_types[MT_VECTORS].prot_l1 |= ecc_mask;
-               mem_types[MT_MEMORY].prot_sect |= ecc_mask;
+               mem_types[MT_VECTORS].prot_pte |= cp->pte & PTE_CACHEABLE;
        } else {
+               mem_types[MT_VECTORS].prot_pte |= cp->pte;
                mem_types[MT_MINICLEAN].prot_sect &= ~PMD_SECT_TEX(1);
-               if (cachepolicy == PMD_SECT_WBWA)
-                       cachepolicy = PMD_SECT_WB;
-               ecc_mask = 0;
        }
 
-       mem_types[MT_MEMORY].prot_sect |= cachepolicy;
+       mem_types[MT_VECTORS].prot_l1 |= ecc_mask;
+       mem_types[MT_MEMORY].prot_sect |= ecc_mask | cp->pmd;
 
-       switch (cachepolicy) {
-       default:
-       case PMD_SECT_UNCACHED:
-               policy = "uncached";
-               break;
-       case PMD_SECT_BUFFERED:
-               mem_types[MT_VECTORS].prot_pte |= PTE_BUFFERABLE;
-               policy = "buffered";
-               break;
+       for (i = 0; i < 16; i++) {
+               unsigned long v = pgprot_val(protection_map[i]);
+               v &= (~(PTE_BUFFERABLE|PTE_CACHEABLE)) | cp->pte;
+               protection_map[i] = __pgprot(v);
+       }
+
+       pgprot_kernel = __pgprot(L_PTE_PRESENT | L_PTE_YOUNG |
+                                L_PTE_DIRTY | L_PTE_WRITE |
+                                L_PTE_EXEC | cp->pte);
+
+       switch (cp->pmd) {
        case PMD_SECT_WT:
-               mem_types[MT_VECTORS].prot_pte |= PTE_BUFFERABLE|PTE_CACHEABLE;
                mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WT;
-               policy = "write through";
                break;
        case PMD_SECT_WB:
-               mem_types[MT_VECTORS].prot_pte |= PTE_BUFFERABLE|PTE_CACHEABLE;
-               mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB;
-               policy = "write back";
-               break;
        case PMD_SECT_WBWA:
-               mem_types[MT_VECTORS].prot_pte |= PTE_BUFFERABLE|PTE_CACHEABLE;
                mem_types[MT_CACHECLEAN].prot_sect |= PMD_SECT_WB;
-               policy = "write back, write allocate";
                break;
        }
        printk("Memory policy: ECC %sabled, Data cache %s\n",
-               ecc_mask ? "en" : "dis", policy);
+               ecc_mask ? "en" : "dis", cp->policy);
 }
 
 /*
index 3322d98..d627ced 100644 (file)
@@ -135,10 +135,10 @@ void enable_irq(unsigned int irq)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
        struct irqaction * action;
 
-       for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                action = irq_desc[i].action;
                if (!action)
                        continue;
@@ -148,10 +148,10 @@ int show_interrupts(struct seq_file *p, void *v)
                        seq_printf(p, ", %s", action->name);
                }
                seq_putc(p, '\n');
+       } else if (i == NR_IRQS) {
+               show_fiq_list(p, v);
+               seq_printf(p, "Err: %10lu\n", irq_err_count);
        }
-
-       show_fiq_list(p, v);
-       seq_printf(p, "Err: %10lu\n", irq_err_count);
        return 0;
 }
 
index d61fa25..5eba7c1 100644 (file)
@@ -89,11 +89,11 @@ static struct irqaction *irq_action[NR_IRQS];
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
        struct irqaction * action;
        unsigned long flags;
 
-       for (i = 0; i < NR_IRQS; i++) {
+       if (i < NR_IRQS) {
                local_irq_save(flags);
                action = irq_action[i];
                if (!action) 
index 8955953..d64a21a 100644 (file)
@@ -5,6 +5,10 @@
 
 mainmenu "uClinux/h8300 (w/o MMU) Kernel Configuration"
 
+config H8300
+       bool
+       default y
+
 config MMU
        bool
        default n
index 5d7bb4b..749ae3e 100644 (file)
@@ -34,7 +34,7 @@ cflags-$(CONFIG_CPU_H8S)      := -ms
 ldflags-$(CONFIG_CPU_H8S)      := -mh8300self
 
 CFLAGS += $(cflags-y)
-CFLAGS += -mint32 -fno-builtin -Os
+CFLAGS += -mint32 -fno-builtin
 CFLAGS += -g
 CFLAGS += -D__linux__
 CFLAGS += -DUTS_SYSNAME=\"uClinux\"
index e62375f..1c9e291 100644 (file)
@@ -228,9 +228,9 @@ asmlinkage void process_int(int vec, struct pt_regs *fp)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
 
-       for (i = 0; i < NR_IRQS; i++) {
+       if (i < NR_IRQS) {
                if (irq_list[i]) {
                        seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
                        seq_printf(p, "%s\n", irq_list[i]->devname);
index 84ab5ad..d8d7760 100644 (file)
@@ -280,9 +280,9 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
 
-       for (i = 0; i < NR_IRQS; i++) {
+       if (i < NR_IRQS) {
                if (irq_list[i]) {
                        seq_printf(p, "%3d: %10u ",i,irq_list[i]->count);
                        seq_printf(p, "%s\n", irq_list[i]->devname);
index 19d5e1b..1a34147 100644 (file)
@@ -115,10 +115,15 @@ config ACPI_SRAT
        default y
        depends on NUMA && (X86_SUMMIT || X86_GENERICARCH)
 
+config X86_SUMMIT_NUMA
+       bool
+       default y
+       depends on NUMA && (X86_SUMMIT || X86_GENERICARCH)
+
 config X86_CYCLONE_TIMER
-       bool 
-       default y
-       depends on X86_SUMMIT || X86_GENERICARCH
+       bool
+       default y
+       depends on X86_SUMMIT || X86_GENERICARCH
 
 config ES7000_CLUSTERED_APIC
        bool
@@ -784,6 +789,25 @@ config MTRR
 
          See <file:Documentation/mtrr.txt> for more information.
 
+config EFI
+       bool "Boot from EFI support (EXPERIMENTAL)"
+       depends on ACPI
+       default n
+       ---help---
+
+       This enables the the kernel to boot on EFI platforms using
+       system configuration information passed to it from the firmware.
+       This also enables the kernel to use any EFI runtime services that are
+       available (such as the EFI variable services).
+
+       This option is only useful on systems that have EFI firmware
+       and will result in a kernel image that is ~8k larger.  In addition,
+       you must use the latest ELILO loader available at
+       ftp.hpl.hp.com/pub/linux-ia64/ in order to take advantage of kernel
+       initialization using EFI information (neither GRUB nor LILO know
+       anything about EFI).  However, even with this option, the resultant
+       kernel should continue to boot on existing non-EFI platforms.
+
 config HAVE_DEC_LOCK
        bool
        depends on (SMP || PREEMPT) && X86_CMPXCHG
@@ -793,7 +817,7 @@ config HAVE_DEC_LOCK
 # Summit needs it only when NUMA is on
 config BOOT_IOREMAP
        bool
-       depends on ((X86_SUMMIT || X86_GENERICARCH) && NUMA)
+       depends on (((X86_SUMMIT || X86_GENERICARCH) && NUMA) || (X86 && EFI))
        default y
 
 endmenu
@@ -1030,6 +1054,25 @@ config PCI_DIRECT
        depends on PCI && ((PCI_GODIRECT || PCI_GOANY) || X86_VISWS)
        default y
 
+config PCI_USE_VECTOR
+       bool "Vector-based interrupt indexing"
+       depends on X86_LOCAL_APIC
+       default n
+       help
+          This replaces the current existing IRQ-based index interrupt scheme
+          with the vector-base index scheme. The advantages of vector base
+          over IRQ base are listed below:
+          1) Support MSI implementation.
+          2) Support future IOxAPIC hotplug
+
+          Note that this enables MSI, Message Signaled Interrupt, on all
+          MSI capable device functions detected if users also install the
+          MSI patch. Message Signal Interrupt enables an MSI-capable
+          hardware device to send an inbound Memory Write on its PCI bus
+          instead of asserting IRQ signal on device IRQ pin.
+
+          If you don't know what to do here, say N.
+
 source "drivers/pci/Kconfig"
 
 config ISA
@@ -1203,13 +1246,6 @@ config DEBUG_INFO
          Say Y here only if you plan to use gdb to debug the kernel.
          If you don't debug the kernel, you can say N.
          
-config DEBUG_DEV_PRINTK
-       bool "Debug dev_printk"
-       depends on DEBUG_KERNEL
-       help
-         If you say Y here, all dev_printk() parameters will be checked before
-         dev_printk() is called.  This is useful when debugging new drivers.
-
 config DEBUG_SPINLOCK_SLEEP
        bool "Sleep-inside-spinlock checking"
        help
index b5ed097..6214b3b 100644 (file)
@@ -24,12 +24,13 @@ obj-$(CONFIG_X86_MPPARSE)   += mpparse.o
 obj-$(CONFIG_X86_LOCAL_APIC)   += apic.o nmi.o
 obj-$(CONFIG_X86_IO_APIC)      += io_apic.o
 obj-$(CONFIG_X86_NUMAQ)                += numaq.o
-obj-$(CONFIG_X86_SUMMIT)       += summit.o
+obj-$(CONFIG_X86_SUMMIT_NUMA)  += summit.o
 obj-$(CONFIG_EDD)              += edd.o
 obj-$(CONFIG_MODULES)          += module.o
 obj-y                          += sysenter.o vsyscall.o
 obj-$(CONFIG_ACPI_SRAT)        += srat.o
 obj-$(CONFIG_HPET_TIMER)       += time_hpet.o
+obj-$(CONFIG_EFI)              += efi.o efi_stub.o
 
 EXTRA_AFLAGS   := -traditional
 
index c68d6a9..0faee3e 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/init.h>
 #include <linux/config.h>
 #include <linux/acpi.h>
+#include <linux/efi.h>
 #include <asm/pgalloc.h>
 #include <asm/io_apic.h>
 #include <asm/apic.h>
@@ -331,6 +332,12 @@ acpi_find_rsdp (void)
 {
        unsigned long           rsdp_phys = 0;
 
+       if (efi_enabled) {
+               if (efi.acpi20)
+                       return __pa(efi.acpi20);
+               else if (efi.acpi)
+                       return __pa(efi.acpi);
+       }
        /*
         * Scan memory looking for the RSDP signature. First search EBDA (low
         * memory) paragraphs and then search upper memory (E0000-FFFFF).
index 17b0c00..6dac129 100644 (file)
@@ -510,7 +510,7 @@ void __init cpu_init (void)
                BUG();
        enter_lazy_tlb(&init_mm, current);
 
-       load_esp0(t, thread->esp0);
+       load_esp0(t, thread);
        set_tss_desc(cpu,t);
        cpu_gdt_table[cpu][GDT_ENTRY_TSS].b &= 0xfffffdff;
        load_TR_desc();
index 1da77a7..776ac25 100644 (file)
@@ -578,8 +578,8 @@ acpi_cpufreq_cpu_init (
        /* detect transition latency */
        policy->cpuinfo.transition_latency = 0;
        for (i=0;i<perf->state_count;i++) {
-               if (perf->states[i].transition_latency > policy->cpuinfo.transition_latency)
-                       policy->cpuinfo.transition_latency = perf->states[i].transition_latency;
+               if ((perf->states[i].transition_latency * 1000) > policy->cpuinfo.transition_latency)
+                       policy->cpuinfo.transition_latency = perf->states[i].transition_latency * 1000;
        }
        policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
        policy->cur = perf->states[pr->limit.state.px].core_frequency * 1000;
index c0dd4b2..24d06b6 100644 (file)
@@ -170,6 +170,9 @@ static void longhaul_setstate (unsigned int clock_ratio_index)
  * between that value multiplied by possible FSBs and cpu_mhz which
  * was calculated at boot time. Really ugly, but no other way to do this.
  */
+
+#define ROUNDING       0xf
+
 static int _guess (int guess, int maxmult)
 {
        int target;
@@ -177,16 +180,20 @@ static int _guess (int guess, int maxmult)
        target = ((maxmult/10)*guess);
        if (maxmult%10 != 0)
                target += (guess/2);
-       target &= ~0xf;
+       target += ROUNDING/2;
+       target &= ~ROUNDING;
        return target;
 }
 
 static int guess_fsb(int maxmult)
 {
-       int speed = (cpu_khz/1000) & ~0xf;
+       int speed = (cpu_khz/1000);
        int i;
        int speeds[3] = { 66, 100, 133 };
 
+       speed += ROUNDING/2;
+       speed &= ~ROUNDING;
+
        for (i=0; i<3; i++) {
                if (_guess(speeds[i],maxmult) == speed)
                        return speeds[i];
index da3e110..d8837af 100644 (file)
@@ -48,8 +48,7 @@ enum {
 
 
 static int has_N44_O17_errata[NR_CPUS];
-static int stock_freq;
-
+static unsigned int stock_freq;
 
 static int cpufreq_p4_setdc(unsigned int cpu, unsigned int newstate)
 {
@@ -175,6 +174,54 @@ static int cpufreq_p4_verify(struct cpufreq_policy *policy)
        return cpufreq_frequency_table_verify(policy, &p4clockmod_table[0]);
 }
 
+/* copied from speedstep_lib, made SMP-compatible */
+static unsigned int cpufreq_p4_get_frequency(struct cpuinfo_x86 *c)
+{
+       u32 msr_lo, msr_hi, mult;
+       unsigned int fsb = 0;
+
+       if (c->x86 != 0xF) {
+               printk(KERN_DEBUG PFX "Unknown P4. Please send an e-mail to <linux@brodo.de>\n");
+               return 0;
+       }
+
+       rdmsr(0x2c, msr_lo, msr_hi);
+
+       /* printk(KERN_DEBUG PFX "P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi); */
+       /* decode the FSB: see IA-32 Intel (C) Architecture Software 
+        * Developer's Manual, Volume 3: System Prgramming Guide,
+        * revision #12 in Table B-1: MSRs in the Pentium 4 and
+        * Intel Xeon Processors, on page B-4 and B-5.
+        */
+       if (c->x86_model < 2)
+               fsb = 100 * 1000;
+       else {
+               u8 fsb_code = (msr_lo >> 16) & 0x7;
+               switch (fsb_code) {
+               case 0:
+                       fsb = 100 * 1000;
+                       break;
+               case 1:
+                       fsb = 13333 * 10;
+                       break;
+               case 2:
+                       fsb = 200 * 1000;
+                       break;
+               }
+       }
+
+       if (!fsb) {
+               printk(KERN_DEBUG PFX "couldn't detect FSB speed. Please send an e-mail to <linux@brodo.de>\n");
+               printk(KERN_DEBUG PFX "P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi);
+       }
+
+       /* Multiplier. */
+       mult = msr_lo >> 24;
+
+       return (fsb * mult);
+}
+
 
 static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
 {
@@ -192,15 +239,10 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
                has_N44_O17_errata[policy->cpu] = 1;
        }
        
-       /* get frequency */
-       if (!stock_freq) {
-               if (cpu_khz)
-                       stock_freq = cpu_khz;
-               else {
-                       printk(KERN_INFO PFX "unknown core frequency - please use module parameter 'stock_freq'\n");
-                       return -EINVAL;
-               }
-       }
+       /* get max frequency */
+       stock_freq = cpufreq_p4_get_frequency(c);
+       if (!stock_freq)
+               return -EINVAL;
 
        /* table init */
        for (i=1; (p4clockmod_table[i].frequency != CPUFREQ_TABLE_END); i++) {
@@ -213,7 +255,7 @@ static int cpufreq_p4_cpu_init(struct cpufreq_policy *policy)
        
        /* cpuinfo and default policy values */
        policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
-       policy->cpuinfo.transition_latency = 1000;
+       policy->cpuinfo.transition_latency = 1000000; /* assumed */
        policy->cur = stock_freq;
 
        return cpufreq_frequency_table_cpuinfo(policy, &p4clockmod_table[0]);
@@ -269,8 +311,6 @@ static void __exit cpufreq_p4_exit(void)
 }
 
 
-MODULE_PARM(stock_freq, "i");
-
 MODULE_AUTHOR ("Zwane Mwaikambo <zwane@commfireservices.com>");
 MODULE_DESCRIPTION ("cpufreq driver for Pentium(TM) 4/Xeon(TM)");
 MODULE_LICENSE ("GPL");
index e3632cb..ee99237 100644 (file)
@@ -337,7 +337,8 @@ static int powernow_decode_bios (int maxfid, int startvid)
                                }
                        }
                        printk (KERN_INFO PFX "No PST tables match this cpuid (0x%x)\n", etuple);
-                       printk ("This is indicative of a broken BIOS. Email davej@redhat.com\n");
+                       printk (KERN_INFO PFX "This is indicative of a broken BIOS.\n");
+                       printk (KERN_INFO PFX "See http://www.codemonkey.org.uk/projects/cpufreq/powernow-k7.shtml\n");
                        return -EINVAL;
                }
                p++;
@@ -386,7 +387,11 @@ static int __init powernow_cpu_init (struct cpufreq_policy *policy)
                                minimum_speed, maximum_speed);
 
        policy->governor = CPUFREQ_DEFAULT_GOVERNOR;
-       policy->cpuinfo.transition_latency = latency;
+
+       /* latency is in 10 ns (look for SGTC above) for each VID
+        * and FID transition, so multiply that value with 20 */
+       policy->cpuinfo.transition_latency = latency * 20;
+
        policy->cur = maximum_speed;
 
        return cpufreq_frequency_table_cpuinfo(policy, powernow_table);
index ef8393c..f38f4a5 100644 (file)
@@ -687,11 +687,13 @@ find_psb_table(void)
                        if (ppst[j].vid < rvo) {        /* vid+rvo >= 0 */
                                printk(KERN_ERR BFX
                                       "0 vid exceeded with pstate %d\n", j);
+                               kfree(ppst);
                                return -ENODEV;
                        }
                        if (ppst[j].vid < maxvid+rvo) { /* vid+rvo >= maxvid */
                                printk(KERN_ERR BFX
                                       "maxvid exceeded with pstate %d\n", j);
+                               kfree(ppst);
                                return -ENODEV;
                        }
                }
@@ -706,7 +708,7 @@ find_psb_table(void)
 
                for (j = 0; j < numps; j++)
                        if ((ppst[j].fid==currfid) && (ppst[j].vid==currvid))
-                               return (0);
+                               return 0;
 
                printk(KERN_ERR BFX "currfid/vid do not match PST, ignoring\n");
                return 0;
@@ -935,10 +937,7 @@ powernowk8_verify(struct cpufreq_policy *pol)
                return -ENODEV;
        }
 
-#warning pol->policy is in undefined state here
-       res = find_match(&targ, &min, &max,
-                        pol->policy == CPUFREQ_POLICY_POWERSAVE ?
-                        SEARCH_DOWN : SEARCH_UP, 0, 0);
+       res = find_match(&targ, &min, &max, SEARCH_DOWN, 0, 0);
        if (!res) {
                pol->min = min * 1000;
                pol->max = max * 1000;
@@ -957,9 +956,10 @@ powernowk8_cpu_init(struct cpufreq_policy *pol)
 
        pol->governor = CPUFREQ_DEFAULT_GOVERNOR;
 
-       /* Take a crude guess here. */
-       pol->cpuinfo.transition_latency = ((rvo + 8) * vstable * VST_UNITS_20US)
-           + (3 * (1 << irt) * 10);
+       /* Take a crude guess here. 
+        * That guess was in microseconds, so multply with 1000 */
+       pol->cpuinfo.transition_latency = (((rvo + 8) * vstable * VST_UNITS_20US)
+           + (3 * (1 << irt) * 10)) * 1000;
 
        if (query_current_values_with_pending_wait())
                return -EIO;
index 2653cc2..7f8844c 100644 (file)
@@ -73,6 +73,16 @@ static struct cpufreq_frequency_table op_900[] =
        { .frequency = CPUFREQ_TABLE_END }
 };
 
+/* Ultra Low Voltage Intel Pentium M processor 1000MHz */
+static struct cpufreq_frequency_table op_1000[] =
+{
+       OP(600,  844),
+       OP(800,  972),
+       OP(900,  988),
+       OP(1000, 1004),
+       { .frequency = CPUFREQ_TABLE_END }
+};
+
 /* Low Voltage Intel Pentium M processor 1.10GHz */
 static struct cpufreq_frequency_table op_1100[] =
 {
@@ -165,6 +175,7 @@ static struct cpufreq_frequency_table op_1700[] =
 static const struct cpu_model models[] = 
 {
        _CPU( 900, " 900"),
+       CPU(1000),
        CPU(1100),
        CPU(1200),
        CPU(1300),
index e3a7568..927d3be 100644 (file)
@@ -106,14 +106,45 @@ static unsigned int pentium3_get_frequency (unsigned int processor)
 
 static unsigned int pentium4_get_frequency(void)
 {
-       u32 msr_lo, msr_hi;
+       struct cpuinfo_x86 *c = &boot_cpu_data;
+       u32 msr_lo, msr_hi, mult;
+       unsigned int fsb = 0;
 
        rdmsr(0x2c, msr_lo, msr_hi);
 
        dprintk(KERN_DEBUG "speedstep-lib: P4 - MSR_EBC_FREQUENCY_ID: 0x%x 0x%x\n", msr_lo, msr_hi);
 
-       msr_lo >>= 24;
-       return (msr_lo * 100000);
+       /* decode the FSB: see IA-32 Intel (C) Architecture Software 
+        * Developer's Manual, Volume 3: System Prgramming Guide,
+        * revision #12 in Table B-1: MSRs in the Pentium 4 and
+        * Intel Xeon Processors, on page B-4 and B-5.
+        */
+       if (c->x86_model < 2)
+               fsb = 100 * 1000;
+       else {
+               u8 fsb_code = (msr_lo >> 16) & 0x7;
+               switch (fsb_code) {
+               case 0:
+                       fsb = 100 * 1000;
+                       break;
+               case 1:
+                       fsb = 13333 * 10;
+                       break;
+               case 2:
+                       fsb = 200 * 1000;
+                       break;
+               }
+       }
+
+       if (!fsb)
+               printk(KERN_DEBUG "speedstep-lib: couldn't detect FSB speed. Please send an e-mail to <linux@brodo.de>\n");
+
+       /* Multiplier. */
+       mult = msr_lo >> 24;
+
+       dprintk(KERN_DEBUG "speedstep-lib: P4 - FSB %u kHz; Multiplier %u\n", fsb, mult);
+
+       return (fsb * mult);
 }
 
  
index 04951e0..ff7521d 100644 (file)
@@ -15,7 +15,7 @@
 #define SPEEDSTEP_PROCESSOR_PIII_C_EARLY       0x00000001  /* Coppermine core */
 #define SPEEDSTEP_PROCESSOR_PIII_C             0x00000002  /* Coppermine core */
 #define SPEEDSTEP_PROCESSOR_PIII_T             0x00000003  /* Tualatin core */
-#define SPEEDSTEP_PROCESSOR_P4M                        0x00000004  /* P4-M with 100 MHz FSB */
+#define SPEEDSTEP_PROCESSOR_P4M                        0x00000004  /* P4-M  */
 
 /* speedstep states -- only two of them */
 
index bab8d19..157899d 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/cpufreq.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
+#include <linux/delay.h>
 #include <asm/ist.h>
 
 #include "speedstep-lib.h"
@@ -51,10 +52,14 @@ static struct cpufreq_frequency_table speedstep_freqs[] = {
 #define SET_SPEEDSTEP_STATE 2
 #define GET_SPEEDSTEP_FREQS 4
 
+/* how often shall the SMI call be tried if it failed, e.g. because
+ * of DMA activity going on? */
+#define SMI_TRIES 5
+
 /* DEBUG
  *   Define it if you want verbose debug output, e.g. for bug reporting
  */
-#define SPEEDSTEP_DEBUG
+//#define SPEEDSTEP_DEBUG
 
 #ifdef SPEEDSTEP_DEBUG
 #define dprintk(msg...) printk(msg)
@@ -85,6 +90,9 @@ static int speedstep_smi_ownership (void)
 
 /**
  * speedstep_smi_get_freqs - get SpeedStep preferred & current freq.
+ * Only available on later SpeedStep-enabled systems, returns false results or
+ * even hangs [cf. bugme.osdl.org # 1422] on earlier systems. Empirical testing
+ * shows that the latter occurs if !(ist_info.event & 0xFFFF).
  *
  */
 static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)
@@ -93,6 +101,9 @@ static int speedstep_smi_get_freqs (unsigned int *low, unsigned int *high)
        u32 state=0;
        u32 function = GET_SPEEDSTEP_FREQS;
 
+       if (!(ist_info.event & 0xFFFF))
+               return -ENODEV;
+
        command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff);
 
        __asm__ __volatile__("movl $0, %%edi\n"
@@ -134,10 +145,11 @@ static int speedstep_get_state (void)
  */
 static void speedstep_set_state (unsigned int state, unsigned int notify)
 {
-       unsigned int old_state, result, command, new_state;
+       unsigned int old_state, result = 0, command, new_state;
        unsigned long flags;
        struct cpufreq_freqs freqs;
        unsigned int function=SET_SPEEDSTEP_STATE;
+       unsigned int retry = 0;
 
        if (state > 0x1)
                return;
@@ -157,20 +169,28 @@ static void speedstep_set_state (unsigned int state, unsigned int notify)
        local_irq_save(flags);
 
        command = (smi_sig & 0xffffff00) | (smi_cmd & 0xff);
-       __asm__ __volatile__(
-               "movl $0, %%edi\n"
-               "out %%al, (%%dx)\n"
-               : "=b" (new_state), "=D" (result)
-               : "a" (command), "b" (function), "c" (state), "d" (smi_port), "S" (0)
-       );
+
+       do {
+               if (retry) {
+                       dprintk(KERN_INFO "cpufreq: retry %u, previous result %u\n", retry, result);
+                       mdelay(retry * 50);
+               }
+               retry++;
+               __asm__ __volatile__(
+                       "movl $0, %%edi\n"
+                       "out %%al, (%%dx)\n"
+                       : "=b" (new_state), "=D" (result)
+                       : "a" (command), "b" (function), "c" (state), "d" (smi_port), "S" (0)
+                       );
+       } while ((new_state != state) && (retry <= SMI_TRIES));
 
        /* enable IRQs */
        local_irq_restore(flags);
 
        if (new_state == state) {
-               dprintk(KERN_INFO "cpufreq: change to %u MHz succeded\n", (freqs.new / 1000));
+               dprintk(KERN_INFO "cpufreq: change to %u MHz succeeded after %u tries with result %u\n", (freqs.new / 1000), retry, result);
        } else {
-               printk(KERN_ERR "cpufreq: change failed\n");
+               printk(KERN_ERR "cpufreq: change failed with new_state %u and result %u\n", new_state, result);
        }
 
        if (notify)
@@ -225,9 +245,10 @@ static int speedstep_cpu_init(struct cpufreq_policy *policy)
                return -ENODEV;
 
        result = speedstep_smi_ownership();
-
-       if (result)
+       if (result) {
                dprintk(KERN_INFO "cpufreq: fails an aquiring ownership of a SMI interface.\n");
+               return -EINVAL;
+       }
 
        /* detect low and high frequency */
        result = speedstep_smi_get_freqs(&speedstep_freqs[SPEEDSTEP_LOW].frequency,
@@ -286,6 +307,7 @@ static struct cpufreq_driver speedstep_driver = {
        .target         = speedstep_target,
        .init           = speedstep_cpu_init,
        .resume         = speedstep_resume,
+       .owner          = THIS_MODULE,
 };
 
 /**
diff --git a/arch/i386/kernel/efi.c b/arch/i386/kernel/efi.c
new file mode 100644 (file)
index 0000000..310090d
--- /dev/null
@@ -0,0 +1,645 @@
+/*
+ * Extensible Firmware Interface
+ *
+ * Based on Extensible Firmware Interface Specification version 1.0
+ *
+ * Copyright (C) 1999 VA Linux Systems
+ * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
+ * Copyright (C) 1999-2002 Hewlett-Packard Co.
+ *     David Mosberger-Tang <davidm@hpl.hp.com>
+ *     Stephane Eranian <eranian@hpl.hp.com>
+ *
+ * All EFI Runtime Services are not implemented yet as EFI only
+ * supports physical mode addressing on SoftSDV. This is to be fixed
+ * in a future version.  --drummond 1999-07-20
+ *
+ * Implemented EFI runtime services and virtual mode calls.  --davidm
+ *
+ * Goutham Rao: <goutham.rao@intel.com>
+ *     Skip non-WB memory and ignore empty memory ranges.
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/mm.h>
+#include <linux/types.h>
+#include <linux/time.h>
+#include <linux/spinlock.h>
+#include <linux/bootmem.h>
+#include <linux/ioport.h>
+#include <linux/proc_fs.h>
+#include <linux/efi.h>
+
+#include <asm/setup.h>
+#include <asm/io.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/processor.h>
+#include <asm/desc.h>
+#include <asm/pgalloc.h>
+#include <asm/tlbflush.h>
+
+#define EFI_DEBUG      0
+#define PFX            "EFI: "
+
+extern efi_status_t asmlinkage efi_call_phys(void *, ...);
+
+struct efi efi;
+struct efi efi_phys __initdata;
+struct efi_memory_map memmap __initdata;
+
+/*
+ * We require an early boot_ioremap mapping mechanism initially
+ */
+extern void * boot_ioremap(unsigned long, unsigned long);
+
+/*
+ * efi_dir is allocated here, but the directory isn't created
+ * here, as proc_mkdir() doesn't work this early in the bootup
+ * process.  Therefore, each module, like efivars, must test for
+ *    if (!efi_dir) efi_dir = proc_mkdir("efi", NULL);
+ * prior to creating their own entries under /proc/efi.
+ */
+#ifdef CONFIG_PROC_FS
+struct proc_dir_entry *efi_dir;
+#endif
+
+
+/*
+ * To make EFI call EFI runtime service in physical addressing mode we need
+ * prelog/epilog before/after the invocation to disable interrupt, to
+ * claim EFI runtime service handler exclusively and to duplicate a memory in
+ * low memory space say 0 - 3G.
+ */
+
+static unsigned long efi_rt_eflags;
+static spinlock_t efi_rt_lock = SPIN_LOCK_UNLOCKED;
+static pgd_t efi_bak_pg_dir_pointer[2];
+
+static void efi_call_phys_prelog(void)
+{
+       unsigned long cr4;
+       unsigned long temp;
+
+       spin_lock(&efi_rt_lock);
+       local_irq_save(efi_rt_eflags);
+
+       /*
+        * If I don't have PSE, I should just duplicate two entries in page
+        * directory. If I have PSE, I just need to duplicate one entry in
+        * page directory.
+        */
+       __asm__ __volatile__("movl %%cr4, %0":"=r"(cr4));
+
+       if (cr4 & X86_CR4_PSE) {
+               efi_bak_pg_dir_pointer[0].pgd =
+                   swapper_pg_dir[pgd_index(0)].pgd;
+               swapper_pg_dir[0].pgd =
+                   swapper_pg_dir[pgd_index(PAGE_OFFSET)].pgd;
+       } else {
+               efi_bak_pg_dir_pointer[0].pgd =
+                   swapper_pg_dir[pgd_index(0)].pgd;
+               efi_bak_pg_dir_pointer[1].pgd =
+                   swapper_pg_dir[pgd_index(0x400000)].pgd;
+               swapper_pg_dir[pgd_index(0)].pgd =
+                   swapper_pg_dir[pgd_index(PAGE_OFFSET)].pgd;
+               temp = PAGE_OFFSET + 0x400000;
+               swapper_pg_dir[pgd_index(0x400000)].pgd =
+                   swapper_pg_dir[pgd_index(temp)].pgd;
+       }
+
+       /*
+        * After the lock is released, the original page table is restored.
+        */
+       local_flush_tlb();
+
+       cpu_gdt_descr[0].address = __pa(cpu_gdt_descr[0].address);
+       __asm__ __volatile__("lgdt %0":"=m"
+                           (*(struct Xgt_desc_struct *) __pa(&cpu_gdt_descr[0])));
+}
+
+static void efi_call_phys_epilog(void)
+{
+       unsigned long cr4;
+
+       cpu_gdt_descr[0].address =
+               (unsigned long) __va(cpu_gdt_descr[0].address);
+       __asm__ __volatile__("lgdt %0":"=m"(cpu_gdt_descr));
+       __asm__ __volatile__("movl %%cr4, %0":"=r"(cr4));
+
+       if (cr4 & X86_CR4_PSE) {
+               swapper_pg_dir[pgd_index(0)].pgd =
+                   efi_bak_pg_dir_pointer[0].pgd;
+       } else {
+               swapper_pg_dir[pgd_index(0)].pgd =
+                   efi_bak_pg_dir_pointer[0].pgd;
+               swapper_pg_dir[pgd_index(0x400000)].pgd =
+                   efi_bak_pg_dir_pointer[1].pgd;
+       }
+
+       /*
+        * After the lock is released, the original page table is restored.
+        */
+       local_flush_tlb();
+
+       local_irq_restore(efi_rt_eflags);
+       spin_unlock(&efi_rt_lock);
+}
+
+static efi_status_t
+phys_efi_set_virtual_address_map(unsigned long memory_map_size,
+                                unsigned long descriptor_size,
+                                u32 descriptor_version,
+                                efi_memory_desc_t *virtual_map)
+{
+       efi_status_t status;
+
+       efi_call_phys_prelog();
+       status = efi_call_phys(efi_phys.set_virtual_address_map,
+                                    memory_map_size, descriptor_size,
+                                    descriptor_version, virtual_map);
+       efi_call_phys_epilog();
+       return status;
+}
+
+efi_status_t
+phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc)
+{
+       efi_status_t status;
+
+       efi_call_phys_prelog();
+       status = efi_call_phys(efi_phys.get_time, tm, tc);
+       efi_call_phys_epilog();
+       return status;
+}
+
+int inline efi_set_rtc_mmss(unsigned long nowtime)
+{
+       int real_seconds, real_minutes;
+       efi_status_t    status;
+       efi_time_t      eft;
+       efi_time_cap_t  cap;
+
+       spin_lock(&efi_rt_lock);
+       status = efi.get_time(&eft, &cap);
+       spin_unlock(&efi_rt_lock);
+       if (status != EFI_SUCCESS)
+               panic("Ooops, efitime: can't read time!\n");
+       real_seconds = nowtime % 60;
+       real_minutes = nowtime / 60;
+
+       if (((abs(real_minutes - eft.minute) + 15)/30) & 1)
+               real_minutes += 30;
+       real_minutes %= 60;
+
+       eft.minute = real_minutes;
+       eft.second = real_seconds;
+
+       if (status != EFI_SUCCESS) {
+               printk("Ooops: efitime: can't read time!\n");
+               return -1;
+       }
+       return 0;
+}
+/*
+ * This should only be used during kernel init and before runtime
+ * services have been remapped, therefore, we'll need to call in physical
+ * mode.  Note, this call isn't used later, so mark it __init.
+ */
+unsigned long inline __init efi_get_time(void)
+{
+       efi_status_t status;
+       efi_time_t eft;
+       efi_time_cap_t cap;
+
+       status = phys_efi_get_time(&eft, &cap);
+       if (status != EFI_SUCCESS)
+               printk("Oops: efitime: can't read time status: 0x%lx\n",status);
+
+       return mktime(eft.year, eft.month, eft.day, eft.hour,
+                       eft.minute, eft.second);
+}
+
+int is_available_memory(efi_memory_desc_t * md)
+{
+       if (!(md->attribute & EFI_MEMORY_WB))
+               return 0;
+
+       switch (md->type) {
+               case EFI_LOADER_CODE:
+               case EFI_LOADER_DATA:
+               case EFI_BOOT_SERVICES_CODE:
+               case EFI_BOOT_SERVICES_DATA:
+               case EFI_CONVENTIONAL_MEMORY:
+                       return 1;
+       }
+       return 0;
+}
+
+/*
+ * We need to map the EFI memory map again after paging_init().
+ */
+void __init efi_map_memmap(void)
+{
+       memmap.map = NULL;
+
+       memmap.map = (efi_memory_desc_t *)
+               bt_ioremap((unsigned long) memmap.phys_map,
+                       (memmap.nr_map * sizeof(efi_memory_desc_t)));
+
+       if (memmap.map == NULL)
+               printk(KERN_ERR PFX "Could not remap the EFI memmap!\n");
+}
+
+void __init print_efi_memmap(void)
+{
+       efi_memory_desc_t *md;
+       int i;
+
+       for (i = 0; i < memmap.nr_map; i++) {
+               md = &memmap.map[i];
+               printk(KERN_INFO "mem%02u: type=%u, attr=0x%llx, "
+                       "range=[0x%016llx-0x%016llx) (%lluMB)\n",
+                       i, md->type, md->attribute, md->phys_addr,
+                       md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT),
+                       (md->num_pages >> (20 - EFI_PAGE_SHIFT)));
+       }
+}
+
+/*
+ * Walks the EFI memory map and calls CALLBACK once for each EFI
+ * memory descriptor that has memory that is available for kernel use.
+ */
+void efi_memmap_walk(efi_freemem_callback_t callback, void *arg)
+{
+       int prev_valid = 0;
+       struct range {
+               unsigned long start;
+               unsigned long end;
+       } prev, curr;
+       efi_memory_desc_t *md;
+       unsigned long start, end;
+       int i;
+
+       for (i = 0; i < memmap.nr_map; i++) {
+               md = &memmap.map[i];
+
+               if ((md->num_pages == 0) || (!is_available_memory(md)))
+                       continue;
+
+               curr.start = md->phys_addr;
+               curr.end = curr.start + (md->num_pages << EFI_PAGE_SHIFT);
+
+               if (!prev_valid) {
+                       prev = curr;
+                       prev_valid = 1;
+               } else {
+                       if (curr.start < prev.start)
+                               printk(KERN_INFO PFX "Unordered memory map\n");
+                       if (prev.end == curr.start)
+                               prev.end = curr.end;
+                       else {
+                               start =
+                                   (unsigned long) (PAGE_ALIGN(prev.start));
+                               end = (unsigned long) (prev.end & PAGE_MASK);
+                               if ((end > start)
+                                   && (*callback) (start, end, arg) < 0)
+                                       return;
+                               prev = curr;
+                       }
+               }
+       }
+       if (prev_valid) {
+               start = (unsigned long) PAGE_ALIGN(prev.start);
+               end = (unsigned long) (prev.end & PAGE_MASK);
+               if (end > start)
+                       (*callback) (start, end, arg);
+       }
+}
+
+void __init efi_init(void)
+{
+       efi_config_table_t *config_tables;
+       efi_runtime_services_t *runtime;
+       efi_char16_t *c16;
+       char vendor[100] = "unknown";
+       unsigned long num_config_tables;
+       int i = 0;
+
+       memset(&efi, 0, sizeof(efi) );
+       memset(&efi_phys, 0, sizeof(efi_phys));
+
+       efi_phys.systab = EFI_SYSTAB;
+       memmap.phys_map = EFI_MEMMAP;
+       memmap.nr_map = EFI_MEMMAP_SIZE/EFI_MEMDESC_SIZE;
+       memmap.desc_version = EFI_MEMDESC_VERSION;
+
+       efi.systab = (efi_system_table_t *)
+               boot_ioremap((unsigned long) efi_phys.systab,
+                       sizeof(efi_system_table_t));
+       /*
+        * Verify the EFI Table
+        */
+       if (efi.systab == NULL)
+               printk(KERN_ERR PFX "Woah! Couldn't map the EFI system table.\n");
+       if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE)
+               printk(KERN_ERR PFX "Woah! EFI system table signature incorrect\n");
+       if ((efi.systab->hdr.revision ^ EFI_SYSTEM_TABLE_REVISION) >> 16 != 0)
+               printk(KERN_ERR PFX
+                      "Warning: EFI system table major version mismatch: "
+                      "got %d.%02d, expected %d.%02d\n",
+                      efi.systab->hdr.revision >> 16,
+                      efi.systab->hdr.revision & 0xffff,
+                      EFI_SYSTEM_TABLE_REVISION >> 16,
+                      EFI_SYSTEM_TABLE_REVISION & 0xffff);
+       /*
+        * Grab some details from the system table
+        */
+       num_config_tables = efi.systab->nr_tables;
+       config_tables = (efi_config_table_t *)efi.systab->tables;
+       runtime = efi.systab->runtime;
+
+       /*
+        * Show what we know for posterity
+        */
+       c16 = (efi_char16_t *) boot_ioremap(efi.systab->fw_vendor, 2);
+       if (c16) {
+               for (i = 0; i < sizeof(vendor) && *c16; ++i)
+                       vendor[i] = *c16++;
+               vendor[i] = '\0';
+       } else
+               printk(KERN_ERR PFX "Could not map the firmware vendor!\n");
+
+       printk(KERN_INFO PFX "EFI v%u.%.02u by %s \n",
+              efi.systab->hdr.revision >> 16,
+              efi.systab->hdr.revision & 0xffff, vendor);
+
+       /*
+        * Let's see what config tables the firmware passed to us.
+        */
+       config_tables = (efi_config_table_t *)
+                               boot_ioremap((unsigned long) config_tables,
+                               num_config_tables * sizeof(efi_config_table_t));
+
+       if (config_tables == NULL)
+               printk(KERN_ERR PFX "Could not map EFI Configuration Table!\n");
+
+       for (i = 0; i < num_config_tables; i++) {
+               if (efi_guidcmp(config_tables[i].guid, MPS_TABLE_GUID) == 0) {
+                       efi.mps = (void *)config_tables[i].table;
+                       printk(KERN_INFO " MPS=0x%lx ", config_tables[i].table);
+               } else
+                   if (efi_guidcmp(config_tables[i].guid, ACPI_20_TABLE_GUID) == 0) {
+                       efi.acpi20 = __va(config_tables[i].table);
+                       printk(KERN_INFO " ACPI 2.0=0x%lx ", config_tables[i].table);
+               } else
+                   if (efi_guidcmp(config_tables[i].guid, ACPI_TABLE_GUID) == 0) {
+                       efi.acpi = __va(config_tables[i].table);
+                       printk(KERN_INFO " ACPI=0x%lx ", config_tables[i].table);
+               } else
+                   if (efi_guidcmp(config_tables[i].guid, SMBIOS_TABLE_GUID) == 0) {
+                       efi.smbios = (void *) config_tables[i].table;
+                       printk(KERN_INFO " SMBIOS=0x%lx ", config_tables[i].table);
+               } else
+                   if (efi_guidcmp(config_tables[i].guid, HCDP_TABLE_GUID) == 0) {
+                       efi.hcdp = (void *)config_tables[i].table;
+                       printk(KERN_INFO " HCDP=0x%lx ", config_tables[i].table);
+               } else
+                   if (efi_guidcmp(config_tables[i].guid, UGA_IO_PROTOCOL_GUID) == 0) {
+                       efi.uga = (void *)config_tables[i].table;
+                       printk(KERN_INFO " UGA=0x%lx ", config_tables[i].table);
+               }
+       }
+       printk("\n");
+
+       /*
+        * Check out the runtime services table. We need to map
+        * the runtime services table so that we can grab the physical
+        * address of several of the EFI runtime functions, needed to
+        * set the firmware into virtual mode.
+        */
+
+       runtime = (efi_runtime_services_t *) boot_ioremap((unsigned long)
+                                               runtime,
+                                               sizeof(efi_runtime_services_t));
+       if (runtime != NULL) {
+               /*
+                * We will only need *early* access to the following
+                * two EFI runtime services before set_virtual_address_map
+                * is invoked.
+                */
+               efi_phys.get_time = (efi_get_time_t *) runtime->get_time;
+               efi_phys.set_virtual_address_map =
+                       (efi_set_virtual_address_map_t *)
+                               runtime->set_virtual_address_map;
+       } else
+               printk(KERN_ERR PFX "Could not map the runtime service table!\n");
+
+       /* Map the EFI memory map for use until paging_init() */
+
+       memmap.map = (efi_memory_desc_t *)
+               boot_ioremap((unsigned long) EFI_MEMMAP, EFI_MEMMAP_SIZE);
+
+       if (memmap.map == NULL)
+               printk(KERN_ERR PFX "Could not map the EFI memory map!\n");
+
+       if (EFI_MEMDESC_SIZE != sizeof(efi_memory_desc_t)) {
+               printk(KERN_WARNING PFX "Warning! Kernel-defined memdesc doesn't "
+                          "match the one from EFI!\n");
+       }
+#if EFI_DEBUG
+       print_efi_memmap();
+#endif
+}
+
+/*
+ * This function will switch the EFI runtime services to virtual mode.
+ * Essentially, look through the EFI memmap and map every region that
+ * has the runtime attribute bit set in its memory descriptor and update
+ * that memory descriptor with the virtual address obtained from ioremap().
+ * This enables the runtime services to be called without having to
+ * thunk back into physical mode for every invocation.
+ */
+
+void __init efi_enter_virtual_mode(void)
+{
+       efi_memory_desc_t *md;
+       efi_status_t status;
+       int i;
+
+       efi.systab = NULL;
+
+       for (i = 0; i < memmap.nr_map; i++) {
+               md = &memmap.map[i];
+
+               if (md->attribute & EFI_MEMORY_RUNTIME) {
+                       md->virt_addr =
+                               (unsigned long)ioremap(md->phys_addr,
+                                       md->num_pages << EFI_PAGE_SHIFT);
+                       if (!(unsigned long)md->virt_addr) {
+                               printk(KERN_ERR PFX "ioremap of 0x%lX failed\n",
+                                       (unsigned long)md->phys_addr);
+                       }
+
+                       if (((unsigned long)md->phys_addr <=
+                                       (unsigned long)efi_phys.systab) &&
+                               ((unsigned long)efi_phys.systab <
+                                       md->phys_addr +
+                                       ((unsigned long)md->num_pages <<
+                                               EFI_PAGE_SHIFT))) {
+                               unsigned long addr;
+
+                               addr = md->virt_addr - md->phys_addr +
+                                               (unsigned long)efi_phys.systab;
+                               efi.systab = (efi_system_table_t *)addr;
+                       }
+               }
+       }
+
+       if (!efi.systab)
+               BUG();
+
+       status = phys_efi_set_virtual_address_map(
+                       sizeof(efi_memory_desc_t) * memmap.nr_map,
+                       sizeof(efi_memory_desc_t),
+                       memmap.desc_version,
+                       memmap.phys_map);
+
+       if (status != EFI_SUCCESS) {
+               printk (KERN_ALERT "You are screwed! "
+                       "Unable to switch EFI into virtual mode "
+                       "(status=%lx)\n", status);
+               panic("EFI call to SetVirtualAddressMap() failed!");
+       }
+
+       /*
+        * Now that EFI is in virtual mode, update the function
+        * pointers in the runtime service table to the new virtual addresses.
+        */
+
+       efi.get_time = (efi_get_time_t *) efi.systab->runtime->get_time;
+       efi.set_time = (efi_set_time_t *) efi.systab->runtime->set_time;
+       efi.get_wakeup_time = (efi_get_wakeup_time_t *)
+                                       efi.systab->runtime->get_wakeup_time;
+       efi.set_wakeup_time = (efi_set_wakeup_time_t *)
+                                       efi.systab->runtime->set_wakeup_time;
+       efi.get_variable = (efi_get_variable_t *)
+                                       efi.systab->runtime->get_variable;
+       efi.get_next_variable = (efi_get_next_variable_t *)
+                                       efi.systab->runtime->get_next_variable;
+       efi.set_variable = (efi_set_variable_t *)
+                                       efi.systab->runtime->set_variable;
+       efi.get_next_high_mono_count = (efi_get_next_high_mono_count_t *)
+                                       efi.systab->runtime->get_next_high_mono_count;
+       efi.reset_system = (efi_reset_system_t *)
+                                       efi.systab->runtime->reset_system;
+}
+
+void __init
+efi_initialize_iomem_resources(struct resource *code_resource,
+                              struct resource *data_resource)
+{
+       struct resource *res;
+       efi_memory_desc_t *md;
+       int i;
+
+       for (i = 0; i < memmap.nr_map; i++) {
+               md = &memmap.map[i];
+
+               if ((md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) >
+                   0x100000000ULL)
+                       continue;
+               res = alloc_bootmem_low(sizeof(struct resource));
+               switch (md->type) {
+               case EFI_RESERVED_TYPE:
+                       res->name = "Reserved Memory";
+                       break;
+               case EFI_LOADER_CODE:
+                       res->name = "Loader Code";
+                       break;
+               case EFI_LOADER_DATA:
+                       res->name = "Loader Data";
+                       break;
+               case EFI_BOOT_SERVICES_DATA:
+                       res->name = "BootServices Data";
+                       break;
+               case EFI_BOOT_SERVICES_CODE:
+                       res->name = "BootServices Code";
+                       break;
+               case EFI_RUNTIME_SERVICES_CODE:
+                       res->name = "Runtime Service Code";
+                       break;
+               case EFI_RUNTIME_SERVICES_DATA:
+                       res->name = "Runtime Service Data";
+                       break;
+               case EFI_CONVENTIONAL_MEMORY:
+                       res->name = "Conventional Memory";
+                       break;
+               case EFI_UNUSABLE_MEMORY:
+                       res->name = "Unusable Memory";
+                       break;
+               case EFI_ACPI_RECLAIM_MEMORY:
+                       res->name = "ACPI Reclaim";
+                       break;
+               case EFI_ACPI_MEMORY_NVS:
+                       res->name = "ACPI NVS";
+                       break;
+               case EFI_MEMORY_MAPPED_IO:
+                       res->name = "Memory Mapped IO";
+                       break;
+               case EFI_MEMORY_MAPPED_IO_PORT_SPACE:
+                       res->name = "Memory Mapped IO Port Space";
+                       break;
+               default:
+                       res->name = "Reserved";
+                       break;
+               }
+               res->start = md->phys_addr;
+               res->end = res->start + ((md->num_pages << EFI_PAGE_SHIFT) - 1);
+               res->flags = IORESOURCE_MEM | IORESOURCE_BUSY;
+               if (request_resource(&iomem_resource, res) < 0)
+                       printk(KERN_ERR PFX "Failed to allocate res %s : 0x%lx-0x%lx\n",
+                               res->name, res->start, res->end);
+               /*
+                * We don't know which region contains kernel data so we try
+                * it repeatedly and let the resource manager test it.
+                */
+               if (md->type == EFI_CONVENTIONAL_MEMORY) {
+                       request_resource(res, code_resource);
+                       request_resource(res, data_resource);
+               }
+       }
+}
+
+/*
+ * Convenience functions to obtain memory types and attributes
+ */
+
+u32 efi_mem_type(unsigned long phys_addr)
+{
+       efi_memory_desc_t *md;
+       int i;
+
+       for (i = 0; i < memmap.nr_map; i++) {
+               md = &memmap.map[i];
+               if ((md->phys_addr <= phys_addr) && (phys_addr <
+                       (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) ))
+                       return md->type;
+       }
+       return 0;
+}
+
+u64 efi_mem_attributes(unsigned long phys_addr)
+{
+       efi_memory_desc_t *md;
+       int i;
+
+       for (i = 0; i < memmap.nr_map; i++) {
+               md = &memmap.map[i];
+               if ((md->phys_addr <= phys_addr) && (phys_addr <
+                       (md->phys_addr + (md-> num_pages << EFI_PAGE_SHIFT)) ))
+                       return md->attribute;
+       }
+       return 0;
+}
diff --git a/arch/i386/kernel/efi_stub.S b/arch/i386/kernel/efi_stub.S
new file mode 100644 (file)
index 0000000..08c0312
--- /dev/null
@@ -0,0 +1,124 @@
+/*
+ * EFI call stub for IA32.
+ *
+ * This stub allows us to make EFI calls in physical mode with interrupts
+ * turned off.
+ */
+
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+
+/*
+ * efi_call_phys(void *, ...) is a function with variable parameters.
+ * All the callers of this function assure that all the parameters are 4-bytes.
+ */
+
+/*
+ * In gcc calling convention, EBX, ESP, EBP, ESI and EDI are all callee save.
+ * So we'd better save all of them at the beginning of this function and restore
+ * at the end no matter how many we use, because we can not assure EFI runtime
+ * service functions will comply with gcc calling convention, too.
+ */
+
+.text
+ENTRY(efi_call_phys)
+       /*
+        * 0. The function can only be called in Linux kernel. So CS has been
+        * set to 0x0010, DS and SS have been set to 0x0018. In EFI, I found
+        * the values of these registers are the same. And, the corresponding
+        * GDT entries are identical. So I will do nothing about segment reg
+        * and GDT, but change GDT base register in prelog and epilog.
+        */
+
+       /*
+        * 1. Now I am running with EIP = <physical address> + PAGE_OFFSET.
+        * But to make it smoothly switch from virtual mode to flat mode.
+        * The mapping of lower virtual memory has been created in prelog and
+        * epilog.
+        */
+       movl    $1f, %edx
+       subl    $__PAGE_OFFSET, %edx
+       jmp     *%edx
+1:
+
+       /*
+        * 2. Now on the top of stack is the return
+        * address in the caller of efi_call_phys(), then parameter 1,
+        * parameter 2, ..., param n. To make things easy, we save the return
+        * address of efi_call_phys in a global variable.
+        */
+       popl    %edx
+       movl    %edx, saved_return_addr
+       /* get the function pointer into ECX*/
+       popl    %ecx
+       movl    %ecx, efi_rt_function_ptr
+       movl    $2f, %edx
+       subl    $__PAGE_OFFSET, %edx
+       pushl   %edx
+
+       /*
+        * 3. Clear PG bit in %CR0.
+        */
+       movl    %cr0, %edx
+       andl    $0x7fffffff, %edx
+       movl    %edx, %cr0
+       jmp     1f
+1:
+
+       /*
+        * 4. Adjust stack pointer.
+        */
+       subl    $__PAGE_OFFSET, %esp
+
+       /*
+        * 5. Call the physical function.
+        */
+       jmp     *%ecx
+
+2:
+       /*
+        * 6. After EFI runtime service returns, control will return to
+        * following instruction. We'd better readjust stack pointer first.
+        */
+       addl    $__PAGE_OFFSET, %esp
+
+       /*
+        * 7. Restore PG bit
+        */
+       movl    %cr0, %edx
+       orl     $0x80000000, %edx
+       movl    %edx, %cr0
+       jmp     1f
+1:
+       /*
+        * 8. Now restore the virtual mode from flat mode by
+        * adding EIP with PAGE_OFFSET.
+        */
+       movl    $1f, %edx
+       jmp     *%edx
+1:
+
+       /*
+        * 9. Balance the stack. And because EAX contain the return value,
+        * we'd better not clobber it.
+        */
+       leal    efi_rt_function_ptr, %edx
+       movl    (%edx), %ecx
+       pushl   %ecx
+
+       /*
+        * 10. Push the saved return address onto the stack and return.
+        */
+       leal    saved_return_addr, %edx
+       movl    (%edx), %ecx
+       pushl   %ecx
+       ret
+.previous
+
+.data
+saved_return_addr:
+       .long 0
+efi_rt_function_ptr:
+       .long 0
index bc12687..04c8bd8 100644 (file)
@@ -419,8 +419,10 @@ void __init init_IRQ(void)
         * us. (some of these will be overridden and become
         * 'special' SMP interrupts)
         */
-       for (i = 0; i < NR_IRQS; i++) {
+       for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
                int vector = FIRST_EXTERNAL_VECTOR + i;
+               if (i >= NR_IRQS)
+                       break;
                if (vector != SYSCALL_VECTOR) 
                        set_intr_gate(vector, interrupt[i]);
        }
index 2907f82..ce291af 100644 (file)
@@ -76,6 +76,14 @@ static struct irq_pin_list {
        int apic, pin, next;
 } irq_2_pin[PIN_MAP_SIZE];
 
+#ifdef CONFIG_PCI_USE_VECTOR
+int vector_irq[NR_IRQS] = { [0 ... NR_IRQS -1] = -1};
+#define vector_to_irq(vector)  \
+       (platform_legacy_irq(vector) ? vector : vector_irq[vector])
+#else
+#define vector_to_irq(vector)  (vector)
+#endif
+
 /*
  * The common case is 1:1 IRQ<->pin mappings. Sometimes there are
  * shared ISA-space IRQs, so we have to support them. We are super
@@ -249,7 +257,7 @@ static void clear_IO_APIC (void)
                        clear_IO_APIC_pin(apic, pin);
 }
 
-static void set_ioapic_affinity(unsigned int irq, cpumask_t cpumask)
+static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t cpumask)
 {
        unsigned long flags;
        int pin;
@@ -288,7 +296,7 @@ static void set_ioapic_affinity(unsigned int irq, cpumask_t cpumask)
 
 extern cpumask_t irq_affinity[NR_IRQS];
 
-static cpumask_t __cacheline_aligned pending_irq_balance_cpumask[NR_IRQS];
+cpumask_t __cacheline_aligned pending_irq_balance_cpumask[NR_IRQS];
 
 #define IRQBALANCE_CHECK_ARCH -999
 static int irqbalance_disabled = IRQBALANCE_CHECK_ARCH;
@@ -670,13 +678,11 @@ static int __init irqbalance_disable(char *str)
 
 __setup("noirqbalance", irqbalance_disable);
 
-static void set_ioapic_affinity(unsigned int irq, cpumask_t mask);
-
 static inline void move_irq(int irq)
 {
        /* note - we hold the desc->lock */
        if (unlikely(!cpus_empty(pending_irq_balance_cpumask[irq]))) {
-               set_ioapic_affinity(irq, pending_irq_balance_cpumask[irq]);
+               set_ioapic_affinity_irq(irq, pending_irq_balance_cpumask[irq]);
                cpus_clear(pending_irq_balance_cpumask[irq]);
        }
 }
@@ -853,7 +859,7 @@ void __init setup_ioapic_dest(cpumask_t mask)
                        if (irq_entry == -1)
                                continue;
                        irq = pin_2_irq(irq_entry, ioapic, pin);
-                       set_ioapic_affinity(irq, mask);
+                       set_ioapic_affinity_irq(irq, mask);
                }
 
        }
@@ -1141,7 +1147,8 @@ static inline int IO_APIC_irq_trigger(int irq)
 /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
 u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
 
-static int __init assign_irq_vector(int irq)
+#ifndef CONFIG_PCI_USE_VECTOR
+int __init assign_irq_vector(int irq)
 {
        static int current_vector = FIRST_DEVICE_VECTOR, offset = 0;
        BUG_ON(irq >= NR_IRQ_VECTORS);
@@ -1158,11 +1165,36 @@ next:
        }
 
        IO_APIC_VECTOR(irq) = current_vector;
+
        return current_vector;
 }
+#endif
+
+static struct hw_interrupt_type ioapic_level_type;
+static struct hw_interrupt_type ioapic_edge_type;
 
-static struct hw_interrupt_type ioapic_level_irq_type;
-static struct hw_interrupt_type ioapic_edge_irq_type;
+#define IOAPIC_AUTO    -1
+#define IOAPIC_EDGE    0
+#define IOAPIC_LEVEL   1
+
+static inline void ioapic_register_intr(int irq, int vector, unsigned long trigger)
+{
+       if (use_pci_vector() && !platform_legacy_irq(irq)) {
+               if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
+                               trigger == IOAPIC_LEVEL)
+                       irq_desc[vector].handler = &ioapic_level_type;
+               else
+                       irq_desc[vector].handler = &ioapic_edge_type;
+               set_intr_gate(vector, interrupt[vector]);
+       } else  {
+               if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
+                               trigger == IOAPIC_LEVEL)
+                       irq_desc[irq].handler = &ioapic_level_type;
+               else
+                       irq_desc[irq].handler = &ioapic_edge_type;
+               set_intr_gate(vector, interrupt[irq]);
+       }
+}
 
 void __init setup_IO_APIC_irqs(void)
 {
@@ -1220,13 +1252,7 @@ void __init setup_IO_APIC_irqs(void)
                if (IO_APIC_IRQ(irq)) {
                        vector = assign_irq_vector(irq);
                        entry.vector = vector;
-
-                       if (IO_APIC_irq_trigger(irq))
-                               irq_desc[irq].handler = &ioapic_level_irq_type;
-                       else
-                               irq_desc[irq].handler = &ioapic_edge_irq_type;
-
-                       set_intr_gate(vector, interrupt[irq]);
+                       ioapic_register_intr(irq, vector, IOAPIC_AUTO);
                
                        if (!apic && (irq < 16))
                                disable_8259A_irq(irq);
@@ -1273,7 +1299,7 @@ void __init setup_ExtINT_IRQ0_pin(unsigned int pin, int vector)
         * The timer IRQ doesn't have to know that behind the
         * scene we have a 8259A-master in AEOI mode ...
         */
-       irq_desc[0].handler = &ioapic_edge_irq_type;
+       irq_desc[0].handler = &ioapic_edge_type;
 
        /*
         * Add it to the IO-APIC irq-routing table:
@@ -1763,9 +1789,6 @@ static int __init timer_irq_works(void)
  * that was delayed but this is now handled in the device
  * independent code.
  */
-#define enable_edge_ioapic_irq unmask_IO_APIC_irq
-
-static void disable_edge_ioapic_irq (unsigned int irq) { /* nothing */ }
 
 /*
  * Starting up a edge-triggered IO-APIC interrupt is
@@ -1776,7 +1799,6 @@ static void disable_edge_ioapic_irq (unsigned int irq) { /* nothing */ }
  * This is not complete - we should be able to fake
  * an edge even if it isn't on the 8259A...
  */
-
 static unsigned int startup_edge_ioapic_irq(unsigned int irq)
 {
        int was_pending = 0;
@@ -1794,8 +1816,6 @@ static unsigned int startup_edge_ioapic_irq(unsigned int irq)
        return was_pending;
 }
 
-#define shutdown_edge_ioapic_irq       disable_edge_ioapic_irq
-
 /*
  * Once we have recorded IRQ_PENDING already, we can mask the
  * interrupt for real. This prevents IRQ storms from unhandled
@@ -1810,9 +1830,6 @@ static void ack_edge_ioapic_irq(unsigned int irq)
        ack_APIC_irq();
 }
 
-static void end_edge_ioapic_irq (unsigned int i) { /* nothing */ }
-
-
 /*
  * Level triggered interrupts can just be masked,
  * and shutting down and starting up the interrupt
@@ -1834,10 +1851,6 @@ static unsigned int startup_level_ioapic_irq (unsigned int irq)
        return 0; /* don't check for pending */
 }
 
-#define shutdown_level_ioapic_irq      mask_IO_APIC_irq
-#define enable_level_ioapic_irq                unmask_IO_APIC_irq
-#define disable_level_ioapic_irq       mask_IO_APIC_irq
-
 static void end_level_ioapic_irq (unsigned int irq)
 {
        unsigned long v;
@@ -1864,6 +1877,7 @@ static void end_level_ioapic_irq (unsigned int irq)
  * The idea is from Manfred Spraul.  --macro
  */
        i = IO_APIC_VECTOR(irq);
+
        v = apic_read(APIC_TMR + ((i & ~0x1f) >> 1));
 
        ack_APIC_irq();
@@ -1898,7 +1912,57 @@ static void end_level_ioapic_irq (unsigned int irq)
        }
 }
 
-static void mask_and_ack_level_ioapic_irq (unsigned int irq) { /* nothing */ }
+#ifdef CONFIG_PCI_USE_VECTOR
+static unsigned int startup_edge_ioapic_vector(unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       return startup_edge_ioapic_irq(irq);
+}
+
+static void ack_edge_ioapic_vector(unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       ack_edge_ioapic_irq(irq);
+}
+
+static unsigned int startup_level_ioapic_vector (unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       return startup_level_ioapic_irq (irq);
+}
+
+static void end_level_ioapic_vector (unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       end_level_ioapic_irq(irq);
+}
+
+static void mask_IO_APIC_vector (unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       mask_IO_APIC_irq(irq);
+}
+
+static void unmask_IO_APIC_vector (unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       unmask_IO_APIC_irq(irq);
+}
+
+static void set_ioapic_affinity_vector (unsigned int vector,
+                                       cpumask_t cpu_mask)
+{
+       int irq = vector_to_irq(vector);
+
+       set_ioapic_affinity_irq(irq, cpu_mask);
+}
+#endif
 
 /*
  * Level and edge triggered IO-APIC interrupts need different handling,
@@ -1908,26 +1972,25 @@ static void mask_and_ack_level_ioapic_irq (unsigned int irq) { /* nothing */ }
  * edge-triggered handler, without risking IRQ storms and other ugly
  * races.
  */
-
-static struct hw_interrupt_type ioapic_edge_irq_type = {
+static struct hw_interrupt_type ioapic_edge_type = {
        .typename       = "IO-APIC-edge",
-       .startup        = startup_edge_ioapic_irq,
-       .shutdown       = shutdown_edge_ioapic_irq,
-       .enable         = enable_edge_ioapic_irq,
-       .disable        = disable_edge_ioapic_irq,
-       .ack            = ack_edge_ioapic_irq,
-       .end            = end_edge_ioapic_irq,
+       .startup        = startup_edge_ioapic,
+       .shutdown       = shutdown_edge_ioapic,
+       .enable         = enable_edge_ioapic,
+       .disable        = disable_edge_ioapic,
+       .ack            = ack_edge_ioapic,
+       .end            = end_edge_ioapic,
        .set_affinity   = set_ioapic_affinity,
 };
 
-static struct hw_interrupt_type ioapic_level_irq_type = {
+static struct hw_interrupt_type ioapic_level_type = {
        .typename       = "IO-APIC-level",
-       .startup        = startup_level_ioapic_irq,
-       .shutdown       = shutdown_level_ioapic_irq,
-       .enable         = enable_level_ioapic_irq,
-       .disable        = disable_level_ioapic_irq,
-       .ack            = mask_and_ack_level_ioapic_irq,
-       .end            = end_level_ioapic_irq,
+       .startup        = startup_level_ioapic,
+       .shutdown       = shutdown_level_ioapic,
+       .enable         = enable_level_ioapic,
+       .disable        = disable_level_ioapic,
+       .ack            = mask_and_ack_level_ioapic,
+       .end            = end_level_ioapic,
        .set_affinity   = set_ioapic_affinity,
 };
 
@@ -1947,7 +2010,13 @@ static inline void init_IO_APIC_traps(void)
         * 0x80, because int 0x80 is hm, kind of importantish. ;)
         */
        for (irq = 0; irq < NR_IRQS ; irq++) {
-               if (IO_APIC_IRQ(irq) && !IO_APIC_VECTOR(irq)) {
+               int tmp = irq;
+               if (use_pci_vector()) {
+                       if (!platform_legacy_irq(tmp))
+                               if ((tmp = vector_to_irq(tmp)) == -1)
+                                       continue;
+               }
+               if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) {
                        /*
                         * Hmm.. We don't have an entry for this,
                         * so default to an old-fashioned 8259
@@ -2379,10 +2448,12 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
                "IRQ %d Mode:%i Active:%i)\n", ioapic, 
                mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq, edge_level, active_high_low);
 
+       if (use_pci_vector() && !platform_legacy_irq(irq))
+               irq = IO_APIC_VECTOR(irq);
        if (edge_level) {
-       irq_desc[irq].handler = &ioapic_level_irq_type;
+               irq_desc[irq].handler = &ioapic_level_type;
        } else {
-               irq_desc[irq].handler = &ioapic_edge_irq_type;
+               irq_desc[irq].handler = &ioapic_edge_type;
        }
 
        set_intr_gate(entry.vector, interrupt[irq]);
index ec718b1..7a8f178 100644 (file)
@@ -138,17 +138,19 @@ atomic_t irq_mis_count;
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, j;
+       int i = *(loff_t *) v, j;
        struct irqaction * action;
        unsigned long flags;
 
-       seq_printf(p, "           ");
-       for (j=0; j<NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "CPU%d       ",j);
-       seq_putc(p, '\n');
+       if (i == 0) {
+               seq_printf(p, "           ");
+               for (j=0; j<NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "CPU%d       ",j);
+               seq_putc(p, '\n');
+       }
 
-       for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                spin_lock_irqsave(&irq_desc[i].lock, flags);
                action = irq_desc[i].action;
                if (!action) 
@@ -170,28 +172,32 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
 skip:
                spin_unlock_irqrestore(&irq_desc[i].lock, flags);
-       }
-       seq_printf(p, "NMI: ");
-       for (j = 0; j < NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "%10u ", nmi_count(j));
-       seq_putc(p, '\n');
+       } else if (i == NR_IRQS) {
+               seq_printf(p, "NMI: ");
+               for (j = 0; j < NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "%10u ", nmi_count(j));
+               seq_putc(p, '\n');
 #ifdef CONFIG_X86_LOCAL_APIC
-       seq_printf(p, "LOC: ");
-       for (j = 0; j < NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "%10u ", irq_stat[j].apic_timer_irqs);
-       seq_putc(p, '\n');
+               seq_printf(p, "LOC: ");
+               for (j = 0; j < NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "%10u ", irq_stat[j].apic_timer_irqs);
+               seq_putc(p, '\n');
 #endif
-       seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
+               seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
 #ifdef CONFIG_X86_IO_APIC
 #ifdef APIC_MISMATCH_DEBUG
-       seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
+               seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
 #endif
 #endif
+       }
        return 0;
 }
 
+
+
+
 #ifdef CONFIG_SMP
 inline void synchronize_irq(unsigned int irq)
 {
@@ -505,6 +511,20 @@ out:
        return 1;
 }
 
+int can_request_irq(unsigned int irq, unsigned long irqflags)
+{
+       struct irqaction *action;
+
+       if (irq >= NR_IRQS)
+               return 0;
+       action = irq_desc[irq].action;
+       if (action) {
+               if (irqflags & action->flags & SA_SHIRQ)
+                       action = NULL;
+       }
+       return !action;
+}
+
 /**
  *     request_irq - allocate an interrupt line
  *     @irq: Interrupt line to allocate
@@ -898,48 +918,6 @@ int setup_irq(unsigned int irq, struct irqaction * new)
 static struct proc_dir_entry * root_irq_dir;
 static struct proc_dir_entry * irq_dir [NR_IRQS];
 
-#define HEX_DIGITS (2*sizeof(cpumask_t))
-
-static unsigned int parse_hex_value(const char __user *buffer,
-               unsigned long count, cpumask_t *ret)
-{
-       unsigned char hexnum[HEX_DIGITS];
-       cpumask_t value = CPU_MASK_NONE;
-       int i;
-
-       if (!count)
-               return -EINVAL;
-       if (count > HEX_DIGITS)
-               count = HEX_DIGITS;
-       if (copy_from_user(hexnum, buffer, count))
-               return -EFAULT;
-
-       /*
-        * Parse the first HEX_DIGITS characters as a hex string, any non-hex char
-        * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
-        */
-
-       for (i = 0; i < count; i++) {
-               unsigned int c = hexnum[i];
-               int k;
-
-               switch (c) {
-                       case '0' ... '9': c -= '0'; break;
-                       case 'a' ... 'f': c -= 'a'-10; break;
-                       case 'A' ... 'F': c -= 'A'-10; break;
-               default:
-                       goto out;
-               }
-               cpus_shift_left(value, value, 4);
-               for (k = 0; k < 4; ++k)
-                       if (test_bit(k, (unsigned long *)&c))
-                               cpu_set(k, value);
-       }
-out:
-       *ret = value;
-       return 0;
-}
-
 #ifdef CONFIG_SMP
 
 static struct proc_dir_entry *smp_affinity_entry[NR_IRQS];
@@ -949,20 +927,10 @@ cpumask_t irq_affinity[NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
 static int irq_affinity_read_proc(char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       int k, len;
-       cpumask_t tmp = irq_affinity[(long)data];
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, irq_affinity[(long)data]);
+       if (count - len < 2)
                return -EINVAL;
-
-       len = 0;
-       for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(page, "%04hx", (u16)cpus_coerce(tmp));
-               len += j;
-               page += j;
-               cpus_shift_right(tmp, tmp, 16);
-       }
-       len += sprintf(page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
@@ -975,7 +943,7 @@ static int irq_affinity_write_proc(struct file *file, const char __user *buffer,
        if (!irq_desc[irq].handler->set_affinity)
                return -EIO;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
        if (err)
                return err;
 
@@ -1000,10 +968,11 @@ static int irq_affinity_write_proc(struct file *file, const char __user *buffer,
 static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       unsigned long *mask = (unsigned long *) data;
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, *(cpumask_t *)data);
+       if (count - len < 2)
                return -EINVAL;
-       return sprintf (page, "%08lx\n", *mask);
+       len += sprintf(page + len, "\n");
+       return len;
 }
 
 static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffer,
@@ -1013,7 +982,7 @@ static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffe
        unsigned long full_count = count, err;
        cpumask_t new_value;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
        if (err)
                return err;
 
index 324de83..e8258ad 100644 (file)
@@ -53,11 +53,6 @@ int module_frob_arch_sections(Elf_Ehdr *hdr,
        return 0;
 }
 
-#ifndef R_386_32
-# define R_386_32        1
-# define R_386_PC32      2
-#endif
-
 int apply_relocate(Elf32_Shdr *sechdrs,
                   const char *strtab,
                   unsigned int symindex,
@@ -115,7 +110,6 @@ int module_finalize(const Elf_Ehdr *hdr,
                    const Elf_Shdr *sechdrs,
                    struct module *me)
 {
-#ifndef __arch_um__
        const Elf_Shdr *s;
        char *secstrings = (void *)hdr + sechdrs[hdr->e_shstrndx].sh_offset;
 
@@ -128,7 +122,6 @@ int module_finalize(const Elf_Ehdr *hdr,
                apply_alternatives(seg, seg + s->sh_size); 
        }       
        return 0;
-#endif
 }
 
 void module_arch_cleanup(struct module *mod)
index 771a9f5..65299e8 100644 (file)
@@ -1147,15 +1147,19 @@ void __init mp_parse_prt (void)
                if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
                        printk(KERN_DEBUG "Pin %d-%d already programmed\n",
                                mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
-                       entry->irq = irq;
+                       if (use_pci_vector() && !platform_legacy_irq(irq))
+                               irq = IO_APIC_VECTOR(irq);
+                       entry->irq = irq;
                        continue;
                }
 
                mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
 
-               if (!io_apic_set_pci_routing(ioapic, ioapic_pin, irq, edge_level, active_high_low))
-                       entry->irq = irq;
-
+               if (!io_apic_set_pci_routing(ioapic, ioapic_pin, irq, edge_level, active_high_low)) {
+                       if (use_pci_vector() && !platform_legacy_irq(irq))
+                               irq = IO_APIC_VECTOR(irq);
+                       entry->irq = irq;
+               }
                printk(KERN_DEBUG "%02x:%02x:%02x[%c] -> %d-%d -> IRQ %d\n",
                        entry->id.segment, entry->id.bus, 
                        entry->id.device, ('A' + entry->pin), 
index b706916..6bb3b05 100644 (file)
@@ -507,7 +507,7 @@ struct task_struct * __switch_to(struct task_struct *prev_p, struct task_struct
        /*
         * Reload esp0, LDT and the page table pointer:
         */
-       load_esp0(tss, next->esp0);
+       load_esp0(tss, next);
 
        /*
         * Load the per-thread Thread-Local Storage descriptor.
index a87a866..c8936c4 100644 (file)
@@ -8,6 +8,7 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/mc146818rtc.h>
+#include <linux/efi.h>
 #include <asm/uaccess.h>
 #include <asm/apic.h>
 #include "mach_reboot.h"
@@ -263,7 +264,12 @@ void machine_restart(char * __unused)
        disable_IO_APIC();
 #endif
 
-       if(!reboot_thru_bios) {
+       if (!reboot_thru_bios) {
+               if (efi_enabled) {
+                       efi.reset_system(EFI_RESET_COLD, EFI_SUCCESS, 0, 0);
+                       __asm__ __volatile__("lidt %0": :"m" (no_idt));
+                       __asm__ __volatile__("int3");
+               }
                /* rebooting needs to touch the page at absolute addr 0 */
                *((unsigned short *)__va(0x472)) = reboot_mode;
                for (;;) {
@@ -273,6 +279,8 @@ void machine_restart(char * __unused)
                        __asm__ __volatile__("int3");
                }
        }
+       if (efi_enabled)
+               efi.reset_system(EFI_RESET_WARM, EFI_SUCCESS, 0, 0);
 
        machine_real_restart(jump_to_bios, sizeof(jump_to_bios));
 }
@@ -287,6 +295,8 @@ EXPORT_SYMBOL(machine_halt);
 
 void machine_power_off(void)
 {
+       if (efi_enabled)
+               efi.reset_system(EFI_RESET_SHUTDOWN, EFI_SUCCESS, 0, 0);
        if (pm_power_off)
                pm_power_off();
 }
index 6782565..0a36bea 100644 (file)
@@ -36,6 +36,8 @@
 #include <linux/root_dev.h>
 #include <linux/highmem.h>
 #include <linux/module.h>
+#include <linux/efi.h>
+#include <linux/init.h>
 #include <video/edid.h>
 #include <asm/e820.h>
 #include <asm/mpspec.h>
@@ -56,6 +58,10 @@ static inline char * __init machine_specific_memory_setup(void);
  * Machine setup..
  */
 
+#ifdef CONFIG_EFI
+int efi_enabled = 0;
+#endif
+
 /* cpu data as detected by the assembly code in head.S */
 struct cpuinfo_x86 new_cpu_data __initdata = { 0, 0, 0, 0, -1, 1, 0, 0, -1 };
 /* common cpu data for all cpus */
@@ -144,6 +150,20 @@ static void __init limit_regions(unsigned long long size)
        unsigned long long current_addr = 0;
        int i;
 
+       if (efi_enabled) {
+               for (i = 0; i < memmap.nr_map; i++) {
+                       current_addr = memmap.map[i].phys_addr +
+                                      (memmap.map[i].num_pages << 12);
+                       if (memmap.map[i].type == EFI_CONVENTIONAL_MEMORY) {
+                               if (current_addr >= size) {
+                                       memmap.map[i].num_pages -=
+                                               (((current_addr-size) + PAGE_SIZE-1) >> PAGE_SHIFT);
+                                       memmap.nr_map = i + 1;
+                                       return;
+                               }
+                       }
+               }
+       }
        for (i = 0; i < e820.nr_map; i++) {
                if (e820.map[i].type == E820_RAM) {
                        current_addr = e820.map[i].addr + e820.map[i].size;
@@ -159,17 +179,21 @@ static void __init limit_regions(unsigned long long size)
 static void __init add_memory_region(unsigned long long start,
                                   unsigned long long size, int type)
 {
-       int x = e820.nr_map;
+       int x;
 
-       if (x == E820MAX) {
-           printk(KERN_ERR "Ooops! Too many entries in the memory map!\n");
-           return;
-       }
+       if (!efi_enabled) {
+                       x = e820.nr_map;
 
-       e820.map[x].addr = start;
-       e820.map[x].size = size;
-       e820.map[x].type = type;
-       e820.nr_map++;
+               if (x == E820MAX) {
+                   printk(KERN_ERR "Ooops! Too many entries in the memory map!\n");
+                   return;
+               }
+
+               e820.map[x].addr = start;
+               e820.map[x].size = size;
+               e820.map[x].type = type;
+               e820.nr_map++;
+       }
 } /* add_memory_region */
 
 #define E820_DEBUG     1
@@ -446,7 +470,6 @@ static inline void copy_edd(void)
 static void __init setup_memory_region(void)
 {
        char *who = machine_specific_memory_setup();
-
        printk(KERN_INFO "BIOS-provided physical RAM map:\n");
        print_memory_map(who);
 } /* setup_memory_region */
@@ -584,6 +607,23 @@ static void __init parse_cmdline_early (char ** cmdline_p)
 }
 
 /*
+ * Callback for efi_memory_walk.
+ */
+static int __init
+efi_find_max_pfn(unsigned long start, unsigned long end, void *arg)
+{
+       unsigned long *max_pfn = arg, pfn;
+
+       if (start < end) {
+               pfn = PFN_UP(end -1);
+               if (pfn > *max_pfn)
+                       *max_pfn = pfn;
+       }
+       return 0;
+}
+
+
+/*
  * Find the highest page frame number we have available
  */
 void __init find_max_pfn(void)
@@ -591,6 +631,11 @@ void __init find_max_pfn(void)
        int i;
 
        max_pfn = 0;
+       if (efi_enabled) {
+               efi_memmap_walk(efi_find_max_pfn, &max_pfn);
+               return;
+       }
+
        for (i = 0; i < e820.nr_map; i++) {
                unsigned long start, end;
                /* RAM? */
@@ -665,6 +710,25 @@ unsigned long __init find_max_low_pfn(void)
 }
 
 #ifndef CONFIG_DISCONTIGMEM
+
+/*
+ * Free all available memory for boot time allocation.  Used
+ * as a callback function by efi_memory_walk()
+ */
+
+static int __init
+free_available_memory(unsigned long start, unsigned long end, void *arg)
+{
+       /* check max_low_pfn */
+       if (start >= ((max_low_pfn + 1) << PAGE_SHIFT))
+               return 0;
+       if (end >= ((max_low_pfn + 1) << PAGE_SHIFT))
+               end = (max_low_pfn + 1) << PAGE_SHIFT;
+       if (start < end)
+               free_bootmem(start, end - start);
+
+       return 0;
+}
 /*
  * Register fully available low RAM pages with the bootmem allocator.
  */
@@ -672,6 +736,10 @@ static void __init register_bootmem_low_pages(unsigned long max_low_pfn)
 {
        int i;
 
+       if (efi_enabled) {
+               efi_memmap_walk(free_available_memory, NULL);
+               return;
+       }
        for (i = 0; i < e820.nr_map; i++) {
                unsigned long curr_pfn, last_pfn, size;
                /*
@@ -799,9 +867,9 @@ extern unsigned long setup_memory(void);
  * Request address space for all standard RAM and ROM resources
  * and also for regions reported as reserved by the e820.
  */
-static void __init register_memory(unsigned long max_low_pfn)
+static void __init
+legacy_init_iomem_resources(struct resource *code_resource, struct resource *data_resource)
 {
-       unsigned long low_mem_size;
        int i;
 
        probe_roms();
@@ -826,11 +894,26 @@ static void __init register_memory(unsigned long max_low_pfn)
                         *  so we try it repeatedly and let the resource manager
                         *  test it.
                         */
-                       request_resource(res, &code_resource);
-                       request_resource(res, &data_resource);
+                       request_resource(res, code_resource);
+                       request_resource(res, data_resource);
                }
        }
+}
 
+/*
+ * Request address space for all standard resources
+ */
+static void __init register_memory(unsigned long max_low_pfn)
+{
+       unsigned long low_mem_size;
+       int i;
+
+       if (efi_enabled)
+               efi_initialize_iomem_resources(&code_resource, &data_resource);
+       else
+               legacy_init_iomem_resources(&code_resource, &data_resource);
+
+        /* EFI systems may still have VGA */
        request_graphics_resource();
 
        /* request I/O space for devices used on all i[345]86 PCs */
@@ -950,6 +1033,13 @@ static int __init noreplacement_setup(char *s)
 
 __setup("noreplacement", noreplacement_setup); 
 
+/*
+ * Determine if we were loaded by an EFI loader.  If so, then we have also been
+ * passed the efi memmap, systab, etc., so we should use these data structures
+ * for initialization.  Note, the efi init code path is determined by the
+ * global efi_enabled. This allows the same kernel image to be used on existing
+ * systems (with a traditional BIOS) as well as on EFI systems.
+ */
 void __init setup_arch(char **cmdline_p)
 {
        unsigned long max_low_pfn;
@@ -958,6 +1048,18 @@ void __init setup_arch(char **cmdline_p)
        pre_setup_arch_hook();
        early_cpu_init();
 
+       /*
+        * FIXME: This isn't an official loader_type right
+        * now but does currently work with elilo.
+        * If we were configured as an EFI kernel, check to make
+        * sure that we were loaded correctly from elilo and that
+        * the system table is valid.  If not, then initialize normally.
+        */
+#ifdef CONFIG_EFI
+       if ((LOADER_TYPE == 0x50) && EFI_SYSTAB)
+               efi_enabled = 1;
+#endif
+
        ROOT_DEV = old_decode_dev(ORIG_ROOT_DEV);
        drive_info = DRIVE_INFO;
        screen_info = SCREEN_INFO;
@@ -979,7 +1081,11 @@ void __init setup_arch(char **cmdline_p)
        rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0);
 #endif
        ARCH_SETUP
-       setup_memory_region();
+       if (efi_enabled)
+               efi_init();
+       else
+               setup_memory_region();
+
        copy_edd();
 
        if (!MOUNT_ROOT_RDONLY)
@@ -1013,6 +1119,8 @@ void __init setup_arch(char **cmdline_p)
 #ifdef CONFIG_X86_GENERICARCH
        generic_apic_probe(*cmdline_p);
 #endif 
+       if (efi_enabled)
+               efi_map_memmap();
 
        /*
         * Parse the ACPI tables for possible boot-time SMP configuration.
@@ -1028,7 +1136,8 @@ void __init setup_arch(char **cmdline_p)
 
 #ifdef CONFIG_VT
 #if defined(CONFIG_VGA_CONSOLE)
-       conswitchp = &vga_con;
+       if (!efi_enabled || (efi_mem_type(0xa0000) != EFI_CONVENTIONAL_MEMORY))
+               conswitchp = &vga_con;
 #elif defined(CONFIG_DUMMY_CONSOLE)
        conswitchp = &dummy_con;
 #endif
index 8563135..d0e01a3 100644 (file)
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <asm/io.h>
-#include <mach_mpparse.h>
+#include <asm/mach-summit/mach_mpparse.h>
 
-#ifdef CONFIG_NUMA
-static void __init setup_pci_node_map_for_wpeg(int wpeg_num, struct rio_table_hdr *rth, 
-               struct scal_detail **scal_nodes, struct rio_detail **rio_nodes){
-       int twst_num = 0, node = 0, first_bus = 0;
-       int i, bus, num_busses;
+static struct rio_table_hdr *rio_table_hdr __initdata;
+static struct scal_detail   *scal_devs[MAX_NUMNODES] __initdata;
+static struct rio_detail    *rio_devs[MAX_NUMNODES*4] __initdata;
 
-       for(i = 0; i < rth->num_rio_dev; i++){
-               if (rio_nodes[i]->node_id == rio_nodes[wpeg_num]->owner_id){
-                       twst_num = rio_nodes[i]->owner_id;
+static int __init setup_pci_node_map_for_wpeg(int wpeg_num, int last_bus)
+{
+       int twister = 0, node = 0;
+       int i, bus, num_buses;
+
+       for(i = 0; i < rio_table_hdr->num_rio_dev; i++){
+               if (rio_devs[i]->node_id == rio_devs[wpeg_num]->owner_id){
+                       twister = rio_devs[i]->owner_id;
                        break;
                }
        }
-       if (i == rth->num_rio_dev){
-               printk("%s: Couldn't find owner Cyclone for Winnipeg!\n", __FUNCTION__);
-               return;
+       if (i == rio_table_hdr->num_rio_dev){
+               printk(KERN_ERR "%s: Couldn't find owner Cyclone for Winnipeg!\n", __FUNCTION__);
+               return last_bus;
        }
 
-       for(i = 0; i < rth->num_scal_dev; i++){
-               if (scal_nodes[i]->node_id == twst_num){
-                       node = scal_nodes[i]->node_id;
+       for(i = 0; i < rio_table_hdr->num_scal_dev; i++){
+               if (scal_devs[i]->node_id == twister){
+                       node = scal_devs[i]->node_id;
                        break;
                }
        }
-       if (i == rth->num_scal_dev){
-               printk("%s: Couldn't find owner Twister for Cyclone!\n", __FUNCTION__);
-               return;
+       if (i == rio_table_hdr->num_scal_dev){
+               printk(KERN_ERR "%s: Couldn't find owner Twister for Cyclone!\n", __FUNCTION__);
+               return last_bus;
        }
 
-       switch (rio_nodes[wpeg_num]->type){
+       switch (rio_devs[wpeg_num]->type){
        case CompatWPEG:
-               /* The Compatability Winnipeg controls the legacy busses
-                  (busses 0 & 1), the 66MHz PCI bus [2 slots] (bus 2), 
-                  and the "extra" busses in case a PCI-PCI bridge card is 
-                  used in either slot (busses 3 & 4): total 5 busses. */
-               num_busses = 5;
-               /* The BIOS numbers the busses starting at 1, and in a 
-                  slightly wierd manner.  You'll have to trust that 
-                  the math used below to determine the number of the 
-                  first bus works. */
-               first_bus = (rio_nodes[wpeg_num]->first_slot - 1) * 2;
+               /* The Compatability Winnipeg controls the 2 legacy buses,
+                * the 66MHz PCI bus [2 slots] and the 2 "extra" buses in case
+                * a PCI-PCI bridge card is used in either slot: total 5 buses.
+                */
+               num_buses = 5;
                break;
        case AltWPEG:
-               /* The Alternate/Secondary Winnipeg controls the 1st 133MHz 
-                  bus [1 slot] & its "extra" bus (busses 0 & 1), the 2nd 
-                  133MHz bus [1 slot] & its "extra" bus (busses 2 & 3), the 
-                  100MHz bus [2 slots] (bus 4), and the "extra" busses for 
-                  the 2 100MHz slots (busses 5 & 6): total 7 busses. */
-               num_busses = 7;
-               first_bus = (rio_nodes[wpeg_num]->first_slot * 2) - 1;
+               /* The Alternate Winnipeg controls the 2 133MHz buses [1 slot
+                * each], their 2 "extra" buses, the 100MHz bus [2 slots] and
+                * the "extra" buses for each of those slots: total 7 buses.
+                */
+               num_buses = 7;
                break;
        case LookOutAWPEG:
        case LookOutBWPEG:
-               printk("%s: LookOut Winnipegs not supported yet!\n", __FUNCTION__);
-               return;
+               /* A Lookout Winnipeg controls 3 100MHz buses [2 slots each]
+                * & the "extra" buses for each of those slots: total 9 buses.
+                */
+               num_buses = 9;
+               break;
        default:
-               printk("%s: Unsupported Winnipeg type!\n", __FUNCTION__);
-               return;
+               printk(KERN_INFO "%s: Unsupported Winnipeg type!\n", __FUNCTION__);
+               return last_bus;
        }
 
-       for(bus = first_bus; bus < first_bus + num_busses; bus++)
+       for(bus = last_bus; bus < last_bus + num_buses; bus++)
                mp_bus_id_to_node[bus] = node;
+       return bus;
 }
 
-static int __init build_detail_arrays(struct rio_table_hdr *rth,
-               struct scal_detail **sd, struct rio_detail **rd){
+static int __init build_detail_arrays(void)
+{
        unsigned long ptr;
        int i, scal_detail_size, rio_detail_size;
 
-       if ((rth->num_scal_dev > MAX_NUMNODES) ||
-           (rth->num_rio_dev > MAX_NUMNODES * 2)){
-               printk("%s: MAX_NUMNODES too low!  Defined as %d, but system has %d nodes.\n", __FUNCTION__, MAX_NUMNODES, rth->num_scal_dev);
-               return 1;
+       if (rio_table_hdr->num_scal_dev > MAX_NUMNODES){
+               printk(KERN_WARNING "%s: MAX_NUMNODES too low!  Defined as %d, but system has %d nodes.\n", __FUNCTION__, MAX_NUMNODES, rio_table_hdr->num_scal_dev);
+               return 0;
        }
 
-       switch (rth->version){
+       switch (rio_table_hdr->version){
        default:
-               printk("%s: Bad Rio Grande Table Version: %d\n", __FUNCTION__, rth->version);
-               return 1;
+               printk(KERN_WARNING "%s: Invalid Rio Grande Table Version: %d\n", __FUNCTION__, rio_table_hdr->version);
+               return 0;
        case 2:
                scal_detail_size = 11;
                rio_detail_size = 13;
@@ -119,32 +118,27 @@ static int __init build_detail_arrays(struct rio_table_hdr *rth,
                break;
        }
 
-       ptr = (unsigned long)rth + 3;
-       for(i = 0; i < rth->num_scal_dev; i++)
-               sd[i] = (struct scal_detail *)(ptr + (scal_detail_size * i));
+       ptr = (unsigned long)rio_table_hdr + 3;
+       for(i = 0; i < rio_table_hdr->num_scal_dev; i++, ptr += scal_detail_size)
+               scal_devs[i] = (struct scal_detail *)ptr;
 
-       ptr += scal_detail_size * rth->num_scal_dev;
-       for(i = 0; i < rth->num_rio_dev; i++)
-               rd[i] = (struct rio_detail *)(ptr + (rio_detail_size * i));
+       for(i = 0; i < rio_table_hdr->num_rio_dev; i++, ptr += rio_detail_size)
+               rio_devs[i] = (struct rio_detail *)ptr;
 
-       return 0;
+       return 1;
 }
 
 void __init setup_summit(void)
 {
-       struct rio_table_hdr    *rio_table_hdr = NULL;
-       struct scal_detail      *scal_devs[MAX_NUMNODES];
-       struct rio_detail       *rio_devs[MAX_NUMNODES*2];
        unsigned long           ptr;
        unsigned short          offset;
-       int                     i;
-
-       memset(mp_bus_id_to_node, -1, sizeof(mp_bus_id_to_node));
+       int                     i, next_wpeg, next_bus = 0;
 
        /* The pointer to the EBDA is stored in the word @ phys 0x40E(40:0E) */
        ptr = *(unsigned short *)phys_to_virt(0x40Eul);
        ptr = (unsigned long)phys_to_virt(ptr << 4);
 
+       rio_table_hdr = NULL;
        offset = 0x180;
        while (offset){
                /* The block id is stored in the 2nd word */
@@ -157,16 +151,30 @@ void __init setup_summit(void)
                offset = *((unsigned short *)(ptr + offset));
        }
        if (!rio_table_hdr){
-               printk("%s: Unable to locate Rio Grande Table in EBDA - bailing!\n", __FUNCTION__);
+               printk(KERN_ERR "%s: Unable to locate Rio Grande Table in EBDA - bailing!\n", __FUNCTION__);
                return;
        }
 
-       if (build_detail_arrays(rio_table_hdr, scal_devs, rio_devs))
+       if (!build_detail_arrays())
                return;
 
-       for(i = 0; i < rio_table_hdr->num_rio_dev; i++)
-               if (is_WPEG(rio_devs[i]->type))
-                       /* It's a Winnipeg, it's got PCI Busses */
-                       setup_pci_node_map_for_wpeg(i, rio_table_hdr, scal_devs, rio_devs);
+       /* The first Winnipeg we're looking for has an index of 0 */
+       next_wpeg = 0;
+       do {
+               for(i = 0; i < rio_table_hdr->num_rio_dev; i++){
+                       if (is_WPEG(rio_devs[i]) && rio_devs[i]->WP_index == next_wpeg){
+                               /* It's the Winnipeg we're looking for! */
+                               next_bus = setup_pci_node_map_for_wpeg(i, next_bus);
+                               next_wpeg++;
+                               break;
+                       }
+               }
+               /*
+                * If we go through all Rio devices and don't find one with
+                * the next index, it means we've found all the Winnipegs,
+                * and thus all the PCI buses.
+                */
+               if (i == rio_table_hdr->num_rio_dev)
+                       next_wpeg = 0;
+       } while (next_wpeg != 0);
 }
-#endif /* CONFIG_NUMA */
index 43c1c1c..65054ac 100644 (file)
@@ -44,6 +44,7 @@
 #include <linux/module.h>
 #include <linux/sysdev.h>
 #include <linux/bcd.h>
+#include <linux/efi.h>
 
 #include <asm/io.h>
 #include <asm/smp.h>
@@ -94,7 +95,7 @@ void do_gettimeofday(struct timeval *tv)
 {
        unsigned long seq;
        unsigned long usec, sec;
-       unsigned long max_ntp_tick = tick_usec - tickadj;
+       unsigned long max_ntp_tick;
 
        do {
                unsigned long lost;
@@ -110,13 +111,14 @@ void do_gettimeofday(struct timeval *tv)
                 * Better to lose some accuracy than have time go backwards..
                 */
                if (unlikely(time_adjust < 0)) {
+                       max_ntp_tick = (USEC_PER_SEC / HZ) - tickadj;
                        usec = min(usec, max_ntp_tick);
 
                        if (lost)
                                usec += lost * max_ntp_tick;
                }
                else if (unlikely(lost))
-                       usec += lost * tick_usec;
+                       usec += lost * (USEC_PER_SEC / HZ);
 
                sec = xtime.tv_sec;
                usec += (xtime.tv_nsec / 1000);
@@ -174,7 +176,10 @@ static int set_rtc_mmss(unsigned long nowtime)
 
        /* gets recalled with irq locally disabled */
        spin_lock(&rtc_lock);
-       retval = mach_set_rtc_mmss(nowtime);
+       if (efi_enabled)
+               retval = efi_set_rtc_mmss(nowtime);
+       else
+               retval = mach_set_rtc_mmss(nowtime);
        spin_unlock(&rtc_lock);
 
        return retval;
@@ -232,7 +237,13 @@ static inline void do_timer_interrupt(int irq, void *dev_id,
                        >= USEC_AFTER - ((unsigned) TICK_SIZE) / 2 &&
            (xtime.tv_nsec / 1000)
                        <= USEC_BEFORE + ((unsigned) TICK_SIZE) / 2) {
-               if (set_rtc_mmss(xtime.tv_sec) == 0)
+               /* horrible...FIXME */
+               if (efi_enabled) {
+                       if (efi_set_rtc_mmss(xtime.tv_sec) == 0)
+                               last_rtc_update = xtime.tv_sec;
+                       else
+                               last_rtc_update = xtime.tv_sec - 600;
+               } else if (set_rtc_mmss(xtime.tv_sec) == 0)
                        last_rtc_update = xtime.tv_sec;
                else
                        last_rtc_update = xtime.tv_sec - 600; /* do it again in 60 s */
@@ -286,7 +297,10 @@ unsigned long get_cmos_time(void)
 
        spin_lock(&rtc_lock);
 
-       retval = mach_get_cmos_time();
+       if (efi_enabled)
+               retval = efi_get_time();
+       else
+               retval = mach_get_cmos_time();
 
        spin_unlock(&rtc_lock);
 
@@ -297,6 +311,7 @@ static struct sysdev_class pit_sysclass = {
        set_kset_name("pit"),
 };
 
+
 /* XXX this driverfs stuff should probably go elsewhere later -john */
 static struct sys_device device_i8253 = {
        .id     = 0,
@@ -328,6 +343,8 @@ void __init hpet_time_init(void)
        }
 
        cur_timer = select_timer();
+       printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name);
+
        time_init_hook();
 }
 #endif
@@ -344,12 +361,13 @@ void __init time_init(void)
                return;
        }
 #endif
-
        xtime.tv_sec = get_cmos_time();
        wall_to_monotonic.tv_sec = -xtime.tv_sec;
        xtime.tv_nsec = (INITIAL_JIFFIES % HZ) * (NSEC_PER_SEC / HZ);
        wall_to_monotonic.tv_nsec = -xtime.tv_nsec;
 
        cur_timer = select_timer();
+       printk(KERN_INFO "Using %s for high-res timesource\n",cur_timer->name);
+
        time_init_hook();
 }
index 2dd4398..4c55a64 100644 (file)
@@ -71,7 +71,7 @@ static void mark_offset_cyclone(void)
        lost = delta/(1000000/HZ);
        delay = delta%(1000000/HZ);
        if (lost >= 2)
-               jiffies += lost-1;
+               jiffies_64 += lost-1;
        
        /* update the monotonic base value */
        this_offset = ((unsigned long long)last_cyclone_high<<32)|last_cyclone_low;
@@ -88,7 +88,7 @@ static void mark_offset_cyclone(void)
         * usec delta is > 90% # of usecs/tick)
         */
        if (lost && abs(delay - delay_at_last_interrupt) > (900000/HZ))
-               jiffies++;
+               jiffies_64++;
 }
 
 static unsigned long get_offset_cyclone(void)
@@ -253,6 +253,7 @@ static void delay_cyclone(unsigned long loops)
 
 /* cyclone timer_opts struct */
 struct timer_opts timer_cyclone = {
+       .name = "cyclone",
        .init = init_cyclone, 
        .mark_offset = mark_offset_cyclone, 
        .get_offset = get_offset_cyclone,
index 3beb266..15035a5 100644 (file)
@@ -108,7 +108,7 @@ static void mark_offset_hpet(void)
        offset = hpet_readl(HPET_T0_CMP) - hpet_tick;
        if (unlikely(((offset - hpet_last) > hpet_tick) && (hpet_last != 0))) {
                int lost_ticks = (offset - hpet_last) / hpet_tick;
-               jiffies += lost_ticks;
+               jiffies_64 += lost_ticks;
        }
        hpet_last = offset;
 
@@ -178,6 +178,7 @@ static int __init init_hpet(char* override)
 
 /* tsc timer_opts struct */
 struct timer_opts timer_hpet = {
+       .name =                 "hpet",
        .init =                 init_hpet,
        .mark_offset =          mark_offset_hpet,
        .get_offset =           get_offset_hpet,
index 547c83d..de744f7 100644 (file)
@@ -36,6 +36,7 @@ static void delay_none(unsigned long loops)
 
 /* tsc timer_opts struct */
 struct timer_opts timer_none = {
+       .name =         "none",
        .init =         init_none, 
        .mark_offset =  mark_offset_none, 
        .get_offset =   get_offset_none,
index 7d52122..7ddbf1c 100644 (file)
@@ -149,6 +149,7 @@ static unsigned long get_offset_pit(void)
 
 /* tsc timer_opts struct */
 struct timer_opts timer_pit = {
+       .name =         "pit",
        .init =         init_pit, 
        .mark_offset =  mark_offset_pit, 
        .get_offset =   get_offset_pit,
index be9a2a5..0030d79 100644 (file)
@@ -30,7 +30,6 @@ struct timer_opts timer_tsc;
 int tsc_disable __initdata = 0;
 
 extern spinlock_t i8253_lock;
-extern volatile unsigned long jiffies;
 
 static int use_tsc;
 /* Number of usecs that the last interrupt was delayed */
@@ -141,7 +140,7 @@ unsigned long long sched_clock(void)
 #ifndef CONFIG_NUMA
        if (!use_tsc)
 #endif
-               return (unsigned long long)jiffies * (1000000000 / HZ);
+               return (unsigned long long)get_jiffies_64() * (1000000000 / HZ);
 
        /* Read the Time Stamp Counter */
        rdtscll(this_offset);
@@ -184,6 +183,18 @@ static void mark_offset_tsc(void)
 
        count = inb_p(PIT_CH0);    /* read the latched count */
        count |= inb(PIT_CH0) << 8;
+
+       /*
+        * VIA686a test code... reset the latch if count > max + 1
+        * from timer_pit.c - cjb
+        */
+       if (count > LATCH) {
+               outb_p(0x34, PIT_MODE);
+               outb_p(LATCH & 0xff, PIT_CH0);
+               outb(LATCH >> 8, PIT_CH0);
+               count = LATCH - 1;
+       }
+
        spin_unlock(&i8253_lock);
 
        if (pit_latch_buggy) {
@@ -215,7 +226,7 @@ static void mark_offset_tsc(void)
        lost = delta/(1000000/HZ);
        delay = delta%(1000000/HZ);
        if (lost >= 2) {
-               jiffies += lost-1;
+               jiffies_64 += lost-1;
 
                /* sanity check to ensure we're not always losing ticks */
                if (lost_count++ > 100) {
@@ -241,7 +252,7 @@ static void mark_offset_tsc(void)
         * usec delta is > 90% # of usecs/tick)
         */
        if (lost && abs(delay - delay_at_last_interrupt) > (900000/HZ))
-               jiffies++;
+               jiffies_64++;
 }
 
 static void delay_tsc(unsigned long loops)
@@ -283,7 +294,7 @@ static void mark_offset_tsc_hpet(void)
        offset = hpet_readl(HPET_T0_CMP) - hpet_tick;
        if (unlikely(((offset - hpet_last) > hpet_tick) && (hpet_last != 0))) {
                int lost_ticks = (offset - hpet_last) / hpet_tick;
-               jiffies += lost_ticks;
+               jiffies_64 += lost_ticks;
        }
        hpet_last = hpet_current;
 
@@ -306,9 +317,17 @@ static void mark_offset_tsc_hpet(void)
 }
 #endif
 
+
 #ifdef CONFIG_CPU_FREQ
+/* If the CPU frequency is scaled, TSC-based delays will need a different
+ * loops_per_jiffy value to function properly. An exception to this
+ * are modern Intel Pentium 4 processors, where the TSC runs at a constant
+ * speed independent of frequency scaling. 
+ */
+
 static unsigned int  ref_freq = 0;
 static unsigned long loops_per_jiffy_ref = 0;
+static unsigned int  variable_tsc = 1;
 
 #ifndef CONFIG_SMP
 static unsigned long fast_gettimeoffset_ref = 0;
@@ -333,12 +352,15 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
 
        if ((val == CPUFREQ_PRECHANGE  && freq->old < freq->new) ||
            (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
-               cpu_data[freq->cpu].loops_per_jiffy = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
+               if (variable_tsc)
+                       cpu_data[freq->cpu].loops_per_jiffy = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
 #ifndef CONFIG_SMP
                if (use_tsc) {
-                       fast_gettimeoffset_quotient = cpufreq_scale(fast_gettimeoffset_ref, freq->new, ref_freq);
                        cpu_khz = cpufreq_scale(cpu_khz_ref, ref_freq, freq->new);
-                       set_cyc2ns_scale(cpu_khz/1000);
+                       if (variable_tsc) {
+                               fast_gettimeoffset_quotient = cpufreq_scale(fast_gettimeoffset_ref, freq->new, ref_freq);
+                               set_cyc2ns_scale(cpu_khz/1000);
+                       }
                }
 #endif
        }
@@ -350,7 +372,19 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
 static struct notifier_block time_cpufreq_notifier_block = {
        .notifier_call  = time_cpufreq_notifier
 };
-#endif
+
+
+static int __init cpufreq_tsc(void)
+{
+       /* P4 and above CPU TSC freq doesn't change when CPU frequency changes*/
+       if ((boot_cpu_data.x86 >= 15) && (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL))
+               variable_tsc = 0;
+
+       return cpufreq_register_notifier(&time_cpufreq_notifier_block, CPUFREQ_TRANSITION_NOTIFIER);
+}
+core_initcall(cpufreq_tsc);
+
+#endif 
 
 
 static int __init init_tsc(char* override)
@@ -392,10 +426,6 @@ static int __init init_tsc(char* override)
         *      some CPU's have a TSC. Thats never worked and nobody has
         *      moaned if you have the only one in the world - you fix it!
         */
-#ifdef CONFIG_CPU_FREQ
-       cpufreq_register_notifier(&time_cpufreq_notifier_block, CPUFREQ_TRANSITION_NOTIFIER);
-#endif
 
        count2 = LATCH; /* initialize counter for mark_offset_tsc() */
 
@@ -472,6 +502,7 @@ __setup("notsc", tsc_setup);
 
 /* tsc timer_opts struct */
 struct timer_opts timer_tsc = {
+       .name =         "tsc",
        .init =         init_tsc,
        .mark_offset =  mark_offset_tsc, 
        .get_offset =   get_offset_tsc,
index 4c893a9..3fb0b82 100644 (file)
@@ -124,7 +124,8 @@ struct pt_regs * save_v86_state(struct kernel_vm86_regs * regs)
 
        tss = init_tss + get_cpu();
        current->thread.esp0 = current->thread.saved_esp0;
-       load_esp0(tss, current->thread.esp0);
+       current->thread.sysenter_cs = __KERNEL_CS;
+       load_esp0(tss, &current->thread);
        current->thread.saved_esp0 = 0;
        put_cpu();
 
@@ -301,8 +302,10 @@ static void do_sys_vm86(struct kernel_vm86_struct *info, struct task_struct *tsk
        asm volatile("movl %%gs,%0":"=m" (tsk->thread.saved_gs));
 
        tss = init_tss + get_cpu();
-       tss->esp0 = tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0;
-       disable_sysenter(tss);
+       tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0;
+       if (cpu_has_sep)
+               tsk->thread.sysenter_cs = 0;
+       load_esp0(tss, &tsk->thread);
        put_cpu();
 
        tsk->thread.screen_bitmap = info->screen_bitmap;
index b9a07ec..3b6e50f 100644 (file)
@@ -541,8 +541,10 @@ survive:
                                goto survive;
                        }
 
-                       if (retval != 1)
+                       if (retval != 1) {
+                               up_read(&current->mm->mmap_sem);
                                break;
+                       }
 
                        maddr = kmap_atomic(pg, KM_USER0);
                        memcpy(maddr + offset, from, len);
index c303b22..5817532 100644 (file)
@@ -30,6 +30,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
        enum fixed_addresses idx;
        unsigned long vaddr;
 
+       /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
        inc_preempt_count();
        if (page < highmem_start_page)
                return page_address(page);
@@ -54,6 +55,7 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
 
        if (vaddr < FIXADDR_START) { // FIXME
                dec_preempt_count();
+               preempt_check_resched();
                return;
        }
 
@@ -69,6 +71,7 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
 #endif
 
        dec_preempt_count();
+       preempt_check_resched();
 }
 
 struct page *kmap_atomic_to_page(void *ptr)
index 207be11..48deeb0 100644 (file)
@@ -534,7 +534,7 @@ int is_hugepage_mem_enough(size_t size)
  * this far.
  */
 static struct page *hugetlb_nopage(struct vm_area_struct *vma,
-                               unsigned long address, int unused)
+                               unsigned long address, int *unused)
 {
        BUG();
        return NULL;
index 0202cca..2c2e03b 100644 (file)
@@ -26,6 +26,7 @@
 #include <linux/bootmem.h>
 #include <linux/slab.h>
 #include <linux/proc_fs.h>
+#include <linux/efi.h>
 
 #include <asm/processor.h>
 #include <asm/system.h>
@@ -165,12 +166,30 @@ static inline int page_kills_ppro(unsigned long pagenr)
        return 0;
 }
 
+extern int is_available_memory(efi_memory_desc_t *);
+
 static inline int page_is_ram(unsigned long pagenr)
 {
        int i;
+       unsigned long addr, end;
+
+       if (efi_enabled) {
+               efi_memory_desc_t *md;
+
+               for (i = 0; i < memmap.nr_map; i++) {
+                       md = &memmap.map[i];
+                       if (!is_available_memory(md))
+                               continue;
+                       addr = (md->phys_addr+PAGE_SIZE-1) >> PAGE_SHIFT;
+                       end = (md->phys_addr + (md->num_pages << EFI_PAGE_SHIFT)) >> PAGE_SHIFT;
+
+                       if ((pagenr >= addr) && (pagenr < end))
+                               return 1;
+               }
+               return 0;
+       }
 
        for (i = 0; i < e820.nr_map; i++) {
-               unsigned long addr, end;
 
                if (e820.map[i].type != E820_RAM)       /* not usable memory */
                        continue;
@@ -388,12 +407,6 @@ void __init paging_init(void)
 
 void __init test_wp_bit(void)
 {
-       if (cpu_has_pse) {
-               /* Ok, all PSE-capable CPUs are definitely handling the WP bit right. */
-               boot_cpu_data.wp_works_ok = 1;
-               return;
-       }
-
        printk("Checking if this processor honours the WP bit even in supervisor mode... ");
 
        /* Any page-aligned address will do, the test is non-destructive */
index db0eedb..9365627 100644 (file)
@@ -455,7 +455,10 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
 #if 0 /* Let's see what chip this is supposed to be ... */
        /* We must not touch 440GX even if we have tables. 440GX has
           different IRQ routing weirdness */
-       if (pci_find_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82440GX, NULL))
+       if (    pci_find_device(PCI_VENDOR_ID_INTEL,
+                               PCI_DEVICE_ID_INTEL_82443GX_0, NULL) ||
+               pci_find_device(PCI_VENDOR_ID_INTEL,
+                               PCI_DEVICE_ID_INTEL_82443GX_2, NULL))
                return 0;
 #endif
 
@@ -695,11 +698,6 @@ static struct irq_info *pirq_get_info(struct pci_dev *dev)
        return NULL;
 }
 
-static irqreturn_t pcibios_test_irq_handler(int irq, void *dev_id, struct pt_regs *regs)
-{
-       return IRQ_NONE;
-}
-
 static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
 {
        u8 pin;
@@ -761,11 +759,8 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
                for (i = 0; i < 16; i++) {
                        if (!(mask & (1 << i)))
                                continue;
-                       if (pirq_penalty[i] < pirq_penalty[newirq] &&
-                           !request_irq(i, pcibios_test_irq_handler, SA_SHIRQ, "pci-test", dev)) {
-                               free_irq(i, dev);
+                       if (pirq_penalty[i] < pirq_penalty[newirq] && can_request_irq(i, SA_SHIRQ))
                                newirq = i;
-                       }
                }
        }
        DBG(" -> newirq=%d", newirq);
@@ -813,8 +808,10 @@ static int pcibios_lookup_irq(struct pci_dev *dev, int assign)
                        if ( dev2->irq && dev2->irq != irq && \
                        (!(pci_probe & PCI_USE_PIRQ_MASK) || \
                        ((1 << dev2->irq) & mask)) ) {
+#ifndef CONFIG_PCI_USE_VECTOR
                                printk(KERN_INFO "IRQ routing conflict for %s, have irq %d, want irq %d\n",
                                       pci_name(dev2), dev2->irq, irq);
+#endif
                                continue;
                        }
                        dev2->irq = irq;
@@ -878,6 +875,10 @@ static void __init pcibios_fixup_irqs(void)
                                                        bridge->bus->number, PCI_SLOT(bridge->devfn), pin, irq);
                                }
                                if (irq >= 0) {
+                                       if (use_pci_vector() &&
+                                               !platform_legacy_irq(irq))
+                                               irq = IO_APIC_VECTOR(irq);
+
                                        printk(KERN_INFO "PCI->APIC IRQ transform: (B%d,I%d,P%d) -> %d\n",
                                                dev->bus->number, PCI_SLOT(dev->devfn), pin, irq);
                                        dev->irq = irq;
index b96ca1a..e4e8c34 100644 (file)
@@ -164,11 +164,6 @@ config ACPI
          The ACPI Sourceforge project may also be of interest:
          <http://sf.net/projects/acpi/>
 
-config ACPI_EFI
-       bool
-       depends on !IA64_HP_SIM
-       default y
-
 config ACPI_INTERPRETER
        bool
        depends on !IA64_HP_SIM
@@ -399,6 +394,12 @@ config IA64_PALINFO
          To use this option, you have to ensure that the "/proc file system
          support" (CONFIG_PROC_FS) is enabled, too.
 
+
+config EFI
+       bool
+       depends on !IA64_HP_SIM
+       default y
+
 config EFI_VARS
        tristate "/proc/efi/vars support"
        help
index 488e471..5456e54 100644 (file)
@@ -6,6 +6,10 @@
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
+# CONFIG_CLEAN_COMPILE is not set
+# CONFIG_STANDALONE is not set
+CONFIG_BROKEN=y
+CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
@@ -15,9 +19,16 @@ CONFIG_SYSVIPC=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_SYSCTL=y
 CONFIG_LOG_BUF_SHIFT=16
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
 # CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 
 #
 # Loadable module support
@@ -33,6 +44,7 @@ CONFIG_KMOD=y
 # Processor type and features
 #
 CONFIG_IA64=y
+CONFIG_64BIT=y
 CONFIG_MMU=y
 CONFIG_RWSEM_XCHGADD_ALGORITHM=y
 CONFIG_TIME_INTERPOLATION=y
@@ -48,7 +60,6 @@ CONFIG_IA64_HP_ZX1=y
 CONFIG_IA64_PAGE_SIZE_16KB=y
 # CONFIG_IA64_PAGE_SIZE_64KB is not set
 CONFIG_ACPI=y
-CONFIG_ACPI_EFI=y
 CONFIG_ACPI_INTERPRETER=y
 CONFIG_ACPI_KERNEL_CONFIG=y
 CONFIG_IA64_L1_CACHE_SHIFT=7
@@ -58,9 +69,7 @@ CONFIG_VIRTUAL_MEM_MAP=y
 CONFIG_IA64_MCA=y
 CONFIG_PM=y
 CONFIG_IOSAPIC=y
-CONFIG_KCORE_ELF=y
 CONFIG_FORCE_MAX_ZONEORDER=18
-CONFIG_HUGETLB_PAGE=y
 # CONFIG_HUGETLB_PAGE_SIZE_4GB is not set
 # CONFIG_HUGETLB_PAGE_SIZE_1GB is not set
 # CONFIG_HUGETLB_PAGE_SIZE_256MB is not set
@@ -69,20 +78,22 @@ CONFIG_HUGETLB_PAGE_SIZE_64MB=y
 # CONFIG_HUGETLB_PAGE_SIZE_4MB is not set
 # CONFIG_HUGETLB_PAGE_SIZE_1MB is not set
 # CONFIG_HUGETLB_PAGE_SIZE_256KB is not set
-CONFIG_IA64_PAL_IDLE=y
+# CONFIG_IA64_PAL_IDLE is not set
 CONFIG_SMP=y
 # CONFIG_PREEMPT is not set
 CONFIG_IA32_SUPPORT=y
 CONFIG_COMPAT=y
+CONFIG_HAVE_DEC_LOCK=y
 CONFIG_PERFMON=y
 CONFIG_IA64_PALINFO=y
+CONFIG_EFI=y
 CONFIG_EFI_VARS=y
 CONFIG_NR_CPUS=16
 CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=y
 
 #
-# ACPI Support
+# ACPI (Advanced Configuration and Power Interface) Support
 #
 CONFIG_ACPI_BOOT=y
 CONFIG_ACPI_BUTTON=y
@@ -94,6 +105,7 @@ CONFIG_ACPI_BUS=y
 CONFIG_ACPI_POWER=y
 CONFIG_ACPI_PCI=y
 CONFIG_ACPI_SYSTEM=y
+# CONFIG_ACPI_RELAXED_AML is not set
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_LEGACY_PROC=y
@@ -139,12 +151,72 @@ CONFIG_HOTPLUG=y
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM 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_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
 
 #
+# ATA/ATAPI/MFM/RLL support
+#
+CONFIG_IDE=y
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+CONFIG_BLK_DEV_IDEDISK=y
+CONFIG_IDEDISK_MULTI_MODE=y
+# CONFIG_IDEDISK_STROKE is not set
+CONFIG_BLK_DEV_IDECD=y
+# CONFIG_BLK_DEV_IDETAPE is not set
+CONFIG_BLK_DEV_IDEFLOPPY=m
+CONFIG_BLK_DEV_IDESCSI=m
+CONFIG_IDE_TASK_IOCTL=y
+CONFIG_IDE_TASKFILE_IO=y
+
+#
+# IDE chipset support/bugfixes
+#
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+CONFIG_BLK_DEV_GENERIC=y
+# CONFIG_BLK_DEV_OPTI621 is not set
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+CONFIG_IDEDMA_PCI_AUTO=y
+# CONFIG_IDEDMA_ONLYDISK is not set
+# CONFIG_IDEDMA_PCI_WIP is not set
+CONFIG_BLK_DEV_ADMA=y
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+CONFIG_BLK_DEV_CMD64X=y
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5520 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_PDC202XX_OLD is not set
+# CONFIG_BLK_DEV_PDC202XX_NEW is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_IVB is not set
+CONFIG_IDEDMA_AUTO=y
+# CONFIG_DMA_NONPCI is not set
+# CONFIG_BLK_DEV_HD is not set
+
+#
 # IEEE 1394 (FireWire) support (EXPERIMENTAL)
 #
 # CONFIG_IEEE1394 is not set
@@ -157,7 +229,15 @@ CONFIG_BLK_DEV_INITRD=y
 #
 # Multi-device support (RAID and LVM)
 #
-# CONFIG_MD is not set
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=m
+CONFIG_MD_LINEAR=m
+CONFIG_MD_RAID0=m
+CONFIG_MD_RAID1=m
+CONFIG_MD_RAID5=m
+CONFIG_MD_MULTIPATH=m
+CONFIG_BLK_DEV_DM=m
+CONFIG_DM_IOCTL_V4=y
 
 #
 # Fusion MPT device support
@@ -169,9 +249,10 @@ CONFIG_FUSION_MAX_SGE=40
 # CONFIG_FUSION_CTL is not set
 
 #
-# SCSI support
+# SCSI device support
 #
 CONFIG_SCSI=y
+CONFIG_SCSI_PROC_FS=y
 
 #
 # SCSI support type (disk, tape, CD-ROM)
@@ -200,9 +281,9 @@ CONFIG_SCSI_LOGGING=y
 # CONFIG_SCSI_AIC7XXX is not set
 CONFIG_SCSI_AIC7XXX_OLD=y
 # CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
 CONFIG_SCSI_MEGARAID=y
+# CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
@@ -210,6 +291,7 @@ CONFIG_SCSI_MEGARAID=y
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 CONFIG_SCSI_SYM53C8XX_2=y
@@ -238,8 +320,6 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 # CONFIG_PACKET_MMAP is not set
 # CONFIG_NETLINK_DEV is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
 CONFIG_UNIX=y
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
@@ -257,6 +337,16 @@ CONFIG_IP_MULTICAST=y
 # CONFIG_INET_IPCOMP is not set
 
 #
+# IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+# CONFIG_IPV6 is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+
+#
 # IP: Netfilter Configuration
 #
 # CONFIG_IP_NF_CONNTRACK is not set
@@ -264,10 +354,9 @@ CONFIG_IP_MULTICAST=y
 # CONFIG_IP_NF_IPTABLES is not set
 CONFIG_IP_NF_ARPTABLES=y
 # CONFIG_IP_NF_ARPFILTER is not set
+# CONFIG_IP_NF_ARP_MANGLE is not set
 # CONFIG_IP_NF_COMPAT_IPCHAINS is not set
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
-# CONFIG_IPV6 is not set
-# CONFIG_XFRM_USER is not set
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -276,9 +365,9 @@ CONFIG_IPV6_SCTP__=y
 # CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
 # CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE 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
@@ -306,7 +395,6 @@ CONFIG_DUMMY=y
 CONFIG_BONDING=y
 # CONFIG_EQUALIZER is not set
 # CONFIG_TUN is not set
-# CONFIG_ETHERTAP is not set
 
 #
 # Ethernet (10 or 100Mbit)
@@ -339,7 +427,6 @@ CONFIG_EEPRO100=y
 # CONFIG_SIS900 is not set
 # CONFIG_EPIC100 is not set
 # CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
 
 #
@@ -353,8 +440,9 @@ CONFIG_E1000=y
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
 # CONFIG_SK98LIN is not set
-CONFIG_TIGON3=m
+CONFIG_TIGON3=y
 
 #
 # Ethernet (10000 Mbit)
@@ -371,10 +459,10 @@ CONFIG_TIGON3=m
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices (depends on LLC=y)
+# Token Ring devices
 #
+# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -388,14 +476,19 @@ CONFIG_TIGON3=m
 # CONFIG_HAMRADIO is not set
 
 #
-# ISDN subsystem
+# IrDA (infrared) support
 #
-# CONFIG_ISDN_BOOL is not set
+# CONFIG_IRDA is not set
 
 #
-# CD-ROM drivers (not for SCSI or IDE/ATAPI drives)
+# Bluetooth support
 #
-# CONFIG_CD_NO_IDESCSI is not set
+# CONFIG_BT is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN_BOOL is not set
 
 #
 # Input device support
@@ -406,7 +499,7 @@ CONFIG_INPUT=y
 # Userland interfaces
 #
 CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 CONFIG_INPUT_JOYDEV=y
@@ -449,6 +542,7 @@ CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_ACPI=y
 CONFIG_SERIAL_8250_HCDP=y
+CONFIG_SERIAL_8250_NR_UARTS=4
 # CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
@@ -465,7 +559,11 @@ CONFIG_UNIX98_PTY_COUNT=256
 # CONFIG_I2C is not set
 
 #
-# I2C Hardware Sensors Mainboard support
+# I2C Algorithms
+#
+
+#
+# I2C Hardware Bus support
 #
 
 #
@@ -509,8 +607,8 @@ CONFIG_DRM=y
 # CONFIG_DRM_R128 is not set
 CONFIG_DRM_RADEON=m
 # CONFIG_DRM_MGA is not set
+# CONFIG_DRM_SIS is not set
 # CONFIG_RAW_DRIVER is not set
-# CONFIG_HANGCHECK_TIMER is not set
 
 #
 # Multimedia devices
@@ -565,11 +663,13 @@ CONFIG_VFAT_FS=y
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
 # CONFIG_DEVFS_FS is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
 CONFIG_HUGETLBFS=y
+CONFIG_HUGETLB_PAGE=y
 CONFIG_RAMFS=y
 
 #
@@ -594,6 +694,7 @@ CONFIG_RAMFS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V4 is not set
@@ -630,11 +731,11 @@ CONFIG_MSDOS_PARTITION=y
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_SUN_PARTITION is not set
 CONFIG_EFI_PARTITION=y
-CONFIG_NLS=y
 
 #
 # Native Language Support
 #
+CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="iso8859-1"
 CONFIG_NLS_CODEPAGE_437=y
 CONFIG_NLS_CODEPAGE_737=y
@@ -843,7 +944,6 @@ CONFIG_USB_HIDDEV=y
 #
 # USB Network adaptors
 #
-# CONFIG_USB_AX8817X is not set
 # CONFIG_USB_CATC is not set
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
@@ -865,36 +965,40 @@ CONFIG_USB_HIDDEV=y
 # CONFIG_USB_TIGL is not set
 # CONFIG_USB_AUERSWALD is not set
 # CONFIG_USB_RIO500 is not set
+# CONFIG_USB_LEGOTOWER is not set
 # CONFIG_USB_BRLVGER is not set
 # CONFIG_USB_LCD is not set
 # CONFIG_USB_GADGET is not set
 
 #
-# Bluetooth support
+# Library routines
 #
-# CONFIG_BT is not set
+CONFIG_CRC32=y
 
 #
-# Library routines
+# Profiling support
 #
-CONFIG_CRC32=y
+# CONFIG_PROFILING is not set
 
 #
 # Kernel hacking
 #
-# CONFIG_IA64_GRANULE_16MB is not set
-CONFIG_IA64_GRANULE_64MB=y
+CONFIG_IA64_GRANULE_16MB=y
+# CONFIG_IA64_GRANULE_64MB is not set
 CONFIG_DEBUG_KERNEL=y
-CONFIG_KALLSYMS=y
 CONFIG_IA64_PRINT_HAZARDS=y
 # CONFIG_DISABLE_VHPT is not set
 CONFIG_MAGIC_SYSRQ=y
-# CONFIG_IA64_EARLY_PRINTK is not set
+CONFIG_IA64_EARLY_PRINTK=y
+CONFIG_IA64_EARLY_PRINTK_UART=y
+CONFIG_IA64_EARLY_PRINTK_UART_BASE=0xff5e0000
+CONFIG_IA64_EARLY_PRINTK_VGA=y
 # CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_SPINLOCK is not set
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_IA64_DEBUG_CMPXCHG is not set
 # CONFIG_IA64_DEBUG_IRQ is not set
+CONFIG_DEBUG_INFO=y
 
 #
 # Security options
index 95d71af..5c46928 100644 (file)
@@ -108,7 +108,7 @@ extern void pal_emulator_static (void);
 #define BUS_NUMBER(addr)       (0x0000000000FF0000 & (addr))
 
 static efi_status_t
-efi_get_time (efi_time_t *tm, efi_time_cap_t *tc)
+fw_efi_get_time (efi_time_t *tm, efi_time_cap_t *tc)
 {
 #if defined(CONFIG_IA64_HP_SIM) || defined(CONFIG_IA64_GENERIC)
        struct {
@@ -310,7 +310,7 @@ sys_fw_init (const char *args, int arglen)
        efi_runtime->hdr.signature = EFI_RUNTIME_SERVICES_SIGNATURE;
        efi_runtime->hdr.revision = EFI_RUNTIME_SERVICES_REVISION;
        efi_runtime->hdr.headersize = sizeof(efi_runtime->hdr);
-       efi_runtime->get_time = __pa(&efi_get_time);
+       efi_runtime->get_time = __pa(&fw_efi_get_time);
        efi_runtime->set_time = __pa(&efi_unimplemented);
        efi_runtime->get_wakeup_time = __pa(&efi_unimplemented);
        efi_runtime->set_wakeup_time = __pa(&efi_unimplemented);
index 6511c85..3fafb0d 100644 (file)
@@ -60,10 +60,12 @@ extern struct page *ia32_shared_page[];
 extern unsigned long *ia32_gdt;
 
 struct page *
-ia32_install_shared_page (struct vm_area_struct *vma, unsigned long address, int no_share)
+ia32_install_shared_page (struct vm_area_struct *vma, unsigned long address, int *type)
 {
        struct page *pg = ia32_shared_page[smp_processor_id()];
        get_page(pg);
+       if (type)
+               *type = VM_FAULT_MINOR;
        return pg;
 }
 
index 1230fd2..91166d4 100644 (file)
@@ -1,4 +1,5 @@
 #include <asm/asmmacro.h>
+#include <asm/ia32.h>
 #include <asm/offsets.h>
 #include <asm/signal.h>
 #include <asm/thread_info.h>
@@ -141,27 +142,35 @@ GLOBAL_ENTRY(ia32_trace_syscall)
        adds r2=IA64_PT_REGS_R8_OFFSET+16,sp
        ;;
        st8 [r2]=r3                             // initialize return code to -ENOSYS
-       br.call.sptk.few rp=invoke_syscall_trace // give parent a chance to catch syscall args
-       // Need to reload arguments (they may be changed by the tracing process)
-       adds r2=IA64_PT_REGS_R9_OFFSET+16,sp    // r2 = &pt_regs.r9
+       br.call.sptk.few rp=syscall_trace       // give parent a chance to catch syscall args
+.ret2: // Need to reload arguments (they may be changed by the tracing process)
+       adds r2=IA64_PT_REGS_R1_OFFSET+16,sp    // r2 = &pt_regs.r1
        adds r3=IA64_PT_REGS_R13_OFFSET+16,sp   // r3 = &pt_regs.r13
+       mov r15=IA32_NR_syscalls
+       ;;
+       ld4 r8=[r2],IA64_PT_REGS_R9_OFFSET-IA64_PT_REGS_R1_OFFSET
+       movl r16=ia32_syscall_table
        ;;
        ld4 r33=[r2],8                          // r9 == ecx
        ld4 r37=[r3],16                         // r13 == ebp
+       cmp.ltu.unc p6,p7=r8,r15
        ;;
        ld4 r34=[r2],8                          // r10 == edx
        ld4 r36=[r3],8                          // r15 == edi
+(p6)   shladd r16=r8,3,r16     // force ni_syscall if not valid syscall number
+       ;;
+       ld8 r16=[r16]
        ;;
        ld4 r32=[r2],8                          // r11 == ebx
+       mov b6=r16
        ld4 r35=[r3],8                          // r14 == esi
-       ;;
-.ret2: br.call.sptk.few rp=b6                  // do the syscall
+       br.call.sptk.few rp=b6                  // do the syscall
 .ia32_strace_check_retval:
        cmp.lt p6,p0=r8,r0                      // syscall failed?
        adds r2=IA64_PT_REGS_R8_OFFSET+16,sp    // r2 = &pt_regs.r8
        ;;
        st8.spill [r2]=r8                       // store return value in slot for r8
-       br.call.sptk.few rp=invoke_syscall_trace // give parent a chance to catch return value
+       br.call.sptk.few rp=syscall_trace       // give parent a chance to catch return value
 .ret4: alloc r2=ar.pfs,0,0,0,0                 // drop the syscall argument frame
        br.cond.sptk.many ia64_leave_kernel
 END(ia32_trace_syscall)
@@ -199,7 +208,7 @@ END(sys32_fork)
        .align 8
        .globl ia32_syscall_table
 ia32_syscall_table:
-       data8 sys32_ni_syscall    /* 0  -  old "setup(" system call*/
+       data8 sys_ni_syscall      /* 0  -  old "setup(" system call*/
        data8 sys_exit
        data8 sys32_fork
        data8 sys_read
@@ -216,25 +225,25 @@ ia32_syscall_table:
        data8 sys_mknod
        data8 sys_chmod           /* 15 */
        data8 sys_lchown        /* 16-bit version */
-       data8 sys32_ni_syscall    /* old break syscall holder */
-       data8 sys32_ni_syscall
+       data8 sys_ni_syscall      /* old break syscall holder */
+       data8 sys_ni_syscall
        data8 sys32_lseek
        data8 sys_getpid          /* 20 */
        data8 sys_mount
        data8 sys_oldumount
        data8 sys_setuid        /* 16-bit version */
        data8 sys_getuid        /* 16-bit version */
-       data8 sys32_ni_syscall /* sys_stime is not supported on IA64 */  /* 25 */
+       data8 sys_ni_syscall    /* sys_stime is not supported on IA64 */  /* 25 */
        data8 sys32_ptrace
        data8 sys32_alarm
-       data8 sys32_ni_syscall
+       data8 sys_ni_syscall
        data8 sys32_pause
        data8 compat_sys_utime    /* 30 */
-       data8 sys32_ni_syscall    /* old stty syscall holder */
-       data8 sys32_ni_syscall    /* old gtty syscall holder */
+       data8 sys_ni_syscall      /* old stty syscall holder */
+       data8 sys_ni_syscall      /* old gtty syscall holder */
        data8 sys_access
        data8 sys_nice
-       data8 sys32_ni_syscall    /* 35 */        /* old ftime syscall holder */
+       data8 sys_ni_syscall      /* 35 */        /* old ftime syscall holder */
        data8 sys_sync
        data8 sys_kill
        data8 sys_rename
@@ -243,7 +252,7 @@ ia32_syscall_table:
        data8 sys_dup
        data8 sys32_pipe
        data8 compat_sys_times
-       data8 sys32_ni_syscall    /* old prof syscall holder */
+       data8 sys_ni_syscall      /* old prof syscall holder */
        data8 sys32_brk           /* 45 */
        data8 sys_setgid        /* 16-bit version */
        data8 sys_getgid        /* 16-bit version */
@@ -252,13 +261,13 @@ ia32_syscall_table:
        data8 sys_getegid       /* 16-bit version */      /* 50 */
        data8 sys_acct
        data8 sys_umount          /* recycled never used phys( */
-       data8 sys32_ni_syscall    /* old lock syscall holder */
+       data8 sys_ni_syscall      /* old lock syscall holder */
        data8 compat_sys_ioctl
        data8 compat_sys_fcntl    /* 55 */
-       data8 sys32_ni_syscall    /* old mpx syscall holder */
+       data8 sys_ni_syscall      /* old mpx syscall holder */
        data8 sys_setpgid
-       data8 sys32_ni_syscall    /* old ulimit syscall holder */
-       data8 sys32_ni_syscall
+       data8 sys_ni_syscall      /* old ulimit syscall holder */
+       data8 sys_ni_syscall
        data8 sys_umask           /* 60 */
        data8 sys_chroot
        data8 sys_ustat
@@ -267,8 +276,8 @@ ia32_syscall_table:
        data8 sys_getpgrp         /* 65 */
        data8 sys_setsid
        data8 sys32_sigaction
-       data8 sys32_ni_syscall
-       data8 sys32_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
        data8 sys_setreuid      /* 16-bit version */      /* 70 */
        data8 sys_setregid      /* 16-bit version */
        data8 sys32_sigsuspend
@@ -283,7 +292,7 @@ ia32_syscall_table:
        data8 sys32_setgroups16
        data8 sys32_old_select
        data8 sys_symlink
-       data8 sys32_ni_syscall
+       data8 sys_ni_syscall
        data8 sys_readlink        /* 85 */
        data8 sys_uselib
        data8 sys_swapon
@@ -297,7 +306,7 @@ ia32_syscall_table:
        data8 sys_fchown        /* 16-bit version */      /* 95 */
        data8 sys_getpriority
        data8 sys_setpriority
-       data8 sys32_ni_syscall    /* old profil syscall holder */
+       data8 sys_ni_syscall      /* old profil syscall holder */
        data8 compat_sys_statfs
        data8 compat_sys_fstatfs          /* 100 */
        data8 sys32_ioperm
@@ -308,11 +317,11 @@ ia32_syscall_table:
        data8 compat_sys_newstat
        data8 compat_sys_newlstat
        data8 compat_sys_newfstat
-       data8 sys32_ni_syscall
+       data8 sys_ni_syscall
        data8 sys32_iopl                  /* 110 */
        data8 sys_vhangup
-       data8 sys32_ni_syscall          /* used to be sys_idle */
-       data8 sys32_ni_syscall
+       data8 sys_ni_syscall            /* used to be sys_idle */
+       data8 sys_ni_syscall
        data8 compat_sys_wait4
        data8 sys_swapoff         /* 115 */
        data8 sys32_sysinfo
@@ -323,20 +332,20 @@ ia32_syscall_table:
        data8 sys_setdomainname
        data8 sys32_newuname
        data8 sys32_modify_ldt
-       data8 sys32_ni_syscall  /* adjtimex */
+       data8 sys_ni_syscall    /* adjtimex */
        data8 sys32_mprotect      /* 125 */
        data8 compat_sys_sigprocmask
-       data8 sys32_ni_syscall  /* create_module */
-       data8 sys32_ni_syscall  /* init_module */
-       data8 sys32_ni_syscall  /* delete_module */
-       data8 sys32_ni_syscall  /* get_kernel_syms */  /* 130 */
+       data8 sys_ni_syscall    /* create_module */
+       data8 sys_ni_syscall    /* init_module */
+       data8 sys_ni_syscall    /* delete_module */
+       data8 sys_ni_syscall    /* get_kernel_syms */  /* 130 */
        data8 sys_quotactl
        data8 sys_getpgid
        data8 sys_fchdir
-       data8 sys32_ni_syscall  /* sys_bdflush */
+       data8 sys_ni_syscall    /* sys_bdflush */
        data8 sys_sysfs         /* 135 */
        data8 sys32_personality
-       data8 sys32_ni_syscall    /* for afs_syscall */
+       data8 sys_ni_syscall      /* for afs_syscall */
        data8 sys_setfsuid      /* 16-bit version */
        data8 sys_setfsgid      /* 16-bit version */
        data8 sys_llseek          /* 140 */
@@ -365,10 +374,10 @@ ia32_syscall_table:
        data8 sys_mremap
        data8 sys_setresuid     /* 16-bit version */
        data8 sys32_getresuid16 /* 16-bit version */      /* 165 */
-       data8 sys32_ni_syscall  /* vm86 */
-       data8 sys32_ni_syscall  /* sys_query_module */
+       data8 sys_ni_syscall    /* vm86 */
+       data8 sys_ni_syscall    /* sys_query_module */
        data8 sys_poll
-       data8 sys32_ni_syscall  /* nfsservctl */
+       data8 sys_ni_syscall    /* nfsservctl */
        data8 sys_setresgid       /* 170 */
        data8 sys32_getresgid16
        data8 sys_prctl
@@ -387,8 +396,8 @@ ia32_syscall_table:
        data8 sys_capset          /* 185 */
        data8 sys32_sigaltstack
        data8 sys32_sendfile
-       data8 sys32_ni_syscall            /* streams1 */
-       data8 sys32_ni_syscall            /* streams2 */
+       data8 sys_ni_syscall              /* streams1 */
+       data8 sys_ni_syscall              /* streams2 */
        data8 sys32_vfork         /* 190 */
        data8 compat_sys_getrlimit
        data8 sys32_mmap2
@@ -425,54 +434,55 @@ ia32_syscall_table:
        data8 sys_ni_syscall            /* reserved for Security */
        data8 sys_gettid
        data8 sys_readahead       /* 225 */
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall    /* 230 */
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall    /* 235 */
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
+       data8 sys_setxattr
+       data8 sys_lsetxattr
+       data8 sys_fsetxattr
+       data8 sys_getxattr
+       data8 sys_lgetxattr     /* 230 */
+       data8 sys_fgetxattr
+       data8 sys_listxattr
+       data8 sys_llistxattr
+       data8 sys_flistxattr
+       data8 sys_removexattr   /* 235 */
+       data8 sys_lremovexattr
+       data8 sys_fremovexattr
        data8 sys_tkill
-       data8 sys_ni_syscall
+       data8 sys_sendfile64
        data8 compat_sys_futex  /* 240 */
        data8 compat_sys_sched_setaffinity
        data8 compat_sys_sched_getaffinity
        data8 sys32_set_thread_area
        data8 sys32_get_thread_area
-       data8 sys_ni_syscall    /* 245 */
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall    /* 250 */
+       data8 compat_sys_io_setup       /* 245 */
+       data8 sys_io_destroy
+       data8 compat_sys_io_getevents
+       data8 compat_sys_io_submit
+       data8 sys_io_cancel
+       data8 sys_fadvise64     /* 250 */
        data8 sys_ni_syscall
        data8 sys_exit_group
-       data8 sys_ni_syscall
+       data8 sys_lookup_dcookie
        data8 sys_epoll_create
        data8 sys32_epoll_ctl   /* 255 */
        data8 sys32_epoll_wait
        data8 sys_remap_file_pages
        data8 sys_set_tid_address
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall    /* 260 */
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall    /* 265 */
-       data8 sys_ni_syscall
-       data8 sys_ni_syscall
+       data8 sys32_timer_create
+       data8 compat_timer_settime      /* 260 */
+       data8 compat_timer_gettime
+       data8 sys_timer_getoverrun
+       data8 sys_timer_delete
+       data8 compat_clock_settime
+       data8 compat_clock_gettime /* 265 */
+       data8 compat_clock_getres
+       data8 compat_clock_nanosleep
        data8 sys_statfs64
        data8 sys_fstatfs64
-       data8 sys_ni_syscall
-       
-       /*
-        *  CAUTION: If any system calls are added beyond this point
-        *      then the check in `arch/ia64/kernel/ivt.S' will have
-        *      to be modified also.  You've been warned.
-        */
+       data8 sys_tgkill        /* 270 */
+       data8 compat_sys_utimes
+       data8 sys32_fadvise64_64
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+
+       // guard against failures to increase IA32_NR_syscalls
+       .org ia32_syscall_table + 8*IA32_NR_syscalls
index 7a95993..a445206 100644 (file)
@@ -199,6 +199,8 @@ typedef union sigval32 {
        unsigned int sival_ptr;
 } sigval_t32;
 
+#define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
+
 typedef struct siginfo32 {
        int si_signo;
        int si_errno;
@@ -251,6 +253,19 @@ typedef struct siginfo32 {
        } _sifields;
 } siginfo_t32;
 
+typedef struct sigevent32 {
+       sigval_t32 sigev_value;
+       int sigev_signo;
+       int sigev_notify;
+       union {
+               int _pad[SIGEV_PAD_SIZE32];
+               struct {
+                       u32 _function;
+                       u32 _attribute; /* really pthread_attr_t */
+               } _sigev_thread;
+       } _sigev_un;
+} sigevent_t32;
+
 struct old_linux32_dirent {
        u32     d_ino;
        u32     d_offset;
index 3ba190a..e532fdd 100644 (file)
@@ -2164,19 +2164,6 @@ sys32_ptrace (int request, pid_t pid, unsigned int addr, unsigned int data,
        return ret;
 }
 
-asmlinkage long sys_ni_syscall(void);
-
-asmlinkage long
-sys32_ni_syscall (int dummy0, int dummy1, int dummy2, int dummy3, int dummy4, int dummy5,
-                 int dummy6, int dummy7, int stack)
-{
-       struct pt_regs *regs = (struct pt_regs *)&stack;
-
-       printk(KERN_WARNING "IA32 syscall #%d issued, maybe we should implement it\n",
-              (int)regs->r1);
-       return(sys_ni_syscall());
-}
-
 /*
  *  The IA64 maps 4 I/O ports for each 4K page
  */
@@ -2267,7 +2254,7 @@ sys32_sigaltstack (ia32_stack_t *uss32, ia32_stack_t *uoss32,
        uss.ss_flags = buf32.ss_flags;
        /* MINSIGSTKSZ is different for ia32 vs ia64. We lie here to pass the 
            check and set it to the user requested value later */
-       if (buf32.ss_size < MINSIGSTKSZ_IA32) {
+       if ((buf32.ss_flags != SS_DISABLE) && (buf32.ss_size < MINSIGSTKSZ_IA32)) {
                ret = -ENOMEM;
                goto out;
        }
@@ -2925,6 +2912,54 @@ sys32_get_thread_area (struct ia32_user_desc *u_info)
        return 0;
 }
 
+extern asmlinkage long
+sys_timer_create(clockid_t which_clock, struct sigevent *timer_event_spec,
+                timer_t * created_timer_id);
+
+asmlinkage long
+sys32_timer_create(u32 clock, struct sigevent32 *se32, timer_t *timer_id)
+{
+       struct sigevent se;
+       mm_segment_t oldfs;
+       timer_t t;
+       long err;
+
+       if (se32 == NULL)
+               return sys_timer_create(clock, NULL, timer_id);
+
+       memset(&se, 0, sizeof(struct sigevent));
+       if (get_user(se.sigev_value.sival_int,  &se32->sigev_value.sival_int) ||
+           __get_user(se.sigev_signo, &se32->sigev_signo) ||
+           __get_user(se.sigev_notify, &se32->sigev_notify) ||
+           __copy_from_user(&se._sigev_un._pad, &se32->_sigev_un._pad,
+           sizeof(se._sigev_un._pad)))
+               return -EFAULT;
+
+       if (!access_ok(VERIFY_WRITE,timer_id,sizeof(timer_t)))
+               return -EFAULT;
+
+       oldfs = get_fs();
+       set_fs(KERNEL_DS);
+       err = sys_timer_create(clock, &se, &t);
+       set_fs(oldfs);
+
+       if (!err)
+               err = __put_user (t, timer_id);
+
+       return err;
+}
+
+extern long sys_fadvise64_64(int fd, loff_t offset, loff_t len, int advice);
+
+long sys32_fadvise64_64(int fd, __u32 offset_low, __u32 offset_high, 
+                       __u32 len_low, __u32 len_high, int advice)
+{ 
+       return sys_fadvise64_64(fd,
+                              (((u64)offset_high)<<32) | offset_low,
+                              (((u64)len_high)<<32) | len_low,
+                              advice); 
+} 
+
 #ifdef NOTYET  /* UNTESTED FOR IA64 FROM HERE DOWN */
 
 struct ncp_mount_data32 {
index f9a462f..fb0ad0a 100644 (file)
@@ -484,33 +484,10 @@ GLOBAL_ENTRY(clone)
 END(clone)
 
        /*
-        * We invoke syscall_trace through this intermediate function to
-        * ensure that the syscall input arguments are not clobbered.  We
-        * also use it to preserve b6, which contains the syscall entry point.
-        */
-GLOBAL_ENTRY(invoke_syscall_trace)
-       .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
-       alloc loc1=ar.pfs,8,3,0,0
-       mov loc0=rp
-       .body
-       mov loc2=b6
-       ;;
-       br.call.sptk.many rp=syscall_trace
-.ret3: mov rp=loc0
-       mov ar.pfs=loc1
-       mov b6=loc2
-       br.ret.sptk.many rp
-END(invoke_syscall_trace)
-
-       /*
         * Invoke a system call, but do some tracing before and after the call.
         * We MUST preserve the current register frame throughout this routine
         * because some system calls (such as ia64_execve) directly
         * manipulate ar.pfs.
-        *
-        * Input:
-        *      r15 = syscall number
-        *      b6  = syscall entry point
         */
        .global ia64_strace_leave_kernel
 
@@ -522,21 +499,38 @@ GLOBAL_ENTRY(ia64_trace_syscall)
         */
        nop.m 0
        nop.i 0
-       br.call.sptk.many rp=invoke_syscall_trace // give parent a chance to catch syscall args
+       br.call.sptk.many rp=syscall_trace // give parent a chance to catch syscall args
 }
-.ret6: br.call.sptk.many rp=b6                 // do the syscall
-strace_check_retval:
+       // the syscall number may have changed, so re-load it and re-calculate the
+       // syscall entry-point:
+       adds r15=PT(R15)+16,sp                  // r15 = &pt_regs.r15 (syscall #)
+       ;;
+       ld8 r15=[r15]
+       mov r3=NR_syscalls - 1
+       ;;
+       adds r15=-1024,r15
+       movl r16=sys_call_table
+       ;;
+       shladd r20=r15,3,r16                    // r20 = sys_call_table + 8*(syscall-1024)
+       cmp.leu p6,p7=r15,r3
+       ;;
+(p6)   ld8 r20=[r20]                           // load address of syscall entry point
+(p7)   movl r20=sys_ni_syscall
+       ;;
+       mov b6=r20
+       br.call.sptk.many rp=b6                 // do the syscall
+.strace_check_retval:
        cmp.lt p6,p0=r8,r0                      // syscall failed?
        adds r2=PT(R8)+16,sp                    // r2 = &pt_regs.r8
        adds r3=PT(R10)+16,sp                   // r3 = &pt_regs.r10
        mov r10=0
 (p6)   br.cond.sptk strace_error               // syscall failed ->
        ;;                                      // avoid RAW on r10
-strace_save_retval:
+.strace_save_retval:
 .mem.offset 0,0; st8.spill [r2]=r8             // store return value in slot for r8
 .mem.offset 8,0; st8.spill [r3]=r10            // clear error indication in slot for r10
 ia64_strace_leave_kernel:
-       br.call.sptk.many rp=invoke_syscall_trace // give parent a chance to catch return value
+       br.call.sptk.many rp=syscall_trace // give parent a chance to catch return value
 .rety: br.cond.sptk ia64_leave_syscall
 
 strace_error:
@@ -548,7 +542,7 @@ strace_error:
        ;;
 (p6)   mov r10=-1
 (p6)   mov r8=r9
-       br.cond.sptk strace_save_retval
+       br.cond.sptk .strace_save_retval
 END(ia64_trace_syscall)
 
 GLOBAL_ENTRY(ia64_ret_from_clone)
@@ -573,7 +567,7 @@ GLOBAL_ENTRY(ia64_ret_from_clone)
        ;;
        mov r8=0
        tbit.nz p6,p0=r2,TIF_SYSCALL_TRACE
-(p6)   br.cond.spnt strace_check_retval
+(p6)   br.cond.spnt .strace_check_retval
        ;;                                      // added stop bits to prevent r8 dependency
 END(ia64_ret_from_clone)
        // fall through
@@ -726,6 +720,7 @@ GLOBAL_ENTRY(ia64_leave_syscall)
        mov b6=r22                              // restore b6
        shr.u r18=r19,16        // get byte size of existing "dirty" partition
 (pKStk) br.cond.dpnt.many skip_rbs_switch
+(pNonSys) br.cond.dpnt.many dont_preserve_current_frame
        br.cond.sptk.many rbs_switch
 END(ia64_leave_syscall)
 
@@ -1334,9 +1329,9 @@ sys_call_table:
        data8 sys_syslog
        data8 sys_setitimer
        data8 sys_getitimer
-       data8 ia64_ni_syscall                   // 1120         /* was: ia64_oldstat */
-       data8 ia64_ni_syscall                                   /* was: ia64_oldlstat */
-       data8 ia64_ni_syscall                                   /* was: ia64_oldfstat */
+       data8 sys_ni_syscall                    // 1120         /* was: ia64_oldstat */
+       data8 sys_ni_syscall                                    /* was: ia64_oldlstat */
+       data8 sys_ni_syscall                                    /* was: ia64_oldfstat */
        data8 sys_vhangup
        data8 sys_lchown
        data8 sys_remap_file_pages              // 1125
@@ -1346,16 +1341,16 @@ sys_call_table:
        data8 sys_setdomainname
        data8 sys_newuname                      // 1130
        data8 sys_adjtimex
-       data8 ia64_ni_syscall                                   /* was: ia64_create_module */
+       data8 sys_ni_syscall                                    /* was: ia64_create_module */
        data8 sys_init_module
        data8 sys_delete_module
-       data8 ia64_ni_syscall                   // 1135         /* was: sys_get_kernel_syms */
-       data8 ia64_ni_syscall                                   /* was: sys_query_module */
+       data8 sys_ni_syscall                    // 1135         /* was: sys_get_kernel_syms */
+       data8 sys_ni_syscall                                    /* was: sys_query_module */
        data8 sys_quotactl
        data8 sys_bdflush
        data8 sys_sysfs
        data8 sys_personality                   // 1140
-       data8 ia64_ni_syscall           // sys_afs_syscall
+       data8 sys_ni_syscall            // sys_afs_syscall
        data8 sys_setfsuid
        data8 sys_setfsgid
        data8 sys_getdents
@@ -1473,26 +1468,26 @@ sys_call_table:
        data8 sys_clock_nanosleep
        data8 sys_fstatfs64
        data8 sys_statfs64
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall                   // 1260
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall                   // 1265
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall                   // 1270
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall                   // 1275
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
-       data8 ia64_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall                    // 1260
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall                    // 1265
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall                    // 1270
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall                    // 1275
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
+       data8 sys_ni_syscall
 
        .org sys_call_table + 8*NR_syscalls     // guard against failures to increase NR_syscalls
index f3ea890..455681b 100644 (file)
@@ -4,7 +4,7 @@
  * Preserved registers that are shared between code in ivt.S and entry.S.  Be
  * careful not to step on these!
  */
-#define pLvSys         p1      /* set 1 if leave from syscall; otherwise, set 0*/
+#define pLvSys         p1      /* set 1 if leave from syscall; otherwise, set 0 */
 #define pKStk          p2      /* will leave_{kernel,syscall} return to kernel-stacks? */
 #define pUStk          p3      /* will leave_{kernel,syscall} return to user-stacks? */
 #define pSys           p4      /* are we processing a (synchronous) system call? */
index aaae26d..f337fbb 100644 (file)
@@ -161,18 +161,20 @@ atomic_t irq_mis_count;
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, j;
+       int j, i = *(loff_t *) v;
        struct irqaction * action;
        irq_desc_t *idesc;
        unsigned long flags;
 
-       seq_puts(p, "           ");
-       for (j=0; j<NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "CPU%d       ",j);
-       seq_putc(p, '\n');
+       if (i == 0) {
+               seq_puts(p, "           ");
+               for (j=0; j<NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "CPU%d       ",j);
+               seq_putc(p, '\n');
+       }
 
-       for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                idesc = irq_descp(i);
                spin_lock_irqsave(&idesc->lock, flags);
                action = idesc->action;
@@ -195,25 +197,26 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
 skip:
                spin_unlock_irqrestore(&idesc->lock, flags);
-       }
-       seq_puts(p, "NMI: ");
-       for (j = 0; j < NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "%10u ", nmi_count(j));
-       seq_putc(p, '\n');
+       } else if (i == NR_IRQS) {
+               seq_puts(p, "NMI: ");
+               for (j = 0; j < NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "%10u ", nmi_count(j));
+               seq_putc(p, '\n');
 #ifdef CONFIG_X86_LOCAL_APIC
-       seq_puts(p, "LOC: ");
-       for (j = 0; j < NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "%10u ", irq_stat[j].apic_timer_irqs);
-       seq_putc(p, '\n');
+               seq_puts(p, "LOC: ");
+               for (j = 0; j < NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "%10u ", irq_stat[j].apic_timer_irqs);
+               seq_putc(p, '\n');
 #endif
-       seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
+               seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
 #ifdef CONFIG_X86_IO_APIC
 #ifdef APIC_MISMATCH_DEBUG
-       seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
+               seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
 #endif
 #endif
+       }
        return 0;
 }
 
@@ -916,47 +919,6 @@ int setup_irq(unsigned int irq, struct irqaction * new)
 static struct proc_dir_entry * root_irq_dir;
 static struct proc_dir_entry * irq_dir [NR_IRQS];
 
-#define HEX_DIGITS (2*sizeof(cpumask_t))
-
-static unsigned int parse_hex_value(const char *buffer,
-               unsigned long count, cpumask_t *ret)
-{
-       unsigned char hexnum[HEX_DIGITS];
-       cpumask_t value = CPU_MASK_NONE;
-       unsigned long i;
-
-       if (!count)
-               return -EINVAL;
-       if (count > HEX_DIGITS)
-               count = HEX_DIGITS;
-       if (copy_from_user(hexnum, buffer, count))
-               return -EFAULT;
-
-       /*
-        * Parse the first 8 characters as a hex string, any non-hex char
-        * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
-        */
-       for (i = 0; i < count; i++) {
-               unsigned int c = hexnum[i];
-               int k;
-
-               switch (c) {
-                       case '0' ... '9': c -= '0'; break;
-                       case 'a' ... 'f': c -= 'a'-10; break;
-                       case 'A' ... 'F': c -= 'A'-10; break;
-               default:
-                       goto out;
-               }
-               cpus_shift_left(value, value, 4);
-               for (k = 0; k < 4; ++k)
-                       if (test_bit(k, (unsigned long *)&c))
-                               cpu_set(k, value);
-       }
-out:
-       *ret = value;
-       return 0;
-}
-
 #ifdef CONFIG_SMP
 
 static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
@@ -980,20 +942,10 @@ void set_irq_affinity_info (unsigned int irq, int hwid, int redir)
 static int irq_affinity_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       int k, len;
-       cpumask_t tmp = irq_affinity[(long)data];
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, irq_affinity[(long)data]);
+       if (count - len < 2)
                return -EINVAL;
-
-       len = 0;
-       for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(page, "%04hx", (u16)cpus_coerce(tmp));
-               len += j;
-               page += j;
-               cpus_shift_right(tmp, tmp, 16);
-       }
-       len += sprintf(page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
@@ -1033,7 +985,7 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
                irq |= IA64_IRQ_REDIRECTED;
        }
 
-       err = parse_hex_value(buffer+prelen, count-prelen, &new_value);
+       err = cpumask_parse(buffer+prelen, count-prelen, new_value);
        if (err)
                return err;
 
@@ -1055,19 +1007,10 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
 static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       cpumask_t *mask = (cpumask_t *)data;
-       int k, len = 0;
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, *(cpumask_t *)data);
+       if (count - len < 2)
                return -EINVAL;
-
-       for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(page, "%04hx", (u16)cpus_coerce(*mask));
-               len += j;
-               page += j;
-               cpus_shift_right(*mask, *mask, 16);
-       }
-       len += sprintf(page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
@@ -1078,7 +1021,7 @@ static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
        unsigned long full_count = count, err;
        cpumask_t new_value;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
        if (err)
                return err;
 
index 6a32b97..8aed612 100644 (file)
@@ -42,6 +42,7 @@
 
 #include <asm/asmmacro.h>
 #include <asm/break.h>
+#include <asm/ia32.h>
 #include <asm/kregs.h>
 #include <asm/offsets.h>
 #include <asm/pgtable.h>
@@ -705,13 +706,14 @@ ENTRY(break_fault)
        movl r2=ia64_ret_from_syscall
        ;;
        shladd r20=r15,3,r16                    // r20 = sys_call_table + 8*(syscall-1024)
-       cmp.geu p0,p7=r3,r15                    // (syscall > 0 && syscall < 1024 + NR_syscalls) ?
+       cmp.leu p6,p7=r15,r3                    // (syscall > 0 && syscall < 1024 + NR_syscalls) ?
        mov rp=r2                               // set the real return addr
        ;;
-(p7)   add r20=(__NR_ni_syscall-1024)*8,r16    // force __NR_ni_syscall
+(p6)   ld8 r20=[r20]                           // load address of syscall entry point
+(p7)   movl r20=sys_ni_syscall
+
        add r2=TI_FLAGS+IA64_TASK_SIZE,r13
        ;;
-       ld8 r20=[r20]                           // load address of syscall entry point
        ld4 r2=[r2]                             // r2 = current_thread_info()->flags
        ;;
        tbit.z p8,p0=r2,TIF_SYSCALL_TRACE
@@ -1513,7 +1515,7 @@ ENTRY(dispatch_to_ia32_handler)
        alloc r15=ar.pfs,0,0,6,0        // must first in an insn group
        ;;
        ld4 r8=[r14],8          // r8 == eax (syscall number)
-       mov r15=270             // number of entries in ia32 system call table
+       mov r15=IA32_NR_syscalls
        ;;
        cmp.ltu.unc p6,p7=r8,r15
        ld4 out1=[r14],8        // r9 == ecx
index c567b17..87af753 100644 (file)
@@ -1363,8 +1363,8 @@ ia64_init_handler (struct pt_regs *pt, struct switch_stack *sw)
 void
 ia64_log_prt_guid (efi_guid_t *p_guid, prfunc_t prfunc)
 {
-       //char out[40];
-       //printk(KERN_DEBUG "GUID = %s\n", efi_guid_unparse(p_guid, out));
+       char out[40];
+       printk(KERN_DEBUG "GUID = %s\n", efi_guid_unparse(p_guid, out));
 }
 
 static void
index 87b0a33..b5026aa 100644 (file)
 ia64_os_mca_dispatch:
 
        // Serialize all MCA processing
-//     movl    r2=ia64_mca_serialize
        mov     r3=1;;
-//     DATA_VA_TO_PA(r2);;
        LOAD_PHYSICAL(p0,r2,ia64_mca_serialize);;
 ia64_os_mca_spin:
        xchg8   r4=[r2],r3;;
@@ -138,7 +136,6 @@ begin_os_mca_dump:
 
 ia64_os_mca_done_dump:
 
-//     movl r16=__pa(ia64_sal_to_os_handoff_state)+56
        LOAD_PHYSICAL(p0,r16,ia64_sal_to_os_handoff_state+56)
        ;;
        ld8 r18=[r16]           // Get processor state parameter on existing PALE_CHECK.
@@ -150,7 +147,6 @@ ia64_os_mca_done_dump:
        // Purge percpu data TC entries.
 begin_tlb_purge_and_reload:
        mov r16=cr.lid
-//     movl r17=__pa(ia64_mca_tlb_list) // Physical address of ia64_mca_tlb_list
        LOAD_PHYSICAL(p0,r17,ia64_mca_tlb_list) // Physical address of ia64_mca_tlb_list
        mov r19=0
        mov r20=NR_CPUS
@@ -168,8 +164,6 @@ begin_tlb_purge_and_reload:
        mov r23=r17             // save current ia64_mca_percpu_info addr pointer.
        adds r17=16,r17
        ;;
-       .global aegl
-aegl:
        ld8 r18=[r17],8         // r18=ptce_base
        ;;
        ld4 r19=[r17],4         // r19=ptce_count[0]
@@ -393,8 +387,6 @@ ia64_os_mca_dispatch_end:
 ia64_os_mca_proc_state_dump:
 // Save bank 1 GRs 16-31 which will be used by c-language code when we switch
 //  to virtual addressing mode.
-//     movl            r2=ia64_mca_proc_state_dump;;           // Os state dump area
-//        DATA_VA_TO_PA(r2)                   // convert to to physical address
        LOAD_PHYSICAL(p0,r2,ia64_mca_proc_state_dump)// convert OS state dump area to physical address
 
 // save ar.NaT
index 92f58ab..38a84cf 100644 (file)
@@ -114,7 +114,7 @@ default_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct
        pfm_default_smpl_hdr_t *hdr;
        pfm_default_smpl_entry_t *ent;
        void *cur, *last;
-       unsigned long *e;
+       unsigned long *e, entry_size;
        unsigned int npmds, i;
        unsigned char ovfl_pmd;
        unsigned char ovfl_notify;
@@ -131,8 +131,7 @@ default_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct
        ovfl_notify = arg->ovfl_notify;
 
        /*
-        * check for space against largest possibly entry.
-        * We may waste space at the end of the buffer.
+        * precheck for sanity
         */
        if ((last - cur) < PFM_DEFAULT_MAX_ENTRY_SIZE) goto full;
 
@@ -142,6 +141,8 @@ default_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct
 
        prefetch(arg->smpl_pmds_values);
 
+       entry_size = sizeof(*ent) + (npmds << 3);
+
        /* position for first pmd */
        e = (unsigned long *)(ent+1);
 
@@ -191,7 +192,13 @@ default_handler(struct task_struct *task, void *buf, pfm_ovfl_arg_t *arg, struct
        /*
         * update position for next entry
         */
-       hdr->hdr_cur_offs += sizeof(*ent) + (npmds << 3);
+       hdr->hdr_cur_offs += entry_size;
+       cur               += entry_size;
+
+       /*
+        * post check to avoid losing the last sample
+        */
+       if ((last - cur) < PFM_DEFAULT_MAX_ENTRY_SIZE) goto full;
 
        /*
         * keep same ovfl_pmds, ovfl_notify
index 26a4e64..cbcb2b2 100644 (file)
 #include <asm/perfmon.h>
 #endif
 
+#include "entry.h"
+
+#define p4     (1UL << 4)      /* for pSys (see entry.h) */
+#define p5     (1UL << 5)      /* for pNonSys (see entry.h) */
+
 /*
  * Bits in the PSR that we allow ptrace() to change:
  *     be, up, ac, mfl, mfh (the user mask; five bits total)
 # define dprintk(format...)
 #endif
 
+/* Return TRUE if PT was created due to kernel-entry via a system-call.  */
+
+static inline int
+in_syscall (struct pt_regs *pt)
+{
+       return (long) pt->cr_ifs >= 0;
+}
+
 /*
  * Collect the NaT bits for r1-r31 from scratch_unat and return a NaT
  * bitset where bit i is set iff the NaT bit of register i is set.
@@ -272,7 +285,7 @@ put_rnat (struct task_struct *task, struct switch_stack *sw,
        ubspstore = (unsigned long *) pt->ar_bspstore;
 
        urbs_kargs = urbs_end;
-       if ((long)pt->cr_ifs >= 0) {
+       if (in_syscall(pt)) {
                /*
                 * If entered via syscall, don't allow user to set rnat bits
                 * for syscall args.
@@ -331,6 +344,13 @@ put_rnat (struct task_struct *task, struct switch_stack *sw,
                *rnat1_kaddr = ((*rnat1_kaddr & ~m) | (rnat1 & m));
 }
 
+static inline int
+on_kernel_rbs (unsigned long addr, unsigned long bspstore, unsigned long urbs_end)
+{
+       return (addr >= bspstore
+               && addr <= (unsigned long) ia64_rse_rnat_addr((unsigned long *) urbs_end));
+}
+
 /*
  * Read a word from the user-level backing store of task CHILD.  ADDR is the user-level
  * address to read the word from, VAL a pointer to the return value, and USER_BSP gives
@@ -355,7 +375,7 @@ ia64_peek (struct task_struct *child, struct switch_stack *child_stack, unsigned
        child_regs = ia64_task_regs(child);
        bspstore = (unsigned long *) child_regs->ar_bspstore;
        krbs = (unsigned long *) child + IA64_RBS_OFFSET/8;
-       if (laddr >= bspstore && laddr <= ia64_rse_rnat_addr(urbs_end)) {
+       if (on_kernel_rbs(addr, (unsigned long) bspstore, (unsigned long) urbs_end)) {
                /*
                 * Attempt to read the RBS in an area that's actually on the kernel RBS =>
                 * read the corresponding bits in the kernel RBS.
@@ -406,7 +426,7 @@ ia64_poke (struct task_struct *child, struct switch_stack *child_stack, unsigned
        child_regs = ia64_task_regs(child);
        bspstore = (unsigned long *) child_regs->ar_bspstore;
        krbs = (unsigned long *) child + IA64_RBS_OFFSET/8;
-       if (laddr >= bspstore && laddr <= ia64_rse_rnat_addr(urbs_end)) {
+       if (on_kernel_rbs(addr, (unsigned long) bspstore, (unsigned long) urbs_end)) {
                /*
                 * Attempt to write the RBS in an area that's actually on the kernel RBS
                 * => write the corresponding bits in the kernel RBS.
@@ -443,7 +463,7 @@ ia64_get_user_rbs_end (struct task_struct *child, struct pt_regs *pt, unsigned l
        ndirty = ia64_rse_num_regs(krbs, krbs + (pt->loadrs >> 19));
        cfm = pt->cr_ifs & ~(1UL << 63);
 
-       if ((long) pt->cr_ifs >= 0) {
+       if (in_syscall(pt)) {
                /*
                 * If bit 63 of cr.ifs is cleared, the kernel was entered via a system
                 * call and we need to recover the CFM that existed on entry to the
@@ -483,134 +503,80 @@ ia64_sync_user_rbs (struct task_struct *child, struct switch_stack *sw,
        return 0;
 }
 
-/*
- * Simulate user-level "flushrs".  Note: we can't just add pt->loadrs>>16 to
- * pt->ar_bspstore because the kernel backing store and the user-level backing store may
- * have different alignments (and therefore a different number of intervening rnat slots).
- */
-static void
-user_flushrs (struct task_struct *task, struct pt_regs *pt)
-{
-       unsigned long *krbs;
-       long ndirty;
-
-       krbs = (unsigned long *) task + IA64_RBS_OFFSET/8;
-       ndirty = ia64_rse_num_regs(krbs, krbs + (pt->loadrs >> 19));
-
-       pt->ar_bspstore = (unsigned long) ia64_rse_skip_regs((unsigned long *) pt->ar_bspstore,
-                                                            ndirty);
-       pt->loadrs = 0;
-}
-
-static inline void
-sync_user_rbs_one_thread (struct task_struct *p, int make_writable)
-{
-       struct switch_stack *sw;
-       unsigned long urbs_end;
-       struct pt_regs *pt;
-
-       sw = (struct switch_stack *) (p->thread.ksp + 16);
-       pt = ia64_task_regs(p);
-       urbs_end = ia64_get_user_rbs_end(p, pt, NULL);
-       ia64_sync_user_rbs(p, sw, pt->ar_bspstore, urbs_end);
-       if (make_writable)
-               user_flushrs(p, pt);
-}
-
-struct task_list {
-       struct task_list *next;
-       struct task_struct *task;
-};
-
-#ifdef CONFIG_SMP
-
-static inline void
-collect_task (struct task_list **listp, struct task_struct *p, int make_writable)
+static inline int
+thread_matches (struct task_struct *thread, unsigned long addr)
 {
-       struct task_list *e;
+       unsigned long thread_rbs_end;
+       struct pt_regs *thread_regs;
 
-       e = kmalloc(sizeof(*e), GFP_KERNEL);
-       if (!e)
-               /* oops, can't collect more: finish at least what we collected so far... */
-               return;
-
-       get_task_struct(p);
-       e->task = p;
-       e->next = *listp;
-       *listp = e;
-}
+       if (ptrace_check_attach(thread, 0) < 0)
+               /*
+                * If the thread is not in an attachable state, we'll ignore it.
+                * The net effect is that if ADDR happens to overlap with the
+                * portion of the thread's register backing store that is
+                * currently residing on the thread's kernel stack, then ptrace()
+                * may end up accessing a stale value.  But if the thread isn't
+                * stopped, that's a problem anyhow, so we're doing as well as we
+                * can...
+                */
+               return 0;
 
-static inline struct task_list *
-finish_task (struct task_list *list, int make_writable)
-{
-       struct task_list *next = list->next;
+       thread_regs = ia64_task_regs(thread);
+       thread_rbs_end = ia64_get_user_rbs_end(thread, thread_regs, NULL);
+       if (!on_kernel_rbs(addr, thread_regs->ar_bspstore, thread_rbs_end))
+               return 0;
 
-       sync_user_rbs_one_thread(list->task, make_writable);
-       put_task_struct(list->task);
-       kfree(list);
-       return next;
+       return 1;       /* looks like we've got a winner */
 }
 
-#else
-# define collect_task(list, p, make_writable)  sync_user_rbs_one_thread(p, make_writable)
-# define finish_task(list, make_writable)      (NULL)
-#endif
-
 /*
- * Synchronize the RSE backing store of CHILD and all tasks that share the address space
- * with it.  CHILD_URBS_END is the address of the end of the register backing store of
- * CHILD.  If MAKE_WRITABLE is set, a user-level "flushrs" is simulated such that the VM
- * can be written via ptrace() and the tasks will pick up the newly written values.  It
- * would be OK to unconditionally simulate a "flushrs", but this would be more intrusive
- * than strictly necessary (e.g., it would make it impossible to obtain the original value
- * of ar.bspstore).
+ * GDB apparently wants to be able to read the register-backing store of any thread when
+ * attached to a given process.  If we are peeking or poking an address that happens to
+ * reside in the kernel-backing store of another thread, we need to attach to that thread,
+ * because otherwise we end up accessing stale data.
+ *
+ * task_list_lock must be read-locked before calling this routine!
  */
-static void
-threads_sync_user_rbs (struct task_struct *child, unsigned long child_urbs_end, int make_writable)
+static struct task_struct *
+find_thread_for_addr (struct task_struct *child, unsigned long addr)
 {
-       struct switch_stack *sw;
        struct task_struct *g, *p;
        struct mm_struct *mm;
-       struct pt_regs *pt;
-       long multi_threaded;
+       int mm_users;
 
-       task_lock(child);
-       {
-               mm = child->mm;
-               multi_threaded = mm && (atomic_read(&mm->mm_users) > 1);
-       }
-       task_unlock(child);
-
-       if (!multi_threaded) {
-               sw = (struct switch_stack *) (child->thread.ksp + 16);
-               pt = ia64_task_regs(child);
-               ia64_sync_user_rbs(child, sw, pt->ar_bspstore, child_urbs_end);
-               if (make_writable)
-                       user_flushrs(child, pt);
-       } else {
-               /*
-                * Note: we can't call ia64_sync_user_rbs() while holding the
-                * tasklist_lock because that may cause a dead-lock: ia64_sync_user_rbs()
-                * may indirectly call tlb_flush_all(), which triggers an IPI.
-                * Furthermore, tasklist_lock is acquired by fork() with interrupts
-                * disabled, so with the right timing, the IPI never completes, hence
-                * tasklist_lock never gets released, hence fork() never completes...
-                */
-               struct task_list *list = NULL;
-
-               read_lock(&tasklist_lock);
-               {
-                       do_each_thread(g, p) {
-                               if (p->mm == mm && p->state != TASK_RUNNING)
-                                       collect_task(&list, p, make_writable);
-                       } while_each_thread(g, p);
+       if (!(mm = get_task_mm(child)))
+               return child;
+
+       mm_users = atomic_read(&mm->mm_users) - 1;      /* -1 because of our get_task_mm()... */
+       if (mm_users <= 1)
+               goto out;               /* not multi-threaded */
+
+       /*
+        * First, traverse the child's thread-list.  Good for scalability with
+        * NPTL-threads.
+        */
+       p = child;
+       do {
+               if (thread_matches(p, addr)) {
+                       child = p;
+                       goto out;
                }
-               read_unlock(&tasklist_lock);
+               if (mm_users-- <= 1)
+                       goto out;
+       } while ((p = next_thread(p)) != child);
 
-               while (list)
-                       list = finish_task(list, make_writable);
-       }
-       child->thread.flags |= IA64_THREAD_KRBS_SYNCED; /* set the flag in the child thread only */
+       do_each_thread(g, p) {
+               if (child->mm != mm)
+                       continue;
+
+               if (thread_matches(p, addr)) {
+                       child = p;
+                       goto out;
+               }
+       } while_each_thread(g, p);
+  out:
+       mmput(mm);
+       return child;
 }
 
 /*
@@ -668,12 +634,40 @@ access_fr (struct unw_frame_info *info, int regnum, int hi, unsigned long *data,
        return ret;
 }
 
+/*
+ * Change the machine-state of CHILD such that it will return via the normal
+ * kernel exit-path, rather than the syscall-exit path.
+ */
+static void
+convert_to_non_syscall (struct task_struct *child, struct pt_regs  *pt, unsigned long cfm)
+{
+       struct unw_frame_info info, prev_info;
+       unsigned long ip, pr;
+
+       unw_init_from_blocked_task(&info, child);
+       while (1) {
+               prev_info = info;
+               if (unw_unwind(&info) < 0)
+                       return;
+               if (unw_get_rp(&info, &ip) < 0)
+                       return;
+               if (ip < FIXADDR_USER_END)
+                       break;
+       }
+
+       unw_get_pr(&prev_info, &pr);
+       pr &= ~pSys;
+       pr |= pNonSys;
+       unw_set_pr(&prev_info, pr);
+
+       pt->cr_ifs = (1UL << 63) | cfm;
+}
+
 static int
 access_uarea (struct task_struct *child, unsigned long addr, unsigned long *data, int write_access)
 {
-       unsigned long *ptr, regnum, urbs_end, rnat_addr;
+       unsigned long *ptr, regnum, urbs_end, rnat_addr, cfm;
        struct switch_stack *sw;
-       struct unw_frame_info info;
        struct pt_regs *pt;
 
        pt = ia64_task_regs(child);
@@ -778,13 +772,30 @@ access_uarea (struct task_struct *child, unsigned long addr, unsigned long *data
                         * By convention, we use PT_AR_BSP to refer to the end of the user-level
                         * backing store.  Use ia64_rse_skip_regs(PT_AR_BSP, -CFM.sof) to get
                         * the real value of ar.bsp at the time the kernel was entered.
+                        *
+                        * Furthermore, when changing the contents of PT_AR_BSP (or
+                        * PT_CFM) we MUST copy any users-level stacked registers that are
+                        * stored on the kernel stack back to user-space because
+                        * otherwise, we might end up clobbering kernel stacked registers.
+                        * Also, if this happens while the task is blocked in a system
+                        * call, which convert the state such that the non-system-call
+                        * exit path is used.  This ensures that the proper state will be
+                        * picked up when resuming execution.  However, it *also* means
+                        * that once we write PT_AR_BSP/PT_CFM, it won't be possible to
+                        * modify the syscall arguments of the pending system call any
+                        * longer.  This shouldn't be an issue because modifying
+                        * PT_AR_BSP/PT_CFM generally implies that we're either abandoning
+                        * the pending system call or that we defer it's re-execution
+                        * (e.g., due to GDB doing an inferior function call).
                         */
-                       urbs_end = ia64_get_user_rbs_end(child, pt, NULL);
+                       urbs_end = ia64_get_user_rbs_end(child, pt, &cfm);
                        if (write_access) {
                                if (*data != urbs_end) {
                                        if (ia64_sync_user_rbs(child, sw,
                                                               pt->ar_bspstore, urbs_end) < 0)
                                                return -1;
+                                       if (in_syscall(pt))
+                                               convert_to_non_syscall(child, pt, cfm);
                                        /* simulate user-level write of ar.bsp: */
                                        pt->loadrs = 0;
                                        pt->ar_bspstore = *data;
@@ -794,27 +805,19 @@ access_uarea (struct task_struct *child, unsigned long addr, unsigned long *data
                        return 0;
 
                      case PT_CFM:
-                       if ((long) pt->cr_ifs < 0) {
-                               if (write_access)
+                       urbs_end = ia64_get_user_rbs_end(child, pt, &cfm);
+                       if (write_access) {
+                               if (((cfm ^ *data) & 0x3fffffffffU) != 0) {
+                                       if (ia64_sync_user_rbs(child, sw,
+                                                              pt->ar_bspstore, urbs_end) < 0)
+                                               return -1;
+                                       if (in_syscall(pt))
+                                               convert_to_non_syscall(child, pt, cfm);
                                        pt->cr_ifs = ((pt->cr_ifs & ~0x3fffffffffUL)
                                                      | (*data & 0x3fffffffffUL));
-                               else
-                                       *data = pt->cr_ifs & 0x3fffffffffUL;
-                       } else {
-                               /* kernel was entered through a system call */
-                               unsigned long cfm;
-
-                               unw_init_from_blocked_task(&info, child);
-                               if (unw_unwind_to_user(&info) < 0)
-                                       return -1;
-
-                               unw_get_cfm(&info, &cfm);
-                               if (write_access)
-                                       unw_set_cfm(&info, ((cfm & ~0x3fffffffffU)
-                                                           | (*data & 0x3fffffffffUL)));
-                               else
-                                       *data = cfm;
-                       }
+                               }
+                       } else
+                               *data = cfm;
                        return 0;
 
                      case PT_CR_IPSR:
@@ -1240,9 +1243,6 @@ ptrace_disable (struct task_struct *child)
        /* make sure the single step/take-branch tra bits are not set: */
        child_psr->ss = 0;
        child_psr->tb = 0;
-
-       /* Turn off flag indicating that the KRBS is sync'd with child's VM: */
-       child->thread.flags &= ~IA64_THREAD_KRBS_SYNCED;
 }
 
 asmlinkage long
@@ -1250,7 +1250,7 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
            long arg4, long arg5, long arg6, long arg7, long stack)
 {
        struct pt_regs *pt, *regs = (struct pt_regs *) &stack;
-       unsigned long urbs_end;
+       unsigned long urbs_end, peek_or_poke;
        struct task_struct *child;
        struct switch_stack *sw;
        long ret;
@@ -1269,12 +1269,17 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
                goto out;
        }
 
+       peek_or_poke = (request == PTRACE_PEEKTEXT || request == PTRACE_PEEKDATA
+                       || request == PTRACE_POKETEXT || request == PTRACE_POKEDATA);
        ret = -ESRCH;
        read_lock(&tasklist_lock);
        {
                child = find_task_by_pid(pid);
-               if (child)
+               if (child) {
+                       if (peek_or_poke)
+                               child = find_thread_for_addr(child, addr);
                        get_task_struct(child);
+               }
        }
        read_unlock(&tasklist_lock);
        if (!child)
@@ -1299,10 +1304,6 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
              case PTRACE_PEEKTEXT:
              case PTRACE_PEEKDATA:             /* read word at location addr */
                urbs_end = ia64_get_user_rbs_end(child, pt, NULL);
-
-               if (!(child->thread.flags & IA64_THREAD_KRBS_SYNCED))
-                       threads_sync_user_rbs(child, urbs_end, 0);
-
                ret = ia64_peek(child, sw, urbs_end, addr, &data);
                if (ret == 0) {
                        ret = data;
@@ -1313,9 +1314,6 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
              case PTRACE_POKETEXT:
              case PTRACE_POKEDATA:             /* write the word at location addr */
                urbs_end = ia64_get_user_rbs_end(child, pt, NULL);
-               if (!(child->thread.flags & IA64_THREAD_KRBS_SYNCED))
-                       threads_sync_user_rbs(child, urbs_end, 1);
-
                ret = ia64_poke(child, sw, urbs_end, addr, data);
                goto out_tsk;
 
@@ -1359,9 +1357,6 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
                ia64_psr(pt)->ss = 0;
                ia64_psr(pt)->tb = 0;
 
-               /* Turn off flag indicating that the KRBS is sync'd with child's VM: */
-               child->thread.flags &= ~IA64_THREAD_KRBS_SYNCED;
-
                wake_up_process(child);
                ret = 0;
                goto out_tsk;
@@ -1380,9 +1375,6 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
                ia64_psr(pt)->ss = 0;
                ia64_psr(pt)->tb = 0;
 
-               /* Turn off flag indicating that the KRBS is sync'd with child's VM: */
-               child->thread.flags &= ~IA64_THREAD_KRBS_SYNCED;
-
                wake_up_process(child);
                ret = 0;
                goto out_tsk;
@@ -1401,9 +1393,6 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
                }
                child->exit_code = data;
 
-               /* Turn off flag indicating that the KRBS is sync'd with child's VM: */
-               child->thread.flags &= ~IA64_THREAD_KRBS_SYNCED;
-
                /* give it a chance to run. */
                wake_up_process(child);
                ret = 0;
@@ -1432,7 +1421,9 @@ sys_ptrace (long request, pid_t pid, unsigned long addr, unsigned long data,
        return ret;
 }
 
-void
+/* "asmlinkage" so the input arguments are preserved... */
+
+asmlinkage void
 syscall_trace (void)
 {
        if (!test_thread_flag(TIF_SYSCALL_TRACE))
index baf4b19..25fa2b6 100644 (file)
@@ -348,6 +348,8 @@ salinfo_log_read_cpu(void *context)
 {
        struct salinfo_data *data = context;
        data->log_size = ia64_sal_get_state_info(data->type, (u64 *) data->log_buffer);
+       if (data->type == SAL_INFO_TYPE_CPE || data->type == SAL_INFO_TYPE_CMC)
+               ia64_sal_clear_state_info(data->type);
 }
 
 static void
@@ -440,8 +442,11 @@ salinfo_log_clear(struct salinfo_data *data, int cpu)
                data->saved_num = 0;
                spin_unlock_irqrestore(&data_saved_lock, flags);
        }
-       call_on_cpu(cpu, salinfo_log_clear_cpu, data);
-
+       /* ia64_mca_log_sal_error_record or salinfo_log_read_cpu already cleared
+        * CPE and CMC errors
+        */
+       if (data->type != SAL_INFO_TYPE_CPE && data->type != SAL_INFO_TYPE_CMC)
+               call_on_cpu(cpu, salinfo_log_clear_cpu, data);
        /* clearing a record may make a new record visible */
        salinfo_log_new_read(cpu, data);
        if (data->state == STATE_LOG_RECORD &&
index bee0198..3843222 100644 (file)
 # error "struct cpuinfo_ia64 too big!"
 #endif
 
+#ifdef CONFIG_EFI
+int efi_enabled = 1;
+#endif
+
 #ifdef CONFIG_SMP
 unsigned long __per_cpu_offset[NR_CPUS];
 EXPORT_SYMBOL(__per_cpu_offset);
index 4f98194..0055272 100644 (file)
@@ -538,31 +538,41 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
        if (!oldset)
                oldset = &current->blocked;
 
-       if (IS_IA32_PROCESS(&scr->pt)) {
-               if (in_syscall) {
-                       if (errno >= 0)
-                               restart = 0;
-                       else
-                               errno = -errno;
-               }
-       } else if ((long) scr->pt.r10 != -1)
-               /*
-                * A system calls has to be restarted only if one of the error codes
-                * ERESTARTNOHAND, ERESTARTSYS, or ERESTARTNOINTR is returned.  If r10
-                * isn't -1 then r8 doesn't hold an error code and we don't need to
-                * restart the syscall, so we can clear the "restart" flag here.
-                */
-               restart = 0;
-
+       /*
+        * This only loops in the rare cases of handle_signal() failing, in which case we
+        * need to push through a forced SIGSEGV.
+        */
        while (1) {
                int signr = get_signal_to_deliver(&info, &scr->pt, NULL);
 
+               /*
+                * get_signal_to_deliver() may have run a debugger (via notify_parent())
+                * and the debugger may have modified the state (e.g., to arrange for an
+                * inferior call), thus it's important to check for restarting _after_
+                * get_signal_to_deliver().
+                */
+               if (IS_IA32_PROCESS(&scr->pt)) {
+                       if (in_syscall) {
+                               if (errno >= 0)
+                                       restart = 0;
+                               else
+                                       errno = -errno;
+                       }
+               } else if ((long) scr->pt.r10 != -1)
+                       /*
+                        * A system calls has to be restarted only if one of the error codes
+                        * ERESTARTNOHAND, ERESTARTSYS, or ERESTARTNOINTR is returned.  If r10
+                        * isn't -1 then r8 doesn't hold an error code and we don't need to
+                        * restart the syscall, so we can clear the "restart" flag here.
+                        */
+                       restart = 0;
+
                if (signr <= 0)
                        break;
 
                ka = &current->sighand->action[signr - 1];
 
-               if (restart) {
+               if (unlikely(restart)) {
                        switch (errno) {
                              case ERESTART_RESTARTBLOCK:
                              case ERESTARTNOHAND:
@@ -582,6 +592,7 @@ ia64_do_signal (sigset_t *oldset, struct sigscratch *scr, long in_syscall)
                                        scr->pt.cr_iip -= 2;
                                } else
                                        ia64_decrement_ip(&scr->pt);
+                               restart = 0; /* don't restart twice if handle_signal() fails... */
                        }
                }
 
index f462704..0db770f 100644 (file)
@@ -216,21 +216,6 @@ ia64_bad_break (unsigned long break_num, struct pt_regs *regs)
 }
 
 /*
- * Unimplemented system calls.  This is called only for stuff that
- * we're supposed to implement but haven't done so yet.  Everything
- * else goes to sys_ni_syscall.
- *
- * XXX Remove this for v2.6.1.
- */
-asmlinkage long
-ia64_ni_syscall (unsigned long arg0, unsigned long arg1, unsigned long arg2, unsigned long arg3,
-                unsigned long arg4, unsigned long arg5, unsigned long arg6, unsigned long arg7,
-                unsigned long stack)
-{
-       return -ENOSYS;
-}
-
-/*
  * disabled_fph_fault() is called when a user-level process attempts to access f32..f127
  * and it doesn't own the fp-high register partition.  When this happens, we save the
  * current fph partition in the task_struct of the fpu-owner (if necessary) and then load
index 9e366cb..f343f70 100644 (file)
@@ -144,17 +144,6 @@ int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
 
        return 0;
 }
-/* This function checks if the address and address+len falls out of HugeTLB region.  It
- * return -EINVAL if any part of address range falls in HugeTLB region.
- */
-int  check_valid_hugepage_range(unsigned long addr, unsigned long len)
-{
-       if (REGION_NUMBER(addr) == REGION_HPAGE)
-               return -EINVAL;
-       if (REGION_NUMBER(addr+len) == REGION_HPAGE)
-               return -EINVAL;
-       return 0;
-}
 
 int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
                        struct vm_area_struct *vma)
@@ -272,6 +261,59 @@ void huge_page_release(struct page *page)
        free_huge_page(page);
 }
 
+/*
+ * Same as generic free_pgtables(), except constant PGDIR_* and pgd_offset
+ * are hugetlb region specific.
+ */
+void hugetlb_free_pgtables(struct mmu_gather *tlb, struct vm_area_struct *prev,
+       unsigned long start, unsigned long end)
+{
+       unsigned long first = start & HUGETLB_PGDIR_MASK;
+       unsigned long last = end + HUGETLB_PGDIR_SIZE - 1;
+       unsigned long start_index, end_index;
+       struct mm_struct *mm = tlb->mm;
+
+       if (!prev) {
+               prev = mm->mmap;
+               if (!prev)
+                       goto no_mmaps;
+               if (prev->vm_end > start) {
+                       if (last > prev->vm_start)
+                               last = prev->vm_start;
+                       goto no_mmaps;
+               }
+       }
+       for (;;) {
+               struct vm_area_struct *next = prev->vm_next;
+
+               if (next) {
+                       if (next->vm_start < start) {
+                               prev = next;
+                               continue;
+                       }
+                       if (last > next->vm_start)
+                               last = next->vm_start;
+               }
+               if (prev->vm_end > first)
+                       first = prev->vm_end + HUGETLB_PGDIR_SIZE - 1;
+               break;
+       }
+no_mmaps:
+       if (last < first)       /* for arches with discontiguous pgd indices */
+               return;
+       /*
+        * If the PGD bits are not consecutive in the virtual address, the
+        * old method of shifting the VA >> by PGDIR_SHIFT doesn't work.
+        */
+
+       start_index = pgd_index(htlbpage_to_page(first));
+       end_index = pgd_index(htlbpage_to_page(last));
+
+       if (end_index > start_index) {
+               clear_page_tables(tlb, start_index, end_index - start_index);
+       }
+}
+
 void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
 {
        struct mm_struct *mm = vma->vm_mm;
@@ -518,7 +560,7 @@ int is_hugepage_mem_enough(size_t size)
        return 1;
 }
 
-static struct page *hugetlb_nopage(struct vm_area_struct * area, unsigned long address, int unused)
+static struct page *hugetlb_nopage(struct vm_area_struct * area, unsigned long address, int *unused)
 {
        BUG();
        return NULL;
index f413f13..2c74d8a 100644 (file)
@@ -1025,7 +1025,7 @@ config WATCHDOG
          implementation entirely in software (which can sometimes fail to
          reboot the machine) and a driver for hardware watchdog boards, which
          are more robust and can also keep track of the temperature inside
-         your computer. For details, read <file:Documentation/watchdog.txt>
+         your computer. For details, read <file:Documentation/watchdog/watchdog.txt>
          in the kernel source.
 
          The watchdog is usually used together with the watchdog daemon
index 7f42d00..c174fde 100644 (file)
@@ -253,19 +253,18 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
 
        /* autovector interrupts */
        if (mach_default_handler) {
-               for (i = 0; i < SYS_IRQS; i++) {
+               if (i < SYS_IRQS) {
                        seq_printf(p, "auto %2d: %10u ", i,
                                       i ? kstat_cpu(0).irqs[i] : num_spurious);
                        seq_puts(p, "  ");
                        seq_printf(p, "%s\n", irq_list[i].devname);
                }
-       }
-
-       mach_get_irq_list(p, v);
+       } else if (i == SYS_IRQS)
+               mach_get_irq_list(p, v);
        return 0;
 }
 
index 1ccb707..ea56a12 100644 (file)
@@ -254,9 +254,9 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
 
-       for (i = 0; i < NR_IRQS; i++) {
+       if (i < NR_IRQS) {
                if (irq_list[i].flags & IRQ_FLG_STD)
                        continue;
 
@@ -269,7 +269,7 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_printf(p, "%s\n", irq_list[i].devname);
        }
 
-       if (mach_get_irq_list)
+       if (i == NR_IRQS && mach_get_irq_list)
                mach_get_irq_list(p, v);
        return(0);
 }
index 15c72ca..cd673ec 100644 (file)
@@ -198,9 +198,9 @@ EXPORT_SYMBOL(free_irq);
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
 
-       for (i = 0; i < NR_IRQS; i++) {
+       if (i < NR_IRQS) {
                if (int_irq_list[i].flags & IRQ_FLG_STD)
                        continue;
 
@@ -211,7 +211,8 @@ int show_interrupts(struct seq_file *p, void *v)
                        seq_printf(p, "  ");
                seq_printf(p, "%s\n", int_irq_list[i].devname);
        }
-       seq_printf(p, "   : %10u   spurious\n", num_spurious);
+       if (i == NR_IRQS)
+               seq_printf(p, "   : %10u   spurious\n", num_spurious);
 
        return 0;
 }
index bbcf966..3023347 100644 (file)
@@ -278,9 +278,9 @@ void M68360_disable_irq(unsigned int irq)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
 
-       for (i = 0; i < NR_IRQS; i++) {
+       if (i < NR_IRQS) {
                if (int_irq_list[i].flags & IRQ_FLG_STD)
                        continue;
 
@@ -291,7 +291,8 @@ int show_interrupts(struct seq_file *p, void *v)
                        seq_printf(p, "  ");
                seq_printf(p, "%s\n", int_irq_list[i].devname);
        }
-       seq_printf(p, "   : %10u   spurious\n", num_spurious);
+       if (i == NR_IRQS)
+               seq_printf(p, "   : %10u   spurious\n", num_spurious);
 
        return 0;
 }
index 277ba41..edb286f 100644 (file)
@@ -1261,8 +1261,8 @@ config SOUND
          You want to read the Sound-HOWTO, available from
          <http://www.tldp.org/docs.html#howto>. General information about
          the modular sound system is contained in the files
-         <file:Documentation/sound/Introduction>.  The file
-         <file:Documentation/sound/README.OSS> contains some slightly
+         <file:Documentation/sound/oss/Introduction>.  The file
+         <file:Documentation/sound/oss/README.OSS> contains some slightly
          outdated but still useful information as well.
 
          If you have a PnP sound card and you want to configure it at boot
@@ -1270,7 +1270,7 @@ config SOUND
          <http://www.roestock.demon.co.uk/isapnptools/>), then you need to
          compile the sound card support as a module and load that module
          after the PnP configuration is finished. To do this, choose M here
-         and read <file:Documentation/sound/README.modules>; the module
+         and read <file:Documentation/sound/oss/README.modules>; the module
          will be called soundcore.
 
          I'm told that even without a sound card, you can make your computer
index 85c40b9..115b5c8 100644 (file)
@@ -85,17 +85,19 @@ atomic_t irq_err_count;
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, j;
+       int i = *(loff_t *) v, j;
        struct irqaction * action;
        unsigned long flags;
 
-       seq_printf(p, "           ");
-       for (j=0; j<NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "CPU%d       ",j);
-       seq_putc(p, '\n');
+       if (i == 0) {
+               seq_printf(p, "           ");
+               for (j=0; j<NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "CPU%d       ",j);
+               seq_putc(p, '\n');
+       }
 
-       for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                spin_lock_irqsave(&irq_desc[i].lock, flags);
                action = irq_desc[i].action;
                if (!action) 
@@ -117,10 +119,10 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
 skip:
                spin_unlock_irqrestore(&irq_desc[i].lock, flags);
+       } else if (i == NR_IRQS) {
+               seq_putc(p, '\n');
+               seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
        }
-       seq_putc(p, '\n');
-       seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
-
        return 0;
 }
 
@@ -825,45 +827,6 @@ EXPORT_SYMBOL(probe_irq_mask);
 static struct proc_dir_entry * root_irq_dir;
 static struct proc_dir_entry * irq_dir [NR_IRQS];
 
-#define HEX_DIGITS 8
-
-static unsigned int parse_hex_value (const char *buffer,
-               unsigned long count, unsigned long *ret)
-{
-       unsigned char hexnum [HEX_DIGITS];
-       unsigned long value;
-       int i;
-
-       if (!count)
-               return -EINVAL;
-       if (count > HEX_DIGITS)
-               count = HEX_DIGITS;
-       if (copy_from_user(hexnum, buffer, count))
-               return -EFAULT;
-
-       /*
-        * Parse the first 8 characters as a hex string, any non-hex char
-        * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
-        */
-       value = 0;
-
-       for (i = 0; i < count; i++) {
-               unsigned int c = hexnum[i];
-
-               switch (c) {
-                       case '0' ... '9': c -= '0'; break;
-                       case 'a' ... 'f': c -= 'a'-10; break;
-                       case 'A' ... 'F': c -= 'A'-10; break;
-               default:
-                       goto out;
-               }
-               value = (value << 4) | c;
-       }
-out:
-       *ret = value;
-       return 0;
-}
-
 #ifdef CONFIG_SMP
 
 static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
@@ -872,18 +835,10 @@ static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
 static int irq_affinity_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       int len, k;
-       cpumask_t tmp = irq_affinity[(long)data];
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, irq_affinity[(long)data]);
+       if (count - len < 2)
                return -EINVAL;
-       for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(page, "%04hx", cpus_coerce(tmp));
-               len += j;
-               page += j;
-               cpus_shift_right(tmp, tmp, 16);
-       }
-       len += sprintf(page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
@@ -896,7 +851,7 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
        if (!irq_desc[irq].handler->set_affinity)
                return -EIO;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
 
        /*
         * Do not allow disabling IRQs completely - it's a too easy
@@ -918,20 +873,10 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
 static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       int len, k;
-       cpumask_t *mask = (cpumask_t *)data, tmp;
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, *(cpumask_t *)data);
+       if (count - len < 2)
                return -EINVAL;
-       tmp = *mask;
-
-       for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(page, "%04hx", cpus_coerce(tmp));
-               len += j;
-               page += j;
-               cpus_shift_right(tmp, tmp, 16);
-       }
-       len += sprintf(page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
@@ -941,7 +886,7 @@ static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
        cpumask_t *mask = (cpumask_t *)data, new_value;
        unsigned long full_count = count, err;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
        if (err)
                return err;
 
index 0ae1245..2602af4 100644 (file)
@@ -40,6 +40,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
        enum fixed_addresses idx;
        unsigned long vaddr;
 
+       /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
        inc_preempt_count();
        if (page < highmem_start_page)
                return page_address(page);
@@ -64,6 +65,7 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
 
        if (vaddr < FIXADDR_START) { // FIXME
                dec_preempt_count();
+               preempt_check_resched();
                return;
        }
 
@@ -79,6 +81,7 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
 #endif
 
        dec_preempt_count();
+       preempt_check_resched();
 }
 
 struct page *kmap_atomic_to_page(void *ptr)
index 88ae8a6..679566d 100644 (file)
@@ -169,51 +169,10 @@ source "fs/Kconfig.binfmt"
 
 endmenu
 
-source "drivers/base/Kconfig"
-
-# source "drivers/mtd/Kconfig"
-
-source "drivers/parport/Kconfig"
-
-# source "drivers/pnp/Kconfig"
-
-source "drivers/block/Kconfig"
-
-source "drivers/ide/Kconfig"
-
-source "drivers/scsi/Kconfig"
-
-source "drivers/md/Kconfig"
-
-source drivers/message/fusion/Kconfig
-
-#source drivers/ieee1394/Kconfig
-
-#source drivers/message/i2o/Kconfig
-
-source "net/Kconfig"
-
-#source "drivers/isdn/Kconfig"
-
-#source "drivers/telephony/Kconfig"
-
-# input before char - char/joystick depends on it. As does USB.
-source "drivers/input/Kconfig"
-
-source "drivers/char/Kconfig"
-
-#source "drivers/misc/Kconfig"
-
-source "drivers/media/Kconfig"
+source "drivers/Kconfig"
 
 source "fs/Kconfig"
 
-source "drivers/video/Kconfig"
-
-source "sound/Kconfig"
-
-source "drivers/usb/Kconfig"
-
 source "arch/parisc/oprofile/Kconfig"
 
 menu "Kernel hacking"
diff --git a/arch/parisc/configs/712_defconfig b/arch/parisc/configs/712_defconfig
new file mode 100644 (file)
index 0000000..b731d61
--- /dev/null
@@ -0,0 +1,637 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_PARISC=y
+CONFIG_MMU=y
+CONFIG_STACK_GROWSUP=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+
+#
+# Code maturity level options
+#
+# CONFIG_EXPERIMENTAL is not set
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+CONFIG_LOG_BUF_SHIFT=15
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODULE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_KMOD is not set
+
+#
+# Processor type and features
+#
+# CONFIG_PA7000 is not set
+CONFIG_PA7100LC=y
+# CONFIG_PA7200 is not set
+# CONFIG_PA8X00 is not set
+CONFIG_PA11=y
+# CONFIG_64BIT is not set
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HPUX is not set
+
+#
+# Bus options (PCI, PCMCIA, EISA, GSC, ISA)
+#
+CONFIG_GSC=y
+# CONFIG_HPPB is not set
+# CONFIG_IOMMU_CCIO is not set
+CONFIG_GSC_LASI=y
+CONFIG_GSC_WAX=y
+# CONFIG_EISA is not set
+# CONFIG_PCI is not set
+# CONFIG_CHASSIS_LCD_LED is not set
+# CONFIG_PDC_CHASSIS is not set
+# CONFIG_HOTPLUG is not set
+
+#
+# Executable file formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+CONFIG_PARPORT=y
+CONFIG_PARPORT_PC=y
+CONFIG_PARPORT_PC_CML1=y
+# CONFIG_PARPORT_SERIAL is not set
+CONFIG_PARPORT_GSC=y
+# CONFIG_PARPORT_OTHER is not set
+# CONFIG_PARPORT_1284 is not set
+
+#
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_PARIDE is not set
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_CRYPTOLOOP=y
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+
+#
+# ATA/ATAPI/MFM/RLL support
+#
+# CONFIG_IDE is not set
+
+#
+# SCSI device support
+#
+CONFIG_SCSI=y
+CONFIG_SCSI_PROC_FS=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+CONFIG_CHR_DEV_ST=y
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=y
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_CHR_DEV_SG=y
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_REPORT_LUNS is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_PPA is not set
+# CONFIG_SCSI_IMM is not set
+CONFIG_SCSI_LASI700=y
+CONFIG_53C700_MEM_MAPPED=y
+CONFIG_53C700_LE_ON_BE=y
+# CONFIG_SCSI_ZALON is not set
+# CONFIG_SCSI_DEBUG is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_LINEAR=y
+CONFIG_MD_RAID0=y
+CONFIG_MD_RAID1=y
+CONFIG_MD_RAID5=y
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_BLK_DEV_DM is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# I2O device support
+#
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=y
+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 is not set
+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_INET_ECN=y
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
+CONFIG_LASI_82596=y
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_PLIP is not set
+CONFIG_PPP=y
+# CONFIG_PPP_FILTER is not set
+# CONFIG_PPP_ASYNC is not set
+# CONFIG_PPP_SYNC_TTY is not set
+# CONFIG_PPP_DEFLATE is not set
+# CONFIG_PPP_BSDCOMP is not set
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
+# CONFIG_STRIP is not set
+
+#
+# Token Ring devices
+#
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+# CONFIG_IRDA is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BT is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+# CONFIG_INPUT_TSDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input I/O drivers
+#
+# CONFIG_GAMEPORT is not set
+CONFIG_SOUND_GAMEPORT=y
+CONFIG_SERIO=y
+# CONFIG_SERIO_SERPORT is not set
+# CONFIG_SERIO_CT82C710 is not set
+# CONFIG_SERIO_PARKBD is not set
+# CONFIG_HP_SDC is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+# CONFIG_KEYBOARD_ATKBD is not set
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+# CONFIG_KEYBOARD_HIL_OLD is not set
+CONFIG_INPUT_MOUSE=y
+# CONFIG_MOUSE_PS2 is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+# CONFIG_INPUT_PCSPKR is not set
+# CONFIG_INPUT_UINPUT is not set
+CONFIG_INPUT_GSC=y
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+CONFIG_SERIAL_8250=y
+CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_EXTENDED=y
+CONFIG_SERIAL_8250_MANY_PORTS=y
+CONFIG_SERIAL_8250_SHARE_IRQ=y
+# CONFIG_SERIAL_8250_DETECT_IRQ is not set
+# CONFIG_SERIAL_8250_MULTIPORT is not set
+# CONFIG_SERIAL_8250_RSA is not set
+
+#
+# Non-8250 serial port support
+#
+# CONFIG_SERIAL_MUX is not set
+# CONFIG_PDC_CONSOLE is not set
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+CONFIG_PRINTER=y
+# CONFIG_LP_CONSOLE is not set
+# CONFIG_PPDEV is not set
+# CONFIG_TIPAR is not set
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# I2C Algorithms
+#
+
+#
+# I2C Hardware Bus support
+#
+
+#
+# I2C Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_QIC02_TAPE is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# 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
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+CONFIG_FB=y
+CONFIG_FB_STI=y
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_STI_CONSOLE=y
+CONFIG_DUMMY_CONSOLE_COLUMNS=160
+CONFIG_DUMMY_CONSOLE_ROWS=64
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_PCI_CONSOLE=y
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_LOGO_PARISC_CLUT224=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_FAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+CONFIG_DEVPTS_FS=y
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_SUNRPC=y
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Kernel hacking
+#
+CONFIG_DEBUG_KERNEL=y
+# CONFIG_DEBUG_SLAB is not set
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_FRAME_POINTER=y
+# CONFIG_DEBUG_INFO is not set
+
+#
+# Security options
+#
+CONFIG_SECURITY=y
+# CONFIG_SECURITY_NETWORK is not set
+CONFIG_SECURITY_CAPABILITIES=y
+# CONFIG_SECURITY_SELINUX is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_DES 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_DEFLATE is not set
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC32 is not set
index 9a2d0b9..d68fac9 100644 (file)
@@ -3,7 +3,6 @@
 #
 CONFIG_PARISC=y
 CONFIG_MMU=y
-CONFIG_SWAP=y
 CONFIG_STACK_GROWSUP=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 
@@ -11,20 +10,27 @@ CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # Code maturity level options
 #
 CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_STANDALONE=y
+CONFIG_BROKEN_ON_SMP=y
 
 #
 # General setup
 #
+CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
-# CONFIG_LOG_BUF_SHIFT_17 is not set
-# CONFIG_LOG_BUF_SHIFT_16 is not set
-CONFIG_LOG_BUF_SHIFT_15=y
-# CONFIG_LOG_BUF_SHIFT_14 is not set
-# CONFIG_LOG_BUF_SHIFT_13 is not set
-# CONFIG_LOG_BUF_SHIFT_12 is not set
 CONFIG_LOG_BUF_SHIFT=15
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
 
 #
 # Loadable module support
@@ -34,6 +40,15 @@ CONFIG_LOG_BUF_SHIFT=15
 #
 # Processor type and features
 #
+CONFIG_PA7000=y
+# CONFIG_PA7100LC is not set
+# CONFIG_PA7200 is not set
+# CONFIG_PA8X00 is not set
+CONFIG_PA11=y
+# CONFIG_64BIT is not set
+# CONFIG_SMP is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_HPUX is not set
 
 #
 # Bus options (PCI, PCMCIA, EISA, GSC, ISA)
@@ -44,6 +59,8 @@ CONFIG_IOMMU_CCIO=y
 CONFIG_GSC_LASI=y
 CONFIG_GSC_WAX=y
 CONFIG_EISA=y
+CONFIG_EISA_NAMES=y
+# CONFIG_ISA is not set
 CONFIG_PCI=y
 CONFIG_PCI_LEGACY_PROC=y
 CONFIG_PCI_NAMES=y
@@ -52,17 +69,30 @@ CONFIG_PCI_LBA=y
 CONFIG_IOSAPIC=y
 CONFIG_IOMMU_SBA=y
 CONFIG_SUPERIO=y
-# CONFIG_CHASSIS_LCD_LED is not set
+CONFIG_CHASSIS_LCD_LED=y
+CONFIG_PDC_CHASSIS=y
+# CONFIG_HOTPLUG is not set
 
 #
 # Executable file formats
 #
-CONFIG_KCORE_ELF=y
-CONFIG_BINFMT_SOM=y
 CONFIG_BINFMT_ELF=y
 # CONFIG_BINFMT_MISC is not set
 
 #
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
 # Parallel port support
 #
 CONFIG_PARPORT=y
@@ -76,6 +106,11 @@ CONFIG_PARPORT_GSC=y
 # CONFIG_PARPORT_1284 is not set
 
 #
+# Plug and Play support
+#
+# CONFIG_PNP is not set
+
+#
 # Block devices
 #
 # CONFIG_BLK_DEV_FD is not set
@@ -85,20 +120,22 @@ CONFIG_PARPORT_GSC=y
 # CONFIG_BLK_DEV_DAC960 is not set
 # CONFIG_BLK_DEV_UMEM is not set
 CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_CRYPTOLOOP=y
 # CONFIG_BLK_DEV_NBD is not set
 CONFIG_BLK_DEV_RAM=y
 CONFIG_BLK_DEV_RAM_SIZE=4096
 CONFIG_BLK_DEV_INITRD=y
 
 #
-# ATA/IDE/MFM/RLL support
+# ATA/ATAPI/MFM/RLL support
 #
 # CONFIG_IDE is not set
 
 #
-# SCSI support
+# SCSI device support
 #
 CONFIG_SCSI=y
+CONFIG_SCSI_PROC_FS=y
 
 #
 # SCSI support type (disk, tape, CD-ROM)
@@ -128,22 +165,17 @@ CONFIG_CHR_DEV_SG=y
 # CONFIG_SCSI_AIC7XXX is not set
 # CONFIG_SCSI_AIC7XXX_OLD is not set
 # CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
 # CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_SCSI_AM53C974 is not set
 # CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
 # CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_DMA is not set
 # CONFIG_SCSI_EATA_PIO is not set
 # CONFIG_SCSI_FUTURE_DOMAIN is not set
 # CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_IPS is not set
 # CONFIG_SCSI_INIA100 is not set
 # CONFIG_SCSI_PPA is not set
 # CONFIG_SCSI_IMM is not set
@@ -160,15 +192,11 @@ CONFIG_SCSI_NCR53C8XX_DEFAULT_TAGS=8
 CONFIG_SCSI_NCR53C8XX_MAX_TAGS=32
 CONFIG_SCSI_NCR53C8XX_SYNC=20
 # CONFIG_SCSI_NCR53C8XX_PROFILE is not set
-# CONFIG_SCSI_NCR53C8XX_SYMBIOS_COMPAT is not set
-# CONFIG_SCSI_PCI2000 is not set
-# CONFIG_SCSI_PCI2220I is not set
 # CONFIG_SCSI_QLOGIC_ISP is not set
 # CONFIG_SCSI_QLOGIC_FC is not set
 # CONFIG_SCSI_QLOGIC_1280 is not set
 # CONFIG_SCSI_SIM710 is not set
 # CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
 # CONFIG_SCSI_NSP32 is not set
 # CONFIG_SCSI_DEBUG is not set
 
@@ -185,6 +213,21 @@ CONFIG_MD_RAID5=y
 # CONFIG_BLK_DEV_DM is not set
 
 #
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+
+#
 # Networking support
 #
 CONFIG_NET=y
@@ -195,8 +238,6 @@ CONFIG_NET=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 CONFIG_NETLINK_DEV=y
-# CONFIG_NETFILTER is not set
-CONFIG_FILTER=y
 CONFIG_UNIX=y
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
@@ -213,8 +254,12 @@ CONFIG_IP_PNP_BOOTP=y
 # CONFIG_INET_ECN is not set
 # CONFIG_SYN_COOKIES is not set
 # CONFIG_INET_AH is not set
-# CONFIG_XFRM_USER is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
 # CONFIG_IPV6 is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NETFILTER is not set
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -223,9 +268,9 @@ CONFIG_IPV6_SCTP__=y
 # CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
 # CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE 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
@@ -259,6 +304,7 @@ CONFIG_NETDEVICES=y
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
+# CONFIG_MII is not set
 CONFIG_LASI_82596=y
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
@@ -311,8 +357,14 @@ CONFIG_DL2K=y
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
 # CONFIG_R8169 is not set
+# CONFIG_SIS190 is not set
 # CONFIG_SK98LIN is not set
 # CONFIG_TIGON3 is not set
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PLIP is not set
@@ -323,19 +375,23 @@ CONFIG_DL2K=y
 # Wireless LAN (non-hamradio)
 #
 CONFIG_NET_RADIO=y
+
+#
+# Obsolete Wireless cards support (pre-802.11)
+#
 # CONFIG_STRIP is not set
-# CONFIG_AIRONET4500 is not set
 
 #
-# Wireless ISA/PCI cards support
+# Wireless 802.11b ISA/PCI cards support
 #
 CONFIG_AIRO=y
 # CONFIG_HERMES is not set
 CONFIG_NET_WIRELESS=y
 
 #
-# Token Ring devices (depends on LLC=y)
+# Token Ring devices
 #
+# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -346,11 +402,31 @@ CONFIG_NET_WIRELESS=y
 # CONFIG_WAN is not set
 
 #
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
 # IrDA (infrared) support
 #
 # CONFIG_IRDA is not set
 
 #
+# Bluetooth support
+#
+# CONFIG_BT is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN_BOOL is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+
+#
 # Input device support
 #
 CONFIG_INPUT=y
@@ -358,7 +434,10 @@ CONFIG_INPUT=y
 #
 # Userland interfaces
 #
-# CONFIG_INPUT_MOUSEDEV is not set
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_TSDEV is not set
 CONFIG_INPUT_EVDEV=y
@@ -370,11 +449,12 @@ CONFIG_INPUT_EVDEV=y
 # CONFIG_GAMEPORT is not set
 CONFIG_SOUND_GAMEPORT=y
 CONFIG_SERIO=y
-# CONFIG_SERIO_I8042 is not set
 # CONFIG_SERIO_SERPORT is not set
 # CONFIG_SERIO_CT82C710 is not set
 # CONFIG_SERIO_PARKBD is not set
 CONFIG_HP_SDC=y
+# CONFIG_HIL_MLC is not set
+# CONFIG_SERIO_PCIPS2 is not set
 
 #
 # Input Device Drivers
@@ -384,11 +464,10 @@ CONFIG_INPUT_KEYBOARD=y
 # CONFIG_KEYBOARD_SUNKBD is not set
 # CONFIG_KEYBOARD_XTKBD is not set
 # CONFIG_KEYBOARD_NEWTON is not set
-# CONFIG_KEYBOARD_HIL is not set
+# CONFIG_KEYBOARD_HIL_OLD is not set
 CONFIG_INPUT_MOUSE=y
 # CONFIG_MOUSE_PS2 is not set
 # CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_HIL is not set
 CONFIG_INPUT_JOYSTICK=y
 # CONFIG_JOYSTICK_IFORCE is not set
 # CONFIG_JOYSTICK_WARRIOR is not set
@@ -407,7 +486,7 @@ CONFIG_INPUT_MISC=y
 # CONFIG_INPUT_PCSPKR is not set
 # CONFIG_INPUT_UINPUT is not set
 CONFIG_INPUT_GSC=y
-# CONFIG_HP_SDC_RTC is not set
+CONFIG_HP_SDC_RTC=y
 
 #
 # Character devices
@@ -422,6 +501,7 @@ CONFIG_HW_CONSOLE=y
 #
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
+CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y
@@ -432,8 +512,8 @@ CONFIG_SERIAL_8250_SHARE_IRQ=y
 #
 # Non-8250 serial port support
 #
-CONFIG_SERIAL_MUX=y
-CONFIG_SERIAL_MUX_CONSOLE=y
+# CONFIG_SERIAL_MUX is not set
+# CONFIG_PDC_CONSOLE is not set
 CONFIG_SERIAL_CORE=y
 CONFIG_SERIAL_CORE_CONSOLE=y
 CONFIG_UNIX98_PTYS=y
@@ -449,12 +529,17 @@ CONFIG_PRINTER=y
 # CONFIG_I2C is not set
 
 #
-# I2C Hardware Sensors Mainboard support
+# I2C Algorithms
+#
+
+#
+# I2C Hardware Bus support
 #
 
 #
 # I2C Hardware Sensors Chip support
 #
+# CONFIG_I2C_SENSOR is not set
 
 #
 # Mice
@@ -463,11 +548,15 @@ CONFIG_PRINTER=y
 # CONFIG_QIC02_TAPE is not set
 
 #
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
 # CONFIG_NVRAM is not set
-# CONFIG_RTC is not set
 CONFIG_GEN_RTC=y
 # CONFIG_GEN_RTC_X is not set
 # CONFIG_DTLK is not set
@@ -488,126 +577,17 @@ CONFIG_GEN_RTC=y
 # CONFIG_VIDEO_DEV is not set
 
 #
-# File systems
-#
-# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
-# CONFIG_REISERFS_FS is not set
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-CONFIG_EXT3_FS=y
-# CONFIG_EXT3_FS_XATTR is not set
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-# CONFIG_FAT_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_TMPFS is not set
-CONFIG_RAMFS=y
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-# CONFIG_ZISOFS is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_NTFS_FS is not set
-# CONFIG_HPFS_FS is not set
-CONFIG_PROC_FS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS=y
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UDF_FS is not set
-# CONFIG_UFS_FS is not set
-# CONFIG_XFS_FS is not set
-
-#
-# Network File Systems
-#
-# CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V4 is not set
-CONFIG_ROOT_NFS=y
-CONFIG_NFSD=y
-CONFIG_NFSD_V3=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_SUNRPC=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=y
-# CONFIG_CIFS is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
+# Digital Video Broadcasting Devices
 #
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_MSDOS_PARTITION=y
-CONFIG_NLS=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS_DEFAULT="iso8859-1"
-# CONFIG_NLS_CODEPAGE_437 is not set
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
+# CONFIG_DVB is not set
 
 #
 # Graphics support
 #
 CONFIG_FB=y
-# CONFIG_FB_CLGEN is not set
-# CONFIG_FB_PM2 is not set
 # CONFIG_FB_CYBER2000 is not set
 # CONFIG_FB_IMSTT is not set
-# CONFIG_FB_STI is not set
+CONFIG_FB_STI=y
 # CONFIG_FB_RIVA is not set
 # CONFIG_FB_MATROX is not set
 # CONFIG_FB_RADEON is not set
@@ -618,7 +598,6 @@ CONFIG_FB=y
 # CONFIG_FB_3DFX is not set
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_PM3 is not set
 # CONFIG_FB_VIRTUAL is not set
 
 #
@@ -632,12 +611,16 @@ CONFIG_DUMMY_CONSOLE_ROWS=64
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_PCI_CONSOLE=y
-# CONFIG_FBCON_ADVANCED is not set
 # CONFIG_FONTS is not set
 CONFIG_FONT_8x8=y
 CONFIG_FONT_8x16=y
 
 #
+# Logo configuration
+#
+# CONFIG_LOGO is not set
+
+#
 # Sound
 #
 CONFIG_SOUND=y
@@ -651,6 +634,7 @@ CONFIG_SOUND=y
 # Open Sound System
 #
 # CONFIG_SOUND_PRIME is not set
+# CONFIG_SOUND_HARMONY is not set
 
 #
 # USB support
@@ -694,6 +678,7 @@ CONFIG_USB_OHCI_HCD=y
 # CONFIG_USB_MOUSE is not set
 # CONFIG_USB_AIPTEK is not set
 # CONFIG_USB_WACOM is not set
+# CONFIG_USB_KBTAB is not set
 # CONFIG_USB_POWERMATE is not set
 # CONFIG_USB_XPAD is not set
 
@@ -718,7 +703,6 @@ CONFIG_USB_OHCI_HCD=y
 # USB Network adaptors
 #
 # CONFIG_USB_CATC is not set
-# CONFIG_USB_CDCETHER is not set
 # CONFIG_USB_KAWETH is not set
 # CONFIG_USB_PEGASUS is not set
 # CONFIG_USB_RTL8150 is not set
@@ -742,11 +726,140 @@ CONFIG_USB_OHCI_HCD=y
 # CONFIG_USB_RIO500 is not set
 # CONFIG_USB_BRLVGER is not set
 # CONFIG_USB_LCD is not set
+# CONFIG_USB_GADGET is not set
 
 #
-# Bluetooth support
+# File systems
 #
-# CONFIG_BT is not set
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT3_FS=y
+# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_ROMFS_FS is not set
+# CONFIG_QUOTA is not set
+# CONFIG_AUTOFS_FS is not set
+# CONFIG_AUTOFS4_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+CONFIG_ISO9660_FS=y
+CONFIG_JOLIET=y
+# CONFIG_ZISOFS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+# CONFIG_FAT_FS is not set
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_PROC_KCORE=y
+# CONFIG_DEVFS_FS is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_DEVPTS_FS_XATTR is not set
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V4 is not set
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_NFSD=y
+CONFIG_NFSD_V3=y
+# CONFIG_NFSD_V4 is not set
+CONFIG_NFSD_TCP=y
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_EXPORTFS=y
+CONFIG_SUNRPC=y
+# CONFIG_SUNRPC_GSS 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_INTERMEZZO_FS is not set
+# CONFIG_AFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
 
 #
 # Profiling support
@@ -760,7 +873,8 @@ CONFIG_OPROFILE=y
 CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SLAB is not set
 CONFIG_MAGIC_SYSRQ=y
-# CONFIG_KALLSYMS is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_DEBUG_INFO is not set
 
 #
 # Security options
@@ -770,9 +884,25 @@ CONFIG_MAGIC_SYSRQ=y
 #
 # Cryptographic options
 #
-# CONFIG_CRYPTO is not set
+CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+# CONFIG_CRYPTO_MD5 is not set
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_DES 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_DEFLATE is not set
+# CONFIG_CRYPTO_TEST is not set
 
 #
 # Library routines
 #
-# CONFIG_CRC32 is not set
+CONFIG_CRC32=y
index 632dbbc..6775b82 100644 (file)
@@ -8,6 +8,7 @@ extra-y                 := init_task.o $(head-y) vmlinux.lds.s
 
 AFLAGS_entry.o := -traditional
 AFLAGS_pacache.o := -traditional
+CFLAGS_ioctl32.o := -Ifs/
 
 obj-y          := cache.o pacache.o setup.o traps.o time.o irq.o \
                   pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \
index 9979780..a23bb15 100644 (file)
@@ -292,5 +292,10 @@ void __flush_dcache_page(struct page *page)
                break;
        }
 }
-
 EXPORT_SYMBOL(__flush_dcache_page);
+
+/* Defined in arch/parisc/kernel/pacache.S */
+EXPORT_SYMBOL(flush_kernel_dcache_range_asm);
+EXPORT_SYMBOL(flush_kernel_dcache_page);
+EXPORT_SYMBOL(flush_data_cache_local);
+EXPORT_SYMBOL(flush_kernel_icache_range_asm);
index 1f32579..976b9c7 100644 (file)
@@ -560,9 +560,9 @@ static void print_parisc_device(struct parisc_device *dev)
        static int count;
 
        print_pa_hwpath(dev, hw_path);
-       printk(KERN_INFO "%d. %s (%d) at 0x%lx [%s], versions 0x%x, 0x%x, 0x%x",
-               ++count, dev->name, dev->id.hw_type, dev->hpa, hw_path,
-               dev->id.hversion, dev->id.hversion_rev, dev->id.sversion);
+       printk(KERN_INFO "%d. %s at 0x%lx [%s] { %d, 0x%x, 0x%.3x, 0x%.5x }",
+               ++count, dev->name, dev->hpa, hw_path, dev->id.hw_type,
+               dev->id.hversion_rev, dev->id.hversion, dev->id.sversion);
 
        if (dev->num_addrs) {
                int k;
index c8f49a0..cb48ecd 100644 (file)
        ldil    L%KERNEL_PSW, %r1
        ldo     R%KERNEL_PSW(%r1), %r1
        mtctl   %r1, %cr22
-       mtctl   %r0, %cr17
-       mtctl   %r0, %cr17
+       mtctl   %r0, %cr17      /* Clear IIASQ tail */
+       mtctl   %r0, %cr17      /* Clear IIASQ head */
        ldil    L%4f, %r1
        ldo     R%4f(%r1), %r1
-       mtctl   %r1, %cr18
+       mtctl   %r1, %cr18      /* Set IIAOQ tail */
        ldo     4(%r1), %r1
-       mtctl   %r1, %cr18
+       mtctl   %r1, %cr18      /* Set IIAOQ head */
        rfir
        nop
 4:
index 4ada50a..8c733e0 100644 (file)
@@ -541,8 +541,8 @@ EXPORT_SYMBOL(pdc_lan_station_id);
  *    o cable too long (ie SE scsi 10Mhz won't support 6m length),
  *    o bus width exported is less than what the interface chip supports.
  */
-int pdc_get_initiator( struct hardware_path *hwpath, unsigned char *scsi_id,
-       unsigned long *period, char *width, char *mode)
+int pdc_get_initiator(struct hardware_path *hwpath, unsigned char *scsi_id,
+               unsigned long *period, char *width, char *mode)
 {
        int retval;
 
@@ -550,53 +550,49 @@ int pdc_get_initiator( struct hardware_path *hwpath, unsigned char *scsi_id,
 
 /* BCJ-XXXX series boxes. E.G. "9000/785/C3000" */
 #define IS_SPROCKETS() (strlen(boot_cpu_data.pdc.sys_model_name) == 14 && \
-       strncmp(boot_cpu_data.pdc.sys_model_name, "9000/785", 9) == 0)
+       strncmp(boot_cpu_data.pdc.sys_model_name, "9000/785", 8) == 0)
 
        retval = mem_pdc_call(PDC_INITIATOR, PDC_GET_INITIATOR, 
                              __pa(pdc_result), __pa(hwpath));
 
+       if (retval < PDC_OK)
+               goto fail;
 
-       if (retval >= PDC_OK) {
-               *scsi_id = (unsigned char) pdc_result[0];
+       *scsi_id = (unsigned char) pdc_result[0];
 
-               /* convert Bus speed in Mhz to period (in 1/10 ns) */
-               switch(pdc_result[1]) {
+       /* convert Bus speed in Mhz to period (in 1/10 ns) */
+       switch (pdc_result[1]) {
                /*
-               ** case  0:   driver determines rate
-               ** case -1:   Settings are uninitialized.
-               */
+                * case  0:   driver determines rate
+                * case -1:   Settings are uninitialized.
+                */
                case  5:  *period = 2000; break;
                case 10:  *period = 1000; break;
                case 20:  *period = 500; break;
                case 40:  *period = 250; break;
                default: /* Do nothing */ break;
-               }
-
-               /* 
-               ** pdc_result[2]        PDC suggested SCSI id
-               ** pdc_result[3]        PDC suggested SCSI rate
-               */
-
-               if (IS_SPROCKETS()) {
-                       /*
-                       ** Revisit: PAT PDC do the same thing?
-                       ** A500 also exports 50-pin SE SCSI.
-                       **      0 == 8-bit
-                       **      1 == 16-bit
-                       */
-                       *width = (char) pdc_result[4];
-
-                       /* ...in case someone needs it in the future.
-                       ** sym53c8xx.c comments say it can't autodetect
-                       ** for 825/825A/875 chips.
-                       **      0 == SE, 1 == HVD, 2 == LVD
-                       */
-                       *mode = (char) pdc_result[5]; 
-               }
        }
 
+       /* 
+        * pdc_result[2]        PDC suggested SCSI id
+        * pdc_result[3]        PDC suggested SCSI rate
+        */
+
+       if (IS_SPROCKETS()) {
+               /* 0 == 8-bit, 1 == 16-bit */
+               *width = (char) pdc_result[4];
+
+               /* ...in case someone needs it in the future.
+                * sym53c8xx.c comments say it can't autodetect
+                * for 825/825A/875 chips.
+                *      0 == SE, 1 == HVD, 2 == LVD
+                */
+               *mode = (char) pdc_result[5]; 
+       }
+
+ fail:
        spin_unlock_irq(&pdc_lock);
-       return retval >= PDC_OK;
+       return (retval >= PDC_OK);
 }
 EXPORT_SYMBOL(pdc_get_initiator);
 
index 71845a6..4ba9e36 100644 (file)
@@ -772,6 +772,7 @@ static struct hp_hardware hp_hardware_list[] __initdata = {
        {HPHW_FIO, 0x00D, 0x0007B, 0x0, "Strider-33 Audio"}, 
        {HPHW_FIO, 0x00E, 0x0007B, 0x0, "Trailways-50 Audio"}, 
        {HPHW_FIO, 0x00F, 0x0007B, 0x0, "Trailways-33 Audio"}, 
+       {HPHW_FIO, 0x015, 0x0007B, 0x0, "KittyHawk GSY Core Audio"}, 
        {HPHW_FIO, 0x016, 0x0007B, 0x0, "Gecko Audio"}, 
        {HPHW_FIO, 0x019, 0x0007B, 0x0, "Scorpio Sr. Audio"}, 
        {HPHW_FIO, 0x01A, 0x0007B, 0x0, "Anole 64 Audio"}, 
@@ -824,6 +825,7 @@ static struct hp_hardware hp_hardware_list[] __initdata = {
        {HPHW_FIO, 0x026, 0x0007F, 0x0, "CoralII Jaguar Audio"}, 
        {HPHW_FIO, 0x010, 0x00080, 0x0, "Pace Core HPIB"}, 
        {HPHW_FIO, 0x024, 0x00080, 0x0, "Fast Pace Core HPIB"}, 
+       {HPHW_FIO, 0x015, 0x00082, 0x0, "KittyHawk GSY Core SCSI"},
        {HPHW_FIO, 0x016, 0x00082, 0x0, "Gecko Core SCSI"}, 
        {HPHW_FIO, 0x01A, 0x00082, 0x0, "Anole 64 Core SCSI"}, 
        {HPHW_FIO, 0x01B, 0x00082, 0x0, "Anole 100 Core SCSI"}, 
index e83ffea..5f2de99 100644 (file)
@@ -221,13 +221,13 @@ $install_iva:
        ** Clear the two-level IIA Space Queue, effectively setting
        ** Kernel space.
        */
-       mtctl           %r0,%cr17
-       mtctl           %r0,%cr17
+       mtctl           %r0,%cr17       /* Clear IIASQ tail */
+       mtctl           %r0,%cr17       /* Clear IIASQ head */
 
        /* Load RFI target into PC queue */
-       mtctl           %r11,%cr18
+       mtctl           %r11,%cr18      /* IIAOQ head */
        ldo             4(%r11),%r11
-       mtctl           %r11,%cr18
+       mtctl           %r11,%cr18      /* IIAOQ tail */
 
        /* Jump to hyperspace */
        rfi
index b778666..bfe99a3 100644 (file)
@@ -267,13 +267,13 @@ aligned_rfi:
        ** Clear the two-level IIA Space Queue, effectively setting
        ** Kernel space.
        */
-       mtctl           %r0,%cr17
-       mtctl           %r0,%cr17
+       mtctl           %r0,%cr17       /* Clear IIASQ tail */
+       mtctl           %r0,%cr17       /* Clear IIASQ head */
 
        /* Load RFI target into PC queue */
-       mtctl           %r11,%cr18
+       mtctl           %r11,%cr18      /* IIAOQ head */
        ldo             4(%r11),%r11
-       mtctl           %r11,%cr18
+       mtctl           %r11,%cr18      /* IIAOQ tail */
 
        /* Jump to hyperspace */
        rfi
index dae3b0e..0262713 100644 (file)
@@ -532,7 +532,12 @@ static void __init system_map_inventory(void)
         * Otherwise the machine might crash during iommu setup.
         */
        pdc_io_reset();
-       pdc_io_reset_devices();
+
+       /*
+        * Unfortunately if we reset devices here, serial console
+        * stops working :-(
+        */
+       /* pdc_io_reset_devices(); */
 #endif
 
        for (i = 0; status != PDC_BAD_PROC && status != PDC_NE_MOD; i++) {
index 3383de2..8b3f8f0 100644 (file)
  * ioctls.
  */
 
-#include <linux/config.h>
-#include <linux/compat.h>
-#include <linux/ioctl.h>
-#include <linux/ioctl32.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/smp.h>
-#include <linux/smp_lock.h>
-#include <linux/ioctl.h>
-#include <linux/if.h>
-#include <linux/slab.h>
-#include <linux/hdreg.h>
-#include <linux/raid/md.h>
-#include <linux/kd.h>
-#include <linux/route.h>
-#include <linux/skbuff.h>
-#include <linux/netlink.h>
-#include <linux/vt.h>
-#include <linux/fs.h>
-#include <linux/file.h>
-#include <linux/fd.h>
-#include <linux/ppp_defs.h>
-#include <linux/if_ppp.h>
-#include <linux/if_pppox.h>
-#include <linux/if_tun.h>
-#include <linux/mtio.h>
-#include <linux/cdrom.h>
-#include <linux/loop.h>
-#include <linux/auto_fs4.h>
-#include <linux/devfs_fs.h>
-#include <linux/ncp_fs.h>
-#include <linux/tty.h>
-#include <linux/vt_kern.h>
-#include <linux/fb.h>
-#include <linux/ext2_fs.h>
-#include <linux/videodev.h>
-#include <linux/netdevice.h>
-#include <linux/raw.h>
-#include <linux/smb_fs.h>
-#include <linux/blkpg.h>
-#include <linux/elevator.h>
-#include <linux/rtc.h>
-#include <linux/pci.h>
-#include <linux/serial.h>
-#include <linux/watchdog.h>
-#include <net/sock.h>          /* siocdevprivate_ioctl */
-
-#include <scsi/scsi.h>
-/* Ugly hack. */
-#undef __KERNEL__
-#include <scsi/scsi_ioctl.h>
-#define __KERNEL__
-#include <scsi/sg.h>
-
-#include <linux/raid/md_u.h>
-#include <linux/dm-ioctl.h>
-
-#include <asm/types.h>
-#include <asm/uaccess.h>
-#include <asm/perf.h>
-#include <linux/ethtool.h>
-#include <linux/soundcard.h>
-#include <linux/lp.h>
-
-#include <linux/atm.h>
-#include <linux/atmarp.h>
-#include <linux/atmclip.h>
-#include <linux/atmdev.h>
-#include <linux/atmioc.h>
-#include <linux/atmlec.h>
-#include <linux/atmmpc.h>
-#include <linux/atmsvc.h>
-#include <linux/atm_tcp.h>
-#include <linux/sonet.h>
-#include <linux/atm_suni.h>
-#include <linux/mtd/mtd.h>
-
-#include <net/bluetooth/bluetooth.h>
-#include <net/bluetooth/hci.h>
-
-#include <linux/usb.h>
-#include <linux/usbdevice_fs.h>
-#include <linux/nbd.h>
-#include <linux/random.h>
+#define INCLUDES
+#include "compat_ioctl.c"
 
+#include <asm/perf.h>
 #include <asm/ioctls.h>
 
+#define CODE
+#include "compat_ioctl.c"
+
 /* Use this to get at 32-bit user passed pointers. 
    See sys_sparc32.c for description about these. */
 #define A(__x) ((unsigned long)(__x))
 /* The same for use with copy_from_user() and copy_to_user(). */
 #define B(__x) ((void *)(unsigned long)(__x))
 
-/* Aiee. Someone does not find a difference between int and long */
-#define EXT2_IOC32_GETFLAGS               _IOR('f', 1, int)
-#define EXT2_IOC32_SETFLAGS               _IOW('f', 2, int)
-#define EXT2_IOC32_GETVERSION             _IOR('v', 1, int)
-#define EXT2_IOC32_SETVERSION             _IOW('v', 2, int)
-
-static int w_long(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       int err;
-       unsigned long val;
-       
-       set_fs (KERNEL_DS);
-       err = sys_ioctl(fd, cmd, (unsigned long)&val);
-       set_fs (old_fs);
-       if (!err && put_user(val, (u32 *)arg))
-               return -EFAULT;
-       return err;
-}
-static int rw_long(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       int err;
-       unsigned long val;
-       
-       if(get_user(val, (u32 *)arg))
-               return -EFAULT;
-       set_fs (KERNEL_DS);
-       err = sys_ioctl(fd, cmd, (unsigned long)&val);
-       set_fs (old_fs);
-       if (!err && put_user(val, (u32 *)arg))
-               return -EFAULT;
-       return err;
-}
-
-static int do_ext2_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       /* These are just misnamed, they actually get/put from/to user an int */
-       switch (cmd) {
-       case EXT2_IOC32_GETFLAGS: cmd = EXT2_IOC_GETFLAGS; break;
-       case EXT2_IOC32_SETFLAGS: cmd = EXT2_IOC_SETFLAGS; break;
-       case EXT2_IOC32_GETVERSION: cmd = EXT2_IOC_GETVERSION; break;
-       case EXT2_IOC32_SETVERSION: cmd = EXT2_IOC_SETVERSION; break;
-       }
-       return sys_ioctl(fd, cmd, arg);
-}
-static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       struct compat_timeval *up = (struct compat_timeval *)arg;
-       struct timeval ktv;
-       mm_segment_t old_fs = get_fs();
-       int err;
-
-       set_fs(KERNEL_DS);
-       err = sys_ioctl(fd, cmd, (unsigned long)&ktv);
-       set_fs(old_fs);
-       if(!err) {
-               err = put_user(ktv.tv_sec, &up->tv_sec);
-               err |= __put_user(ktv.tv_usec, &up->tv_usec);
-       }
-       return err;
-}
-
-struct ifmap32 {
-       u32 mem_start;
-       u32 mem_end;
-       unsigned short base_addr;
-       unsigned char irq;
-       unsigned char dma;
-       unsigned char port;
-};
-
-struct ifreq32 {
-#define IFHWADDRLEN     6
-#define IFNAMSIZ        16
-        union {
-                char    ifrn_name[IFNAMSIZ];            /* if name, e.g. "en0" */
-        } ifr_ifrn;
-        union {
-                struct  sockaddr ifru_addr;
-                struct  sockaddr ifru_dstaddr;
-                struct  sockaddr ifru_broadaddr;
-                struct  sockaddr ifru_netmask;
-                struct  sockaddr ifru_hwaddr;
-                short   ifru_flags;
-                int     ifru_ivalue;
-                int     ifru_mtu;
-                struct  ifmap32 ifru_map;
-                char    ifru_slave[IFNAMSIZ];   /* Just fits the size */
-               char    ifru_newname[IFNAMSIZ];
-                compat_caddr_t ifru_data;
-        } ifr_ifru;
-};
-
-struct ifconf32 {
-        int            ifc_len;                /* size of buffer       */
-        compat_caddr_t ifcbuf;
-};
-
-static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       struct net_device *dev;
-       struct ifreq32 ifr32;
-       int err;
-
-       if (copy_from_user(&ifr32, (struct ifreq32 *)arg, sizeof(struct ifreq32)))
-               return -EFAULT;
-
-       dev = dev_get_by_index(ifr32.ifr_ifindex);
-       if (!dev)
-               return -ENODEV;
-
-       strcpy(ifr32.ifr_name, dev->name);
-       dev_put(dev);
-
-       err = copy_to_user((struct ifreq32 *)arg, &ifr32, sizeof(struct ifreq32));
-       return (err ? -EFAULT : 0);
-}
-
-static inline int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       struct ifconf32 ifc32;
-       struct ifconf ifc;
-       struct ifreq32 *ifr32;
-       struct ifreq *ifr;
-       mm_segment_t old_fs;
-       unsigned int i, j;
-       int err;
-
-       if (copy_from_user(&ifc32, (struct ifconf32 *)arg, sizeof(struct ifconf32)))
-               return -EFAULT;
-
-       if(ifc32.ifcbuf == 0) {
-               ifc32.ifc_len = 0;
-               ifc.ifc_len = 0;
-               ifc.ifc_buf = NULL;
-       } else {
-               ifc.ifc_len = ((ifc32.ifc_len / sizeof (struct ifreq32)) + 1) *
-                       sizeof (struct ifreq);
-               ifc.ifc_buf = kmalloc (ifc.ifc_len, GFP_KERNEL);
-               if (!ifc.ifc_buf)
-                       return -ENOMEM;
-       }
-       ifr = ifc.ifc_req;
-       ifr32 = (struct ifreq32 *)A(ifc32.ifcbuf);
-       for (i = 0; i < ifc32.ifc_len; i += sizeof (struct ifreq32)) {
-               if (copy_from_user(ifr++, ifr32++, sizeof (struct ifreq32))) {
-                       kfree (ifc.ifc_buf);
-                       return -EFAULT;
-               }
-       }
-       old_fs = get_fs(); set_fs (KERNEL_DS);
-       err = sys_ioctl (fd, SIOCGIFCONF, (unsigned long)&ifc); 
-       set_fs (old_fs);
-       if (!err) {
-               ifr = ifc.ifc_req;
-               ifr32 = (struct ifreq32 *)A(ifc32.ifcbuf);
-               for (i = 0, j = 0; i < ifc32.ifc_len && j < ifc.ifc_len;
-                    i += sizeof (struct ifreq32), j += sizeof (struct ifreq)) {
-                       if (copy_to_user(ifr32++, ifr++, sizeof (struct ifreq32))) {
-                               err = -EFAULT;
-                               break;
-                       }
-               }
-               if (!err) {
-                       if (i <= ifc32.ifc_len)
-                               ifc32.ifc_len = i;
-                       else
-                               ifc32.ifc_len = i - sizeof (struct ifreq32);
-                       if (copy_to_user((struct ifconf32 *)arg, &ifc32, sizeof(struct ifconf32)))
-                               err = -EFAULT;
-               }
-       }
-       if(ifc.ifc_buf != NULL)
-               kfree (ifc.ifc_buf);
-       return err;
-}
-
-static int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       struct ifreq ifr;
-       mm_segment_t old_fs;
-       int err;
-       
-       switch (cmd) {
-       case SIOCSIFMAP:
-               err = copy_from_user(&ifr, (struct ifreq32 *)arg, sizeof(ifr.ifr_name));
-               err |= __get_user(ifr.ifr_map.mem_start, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_start));
-               err |= __get_user(ifr.ifr_map.mem_end, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_end));
-               err |= __get_user(ifr.ifr_map.base_addr, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.base_addr));
-               err |= __get_user(ifr.ifr_map.irq, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.irq));
-               err |= __get_user(ifr.ifr_map.dma, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.dma));
-               err |= __get_user(ifr.ifr_map.port, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.port));
-               if (err)
-                       return -EFAULT;
-               break;
-       case SIOCGPPPSTATS:
-       case SIOCGPPPCSTATS:
-       case SIOCGPPPVER:
-       case SIOCETHTOOL:
-               if (copy_from_user(&ifr, (struct ifreq32 *)arg, sizeof(struct ifreq32)))
-                       return -EFAULT;
-               ifr.ifr_data = (__kernel_caddr_t)get_zeroed_page(GFP_KERNEL);
-               if (!ifr.ifr_data)
-                       return -EAGAIN;
-               if(cmd == SIOCETHTOOL) {
-                       u32 data;
-
-                       __get_user(data, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_data));
-                       if(copy_from_user(ifr.ifr_data,
-                                         (char *)A(data),
-                                         sizeof(struct ethtool_cmd))) {
-                               free_page((unsigned long)ifr.ifr_data);
-                               return -EFAULT;
-                       }
-               }
-               break;
-       default:
-               if (copy_from_user(&ifr, (struct ifreq32 *)arg, sizeof(struct ifreq32)))
-                       return -EFAULT;
-               break;
-       }
-       old_fs = get_fs();
-       set_fs (KERNEL_DS);
-       err = sys_ioctl (fd, cmd, (unsigned long)&ifr);
-       set_fs (old_fs);
-       if (!err) {
-               switch (cmd) {
-               case SIOCGIFFLAGS:
-               case SIOCGIFMETRIC:
-               case SIOCGIFMTU:
-               case SIOCGIFMEM:
-               case SIOCGIFHWADDR:
-               case SIOCGIFINDEX:
-               case SIOCGIFADDR:
-               case SIOCGIFBRDADDR:
-               case SIOCGIFDSTADDR:
-               case SIOCGIFNETMASK:
-               case SIOCGIFTXQLEN:
-                       if (copy_to_user((struct ifreq32 *)arg, &ifr, sizeof(struct ifreq32)))
-                               return -EFAULT;
-                       break;
-               case SIOCGPPPSTATS:
-               case SIOCGPPPCSTATS:
-               case SIOCGPPPVER:
-               case SIOCETHTOOL:
-               {
-                       u32 data;
-                       int len;
-
-                       __get_user(data, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_data));
-                       if(cmd == SIOCETHTOOL)
-                               len = sizeof(struct ethtool_cmd);
-                       if(cmd == SIOCGPPPVER)
-                               len = strlen((char *)ifr.ifr_data) + 1;
-                       else if(cmd == SIOCGPPPCSTATS)
-                               len = sizeof(struct ppp_comp_stats);
-                       else
-                               len = sizeof(struct ppp_stats);
-
-                       len = copy_to_user((char *)A(data), ifr.ifr_data, len);
-                       free_page((unsigned long)ifr.ifr_data);
-                       if(len)
-                               return -EFAULT;
-                       break;
-               }
-               case SIOCGIFMAP:
-                       err = copy_to_user((struct ifreq32 *)arg, &ifr, sizeof(ifr.ifr_name));
-                       err |= __put_user(ifr.ifr_map.mem_start, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_start));
-                       err |= __put_user(ifr.ifr_map.mem_end, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_end));
-                       err |= __put_user(ifr.ifr_map.base_addr, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.base_addr));
-                       err |= __put_user(ifr.ifr_map.irq, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.irq));
-                       err |= __put_user(ifr.ifr_map.dma, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.dma));
-                       err |= __put_user(ifr.ifr_map.port, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.port));
-                       if (err)
-                               err = -EFAULT;
-                       break;
-               }
-       }
-       return err;
-}
-
-struct rtentry32 {
-        u32            rt_pad1;
-        struct sockaddr rt_dst;         /* target address               */
-        struct sockaddr rt_gateway;     /* gateway addr (RTF_GATEWAY)   */
-        struct sockaddr rt_genmask;     /* target network mask (IP)     */
-        unsigned short  rt_flags;
-        short           rt_pad2;
-        u32            rt_pad3;
-        unsigned char   rt_tos;
-        unsigned char   rt_class;
-        short           rt_pad4;
-        short           rt_metric;      /* +1 for binary compatibility! */
-        /* char * */ u32 rt_dev;        /* forcing the device at add    */
-        u32            rt_mtu;         /* per route MTU/Window         */
-        u32            rt_window;      /* Window clamping              */
-        unsigned short  rt_irtt;        /* Initial RTT                  */
-
-};
-
-static inline int routing_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       struct rtentry r;
-       char devname[16];
-       u32 rtdev;
-       int ret;
-       mm_segment_t old_fs = get_fs();
-       
-       ret = copy_from_user (&r.rt_dst, &(((struct rtentry32 *)arg)->rt_dst), 3 * sizeof(struct sockaddr));
-       ret |= __get_user (r.rt_flags, &(((struct rtentry32 *)arg)->rt_flags));
-       ret |= __get_user (r.rt_metric, &(((struct rtentry32 *)arg)->rt_metric));
-       ret |= __get_user (r.rt_mtu, &(((struct rtentry32 *)arg)->rt_mtu));
-       ret |= __get_user (r.rt_window, &(((struct rtentry32 *)arg)->rt_window));
-       ret |= __get_user (r.rt_irtt, &(((struct rtentry32 *)arg)->rt_irtt));
-       ret |= __get_user (rtdev, &(((struct rtentry32 *)arg)->rt_dev));
-       if (rtdev) {
-               ret |= copy_from_user (devname, (char *)A(rtdev), 15);
-               r.rt_dev = devname; devname[15] = 0;
-       } else
-               r.rt_dev = 0;
-       if (ret)
-               return -EFAULT;
-       set_fs (KERNEL_DS);
-       ret = sys_ioctl (fd, cmd, (long)&r);
-       set_fs (old_fs);
-       return ret;
-}
-
-struct hd_geometry32 {
-       unsigned char heads;
-       unsigned char sectors;
-       unsigned short cylinders;
-       u32 start;
-};
-                        
-static inline int hdio_getgeo(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       struct hd_geometry geo;
-       int err;
-       
-       set_fs (KERNEL_DS);
-       err = sys_ioctl(fd, HDIO_GETGEO, (unsigned long)&geo);
-       set_fs (old_fs);
-       if (!err) {
-               err = copy_to_user ((struct hd_geometry32 *)arg, &geo, 4);
-               err |= __put_user (geo.start, &(((struct hd_geometry32 *)arg)->start));
-       }
-       return err ? -EFAULT : 0;
-}
-
-
-#if 0
-/* looks like SPARC only - eg sbus video */
-struct  fbcmap32 {
-       int             index;          /* first element (0 origin) */
-       int             count;
-       u32             red;
-       u32             green;
-       u32             blue;
-};
-
-
-static inline int fbiogetputcmap(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       struct fbcmap f;
-       int ret;
-       char red[256], green[256], blue[256];
-       u32 r, g, b;
-       mm_segment_t old_fs = get_fs();
-       
-       ret = get_user(f.index, &(((struct fbcmap32 *)arg)->index));
-       ret |= __get_user(f.count, &(((struct fbcmap32 *)arg)->count));
-       ret |= __get_user(r, &(((struct fbcmap32 *)arg)->red));
-       ret |= __get_user(g, &(((struct fbcmap32 *)arg)->green));
-       ret |= __get_user(b, &(((struct fbcmap32 *)arg)->blue));
-       if (ret)
-               return -EFAULT;
-       if ((f.index < 0) || (f.index > 255)) return -EINVAL;
-       if (f.index + f.count > 256)
-               f.count = 256 - f.index;
-       if (cmd == FBIOPUTCMAP32) {
-               ret = copy_from_user (red, (char *)A(r), f.count);
-               ret |= copy_from_user (green, (char *)A(g), f.count);
-               ret |= copy_from_user (blue, (char *)A(b), f.count);
-               if (ret)
-                       return -EFAULT;
-       }
-       f.red = red; f.green = green; f.blue = blue;
-       set_fs (KERNEL_DS);
-       ret = sys_ioctl (fd, (cmd == FBIOPUTCMAP32) ? FBIOPUTCMAP_SPARC : FBIOGETCMAP_SPARC, (long)&f);
-       set_fs (old_fs);
-       if (!ret && cmd == FBIOGETCMAP32) {
-               ret = copy_to_user ((char *)A(r), red, f.count);
-               ret |= copy_to_user ((char *)A(g), green, f.count);
-               ret |= copy_to_user ((char *)A(b), blue, f.count);
-       }
-       return ret ? -EFAULT : 0;
-}
-
-struct fbcursor32 {
-       short set;              /* what to set, choose from the list above */
-       short enable;           /* cursor on/off */
-       struct fbcurpos pos;    /* cursor position */
-       struct fbcurpos hot;    /* cursor hot spot */
-       struct fbcmap32 cmap;   /* color map info */
-       struct fbcurpos size;   /* cursor bit map size */
-       u32     image;          /* cursor image bits */
-       u32     mask;           /* cursor mask bits */
-};
-       
-static inline int fbiogscursor(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       struct fbcursor f;
-       int ret;
-       char red[2], green[2], blue[2];
-       char image[128], mask[128];
-       u32 r, g, b;
-       u32 m, i;
-       mm_segment_t old_fs = get_fs();
-       
-       ret = copy_from_user (&f, (struct fbcursor32 *)arg, 2 * sizeof (short) + 2 * sizeof(struct fbcurpos));
-       ret |= __get_user(f.size.fbx, &(((struct fbcursor32 *)arg)->size.fbx));
-       ret |= __get_user(f.size.fby, &(((struct fbcursor32 *)arg)->size.fby));
-       ret |= __get_user(f.cmap.index, &(((struct fbcursor32 *)arg)->cmap.index));
-       ret |= __get_user(f.cmap.count, &(((struct fbcursor32 *)arg)->cmap.count));
-       ret |= __get_user(r, &(((struct fbcursor32 *)arg)->cmap.red));
-       ret |= __get_user(g, &(((struct fbcursor32 *)arg)->cmap.green));
-       ret |= __get_user(b, &(((struct fbcursor32 *)arg)->cmap.blue));
-       ret |= __get_user(m, &(((struct fbcursor32 *)arg)->mask));
-       ret |= __get_user(i, &(((struct fbcursor32 *)arg)->image));
-       if (ret)
-               return -EFAULT;
-       if (f.set & FB_CUR_SETCMAP) {
-               if ((uint) f.size.fby > 32)
-                       return -EINVAL;
-               ret = copy_from_user (mask, (char *)A(m), f.size.fby * 4);
-               ret |= copy_from_user (image, (char *)A(i), f.size.fby * 4);
-               if (ret)
-                       return -EFAULT;
-               f.image = image; f.mask = mask;
-       }
-       if (f.set & FB_CUR_SETCMAP) {
-               ret = copy_from_user (red, (char *)A(r), 2);
-               ret |= copy_from_user (green, (char *)A(g), 2);
-               ret |= copy_from_user (blue, (char *)A(b), 2);
-               if (ret)
-                       return -EFAULT;
-               f.cmap.red = red; f.cmap.green = green; f.cmap.blue = blue;
-       }
-       set_fs (KERNEL_DS);
-       ret = sys_ioctl (fd, FBIOSCURSOR, (long)&f);
-       set_fs (old_fs);
-       return ret;
-}
-#endif /* 0 */
-
-struct fb_fix_screeninfo32 {
-       char            id[16];
-        compat_caddr_t smem_start;
-       __u32           smem_len;
-       __u32           type;
-       __u32           type_aux;
-       __u32           visual;
-       __u16           xpanstep;
-       __u16           ypanstep;
-       __u16           ywrapstep;
-       __u32           line_length;
-        compat_caddr_t mmio_start;
-       __u32           mmio_len;
-       __u32           accel;
-       __u16           reserved[3];
-};
-
-struct fb_cmap32 {
-       __u32           start;
-       __u32           len;
-       compat_caddr_t  red;
-       compat_caddr_t  green;
-       compat_caddr_t  blue;
-       compat_caddr_t  transp;
-};
-
-static int fb_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       u32 red = 0, green = 0, blue = 0, transp = 0;
-       struct fb_fix_screeninfo fix;
-       struct fb_cmap cmap;
-       void *karg;
-       int err = 0;
-
-       memset(&cmap, 0, sizeof(cmap));
-       switch (cmd) {
-       case FBIOGET_FSCREENINFO:
-               karg = &fix;
-               break;
-       case FBIOGETCMAP:
-       case FBIOPUTCMAP:
-               karg = &cmap;
-               err = __get_user(cmap.start, &((struct fb_cmap32 *)arg)->start);
-               err |= __get_user(cmap.len, &((struct fb_cmap32 *)arg)->len);
-               err |= __get_user(red, &((struct fb_cmap32 *)arg)->red);
-               err |= __get_user(green, &((struct fb_cmap32 *)arg)->green);
-               err |= __get_user(blue, &((struct fb_cmap32 *)arg)->blue);
-               err |= __get_user(transp, &((struct fb_cmap32 *)arg)->transp);
-               if (err) {
-                       err = -EFAULT;
-                       goto out;
-               }
-               err = -ENOMEM;
-               cmap.red = kmalloc(cmap.len * sizeof(__u16), GFP_KERNEL);
-               if (!cmap.red)
-                       goto out;
-               cmap.green = kmalloc(cmap.len * sizeof(__u16), GFP_KERNEL);
-               if (!cmap.green)
-                       goto out;
-               cmap.blue = kmalloc(cmap.len * sizeof(__u16), GFP_KERNEL);
-               if (!cmap.blue)
-                       goto out;
-               if (transp) {
-                       cmap.transp = kmalloc(cmap.len * sizeof(__u16), GFP_KERNEL);
-                       if (!cmap.transp)
-                               goto out;
-               }
-                       
-               if (cmd == FBIOGETCMAP)
-                       break;
-
-               err = __copy_from_user(cmap.red, (char *)A(red), cmap.len * sizeof(__u16));
-               err |= __copy_from_user(cmap.green, (char *)A(green), cmap.len * sizeof(__u16));
-               err |= __copy_from_user(cmap.blue, (char *)A(blue), cmap.len * sizeof(__u16));
-               if (cmap.transp) err |= __copy_from_user(cmap.transp, (char *)A(transp), cmap.len * sizeof(__u16));
-               if (err) {
-                       err = -EFAULT;
-                       goto out;
-               }
-               break;
-       default:
-               do {
-                       static int count = 0;
-                       if (++count <= 20)
-                               printk(KERN_WARNING
-                                       "%s: Unknown fb ioctl cmd fd(%d) "
-                                       "cmd(%08x) arg(%08lx)\n",
-                                       __FUNCTION__, fd, cmd, arg);
-               } while(0);
-               return -ENOSYS;
-       }
-       set_fs(KERNEL_DS);
-       err = sys_ioctl(fd, cmd, (unsigned long)karg);
-       set_fs(old_fs);
-       if (err)
-               goto out;
-       switch (cmd) {
-               struct fb_fix_screeninfo32 fix32;
-       case FBIOGET_FSCREENINFO:
-               memset(&fix32, 0, sizeof(fix32));
-               memcpy(fix32.id, fix.id, sizeof(fix32.id));
-               fix32.smem_start = (__u32)(unsigned long)fix.smem_start;
-               fix32.smem_len  = fix.smem_len;
-               fix32.type      = fix.type;
-               fix32.type_aux  = fix.type_aux;
-               fix32.visual    = fix.visual;
-               fix32.xpanstep  = fix.xpanstep;
-               fix32.ypanstep  = fix.ypanstep;
-               fix32.ywrapstep = fix.ywrapstep;
-               fix32.line_length = fix.line_length;
-               fix32.mmio_start = (__u32)(unsigned long)fix.mmio_start;
-               fix32.mmio_len  = fix.mmio_len;
-               fix32.accel     = fix.accel;
-               memcpy(fix32.reserved, fix.reserved, sizeof(fix32.reserved));
-               err = __copy_to_user((void *) arg, (const void *) &fix32, sizeof(fix32));
-
-printk("fix  : %lx %x  %x %x %x  %x %x %x %x  %lx %x %x\n",
-       fix.smem_start, fix.smem_len,
-       fix.type, fix.type_aux, fix.visual,
-       fix.xpanstep, fix.ypanstep, fix.ywrapstep, fix.line_length,
-       fix.mmio_start, fix.mmio_len, fix.accel);
-printk("fix32: %x %x  %x %x %x  %x %x %x %x  %x %x %x\n",
-       fix32.smem_start, fix32.smem_len,
-       fix32.type, fix32.type_aux, fix32.visual,
-       fix32.xpanstep, fix32.ypanstep, fix32.ywrapstep, fix32.line_length,
-       fix32.mmio_start, fix32.mmio_len, fix32.accel);
-
-               break;
-       case FBIOGETCMAP:
-               err = __copy_to_user((char *)A(red), cmap.red, cmap.len * sizeof(__u16));
-               err |= __copy_to_user((char *)A(green), cmap.blue, cmap.len * sizeof(__u16));
-               err |= __copy_to_user((char *)A(blue), cmap.blue, cmap.len * sizeof(__u16));
-               if (cmap.transp)
-                       err |= __copy_to_user((char *)A(transp), cmap.transp, cmap.len * sizeof(__u16));
-               break;
-       case FBIOPUTCMAP:
-               break;
-       }
-       if (err)
-               err = -EFAULT;
-
-out:   if (cmap.red) kfree(cmap.red);
-       if (cmap.green) kfree(cmap.green);
-       if (cmap.blue) kfree(cmap.blue);
-       if (cmap.transp) kfree(cmap.transp);
-       return err;
-}
-
-static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       unsigned long kval;
-       unsigned int *uvp;
-       int error;
-
-       set_fs(KERNEL_DS);
-       error = sys_ioctl(fd, cmd, (long)&kval);
-       set_fs(old_fs);
-
-       if(error == 0) {
-               uvp = (unsigned int *)arg;
-               if(put_user(kval, uvp))
-                       error = -EFAULT;
-       }
-       return error;
-}
-
-struct floppy_struct32 {
-       unsigned int    size;
-       unsigned int    sect;
-       unsigned int    head;
-       unsigned int    track;
-       unsigned int    stretch;
-       unsigned char   gap;
-       unsigned char   rate;
-       unsigned char   spec1;
-       unsigned char   fmt_gap;
-       const compat_caddr_t name;
-};
-
-struct floppy_drive_params32 {
-       char            cmos;
-       u32             max_dtr;
-       u32             hlt;
-       u32             hut;
-       u32             srt;
-       u32             spinup;
-       u32             spindown;
-       unsigned char   spindown_offset;
-       unsigned char   select_delay;
-       unsigned char   rps;
-       unsigned char   tracks;
-       u32             timeout;
-       unsigned char   interleave_sect;
-       struct floppy_max_errors max_errors;
-       char            flags;
-       char            read_track;
-       short           autodetect[8];
-       int             checkfreq;
-       int             native_format;
-};
-
-struct floppy_drive_struct32 {
-       signed char     flags;
-       u32             spinup_date;
-       u32             select_date;
-       u32             first_read_date;
-       short           probed_format;
-       short           track;
-       short           maxblock;
-       short           maxtrack;
-       int             generation;
-       int             keep_data;
-       int             fd_ref;
-       int             fd_device;
-       int             last_checked;
-       compat_caddr_t  dmabuf;
-       int             bufblocks;
-};
-
-struct floppy_fdc_state32 {
-       int             spec1;
-       int             spec2;
-       int             dtr;
-       unsigned char   version;
-       unsigned char   dor;
-       u32             address;
-       unsigned int    rawcmd:2;
-       unsigned int    reset:1;
-       unsigned int    need_configure:1;
-       unsigned int    perp_mode:2;
-       unsigned int    has_fifo:1;
-       unsigned int    driver_version;
-       unsigned char   track[4];
-};
-
-struct floppy_write_errors32 {
-       unsigned int    write_errors;
-       u32             first_error_sector;
-       int             first_error_generation;
-       u32             last_error_sector;
-       int             last_error_generation;
-       unsigned int    badness;
-};
-
-#define FDSETPRM32 _IOW(2, 0x42, struct floppy_struct32)
-#define FDDEFPRM32 _IOW(2, 0x43, struct floppy_struct32)
-#define FDGETPRM32 _IOR(2, 0x04, struct floppy_struct32)
-#define FDSETDRVPRM32 _IOW(2, 0x90, struct floppy_drive_params32)
-#define FDGETDRVPRM32 _IOR(2, 0x11, struct floppy_drive_params32)
-#define FDGETDRVSTAT32 _IOR(2, 0x12, struct floppy_drive_struct32)
-#define FDPOLLDRVSTAT32 _IOR(2, 0x13, struct floppy_drive_struct32)
-#define FDGETFDCSTAT32 _IOR(2, 0x15, struct floppy_fdc_state32)
-#define FDWERRORGET32  _IOR(2, 0x17, struct floppy_write_errors32)
-
-static struct {
-       unsigned int    cmd32;
-       unsigned int    cmd;
-} fd_ioctl_trans_table[] = {
-       { FDSETPRM32, FDSETPRM },
-       { FDDEFPRM32, FDDEFPRM },
-       { FDGETPRM32, FDGETPRM },
-       { FDSETDRVPRM32, FDSETDRVPRM },
-       { FDGETDRVPRM32, FDGETDRVPRM },
-       { FDGETDRVSTAT32, FDGETDRVSTAT },
-       { FDPOLLDRVSTAT32, FDPOLLDRVSTAT },
-       { FDGETFDCSTAT32, FDGETFDCSTAT },
-       { FDWERRORGET32, FDWERRORGET }
-};
-
-#define NR_FD_IOCTL_TRANS (sizeof(fd_ioctl_trans_table)/sizeof(fd_ioctl_trans_table[0]))
-
-static int fd_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       void *karg = NULL;
-       unsigned int kcmd = 0;
-       int i, err;
-
-       for (i = 0; i < NR_FD_IOCTL_TRANS; i++)
-               if (cmd == fd_ioctl_trans_table[i].cmd32) {
-                       kcmd = fd_ioctl_trans_table[i].cmd;
-                       break;
-               }
-       if (!kcmd)
-               return -EINVAL;
-
-       switch (cmd) {
-               case FDSETPRM32:
-               case FDDEFPRM32:
-               case FDGETPRM32:
-               {
-                       struct floppy_struct *f;
-
-                       f = karg = kmalloc(sizeof(struct floppy_struct), GFP_KERNEL);
-                       if (!karg)
-                               return -ENOMEM;
-                       if (cmd == FDGETPRM32)
-                               break;
-                       err = __get_user(f->size, &((struct floppy_struct32 *)arg)->size);
-                       err |= __get_user(f->sect, &((struct floppy_struct32 *)arg)->sect);
-                       err |= __get_user(f->head, &((struct floppy_struct32 *)arg)->head);
-                       err |= __get_user(f->track, &((struct floppy_struct32 *)arg)->track);
-                       err |= __get_user(f->stretch, &((struct floppy_struct32 *)arg)->stretch);
-                       err |= __get_user(f->gap, &((struct floppy_struct32 *)arg)->gap);
-                       err |= __get_user(f->rate, &((struct floppy_struct32 *)arg)->rate);
-                       err |= __get_user(f->spec1, &((struct floppy_struct32 *)arg)->spec1);
-                       err |= __get_user(f->fmt_gap, &((struct floppy_struct32 *)arg)->fmt_gap);
-                       err |= __get_user((u64)f->name, &((struct floppy_struct32 *)arg)->name);
-                       if (err) {
-                               err = -EFAULT;
-                               goto out;
-                       }
-                       break;
-               }
-               case FDSETDRVPRM32:
-               case FDGETDRVPRM32:
-               {
-                       struct floppy_drive_params *f;
-
-                       f = karg = kmalloc(sizeof(struct floppy_drive_params), GFP_KERNEL);
-                       if (!karg)
-                               return -ENOMEM;
-                       if (cmd == FDGETDRVPRM32)
-                               break;
-                       err = __get_user(f->cmos, &((struct floppy_drive_params32 *)arg)->cmos);
-                       err |= __get_user(f->max_dtr, &((struct floppy_drive_params32 *)arg)->max_dtr);
-                       err |= __get_user(f->hlt, &((struct floppy_drive_params32 *)arg)->hlt);
-                       err |= __get_user(f->hut, &((struct floppy_drive_params32 *)arg)->hut);
-                       err |= __get_user(f->srt, &((struct floppy_drive_params32 *)arg)->srt);
-                       err |= __get_user(f->spinup, &((struct floppy_drive_params32 *)arg)->spinup);
-                       err |= __get_user(f->spindown, &((struct floppy_drive_params32 *)arg)->spindown);
-                       err |= __get_user(f->spindown_offset, &((struct floppy_drive_params32 *)arg)->spindown_offset);
-                       err |= __get_user(f->select_delay, &((struct floppy_drive_params32 *)arg)->select_delay);
-                       err |= __get_user(f->rps, &((struct floppy_drive_params32 *)arg)->rps);
-                       err |= __get_user(f->tracks, &((struct floppy_drive_params32 *)arg)->tracks);
-                       err |= __get_user(f->timeout, &((struct floppy_drive_params32 *)arg)->timeout);
-                       err |= __get_user(f->interleave_sect, &((struct floppy_drive_params32 *)arg)->interleave_sect);
-                       err |= __copy_from_user(&f->max_errors, &((struct floppy_drive_params32 *)arg)->max_errors, sizeof(f->max_errors));
-                       err |= __get_user(f->flags, &((struct floppy_drive_params32 *)arg)->flags);
-                       err |= __get_user(f->read_track, &((struct floppy_drive_params32 *)arg)->read_track);
-                       err |= __copy_from_user(f->autodetect, ((struct floppy_drive_params32 *)arg)->autodetect, sizeof(f->autodetect));
-                       err |= __get_user(f->checkfreq, &((struct floppy_drive_params32 *)arg)->checkfreq);
-                       err |= __get_user(f->native_format, &((struct floppy_drive_params32 *)arg)->native_format);
-                       if (err) {
-                               err = -EFAULT;
-                               goto out;
-                       }
-                       break;
-               }
-               case FDGETDRVSTAT32:
-               case FDPOLLDRVSTAT32:
-                       karg = kmalloc(sizeof(struct floppy_drive_struct), GFP_KERNEL);
-                       if (!karg)
-                               return -ENOMEM;
-                       break;
-               case FDGETFDCSTAT32:
-                       karg = kmalloc(sizeof(struct floppy_fdc_state), GFP_KERNEL);
-                       if (!karg)
-                               return -ENOMEM;
-                       break;
-               case FDWERRORGET32:
-                       karg = kmalloc(sizeof(struct floppy_write_errors), GFP_KERNEL);
-                       if (!karg)
-                               return -ENOMEM;
-                       break;
-               default:
-                       return -EINVAL;
-       }
-       set_fs (KERNEL_DS);
-       err = sys_ioctl (fd, kcmd, (unsigned long)karg);
-       set_fs (old_fs);
-       if (err)
-               goto out;
-       switch (cmd) {
-               case FDGETPRM32:
-               {
-                       struct floppy_struct *f = karg;
-
-                       err = __put_user(f->size, &((struct floppy_struct32 *)arg)->size);
-                       err |= __put_user(f->sect, &((struct floppy_struct32 *)arg)->sect);
-                       err |= __put_user(f->head, &((struct floppy_struct32 *)arg)->head);
-                       err |= __put_user(f->track, &((struct floppy_struct32 *)arg)->track);
-                       err |= __put_user(f->stretch, &((struct floppy_struct32 *)arg)->stretch);
-                       err |= __put_user(f->gap, &((struct floppy_struct32 *)arg)->gap);
-                       err |= __put_user(f->rate, &((struct floppy_struct32 *)arg)->rate);
-                       err |= __put_user(f->spec1, &((struct floppy_struct32 *)arg)->spec1);
-                       err |= __put_user(f->fmt_gap, &((struct floppy_struct32 *)arg)->fmt_gap);
-                       err |= __put_user((u64)f->name, &((struct floppy_struct32 *)arg)->name);
-                       break;
-               }
-               case FDGETDRVPRM32:
-               {
-                       struct floppy_drive_params *f = karg;
-
-                       err = __put_user(f->cmos, &((struct floppy_drive_params32 *)arg)->cmos);
-                       err |= __put_user(f->max_dtr, &((struct floppy_drive_params32 *)arg)->max_dtr);
-                       err |= __put_user(f->hlt, &((struct floppy_drive_params32 *)arg)->hlt);
-                       err |= __put_user(f->hut, &((struct floppy_drive_params32 *)arg)->hut);
-                       err |= __put_user(f->srt, &((struct floppy_drive_params32 *)arg)->srt);
-                       err |= __put_user(f->spinup, &((struct floppy_drive_params32 *)arg)->spinup);
-                       err |= __put_user(f->spindown, &((struct floppy_drive_params32 *)arg)->spindown);
-                       err |= __put_user(f->spindown_offset, &((struct floppy_drive_params32 *)arg)->spindown_offset);
-                       err |= __put_user(f->select_delay, &((struct floppy_drive_params32 *)arg)->select_delay);
-                       err |= __put_user(f->rps, &((struct floppy_drive_params32 *)arg)->rps);
-                       err |= __put_user(f->tracks, &((struct floppy_drive_params32 *)arg)->tracks);
-                       err |= __put_user(f->timeout, &((struct floppy_drive_params32 *)arg)->timeout);
-                       err |= __put_user(f->interleave_sect, &((struct floppy_drive_params32 *)arg)->interleave_sect);
-                       err |= __copy_to_user(&((struct floppy_drive_params32 *)arg)->max_errors, &f->max_errors, sizeof(f->max_errors));
-                       err |= __put_user(f->flags, &((struct floppy_drive_params32 *)arg)->flags);
-                       err |= __put_user(f->read_track, &((struct floppy_drive_params32 *)arg)->read_track);
-                       err |= __copy_to_user(((struct floppy_drive_params32 *)arg)->autodetect, f->autodetect, sizeof(f->autodetect));
-                       err |= __put_user(f->checkfreq, &((struct floppy_drive_params32 *)arg)->checkfreq);
-                       err |= __put_user(f->native_format, &((struct floppy_drive_params32 *)arg)->native_format);
-                       break;
-               }
-               case FDGETDRVSTAT32:
-               case FDPOLLDRVSTAT32:
-               {
-                       struct floppy_drive_struct *f = karg;
-
-                       err = __put_user(f->flags, &((struct floppy_drive_struct32 *)arg)->flags);
-                       err |= __put_user(f->spinup_date, &((struct floppy_drive_struct32 *)arg)->spinup_date);
-                       err |= __put_user(f->select_date, &((struct floppy_drive_struct32 *)arg)->select_date);
-                       err |= __put_user(f->first_read_date, &((struct floppy_drive_struct32 *)arg)->first_read_date);
-                       err |= __put_user(f->probed_format, &((struct floppy_drive_struct32 *)arg)->probed_format);
-                       err |= __put_user(f->track, &((struct floppy_drive_struct32 *)arg)->track);
-                       err |= __put_user(f->maxblock, &((struct floppy_drive_struct32 *)arg)->maxblock);
-                       err |= __put_user(f->maxtrack, &((struct floppy_drive_struct32 *)arg)->maxtrack);
-                       err |= __put_user(f->generation, &((struct floppy_drive_struct32 *)arg)->generation);
-                       err |= __put_user(f->keep_data, &((struct floppy_drive_struct32 *)arg)->keep_data);
-                       err |= __put_user(f->fd_ref, &((struct floppy_drive_struct32 *)arg)->fd_ref);
-                       err |= __put_user(f->fd_device, &((struct floppy_drive_struct32 *)arg)->fd_device);
-                       err |= __put_user(f->last_checked, &((struct floppy_drive_struct32 *)arg)->last_checked);
-                       err |= __put_user((u64)f->dmabuf, &((struct floppy_drive_struct32 *)arg)->dmabuf);
-                       err |= __put_user((u64)f->bufblocks, &((struct floppy_drive_struct32 *)arg)->bufblocks);
-                       break;
-               }
-               case FDGETFDCSTAT32:
-               {
-                       struct floppy_fdc_state *f = karg;
-
-                       err = __put_user(f->spec1, &((struct floppy_fdc_state32 *)arg)->spec1);
-                       err |= __put_user(f->spec2, &((struct floppy_fdc_state32 *)arg)->spec2);
-                       err |= __put_user(f->dtr, &((struct floppy_fdc_state32 *)arg)->dtr);
-                       err |= __put_user(f->version, &((struct floppy_fdc_state32 *)arg)->version);
-                       err |= __put_user(f->dor, &((struct floppy_fdc_state32 *)arg)->dor);
-                       err |= __put_user(f->address, &((struct floppy_fdc_state32 *)arg)->address);
-                       err |= __copy_to_user((char *)&((struct floppy_fdc_state32 *)arg)->address
-                                          + sizeof(((struct floppy_fdc_state32 *)arg)->address),
-                                          (char *)&f->address + sizeof(f->address), sizeof(int));
-                       err |= __put_user(f->driver_version, &((struct floppy_fdc_state32 *)arg)->driver_version);
-                       err |= __copy_to_user(((struct floppy_fdc_state32 *)arg)->track, f->track, sizeof(f->track));
-                       break;
-               }
-               case FDWERRORGET32:
-               {
-                       struct floppy_write_errors *f = karg;
-
-                       err = __put_user(f->write_errors, &((struct floppy_write_errors32 *)arg)->write_errors);
-                       err |= __put_user(f->first_error_sector, &((struct floppy_write_errors32 *)arg)->first_error_sector);
-                       err |= __put_user(f->first_error_generation, &((struct floppy_write_errors32 *)arg)->first_error_generation);
-                       err |= __put_user(f->last_error_sector, &((struct floppy_write_errors32 *)arg)->last_error_sector);
-                       err |= __put_user(f->last_error_generation, &((struct floppy_write_errors32 *)arg)->last_error_generation);
-                       err |= __put_user(f->badness, &((struct floppy_write_errors32 *)arg)->badness);
-                       break;
-               }
-               default:
-                       break;
-       }
-       if (err)
-               err = -EFAULT;
-
-out:   if (karg) kfree(karg);
-       return err;
-}
-
-struct ppp_option_data32 {
-       compat_caddr_t  ptr;
-       __u32           length;
-       int             transmit;
-};
-#define PPPIOCSCOMPRESS32      _IOW('t', 77, struct ppp_option_data32)
-
-struct ppp_idle32 {
-       compat_time_t xmit_idle;
-       compat_time_t recv_idle;
-};
-#define PPPIOCGIDLE32          _IOR('t', 63, struct ppp_idle32)
-
-static int ppp_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       struct ppp_option_data32 data32;
-       struct ppp_option_data data;
-       struct ppp_idle32 idle32;
-       struct ppp_idle idle;
-       unsigned int kcmd;
-       void *karg;
-       int err = 0;
-
-       switch (cmd) {
-       case PPPIOCGIDLE32:
-               kcmd = PPPIOCGIDLE;
-               karg = &idle;
-               break;
-       case PPPIOCSCOMPRESS32:
-               if (copy_from_user(&data32, (struct ppp_option_data32 *)arg, sizeof(struct ppp_option_data32)))
-                       return -EFAULT;
-               data.ptr = kmalloc (data32.length, GFP_KERNEL);
-               if (!data.ptr)
-                       return -ENOMEM;
-               if (copy_from_user(data.ptr, (__u8 *)A(data32.ptr), data32.length)) {
-                       kfree(data.ptr);
-                       return -EFAULT;
-               }
-               data.length = data32.length;
-               data.transmit = data32.transmit;
-               kcmd = PPPIOCSCOMPRESS;
-               karg = &data;
-               break;
-       default:
-               do {
-                       static int count = 0;
-                       if (++count <= 20)
-                               printk(KERN_WARNING
-                                       "ppp_ioctl: Unknown cmd fd(%d) "
-                                       "cmd(%08x) arg(%08x)\n",
-                                       (int)fd, (unsigned int)cmd, (unsigned int)arg);
-               } while(0);
-               return -EINVAL;
-       }
-       set_fs (KERNEL_DS);
-       err = sys_ioctl (fd, kcmd, (unsigned long)karg);
-       set_fs (old_fs);
-       switch (cmd) {
-       case PPPIOCGIDLE32:
-               if (err)
-                       return err;
-               idle32.xmit_idle = idle.xmit_idle;
-               idle32.recv_idle = idle.recv_idle;
-               if (copy_to_user((struct ppp_idle32 *)arg, &idle32, sizeof(struct ppp_idle32)))
-                       return -EFAULT;
-               break;
-       case PPPIOCSCOMPRESS32:
-               kfree(data.ptr);
-               break;
-       default:
-               break;
-       }
-       return err;
-}
-
-
-struct mtget32 {
-       __u32   mt_type;
-       __u32   mt_resid;
-       __u32   mt_dsreg;
-       __u32   mt_gstat;
-       __u32   mt_erreg;
-       compat_daddr_t  mt_fileno;
-       compat_daddr_t  mt_blkno;
-};
-#define MTIOCGET32     _IOR('m', 2, struct mtget32)
-
-struct mtpos32 {
-       __u32   mt_blkno;
-};
-#define MTIOCPOS32     _IOR('m', 3, struct mtpos32)
-
-struct mtconfiginfo32 {
-       __u32   mt_type;
-       __u32   ifc_type;
-       __u16   irqnr;
-       __u16   dmanr;
-       __u16   port;
-       __u32   debug;
-       __u32   have_dens:1;
-       __u32   have_bsf:1;
-       __u32   have_fsr:1;
-       __u32   have_bsr:1;
-       __u32   have_eod:1;
-       __u32   have_seek:1;
-       __u32   have_tell:1;
-       __u32   have_ras1:1;
-       __u32   have_ras2:1;
-       __u32   have_ras3:1;
-       __u32   have_qfa:1;
-       __u32   pad1:5;
-       char    reserved[10];
-};
-#define        MTIOCGETCONFIG32        _IOR('m', 4, struct mtconfiginfo32)
-#define        MTIOCSETCONFIG32        _IOW('m', 5, struct mtconfiginfo32)
-
-static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       struct mtconfiginfo info;
-       struct mtget get;
-       struct mtpos pos;
-       unsigned long kcmd;
-       void *karg;
-       int err = 0;
-
-       switch(cmd) {
-       case MTIOCPOS32:
-               kcmd = MTIOCPOS;
-               karg = &pos;
-               break;
-       case MTIOCGET32:
-               kcmd = MTIOCGET;
-               karg = &get;
-               break;
-       case MTIOCGETCONFIG32:
-               kcmd = MTIOCGETCONFIG;
-               karg = &info;
-               break;
-       case MTIOCSETCONFIG32:
-               kcmd = MTIOCSETCONFIG;
-               karg = &info;
-               err = __get_user(info.mt_type, &((struct mtconfiginfo32 *)arg)->mt_type);
-               err |= __get_user(info.ifc_type, &((struct mtconfiginfo32 *)arg)->ifc_type);
-               err |= __get_user(info.irqnr, &((struct mtconfiginfo32 *)arg)->irqnr);
-               err |= __get_user(info.dmanr, &((struct mtconfiginfo32 *)arg)->dmanr);
-               err |= __get_user(info.port, &((struct mtconfiginfo32 *)arg)->port);
-               err |= __get_user(info.debug, &((struct mtconfiginfo32 *)arg)->debug);
-               err |= __copy_from_user((char *)&info.debug + sizeof(info.debug),
-                                    (char *)&((struct mtconfiginfo32 *)arg)->debug
-                                    + sizeof(((struct mtconfiginfo32 *)arg)->debug), sizeof(__u32));
-               if (err)
-                       return -EFAULT;
-               break;
-       default:
-               do {
-                       static int count = 0;
-                       if (++count <= 20)
-                               printk(KERN_WARNING
-                                       "mt_ioctl: Unknown cmd fd(%d) "
-                                       "cmd(%08x) arg(%08x)\n",
-                                       (int)fd, (unsigned int)cmd, (unsigned int)arg);
-               } while(0);
-               return -EINVAL;
-       }
-       set_fs (KERNEL_DS);
-       err = sys_ioctl (fd, kcmd, (unsigned long)karg);
-       set_fs (old_fs);
-       if (err)
-               return err;
-       switch (cmd) {
-       case MTIOCPOS32:
-               err = __put_user(pos.mt_blkno, &((struct mtpos32 *)arg)->mt_blkno);
-               break;
-       case MTIOCGET32:
-               err = __put_user(get.mt_type, &((struct mtget32 *)arg)->mt_type);
-               err |= __put_user(get.mt_resid, &((struct mtget32 *)arg)->mt_resid);
-               err |= __put_user(get.mt_dsreg, &((struct mtget32 *)arg)->mt_dsreg);
-               err |= __put_user(get.mt_gstat, &((struct mtget32 *)arg)->mt_gstat);
-               err |= __put_user(get.mt_erreg, &((struct mtget32 *)arg)->mt_erreg);
-               err |= __put_user(get.mt_fileno, &((struct mtget32 *)arg)->mt_fileno);
-               err |= __put_user(get.mt_blkno, &((struct mtget32 *)arg)->mt_blkno);
-               break;
-       case MTIOCGETCONFIG32:
-               err = __put_user(info.mt_type, &((struct mtconfiginfo32 *)arg)->mt_type);
-               err |= __put_user(info.ifc_type, &((struct mtconfiginfo32 *)arg)->ifc_type);
-               err |= __put_user(info.irqnr, &((struct mtconfiginfo32 *)arg)->irqnr);
-               err |= __put_user(info.dmanr, &((struct mtconfiginfo32 *)arg)->dmanr);
-               err |= __put_user(info.port, &((struct mtconfiginfo32 *)arg)->port);
-               err |= __put_user(info.debug, &((struct mtconfiginfo32 *)arg)->debug);
-               err |= __copy_to_user((char *)&((struct mtconfiginfo32 *)arg)->debug
-                                          + sizeof(((struct mtconfiginfo32 *)arg)->debug),
-                                          (char *)&info.debug + sizeof(info.debug), sizeof(__u32));
-               break;
-       case MTIOCSETCONFIG32:
-               break;
-       }
-       return err ? -EFAULT: 0;
-}
-
-struct cdrom_read32 {
-       int             cdread_lba;
-       compat_caddr_t  cdread_bufaddr;
-       int             cdread_buflen;
-};
-
-struct cdrom_read_audio32 {
-       union cdrom_addr        addr;
-       u_char                  addr_format;
-       int                     nframes;
-       compat_caddr_t          buf;
-};
-
-struct cdrom_generic_command32 {
-       unsigned char   cmd[CDROM_PACKET_SIZE];
-       compat_caddr_t  buffer;
-       unsigned int    buflen;
-       int             stat;
-       compat_caddr_t  sense;
-       compat_caddr_t  reserved[3];
-};
-
-static int cdrom_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       struct cdrom_read cdread;
-       struct cdrom_read_audio cdreadaudio;
-       struct cdrom_generic_command cgc;
-       compat_caddr_t addr;
-       char *data = 0;
-       void *karg;
-       int err = 0;
-
-       switch(cmd) {
-       case CDROMREADMODE2:
-       case CDROMREADMODE1:
-       case CDROMREADRAW:
-       case CDROMREADCOOKED:
-               karg = &cdread;
-               err = __get_user(cdread.cdread_lba, &((struct cdrom_read32 *)arg)->cdread_lba);
-               err |= __get_user(addr, &((struct cdrom_read32 *)arg)->cdread_bufaddr);
-               err |= __get_user(cdread.cdread_buflen, &((struct cdrom_read32 *)arg)->cdread_buflen);
-               if (err)
-                       return -EFAULT;
-               data = kmalloc(cdread.cdread_buflen, GFP_KERNEL);
-               if (!data)
-                       return -ENOMEM;
-               cdread.cdread_bufaddr = data;
-               break;
-       case CDROMREADAUDIO:
-               karg = &cdreadaudio;
-               err = copy_from_user(&cdreadaudio.addr, &((struct cdrom_read_audio32 *)arg)->addr, sizeof(cdreadaudio.addr));
-               err |= __get_user(cdreadaudio.addr_format, &((struct cdrom_read_audio32 *)arg)->addr_format);
-               err |= __get_user(cdreadaudio.nframes, &((struct cdrom_read_audio32 *)arg)->nframes); 
-               err |= __get_user(addr, &((struct cdrom_read_audio32 *)arg)->buf);
-               if (err)
-                       return -EFAULT;
-               data = kmalloc(cdreadaudio.nframes * 2352, GFP_KERNEL);
-               if (!data)
-                       return -ENOMEM;
-               cdreadaudio.buf = data;
-               break;
-       case CDROM_SEND_PACKET:
-               karg = &cgc;
-               err = copy_from_user(cgc.cmd, &((struct cdrom_generic_command32 *)arg)->cmd, sizeof(cgc.cmd));
-               err |= __get_user(addr, &((struct cdrom_generic_command32 *)arg)->buffer);
-               err |= __get_user(cgc.buflen, &((struct cdrom_generic_command32 *)arg)->buflen);
-               if (err)
-                       return -EFAULT;
-               if ((data = kmalloc(cgc.buflen, GFP_KERNEL)) == NULL)
-                       return -ENOMEM;
-               cgc.buffer = data;
-               break;
-       default:
-               do {
-                       static int count = 0;
-                       if (++count <= 20)
-                               printk(KERN_WARNING
-                                       "cdrom_ioctl: Unknown cmd fd(%d) "
-                                       "cmd(%08x) arg(%08x)\n",
-                                       (int)fd, (unsigned int)cmd, (unsigned int)arg);
-               } while(0);
-               return -EINVAL;
-       }
-       set_fs (KERNEL_DS);
-       err = sys_ioctl (fd, cmd, (unsigned long)karg);
-       set_fs (old_fs);
-       if (err)
-               goto out;
-       switch (cmd) {
-       case CDROMREADMODE2:
-       case CDROMREADMODE1:
-       case CDROMREADRAW:
-       case CDROMREADCOOKED:
-               err = copy_to_user((char *)A(addr), data, cdread.cdread_buflen);
-               break;
-       case CDROMREADAUDIO:
-               err = copy_to_user((char *)A(addr), data, cdreadaudio.nframes * 2352);
-               break;
-       case CDROM_SEND_PACKET:
-               err = copy_to_user((char *)A(addr), data, cgc.buflen);
-               break;
-       default:
-               break;
-       }
-out:   if (data)
-               kfree(data);
-       return err ? -EFAULT : 0;
-}
-
-struct loop_info32 {
-       int             lo_number;      /* ioctl r/o */
-       compat_dev_t    lo_device;      /* ioctl r/o */
-       unsigned int    lo_inode;       /* ioctl r/o */
-       compat_dev_t    lo_rdevice;     /* ioctl r/o */
-       int             lo_offset;
-       int             lo_encrypt_type;
-       int             lo_encrypt_key_size;    /* ioctl w/o */
-       int             lo_flags;       /* ioctl r/o */
-       char            lo_name[LO_NAME_SIZE];
-       unsigned char   lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
-       unsigned int    lo_init[2];
-       char            reserved[4];
-};
-
-static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       struct loop_info l;
-       int err = -EINVAL;
-
-       switch(cmd) {
-       case LOOP_SET_STATUS:
-               err = get_user(l.lo_number, &((struct loop_info32 *)arg)->lo_number);
-               err |= __get_user(l.lo_device, &((struct loop_info32 *)arg)->lo_device);
-               err |= __get_user(l.lo_inode, &((struct loop_info32 *)arg)->lo_inode);
-               err |= __get_user(l.lo_rdevice, &((struct loop_info32 *)arg)->lo_rdevice);
-               err |= __copy_from_user((char *)&l.lo_offset, (char *)&((struct loop_info32 *)arg)->lo_offset,
-                                          8 + (unsigned long)l.lo_init - (unsigned long)&l.lo_offset);
-               if (err) {
-                       err = -EFAULT;
-               } else {
-                       set_fs (KERNEL_DS);
-                       err = sys_ioctl (fd, cmd, (unsigned long)&l);
-                       set_fs (old_fs);
-               }
-               break;
-       case LOOP_GET_STATUS:
-               set_fs (KERNEL_DS);
-               err = sys_ioctl (fd, cmd, (unsigned long)&l);
-               set_fs (old_fs);
-               if (!err) {
-                       err = put_user(l.lo_number, &((struct loop_info32 *)arg)->lo_number);
-                       err |= __put_user(l.lo_device, &((struct loop_info32 *)arg)->lo_device);
-                       err |= __put_user(l.lo_inode, &((struct loop_info32 *)arg)->lo_inode);
-                       err |= __put_user(l.lo_rdevice, &((struct loop_info32 *)arg)->lo_rdevice);
-                       err |= __copy_to_user((char *)&((struct loop_info32 *)arg)->lo_offset,
-                                          (char *)&l.lo_offset, (unsigned long)l.lo_init - (unsigned long)&l.lo_offset);
-                       if (err)
-                               err = -EFAULT;
-               }
-               break;
-       default: {
-               static int count = 0;
-               if (++count <= 20)
-                       printk(KERN_WARNING
-                               "%s: Unknown loop ioctl cmd, fd(%d) "
-                               "cmd(%08x) arg(%08lx)\n",
-                               __FUNCTION__, fd, cmd, arg);
-       }
-       }
-       return err;
-}
-
-#ifdef CONFIG_VT
-extern int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg);
-
-static int vt_check(struct file *file)
-{
-       struct tty_struct *tty;
-       struct inode *inode = file->f_dentry->d_inode;
-       
-       if (file->f_op->ioctl != tty_ioctl)
-               return -EINVAL;
-                       
-       tty = (struct tty_struct *)file->private_data;
-       if (tty_paranoia_check(tty, inode, "tty_ioctl"))
-               return -EINVAL;
-                                                       
-       if (tty->driver->ioctl != vt_ioctl)
-               return -EINVAL;
-       
-       /*
-        * To have permissions to do most of the vt ioctls, we either have
-        * to be the owner of the tty, or have CAP_SYS_TTY_CONFIG
-        */
-       if (current->tty == tty || capable(CAP_SYS_TTY_CONFIG))
-               return 1;
-       return 0;                                                    
-}
-
-struct consolefontdesc32 {
-       unsigned short charcount;       /* characters in font (256 or 512) */
-       unsigned short charheight;      /* scan lines per character (1-32) */
-       u32 chardata;                   /* font data in expanded form */
-};
-
-static int do_fontx_ioctl(unsigned int fd, int cmd, struct consolefontdesc32 *user_cfd, struct file *file)
-{
-       struct consolefontdesc cfdarg;
-       struct console_font_op op;
-       int i, perm;
-
-       perm = vt_check(file);
-       if (perm < 0) return perm;
-       
-       if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc32)))
-               return -EFAULT;
-       
-       cfdarg.chardata = (unsigned char *)A(((struct consolefontdesc32 *)&cfdarg)->chardata);
-       
-       switch (cmd) {
-       case PIO_FONTX:
-               if (!perm)
-                       return -EPERM;
-               op.op = KD_FONT_OP_SET;
-               op.flags = 0;
-               op.width = 8;
-               op.height = cfdarg.charheight;
-               op.charcount = cfdarg.charcount;
-               op.data = cfdarg.chardata;
-               return con_font_op(fg_console, &op);
-       case GIO_FONTX:
-               if (!cfdarg.chardata)
-                       return 0;
-               op.op = KD_FONT_OP_GET;
-               op.flags = 0;
-               op.width = 8;
-               op.height = cfdarg.charheight;
-               op.charcount = cfdarg.charcount;
-               op.data = cfdarg.chardata;
-               i = con_font_op(fg_console, &op);
-               if (i)
-                       return i;
-               cfdarg.charheight = op.height;
-               cfdarg.charcount = op.charcount;
-               ((struct consolefontdesc32 *)&cfdarg)->chardata = (unsigned long)cfdarg.chardata;
-               if (copy_to_user(user_cfd, &cfdarg, sizeof(struct consolefontdesc32)))
-                       return -EFAULT;
-               return 0;
-       }
-       return -EINVAL;
-}
-
-struct console_font_op32 {
-       unsigned int op;        /* operation code KD_FONT_OP_* */
-       unsigned int flags;     /* KD_FONT_FLAG_* */
-       unsigned int width, height;     /* font size */
-       unsigned int charcount;
-       u32 data;    /* font data with height fixed to 32 */
-};
-                                        
-static int do_kdfontop_ioctl(unsigned int fd, unsigned int cmd, struct console_font_op32 *fontop, struct file *file)
-{
-       struct console_font_op op;
-       int perm = vt_check(file), i;
-       struct vt_struct *vt;
-       
-       if (perm < 0) return perm;
-       
-       if (copy_from_user(&op, (void *) fontop, sizeof(struct console_font_op32)))
-               return -EFAULT;
-       if (!perm && op.op != KD_FONT_OP_GET)
-               return -EPERM;
-       op.data = (unsigned char *)A(((struct console_font_op32 *)&op)->data);
-       op.flags |= KD_FONT_FLAG_OLD;
-       vt = (struct vt_struct *)((struct tty_struct *)file->private_data)->driver_data;
-       i = con_font_op(vt->vc_num, &op);
-       if (i) return i;
-       ((struct console_font_op32 *)&op)->data = (unsigned long)op.data;
-       if (copy_to_user((void *) fontop, &op, sizeof(struct console_font_op32)))
-               return -EFAULT;
-       return 0;
-}
-
-struct unimapdesc32 {
-       unsigned short entry_ct;
-       u32 entries;
-};
-
-static int do_unimap_ioctl(unsigned int fd, unsigned int cmd, struct unimapdesc32 *user_ud, struct file *file)
-{
-       struct unimapdesc32 tmp;
-       int perm = vt_check(file);
-       
-       if (perm < 0) return perm;
-       if (copy_from_user(&tmp, user_ud, sizeof tmp))
-               return -EFAULT;
-       switch (cmd) {
-       case PIO_UNIMAP:
-               if (!perm) return -EPERM;
-               return con_set_unimap(fg_console, tmp.entry_ct, (struct unipair *)A(tmp.entries));
-       case GIO_UNIMAP:
-               return con_get_unimap(fg_console, tmp.entry_ct, &(user_ud->entry_ct), (struct unipair *)A(tmp.entries));
-       }
-       return 0;
-}
-#endif
-
-#if 0
-static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       mm_segment_t old_fs = get_fs();
-       __kernel_uid_t kuid;
-       int err;
-
-       cmd = SMB_IOC_GETMOUNTUID;
-
-       set_fs(KERNEL_DS);
-       err = sys_ioctl(fd, cmd, (unsigned long)&kuid);
-       set_fs(old_fs);
-
-       if (err >= 0)
-               err = put_user(kuid, (compat_uid_t *)arg);
-
-       return err;
-}
-#endif
-
-struct atmif_sioc32 {
-        int            number;
-        int            length;
-        compat_caddr_t arg;
-};
-
-struct atm_iobuf32 {
-       int             length;
-       compat_caddr_t  buffer;
-};
-
-#define ATM_GETLINKRATE32 _IOW('a', ATMIOC_ITF+1, struct atmif_sioc32)
-#define ATM_GETNAMES32    _IOW('a', ATMIOC_ITF+3, struct atm_iobuf32)
-#define ATM_GETTYPE32     _IOW('a', ATMIOC_ITF+4, struct atmif_sioc32)
-#define ATM_GETESI32     _IOW('a', ATMIOC_ITF+5, struct atmif_sioc32)
-#define ATM_GETADDR32    _IOW('a', ATMIOC_ITF+6, struct atmif_sioc32)
-#define ATM_RSTADDR32    _IOW('a', ATMIOC_ITF+7, struct atmif_sioc32)
-#define ATM_ADDADDR32    _IOW('a', ATMIOC_ITF+8, struct atmif_sioc32)
-#define ATM_DELADDR32    _IOW('a', ATMIOC_ITF+9, struct atmif_sioc32)
-#define ATM_GETCIRANGE32  _IOW('a', ATMIOC_ITF+10, struct atmif_sioc32)
-#define ATM_SETCIRANGE32  _IOW('a', ATMIOC_ITF+11, struct atmif_sioc32)
-#define ATM_SETESI32      _IOW('a', ATMIOC_ITF+12, struct atmif_sioc32)
-#define ATM_SETESIF32     _IOW('a', ATMIOC_ITF+13, struct atmif_sioc32)
-#define ATM_GETSTAT32     _IOW('a', ATMIOC_SARCOM+0, struct atmif_sioc32)
-#define ATM_GETSTATZ32    _IOW('a', ATMIOC_SARCOM+1, struct atmif_sioc32)
-#define ATM_GETLOOP32    _IOW('a', ATMIOC_SARCOM+2, struct atmif_sioc32)
-#define ATM_SETLOOP32    _IOW('a', ATMIOC_SARCOM+3, struct atmif_sioc32)
-#define ATM_QUERYLOOP32          _IOW('a', ATMIOC_SARCOM+4, struct atmif_sioc32)
-
-static struct {
-        unsigned int cmd32;
-        unsigned int cmd;
-} atm_ioctl_map[] = {
-        { ATM_GETLINKRATE32, ATM_GETLINKRATE },
-       { ATM_GETNAMES32,    ATM_GETNAMES },
-        { ATM_GETTYPE32,     ATM_GETTYPE },
-        { ATM_GETESI32,      ATM_GETESI },
-        { ATM_GETADDR32,     ATM_GETADDR },
-        { ATM_RSTADDR32,     ATM_RSTADDR },
-        { ATM_ADDADDR32,     ATM_ADDADDR },
-        { ATM_DELADDR32,     ATM_DELADDR },
-        { ATM_GETCIRANGE32,  ATM_GETCIRANGE },
-       { ATM_SETCIRANGE32,  ATM_SETCIRANGE },
-       { ATM_SETESI32,      ATM_SETESI },
-       { ATM_SETESIF32,     ATM_SETESIF },
-       { ATM_GETSTAT32,     ATM_GETSTAT },
-       { ATM_GETSTATZ32,    ATM_GETSTATZ },
-       { ATM_GETLOOP32,     ATM_GETLOOP },
-       { ATM_SETLOOP32,     ATM_SETLOOP },
-       { ATM_QUERYLOOP32,   ATM_QUERYLOOP }
-};
-
-#define NR_ATM_IOCTL (sizeof(atm_ioctl_map)/sizeof(atm_ioctl_map[0]))
-
-
-static int do_atm_iobuf(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       struct atm_iobuf32 iobuf32;
-       struct atm_iobuf   iobuf = { 0, NULL };
-       mm_segment_t old_fs;
-       int err;
-
-       err = copy_from_user(&iobuf32, (struct atm_iobuf32*)arg,
-           sizeof(struct atm_iobuf32));
-       if (err)
-               return -EFAULT;
-
-       iobuf.length = iobuf32.length;
-
-       if (iobuf32.buffer == (compat_caddr_t) NULL || iobuf32.length == 0) {
-               iobuf.buffer = (void*)(unsigned long)iobuf32.buffer;
-       } else {
-               iobuf.buffer = kmalloc(iobuf.length, GFP_KERNEL);
-               if (iobuf.buffer == NULL) {
-                       err = -ENOMEM;
-                       goto out;
-               }
-
-               err = copy_from_user(iobuf.buffer, B(iobuf32.buffer), iobuf.length);
-               if (err) {
-                       err = -EFAULT;
-                       goto out;
-               }
-       }
-
-       old_fs = get_fs(); set_fs (KERNEL_DS);
-       err = sys_ioctl (fd, cmd, (unsigned long)&iobuf);      
-       set_fs (old_fs);
-        if(err)
-               goto out;
-
-        if(iobuf.buffer && iobuf.length > 0) {
-               err = copy_to_user(B(iobuf32.buffer), iobuf.buffer, iobuf.length);
-               if (err) {
-                       err = -EFAULT;
-                       goto out;
-               }
-       }
-       err = __put_user(iobuf.length, &(((struct atm_iobuf32*)arg)->length));
-
- out:
-        if(iobuf32.buffer && iobuf32.length > 0)
-               kfree(iobuf.buffer);
-
-       return err;
-}
-
-
-static int do_atmif_sioc(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-        struct atmif_sioc32 sioc32;
-        struct atmif_sioc   sioc = { 0, 0, NULL };
-        mm_segment_t old_fs;
-        int err;
-        
-        err = copy_from_user(&sioc32, (struct atmif_sioc32*)arg,
-                            sizeof(struct atmif_sioc32));
-        if (err)
-                return -EFAULT;
-
-        sioc.number = sioc32.number;
-        sioc.length = sioc32.length;
-        
-       if (sioc32.arg == (compat_caddr_t) NULL || sioc32.length == 0) {
-               sioc.arg = (void*)(unsigned long)sioc32.arg;
-        } else {
-                sioc.arg = kmalloc(sioc.length, GFP_KERNEL);
-                if (sioc.arg == NULL) {
-                        err = -ENOMEM;
-                       goto out;
-               }
-                
-                err = copy_from_user(sioc.arg, B(sioc32.arg), sioc32.length);
-                if (err) {
-                        err = -EFAULT;
-                        goto out;
-                }
-        }
-        
-        old_fs = get_fs(); set_fs (KERNEL_DS);
-        err = sys_ioctl (fd, cmd, (unsigned long)&sioc);       
-        set_fs (old_fs);
-        if(err) {
-                goto out;
-       }
-        
-        if(sioc.arg && sioc.length > 0) {
-                err = copy_to_user(B(sioc32.arg), sioc.arg, sioc.length);
-                if (err) {
-                        err = -EFAULT;
-                        goto out;
-                }
-        }
-        err = __put_user(sioc.length, &(((struct atmif_sioc32*)arg)->length));
-        
- out:
-        if(sioc32.arg && sioc32.length > 0)
-               kfree(sioc.arg);
-        
-       return err;
-}
-
-
-static int do_atm_ioctl(unsigned int fd, unsigned int cmd32, unsigned long arg)
-{
-        int i;
-        unsigned int cmd = 0;
-        
-       switch (cmd32) {
-       case SONET_GETSTAT:
-       case SONET_GETSTATZ:
-       case SONET_GETDIAG:
-       case SONET_SETDIAG:
-       case SONET_CLRDIAG:
-       case SONET_SETFRAMING:
-       case SONET_GETFRAMING:
-       case SONET_GETFRSENSE:
-               return do_atmif_sioc(fd, cmd32, arg);
-       }
-
-               for (i = 0; i < NR_ATM_IOCTL; i++) {
-                       if (cmd32 == atm_ioctl_map[i].cmd32) {
-                               cmd = atm_ioctl_map[i].cmd;
-                               break;
-                       }
-               }
-               if (i == NR_ATM_IOCTL) {
-               return -EINVAL;
-               }
-        
-        switch (cmd) {
-       case ATM_GETNAMES:
-               return do_atm_iobuf(fd, cmd, arg);
-           
-       case ATM_GETLINKRATE:
-        case ATM_GETTYPE:
-        case ATM_GETESI:
-        case ATM_GETADDR:
-        case ATM_RSTADDR:
-        case ATM_ADDADDR:
-        case ATM_DELADDR:
-        case ATM_GETCIRANGE:
-       case ATM_SETCIRANGE:
-       case ATM_SETESI:
-       case ATM_SETESIF:
-       case ATM_GETSTAT:
-       case ATM_GETSTATZ:
-       case ATM_GETLOOP:
-       case ATM_SETLOOP:
-       case ATM_QUERYLOOP:
-                return do_atmif_sioc(fd, cmd, arg);
-        }
-
-        return -EINVAL;
-}
-
 #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
 /* This really belongs in include/linux/drm.h -DaveM */
 #include "../../../drivers/char/drm/drm.h"
@@ -2323,137 +561,6 @@ static int drm32_res_ctx(unsigned int fd, unsigned int cmd, unsigned long arg)
 
 #endif
 
-static int ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       return -EINVAL;
-}
-
-static int broken_blkgetsize(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       /* The mkswap binary hard codes it to Intel value :-((( */
-       return w_long(fd, BLKGETSIZE, arg);
-}
-
-struct blkpg_ioctl_arg32 {
-       int op;
-       int flags;
-       int datalen;
-       u32 data;
-};
-                                
-static int blkpg_ioctl_trans(unsigned int fd, unsigned int cmd, struct blkpg_ioctl_arg32 *arg)
-{
-       struct blkpg_ioctl_arg a;
-       struct blkpg_partition p;
-       int err;
-       mm_segment_t old_fs = get_fs();
-       
-       err = get_user(a.op, &arg->op);
-       err |= __get_user(a.flags, &arg->flags);
-       err |= __get_user(a.datalen, &arg->datalen);
-       err |= __get_user((long)a.data, &arg->data);
-       if (err) return err;
-       switch (a.op) {
-       case BLKPG_ADD_PARTITION:
-       case BLKPG_DEL_PARTITION:
-               if (a.datalen < sizeof(struct blkpg_partition))
-                       return -EINVAL;
-                if (copy_from_user(&p, a.data, sizeof(struct blkpg_partition)))
-                       return -EFAULT;
-               a.data = &p;
-               set_fs (KERNEL_DS);
-               err = sys_ioctl(fd, cmd, (unsigned long)&a);
-               set_fs (old_fs);
-       default:
-               return -EINVAL;
-       }                                        
-       return err;
-}
-
-/* Fix sizeof(sizeof()) breakage */
-#define BLKBSZGET_32   _IOR(0x12,112,int)
-#define BLKBSZSET_32   _IOW(0x12,113,int)
-#define BLKGETSIZE64_32        _IOR(0x12,114,int)
-
-static int do_blkbszget(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       return sys_ioctl(fd, BLKBSZGET, arg);
-}
-
-static int do_blkbszset(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       return sys_ioctl(fd, BLKBSZSET, arg);
-}
-
-static int do_blkgetsize64(unsigned int fd, unsigned int cmd,
-                          unsigned long arg)
-{
-       return sys_ioctl(fd, BLKGETSIZE64, arg);
-}
-
-static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       return rw_long(fd, AUTOFS_IOC_SETTIMEOUT, arg);
-}
-
-/* USB to be done */
-
-
-struct serial_struct32 {
-       int     type;
-       int     line;
-       unsigned int    port;
-       int     irq;
-       int     flags;
-       int     xmit_fifo_size;
-       int     custom_divisor;
-       int     baud_base;
-       unsigned short  close_delay;
-       char    io_type;
-       char    reserved_char[1];
-       int     hub6;
-       unsigned short  closing_wait; /* time to wait before closing */
-       unsigned short  closing_wait2; /* no longer used... */
-       unsigned int    iomem_base;     /* char * really */
-       unsigned short  iomem_reg_shift;
-       unsigned int    port_high;
-       int     reserved[1];
-};
-
-static int do_tiocgserial(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       struct serial_struct ss;
-       int ret;
-       struct serial_struct32 * uptr = (struct serial_struct32 *)arg;
-       mm_segment_t old_fs = get_fs();
-
-       set_fs (KERNEL_DS);
-       ret = sys_ioctl(fd, cmd, (unsigned long) &ss);
-       set_fs(old_fs);
-
-       if (!ret) {
-               /* structs match up to iomem_base */
-               ret = copy_to_user(uptr, &ss, sizeof(struct serial_struct32));
-               ret |= put_user(ss.iomem_base, &uptr->iomem_base);
-               ret |= put_user(ss.iomem_reg_shift, &uptr->iomem_reg_shift);
-               ret |= put_user(ss.port_high, &uptr->port_high);
-               if (ret)
-                       ret = -EFAULT;
-       }
-       return ret;
-}
-
-int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
-{
-       int err = sys_ioctl(fd, cmd, arg);
-       if ((unsigned) err > -4095)
-               printk(KERN_WARNING 
-                       "ioctl(%d, 0x%x, %p) -- SIOCDEVPRIVATE-based ioctls aren't really\n"
-                       "supported, though some will work by accident.\n",
-                   fd, cmd, (void *)arg);
-       return err;
-}
-
 #define HANDLE_IOCTL(cmd, handler) { cmd, (ioctl_trans_handler_t)handler, 0 },
 #define COMPATIBLE_IOCTL(cmd) HANDLE_IOCTL(cmd, sys_ioctl) 
 
@@ -2463,6 +570,9 @@ int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
 IOCTL_TABLE_START
 #include <linux/compat_ioctl.h>
 
+#define DECLARES
+#include "compat_ioctl.c"
+
 /* Might be moved to compat_ioctl.h with some ifdefs... */
 COMPATIBLE_IOCTL(TIOCSTART)
 COMPATIBLE_IOCTL(TIOCSTOP)
@@ -2474,132 +584,10 @@ COMPATIBLE_IOCTL(PA_PERF_OFF)
 COMPATIBLE_IOCTL(PA_PERF_VERSION)
 
 /* And these ioctls need translation */
-HANDLE_IOCTL(TIOCGSERIAL, do_tiocgserial)
-HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32)
-HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf)
-HANDLE_IOCTL(SIOCGIFFLAGS, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFFLAGS, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFMETRIC, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFMETRIC, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFMTU, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFMTU, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFMEM, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFMEM, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFHWADDR, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFHWADDR, dev_ifsioc)
-HANDLE_IOCTL(SIOCADDMULTI, dev_ifsioc)
-HANDLE_IOCTL(SIOCDELMULTI, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFINDEX, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFMAP, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFMAP, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFADDR, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFADDR, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFBRDADDR, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFBRDADDR, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFDSTADDR, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFDSTADDR, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFNETMASK, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFNETMASK, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFPFLAGS, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFPFLAGS, dev_ifsioc)
 HANDLE_IOCTL(SIOCGPPPSTATS, dev_ifsioc)
 HANDLE_IOCTL(SIOCGPPPCSTATS, dev_ifsioc)
 HANDLE_IOCTL(SIOCGPPPVER, dev_ifsioc)
-HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc)
-HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc)
-HANDLE_IOCTL(SIOCADDRT, routing_ioctl)
-HANDLE_IOCTL(SIOCDELRT, routing_ioctl)
-/* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */
-HANDLE_IOCTL(SIOCRTMSG, ret_einval)
-HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp)
-HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo)
-HANDLE_IOCTL(BLKGETSIZE, w_long)
-HANDLE_IOCTL(0x1260, broken_blkgetsize)
-HANDLE_IOCTL(BLKSECTGET, w_long)
-HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans)
-/* take care of sizeof(sizeof()) breakage */
-/* block stuff */
-HANDLE_IOCTL(BLKBSZGET_32, do_blkbszget)
-HANDLE_IOCTL(BLKBSZSET_32, do_blkbszset)
-HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgetsize64)
-
-HANDLE_IOCTL(FBIOGET_FSCREENINFO, fb_ioctl_trans)
-HANDLE_IOCTL(FBIOGETCMAP, fb_ioctl_trans)
-HANDLE_IOCTL(FBIOPUTCMAP, fb_ioctl_trans)
-
-HANDLE_IOCTL(HDIO_GET_UNMASKINTR, hdio_ioctl_trans)
-HANDLE_IOCTL(HDIO_GET_DMA, hdio_ioctl_trans)
-HANDLE_IOCTL(HDIO_GET_32BIT, hdio_ioctl_trans)
-HANDLE_IOCTL(HDIO_GET_MULTCOUNT, hdio_ioctl_trans)
-HANDLE_IOCTL(HDIO_GET_NOWERR, hdio_ioctl_trans)
-HANDLE_IOCTL(HDIO_GET_NICE, hdio_ioctl_trans)
-HANDLE_IOCTL(FDSETPRM32, fd_ioctl_trans)
-HANDLE_IOCTL(FDDEFPRM32, fd_ioctl_trans)
-HANDLE_IOCTL(FDGETPRM32, fd_ioctl_trans)
-HANDLE_IOCTL(FDSETDRVPRM32, fd_ioctl_trans)
-HANDLE_IOCTL(FDGETDRVPRM32, fd_ioctl_trans)
-HANDLE_IOCTL(FDGETDRVSTAT32, fd_ioctl_trans)
-HANDLE_IOCTL(FDPOLLDRVSTAT32, fd_ioctl_trans)
-HANDLE_IOCTL(FDGETFDCSTAT32, fd_ioctl_trans)
-HANDLE_IOCTL(FDWERRORGET32, fd_ioctl_trans)
-HANDLE_IOCTL(PPPIOCGIDLE32, ppp_ioctl_trans)
-HANDLE_IOCTL(PPPIOCSCOMPRESS32, ppp_ioctl_trans)
-HANDLE_IOCTL(MTIOCGET32, mt_ioctl_trans)
-HANDLE_IOCTL(MTIOCPOS32, mt_ioctl_trans)
-HANDLE_IOCTL(MTIOCGETCONFIG32, mt_ioctl_trans)
-HANDLE_IOCTL(MTIOCSETCONFIG32, mt_ioctl_trans)
-HANDLE_IOCTL(CDROMREADMODE2, cdrom_ioctl_trans)
-HANDLE_IOCTL(CDROMREADMODE1, cdrom_ioctl_trans)
-HANDLE_IOCTL(CDROMREADRAW, cdrom_ioctl_trans)
-HANDLE_IOCTL(CDROMREADCOOKED, cdrom_ioctl_trans)
-HANDLE_IOCTL(CDROMREADAUDIO, cdrom_ioctl_trans)
-HANDLE_IOCTL(CDROMREADALL, cdrom_ioctl_trans)
-HANDLE_IOCTL(CDROM_SEND_PACKET, cdrom_ioctl_trans)
-HANDLE_IOCTL(LOOP_SET_STATUS, loop_status)
-HANDLE_IOCTL(LOOP_GET_STATUS, loop_status)
-#define AUTOFS_IOC_SETTIMEOUT32 _IOWR(0x93,0x64,unsigned int)
-HANDLE_IOCTL(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout)
-#ifdef CONFIG_VT
-HANDLE_IOCTL(PIO_FONTX, do_fontx_ioctl)
-HANDLE_IOCTL(GIO_FONTX, do_fontx_ioctl)
-HANDLE_IOCTL(PIO_UNIMAP, do_unimap_ioctl)
-HANDLE_IOCTL(GIO_UNIMAP, do_unimap_ioctl)
-HANDLE_IOCTL(KDFONTOP, do_kdfontop_ioctl)
-#endif
-HANDLE_IOCTL(EXT2_IOC32_GETFLAGS, do_ext2_ioctl)
-HANDLE_IOCTL(EXT2_IOC32_SETFLAGS, do_ext2_ioctl)
-HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl)
-HANDLE_IOCTL(EXT2_IOC32_SETVERSION, do_ext2_ioctl)
-#if 0
-/* One SMB ioctl needs translations. */
-#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t)
-HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid)
-#endif
-HANDLE_IOCTL(ATM_GETLINKRATE32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_GETNAMES32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_GETTYPE32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_GETESI32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_GETADDR32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_RSTADDR32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_ADDADDR32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_DELADDR32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_GETCIRANGE32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_SETCIRANGE32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_SETESI32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_SETESIF32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_GETSTAT32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_GETSTATZ32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_GETLOOP32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_SETLOOP32, do_atm_ioctl)
-HANDLE_IOCTL(ATM_QUERYLOOP32, do_atm_ioctl)
-HANDLE_IOCTL(SONET_GETSTAT, do_atm_ioctl)
-HANDLE_IOCTL(SONET_GETSTATZ, do_atm_ioctl)
-HANDLE_IOCTL(SONET_GETDIAG, do_atm_ioctl)
-HANDLE_IOCTL(SONET_SETDIAG, do_atm_ioctl)
-HANDLE_IOCTL(SONET_CLRDIAG, do_atm_ioctl)
-HANDLE_IOCTL(SONET_SETFRAMING, do_atm_ioctl)
-HANDLE_IOCTL(SONET_GETFRAMING, do_atm_ioctl)
-HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl)
+
 #if defined(CONFIG_GEN_RTC)
 COMPATIBLE_IOCTL(RTC_AIE_ON)
 COMPATIBLE_IOCTL(RTC_AIE_OFF)
@@ -2618,6 +606,7 @@ COMPATIBLE_IOCTL(RTC_IRQP_SET)
 HANDLE_IOCTL(RTC_EPOCH_READ, w_long)
 COMPATIBLE_IOCTL(RTC_EPOCH_SET)
 #endif
+
 #if defined(CONFIG_DRM) || defined(CONFIG_DRM_MODULE)
 HANDLE_IOCTL(DRM32_IOCTL_VERSION, drm32_version);
 HANDLE_IOCTL(DRM32_IOCTL_GET_UNIQUE, drm32_getsetunique);
index f9c981f..72f7489 100644 (file)
@@ -215,29 +215,30 @@ EXPORT_SYMBOL(enable_irq);
 int show_interrupts(struct seq_file *p, void *v)
 {
 #ifdef CONFIG_PROC_FS
-       unsigned int regnr = 0;
+       unsigned int regnr = *(loff_t *) v, i = 0;
 
-       seq_puts(p, "     ");
+       if (regnr == 0) {
+               seq_puts(p, "     ");
 #ifdef CONFIG_SMP
-       for (regnr = 0; regnr < NR_CPUS; regnr++)
+               for (i = 0; i < NR_CPUS; i++)
 #endif
-               seq_printf(p, "      CPU%02d ", regnr);
+                       seq_printf(p, "      CPU%02d ", i);
 
 #ifdef PARISC_IRQ_CR16_COUNTS
-       seq_printf(p, "[min/avg/max] (CPU cycle counts)");
+               seq_printf(p, "[min/avg/max] (CPU cycle counts)");
 #endif
-       seq_putc(p, '\n');
+               seq_putc(p, '\n');
+       }
 
        /* We don't need *irqsave lock variants since this is
        ** only allowed to change while in the base context.
        */
        spin_lock(&irq_lock);
-       for (regnr = 0; regnr < NR_IRQ_REGS; regnr++) {
-           unsigned int i;
+       if (regnr < NR_IRQ_REGS) {
            struct irq_region *region = irq_region[regnr];
 
             if (!region || !region->action)
-               continue;
+                   goto skip;
 
            for (i = 0; i <= MAX_CPU_IRQ; i++) {
                struct irqaction *action = &region->action[i];
@@ -286,9 +287,9 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
            }
        }
+  skip:
        spin_unlock(&irq_lock);
 
-       seq_putc(p, '\n');
 #endif /* CONFIG_PROC_FS */
        return 0;
 }
index f8548e4..b9e7927 100644 (file)
@@ -79,13 +79,13 @@ flush_tlb_all_local:
        ldil    L%REAL_MODE_PSW, %r1
        ldo     R%REAL_MODE_PSW(%r1), %r1
        mtctl   %r1, %cr22
-       mtctl   %r0, %cr17
-       mtctl   %r0, %cr17
+       mtctl   %r0, %cr17      /* Clear IIASQ tail */
+       mtctl   %r0, %cr17      /* Clear IIASQ head */
        ldil    L%PA(1f),%r1
        ldo     R%PA(1f)(%r1),%r1
-       mtctl   %r1, %cr18
+       mtctl   %r1, %cr18      /* IIAOQ head */
        ldo     4(%r1), %r1
-       mtctl   %r1, %cr18
+       mtctl   %r1, %cr18      /* IIAOQ tail */
        rfi
        nop
 
@@ -185,13 +185,13 @@ fdtdone:
        ldo     R%KERNEL_PSW(%r1), %r1
        or      %r1,%r19,%r1    /* Set I bit if set on entry */
        mtctl   %r1, %cr22
-       mtctl   %r0, %cr17
-       mtctl   %r0, %cr17
+       mtctl   %r0, %cr17      /* Clear IIASQ tail */
+       mtctl   %r0, %cr17      /* Clear IIASQ head */
        ldil    L%(2f), %r1
        ldo     R%(2f)(%r1), %r1
-       mtctl   %r1, %cr18
+       mtctl   %r1, %cr18      /* IIAOQ head */
        ldo     4(%r1), %r1
-       mtctl   %r1, %cr18
+       mtctl   %r1, %cr18      /* IIAOQ tail */
        rfi
        nop
 
@@ -837,13 +837,13 @@ disable_sr_hashing_asm:
        ldil    L%REAL_MODE_PSW, %r1
        ldo     R%REAL_MODE_PSW(%r1), %r1
        mtctl   %r1, %cr22
-       mtctl   %r0, %cr17
-       mtctl   %r0, %cr17
+       mtctl   %r0, %cr17      /* Clear IIASQ tail */
+       mtctl   %r0, %cr17      /* Clear IIASQ head */
        ldil    L%PA(1f),%r1
        ldo     R%PA(1f)(%r1),%r1
-       mtctl   %r1, %cr18
+       mtctl   %r1, %cr18      /* IIAOQ head */
        ldo     4(%r1), %r1
-       mtctl   %r1, %cr18
+       mtctl   %r1, %cr18      /* IIAOQ tail */
        rfi
        nop
 
@@ -889,13 +889,13 @@ srdis_done:
        ldil    L%KERNEL_PSW, %r1
        ldo     R%KERNEL_PSW(%r1), %r1
        mtctl   %r1, %cr22
-       mtctl   %r0, %cr17
-       mtctl   %r0, %cr17
+       mtctl   %r0, %cr17      /* Clear IIASQ tail */
+       mtctl   %r0, %cr17      /* Clear IIASQ head */
        ldil    L%(2f), %r1
        ldo     R%(2f)(%r1), %r1
-       mtctl   %r1, %cr18
+       mtctl   %r1, %cr18      /* IIAOQ head */
        ldo     4(%r1), %r1
-       mtctl   %r1, %cr18
+       mtctl   %r1, %cr18      /* IIAOQ tail */
        rfi
        nop
 
index db2895f..2426626 100644 (file)
@@ -26,10 +26,6 @@ EXPORT_SYMBOL(strrchr);
 EXPORT_SYMBOL(strstr);
 EXPORT_SYMBOL(strpbrk);
 
-#include <asm/processor.h>
-EXPORT_SYMBOL(kernel_thread);
-EXPORT_SYMBOL(boot_cpu_data);
-
 #include <linux/pm.h>
 EXPORT_SYMBOL(pm_power_off);
 
@@ -64,15 +60,6 @@ EXPORT_SYMBOL(__memcpy_toio);
 EXPORT_SYMBOL(__memcpy_fromio);
 EXPORT_SYMBOL(__memset_io);
 
-#include <asm/cache.h>
-EXPORT_SYMBOL(flush_kernel_dcache_range_asm);
-EXPORT_SYMBOL(flush_kernel_dcache_page);
-EXPORT_SYMBOL(flush_data_cache_local);
-EXPORT_SYMBOL(flush_kernel_icache_range_asm);
-EXPORT_SYMBOL(flush_all_caches);
-EXPORT_SYMBOL(dcache_stride);
-EXPORT_SYMBOL(flush_cache_all_local);
-
 #include <asm/unistd.h>
 extern long sys_open(const char *, int, int);
 extern off_t sys_lseek(int, off_t, int);
index 5e88d61..dee2b91 100644 (file)
@@ -2,7 +2,7 @@
  *             arch/parisc/kernel/pdc_chassis.c
  *
  *             Copyright (C) 2002 Laurent Canet <canetl@esiee.fr>
- *             Copyright (C) 2002 Thibaut Varene <varenet@esiee.fr>
+ *             Copyright (C) 2002-2003 Thibaut Varene <varenet@esiee.fr>
  *
  *
  *             This program is free software; you can redistribute it and/or modify
@@ -35,6 +35,8 @@
 #include <asm/pdc_chassis.h>
 #include <asm/processor.h>
 
+
+#ifdef CONFIG_PDC_CHASSIS
 static int pdc_chassis_old = 0;        
 
 
@@ -102,6 +104,7 @@ static struct notifier_block pdc_chassis_reboot_block = {
        .notifier_call = pdc_chassis_reboot_event,
        .priority = INT_MAX,
 };
+#endif /* CONFIG_PDC_CHASSIS */
 
 
 /**
@@ -110,16 +113,33 @@ static struct notifier_block pdc_chassis_reboot_block = {
 
 void __init parisc_pdc_chassis_init(void)
 {
-       DPRINTK(KERN_DEBUG "%s: parisc_pdc_chassis_init()\n", __FILE__);
-
-       /* initialize panic notifier chain */
-       notifier_chain_register(&panic_notifier_list, &pdc_chassis_panic_block);
+#ifdef CONFIG_PDC_CHASSIS
+       int handle = 0;
 
-       /* initialize reboot notifier chain */
-       register_reboot_notifier(&pdc_chassis_reboot_block);
+       DPRINTK(KERN_DEBUG "%s: parisc_pdc_chassis_init()\n", __FILE__);
 
-       /* Check for old LED Panel */
+       /* Let see if we have something to handle... */
+       /* Check for PDC_PAT or old LED Panel */
        pdc_chassis_checkold();
+       if (is_pdc_pat()) {
+#ifdef __LP64__        /* see pdc_chassis_send_status() */
+               printk(KERN_INFO "Enabling PDC_PAT chassis codes support.\n");
+               handle = 1;
+#endif /* __LP64__ */
+       }
+       else if (pdc_chassis_old) {
+               printk(KERN_INFO "Enabling old style chassis LED panel support.\n");
+               handle = 1;
+       }
+       
+       if (handle) {
+               /* initialize panic notifier chain */
+               notifier_chain_register(&panic_notifier_list, &pdc_chassis_panic_block);
+
+               /* initialize reboot notifier chain */
+               register_reboot_notifier(&pdc_chassis_reboot_block);
+       }
+#endif /* CONFIG_PDC_CHASSIS */
 }
 
 
@@ -128,7 +148,8 @@ void __init parisc_pdc_chassis_init(void)
  * and changes the front panel LEDs according to the new system state
  * @retval: PDC call return value.
  *
- * Only machines with 64 bits PDC PAT and E-class are supported atm.
+ * Only machines with 64 bits PDC PAT and those reported in
+ * pdc_chassis_checkold() are supported atm.
  * 
  * returns 0 if no error, -1 if no supported PDC is present or invalid message,
  * else returns the appropriate PDC error code.
@@ -140,7 +161,7 @@ int pdc_chassis_send_status(int message)
 {
        /* Maybe we should do that in an other way ? */
        int retval = 0;
-
+#ifdef CONFIG_PDC_CHASSIS
        DPRINTK(KERN_DEBUG "%s: pdc_chassis_send_status(%d)\n", __FILE__, message);
 
 #ifdef __LP64__        /* pdc_pat_chassis_send_log is defined only when #ifdef __LP64__ */
@@ -199,7 +220,7 @@ int pdc_chassis_send_status(int message)
                                retval = -1;
                }
        } else retval = -1;
-#endif
-               
+#endif /* __LP64__ */
+#endif /* CONFIG_PDC_CHASSIS */
        return retval;
 }
index 5561b11..04b8263 100644 (file)
@@ -61,16 +61,6 @@ static struct tty_driver * pdc_console_device (struct console *c, int *index)
        *index = c->index ? c->index-1 : fg_console;
        return &console_driver;
 }
-
-#elif defined(CONFIG_SERIAL_MUX)
-#warning CONFIG_SERIAL_MUX
-#define PDC_CONSOLE_DEVICE pdc_console_device
-#warning "FIXME - should be: static struct tty_driver * pdc_console_device (struct console *c, int *index)"
-static kdev_t pdc_console_device (struct console *c, int *index)
-{
-        return mk_kdev(MUX_MAJOR, 0);
-}
-
 #else
 #define PDC_CONSOLE_DEVICE NULL
 #endif
@@ -105,7 +95,7 @@ static void pdc_console_init_force(void)
 
 void __init pdc_console_init(void)
 {
-#if defined(EARLY_BOOTUP_DEBUG) || defined(CONFIG_PDC_CONSOLE) || defined(CONFIG_SERIAL_MUX)
+#if defined(EARLY_BOOTUP_DEBUG) || defined(CONFIG_PDC_CONSOLE)
        pdc_console_init_force();
 #endif
 #ifdef EARLY_BOOTUP_DEBUG
index 2dc03e1..465f679 100644 (file)
@@ -179,6 +179,7 @@ pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
 
        return __kernel_thread(fn, arg, flags);
 }
+EXPORT_SYMBOL(kernel_thread);
 
 /*
  * Free current thread data structures etc..
index ddccdfe..5b05759 100644 (file)
  *
  */
 #include <linux/config.h>
+#include <linux/delay.h>
+#include <linux/init.h>
 #include <linux/mm.h>
-#include <linux/slab.h>
+#include <linux/module.h>
 #include <linux/seq_file.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#define PCI_DEBUG
-#include <linux/pci.h>
-#undef PCI_DEBUG
+#include <linux/slab.h>
 
 #include <asm/cache.h>
 #include <asm/hardware.h>      /* for register_parisc_driver() stuff */
@@ -45,6 +43,8 @@
 #include <asm/parisc-device.h>
 
 struct system_cpuinfo_parisc boot_cpu_data;
+EXPORT_SYMBOL(boot_cpu_data);
+
 struct cpuinfo_parisc cpu_data[NR_CPUS];
 
 /*
@@ -105,11 +105,11 @@ static int __init processor_probe(struct parisc_device *dev)
                status = pdc_pat_cell_module(&bytecnt, dev->pcell_loc,
                        dev->mod_index, PA_VIEW, &pa_pdc_cell);
 
-               ASSERT(PDC_OK == status);
+               BUG_ON(PDC_OK != status);
 
                /* verify it's the same as what do_pat_inventory() found */
-               ASSERT(dev->mod_info == pa_pdc_cell.mod_info);
-               ASSERT(dev->pmod_loc == pa_pdc_cell.mod_location);
+               BUG_ON(dev->mod_info != pa_pdc_cell.mod_info);
+               BUG_ON(dev->pmod_loc != pa_pdc_cell.mod_location);
 
                txn_addr = pa_pdc_cell.mod[0];   /* id_eid for IO sapic */
 
@@ -122,7 +122,7 @@ static int __init processor_probe(struct parisc_device *dev)
                /* get the cpu number */
                status = pdc_pat_cpu_get_number(&cpu_info, dev->hpa);
 
-               ASSERT(PDC_OK == status);
+               BUG_ON(PDC_OK != status);
 
                if (cpu_info.cpu_num >= NR_CPUS) {
                        printk(KERN_WARNING "IGNORING CPU at 0x%x,"
index 9dec500..03ed8aa 100644 (file)
@@ -154,12 +154,12 @@ rfi_virt2real:
        nop
        
        rsm             (PSW_SM_Q|PSW_SM_I),%r0  /* disable Q & I bits to load iia queue */
-       mtctl           0, %cr17        /* space 0 */
-       mtctl           0, %cr17
+       mtctl           %r0, %cr17      /* Clear IIASQ tail */
+       mtctl           %r0, %cr17      /* Clear IIASQ head */
        load32          PA(rfi_v2r_1), %r1
-       mtctl           %r1, %cr18
+       mtctl           %r1, %cr18      /* IIAOQ head */
        ldo             4(%r1), %r1
-       mtctl           %r1, %cr18
+       mtctl           %r1, %cr18      /* IIAOQ tail */
        load32          REAL_MODE_PSW, %r1
        mtctl           %r1, %cr22
        rfi
@@ -191,12 +191,12 @@ rfi_real2virt:
        nop
        
        rsm             PSW_SM_Q,%r0    /* disable Q bit to load iia queue */
-       mtctl           0, %cr17        /* space 0 */
-       mtctl           0, %cr17
+       mtctl           %r0, %cr17      /* Clear IIASQ tail */
+       mtctl           %r0, %cr17      /* Clear IIASQ head */
        load32          (rfi_r2v_1), %r1
-       mtctl           %r1, %cr18
+       mtctl           %r1, %cr18      /* IIAOQ head */
        ldo             4(%r1), %r1
-       mtctl           %r1, %cr18
+       mtctl           %r1, %cr18      /* IIAOQ tail */
        load32          KERNEL_PSW, %r1
        mtctl           %r1, %cr22
        rfi
index 3b2dbf8..1aed89d 100644 (file)
 #include <asm/pgalloc.h>
 #include <asm/cacheflush.h>
 
-#define DEBUG_SIG 0
+#ifdef CONFIG_COMPAT
+#include <linux/compat.h>
+#include "signal32.h"
+#endif
+
+#define DEBUG_SIG 0 
+#define DEBUG_SIG_LEVEL 2
 
 #if DEBUG_SIG
-#define DBG(x) printk x
+#define DBG(LEVEL, ...) \
+        ((DEBUG_SIG_LEVEL >= LEVEL) \
+       ? printk(__VA_ARGS__) : (void) 0)
 #else
-#define DBG(x)
+#define DBG(LEVEL, ...)
 #endif
+       
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
 
 int do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall);
 
-int copy_siginfo_to_user(siginfo_t *to, siginfo_t *from)
-{
-       if (from->si_code < 0)
-               return __copy_to_user(to, from, sizeof(siginfo_t));
-       else {
-               int err;
-
-               /*
-                * If you change siginfo_t structure, please be sure
-                * this code is fixed accordingly.  It should never
-                * copy any pad contained in the structure to avoid
-                * security leaks, but must copy the generic 3 ints
-                * plus the relevant union member.
-                */
-               err = __put_user(from->si_signo, &to->si_signo);
-               err |= __put_user(from->si_errno, &to->si_errno);
-               err |= __put_user((short)from->si_code, &to->si_code);
-               switch (from->si_code >> 16) {
-                     case __SI_FAULT >> 16:
-                       /* FIXME: should we put the interruption code here? */
-                     case __SI_POLL >> 16:
-                       err |= __put_user(from->si_addr, &to->si_addr);
-                       break;
-                     case __SI_CHLD >> 16:
-                       err |= __put_user(from->si_utime, &to->si_utime);
-                       err |= __put_user(from->si_stime, &to->si_stime);
-                       err |= __put_user(from->si_status, &to->si_status);
-                     default:
-                       err |= __put_user(from->si_uid, &to->si_uid);
-                       err |= __put_user(from->si_pid, &to->si_pid);
-                       break;
-                     /* case __SI_RT: This is not generated by the kernel as of now.  */
-               }
-               return err;
-       }
-}
-
 /*
  * Atomically swap in the new signal mask, and wait for a signal.
  */
@@ -101,26 +73,27 @@ sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, struct pt_regs *regs)
 {
        sigset_t saveset, newset;
 #ifdef __LP64__
-       /* XXX FIXME -- assumes 32-bit user app! */
        compat_sigset_t newset32;
 
-       /* XXX: Don't preclude handling different sized sigset_t's.  */
-       if (sigsetsize != sizeof(compat_sigset_t))
-               return -EINVAL;
-
-       if (copy_from_user(&newset32, (compat_sigset_t *)unewset, sizeof(newset32)))
-               return -EFAULT;
-
-       newset.sig[0] = newset32.sig[0] | ((unsigned long)newset32.sig[1] << 32);
-#else
-
-       /* XXX: Don't preclude handling different sized sigset_t's.  */
-       if (sigsetsize != sizeof(sigset_t))
-               return -EINVAL;
-
-       if (copy_from_user(&newset, unewset, sizeof(newset)))
-               return -EFAULT;
+       if(personality(current->personality) == PER_LINUX32){
+               /* XXX: Don't preclude handling different sized sigset_t's.  */
+               if (sigsetsize != sizeof(compat_sigset_t))
+                       return -EINVAL;
+               if (copy_from_user(&newset32, (compat_sigset_t *)unewset, sizeof(newset32)))
+                       return -EFAULT;
+               sigset_32to64(&newset,&newset32);
+               
+       } else 
 #endif
+       {
+               /* XXX: Don't preclude handling different sized sigset_t's.  */
+               if (sigsetsize != sizeof(sigset_t))
+                       return -EINVAL;
+       
+               if (copy_from_user(&newset, unewset, sizeof(newset)))
+                       return -EFAULT;
+       }
+
        sigdelsetmask(&newset, ~_BLOCKABLE);
 
        spin_lock_irq(&current->sighand->siglock);
@@ -161,7 +134,9 @@ restore_sigcontext(struct sigcontext *sc, struct pt_regs *regs)
        err |= __copy_from_user(regs->iaoq, sc->sc_iaoq, sizeof(regs->iaoq));
        err |= __copy_from_user(regs->iasq, sc->sc_iasq, sizeof(regs->iasq));
        err |= __get_user(regs->sar, &sc->sc_sar);
-       DBG(("restore_sigcontext: r28 is %ld\n", regs->gr[28]));
+       DBG(2,"restore_sigcontext: iaoq is 0x%#lx / 0x%#lx\n", 
+                       regs->iaoq[0],regs->iaoq[1]);
+       DBG(2,"restore_sigcontext: r28 is %ld\n", regs->gr[28]);
        return err;
 }
 
@@ -174,6 +149,9 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
        unsigned long usp = (regs->gr[30] & ~(0x01UL));
        unsigned long sigframe_size = PARISC_RT_SIGFRAME_SIZE;
 #ifdef __LP64__
+       compat_sigset_t compat_set;
+       struct compat_rt_sigframe * compat_frame;
+       
        if(personality(current->personality) == PER_LINUX32)
                sigframe_size = PARISC_RT_SIGFRAME_SIZE32;
 #endif
@@ -182,11 +160,23 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
        /* Unwind the user stack to get the rt_sigframe structure. */
        frame = (struct rt_sigframe *)
                (usp - sigframe_size);
-       DBG(("in sys_rt_sigreturn, frame is %p\n", frame));
-
-       if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
-               goto give_sigsegv;
+       DBG(2,"sys_rt_sigreturn: frame is %p\n", frame);
 
+#ifdef __LP64__
+       compat_frame = (struct compat_rt_sigframe *)frame;
+       
+       if(personality(current->personality) == PER_LINUX32){
+               DBG(2,"sys_rt_sigreturn: ELF32 process.\n");
+               if (__copy_from_user(&compat_set, &compat_frame->uc.uc_sigmask, sizeof(compat_set)))
+                       goto give_sigsegv;
+               sigset_32to64(&set,&compat_set);
+       } else
+#endif
+       {
+               if (__copy_from_user(&set, &frame->uc.uc_sigmask, sizeof(set)))
+                       goto give_sigsegv;
+       }
+               
        sigdelsetmask(&set, ~_BLOCKABLE);
        spin_lock_irq(&current->sighand->siglock);
        current->blocked = set;
@@ -194,17 +184,32 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
        spin_unlock_irq(&current->sighand->siglock);
 
        /* Good thing we saved the old gr[30], eh? */
-       if (restore_sigcontext(&frame->uc.uc_mcontext, regs))
-               goto give_sigsegv;
-
-       DBG(("usp: %#08lx stack %p", usp, &frame->uc.uc_stack));
+#ifdef __LP64__
+       if(personality(current->personality) == PER_LINUX32){
+               DBG(1,"sys_rt_sigreturn: compat_frame->uc.uc_mcontext 0x%p\n",
+                               &compat_frame->uc.uc_mcontext);
+// FIXME: Load upper half from register file
+               if (restore_sigcontext32(&compat_frame->uc.uc_mcontext, 
+                                       &compat_frame->regs, regs))
+                       goto give_sigsegv;
+               DBG(1,"sys_rt_sigreturn: usp %#08lx stack 0x%p\n", 
+                               usp, &compat_frame->uc.uc_stack);
+               if (do_sigaltstack32(&compat_frame->uc.uc_stack, NULL, usp) == -EFAULT)
+                       goto give_sigsegv;
+       } else
+#endif
+       {
+               DBG(1,"sys_rt_sigreturn: frame->uc.uc_mcontext 0x%p\n",
+                               &frame->uc.uc_mcontext);
+               if (restore_sigcontext(&frame->uc.uc_mcontext, regs))
+                       goto give_sigsegv;
+               DBG(1,"sys_rt_sigreturn: usp %#08lx stack 0x%p\n", 
+                               usp, &frame->uc.uc_stack);
+               if (do_sigaltstack(&frame->uc.uc_stack, NULL, usp) == -EFAULT)
+                       goto give_sigsegv;
+       }
+               
 
-       /* I don't know why everyone else assumes they can call this
-           with a pointer to a stack_t on the kernel stack.  That
-           makes no sense.  Anyway we'll do it like m68k, since we
-           also are using segmentation in the same way as them. */
-       if (do_sigaltstack(&frame->uc.uc_stack, NULL, usp) == -EFAULT)
-               goto give_sigsegv;
 
        /* If we are on the syscall path IAOQ will not be restored, and
         * if we are on the interrupt path we must not corrupt gr31.
@@ -212,14 +217,13 @@ sys_rt_sigreturn(struct pt_regs *regs, int in_syscall)
        if (in_syscall)
                regs->gr[31] = regs->iaoq[0];
 #if DEBUG_SIG
-       DBG(("returning to %#lx\n", regs->iaoq[0]));
-       DBG(("in sys_rt_sigreturn:\n"));
+       DBG(1,"sys_rt_sigreturn: returning to %#lx, DUMPING REGS:\n", regs->iaoq[0]);
        show_regs(regs);
 #endif
        return;
 
 give_sigsegv:
-       DBG(("sys_rt_sigreturn sending SIGSEGV\n"));
+       DBG(1,"sys_rt_sigreturn: Sending SIGSEGV\n");
        si.si_signo = SIGSEGV;
        si.si_errno = 0;
        si.si_code = SI_KERNEL;
@@ -237,9 +241,16 @@ give_sigsegv:
 static inline void *
 get_sigframe(struct k_sigaction *ka, unsigned long sp, size_t frame_size)
 {
+       /*FIXME: ELF32 vs. ELF64 has different frame_size, but since we
+         don't use the parameter it doesn't matter */
+
+       DBG(1,"get_sigframe: ka = %#lx, sp = %#lx, frame_size = %#lx\n",
+                       (unsigned long)ka, sp, frame_size);
+       
        if ((ka->sa.sa_flags & SA_ONSTACK) != 0 && ! on_sig_stack(sp))
                sp = current->sas_ss_sp; /* Stacks grow up! */
 
+       DBG(1,"get_sigframe: Returning sp = %#lx\n", (unsigned long)sp);
        return (void *) sp; /* Stacks grow up.  Fun. */
 }
 
@@ -259,20 +270,20 @@ setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs, int in_syscall)
                err |= __put_user(regs->gr[31]+4, &sc->sc_iaoq[1]);
                err |= __put_user(regs->sr[3], &sc->sc_iasq[0]);
                err |= __put_user(regs->sr[3], &sc->sc_iasq[1]);
-               DBG(("setup_sigcontext: iaoq %#lx/%#lx\n",
-                       regs->gr[31], regs->gr[31]));
+               DBG(1,"setup_sigcontext: iaoq %#lx / %#lx (in syscall)\n",
+                       regs->gr[31], regs->gr[31]+4);
        } else {
                err |= __copy_to_user(sc->sc_iaoq, regs->iaoq, sizeof(regs->iaoq));
                err |= __copy_to_user(sc->sc_iasq, regs->iasq, sizeof(regs->iasq));
-               DBG(("setup_sigcontext: iaoq %#lx/%#lx\n", 
-                       regs->iaoq[0], regs->iaoq[1]));
+               DBG(1,"setup_sigcontext: iaoq %#lx / %#lx (not in syscall)\n", 
+                       regs->iaoq[0], regs->iaoq[1]);
        }
 
        err |= __put_user(flags, &sc->sc_flags);
        err |= __copy_to_user(sc->sc_gr, regs->gr, sizeof(regs->gr));
        err |= __copy_to_user(sc->sc_fr, regs->fr, sizeof(regs->fr));
        err |= __put_user(regs->sar, &sc->sc_sar);
-       DBG(("setup_sigcontext: r28 is %ld\n", regs->gr[28]));
+       DBG(1,"setup_sigcontext: r28 is %ld\n", regs->gr[28]);
 
        return err;
 }
@@ -286,46 +297,85 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
        unsigned long haddr, sigframe_size;
        struct siginfo si;
        int err = 0;
-
+#ifdef __LP64__
+       compat_int_t compat_val;
+       struct compat_rt_sigframe * compat_frame;
+       compat_sigset_t compat_set;
+#endif
+       
        usp = (regs->gr[30] & ~(0x01UL));
+       /*FIXME: frame_size parameter is unused, remove it. */
        frame = get_sigframe(ka, usp, sizeof(*frame));
 
-       DBG(("setup_rt_frame 1: frame %p info %p\n", frame, info));
+       DBG(1,"SETUP_RT_FRAME: START\n");
+       DBG(1,"setup_rt_frame: frame %p info %p\n", frame, info);
+
+       
+#ifdef __LP64__
 
-       err |= __copy_to_user(&frame->info, info, sizeof(siginfo_t));
-       err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
-       err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
-       err |= __put_user(sas_ss_flags(regs->gr[30]),
-                         &frame->uc.uc_stack.ss_flags);
-       err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall);
-       err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
+       compat_frame = (struct compat_rt_sigframe *)frame;
+       
+       if(personality(current->personality) == PER_LINUX32) {
+               DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &compat_frame->info);
+               err |= compat_copy_siginfo_to_user(&compat_frame->info, info);
+               DBG(1,"SETUP_RT_FRAME: 1\n");
+               compat_val = (compat_int_t)current->sas_ss_sp;
+               err |= __put_user(compat_val, &compat_frame->uc.uc_stack.ss_sp);
+               DBG(1,"SETUP_RT_FRAME: 2\n");
+               compat_val = (compat_int_t)current->sas_ss_size;
+               err |= __put_user(compat_val, &compat_frame->uc.uc_stack.ss_size);
+               DBG(1,"SETUP_RT_FRAME: 3\n");
+               compat_val = sas_ss_flags(regs->gr[30]);                
+               err |= __put_user(compat_val, &compat_frame->uc.uc_stack.ss_flags);             
+               DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &compat_frame->uc);
+               DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &compat_frame->uc.uc_mcontext);
+               err |= setup_sigcontext32(&compat_frame->uc.uc_mcontext, 
+                                       &compat_frame->regs, regs, in_syscall);
+               sigset_64to32(&compat_set,set);
+               err |= __copy_to_user(&compat_frame->uc.uc_sigmask, &compat_set, sizeof(compat_set));
+       } else
+#endif
+       {       
+               DBG(1,"setup_rt_frame: frame->info = 0x%p\n", &frame->info);
+               err |= copy_siginfo_to_user(&frame->info, info);
+               err |= __put_user(current->sas_ss_sp, &frame->uc.uc_stack.ss_sp);
+               err |= __put_user(current->sas_ss_size, &frame->uc.uc_stack.ss_size);
+               err |= __put_user(sas_ss_flags(regs->gr[30]),
+                                 &frame->uc.uc_stack.ss_flags);
+               DBG(1,"setup_rt_frame: frame->uc = 0x%p\n", &frame->uc);
+               DBG(1,"setup_rt_frame: frame->uc.uc_mcontext = 0x%p\n", &frame->uc.uc_mcontext);
+               err |= setup_sigcontext(&frame->uc.uc_mcontext, regs, in_syscall);
+               /* FIXME: Should probably be converted aswell for the compat case */
+               err |= __copy_to_user(&frame->uc.uc_sigmask, set, sizeof(*set));
+       }
+       
        if (err)
                goto give_sigsegv;
 
        /* Set up to return from userspace.  If provided, use a stub
           already in userspace.  */
        err |= __put_user(in_syscall ? INSN_LDI_R25_1 : INSN_LDI_R25_0,
-                       &frame->tramp[0]);
-       err |= __put_user(INSN_LDI_R20, &frame->tramp[1]);
-       err |= __put_user(INSN_BLE_SR2_R0, &frame->tramp[2]);
-       err |= __put_user(INSN_NOP, &frame->tramp[3]);
+                       &frame->tramp[SIGRETURN_TRAMP+0]);
+       err |= __put_user(INSN_LDI_R20, &frame->tramp[SIGRETURN_TRAMP+1]);
+       err |= __put_user(INSN_BLE_SR2_R0, &frame->tramp[SIGRETURN_TRAMP+2]);
+       err |= __put_user(INSN_NOP, &frame->tramp[SIGRETURN_TRAMP+3]);
 
 #if DEBUG_SIG
        /* Assert that we're flushing in the correct space... */
        {
                int sid;
                asm ("mfsp %%sr3,%0" : "=r" (sid));
-               DBG(("flushing 64 bytes at space %#x offset %p\n",
-                      sid, frame->tramp));
+               DBG(1,"setup_rt_frame: Flushing 64 bytes at space %#x offset %p\n",
+                      sid, frame->tramp);
        }
 #endif
 
-       flush_user_dcache_range((unsigned long) &frame->tramp[0],
-                          (unsigned long) &frame->tramp[4]);
-       flush_user_icache_range((unsigned long) &frame->tramp[0],
-                          (unsigned long) &frame->tramp[4]);
+       flush_user_dcache_range((unsigned long) &frame->tramp[SIGRETURN_TRAMP],
+                          (unsigned long) &frame->tramp[TRAMP_SIZE]);
+       flush_user_icache_range((unsigned long) &frame->tramp[SIGRETURN_TRAMP],
+                          (unsigned long) &frame->tramp[TRAMP_SIZE]);
 
-       rp = (unsigned long) frame->tramp;
+       rp = (unsigned long) &frame->tramp[SIGRETURN_TRAMP];
 
        if (err)
                goto give_sigsegv;
@@ -359,8 +409,8 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
                
                haddr = fdesc.addr;
                regs->gr[19] = fdesc.gp;
-               DBG(("64 bit signal, exe=%#lx, r19=%#lx, in_syscall=%d\n",
-                    haddr, regs->gr[19], in_syscall));
+               DBG(1,"setup_rt_frame: 64 bit signal, exe=%#lx, r19=%#lx, in_syscall=%d\n",
+                    haddr, regs->gr[19], in_syscall);
        }
 #endif
 
@@ -391,24 +441,33 @@ setup_rt_frame(int sig, struct k_sigaction *ka, siginfo_t *info,
 
        regs->gr[2]  = rp;                /* userland return pointer */
        regs->gr[26] = sig;               /* signal number */
-       regs->gr[25] = A(&frame->info); /* siginfo pointer */
-       regs->gr[24] = A(&frame->uc);   /* ucontext pointer */
        
-       DBG(("making sigreturn frame: %#lx + %#x = %#lx\n",
+#ifdef __LP64__
+       if(personality(current->personality) == PER_LINUX32){
+               regs->gr[25] = A(&compat_frame->info); /* siginfo pointer */
+               regs->gr[24] = A(&compat_frame->uc);   /* ucontext pointer */
+       } else
+#endif
+       {               
+               regs->gr[25] = A(&frame->info); /* siginfo pointer */
+               regs->gr[24] = A(&frame->uc);   /* ucontext pointer */
+       }
+       
+       DBG(1,"setup_rt_frame: making sigreturn frame: %#lx + %#lx = %#lx\n",
               regs->gr[30], sigframe_size,
-              regs->gr[30] + sigframe_size));
+              regs->gr[30] + sigframe_size);
        /* Raise the user stack pointer to make a proper call frame. */
        regs->gr[30] = (A(frame) + sigframe_size);
 
 
-       DBG(("SIG deliver (%s:%d): frame=0x%p sp=%#lx iaoq=%#lx/%#lx rp=%#lx\n",
+       DBG(1,"setup_rt_frame: sig deliver (%s,%d) frame=0x%p sp=%#lx iaoq=%#lx/%#lx rp=%#lx\n",
               current->comm, current->pid, frame, regs->gr[30],
-              regs->iaoq[0], regs->iaoq[1], rp));
+              regs->iaoq[0], regs->iaoq[1], rp);
 
        return 1;
 
 give_sigsegv:
-       DBG(("setup_rt_frame sending SIGSEGV\n"));
+       DBG(1,"setup_rt_frame: sending SIGSEGV\n");
        if (sig == SIGSEGV)
                ka->sa.sa_handler = SIG_DFL;
        si.si_signo = SIGSEGV;
@@ -431,8 +490,8 @@ handle_signal(unsigned long sig, siginfo_t *info, sigset_t *oldset,
 {
        struct k_sigaction *ka = &current->sighand->action[sig-1];
 
-       DBG(("handle_signal(sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p)\n",
-              sig, ka, info, oldset, regs));
+       DBG(1,"handle_signal: sig=%ld, ka=%p, info=%p, oldset=%p, regs=%p\n",
+              sig, ka, info, oldset, regs);
        
        /* Set up the stack frame */
        if (!setup_rt_frame(sig, ka, info, oldset, regs, in_syscall))
@@ -470,8 +529,8 @@ do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall)
        struct k_sigaction *ka;
        int signr;
 
-       DBG(("do_signal(oldset=0x%p, regs=0x%p, sr7 %#lx, pending %d, in_syscall=%d\n",
-              oldset, regs, regs->sr[7], current->sigpending, in_syscall));
+       DBG(1,"\ndo_signal: oldset=0x%p, regs=0x%p, sr7 %#lx, in_syscall=%d\n",
+              oldset, regs, regs->sr[7], in_syscall);
 
        /* Everyone else checks to see if they are in kernel mode at
           this point and exits if that's the case.  I'm not sure why
@@ -481,11 +540,13 @@ do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall)
        if (!oldset)
                oldset = &current->blocked;
 
-       DBG(("do_signal: oldset %08lx:%08lx\n", 
-               oldset->sig[0], oldset->sig[1]));
+       DBG(1,"do_signal: oldset %08lx / %08lx\n", 
+               oldset->sig[0], oldset->sig[1]);
 
 
        signr = get_signal_to_deliver(&info, regs, NULL);
+       DBG(3,"do_signal: signr = %d, regs->gr[28] = %ld\n", signr, regs->gr[28]); 
+       
        if (signr > 0) {
                /* Restart a system call if necessary. */
                if (in_syscall) {
@@ -494,14 +555,14 @@ do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall)
                        case -ERESTART_RESTARTBLOCK:
                                current_thread_info()->restart_block.fn = do_no_restart_syscall;
                        case -ERESTARTNOHAND:
-                               DBG(("ERESTARTNOHAND: returning -EINTR\n"));
+                               DBG(1,"ERESTARTNOHAND: returning -EINTR\n");
                                regs->gr[28] = -EINTR;
                                break;
 
                        case -ERESTARTSYS:
                                ka = &current->sighand->action[signr-1];
                                if (!(ka->sa.sa_flags & SA_RESTART)) {
-                                       DBG(("ERESTARTSYS: putting -EINTR\n"));
+                                       DBG(1,"ERESTARTSYS: putting -EINTR\n");
                                        regs->gr[28] = -EINTR;
                                        break;
                                }
@@ -520,9 +581,8 @@ do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall)
                   delivery failed, we need to continue to iterate in
                   this loop so we can deliver the SIGSEGV... */
                if (handle_signal(signr, &info, oldset, regs, in_syscall)) {
-                       DBG((KERN_DEBUG
-                               "Exiting do_signal (success), regs->gr[28] = %ld\n",
-                               regs->gr[28]));
+                       DBG(1,KERN_DEBUG "do_signal: Exit (success), regs->gr[28] = %ld\n",
+                               regs->gr[28]);
                        return 1;
                }
        }
@@ -530,10 +590,42 @@ do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall)
        /* Did we come from a system call? */
        if (in_syscall) {
                /* Restart the system call - no handlers present */
-               if (regs->gr[28] == -ERESTART_RESTARTBLOCK ||
-                   regs->gr[28] == -ERESTARTNOHAND ||
-                   regs->gr[28] == -ERESTARTSYS ||
-                   regs->gr[28] == -ERESTARTNOINTR) {
+               if (regs->gr[28] == -ERESTART_RESTARTBLOCK) {
+                       unsigned int *usp = (unsigned int *)regs->gr[30];
+
+                       /* Setup a trampoline to restart the syscall
+                        * with __NR_restart_syscall
+                        *
+                        *  0: <return address (orig r31)>
+                        *  4: <2nd half for 64-bit>
+                        *  8: ldw 0(%sp), %r31
+                        * 12: be 0x100(%sr2, %r0)
+                        * 16: ldi __NR_restart_syscall, %r20
+                        */
+#ifndef __LP64__
+                       put_user(regs->gr[31], &usp[0]);
+                       put_user(0x0fc0109f, &usp[2]);
+#else
+                       put_user(regs->gr[31] >> 32, &usp[0]);
+                       put_user(regs->gr[31] & 0xffffffff, &usp[1]);
+                       put_user(0x0fc010df, &usp[2]);
+#endif
+                       put_user(0xe0008200, &usp[3]);
+                       put_user(0x34140000, &usp[4]);
+
+                       /* Stack is 64-byte aligned, and we only 
+                        * need to flush 1 cache line */
+                       asm("fdc 0(%%sr3, %0)\n"
+                           "fic 0(%%sr3, %0)\n"
+                           "sync\n"
+                           : : "r"(regs->gr[30]));
+
+                       regs->gr[31] = regs->gr[30] + 8;
+                       /* Preserve original r28. */
+                       regs->gr[28] = regs->orig_r28;
+               } else if (regs->gr[28] == -ERESTARTNOHAND ||
+                          regs->gr[28] == -ERESTARTSYS ||
+                          regs->gr[28] == -ERESTARTNOINTR) {
                        /* Hooray for delayed branching.  We don't
                            have to restore %r20 (the system call
                            number) because it gets loaded in the delay
@@ -544,8 +636,8 @@ do_signal(sigset_t *oldset, struct pt_regs *regs, int in_syscall)
                }
        }
        
-       DBG(("Exiting do_signal (not delivered), regs->gr[28] = %ld\n", 
-               regs->gr[28]));
+       DBG(1,"do_signal: Exit (not delivered), regs->gr[28] = %ld\n", 
+               regs->gr[28]);
 
        return 0;
 }
index cb29923..08c1044 100644 (file)
 #include <linux/types.h>
 #include <linux/errno.h>
 
+#include <asm/compat_signal.h>
 #include <asm/uaccess.h>
+
+#include "signal32.h"
 #include "sys32.h"
 
-struct k_sigaction32 {
-       struct sigaction32 sa;
-};
+#define DEBUG_COMPAT_SIG 0 
+#define DEBUG_COMPAT_SIG_LEVEL 2
+
+#if DEBUG_COMPAT_SIG
+#define DBG(LEVEL, ...) \
+       ((DEBUG_COMPAT_SIG_LEVEL >= LEVEL) \
+       ? printk(__VA_ARGS__) : (void) 0)
+#else
+#define DBG(LEVEL, ...)
+#endif
+
+#define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
 
-static inline void
+inline void
 sigset_32to64(sigset_t *s64, compat_sigset_t *s32)
 {
        s64->sig[0] = s32->sig[0] | ((unsigned long)s32->sig[1] << 32);
 }
 
-static inline void
+inline void
 sigset_64to32(compat_sigset_t *s32, sigset_t *s64)
 {
        s32->sig[0] = s64->sig[0] & 0xffffffffUL;
@@ -120,16 +132,10 @@ sys32_rt_sigaction(int sig, const struct sigaction32 *act, struct sigaction32 *o
        return ret;
 }
 
-typedef struct {
-       unsigned int ss_sp;
-       int ss_flags;
-       compat_size_t ss_size;
-} stack_t32;
-
 int 
-do_sigaltstack32 (const stack_t32 *uss32, stack_t32 *uoss32, unsigned long sp)
+do_sigaltstack32 (const compat_stack_t *uss32, compat_stack_t *uoss32, unsigned long sp)
 {
-       stack_t32 ss32, oss32;
+       compat_stack_t ss32, oss32;
        stack_t ss, oss;
        stack_t *ssp = NULL, *ossp = NULL;
        int ret;
@@ -160,3 +166,218 @@ do_sigaltstack32 (const stack_t32 *uss32, stack_t32 *uoss32, unsigned long sp)
 
        return ret;
 }
+
+long
+restore_sigcontext32(struct compat_sigcontext *sc, struct compat_regfile * rf,
+               struct pt_regs *regs)
+{
+       long err = 0;
+       compat_uint_t compat_reg;
+       compat_uint_t compat_regt;
+       int regn;
+       
+       /* When loading 32-bit values into 64-bit registers make
+          sure to clear the upper 32-bits */
+       DBG(2,"restore_sigcontext32: PER_LINUX32 process\n");
+       DBG(2,"restore_sigcontext32: sc = 0x%p, rf = 0x%p, regs = 0x%p\n", sc, rf, regs);
+       DBG(2,"restore_sigcontext32: compat_sigcontext is %#lx bytes\n", sizeof(*sc));
+       for(regn=0; regn < 32; regn++){
+               err |= __get_user(compat_reg,&sc->sc_gr[regn]);
+               regs->gr[regn] = compat_reg;
+               /* Load upper half */
+               err |= __get_user(compat_regt,&rf->rf_gr[regn]);
+               regs->gr[regn] = ((u64)compat_regt << 32) | (u64)compat_reg;
+               DBG(3,"restore_sigcontext32: gr%02d = %#lx (%#x / %#x)\n", 
+                               regn, regs->gr[regn], compat_regt, compat_reg);
+       }
+       DBG(2,"restore_sigcontext32: sc->sc_fr = 0x%p (%#lx)\n",sc->sc_fr, sizeof(sc->sc_fr));
+       /* XXX: BE WARNED FR's are 64-BIT! */
+       err |= __copy_from_user(regs->fr, sc->sc_fr, sizeof(regs->fr));
+               
+       /* Better safe than sorry, pass __get_user two things of
+          the same size and let gcc do the upward conversion to 
+          64-bits */           
+       err |= __get_user(compat_reg, &sc->sc_iaoq[0]);
+       /* Load upper half */
+       err |= __get_user(compat_regt, &rf->rf_iaoq[0]);
+       regs->iaoq[0] = ((u64)compat_regt << 32) | (u64)compat_reg;
+       DBG(2,"restore_sigcontext32: upper half of iaoq[0] = %#lx\n", compat_regt);
+       DBG(2,"restore_sigcontext32: sc->sc_iaoq[0] = %p => %#x\n", 
+                       &sc->sc_iaoq[0], compat_reg);
+
+       err |= __get_user(compat_reg, &sc->sc_iaoq[1]);
+       /* Load upper half */
+       err |= __get_user(compat_regt, &rf->rf_iaoq[1]);
+       regs->iaoq[1] = ((u64)compat_regt << 32) | (u64)compat_reg;
+       DBG(2,"restore_sigcontext32: upper half of iaoq[1] = %#lx\n", compat_regt);
+       DBG(2,"restore_sigcontext32: sc->sc_iaoq[1] = %p => %#x\n", 
+                       &sc->sc_iaoq[1],compat_reg);    
+       DBG(2,"restore_sigcontext32: iaoq is %#lx / %#lx\n", 
+                       regs->iaoq[0],regs->iaoq[1]);           
+               
+       err |= __get_user(compat_reg, &sc->sc_iasq[0]);
+       /* Load the upper half for iasq */
+       err |= __get_user(compat_regt, &rf->rf_iasq[0]);
+       regs->iasq[0] = ((u64)compat_regt << 32) | (u64)compat_reg;
+       DBG(2,"restore_sigcontext32: upper half of iasq[0] = %#lx\n", compat_regt);
+       
+       err |= __get_user(compat_reg, &sc->sc_iasq[1]);
+       /* Load the upper half for iasq */
+       err |= __get_user(compat_regt, &rf->rf_iasq[1]);
+       regs->iasq[1] = ((u64)compat_regt << 32) | (u64)compat_reg;
+       DBG(2,"restore_sigcontext32: upper half of iasq[1] = %#lx\n", compat_regt);
+       DBG(2,"restore_sigcontext32: iasq is %#lx / %#lx\n", 
+               regs->iasq[0],regs->iasq[1]);           
+
+       err |= __get_user(compat_reg, &sc->sc_sar);
+       /* Load the upper half for sar */
+       err |= __get_user(compat_regt, &rf->rf_sar);
+       regs->sar = ((u64)compat_regt << 32) | (u64)compat_reg; 
+       DBG(2,"restore_sigcontext32: upper_half & sar = %#lx\n", compat_regt);  
+       DBG(2,"restore_sigcontext32: sar is %#lx\n", regs->sar);                
+       DBG(2,"restore_sigcontext32: r28 is %ld\n", regs->gr[28]);
+       
+       return err;
+}
+
+/*
+ * Set up the sigcontext structure for this process.
+ * This is not an easy task if the kernel is 64-bit, it will require
+ * that we examine the process personality to determine if we need to
+ * truncate for a 32-bit userspace.
+ */
+long
+setup_sigcontext32(struct compat_sigcontext *sc, struct compat_regfile * rf, 
+               struct pt_regs *regs, int in_syscall)            
+{
+       compat_int_t flags = 0;
+       long err = 0;
+       compat_uint_t compat_reg;
+       compat_uint_t compat_regb;
+       int regn;
+       
+       if (on_sig_stack((unsigned long) sc))
+               flags |= PARISC_SC_FLAG_ONSTACK;
+       
+       if (in_syscall) {
+               
+               DBG(1,"setup_sigcontext32: in_syscall\n");
+               
+               flags |= PARISC_SC_FLAG_IN_SYSCALL;
+               /* Truncate gr31 */
+               compat_reg = (compat_uint_t)(regs->gr[31]);
+               /* regs->iaoq is undefined in the syscall return path */
+               err |= __put_user(compat_reg, &sc->sc_iaoq[0]);
+               DBG(2,"setup_sigcontext32: sc->sc_iaoq[0] = %p <= %#x\n",
+                               &sc->sc_iaoq[0], compat_reg);
+               
+               /* Store upper half */
+               compat_reg = (compat_uint_t)(regs->gr[32] >> 32);
+               err |= __put_user(compat_reg, &rf->rf_iaoq[0]);
+               DBG(2,"setup_sigcontext32: upper half iaoq[0] = %#x\n", compat_reg);
+               
+               
+               compat_reg = (compat_uint_t)(regs->gr[31]+4);
+               err |= __put_user(compat_reg, &sc->sc_iaoq[1]);
+               DBG(2,"setup_sigcontext32: sc->sc_iaoq[1] = %p <= %#x\n",
+                               &sc->sc_iaoq[1], compat_reg);
+               /* Store upper half */
+               compat_reg = (compat_uint_t)((regs->gr[32]+4) >> 32);
+               err |= __put_user(compat_reg, &rf->rf_iaoq[1]);
+               DBG(2,"setup_sigcontext32: upper half iaoq[1] = %#x\n", compat_reg);
+               
+               /* Truncate sr3 */
+               compat_reg = (compat_uint_t)(regs->sr[3]);
+               err |= __put_user(compat_reg, &sc->sc_iasq[0]);
+               err |= __put_user(compat_reg, &sc->sc_iasq[1]);         
+               
+               /* Store upper half */
+               compat_reg = (compat_uint_t)(regs->sr[3] >> 32);
+               err |= __put_user(compat_reg, &rf->rf_iasq[0]);
+               err |= __put_user(compat_reg, &rf->rf_iasq[1]);         
+               
+               DBG(2,"setup_sigcontext32: upper half iasq[0] = %#x\n", compat_reg);
+               DBG(2,"setup_sigcontext32: upper half iasq[1] = %#x\n", compat_reg);            
+               DBG(1,"setup_sigcontext32: iaoq %#lx / %#lx\n",                         
+                       regs->gr[31], regs->gr[31]+4);
+               
+       } else {
+               
+               compat_reg = (compat_uint_t)(regs->iaoq[0]);
+               err |= __put_user(compat_reg, &sc->sc_iaoq[0]);
+               DBG(2,"setup_sigcontext32: sc->sc_iaoq[0] = %p <= %#x\n",
+                               &sc->sc_iaoq[0], compat_reg);
+               /* Store upper half */
+               compat_reg = (compat_uint_t)(regs->iaoq[0] >> 32);
+               err |= __put_user(compat_reg, &rf->rf_iaoq[0]); 
+               DBG(2,"setup_sigcontext32: upper half iaoq[0] = %#x\n", compat_reg);
+               
+               compat_reg = (compat_uint_t)(regs->iaoq[1]);
+               err |= __put_user(compat_reg, &sc->sc_iaoq[1]);
+               DBG(2,"setup_sigcontext32: sc->sc_iaoq[1] = %p <= %#x\n",
+                               &sc->sc_iaoq[1], compat_reg);
+               /* Store upper half */
+               compat_reg = (compat_uint_t)(regs->iaoq[1] >> 32);
+               err |= __put_user(compat_reg, &rf->rf_iaoq[1]);
+               DBG(2,"setup_sigcontext32: upper half iaoq[1] = %#x\n", compat_reg);
+               
+               
+               compat_reg = (compat_uint_t)(regs->iasq[0]);
+               err |= __put_user(compat_reg, &sc->sc_iasq[0]);
+               DBG(2,"setup_sigcontext32: sc->sc_iasq[0] = %p <= %#x\n",
+                               &sc->sc_iasq[0], compat_reg);
+               /* Store upper half */
+               compat_reg = (compat_uint_t)(regs->iasq[0] >> 32);
+               err |= __put_user(compat_reg, &rf->rf_iasq[0]);
+               DBG(2,"setup_sigcontext32: upper half iasq[0] = %#x\n", compat_reg);
+               
+               
+               compat_reg = (compat_uint_t)(regs->iasq[1]);
+               err |= __put_user(compat_reg, &sc->sc_iasq[1]);
+               DBG(2,"setup_sigcontext32: sc->sc_iasq[1] = %p <= %#x\n",
+                               &sc->sc_iasq[1], compat_reg);
+               /* Store upper half */
+               compat_reg = (compat_uint_t)(regs->iasq[1] >> 32);
+               err |= __put_user(compat_reg, &rf->rf_iasq[1]);
+               DBG(2,"setup_sigcontext32: upper half iasq[1] = %#x\n", compat_reg);
+
+               /* Print out the IAOQ for debugging */          
+               DBG(1,"setup_sigcontext32: ia0q %#lx / %#lx\n", 
+                       regs->iaoq[0], regs->iaoq[1]);
+       }
+
+       err |= __put_user(flags, &sc->sc_flags);
+       
+       DBG(1,"setup_sigcontext32: Truncating general registers.\n");
+       
+       for(regn=0; regn < 32; regn++){
+               /* Truncate a general register */
+               compat_reg = (compat_uint_t)(regs->gr[regn]);
+               err |= __put_user(compat_reg, &sc->sc_gr[regn]);
+               /* Store upper half */
+               compat_regb = (compat_uint_t)(regs->gr[regn] >> 32);
+               err |= __put_user(compat_regb, &rf->rf_gr[regn]);
+
+               /* DEBUG: Write out the "upper / lower" register data */
+               DBG(2,"setup_sigcontext32: gr%02d = %#x / %#x\n", regn, 
+                               compat_regb, compat_reg);
+       }
+       
+       /* Copy the floating point registers (same size)
+          XXX: BE WARNED FR's are 64-BIT! */   
+       DBG(1,"setup_sigcontext32: Copying from regs to sc, "
+             "sc->sc_fr size = %#lx, regs->fr size = %#lx\n",
+               sizeof(regs->fr), sizeof(sc->sc_fr));
+       err |= __copy_to_user(sc->sc_fr, regs->fr, sizeof(regs->fr));
+
+       compat_reg = (compat_uint_t)(regs->sar);
+       err |= __put_user(compat_reg, &sc->sc_sar);
+       DBG(2,"setup_sigcontext32: sar is %#x\n", compat_reg);
+       /* Store upper half */
+       compat_reg = (compat_uint_t)(regs->sar >> 32);
+       err |= __put_user(compat_reg, &rf->rf_sar);     
+       DBG(2,"setup_sigcontext32: upper half sar = %#x\n", compat_reg);
+       DBG(1,"setup_sigcontext32: r28 is %ld\n", regs->gr[28]);
+
+       return err;
+}
diff --git a/arch/parisc/kernel/signal32.h b/arch/parisc/kernel/signal32.h
new file mode 100644 (file)
index 0000000..9399b3b
--- /dev/null
@@ -0,0 +1,25 @@
+#ifndef _PARISC64_KERNEL_SIGNAL32_H
+#define _PARISC64_KERNEL_SIGNAL32_H
+
+#include <linux/compat.h>
+#include <asm/compat_signal.h>
+#include <asm/compat_rt_sigframe.h>
+
+/* ELF32 signal handling */
+
+struct k_sigaction32 {
+       struct compat_sigaction sa;
+};
+
+void sigset_32to64(sigset_t *s64, compat_sigset_t *s32);
+void sigset_64to32(compat_sigset_t *s32, sigset_t *s64);
+int do_sigaltstack32 (const compat_stack_t *uss32, 
+               compat_stack_t *uoss32, unsigned long sp);
+long restore_sigcontext32(struct compat_sigcontext *sc, 
+               struct compat_regfile *rf,
+               struct pt_regs *regs);
+long setup_sigcontext32(struct compat_sigcontext *sc, 
+               struct compat_regfile *rf,
+               struct pt_regs *regs, int in_syscall);
+
+#endif
index 7837596..4e30cf5 100644 (file)
@@ -257,7 +257,7 @@ ipi_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                                printk(KERN_CRIT "Unknown IPI num on CPU%d: %lu\n",
                                        this_cpu, which);
                                ops &= ~(1 << which);
-                               return;
+                               return IRQ_NONE;
                        } /* Switch */
                } /* while (ops) */
        }
@@ -326,7 +326,7 @@ int
 smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
 {
        struct smp_call_struct data;
-       long timeout;
+       unsigned long timeout;
        static spinlock_t lock = SPIN_LOCK_UNLOCKED;
        
        data.func = func;
@@ -376,6 +376,8 @@ smp_call_function (void (*func) (void *info), void *info, int retry, int wait)
        return 0;
 }
 
+EXPORT_SYMBOL(smp_call_function);
+
 
 
 /*
index 4175021..d93e93d 100644 (file)
@@ -241,108 +241,6 @@ asmlinkage ssize_t parisc_readahead(int fd, unsigned int high, unsigned int low,
 }
 
 /*
- * FIXME, please remove this crap as soon as possible
- *
- * This is here to fix up broken glibc structures, 
- * which are already fixed in newer glibcs
- */
-#include <linux/msg.h>
-#include <linux/sem.h>
-#include <linux/shm.h>
-#include "sys32.h"
-
-struct broken_ipc_perm
-{
-    key_t key;                 /* Key.  */
-    uid_t uid;                 /* Owner's user ID.  */
-    gid_t gid;                 /* Owner's group ID.  */
-    uid_t cuid;                        /* Creator's user ID.  */
-    gid_t cgid;                        /* Creator's group ID.  */
-    unsigned short int mode;           /* Read/write permission.  */
-    unsigned short int __pad1;
-    unsigned short int seq;            /* Sequence number.  */
-    unsigned short int __pad2;
-    unsigned long int __unused1;
-    unsigned long int __unused2;
-};
-                   
-struct broken_shmid64_ds {
-       struct broken_ipc_perm  shm_perm;       /* operation perms */
-       size_t                  shm_segsz;      /* size of segment (bytes) */
-#ifndef __LP64__
-       unsigned int            __pad1;
-#endif
-       __kernel_time_t         shm_atime;      /* last attach time */
-#ifndef __LP64__
-       unsigned int            __pad2;
-#endif
-       __kernel_time_t         shm_dtime;      /* last detach time */
-#ifndef __LP64__
-       unsigned int            __pad3;
-#endif
-       __kernel_time_t         shm_ctime;      /* last change time */
-       __kernel_pid_t          shm_cpid;       /* pid of creator */
-       __kernel_pid_t          shm_lpid;       /* pid of last operator */
-       unsigned int            shm_nattch;     /* no. of current attaches */
-       unsigned int            __unused1;
-       unsigned int            __unused2;
-};
-
-static void convert_broken_perm (struct broken_ipc_perm *out, struct ipc64_perm *in)
-{
-       out->key  = in->key;
-       out->uid  = in->uid;
-       out->gid  = in->gid;
-       out->cuid = in->cuid;
-       out->cgid = in->cgid;
-       out->mode = in->mode;
-       out->seq  = in->seq;
-}
-
-static int copyout_broken_shmid64(struct broken_shmid64_ds *buf, struct shmid64_ds *sbuf)
-{
-       struct broken_shmid64_ds tbuf;
-       
-       memset(&tbuf, 0, sizeof tbuf);
-       convert_broken_perm (&tbuf.shm_perm, &sbuf->shm_perm);
-       tbuf.shm_segsz = sbuf->shm_segsz;
-       tbuf.shm_atime = sbuf->shm_atime;
-       tbuf.shm_dtime = sbuf->shm_dtime;
-       tbuf.shm_ctime = sbuf->shm_ctime;
-       tbuf.shm_cpid = sbuf->shm_cpid;
-       tbuf.shm_lpid = sbuf->shm_lpid;
-       tbuf.shm_nattch = sbuf->shm_nattch;
-       return copy_to_user(buf, &tbuf, sizeof tbuf) ? -EFAULT : 0;
-}
-
-int sys_msgctl_broken(int msqid, int cmd, struct msqid_ds *buf)
-{
-       return sys_msgctl (msqid, cmd & ~IPC_64, buf);
-}
-
-int sys_semctl_broken(int semid, int semnum, int cmd, union semun arg)
-{
-       return sys_semctl (semid, semnum, cmd & ~IPC_64, arg);
-}
-
-int sys_shmctl_broken(int shmid, int cmd, struct shmid64_ds *buf)
-{
-       struct shmid64_ds sbuf;
-       int err;
-
-       if (cmd & IPC_64) {
-               cmd &= ~IPC_64;
-               if (cmd == IPC_STAT || cmd == SHM_STAT) {
-                       KERNEL_SYSCALL(err, sys_shmctl, shmid, cmd, (struct shmid_ds *)&sbuf);
-                       if (err == 0)
-                               err = copyout_broken_shmid64((struct broken_shmid64_ds *)buf, &sbuf);
-                       return err;
-               }
-       }
-       return sys_shmctl (shmid, cmd, (struct shmid_ds *)buf);
-}
-
-/*
  * This changes the io permissions bitmap in the current task.
  */
 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int turn_on)
index 5231378..6fce529 100644 (file)
@@ -1352,12 +1352,10 @@ asmlinkage int sys32_lseek(unsigned int fd, int offset, unsigned int origin)
        return sys_lseek(fd, offset, origin);
 }
 
-asmlinkage long sys32_semctl_broken(int semid, int semnum, int cmd, union semun arg)
+asmlinkage long sys32_semctl(int semid, int semnum, int cmd, union semun arg)
 {
         union semun u;
        
-       cmd &= ~IPC_64; /* should be removed together with the _broken suffix */
-
         if (cmd == SETVAL) {
                 /* Ugh.  arg is a union of int,ptr,ptr,ptr, so is 8 bytes.
                  * The int should be in the first 4, but our argument
index 2621f1c..2ee2c7a 100644 (file)
@@ -28,7 +28,7 @@
 #define ENTRY_COMP(_name_) .word sys_##_name_
 #endif
 
-       ENTRY_SAME(ni_syscall)  /* 0  -  old "setup()" system call*/
+       ENTRY_SAME(restart_syscall)     /* 0 */
        ENTRY_SAME(exit)
        ENTRY_SAME(fork_wrapper)
        ENTRY_SAME(read)
        ENTRY_COMP(recvmsg)
        ENTRY_SAME(semop)               /* 185 */
        ENTRY_SAME(semget)
-       ENTRY_DIFF(semctl_broken)
+       ENTRY_DIFF(semctl)
        ENTRY_DIFF(msgsnd)
        ENTRY_DIFF(msgrcv)
        ENTRY_SAME(msgget)              /* 190 */
-       ENTRY_SAME(msgctl_broken)
+       ENTRY_SAME(msgctl)
        ENTRY_SAME(shmat_wrapper)
        ENTRY_SAME(shmdt)
        ENTRY_SAME(shmget)
-       ENTRY_SAME(shmctl_broken)       /* 195 */
+       ENTRY_SAME(shmctl)              /* 195 */
        ENTRY_SAME(ni_syscall)          /* streams1 */
        ENTRY_SAME(ni_syscall)          /* streams2 */
        ENTRY_SAME(lstat64)
index 58a9077..12bd24b 100644 (file)
@@ -232,7 +232,6 @@ do_settimeofday (struct timespec *tv)
        write_sequnlock_irq(&xtime_lock);
        return 0;
 }
-
 EXPORT_SYMBOL(do_settimeofday);
 
 /*
index 4cdf46e..f83053a 100644 (file)
@@ -430,9 +430,19 @@ void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long o
        if (!console_drivers)
                pdc_console_restart();
 
-       if (code == 1)
-           transfer_pim_to_trap_frame(regs);
+       /* Not all paths will gutter the processor... */
+       switch(code){
+
+       case 1:
+               transfer_pim_to_trap_frame(regs);
+               break;
+
+       default:
+               /* Fall through */
+               break;
 
+       }
+           
        show_stack(NULL, (unsigned long *)regs->gr[30]);
 
        printk("\n");
@@ -447,6 +457,7 @@ void parisc_terminate(char *msg, struct pt_regs *regs, int code, unsigned long o
         * system will shut down immediately right here. */
        pdc_soft_power_button(0);
        
+       /* Gutter the processor! */
        for(;;)
            ;
 }
@@ -557,20 +568,45 @@ void handle_interruption(int code, struct pt_regs *regs)
                si.si_addr = (void *) regs->iaoq[0];
                force_sig_info(SIGFPE, &si, current);
                return;
-
+               
+       case 13:
+               /* Conditional Trap
+                  The condition succees in an instruction which traps 
+                  on condition  */
+               if(user_mode(regs)){
+                       si.si_signo = SIGFPE;
+                       /* Set to zero, and let the userspace app figure it out from
+                          the insn pointed to by si_addr */
+                       si.si_code = 0;
+                       si.si_addr = (void *) regs->iaoq[0];
+                       force_sig_info(SIGFPE, &si, current);
+                       return;
+               } else 
+                       /* The kernel doesn't want to handle condition codes */
+                       break;
+               
        case 14:
                /* Assist Exception Trap, i.e. floating point exception. */
                die_if_kernel("Floating point exception", regs, 0); /* quiet */
                handle_fpe(regs);
                return;
-
+               
+       case 15:
+               /* Data TLB miss fault/Data page fault */
+               /* Fall through */
+       case 16:
+               /* Non-access instruction TLB miss fault */
+               /* The instruction TLB entry needed for the target address of the FIC
+                  is absent, and hardware can't find it, so we get to cleanup */
+               /* Fall through */
        case 17:
                /* Non-access data TLB miss fault/Non-access data page fault */
                /* TODO: Still need to add slow path emulation code here */
-               pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
-               
+               /* TODO: Understand what is meant by the TODO listed
+                        above this one. (Carlos) */
                fault_address = regs->ior;
-               parisc_terminate("Non access data tlb fault!",regs,code,fault_address);
+               fault_space = regs->isr;
+               break;
 
        case 18:
                /* PCXS only -- later cpu's split this into types 26,27 & 28 */
@@ -580,9 +616,8 @@ void handle_interruption(int code, struct pt_regs *regs)
                        return;
                }
                /* Fall Through */
-
-       case 15: /* Data TLB miss fault/Data page fault */
-       case 26: /* PCXL: Data memory access rights trap */
+       case 26: 
+               /* PCXL: Data memory access rights trap */
                fault_address = regs->ior;
                fault_space   = regs->isr;
                break;
@@ -638,7 +673,6 @@ void handle_interruption(int code, struct pt_regs *regs)
                        up_read(&current->mm->mmap_sem);
                }
                /* Fall Through */
-
        case 27: 
                /* Data memory protection ID trap */
                die_if_kernel("Protection id trap", regs, code);
index 97d68cd..bb4fc35 100644 (file)
  */
 
 #include <linux/config.h>
-#include <linux/sched.h>
 #include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/errno.h>
-#include <linux/ptrace.h>
-#include <linux/timer.h>
-#include <linux/mm.h>
-#include <linux/smp.h>
-#include <linux/smp_lock.h>
-#include <linux/spinlock.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
 #include <linux/module.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/atomic.h>
-
-#include <asm/smp.h>
-#include <asm/pdc.h>
 
 /* #define DEBUG_UNALIGNED 1 */
 
 #define OPCODE_STDA    OPCODE1(0x03,1,0xf)
 
 #define OPCODE_FLDWX   OPCODE1(0x09,0,0x0)
-#define OPCODE_FSTWX   OPCODE1(0x09,0,0x4)
+#define OPCODE_FLDWXR  OPCODE1(0x09,0,0x1)
+#define OPCODE_FSTWX   OPCODE1(0x09,0,0x8)
+#define OPCODE_FSTWXR  OPCODE1(0x09,0,0x9)
 #define OPCODE_FLDWS   OPCODE1(0x09,1,0x0)
-#define OPCODE_FSTWS   OPCODE1(0x09,1,0x4)
+#define OPCODE_FLDWSR  OPCODE1(0x09,1,0x1)
+#define OPCODE_FSTWS   OPCODE1(0x09,1,0x8)
+#define OPCODE_FSTWSR  OPCODE1(0x09,1,0x9)
 #define OPCODE_FLDDX   OPCODE1(0x0b,0,0x0)
-#define OPCODE_FSTDX   OPCODE1(0x0b,0,0x4)
+#define OPCODE_FSTDX   OPCODE1(0x0b,0,0x8)
 #define OPCODE_FLDDS   OPCODE1(0x0b,1,0x0)
-#define OPCODE_FSTDS   OPCODE1(0x0b,1,0x4)
+#define OPCODE_FSTDS   OPCODE1(0x0b,1,0x8)
 
 #define OPCODE_LDD_L   OPCODE2(0x14,0)
 #define OPCODE_FLDD_L  OPCODE2(0x14,1)
 #define IM5_3(i) IM((i),5)
 #define IM14(i) IM((i),14)
 
+#define ERR_NOTHANDLED -1
+#define ERR_PAGEFAULT  -2
+
 int unaligned_enabled = 1;
 
 void die_if_kernel (char *str, struct pt_regs *regs, long err);
@@ -136,16 +124,28 @@ static int emulate_ldh(struct pt_regs *regs, int toreg)
 {
        unsigned long saddr = regs->ior;
        unsigned long val = 0;
+       int ret;
 
        DPRINTF("load " RFMT ":" RFMT " to r%d for 2 bytes\n", 
                regs->isr, regs->ior, toreg);
 
        __asm__ __volatile__  (
-"      mtsp    %3, %%sr1\n"
-"      ldbs    0(%%sr1,%2), %%r20\n"
-"      ldbs    1(%%sr1,%2), %0\n"
-       "depw   %%r20, 23, 24, %0\n"
-       : "=r" (val)
+"      mtsp    %4, %%sr1\n"
+"1:    ldbs    0(%%sr1,%3), %%r20\n"
+"2:    ldbs    1(%%sr1,%3), %0\n"
+"      depw    %%r20, 23, 24, %0\n"
+"      cmpclr,= %%r0, %%r0, %1\n"
+"3:    ldo     -2(%%r0), %1\n"
+"      .section __ex_table,\"a\"\n"
+#ifdef __LP64__
+"      .dword  1b,(3b-1b)\n"
+"      .dword  2b,(3b-2b)\n"
+#else
+"      .word   1b,(3b-1b)\n"
+"      .word   2b,(3b-2b)\n"
+#endif
+"      .previous\n"
+       : "=r" (val), "=r" (ret)
        : "0" (val), "r" (saddr), "r" (regs->isr)
        : "r20" );
 
@@ -154,26 +154,39 @@ static int emulate_ldh(struct pt_regs *regs, int toreg)
        if (toreg)
                regs->gr[toreg] = val;
 
-       return 0;
+       return ret;
 }
+
 static int emulate_ldw(struct pt_regs *regs, int toreg, int flop)
 {
        unsigned long saddr = regs->ior;
        unsigned long val = 0;
+       int ret;
 
        DPRINTF("load " RFMT ":" RFMT " to r%d for 4 bytes\n", 
                regs->isr, regs->ior, toreg);
 
        __asm__ __volatile__  (
-"      zdep    %2,28,2,%%r19\n"                /* r19=(ofs&3)*8 */
-"      mtsp    %3, %%sr1\n"
-"      depw    %%r0,31,2,%2\n"
-"      ldw     0(%%sr1,%2),%0\n"
-"      ldw     4(%%sr1,%2),%%r20\n"
+"      zdep    %3,28,2,%%r19\n"                /* r19=(ofs&3)*8 */
+"      mtsp    %4, %%sr1\n"
+"      depw    %%r0,31,2,%3\n"
+"1:    ldw     0(%%sr1,%3),%0\n"
+"2:    ldw     4(%%sr1,%3),%%r20\n"
 "      subi    32,%%r19,%%r19\n"
 "      mtctl   %%r19,11\n"
 "      vshd    %0,%%r20,%0\n"
-       : "=r" (val)
+"      cmpclr,= %%r0, %%r0, %1\n"
+"3:    ldo     -2(%%r0), %1\n"
+"      .section __ex_table,\"a\"\n"
+#ifdef __LP64__
+"      .dword  1b,(3b-1b)\n"
+"      .dword  2b,(3b-2b)\n"
+#else
+"      .word   1b,(3b-1b)\n"
+"      .word   2b,(3b-2b)\n"
+#endif
+"      .previous\n"
+       : "=r" (val), "=r" (ret)
        : "0" (val), "r" (saddr), "r" (regs->isr)
        : "r19", "r20" );
 
@@ -184,12 +197,13 @@ static int emulate_ldw(struct pt_regs *regs, int toreg, int flop)
        else if (toreg)
                regs->gr[toreg] = val;
 
-       return 0;
+       return ret;
 }
 static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
 {
        unsigned long saddr = regs->ior;
        __u64 val = 0;
+       int ret;
 
        DPRINTF("load " RFMT ":" RFMT " to r%d for 8 bytes\n", 
                regs->isr, regs->ior, toreg);
@@ -200,51 +214,77 @@ static int emulate_ldd(struct pt_regs *regs, int toreg, int flop)
                return -1;
 #endif
        __asm__ __volatile__  (
-"      depd,z  %2,60,3,%%r19\n"                /* r19=(ofs&7)*8 */
-"      mtsp    %3, %%sr1\n"
-"      depd    %%r0,63,3,%2\n"
-"      ldd     0(%%sr1,%2),%0\n"
-"      ldd     8(%%sr1,%2),%%r20\n"
+"      depd,z  %3,60,3,%%r19\n"                /* r19=(ofs&7)*8 */
+"      mtsp    %4, %%sr1\n"
+"      depd    %%r0,63,3,%3\n"
+"1:    ldd     0(%%sr1,%3),%0\n"
+"2:    ldd     8(%%sr1,%3),%%r20\n"
 "      subi    64,%%r19,%%r19\n"
 "      mtsar   %%r19\n"
 "      shrpd   %0,%%r20,%%sar,%0\n"
-       : "=r" (val)
+"      cmpclr,= %%r0, %%r0, %1\n"
+"3:    ldo     -2(%%r0), %1\n"
+"      .section __ex_table,\"a\"\n"
+#ifdef __LP64__
+"      .dword  1b,(3b-1b)\n"
+"      .dword  2b,(3b-2b)\n"
+#else
+"      .word   1b,(3b-1b)\n"
+"      .word   2b,(3b-2b)\n"
+#endif
+"      .previous\n"
+       : "=r" (val), "=r" (ret)
        : "0" (val), "r" (saddr), "r" (regs->isr)
        : "r19", "r20" );
 #else
     {
        unsigned long valh=0,vall=0;
        __asm__ __volatile__  (
-"      zdep    %4,29,2,%%r19\n"                /* r19=(ofs&3)*8 */
-"      mtsp    %5, %%sr1\n"
-"      dep     %%r0,31,2,%4\n"
-"      ldw     0(%%sr1,%5),%0\n"
-"      ldw     4(%%sr1,%5),%1\n"
-"      ldw     8(%%sr1,%5),%%r20\n"
+"      zdep    %5,29,2,%%r19\n"                /* r19=(ofs&3)*8 */
+"      mtsp    %6, %%sr1\n"
+"      dep     %%r0,31,2,%5\n"
+"1:    ldw     0(%%sr1,%5),%0\n"
+"2:    ldw     4(%%sr1,%5),%1\n"
+"3:    ldw     8(%%sr1,%5),%%r20\n"
 "      subi    32,%%r19,%%r19\n"
 "      mtsar   %%r19\n"
 "      vshd    %0,%1,%0\n"
 "      vshd    %1,%%r20,%1\n"
-       : "=r" (valh), "=r" (vall)
+"      cmpclr,= %%r0, %%r0, %2\n"
+"4:    ldo     -2(%%r0), %2\n"
+"      .section __ex_table,\"a\"\n"
+#ifdef __LP64__
+"      .dword  1b,(4b-1b)\n"
+"      .dword  2b,(4b-2b)\n"
+"      .dword  3b,(4b-3b)\n"
+#else
+"      .word   1b,(4b-1b)\n"
+"      .word   2b,(4b-2b)\n"
+"      .word   3b,(4b-3b)\n"
+#endif
+"      .previous\n"
+       : "=r" (valh), "=r" (vall), "=r" (ret)
        : "0" (valh), "1" (vall), "r" (saddr), "r" (regs->isr)
        : "r19", "r20" );
        val=((__u64)valh<<32)|(__u64)vall;
     }
 #endif
 
-       DPRINTF("val = 0x" RFMT "\n", val);
+       DPRINTF("val = 0xllx\n", val);
 
        if (flop)
                regs->fr[toreg] = val;
        else if (toreg)
                regs->gr[toreg] = val;
 
-       return 0;
+       return ret;
 }
 
 static int emulate_sth(struct pt_regs *regs, int frreg)
 {
        unsigned long val = regs->gr[frreg];
+       int ret;
+
        if (!frreg)
                val = 0;
 
@@ -252,19 +292,32 @@ static int emulate_sth(struct pt_regs *regs, int frreg)
                val, regs->isr, regs->ior);
 
        __asm__ __volatile__ (
-"      mtsp %2, %%sr1\n"
-"      extrw,u %0, 23, 8, %%r19\n"
-"      stb %0, 1(%%sr1, %1)\n"
-"      stb %%r19, 0(%%sr1, %1)\n"
-       :
+"      mtsp %3, %%sr1\n"
+"      extrw,u %1, 23, 8, %%r19\n"
+"1:    stb %1, 1(%%sr1, %2)\n"
+"2:    stb %%r19, 0(%%sr1, %2)\n"
+"      cmpclr,= %%r0, %%r0, %0\n"
+"3:    ldo     -2(%%r0), %0\n"
+"      .section __ex_table,\"a\"\n"
+#ifdef __LP64__
+"      .dword  1b,(3b-1b)\n"
+"      .dword  2b,(3b-2b)\n"
+#else
+"      .word   1b,(3b-1b)\n"
+"      .word   2b,(3b-2b)\n"
+#endif
+"      .previous\n"
+       : "=r" (ret)
        : "r" (val), "r" (regs->ior), "r" (regs->isr)
        : "r19" );
 
-       return 0;
+       return ret;
 }
+
 static int emulate_stw(struct pt_regs *regs, int frreg, int flop)
 {
        unsigned long val;
+       int ret;
 
        if (flop)
                val = ((__u32*)(regs->fr))[frreg];
@@ -278,22 +331,33 @@ static int emulate_stw(struct pt_regs *regs, int frreg, int flop)
 
 
        __asm__ __volatile__ (
-"      mtsp %2, %%sr1\n"
-"      zdep    %1, 28, 2, %%r19\n"
-"      dep     %%r0, 31, 2, %1\n"
+"      mtsp %3, %%sr1\n"
+"      zdep    %2, 28, 2, %%r19\n"
+"      dep     %%r0, 31, 2, %2\n"
 "      mtsar   %%r19\n"
 "      depwi,z -2, %%sar, 32, %%r19\n"
-"      ldw     0(%%sr1,%1),%%r20\n"
-"      ldw     4(%%sr1,%1),%%r21\n"
-"      vshd    %%r0, %0, %%r22\n"
-"      vshd    %0, %%r0, %%r1\n"
+"1:    ldw     0(%%sr1,%2),%%r20\n"
+"2:    ldw     4(%%sr1,%2),%%r21\n"
+"      vshd    %%r0, %1, %%r22\n"
+"      vshd    %1, %%r0, %%r1\n"
 "      and     %%r20, %%r19, %%r20\n"
 "      andcm   %%r21, %%r19, %%r21\n"
 "      or      %%r22, %%r20, %%r20\n"
 "      or      %%r1, %%r21, %%r21\n"
-"      stw     %%r20,0(%%sr1,%1)\n"
-"      stw     %%r21,4(%%sr1,%1)\n"
-       :
+"      stw     %%r20,0(%%sr1,%2)\n"
+"      stw     %%r21,4(%%sr1,%2)\n"
+"      cmpclr,= %%r0, %%r0, %0\n"
+"3:    ldo     -2(%%r0), %0\n"
+"      .section __ex_table,\"a\"\n"
+#ifdef __LP64__
+"      .dword  1b,(3b-1b)\n"
+"      .dword  2b,(3b-2b)\n"
+#else
+"      .word   1b,(3b-1b)\n"
+"      .word   2b,(3b-2b)\n"
+#endif
+"      .previous\n"
+       : "=r" (ret)
        : "r" (val), "r" (regs->ior), "r" (regs->isr)
        : "r19", "r20", "r21", "r22", "r1" );
 
@@ -302,6 +366,7 @@ static int emulate_stw(struct pt_regs *regs, int frreg, int flop)
 static int emulate_std(struct pt_regs *regs, int frreg, int flop)
 {
        __u64 val;
+       int ret;
 
        if (flop)
                val = regs->fr[frreg];
@@ -310,7 +375,7 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop)
        else
                val = 0;
 
-       DPRINTF("store r%d (0x" %016llx ") to " RFMT ":" RFMT " for 8 bytes\n", frreg, 
+       DPRINTF("store r%d (0x%016llx) to " RFMT ":" RFMT " for 8 bytes\n", frreg, 
                val,  regs->isr, regs->ior);
 
 #ifdef CONFIG_PA20
@@ -319,52 +384,84 @@ static int emulate_std(struct pt_regs *regs, int frreg, int flop)
                return -1;
 #endif
        __asm__ __volatile__ (
-"      mtsp %2, %%sr1\n"
-"      depd,z  %1, 60, 3, %%r19\n"
-"      depd    %%r0, 63, 3, %1\n"
+"      mtsp %3, %%sr1\n"
+"      depd,z  %2, 60, 3, %%r19\n"
+"      depd    %%r0, 63, 3, %2\n"
 "      mtsar   %%r19\n"
 "      depdi,z -2, %%sar, 64, %%r19\n"
-"      ldd     0(%%sr1,%1),%%r20\n"
-"      ldd     8(%%sr1,%1),%%r21\n"
-"      shrpd   %%r0, %0, %%sar, %%r22\n"
-"      shrpd   %0, %%r0, %%sar, %%r1\n"
+"1:    ldd     0(%%sr1,%2),%%r20\n"
+"2:    ldd     8(%%sr1,%2),%%r21\n"
+"      shrpd   %%r0, %1, %%sar, %%r22\n"
+"      shrpd   %1, %%r0, %%sar, %%r1\n"
 "      and     %%r20, %%r19, %%r20\n"
 "      andcm   %%r21, %%r19, %%r21\n"
 "      or      %%r22, %%r20, %%r20\n"
 "      or      %%r1, %%r21, %%r21\n"
-"      std     %%r20,0(%%sr1,%1)\n"
-"      std     %%r21,8(%%sr1,%1)\n"
-       :
+"3:    std     %%r20,0(%%sr1,%2)\n"
+"4:    std     %%r21,8(%%sr1,%2)\n"
+"      cmpclr,= %%r0, %%r0, %0\n"
+"5:    ldo     -2(%%r0), %0\n"
+"      .section __ex_table,\"a\"\n"
+#ifdef __LP64__
+"      .dword  1b,(5b-1b)\n"
+"      .dword  2b,(5b-2b)\n"
+"      .dword  3b,(5b-3b)\n"
+"      .dword  4b,(5b-4b)\n"
+#else
+"      .word   1b,(5b-1b)\n"
+"      .word   2b,(5b-2b)\n"
+"      .word   3b,(5b-3b)\n"
+"      .word   4b,(5b-4b)\n"
+#endif
+"      .previous\n"
+       : "=r" (ret)
        : "r" (val), "r" (regs->ior), "r" (regs->isr)
        : "r19", "r20", "r21", "r22", "r1" );
 #else
     {
        unsigned long valh=(val>>32),vall=(val&0xffffffffl);
        __asm__ __volatile__ (
-"      mtsp    %3, %%sr1\n"
-"      zdep    %1, 29, 2, %%r19\n"
-"      dep     %%r0, 31, 2, %1\n"
+"      mtsp    %4, %%sr1\n"
+"      zdep    %2, 29, 2, %%r19\n"
+"      dep     %%r0, 31, 2, %2\n"
 "      mtsar   %%r19\n"
 "      zvdepi  -2, 32, %%r19\n"
-"      ldw     0(%%sr1,%2),%%r20\n"
-"      ldw     8(%%sr1,%2),%%r21\n"
-"      vshd    %0, %1, %%r1\n"
-"      vshd    %%r0, %0, %0\n"
-"      vshd    %1, %%r0, %1\n"
+"1:    ldw     0(%%sr1,%3),%%r20\n"
+"2:    ldw     8(%%sr1,%3),%%r21\n"
+"      vshd    %1, %2, %%r1\n"
+"      vshd    %%r0, %1, %1\n"
+"      vshd    %2, %%r0, %2\n"
 "      and     %%r20, %%r19, %%r20\n"
 "      andcm   %%r21, %%r19, %%r21\n"
-"      or      %0, %%r20, %0\n"
-"      or      %1, %%r21, %1\n"
-"      stw     %0,0(%%sr1,%2)\n"
-"      stw     %%r1,4(%%sr1,%2)\n"
-"      stw     %1,8(%%sr1,%2)\n"
-       :
+"      or      %1, %%r20, %1\n"
+"      or      %2, %%r21, %2\n"
+"3:    stw     %1,0(%%sr1,%1)\n"
+"4:    stw     %%r1,4(%%sr1,%3)\n"
+"5:    stw     %2,8(%%sr1,%3)\n"
+"      cmpclr,= %%r0, %%r0, %0\n"
+"6:    ldo     -2(%%r0), %0\n"
+"      .section __ex_table,\"a\"\n"
+#ifdef __LP64__
+"      .dword  1b,(6b-1b)\n"
+"      .dword  2b,(6b-2b)\n"
+"      .dword  3b,(6b-3b)\n"
+"      .dword  4b,(6b-4b)\n"
+"      .dword  5b,(6b-5b)\n"
+#else
+"      .word   1b,(6b-1b)\n"
+"      .word   2b,(6b-2b)\n"
+"      .word   3b,(6b-3b)\n"
+"      .word   4b,(6b-4b)\n"
+"      .word   5b,(6b-5b)\n"
+#endif
+"      .previous\n"
+       : "=r" (ret)
        : "r" (valh), "r" (vall), "r" (regs->ior), "r" (regs->isr)
        : "r19", "r20", "r21", "r1" );
     }
 #endif
 
-       return 0;
+       return ret;
 }
 
 void handle_unaligned(struct pt_regs *regs)
@@ -373,41 +470,10 @@ void handle_unaligned(struct pt_regs *regs)
        static unsigned long last_time = 0;
        unsigned long newbase = R1(regs->iir)?regs->gr[R1(regs->iir)]:0;
        int modify = 0;
-       int ret = -1;
+       int ret = ERR_NOTHANDLED;
        struct siginfo si;
        register int flop=0;    /* true if this is a flop */
 
-       /* if the unaligned access is inside the kernel:
-        *   if the access is caused by a syscall, then we fault the calling
-        *     user process
-        */
-       if (!user_mode(regs))
-       {
-               const struct exception_table_entry *fix;
-
-               /* see if the offending code have its own
-                * exception handler 
-                */ 
-
-               fix = search_exception_tables(regs->iaoq[0]);
-               if (fix)
-               {
-                       /* lower bits of fix->skip are flags
-                        * upper bits are the handler addr
-                        */
-                       if (fix->skip & 1)
-                               regs->gr[8] = -EFAULT;
-                       if (fix->skip & 2)
-                               regs->gr[9] = 0;
-
-                       regs->iaoq[0] += ((fix->skip) & ~3);
-                       regs->iaoq[1] = regs->iaoq[0] + 4;
-                       regs->gr[0] &= ~PSW_B;
-
-                       return;
-               }
-       }
-
        /* log a message with pacing */
        if (user_mode(regs))
        {
@@ -541,6 +607,8 @@ void handle_unaligned(struct pt_regs *regs)
 
        case OPCODE_FLDWX:
        case OPCODE_FLDWS:
+       case OPCODE_FLDWXR:
+       case OPCODE_FLDWSR:
                flop=1;
                ret = emulate_ldw(regs,FR3(regs->iir),1);
                break;
@@ -553,6 +621,8 @@ void handle_unaligned(struct pt_regs *regs)
 
        case OPCODE_FSTWX:
        case OPCODE_FSTWS:
+       case OPCODE_FSTWXR:
+       case OPCODE_FSTWSR:
                flop=1;
                ret = emulate_stw(regs,FR3(regs->iir),1);
                break;
@@ -567,7 +637,7 @@ void handle_unaligned(struct pt_regs *regs)
        case OPCODE_LDCW_I:
        case OPCODE_LDCD_S:
        case OPCODE_LDCW_S:
-               ret = -1;       /* "undefined", but lets kill them. */
+               ret = ERR_NOTHANDLED;   /* "undefined", but lets kill them. */
                break;
        }
 #ifdef CONFIG_PA20
@@ -632,7 +702,7 @@ void handle_unaligned(struct pt_regs *regs)
                regs->gr[R1(regs->iir)] = newbase;
 
 
-       if (ret < 0)
+       if (ret == ERR_NOTHANDLED)
                printk(KERN_CRIT "Not-handled unaligned insn 0x%08lx\n", regs->iir);
 
        DPRINTF("ret = %d\n", ret);
@@ -641,13 +711,25 @@ void handle_unaligned(struct pt_regs *regs)
        {
                printk(KERN_CRIT "Unaligned handler failed, ret = %d\n", ret);
                die_if_kernel("Unaligned data reference", regs, 28);
+
+               if (ret == ERR_PAGEFAULT)
+               {
+                       si.si_signo = SIGSEGV;
+                       si.si_errno = 0;
+                       si.si_code = SEGV_MAPERR;
+                       si.si_addr = (void *)regs->ior;
+                       force_sig_info(SIGSEGV, &si, current);
+               }
+               else
+               {
 force_sigbus:
-               /* couldn't handle it ... */
-               si.si_signo = SIGBUS;
-               si.si_errno = 0;
-               si.si_code = BUS_ADRALN;
-               si.si_addr = (void *)regs->ior;
-               force_sig_info(SIGBUS, &si, current);
+                       /* couldn't handle it ... */
+                       si.si_signo = SIGBUS;
+                       si.si_errno = 0;
+                       si.si_code = BUS_ADRALN;
+                       si.si_addr = (void *)regs->ior;
+                       force_sig_info(SIGBUS, &si, current);
+               }
                
                return;
        }
index e8085a1..4d65585 100644 (file)
@@ -133,6 +133,43 @@ $lcfu_zero_loop:
        .procend
 
        /*
+        * unsigned long
+        * lcopy_in_user(void *to, const void *from, unsigned long n)
+        *
+        * Returns 0 for success.
+        * otherwise, returns number of bytes not transferred.
+        */
+
+       .export lcopy_in_user,code
+lcopy_in_user:
+       .proc
+       .callinfo NO_CALLS
+       .entry
+       comib,=,n   0,%r24,$lciu_done
+       get_sr
+$lciu_loop:
+       ldbs,ma     1(%sr1,%r25),%r1
+       addib,<>    -1,%r24,$lciu_loop
+1:      stbs,ma     %r1,1(%sr1,%r26)
+$lciu_done:
+       bv          %r0(%r2)
+       copy        %r24,%r28
+       .exit
+
+2:      b $lciu_done
+       ldo         1(%r24),%r24
+
+       .section __ex_table,"a"
+#ifdef __LP64__
+       .dword      1b,(2b-1b)
+#else
+       .word       1b,(2b-1b)
+#endif
+       .previous
+
+       .procend
+
+       /*
         * long lstrncpy_from_user(char *dst, const char *src, long n)
         *
         * Returns -EFAULT if exception before terminator,
index 0d2d1b0..2cdf790 100644 (file)
@@ -4,30 +4,38 @@
 # Author: Tom Rini <trini@mvista.com>
 #
 # Notes:
-# (1) For machine targets which produce more than one image, define
-# ZNETBOOT and ZNETBOOTRD to the image which should be available for
-# 'znetboot' and 'znetboot.initrd`
-# (2) Also, for machine targets which just need to remove the ELF header,
-# define END to be the machine name you want in the image.
-# (3) For machine targets which use the mktree program, define END to be
-# the machine name you want in the image, and you can optionally set
-# ENTRYPOINT which the image should be loaded at.  The optimal setting
-# for ENTRYPOINT is the link address.
+# (1) For machines that do not want to use the ELF image directly (including
+# stripping just the ELF header off), they must set the variables
+# zimage-$(CONFIG_MACHINE) and zimagerd-$(CONFIG_MACHINE) to the target
+# that produces the desired image and they must set end-$(CONFIG_MACHINE)
+# to what will be suffixed to the image filename.
+# (2) Regardless of (1), to have the resulting image be something other
+# than 'zImage.elf', set end-$(CONFIG_MACHINE) to be the suffix used for
+# the zImage, znetboot, and znetbootrd targets.
+# (3) For machine targets which use the mktree program, you can optionally
+# set entrypoint-$(CONFIG_MACHINE) to the location which the image should be
+# loaded at.  The optimal setting for entrypoint-$(CONFIG_MACHINE) is the link
+# address.
 # (4) It is advisable to pass in the memory size using BI_MEMSIZE and
 # get_mem_size(), which is memory controller dependent.  Add in the correct
-# XXX_memory.o file for this to work, as well as editing the $(MISC) file.
-
+# XXX_memory.o file for this to work, as well as editing the
+# misc-$(CONFIG_MACHINE) variable.
 
 boot                           := arch/ppc/boot
 common                         := $(boot)/common
 utils                          := $(boot)/utils
 bootlib                                := $(boot)/lib
 images                         := $(boot)/images
+tftpboot                       := /tftpboot
 
 # Normally, we use the 'misc.c' file for decompress_kernel and
 # whatnot.  Sometimes we need to override this however.
 misc-y := misc.o
 
+# Normally, we have our images end in .elf, but something we want to
+# change this.
+end-y := elf
+
 # Additionally, we normally don't need to mess with the L2 / L3 caches
 # if present on 'classic' PPC.
 cacheflag-y    := -DCLEAR_CACHES=""
@@ -41,48 +49,43 @@ clear_L2_L3 := $(boot)/simple/clear.S
       zimage-$(CONFIG_IBM_OPENBIOS)    := zImage-TREE
 zimageinitrd-$(CONFIG_IBM_OPENBIOS)    := zImage.initrd-TREE
          end-$(CONFIG_IBM_OPENBIOS)    := treeboot
-   tftpimage-$(CONFIG_IBM_OPENBIOS)    := /tftpboot/zImage.$(end-y)
         misc-$(CONFIG_IBM_OPENBIOS)    := misc-embedded.o
 
-   tftpimage-$(CONFIG_EMBEDDEDBOOT)    :=  /tftpboot/zImage.embedded
+         end-$(CONFIG_EMBEDDEDBOOT)    := embedded
         misc-$(CONFIG_EMBEDDEDBOOT)    := misc-embedded.o
 
       zimage-$(CONFIG_EBONY)           := zImage-TREE
 zimageinitrd-$(CONFIG_EBONY)           := zImage.initrd-TREE
          end-$(CONFIG_EBONY)           := ebony
   entrypoint-$(CONFIG_EBONY)           := 0x01000000
-   tftpimage-$(CONFIG_EBONY)           := /tftpboot/zImage.$(end-y)
 
       zimage-$(CONFIG_OCOTEA)          := zImage-TREE
 zimageinitrd-$(CONFIG_OCOTEA)          := zImage.initrd-TREE
          end-$(CONFIG_OCOTEA)          := ocotea
   entrypoint-$(CONFIG_OCOTEA)          := 0x01000000
-   tftpimage-$(CONFIG_OCOTEA)          := /tftpboot/zImage.$(end-y)
 
      extra.o-$(CONFIG_EV64260)         := direct.o misc-ev64260.o
-   tftpimage-$(CONFIG_EV64260)         := /tftpboot/zImage.ev64260
+         end-$(CONFIG_EV64260)         := ev64260
    cacheflag-$(CONFIG_EV64260)         := -include $(clear_L2_L3)
 
       zimage-$(CONFIG_GEMINI)          := zImage-STRIPELF
 zimageinitrd-$(CONFIG_GEMINI)          := zImage.initrd-STRIPELF
          end-$(CONFIG_GEMINI)          := gemini
-   tftpimage-$(CONFIG_GEMINI)          := /tftpboot/zImage.$(end-y)
 
      extra.o-$(CONFIG_K2)              := legacy.o
-   tftpimage-$(CONFIG_K2)              := /tftpboot/zImage.k2
+         end-$(CONFIG_K2)              := k2
    cacheflag-$(CONFIG_K2)              := -include $(clear_L2_L3)
 
 # kconfig 'feature', only one of these will ever be 'y' at a time.
 # The rest will be unset.
 motorola := $(CONFIG_MCPN765)$(CONFIG_MVME5100)$(CONFIG_PRPMC750) \
 $(CONFIG_PRPMC800)$(CONFIG_LOPEC)$(CONFIG_PPLUS)
+motorola := $(strip $(motorola))
 pcore := $(CONFIG_PCORE)$(CONFIG_POWERPMC250)
 
       zimage-$(motorola)               := zImage-PPLUS
 zimageinitrd-$(motorola)               := zImage.initrd-PPLUS
-   tftpimage-$(motorola)               := /tftpboot/zImage.pplus
-    znetboot-$(motorola)               := zImage.pplus
-  znetbootrd-$(motorola)               := zImage.initrd.pplus
+         end-$(motorola)               := pplus
 
 # Overrides previous assingment
      extra.o-$(CONFIG_PPLUS)           := legacy.o
@@ -91,10 +94,9 @@ zimageinitrd-$(motorola)             := zImage.initrd-PPLUS
 zimageinitrd-$(pcore)                  := zImage.initrd-STRIPELF
      extra.o-$(pcore)                  := chrpmap.o
          end-$(pcore)                  := pcore
-   tftpimage-$(pcore)                  := /tftpboot/zImage.$(end-y)
    cacheflag-$(pcore)                  := -include $(clear_L2_L3)
 
-   tftpimage-$(CONFIG_SANDPOINT)       := /tftpboot/zImage.sandpoint
+         end-$(CONFIG_SANDPOINT)       := sandpoint
    cacheflag-$(CONFIG_SANDPOINT)       := -include $(clear_L2_L3)
 
       zimage-$(CONFIG_SPRUCE)          := zImage-TREE
@@ -102,11 +104,9 @@ zimageinitrd-$(CONFIG_SPRUCE)              := zImage.initrd-TREE
          end-$(CONFIG_SPRUCE)          := spruce
   entrypoint-$(CONFIG_SPRUCE)          := 0x00800000
         misc-$(CONFIG_SPRUCE)          := misc-spruce.o
-   tftpimage-$(CONFIG_SPRUCE)          := /tftpboot/zImage.$(end-y)
-
 
-# tftp image is prefixed with .smp if compiled for SMP
-tftpimage-$(CONFIG_SMP)        += .smp
+# SMP images should have a '.smp' suffix.
+         end-$(CONFIG_SMP)             += .smp
 
 # This is a treeboot that needs init functions until the
 # boot rom is sorted out (i.e. this is short lived)
@@ -180,18 +180,10 @@ zImage.initrd: $(images)/$(zimageinitrd-y) $(obj)/zvmlinux.initrd
        rm -f $(obj)/zvmlinux.initrd
 
 znetboot: zImage
-ifneq ($(ZNETBOOT),)
-       cp $(images)/$(ZNETBOOT) $(tftpimage-y)
-else
-       cp $(images)/zImage.* $(tftpimage-y)
-endif
+       cp $(images)/zImage.$(end-y) $(tftpboot)/zImage.$(end-y)
 
 znetboot.initrd: zImage.initrd
-ifneq ($(znetbootrd-y),)
-       cp $(images)/$(znetbootrd-y) $(tftpimage-y)
-else
-       cp $(images)/zImage.* $(tftpimage-y)
-endif
+       cp $(images)/zImage.initrd.$(end-y) $(tftpboot)/zImage.initrd.$(end-y)
 
 $(images)/zImage-STRIPELF: $(obj)/zvmlinux
        dd if=$(obj)/zvmlinux of=$(images)/zImage.$(end-y) skip=64 bs=1k
index b272949..6e55053 100644 (file)
  *                  -- Cort
  *
  * Modified for x86 hosted builds by Matt Porter <porter@neta.com>
+ * Modified for Sparc hosted builds by Peter Wahl <PeterWahl@web.de>
  */
 
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <strings.h>
 #include <sys/stat.h>
 #include <unistd.h>
 
@@ -147,7 +149,7 @@ int main(int argc, char *argv[])
 void write_prep_partition(int in, int out)
 {
   unsigned char block[512];
-  partition_entry_t *pe = (partition_entry_t *)&block[0x1BE];
+  partition_entry_t pe;
   dword_t *entry  = (dword_t *)&block[0];
   dword_t *length = (dword_t *)&block[sizeof(long)];
   struct stat info;
@@ -177,8 +179,8 @@ void write_prep_partition(int in, int out)
    * Build a "PReP" partition table entry in the boot record
    *  - "PReP" may only look at the system_indicator
    */
-  pe->boot_indicator   = BootActive;
-  pe->system_indicator = SystemPrep;
+  pe.boot_indicator   = BootActive;
+  pe.system_indicator = SystemPrep;
   /*
    * The first block of the diskette is used by this "boot record" which
    * actually contains the partition table. (The first block of the
@@ -186,12 +188,12 @@ void write_prep_partition(int in, int out)
    * one partition on the diskette and it shall contain the rest of the
    * diskette.
    */
-  pe->starting_head     = 0;   /* zero-based                        */
-  pe->starting_sector   = 2;   /* one-based                         */
-  pe->starting_cylinder = 0;   /* zero-based                        */
-  pe->ending_head       = 1;   /* assumes two heads                 */
-  pe->ending_sector     = 18;  /* assumes 18 sectors/track          */
-  pe->ending_cylinder   = 79;  /* assumes 80 cylinders/diskette     */
+  pe.starting_head     = 0;    /* zero-based                        */
+  pe.starting_sector   = 2;    /* one-based                         */
+  pe.starting_cylinder = 0;    /* zero-based                        */
+  pe.ending_head       = 1;    /* assumes two heads                 */
+  pe.ending_sector     = 18;   /* assumes 18 sectors/track          */
+  pe.ending_cylinder   = 79;   /* assumes 80 cylinders/diskette     */
 
   /*
    * The "PReP" software ignores the above fields and just looks at
@@ -201,20 +203,20 @@ void write_prep_partition(int in, int out)
    *   - unlike the above sector numbers, the beginning sector is zero-based!
    */
 #if 0
-  pe->beginning_sector  = cpu_to_le32(1);
+  pe.beginning_sector  = cpu_to_le32(1);
 #else
   /* This has to be 0 on the PowerStack? */
 #ifdef __i386__
-  pe->beginning_sector  = 0;
+  pe.beginning_sector  = 0;
 #else
-  pe->beginning_sector  = cpu_to_le32(0);
+  pe.beginning_sector  = cpu_to_le32(0);
 #endif /* __i386__ */
 #endif
 
 #ifdef __i386__
-  pe->number_of_sectors = 2*18*80-1;
+  pe.number_of_sectors = 2*18*80-1;
 #else
-  pe->number_of_sectors = cpu_to_le32(2*18*80-1);
+  pe.number_of_sectors = cpu_to_le32(2*18*80-1);
 #endif /* __i386__ */
 
   write( out, block, sizeof(block) );
index e7bf1e5..5e28a06 100644 (file)
@@ -346,17 +346,19 @@ void enable_irq(unsigned int irq)
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, j;
+       int i = *(loff_t *) v, j;
        struct irqaction * action;
        unsigned long flags;
 
-       seq_puts(p, "           ");
-       for (j=0; j<NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "CPU%d       ", j);
-       seq_putc(p, '\n');
+       if (i == 0) {
+               seq_puts(p, "           ");
+               for (j=0; j<NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "CPU%d       ", j);
+               seq_putc(p, '\n');
+       }
 
-       for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                spin_lock_irqsave(&irq_desc[i].lock, flags);
                action = irq_desc[i].action;
                if ( !action || !action->handler )
@@ -381,22 +383,23 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
 skip:
                spin_unlock_irqrestore(&irq_desc[i].lock, flags);
-       }
+       } else if (i == NR_IRQS) {
 #ifdef CONFIG_TAU_INT
-       if (tau_initialized){
-               seq_puts(p, "TAU: ");
-               for (j = 0; j < NR_CPUS; j++)
-                       if (cpu_online(j))
-                               seq_printf(p, "%10u ", tau_interrupts(j));
-               seq_puts(p, "  PowerPC             Thermal Assist (cpu temp)\n");
-       }
+               if (tau_initialized){
+                       seq_puts(p, "TAU: ");
+                       for (j = 0; j < NR_CPUS; j++)
+                               if (cpu_online(j))
+                                       seq_printf(p, "%10u ", tau_interrupts(j));
+                       seq_puts(p, "  PowerPC             Thermal Assist (cpu temp)\n");
+               }
 #endif
 #ifdef CONFIG_SMP
-       /* should this be per processor send/receive? */
-       seq_printf(p, "IPI (recv/sent): %10u/%u\n",
-                  atomic_read(&ipi_recv), atomic_read(&ipi_sent));
+               /* should this be per processor send/receive? */
+               seq_printf(p, "IPI (recv/sent): %10u/%u\n",
+                               atomic_read(&ipi_recv), atomic_read(&ipi_sent));
 #endif
-       seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts);
+               seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts);
+       }
        return 0;
 }
 
@@ -569,67 +572,16 @@ static struct proc_dir_entry *smp_affinity_entry[NR_IRQS];
 
 cpumask_t irq_affinity [NR_IRQS];
 
-#define HEX_DIGITS (2*sizeof(cpumask_t))
-
 static int irq_affinity_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       cpumask_t tmp = irq_affinity[(long)data];
-       int k, len = 0;
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, irq_affinity[(long)data]);
+       if (count - len < 2)
                return -EINVAL;
-
-       for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(page, "%04hx", (u16)cpus_coerce(tmp));
-               len += j;
-               page += j;
-               cpus_shift_right(tmp, tmp, 16);
-       }
-
-       len += sprintf(page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
-static unsigned int parse_hex_value (const char __user *buffer,
-               unsigned long count, cpumask_t *ret)
-{
-       unsigned char hexnum [HEX_DIGITS];
-       cpumask_t value = CPU_MASK_NONE;
-       int i;
-
-       if (!count)
-               return -EINVAL;
-       if (count > HEX_DIGITS)
-               count = HEX_DIGITS;
-       if (copy_from_user(hexnum, buffer, count))
-               return -EFAULT;
-
-       /*
-        * Parse the first 8 characters as a hex string, any non-hex char
-        * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
-        */
-       for (i = 0; i < count; i++) {
-               unsigned int c = hexnum[i];
-               int k;
-
-               switch (c) {
-                       case '0' ... '9': c -= '0'; break;
-                       case 'a' ... 'f': c -= 'a'-10; break;
-                       case 'A' ... 'F': c -= 'A'-10; break;
-               default:
-                       goto out;
-               }
-               cpus_shift_left(value, value, 4);
-               for (k = 0; k < 4; ++k)
-                       if (c & (1 << k))
-                               cpu_set(k, value);
-       }
-out:
-       *ret = value;
-       return 0;
-}
-
 static int irq_affinity_write_proc (struct file *file, const char __user *buffer,
                                        unsigned long count, void *data)
 {
@@ -639,7 +591,7 @@ static int irq_affinity_write_proc (struct file *file, const char __user *buffer
        if (!irq_desc[irq].handler->set_affinity)
                return -EIO;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
 
        /*
         * Do not allow disabling IRQs completely - it's a too easy
@@ -664,19 +616,10 @@ static int irq_affinity_write_proc (struct file *file, const char __user *buffer
 static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       cpumask_t mask = *(cpumask_t *)data;
-       int k, len = 0;
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, *(cpumask_t *)data);
+       if (count - len < 2)
                return -EINVAL;
-
-       for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(page, "%04hx", (u16)cpus_coerce(mask));
-               len += j;
-               page += j;
-               cpus_shift_right(mask, mask, 16);
-       }
-       len += sprintf(page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
@@ -686,7 +629,7 @@ static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffe
        cpumask_t *mask = (cpumask_t *)data, full_count = count, err;
        cpumask_t new_value;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
        if (err)
                return err;
 
index 4f96a08..cf52e28 100644 (file)
@@ -1385,4 +1385,3 @@ _GLOBAL(sys_call_table)
        .long sys_statfs64
        .long sys_fstatfs64
        .long ppc_fadvise64_64
-       .long sys_ni_syscall    /* 255 - rtas (used on ppc64) */
index 9e3efe8..dc7e5be 100644 (file)
@@ -368,8 +368,8 @@ EXPORT_SYMBOL(next_mmu_context);
 EXPORT_SYMBOL(set_context);
 EXPORT_SYMBOL(handle_mm_fault); /* For MOL */
 EXPORT_SYMBOL_NOVERS(disarm_decr);
-extern long mol_trampoline;
 #ifdef CONFIG_PPC_STD_MMU
+extern long mol_trampoline;
 EXPORT_SYMBOL(mol_trampoline); /* For MOL */
 EXPORT_SYMBOL(flush_hash_pages); /* For MOL */
 #ifdef CONFIG_SMP
index 95e12ea..ab3a213 100644 (file)
@@ -72,21 +72,6 @@ config PPC64
        bool
        default y
 
-# VMX is pSeries only for now until somebody writes the iSeries
-# exception vectors for it
-config ALTIVEC
-       bool "Support for VMX (Altivec) vector unit"
-       depends on PPC_PSERIES
-       default y
-
-config POWER4_ONLY
-       bool "Optimize for POWER4"
-       default n
-       ---help---
-         Cause the compiler to optimize for POWER4 processors. The resulting
-         binary will not work on POWER3 or RS64 processors when compiled with
-         binutils 2.15 or later.
-
 config SMP
        bool "Symmetric multi-processing support"
        ---help---
@@ -145,24 +130,17 @@ config MSCHUNKS
        depends on PPC_ISERIES
        default y
 
-
-config PPC_RTAS
-       bool "Proc interface to RTAS"
-       depends on !PPC_ISERIES
-
 config RTAS_FLASH
        tristate "Firmware flash interface"
-       depends on PPC_RTAS
+       depends on !PPC_ISERIES
 
 config SCANLOG
        tristate "Scanlog dump interface"
-       depends on PPC_RTAS
+       depends on !PPC_ISERIES
 
-config LPARCFG
-       bool "LPAR Configuration Data"
-       help
-       Provide system capacity information via human readable 
-       <key word>=<value> pairs through a /proc/ppc64/lparcfg interface.
+config PPC_RTAS
+       bool "Proc interface to RTAS"
+       depends on !PPC_ISERIES
 
 endmenu
 
@@ -340,7 +318,7 @@ endmenu
 
 config VIOPATH
        bool
-       depends on VIOCONS || VIODASD || VIOCD || VIOTAPE || VETH
+       depends on PPC_ISERIES
        default y
 
 source "arch/ppc64/oprofile/Kconfig"
@@ -375,36 +353,17 @@ config MAGIC_SYSRQ
          keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
          unless you really know what this hack does.
 
-choice
-       prompt "Kernel Debugger"
-
 config XMON
-       bool "XMON"
+       bool "Include xmon kernel debugger"
+       depends on DEBUG_KERNEL
        help
          Include in-kernel hooks for the xmon kernel monitor/debugger.
          Unless you are intending to debug the kernel, say N here.
 
-config KDB
-       bool "KDB"
-       help
-         Include in-kernel hooks for the kdb kernel monitor/debugger.
-         Unless you are intending to debug the kernel, say N here.
-
-endchoice
-
-
 config XMON_DEFAULT
        bool "Enable xmon by default"
        depends on XMON
 
-config KDB_OFF
-       bool "Turn KDB off as default."
-       depends on KDB
-
-       help
-          KDB will remain built into the kernel, but will be turned off. 
-          "cat 1 > /proc/sys/kernel/kdb" to turn it on. 
-
 config PPCDBG
        bool "Include PPCDBG realtime debugging"
        depends on DEBUG_KERNEL
index 09d7826..3fccbf4 100644 (file)
 
 KERNELLOAD     := 0xc000000000000000
 
-ifeq ($(shell uname -m),ppc64)
-CHECKS         = checks
-endif
-
-HAS_BIARCH      := $(shell if $(CC) -m64 -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi;)
-ifeq ($(HAS_BIARCH),y)
-AS              := $(AS) -64
-LD              := $(LD) -m elf64ppc
-CC             := $(CC) -m64
-endif
-
 LDFLAGS                := -m elf64ppc
 LDFLAGS_vmlinux        := -Bstatic -e $(KERNELLOAD) -Ttext $(KERNELLOAD)
-CFLAGS         += -msoft-float -pipe -Wno-uninitialized -mminimal-toc
-
-ifeq ($(CONFIG_POWER4_ONLY),y)
-CFLAGS         += -mcpu=power4
-else
-CFLAGS         += -mtune=power4
-endif
+CFLAGS         += -msoft-float -pipe -Wno-uninitialized -mminimal-toc \
+               -mcpu=power4
 
 have_zero_bss := $(shell if $(CC) -fno-zero-initialized-in-bss -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo y; else echo n; fi)
 
@@ -48,11 +32,6 @@ libs-y                               += arch/ppc64/lib/
 core-y                         += arch/ppc64/kernel/
 core-y                         += arch/ppc64/mm/
 core-$(CONFIG_XMON)            += arch/ppc64/xmon/
-ifeq ($(CONFIG_KDB),y)
-  # Use ifeq for now because kdb subdirs are not in bk yet
-  # Otherwise make mrproper will die because it also cleans core-n
-  core-y                       += arch/ppc64/kdb/
-endif
 drivers-$(CONFIG_OPROFILE)     += arch/ppc64/oprofile/
 
 boot := arch/ppc64/boot
@@ -68,8 +47,6 @@ BOOTIMAGE := $(bootimage-y)
 install: vmlinux
        $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
 
-all: $(BOOTIMAGE)
-
 archclean:
        $(Q)$(MAKE) $(clean)=$(boot)
 
index f7b8884..16d5be4 100644 (file)
@@ -25,12 +25,6 @@ typedef unsigned int u32;
 typedef signed long long s64;
 typedef unsigned long long u64;
 
-typedef struct {
-       __u32 u[4];
-} __attribute((aligned(16))) __vector128;
-
 #define BITS_PER_LONG 32
 
-typedef __vector128 vector128;
-
 #endif /* _PPC64_TYPES_H */
index e77c021..40dc0b9 100644 (file)
@@ -23,7 +23,7 @@ CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 # CONFIG_BSD_PROCESS_ACCT is not set
 CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=17
+CONFIG_LOG_BUF_SHIFT=16
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
 # CONFIG_EMBEDDED is not set
@@ -158,7 +158,6 @@ CONFIG_SCSI_CONSTANTS=y
 # CONFIG_SCSI_INITIO is not set
 # CONFIG_SCSI_INIA100 is not set
 CONFIG_SCSI_SYM53C8XX_2=y
-# CONFIG_SCSI_IBMSIS is not set
 CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
 CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
 CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
@@ -228,10 +227,11 @@ CONFIG_INET_AH=m
 CONFIG_INET_ESP=m
 CONFIG_INET_IPCOMP=m
 # CONFIG_IPV6 is not set
-# CONFIG_XFRM_USER is not set
-
-
-
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_NETFILTER is not set
+CONFIG_XFRM=y
+CONFIG_XFRM_USER=m
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -240,7 +240,7 @@ CONFIG_IPV6_SCTP__=y
 # CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
 # CONFIG_VLAN_8021Q is not set
-CONFIG_LLC=y
+# CONFIG_LLC is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_NET_DIVERT is not set
@@ -346,11 +346,6 @@ CONFIG_PPPOE=m
 #
 # Token Ring devices (depends on LLC=y)
 #
-CONFIG_TR=y
-CONFIG_IBMOL=y
-# CONFIG_IBMLS is not set
-# CONFIG_3C359 is not set
-# CONFIG_TMS380TR is not set
 # CONFIG_NET_FC is not set
 # CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
@@ -731,8 +726,6 @@ CONFIG_DEBUG_KERNEL=y
 CONFIG_MAGIC_SYSRQ=y
 CONFIG_XMON=y
 CONFIG_XMON_DEFAULT=y
-# CONFIG_KDB is not set
-# CONFIG_KDB_OFF is not set
 # CONFIG_PPCDBG is not set
 # CONFIG_DEBUG_INFO is not set
 
diff --git a/arch/ppc64/kdb/Makefile b/arch/ppc64/kdb/Makefile
deleted file mode 100644 (file)
index 075cc81..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-obj-y          := kdba_bt.o kdba_bp.o kdba_id.o kdba_io.o ppc-dis.o ppc-opc.o kdbasupport.o 
-
-# Warning: running with a minimal-toc means that kdb_setjmp will break
-# due to saving the wrong r30. A solution would be to move it into setjmp.S
-EXTRA_CFLAGS = -mno-minimal-toc
-
-override CFLAGS := $(CFLAGS) -I. -Iarch/ppc64/kdb
diff --git a/arch/ppc64/kdb/ansidecl.h b/arch/ppc64/kdb/ansidecl.h
deleted file mode 100644 (file)
index f2d1f91..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-/* ANSI and traditional C compatability macros
-   Copyright 1991, 1992, 1996, 1999 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-/* ANSI and traditional C compatibility macros
-
-   ANSI C is assumed if __STDC__ is #defined.
-
-   Macro       ANSI C definition       Traditional C definition
-   -----       ---- - ----------       ----------- - ----------
-   PTR         `void *'                `char *'
-   LONG_DOUBLE `long double'           `double'
-   VOLATILE    `volatile'              `'
-   SIGNED      `signed'                `'
-   PTRCONST    `void *const'           `char *'
-   ANSI_PROTOTYPES  1                  not defined
-
-   CONST is also defined, but is obsolete.  Just use const.
-
-   obsolete --     DEFUN (name, arglist, args)
-
-       Defines function NAME.
-
-       ARGLIST lists the arguments, separated by commas and enclosed in
-       parentheses.  ARGLIST becomes the argument list in traditional C.
-
-       ARGS list the arguments with their types.  It becomes a prototype in
-       ANSI C, and the type declarations in traditional C.  Arguments should
-       be separated with `AND'.  For functions with a variable number of
-       arguments, the last thing listed should be `DOTS'.
-
-   obsolete --     DEFUN_VOID (name)
-
-       Defines a function NAME, which takes no arguments.
-
-   obsolete --     EXFUN (name, (prototype))   -- obsolete.
-
-       Replaced by PARAMS.  Do not use; will disappear someday soon.
-       Was used in external function declarations.
-       In ANSI C it is `NAME PROTOTYPE' (so PROTOTYPE should be enclosed in
-       parentheses).  In traditional C it is `NAME()'.
-       For a function that takes no arguments, PROTOTYPE should be `(void)'.
-
-   obsolete --     PROTO (type, name, (prototype)    -- obsolete.
-
-       This one has also been replaced by PARAMS.  Do not use.
-
-   PARAMS ((args))
-
-       We could use the EXFUN macro to handle prototype declarations, but
-       the name is misleading and the result is ugly.  So we just define a
-       simple macro to handle the parameter lists, as in:
-
-             static int foo PARAMS ((int, char));
-
-       This produces:  `static int foo();' or `static int foo (int, char);'
-
-       EXFUN would have done it like this:
-
-             static int EXFUN (foo, (int, char));
-
-       but the function is not external...and it's hard to visually parse
-       the function name out of the mess.   EXFUN should be considered
-       obsolete; new code should be written to use PARAMS.
-
-   DOTS is also obsolete.
-
-   Examples:
-
-       extern int printf PARAMS ((const char *format, ...));
-*/
-
-#ifndef        _ANSIDECL_H
-
-#define        _ANSIDECL_H     1
-
-
-/* Every source file includes this file,
-   so they will all get the switch for lint.  */
-/* LINTLIBRARY */
-
-
-#if defined (__STDC__) || defined (_AIX) || (defined (__mips) && defined (_SYSTYPE_SVR4)) || defined(_WIN32)
-/* All known AIX compilers implement these things (but don't always
-   define __STDC__).  The RISC/OS MIPS compiler defines these things
-   in SVR4 mode, but does not define __STDC__.  */
-
-#define        PTR             void *
-#define        PTRCONST        void *CONST
-#define        LONG_DOUBLE     long double
-
-#ifndef IN_GCC
-#define        AND             ,
-#define        NOARGS          void
-#define        VOLATILE        volatile
-#define        SIGNED          signed
-#endif /* ! IN_GCC */
-
-#ifndef PARAMS
-#define PARAMS(paramlist)              paramlist
-#endif
-#define ANSI_PROTOTYPES                        1
-
-#define VPARAMS(ARGS)                  ARGS
-#define VA_START(va_list,var)          va_start(va_list,var)
-
-/* These are obsolete.  Do not use.  */
-#ifndef IN_GCC
-#define CONST                          const
-#define DOTS                           , ...
-#define PROTO(type, name, arglist)     type name arglist
-#define EXFUN(name, proto)             name proto
-#define DEFUN(name, arglist, args)     name(args)
-#define DEFUN_VOID(name)               name(void)
-#endif /* ! IN_GCC */
-
-#else  /* Not ANSI C.  */
-
-#define        PTR             char *
-#define        PTRCONST        PTR
-#define        LONG_DOUBLE     double
-
-#ifndef IN_GCC
-#define        AND             ;
-#define        NOARGS
-#define        VOLATILE
-#define        SIGNED
-#endif /* !IN_GCC */
-
-#ifndef const /* some systems define it in header files for non-ansi mode */
-#define        const
-#endif
-
-#define PARAMS(paramlist)              ()
-
-#define VPARAMS(ARGS)                  (va_alist) va_dcl
-#define VA_START(va_list,var)          va_start(va_list)
-
-/* These are obsolete.  Do not use.  */
-#ifndef IN_GCC
-#define CONST
-#define DOTS
-#define PROTO(type, name, arglist)     type name ()
-#define EXFUN(name, proto)             name()
-#define DEFUN(name, arglist, args)     name arglist args;
-#define DEFUN_VOID(name)               name()
-#endif /* ! IN_GCC */
-
-#endif /* ANSI C.  */
-
-/* Define macros for some gcc attributes.  This permits us to use the
-   macros freely, and know that they will come into play for the
-   version of gcc in which they are supported.  */
-
-#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
-# define __attribute__(x)
-#endif
-
-#ifndef ATTRIBUTE_UNUSED_LABEL
-# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 93)
-#  define ATTRIBUTE_UNUSED_LABEL
-# else
-#  define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED
-# endif /* GNUC < 2.93 */
-#endif /* ATTRIBUTE_UNUSED_LABEL */
-
-#ifndef ATTRIBUTE_UNUSED
-#define ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#endif /* ATTRIBUTE_UNUSED */
-
-#ifndef ATTRIBUTE_NORETURN
-#define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
-#endif /* ATTRIBUTE_NORETURN */
-
-#ifndef ATTRIBUTE_PRINTF
-#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((format (__printf__, m, n)))
-#define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2)
-#define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3)
-#define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4)
-#define ATTRIBUTE_PRINTF_4 ATTRIBUTE_PRINTF(4, 5)
-#define ATTRIBUTE_PRINTF_5 ATTRIBUTE_PRINTF(5, 6)
-#endif /* ATTRIBUTE_PRINTF */
-
-#endif /* ansidecl.h   */
diff --git a/arch/ppc64/kdb/bfd.h b/arch/ppc64/kdb/bfd.h
deleted file mode 100644 (file)
index cd98965..0000000
+++ /dev/null
@@ -1,3706 +0,0 @@
-/* DO NOT EDIT!  -*- buffer-read-only: t -*-  This file is automatically 
-   generated from "bfd-in.h", "init.c", "opncls.c", "libbfd.c", 
-   "section.c", "archures.c", "reloc.c", "syms.c", "bfd.c", "archive.c", 
-   "corefile.c", "targets.c" and "format.c".
-   Run "make headers" in your build bfd/ to regenerate.  */
-
-/* Main header file for the bfd library -- portable access to object files.
-   Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-   2000, 2001
-   Free Software Foundation, Inc.
-   Contributed by Cygnus Support.
-
-This file is part of BFD, the Binary File Descriptor library.
-
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-#ifndef __BFD_H_SEEN__
-#define __BFD_H_SEEN__
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include "ansidecl.h"
-#include "symcat.h"
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#ifndef SABER
-/* This hack is to avoid a problem with some strict ANSI C preprocessors.
-   The problem is, "32_" is not a valid preprocessing token, and we don't
-   want extra underscores (e.g., "nlm_32_").  The XCONCAT2 macro will
-   cause the inner CONCAT2 macros to be evaluated first, producing
-   still-valid pp-tokens.  Then the final concatenation can be done.  */
-#undef CONCAT4
-#define CONCAT4(a,b,c,d) XCONCAT2(CONCAT2(a,b),CONCAT2(c,d))
-#endif
-#endif
-
-#define BFD_VERSION 211920007
-#define BFD_VERSION_DATE 20011016
-#define BFD_VERSION_STRING "2.11.92.0.7 20011016 Debian\/GNU Linux"
-
-/* The word size used by BFD on the host.  This may be 64 with a 32
-   bit target if the host is 64 bit, or if other 64 bit targets have
-   been selected with --enable-targets, or if --enable-64-bit-bfd.  */
-#define BFD_ARCH_SIZE 64
-
-/* The word size of the default bfd target.  */
-#define BFD_DEFAULT_TARGET_SIZE 32
-
-#define BFD_HOST_64BIT_LONG 1
-#define BFD_HOST_64_BIT long
-#define BFD_HOST_U_64_BIT unsigned long
-
-#if BFD_ARCH_SIZE >= 64
-#define BFD64
-#endif
-
-#ifndef INLINE
-#if __GNUC__ >= 2
-#define INLINE __inline__
-#else
-#define INLINE
-#endif
-#endif
-
-/* forward declaration */
-typedef struct _bfd bfd;
-
-/* To squelch erroneous compiler warnings ("illegal pointer
-   combination") from the SVR3 compiler, we would like to typedef
-   boolean to int (it doesn't like functions which return boolean.
-   Making sure they are never implicitly declared to return int
-   doesn't seem to help).  But this file is not configured based on
-   the host.  */
-/* General rules: functions which are boolean return true on success
-   and false on failure (unless they're a predicate).   -- bfd.doc */
-/* I'm sure this is going to break something and someone is going to
-   force me to change it.  */
-/* typedef enum boolean {false, true} boolean; */
-/* Yup, SVR4 has a "typedef enum boolean" in <sys/types.h>  -fnf */
-/* It gets worse if the host also defines a true/false enum... -sts */
-/* And even worse if your compiler has built-in boolean types... -law */
-#if defined (__GNUG__) && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))
-#define TRUE_FALSE_ALREADY_DEFINED
-#endif
-#ifdef MPW
-/* Pre-emptive strike - get the file with the enum.  */
-#include <Types.h>
-#define TRUE_FALSE_ALREADY_DEFINED
-#endif /* MPW */
-#ifndef TRUE_FALSE_ALREADY_DEFINED
-typedef enum bfd_boolean {false, true} boolean;
-#define BFD_TRUE_FALSE
-#else
-/* Use enum names that will appear nowhere else.  */
-typedef enum bfd_boolean {bfd_fffalse, bfd_tttrue} boolean;
-#endif
-
-/* Support for different sizes of target format ints and addresses.
-   If the type `long' is at least 64 bits, BFD_HOST_64BIT_LONG will be
-   set to 1 above.  Otherwise, if gcc is being used, this code will
-   use gcc's "long long" type.  Otherwise, BFD_HOST_64_BIT must be
-   defined above.  */
-
-#ifndef BFD_HOST_64_BIT
-# if BFD_HOST_64BIT_LONG
-#  define BFD_HOST_64_BIT long
-#  define BFD_HOST_U_64_BIT unsigned long
-# else
-#  ifdef __GNUC__
-#   if __GNUC__ >= 2
-#    define BFD_HOST_64_BIT long long
-#    define BFD_HOST_U_64_BIT unsigned long long
-#   endif /* __GNUC__ >= 2 */
-#  endif /* ! defined (__GNUC__) */
-# endif /* ! BFD_HOST_64BIT_LONG */
-#endif /* ! defined (BFD_HOST_64_BIT) */
-
-#ifdef BFD64
-
-#ifndef BFD_HOST_64_BIT
- #error No 64 bit integer type available
-#endif /* ! defined (BFD_HOST_64_BIT) */
-
-typedef BFD_HOST_U_64_BIT bfd_vma;
-typedef BFD_HOST_64_BIT bfd_signed_vma;
-typedef BFD_HOST_U_64_BIT bfd_size_type;
-typedef BFD_HOST_U_64_BIT symvalue;
-
-#ifndef fprintf_vma
-#if BFD_HOST_64BIT_LONG
-#define sprintf_vma(s,x) sprintf (s, "%016lx", x)
-#define fprintf_vma(f,x) fprintf (f, "%016lx", x)
-#else
-#define _bfd_int64_low(x) ((unsigned long) (((x) & 0xffffffff)))
-#define _bfd_int64_high(x) ((unsigned long) (((x) >> 32) & 0xffffffff))
-#define fprintf_vma(s,x) \
-  fprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
-#define sprintf_vma(s,x) \
-  sprintf ((s), "%08lx%08lx", _bfd_int64_high (x), _bfd_int64_low (x))
-#endif
-#endif
-
-#else /* not BFD64  */
-
-/* Represent a target address.  Also used as a generic unsigned type
-   which is guaranteed to be big enough to hold any arithmetic types
-   we need to deal with.  */
-typedef unsigned long bfd_vma;
-
-/* A generic signed type which is guaranteed to be big enough to hold any
-   arithmetic types we need to deal with.  Can be assumed to be compatible
-   with bfd_vma in the same way that signed and unsigned ints are compatible
-   (as parameters, in assignment, etc).  */
-typedef long bfd_signed_vma;
-
-typedef unsigned long symvalue;
-typedef unsigned long bfd_size_type;
-
-/* Print a bfd_vma x on stream s.  */
-#define fprintf_vma(s,x) fprintf (s, "%08lx", x)
-#define sprintf_vma(s,x) sprintf (s, "%08lx", x)
-
-#endif /* not BFD64  */
-
-/* A pointer to a position in a file.  */
-/* FIXME:  This should be using off_t from <sys/types.h>.
-   For now, try to avoid breaking stuff by not including <sys/types.h> here.
-   This will break on systems with 64-bit file offsets (e.g. 4.4BSD).
-   Probably the best long-term answer is to avoid using file_ptr AND off_t
-   in this header file, and to handle this in the BFD implementation
-   rather than in its interface.  */
-/* typedef off_t       file_ptr; */
-typedef bfd_signed_vma file_ptr;
-typedef bfd_vma ufile_ptr;
-
-extern void bfd_sprintf_vma PARAMS ((bfd *, char *, bfd_vma));
-extern void bfd_fprintf_vma PARAMS ((bfd *, PTR, bfd_vma));
-
-#define printf_vma(x) fprintf_vma(stdout,x)
-#define bfd_printf_vma(abfd,x) bfd_fprintf_vma (abfd,stdout,x)
-
-typedef unsigned int flagword; /* 32 bits of flags */
-typedef unsigned char bfd_byte;
-\f
-/** File formats */
-
-typedef enum bfd_format {
-             bfd_unknown = 0,  /* file format is unknown */
-             bfd_object,       /* linker/assember/compiler output */
-             bfd_archive,      /* object archive file */
-             bfd_core,         /* core dump */
-             bfd_type_end}     /* marks the end; don't use it! */
-         bfd_format;
-
-/* Values that may appear in the flags field of a BFD.  These also
-   appear in the object_flags field of the bfd_target structure, where
-   they indicate the set of flags used by that backend (not all flags
-   are meaningful for all object file formats) (FIXME: at the moment,
-   the object_flags values have mostly just been copied from backend
-   to another, and are not necessarily correct).  */
-
-/* No flags.  */
-#define BFD_NO_FLAGS           0x00
-
-/* BFD contains relocation entries.  */
-#define HAS_RELOC      0x01
-
-/* BFD is directly executable.  */
-#define EXEC_P         0x02
-
-/* BFD has line number information (basically used for F_LNNO in a
-   COFF header).  */
-#define HAS_LINENO     0x04
-
-/* BFD has debugging information.  */
-#define HAS_DEBUG      0x08
-
-/* BFD has symbols.  */
-#define HAS_SYMS       0x10
-
-/* BFD has local symbols (basically used for F_LSYMS in a COFF
-   header).  */
-#define HAS_LOCALS     0x20
-
-/* BFD is a dynamic object.  */
-#define DYNAMIC        0x40
-
-/* Text section is write protected (if D_PAGED is not set, this is
-   like an a.out NMAGIC file) (the linker sets this by default, but
-   clears it for -r or -N).  */
-#define WP_TEXT        0x80
-
-/* BFD is dynamically paged (this is like an a.out ZMAGIC file) (the
-   linker sets this by default, but clears it for -r or -n or -N).  */
-#define D_PAGED        0x100
-
-/* BFD is relaxable (this means that bfd_relax_section may be able to
-   do something) (sometimes bfd_relax_section can do something even if
-   this is not set).  */
-#define BFD_IS_RELAXABLE 0x200
-
-/* This may be set before writing out a BFD to request using a
-   traditional format.  For example, this is used to request that when
-   writing out an a.out object the symbols not be hashed to eliminate
-   duplicates.  */
-#define BFD_TRADITIONAL_FORMAT 0x400
-
-/* This flag indicates that the BFD contents are actually cached in
-   memory.  If this is set, iostream points to a bfd_in_memory struct.  */
-#define BFD_IN_MEMORY 0x800
-\f
-/* symbols and relocation */
-
-/* A count of carsyms (canonical archive symbols).  */
-typedef unsigned long symindex;
-
-/* How to perform a relocation.  */
-typedef const struct reloc_howto_struct reloc_howto_type;
-
-#define BFD_NO_MORE_SYMBOLS ((symindex) ~0)
-
-/* General purpose part of a symbol X;
-   target specific parts are in libcoff.h, libaout.h, etc.  */
-
-#define bfd_get_section(x) ((x)->section)
-#define bfd_get_output_section(x) ((x)->section->output_section)
-#define bfd_set_section(x,y) ((x)->section) = (y)
-#define bfd_asymbol_base(x) ((x)->section->vma)
-#define bfd_asymbol_value(x) (bfd_asymbol_base(x) + (x)->value)
-#define bfd_asymbol_name(x) ((x)->name)
-/*Perhaps future: #define bfd_asymbol_bfd(x) ((x)->section->owner)*/
-#define bfd_asymbol_bfd(x) ((x)->the_bfd)
-#define bfd_asymbol_flavour(x) (bfd_asymbol_bfd(x)->xvec->flavour)
-
-/* A canonical archive symbol.  */
-/* This is a type pun with struct ranlib on purpose! */
-typedef struct carsym {
-  char *name;
-  file_ptr file_offset;                /* look here to find the file */
-} carsym;                      /* to make these you call a carsymogen */
-
-/* Used in generating armaps (archive tables of contents).
-   Perhaps just a forward definition would do? */
-struct orl {                   /* output ranlib */
-  char **name;                 /* symbol name */
-  union {
-    file_ptr pos;
-    bfd *abfd;
-  } u;                         /* bfd* or file position */
-  int namidx;                  /* index into string table */
-};
-\f
-/* Linenumber stuff */
-typedef struct lineno_cache_entry {
-  unsigned int line_number;    /* Linenumber from start of function*/
-  union {
-    struct symbol_cache_entry *sym; /* Function name */
-    bfd_vma offset;        /* Offset into section */
-  } u;
-} alent;
-\f
-/* object and core file sections */
-
-#define        align_power(addr, align)        \
-       ( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
-
-typedef struct sec *sec_ptr;
-
-#define bfd_get_section_name(bfd, ptr) ((ptr)->name + 0)
-#define bfd_get_section_vma(bfd, ptr) ((ptr)->vma + 0)
-#define bfd_get_section_alignment(bfd, ptr) ((ptr)->alignment_power + 0)
-#define bfd_section_name(bfd, ptr) ((ptr)->name)
-#define bfd_section_size(bfd, ptr) (bfd_get_section_size_before_reloc(ptr))
-#define bfd_section_vma(bfd, ptr) ((ptr)->vma)
-#define bfd_section_lma(bfd, ptr) ((ptr)->lma)
-#define bfd_section_alignment(bfd, ptr) ((ptr)->alignment_power)
-#define bfd_get_section_flags(bfd, ptr) ((ptr)->flags + 0)
-#define bfd_get_section_userdata(bfd, ptr) ((ptr)->userdata)
-
-#define bfd_is_com_section(ptr) (((ptr)->flags & SEC_IS_COMMON) != 0)
-
-#define bfd_set_section_vma(bfd, ptr, val) (((ptr)->vma = (ptr)->lma= (val)), ((ptr)->user_set_vma = (boolean)true), true)
-#define bfd_set_section_alignment(bfd, ptr, val) (((ptr)->alignment_power = (val)),true)
-#define bfd_set_section_userdata(bfd, ptr, val) (((ptr)->userdata = (val)),true)
-
-typedef struct stat stat_type;
-\f
-typedef enum bfd_print_symbol
-{
-  bfd_print_symbol_name,
-  bfd_print_symbol_more,
-  bfd_print_symbol_all
-} bfd_print_symbol_type;
-
-/* Information about a symbol that nm needs.  */
-
-typedef struct _symbol_info
-{
-  symvalue value;
-  char type;
-  const char *name;            /* Symbol name.  */
-  unsigned char stab_type;     /* Stab type.  */
-  char stab_other;             /* Stab other.  */
-  short stab_desc;             /* Stab desc.  */
-  const char *stab_name;       /* String for stab type.  */
-} symbol_info;
-
-/* Get the name of a stabs type code.  */
-
-extern const char *bfd_get_stab_name PARAMS ((int));
-\f
-/* Hash table routines.  There is no way to free up a hash table.  */
-
-/* An element in the hash table.  Most uses will actually use a larger
-   structure, and an instance of this will be the first field.  */
-
-struct bfd_hash_entry
-{
-  /* Next entry for this hash code.  */
-  struct bfd_hash_entry *next;
-  /* String being hashed.  */
-  const char *string;
-  /* Hash code.  This is the full hash code, not the index into the
-     table.  */
-  unsigned long hash;
-};
-
-/* A hash table.  */
-
-struct bfd_hash_table
-{
-  /* The hash array.  */
-  struct bfd_hash_entry **table;
-  /* The number of slots in the hash table.  */
-  unsigned int size;
-  /* A function used to create new elements in the hash table.  The
-     first entry is itself a pointer to an element.  When this
-     function is first invoked, this pointer will be NULL.  However,
-     having the pointer permits a hierarchy of method functions to be
-     built each of which calls the function in the superclass.  Thus
-     each function should be written to allocate a new block of memory
-     only if the argument is NULL.  */
-  struct bfd_hash_entry *(*newfunc) PARAMS ((struct bfd_hash_entry *,
-                                            struct bfd_hash_table *,
-                                            const char *));
-   /* An objalloc for this hash table.  This is a struct objalloc *,
-     but we use PTR to avoid requiring the inclusion of objalloc.h.  */
-  PTR memory;
-};
-
-/* Initialize a hash table.  */
-extern boolean bfd_hash_table_init
-  PARAMS ((struct bfd_hash_table *,
-          struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
-                                      struct bfd_hash_table *,
-                                      const char *)));
-
-/* Initialize a hash table specifying a size.  */
-extern boolean bfd_hash_table_init_n
-  PARAMS ((struct bfd_hash_table *,
-          struct bfd_hash_entry *(*) (struct bfd_hash_entry *,
-                                      struct bfd_hash_table *,
-                                      const char *),
-          unsigned int size));
-
-/* Free up a hash table.  */
-extern void bfd_hash_table_free PARAMS ((struct bfd_hash_table *));
-
-/* Look up a string in a hash table.  If CREATE is true, a new entry
-   will be created for this string if one does not already exist.  The
-   COPY argument must be true if this routine should copy the string
-   into newly allocated memory when adding an entry.  */
-extern struct bfd_hash_entry *bfd_hash_lookup
-  PARAMS ((struct bfd_hash_table *, const char *, boolean create,
-          boolean copy));
-
-/* Replace an entry in a hash table.  */
-extern void bfd_hash_replace
-  PARAMS ((struct bfd_hash_table *, struct bfd_hash_entry *old,
-          struct bfd_hash_entry *nw));
-
-/* Base method for creating a hash table entry.  */
-extern struct bfd_hash_entry *bfd_hash_newfunc
-  PARAMS ((struct bfd_hash_entry *, struct bfd_hash_table *,
-          const char *));
-
-/* Grab some space for a hash table entry.  */
-extern PTR bfd_hash_allocate PARAMS ((struct bfd_hash_table *,
-                                     unsigned int));
-
-/* Traverse a hash table in a random order, calling a function on each
-   element.  If the function returns false, the traversal stops.  The
-   INFO argument is passed to the function.  */
-extern void bfd_hash_traverse PARAMS ((struct bfd_hash_table *,
-                                      boolean (*) (struct bfd_hash_entry *,
-                                                   PTR),
-                                      PTR info));
-
-#define COFF_SWAP_TABLE (PTR) &bfd_coff_std_swap_table
-
-/* User program access to BFD facilities */
-
-/* Direct I/O routines, for programs which know more about the object
-   file than BFD does.  Use higher level routines if possible.  */
-
-extern bfd_size_type bfd_bread PARAMS ((PTR, bfd_size_type, bfd *));
-extern bfd_size_type bfd_bwrite PARAMS ((const PTR, bfd_size_type, bfd *));
-extern int bfd_seek PARAMS ((bfd *, file_ptr, int));
-extern ufile_ptr bfd_tell PARAMS ((bfd *));
-extern int bfd_flush PARAMS ((bfd *));
-extern int bfd_stat PARAMS ((bfd *, struct stat *));
-
-/* Deprecated old routines.  */
-#if __GNUC__
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)                           \
-  (warn_deprecated ("bfd_read", __FILE__, __LINE__, __FUNCTION__),     \
-   bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)                          \
-  (warn_deprecated ("bfd_write", __FILE__, __LINE__, __FUNCTION__),    \
-   bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#else
-#define bfd_read(BUF, ELTSIZE, NITEMS, ABFD)                           \
-  (warn_deprecated ("bfd_read", (const char *) 0, 0, (const char *) 0), \
-   bfd_bread ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#define bfd_write(BUF, ELTSIZE, NITEMS, ABFD)                          \
-  (warn_deprecated ("bfd_write", (const char *) 0, 0, (const char *) 0),\
-   bfd_bwrite ((BUF), (ELTSIZE) * (NITEMS), (ABFD)))
-#endif
-extern void warn_deprecated
-  PARAMS ((const char *, const char *, int, const char *));
-
-/* Cast from const char * to char * so that caller can assign to
-   a char * without a warning.  */
-#define bfd_get_filename(abfd) ((char *) (abfd)->filename)
-#define bfd_get_cacheable(abfd) ((abfd)->cacheable)
-#define bfd_get_format(abfd) ((abfd)->format)
-#define bfd_get_target(abfd) ((abfd)->xvec->name)
-#define bfd_get_flavour(abfd) ((abfd)->xvec->flavour)
-#define bfd_family_coff(abfd) \
-  (bfd_get_flavour (abfd) == bfd_target_coff_flavour || \
-   bfd_get_flavour (abfd) == bfd_target_xcoff_flavour)
-#define bfd_big_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_BIG)
-#define bfd_little_endian(abfd) ((abfd)->xvec->byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_header_big_endian(abfd) \
-  ((abfd)->xvec->header_byteorder == BFD_ENDIAN_BIG)
-#define bfd_header_little_endian(abfd) \
-  ((abfd)->xvec->header_byteorder == BFD_ENDIAN_LITTLE)
-#define bfd_get_file_flags(abfd) ((abfd)->flags)
-#define bfd_applicable_file_flags(abfd) ((abfd)->xvec->object_flags)
-#define bfd_applicable_section_flags(abfd) ((abfd)->xvec->section_flags)
-#define bfd_my_archive(abfd) ((abfd)->my_archive)
-#define bfd_has_map(abfd) ((abfd)->has_armap)
-
-#define bfd_valid_reloc_types(abfd) ((abfd)->xvec->valid_reloc_types)
-#define bfd_usrdata(abfd) ((abfd)->usrdata)
-
-#define bfd_get_start_address(abfd) ((abfd)->start_address)
-#define bfd_get_symcount(abfd) ((abfd)->symcount)
-#define bfd_get_outsymbols(abfd) ((abfd)->outsymbols)
-#define bfd_count_sections(abfd) ((abfd)->section_count)
-
-#define bfd_get_symbol_leading_char(abfd) ((abfd)->xvec->symbol_leading_char)
-
-#define bfd_set_cacheable(abfd,bool) (((abfd)->cacheable = (boolean) (bool)), true)
-
-extern boolean bfd_cache_close PARAMS ((bfd *abfd));
-/* NB: This declaration should match the autogenerated one in libbfd.h.  */
-
-extern boolean bfd_record_phdr
-  PARAMS ((bfd *, unsigned long, boolean, flagword, boolean, bfd_vma,
-          boolean, boolean, unsigned int, struct sec **));
-
-/* Byte swapping routines.  */
-
-bfd_vma                bfd_getb64         PARAMS ((const unsigned char *));
-bfd_vma        bfd_getl64         PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getb_signed_64 PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getl_signed_64 PARAMS ((const unsigned char *));
-bfd_vma                bfd_getb32         PARAMS ((const unsigned char *));
-bfd_vma                bfd_getl32         PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getb_signed_32 PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getl_signed_32 PARAMS ((const unsigned char *));
-bfd_vma                bfd_getb16         PARAMS ((const unsigned char *));
-bfd_vma                bfd_getl16         PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getb_signed_16 PARAMS ((const unsigned char *));
-bfd_signed_vma bfd_getl_signed_16 PARAMS ((const unsigned char *));
-void           bfd_putb64         PARAMS ((bfd_vma, unsigned char *));
-void           bfd_putl64         PARAMS ((bfd_vma, unsigned char *));
-void           bfd_putb32         PARAMS ((bfd_vma, unsigned char *));
-void           bfd_putl32         PARAMS ((bfd_vma, unsigned char *));
-void           bfd_putb16         PARAMS ((bfd_vma, unsigned char *));
-void           bfd_putl16         PARAMS ((bfd_vma, unsigned char *));
-
-/* Byte swapping routines which take size and endiannes as arguments.  */
-
-bfd_vma         bfd_get_bits       PARAMS ((bfd_byte *, int, boolean));
-void            bfd_put_bits       PARAMS ((bfd_vma, bfd_byte *, int, boolean));
-\f
-/* Externally visible ECOFF routines.  */
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct ecoff_debug_info;
-struct ecoff_debug_swap;
-struct ecoff_extr;
-struct symbol_cache_entry;
-struct bfd_link_info;
-struct bfd_link_hash_entry;
-struct bfd_elf_version_tree;
-#endif
-extern bfd_vma bfd_ecoff_get_gp_value PARAMS ((bfd * abfd));
-extern boolean bfd_ecoff_set_gp_value PARAMS ((bfd *abfd, bfd_vma gp_value));
-extern boolean bfd_ecoff_set_regmasks
-  PARAMS ((bfd *abfd, unsigned long gprmask, unsigned long fprmask,
-          unsigned long *cprmask));
-extern PTR bfd_ecoff_debug_init
-  PARAMS ((bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap,
-          struct bfd_link_info *));
-extern void bfd_ecoff_debug_free
-  PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap,
-          struct bfd_link_info *));
-extern boolean bfd_ecoff_debug_accumulate
-  PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap,
-          bfd *input_bfd, struct ecoff_debug_info *input_debug,
-          const struct ecoff_debug_swap *input_swap,
-          struct bfd_link_info *));
-extern boolean bfd_ecoff_debug_accumulate_other
-  PARAMS ((PTR handle, bfd *output_bfd, struct ecoff_debug_info *output_debug,
-          const struct ecoff_debug_swap *output_swap, bfd *input_bfd,
-          struct bfd_link_info *));
-extern boolean bfd_ecoff_debug_externals
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap,
-          boolean relocateable,
-          boolean (*get_extr) (struct symbol_cache_entry *,
-                               struct ecoff_extr *),
-          void (*set_index) (struct symbol_cache_entry *,
-                             bfd_size_type)));
-extern boolean bfd_ecoff_debug_one_external
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap,
-          const char *name, struct ecoff_extr *esym));
-extern bfd_size_type bfd_ecoff_debug_size
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap));
-extern boolean bfd_ecoff_write_debug
-  PARAMS ((bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap, file_ptr where));
-extern boolean bfd_ecoff_write_accumulated_debug
-  PARAMS ((PTR handle, bfd *abfd, struct ecoff_debug_info *debug,
-          const struct ecoff_debug_swap *swap,
-          struct bfd_link_info *info, file_ptr where));
-extern boolean bfd_mips_ecoff_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
-
-/* Externally visible ELF routines.  */
-
-struct bfd_link_needed_list
-{
-  struct bfd_link_needed_list *next;
-  bfd *by;
-  const char *name;
-};
-
-extern boolean bfd_elf32_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
-extern boolean bfd_elf64_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, boolean));
-extern struct bfd_link_needed_list *bfd_elf_get_needed_list
-  PARAMS ((bfd *, struct bfd_link_info *));
-extern boolean bfd_elf_get_bfd_needed_list
-  PARAMS ((bfd *, struct bfd_link_needed_list **));
-extern boolean bfd_elf32_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, const char *,
-          const char * const *, struct bfd_link_info *, struct sec **,
-          struct bfd_elf_version_tree *));
-extern boolean bfd_elf64_size_dynamic_sections
-  PARAMS ((bfd *, const char *, const char *, const char *,
-          const char * const *, struct bfd_link_info *, struct sec **,
-          struct bfd_elf_version_tree *));
-extern void bfd_elf_set_dt_needed_name PARAMS ((bfd *, const char *));
-extern void bfd_elf_set_dt_needed_soname PARAMS ((bfd *, const char *));
-extern const char *bfd_elf_get_dt_soname PARAMS ((bfd *));
-extern struct bfd_link_needed_list *bfd_elf_get_runpath_list
-  PARAMS ((bfd *, struct bfd_link_info *));
-
-/* Return an upper bound on the number of bytes required to store a
-   copy of ABFD's program header table entries.  Return -1 if an error
-   occurs; bfd_get_error will return an appropriate code.  */
-extern long bfd_get_elf_phdr_upper_bound PARAMS ((bfd *abfd));
-
-/* Copy ABFD's program header table entries to *PHDRS.  The entries
-   will be stored as an array of Elf_Internal_Phdr structures, as
-   defined in include/elf/internal.h.  To find out how large the
-   buffer needs to be, call bfd_get_elf_phdr_upper_bound.
-
-   Return the number of program header table entries read, or -1 if an
-   error occurs; bfd_get_error will return an appropriate code.  */
-extern int bfd_get_elf_phdrs PARAMS ((bfd *abfd, void *phdrs));
-
-/* Return the arch_size field of an elf bfd, or -1 if not elf.  */
-extern int bfd_get_arch_size PARAMS ((bfd *));
-
-/* Return true if address "naturally" sign extends, or -1 if not elf.  */
-extern int bfd_get_sign_extend_vma PARAMS ((bfd *));
-
-extern boolean bfd_m68k_elf32_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
-
-/* SunOS shared library support routines for the linker.  */
-
-extern struct bfd_link_needed_list *bfd_sunos_get_needed_list
-  PARAMS ((bfd *, struct bfd_link_info *));
-extern boolean bfd_sunos_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *));
-extern boolean bfd_sunos_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec **, struct sec **,
-          struct sec **));
-
-/* Linux shared library support routines for the linker.  */
-
-extern boolean bfd_i386linux_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
-extern boolean bfd_m68klinux_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
-extern boolean bfd_sparclinux_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *));
-
-/* mmap hacks */
-
-struct _bfd_window_internal;
-typedef struct _bfd_window_internal bfd_window_internal;
-
-typedef struct _bfd_window {
-  /* What the user asked for.  */
-  PTR data;
-  bfd_size_type size;
-  /* The actual window used by BFD.  Small user-requested read-only
-     regions sharing a page may share a single window into the object
-     file.  Read-write versions shouldn't until I've fixed things to
-     keep track of which portions have been claimed by the
-     application; don't want to give the same region back when the
-     application wants two writable copies!  */
-  struct _bfd_window_internal *i;
-} bfd_window;
-
-extern void bfd_init_window PARAMS ((bfd_window *));
-extern void bfd_free_window PARAMS ((bfd_window *));
-extern boolean bfd_get_file_window
-  PARAMS ((bfd *, file_ptr, bfd_size_type, bfd_window *, boolean));
-
-/* XCOFF support routines for the linker.  */
-
-extern boolean bfd_xcoff_link_record_set
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
-          bfd_size_type));
-extern boolean bfd_xcoff_import_symbol
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *,
-          bfd_vma, const char *, const char *, const char *, unsigned int));
-extern boolean bfd_xcoff_export_symbol
-  PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_hash_entry *));
-extern boolean bfd_xcoff_link_count_reloc
-  PARAMS ((bfd *, struct bfd_link_info *, const char *));
-extern boolean bfd_xcoff_record_link_assignment
-  PARAMS ((bfd *, struct bfd_link_info *, const char *));
-extern boolean bfd_xcoff_size_dynamic_sections
-  PARAMS ((bfd *, struct bfd_link_info *, const char *, const char *,
-          unsigned long, unsigned long, unsigned long, boolean,
-          int, boolean, boolean, struct sec **));
-
-/* Externally visible COFF routines.  */
-
-#if defined(__STDC__) || defined(ALMOST_STDC)
-struct internal_syment;
-union internal_auxent;
-#endif
-
-extern boolean bfd_coff_get_syment
-  PARAMS ((bfd *, struct symbol_cache_entry *, struct internal_syment *));
-
-extern boolean bfd_coff_get_auxent
-  PARAMS ((bfd *, struct symbol_cache_entry *, int, union internal_auxent *));
-
-extern boolean bfd_coff_set_symbol_class
-  PARAMS ((bfd *, struct symbol_cache_entry *, unsigned int));
-
-extern boolean bfd_m68k_coff_create_embedded_relocs
-  PARAMS ((bfd *, struct bfd_link_info *, struct sec *, struct sec *,
-          char **));
-
-/* ARM Interworking support.  Called from linker.  */
-extern boolean bfd_arm_allocate_interworking_sections
-  PARAMS ((struct bfd_link_info *));
-
-extern boolean bfd_arm_process_before_allocation
-  PARAMS ((bfd *, struct bfd_link_info *, int));
-
-extern boolean bfd_arm_get_bfd_for_interworking
-  PARAMS ((bfd *, struct bfd_link_info *));
-
-/* PE ARM Interworking support.  Called from linker.  */
-extern boolean bfd_arm_pe_allocate_interworking_sections
-  PARAMS ((struct bfd_link_info *));
-
-extern boolean bfd_arm_pe_process_before_allocation
-  PARAMS ((bfd *, struct bfd_link_info *, int));
-
-extern boolean bfd_arm_pe_get_bfd_for_interworking
-  PARAMS ((bfd *, struct bfd_link_info *));
-
-/* ELF ARM Interworking support.  Called from linker.  */
-extern boolean bfd_elf32_arm_allocate_interworking_sections
-  PARAMS ((struct bfd_link_info *));
-
-extern boolean bfd_elf32_arm_process_before_allocation
-  PARAMS ((bfd *, struct bfd_link_info *, int));
-
-extern boolean bfd_elf32_arm_get_bfd_for_interworking
-  PARAMS ((bfd *, struct bfd_link_info *));
-
-/* TI COFF load page support.  */
-extern void bfd_ticoff_set_section_load_page
-  PARAMS ((struct sec *, int));
-
-extern int bfd_ticoff_get_section_load_page
-  PARAMS ((struct sec *));
-
-/* And more from the source.  */
-void
-bfd_init PARAMS ((void));
-
-bfd *
-bfd_openr PARAMS ((const char *filename, const char *target));
-
-bfd *
-bfd_fdopenr PARAMS ((const char *filename, const char *target, int fd));
-
-bfd *
-bfd_openstreamr PARAMS ((const char *, const char *, PTR));
-
-bfd *
-bfd_openw PARAMS ((const char *filename, const char *target));
-
-boolean
-bfd_close PARAMS ((bfd *abfd));
-
-boolean
-bfd_close_all_done PARAMS ((bfd *));
-
-bfd *
-bfd_create PARAMS ((const char *filename, bfd *templ));
-
-boolean
-bfd_make_writable PARAMS ((bfd *abfd));
-
-boolean
-bfd_make_readable PARAMS ((bfd *abfd));
-
-
-/* Byte swapping macros for user section data.  */
-
-#define bfd_put_8(abfd, val, ptr) \
-                ((void) (*((unsigned char *) (ptr)) = (unsigned char) (val)))
-#define bfd_put_signed_8 \
-               bfd_put_8
-#define bfd_get_8(abfd, ptr) \
-                (*(unsigned char *) (ptr) & 0xff)
-#define bfd_get_signed_8(abfd, ptr) \
-               (((*(unsigned char *) (ptr) & 0xff) ^ 0x80) - 0x80)
-
-#define bfd_put_16(abfd, val, ptr) \
-                BFD_SEND(abfd, bfd_putx16, ((val),(ptr)))
-#define bfd_put_signed_16 \
-                bfd_put_16
-#define bfd_get_16(abfd, ptr) \
-                BFD_SEND(abfd, bfd_getx16, (ptr))
-#define bfd_get_signed_16(abfd, ptr) \
-                BFD_SEND (abfd, bfd_getx_signed_16, (ptr))
-
-#define bfd_put_32(abfd, val, ptr) \
-                BFD_SEND(abfd, bfd_putx32, ((val),(ptr)))
-#define bfd_put_signed_32 \
-                bfd_put_32
-#define bfd_get_32(abfd, ptr) \
-                BFD_SEND(abfd, bfd_getx32, (ptr))
-#define bfd_get_signed_32(abfd, ptr) \
-                BFD_SEND(abfd, bfd_getx_signed_32, (ptr))
-
-#define bfd_put_64(abfd, val, ptr) \
-                BFD_SEND(abfd, bfd_putx64, ((val), (ptr)))
-#define bfd_put_signed_64 \
-                bfd_put_64
-#define bfd_get_64(abfd, ptr) \
-                BFD_SEND(abfd, bfd_getx64, (ptr))
-#define bfd_get_signed_64(abfd, ptr) \
-                BFD_SEND(abfd, bfd_getx_signed_64, (ptr))
-
-#define bfd_get(bits, abfd, ptr)                               \
-                ( (bits) ==  8 ? (bfd_vma) bfd_get_8 (abfd, ptr)       \
-                : (bits) == 16 ? bfd_get_16 (abfd, ptr)        \
-                : (bits) == 32 ? bfd_get_32 (abfd, ptr)        \
-                : (bits) == 64 ? bfd_get_64 (abfd, ptr)        \
-                : (abort (), (bfd_vma) - 1))
-
-#define bfd_put(bits, abfd, val, ptr)                          \
-                ( (bits) ==  8 ? bfd_put_8  (abfd, val, ptr)   \
-                : (bits) == 16 ? bfd_put_16 (abfd, val, ptr)   \
-                : (bits) == 32 ? bfd_put_32 (abfd, val, ptr)   \
-                : (bits) == 64 ? bfd_put_64 (abfd, val, ptr)   \
-                : (abort (), (void) 0))
-
-
-/* Byte swapping macros for file header data.  */
-
-#define bfd_h_put_8(abfd, val, ptr) \
-  bfd_put_8 (abfd, val, ptr)
-#define bfd_h_put_signed_8(abfd, val, ptr) \
-  bfd_put_8 (abfd, val, ptr)
-#define bfd_h_get_8(abfd, ptr) \
-  bfd_get_8 (abfd, ptr)
-#define bfd_h_get_signed_8(abfd, ptr) \
-  bfd_get_signed_8 (abfd, ptr)
-
-#define bfd_h_put_16(abfd, val, ptr) \
-  BFD_SEND (abfd, bfd_h_putx16, (val, ptr))
-#define bfd_h_put_signed_16 \
-  bfd_h_put_16
-#define bfd_h_get_16(abfd, ptr) \
-  BFD_SEND (abfd, bfd_h_getx16, (ptr))
-#define bfd_h_get_signed_16(abfd, ptr) \
-  BFD_SEND (abfd, bfd_h_getx_signed_16, (ptr))
-
-#define bfd_h_put_32(abfd, val, ptr) \
-  BFD_SEND (abfd, bfd_h_putx32, (val, ptr))
-#define bfd_h_put_signed_32 \
-  bfd_h_put_32
-#define bfd_h_get_32(abfd, ptr) \
-  BFD_SEND (abfd, bfd_h_getx32, (ptr))
-#define bfd_h_get_signed_32(abfd, ptr) \
-  BFD_SEND (abfd, bfd_h_getx_signed_32, (ptr))
-
-#define bfd_h_put_64(abfd, val, ptr) \
-  BFD_SEND (abfd, bfd_h_putx64, (val, ptr))
-#define bfd_h_put_signed_64 \
-  bfd_h_put_64
-#define bfd_h_get_64(abfd, ptr) \
-  BFD_SEND (abfd, bfd_h_getx64, (ptr))
-#define bfd_h_get_signed_64(abfd, ptr) \
-  BFD_SEND (abfd, bfd_h_getx_signed_64, (ptr))
-
-/* Refinements on the above, which should eventually go away.  Save
-   cluttering the source with (bfd_vma) and (bfd_byte *) casts.  */
-
-#define H_PUT_64(abfd, val, where) \
-  bfd_h_put_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
-
-#define H_PUT_32(abfd, val, where) \
-  bfd_h_put_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
-
-#define H_PUT_16(abfd, val, where) \
-  bfd_h_put_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
-
-#define H_PUT_8 bfd_h_put_8
-
-#define H_PUT_S64(abfd, val, where) \
-  bfd_h_put_signed_64 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
-
-#define H_PUT_S32(abfd, val, where) \
-  bfd_h_put_signed_32 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
-
-#define H_PUT_S16(abfd, val, where) \
-  bfd_h_put_signed_16 ((abfd), (bfd_vma) (val), (bfd_byte *) (where))
-
-#define H_PUT_S8 bfd_h_put_signed_8
-
-#define H_GET_64(abfd, where) \
-  bfd_h_get_64 ((abfd), (bfd_byte *) (where))
-
-#define H_GET_32(abfd, where) \
-  bfd_h_get_32 ((abfd), (bfd_byte *) (where))
-
-#define H_GET_16(abfd, where) \
-  bfd_h_get_16 ((abfd), (bfd_byte *) (where))
-
-#define H_GET_8 bfd_h_get_8
-
-#define H_GET_S64(abfd, where) \
-  bfd_h_get_signed_64 ((abfd), (bfd_byte *) (where))
-
-#define H_GET_S32(abfd, where) \
-  bfd_h_get_signed_32 ((abfd), (bfd_byte *) (where))
-
-#define H_GET_S16(abfd, where) \
-  bfd_h_get_signed_16 ((abfd), (bfd_byte *) (where))
-
-#define H_GET_S8 bfd_h_get_signed_8
-
-
-/* This structure is used for a comdat section, as in PE.  A comdat
-   section is associated with a particular symbol.  When the linker
-   sees a comdat section, it keeps only one of the sections with a
-   given name and associated with a given symbol.  */
-
-struct bfd_comdat_info
-{
-  /* The name of the symbol associated with a comdat section.  */
-  const char *name;
-
-  /* The local symbol table index of the symbol associated with a
-     comdat section.  This is only meaningful to the object file format
-     specific code; it is not an index into the list returned by
-     bfd_canonicalize_symtab.  */
-  long symbol;
-};
-
-typedef struct sec
-{
-  /* The name of the section; the name isn't a copy, the pointer is
-     the same as that passed to bfd_make_section.  */
-
-  const char *name;
-
-  /* A unique sequence number.  */
-
-  int id;
-
-  /* Which section in the bfd; 0..n-1 as sections are created in a bfd.  */
-
-  int index;
-
-  /* The next section in the list belonging to the BFD, or NULL.  */
-
-  struct sec *next;
-
-  /* The field flags contains attributes of the section. Some
-     flags are read in from the object file, and some are
-     synthesized from other information.  */
-
-  flagword flags;
-
-#define SEC_NO_FLAGS   0x000
-
-  /* Tells the OS to allocate space for this section when loading.
-     This is clear for a section containing debug information only.  */
-#define SEC_ALLOC      0x001
-
-  /* Tells the OS to load the section from the file when loading.
-     This is clear for a .bss section.  */
-#define SEC_LOAD       0x002
-
-  /* The section contains data still to be relocated, so there is
-     some relocation information too.  */
-#define SEC_RELOC      0x004
-
-  /* ELF reserves 4 processor specific bits and 8 operating system
-     specific bits in sh_flags; at present we can get away with just
-     one in communicating between the assembler and BFD, but this
-     isn't a good long-term solution.  */
-#define SEC_ARCH_BIT_0 0x008
-
-  /* A signal to the OS that the section contains read only data.  */
-#define SEC_READONLY   0x010
-
-  /* The section contains code only.  */
-#define SEC_CODE       0x020
-
-  /* The section contains data only.  */
-#define SEC_DATA       0x040
-
-  /* The section will reside in ROM.  */
-#define SEC_ROM        0x080
-
-  /* The section contains constructor information. This section
-     type is used by the linker to create lists of constructors and
-     destructors used by <<g++>>. When a back end sees a symbol
-     which should be used in a constructor list, it creates a new
-     section for the type of name (e.g., <<__CTOR_LIST__>>), attaches
-     the symbol to it, and builds a relocation. To build the lists
-     of constructors, all the linker has to do is catenate all the
-     sections called <<__CTOR_LIST__>> and relocate the data
-     contained within - exactly the operations it would peform on
-     standard data.  */
-#define SEC_CONSTRUCTOR 0x100
-
-  /* The section is a constructor, and should be placed at the
-     end of the text, data, or bss section(?).  */
-#define SEC_CONSTRUCTOR_TEXT 0x1100
-#define SEC_CONSTRUCTOR_DATA 0x2100
-#define SEC_CONSTRUCTOR_BSS  0x3100
-
-  /* The section has contents - a data section could be
-     <<SEC_ALLOC>> | <<SEC_HAS_CONTENTS>>; a debug section could be
-     <<SEC_HAS_CONTENTS>>  */
-#define SEC_HAS_CONTENTS 0x200
-
-  /* An instruction to the linker to not output the section
-     even if it has information which would normally be written.  */
-#define SEC_NEVER_LOAD 0x400
-
-  /* The section is a COFF shared library section.  This flag is
-     only for the linker.  If this type of section appears in
-     the input file, the linker must copy it to the output file
-     without changing the vma or size.  FIXME: Although this
-     was originally intended to be general, it really is COFF
-     specific (and the flag was renamed to indicate this).  It
-     might be cleaner to have some more general mechanism to
-     allow the back end to control what the linker does with
-     sections.  */
-#define SEC_COFF_SHARED_LIBRARY 0x800
-
-  /* The section has GOT references.  This flag is only for the
-     linker, and is currently only used by the elf32-hppa back end.
-     It will be set if global offset table references were detected
-     in this section, which indicate to the linker that the section
-     contains PIC code, and must be handled specially when doing a
-     static link.  */
-#define SEC_HAS_GOT_REF 0x4000
-
-  /* The section contains common symbols (symbols may be defined
-     multiple times, the value of a symbol is the amount of
-     space it requires, and the largest symbol value is the one
-     used).  Most targets have exactly one of these (which we
-     translate to bfd_com_section_ptr), but ECOFF has two.  */
-#define SEC_IS_COMMON 0x8000
-
-  /* The section contains only debugging information.  For
-     example, this is set for ELF .debug and .stab sections.
-     strip tests this flag to see if a section can be
-     discarded.  */
-#define SEC_DEBUGGING 0x10000
-
-  /* The contents of this section are held in memory pointed to
-     by the contents field.  This is checked by bfd_get_section_contents,
-     and the data is retrieved from memory if appropriate.  */
-#define SEC_IN_MEMORY 0x20000
-
-  /* The contents of this section are to be excluded by the
-     linker for executable and shared objects unless those
-     objects are to be further relocated.  */
-#define SEC_EXCLUDE 0x40000
-
-  /* The contents of this section are to be sorted based on the sum of
-     the symbol and addend values specified by the associated relocation
-     entries.  Entries without associated relocation entries will be
-     appended to the end of the section in an unspecified order.  */
-#define SEC_SORT_ENTRIES 0x80000
-
-  /* When linking, duplicate sections of the same name should be
-     discarded, rather than being combined into a single section as
-     is usually done.  This is similar to how common symbols are
-     handled.  See SEC_LINK_DUPLICATES below.  */
-#define SEC_LINK_ONCE 0x100000
-
-  /* If SEC_LINK_ONCE is set, this bitfield describes how the linker
-     should handle duplicate sections.  */
-#define SEC_LINK_DUPLICATES 0x600000
-
-  /* This value for SEC_LINK_DUPLICATES means that duplicate
-     sections with the same name should simply be discarded.  */
-#define SEC_LINK_DUPLICATES_DISCARD 0x0
-
-  /* This value for SEC_LINK_DUPLICATES means that the linker
-     should warn if there are any duplicate sections, although
-     it should still only link one copy.  */
-#define SEC_LINK_DUPLICATES_ONE_ONLY 0x200000
-
-  /* This value for SEC_LINK_DUPLICATES means that the linker
-     should warn if any duplicate sections are a different size.  */
-#define SEC_LINK_DUPLICATES_SAME_SIZE 0x400000
-
-  /* This value for SEC_LINK_DUPLICATES means that the linker
-     should warn if any duplicate sections contain different
-     contents.  */
-#define SEC_LINK_DUPLICATES_SAME_CONTENTS 0x600000
-
-  /* This section was created by the linker as part of dynamic
-     relocation or other arcane processing.  It is skipped when
-     going through the first-pass output, trusting that someone
-     else up the line will take care of it later.  */
-#define SEC_LINKER_CREATED 0x800000
-
-  /* This section should not be subject to garbage collection.  */
-#define SEC_KEEP 0x1000000
-
-  /* This section contains "short" data, and should be placed
-     "near" the GP.  */
-#define SEC_SMALL_DATA 0x2000000
-
-  /* This section contains data which may be shared with other
-     executables or shared objects.  */
-#define SEC_SHARED 0x4000000
-
-  /* When a section with this flag is being linked, then if the size of
-     the input section is less than a page, it should not cross a page
-     boundary.  If the size of the input section is one page or more, it
-     should be aligned on a page boundary.  */
-#define SEC_BLOCK 0x8000000
-
-  /* Conditionally link this section; do not link if there are no
-     references found to any symbol in the section.  */
-#define SEC_CLINK 0x10000000
-
-  /* Attempt to merge identical entities in the section.
-     Entity size is given in the entsize field.  */
-#define SEC_MERGE 0x20000000
-
-  /* If given with SEC_MERGE, entities to merge are zero terminated
-     strings where entsize specifies character size instead of fixed
-     size entries.  */
-#define SEC_STRINGS 0x40000000
-
-  /* This section contains data about section groups.  */
-#define SEC_GROUP 0x80000000
-
-  /*  End of section flags.  */
-
-  /* Some internal packed boolean fields.  */
-
-  /* See the vma field.  */
-  unsigned int user_set_vma : 1;
-
-  /* Whether relocations have been processed.  */
-  unsigned int reloc_done : 1;
-
-  /* A mark flag used by some of the linker backends.  */
-  unsigned int linker_mark : 1;
-
-  /* Another mark flag used by some of the linker backends.  Set for
-     output sections that have an input section.  */
-  unsigned int linker_has_input : 1;
-
-  /* A mark flag used by some linker backends for garbage collection.  */
-  unsigned int gc_mark : 1;
-
-  /* Used by the ELF code to mark sections which have been allocated
-     to segments.  */
-  unsigned int segment_mark : 1;
-
-  /* End of internal packed boolean fields.  */
-
-  /*  The virtual memory address of the section - where it will be
-      at run time.  The symbols are relocated against this.  The
-      user_set_vma flag is maintained by bfd; if it's not set, the
-      backend can assign addresses (for example, in <<a.out>>, where
-      the default address for <<.data>> is dependent on the specific
-      target and various flags).  */
-
-  bfd_vma vma;
-
-  /*  The load address of the section - where it would be in a
-      rom image; really only used for writing section header
-      information. */
-
-  bfd_vma lma;
-
-  /* The size of the section in octets, as it will be output.
-     Contains a value even if the section has no contents (e.g., the
-     size of <<.bss>>).  This will be filled in after relocation.  */
-
-  bfd_size_type _cooked_size;
-
-  /* The original size on disk of the section, in octets.  Normally this
-     value is the same as the size, but if some relaxing has
-     been done, then this value will be bigger.  */
-
-  bfd_size_type _raw_size;
-
-  /* If this section is going to be output, then this value is the
-     offset in *bytes* into the output section of the first byte in the
-     input section (byte ==> smallest addressable unit on the
-     target).  In most cases, if this was going to start at the
-     100th octet (8-bit quantity) in the output section, this value
-     would be 100.  However, if the target byte size is 16 bits
-     (bfd_octets_per_byte is "2"), this value would be 50.  */
-
-  bfd_vma output_offset;
-
-  /* The output section through which to map on output.  */
-
-  struct sec *output_section;
-
-  /* The alignment requirement of the section, as an exponent of 2 -
-     e.g., 3 aligns to 2^3 (or 8).  */
-
-  unsigned int alignment_power;
-
-  /* If an input section, a pointer to a vector of relocation
-     records for the data in this section.  */
-
-  struct reloc_cache_entry *relocation;
-
-  /* If an output section, a pointer to a vector of pointers to
-     relocation records for the data in this section.  */
-
-  struct reloc_cache_entry **orelocation;
-
-  /* The number of relocation records in one of the above  */
-
-  unsigned reloc_count;
-
-  /* Information below is back end specific - and not always used
-     or updated.  */
-
-  /* File position of section data.  */
-
-  file_ptr filepos;
-
-  /* File position of relocation info.  */
-
-  file_ptr rel_filepos;
-
-  /* File position of line data.  */
-
-  file_ptr line_filepos;
-
-  /* Pointer to data for applications.  */
-
-  PTR userdata;
-
-  /* If the SEC_IN_MEMORY flag is set, this points to the actual
-     contents.  */
-  unsigned char *contents;
-
-  /* Attached line number information.  */
-
-  alent *lineno;
-
-  /* Number of line number records.  */
-
-  unsigned int lineno_count;
-
-  /* Entity size for merging purposes.  */
-
-  unsigned int entsize;
-
-  /* Optional information about a COMDAT entry; NULL if not COMDAT.  */
-
-  struct bfd_comdat_info *comdat;
-
-  /* When a section is being output, this value changes as more
-     linenumbers are written out.  */
-
-  file_ptr moving_line_filepos;
-
-  /* What the section number is in the target world.  */
-
-  int target_index;
-
-  PTR used_by_bfd;
-
-  /* If this is a constructor section then here is a list of the
-     relocations created to relocate items within it.  */
-
-  struct relent_chain *constructor_chain;
-
-  /* The BFD which owns the section.  */
-
-  bfd *owner;
-
-  /* A symbol which points at this section only */
-  struct symbol_cache_entry *symbol;
-  struct symbol_cache_entry **symbol_ptr_ptr;
-
-  struct bfd_link_order *link_order_head;
-  struct bfd_link_order *link_order_tail;
-} asection ;
-
-/* These sections are global, and are managed by BFD.  The application
-   and target back end are not permitted to change the values in
-   these sections.  New code should use the section_ptr macros rather
-   than referring directly to the const sections.  The const sections
-   may eventually vanish.  */
-#define BFD_ABS_SECTION_NAME "*ABS*"
-#define BFD_UND_SECTION_NAME "*UND*"
-#define BFD_COM_SECTION_NAME "*COM*"
-#define BFD_IND_SECTION_NAME "*IND*"
-
-/* the absolute section */
-extern const asection bfd_abs_section;
-#define bfd_abs_section_ptr ((asection *) &bfd_abs_section)
-#define bfd_is_abs_section(sec) ((sec) == bfd_abs_section_ptr)
-/* Pointer to the undefined section */
-extern const asection bfd_und_section;
-#define bfd_und_section_ptr ((asection *) &bfd_und_section)
-#define bfd_is_und_section(sec) ((sec) == bfd_und_section_ptr)
-/* Pointer to the common section */
-extern const asection bfd_com_section;
-#define bfd_com_section_ptr ((asection *) &bfd_com_section)
-/* Pointer to the indirect section */
-extern const asection bfd_ind_section;
-#define bfd_ind_section_ptr ((asection *) &bfd_ind_section)
-#define bfd_is_ind_section(sec) ((sec) == bfd_ind_section_ptr)
-
-extern const struct symbol_cache_entry * const bfd_abs_symbol;
-extern const struct symbol_cache_entry * const bfd_com_symbol;
-extern const struct symbol_cache_entry * const bfd_und_symbol;
-extern const struct symbol_cache_entry * const bfd_ind_symbol;
-#define bfd_get_section_size_before_reloc(section) \
-     ((section)->reloc_done ? (abort (), (bfd_size_type) 1) \
-                            : (section)->_raw_size)
-#define bfd_get_section_size_after_reloc(section) \
-     ((section)->reloc_done ? (section)->_cooked_size \
-                            : (abort (), (bfd_size_type) 1))
-asection *
-bfd_get_section_by_name PARAMS ((bfd *abfd, const char *name));
-
-char *
-bfd_get_unique_section_name PARAMS ((bfd *abfd,
-    const char *templat,
-    int *count));
-
-asection *
-bfd_make_section_old_way PARAMS ((bfd *abfd, const char *name));
-
-asection *
-bfd_make_section_anyway PARAMS ((bfd *abfd, const char *name));
-
-asection *
-bfd_make_section PARAMS ((bfd *, const char *name));
-
-boolean
-bfd_set_section_flags PARAMS ((bfd *abfd, asection *sec, flagword flags));
-
-void
-bfd_map_over_sections PARAMS ((bfd *abfd,
-    void (*func) (bfd *abfd,
-    asection *sect,
-    PTR obj),
-    PTR obj));
-
-boolean
-bfd_set_section_size PARAMS ((bfd *abfd, asection *sec, bfd_size_type val));
-
-boolean
-bfd_set_section_contents PARAMS ((bfd *abfd, asection *section,
-    PTR data, file_ptr offset,
-    bfd_size_type count));
-
-boolean
-bfd_get_section_contents PARAMS ((bfd *abfd, asection *section,
-    PTR location, file_ptr offset,
-    bfd_size_type count));
-
-boolean
-bfd_copy_private_section_data PARAMS ((bfd *ibfd, asection *isec,
-    bfd *obfd, asection *osec));
-
-#define bfd_copy_private_section_data(ibfd, isection, obfd, osection) \
-     BFD_SEND (obfd, _bfd_copy_private_section_data, \
-               (ibfd, isection, obfd, osection))
-void
-_bfd_strip_section_from_output PARAMS ((struct bfd_link_info *info, asection *section));
-
-enum bfd_architecture
-{
-  bfd_arch_unknown,   /* File arch not known */
-  bfd_arch_obscure,   /* Arch known, not one of these */
-  bfd_arch_m68k,      /* Motorola 68xxx */
-#define bfd_mach_m68000 1
-#define bfd_mach_m68008 2
-#define bfd_mach_m68010 3
-#define bfd_mach_m68020 4
-#define bfd_mach_m68030 5
-#define bfd_mach_m68040 6
-#define bfd_mach_m68060 7
-#define bfd_mach_cpu32  8
-#define bfd_mach_mcf5200  9
-#define bfd_mach_mcf5206e 10
-#define bfd_mach_mcf5307  11
-#define bfd_mach_mcf5407  12
-  bfd_arch_vax,       /* DEC Vax */
-  bfd_arch_i960,      /* Intel 960 */
-    /* The order of the following is important.
-       lower number indicates a machine type that
-       only accepts a subset of the instructions
-       available to machines with higher numbers.
-       The exception is the "ca", which is
-       incompatible with all other machines except
-       "core". */
-
-#define bfd_mach_i960_core      1
-#define bfd_mach_i960_ka_sa     2
-#define bfd_mach_i960_kb_sb     3
-#define bfd_mach_i960_mc        4
-#define bfd_mach_i960_xa        5
-#define bfd_mach_i960_ca        6
-#define bfd_mach_i960_jx        7
-#define bfd_mach_i960_hx        8
-
-  bfd_arch_a29k,      /* AMD 29000 */
-  bfd_arch_sparc,     /* SPARC */
-#define bfd_mach_sparc                 1
-/* The difference between v8plus and v9 is that v9 is a true 64 bit env.  */
-#define bfd_mach_sparc_sparclet        2
-#define bfd_mach_sparc_sparclite       3
-#define bfd_mach_sparc_v8plus          4
-#define bfd_mach_sparc_v8plusa         5 /* with ultrasparc add'ns */
-#define bfd_mach_sparc_sparclite_le    6
-#define bfd_mach_sparc_v9              7
-#define bfd_mach_sparc_v9a             8 /* with ultrasparc add'ns */
-#define bfd_mach_sparc_v8plusb         9 /* with cheetah add'ns */
-#define bfd_mach_sparc_v9b             10 /* with cheetah add'ns */
-/* Nonzero if MACH has the v9 instruction set.  */
-#define bfd_mach_sparc_v9_p(mach) \
-  ((mach) >= bfd_mach_sparc_v8plus && (mach) <= bfd_mach_sparc_v9b \
-   && (mach) != bfd_mach_sparc_sparclite_le)
-  bfd_arch_mips,      /* MIPS Rxxxx */
-#define bfd_mach_mips3000              3000
-#define bfd_mach_mips3900              3900
-#define bfd_mach_mips4000              4000
-#define bfd_mach_mips4010              4010
-#define bfd_mach_mips4100              4100
-#define bfd_mach_mips4111              4111
-#define bfd_mach_mips4300              4300
-#define bfd_mach_mips4400              4400
-#define bfd_mach_mips4600              4600
-#define bfd_mach_mips4650              4650
-#define bfd_mach_mips5000              5000
-#define bfd_mach_mips6000              6000
-#define bfd_mach_mips8000              8000
-#define bfd_mach_mips10000             10000
-#define bfd_mach_mips12000             12000
-#define bfd_mach_mips16                16
-#define bfd_mach_mips5                 5
-#define bfd_mach_mips_sb1              12310201 /* octal 'SB', 01 */
-#define bfd_mach_mipsisa32             32
-#define bfd_mach_mipsisa64             64
-  bfd_arch_i386,      /* Intel 386 */
-#define bfd_mach_i386_i386 0
-#define bfd_mach_i386_i8086 1
-#define bfd_mach_i386_i386_intel_syntax 2
-#define bfd_mach_x86_64 3
-#define bfd_mach_x86_64_intel_syntax 4
-  bfd_arch_we32k,     /* AT&T WE32xxx */
-  bfd_arch_tahoe,     /* CCI/Harris Tahoe */
-  bfd_arch_i860,      /* Intel 860 */
-  bfd_arch_i370,      /* IBM 360/370 Mainframes */
-  bfd_arch_romp,      /* IBM ROMP PC/RT */
-  bfd_arch_alliant,   /* Alliant */
-  bfd_arch_convex,    /* Convex */
-  bfd_arch_m88k,      /* Motorola 88xxx */
-  bfd_arch_pyramid,   /* Pyramid Technology */
-  bfd_arch_h8300,     /* Hitachi H8/300 */
-#define bfd_mach_h8300   1
-#define bfd_mach_h8300h  2
-#define bfd_mach_h8300s  3
-  bfd_arch_pdp11,     /* DEC PDP-11 */
-  bfd_arch_powerpc,   /* PowerPC */
-#define bfd_mach_ppc           0
-#define bfd_mach_ppc_403       403
-#define bfd_mach_ppc_403gc     4030
-#define bfd_mach_ppc_505       505
-#define bfd_mach_ppc_601       601
-#define bfd_mach_ppc_602       602
-#define bfd_mach_ppc_603       603
-#define bfd_mach_ppc_ec603e    6031
-#define bfd_mach_ppc_604       604
-#define bfd_mach_ppc_620       620
-#define bfd_mach_ppc_630       630
-#define bfd_mach_ppc_750       750
-#define bfd_mach_ppc_860       860
-#define bfd_mach_ppc_a35       35
-#define bfd_mach_ppc_rs64ii    642
-#define bfd_mach_ppc_rs64iii   643
-#define bfd_mach_ppc_7400      7400
-  bfd_arch_rs6000,    /* IBM RS/6000 */
-#define bfd_mach_rs6k          0
-#define bfd_mach_rs6k_rs1      6001
-#define bfd_mach_rs6k_rsc      6003
-#define bfd_mach_rs6k_rs2      6002
-  bfd_arch_hppa,      /* HP PA RISC */
-  bfd_arch_d10v,      /* Mitsubishi D10V */
-#define bfd_mach_d10v          0
-#define bfd_mach_d10v_ts2      2
-#define bfd_mach_d10v_ts3      3
-  bfd_arch_d30v,      /* Mitsubishi D30V */
-  bfd_arch_m68hc11,   /* Motorola 68HC11 */
-  bfd_arch_m68hc12,   /* Motorola 68HC12 */
-  bfd_arch_z8k,       /* Zilog Z8000 */
-#define bfd_mach_z8001         1
-#define bfd_mach_z8002         2
-  bfd_arch_h8500,     /* Hitachi H8/500 */
-  bfd_arch_sh,        /* Hitachi SH */
-#define bfd_mach_sh            0
-#define bfd_mach_sh2        0x20
-#define bfd_mach_sh_dsp     0x2d
-#define bfd_mach_sh3        0x30
-#define bfd_mach_sh3_dsp    0x3d
-#define bfd_mach_sh3e       0x3e
-#define bfd_mach_sh4        0x40
-  bfd_arch_alpha,     /* Dec Alpha */
-#define bfd_mach_alpha_ev4  0x10
-#define bfd_mach_alpha_ev5  0x20
-#define bfd_mach_alpha_ev6  0x30
-  bfd_arch_arm,       /* Advanced Risc Machines ARM */
-#define bfd_mach_arm_2         1
-#define bfd_mach_arm_2a        2
-#define bfd_mach_arm_3         3
-#define bfd_mach_arm_3M        4
-#define bfd_mach_arm_4         5
-#define bfd_mach_arm_4T        6
-#define bfd_mach_arm_5         7
-#define bfd_mach_arm_5T        8
-#define bfd_mach_arm_5TE       9
-#define bfd_mach_arm_XScale    10
-  bfd_arch_ns32k,     /* National Semiconductors ns32000 */
-  bfd_arch_w65,       /* WDC 65816 */
-  bfd_arch_tic30,     /* Texas Instruments TMS320C30 */
-  bfd_arch_tic54x,    /* Texas Instruments TMS320C54X */
-  bfd_arch_tic80,     /* TI TMS320c80 (MVP) */
-  bfd_arch_v850,      /* NEC V850 */
-#define bfd_mach_v850          0
-#define bfd_mach_v850e         'E'
-#define bfd_mach_v850ea        'A'
-  bfd_arch_arc,       /* ARC Cores */
-#define bfd_mach_arc_5         0
-#define bfd_mach_arc_6         1
-#define bfd_mach_arc_7         2
-#define bfd_mach_arc_8         3
-  bfd_arch_m32r,      /* Mitsubishi M32R/D */
-#define bfd_mach_m32r          0 /* backwards compatibility */
-#define bfd_mach_m32rx         'x'
-  bfd_arch_mn10200,   /* Matsushita MN10200 */
-  bfd_arch_mn10300,   /* Matsushita MN10300 */
-#define bfd_mach_mn10300               300
-#define bfd_mach_am33          330
-  bfd_arch_fr30,
-#define bfd_mach_fr30          0x46523330
-  bfd_arch_mcore,
-  bfd_arch_ia64,      /* HP/Intel ia64 */
-#define bfd_mach_ia64_elf64    0
-#define bfd_mach_ia64_elf32    1
-  bfd_arch_pj,
-  bfd_arch_avr,       /* Atmel AVR microcontrollers */
-#define bfd_mach_avr1          1
-#define bfd_mach_avr2          2
-#define bfd_mach_avr3          3
-#define bfd_mach_avr4          4
-#define bfd_mach_avr5          5
-  bfd_arch_cris,      /* Axis CRIS */
-  bfd_arch_s390,      /* IBM s390 */
-#define bfd_mach_s390_esa      0
-#define bfd_mach_s390_esame    1
-  bfd_arch_openrisc,  /* OpenRISC */
-  bfd_arch_last
-  };
-
-typedef struct bfd_arch_info
-{
-  int bits_per_word;
-  int bits_per_address;
-  int bits_per_byte;
-  enum bfd_architecture arch;
-  unsigned long mach;
-  const char *arch_name;
-  const char *printable_name;
-  unsigned int section_align_power;
-  /* True if this is the default machine for the architecture.  */
-  boolean the_default;
-  const struct bfd_arch_info * (*compatible)
-       PARAMS ((const struct bfd_arch_info *a,
-                const struct bfd_arch_info *b));
-
-  boolean (*scan) PARAMS ((const struct bfd_arch_info *, const char *));
-
-  const struct bfd_arch_info *next;
-} bfd_arch_info_type;
-const char *
-bfd_printable_name PARAMS ((bfd *abfd));
-
-const bfd_arch_info_type *
-bfd_scan_arch PARAMS ((const char *string));
-
-const char **
-bfd_arch_list PARAMS ((void));
-
-const bfd_arch_info_type *
-bfd_arch_get_compatible PARAMS ((
-    const bfd *abfd,
-    const bfd *bbfd));
-
-void
-bfd_set_arch_info PARAMS ((bfd *abfd, const bfd_arch_info_type *arg));
-
-enum bfd_architecture
-bfd_get_arch PARAMS ((bfd *abfd));
-
-unsigned long
-bfd_get_mach PARAMS ((bfd *abfd));
-
-unsigned int
-bfd_arch_bits_per_byte PARAMS ((bfd *abfd));
-
-unsigned int
-bfd_arch_bits_per_address PARAMS ((bfd *abfd));
-
-const bfd_arch_info_type *
-bfd_get_arch_info PARAMS ((bfd *abfd));
-
-const bfd_arch_info_type *
-bfd_lookup_arch PARAMS ((enum bfd_architecture
-    arch,
-    unsigned long machine));
-
-const char *
-bfd_printable_arch_mach PARAMS ((enum bfd_architecture arch, unsigned long machine));
-
-unsigned int
-bfd_octets_per_byte PARAMS ((bfd *abfd));
-
-unsigned int
-bfd_arch_mach_octets_per_byte PARAMS ((enum bfd_architecture arch,
-    unsigned long machine));
-
-typedef enum bfd_reloc_status
-{
-  /* No errors detected */
-  bfd_reloc_ok,
-
-  /* The relocation was performed, but there was an overflow. */
-  bfd_reloc_overflow,
-
-  /* The address to relocate was not within the section supplied. */
-  bfd_reloc_outofrange,
-
-  /* Used by special functions */
-  bfd_reloc_continue,
-
-  /* Unsupported relocation size requested. */
-  bfd_reloc_notsupported,
-
-  /* Unused */
-  bfd_reloc_other,
-
-  /* The symbol to relocate against was undefined. */
-  bfd_reloc_undefined,
-
-  /* The relocation was performed, but may not be ok - presently
-     generated only when linking i960 coff files with i960 b.out
-     symbols.  If this type is returned, the error_message argument
-     to bfd_perform_relocation will be set.  */
-  bfd_reloc_dangerous
- }
- bfd_reloc_status_type;
-
-
-typedef struct reloc_cache_entry
-{
-  /* A pointer into the canonical table of pointers  */
-  struct symbol_cache_entry **sym_ptr_ptr;
-
-  /* offset in section */
-  bfd_size_type address;
-
-  /* addend for relocation value */
-  bfd_vma addend;
-
-  /* Pointer to how to perform the required relocation */
-  reloc_howto_type *howto;
-
-} arelent;
-enum complain_overflow
-{
-  /* Do not complain on overflow. */
-  complain_overflow_dont,
-
-  /* Complain if the bitfield overflows, whether it is considered
-     as signed or unsigned. */
-  complain_overflow_bitfield,
-
-  /* Complain if the value overflows when considered as signed
-     number. */
-  complain_overflow_signed,
-
-  /* Complain if the value overflows when considered as an
-     unsigned number. */
-  complain_overflow_unsigned
-};
-
-struct reloc_howto_struct
-{
-  /*  The type field has mainly a documentary use - the back end can
-      do what it wants with it, though normally the back end's
-      external idea of what a reloc number is stored
-      in this field.  For example, a PC relative word relocation
-      in a coff environment has the type 023 - because that's
-      what the outside world calls a R_PCRWORD reloc.  */
-  unsigned int type;
-
-  /*  The value the final relocation is shifted right by.  This drops
-      unwanted data from the relocation.  */
-  unsigned int rightshift;
-
-  /*  The size of the item to be relocated.  This is *not* a
-      power-of-two measure.  To get the number of bytes operated
-      on by a type of relocation, use bfd_get_reloc_size.  */
-  int size;
-
-  /*  The number of bits in the item to be relocated.  This is used
-      when doing overflow checking.  */
-  unsigned int bitsize;
-
-  /*  Notes that the relocation is relative to the location in the
-      data section of the addend.  The relocation function will
-      subtract from the relocation value the address of the location
-      being relocated.  */
-  boolean pc_relative;
-
-  /*  The bit position of the reloc value in the destination.
-      The relocated value is left shifted by this amount.  */
-  unsigned int bitpos;
-
-  /* What type of overflow error should be checked for when
-     relocating.  */
-  enum complain_overflow complain_on_overflow;
-
-  /* If this field is non null, then the supplied function is
-     called rather than the normal function.  This allows really
-     strange relocation methods to be accomodated (e.g., i960 callj
-     instructions).  */
-  bfd_reloc_status_type (*special_function)
-    PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *,
-             bfd *, char **));
-
-  /* The textual name of the relocation type.  */
-  char *name;
-
-  /* Some formats record a relocation addend in the section contents
-     rather than with the relocation.  For ELF formats this is the
-     distinction between USE_REL and USE_RELA (though the code checks
-     for USE_REL == 1/0).  The value of this field is TRUE if the
-     addend is recorded with the section contents; when performing a
-     partial link (ld -r) the section contents (the data) will be
-     modified.  The value of this field is FALSE if addends are
-     recorded with the relocation (in arelent.addend); when performing
-     a partial link the relocation will be modified.
-     All relocations for all ELF USE_RELA targets should set this field
-     to FALSE (values of TRUE should be looked on with suspicion).
-     However, the converse is not true: not all relocations of all ELF
-     USE_REL targets set this field to TRUE.  Why this is so is peculiar
-     to each particular target.  For relocs that aren't used in partial
-     links (e.g. GOT stuff) it doesn't matter what this is set to.  */
-  boolean partial_inplace;
-
-  /* The src_mask selects which parts of the read in data
-     are to be used in the relocation sum.  E.g., if this was an 8 bit
-     byte of data which we read and relocated, this would be
-     0x000000ff.  When we have relocs which have an addend, such as
-     sun4 extended relocs, the value in the offset part of a
-     relocating field is garbage so we never use it.  In this case
-     the mask would be 0x00000000.  */
-  bfd_vma src_mask;
-
-  /* The dst_mask selects which parts of the instruction are replaced
-     into the instruction.  In most cases src_mask == dst_mask,
-     except in the above special case, where dst_mask would be
-     0x000000ff, and src_mask would be 0x00000000.  */
-  bfd_vma dst_mask;
-
-  /* When some formats create PC relative instructions, they leave
-     the value of the pc of the place being relocated in the offset
-     slot of the instruction, so that a PC relative relocation can
-     be made just by adding in an ordinary offset (e.g., sun3 a.out).
-     Some formats leave the displacement part of an instruction
-     empty (e.g., m88k bcs); this flag signals the fact.  */
-  boolean pcrel_offset;
-};
-#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \
-  { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC }
-#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \
-  HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \
-         NAME, false, 0, 0, IN)
-
-#define EMPTY_HOWTO(C) \
-  HOWTO ((C), 0, 0, 0, false, 0, complain_overflow_dont, NULL, \
-         NULL, false, 0, 0, false)
-
-#define HOWTO_PREPARE(relocation, symbol)               \
-  {                                                     \
-    if (symbol != (asymbol *) NULL)                     \
-      {                                                 \
-        if (bfd_is_com_section (symbol->section))       \
-          {                                             \
-            relocation = 0;                             \
-          }                                             \
-        else                                            \
-          {                                             \
-            relocation = symbol->value;                 \
-          }                                             \
-      }                                                 \
-  }
-unsigned int
-bfd_get_reloc_size PARAMS ((reloc_howto_type *));
-
-typedef struct relent_chain
-{
-  arelent relent;
-  struct relent_chain *next;
-} arelent_chain;
-bfd_reloc_status_type
-bfd_check_overflow PARAMS ((enum complain_overflow how,
-    unsigned int bitsize,
-    unsigned int rightshift,
-    unsigned int addrsize,
-    bfd_vma relocation));
-
-bfd_reloc_status_type
-bfd_perform_relocation PARAMS ((bfd *abfd,
-    arelent *reloc_entry,
-    PTR data,
-    asection *input_section,
-    bfd *output_bfd,
-    char **error_message));
-
-bfd_reloc_status_type
-bfd_install_relocation PARAMS ((bfd *abfd,
-    arelent *reloc_entry,
-    PTR data, bfd_vma data_start,
-    asection *input_section,
-    char **error_message));
-
-enum bfd_reloc_code_real {
-  _dummy_first_bfd_reloc_code_real,
-
-
-/* Basic absolute relocations of N bits. */
-  BFD_RELOC_64,
-  BFD_RELOC_32,
-  BFD_RELOC_26,
-  BFD_RELOC_24,
-  BFD_RELOC_16,
-  BFD_RELOC_14,
-  BFD_RELOC_8,
-
-/* PC-relative relocations.  Sometimes these are relative to the address
-of the relocation itself; sometimes they are relative to the start of
-the section containing the relocation.  It depends on the specific target.
-
-The 24-bit relocation is used in some Intel 960 configurations. */
-  BFD_RELOC_64_PCREL,
-  BFD_RELOC_32_PCREL,
-  BFD_RELOC_24_PCREL,
-  BFD_RELOC_16_PCREL,
-  BFD_RELOC_12_PCREL,
-  BFD_RELOC_8_PCREL,
-
-/* For ELF. */
-  BFD_RELOC_32_GOT_PCREL,
-  BFD_RELOC_16_GOT_PCREL,
-  BFD_RELOC_8_GOT_PCREL,
-  BFD_RELOC_32_GOTOFF,
-  BFD_RELOC_16_GOTOFF,
-  BFD_RELOC_LO16_GOTOFF,
-  BFD_RELOC_HI16_GOTOFF,
-  BFD_RELOC_HI16_S_GOTOFF,
-  BFD_RELOC_8_GOTOFF,
-  BFD_RELOC_64_PLT_PCREL,
-  BFD_RELOC_32_PLT_PCREL,
-  BFD_RELOC_24_PLT_PCREL,
-  BFD_RELOC_16_PLT_PCREL,
-  BFD_RELOC_8_PLT_PCREL,
-  BFD_RELOC_64_PLTOFF,
-  BFD_RELOC_32_PLTOFF,
-  BFD_RELOC_16_PLTOFF,
-  BFD_RELOC_LO16_PLTOFF,
-  BFD_RELOC_HI16_PLTOFF,
-  BFD_RELOC_HI16_S_PLTOFF,
-  BFD_RELOC_8_PLTOFF,
-
-/* Relocations used by 68K ELF. */
-  BFD_RELOC_68K_GLOB_DAT,
-  BFD_RELOC_68K_JMP_SLOT,
-  BFD_RELOC_68K_RELATIVE,
-
-/* Linkage-table relative. */
-  BFD_RELOC_32_BASEREL,
-  BFD_RELOC_16_BASEREL,
-  BFD_RELOC_LO16_BASEREL,
-  BFD_RELOC_HI16_BASEREL,
-  BFD_RELOC_HI16_S_BASEREL,
-  BFD_RELOC_8_BASEREL,
-  BFD_RELOC_RVA,
-
-/* Absolute 8-bit relocation, but used to form an address like 0xFFnn. */
-  BFD_RELOC_8_FFnn,
-
-/* These PC-relative relocations are stored as word displacements --
-i.e., byte displacements shifted right two bits.  The 30-bit word
-displacement (<<32_PCREL_S2>> -- 32 bits, shifted 2) is used on the
-SPARC.  (SPARC tools generally refer to this as <<WDISP30>>.)  The
-signed 16-bit displacement is used on the MIPS, and the 23-bit
-displacement is used on the Alpha. */
-  BFD_RELOC_32_PCREL_S2,
-  BFD_RELOC_16_PCREL_S2,
-  BFD_RELOC_23_PCREL_S2,
-
-/* High 22 bits and low 10 bits of 32-bit value, placed into lower bits of
-the target word.  These are used on the SPARC. */
-  BFD_RELOC_HI22,
-  BFD_RELOC_LO10,
-
-/* For systems that allocate a Global Pointer register, these are
-displacements off that register.  These relocation types are
-handled specially, because the value the register will have is
-decided relatively late. */
-  BFD_RELOC_GPREL16,
-  BFD_RELOC_GPREL32,
-
-/* Reloc types used for i960/b.out. */
-  BFD_RELOC_I960_CALLJ,
-
-/* SPARC ELF relocations.  There is probably some overlap with other
-relocation types already defined. */
-  BFD_RELOC_NONE,
-  BFD_RELOC_SPARC_WDISP22,
-  BFD_RELOC_SPARC22,
-  BFD_RELOC_SPARC13,
-  BFD_RELOC_SPARC_GOT10,
-  BFD_RELOC_SPARC_GOT13,
-  BFD_RELOC_SPARC_GOT22,
-  BFD_RELOC_SPARC_PC10,
-  BFD_RELOC_SPARC_PC22,
-  BFD_RELOC_SPARC_WPLT30,
-  BFD_RELOC_SPARC_COPY,
-  BFD_RELOC_SPARC_GLOB_DAT,
-  BFD_RELOC_SPARC_JMP_SLOT,
-  BFD_RELOC_SPARC_RELATIVE,
-  BFD_RELOC_SPARC_UA16,
-  BFD_RELOC_SPARC_UA32,
-  BFD_RELOC_SPARC_UA64,
-
-/* I think these are specific to SPARC a.out (e.g., Sun 4). */
-  BFD_RELOC_SPARC_BASE13,
-  BFD_RELOC_SPARC_BASE22,
-
-/* SPARC64 relocations */
-#define BFD_RELOC_SPARC_64 BFD_RELOC_64
-  BFD_RELOC_SPARC_10,
-  BFD_RELOC_SPARC_11,
-  BFD_RELOC_SPARC_OLO10,
-  BFD_RELOC_SPARC_HH22,
-  BFD_RELOC_SPARC_HM10,
-  BFD_RELOC_SPARC_LM22,
-  BFD_RELOC_SPARC_PC_HH22,
-  BFD_RELOC_SPARC_PC_HM10,
-  BFD_RELOC_SPARC_PC_LM22,
-  BFD_RELOC_SPARC_WDISP16,
-  BFD_RELOC_SPARC_WDISP19,
-  BFD_RELOC_SPARC_7,
-  BFD_RELOC_SPARC_6,
-  BFD_RELOC_SPARC_5,
-#define BFD_RELOC_SPARC_DISP64 BFD_RELOC_64_PCREL
-  BFD_RELOC_SPARC_PLT64,
-  BFD_RELOC_SPARC_HIX22,
-  BFD_RELOC_SPARC_LOX10,
-  BFD_RELOC_SPARC_H44,
-  BFD_RELOC_SPARC_M44,
-  BFD_RELOC_SPARC_L44,
-  BFD_RELOC_SPARC_REGISTER,
-
-/* SPARC little endian relocation */
-  BFD_RELOC_SPARC_REV32,
-
-/* Alpha ECOFF and ELF relocations.  Some of these treat the symbol or
-"addend" in some special way.
-For GPDISP_HI16 ("gpdisp") relocations, the symbol is ignored when
-writing; when reading, it will be the absolute section symbol.  The
-addend is the displacement in bytes of the "lda" instruction from
-the "ldah" instruction (which is at the address of this reloc). */
-  BFD_RELOC_ALPHA_GPDISP_HI16,
-
-/* For GPDISP_LO16 ("ignore") relocations, the symbol is handled as
-with GPDISP_HI16 relocs.  The addend is ignored when writing the
-relocations out, and is filled in with the file's GP value on
-reading, for convenience. */
-  BFD_RELOC_ALPHA_GPDISP_LO16,
-
-/* The ELF GPDISP relocation is exactly the same as the GPDISP_HI16
-relocation except that there is no accompanying GPDISP_LO16
-relocation. */
-  BFD_RELOC_ALPHA_GPDISP,
-
-/* The Alpha LITERAL/LITUSE relocs are produced by a symbol reference;
-the assembler turns it into a LDQ instruction to load the address of
-the symbol, and then fills in a register in the real instruction.
-
-The LITERAL reloc, at the LDQ instruction, refers to the .lita
-section symbol.  The addend is ignored when writing, but is filled
-in with the file's GP value on reading, for convenience, as with the
-GPDISP_LO16 reloc.
-
-The ELF_LITERAL reloc is somewhere between 16_GOTOFF and GPDISP_LO16.
-It should refer to the symbol to be referenced, as with 16_GOTOFF,
-but it generates output not based on the position within the .got
-section, but relative to the GP value chosen for the file during the
-final link stage.
-
-The LITUSE reloc, on the instruction using the loaded address, gives
-information to the linker that it might be able to use to optimize
-away some literal section references.  The symbol is ignored (read
-as the absolute section symbol), and the "addend" indicates the type
-of instruction using the register:
-1 - "memory" fmt insn
-2 - byte-manipulation (byte offset reg)
-3 - jsr (target of branch) */
-  BFD_RELOC_ALPHA_LITERAL,
-  BFD_RELOC_ALPHA_ELF_LITERAL,
-  BFD_RELOC_ALPHA_LITUSE,
-
-/* The HINT relocation indicates a value that should be filled into the
-"hint" field of a jmp/jsr/ret instruction, for possible branch-
-prediction logic which may be provided on some processors. */
-  BFD_RELOC_ALPHA_HINT,
-
-/* The LINKAGE relocation outputs a linkage pair in the object file,
-which is filled by the linker. */
-  BFD_RELOC_ALPHA_LINKAGE,
-
-/* The CODEADDR relocation outputs a STO_CA in the object file,
-which is filled by the linker. */
-  BFD_RELOC_ALPHA_CODEADDR,
-
-/* The GPREL_HI/LO relocations together form a 32-bit offset from the
-GP register. */
-  BFD_RELOC_ALPHA_GPREL_HI16,
-  BFD_RELOC_ALPHA_GPREL_LO16,
-
-/* Bits 27..2 of the relocation address shifted right 2 bits;
-simple reloc otherwise. */
-  BFD_RELOC_MIPS_JMP,
-
-/* The MIPS16 jump instruction. */
-  BFD_RELOC_MIPS16_JMP,
-
-/* MIPS16 GP relative reloc. */
-  BFD_RELOC_MIPS16_GPREL,
-
-/* High 16 bits of 32-bit value; simple reloc. */
-  BFD_RELOC_HI16,
-
-/* High 16 bits of 32-bit value but the low 16 bits will be sign
-extended and added to form the final result.  If the low 16
-bits form a negative number, we need to add one to the high value
-to compensate for the borrow when the low bits are added. */
-  BFD_RELOC_HI16_S,
-
-/* Low 16 bits. */
-  BFD_RELOC_LO16,
-
-/* Like BFD_RELOC_HI16_S, but PC relative. */
-  BFD_RELOC_PCREL_HI16_S,
-
-/* Like BFD_RELOC_LO16, but PC relative. */
-  BFD_RELOC_PCREL_LO16,
-
-/* Relocation relative to the global pointer. */
-#define BFD_RELOC_MIPS_GPREL BFD_RELOC_GPREL16
-
-/* Relocation against a MIPS literal section. */
-  BFD_RELOC_MIPS_LITERAL,
-
-/* MIPS ELF relocations. */
-  BFD_RELOC_MIPS_GOT16,
-  BFD_RELOC_MIPS_CALL16,
-#define BFD_RELOC_MIPS_GPREL32 BFD_RELOC_GPREL32
-  BFD_RELOC_MIPS_GOT_HI16,
-  BFD_RELOC_MIPS_GOT_LO16,
-  BFD_RELOC_MIPS_CALL_HI16,
-  BFD_RELOC_MIPS_CALL_LO16,
-  BFD_RELOC_MIPS_SUB,
-  BFD_RELOC_MIPS_GOT_PAGE,
-  BFD_RELOC_MIPS_GOT_OFST,
-  BFD_RELOC_MIPS_GOT_DISP,
-  BFD_RELOC_MIPS_SHIFT5,
-  BFD_RELOC_MIPS_SHIFT6,
-  BFD_RELOC_MIPS_INSERT_A,
-  BFD_RELOC_MIPS_INSERT_B,
-  BFD_RELOC_MIPS_DELETE,
-  BFD_RELOC_MIPS_HIGHEST,
-  BFD_RELOC_MIPS_HIGHER,
-  BFD_RELOC_MIPS_SCN_DISP,
-  BFD_RELOC_MIPS_REL16,
-  BFD_RELOC_MIPS_RELGOT,
-  BFD_RELOC_MIPS_JALR,
-
-
-/* i386/elf relocations */
-  BFD_RELOC_386_GOT32,
-  BFD_RELOC_386_PLT32,
-  BFD_RELOC_386_COPY,
-  BFD_RELOC_386_GLOB_DAT,
-  BFD_RELOC_386_JUMP_SLOT,
-  BFD_RELOC_386_RELATIVE,
-  BFD_RELOC_386_GOTOFF,
-  BFD_RELOC_386_GOTPC,
-
-/* x86-64/elf relocations */
-  BFD_RELOC_X86_64_GOT32,
-  BFD_RELOC_X86_64_PLT32,
-  BFD_RELOC_X86_64_COPY,
-  BFD_RELOC_X86_64_GLOB_DAT,
-  BFD_RELOC_X86_64_JUMP_SLOT,
-  BFD_RELOC_X86_64_RELATIVE,
-  BFD_RELOC_X86_64_GOTPCREL,
-  BFD_RELOC_X86_64_32S,
-
-/* ns32k relocations */
-  BFD_RELOC_NS32K_IMM_8,
-  BFD_RELOC_NS32K_IMM_16,
-  BFD_RELOC_NS32K_IMM_32,
-  BFD_RELOC_NS32K_IMM_8_PCREL,
-  BFD_RELOC_NS32K_IMM_16_PCREL,
-  BFD_RELOC_NS32K_IMM_32_PCREL,
-  BFD_RELOC_NS32K_DISP_8,
-  BFD_RELOC_NS32K_DISP_16,
-  BFD_RELOC_NS32K_DISP_32,
-  BFD_RELOC_NS32K_DISP_8_PCREL,
-  BFD_RELOC_NS32K_DISP_16_PCREL,
-  BFD_RELOC_NS32K_DISP_32_PCREL,
-
-/* PDP11 relocations */
-  BFD_RELOC_PDP11_DISP_8_PCREL,
-  BFD_RELOC_PDP11_DISP_6_PCREL,
-
-/* Picojava relocs.  Not all of these appear in object files. */
-  BFD_RELOC_PJ_CODE_HI16,
-  BFD_RELOC_PJ_CODE_LO16,
-  BFD_RELOC_PJ_CODE_DIR16,
-  BFD_RELOC_PJ_CODE_DIR32,
-  BFD_RELOC_PJ_CODE_REL16,
-  BFD_RELOC_PJ_CODE_REL32,
-
-/* Power(rs6000) and PowerPC relocations. */
-  BFD_RELOC_PPC_B26,
-  BFD_RELOC_PPC_BA26,
-  BFD_RELOC_PPC_TOC16,
-  BFD_RELOC_PPC_B16,
-  BFD_RELOC_PPC_B16_BRTAKEN,
-  BFD_RELOC_PPC_B16_BRNTAKEN,
-  BFD_RELOC_PPC_BA16,
-  BFD_RELOC_PPC_BA16_BRTAKEN,
-  BFD_RELOC_PPC_BA16_BRNTAKEN,
-  BFD_RELOC_PPC_COPY,
-  BFD_RELOC_PPC_GLOB_DAT,
-  BFD_RELOC_PPC_JMP_SLOT,
-  BFD_RELOC_PPC_RELATIVE,
-  BFD_RELOC_PPC_LOCAL24PC,
-  BFD_RELOC_PPC_EMB_NADDR32,
-  BFD_RELOC_PPC_EMB_NADDR16,
-  BFD_RELOC_PPC_EMB_NADDR16_LO,
-  BFD_RELOC_PPC_EMB_NADDR16_HI,
-  BFD_RELOC_PPC_EMB_NADDR16_HA,
-  BFD_RELOC_PPC_EMB_SDAI16,
-  BFD_RELOC_PPC_EMB_SDA2I16,
-  BFD_RELOC_PPC_EMB_SDA2REL,
-  BFD_RELOC_PPC_EMB_SDA21,
-  BFD_RELOC_PPC_EMB_MRKREF,
-  BFD_RELOC_PPC_EMB_RELSEC16,
-  BFD_RELOC_PPC_EMB_RELST_LO,
-  BFD_RELOC_PPC_EMB_RELST_HI,
-  BFD_RELOC_PPC_EMB_RELST_HA,
-  BFD_RELOC_PPC_EMB_BIT_FLD,
-  BFD_RELOC_PPC_EMB_RELSDA,
-  BFD_RELOC_PPC64_HIGHER,
-  BFD_RELOC_PPC64_HIGHER_S,
-  BFD_RELOC_PPC64_HIGHEST,
-  BFD_RELOC_PPC64_HIGHEST_S,
-  BFD_RELOC_PPC64_TOC16_LO,
-  BFD_RELOC_PPC64_TOC16_HI,
-  BFD_RELOC_PPC64_TOC16_HA,
-  BFD_RELOC_PPC64_TOC,
-  BFD_RELOC_PPC64_PLTGOT16,
-  BFD_RELOC_PPC64_PLTGOT16_LO,
-  BFD_RELOC_PPC64_PLTGOT16_HI,
-  BFD_RELOC_PPC64_PLTGOT16_HA,
-  BFD_RELOC_PPC64_ADDR16_DS,
-  BFD_RELOC_PPC64_ADDR16_LO_DS,
-  BFD_RELOC_PPC64_GOT16_DS,
-  BFD_RELOC_PPC64_GOT16_LO_DS,
-  BFD_RELOC_PPC64_PLT16_LO_DS,
-  BFD_RELOC_PPC64_SECTOFF_DS,
-  BFD_RELOC_PPC64_SECTOFF_LO_DS,
-  BFD_RELOC_PPC64_TOC16_DS,
-  BFD_RELOC_PPC64_TOC16_LO_DS,
-  BFD_RELOC_PPC64_PLTGOT16_DS,
-  BFD_RELOC_PPC64_PLTGOT16_LO_DS,
-
-/* IBM 370/390 relocations */
-  BFD_RELOC_I370_D12,
-
-/* The type of reloc used to build a contructor table - at the moment
-probably a 32 bit wide absolute relocation, but the target can choose.
-It generally does map to one of the other relocation types. */
-  BFD_RELOC_CTOR,
-
-/* ARM 26 bit pc-relative branch.  The lowest two bits must be zero and are
-not stored in the instruction. */
-  BFD_RELOC_ARM_PCREL_BRANCH,
-
-/* ARM 26 bit pc-relative branch.  The lowest bit must be zero and is
-not stored in the instruction.  The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
-  BFD_RELOC_ARM_PCREL_BLX,
-
-/* Thumb 22 bit pc-relative branch.  The lowest bit must be zero and is
-not stored in the instruction.  The 2nd lowest bit comes from a 1 bit
-field in the instruction. */
-  BFD_RELOC_THUMB_PCREL_BLX,
-
-/* These relocs are only used within the ARM assembler.  They are not
-(at present) written to any object files. */
-  BFD_RELOC_ARM_IMMEDIATE,
-  BFD_RELOC_ARM_ADRL_IMMEDIATE,
-  BFD_RELOC_ARM_OFFSET_IMM,
-  BFD_RELOC_ARM_SHIFT_IMM,
-  BFD_RELOC_ARM_SWI,
-  BFD_RELOC_ARM_MULTI,
-  BFD_RELOC_ARM_CP_OFF_IMM,
-  BFD_RELOC_ARM_ADR_IMM,
-  BFD_RELOC_ARM_LDR_IMM,
-  BFD_RELOC_ARM_LITERAL,
-  BFD_RELOC_ARM_IN_POOL,
-  BFD_RELOC_ARM_OFFSET_IMM8,
-  BFD_RELOC_ARM_HWLITERAL,
-  BFD_RELOC_ARM_THUMB_ADD,
-  BFD_RELOC_ARM_THUMB_IMM,
-  BFD_RELOC_ARM_THUMB_SHIFT,
-  BFD_RELOC_ARM_THUMB_OFFSET,
-  BFD_RELOC_ARM_GOT12,
-  BFD_RELOC_ARM_GOT32,
-  BFD_RELOC_ARM_JUMP_SLOT,
-  BFD_RELOC_ARM_COPY,
-  BFD_RELOC_ARM_GLOB_DAT,
-  BFD_RELOC_ARM_PLT32,
-  BFD_RELOC_ARM_RELATIVE,
-  BFD_RELOC_ARM_GOTOFF,
-  BFD_RELOC_ARM_GOTPC,
-
-/* Hitachi SH relocs.  Not all of these appear in object files. */
-  BFD_RELOC_SH_PCDISP8BY2,
-  BFD_RELOC_SH_PCDISP12BY2,
-  BFD_RELOC_SH_IMM4,
-  BFD_RELOC_SH_IMM4BY2,
-  BFD_RELOC_SH_IMM4BY4,
-  BFD_RELOC_SH_IMM8,
-  BFD_RELOC_SH_IMM8BY2,
-  BFD_RELOC_SH_IMM8BY4,
-  BFD_RELOC_SH_PCRELIMM8BY2,
-  BFD_RELOC_SH_PCRELIMM8BY4,
-  BFD_RELOC_SH_SWITCH16,
-  BFD_RELOC_SH_SWITCH32,
-  BFD_RELOC_SH_USES,
-  BFD_RELOC_SH_COUNT,
-  BFD_RELOC_SH_ALIGN,
-  BFD_RELOC_SH_CODE,
-  BFD_RELOC_SH_DATA,
-  BFD_RELOC_SH_LABEL,
-  BFD_RELOC_SH_LOOP_START,
-  BFD_RELOC_SH_LOOP_END,
-  BFD_RELOC_SH_COPY,
-  BFD_RELOC_SH_GLOB_DAT,
-  BFD_RELOC_SH_JMP_SLOT,
-  BFD_RELOC_SH_RELATIVE,
-  BFD_RELOC_SH_GOTPC,
-
-/* Thumb 23-, 12- and 9-bit pc-relative branches.  The lowest bit must
-be zero and is not stored in the instruction. */
-  BFD_RELOC_THUMB_PCREL_BRANCH9,
-  BFD_RELOC_THUMB_PCREL_BRANCH12,
-  BFD_RELOC_THUMB_PCREL_BRANCH23,
-
-/* ARC Cores relocs.
-ARC 22 bit pc-relative branch.  The lowest two bits must be zero and are
-not stored in the instruction.  The high 20 bits are installed in bits 26
-through 7 of the instruction. */
-  BFD_RELOC_ARC_B22_PCREL,
-
-/* ARC 26 bit absolute branch.  The lowest two bits must be zero and are not
-stored in the instruction.  The high 24 bits are installed in bits 23
-through 0. */
-  BFD_RELOC_ARC_B26,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0. */
-  BFD_RELOC_D10V_10_PCREL_R,
-
-/* Mitsubishi D10V relocs.
-This is a 10-bit reloc with the right 2 bits
-assumed to be 0.  This is the same as the previous reloc
-except it is in the left container, i.e.,
-shifted left 15 bits. */
-  BFD_RELOC_D10V_10_PCREL_L,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
-  BFD_RELOC_D10V_18,
-
-/* This is an 18-bit reloc with the right 2 bits
-assumed to be 0. */
-  BFD_RELOC_D10V_18_PCREL,
-
-/* Mitsubishi D30V relocs.
-This is a 6-bit absolute reloc. */
-  BFD_RELOC_D30V_6,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
-  BFD_RELOC_D30V_9_PCREL,
-
-/* This is a 6-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
-  BFD_RELOC_D30V_9_PCREL_R,
-
-/* This is a 12-bit absolute reloc with the
-right 3 bitsassumed to be 0. */
-  BFD_RELOC_D30V_15,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
-  BFD_RELOC_D30V_15_PCREL,
-
-/* This is a 12-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
-  BFD_RELOC_D30V_15_PCREL_R,
-
-/* This is an 18-bit absolute reloc with
-the right 3 bits assumed to be 0. */
-  BFD_RELOC_D30V_21,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. */
-  BFD_RELOC_D30V_21_PCREL,
-
-/* This is an 18-bit pc-relative reloc with
-the right 3 bits assumed to be 0. Same
-as the previous reloc but on the right side
-of the container. */
-  BFD_RELOC_D30V_21_PCREL_R,
-
-/* This is a 32-bit absolute reloc. */
-  BFD_RELOC_D30V_32,
-
-/* This is a 32-bit pc-relative reloc. */
-  BFD_RELOC_D30V_32_PCREL,
-
-/* Mitsubishi M32R relocs.
-This is a 24 bit absolute address. */
-  BFD_RELOC_M32R_24,
-
-/* This is a 10-bit pc-relative reloc with the right 2 bits assumed to be 0. */
-  BFD_RELOC_M32R_10_PCREL,
-
-/* This is an 18-bit reloc with the right 2 bits assumed to be 0. */
-  BFD_RELOC_M32R_18_PCREL,
-
-/* This is a 26-bit reloc with the right 2 bits assumed to be 0. */
-  BFD_RELOC_M32R_26_PCREL,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as unsigned. */
-  BFD_RELOC_M32R_HI16_ULO,
-
-/* This is a 16-bit reloc containing the high 16 bits of an address
-used when the lower 16 bits are treated as signed. */
-  BFD_RELOC_M32R_HI16_SLO,
-
-/* This is a 16-bit reloc containing the lower 16 bits of an address. */
-  BFD_RELOC_M32R_LO16,
-
-/* This is a 16-bit reloc containing the small data area offset for use in
-add3, load, and store instructions. */
-  BFD_RELOC_M32R_SDA16,
-
-/* This is a 9-bit reloc */
-  BFD_RELOC_V850_9_PCREL,
-
-/* This is a 22-bit reloc */
-  BFD_RELOC_V850_22_PCREL,
-
-/* This is a 16 bit offset from the short data area pointer. */
-  BFD_RELOC_V850_SDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-short data area pointer. */
-  BFD_RELOC_V850_SDA_15_16_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer. */
-  BFD_RELOC_V850_ZDA_16_16_OFFSET,
-
-/* This is a 16 bit offset (of which only 15 bits are used) from the
-zero data area pointer. */
-  BFD_RELOC_V850_ZDA_15_16_OFFSET,
-
-/* This is an 8 bit offset (of which only 6 bits are used) from the
-tiny data area pointer. */
-  BFD_RELOC_V850_TDA_6_8_OFFSET,
-
-/* This is an 8bit offset (of which only 7 bits are used) from the tiny
-data area pointer. */
-  BFD_RELOC_V850_TDA_7_8_OFFSET,
-
-/* This is a 7 bit offset from the tiny data area pointer. */
-  BFD_RELOC_V850_TDA_7_7_OFFSET,
-
-/* This is a 16 bit offset from the tiny data area pointer. */
-  BFD_RELOC_V850_TDA_16_16_OFFSET,
-
-/* This is a 5 bit offset (of which only 4 bits are used) from the tiny
-data area pointer. */
-  BFD_RELOC_V850_TDA_4_5_OFFSET,
-
-/* This is a 4 bit offset from the tiny data area pointer. */
-  BFD_RELOC_V850_TDA_4_4_OFFSET,
-
-/* This is a 16 bit offset from the short data area pointer, with the
-bits placed non-contigously in the instruction. */
-  BFD_RELOC_V850_SDA_16_16_SPLIT_OFFSET,
-
-/* This is a 16 bit offset from the zero data area pointer, with the
-bits placed non-contigously in the instruction. */
-  BFD_RELOC_V850_ZDA_16_16_SPLIT_OFFSET,
-
-/* This is a 6 bit offset from the call table base pointer. */
-  BFD_RELOC_V850_CALLT_6_7_OFFSET,
-
-/* This is a 16 bit offset from the call table base pointer. */
-  BFD_RELOC_V850_CALLT_16_16_OFFSET,
-
-
-/* This is a 32bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
-  BFD_RELOC_MN10300_32_PCREL,
-
-/* This is a 16bit pcrel reloc for the mn10300, offset by two bytes in the
-instruction. */
-  BFD_RELOC_MN10300_16_PCREL,
-
-/* This is a 8bit DP reloc for the tms320c30, where the most
-significant 8 bits of a 24 bit word are placed into the least
-significant 8 bits of the opcode. */
-  BFD_RELOC_TIC30_LDP,
-
-/* This is a 7bit reloc for the tms320c54x, where the least
-significant 7 bits of a 16 bit word are placed into the least
-significant 7 bits of the opcode. */
-  BFD_RELOC_TIC54X_PARTLS7,
-
-/* This is a 9bit DP reloc for the tms320c54x, where the most
-significant 9 bits of a 16 bit word are placed into the least
-significant 9 bits of the opcode. */
-  BFD_RELOC_TIC54X_PARTMS9,
-
-/* This is an extended address 23-bit reloc for the tms320c54x. */
-  BFD_RELOC_TIC54X_23,
-
-/* This is a 16-bit reloc for the tms320c54x, where the least
-significant 16 bits of a 23-bit extended address are placed into
-the opcode. */
-  BFD_RELOC_TIC54X_16_OF_23,
-
-/* This is a reloc for the tms320c54x, where the most
-significant 7 bits of a 23-bit extended address are placed into
-the opcode. */
-  BFD_RELOC_TIC54X_MS7_OF_23,
-
-/* This is a 48 bit reloc for the FR30 that stores 32 bits. */
-  BFD_RELOC_FR30_48,
-
-/* This is a 32 bit reloc for the FR30 that stores 20 bits split up into
-two sections. */
-  BFD_RELOC_FR30_20,
-
-/* This is a 16 bit reloc for the FR30 that stores a 6 bit word offset in
-4 bits. */
-  BFD_RELOC_FR30_6_IN_4,
-
-/* This is a 16 bit reloc for the FR30 that stores an 8 bit byte offset
-into 8 bits. */
-  BFD_RELOC_FR30_8_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit short offset
-into 8 bits. */
-  BFD_RELOC_FR30_9_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 10 bit word offset
-into 8 bits. */
-  BFD_RELOC_FR30_10_IN_8,
-
-/* This is a 16 bit reloc for the FR30 that stores a 9 bit pc relative
-short offset into 8 bits. */
-  BFD_RELOC_FR30_9_PCREL,
-
-/* This is a 16 bit reloc for the FR30 that stores a 12 bit pc relative
-short offset into 11 bits. */
-  BFD_RELOC_FR30_12_PCREL,
-
-/* Motorola Mcore relocations. */
-  BFD_RELOC_MCORE_PCREL_IMM8BY4,
-  BFD_RELOC_MCORE_PCREL_IMM11BY2,
-  BFD_RELOC_MCORE_PCREL_IMM4BY2,
-  BFD_RELOC_MCORE_PCREL_32,
-  BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2,
-  BFD_RELOC_MCORE_RVA,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit pc relative
-short offset into 7 bits. */
-  BFD_RELOC_AVR_7_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 13 bit pc relative
-short offset into 12 bits. */
-  BFD_RELOC_AVR_13_PCREL,
-
-/* This is a 16 bit reloc for the AVR that stores 17 bit value (usually
-program memory address) into 16 bits. */
-  BFD_RELOC_AVR_16_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-data memory address) into 8 bit immediate value of LDI insn. */
-  BFD_RELOC_AVR_LO8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of data memory address) into 8 bit immediate value of LDI insn. */
-  BFD_RELOC_AVR_HI8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of program memory address) into 8 bit immediate value of LDI insn. */
-  BFD_RELOC_AVR_HH8_LDI,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually data memory address) into 8 bit immediate value of SUBI insn. */
-  BFD_RELOC_AVR_LO8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of data memory address) into 8 bit immediate value of
-SUBI insn. */
-  BFD_RELOC_AVR_HI8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(most high 8 bit of program memory address) into 8 bit immediate value
-of LDI or SUBI insn. */
-  BFD_RELOC_AVR_HH8_LDI_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (usually
-command address) into 8 bit immediate value of LDI insn. */
-  BFD_RELOC_AVR_LO8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
-  BFD_RELOC_AVR_HI8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores 8 bit value (most high 8 bit
-of command address) into 8 bit immediate value of LDI insn. */
-  BFD_RELOC_AVR_HH8_LDI_PM,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(usually command address) into 8 bit immediate value of SUBI insn. */
-  BFD_RELOC_AVR_LO8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 8 bit of 16 bit command address) into 8 bit immediate value
-of SUBI insn. */
-  BFD_RELOC_AVR_HI8_LDI_PM_NEG,
-
-/* This is a 16 bit reloc for the AVR that stores negated 8 bit value
-(high 6 bit of 22 bit command address) into 8 bit immediate
-value of SUBI insn. */
-  BFD_RELOC_AVR_HH8_LDI_PM_NEG,
-
-/* This is a 32 bit reloc for the AVR that stores 23 bit value
-into 22 bits. */
-  BFD_RELOC_AVR_CALL,
-
-/* Direct 12 bit. */
-  BFD_RELOC_390_12,
-
-/* 12 bit GOT offset. */
-  BFD_RELOC_390_GOT12,
-
-/* 32 bit PC relative PLT address. */
-  BFD_RELOC_390_PLT32,
-
-/* Copy symbol at runtime. */
-  BFD_RELOC_390_COPY,
-
-/* Create GOT entry. */
-  BFD_RELOC_390_GLOB_DAT,
-
-/* Create PLT entry. */
-  BFD_RELOC_390_JMP_SLOT,
-
-/* Adjust by program base. */
-  BFD_RELOC_390_RELATIVE,
-
-/* 32 bit PC relative offset to GOT. */
-  BFD_RELOC_390_GOTPC,
-
-/* 16 bit GOT offset. */
-  BFD_RELOC_390_GOT16,
-
-/* PC relative 16 bit shifted by 1. */
-  BFD_RELOC_390_PC16DBL,
-
-/* 16 bit PC rel. PLT shifted by 1. */
-  BFD_RELOC_390_PLT16DBL,
-
-/* PC relative 32 bit shifted by 1. */
-  BFD_RELOC_390_PC32DBL,
-
-/* 32 bit PC rel. PLT shifted by 1. */
-  BFD_RELOC_390_PLT32DBL,
-
-/* 32 bit PC rel. GOT shifted by 1. */
-  BFD_RELOC_390_GOTPCDBL,
-
-/* 64 bit GOT offset. */
-  BFD_RELOC_390_GOT64,
-
-/* 64 bit PC relative PLT address. */
-  BFD_RELOC_390_PLT64,
-
-/* 32 bit rel. offset to GOT entry. */
-  BFD_RELOC_390_GOTENT,
-
-/* These two relocations are used by the linker to determine which of
-the entries in a C++ virtual function table are actually used.  When
-the --gc-sections option is given, the linker will zero out the entries
-that are not used, so that the code for those functions need not be
-included in the output.
-
-VTABLE_INHERIT is a zero-space relocation used to describe to the
-linker the inheritence tree of a C++ virtual function table.  The
-relocation's symbol should be the parent class' vtable, and the
-relocation should be located at the child vtable.
-
-VTABLE_ENTRY is a zero-space relocation that describes the use of a
-virtual function table entry.  The reloc's symbol should refer to the
-table of the class mentioned in the code.  Off of that base, an offset
-describes the entry that is being used.  For Rela hosts, this offset
-is stored in the reloc's addend.  For Rel hosts, we are forced to put
-this offset in the reloc's section offset. */
-  BFD_RELOC_VTABLE_INHERIT,
-  BFD_RELOC_VTABLE_ENTRY,
-
-/* Intel IA64 Relocations. */
-  BFD_RELOC_IA64_IMM14,
-  BFD_RELOC_IA64_IMM22,
-  BFD_RELOC_IA64_IMM64,
-  BFD_RELOC_IA64_DIR32MSB,
-  BFD_RELOC_IA64_DIR32LSB,
-  BFD_RELOC_IA64_DIR64MSB,
-  BFD_RELOC_IA64_DIR64LSB,
-  BFD_RELOC_IA64_GPREL22,
-  BFD_RELOC_IA64_GPREL64I,
-  BFD_RELOC_IA64_GPREL32MSB,
-  BFD_RELOC_IA64_GPREL32LSB,
-  BFD_RELOC_IA64_GPREL64MSB,
-  BFD_RELOC_IA64_GPREL64LSB,
-  BFD_RELOC_IA64_LTOFF22,
-  BFD_RELOC_IA64_LTOFF64I,
-  BFD_RELOC_IA64_PLTOFF22,
-  BFD_RELOC_IA64_PLTOFF64I,
-  BFD_RELOC_IA64_PLTOFF64MSB,
-  BFD_RELOC_IA64_PLTOFF64LSB,
-  BFD_RELOC_IA64_FPTR64I,
-  BFD_RELOC_IA64_FPTR32MSB,
-  BFD_RELOC_IA64_FPTR32LSB,
-  BFD_RELOC_IA64_FPTR64MSB,
-  BFD_RELOC_IA64_FPTR64LSB,
-  BFD_RELOC_IA64_PCREL21B,
-  BFD_RELOC_IA64_PCREL21BI,
-  BFD_RELOC_IA64_PCREL21M,
-  BFD_RELOC_IA64_PCREL21F,
-  BFD_RELOC_IA64_PCREL22,
-  BFD_RELOC_IA64_PCREL60B,
-  BFD_RELOC_IA64_PCREL64I,
-  BFD_RELOC_IA64_PCREL32MSB,
-  BFD_RELOC_IA64_PCREL32LSB,
-  BFD_RELOC_IA64_PCREL64MSB,
-  BFD_RELOC_IA64_PCREL64LSB,
-  BFD_RELOC_IA64_LTOFF_FPTR22,
-  BFD_RELOC_IA64_LTOFF_FPTR64I,
-  BFD_RELOC_IA64_LTOFF_FPTR32MSB,
-  BFD_RELOC_IA64_LTOFF_FPTR32LSB,
-  BFD_RELOC_IA64_LTOFF_FPTR64MSB,
-  BFD_RELOC_IA64_LTOFF_FPTR64LSB,
-  BFD_RELOC_IA64_SEGREL32MSB,
-  BFD_RELOC_IA64_SEGREL32LSB,
-  BFD_RELOC_IA64_SEGREL64MSB,
-  BFD_RELOC_IA64_SEGREL64LSB,
-  BFD_RELOC_IA64_SECREL32MSB,
-  BFD_RELOC_IA64_SECREL32LSB,
-  BFD_RELOC_IA64_SECREL64MSB,
-  BFD_RELOC_IA64_SECREL64LSB,
-  BFD_RELOC_IA64_REL32MSB,
-  BFD_RELOC_IA64_REL32LSB,
-  BFD_RELOC_IA64_REL64MSB,
-  BFD_RELOC_IA64_REL64LSB,
-  BFD_RELOC_IA64_LTV32MSB,
-  BFD_RELOC_IA64_LTV32LSB,
-  BFD_RELOC_IA64_LTV64MSB,
-  BFD_RELOC_IA64_LTV64LSB,
-  BFD_RELOC_IA64_IPLTMSB,
-  BFD_RELOC_IA64_IPLTLSB,
-  BFD_RELOC_IA64_COPY,
-  BFD_RELOC_IA64_TPREL22,
-  BFD_RELOC_IA64_TPREL64MSB,
-  BFD_RELOC_IA64_TPREL64LSB,
-  BFD_RELOC_IA64_LTOFF_TP22,
-  BFD_RELOC_IA64_LTOFF22X,
-  BFD_RELOC_IA64_LDXMOV,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bits high part of an absolute address. */
-  BFD_RELOC_M68HC11_HI8,
-
-/* Motorola 68HC11 reloc.
-This is the 8 bits low part of an absolute address. */
-  BFD_RELOC_M68HC11_LO8,
-
-/* Motorola 68HC11 reloc.
-This is the 3 bits of a value. */
-  BFD_RELOC_M68HC11_3B,
-
-/* These relocs are only used within the CRIS assembler.  They are not
-(at present) written to any object files. */
-  BFD_RELOC_CRIS_BDISP8,
-  BFD_RELOC_CRIS_UNSIGNED_5,
-  BFD_RELOC_CRIS_SIGNED_6,
-  BFD_RELOC_CRIS_UNSIGNED_6,
-  BFD_RELOC_CRIS_UNSIGNED_4,
-
-/* Relocs used in ELF shared libraries for CRIS. */
-  BFD_RELOC_CRIS_COPY,
-  BFD_RELOC_CRIS_GLOB_DAT,
-  BFD_RELOC_CRIS_JUMP_SLOT,
-  BFD_RELOC_CRIS_RELATIVE,
-
-/* 32-bit offset to symbol-entry within GOT. */
-  BFD_RELOC_CRIS_32_GOT,
-
-/* 16-bit offset to symbol-entry within GOT. */
-  BFD_RELOC_CRIS_16_GOT,
-
-/* 32-bit offset to symbol-entry within GOT, with PLT handling. */
-  BFD_RELOC_CRIS_32_GOTPLT,
-
-/* 16-bit offset to symbol-entry within GOT, with PLT handling. */
-  BFD_RELOC_CRIS_16_GOTPLT,
-
-/* 32-bit offset to symbol, relative to GOT. */
-  BFD_RELOC_CRIS_32_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to GOT. */
-  BFD_RELOC_CRIS_32_PLT_GOTREL,
-
-/* 32-bit offset to symbol with PLT entry, relative to this relocation. */
-  BFD_RELOC_CRIS_32_PLT_PCREL,
-
-/* Intel i860 Relocations. */
-  BFD_RELOC_860_COPY,
-  BFD_RELOC_860_GLOB_DAT,
-  BFD_RELOC_860_JUMP_SLOT,
-  BFD_RELOC_860_RELATIVE,
-  BFD_RELOC_860_PC26,
-  BFD_RELOC_860_PLT26,
-  BFD_RELOC_860_PC16,
-  BFD_RELOC_860_LOW0,
-  BFD_RELOC_860_SPLIT0,
-  BFD_RELOC_860_LOW1,
-  BFD_RELOC_860_SPLIT1,
-  BFD_RELOC_860_LOW2,
-  BFD_RELOC_860_SPLIT2,
-  BFD_RELOC_860_LOW3,
-  BFD_RELOC_860_LOGOT0,
-  BFD_RELOC_860_SPGOT0,
-  BFD_RELOC_860_LOGOT1,
-  BFD_RELOC_860_SPGOT1,
-  BFD_RELOC_860_LOGOTOFF0,
-  BFD_RELOC_860_SPGOTOFF0,
-  BFD_RELOC_860_LOGOTOFF1,
-  BFD_RELOC_860_SPGOTOFF1,
-  BFD_RELOC_860_LOGOTOFF2,
-  BFD_RELOC_860_LOGOTOFF3,
-  BFD_RELOC_860_LOPC,
-  BFD_RELOC_860_HIGHADJ,
-  BFD_RELOC_860_HAGOT,
-  BFD_RELOC_860_HAGOTOFF,
-  BFD_RELOC_860_HAPC,
-  BFD_RELOC_860_HIGH,
-  BFD_RELOC_860_HIGOT,
-  BFD_RELOC_860_HIGOTOFF,
-
-/* OpenRISC Relocations. */
-  BFD_RELOC_OPENRISC_ABS_26,
-  BFD_RELOC_OPENRISC_REL_26,
-
-/* H8 elf Relocations. */
-  BFD_RELOC_H8_DIR16A8,
-  BFD_RELOC_H8_DIR16R8,
-  BFD_RELOC_H8_DIR24A8,
-  BFD_RELOC_H8_DIR24R8,
-  BFD_RELOC_H8_DIR32A16,
-  BFD_RELOC_UNUSED };
-typedef enum bfd_reloc_code_real bfd_reloc_code_real_type;
-reloc_howto_type *
-bfd_reloc_type_lookup PARAMS ((bfd *abfd, bfd_reloc_code_real_type code));
-
-const char *
-bfd_get_reloc_code_name PARAMS ((bfd_reloc_code_real_type code));
-
-
-typedef struct symbol_cache_entry
-{
-       /* A pointer to the BFD which owns the symbol. This information
-          is necessary so that a back end can work out what additional
-          information (invisible to the application writer) is carried
-          with the symbol.
-
-          This field is *almost* redundant, since you can use section->owner
-          instead, except that some symbols point to the global sections
-          bfd_{abs,com,und}_section.  This could be fixed by making
-          these globals be per-bfd (or per-target-flavor).  FIXME. */
-
-  struct _bfd *the_bfd; /* Use bfd_asymbol_bfd(sym) to access this field. */
-
-       /* The text of the symbol. The name is left alone, and not copied; the
-          application may not alter it. */
-  const char *name;
-
-       /* The value of the symbol.  This really should be a union of a
-          numeric value with a pointer, since some flags indicate that
-          a pointer to another symbol is stored here.  */
-  symvalue value;
-
-       /* Attributes of a symbol: */
-
-#define BSF_NO_FLAGS    0x00
-
-       /* The symbol has local scope; <<static>> in <<C>>. The value
-          is the offset into the section of the data. */
-#define BSF_LOCAL      0x01
-
-       /* The symbol has global scope; initialized data in <<C>>. The
-          value is the offset into the section of the data. */
-#define BSF_GLOBAL     0x02
-
-       /* The symbol has global scope and is exported. The value is
-          the offset into the section of the data. */
-#define BSF_EXPORT     BSF_GLOBAL /* no real difference */
-
-       /* A normal C symbol would be one of:
-          <<BSF_LOCAL>>, <<BSF_FORT_COMM>>,  <<BSF_UNDEFINED>> or
-          <<BSF_GLOBAL>> */
-
-       /* The symbol is a debugging record. The value has an arbitary
-          meaning, unless BSF_DEBUGGING_RELOC is also set.  */
-#define BSF_DEBUGGING  0x08
-
-       /* The symbol denotes a function entry point.  Used in ELF,
-          perhaps others someday.  */
-#define BSF_FUNCTION    0x10
-
-       /* Used by the linker. */
-#define BSF_KEEP        0x20
-#define BSF_KEEP_G      0x40
-
-       /* A weak global symbol, overridable without warnings by
-          a regular global symbol of the same name.  */
-#define BSF_WEAK        0x80
-
-       /* This symbol was created to point to a section, e.g. ELF's
-          STT_SECTION symbols.  */
-#define BSF_SECTION_SYM 0x100
-
-       /* The symbol used to be a common symbol, but now it is
-          allocated. */
-#define BSF_OLD_COMMON  0x200
-
-       /* The default value for common data. */
-#define BFD_FORT_COMM_DEFAULT_VALUE 0
-
-       /* In some files the type of a symbol sometimes alters its
-          location in an output file - ie in coff a <<ISFCN>> symbol
-          which is also <<C_EXT>> symbol appears where it was
-          declared and not at the end of a section.  This bit is set
-          by the target BFD part to convey this information. */
-
-#define BSF_NOT_AT_END    0x400
-
-       /* Signal that the symbol is the label of constructor section. */
-#define BSF_CONSTRUCTOR   0x800
-
-       /* Signal that the symbol is a warning symbol.  The name is a
-          warning.  The name of the next symbol is the one to warn about;
-          if a reference is made to a symbol with the same name as the next
-          symbol, a warning is issued by the linker. */
-#define BSF_WARNING       0x1000
-
-       /* Signal that the symbol is indirect.  This symbol is an indirect
-          pointer to the symbol with the same name as the next symbol. */
-#define BSF_INDIRECT      0x2000
-
-       /* BSF_FILE marks symbols that contain a file name.  This is used
-          for ELF STT_FILE symbols.  */
-#define BSF_FILE          0x4000
-
-       /* Symbol is from dynamic linking information.  */
-#define BSF_DYNAMIC       0x8000
-
-       /* The symbol denotes a data object.  Used in ELF, and perhaps
-          others someday.  */
-#define BSF_OBJECT        0x10000
-
-       /* This symbol is a debugging symbol.  The value is the offset
-          into the section of the data.  BSF_DEBUGGING should be set
-          as well.  */
-#define BSF_DEBUGGING_RELOC 0x20000
-
-  flagword flags;
-
-       /* A pointer to the section to which this symbol is
-          relative.  This will always be non NULL, there are special
-          sections for undefined and absolute symbols.  */
-  struct sec *section;
-
-       /* Back end special data.  */
-  union
-    {
-      PTR p;
-      bfd_vma i;
-    } udata;
-
-} asymbol;
-#define bfd_get_symtab_upper_bound(abfd) \
-     BFD_SEND (abfd, _bfd_get_symtab_upper_bound, (abfd))
-boolean
-bfd_is_local_label PARAMS ((bfd *abfd, asymbol *sym));
-
-boolean
-bfd_is_local_label_name PARAMS ((bfd *abfd, const char *name));
-
-#define bfd_is_local_label_name(abfd, name) \
-     BFD_SEND (abfd, _bfd_is_local_label_name, (abfd, name))
-#define bfd_canonicalize_symtab(abfd, location) \
-     BFD_SEND (abfd, _bfd_canonicalize_symtab,\
-                  (abfd, location))
-boolean
-bfd_set_symtab PARAMS ((bfd *abfd, asymbol **location, unsigned int count));
-
-void
-bfd_print_symbol_vandf PARAMS ((bfd *abfd, PTR file, asymbol *symbol));
-
-#define bfd_make_empty_symbol(abfd) \
-     BFD_SEND (abfd, _bfd_make_empty_symbol, (abfd))
-#define bfd_make_debug_symbol(abfd,ptr,size) \
-        BFD_SEND (abfd, _bfd_make_debug_symbol, (abfd, ptr, size))
-int
-bfd_decode_symclass PARAMS ((asymbol *symbol));
-
-boolean
-bfd_is_undefined_symclass PARAMS ((int symclass));
-
-void
-bfd_symbol_info PARAMS ((asymbol *symbol, symbol_info *ret));
-
-boolean
-bfd_copy_private_symbol_data PARAMS ((bfd *ibfd, asymbol *isym, bfd *obfd, asymbol *osym));
-
-#define bfd_copy_private_symbol_data(ibfd, isymbol, obfd, osymbol) \
-     BFD_SEND (obfd, _bfd_copy_private_symbol_data, \
-               (ibfd, isymbol, obfd, osymbol))
-struct _bfd
-{
-    /* The filename the application opened the BFD with.  */
-    const char *filename;
-
-    /* A pointer to the target jump table.             */
-    const struct bfd_target *xvec;
-
-    /* To avoid dragging too many header files into every file that
-       includes `<<bfd.h>>', IOSTREAM has been declared as a "char
-       *", and MTIME as a "long".  Their correct types, to which they
-       are cast when used, are "FILE *" and "time_t".    The iostream
-       is the result of an fopen on the filename.  However, if the
-       BFD_IN_MEMORY flag is set, then iostream is actually a pointer
-       to a bfd_in_memory struct.  */
-    PTR iostream;
-
-    /* Is the file descriptor being cached?  That is, can it be closed as
-       needed, and re-opened when accessed later?  */
-
-    boolean cacheable;
-
-    /* Marks whether there was a default target specified when the
-       BFD was opened. This is used to select which matching algorithm
-       to use to choose the back end. */
-
-    boolean target_defaulted;
-
-    /* The caching routines use these to maintain a
-       least-recently-used list of BFDs */
-
-    struct _bfd *lru_prev, *lru_next;
-
-    /* When a file is closed by the caching routines, BFD retains
-       state information on the file here: */
-
-    ufile_ptr where;
-
-    /* and here: (``once'' means at least once) */
-
-    boolean opened_once;
-
-    /* Set if we have a locally maintained mtime value, rather than
-       getting it from the file each time: */
-
-    boolean mtime_set;
-
-    /* File modified time, if mtime_set is true: */
-
-    long mtime;
-
-    /* Reserved for an unimplemented file locking extension.*/
-
-    int ifd;
-
-    /* The format which belongs to the BFD. (object, core, etc.) */
-
-    bfd_format format;
-
-    /* The direction the BFD was opened with*/
-
-    enum bfd_direction {no_direction = 0,
-                        read_direction = 1,
-                        write_direction = 2,
-                        both_direction = 3} direction;
-
-    /* Format_specific flags*/
-
-    flagword flags;
-
-    /* Currently my_archive is tested before adding origin to
-       anything. I believe that this can become always an add of
-       origin, with origin set to 0 for non archive files.   */
-
-    ufile_ptr origin;
-
-    /* Remember when output has begun, to stop strange things
-       from happening. */
-    boolean output_has_begun;
-
-    /* Pointer to linked list of sections*/
-    struct sec  *sections;
-
-    /* The number of sections */
-    unsigned int section_count;
-
-    /* Stuff only useful for object files:
-       The start address. */
-    bfd_vma start_address;
-
-    /* Used for input and output*/
-    unsigned int symcount;
-
-    /* Symbol table for output BFD (with symcount entries) */
-    struct symbol_cache_entry  **outsymbols;
-
-    /* Pointer to structure which contains architecture information*/
-    const struct bfd_arch_info *arch_info;
-
-    /* Stuff only useful for archives:*/
-    PTR arelt_data;
-    struct _bfd *my_archive;     /* The containing archive BFD.  */
-    struct _bfd *next;           /* The next BFD in the archive.  */
-    struct _bfd *archive_head;   /* The first BFD in the archive.  */
-    boolean has_armap;
-
-    /* A chain of BFD structures involved in a link.  */
-    struct _bfd *link_next;
-
-    /* A field used by _bfd_generic_link_add_archive_symbols.  This will
-       be used only for archive elements.  */
-    int archive_pass;
-
-    /* Used by the back end to hold private data. */
-
-    union
-      {
-      struct aout_data_struct *aout_data;
-      struct artdata *aout_ar_data;
-      struct _oasys_data *oasys_obj_data;
-      struct _oasys_ar_data *oasys_ar_data;
-      struct coff_tdata *coff_obj_data;
-      struct pe_tdata *pe_obj_data;
-      struct xcoff_tdata *xcoff_obj_data;
-      struct ecoff_tdata *ecoff_obj_data;
-      struct ieee_data_struct *ieee_data;
-      struct ieee_ar_data_struct *ieee_ar_data;
-      struct srec_data_struct *srec_data;
-      struct ihex_data_struct *ihex_data;
-      struct tekhex_data_struct *tekhex_data;
-      struct elf_obj_tdata *elf_obj_data;
-      struct nlm_obj_tdata *nlm_obj_data;
-      struct bout_data_struct *bout_data;
-      struct sun_core_struct *sun_core_data;
-      struct sco5_core_struct *sco5_core_data;
-      struct trad_core_struct *trad_core_data;
-      struct som_data_struct *som_data;
-      struct hpux_core_struct *hpux_core_data;
-      struct hppabsd_core_struct *hppabsd_core_data;
-      struct sgi_core_struct *sgi_core_data;
-      struct lynx_core_struct *lynx_core_data;
-      struct osf_core_struct *osf_core_data;
-      struct cisco_core_struct *cisco_core_data;
-      struct versados_data_struct *versados_data;
-      struct netbsd_core_struct *netbsd_core_data;
-      PTR any;
-      } tdata;
-
-    /* Used by the application to hold private data*/
-    PTR usrdata;
-
-  /* Where all the allocated stuff under this BFD goes.  This is a
-     struct objalloc *, but we use PTR to avoid requiring the inclusion of
-     objalloc.h.  */
-    PTR memory;
-};
-
-typedef enum bfd_error
-{
-  bfd_error_no_error = 0,
-  bfd_error_system_call,
-  bfd_error_invalid_target,
-  bfd_error_wrong_format,
-  bfd_error_wrong_object_format,
-  bfd_error_invalid_operation,
-  bfd_error_no_memory,
-  bfd_error_no_symbols,
-  bfd_error_no_armap,
-  bfd_error_no_more_archived_files,
-  bfd_error_malformed_archive,
-  bfd_error_file_not_recognized,
-  bfd_error_file_ambiguously_recognized,
-  bfd_error_no_contents,
-  bfd_error_nonrepresentable_section,
-  bfd_error_no_debug_section,
-  bfd_error_bad_value,
-  bfd_error_file_truncated,
-  bfd_error_file_too_big,
-  bfd_error_invalid_error_code
-} bfd_error_type;
-
-bfd_error_type
-bfd_get_error PARAMS ((void));
-
-void
-bfd_set_error PARAMS ((bfd_error_type error_tag));
-
-const char *
-bfd_errmsg PARAMS ((bfd_error_type error_tag));
-
-void
-bfd_perror PARAMS ((const char *message));
-
-typedef void (*bfd_error_handler_type) PARAMS ((const char *, ...));
-
-bfd_error_handler_type
-bfd_set_error_handler PARAMS ((bfd_error_handler_type));
-
-void
-bfd_set_error_program_name PARAMS ((const char *));
-
-bfd_error_handler_type
-bfd_get_error_handler PARAMS ((void));
-
-const char *
-bfd_archive_filename PARAMS ((bfd *));
-
-long
-bfd_get_reloc_upper_bound PARAMS ((bfd *abfd, asection *sect));
-
-long
-bfd_canonicalize_reloc PARAMS ((bfd *abfd,
-    asection *sec,
-    arelent **loc,
-    asymbol **syms));
-
-void
-bfd_set_reloc PARAMS ((bfd *abfd, asection *sec, arelent **rel, unsigned int count)
-    
-    );
-
-boolean
-bfd_set_file_flags PARAMS ((bfd *abfd, flagword flags));
-
-int
-bfd_get_arch_size PARAMS ((bfd *abfd));
-
-int
-bfd_get_sign_extend_vma PARAMS ((bfd *abfd));
-
-boolean
-bfd_set_start_address PARAMS ((bfd *abfd, bfd_vma vma));
-
-long
-bfd_get_mtime PARAMS ((bfd *abfd));
-
-long
-bfd_get_size PARAMS ((bfd *abfd));
-
-unsigned int
-bfd_get_gp_size PARAMS ((bfd *abfd));
-
-void
-bfd_set_gp_size PARAMS ((bfd *abfd, unsigned int i));
-
-bfd_vma
-bfd_scan_vma PARAMS ((const char *string, const char **end, int base));
-
-boolean
-bfd_copy_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
-
-#define bfd_copy_private_bfd_data(ibfd, obfd) \
-     BFD_SEND (obfd, _bfd_copy_private_bfd_data, \
-               (ibfd, obfd))
-boolean
-bfd_merge_private_bfd_data PARAMS ((bfd *ibfd, bfd *obfd));
-
-#define bfd_merge_private_bfd_data(ibfd, obfd) \
-     BFD_SEND (obfd, _bfd_merge_private_bfd_data, \
-               (ibfd, obfd))
-boolean
-bfd_set_private_flags PARAMS ((bfd *abfd, flagword flags));
-
-#define bfd_set_private_flags(abfd, flags) \
-     BFD_SEND (abfd, _bfd_set_private_flags, \
-               (abfd, flags))
-#define bfd_sizeof_headers(abfd, reloc) \
-     BFD_SEND (abfd, _bfd_sizeof_headers, (abfd, reloc))
-
-#define bfd_find_nearest_line(abfd, sec, syms, off, file, func, line) \
-     BFD_SEND (abfd, _bfd_find_nearest_line,  (abfd, sec, syms, off, file, func, line))
-
-       /* Do these three do anything useful at all, for any back end?  */
-#define bfd_debug_info_start(abfd) \
-        BFD_SEND (abfd, _bfd_debug_info_start, (abfd))
-
-#define bfd_debug_info_end(abfd) \
-        BFD_SEND (abfd, _bfd_debug_info_end, (abfd))
-
-#define bfd_debug_info_accumulate(abfd, section) \
-        BFD_SEND (abfd, _bfd_debug_info_accumulate, (abfd, section))
-
-
-#define bfd_stat_arch_elt(abfd, stat) \
-        BFD_SEND (abfd, _bfd_stat_arch_elt,(abfd, stat))
-
-#define bfd_update_armap_timestamp(abfd) \
-        BFD_SEND (abfd, _bfd_update_armap_timestamp, (abfd))
-
-#define bfd_set_arch_mach(abfd, arch, mach)\
-        BFD_SEND ( abfd, _bfd_set_arch_mach, (abfd, arch, mach))
-
-#define bfd_relax_section(abfd, section, link_info, again) \
-       BFD_SEND (abfd, _bfd_relax_section, (abfd, section, link_info, again))
-
-#define bfd_gc_sections(abfd, link_info) \
-       BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info))
-
-#define bfd_merge_sections(abfd, link_info) \
-       BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info))
-
-#define bfd_link_hash_table_create(abfd) \
-       BFD_SEND (abfd, _bfd_link_hash_table_create, (abfd))
-
-#define bfd_link_add_symbols(abfd, info) \
-       BFD_SEND (abfd, _bfd_link_add_symbols, (abfd, info))
-
-#define bfd_final_link(abfd, info) \
-       BFD_SEND (abfd, _bfd_final_link, (abfd, info))
-
-#define bfd_free_cached_info(abfd) \
-       BFD_SEND (abfd, _bfd_free_cached_info, (abfd))
-
-#define bfd_get_dynamic_symtab_upper_bound(abfd) \
-       BFD_SEND (abfd, _bfd_get_dynamic_symtab_upper_bound, (abfd))
-
-#define bfd_print_private_bfd_data(abfd, file)\
-       BFD_SEND (abfd, _bfd_print_private_bfd_data, (abfd, file))
-
-#define bfd_canonicalize_dynamic_symtab(abfd, asymbols) \
-       BFD_SEND (abfd, _bfd_canonicalize_dynamic_symtab, (abfd, asymbols))
-
-#define bfd_get_dynamic_reloc_upper_bound(abfd) \
-       BFD_SEND (abfd, _bfd_get_dynamic_reloc_upper_bound, (abfd))
-
-#define bfd_canonicalize_dynamic_reloc(abfd, arels, asyms) \
-       BFD_SEND (abfd, _bfd_canonicalize_dynamic_reloc, (abfd, arels, asyms))
-
-extern bfd_byte *bfd_get_relocated_section_contents
-       PARAMS ((bfd *, struct bfd_link_info *,
-                 struct bfd_link_order *, bfd_byte *,
-                 boolean, asymbol **));
-
-boolean
-bfd_alt_mach_code PARAMS ((bfd *abfd, int index));
-
-symindex
-bfd_get_next_mapent PARAMS ((bfd *abfd, symindex previous, carsym **sym));
-
-boolean
-bfd_set_archive_head PARAMS ((bfd *output, bfd *new_head));
-
-bfd *
-bfd_openr_next_archived_file PARAMS ((bfd *archive, bfd *previous));
-
-const char *
-bfd_core_file_failing_command PARAMS ((bfd *abfd));
-
-int
-bfd_core_file_failing_signal PARAMS ((bfd *abfd));
-
-boolean
-core_file_matches_executable_p PARAMS ((bfd *core_bfd, bfd *exec_bfd));
-
-#define BFD_SEND(bfd, message, arglist) \
-               ((*((bfd)->xvec->message)) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND
-#define BFD_SEND(bfd, message, arglist) \
-  (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
-    ((*((bfd)->xvec->message)) arglist) : \
-    (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-#define BFD_SEND_FMT(bfd, message, arglist) \
-            (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist)
-
-#ifdef DEBUG_BFD_SEND
-#undef BFD_SEND_FMT
-#define BFD_SEND_FMT(bfd, message, arglist) \
-  (((bfd) && (bfd)->xvec && (bfd)->xvec->message) ? \
-   (((bfd)->xvec->message[(int) ((bfd)->format)]) arglist) : \
-   (bfd_assert (__FILE__,__LINE__), NULL))
-#endif
-enum bfd_flavour {
-  bfd_target_unknown_flavour,
-  bfd_target_aout_flavour,
-  bfd_target_coff_flavour,
-  bfd_target_ecoff_flavour,
-  bfd_target_xcoff_flavour,
-  bfd_target_elf_flavour,
-  bfd_target_ieee_flavour,
-  bfd_target_nlm_flavour,
-  bfd_target_oasys_flavour,
-  bfd_target_tekhex_flavour,
-  bfd_target_srec_flavour,
-  bfd_target_ihex_flavour,
-  bfd_target_som_flavour,
-  bfd_target_os9k_flavour,
-  bfd_target_versados_flavour,
-  bfd_target_msdos_flavour,
-  bfd_target_ovax_flavour,
-  bfd_target_evax_flavour
-};
-
-enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
-
-/* Forward declaration.  */
-typedef struct bfd_link_info _bfd_link_info;
-
-typedef struct bfd_target
-{
-  char *name;
-  enum bfd_flavour flavour;
-  enum bfd_endian byteorder;
-  enum bfd_endian header_byteorder;
-  flagword object_flags;
-  flagword section_flags;
-  char symbol_leading_char;
-  char ar_pad_char;
-  unsigned short ar_max_namelen;
-  bfd_vma        (*bfd_getx64) PARAMS ((const bfd_byte *));
-  bfd_signed_vma (*bfd_getx_signed_64) PARAMS ((const bfd_byte *));
-  void           (*bfd_putx64) PARAMS ((bfd_vma, bfd_byte *));
-  bfd_vma        (*bfd_getx32) PARAMS ((const bfd_byte *));
-  bfd_signed_vma (*bfd_getx_signed_32) PARAMS ((const bfd_byte *));
-  void           (*bfd_putx32) PARAMS ((bfd_vma, bfd_byte *));
-  bfd_vma        (*bfd_getx16) PARAMS ((const bfd_byte *));
-  bfd_signed_vma (*bfd_getx_signed_16) PARAMS ((const bfd_byte *));
-  void           (*bfd_putx16) PARAMS ((bfd_vma, bfd_byte *));
-  bfd_vma        (*bfd_h_getx64) PARAMS ((const bfd_byte *));
-  bfd_signed_vma (*bfd_h_getx_signed_64) PARAMS ((const bfd_byte *));
-  void           (*bfd_h_putx64) PARAMS ((bfd_vma, bfd_byte *));
-  bfd_vma        (*bfd_h_getx32) PARAMS ((const bfd_byte *));
-  bfd_signed_vma (*bfd_h_getx_signed_32) PARAMS ((const bfd_byte *));
-  void           (*bfd_h_putx32) PARAMS ((bfd_vma, bfd_byte *));
-  bfd_vma        (*bfd_h_getx16) PARAMS ((const bfd_byte *));
-  bfd_signed_vma (*bfd_h_getx_signed_16) PARAMS ((const bfd_byte *));
-  void           (*bfd_h_putx16) PARAMS ((bfd_vma, bfd_byte *));
-  const struct bfd_target *(*_bfd_check_format[bfd_type_end]) PARAMS ((bfd *));
-  boolean  (*_bfd_set_format[bfd_type_end]) PARAMS ((bfd *));
-  boolean  (*_bfd_write_contents[bfd_type_end]) PARAMS ((bfd *));
-
-  /* Generic entry points.  */
-#define BFD_JUMP_TABLE_GENERIC(NAME) \
-CONCAT2 (NAME,_close_and_cleanup), \
-CONCAT2 (NAME,_bfd_free_cached_info), \
-CONCAT2 (NAME,_new_section_hook), \
-CONCAT2 (NAME,_get_section_contents), \
-CONCAT2 (NAME,_get_section_contents_in_window)
-
-  /* Called when the BFD is being closed to do any necessary cleanup.  */
-  boolean  (*_close_and_cleanup) PARAMS ((bfd *));
-  /* Ask the BFD to free all cached information.  */
-  boolean  (*_bfd_free_cached_info) PARAMS ((bfd *));
-  /* Called when a new section is created.  */
-  boolean  (*_new_section_hook) PARAMS ((bfd *, sec_ptr));
-  /* Read the contents of a section.  */
-  boolean  (*_bfd_get_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
-                                                 file_ptr, bfd_size_type));
-  boolean  (*_bfd_get_section_contents_in_window)
-    PARAMS ((bfd *, sec_ptr, bfd_window *, file_ptr, bfd_size_type));
-
-  /* Entry points to copy private data.  */
-#define BFD_JUMP_TABLE_COPY(NAME) \
-CONCAT2 (NAME,_bfd_copy_private_bfd_data), \
-CONCAT2 (NAME,_bfd_merge_private_bfd_data), \
-CONCAT2 (NAME,_bfd_copy_private_section_data), \
-CONCAT2 (NAME,_bfd_copy_private_symbol_data), \
-CONCAT2 (NAME,_bfd_set_private_flags), \
-CONCAT2 (NAME,_bfd_print_private_bfd_data) \
-  /* Called to copy BFD general private data from one object file
-     to another.  */
-  boolean  (*_bfd_copy_private_bfd_data) PARAMS ((bfd *, bfd *));
-  /* Called to merge BFD general private data from one object file
-     to a common output file when linking.  */
-  boolean  (*_bfd_merge_private_bfd_data) PARAMS ((bfd *, bfd *));
-  /* Called to copy BFD private section data from one object file
-     to another.  */
-  boolean  (*_bfd_copy_private_section_data) PARAMS ((bfd *, sec_ptr,
-                                                      bfd *, sec_ptr));
-  /* Called to copy BFD private symbol data from one symbol
-     to another.  */
-  boolean  (*_bfd_copy_private_symbol_data) PARAMS ((bfd *, asymbol *,
-                                                     bfd *, asymbol *));
-  /* Called to set private backend flags */
-  boolean  (*_bfd_set_private_flags) PARAMS ((bfd *, flagword));
-
-  /* Called to print private BFD data */
-  boolean  (*_bfd_print_private_bfd_data) PARAMS ((bfd *, PTR));
-
-  /* Core file entry points.  */
-#define BFD_JUMP_TABLE_CORE(NAME) \
-CONCAT2 (NAME,_core_file_failing_command), \
-CONCAT2 (NAME,_core_file_failing_signal), \
-CONCAT2 (NAME,_core_file_matches_executable_p)
-  char *   (*_core_file_failing_command) PARAMS ((bfd *));
-  int      (*_core_file_failing_signal) PARAMS ((bfd *));
-  boolean  (*_core_file_matches_executable_p) PARAMS ((bfd *, bfd *));
-
-  /* Archive entry points.  */
-#define BFD_JUMP_TABLE_ARCHIVE(NAME) \
-CONCAT2 (NAME,_slurp_armap), \
-CONCAT2 (NAME,_slurp_extended_name_table), \
-CONCAT2 (NAME,_construct_extended_name_table), \
-CONCAT2 (NAME,_truncate_arname), \
-CONCAT2 (NAME,_write_armap), \
-CONCAT2 (NAME,_read_ar_hdr), \
-CONCAT2 (NAME,_openr_next_archived_file), \
-CONCAT2 (NAME,_get_elt_at_index), \
-CONCAT2 (NAME,_generic_stat_arch_elt), \
-CONCAT2 (NAME,_update_armap_timestamp)
-  boolean  (*_bfd_slurp_armap) PARAMS ((bfd *));
-  boolean  (*_bfd_slurp_extended_name_table) PARAMS ((bfd *));
-  boolean  (*_bfd_construct_extended_name_table)
-    PARAMS ((bfd *, char **, bfd_size_type *, const char **));
-  void     (*_bfd_truncate_arname) PARAMS ((bfd *, const char *, char *));
-  boolean  (*write_armap)
-    PARAMS ((bfd *, unsigned int, struct orl *, unsigned int, int));
-  PTR      (*_bfd_read_ar_hdr_fn) PARAMS ((bfd *));
-  bfd *    (*openr_next_archived_file) PARAMS ((bfd *, bfd *));
-#define bfd_get_elt_at_index(b,i) BFD_SEND(b, _bfd_get_elt_at_index, (b,i))
-  bfd *    (*_bfd_get_elt_at_index) PARAMS ((bfd *, symindex));
-  int      (*_bfd_stat_arch_elt) PARAMS ((bfd *, struct stat *));
-  boolean  (*_bfd_update_armap_timestamp) PARAMS ((bfd *));
-
-  /* Entry points used for symbols.  */
-#define BFD_JUMP_TABLE_SYMBOLS(NAME) \
-CONCAT2 (NAME,_get_symtab_upper_bound), \
-CONCAT2 (NAME,_get_symtab), \
-CONCAT2 (NAME,_make_empty_symbol), \
-CONCAT2 (NAME,_print_symbol), \
-CONCAT2 (NAME,_get_symbol_info), \
-CONCAT2 (NAME,_bfd_is_local_label_name), \
-CONCAT2 (NAME,_get_lineno), \
-CONCAT2 (NAME,_find_nearest_line), \
-CONCAT2 (NAME,_bfd_make_debug_symbol), \
-CONCAT2 (NAME,_read_minisymbols), \
-CONCAT2 (NAME,_minisymbol_to_symbol)
-  long     (*_bfd_get_symtab_upper_bound) PARAMS ((bfd *));
-  long     (*_bfd_canonicalize_symtab) PARAMS ((bfd *,
-                                                struct symbol_cache_entry **));
-  struct symbol_cache_entry *
-           (*_bfd_make_empty_symbol) PARAMS ((bfd *));
-  void     (*_bfd_print_symbol) PARAMS ((bfd *, PTR,
-                                         struct symbol_cache_entry *,
-                                         bfd_print_symbol_type));
-#define bfd_print_symbol(b,p,s,e) BFD_SEND(b, _bfd_print_symbol, (b,p,s,e))
-  void     (*_bfd_get_symbol_info) PARAMS ((bfd *,
-                                            struct symbol_cache_entry *,
-                                            symbol_info *));
-#define bfd_get_symbol_info(b,p,e) BFD_SEND(b, _bfd_get_symbol_info, (b,p,e))
-  boolean  (*_bfd_is_local_label_name) PARAMS ((bfd *, const char *));
-
-  alent *  (*_get_lineno) PARAMS ((bfd *, struct symbol_cache_entry *));
-  boolean  (*_bfd_find_nearest_line)
-    PARAMS ((bfd *, struct sec *, struct symbol_cache_entry **, bfd_vma,
-             const char **, const char **, unsigned int *));
- /* Back-door to allow format-aware applications to create debug symbols
-    while using BFD for everything else.  Currently used by the assembler
-    when creating COFF files.  */
-  asymbol *(*_bfd_make_debug_symbol) PARAMS ((bfd *, void *,
-                                              unsigned long size));
-#define bfd_read_minisymbols(b, d, m, s) \
-  BFD_SEND (b, _read_minisymbols, (b, d, m, s))
-  long     (*_read_minisymbols) PARAMS ((bfd *, boolean, PTR *,
-                                         unsigned int *));
-#define bfd_minisymbol_to_symbol(b, d, m, f) \
-  BFD_SEND (b, _minisymbol_to_symbol, (b, d, m, f))
-  asymbol *(*_minisymbol_to_symbol) PARAMS ((bfd *, boolean, const PTR,
-                                             asymbol *));
-
-  /* Routines for relocs.  */
-#define BFD_JUMP_TABLE_RELOCS(NAME) \
-CONCAT2 (NAME,_get_reloc_upper_bound), \
-CONCAT2 (NAME,_canonicalize_reloc), \
-CONCAT2 (NAME,_bfd_reloc_type_lookup)
-  long     (*_get_reloc_upper_bound) PARAMS ((bfd *, sec_ptr));
-  long     (*_bfd_canonicalize_reloc) PARAMS ((bfd *, sec_ptr, arelent **,
-                                               struct symbol_cache_entry **));
-  /* See documentation on reloc types.  */
-  reloc_howto_type *
-           (*reloc_type_lookup) PARAMS ((bfd *, bfd_reloc_code_real_type));
-
-  /* Routines used when writing an object file.  */
-#define BFD_JUMP_TABLE_WRITE(NAME) \
-CONCAT2 (NAME,_set_arch_mach), \
-CONCAT2 (NAME,_set_section_contents)
-  boolean  (*_bfd_set_arch_mach) PARAMS ((bfd *, enum bfd_architecture,
-                                          unsigned long));
-  boolean  (*_bfd_set_section_contents) PARAMS ((bfd *, sec_ptr, PTR,
-                                                 file_ptr, bfd_size_type));
-
-  /* Routines used by the linker.  */
-#define BFD_JUMP_TABLE_LINK(NAME) \
-CONCAT2 (NAME,_sizeof_headers), \
-CONCAT2 (NAME,_bfd_get_relocated_section_contents), \
-CONCAT2 (NAME,_bfd_relax_section), \
-CONCAT2 (NAME,_bfd_link_hash_table_create), \
-CONCAT2 (NAME,_bfd_link_add_symbols), \
-CONCAT2 (NAME,_bfd_final_link), \
-CONCAT2 (NAME,_bfd_link_split_section), \
-CONCAT2 (NAME,_bfd_gc_sections), \
-CONCAT2 (NAME,_bfd_merge_sections)
-  int      (*_bfd_sizeof_headers) PARAMS ((bfd *, boolean));
-  bfd_byte *(*_bfd_get_relocated_section_contents)
-    PARAMS ((bfd *, struct bfd_link_info *, struct bfd_link_order *,
-             bfd_byte *, boolean, struct symbol_cache_entry **));
-
-  boolean  (*_bfd_relax_section)
-    PARAMS ((bfd *, struct sec *, struct bfd_link_info *, boolean *));
-
-  /* Create a hash table for the linker.  Different backends store
-     different information in this table.  */
-  struct bfd_link_hash_table *(*_bfd_link_hash_table_create) PARAMS ((bfd *));
-
-  /* Add symbols from this object file into the hash table.  */
-  boolean  (*_bfd_link_add_symbols) PARAMS ((bfd *, struct bfd_link_info *));
-
-  /* Do a link based on the link_order structures attached to each
-     section of the BFD.  */
-  boolean  (*_bfd_final_link) PARAMS ((bfd *, struct bfd_link_info *));
-
-  /* Should this section be split up into smaller pieces during linking.  */
-  boolean  (*_bfd_link_split_section) PARAMS ((bfd *, struct sec *));
-
-  /* Remove sections that are not referenced from the output.  */
-  boolean  (*_bfd_gc_sections) PARAMS ((bfd *, struct bfd_link_info *));
-
-  /* Attempt to merge SEC_MERGE sections.  */
-  boolean  (*_bfd_merge_sections) PARAMS ((bfd *, struct bfd_link_info *));
-
-  /* Routines to handle dynamic symbols and relocs.  */
-#define BFD_JUMP_TABLE_DYNAMIC(NAME) \
-CONCAT2 (NAME,_get_dynamic_symtab_upper_bound), \
-CONCAT2 (NAME,_canonicalize_dynamic_symtab), \
-CONCAT2 (NAME,_get_dynamic_reloc_upper_bound), \
-CONCAT2 (NAME,_canonicalize_dynamic_reloc)
-  /* Get the amount of memory required to hold the dynamic symbols. */
-  long     (*_bfd_get_dynamic_symtab_upper_bound) PARAMS ((bfd *));
-  /* Read in the dynamic symbols.  */
-  long     (*_bfd_canonicalize_dynamic_symtab)
-    PARAMS ((bfd *, struct symbol_cache_entry **));
-  /* Get the amount of memory required to hold the dynamic relocs.  */
-  long     (*_bfd_get_dynamic_reloc_upper_bound) PARAMS ((bfd *));
-  /* Read in the dynamic relocs.  */
-  long     (*_bfd_canonicalize_dynamic_reloc)
-    PARAMS ((bfd *, arelent **, struct symbol_cache_entry **));
-
- /* Opposite endian version of this target.  */
- const struct bfd_target * alternative_target;
-
- PTR backend_data;
-
-} bfd_target;
-boolean
-bfd_set_default_target PARAMS ((const char *name));
-
-const bfd_target *
-bfd_find_target PARAMS ((const char *target_name, bfd *abfd));
-
-const char **
-bfd_target_list PARAMS ((void));
-
-const bfd_target *
-bfd_search_for_target PARAMS ((int (* search_func) (const bfd_target *, void *), void *));
-
-boolean
-bfd_check_format PARAMS ((bfd *abfd, bfd_format format));
-
-boolean
-bfd_check_format_matches PARAMS ((bfd *abfd, bfd_format format, char ***matching));
-
-boolean
-bfd_set_format PARAMS ((bfd *abfd, bfd_format format));
-
-const char *
-bfd_format_string PARAMS ((bfd_format format));
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/arch/ppc64/kdb/kdba_bp.c b/arch/ppc64/kdb/kdba_bp.c
deleted file mode 100644 (file)
index 62bd3f7..0000000
+++ /dev/null
@@ -1,789 +0,0 @@
-/*
- * Kernel Debugger Architecture Dependent Breakpoint Handling
- *
- * Copyright (C) 1999 Silicon Graphics, Inc.
- * Copyright (C) Scott Lurndal (slurn@engr.sgi.com)
- * Copyright (C) Scott Foehner (sfoehner@engr.sgi.com)
- * Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
- *
- * See the file LIA-COPYRIGHT for additional information.
- *
- * Written March 1999 by Scott Lurndal at Silicon Graphics, Inc.
- *
- * Modifications from:
- *      Richard Bass                    1999/07/20
- *              Many bug fixes and enhancements.
- *      Scott Foehner
- *              Port to ia64
- *     Scott Lurndal                   1999/12/12
- *             v1.0 restructuring.
- *     Keith Owens                     2000/05/23
- *             KDB v1.2
- */
-
-#include <linux/string.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/smp.h>
-#include <linux/ptrace.h>
-#include <linux/kdb.h>
-#include <linux/kdbprivate.h>
-#include "privinst.h"
-
-static char *kdba_rwtypes[] = { "Instruction(Register)", "Data Write",
-                       "I/O", "Data Access"};
-
-extern void set_all_DABR(unsigned long val);
-
-/*
- * Table describing processor architecture hardware
- * breakpoint registers.
- */
-
-kdbhard_bp_t   kdb_hardbreaks[KDB_MAXHARDBPT];
-
-/*
- * kdba_db_trap
- *
- *     Perform breakpoint processing upon entry to the
- *     processor debugger fault.   Determine and print
- *     the active breakpoint.
- *
- * Parameters:
- *     ef      Exception frame containing machine register state
- *     error   Error number passed to kdb.
- * Outputs:
- *     None.
- * Returns:
- *     KDB_DB_BPT      Standard instruction or data breakpoint encountered
- *     KDB_DB_SS       Single Step fault ('ss' command or end of 'ssb' command)
- *     KDB_DB_SSB      Single Step fault, caller should continue ('ssb' command)
- *     KDB_DB_SSBPT    Single step over breakpoint
- *     KDB_DB_NOBPT    No existing kdb breakpoint matches this debug exception
- * Locking:
- *     None.
- * Remarks:
- *     Yup, there be goto's here.
- *
- *     If multiple processors receive debug exceptions simultaneously,
- *     one may be waiting at the kdb fence in kdb() while the user
- *     issues a 'bc' command to clear the breakpoint the processor
- *     which is waiting has already encountered.  If this is the case,
- *     the debug registers will no longer match any entry in the
- *     breakpoint table, and we'll return the value KDB_DB_NOBPT.
- *     This can cause a panic in die_if_kernel().  It is safer to
- *     disable the breakpoint (bd), go until all processors are past
- *     the breakpoint then clear the breakpoint (bc).  This code
- *     recognises a breakpoint even when disabled but not when it has
- *     been cleared.
- *
- *     WARNING: This routine clears the debug state.  It should be called
- *              once per debug and the result cached.
- */
-
-kdb_dbtrap_t
-kdba_db_trap(kdb_eframe_t ef, int error_unused)
-{
-       kdb_machreg_t  msr,trap;
-       int rw, reg;
-       int i;
-       kdb_dbtrap_t rv = KDB_DB_BPT;
-       kdb_bp_t *bp;
-       unsigned long primary;
-       unsigned long extended;
-
-       msr = get_msr();
-       trap = ef->trap;
-       if (KDB_DEBUG(BP))
-               kdb_printf("kdb: msr 0x%lx trap 0x%lx\n", msr,trap);
-       if (msr & MSR_SE || ((trap & 0x700) || (trap & 0xd00))) 
-       {
-               if (KDB_STATE(SSBPT)) {
-                       if (KDB_DEBUG(BP))
-                               kdb_printf("ssbpt\n");
-                       KDB_STATE_CLEAR(SSBPT);
-                       for(i=0,bp=kdb_breakpoints;
-                           i < KDB_MAXBPT;
-                           i++, bp++) {
-                               if (KDB_DEBUG(BP))
-                                       kdb_printf("bp 0x%p enabled %d delayed %d global %d cpu %d\n",
-                                                  bp, bp->bp_enabled, bp->bp_delayed, bp->bp_global, bp->bp_cpu);
-                               if (!bp->bp_enabled)
-                                       continue;
-                               if (!bp->bp_global && bp->bp_cpu != smp_processor_id())
-                                       continue;
-                               if (KDB_DEBUG(BP))
-                                       kdb_printf("bp for this cpu\n");
-                               if (bp->bp_delayed) {
-                                       bp->bp_delayed = 0;
-                                       if (KDB_DEBUG(BP))
-                                               kdb_printf("kdba_installbp\n");
-                                       kdba_installbp(ef, bp);
-                                       if (!KDB_STATE(DOING_SS)) {
-                                               set_msr(get_msr() & ~MSR_SE);
-                                               return(KDB_DB_SSBPT);
-                                       }
-                                       break;
-                               }
-                       }
-                       if (i == KDB_MAXBPT) {
-                               kdb_printf("kdb: Unable to find delayed breakpoint\n");
-                       }
-                       if (!KDB_STATE(DOING_SS)) {
-                               set_msr(get_msr() & ~MSR_SE);
-                               return(KDB_DB_NOBPT);
-                       }
-                       /* FALLTHROUGH */
-               }
-
-               /*
-                * KDB_STATE_DOING_SS is set when the kernel debugger is using
-                * the processor trap flag to single-step a processor.  If a
-                * single step trap occurs and this flag is clear, the SS trap
-                * will be ignored by KDB and the kernel will be allowed to deal
-                * with it as necessary (e.g. for ptrace).
-                */
-               if (!KDB_STATE(DOING_SS))
-                       goto unknown;
-
-               /* single step */
-               rv = KDB_DB_SS;         /* Indicate single step */
-               if (KDB_STATE(DOING_SSB)) {
-                   unsigned long instruction;
-
-                       kdb_id1(ef->nip);
-                       kdb_getarea(instruction,ef->nip);
-                       primary=instruction & 0xfc000000;
-                       extended=instruction & 0x000007fe;
-                       if (kdb_getarea(instruction, ef->nip) ||   /* read failure */
-/* branch conditional */
-                           (primary==16 )||
-/* branch */
-                           (primary==18 )||    
-/* branch conditional to LR, or branch conditional to CR */
-                           (primary==19 && (extended==16 || extended == 528) 
-                            )) {
-                               /*
-                                * End the ssb command here.
-                                */
-                           KDB_STATE_CLEAR(DOING_SSB);
-                           KDB_STATE_CLEAR(DOING_SS);
-                           }
-                       rv = KDB_DB_SSB; /* Indicate ssb - dismiss immediately */
-               } else {
-                       /*
-                        * Print current insn
-                        */
-                       kdb_printf("SS trap at ");
-                       kdb_symbol_print(ef->nip, NULL, KDB_SP_DEFAULT|KDB_SP_NEWLINE);
-                       kdb_printf(" "); /* wms */
-                       kdb_id1(ef->nip);
-                       KDB_STATE_CLEAR(DOING_SS);
-               }
-
-               if (rv != KDB_DB_SSB)
-                       set_msr(get_msr() & ~MSR_SE);
-       }
-       if (rv > 0)
-               goto handled;
-       
-       goto handle;
-
-
-handle:
-
-       /*
-        * Determine which breakpoint was encountered.
-        */
-       for(i=0, bp=kdb_breakpoints; i<KDB_MAXBPT; i++, bp++) {
-               if (!(bp->bp_free)
-                && (bp->bp_global || bp->bp_cpu == smp_processor_id())
-                && (bp->bp_hard)
-                && (bp->bp_hard->bph_reg == reg)) {
-                       /*
-                        * Hit this breakpoint.
-                        */
-                       kdb_printf("%s breakpoint #%d at " kdb_bfd_vma_fmt "\n", 
-                                 kdba_rwtypes[rw],
-                                 i, (long )bp->bp_addr);
-
-                       /*
-                        * For an instruction breakpoint, disassemble
-                        * the current instruction.
-                        */
-                       if (rw == 0) {
-                               kdb_id1(ef->nip);
-                       }
-
-                       goto handled;
-               }
-       }
-
-unknown:
-       rv = KDB_DB_NOBPT;      /* Cause kdb() to return */
-
-handled:
-
-
-       return rv;
-}
-
-/*
- * kdba_bp_trap
- *
- *     Perform breakpoint processing upon entry to the
- *     processor breakpoint instruction fault.   Determine and print
- *     the active breakpoint.
- *
- * Parameters:
- *     ef      Exception frame containing machine register state
- *     error   Error number passed to kdb.
- * Outputs:
- *     None.
- * Returns:
- *     0       Standard instruction or data breakpoint encountered
- *     1       Single Step fault ('ss' command)
- *     2       Single Step fault, caller should continue ('ssb' command)
- *     3       No existing kdb breakpoint matches this debug exception
- * Locking:
- *     None.
- * Remarks:
- *
- *     If multiple processors receive debug exceptions simultaneously,
- *     one may be waiting at the kdb fence in kdb() while the user
- *     issues a 'bc' command to clear the breakpoint the processor which
- *     is waiting has already encountered.   If this is the case, the
- *     debug registers will no longer match any entry in the breakpoint
- *     table, and we'll return the value '3'.  This can cause a panic
- *     in die_if_kernel().  It is safer to disable the breakpoint (bd),
- *     'go' until all processors are past the breakpoint then clear the
- *     breakpoint (bc).  This code recognises a breakpoint even when
- *     disabled but not when it has been cleared.
- *
- *     WARNING: This routine resets the eip.  It should be called
- *              once per breakpoint and the result cached.
- */
-
-kdb_dbtrap_t
-kdba_bp_trap(kdb_eframe_t ef, int error_unused)
-{
-       int i;
-       kdb_dbtrap_t rv;
-       kdb_bp_t *bp;
-
-       /*
-        * Determine which breakpoint was encountered.
-        */
-       if (KDB_DEBUG(BP))
-               kdb_printf("kdba_bp_trap: eip=0x%lx (not adjusted) "
-                          "msr=0x%lx trap=0x%lx ef=0x%p esp=0x%lx\n",
-                          ef->nip, ef->msr, ef->trap, ef, ef->gpr[1]);
-
-       rv = KDB_DB_NOBPT;      /* Cause kdb() to return */
-
-       for(i=0, bp=kdb_breakpoints; i<KDB_MAXBPT; i++, bp++) {
-               if (bp->bp_free)
-                       continue;
-               if (!bp->bp_global && bp->bp_cpu != smp_processor_id())
-                       continue;
-                if (bp->bp_addr == (ef->nip - bp->bp_adjust)) {
-                       /* Hit this breakpoint.  */
-                       ef->nip -= bp->bp_adjust;
-                       kdb_printf("Instruction(i) breakpoint #%d at 0x%lx (adjusted)\n",
-                                 i, ef->nip);
-                       kdb_id1(ef->nip);
-                       rv = KDB_DB_BPT;
-                       bp->bp_delay = 1;
-                       break;
-               }
-       }
-
-       return rv;
-}
-
-/*
- * kdba_handle_bp
- *
- *     Handle an instruction-breakpoint trap.  Called when re-installing
- *     an enabled breakpoint which has has the bp_delay bit set.
- *
- * Parameters:
- * Returns:
- * Locking:
- * Remarks:
- *
- * Ok, we really need to:
- *     1) Restore the original instruction byte
- *     2) Single Step
- *     3) Restore breakpoint instruction
- *     4) Continue.
- *
- *
- */
-
-static void
-kdba_handle_bp(kdb_eframe_t ef, kdb_bp_t *bp)
-{
-       if (!ef) {
-               kdb_printf("kdba_handle_bp: ef == NULL\n");
-               return;
-       }
-
-       if (KDB_DEBUG(BP))
-               kdb_printf("ef->eip = 0x%lx\n", ef->nip);
-
-       /*
-        * Setup single step
-        */
-       kdba_setsinglestep(ef);
-
-       /* KDB_STATE_SSBPT is set when the kernel debugger must single step
-        * a task in order to re-establish an instruction breakpoint which
-        * uses the instruction replacement mechanism. 
-        */
-       KDB_STATE_SET(SSBPT);
-
-       /*
-        * Reset delay attribute
-        */
-       bp->bp_delay = 0;
-       bp->bp_delayed = 1;
-}
-
-
-/*
- * kdba_bptype
- *
- *     Return a string describing type of breakpoint.
- *
- * Parameters:
- *     bph     Pointer to hardware breakpoint description
- * Outputs:
- *     None.
- * Returns:
- *     Character string.
- * Locking:
- *     None.
- * Remarks:
- */
-
-char *
-kdba_bptype(kdbhard_bp_t *bph)
-{
-       char *mode;
-
-       mode = kdba_rwtypes[bph->bph_mode];
-
-       return mode;
-}
-
-/*
- * kdba_printbpreg
- *
- *     Print register name assigned to breakpoint
- *
- * Parameters:
- *     bph     Pointer hardware breakpoint structure
- * Outputs:
- *     None.
- * Returns:
- *     None.
- * Locking:
- *     None.
- * Remarks:
- */
-
-void
-kdba_printbpreg(kdbhard_bp_t *bph)
-{
-       kdb_printf(" in dr%ld", bph->bph_reg);
-}
-
-/*
- * kdba_printbp
- *
- *     Print string describing hardware breakpoint.
- *
- * Parameters:
- *     bph     Pointer to hardware breakpoint description
- * Outputs:
- *     None.
- * Returns:
- *     None.
- * Locking:
- *     None.
- * Remarks:
- */
-
-void
-kdba_printbp(kdb_bp_t *bp)
-{
-       kdb_printf("\n    is enabled");
-       if (bp->bp_hardtype) {
-               kdba_printbpreg(bp->bp_hard);
-               if (bp->bp_hard->bph_mode != 0) {
-                       kdb_printf(" for %d bytes",
-                                  bp->bp_hard->bph_length+1);
-               }
-       }
-}
-
-/*
- * kdba_parsebp
- *
- *     Parse architecture dependent portion of the
- *     breakpoint command.
- *
- * Parameters:
- *     None.
- * Outputs:
- *     None.
- * Returns:
- *     Zero for success, a kdb diagnostic for failure
- * Locking:
- *     None.
- * Remarks:
- *     for Ia32 architure, data access, data write and
- *     I/O breakpoints are supported in addition to instruction
- *     breakpoints.
- *
- *     {datar|dataw|io|inst} [length]
- */
-
-int
-kdba_parsebp(int argc, const char **argv, int *nextargp, kdb_bp_t *bp)
-{
-       int             nextarg = *nextargp;
-       int             diag;
-       kdbhard_bp_t    *bph = &bp->bp_template;
-
-       bph->bph_mode = 0;              /* Default to instruction breakpoint */
-       bph->bph_length = 0;            /* Length must be zero for insn bp */
-       if ((argc + 1) != nextarg) {
-               if (strnicmp(argv[nextarg], "datar", sizeof("datar")) == 0) {
-                       bph->bph_mode = 3;
-               } else if (strnicmp(argv[nextarg], "dataw", sizeof("dataw")) == 0) {
-                       bph->bph_mode = 1;
-               } else if (strnicmp(argv[nextarg], "io", sizeof("io")) == 0) {
-                       bph->bph_mode = 2;
-               } else if (strnicmp(argv[nextarg], "inst", sizeof("inst")) == 0) {
-                       bph->bph_mode = 0;
-               } else {
-                       return KDB_ARGCOUNT;
-               }
-
-               bph->bph_length = 3;    /* Default to 4 byte */
-
-               nextarg++;
-
-               if ((argc + 1) != nextarg) {
-                       unsigned long len;
-
-                       diag = kdbgetularg((char *)argv[nextarg],
-                                          &len);
-                       if (diag)
-                               return diag;
-
-
-                       if ((len > 4) || (len == 3))
-                               return KDB_BADLENGTH;
-
-                       bph->bph_length = len;
-                       bph->bph_length--; /* Normalize for debug register */
-                       nextarg++;
-               }
-
-               if ((argc + 1) != nextarg)
-                       return KDB_ARGCOUNT;
-
-               /*
-                * Indicate to architecture independent level that
-                * a hardware register assignment is required to enable
-                * this breakpoint.
-                */
-
-               bph->bph_free = 0;
-       } else {
-               if (KDB_DEBUG(BP))
-                       kdb_printf("kdba_bp: no args, forcehw is %d\n", bp->bp_forcehw);
-               if (bp->bp_forcehw) {
-                       /*
-                        * We are forced to use a hardware register for this
-                        * breakpoint because either the bph or bpha
-                        * commands were used to establish this breakpoint.
-                        */
-                       bph->bph_free = 0;
-               } else {
-                       /*
-                        * Indicate to architecture dependent level that
-                        * the instruction replacement breakpoint technique
-                        * should be used for this breakpoint.
-                        */
-                       bph->bph_free = 1;
-                       bp->bp_adjust = PPC64_ADJUST_OFFSET;
-               }
-       }
-
-       *nextargp = nextarg;
-       return 0;
-}
-
-/*
- * kdba_allocbp
- *
- *     Associate a hardware register with a breakpoint.
- *
- * Parameters:
- *     None.
- * Outputs:
- *     None.
- * Returns:
- *     A pointer to the allocated register kdbhard_bp_t structure for
- *     success, Null and a non-zero diagnostic for failure.
- * Locking:
- *     None.
- * Remarks:
- */
-
-kdbhard_bp_t *
-kdba_allocbp(kdbhard_bp_t *bph, int *diagp)
-{
-       int i;
-       kdbhard_bp_t *newbph;
-
-       for(i=0,newbph=kdb_hardbreaks; i < KDB_MAXHARDBPT; i++, newbph++) {
-               if (newbph->bph_free) {
-                       break;
-               }
-       }
-
-       if (i == KDB_MAXHARDBPT) {
-               *diagp = KDB_TOOMANYDBREGS;
-               return NULL;
-       }
-
-       *diagp = 0;
-
-       /*
-        * Copy data from template.  Can't just copy the entire template
-        * here because the register number in kdb_hardbreaks must be
-        * preserved.
-        */
-       newbph->bph_data = bph->bph_data;
-       newbph->bph_write = bph->bph_write;
-       newbph->bph_mode = bph->bph_mode;
-       newbph->bph_length = bph->bph_length;
-
-       /*
-        * Mark entry allocated.
-        */
-       newbph->bph_free = 0;
-
-       return newbph;
-}
-
-/*
- * kdba_freebp
- *
- *     Deallocate a hardware breakpoint
- *
- * Parameters:
- *     None.
- * Outputs:
- *     None.
- * Returns:
- *     Zero for success, a kdb diagnostic for failure
- * Locking:
- *     None.
- * Remarks:
- */
-
-void
-kdba_freebp(kdbhard_bp_t *bph)
-{
-       bph->bph_free = 1;
-}
-
-/*
- * kdba_initbp
- *
- *     Initialize the breakpoint table for the hardware breakpoint
- *     register.
- *
- * Parameters:
- *     None.
- * Outputs:
- *     None.
- * Returns:
- *     Zero for success, a kdb diagnostic for failure
- * Locking:
- *     None.
- * Remarks:
- *
- *     There is one entry per register.  On the ia32 architecture
- *     all the registers are interchangeable, so no special allocation
- *     criteria are required.
- */
-
-void
-kdba_initbp(void)
-{
-       int i;
-       kdbhard_bp_t *bph;
-
-       /*
-        * Clear the hardware breakpoint table
-        */
-
-       memset(kdb_hardbreaks, '\0', sizeof(kdb_hardbreaks));
-
-       for(i=0,bph=kdb_hardbreaks; i<KDB_MAXHARDBPT; i++, bph++) {
-               bph->bph_reg = i;
-               bph->bph_free = 1;
-       }
-}
-
-/*
- * kdba_installbp
- *
- *     Install a breakpoint
- *
- * Parameters:
- *     ef      Exception frame
- *     bp      Breakpoint structure for the breakpoint to be installed
- * Outputs:
- *     None.
- * Returns:
- *     None.
- * Locking:
- *     None.
- * Remarks:
- *     For hardware breakpoints, a debug register is allocated
- *     and assigned to the breakpoint.  If no debug register is
- *     available, a warning message is printed and the breakpoint
- *     is disabled.
- *
- *     For instruction replacement breakpoints, we must single-step
- *     over the replaced instruction at this point so we can re-install
- *     the breakpoint instruction after the single-step.
- */
-
-int
-kdba_installbp(kdb_eframe_t ef, kdb_bp_t *bp)
-{
-    int rc;
-       /*
-        * Install the breakpoint, if it is not already installed.
-        */
-
-       if (KDB_DEBUG(BP)) {
-               kdb_printf("kdba_installbp bp_installed %d\n", bp->bp_installed);
-       }
-       if (!bp->bp_installed) {
-               if (bp->bp_hardtype) {
-                       kdba_installdbreg(bp); 
-                       bp->bp_installed = 1;
-                       if (KDB_DEBUG(BP)) {
-                               kdb_printf("kdba_installbp hardware reg %ld at " kdb_bfd_vma_fmt "\n",
-                                          (long unsigned int) bp->bp_hard->bph_reg, (long unsigned int) bp->bp_addr);
-                       }
-               } else if (bp->bp_delay) {
-                       if (KDB_DEBUG(BP))
-                               kdb_printf("kdba_installbp delayed bp\n");
-                       kdba_handle_bp(ef, bp);
-               } else {
-                   if (KDB_DEBUG(BP))
-                       kdb_printf("0x%lx 0x%lx 0x%lx\n",bp->bp_inst,bp->bp_addr,sizeof(bp->bp_addr));
-                   rc = kdb_getword(&bp->bp_inst, bp->bp_addr,sizeof(bp->bp_addr));
-                   kdb_putword(bp->bp_addr, PPC64_BREAKPOINT_INSTRUCTION,sizeof(PPC64_BREAKPOINT_INSTRUCTION));
-                   if (KDB_DEBUG(BP))
-                       kdb_printf("kdba_installbp instruction 0x%x at " kdb_bfd_vma_fmt "\n",
-                                  PPC64_BREAKPOINT_INSTRUCTION, bp->bp_addr);
-                   bp->bp_installed = 1;
-               }
-       }
-return 0;
-}
-
-/*
- * kdba_removebp
- *
- *     Make a breakpoint ineffective.
- *
- * Parameters:
- *     None.
- * Outputs:
- *     None.
- * Returns:
- *     None.
- * Locking:
- *     None.
- * Remarks:
- */
-
-int
-kdba_removebp(kdb_bp_t *bp)
-{
-       /*
-        * For hardware breakpoints, remove it from the active register,
-        * for software breakpoints, restore the instruction stream.
-        */
-       if (KDB_DEBUG(BP)) {
-               kdb_printf("kdba_removebp bp_installed %d\n", bp->bp_installed);
-       }
-       if (bp->bp_installed) {
-               if (bp->bp_hardtype) {
-                       if (KDB_DEBUG(BP)) {
-                               kdb_printf("kdb: removing hardware reg %ld at " kdb_bfd_vma_fmt "\n",
-                                          bp->bp_hard->bph_reg, bp->bp_addr);
-                       }
-                       kdba_removedbreg(bp);
-               } else
-               {
-                       if (KDB_DEBUG(BP))
-                               kdb_printf("kdb: restoring instruction 0x%lx at " kdb_bfd_vma_fmt "\n",
-                                          bp->bp_inst, bp->bp_addr);
-                       kdb_putword(bp->bp_addr, bp->bp_inst,sizeof(bp->bp_inst));
-               }
-               bp->bp_installed = 0;
-       }
-return 0;
-}
-
-#if 0
-#define systemcfg naca
-#endif
-
-/* install data breakpoint */
-void
-kdba_installdbreg(kdb_bp_t *bp) {
-    if (systemcfg->platform==PLATFORM_PSERIES)
-    {
-    /* set_dabr is the kdb form, using mtspr instructions */
-       set_dabr(bp->bp_addr); 
-    } else if (systemcfg->platform==PLATFORM_PSERIES_LPAR ) {
-       /*set_all_DABR(bp->bp_addr); missing from 2.5? */
-#if 0
-       HvCall_setDABR(bp->bp_addr);
-#endif
-    } else if (systemcfg->platform==PLATFORM_ISERIES_LPAR ) {
-       /* different hcall interface needed here. */
-    }
-}
-
-/* remove data breakpoint-- set it to zero. */
-void
-kdba_removedbreg(kdb_bp_t *bp) {
-    if (systemcfg->platform==PLATFORM_PSERIES)
-    {
-    /* set_dabr is the kdb form, using mtspr instructions */
-       set_dabr(0x0); 
-    } else if (systemcfg->platform==PLATFORM_PSERIES_LPAR ) {
-       /*set_all_DABR(bp->bp_addr); missing from 2.5? */
-#if 0
-       HvCall_setDABR(0x0);
-#endif
-    } else if (systemcfg->platform==PLATFORM_ISERIES_LPAR ) {
-       /* different hcall interface needed here. */
-    }
-}
diff --git a/arch/ppc64/kdb/kdba_bt.c b/arch/ppc64/kdb/kdba_bt.c
deleted file mode 100644 (file)
index f42c42c..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Minimalist Kernel Debugger - Architecture Dependent Stack Traceback
- *
- * Copyright (C) 1999 Silicon Graphics, Inc.
- * Copyright (C) Scott Lurndal (slurn@engr.sgi.com)
- * Copyright (C) Scott Foehner (sfoehner@engr.sgi.com)
- * Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
- *
- * See the file LIA-COPYRIGHT for additional information.
- *
- * Written March 1999 by Scott Lurndal at Silicon Graphics, Inc.
- *
- * Modifications from:
- *      Richard Bass                    1999/07/20
- *              Many bug fixes and enhancements.
- *      Scott Foehner
- *              Port to ia64
- *      Srinivasa Thirumalachar
- *              RSE support for ia64
- *     Masahiro Adegawa                1999/12/01
- *             'sr' command, active flag in 'ps'
- *     Scott Lurndal                   1999/12/12
- *             Significantly restructure for linux2.3
- *     Keith Owens                     2000/05/23
- *             KDB v1.2
- *
- */
-
-#include <linux/ctype.h>
-#include <linux/string.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/kallsyms.h>
-#include <linux/kdb.h>
-#include <linux/kdbprivate.h>
-#include <linux/ptrace.h>      /* for STACK_FRAME_OVERHEAD */
-#include <asm/system.h>
-#include "privinst.h"
-
-void systemreset(struct pt_regs *regs)
-{
-       udbg_printf("Oh no!\n");
-       kdb_printf("Oh no!\n");
-       kdb(KDB_REASON_OOPS, 0, (kdb_eframe_t) regs);
-       for (;;);
-}
-
-/* human name vector lookup. */
-static
-const char *getvecname(unsigned long vec)
-{
-       char *ret;
-       switch (vec) {
-       case 0x100:     ret = "(System Reset)"; break; 
-       case 0x200:     ret = "(Machine Check)"; break; 
-       case 0x300:     ret = "(Data Access)"; break; 
-       case 0x400:     ret = "(Instruction Access)"; break; 
-       case 0x500:     ret = "(Hardware Interrupt)"; break; 
-       case 0x600:     ret = "(Alignment)"; break; 
-       case 0x700:     ret = "(Program Check)"; break; 
-       case 0x800:     ret = "(FPU Unavailable)"; break; 
-       case 0x900:     ret = "(Decrementer)"; break; 
-       case 0xc00:     ret = "(System Call)"; break; 
-       case 0xd00:     ret = "(Single Step)"; break; 
-       case 0xf00:     ret = "(Performance Monitor)"; break; 
-       default: ret = "";
-       }
-       return ret;
-}
-
-
-extern unsigned long kdba_getword(unsigned long addr, size_t width);
-
-/* Copy a block of memory using kdba_getword().
- * This is not efficient.
- */
-static void kdba_getmem(unsigned long addr, void *p, int size)
-{
-       unsigned char *dst = (unsigned char *)p;
-       while (size > 0) {
-               *dst++ = kdba_getword(addr++, 1);
-               size--;
-       }
-}
-
-
-/*
- * kdba_bt_stack_ppc
- *
- *     kdba_bt_stack with ppc specific parameters.
- *     Specification as kdba_bt_stack plus :-
- *
- * Inputs:
- *     As kba_bt_stack plus
- *     regs_esp If 1 get esp from the registers (exception frame), if 0
- *              get esp from kdba_getregcontents.
- */
-
-static int
-kdba_bt_stack_ppc(struct pt_regs *regs, kdb_machreg_t *addr, int argcount,
-                  struct task_struct *p, int regs_esp)
-{
-
-       kdb_machreg_t   esp,eip,ebp,old_esp;
-/*     kdb_symtab_t    symtab, *sym; */
-       kdbtbtable_t    tbtab;
-       /* declare these as raw ptrs so we don't get func descriptors */
-       extern void *ret_from_except, *ret_from_syscall_1;
-/*     int do_bottom_half_ret=0; */
-
-       const char *name;
-       char namebuf[128];
-       unsigned long symsize,symoffset;
-       char *symmodname;
-
-       if (!regs && !addr)
-       {
-               kdb_printf(" invalid regs pointer \n");
-               return 0;
-       }
-
-       /*
-        * The caller may have supplied an address at which the
-        * stack traceback operation should begin.  This address
-        * is assumed by this code to point to a return-address
-        * on the stack to be traced back.
-        *
-        * The end result of this will make it appear as if a function
-        * entitled '<unknown>' was called from the function which
-        * contains return-address.
-        */
-       if (addr) {
-               eip = 0;
-               esp = *addr;
-               ebp=0;
-       } else {
-               ebp=regs->link;
-               eip = regs->nip;
-               if (regs_esp)
-                       esp = regs->gpr[1];
-               else
-                       kdba_getregcontents("esp", regs, &esp);
-       }
-
-       kdb_printf("          SP(esp)            PC(eip)      Function(args)\n");
-
-       /* (Ref: 64-bit PowerPC ELF ABI Spplement; Ian Lance Taylor, Zembu Labs).
-        A PPC stack frame looks like this:
-
-        High Address
-        Back Chain
-        FP reg save area
-        GP reg save area
-        Local var space
-        Parameter save area            (SP+48)
-        TOC save area          (SP+40)
-        link editor doubleword (SP+32)
-        compiler doubleword            (SP+24)
-        LR save                        (SP+16)
-        CR save                        (SP+8)
-        Back Chain                     (SP+0)
-
-        Note that the LR (ret addr) may not be saved in the *current* frame if
-        no functions have been called from the current function.
-        */
-
-       /*
-        * Run through the activation records and print them.
-        */
-       while (1) {
-               kdb_printf("0x%016lx  0x%016lx  ", esp, eip);
-               /*              kdbnearsym(eip, &symtab); */
-               kdba_find_tb_table(eip, &tbtab); 
-
-               /*              sym = symtab.sym_name ? &symtab : &tbtab.symtab; *//* use fake symtab if necessary */
-               name = NULL;
-               if (esp >= PAGE_OFFSET) { 
-                       /*if ((sym) )*/ 
-                       /* if this fails, eip is outside of kernel space, dont trust it. */
-                       if (eip > PAGE_OFFSET) {
-                               name = kallsyms_lookup(eip, &symsize, &symoffset, &symmodname,
-                                                      namebuf);
-                       }
-                       if (name) { 
-                               kdb_printf("%s", name);
-                       } else {
-                               kdb_printf("NO_SYMBOL or Userspace"); 
-                       }
-               }
-
-               /* if this fails, eip is outside of kernel space, dont trust data. */
-               if (eip > PAGE_OFFSET) { 
-                       if (eip - symoffset > 0) {
-                               kdb_printf(" +0x%lx", /*eip -*/ symoffset);
-                       }
-               }
-               kdb_printf("\n");
-
-               /* ret_from_except=0xa5e0 ret_from_syscall_1=a378 do_bottom_half_ret=a5e0 */
-               if (esp < PAGE_OFFSET) { /* below kernelspace..   */
-                       kdb_printf("<Stack contents outside of kernel space.  %.16lx>\n", esp );
-                       break;
-               } else {
-                       if (eip == (kdb_machreg_t)ret_from_except ||
-                           eip == (kdb_machreg_t)ret_from_syscall_1 /* ||
-                                                                     eip == (kdb_machreg_t)do_bottom_half_ret */) {
-                               /* pull exception regs from the stack */
-                               struct pt_regs eregs;
-                               kdba_getmem(esp+STACK_FRAME_OVERHEAD, &eregs, sizeof(eregs));
-                               kdb_printf("  [exception: %lx:%s regs 0x%lx] nip:[0x%lx] gpr[1]:[0x%x]\n", eregs.trap,getvecname(eregs.trap), esp+STACK_FRAME_OVERHEAD,(unsigned int)eregs.nip,(unsigned int)eregs.gpr[1]);
-                               old_esp = esp;
-                               esp = kdba_getword(esp, 8);
-                               if (!esp)
-                                       break;
-                               eip = kdba_getword(esp+16, 8);  /* saved lr */
-                               if (esp < PAGE_OFFSET) {  /* userspace... */
-                                       if (old_esp > PAGE_OFFSET) {
-                                               kdb_printf("<Stack drops into userspace here %.16lx>\n",esp);
-                                               break;
-                                       }
-                               }
-                               /* we want to follow exception registers, not into user stack.  ...   */
-                               esp = eregs.gpr[1];
-                               eip = eregs.nip;
-                       } else {
-                               esp = kdba_getword(esp, 8);
-                               if (!esp)
-                                       break;
-                               eip = kdba_getword(esp+16, 8);  /* saved lr */
-                       }
-               }
-       }
-       return 0;
-}
-
-
-/*
- * kdba_bt_stack
- *
- *     This function implements the 'bt' command.  Print a stack
- *     traceback.
- *
- *     bt [<address-expression>]   (addr-exp is for alternate stacks)
- *     btp <pid>                    (Kernel stack for <pid>)
- *
- *     address expression refers to a return address on the stack.  It
- *     may be preceeded by a frame pointer.
- *
- * Inputs:
- *     regs    registers at time kdb was entered.
- *     addr    Pointer to Address provided to 'bt' command, if any.
- *     argcount
- *     p       Pointer to task for 'btp' command.
- * Outputs:
- *     None.
- * Returns:
- *     zero for success, a kdb diagnostic if error
- * Locking:
- *     none.
- * Remarks:
- *     mds comes in handy when examining the stack to do a manual
- *     traceback.
- */
-
-int
-kdba_bt_stack(struct pt_regs *regs, kdb_machreg_t *addr, int argcount,
-             struct task_struct *p)
-{
-       return(kdba_bt_stack_ppc(regs, addr, argcount, p, 0));
-}
-
-int
-kdba_bt_process(struct task_struct *p, int argcount)
-{
-       return (kdba_bt_stack_ppc(p->thread.regs, (kdb_machreg_t *) p->thread.ksp, argcount, p, 0));
-}
diff --git a/arch/ppc64/kdb/kdba_id.c b/arch/ppc64/kdb/kdba_id.c
deleted file mode 100644 (file)
index 677d598..0000000
+++ /dev/null
@@ -1,278 +0,0 @@
-/*
- * Minimalist Kernel Debugger - Architecture Dependent Instruction Disassembly
- *
- * Copyright (C) 1999 Silicon Graphics, Inc.
- *
- * See the file LIA-COPYRIGHT for additional information.
- *
- * Written March 1999 by Scott Lurndal at Silicon Graphics, Inc.
- *
- * Modifications from:
- *      Richard Bass                    1999/07/20
- *              Many bug fixes and enhancements.
- *      Scott Foehner
- *              Port to ia64
- *      Srinivasa Thirumalachar
- *              RSE support for ia64
- *     Masahiro Adegawa                1999/12/01
- *             'sr' command, active flag in 'ps'
- *     Scott Lurndal                   1999/12/12
- *             Significantly restructure for linux2.3
- *     Keith Owens                     2000/05/23
- *             KDB v1.2
- *
- */
-
-#include <stdarg.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/ctype.h>
-#include <linux/string.h>
-#include <linux/kdb.h>
-#include <linux/kdbprivate.h>
-
-/*
- * kdba_dis_getsym
- *
- *     Get a symbol for the disassembler.
- *
- * Parameters:
- *     addr    Address for which to get symbol
- *     dip     Pointer to disassemble_info
- * Returns:
- *     0
- * Locking:
- * Remarks:
- *     Not used for kdb.
- */
-
-/* ARGSUSED */
-static int
-kdba_dis_getsym(bfd_vma addr, disassemble_info *dip)
-{
-
-       return 0;
-}
-
-/*
- * kdba_printaddress
- *
- *     Print (symbolically) an address.
- *
- * Parameters:
- *     addr    Address for which to get symbol
- *     dip     Pointer to disassemble_info
- *     flag    True if a ":<tab>" sequence should follow the address
- * Returns:
- *     number of chars printed
- * Locking:
- * Remarks:
- *
- */
-
-/* ARGSUSED */
-void
-kdba_printaddress(kdb_machreg_t addr, disassemble_info *dip, int flag)
-{
-       kdb_symtab_t symtab;
-
-       /*
-        * Print a symbol name or address as necessary.
-        */
-       kdbnearsym(addr, &symtab);
-       if (symtab.sym_name) {
-               /* Do not use kdb_symbol_print here, it always does
-                * kdb_printf but we want dip->fprintf_func.
-                */
-               dip->fprintf_func(dip->stream,
-                       "0x%0*lx %s",
-                       2*sizeof(addr), addr, symtab.sym_name);
-               /* Add offset if needed.  Pad output with blanks to get
-                * consistent size symbols for disassembly listings.
-                */
-               if (addr == symtab.sym_start) {
-                       if (!flag)
-                               dip->fprintf_func(dip->stream, "         ");
-               } else {
-                       int len, i;
-                       char buf[20];
-                       sprintf(buf, "%lx", addr - symtab.sym_start);
-                       dip->fprintf_func(dip->stream, "+0x%s", buf);
-                       if (!flag) {
-                               len = strlen(buf);
-                               for (i = len; i < 6; i++)
-                                       dip->fprintf_func(dip->stream, " ");
-                       }
-               }
-
-       } else {
-               dip->fprintf_func(dip->stream, "0x%0*lx", 2*sizeof(addr), addr);
-       }
-
-       if (flag)
-               dip->fprintf_func(dip->stream, ":   ");
-}
-
-/*
- * kdba_dis_printaddr
- *
- *     Print (symbolically) an address.  Called by GNU disassembly
- *     code via disassemble_info structure.
- *
- * Parameters:
- *     addr    Address for which to get symbol
- *     dip     Pointer to disassemble_info
- * Returns:
- *     number of chars printed.
- * Locking:
- * Remarks:
- *     This function will never append ":<tab>" to the printed
- *     symbolic address.
- */
-
-static void
-kdba_dis_printaddr(bfd_vma addr, disassemble_info *dip)
-{
-       return kdba_printaddress(addr, dip, 0);
-}
-
-/*
- * kdba_dis_getmem
- *
- *     Fetch 'length' bytes from 'addr' into 'buf'.
- *
- * Parameters:
- *     addr    Address for which to get symbol
- *     buf     Address of buffer to fill with bytes from 'addr'
- *     length  Number of bytes to fetch
- *     dip     Pointer to disassemble_info
- * Returns:
- *     0
- * Locking:
- * Remarks:
- *
- */
-extern int kdba_getword(unsigned long addr, size_t width);
-
-
-/* ARGSUSED */
-static int
-kdba_dis_getmem(bfd_vma addr, bfd_byte *buf, unsigned int length, disassemble_info *dip)
-{
-       bfd_byte        *bp = buf;
-       int             i;
-
-       /*
-        * Fill the provided buffer with bytes from
-        * memory, starting at address 'addr' for 'length bytes.
-        *
-        */
-
-       for(i=0; i<length; i++ ){
-               *bp++ = (bfd_byte)kdba_getword(addr++, sizeof(bfd_byte));
-       }
-
-       return 0;
-}
-
-/*
- * kdba_id_parsemode
- *
- *     Parse IDMODE environment variable string and
- *     set appropriate value into "disassemble_info" structure.
- *
- * Parameters:
- *     mode    Mode string
- *     dip     Disassemble_info structure pointer
- * Returns:
- * Locking:
- * Remarks:
- *     We handle the values 'x86' and '8086' to enable either
- *     32-bit instruction set or 16-bit legacy instruction set.
- */
-
-int
-kdba_id_parsemode(const char *mode, disassemble_info *dip)
-{
-
-
-       return 0;
-}
-
-/*
- * kdba_check_pc
- *
- *     Check that the pc is satisfactory.
- *
- * Parameters:
- *     pc      Program Counter Value.
- * Returns:
- *     None
- * Locking:
- *     None.
- * Remarks:
- *     Can change pc.
- */
-
-void
-kdba_check_pc(kdb_machreg_t *pc)
-{
-       /* No action */
-}
-
-/*
- * kdba_id_printinsn
- *
- *     Format and print a single instruction at 'pc'. Return the
- *     length of the instruction.
- *
- * Parameters:
- *     pc      Program Counter Value.
- *     dip     Disassemble_info structure pointer
- * Returns:
- *     Length of instruction, -1 for error.
- * Locking:
- *     None.
- * Remarks:
- *     Depends on 'IDMODE' environment variable.
- */
-
-int
-kdba_id_printinsn(kdb_machreg_t pc, disassemble_info *dip)
-{
-       kdba_dis_printaddr(pc, dip);
-       return print_insn_big_powerpc(pc, dip);
-}
-
-/*
- * kdba_id_init
- *
- *     Initialize the architecture dependent elements of
- *     the disassembly information structure
- *     for the GNU disassembler.
- *
- * Parameters:
- *     None.
- * Outputs:
- *     None.
- * Returns:
- *     None.
- * Locking:
- *     None.
- * Remarks:
- */
-
-void __init
-kdba_id_init(disassemble_info *dip)
-{
-       dip->read_memory_func       = kdba_dis_getmem;
-       dip->print_address_func     = kdba_dis_printaddr;
-       dip->symbol_at_address_func = kdba_dis_getsym;
-
-       dip->flavour                = bfd_target_elf_flavour;
-       dip->arch                   = bfd_arch_powerpc;
-       dip->mach                   = bfd_mach_ppc_750;
-       dip->endian                 = BFD_ENDIAN_BIG;
-
-       dip->display_endian         = BFD_ENDIAN_BIG;
-}
diff --git a/arch/ppc64/kdb/kdba_io.c b/arch/ppc64/kdb/kdba_io.c
deleted file mode 100644 (file)
index 388994a..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Kernel Debugger Console I/O handler
- *
- * Copyright (C) 1999 Silicon Graphics, Inc.
- * Copyright (C) Scott Lurndal (slurn@engr.sgi.com)
- * Copyright (C) Scott Foehner (sfoehner@engr.sgi.com)
- * Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
- *
- * See the file LIA-COPYRIGHT for additional information.
- *
- * Written March 1999 by Scott Lurndal at Silicon Graphics, Inc.
- *
- * Modifications from:
- *     Chuck Fleckenstein              1999/07/20
- *             Move kdb_info struct declaration to this file
- *             for cases where serial support is not compiled into
- *             the kernel.
- *
- *     Masahiro Adegawa                1999/07/20
- *             Handle some peculiarities of japanese 86/106
- *             keyboards.
- *
- *     marc@mucom.co.il                1999/07/20
- *             Catch buffer overflow for serial input.
- *
- *      Scott Foehner
- *              Port to ia64
- *
- *     Scott Lurndal                   2000/01/03
- *             Restructure for v1.0
- *
- *     Keith Owens                     2000/05/23
- *             KDB v1.2
- *
- *     Andi Kleen                      2000/03/19
- *             Support simultaneous input from serial line and keyboard.
- */
-
-#include <linux/kernel.h>
-#include <asm/io.h>
-#include <linux/wait.h>
-#include <linux/delay.h>
-#include <linux/console.h>
-#include <linux/ctype.h>
-#include <linux/keyboard.h>
-#include <linux/serial_reg.h>
-
-#include <linux/kdb.h>
-#include <linux/kdbprivate.h>
-#include <asm/machdep.h>
-#undef FILE
-
-int kdb_port;
-
-struct kdb_serial kdb_serial;
-/*{
-       int io_type;
-       unsigned long iobase;
-       unsigned long ioreg_shift;
-} kdb_serial_t;
-*/
-
-int inchar(void);
-
-
-char *
-kdba_read(char *buffer, size_t bufsize)
-{
-       char    *cp = buffer;
-       char    *bufend = buffer+bufsize-2;     /* Reserve space for newline and null byte */
-
-       for (;;) {
-           unsigned char key = ppc_md.udbg_getc();
-               /* Echo is done in the low level functions */
-               switch (key) {
-               case '\b': /* backspace */
-               case '\x7f': /* delete */
-                       if (cp > buffer) {
-                               udbg_puts("\b \b");
-                               --cp;
-                       }
-                       break;
-               case '\n': /* enter */
-               case '\r': /* - the other enter... */
-                       ppc_md.udbg_putc('\n');
-                       *cp++ = '\n';
-                       *cp++ = '\0';
-                       return buffer;
-               case '\x00': /* check for NULL from udbg_getc */
-                       break;
-               default:
-                       if (cp < bufend)
-                       ppc_md.udbg_putc(key);
-                               *cp++ = key;
-                       break;
-               }
-       }
-}
-
-
-
diff --git a/arch/ppc64/kdb/kdbasupport.c b/arch/ppc64/kdb/kdbasupport.c
deleted file mode 100644 (file)
index 5376013..0000000
+++ /dev/null
@@ -1,2052 +0,0 @@
-/*
- * Kernel Debugger Architecture Independent Support Functions
- *
- * Copyright (C) 1999 Silicon Graphics, Inc.
- * Copyright (C) Scott Lurndal (slurn@engr.sgi.com)
- * Copyright (C) Scott Foehner (sfoehner@engr.sgi.com)
- * Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
- *
- * See the file LIA-COPYRIGHT for additional information.
- *
- * Written March 1999 by Scott Lurndal at Silicon Graphics, Inc.
- *
- * Modifications from:
- *      Richard Bass                    1999/07/20
- *              Many bug fixes and enhancements.
- *      Scott Foehner
- *              Port to ia64
- *     Scott Lurndal                   1999/12/12
- *             v1.0 restructuring.
- *     Keith Owens                     2000/05/23
- *             KDB v1.2
- */
-
-#include <linux/string.h>
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/ptrace.h>
-#include <linux/mm.h>
-#include <linux/sched.h>
-#include <linux/kdb.h>
-#include <linux/kdbprivate.h>
-
-#include <asm/processor.h>
-#include "privinst.h"
-#include <asm/uaccess.h>
-#include <asm/machdep.h>
-
-extern const char *kdb_diemsg;
-unsigned long cpus_in_kdb=0;
-volatile unsigned long kdb_do_reboot=0;
-
-/* prototypes */
-int valid_ppc64_kernel_address(unsigned long addr, unsigned long size);
-int kdba_excprint(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-int kdba_super_regs(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-int kdba_dissect_msr(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-int kdba_halt(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-int kdba_dump_tce_table(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-int kdba_kernelversion(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-int kdba_dmesg(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-int kdba_dump_pci_info(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-int kdba_rd(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-int kdba_bt(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-unsigned long kdba_getword(unsigned long addr, size_t width);
-
-
-extern int kdb_dmesg(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-extern int kdb_ps(int argc, const char **argv, const char **envp, struct pt_regs *regs);
-
-extern int kdb_parse(const char *cmdstr, struct pt_regs *regs);
-
-/* 60secs * 1000*1000 usecs/sec.  HMC interface requires larger amount of time,.. */
-#define KDB_RESET_TIMEOUT 60*1000*1000
-
-/* kdb will use UDBG */
-#define USE_UDBG
-
-#ifdef USE_UDBG
-#include <asm/udbg.h>
-#endif
-
-#include <linux/kbd_kern.h>
-#include <linux/sysrq.h>
-#include <linux/interrupt.h>
-
-#ifdef CONFIG_MAGIC_SYSRQ
-static void
-sysrq_handle_kdb(int key, struct pt_regs *pt_regs, struct kbd_struct *kbd, struct tty_struct *tty) 
-{
-  kdb(KDB_REASON_KEYBOARD,0,pt_regs);
-}
-
-static struct sysrq_key_op sysrq_kdb_op = 
-{
-       handler:        (void*)sysrq_handle_kdb,
-       help_msg:       "(x)kdb",
-       action_msg:     "Entering kdb\n",
-};
-
-void
-kdb_map_scc(void)
-{
-       /* register sysrq 'x' */
-       __sysrq_put_key_op('x', &sysrq_kdb_op);
-}
-#endif
-
-
-/*
- * kdba_prologue
- *
- *     This function analyzes a gcc-generated function prototype
- *     with or without frame pointers to determine the amount of
- *     automatic storage and register save storage is used on the
- *     stack of the target function.  It only counts instructions
- *     that have been executed up to but excluding the current nip.
- * Inputs:
- *     code    Start address of function code to analyze
- *     pc      Current program counter within function
- *     sp      Current stack pointer for function
- *     fp      Current frame pointer for function, may not be valid
- *     ss      Start of stack for current process.
- *     caller  1 if looking for data on the caller frame, 0 for callee.
- * Outputs:
- *     ar      Activation record, all fields may be set.  fp and oldfp
- *             are 0 if they cannot be extracted.  return is 0 if the
- *             code cannot find a valid return address.  args and arg0
- *             are 0 if the number of arguments cannot be safely
- *             calculated.
- * Returns:
- *     1 if prologue is valid, 0 otherwise.  If pc is 0 treat it as a
- *     valid prologue to allow bt on wild branches.
- * Locking:
- *     None.
- * Remarks:
- *
- */
-int
-kdba_prologue(const kdb_symtab_t *symtab, kdb_machreg_t pc, kdb_machreg_t sp,
-             kdb_machreg_t fp, kdb_machreg_t ss, int caller, kdb_ar_t *ar)
-{
-       /* We don't currently use kdb's generic activation record scanning
-        * code to handle backtrace.
-        */
-       return 0;
-}
-
-
-
-/*
- * kdba_getregcontents
- *
- *     Return the contents of the register specified by the
- *     input string argument.   Return an error if the string
- *     does not match a machine register.
- *
- *     The following pseudo register names are supported:
- *        &regs         - Prints address of exception frame
- *        kesp          - Prints kernel stack pointer at time of fault
- *        cesp          - Prints current kernel stack pointer, inside kdb
- *        ceflags       - Prints current flags, inside kdb
- *        %<regname>    - Uses the value of the registers at the
- *                        last time the user process entered kernel
- *                        mode, instead of the registers at the time
- *                        kdb was entered.
- *
- * Parameters:
- *     regname         Pointer to string naming register
- *     regs            Pointer to structure containing registers.
- * Outputs:
- *     *contents       Pointer to unsigned long to recieve register contents
- * Returns:
- *     0               Success
- *     KDB_BADREG      Invalid register name
- * Locking:
- *     None.
- * Remarks:
- *     If kdb was entered via an interrupt from the kernel itself then
- *     ss and esp are *not* on the stack.
- */
-
-static struct kdbregs {
-       char   *reg_name;
-       size_t  reg_offset;
-} kdbreglist[] = {
-       { "gpr0",       offsetof(struct pt_regs, gpr[0]) },
-       { "gpr1",       offsetof(struct pt_regs, gpr[1]) },
-       { "gpr2",       offsetof(struct pt_regs, gpr[2]) },
-       { "gpr3",       offsetof(struct pt_regs, gpr[3]) },
-       { "gpr4",       offsetof(struct pt_regs, gpr[4]) },
-       { "gpr5",       offsetof(struct pt_regs, gpr[5]) },
-       { "gpr6",       offsetof(struct pt_regs, gpr[6]) },
-       { "gpr7",       offsetof(struct pt_regs, gpr[7]) },
-       { "gpr8",       offsetof(struct pt_regs, gpr[8]) },
-       { "gpr9",       offsetof(struct pt_regs, gpr[9]) },
-       { "gpr10",      offsetof(struct pt_regs, gpr[10]) },
-       { "gpr11",      offsetof(struct pt_regs, gpr[11]) },
-       { "gpr12",      offsetof(struct pt_regs, gpr[12]) },
-       { "gpr13",      offsetof(struct pt_regs, gpr[13]) },
-       { "gpr14",      offsetof(struct pt_regs, gpr[14]) },
-       { "gpr15",      offsetof(struct pt_regs, gpr[15]) },
-       { "gpr16",      offsetof(struct pt_regs, gpr[16]) },
-       { "gpr17",      offsetof(struct pt_regs, gpr[17]) },
-       { "gpr18",      offsetof(struct pt_regs, gpr[18]) },
-       { "gpr19",      offsetof(struct pt_regs, gpr[19]) },
-       { "gpr20",      offsetof(struct pt_regs, gpr[20]) },
-       { "gpr21",      offsetof(struct pt_regs, gpr[21]) },
-       { "gpr22",      offsetof(struct pt_regs, gpr[22]) },
-       { "gpr23",      offsetof(struct pt_regs, gpr[23]) },
-       { "gpr24",      offsetof(struct pt_regs, gpr[24]) },
-       { "gpr25",      offsetof(struct pt_regs, gpr[25]) },
-       { "gpr26",      offsetof(struct pt_regs, gpr[26]) },
-       { "gpr27",      offsetof(struct pt_regs, gpr[27]) },
-       { "gpr28",      offsetof(struct pt_regs, gpr[28]) },
-       { "gpr29",      offsetof(struct pt_regs, gpr[29]) },
-       { "gpr30",      offsetof(struct pt_regs, gpr[30]) },
-       { "gpr31",      offsetof(struct pt_regs, gpr[31]) },
-       { "nip",        offsetof(struct pt_regs, nip) },
-       { "msr",        offsetof(struct pt_regs, msr) },
-       { "esp",        offsetof(struct pt_regs, gpr[1]) },
-       { "orig_gpr3",  offsetof(struct pt_regs, orig_gpr3) },
-       { "ctr",        offsetof(struct pt_regs, ctr) },
-       { "link",       offsetof(struct pt_regs, link) },
-       { "xer",        offsetof(struct pt_regs, xer) },
-       { "ccr",        offsetof(struct pt_regs, ccr) },
-       { "mq",         offsetof(struct pt_regs, softe) /* mq */ },
-       { "trap",       offsetof(struct pt_regs, trap) },
-       { "dar",        offsetof(struct pt_regs, dar)  },
-       { "dsisr",      offsetof(struct pt_regs, dsisr) },
-       { "result",     offsetof(struct pt_regs, result) },
-};
-
-static const int nkdbreglist = sizeof(kdbreglist) / sizeof(struct kdbregs);
-
-unsigned long
-getsp(void)
-{
-       unsigned long x;
-       asm("mr %0,1" : "=r" (x):);
-       return x;
-}
-
-int
-kdba_getregcontents(const char *regname,
-                   struct pt_regs *regs,
-                   kdb_machreg_t *contents)
-{
-       int i;
-
-       if (strcmp(regname, "&regs") == 0) {
-               *contents = (unsigned long)regs;
-               return 0;
-       }
-
-       if (strcmp(regname, "kesp") == 0) {
-               *contents = (unsigned long) current->thread.ksp;
-               return 0;
-       }
-
-       if (strcmp(regname, "cesp") == 0) {
-               *contents = getsp();
-               return 0;
-       }
-
-       if (strcmp(regname, "ceflags") == 0) {
-               long flags;
-               local_save_flags(flags);
-               *contents = flags;
-               return 0;
-       }
-
-       if (regname[0] == '%') {
-               /* User registers:  %%e[a-c]x, etc */
-               regname++;
-               regs = (struct pt_regs *)
-                       (current->thread.ksp - sizeof(struct pt_regs));
-       }
-
-       for (i=0; i<nkdbreglist; i++) {
-               if (strnicmp(kdbreglist[i].reg_name,
-                            regname,
-                            strlen(regname)) == 0)
-                       break;
-       }
-
-       if ((i < nkdbreglist)
-        && (strlen(kdbreglist[i].reg_name) == strlen(regname))) {
-               *contents = *(unsigned long *)((unsigned long)regs +
-                               kdbreglist[i].reg_offset);
-               return(0);
-       }
-
-       return KDB_BADREG;
-}
-
-/*
- * kdba_setregcontents
- *
- *     Set the contents of the register specified by the
- *     input string argument.   Return an error if the string
- *     does not match a machine register.
- *
- *     Supports modification of user-mode registers via
- *     %<register-name>
- *
- * Parameters:
- *     regname         Pointer to string naming register
- *     regs            Pointer to structure containing registers.
- *     contents        Unsigned long containing new register contents
- * Outputs:
- * Returns:
- *     0               Success
- *     KDB_BADREG      Invalid register name
- * Locking:
- *     None.
- * Remarks:
- */
-
-int
-kdba_setregcontents(const char *regname,
-                 struct pt_regs *regs,
-                 unsigned long contents)
-{
-       int i;
-
-       if (regname[0] == '%') {
-               regname++;
-               regs = (struct pt_regs *)
-                       (current->thread.ksp - sizeof(struct pt_regs));
-       }
-
-       for (i=0; i<nkdbreglist; i++) {
-               if (strnicmp(kdbreglist[i].reg_name,
-                            regname,
-                            strlen(regname)) == 0)
-                       break;
-       }
-
-       if ((i < nkdbreglist)
-        && (strlen(kdbreglist[i].reg_name) == strlen(regname))) {
-               *(unsigned long *)((unsigned long)regs
-                                  + kdbreglist[i].reg_offset) = contents;
-               return 0;
-       }
-
-       return KDB_BADREG;
-}
-
-/*
- * kdba_dumpregs
- *
- *     Dump the specified register set to the display.
- *
- * Parameters:
- *     regs            Pointer to structure containing registers.
- *     type            Character string identifying register set to dump
- *     extra           string further identifying register (optional)
- * Outputs:
- * Returns:
- *     0               Success
- * Locking:
- *     None.
- * Remarks:
- *     This function will dump the general register set if the type
- *     argument is NULL (struct pt_regs).   The alternate register
- *     set types supported by this function:
- *
- *     d               Debug registers
- *     c               Control registers
- *     u               User registers at most recent entry to kernel
- * Following not yet implemented:
- *     m               Model Specific Registers (extra defines register #)
- *     r               Memory Type Range Registers (extra defines register)
- */
-
-int
-kdba_dumpregs(struct pt_regs *regs,
-           const char *type,
-           const char *extra)
-{
-       int i;
-       int count = 0;
-
-       if (type
-        && (type[0] == 'u')) {
-               type = NULL;
-               regs = (struct pt_regs *)
-                       (current->thread.ksp - sizeof(struct pt_regs));
-       }
-
-       if (type == NULL) {
-               struct kdbregs *rlp;
-               kdb_machreg_t contents;
-
-               for (i=0, rlp=kdbreglist; i<nkdbreglist; i++,rlp++) {
-                       kdba_getregcontents(rlp->reg_name, regs, &contents);
-                       kdb_printf("%-5s = 0x%p%c", rlp->reg_name, (void *)contents, (++count % 2) ? ' ' : '\n');
-               }
-
-               kdb_printf("&regs = 0x%p\n", regs);
-               return 0;
-       } else {  /* dump a specific register */
-           kdb_machreg_t contents;
-           if (KDB_BADREG==kdba_getregcontents(type, regs, &contents)) 
-               kdb_printf("register %-5s not found \n",type);
-           else
-               kdb_printf("%-5s = 0x%p%c", type, (void *)contents, '\n');
-           return 0;
-       }
-
-       switch (type[0]) {
-       case 'm':
-               break;
-       case 'r':
-               break;
-       default:
-               return KDB_BADREG;
-       }
-
-       /* NOTREACHED */
-       return 0;
-}
-
-kdb_machreg_t
-kdba_getpc(kdb_eframe_t ef)
-{
-    return ef ? ef->nip : 0;
-}
-
-int
-kdba_setpc(kdb_eframe_t ef, kdb_machreg_t newpc)
-{
-/* for ppc64, newpc passed in is actually a function descriptor for kdb. */
-    ef->nip =     kdba_getword(newpc+8, 8);
-    KDB_STATE_SET(IP_ADJUSTED);
-    return 0;
-}
-
-/*
- * kdba_main_loop
- *
- *     Do any architecture specific set up before entering the main kdb loop.
- *     The primary function of this routine is to make all processes look the
- *     same to kdb, kdb must be able to list a process without worrying if the
- *     process is running or blocked, so make all process look as though they
- *     are blocked.
- *
- * Inputs:
- *     reason          The reason KDB was invoked
- *     error           The hardware-defined error code
- *     error2          kdb's current reason code.  Initially error but can change
- *                     acording to kdb state.
- *     db_result       Result from break or debug point.
- *     ef              The exception frame at time of fault/breakpoint.  If reason
- *                     is KDB_REASON_SILENT then ef is NULL, otherwise it should
- *                     always be valid.
- * Returns:
- *     0       KDB was invoked for an event which it wasn't responsible
- *     1       KDB handled the event for which it was invoked.
- * Outputs:
- *     Sets nip and esp in current->thread.
- * Locking:
- *     None.
- * Remarks:
- *     none.
- */
-
-int
-kdba_main_loop(kdb_reason_t reason, kdb_reason_t reason2, int error,
-              kdb_dbtrap_t db_result, kdb_eframe_t ef)
-{
-       int rv;
-       kdb_do_reboot=0;
-
-       /* case where incoming registers are missing */
-       if (ef == NULL)
-       {
-               struct pt_regs regs;
-               asm volatile ("std      0,0(%0)\n\
-                               std     1,8(%0)\n\
-                               std     2,16(%0)\n\
-                               std     3,24(%0)\n\
-                               std     4,32(%0)\n\
-                               std     5,40(%0)\n\
-                               std     6,48(%0)\n\
-                               std     7,56(%0)\n\
-                               std     8,64(%0)\n\
-                               std     9,72(%0)\n\
-                               std     10,80(%0)\n\
-                               std     11,88(%0)\n\
-                               std     12,96(%0)\n\
-                               std     13,104(%0)\n\
-                               std     14,112(%0)\n\
-                               std     15,120(%0)\n\
-                               std     16,128(%0)\n\
-                               std     17,136(%0)\n\
-                               std     18,144(%0)\n\
-                               std     19,152(%0)\n\
-                               std     20,160(%0)\n\
-                               std     21,168(%0)\n\
-                               std     22,176(%0)\n\
-                               std     23,184(%0)\n\
-                               std     24,192(%0)\n\
-                               std     25,200(%0)\n\
-                               std     26,208(%0)\n\
-                               std     27,216(%0)\n\
-                               std     28,224(%0)\n\
-                               std     29,232(%0)\n\
-                               std     30,240(%0)\n\
-                               std     31,248(%0)" : : "b" (&regs));
-                /* one extra step back..  this frame disappears */
-               regs.gpr[1] = kdba_getword(regs.gpr[1], 8);
-               /* Fetch the link reg for this stack frame.
-                NOTE: the prev kdb_printf fills in the lr. */
-               regs.nip = regs.link = ((unsigned long *)regs.gpr[1])[2];
-               regs.msr = get_msr();
-               regs.ctr = get_ctr();
-               regs.xer = get_xer();
-               regs.ccr = get_cr();
-               regs.trap = 0;
-               /*current->thread.regs = &regs; */
-               ef = &regs;
-       }
-       cpus_in_kdb++;
-       rv = kdb_main_loop(reason, reason2, error, db_result, ef);
-       cpus_in_kdb--;
-       return rv;
-}
-
-void
-kdba_disableint(kdb_intstate_t *state)
-{
-       unsigned long *fp = (unsigned long *)state;
-       unsigned long flags;
-       local_irq_save(flags);
-       *fp = flags;
-}
-
-void
-kdba_restoreint(kdb_intstate_t *state)
-{
-       unsigned long flags = *(unsigned long *)state;
-       local_irq_restore(flags);
-}
-
-void
-kdba_setsinglestep(struct pt_regs *regs)
-{
-       regs->msr |= MSR_SE;
-}
-
-void
-kdba_clearsinglestep(struct pt_regs *regs)
-{
-       
-       regs->msr &= ~MSR_SE;
-}
-
-int
-kdba_getcurrentframe(struct pt_regs *regs)
-{
-       regs->gpr[1] = getsp();
-       /* this stack pointer becomes invalid after we return, so take another step back.  */
-       regs->gpr[1] = kdba_getword(regs->gpr[1], 8);
-       return 0;
-}
-
-#ifdef KDB_HAVE_LONGJMP
-int
-kdba_setjmp(kdb_jmp_buf *buf)
-{
-    asm volatile (
-       "mflr 0; std 0,0(%0)\n\
-        std    1,8(%0)\n\
-        std    2,16(%0)\n\
-        mfcr 0; std 0,24(%0)\n\
-        std    13,32(%0)\n\
-        std    14,40(%0)\n\
-        std    15,48(%0)\n\
-        std    16,56(%0)\n\
-        std    17,64(%0)\n\
-        std    18,72(%0)\n\
-        std    19,80(%0)\n\
-        std    20,88(%0)\n\
-        std    21,96(%0)\n\
-        std    22,104(%0)\n\
-        std    23,112(%0)\n\
-        std    24,120(%0)\n\
-        std    25,128(%0)\n\
-        std    26,136(%0)\n\
-        std    27,144(%0)\n\
-        std    28,152(%0)\n\
-        std    29,160(%0)\n\
-        std    30,168(%0)\n\
-        std    31,176(%0)\n\
-        " : : "r" (buf));
-    KDB_STATE_SET(LONGJMP);
-    return 0;
-}
-
-void
-kdba_longjmp(kdb_jmp_buf *buf, int val)
-{
-    if (val == 0)
-       val = 1;
-    asm volatile (
-       "ld     13,32(%0)\n\
-        ld     14,40(%0)\n\
-        ld     15,48(%0)\n\
-        ld     16,56(%0)\n\
-        ld     17,64(%0)\n\
-        ld     18,72(%0)\n\
-        ld     19,80(%0)\n\
-        ld     20,88(%0)\n\
-        ld     21,96(%0)\n\
-        ld     22,104(%0)\n\
-        ld     23,112(%0)\n\
-        ld     24,120(%0)\n\
-        ld     25,128(%0)\n\
-        ld     26,136(%0)\n\
-        ld     27,144(%0)\n\
-        ld     28,152(%0)\n\
-        ld     29,160(%0)\n\
-        ld     30,168(%0)\n\
-        ld     31,176(%0)\n\
-        ld     0,24(%0)\n\
-        mtcrf  0x38,0\n\
-        ld     0,0(%0)\n\
-        ld     1,8(%0)\n\
-        ld     2,16(%0)\n\
-        mtlr   0\n\
-        mr     3,%1\n\
-        " : : "r" (buf), "r" (val));
-}
-#endif
-
-/*
- * kdba_enable_mce
- *
- *     This function is called once on each CPU to enable machine
- *     check exception handling.
- *
- * Inputs:
- *     None.
- * Outputs:
- *     None.
- * Returns:
- *     None.
- * Locking:
- *     None.
- * Remarks:
- *
- */
-
-void
-kdba_enable_mce(void)
-{
-}
-
-/*
- * kdba_enable_lbr
- *
- *     Enable last branch recording.
- *
- * Parameters:
- *     None.
- * Returns:
- *     None
- * Locking:
- *     None
- * Remarks:
- *     None.
- */
-
-void
-kdba_enable_lbr(void)
-{
-}
-
-/*
- * kdba_disable_lbr
- *
- *     disable last branch recording.
- *
- * Parameters:
- *     None.
- * Returns:
- *     None
- * Locking:
- *     None
- * Remarks:
- *     None.
- */
-
-void
-kdba_disable_lbr(void)
-{
-}
-
-/*
- * kdba_print_lbr
- *
- *     Print last branch and last exception addresses
- *
- * Parameters:
- *     None.
- * Returns:
- *     None
- * Locking:
- *     None
- * Remarks:
- *     None.
- */
-
-void
-kdba_print_lbr(void)
-{
-}
-
-/*
- * kdba_getword
- *
- *     Architecture specific function to access kernel virtual
- *     address space.
- *
- * Parameters:
- *     None.
- * Returns:
- *     None.
- * Locking:
- *     None.
- * Remarks:
- *     None.
- */
-
-/*     if (access_ok(VERIFY_READ,__gu_addr,size))                      \ */
-extern inline void sync(void)
-{
-       asm volatile("sync; isync");
-}
-
-extern void (*debugger_fault_handler)(struct pt_regs *);
-extern void longjmp(u_int *, int);
-
-unsigned long
-kdba_getword(unsigned long addr, size_t width)
-{
-       /*
-        * This function checks the address for validity.  Any address
-        * in the range PAGE_OFFSET to high_memory is legal, any address
-        * which maps to a vmalloc region is legal, and any address which
-        * is a user address, we use get_user() to verify validity.
-        */
-
-    if (!valid_ppc64_kernel_address(addr, width)) {
-                       /*
-                        * Would appear to be an illegal kernel address;
-                        * Print a message once, and don't print again until
-                        * a legal address is used.
-                        */
-                       if (!KDB_STATE(SUPPRESS)) {
-                               kdb_printf("    kdb: Not a kernel-space address 0x%lx \n",addr);
-                               KDB_STATE_SET(SUPPRESS);
-                       }
-                       return 0L;
-       }
-
-
-       /*
-        * A good address.  Reset error flag.
-        */
-       KDB_STATE_CLEAR(SUPPRESS);
-
-       switch (width) {
-       case 8:
-       {       unsigned long *lp;
-
-               lp = (unsigned long *)(addr);
-               return *lp;
-       }
-       case 4:
-       {       unsigned int *ip;
-
-               ip = (unsigned int *)(addr);
-               return *ip;
-       }
-       case 2:
-       {       unsigned short *sp;
-
-               sp = (unsigned short *)(addr);
-               return *sp;
-       }
-       case 1:
-       {       unsigned char *cp;
-
-               cp = (unsigned char *)(addr);
-               return *cp;
-       }
-       }
-
-       kdb_printf("kdbgetword: Bad width\n");
-       return 0L;
-}
-
-
-
-/*
- * kdba_putword
- *
- *     Architecture specific function to access kernel virtual
- *     address space.
- *
- * Parameters:
- *     None.
- * Returns:
- *     None.
- * Locking:
- *     None.
- * Remarks:
- *     None.
- */
-
-unsigned long
-kdba_putword(unsigned long addr, size_t size, unsigned long contents)
-{
-       /*
-        * This function checks the address for validity.  Any address
-        * in the range PAGE_OFFSET to high_memory is legal, any address
-        * which maps to a vmalloc region is legal, and any address which
-        * is a user address, we use get_user() to verify validity.
-        */
-
-       if (addr < PAGE_OFFSET) {
-               /*
-                * Usermode address.
-                */
-               unsigned long diag;
-
-               switch (size) {
-               case 4:
-               {       unsigned long *lp;
-
-                       lp = (unsigned long *) addr;
-                       diag = put_user(contents, lp);
-                       break;
-               }
-               case 2:
-               {       unsigned short *sp;
-
-                       sp = (unsigned short *) addr;
-                       diag = put_user(contents, sp);
-                       break;
-               }
-               case 1:
-               {       unsigned char *cp;
-
-                       cp = (unsigned char *) addr;
-                       diag = put_user(contents, cp);
-                       break;
-               }
-               default:
-                       kdb_printf("kdba_putword: Bad width\n");
-                       return 0;
-               }
-
-               if (diag) {
-                       if (!KDB_STATE(SUPPRESS)) {
-                               kdb_printf("kdb: Bad user address 0x%lx\n", addr);
-                               KDB_STATE_SET(SUPPRESS);
-                       }
-                       return 0;
-               }
-               KDB_STATE_CLEAR(SUPPRESS);
-               return 0;
-       }
-
-#if 0
-       if (addr > (unsigned long)high_memory) {
-               if (!kdb_vmlist_check(addr, addr+size)) {
-                       /*
-                        * Would appear to be an illegal kernel address;
-                        * Print a message once, and don't print again until
-                        * a legal address is used.
-                        */
-                       if (!KDB_STATE(SUPPRESS)) {
-                               kdb_printf("kdb: xx Bad kernel address 0x%lx\n", addr);
-                               KDB_STATE_SET(SUPPRESS);
-                       }
-                       return 0L;
-               }
-       }
-#endif
-
-       /*
-        * A good address.  Reset error flag.
-        */
-       KDB_STATE_CLEAR(SUPPRESS);
-
-       switch (size) {
-       case 4:
-       {       unsigned long *lp;
-
-               lp = (unsigned long *)(addr);
-               *lp = contents;
-               return 0;
-       }
-       case 2:
-       {       unsigned short *sp;
-
-               sp = (unsigned short *)(addr);
-               *sp = (unsigned short) contents;
-               return 0;
-       }
-       case 1:
-       {       unsigned char *cp;
-
-               cp = (unsigned char *)(addr);
-               *cp = (unsigned char) contents;
-               return 0;
-       }
-       }
-
-       kdb_printf("kdba_putword: Bad width 0x%lx\n",size);
-       return 0;
-}
-
-/*
- * kdba_callback_die
- *
- *     Callback function for kernel 'die' function.
- *
- * Parameters:
- *     regs    Register contents at time of trap
- *     error_code  Trap-specific error code value
- *     trapno  Trap number
- *     vp      Pointer to die message
- * Returns:
- *     Returns 1 if fault handled by kdb.
- * Locking:
- *     None.
- * Remarks:
- *
- */
-int
-kdba_callback_die(struct pt_regs *regs, int error_code, long trapno, void *vp)
-{
-       /*
-        * Save a pointer to the message provided to 'die()'.
-        */
-       kdb_diemsg = (char *)vp;
-
-       return kdb(KDB_REASON_OOPS, error_code, (kdb_eframe_t) regs);
-}
-
-/*
- * kdba_callback_bp
- *
- *     Callback function for kernel breakpoint trap.
- *
- * Parameters:
- *     regs    Register contents at time of trap
- *     error_code  Trap-specific error code value
- *     trapno  Trap number
- *     vp      Not Used.
- * Returns:
- *     Returns 1 if fault handled by kdb.
- * Locking:
- *     None.
- * Remarks:
- *
- */
-
-int
-kdba_callback_bp(struct pt_regs *regs, int error_code, long trapno, void *vp)
-{
-       int diag;
-
-       if (KDB_DEBUG(BP))
-               kdb_printf("cb_bp: e_c = %d  tn = %ld regs = 0x%p\n", error_code,
-                          trapno, regs);
-
-       diag = kdb(KDB_REASON_BREAK, error_code, (kdb_eframe_t) regs);
-
-       if (KDB_DEBUG(BP))
-               kdb_printf("cb_bp: e_c = %d  tn = %ld regs = 0x%p diag = %d\n", error_code,
-                          trapno, regs, diag);
-       return diag;
-}
-
-/*
- * kdba_callback_debug
- *
- *     Callback function for kernel debug register trap.
- *
- * Parameters:
- *     regs    Register contents at time of trap
- *     error_code  Trap-specific error code value
- *     trapno  Trap number
- *     vp      Not used.
- * Returns:
- *     Returns 1 if fault handled by kdb.
- * Locking:
- *     None.
- * Remarks:
- *
- */
-
-int
-kdba_callback_debug(struct pt_regs *regs, int error_code, long trapno, void *vp)
-{
-       return kdb(KDB_REASON_DEBUG, error_code, (kdb_eframe_t) regs);
-}
-
-
-
-
-/*
- * kdba_adjust_ip
- *
- *     Architecture specific adjustment of instruction pointer before leaving
- *     kdb.
- *
- * Parameters:
- *     reason          The reason KDB was invoked
- *     error           The hardware-defined error code
- *     ef              The exception frame at time of fault/breakpoint.  If reason
- *                     is KDB_REASON_SILENT then ef is NULL, otherwise it should
- *                     always be valid.
- * Returns:
- *     None.
- * Locking:
- *     None.
- * Remarks:
- *     noop on ix86.
- */
-
-void
-kdba_adjust_ip(kdb_reason_t reason, int error, kdb_eframe_t ef)
-{
-       return;
-}
-
-
-
-/*
- * kdba_find_tb_table
- *
- *     Find the traceback table (defined by the ELF64 ABI) located at
- *     the end of the function containing pc.
- *
- * Parameters:
- *     nip     starting instruction addr.  does not need to be at the start of the func.
- *     tab     table to populate if successful
- * Returns:
- *     non-zero if successful.  unsuccessful means that a valid tb table was not found
- * Locking:
- *     None.
- * Remarks:
- *     None.
- */
-int kdba_find_tb_table(kdb_machreg_t nip, kdbtbtable_t *tab)
-{
-       kdb_machreg_t codeaddr = nip;
-       kdb_machreg_t codeaddr_max;
-       kdb_machreg_t tbtab_start;
-       int instr;
-       int num_parms;
-
-       if (tab == NULL)
-               return 0;
-       memset(tab, 0, sizeof(tab));
-
-       if (nip < PAGE_OFFSET) {  /* this is gonna fail for userspace, at least for now.. */
-           return 0;
-       }
-
-       /* Scan instructions starting at codeaddr for 128k max */
-       for (codeaddr_max = codeaddr + 128*1024*4;
-            codeaddr < codeaddr_max;
-            codeaddr += 4) {
-               instr = kdba_getword(codeaddr, 4);
-               if (instr == 0) {
-                       /* table should follow. */
-                       int version;
-                       unsigned long flags;
-                       tbtab_start = codeaddr; /* save it to compute func start addr */
-                       codeaddr += 4;
-                       flags = kdba_getword(codeaddr, 8);
-                       tab->flags = flags;
-                       version = (flags >> 56) & 0xff;
-                       if (version != 0)
-                               continue;       /* No tb table here. */
-                       /* Now, like the version, some of the flags are values
-                        that are more conveniently extracted... */
-                       tab->fp_saved = (flags >> 24) & 0x3f;
-                       tab->gpr_saved = (flags >> 16) & 0x3f;
-                       tab->fixedparms = (flags >> 8) & 0xff;
-                       tab->floatparms = (flags >> 1) & 0x7f;
-                       codeaddr += 8;
-                       num_parms = tab->fixedparms + tab->floatparms;
-                       if (num_parms) {
-                               unsigned int parminfo;
-                               int parm;
-                               if (num_parms > 32)
-                                       return 1;       /* incomplete */
-                               parminfo = kdba_getword(codeaddr, 4);
-                               /* decode parminfo...32 bits.
-                                A zero means fixed.  A one means float and the
-                                following bit determines single (0) or double (1).
-                                */
-                               for (parm = 0; parm < num_parms; parm++) {
-                                       if (parminfo & 0x80000000) {
-                                               parminfo <<= 1;
-                                               if (parminfo & 0x80000000)
-                                                       tab->parminfo[parm] = KDBTBTAB_PARMDFLOAT;
-                                               else
-                                                       tab->parminfo[parm] = KDBTBTAB_PARMSFLOAT;
-                                       } else {
-                                               tab->parminfo[parm] = KDBTBTAB_PARMFIXED;
-                                       }
-                                       parminfo <<= 1;
-                               }
-                               codeaddr += 4;
-                       }
-                       if (flags & KDBTBTAB_FLAGSHASTBOFF) {
-                               tab->tb_offset = kdba_getword(codeaddr, 4);
-                               if (tab->tb_offset > 0) {
-                                       tab->funcstart = tbtab_start - tab->tb_offset;
-                               }
-                               codeaddr += 4;
-                       }
-                       /* hand_mask appears to be always be omitted. */
-                       if (flags & KDBTBTAB_FLAGSHASCTL) {
-                               /* Assume this will never happen for C or asm */
-                               return 1;       /* incomplete */
-                       }
-                       if (flags & KDBTBTAB_FLAGSNAMEPRESENT) {
-                               int i;
-                               short namlen = kdba_getword(codeaddr, 2);
-                               if (namlen >= sizeof(tab->name))
-                                       namlen = sizeof(tab->name)-1;
-                               codeaddr += 2;
-                               for (i = 0; i < namlen; i++) {
-                                       tab->name[i] = kdba_getword(codeaddr++, 1);
-                               }
-                               tab->name[namlen] = '\0';
-                       }
-                       /* Fake up a symtab entry in case the caller finds it useful */
-                       tab->symtab.value = tab->symtab.sym_start = tab->funcstart;
-                       tab->symtab.sym_name = tab->name;
-                       tab->symtab.sym_end = tbtab_start;
-                       return 1;
-               }
-       }
-       return 0;       /* hit max...sorry. */
-}
-
-int
-kdba_putarea_size(unsigned long to_xxx, void *from, size_t size)
-{
-    char c;
-    c = *((volatile char *)from);
-    c = *((volatile char *)from+size-1);
-    return __copy_to_user((void *)to_xxx,from,size);
-}
-
-
-
-/*
- * valid_ppc64_kernel_address() returns '1' if the address passed in is
- * within a valid range.  Function returns 0 if address is outside valid ranges.
- */
-
-/*
-
-    KERNELBASE    c000000000000000
-        (good range)
-    high_memory   c0000000 20000000
-
-    VMALLOC_START d000000000000000
-        (good range)
-    VMALLOC_END   VMALLOC_START + VALID_EA_BITS  
-
-    IMALLOC_START e000000000000000
-        (good range)
-    IMALLOC_END   IMALLOC_START + VALID_EA_BITS
-
-*/
-
-int
-valid_ppc64_kernel_address(unsigned long addr, unsigned long size)
-{
-       unsigned long i;
-       unsigned long end = (addr + size - 1);  
-
-       int userspace_enabled=0;
-
-/* set USERSPACE=1 to enable userspace memory lookups*/
-       kdbgetintenv("USERSPACE", &userspace_enabled);  
-
-       for (i = addr; i <= end; i = i ++ ) {
-           if (
-               (!userspace_enabled &&
-                ((unsigned long)i < (unsigned long)KERNELBASE     ))  ||               
-               (((unsigned long)i > (unsigned long)high_memory) &&
-                ((unsigned long)i < (unsigned long)VMALLOC_START) )  ||
-               (((unsigned long)i > (unsigned long)VMALLOC_END) &&
-                ((unsigned long)i < (unsigned long)IMALLOC_START) )  ||
-               ( (unsigned long)i > (unsigned long)IMALLOC_END    )       ) {
-               return 0;
-           }
-       }
-       return 1;
-}
-
-
-int
-kdba_getarea_size(void *to, unsigned long from_xxx, size_t size)
-{
-       int is_valid_kern_addr = valid_ppc64_kernel_address(from_xxx, size);
-       int diag = 0;
-
-       *((volatile char *)to) = '\0';
-       *((volatile char *)to + size - 1) = '\0';
-
-       if (is_valid_kern_addr) {
-               memcpy(to, (void *)from_xxx, size);
-       } else {
-            /*  user space address, just return.  */
-           diag = -1;
-       }
-
-       return diag;
-}
-
-
-
-/*
- *  kdba_readarea_size, reads size-lump of memory into to* passed in, returns size.
- * Making it feel a bit more like mread.. when i'm clearer on kdba end, probally will
- * remove one of these.
- */
-int
-kdba_readarea_size(unsigned long from_xxx,void *to, size_t size)
-{
-    int is_valid_kern_addr = valid_ppc64_kernel_address(from_xxx, size);
-
-    *((volatile char *)to) = '\0';
-    *((volatile char *)to + size - 1) = '\0';
-
-    if (is_valid_kern_addr) {
-       memcpy(to, (void *)from_xxx, size);
-       return size;
-    } else {
-       /*  user-space, just return...    */
-       return 0;
-    }
-    /* wont get here */
-    return 0;
-}
-
-
-/* utilities migrated from Xmon or other kernel debug tools. */
-
-/*
-Notes for migrating functions from xmon...
-Add functions to this file.  parmlist for functions must match
-   (int argc, const char **argv, const char **envp, struct pt_regs *fp)
-add function prototype to kdbasupport.c
-add function hook to kdba_init() within kdbasupport.c
-
-Common bits...
-mread() function calls need to be changed to kdba_readarea_size calls.  straightforward change.
-This:
-       nr = mread(codeaddr, &namlen, 2); 
-becomes this:
-       nr = kdba_readarea_size(codeaddr,&namlen,2);
-*/
-
-#define EOF    (-1)
-
-/* for traverse_all_pci_devices */
-#include "../kernel/pci.h"
-/* for NUM_TCE_LEVELS */
-#include <asm/pci_dma.h>
-
-
-/* prototypes */
-int scanhex(unsigned long *);
-int hexdigit(int c);
-/* int kdba_readarea_size(unsigned long from_xxx,void *to,  size_t size); */
-void machine_halt(void); 
-
-
-
-/*
- A traceback table typically follows each function.
- The find_tb_table() func will fill in this struct.  Note that the struct
- is not an exact match with the encoded table defined by the ABI.  It is
- defined here more for programming convenience.
- */
-struct tbtable {
-       unsigned long   flags;          /* flags: */
-#define TBTAB_FLAGSGLOBALLINK  (1L<<47)
-#define TBTAB_FLAGSISEPROL     (1L<<46)
-#define TBTAB_FLAGSHASTBOFF    (1L<<45)
-#define TBTAB_FLAGSINTPROC     (1L<<44)
-#define TBTAB_FLAGSHASCTL      (1L<<43)
-#define TBTAB_FLAGSTOCLESS     (1L<<42)
-#define TBTAB_FLAGSFPPRESENT   (1L<<41)
-#define TBTAB_FLAGSNAMEPRESENT (1L<<38)
-#define TBTAB_FLAGSUSESALLOCA  (1L<<37)
-#define TBTAB_FLAGSSAVESCR     (1L<<33)
-#define TBTAB_FLAGSSAVESLR     (1L<<32)
-#define TBTAB_FLAGSSTORESBC    (1L<<31)
-#define TBTAB_FLAGSFIXUP       (1L<<30)
-#define TBTAB_FLAGSPARMSONSTK  (1L<<0)
-       unsigned char   fp_saved;       /* num fp regs saved f(32-n)..f31 */
-       unsigned char   gpr_saved;      /* num gpr's saved */
-       unsigned char   fixedparms;     /* num fixed point parms */
-       unsigned char   floatparms;     /* num float parms */
-       unsigned char   parminfo[32];   /* types of args.  null terminated */
-#define TBTAB_PARMFIXED 1
-#define TBTAB_PARMSFLOAT 2
-#define TBTAB_PARMDFLOAT 3
-       unsigned int    tb_offset;      /* offset from start of func */
-       unsigned long   funcstart;      /* addr of start of function */
-       char            name[64];       /* name of function (null terminated)*/
-};
-
-
-static int find_tb_table(unsigned long codeaddr, struct tbtable *tab);
-
-
-/* Very cheap human name for vector lookup. */
-static
-const char *getvecname(unsigned long vec)
-{
-       char *ret;
-       switch (vec) {
-       case 0x100:     ret = "(System Reset)"; break; 
-       case 0x200:     ret = "(Machine Check)"; break; 
-       case 0x300:     ret = "(Data Access)"; break; 
-       case 0x400:     ret = "(Instruction Access)"; break; 
-       case 0x500:     ret = "(Hardware Interrupt)"; break; 
-       case 0x600:     ret = "(Alignment)"; break; 
-       case 0x700:     ret = "(Program Check)"; break; 
-       case 0x800:     ret = "(FPU Unavailable)"; break; 
-       case 0x900:     ret = "(Decrementer)"; break; 
-       case 0xc00:     ret = "(System Call)"; break; 
-       case 0xd00:     ret = "(Single Step)"; break; 
-       case 0xf00:     ret = "(Performance Monitor)"; break; 
-       default: ret = "";
-       }
-       return ret;
-}
-
-int
-kdba_halt(int argc, const char **argv, const char **envp, struct pt_regs *fp)
-{
-    kdb_printf("halting machine. ");
-    machine_halt();
-return 0;
-}
-
-
-int
-kdba_excprint(int argc, const char **argv, const char **envp, struct pt_regs *fp)
-{
-       struct task_struct *c;
-       struct tbtable tab;
-
-#ifdef CONFIG_SMP
-       kdb_printf("cpu %d: ", smp_processor_id());
-#endif /* CONFIG_SMP */
-
-       kdb_printf("Vector: %lx %s at  [%p]\n", fp->trap, getvecname(fp->trap), fp);
-       kdb_printf("    pc: %lx", fp->nip);
-       if (find_tb_table(fp->nip, &tab) && tab.name[0]) {
-               /* Got a nice name for it */
-               int delta = fp->nip - tab.funcstart;
-               kdb_printf(" (%s+0x%x)", tab.name, delta);
-       }
-       kdb_printf("\n");
-       kdb_printf("    lr: %lx", fp->link);
-       if (find_tb_table(fp->link, &tab) && tab.name[0]) {
-               /* Got a nice name for it */
-               int delta = fp->link - tab.funcstart;
-               kdb_printf(" (%s+0x%x)", tab.name, delta);
-       }
-       kdb_printf("\n");
-       kdb_printf("    sp: %lx\n", fp->gpr[1]);
-       kdb_printf("   msr: %lx\n", fp->msr);
-
-       if (fp->trap == 0x300 || fp->trap == 0x380 || fp->trap == 0x600) {
-               kdb_printf("   dar: %lx\n", fp->dar);
-               kdb_printf(" dsisr: %lx\n", fp->dsisr);
-       }
-
-       /* XXX: need to copy current or we die.  Why? */
-       c = current;
-       kdb_printf("  current = 0x%p\n", c);
-       kdb_printf("  paca    = 0x%p\n", get_paca());
-       if (c) {
-               kdb_printf("  current = %p, pid = %ld, comm = %s\n",
-                      c, (unsigned long)c->pid, (char *)c->comm);
-       }
-return 0;
-}
-
-
-/* Starting at codeaddr scan forward for a tbtable and fill in the
- given table.  Return non-zero if successful at doing something.
- */
-static int
-find_tb_table(unsigned long codeaddr, struct tbtable *tab)
-{
-       unsigned long codeaddr_max;
-       unsigned long tbtab_start;
-       int nr;
-       int instr;
-       int num_parms;
-
-       if (tab == NULL)
-               return 0;
-       memset(tab, 0, sizeof(tab));
-
-       /* Scan instructions starting at codeaddr for 128k max */
-       for (codeaddr_max = codeaddr + 128*1024*4;
-            codeaddr < codeaddr_max;
-            codeaddr += 4) {
-           nr=kdba_readarea_size(codeaddr,&instr,4);
-               if (nr != 4)
-                       return 0;       /* Bad read.  Give up promptly. */
-               if (instr == 0) {
-                       /* table should follow. */
-                       int version;
-                       unsigned long flags;
-                       tbtab_start = codeaddr; /* save it to compute func start addr */
-                       codeaddr += 4;
-                       nr = kdba_readarea_size(codeaddr,&flags,8);
-                       if (nr != 8)
-                               return 0;       /* Bad read or no tb table. */
-                       tab->flags = flags;
-                       version = (flags >> 56) & 0xff;
-                       if (version != 0)
-                               continue;       /* No tb table here. */
-                       /* Now, like the version, some of the flags are values
-                        that are more conveniently extracted... */
-                       tab->fp_saved = (flags >> 24) & 0x3f;
-                       tab->gpr_saved = (flags >> 16) & 0x3f;
-                       tab->fixedparms = (flags >> 8) & 0xff;
-                       tab->floatparms = (flags >> 1) & 0x7f;
-                       codeaddr += 8;
-                       num_parms = tab->fixedparms + tab->floatparms;
-                       if (num_parms) {
-                               unsigned int parminfo;
-                               int parm;
-                               if (num_parms > 32)
-                                       return 1;       /* incomplete */
-                               nr = kdba_readarea_size(codeaddr,&parminfo,4);
-                               if (nr != 4)
-                                       return 1;       /* incomplete */
-                               /* decode parminfo...32 bits.
-                                A zero means fixed.  A one means float and the
-                                following bit determines single (0) or double (1).
-                                */
-                               for (parm = 0; parm < num_parms; parm++) {
-                                       if (parminfo & 0x80000000) {
-                                               parminfo <<= 1;
-                                               if (parminfo & 0x80000000)
-                                                       tab->parminfo[parm] = TBTAB_PARMDFLOAT;
-                                               else
-                                                       tab->parminfo[parm] = TBTAB_PARMSFLOAT;
-                                       } else {
-                                               tab->parminfo[parm] = TBTAB_PARMFIXED;
-                                       }
-                                       parminfo <<= 1;
-                               }
-                               codeaddr += 4;
-                       }
-                       if (flags & TBTAB_FLAGSHASTBOFF) {
-                           nr = kdba_readarea_size(codeaddr,&tab->tb_offset,4);
-                               if (nr != 4)
-                                       return 1;       /* incomplete */
-                               if (tab->tb_offset > 0) {
-                                       tab->funcstart = tbtab_start - tab->tb_offset;
-                               }
-                               codeaddr += 4;
-                       }
-                       /* hand_mask appears to be always be omitted. */
-                       if (flags & TBTAB_FLAGSHASCTL) {
-                               /* Assume this will never happen for C or asm */
-                               return 1;       /* incomplete */
-                       }
-                       if (flags & TBTAB_FLAGSNAMEPRESENT) {
-                               short namlen;
-                               nr = kdba_readarea_size(codeaddr,&namlen,2);
-                               if (nr != 2)
-                                       return 1;       /* incomplete */
-                               if (namlen >= sizeof(tab->name))
-                                       namlen = sizeof(tab->name)-1;
-                               codeaddr += 2;
-                               nr = kdba_readarea_size(codeaddr,tab->name,namlen);
-                               tab->name[namlen] = '\0';
-                               codeaddr += namlen;
-                       }
-                       return 1;
-               }
-       }
-       return 0;       /* hit max...sorry. */
-}
-
-
-int
-kdba_dissect_msr(int argc, const char **argv, const char **envp, struct pt_regs *regs)
-{
-   long int msr;
-
-   if (argc==0)
-       msr = regs->msr;
-/*       msr = get_msr(); */
-    else 
-       kdbgetularg(argv[1], &msr);
-
-   kdb_printf("msr: %lx (",msr);
-   {
-       if (msr & MSR_SF)   kdb_printf("SF ");
-       if (msr & MSR_ISF)  kdb_printf("ISF ");
-       if (msr & MSR_HV)   kdb_printf("HV ");
-       if (msr & MSR_VEC)  kdb_printf("VEC ");
-       if (msr & MSR_POW)  kdb_printf("POW/");  /* pow/we share */
-       if (msr & MSR_WE)   kdb_printf("WE ");
-       if (msr & MSR_TGPR) kdb_printf("TGPR/"); /* tgpr/ce share */
-       if (msr & MSR_CE)   kdb_printf("CE ");
-       if (msr & MSR_ILE)  kdb_printf("ILE ");
-       if (msr & MSR_EE)   kdb_printf("EE ");
-       if (msr & MSR_PR)   kdb_printf("PR ");
-       if (msr & MSR_FP)   kdb_printf("FP ");
-       if (msr & MSR_ME)   kdb_printf("ME ");
-       if (msr & MSR_FE0)  kdb_printf("FE0 ");
-       if (msr & MSR_SE)   kdb_printf("SE ");
-       if (msr & MSR_BE)   kdb_printf("BE/");   /* be/de share */
-       if (msr & MSR_DE)   kdb_printf("DE ");
-       if (msr & MSR_FE1)  kdb_printf("FE1 ");
-       if (msr & MSR_IP)   kdb_printf("IP ");
-       if (msr & MSR_IR)   kdb_printf("IR ");
-       if (msr & MSR_DR)   kdb_printf("DR ");
-       if (msr & MSR_PE)   kdb_printf("PE ");
-       if (msr & MSR_PX)   kdb_printf("PX ");
-       if (msr & MSR_RI)   kdb_printf("RI ");
-       if (msr & MSR_LE)   kdb_printf("LE ");
-   }
-   kdb_printf(")\n");
-
-   if (msr & MSR_SF)   kdb_printf(" 64 bit mode enabled \n");
-   if (msr & MSR_ISF)  kdb_printf(" Interrupt 64b mode valid on 630 \n");
-   if (msr & MSR_HV)   kdb_printf(" Hypervisor State \n");
-   if (msr & MSR_VEC)  kdb_printf(" Enable Altivec \n");
-   if (msr & MSR_POW)  kdb_printf(" Enable Power Management  \n");
-   if (msr & MSR_WE)   kdb_printf(" Wait State Enable   \n");
-   if (msr & MSR_TGPR) kdb_printf(" TLB Update registers in use   \n");
-   if (msr & MSR_CE)   kdb_printf(" Critical Interrupt Enable   \n");
-   if (msr & MSR_ILE)  kdb_printf(" Interrupt Little Endian   \n");
-   if (msr & MSR_EE)   kdb_printf(" External Interrupt Enable   \n");
-   if (msr & MSR_PR)   kdb_printf(" Problem State / Privilege Level  \n"); 
-   if (msr & MSR_FP)   kdb_printf(" Floating Point enable   \n");
-   if (msr & MSR_ME)   kdb_printf(" Machine Check Enable   \n");
-   if (msr & MSR_FE0)  kdb_printf(" Floating Exception mode 0  \n"); 
-   if (msr & MSR_SE)   kdb_printf(" Single Step   \n");
-   if (msr & MSR_BE)   kdb_printf(" Branch Trace   \n");
-   if (msr & MSR_DE)   kdb_printf(" Debug Exception Enable   \n");
-   if (msr & MSR_FE1)  kdb_printf(" Floating Exception mode 1   \n");
-   if (msr & MSR_IP)   kdb_printf(" Exception prefix 0x000/0xFFF   \n");
-   if (msr & MSR_IR)   kdb_printf(" Instruction Relocate   \n");
-   if (msr & MSR_DR)   kdb_printf(" Data Relocate   \n");
-   if (msr & MSR_PE)   kdb_printf(" Protection Enable   \n");
-   if (msr & MSR_PX)   kdb_printf(" Protection Exclusive Mode   \n");
-   if (msr & MSR_RI)   kdb_printf(" Recoverable Exception   \n");
-   if (msr & MSR_LE)   kdb_printf(" Little Endian   \n");
-   kdb_printf(".\n");
-
-return 0;
-}
-
-int
-kdba_super_regs(int argc, const char **argv, const char **envp, struct pt_regs *regs){
-       int i;
-       struct paca_struct*  ptrPaca = NULL;
-       struct ItLpPaca*  ptrLpPaca = NULL;
-       struct ItLpRegSave*  ptrLpRegSave = NULL;
-
-       {
-               unsigned long sp, toc;
-               kdb_printf("sr::");
-               asm("mr %0,1" : "=r" (sp) :);
-               asm("mr %0,2" : "=r" (toc) :);
-
-               kdb_printf("msr  = %.16lx  sprg0= %.16lx\n", get_msr(), get_sprg0());
-               kdb_printf("pvr  = %.16lx  sprg1= %.16lx\n", get_pvr(), get_sprg1()); 
-               kdb_printf("dec  = %.16lx  sprg2= %.16lx\n", get_dec(), get_sprg2());
-               kdb_printf("sp   = %.16lx  sprg3= %.16lx\n", sp, get_sprg3());
-               kdb_printf("toc  = %.16lx  dar  = %.16lx\n", toc, get_dar());
-               kdb_printf("srr0 = %.16lx  srr1 = %.16lx\n", get_srr0(), get_srr1());
-               kdb_printf("asr  = %.16lx\n", mfasr());
-               for (i = 0; i < 8; ++i)
-                       kdb_printf("sr%.2ld = %.16lx  sr%.2ld = %.16lx\n", (long int)i, (unsigned long)get_sr(i), (long int)(i+8), (long unsigned int) get_sr(i+8));
-
-               // Dump out relevant Paca data areas.
-               kdb_printf("Paca: \n");
-               ptrPaca = (struct paca_struct*)get_sprg3();
-    
-               kdb_printf("  Local Processor Control Area (LpPaca): \n");
-               ptrLpPaca = ptrPaca->xLpPacaPtr;
-               kdb_printf("    Saved Srr0=%.16lx  Saved Srr1=%.16lx \n", ptrLpPaca->xSavedSrr0, ptrLpPaca->xSavedSrr1);
-               kdb_printf("    Saved Gpr3=%.16lx  Saved Gpr4=%.16lx \n", ptrLpPaca->xSavedGpr3, ptrLpPaca->xSavedGpr4);
-               kdb_printf("    Saved Gpr5=%.16lx \n", ptrLpPaca->xSavedGpr5);
-    
-               kdb_printf("  Local Processor Register Save Area (LpRegSave): \n");
-               ptrLpRegSave = ptrPaca->xLpRegSavePtr;
-               kdb_printf("    Saved Sprg0=%.16lx  Saved Sprg1=%.16lx \n", ptrLpRegSave->xSPRG0, ptrLpRegSave->xSPRG0);
-               kdb_printf("    Saved Sprg2=%.16lx  Saved Sprg3=%.16lx \n", ptrLpRegSave->xSPRG2, ptrLpRegSave->xSPRG3);
-               kdb_printf("    Saved Msr  =%.16lx  Saved Nia  =%.16lx \n", ptrLpRegSave->xMSR, ptrLpRegSave->xNIA);
-    
-               return 0;
-       } 
-}
-
-
-
-       
-int
-kdba_dump_tce_table(int argc, const char **argv, const char **envp, struct pt_regs *regs){
-    struct TceTable kt; 
-    long tce_table_address;
-    int nr;
-    int i,j,k;
-    int full,empty;
-    int fulldump=0;
-    u64 mapentry;
-    int totalpages;
-    int levelpages;
-
-    if (argc == 0) {
-       kdb_printf("need address\n");
-       return 0;
-    }
-    else 
-       kdbgetularg(argv[1], &tce_table_address);
-
-    if (argc==2)
-       if (strcmp(argv[2], "full") == 0) 
-           fulldump=1;
-
-    /* with address, read contents of memory and dump tce table. */
-    /* possibly making some assumptions on the depth and size of table..*/
-
-    nr = kdba_readarea_size(tce_table_address+0 ,&kt.busNumber,8);
-    nr = kdba_readarea_size(tce_table_address+8 ,&kt.size,8);
-    nr = kdba_readarea_size(tce_table_address+16,&kt.startOffset,8);
-    nr = kdba_readarea_size(tce_table_address+24,&kt.base,8);
-    nr = kdba_readarea_size(tce_table_address+32,&kt.index,8);
-    nr = kdba_readarea_size(tce_table_address+40,&kt.tceType,8);
-    nr = kdba_readarea_size(tce_table_address+48,&kt.lock,8);
-
-    kdb_printf("\n");
-    kdb_printf("TceTable at address %s:\n",argv[1]);
-    kdb_printf("BusNumber:   0x%x \n",(uint)kt.busNumber);
-    kdb_printf("size:        0x%x \n",(uint)kt.size);
-    kdb_printf("startOffset: 0x%x \n",(uint)kt.startOffset);
-    kdb_printf("base:        0x%x \n",(uint)kt.base);
-    kdb_printf("index:       0x%x \n",(uint)kt.index);
-    kdb_printf("tceType:     0x%x \n",(uint)kt.tceType);
-#ifdef CONFIG_SMP
-    kdb_printf("lock:        0x%x \n",(uint)kt.lock.lock);
-#endif
-
-    nr = kdba_readarea_size(tce_table_address+56,&kt.mlbm.maxLevel,8);
-    kdb_printf(" maxLevel:        0x%x \n",(uint)kt.mlbm.maxLevel);
-    totalpages=0;
-    for (i=0;i<NUM_TCE_LEVELS;i++) {
-       nr = kdba_readarea_size(tce_table_address+64+i*24,&kt.mlbm.level[i].numBits,8);
-       nr = kdba_readarea_size(tce_table_address+72+i*24,&kt.mlbm.level[i].numBytes,8);
-       nr = kdba_readarea_size(tce_table_address+80+i*24,&kt.mlbm.level[i].map,8);
-       kdb_printf("   level[%d]\n",i);
-       kdb_printf("   numBits:   0x%x\n",(uint)kt.mlbm.level[i].numBits);
-       kdb_printf("   numBytes:  0x%x\n",(uint)kt.mlbm.level[i].numBytes);
-       kdb_printf("   map*:      %p\n",kt.mlbm.level[i].map);
-
-        /* if these dont match, this might not be a valid tce table, so
-           dont try to iterate the map entries. */
-       if (kt.mlbm.level[i].numBits == 8*kt.mlbm.level[i].numBytes) {
-           full=0;empty=0;levelpages=0;
-           for (j=0;j<kt.mlbm.level[i].numBytes; j++) {
-               mapentry=0;
-               nr = kdba_readarea_size((long int)(kt.mlbm.level[i].map+j),&mapentry,1);
-               if (mapentry)
-                   full++;
-               else
-                   empty++;
-               if (mapentry && fulldump) {
-                   kdb_printf("0x%lx\n",mapentry);
-               }
-               for (k=0;(k<=64) && ((0x1UL<<k) <= mapentry);k++) {
-                   if ((0x1UL<<k) & mapentry) levelpages++;
-               }
-           }
-           kdb_printf("      full:0x%x empty:0x%x pages:0x%x\n",full,empty,levelpages);
-       } else {
-           kdb_printf("      numBits/numBytes mismatch..? \n");
-       }
-       totalpages+=levelpages;
-    }
-    kdb_printf("      Total pages:0x%x\n",totalpages);
-    kdb_printf("\n");
-    return 0;
-}
-
-int
-kdba_kernelversion(int argc, const char **argv, const char **envp, struct pt_regs *regs){
-    extern char *linux_banner;
-
-    kdb_printf("%s\n",linux_banner);
-
-    return 0;
-}
-
-
-static void * 
-kdba_dump_pci(struct device_node *dn, void *data)
-{
-    struct pci_controller *phb;
-    char *device_type;
-    char *status;
-
-    phb = (struct pci_controller *)data;
-    device_type = get_property(dn, "device_type", 0);
-    status = get_property(dn, "status", 0);
-
-    dn->phb = phb;
-    kdb_printf("dn:   %p \n",dn);
-    kdb_printf("    phb      : %p\n",dn->phb);
-    kdb_printf("    name     : %s\n",dn->name);
-    kdb_printf("    full_name: %s\n",dn->full_name);
-    kdb_printf("    busno    : 0x%x\n",dn->busno);
-    kdb_printf("    devfn    : 0x%x\n",dn->devfn);
-    kdb_printf("    tce_table: %p\n",dn->tce_table);
-    return NULL;
-}
-
-int
-kdba_dump_pci_info(int argc, const char **argv, const char **envp, struct pt_regs *regs){
-
-    kdb_printf("kdba_dump_pci_info\n");
-
-/* call this traverse function with my function pointer.. it takes care of traversing, my func just needs to parse the device info.. */
-    traverse_all_pci_devices(kdba_dump_pci);
-    return 0;
-}
-
-
-char *kdb_dumpall_cmds[] = {
-    "excp\n",
-    "bt\n",
-    "rd\n",
-    "dmesg\n",
-    "msr\n",
-    "superreg\n",
-    "pci_info\n",
-    "ps\n",
-    "cpu\n",
-    "set BTAPROMPT=none\n",
-    "bta\n",
-    0
-};
-
-char *kdb_dumpbasic_cmds[] = {
-    "excp\n",
-    "bt\n",
-    "rd\n",
-    "dmesg 25\n",
-    "msr\n",
-    "superreg\n",
-    "ps\n",
-    "cpu\n",
-    0
-};
-
-
-/* dump with "all" parm will dump all.  all other variations dump basic.  See the dump*_cmds defined above */
-int
-kdba_dump(int argc, const char **argv, const char **envp, struct pt_regs *fp)
-{
-    int i, diag;
-    kdb_printf("dump-all\n");
-    if ((argc==1)&& (strcmp(argv[1], "all")==0))       {
-       for (i = 0; kdb_dumpall_cmds[i]; ++i) {
-           kdb_printf("kdb_cmd[%d]%s: %s",
-                      i, " ", kdb_dumpall_cmds[i]);
-           diag = kdb_parse(kdb_dumpall_cmds[i], fp);
-           if (diag)
-               kdb_printf("command failed, kdb diag %d\n", diag);
-       }
-    } else {
-       kdb_printf("dump-basic\n");
-       for (i = 0; kdb_dumpbasic_cmds[i]; ++i) {
-           kdb_printf("kdb_cmd[%d]%s: %s",
-                      i, " ", kdb_dumpbasic_cmds[i]);
-           diag = kdb_parse(kdb_dumpbasic_cmds[i], fp);
-           if (diag)
-               kdb_printf("command failed, kdb diag %d\n", diag);
-       }
-    }
-    return 0;
-}
-
-
-/* Toggle the ppcdbg options.   kdb_parse tokenizes the parms, so need to account for that here.  */
-int
-kdba_ppcdbg(int argc, const char **argv, const char **envp, struct pt_regs *fp) {
-    extern char *trace_names[PPCDBG_NUM_FLAGS];
-
-    int i,j;
-    unsigned long mask;
-    int onoff;
-    if (argc==0)
-       goto ppcdbg_exit;
-
-    for (i=1;i<=argc;i++) {
-       onoff = 1;      /* default */
-       if (argv[i][0] == '+' || argv[i][0] == '-') {
-                       /* explicit on or off */
-           onoff = (argv[i][0] == '+');
-           argv[i]++;
-       }
-
-       for (j=0;j<PPCDBG_NUM_FLAGS;j++) {
-           if (trace_names[j] && strcmp(trace_names[j],argv[i])==0) {
-               /* have a match */
-               mask = (1 << j);
-               /* check special case */
-               if (strcmp(argv[i],"all")==0) {
-                   mask = PPCDBG_ALL;
-               }
-               if (mask) {
-                   if (onoff)
-                       naca->debug_switch |= mask;
-                   else
-                       naca->debug_switch &= ~mask;
-               }
-           } 
-       }
-    }
-    ppcdbg_exit:
-      kdb_printf("naca->debug_switch 0x%lx\n",naca->debug_switch);
-    return 0;
-}
-
-/* enable or disable surveillance.. based on rtasd.c function.
-  no arguments - display current timeout value.
-  one argument - 'off' or '0' turn off surveillance.
-               - '1-255' set surveillance timeout to argument. */
-int
-kdba_surveillance(int argc, const char **argv, const char **envp, struct pt_regs *fp)
-{
-    unsigned long timeout;
-    int ibm_indicator_token = 9000;
-    int error;
-    unsigned long ret;
-
-    if (argc==0) {
-       goto surveillance_status;
-    } else if (((argc==1)&& (strcmp(argv[1], "off")==0))) {
-       timeout=0;
-    } else {
-       kdbgetularg(argv[1], &timeout);
-    }
-
-    error = rtas_call(rtas_token("set-indicator"), 3, 1, &ret,
-                     ibm_indicator_token, 0, timeout);
-    /*    kdb_printf("Surveillance set-indicator returned value: 0x%x\n",ret); */
-
-    if (error) 
-       kdb_printf("surveillance rtas_call failure 0x%x \n",error);
-
-    surveillance_status:
-      rtas_call(rtas_token("get-sensor-state"), 2, 2, &ret, 
-               ibm_indicator_token, 
-               0/* instance */);
-    kdb_printf("Current surveillance timeout is %ld minutes%s",ret,
-              ret==0?" (disabled).\n":".\n");
-    return 0;
-}
-
-/* generic debugger() hooks into kdb.  These eliminate the need to add
-  ifdef CONFIG_KDB goop to traps.c and fault.c */
-
-void
-kdb_reset_debugger(struct pt_regs *regs) {
-    int cpu=smp_processor_id();
-    static int reset_cpu = -1;
-    static spinlock_t reset_lock = SPIN_LOCK_UNLOCKED;
-    spin_lock(&reset_lock);
-    if (reset_cpu == -1 || reset_cpu == cpu) {
-       reset_cpu = cpu;
-       spin_unlock(&reset_lock);
-       if (kdb_on) {
-           ppc64_attention_msg(0x3200+cpu,"KDB Call        ");
-           kdb(KDB_REASON_ENTER, regs->trap, (kdb_eframe_t) regs);
-           ppc64_attention_msg(0x3300+cpu,"KDB Done        ");
-       } else {
-           kdb_on=1;
-           kdb_do_reboot=1;
-           ppc64_attention_msg(0x3600+cpu,"KDB Enabled     ");
-           udelay(KDB_RESET_TIMEOUT);
-           kdb_on=0;
-           if (kdb_do_reboot) {
-               ppc64_attention_msg(0x3900+cpu,"Rebooting       ");
-               ppc_md.restart("rebooting...");
-               return; /* not reached */
-           } else {
-               ppc64_attention_msg(0x3800+cpu,"KDB skip reboot ");
-               return;
-           }
-       }
-    } else {
-       spin_unlock(&reset_lock);
-       return;
-    }
-}
-
-void
-kdb_debugger(struct pt_regs *regs) {
-    if (regs)
-       if (regs->trap==0x100) {
-           kdb_reset_debugger(regs);
-       } else
-           kdb(KDB_REASON_ENTER,regs->trap,regs);   /* ok */
-    else  /* regs invalid */
-       kdb(KDB_REASON_SILENT,0,regs);
-}
-
-int
-kdb_debugger_bpt(struct pt_regs *regs) {
-    if (regs)
-       return kdb(KDB_REASON_BREAK,regs->trap,regs);
-    else  /* regs invalid */
-       return kdb(KDB_REASON_SILENT,0,regs);
-}
-
-int
-kdb_debugger_sstep(struct pt_regs *regs) {
-    if (regs)
-       return kdb(KDB_REASON_DEBUG,regs->trap,regs); /* ok */
-    else  /* regs invalid */
-       return kdb(KDB_REASON_SILENT,0,regs);
-}
-
-int
-kdb_debugger_iabr_match(struct pt_regs *regs) {
-    if (regs)
-       return kdb(KDB_REASON_BREAK,regs->trap,regs);
-    else  /* regs invalid */
-       return kdb(KDB_REASON_SILENT,0,regs);
-}
-
-int
-kdb_debugger_dabr_match(struct pt_regs *regs) {
-    if (regs)
-       return kdb(KDB_REASON_BREAK,regs->trap,regs);
-    else  /* regs invalid */
-       return kdb(KDB_REASON_SILENT,0,regs);
-}
-
-void
-kdb_debugger_fault_handler(struct pt_regs *regs) {
-    if (regs)
-       kdb(KDB_REASON_FAULT,regs->trap,regs);
-    else  /* regs invalid */
-       kdb(KDB_REASON_SILENT,0,regs);
-    return;
-}
-
-
-
-int
-kdba_state(int argc, const char **argv, const char **envp, struct pt_regs *fp)
-{
-    int i;
-    for (i=0;i<NR_CPUS;i++) {
-       if ( kdb_state[i] != 0 ) {
-           kdb_printf("kdb_state[%d] = %x" ,i,kdb_state[i]);
-           kdb_printf(" [");
-           if KDB_STATE_CPU(KDB,i) kdb_printf("KDB,");
-           if KDB_STATE_CPU(LEAVING,i) kdb_printf("LEAVING,");
-           if KDB_STATE_CPU(CMD,i) kdb_printf("CMD,");
-           if KDB_STATE_CPU(KDB_CONTROL,i) kdb_printf("KDB_CONTROL,");
-           if KDB_STATE_CPU(HOLD_CPU,i) kdb_printf("HOLD_CPU,");
-           if KDB_STATE_CPU(DOING_SS,i) kdb_printf("DOING_SS,");
-           if KDB_STATE_CPU(DOING_SSB,i) kdb_printf("DOING_SSB,");
-           if KDB_STATE_CPU(SSBPT,i) kdb_printf("SSBPT,");
-           if KDB_STATE_CPU(REENTRY,i) kdb_printf("REENTRY,");
-           if KDB_STATE_CPU(SUPPRESS,i) kdb_printf("SUPPRESS,");
-           if KDB_STATE_CPU(LONGJMP,i) kdb_printf("LONGJMP,");
-           if KDB_STATE_CPU(PRINTF_LOCK,i) kdb_printf("PRINTF_LOCK,");
-           if KDB_STATE_CPU(WAIT_IPI,i) kdb_printf("WAIT_IPI,");
-           if KDB_STATE_CPU(RECURSE,i) kdb_printf("RECURSE,");
-           if KDB_STATE_CPU(IP_ADJUSTED,i) kdb_printf("IP_ADJUSTED,");
-           if KDB_STATE_CPU(NO_BP_DELAY,i) kdb_printf("NO_BP_DELAY");
-           kdb_printf("]\n");
-       }
-    }
-return 0;
-}
-
-
-/*
- * kdba_init
- *     Architecture specific initialization.
- */
-/*
-kdb_register("commandname",              # name of command user will use to invoke function  
-             function_name,              # name of function within the code 
-             "function example usage",   # sample usage 
-             "function description",     # brief description. 
-             0                           # if i hit enter again, will command repeat itself ?
-Note: functions must take parameters as such:
-functionname(int argc, const char **argv, const char **envp, struct pt_regs *regs)
-*/
-
-void __init
-kdba_init(void)
-{
-#ifdef CONFIG_MAGIC_SYSRQ
-       kdb_map_scc();          /* map sysrq key */
-#endif
-
-       debugger = kdb_debugger;
-       debugger_bpt = kdb_debugger_bpt;
-       debugger_sstep = kdb_debugger_sstep;
-       debugger_iabr_match = kdb_debugger_iabr_match;
-       debugger_dabr_match = kdb_debugger_dabr_match;
-       debugger_fault_handler = NULL; /* this guy is normally off. */
-                                   /* = kdb_debugger_fault_handler; */
-
-       kdba_enable_lbr();
-       kdb_register("excp", kdba_excprint, "excp", "print exception info", 0);
-       kdb_register("superreg", kdba_super_regs, "superreg", "display super_regs", 0);
-       kdb_register("msr", kdba_dissect_msr, "msr", "dissect msr", 0);
-       kdb_register("halt", kdba_halt, "halt", "halt machine", 0);
-       kdb_register("tce_table", kdba_dump_tce_table, "tce_table <addr> [full]", "dump the tce table located at <addr>", 0);
-       kdb_register("kernel", kdba_kernelversion, "version", "display running kernel version", 0);
-       kdb_register("pci_info", kdba_dump_pci_info, "dump_pci_info", "dump pci device info", 0);
-       kdb_register("dump", kdba_dump, "dump (all|basic)", "dump all info", 0); 
-       kdb_register("state", kdba_state, "state ", "dump state of all processors", 0); 
-       kdb_register("surv", kdba_surveillance, "surv [off|1-255] ", "disable/change surveillance timeout", 0); 
-       kdb_register("ppcdbg", kdba_ppcdbg, "ppcdbg (a,+b,-c)","toggle PPCDBG options",0);
-       if (!ppc_md.udbg_getc_poll)
-               kdb_on = 0;
-}
diff --git a/arch/ppc64/kdb/opintl.h b/arch/ppc64/kdb/opintl.h
deleted file mode 100644 (file)
index 492fc1a..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-/* opintl.h - opcodes specific header for gettext code.
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
-
-   Written by Tom Tromey <tromey@cygnus.com>
-
-   This file is part of the opcodes library used by GAS and the GNU binutils.
-
-   You should have received a copy of the GNU General Public License
-   along with GAS; see the file COPYING.  If not, write to the Free
-   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
-
-#ifdef ENABLE_NLS
-# include <libintl.h>
-/* Note the use of dgetext() and PACKAGE here, rather than gettext().
-   
-   This is because the code in this directory is used to build a library which
-   will be linked with code in other directories to form programs.  We want to
-   maintain a seperate translation file for this directory however, rather
-   than being forced to merge it with that of any program linked to
-   libopcodes.  This is a library, so it cannot depend on the catalog
-   currently loaded.
-
-   In order to do this, we have to make sure that when we extract messages we
-   use the OPCODES domain rather than the domain of the program that included
-   the opcodes library, (eg OBJDUMP).  Hence we use dgettext (PACKAGE, String)
-   and define PACKAGE to be 'opcodes'.  (See the code in configure).  */
-# define _(String) dgettext (PACKAGE, String)
-# ifdef gettext_noop
-#  define N_(String) gettext_noop (String)
-# else
-#  define N_(String) (String)
-# endif
-#else
-# define gettext(Msgid) (Msgid)
-# define dgettext(Domainname, Msgid) (Msgid)
-# define dcgettext(Domainname, Msgid, Category) (Msgid)
-# define textdomain(Domainname) while (0) /* nothing */
-# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
-# define _(String) (String)
-# define N_(String) (String)
-#endif
diff --git a/arch/ppc64/kdb/ppc-dis.c b/arch/ppc64/kdb/ppc-dis.c
deleted file mode 100644 (file)
index a69e6a9..0000000
+++ /dev/null
@@ -1,281 +0,0 @@
-/* ppc-dis.c -- Disassemble PowerPC instructions
-   Copyright 1994 Free Software Foundation, Inc.
-   Written by Ian Lance Taylor, Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-2, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-#ifdef __KERNEL__
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/dis-asm.h>
-#include <linux/kdb.h>
-#include "ppc.h"
-
-#if 0
-#include <setjmp.h>
-#endif
-
-#else
-#include <stdio.h>
-#include "sysdep.h"
-#include "dis-asm.h"
-#include "opcode/ppc.h"
-#endif
-bfd_vma
-bfd_getb32 (addr)
-     register const bfd_byte *addr;
-{
-  unsigned long v;
-
-  v = (unsigned long) addr[0] << 24;
-  v |= (unsigned long) addr[1] << 16;
-  v |= (unsigned long) addr[2] << 8;
-  v |= (unsigned long) addr[3];
-  return (bfd_vma) v;
-}
-
-bfd_vma
-bfd_getl32 (addr)
-     register const bfd_byte *addr;
-{
-  unsigned long v;
-
-  v = (unsigned long) addr[0];
-  v |= (unsigned long) addr[1] << 8;
-  v |= (unsigned long) addr[2] << 16;
-  v |= (unsigned long) addr[3] << 24;
-  return (bfd_vma) v;
-}
-/* This file provides several disassembler functions, all of which use
-   the disassembler interface defined in dis-asm.h.  Several functions
-   are provided because this file handles disassembly for the PowerPC
-   in both big and little endian mode and also for the POWER (RS/6000)
-   chip.  */
-
-static int print_insn_powerpc PARAMS ((bfd_vma, struct disassemble_info *,
-                                      int bigendian, int dialect));
-
-/* Print a big endian PowerPC instruction.  For convenience, also
-   disassemble instructions supported by the Motorola PowerPC 601
-   and the Altivec vector unit.  */
-
-int
-print_insn_big_powerpc (memaddr, info)
-     bfd_vma memaddr;
-     struct disassemble_info *info;
-{
-  return print_insn_powerpc (memaddr, info, 1,
-                            PPC_OPCODE_PPC | PPC_OPCODE_601 |
-                            PPC_OPCODE_ALTIVEC);
-}
-
-/* Print a little endian PowerPC instruction.  For convenience, also
-   disassemble instructions supported by the Motorola PowerPC 601
-   and the Altivec vector unit.  */
-
-int
-print_insn_little_powerpc (memaddr, info)
-     bfd_vma memaddr;
-     struct disassemble_info *info;
-{
-  return print_insn_powerpc (memaddr, info, 0,
-                            PPC_OPCODE_PPC | PPC_OPCODE_601 |
-                            PPC_OPCODE_ALTIVEC);
-}
-
-/* Print a POWER (RS/6000) instruction.  */
-
-int
-print_insn_rs6000 (memaddr, info)
-     bfd_vma memaddr;
-     struct disassemble_info *info;
-{
-  return print_insn_powerpc (memaddr, info, 1, PPC_OPCODE_POWER);
-}
-
-/* Print a PowerPC or POWER instruction.  */
-
-static int
-print_insn_powerpc (memaddr, info, bigendian, dialect)
-     bfd_vma memaddr;
-     struct disassemble_info *info;
-     int bigendian;
-     int dialect;
-{
-  bfd_byte buffer[4];
-  int status;
-  unsigned long insn;
-  const struct powerpc_opcode *opcode;
-  const struct powerpc_opcode *opcode_end;
-  unsigned long op;
-
-  (*info->fprintf_func) (info->stream, "  ");
-
-  status = (*info->read_memory_func) (memaddr, buffer, 4, info);
-  if (status != 0)
-    {
-      (*info->memory_error_func) (status, memaddr, info);
-      return -1;
-    }
-
-  if (bigendian)
-    insn = bfd_getb32 (buffer);
-  else
-    insn = bfd_getl32 (buffer);
-
-  /* Get the major opcode of the instruction.  */
-  op = PPC_OP (insn);
-
-  /* Find the first match in the opcode table.  We could speed this up
-     a bit by doing a binary search on the major opcode.  */
-  opcode_end = powerpc_opcodes + powerpc_num_opcodes;
-  for (opcode = powerpc_opcodes; opcode < opcode_end; opcode++)
-    {
-      unsigned long table_op;
-      const unsigned char *opindex;
-      const struct powerpc_operand *operand;
-      int invalid;
-      int need_comma;
-      int need_paren;
-
-      table_op = PPC_OP (opcode->opcode);
-      if (op < table_op)
-       break;
-      if (op > table_op)
-       continue;
-
-      if ((insn & opcode->mask) != opcode->opcode
-         || (opcode->flags & dialect) == 0)
-       continue;
-
-      /* Make two passes over the operands.  First see if any of them
-        have extraction functions, and, if they do, make sure the
-        instruction is valid.  */
-      invalid = 0;
-      for (opindex = opcode->operands; *opindex != 0; opindex++)
-       {
-         operand = powerpc_operands + *opindex;
-         if (operand->extract)
-           (*operand->extract) (insn, &invalid);
-       }
-      if (invalid)
-       continue;
-
-      /* The instruction is valid.  */
-      (*info->fprintf_func) (info->stream, "%-6s", opcode->name);
-      if (opcode->operands[0] != 0)
-       (*info->fprintf_func) (info->stream, "\t");
-
-      /* Now extract and print the operands.  */
-      need_comma = 0;
-      need_paren = 0;
-      for (opindex = opcode->operands; *opindex != 0; opindex++)
-       {
-         long value;
-
-         operand = powerpc_operands + *opindex;
-
-         /* Operands that are marked FAKE are simply ignored.  We
-            already made sure that the extract function considered
-            the instruction to be valid.  */
-         if ((operand->flags & PPC_OPERAND_FAKE) != 0)
-           continue;
-
-         /* Extract the value from the instruction.  */
-         if (operand->extract)
-           value = (*operand->extract) (insn, (int *) NULL);
-         else
-           {
-             value = (insn >> operand->shift) & ((1 << operand->bits) - 1);
-             if ((operand->flags & PPC_OPERAND_SIGNED) != 0
-                 && (value & (1 << (operand->bits - 1))) != 0)
-               value -= 1 << operand->bits;
-           }
-
-         /* If the operand is optional, and the value is zero, don't
-            print anything.  */
-         if ((operand->flags & PPC_OPERAND_OPTIONAL) != 0
-             && (operand->flags & PPC_OPERAND_NEXT) == 0
-             && value == 0)
-           continue;
-
-         if (need_comma)
-           {
-             (*info->fprintf_func) (info->stream, ",");
-             need_comma = 0;
-           }
-
-         /* Print the operand as directed by the flags.  */
-         if ((operand->flags & PPC_OPERAND_GPR) != 0)
-           (*info->fprintf_func) (info->stream, "r%ld", value);
-         else if ((operand->flags & PPC_OPERAND_FPR) != 0)
-           (*info->fprintf_func) (info->stream, "f%ld", value);
-         else if ((operand->flags & PPC_OPERAND_VR) != 0)
-           (*info->fprintf_func) (info->stream, "v%ld", value);
-         else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0)
-           (*info->print_address_func) (memaddr + value, info);
-         else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0)
-           (*info->print_address_func) ((bfd_vma) value & 0xffffffff, info);
-         else if ((operand->flags & PPC_OPERAND_CR) == 0
-                  || (dialect & PPC_OPCODE_PPC) == 0)
-           (*info->fprintf_func) (info->stream, "%ld", value);
-         else
-           {
-             if (operand->bits == 3)
-               (*info->fprintf_func) (info->stream, "cr%d", value);
-             else
-               {
-                 static const char *cbnames[4] = { "lt", "gt", "eq", "so" };
-                 int cr;
-                 int cc;
-
-                 cr = value >> 2;
-                 if (cr != 0)
-                   (*info->fprintf_func) (info->stream, "4*cr%d", cr);
-                 cc = value & 3;
-                 if (cc != 0)
-                   {
-                     if (cr != 0)
-                       (*info->fprintf_func) (info->stream, "+");
-                     (*info->fprintf_func) (info->stream, "%s", cbnames[cc]);
-                   }
-               }
-           }
-
-         if (need_paren)
-           {
-             (*info->fprintf_func) (info->stream, ")");
-             need_paren = 0;
-           }
-
-         if ((operand->flags & PPC_OPERAND_PARENS) == 0)
-           need_comma = 1;
-         else
-           {
-             (*info->fprintf_func) (info->stream, "(");
-             need_paren = 1;
-           }
-       }
-
-      /* We have found and printed an instruction; return.  */
-      return 4;
-    }
-
-  /* We could not find a match.  */
-  (*info->fprintf_func) (info->stream, ".long 0x%lx", insn);
-
-  return 4;
-}
diff --git a/arch/ppc64/kdb/ppc-opc.c b/arch/ppc64/kdb/ppc-opc.c
deleted file mode 100644 (file)
index 2c2f1f8..0000000
+++ /dev/null
@@ -1,3491 +0,0 @@
-/* ppc-opc.c -- PowerPC opcode list
-   Copyright (c) 1994, 95, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
-   Written by Ian Lance Taylor, Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-2, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.  */
-#ifndef __KERNEL__
-#include <stdio.h>
-#include "sysdep.h"
-#include "opcode/ppc.h"
-#include "opintl.h"
-#else
-#include <linux/kernel.h>
-#include <linux/string.h>
-#include <linux/dis-asm.h>
-#include <linux/kdb.h>
-#include "ppc.h"
-#include "opintl.h"
-#endif
-/* This file holds the PowerPC opcode table.  The opcode table
-   includes almost all of the extended instruction mnemonics.  This
-   permits the disassembler to use them, and simplifies the assembler
-   logic, at the cost of increasing the table size.  The table is
-   strictly constant data, so the compiler should be able to put it in
-   the .text section.
-
-   This file also holds the operand table.  All knowledge about
-   inserting operands into instructions and vice-versa is kept in this
-   file.  */
-\f
-/* Local insertion and extraction functions.  */
-
-static unsigned long insert_bat PARAMS ((unsigned long, long, const char **));
-static long extract_bat PARAMS ((unsigned long, int *));
-static unsigned long insert_bba PARAMS ((unsigned long, long, const char **));
-static long extract_bba PARAMS ((unsigned long, int *));
-static unsigned long insert_bd PARAMS ((unsigned long, long, const char **));
-static long extract_bd PARAMS ((unsigned long, int *));
-static unsigned long insert_bdm PARAMS ((unsigned long, long, const char **));
-static long extract_bdm PARAMS ((unsigned long, int *));
-static unsigned long insert_bdp PARAMS ((unsigned long, long, const char **));
-static long extract_bdp PARAMS ((unsigned long, int *));
-static int valid_bo PARAMS ((long));
-static unsigned long insert_bo PARAMS ((unsigned long, long, const char **));
-static long extract_bo PARAMS ((unsigned long, int *));
-static unsigned long insert_boe PARAMS ((unsigned long, long, const char **));
-static long extract_boe PARAMS ((unsigned long, int *));
-static unsigned long insert_ds PARAMS ((unsigned long, long, const char **));
-static long extract_ds PARAMS ((unsigned long, int *));
-static unsigned long insert_li PARAMS ((unsigned long, long, const char **));
-static long extract_li PARAMS ((unsigned long, int *));
-static unsigned long insert_mbe PARAMS ((unsigned long, long, const char **));
-static long extract_mbe PARAMS ((unsigned long, int *));
-static unsigned long insert_mb6 PARAMS ((unsigned long, long, const char **));
-static long extract_mb6 PARAMS ((unsigned long, int *));
-static unsigned long insert_nb PARAMS ((unsigned long, long, const char **));
-static long extract_nb PARAMS ((unsigned long, int *));
-static unsigned long insert_nsi PARAMS ((unsigned long, long, const char **));
-static long extract_nsi PARAMS ((unsigned long, int *));
-static unsigned long insert_ral PARAMS ((unsigned long, long, const char **));
-static unsigned long insert_ram PARAMS ((unsigned long, long, const char **));
-static unsigned long insert_ras PARAMS ((unsigned long, long, const char **));
-static unsigned long insert_rbs PARAMS ((unsigned long, long, const char **));
-static long extract_rbs PARAMS ((unsigned long, int *));
-static unsigned long insert_sh6 PARAMS ((unsigned long, long, const char **));
-static long extract_sh6 PARAMS ((unsigned long, int *));
-static unsigned long insert_spr PARAMS ((unsigned long, long, const char **));
-static long extract_spr PARAMS ((unsigned long, int *));
-static unsigned long insert_tbr PARAMS ((unsigned long, long, const char **));
-static long extract_tbr PARAMS ((unsigned long, int *));
-\f
-/* The operands table.
-
-   The fields are bits, shift, insert, extract, flags.
-
-   We used to put parens around the various additions, like the one
-   for BA just below.  However, that caused trouble with feeble
-   compilers with a limit on depth of a parenthesized expression, like
-   (reportedly) the compiler in Microsoft Developer Studio 5.  So we
-   omit the parens, since the macros are never used in a context where
-   the addition will be ambiguous.  */
-
-const struct powerpc_operand powerpc_operands[] =
-{
-  /* The zero index is used to indicate the end of the list of
-     operands.  */
-#define UNUSED 0
-  { 0, 0, 0, 0, 0 },
-
-  /* The BA field in an XL form instruction.  */
-#define BA UNUSED + 1
-#define BA_MASK (0x1f << 16)
-  { 5, 16, 0, 0, PPC_OPERAND_CR },
-
-  /* The BA field in an XL form instruction when it must be the same
-     as the BT field in the same instruction.  */
-#define BAT BA + 1
-  { 5, 16, insert_bat, extract_bat, PPC_OPERAND_FAKE },
-
-  /* The BB field in an XL form instruction.  */
-#define BB BAT + 1
-#define BB_MASK (0x1f << 11)
-  { 5, 11, 0, 0, PPC_OPERAND_CR },
-
-  /* The BB field in an XL form instruction when it must be the same
-     as the BA field in the same instruction.  */
-#define BBA BB + 1
-  { 5, 11, insert_bba, extract_bba, PPC_OPERAND_FAKE },
-
-  /* The BD field in a B form instruction.  The lower two bits are
-     forced to zero.  */
-#define BD BBA + 1
-  { 16, 0, insert_bd, extract_bd, PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
-
-  /* The BD field in a B form instruction when absolute addressing is
-     used.  */
-#define BDA BD + 1
-  { 16, 0, insert_bd, extract_bd, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
-
-  /* The BD field in a B form instruction when the - modifier is used.
-     This sets the y bit of the BO field appropriately.  */
-#define BDM BDA + 1
-  { 16, 0, insert_bdm, extract_bdm,
-      PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
-
-  /* The BD field in a B form instruction when the - modifier is used
-     and absolute address is used.  */
-#define BDMA BDM + 1
-  { 16, 0, insert_bdm, extract_bdm,
-      PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
-
-  /* The BD field in a B form instruction when the + modifier is used.
-     This sets the y bit of the BO field appropriately.  */
-#define BDP BDMA + 1
-  { 16, 0, insert_bdp, extract_bdp,
-      PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
-
-  /* The BD field in a B form instruction when the + modifier is used
-     and absolute addressing is used.  */
-#define BDPA BDP + 1
-  { 16, 0, insert_bdp, extract_bdp,
-      PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
-
-  /* The BF field in an X or XL form instruction.  */
-#define BF BDPA + 1
-  { 3, 23, 0, 0, PPC_OPERAND_CR },
-
-  /* An optional BF field.  This is used for comparison instructions,
-     in which an omitted BF field is taken as zero.  */
-#define OBF BF + 1
-  { 3, 23, 0, 0, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
-
-  /* The BFA field in an X or XL form instruction.  */
-#define BFA OBF + 1
-  { 3, 18, 0, 0, PPC_OPERAND_CR },
-
-  /* The BI field in a B form or XL form instruction.  */
-#define BI BFA + 1
-#define BI_MASK (0x1f << 16)
-  { 5, 16, 0, 0, PPC_OPERAND_CR },
-
-  /* The BO field in a B form instruction.  Certain values are
-     illegal.  */
-#define BO BI + 1
-#define BO_MASK (0x1f << 21)
-  { 5, 21, insert_bo, extract_bo, 0 },
-
-  /* The BO field in a B form instruction when the + or - modifier is
-     used.  This is like the BO field, but it must be even.  */
-#define BOE BO + 1
-  { 5, 21, insert_boe, extract_boe, 0 },
-
-  /* The BT field in an X or XL form instruction.  */
-#define BT BOE + 1
-  { 5, 21, 0, 0, PPC_OPERAND_CR },
-
-  /* The condition register number portion of the BI field in a B form
-     or XL form instruction.  This is used for the extended
-     conditional branch mnemonics, which set the lower two bits of the
-     BI field.  This field is optional.  */
-#define CR BT + 1
-  { 3, 18, 0, 0, PPC_OPERAND_CR | PPC_OPERAND_OPTIONAL },
-
-  /* The D field in a D form instruction.  This is a displacement off
-     a register, and implies that the next operand is a register in
-     parentheses.  */
-#define D CR + 1
-  { 16, 0, 0, 0, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
-
-  /* The DS field in a DS form instruction.  This is like D, but the
-     lower two bits are forced to zero.  */
-#define DS D + 1
-  { 16, 0, insert_ds, extract_ds, PPC_OPERAND_PARENS | PPC_OPERAND_SIGNED },
-
-  /* The E field in a wrteei instruction.  */
-#define E DS + 1
-  { 1, 15, 0, 0, 0 },
-
-  /* The FL1 field in a POWER SC form instruction.  */
-#define FL1 E + 1
-  { 4, 12, 0, 0, 0 },
-
-  /* The FL2 field in a POWER SC form instruction.  */
-#define FL2 FL1 + 1
-  { 3, 2, 0, 0, 0 },
-
-  /* The FLM field in an XFL form instruction.  */
-#define FLM FL2 + 1
-  { 8, 17, 0, 0, 0 },
-
-  /* The FRA field in an X or A form instruction.  */
-#define FRA FLM + 1
-#define FRA_MASK (0x1f << 16)
-  { 5, 16, 0, 0, PPC_OPERAND_FPR },
-
-  /* The FRB field in an X or A form instruction.  */
-#define FRB FRA + 1
-#define FRB_MASK (0x1f << 11)
-  { 5, 11, 0, 0, PPC_OPERAND_FPR },
-
-  /* The FRC field in an A form instruction.  */
-#define FRC FRB + 1
-#define FRC_MASK (0x1f << 6)
-  { 5, 6, 0, 0, PPC_OPERAND_FPR },
-
-  /* The FRS field in an X form instruction or the FRT field in a D, X
-     or A form instruction.  */
-#define FRS FRC + 1
-#define FRT FRS
-  { 5, 21, 0, 0, PPC_OPERAND_FPR },
-
-  /* The FXM field in an XFX instruction.  */
-#define FXM FRS + 1
-#define FXM_MASK (0xff << 12)
-  { 8, 12, 0, 0, 0 },
-
-  /* The L field in a D or X form instruction.  */
-#define L FXM + 1
-  { 1, 21, 0, 0, PPC_OPERAND_OPTIONAL },
-
-  /* The LEV field in a POWER SC form instruction.  */
-#define LEV L + 1
-  { 7, 5, 0, 0, 0 },
-
-  /* The LI field in an I form instruction.  The lower two bits are
-     forced to zero.  */
-#define LI LEV + 1
-  { 26, 0, insert_li, extract_li, PPC_OPERAND_RELATIVE | PPC_OPERAND_SIGNED },
-
-  /* The LI field in an I form instruction when used as an absolute
-     address.  */
-#define LIA LI + 1
-  { 26, 0, insert_li, extract_li, PPC_OPERAND_ABSOLUTE | PPC_OPERAND_SIGNED },
-
-  /* The MB field in an M form instruction.  */
-#define MB LIA + 1
-#define MB_MASK (0x1f << 6)
-  { 5, 6, 0, 0, 0 },
-
-  /* The ME field in an M form instruction.  */
-#define ME MB + 1
-#define ME_MASK (0x1f << 1)
-  { 5, 1, 0, 0, 0 },
-
-  /* The MB and ME fields in an M form instruction expressed a single
-     operand which is a bitmask indicating which bits to select.  This
-     is a two operand form using PPC_OPERAND_NEXT.  See the
-     description in opcode/ppc.h for what this means.  */
-#define MBE ME + 1
-  { 5, 6, 0, 0, PPC_OPERAND_OPTIONAL | PPC_OPERAND_NEXT },
-  { 32, 0, insert_mbe, extract_mbe, 0 },
-
-  /* The MB or ME field in an MD or MDS form instruction.  The high
-     bit is wrapped to the low end.  */
-#define MB6 MBE + 2
-#define ME6 MB6
-#define MB6_MASK (0x3f << 5)
-  { 6, 5, insert_mb6, extract_mb6, 0 },
-
-  /* The NB field in an X form instruction.  The value 32 is stored as
-     0.  */
-#define NB MB6 + 1
-  { 6, 11, insert_nb, extract_nb, 0 },
-
-  /* The NSI field in a D form instruction.  This is the same as the
-     SI field, only negated.  */
-#define NSI NB + 1
-  { 16, 0, insert_nsi, extract_nsi,
-      PPC_OPERAND_NEGATIVE | PPC_OPERAND_SIGNED },
-
-  /* The RA field in an D, DS, X, XO, M, or MDS form instruction.  */
-#define RA NSI + 1
-#define RA_MASK (0x1f << 16)
-  { 5, 16, 0, 0, PPC_OPERAND_GPR },
-
-  /* The RA field in a D or X form instruction which is an updating
-     load, which means that the RA field may not be zero and may not
-     equal the RT field.  */
-#define RAL RA + 1
-  { 5, 16, insert_ral, 0, PPC_OPERAND_GPR },
-
-  /* The RA field in an lmw instruction, which has special value
-     restrictions.  */
-#define RAM RAL + 1
-  { 5, 16, insert_ram, 0, PPC_OPERAND_GPR },
-
-  /* The RA field in a D or X form instruction which is an updating
-     store or an updating floating point load, which means that the RA
-     field may not be zero.  */
-#define RAS RAM + 1
-  { 5, 16, insert_ras, 0, PPC_OPERAND_GPR },
-
-  /* The RB field in an X, XO, M, or MDS form instruction.  */
-#define RB RAS + 1
-#define RB_MASK (0x1f << 11)
-  { 5, 11, 0, 0, PPC_OPERAND_GPR },
-
-  /* The RB field in an X form instruction when it must be the same as
-     the RS field in the instruction.  This is used for extended
-     mnemonics like mr.  */
-#define RBS RB + 1
-  { 5, 1, insert_rbs, extract_rbs, PPC_OPERAND_FAKE },
-
-  /* The RS field in a D, DS, X, XFX, XS, M, MD or MDS form
-     instruction or the RT field in a D, DS, X, XFX or XO form
-     instruction.  */
-#define RS RBS + 1
-#define RT RS
-#define RT_MASK (0x1f << 21)
-  { 5, 21, 0, 0, PPC_OPERAND_GPR },
-
-  /* The SH field in an X or M form instruction.  */
-#define SH RS + 1
-#define SH_MASK (0x1f << 11)
-  { 5, 11, 0, 0, 0 },
-
-  /* The SH field in an MD form instruction.  This is split.  */
-#define SH6 SH + 1
-#define SH6_MASK ((0x1f << 11) | (1 << 1))
-  { 6, 1, insert_sh6, extract_sh6, 0 },
-
-  /* The SI field in a D form instruction.  */
-#define SI SH6 + 1
-  { 16, 0, 0, 0, PPC_OPERAND_SIGNED },
-
-  /* The SI field in a D form instruction when we accept a wide range
-     of positive values.  */
-#define SISIGNOPT SI + 1
-  { 16, 0, 0, 0, PPC_OPERAND_SIGNED | PPC_OPERAND_SIGNOPT },
-
-  /* The SPR field in an XFX form instruction.  This is flipped--the
-     lower 5 bits are stored in the upper 5 and vice- versa.  */
-#define SPR SISIGNOPT + 1
-#define SPR_MASK (0x3ff << 11)
-  { 10, 11, insert_spr, extract_spr, 0 },
-
-  /* The BAT index number in an XFX form m[ft]ibat[lu] instruction.  */
-#define SPRBAT SPR + 1
-#define SPRBAT_MASK (0x3 << 17)
-  { 2, 17, 0, 0, 0 },
-
-  /* The SPRG register number in an XFX form m[ft]sprg instruction.  */
-#define SPRG SPRBAT + 1
-#define SPRG_MASK (0x3 << 16)
-  { 2, 16, 0, 0, 0 },
-
-  /* The SR field in an X form instruction.  */
-#define SR SPRG + 1
-  { 4, 16, 0, 0, 0 },
-
-  /* The SV field in a POWER SC form instruction.  */
-#define SV SR + 1
-  { 14, 2, 0, 0, 0 },
-
-  /* The TBR field in an XFX form instruction.  This is like the SPR
-     field, but it is optional.  */
-#define TBR SV + 1
-  { 10, 11, insert_tbr, extract_tbr, PPC_OPERAND_OPTIONAL },
-
-  /* The TO field in a D or X form instruction.  */
-#define TO TBR + 1
-#define TO_MASK (0x1f << 21)
-  { 5, 21, 0, 0, 0 },
-
-  /* The U field in an X form instruction.  */
-#define U TO + 1
-  { 4, 12, 0, 0, 0 },
-
-  /* The UI field in a D form instruction.  */
-#define UI U + 1
-  { 16, 0, 0, 0, 0 },
-
-  /* The VA field in a VA, VX or VXR form instruction. */
-#define VA UI + 1
-#define VA_MASK        (0x1f << 16)
-  {5, 16, 0, 0, PPC_OPERAND_VR},
-
-  /* The VB field in a VA, VX or VXR form instruction. */
-#define VB VA + 1
-#define VB_MASK (0x1f << 11)
-  {5, 11, 0, 0, PPC_OPERAND_VR}, 
-
-  /* The VC field in a VA form instruction. */
-#define VC VB + 1
-#define VC_MASK (0x1f << 6)
-  {5, 6, 0, 0, PPC_OPERAND_VR},
-
-  /* The VD or VS field in a VA, VX, VXR or X form instruction. */
-#define VD VC + 1
-#define VS VD
-#define VD_MASK (0x1f << 21)
-  {5, 21, 0, 0, PPC_OPERAND_VR},
-
-  /* The SIMM field in a VX form instruction. */
-#define SIMM VD + 1
-  { 5, 16, 0, 0, PPC_OPERAND_SIGNED},
-
-  /* The UIMM field in a VX form instruction. */
-#define UIMM SIMM + 1
-  { 5, 16, 0, 0, 0 },
-
-  /* The SHB field in a VA form instruction. */
-#define SHB UIMM + 1
-  { 4, 6, 0, 0, 0 },
-};
-
-/* The functions used to insert and extract complicated operands.  */
-
-/* The BA field in an XL form instruction when it must be the same as
-   the BT field in the same instruction.  This operand is marked FAKE.
-   The insertion function just copies the BT field into the BA field,
-   and the extraction function just checks that the fields are the
-   same.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_bat (insn, value, errmsg)
-     unsigned long insn;
-     long value ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  return insn | (((insn >> 21) & 0x1f) << 16);
-}
-
-static long
-extract_bat (insn, invalid)
-     unsigned long insn;
-     int *invalid;
-{
-  if (invalid != (int *) NULL
-      && ((insn >> 21) & 0x1f) != ((insn >> 16) & 0x1f))
-    *invalid = 1;
-  return 0;
-}
-
-/* The BB field in an XL form instruction when it must be the same as
-   the BA field in the same instruction.  This operand is marked FAKE.
-   The insertion function just copies the BA field into the BB field,
-   and the extraction function just checks that the fields are the
-   same.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_bba (insn, value, errmsg)
-     unsigned long insn;
-     long value ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  return insn | (((insn >> 16) & 0x1f) << 11);
-}
-
-static long
-extract_bba (insn, invalid)
-     unsigned long insn;
-     int *invalid;
-{
-  if (invalid != (int *) NULL
-      && ((insn >> 16) & 0x1f) != ((insn >> 11) & 0x1f))
-    *invalid = 1;
-  return 0;
-}
-
-/* The BD field in a B form instruction.  The lower two bits are
-   forced to zero.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_bd (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  return insn | (value & 0xfffc);
-}
-
-/*ARGSUSED*/
-static long
-extract_bd (insn, invalid)
-     unsigned long insn;
-     int *invalid ATTRIBUTE_UNUSED;
-{
-  if ((insn & 0x8000) != 0)
-    return (insn & 0xfffc) - 0x10000;
-  else
-    return insn & 0xfffc;
-}
-
-/* The BD field in a B form instruction when the - modifier is used.
-   This modifier means that the branch is not expected to be taken.
-   We must set the y bit of the BO field to 1 if the offset is
-   negative.  When extracting, we require that the y bit be 1 and that
-   the offset be positive, since if the y bit is 0 we just want to
-   print the normal form of the instruction.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_bdm (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  if ((value & 0x8000) != 0)
-    insn |= 1 << 21;
-  return insn | (value & 0xfffc);
-}
-
-static long
-extract_bdm (insn, invalid)
-     unsigned long insn;
-     int *invalid;
-{
-  if (invalid != (int *) NULL
-      && ((insn & (1 << 21)) == 0
-         || (insn & (1 << 15)) == 0))
-    *invalid = 1;
-  if ((insn & 0x8000) != 0)
-    return (insn & 0xfffc) - 0x10000;
-  else
-    return insn & 0xfffc;
-}
-
-/* The BD field in a B form instruction when the + modifier is used.
-   This is like BDM, above, except that the branch is expected to be
-   taken.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_bdp (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  if ((value & 0x8000) == 0)
-    insn |= 1 << 21;
-  return insn | (value & 0xfffc);
-}
-
-static long
-extract_bdp (insn, invalid)
-     unsigned long insn;
-     int *invalid;
-{
-  if (invalid != (int *) NULL
-      && ((insn & (1 << 21)) == 0
-         || (insn & (1 << 15)) != 0))
-    *invalid = 1;
-  if ((insn & 0x8000) != 0)
-    return (insn & 0xfffc) - 0x10000;
-  else
-    return insn & 0xfffc;
-}
-
-/* Check for legal values of a BO field.  */
-
-static int
-valid_bo (value)
-     long value;
-{
-  /* Certain encodings have bits that are required to be zero.  These
-     are (z must be zero, y may be anything):
-         001zy
-        011zy
-        1z00y
-        1z01y
-        1z1zz
-     */
-  switch (value & 0x14)
-    {
-    default:
-    case 0:
-      return 1;
-    case 0x4:
-      return (value & 0x2) == 0;
-    case 0x10:
-      return (value & 0x8) == 0;
-    case 0x14:
-      return value == 0x14;
-    }
-}
-
-/* The BO field in a B form instruction.  Warn about attempts to set
-   the field to an illegal value.  */
-
-static unsigned long
-insert_bo (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg;
-{
-  if (errmsg != (const char **) NULL
-      && ! valid_bo (value))
-    *errmsg = _("invalid conditional option");
-  return insn | ((value & 0x1f) << 21);
-}
-
-static long
-extract_bo (insn, invalid)
-     unsigned long insn;
-     int *invalid;
-{
-  long value;
-
-  value = (insn >> 21) & 0x1f;
-  if (invalid != (int *) NULL
-      && ! valid_bo (value))
-    *invalid = 1;
-  return value;
-}
-
-/* The BO field in a B form instruction when the + or - modifier is
-   used.  This is like the BO field, but it must be even.  When
-   extracting it, we force it to be even.  */
-
-static unsigned long
-insert_boe (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg;
-{
-  if (errmsg != (const char **) NULL)
-    {
-      if (! valid_bo (value))
-       *errmsg = _("invalid conditional option");
-      else if ((value & 1) != 0)
-       *errmsg = _("attempt to set y bit when using + or - modifier");
-    }
-  return insn | ((value & 0x1f) << 21);
-}
-
-static long
-extract_boe (insn, invalid)
-     unsigned long insn;
-     int *invalid;
-{
-  long value;
-
-  value = (insn >> 21) & 0x1f;
-  if (invalid != (int *) NULL
-      && ! valid_bo (value))
-    *invalid = 1;
-  return value & 0x1e;
-}
-
-/* The DS field in a DS form instruction.  This is like D, but the
-   lower two bits are forced to zero.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_ds (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  return insn | (value & 0xfffc);
-}
-
-/*ARGSUSED*/
-static long
-extract_ds (insn, invalid)
-     unsigned long insn;
-     int *invalid ATTRIBUTE_UNUSED;
-{
-  if ((insn & 0x8000) != 0)
-    return (insn & 0xfffc) - 0x10000;
-  else
-    return insn & 0xfffc;
-}
-
-/* The LI field in an I form instruction.  The lower two bits are
-   forced to zero.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_li (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg;
-{
-  if ((value & 3) != 0 && errmsg != (const char **) NULL)
-    *errmsg = _("ignoring least significant bits in branch offset");
-  return insn | (value & 0x3fffffc);
-}
-
-/*ARGSUSED*/
-static long
-extract_li (insn, invalid)
-     unsigned long insn;
-     int *invalid ATTRIBUTE_UNUSED;
-{
-  if ((insn & 0x2000000) != 0)
-    return (insn & 0x3fffffc) - 0x4000000;
-  else
-    return insn & 0x3fffffc;
-}
-
-/* The MB and ME fields in an M form instruction expressed as a single
-   operand which is itself a bitmask.  The extraction function always
-   marks it as invalid, since we never want to recognize an
-   instruction which uses a field of this type.  */
-
-static unsigned long
-insert_mbe (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg;
-{
-  unsigned long uval, mask;
-  int mb, me, mx, count, last;
-
-  uval = value;
-
-  if (uval == 0)
-    {
-      if (errmsg != (const char **) NULL)
-       *errmsg = _("illegal bitmask");
-      return insn;
-    }
-
-  mb = 0;
-  me = 32;
-  if ((uval & 1) != 0)
-    last = 1;
-  else
-    last = 0;
-  count = 0;
-
-  /* mb: location of last 0->1 transition */
-  /* me: location of last 1->0 transition */
-  /* count: # transitions */
-
-  for (mx = 0, mask = 1 << 31; mx < 32; ++mx, mask >>= 1)
-    {
-      if ((uval & mask) && !last)
-       {
-         ++count;
-         mb = mx;
-         last = 1;
-       }
-      else if (!(uval & mask) && last)
-       {
-         ++count;
-         me = mx;
-         last = 0;
-       }
-    }
-  if (me == 0)
-    me = 32;
-
-  if (count != 2 && (count != 0 || ! last))
-    {
-      if (errmsg != (const char **) NULL)
-       *errmsg = _("illegal bitmask");
-    }
-
-  return insn | (mb << 6) | ((me - 1) << 1);
-}
-
-static long
-extract_mbe (insn, invalid)
-     unsigned long insn;
-     int *invalid;
-{
-  long ret;
-  int mb, me;
-  int i;
-
-  if (invalid != (int *) NULL)
-    *invalid = 1;
-
-  mb = (insn >> 6) & 0x1f;
-  me = (insn >> 1) & 0x1f;
-  if (mb < me + 1)
-    {
-      ret = 0;
-      for (i = mb; i <= me; i++)
-       ret |= (long) 1 << (31 - i);
-    }
-  else if (mb == me + 1)
-    ret = ~0;
-  else /* (mb > me + 1) */
-    {
-      ret = ~ (long) 0;
-      for (i = me + 1; i < mb; i++)
-       ret &= ~ ((long) 1 << (31 - i));
-    }
-  return ret;
-}
-
-/* The MB or ME field in an MD or MDS form instruction.  The high bit
-   is wrapped to the low end.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_mb6 (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  return insn | ((value & 0x1f) << 6) | (value & 0x20);
-}
-
-/*ARGSUSED*/
-static long
-extract_mb6 (insn, invalid)
-     unsigned long insn;
-     int *invalid ATTRIBUTE_UNUSED;
-{
-  return ((insn >> 6) & 0x1f) | (insn & 0x20);
-}
-
-/* The NB field in an X form instruction.  The value 32 is stored as
-   0.  */
-
-static unsigned long
-insert_nb (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg;
-{
-  if (value < 0 || value > 32)
-    *errmsg = _("value out of range");
-  if (value == 32)
-    value = 0;
-  return insn | ((value & 0x1f) << 11);
-}
-
-/*ARGSUSED*/
-static long
-extract_nb (insn, invalid)
-     unsigned long insn;
-     int *invalid ATTRIBUTE_UNUSED;
-{
-  long ret;
-
-  ret = (insn >> 11) & 0x1f;
-  if (ret == 0)
-    ret = 32;
-  return ret;
-}
-
-/* The NSI field in a D form instruction.  This is the same as the SI
-   field, only negated.  The extraction function always marks it as
-   invalid, since we never want to recognize an instruction which uses
-   a field of this type.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_nsi (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  return insn | ((- value) & 0xffff);
-}
-
-static long
-extract_nsi (insn, invalid)
-     unsigned long insn;
-     int *invalid;
-{
-  if (invalid != (int *) NULL)
-    *invalid = 1;
-  if ((insn & 0x8000) != 0)
-    return - ((long)(insn & 0xffff) - 0x10000);
-  else
-    return - (long)(insn & 0xffff);
-}
-
-/* The RA field in a D or X form instruction which is an updating
-   load, which means that the RA field may not be zero and may not
-   equal the RT field.  */
-
-static unsigned long
-insert_ral (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg;
-{
-  if (value == 0
-      || (unsigned long) value == ((insn >> 21) & 0x1f))
-    *errmsg = "invalid register operand when updating";
-  return insn | ((value & 0x1f) << 16);
-}
-
-/* The RA field in an lmw instruction, which has special value
-   restrictions.  */
-
-static unsigned long
-insert_ram (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg;
-{
-  if ((unsigned long) value >= ((insn >> 21) & 0x1f))
-    *errmsg = _("index register in load range");
-  return insn | ((value & 0x1f) << 16);
-}
-
-/* The RA field in a D or X form instruction which is an updating
-   store or an updating floating point load, which means that the RA
-   field may not be zero.  */
-
-static unsigned long
-insert_ras (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg;
-{
-  if (value == 0)
-    *errmsg = _("invalid register operand when updating");
-  return insn | ((value & 0x1f) << 16);
-}
-
-/* The RB field in an X form instruction when it must be the same as
-   the RS field in the instruction.  This is used for extended
-   mnemonics like mr.  This operand is marked FAKE.  The insertion
-   function just copies the BT field into the BA field, and the
-   extraction function just checks that the fields are the same.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_rbs (insn, value, errmsg)
-     unsigned long insn;
-     long value ATTRIBUTE_UNUSED;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  return insn | (((insn >> 21) & 0x1f) << 11);
-}
-
-static long
-extract_rbs (insn, invalid)
-     unsigned long insn;
-     int *invalid;
-{
-  if (invalid != (int *) NULL
-      && ((insn >> 21) & 0x1f) != ((insn >> 11) & 0x1f))
-    *invalid = 1;
-  return 0;
-}
-
-/* The SH field in an MD form instruction.  This is split.  */
-
-/*ARGSUSED*/
-static unsigned long
-insert_sh6 (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  return insn | ((value & 0x1f) << 11) | ((value & 0x20) >> 4);
-}
-
-/*ARGSUSED*/
-static long
-extract_sh6 (insn, invalid)
-     unsigned long insn;
-     int *invalid ATTRIBUTE_UNUSED;
-{
-  return ((insn >> 11) & 0x1f) | ((insn << 4) & 0x20);
-}
-
-/* The SPR field in an XFX form instruction.  This is flipped--the
-   lower 5 bits are stored in the upper 5 and vice- versa.  */
-
-static unsigned long
-insert_spr (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6);
-}
-
-static long
-extract_spr (insn, invalid)
-     unsigned long insn;
-     int *invalid ATTRIBUTE_UNUSED;
-{
-  return ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
-}
-
-/* The TBR field in an XFX instruction.  This is just like SPR, but it
-   is optional.  When TBR is omitted, it must be inserted as 268 (the
-   magic number of the TB register).  These functions treat 0
-   (indicating an omitted optional operand) as 268.  This means that
-   ``mftb 4,0'' is not handled correctly.  This does not matter very
-   much, since the architecture manual does not define mftb as
-   accepting any values other than 268 or 269.  */
-
-#define TB (268)
-
-static unsigned long
-insert_tbr (insn, value, errmsg)
-     unsigned long insn;
-     long value;
-     const char **errmsg ATTRIBUTE_UNUSED;
-{
-  if (value == 0)
-    value = TB;
-  return insn | ((value & 0x1f) << 16) | ((value & 0x3e0) << 6);
-}
-
-static long
-extract_tbr (insn, invalid)
-     unsigned long insn;
-     int *invalid ATTRIBUTE_UNUSED;
-{
-  long ret;
-
-  ret = ((insn >> 16) & 0x1f) | ((insn >> 6) & 0x3e0);
-  if (ret == TB)
-    ret = 0;
-  return ret;
-}
-\f
-/* Macros used to form opcodes.  */
-
-/* The main opcode.  */
-#define OP(x) ((((unsigned long)(x)) & 0x3f) << 26)
-#define OP_MASK OP (0x3f)
-
-/* The main opcode combined with a trap code in the TO field of a D
-   form instruction.  Used for extended mnemonics for the trap
-   instructions.  */
-#define OPTO(x,to) (OP (x) | ((((unsigned long)(to)) & 0x1f) << 21))
-#define OPTO_MASK (OP_MASK | TO_MASK)
-
-/* The main opcode combined with a comparison size bit in the L field
-   of a D form or X form instruction.  Used for extended mnemonics for
-   the comparison instructions.  */
-#define OPL(x,l) (OP (x) | ((((unsigned long)(l)) & 1) << 21))
-#define OPL_MASK OPL (0x3f,1)
-
-/* An A form instruction.  */
-#define A(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x1f) << 1) | (((unsigned long)(rc)) & 1))
-#define A_MASK A (0x3f, 0x1f, 1)
-
-/* An A_MASK with the FRB field fixed.  */
-#define AFRB_MASK (A_MASK | FRB_MASK)
-
-/* An A_MASK with the FRC field fixed.  */
-#define AFRC_MASK (A_MASK | FRC_MASK)
-
-/* An A_MASK with the FRA and FRC fields fixed.  */
-#define AFRAFRC_MASK (A_MASK | FRA_MASK | FRC_MASK)
-
-/* A B form instruction.  */
-#define B(op, aa, lk) (OP (op) | ((((unsigned long)(aa)) & 1) << 1) | ((lk) & 1))
-#define B_MASK B (0x3f, 1, 1)
-
-/* A B form instruction setting the BO field.  */
-#define BBO(op, bo, aa, lk) (B ((op), (aa), (lk)) | ((((unsigned long)(bo)) & 0x1f) << 21))
-#define BBO_MASK BBO (0x3f, 0x1f, 1, 1)
-
-/* A BBO_MASK with the y bit of the BO field removed.  This permits
-   matching a conditional branch regardless of the setting of the y
-   bit.  */
-#define Y_MASK (((unsigned long)1) << 21)
-#define BBOY_MASK (BBO_MASK &~ Y_MASK)
-
-/* A B form instruction setting the BO field and the condition bits of
-   the BI field.  */
-#define BBOCB(op, bo, cb, aa, lk) \
-  (BBO ((op), (bo), (aa), (lk)) | ((((unsigned long)(cb)) & 0x3) << 16))
-#define BBOCB_MASK BBOCB (0x3f, 0x1f, 0x3, 1, 1)
-
-/* A BBOCB_MASK with the y bit of the BO field removed.  */
-#define BBOYCB_MASK (BBOCB_MASK &~ Y_MASK)
-
-/* A BBOYCB_MASK in which the BI field is fixed.  */
-#define BBOYBI_MASK (BBOYCB_MASK | BI_MASK)
-
-/* The main opcode mask with the RA field clear.  */
-#define DRA_MASK (OP_MASK | RA_MASK)
-
-/* A DS form instruction.  */
-#define DSO(op, xop) (OP (op) | ((xop) & 0x3))
-#define DS_MASK DSO (0x3f, 3)
-
-/* An M form instruction.  */
-#define M(op, rc) (OP (op) | ((rc) & 1))
-#define M_MASK M (0x3f, 1)
-
-/* An M form instruction with the ME field specified.  */
-#define MME(op, me, rc) (M ((op), (rc)) | ((((unsigned long)(me)) & 0x1f) << 1))
-
-/* An M_MASK with the MB and ME fields fixed.  */
-#define MMBME_MASK (M_MASK | MB_MASK | ME_MASK)
-
-/* An M_MASK with the SH and ME fields fixed.  */
-#define MSHME_MASK (M_MASK | SH_MASK | ME_MASK)
-
-/* An MD form instruction.  */
-#define MD(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x7) << 2) | ((rc) & 1))
-#define MD_MASK MD (0x3f, 0x7, 1)
-
-/* An MD_MASK with the MB field fixed.  */
-#define MDMB_MASK (MD_MASK | MB6_MASK)
-
-/* An MD_MASK with the SH field fixed.  */
-#define MDSH_MASK (MD_MASK | SH6_MASK)
-
-/* An MDS form instruction.  */
-#define MDS(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0xf) << 1) | ((rc) & 1))
-#define MDS_MASK MDS (0x3f, 0xf, 1)
-
-/* An MDS_MASK with the MB field fixed.  */
-#define MDSMB_MASK (MDS_MASK | MB6_MASK)
-
-/* An SC form instruction.  */
-#define SC(op, sa, lk) (OP (op) | ((((unsigned long)(sa)) & 1) << 1) | ((lk) & 1))
-#define SC_MASK (OP_MASK | (((unsigned long)0x3ff) << 16) | (((unsigned long)1) << 1) | 1)
-
-/* An VX form instruction. */
-#define VX(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x7ff))
-
-/* The mask for an VX form instruction. */
-#define VX_MASK        VX(0x3f, 0x7ff)
-
-/* An VA form instruction. */
-#define VXA(op, xop) (OP (op) | (((unsigned long)(xop)) & 0x07f))
-
-/* The mask for an VA form instruction. */
-#define VXA_MASK VXA(0x3f, 0x7f)
-
-/* An VXR form instruction. */
-#define VXR(op, xop, rc) (OP (op) | (((rc) & 1) << 10) | (((unsigned long)(xop)) & 0x3ff))
-
-/* The mask for a VXR form instruction. */
-#define VXR_MASK VXR(0x3f, 0x3ff, 1)
-
-/* An X form instruction.  */
-#define X(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1))
-
-/* An X form instruction with the RC bit specified.  */
-#define XRC(op, xop, rc) (X ((op), (xop)) | ((rc) & 1))
-
-/* The mask for an X form instruction.  */
-#define X_MASK XRC (0x3f, 0x3ff, 1)
-
-/* An X_MASK with the RA field fixed.  */
-#define XRA_MASK (X_MASK | RA_MASK)
-
-/* An X_MASK with the RB field fixed.  */
-#define XRB_MASK (X_MASK | RB_MASK)
-
-/* An X_MASK with the RT field fixed.  */
-#define XRT_MASK (X_MASK | RT_MASK)
-
-/* An X_MASK with the RA and RB fields fixed.  */
-#define XRARB_MASK (X_MASK | RA_MASK | RB_MASK)
-
-/* An X_MASK with the RT and RA fields fixed.  */
-#define XRTRA_MASK (X_MASK | RT_MASK | RA_MASK)
-
-/* An X form comparison instruction.  */
-#define XCMPL(op, xop, l) (X ((op), (xop)) | ((((unsigned long)(l)) & 1) << 21))
-
-/* The mask for an X form comparison instruction.  */
-#define XCMP_MASK (X_MASK | (((unsigned long)1) << 22))
-
-/* The mask for an X form comparison instruction with the L field
-   fixed.  */
-#define XCMPL_MASK (XCMP_MASK | (((unsigned long)1) << 21))
-
-/* An X form trap instruction with the TO field specified.  */
-#define XTO(op, xop, to) (X ((op), (xop)) | ((((unsigned long)(to)) & 0x1f) << 21))
-#define XTO_MASK (X_MASK | TO_MASK)
-
-/* An X form tlb instruction with the SH field specified.  */
-#define XTLB(op, xop, sh) (X ((op), (xop)) | ((((unsigned long)(sh)) & 0x1f) << 11))
-#define XTLB_MASK (X_MASK | SH_MASK)
-
-/* An XFL form instruction.  */
-#define XFL(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1) | (((unsigned long)(rc)) & 1))
-#define XFL_MASK (XFL (0x3f, 0x3ff, 1) | (((unsigned long)1) << 25) | (((unsigned long)1) << 16))
-
-/* An XL form instruction with the LK field set to 0.  */
-#define XL(op, xop) (OP (op) | ((((unsigned long)(xop)) & 0x3ff) << 1))
-
-/* An XL form instruction which uses the LK field.  */
-#define XLLK(op, xop, lk) (XL ((op), (xop)) | ((lk) & 1))
-
-/* The mask for an XL form instruction.  */
-#define XL_MASK XLLK (0x3f, 0x3ff, 1)
-
-/* An XL form instruction which explicitly sets the BO field.  */
-#define XLO(op, bo, xop, lk) \
-  (XLLK ((op), (xop), (lk)) | ((((unsigned long)(bo)) & 0x1f) << 21))
-#define XLO_MASK (XL_MASK | BO_MASK)
-
-/* An XL form instruction which explicitly sets the y bit of the BO
-   field.  */
-#define XLYLK(op, xop, y, lk) (XLLK ((op), (xop), (lk)) | ((((unsigned long)(y)) & 1) << 21))
-#define XLYLK_MASK (XL_MASK | Y_MASK)
-
-/* An XL form instruction which sets the BO field and the condition
-   bits of the BI field.  */
-#define XLOCB(op, bo, cb, xop, lk) \
-  (XLO ((op), (bo), (xop), (lk)) | ((((unsigned long)(cb)) & 3) << 16))
-#define XLOCB_MASK XLOCB (0x3f, 0x1f, 0x3, 0x3ff, 1)
-
-/* An XL_MASK or XLYLK_MASK or XLOCB_MASK with the BB field fixed.  */
-#define XLBB_MASK (XL_MASK | BB_MASK)
-#define XLYBB_MASK (XLYLK_MASK | BB_MASK)
-#define XLBOCBBB_MASK (XLOCB_MASK | BB_MASK)
-
-/* An XL_MASK with the BO and BB fields fixed.  */
-#define XLBOBB_MASK (XL_MASK | BO_MASK | BB_MASK)
-
-/* An XL_MASK with the BO, BI and BB fields fixed.  */
-#define XLBOBIBB_MASK (XL_MASK | BO_MASK | BI_MASK | BB_MASK)
-
-/* An XO form instruction.  */
-#define XO(op, xop, oe, rc) \
-  (OP (op) | ((((unsigned long)(xop)) & 0x1ff) << 1) | ((((unsigned long)(oe)) & 1) << 10) | (((unsigned long)(rc)) & 1))
-#define XO_MASK XO (0x3f, 0x1ff, 1, 1)
-
-/* An XO_MASK with the RB field fixed.  */
-#define XORB_MASK (XO_MASK | RB_MASK)
-
-/* An XS form instruction.  */
-#define XS(op, xop, rc) (OP (op) | ((((unsigned long)(xop)) & 0x1ff) << 2) | (((unsigned long)(rc)) & 1))
-#define XS_MASK XS (0x3f, 0x1ff, 1)
-
-/* A mask for the FXM version of an XFX form instruction.  */
-#define XFXFXM_MASK (X_MASK | (((unsigned long)1) << 20) | (((unsigned long)1) << 11))
-
-/* An XFX form instruction with the FXM field filled in.  */
-#define XFXM(op, xop, fxm) \
-  (X ((op), (xop)) | ((((unsigned long)(fxm)) & 0xff) << 12))
-
-/* An XFX form instruction with the SPR field filled in.  */
-#define XSPR(op, xop, spr) \
-  (X ((op), (xop)) | ((((unsigned long)(spr)) & 0x1f) << 16) | ((((unsigned long)(spr)) & 0x3e0) << 6))
-#define XSPR_MASK (X_MASK | SPR_MASK)
-
-/* An XFX form instruction with the SPR field filled in except for the
-   SPRBAT field.  */
-#define XSPRBAT_MASK (XSPR_MASK &~ SPRBAT_MASK)
-
-/* An XFX form instruction with the SPR field filled in except for the
-   SPRG field.  */
-#define XSPRG_MASK (XSPR_MASK &~ SPRG_MASK)
-
-/* An X form instruction with everything filled in except the E field.  */
-#define XE_MASK (0xffff7fff)
-
-/* The BO encodings used in extended conditional branch mnemonics.  */
-#define BODNZF (0x0)
-#define BODNZFP        (0x1)
-#define BODZF  (0x2)
-#define BODZFP (0x3)
-#define BOF    (0x4)
-#define BOFP   (0x5)
-#define BODNZT (0x8)
-#define BODNZTP        (0x9)
-#define BODZT  (0xa)
-#define BODZTP (0xb)
-#define BOT    (0xc)
-#define BOTP   (0xd)
-#define BODNZ  (0x10)
-#define BODNZP (0x11)
-#define BODZ   (0x12)
-#define BODZP  (0x13)
-#define BOU    (0x14)
-
-/* The BI condition bit encodings used in extended conditional branch
-   mnemonics.  */
-#define CBLT   (0)
-#define CBGT   (1)
-#define CBEQ   (2)
-#define CBSO   (3)
-
-/* The TO encodings used in extended trap mnemonics.  */
-#define TOLGT  (0x1)
-#define TOLLT  (0x2)
-#define TOEQ   (0x4)
-#define TOLGE  (0x5)
-#define TOLNL  (0x5)
-#define TOLLE  (0x6)
-#define TOLNG  (0x6)
-#define TOGT   (0x8)
-#define TOGE   (0xc)
-#define TONL   (0xc)
-#define TOLT   (0x10)
-#define TOLE   (0x14)
-#define TONG   (0x14)
-#define TONE   (0x18)
-#define TOU    (0x1f)
-\f
-/* Smaller names for the flags so each entry in the opcodes table will
-   fit on a single line.  */
-#undef PPC
-#define PPC     PPC_OPCODE_PPC | PPC_OPCODE_ANY
-#define PPCCOM PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_ANY
-#define PPC32   PPC_OPCODE_PPC | PPC_OPCODE_32 | PPC_OPCODE_ANY
-#undef PPC64
-#define PPC64   PPC_OPCODE_PPC | PPC_OPCODE_64 | PPC_OPCODE_ANY
-#define PPCONLY        PPC_OPCODE_PPC
-#define PPC403 PPC
-#define PPC405 PPC403
-#define PPC750 PPC
-#define PPC860 PPC
-#define PPCVEC PPC_OPCODE_ALTIVEC | PPC_OPCODE_ANY
-#define        POWER   PPC_OPCODE_POWER | PPC_OPCODE_ANY
-#define        POWER2  PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_ANY
-#define PPCPWR2        PPC_OPCODE_PPC | PPC_OPCODE_POWER | PPC_OPCODE_POWER2 | PPC_OPCODE_ANY
-#define        POWER32 PPC_OPCODE_POWER | PPC_OPCODE_ANY | PPC_OPCODE_32
-#define        COM     PPC_OPCODE_POWER | PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_ANY
-#define        COM32   PPC_OPCODE_POWER | PPC_OPCODE_PPC | PPC_OPCODE_COMMON | PPC_OPCODE_ANY | PPC_OPCODE_32
-#define        M601    PPC_OPCODE_POWER | PPC_OPCODE_601 | PPC_OPCODE_ANY
-#define PWRCOM PPC_OPCODE_POWER | PPC_OPCODE_601 | PPC_OPCODE_COMMON | PPC_OPCODE_ANY
-#define        MFDEC1  PPC_OPCODE_POWER
-#define        MFDEC2  PPC_OPCODE_PPC | PPC_OPCODE_601
-\f
-/* The opcode table.
-
-   The format of the opcode table is:
-
-   NAME             OPCODE     MASK            FLAGS           { OPERANDS }
-
-   NAME is the name of the instruction.
-   OPCODE is the instruction opcode.
-   MASK is the opcode mask; this is used to tell the disassembler
-     which bits in the actual opcode must match OPCODE.
-   FLAGS are flags indicated what processors support the instruction.
-   OPERANDS is the list of operands.
-
-   The disassembler reads the table in order and prints the first
-   instruction which matches, so this table is sorted to put more
-   specific instructions before more general instructions.  It is also
-   sorted by major opcode.  */
-
-const struct powerpc_opcode powerpc_opcodes[] = {
-{ "tdlgti",  OPTO(2,TOLGT), OPTO_MASK, PPC64,          { RA, SI } },
-{ "tdllti",  OPTO(2,TOLLT), OPTO_MASK, PPC64,          { RA, SI } },
-{ "tdeqi",   OPTO(2,TOEQ), OPTO_MASK,  PPC64,          { RA, SI } },
-{ "tdlgei",  OPTO(2,TOLGE), OPTO_MASK, PPC64,          { RA, SI } },
-{ "tdlnli",  OPTO(2,TOLNL), OPTO_MASK, PPC64,          { RA, SI } },
-{ "tdllei",  OPTO(2,TOLLE), OPTO_MASK, PPC64,          { RA, SI } },
-{ "tdlngi",  OPTO(2,TOLNG), OPTO_MASK, PPC64,          { RA, SI } },
-{ "tdgti",   OPTO(2,TOGT), OPTO_MASK,  PPC64,          { RA, SI } },
-{ "tdgei",   OPTO(2,TOGE), OPTO_MASK,  PPC64,          { RA, SI } },
-{ "tdnli",   OPTO(2,TONL), OPTO_MASK,  PPC64,          { RA, SI } },
-{ "tdlti",   OPTO(2,TOLT), OPTO_MASK,  PPC64,          { RA, SI } },
-{ "tdlei",   OPTO(2,TOLE), OPTO_MASK,  PPC64,          { RA, SI } },
-{ "tdngi",   OPTO(2,TONG), OPTO_MASK,  PPC64,          { RA, SI } },
-{ "tdnei",   OPTO(2,TONE), OPTO_MASK,  PPC64,          { RA, SI } },
-{ "tdi",     OP(2),    OP_MASK,        PPC64,          { TO, RA, SI } },
-
-{ "twlgti",  OPTO(3,TOLGT), OPTO_MASK, PPCCOM,         { RA, SI } },
-{ "tlgti",   OPTO(3,TOLGT), OPTO_MASK, PWRCOM,         { RA, SI } },
-{ "twllti",  OPTO(3,TOLLT), OPTO_MASK, PPCCOM,         { RA, SI } },
-{ "tllti",   OPTO(3,TOLLT), OPTO_MASK, PWRCOM,         { RA, SI } },
-{ "tweqi",   OPTO(3,TOEQ), OPTO_MASK,  PPCCOM,         { RA, SI } },
-{ "teqi",    OPTO(3,TOEQ), OPTO_MASK,  PWRCOM,         { RA, SI } },
-{ "twlgei",  OPTO(3,TOLGE), OPTO_MASK, PPCCOM,         { RA, SI } },
-{ "tlgei",   OPTO(3,TOLGE), OPTO_MASK, PWRCOM,         { RA, SI } },
-{ "twlnli",  OPTO(3,TOLNL), OPTO_MASK, PPCCOM,         { RA, SI } },
-{ "tlnli",   OPTO(3,TOLNL), OPTO_MASK, PWRCOM,         { RA, SI } },
-{ "twllei",  OPTO(3,TOLLE), OPTO_MASK, PPCCOM,         { RA, SI } },
-{ "tllei",   OPTO(3,TOLLE), OPTO_MASK, PWRCOM,         { RA, SI } },
-{ "twlngi",  OPTO(3,TOLNG), OPTO_MASK, PPCCOM,         { RA, SI } },
-{ "tlngi",   OPTO(3,TOLNG), OPTO_MASK, PWRCOM,         { RA, SI } },
-{ "twgti",   OPTO(3,TOGT), OPTO_MASK,  PPCCOM,         { RA, SI } },
-{ "tgti",    OPTO(3,TOGT), OPTO_MASK,  PWRCOM,         { RA, SI } },
-{ "twgei",   OPTO(3,TOGE), OPTO_MASK,  PPCCOM,         { RA, SI } },
-{ "tgei",    OPTO(3,TOGE), OPTO_MASK,  PWRCOM,         { RA, SI } },
-{ "twnli",   OPTO(3,TONL), OPTO_MASK,  PPCCOM,         { RA, SI } },
-{ "tnli",    OPTO(3,TONL), OPTO_MASK,  PWRCOM,         { RA, SI } },
-{ "twlti",   OPTO(3,TOLT), OPTO_MASK,  PPCCOM,         { RA, SI } },
-{ "tlti",    OPTO(3,TOLT), OPTO_MASK,  PWRCOM,         { RA, SI } },
-{ "twlei",   OPTO(3,TOLE), OPTO_MASK,  PPCCOM,         { RA, SI } },
-{ "tlei",    OPTO(3,TOLE), OPTO_MASK,  PWRCOM,         { RA, SI } },
-{ "twngi",   OPTO(3,TONG), OPTO_MASK,  PPCCOM,         { RA, SI } },
-{ "tngi",    OPTO(3,TONG), OPTO_MASK,  PWRCOM,         { RA, SI } },
-{ "twnei",   OPTO(3,TONE), OPTO_MASK,  PPCCOM,         { RA, SI } },
-{ "tnei",    OPTO(3,TONE), OPTO_MASK,  PWRCOM,         { RA, SI } },
-{ "twi",     OP(3),    OP_MASK,        PPCCOM,         { TO, RA, SI } },
-{ "ti",      OP(3),    OP_MASK,        PWRCOM,         { TO, RA, SI } },
-
-{ "macchw",    XO(4,172,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchw.",   XO(4,172,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwo",   XO(4,172,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwo.",  XO(4,172,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchws",   XO(4,236,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchws.",  XO(4,236,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwso",  XO(4,236,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwso.", XO(4,236,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwsu",  XO(4,204,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwsu.", XO(4,204,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwsuo", XO(4,204,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwsuo.",        XO(4,204,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwu",   XO(4,140,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwu.",  XO(4,140,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwuo",  XO(4,140,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "macchwuo.", XO(4,140,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhw",    XO(4,44,0,0),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhw.",   XO(4,44,0,1),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwo",   XO(4,44,1,0),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwo.",  XO(4,44,1,1),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhws",   XO(4,108,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhws.",  XO(4,108,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwso",  XO(4,108,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwso.", XO(4,108,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwsu",  XO(4,76,0,0),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwsu.", XO(4,76,0,1),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwsuo", XO(4,76,1,0),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwsuo.",        XO(4,76,1,1),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwu",   XO(4,12,0,0),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwu.",  XO(4,12,0,1),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwuo",  XO(4,12,1,0),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "machhwuo.", XO(4,12,1,1),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhw",    XO(4,428,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhw.",   XO(4,428,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwo",   XO(4,428,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwo.",  XO(4,428,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhws",   XO(4,492,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhws.",  XO(4,492,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwso",  XO(4,492,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwso.", XO(4,492,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwsu",  XO(4,460,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwsu.", XO(4,460,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwsuo", XO(4,460,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwsuo.",        XO(4,460,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwu",   XO(4,396,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwu.",  XO(4,396,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwuo",  XO(4,396,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "maclhwuo.", XO(4,396,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "mulchw",    XRC(4,168,0),  X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mulchw.",   XRC(4,168,1),  X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mulchwu",   XRC(4,136,0),  X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mulchwu.",  XRC(4,136,1),  X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mulhhw",    XRC(4,40,0),   X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mulhhw.",   XRC(4,40,1),   X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mulhhwu",   XRC(4,8,0),    X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mulhhwu.",  XRC(4,8,1),    X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mullhw",    XRC(4,424,0),  X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mullhw.",   XRC(4,424,1),  X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mullhwu",   XRC(4,392,0),  X_MASK,  PPC405,         { RT, RA, RB } },
-{ "mullhwu.",  XRC(4,392,1),  X_MASK,  PPC405,         { RT, RA, RB } },
-{ "nmacchw",   XO(4,174,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmacchw.",  XO(4,174,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmacchwo",  XO(4,174,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmacchwo.", XO(4,174,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmacchws",  XO(4,238,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmacchws.", XO(4,238,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmacchwso", XO(4,238,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmacchwso.",        XO(4,238,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmachhw",   XO(4,46,0,0),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmachhw.",  XO(4,46,0,1),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmachhwo",  XO(4,46,1,0),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmachhwo.", XO(4,46,1,1),  XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmachhws",  XO(4,110,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmachhws.", XO(4,110,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmachhwso", XO(4,110,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmachhwso.",        XO(4,110,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmaclhw",   XO(4,430,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmaclhw.",  XO(4,430,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmaclhwo",  XO(4,430,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmaclhwo.", XO(4,430,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmaclhws",  XO(4,494,0,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmaclhws.", XO(4,494,0,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmaclhwso", XO(4,494,1,0), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "nmaclhwso.",        XO(4,494,1,1), XO_MASK, PPC405,         { RT, RA, RB } },
-{ "mfvscr",  VX(4, 1540), VX_MASK,     PPCVEC,         { VD } },
-{ "mtvscr",  VX(4, 1604), VX_MASK,     PPCVEC,         { VD } },
-{ "vaddcuw", VX(4,  384), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vaddfp",  VX(4,   10), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vaddsbs", VX(4,  768), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vaddshs", VX(4,  832), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vaddsws", VX(4,  896), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vaddubm", VX(4,    0), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vaddubs", VX(4,  512), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vadduhm", VX(4,   64), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vadduhs", VX(4,  576), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vadduwm", VX(4,  128), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vadduws", VX(4,  640), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vand",    VX(4, 1028), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vandc",   VX(4, 1092), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vavgsb",  VX(4, 1282), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vavgsh",  VX(4, 1346), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vavgsw",  VX(4, 1410), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vavgub",  VX(4, 1026), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vavguh",  VX(4, 1090), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vavguw",  VX(4, 1154), VX_MASK,     PPCVEC,         { VD, VA, VB } },
-{ "vcfsx",   VX(4,  842), VX_MASK,     PPCVEC,         { VD, VB, UIMM } },
-{ "vcfux",   VX(4,  778), VX_MASK,     PPCVEC,         { VD, VB, UIMM } },
-{ "vcmpbfp",   VXR(4, 966, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpbfp.",  VXR(4, 966, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpeqfp",  VXR(4, 198, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpeqfp.", VXR(4, 198, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpequb",  VXR(4,   6, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpequb.", VXR(4,   6, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpequh",  VXR(4,  70, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpequh.", VXR(4,  70, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpequw",  VXR(4, 134, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpequw.", VXR(4, 134, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgefp",  VXR(4, 454, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgefp.", VXR(4, 454, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtfp",  VXR(4, 710, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtfp.", VXR(4, 710, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtsb",  VXR(4, 774, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtsb.", VXR(4, 774, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtsh",  VXR(4, 838, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtsh.", VXR(4, 838, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtsw",  VXR(4, 902, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtsw.", VXR(4, 902, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtub",  VXR(4, 518, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtub.", VXR(4, 518, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtuh",  VXR(4, 582, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtuh.", VXR(4, 582, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtuw",  VXR(4, 646, 0), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vcmpgtuw.", VXR(4, 646, 1), VXR_MASK, PPCVEC,       { VD, VA, VB } },
-{ "vctsxs",    VX(4,  970), VX_MASK,   PPCVEC,         { VD, VB, UIMM } },
-{ "vctuxs",    VX(4,  906), VX_MASK,   PPCVEC,         { VD, VB, UIMM } },
-{ "vexptefp",  VX(4,  394), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vlogefp",   VX(4,  458), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vmaddfp",   VXA(4,  46), VXA_MASK,  PPCVEC,         { VD, VA, VB, VC } },
-{ "vmaxfp",    VX(4, 1034), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmaxsb",    VX(4,  258), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmaxsh",    VX(4,  322), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmaxsw",    VX(4,  386), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmaxub",    VX(4,    2), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmaxuh",    VX(4,   66), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmaxuw",    VX(4,  130), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmhaddshs", VXA(4,  32), VXA_MASK,  PPCVEC,         { VD, VA, VB, VC } },
-{ "vmhraddshs", VXA(4, 33), VXA_MASK,  PPCVEC,         { VD, VA, VB, VC } },
-{ "vminfp",    VX(4, 1098), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vminsb",    VX(4,  770), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vminsh",    VX(4,  834), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vminsw",    VX(4,  898), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vminub",    VX(4,  514), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vminuh",    VX(4,  578), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vminuw",    VX(4,  642), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmladduhm", VXA(4,  34), VXA_MASK,  PPCVEC,         { VD, VA, VB, VC } },
-{ "vmrghb",    VX(4,   12), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmrghh",    VX(4,   76), VX_MASK,    PPCVEC,                { VD, VA, VB } },
-{ "vmrghw",    VX(4,  140), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmrglb",    VX(4,  268), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmrglh",    VX(4,  332), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmrglw",    VX(4,  396), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmsummbm",  VXA(4,  37), VXA_MASK,  PPCVEC,         { VD, VA, VB, VC } },
-{ "vmsumshm",  VXA(4,  40), VXA_MASK,  PPCVEC,         { VD, VA, VB, VC } },
-{ "vmsumshs",  VXA(4,  41), VXA_MASK,  PPCVEC,         { VD, VA, VB, VC } },
-{ "vmsumubm",  VXA(4,  36), VXA_MASK,   PPCVEC,                { VD, VA, VB, VC } },
-{ "vmsumuhm",  VXA(4,  38), VXA_MASK,   PPCVEC,                { VD, VA, VB, VC } },
-{ "vmsumuhs",  VXA(4,  39), VXA_MASK,   PPCVEC,                { VD, VA, VB, VC } },
-{ "vmulesb",   VX(4,  776), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmulesh",   VX(4,  840), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmuleub",   VX(4,  520), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmuleuh",   VX(4,  584), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmulosb",   VX(4,  264), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmulosh",   VX(4,  328), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmuloub",   VX(4,    8), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vmulouh",   VX(4,   72), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vnmsubfp",  VXA(4,  47), VXA_MASK,  PPCVEC,         { VD, VA, VC, VB } },
-{ "vnor",      VX(4, 1284), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vor",       VX(4, 1156), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vperm",     VXA(4,  43), VXA_MASK,  PPCVEC,         { VD, VA, VB, VC } },
-{ "vpkpx",     VX(4,  782), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vpkshss",   VX(4,  398), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vpkshus",   VX(4,  270), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vpkswss",   VX(4,  462), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vpkswus",   VX(4,  334), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vpkuhum",   VX(4,   14), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vpkuhus",   VX(4,  142), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vpkuwum",   VX(4,   78), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vpkuwus",   VX(4,  206), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vrefp",     VX(4,  266), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vrfim",     VX(4,  714), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vrfin",     VX(4,  522), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vrfip",     VX(4,  650), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vrfiz",     VX(4,  586), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vrlb",      VX(4,    4), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vrlh",      VX(4,   68), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vrlw",      VX(4,  132), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vrsqrtefp", VX(4,  330), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vsel",      VXA(4,  42), VXA_MASK,  PPCVEC,         { VD, VA, VB, VC } },
-{ "vsl",       VX(4,  452), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vslb",      VX(4,  260), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsldoi",    VXA(4,  44), VXA_MASK,  PPCVEC,         { VD, VA, VB, SHB } },
-{ "vslh",      VX(4,  324), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vslo",      VX(4, 1036), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vslw",      VX(4,  388), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vspltb",    VX(4,  524), VX_MASK,   PPCVEC,         { VD, VB, UIMM } },
-{ "vsplth",    VX(4,  588), VX_MASK,   PPCVEC,         { VD, VB, UIMM } },
-{ "vspltisb",  VX(4,  780), VX_MASK,   PPCVEC,         { VD, SIMM } },
-{ "vspltish",  VX(4,  844), VX_MASK,   PPCVEC,         { VD, SIMM } },
-{ "vspltisw",  VX(4,  908), VX_MASK,   PPCVEC,         { VD, SIMM } },
-{ "vspltw",    VX(4,  652), VX_MASK,   PPCVEC,         { VD, VB, UIMM } },
-{ "vsr",       VX(4,  708), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsrab",     VX(4,  772), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsrah",     VX(4,  836), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsraw",     VX(4,  900), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsrb",      VX(4,  516), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsrh",      VX(4,  580), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsro",      VX(4, 1100), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsrw",      VX(4,  644), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsubcuw",   VX(4, 1408), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsubfp",    VX(4,   74), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsubsbs",   VX(4, 1792), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsubshs",   VX(4, 1856), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsubsws",   VX(4, 1920), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsububm",   VX(4, 1024), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsububs",   VX(4, 1536), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsubuhm",   VX(4, 1088), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsubuhs",   VX(4, 1600), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsubuwm",   VX(4, 1152), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsubuws",   VX(4, 1664), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsumsws",   VX(4, 1928), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsum2sws",  VX(4, 1672), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsum4sbs",  VX(4, 1800), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsum4shs",  VX(4, 1608), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vsum4ubs",  VX(4, 1544), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-{ "vupkhpx",   VX(4,  846), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vupkhsb",   VX(4,  526), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vupkhsh",   VX(4,  590), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vupklpx",   VX(4,  974), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vupklsb",   VX(4,  654), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vupklsh",   VX(4,  718), VX_MASK,   PPCVEC,         { VD, VB } },
-{ "vxor",      VX(4, 1220), VX_MASK,   PPCVEC,         { VD, VA, VB } },
-
-{ "mulli",   OP(7),    OP_MASK,        PPCCOM,         { RT, RA, SI } },
-{ "muli",    OP(7),    OP_MASK,        PWRCOM,         { RT, RA, SI } },
-
-{ "subfic",  OP(8),    OP_MASK,        PPCCOM,         { RT, RA, SI } },
-{ "sfi",     OP(8),    OP_MASK,        PWRCOM,         { RT, RA, SI } },
-
-{ "dozi",    OP(9),    OP_MASK,        M601,           { RT, RA, SI } },
-
-{ "cmplwi",  OPL(10,0),        OPL_MASK,       PPCCOM,         { OBF, RA, UI } },
-{ "cmpldi",  OPL(10,1), OPL_MASK,      PPC64,          { OBF, RA, UI } },
-{ "cmpli",   OP(10),   OP_MASK,        PPCONLY,        { BF, L, RA, UI } },
-{ "cmpli",   OP(10),   OP_MASK,        PWRCOM,         { BF, RA, UI } },
-
-{ "cmpwi",   OPL(11,0),        OPL_MASK,       PPCCOM,         { OBF, RA, SI } },
-{ "cmpdi",   OPL(11,1),        OPL_MASK,       PPC64,          { OBF, RA, SI } },
-{ "cmpi",    OP(11),   OP_MASK,        PPCONLY,        { BF, L, RA, SI } },
-{ "cmpi",    OP(11),   OP_MASK,        PWRCOM,         { BF, RA, SI } },
-
-{ "addic",   OP(12),   OP_MASK,        PPCCOM,         { RT, RA, SI } },
-{ "ai",             OP(12),    OP_MASK,        PWRCOM,         { RT, RA, SI } },
-{ "subic",   OP(12),   OP_MASK,        PPCCOM,         { RT, RA, NSI } },
-
-{ "addic.",  OP(13),   OP_MASK,        PPCCOM,         { RT, RA, SI } },
-{ "ai.",     OP(13),   OP_MASK,        PWRCOM,         { RT, RA, SI } },
-{ "subic.",  OP(13),   OP_MASK,        PPCCOM,         { RT, RA, NSI } },
-
-{ "li",             OP(14),    DRA_MASK,       PPCCOM,         { RT, SI } },
-{ "lil",     OP(14),   DRA_MASK,       PWRCOM,         { RT, SI } },
-{ "addi",    OP(14),   OP_MASK,        PPCCOM,         { RT, RA, SI } },
-{ "cal",     OP(14),   OP_MASK,        PWRCOM,         { RT, D, RA } },
-{ "subi",    OP(14),   OP_MASK,        PPCCOM,         { RT, RA, NSI } },
-{ "la",             OP(14),    OP_MASK,        PPCCOM,         { RT, D, RA } },
-
-{ "lis",     OP(15),   DRA_MASK,       PPCCOM,         { RT, SISIGNOPT } },
-{ "liu",     OP(15),   DRA_MASK,       PWRCOM,         { RT, SISIGNOPT } },
-{ "addis",   OP(15),   OP_MASK,        PPCCOM,         { RT,RA,SISIGNOPT } },
-{ "cau",     OP(15),   OP_MASK,        PWRCOM,         { RT,RA,SISIGNOPT } },
-{ "subis",   OP(15),   OP_MASK,        PPCCOM,         { RT, RA, NSI } },
-
-{ "bdnz-",   BBO(16,BODNZ,0,0), BBOYBI_MASK, PPCCOM,   { BDM } },
-{ "bdnz+",   BBO(16,BODNZ,0,0), BBOYBI_MASK, PPCCOM,   { BDP } },
-{ "bdnz",    BBO(16,BODNZ,0,0), BBOYBI_MASK, PPCCOM,   { BD } },
-{ "bdn",     BBO(16,BODNZ,0,0), BBOYBI_MASK, PWRCOM,   { BD } },
-{ "bdnzl-",  BBO(16,BODNZ,0,1), BBOYBI_MASK, PPCCOM,   { BDM } },
-{ "bdnzl+",  BBO(16,BODNZ,0,1), BBOYBI_MASK, PPCCOM,   { BDP } },
-{ "bdnzl",   BBO(16,BODNZ,0,1), BBOYBI_MASK, PPCCOM,   { BD } },
-{ "bdnl",    BBO(16,BODNZ,0,1), BBOYBI_MASK, PWRCOM,   { BD } },
-{ "bdnza-",  BBO(16,BODNZ,1,0), BBOYBI_MASK, PPCCOM,   { BDMA } },
-{ "bdnza+",  BBO(16,BODNZ,1,0), BBOYBI_MASK, PPCCOM,   { BDPA } },
-{ "bdnza",   BBO(16,BODNZ,1,0), BBOYBI_MASK, PPCCOM,   { BDA } },
-{ "bdna",    BBO(16,BODNZ,1,0), BBOYBI_MASK, PWRCOM,   { BDA } },
-{ "bdnzla-", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPCCOM,   { BDMA } },
-{ "bdnzla+", BBO(16,BODNZ,1,1), BBOYBI_MASK, PPCCOM,   { BDPA } },
-{ "bdnzla",  BBO(16,BODNZ,1,1), BBOYBI_MASK, PPCCOM,   { BDA } },
-{ "bdnla",   BBO(16,BODNZ,1,1), BBOYBI_MASK, PWRCOM,   { BDA } },
-{ "bdz-",    BBO(16,BODZ,0,0),  BBOYBI_MASK, PPCCOM,   { BDM } },
-{ "bdz+",    BBO(16,BODZ,0,0),  BBOYBI_MASK, PPCCOM,   { BDP } },
-{ "bdz",     BBO(16,BODZ,0,0),  BBOYBI_MASK, COM,      { BD } },
-{ "bdzl-",   BBO(16,BODZ,0,1),  BBOYBI_MASK, PPCCOM,   { BDM } },
-{ "bdzl+",   BBO(16,BODZ,0,1),  BBOYBI_MASK, PPCCOM,   { BDP } },
-{ "bdzl",    BBO(16,BODZ,0,1),  BBOYBI_MASK, COM,      { BD } },
-{ "bdza-",   BBO(16,BODZ,1,0),  BBOYBI_MASK, PPCCOM,   { BDMA } },
-{ "bdza+",   BBO(16,BODZ,1,0),  BBOYBI_MASK, PPCCOM,   { BDPA } },
-{ "bdza",    BBO(16,BODZ,1,0),  BBOYBI_MASK, COM,      { BDA } },
-{ "bdzla-",  BBO(16,BODZ,1,1),  BBOYBI_MASK, PPCCOM,   { BDMA } },
-{ "bdzla+",  BBO(16,BODZ,1,1),  BBOYBI_MASK, PPCCOM,   { BDPA } },
-{ "bdzla",   BBO(16,BODZ,1,1),  BBOYBI_MASK, COM,      { BDA } },
-{ "blt-",    BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "blt+",    BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "blt",     BBOCB(16,BOT,CBLT,0,0), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bltl-",   BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bltl+",   BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bltl",    BBOCB(16,BOT,CBLT,0,1), BBOYCB_MASK, COM,         { CR, BD } },
-{ "blta-",   BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "blta+",   BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "blta",    BBOCB(16,BOT,CBLT,1,0), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bltla-",  BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bltla+",  BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bltla",   BBOCB(16,BOT,CBLT,1,1), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bgt-",    BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bgt+",    BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bgt",     BBOCB(16,BOT,CBGT,0,0), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bgtl-",   BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bgtl+",   BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bgtl",    BBOCB(16,BOT,CBGT,0,1), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bgta-",   BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bgta+",   BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bgta",    BBOCB(16,BOT,CBGT,1,0), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bgtla-",  BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bgtla+",  BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bgtla",   BBOCB(16,BOT,CBGT,1,1), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "beq-",    BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "beq+",    BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "beq",     BBOCB(16,BOT,CBEQ,0,0), BBOYCB_MASK, COM,         { CR, BD } },
-{ "beql-",   BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "beql+",   BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "beql",    BBOCB(16,BOT,CBEQ,0,1), BBOYCB_MASK, COM,         { CR, BD } },
-{ "beqa-",   BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "beqa+",   BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "beqa",    BBOCB(16,BOT,CBEQ,1,0), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "beqla-",  BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "beqla+",  BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "beqla",   BBOCB(16,BOT,CBEQ,1,1), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bso-",    BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bso+",    BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bso",     BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bsol-",   BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bsol+",   BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bsol",    BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bsoa-",   BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bsoa+",   BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bsoa",    BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bsola-",  BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bsola+",  BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bsola",   BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bun-",    BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bun+",    BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bun",     BBOCB(16,BOT,CBSO,0,0), BBOYCB_MASK, PPCCOM,      { CR, BD } },
-{ "bunl-",   BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bunl+",   BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bunl",    BBOCB(16,BOT,CBSO,0,1), BBOYCB_MASK, PPCCOM,      { CR, BD } },
-{ "buna-",   BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "buna+",   BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "buna",    BBOCB(16,BOT,CBSO,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDA } },
-{ "bunla-",  BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bunla+",  BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bunla",   BBOCB(16,BOT,CBSO,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDA } },
-{ "bge-",    BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bge+",    BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bge",     BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bgel-",   BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bgel+",   BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bgel",    BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bgea-",   BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bgea+",   BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bgea",    BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bgela-",  BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bgela+",  BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bgela",   BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bnl-",    BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bnl+",    BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bnl",     BBOCB(16,BOF,CBLT,0,0), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bnll-",   BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bnll+",   BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bnll",    BBOCB(16,BOF,CBLT,0,1), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bnla-",   BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bnla+",   BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bnla",    BBOCB(16,BOF,CBLT,1,0), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bnlla-",  BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bnlla+",  BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bnlla",   BBOCB(16,BOF,CBLT,1,1), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "ble-",    BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "ble+",    BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "ble",     BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, COM,         { CR, BD } },
-{ "blel-",   BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "blel+",   BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "blel",    BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, COM,         { CR, BD } },
-{ "blea-",   BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "blea+",   BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "blea",    BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "blela-",  BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "blela+",  BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "blela",   BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bng-",    BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bng+",    BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bng",     BBOCB(16,BOF,CBGT,0,0), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bngl-",   BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bngl+",   BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bngl",    BBOCB(16,BOF,CBGT,0,1), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bnga-",   BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bnga+",   BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bnga",    BBOCB(16,BOF,CBGT,1,0), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bngla-",  BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bngla+",  BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bngla",   BBOCB(16,BOF,CBGT,1,1), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bne-",    BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bne+",    BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bne",     BBOCB(16,BOF,CBEQ,0,0), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bnel-",   BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bnel+",   BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bnel",    BBOCB(16,BOF,CBEQ,0,1), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bnea-",   BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bnea+",   BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bnea",    BBOCB(16,BOF,CBEQ,1,0), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bnela-",  BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bnela+",  BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bnela",   BBOCB(16,BOF,CBEQ,1,1), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bns-",    BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bns+",    BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bns",     BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bnsl-",   BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bnsl+",   BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bnsl",    BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, COM,         { CR, BD } },
-{ "bnsa-",   BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bnsa+",   BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bnsa",    BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bnsla-",  BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bnsla+",  BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bnsla",   BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, COM,         { CR, BDA } },
-{ "bnu-",    BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bnu+",    BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bnu",     BBOCB(16,BOF,CBSO,0,0), BBOYCB_MASK, PPCCOM,      { CR, BD } },
-{ "bnul-",   BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDM } },
-{ "bnul+",   BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM,      { CR, BDP } },
-{ "bnul",    BBOCB(16,BOF,CBSO,0,1), BBOYCB_MASK, PPCCOM,      { CR, BD } },
-{ "bnua-",   BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bnua+",   BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bnua",    BBOCB(16,BOF,CBSO,1,0), BBOYCB_MASK, PPCCOM,      { CR, BDA } },
-{ "bnula-",  BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDMA } },
-{ "bnula+",  BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDPA } },
-{ "bnula",   BBOCB(16,BOF,CBSO,1,1), BBOYCB_MASK, PPCCOM,      { CR, BDA } },
-{ "bdnzt-",  BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM,    { BI, BDM } },
-{ "bdnzt+",  BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM,    { BI, BDP } },
-{ "bdnzt",   BBO(16,BODNZT,0,0), BBOY_MASK, PPCCOM,    { BI, BD } },
-{ "bdnztl-", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM,    { BI, BDM } },
-{ "bdnztl+", BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM,    { BI, BDP } },
-{ "bdnztl",  BBO(16,BODNZT,0,1), BBOY_MASK, PPCCOM,    { BI, BD } },
-{ "bdnzta-", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM,    { BI, BDMA } },
-{ "bdnzta+", BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM,    { BI, BDPA } },
-{ "bdnzta",  BBO(16,BODNZT,1,0), BBOY_MASK, PPCCOM,    { BI, BDA } },
-{ "bdnztla-",BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM,    { BI, BDMA } },
-{ "bdnztla+",BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM,    { BI, BDPA } },
-{ "bdnztla", BBO(16,BODNZT,1,1), BBOY_MASK, PPCCOM,    { BI, BDA } },
-{ "bdnzf-",  BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM,    { BI, BDM } },
-{ "bdnzf+",  BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM,    { BI, BDP } },
-{ "bdnzf",   BBO(16,BODNZF,0,0), BBOY_MASK, PPCCOM,    { BI, BD } },
-{ "bdnzfl-", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM,    { BI, BDM } },
-{ "bdnzfl+", BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM,    { BI, BDP } },
-{ "bdnzfl",  BBO(16,BODNZF,0,1), BBOY_MASK, PPCCOM,    { BI, BD } },
-{ "bdnzfa-", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM,    { BI, BDMA } },
-{ "bdnzfa+", BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM,    { BI, BDPA } },
-{ "bdnzfa",  BBO(16,BODNZF,1,0), BBOY_MASK, PPCCOM,    { BI, BDA } },
-{ "bdnzfla-",BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM,    { BI, BDMA } },
-{ "bdnzfla+",BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM,    { BI, BDPA } },
-{ "bdnzfla", BBO(16,BODNZF,1,1), BBOY_MASK, PPCCOM,    { BI, BDA } },
-{ "bt-",     BBO(16,BOT,0,0), BBOY_MASK, PPCCOM,       { BI, BDM } },
-{ "bt+",     BBO(16,BOT,0,0), BBOY_MASK, PPCCOM,       { BI, BDP } },
-{ "bt",             BBO(16,BOT,0,0), BBOY_MASK, PPCCOM,        { BI, BD } },
-{ "bbt",     BBO(16,BOT,0,0), BBOY_MASK, PWRCOM,       { BI, BD } },
-{ "btl-",    BBO(16,BOT,0,1), BBOY_MASK, PPCCOM,       { BI, BDM } },
-{ "btl+",    BBO(16,BOT,0,1), BBOY_MASK, PPCCOM,       { BI, BDP } },
-{ "btl",     BBO(16,BOT,0,1), BBOY_MASK, PPCCOM,       { BI, BD } },
-{ "bbtl",    BBO(16,BOT,0,1), BBOY_MASK, PWRCOM,       { BI, BD } },
-{ "bta-",    BBO(16,BOT,1,0), BBOY_MASK, PPCCOM,       { BI, BDMA } },
-{ "bta+",    BBO(16,BOT,1,0), BBOY_MASK, PPCCOM,       { BI, BDPA } },
-{ "bta",     BBO(16,BOT,1,0), BBOY_MASK, PPCCOM,       { BI, BDA } },
-{ "bbta",    BBO(16,BOT,1,0), BBOY_MASK, PWRCOM,       { BI, BDA } },
-{ "btla-",   BBO(16,BOT,1,1), BBOY_MASK, PPCCOM,       { BI, BDMA } },
-{ "btla+",   BBO(16,BOT,1,1), BBOY_MASK, PPCCOM,       { BI, BDPA } },
-{ "btla",    BBO(16,BOT,1,1), BBOY_MASK, PPCCOM,       { BI, BDA } },
-{ "bbtla",   BBO(16,BOT,1,1), BBOY_MASK, PWRCOM,       { BI, BDA } },
-{ "bf-",     BBO(16,BOF,0,0), BBOY_MASK, PPCCOM,       { BI, BDM } },
-{ "bf+",     BBO(16,BOF,0,0), BBOY_MASK, PPCCOM,       { BI, BDP } },
-{ "bf",             BBO(16,BOF,0,0), BBOY_MASK, PPCCOM,        { BI, BD } },
-{ "bbf",     BBO(16,BOF,0,0), BBOY_MASK, PWRCOM,       { BI, BD } },
-{ "bfl-",    BBO(16,BOF,0,1), BBOY_MASK, PPCCOM,       { BI, BDM } },
-{ "bfl+",    BBO(16,BOF,0,1), BBOY_MASK, PPCCOM,       { BI, BDP } },
-{ "bfl",     BBO(16,BOF,0,1), BBOY_MASK, PPCCOM,       { BI, BD } },
-{ "bbfl",    BBO(16,BOF,0,1), BBOY_MASK, PWRCOM,       { BI, BD } },
-{ "bfa-",    BBO(16,BOF,1,0), BBOY_MASK, PPCCOM,       { BI, BDMA } },
-{ "bfa+",    BBO(16,BOF,1,0), BBOY_MASK, PPCCOM,       { BI, BDPA } },
-{ "bfa",     BBO(16,BOF,1,0), BBOY_MASK, PPCCOM,       { BI, BDA } },
-{ "bbfa",    BBO(16,BOF,1,0), BBOY_MASK, PWRCOM,       { BI, BDA } },
-{ "bfla-",   BBO(16,BOF,1,1), BBOY_MASK, PPCCOM,       { BI, BDMA } },
-{ "bfla+",   BBO(16,BOF,1,1), BBOY_MASK, PPCCOM,       { BI, BDPA } },
-{ "bfla",    BBO(16,BOF,1,1), BBOY_MASK, PPCCOM,       { BI, BDA } },
-{ "bbfla",   BBO(16,BOF,1,1), BBOY_MASK, PWRCOM,       { BI, BDA } },
-{ "bdzt-",   BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM,     { BI, BDM } },
-{ "bdzt+",   BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM,     { BI, BDP } },
-{ "bdzt",    BBO(16,BODZT,0,0), BBOY_MASK, PPCCOM,     { BI, BD } },
-{ "bdztl-",  BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM,     { BI, BDM } },
-{ "bdztl+",  BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM,     { BI, BDP } },
-{ "bdztl",   BBO(16,BODZT,0,1), BBOY_MASK, PPCCOM,     { BI, BD } },
-{ "bdzta-",  BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM,     { BI, BDMA } },
-{ "bdzta+",  BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM,     { BI, BDPA } },
-{ "bdzta",   BBO(16,BODZT,1,0), BBOY_MASK, PPCCOM,     { BI, BDA } },
-{ "bdztla-", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM,     { BI, BDMA } },
-{ "bdztla+", BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM,     { BI, BDPA } },
-{ "bdztla",  BBO(16,BODZT,1,1), BBOY_MASK, PPCCOM,     { BI, BDA } },
-{ "bdzf-",   BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM,     { BI, BDM } },
-{ "bdzf+",   BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM,     { BI, BDP } },
-{ "bdzf",    BBO(16,BODZF,0,0), BBOY_MASK, PPCCOM,     { BI, BD } },
-{ "bdzfl-",  BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM,     { BI, BDM } },
-{ "bdzfl+",  BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM,     { BI, BDP } },
-{ "bdzfl",   BBO(16,BODZF,0,1), BBOY_MASK, PPCCOM,     { BI, BD } },
-{ "bdzfa-",  BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM,     { BI, BDMA } },
-{ "bdzfa+",  BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM,     { BI, BDPA } },
-{ "bdzfa",   BBO(16,BODZF,1,0), BBOY_MASK, PPCCOM,     { BI, BDA } },
-{ "bdzfla-", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM,     { BI, BDMA } },
-{ "bdzfla+", BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM,     { BI, BDPA } },
-{ "bdzfla",  BBO(16,BODZF,1,1), BBOY_MASK, PPCCOM,     { BI, BDA } },
-{ "bc-",     B(16,0,0),        B_MASK,         PPCCOM,         { BOE, BI, BDM } },
-{ "bc+",     B(16,0,0),        B_MASK,         PPCCOM,         { BOE, BI, BDP } },
-{ "bc",             B(16,0,0), B_MASK,         COM,            { BO, BI, BD } },
-{ "bcl-",    B(16,0,1),        B_MASK,         PPCCOM,         { BOE, BI, BDM } },
-{ "bcl+",    B(16,0,1),        B_MASK,         PPCCOM,         { BOE, BI, BDP } },
-{ "bcl",     B(16,0,1),        B_MASK,         COM,            { BO, BI, BD } },
-{ "bca-",    B(16,1,0),        B_MASK,         PPCCOM,         { BOE, BI, BDMA } },
-{ "bca+",    B(16,1,0),        B_MASK,         PPCCOM,         { BOE, BI, BDPA } },
-{ "bca",     B(16,1,0),        B_MASK,         COM,            { BO, BI, BDA } },
-{ "bcla-",   B(16,1,1),        B_MASK,         PPCCOM,         { BOE, BI, BDMA } },
-{ "bcla+",   B(16,1,1),        B_MASK,         PPCCOM,         { BOE, BI, BDPA } },
-{ "bcla",    B(16,1,1),        B_MASK,         COM,            { BO, BI, BDA } },
-
-{ "sc",      SC(17,1,0), 0xffffffff,   PPC,            { 0 } },
-{ "svc",     SC(17,0,0), SC_MASK,      POWER,          { LEV, FL1, FL2 } },
-{ "svcl",    SC(17,0,1), SC_MASK,      POWER,          { LEV, FL1, FL2 } },
-{ "svca",    SC(17,1,0), SC_MASK,      PWRCOM,         { SV } },
-{ "svcla",   SC(17,1,1), SC_MASK,      POWER,          { SV } },
-
-{ "b",      B(18,0,0), B_MASK,         COM,    { LI } },
-{ "bl",      B(18,0,1),        B_MASK,         COM,    { LI } },
-{ "ba",      B(18,1,0),        B_MASK,         COM,    { LIA } },
-{ "bla",     B(18,1,1),        B_MASK,         COM,    { LIA } },
-
-{ "mcrf",    XL(19,0), XLBB_MASK|(3<<21)|(3<<16), COM, { BF, BFA } },
-
-{ "blr",     XLO(19,BOU,16,0), XLBOBIBB_MASK, PPCCOM,  { 0 } },
-{ "br",      XLO(19,BOU,16,0), XLBOBIBB_MASK, PWRCOM,  { 0 } },
-{ "blrl",    XLO(19,BOU,16,1), XLBOBIBB_MASK, PPCCOM,  { 0 } },
-{ "brl",     XLO(19,BOU,16,1), XLBOBIBB_MASK, PWRCOM,  { 0 } },
-{ "bdnzlr",  XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPCCOM,        { 0 } },
-{ "bdnzlr-", XLO(19,BODNZ,16,0), XLBOBIBB_MASK, PPCCOM,        { 0 } },
-{ "bdnzlr+", XLO(19,BODNZP,16,0), XLBOBIBB_MASK, PPCCOM,       { 0 } },
-{ "bdnzlrl", XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPCCOM,        { 0 } },
-{ "bdnzlrl-",XLO(19,BODNZ,16,1), XLBOBIBB_MASK, PPCCOM,        { 0 } },
-{ "bdnzlrl+",XLO(19,BODNZP,16,1), XLBOBIBB_MASK, PPCCOM,       { 0 } },
-{ "bdzlr",   XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdzlr-",  XLO(19,BODZ,16,0), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdzlr+",  XLO(19,BODZP,16,0), XLBOBIBB_MASK, PPCCOM,        { 0 } },
-{ "bdzlrl",  XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdzlrl-", XLO(19,BODZ,16,1), XLBOBIBB_MASK, PPCCOM, { 0 } },
-{ "bdzlrl+", XLO(19,BODZP,16,1), XLBOBIBB_MASK, PPCCOM,        { 0 } },
-{ "bltlr",   XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltlr-",  XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltlr+",  XLOCB(19,BOTP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltr",    XLOCB(19,BOT,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bltlrl",  XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltlrl-", XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltlrl+", XLOCB(19,BOTP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltrl",   XLOCB(19,BOT,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bgtlr",   XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtlr-",  XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtlr+",  XLOCB(19,BOTP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtr",    XLOCB(19,BOT,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bgtlrl",  XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtlrl-", XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtlrl+", XLOCB(19,BOTP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtrl",   XLOCB(19,BOT,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "beqlr",   XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqlr-",  XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqlr+",  XLOCB(19,BOTP,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqr",    XLOCB(19,BOT,CBEQ,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "beqlrl",  XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqlrl-", XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqlrl+", XLOCB(19,BOTP,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqrl",   XLOCB(19,BOT,CBEQ,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bsolr",   XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsolr-",  XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsolr+",  XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsor",    XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bsolrl",  XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsolrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsolrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsorl",   XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bunlr",   XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunlr-",  XLOCB(19,BOT,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunlr+",  XLOCB(19,BOTP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunlrl",  XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunlrl-", XLOCB(19,BOT,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunlrl+", XLOCB(19,BOTP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgelr",   XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgelr-",  XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgelr+",  XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bger",    XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bgelrl",  XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgelrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgelrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgerl",   XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bnllr",   XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnllr-",  XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnllr+",  XLOCB(19,BOFP,CBLT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlr",    XLOCB(19,BOF,CBLT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bnllrl",  XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnllrl-", XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnllrl+", XLOCB(19,BOFP,CBLT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlrl",   XLOCB(19,BOF,CBLT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "blelr",   XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blelr-",  XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blelr+",  XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bler",    XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "blelrl",  XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blelrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blelrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blerl",   XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bnglr",   XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnglr-",  XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnglr+",  XLOCB(19,BOFP,CBGT,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngr",    XLOCB(19,BOF,CBGT,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bnglrl",  XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnglrl-", XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnglrl+", XLOCB(19,BOFP,CBGT,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngrl",   XLOCB(19,BOF,CBGT,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bnelr",   XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnelr-",  XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnelr+",  XLOCB(19,BOFP,CBEQ,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bner",    XLOCB(19,BOF,CBEQ,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bnelrl",  XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnelrl-", XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnelrl+", XLOCB(19,BOFP,CBEQ,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnerl",   XLOCB(19,BOF,CBEQ,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bnslr",   XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnslr-",  XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnslr+",  XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsr",    XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bnslrl",  XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnslrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnslrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsrl",   XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PWRCOM, { CR } },
-{ "bnulr",   XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnulr-",  XLOCB(19,BOF,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnulr+",  XLOCB(19,BOFP,CBSO,16,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnulrl",  XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnulrl-", XLOCB(19,BOF,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnulrl+", XLOCB(19,BOFP,CBSO,16,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "btlr",    XLO(19,BOT,16,0), XLBOBB_MASK, PPCCOM,    { BI } },
-{ "btlr-",   XLO(19,BOT,16,0), XLBOBB_MASK, PPCCOM,    { BI } },
-{ "btlr+",   XLO(19,BOTP,16,0), XLBOBB_MASK, PPCCOM,   { BI } },
-{ "bbtr",    XLO(19,BOT,16,0), XLBOBB_MASK, PWRCOM,    { BI } },
-{ "btlrl",   XLO(19,BOT,16,1), XLBOBB_MASK, PPCCOM,    { BI } },
-{ "btlrl-",  XLO(19,BOT,16,1), XLBOBB_MASK, PPCCOM,    { BI } },
-{ "btlrl+",  XLO(19,BOTP,16,1), XLBOBB_MASK, PPCCOM,   { BI } },
-{ "bbtrl",   XLO(19,BOT,16,1), XLBOBB_MASK, PWRCOM,    { BI } },
-{ "bflr",    XLO(19,BOF,16,0), XLBOBB_MASK, PPCCOM,    { BI } },
-{ "bflr-",   XLO(19,BOF,16,0), XLBOBB_MASK, PPCCOM,    { BI } },
-{ "bflr+",   XLO(19,BOFP,16,0), XLBOBB_MASK, PPCCOM,   { BI } },
-{ "bbfr",    XLO(19,BOF,16,0), XLBOBB_MASK, PWRCOM,    { BI } },
-{ "bflrl",   XLO(19,BOF,16,1), XLBOBB_MASK, PPCCOM,    { BI } },
-{ "bflrl-",  XLO(19,BOF,16,1), XLBOBB_MASK, PPCCOM,    { BI } },
-{ "bflrl+",  XLO(19,BOFP,16,1), XLBOBB_MASK, PPCCOM,   { BI } },
-{ "bbfrl",   XLO(19,BOF,16,1), XLBOBB_MASK, PWRCOM,    { BI } },
-{ "bdnztlr", XLO(19,BODNZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnztlr-",XLO(19,BODNZT,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnztlr+",XLO(19,BODNZTP,16,0), XLBOBB_MASK, PPCCOM,        { BI } },
-{ "bdnztlrl",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnztlrl-",XLO(19,BODNZT,16,1), XLBOBB_MASK, PPCCOM,        { BI } },
-{ "bdnztlrl+",XLO(19,BODNZTP,16,1), XLBOBB_MASK, PPCCOM,{ BI } },
-{ "bdnzflr", XLO(19,BODNZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnzflr-",XLO(19,BODNZF,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnzflr+",XLO(19,BODNZFP,16,0), XLBOBB_MASK, PPCCOM,        { BI } },
-{ "bdnzflrl",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdnzflrl-",XLO(19,BODNZF,16,1), XLBOBB_MASK, PPCCOM,        { BI } },
-{ "bdnzflrl+",XLO(19,BODNZFP,16,1), XLBOBB_MASK, PPCCOM,{ BI } },
-{ "bdztlr",  XLO(19,BODZT,16,0), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bdztlr-", XLO(19,BODZT,16,0), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bdztlr+", XLO(19,BODZTP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdztlrl", XLO(19,BODZT,16,1), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bdztlrl-",XLO(19,BODZT,16,1), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bdztlrl+",XLO(19,BODZTP,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdzflr",  XLO(19,BODZF,16,0), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bdzflr-", XLO(19,BODZF,16,0), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bdzflr+", XLO(19,BODZFP,16,0), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bdzflrl", XLO(19,BODZF,16,1), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bdzflrl-",XLO(19,BODZF,16,1), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bdzflrl+",XLO(19,BODZFP,16,1), XLBOBB_MASK, PPCCOM, { BI } },
-{ "bclr",    XLLK(19,16,0), XLYBB_MASK,        PPCCOM,         { BO, BI } },
-{ "bclrl",   XLLK(19,16,1), XLYBB_MASK,        PPCCOM,         { BO, BI } },
-{ "bclr+",   XLYLK(19,16,1,0), XLYBB_MASK, PPCCOM,     { BOE, BI } },
-{ "bclrl+",  XLYLK(19,16,1,1), XLYBB_MASK, PPCCOM,     { BOE, BI } },
-{ "bclr-",   XLYLK(19,16,0,0), XLYBB_MASK, PPCCOM,     { BOE, BI } },
-{ "bclrl-",  XLYLK(19,16,0,1), XLYBB_MASK, PPCCOM,     { BOE, BI } },
-{ "bcr",     XLLK(19,16,0), XLBB_MASK, PWRCOM,         { BO, BI } },
-{ "bcrl",    XLLK(19,16,1), XLBB_MASK, PWRCOM,         { BO, BI } },
-
-{ "rfid",    XL(19,18),        0xffffffff,     PPC64,          { 0 } },
-
-{ "crnot",   XL(19,33), XL_MASK,       PPCCOM,         { BT, BA, BBA } },
-{ "crnor",   XL(19,33),        XL_MASK,        COM,            { BT, BA, BB } },
-
-{ "rfi",     XL(19,50),        0xffffffff,     COM,            { 0 } },
-{ "rfci",    XL(19,51),        0xffffffff,     PPC403,         { 0 } },
-
-{ "rfsvc",   XL(19,82),        0xffffffff,     POWER,          { 0 } },
-
-{ "crandc",  XL(19,129), XL_MASK,      COM,            { BT, BA, BB } },
-
-{ "isync",   XL(19,150), 0xffffffff,   PPCCOM,         { 0 } },
-{ "ics",     XL(19,150), 0xffffffff,   PWRCOM,         { 0 } },
-
-{ "crclr",   XL(19,193), XL_MASK,      PPCCOM,         { BT, BAT, BBA } },
-{ "crxor",   XL(19,193), XL_MASK,      COM,            { BT, BA, BB } },
-
-{ "crnand",  XL(19,225), XL_MASK,      COM,            { BT, BA, BB } },
-
-{ "crand",   XL(19,257), XL_MASK,      COM,            { BT, BA, BB } },
-
-{ "crset",   XL(19,289), XL_MASK,      PPCCOM,         { BT, BAT, BBA } },
-{ "creqv",   XL(19,289), XL_MASK,      COM,            { BT, BA, BB } },
-
-{ "crorc",   XL(19,417), XL_MASK,      COM,            { BT, BA, BB } },
-
-{ "crmove",  XL(19,449), XL_MASK,      PPCCOM,         { BT, BA, BBA } },
-{ "cror",    XL(19,449), XL_MASK,      COM,            { BT, BA, BB } },
-
-{ "bctr",    XLO(19,BOU,528,0), XLBOBIBB_MASK, COM,    { 0 } },
-{ "bctrl",   XLO(19,BOU,528,1), XLBOBIBB_MASK, COM,    { 0 } },
-{ "bltctr",  XLOCB(19,BOT,CBLT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltctr-", XLOCB(19,BOT,CBLT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltctr+", XLOCB(19,BOTP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltctrl", XLOCB(19,BOT,CBLT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltctrl-",XLOCB(19,BOT,CBLT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bltctrl+",XLOCB(19,BOTP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctr",  XLOCB(19,BOT,CBGT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctr-", XLOCB(19,BOT,CBGT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctr+", XLOCB(19,BOTP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctrl", XLOCB(19,BOT,CBGT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctrl-",XLOCB(19,BOT,CBGT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgtctrl+",XLOCB(19,BOTP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctr",  XLOCB(19,BOT,CBEQ,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctr-", XLOCB(19,BOT,CBEQ,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctr+", XLOCB(19,BOTP,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctrl", XLOCB(19,BOT,CBEQ,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctrl-",XLOCB(19,BOT,CBEQ,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "beqctrl+",XLOCB(19,BOTP,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctr",  XLOCB(19,BOT,CBSO,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctr-", XLOCB(19,BOT,CBSO,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctrl", XLOCB(19,BOT,CBSO,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctrl-",XLOCB(19,BOT,CBSO,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bsoctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctr",  XLOCB(19,BOT,CBSO,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctr-", XLOCB(19,BOT,CBSO,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctr+", XLOCB(19,BOTP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctrl", XLOCB(19,BOT,CBSO,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctrl-",XLOCB(19,BOT,CBSO,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bunctrl+",XLOCB(19,BOTP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectr",  XLOCB(19,BOF,CBLT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectr-", XLOCB(19,BOF,CBLT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectrl", XLOCB(19,BOF,CBLT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectrl-",XLOCB(19,BOF,CBLT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bgectrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctr",  XLOCB(19,BOF,CBLT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctr-", XLOCB(19,BOF,CBLT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctr+", XLOCB(19,BOFP,CBLT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctrl", XLOCB(19,BOF,CBLT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctrl-",XLOCB(19,BOF,CBLT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnlctrl+",XLOCB(19,BOFP,CBLT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectr",  XLOCB(19,BOF,CBGT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectr-", XLOCB(19,BOF,CBGT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectrl", XLOCB(19,BOF,CBGT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectrl-",XLOCB(19,BOF,CBGT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "blectrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctr",  XLOCB(19,BOF,CBGT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctr-", XLOCB(19,BOF,CBGT,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctr+", XLOCB(19,BOFP,CBGT,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctrl", XLOCB(19,BOF,CBGT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctrl-",XLOCB(19,BOF,CBGT,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bngctrl+",XLOCB(19,BOFP,CBGT,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectr",  XLOCB(19,BOF,CBEQ,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectr-", XLOCB(19,BOF,CBEQ,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectr+", XLOCB(19,BOFP,CBEQ,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectrl", XLOCB(19,BOF,CBEQ,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectrl-",XLOCB(19,BOF,CBEQ,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnectrl+",XLOCB(19,BOFP,CBEQ,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctr",  XLOCB(19,BOF,CBSO,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctr-", XLOCB(19,BOF,CBSO,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctrl", XLOCB(19,BOF,CBSO,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctrl-",XLOCB(19,BOF,CBSO,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnsctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctr",  XLOCB(19,BOF,CBSO,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctr-", XLOCB(19,BOF,CBSO,528,0),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctr+", XLOCB(19,BOFP,CBSO,528,0), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctrl", XLOCB(19,BOF,CBSO,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctrl-",XLOCB(19,BOF,CBSO,528,1),  XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "bnuctrl+",XLOCB(19,BOFP,CBSO,528,1), XLBOCBBB_MASK, PPCCOM, { CR } },
-{ "btctr",   XLO(19,BOT,528,0),  XLBOBB_MASK, PPCCOM,  { BI } },
-{ "btctr-",  XLO(19,BOT,528,0),  XLBOBB_MASK, PPCCOM,  { BI } },
-{ "btctr+",  XLO(19,BOTP,528,0), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "btctrl",  XLO(19,BOT,528,1),  XLBOBB_MASK, PPCCOM,  { BI } },
-{ "btctrl-", XLO(19,BOT,528,1),  XLBOBB_MASK, PPCCOM,  { BI } },
-{ "btctrl+", XLO(19,BOTP,528,1), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bfctr",   XLO(19,BOF,528,0),  XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bfctr-",  XLO(19,BOF,528,0),  XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bfctr+",  XLO(19,BOFP,528,0), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bfctrl",  XLO(19,BOF,528,1),  XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bfctrl-", XLO(19,BOF,528,1),  XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bfctrl+", XLO(19,BOFP,528,1), XLBOBB_MASK, PPCCOM,  { BI } },
-{ "bcctr",   XLLK(19,528,0),     XLYBB_MASK,  PPCCOM,  { BO, BI } },
-{ "bcctr-",  XLYLK(19,528,0,0),  XLYBB_MASK,  PPCCOM,  { BOE, BI } },
-{ "bcctr+",  XLYLK(19,528,1,0),  XLYBB_MASK,  PPCCOM,  { BOE, BI } },
-{ "bcctrl",  XLLK(19,528,1),     XLYBB_MASK,  PPCCOM,  { BO, BI } },
-{ "bcctrl-", XLYLK(19,528,0,1),  XLYBB_MASK,  PPCCOM,  { BOE, BI } },
-{ "bcctrl+", XLYLK(19,528,1,1),  XLYBB_MASK,  PPCCOM,  { BOE, BI } },
-{ "bcc",     XLLK(19,528,0),     XLBB_MASK,   PWRCOM,  { BO, BI } },
-{ "bccl",    XLLK(19,528,1),     XLBB_MASK,   PWRCOM,  { BO, BI } },
-
-{ "rlwimi",  M(20,0),  M_MASK,         PPCCOM,         { RA,RS,SH,MBE,ME } },
-{ "rlimi",   M(20,0),  M_MASK,         PWRCOM,         { RA,RS,SH,MBE,ME } },
-
-{ "rlwimi.", M(20,1),  M_MASK,         PPCCOM,         { RA,RS,SH,MBE,ME } },
-{ "rlimi.",  M(20,1),  M_MASK,         PWRCOM,         { RA,RS,SH,MBE,ME } },
-
-{ "rotlwi",  MME(21,31,0), MMBME_MASK, PPCCOM,         { RA, RS, SH } },
-{ "clrlwi",  MME(21,31,0), MSHME_MASK, PPCCOM,         { RA, RS, MB } },
-{ "rlwinm",  M(21,0),  M_MASK,         PPCCOM,         { RA,RS,SH,MBE,ME } },
-{ "rlinm",   M(21,0),  M_MASK,         PWRCOM,         { RA,RS,SH,MBE,ME } },
-{ "rotlwi.", MME(21,31,1), MMBME_MASK, PPCCOM,         { RA,RS,SH } },
-{ "clrlwi.", MME(21,31,1), MSHME_MASK, PPCCOM,         { RA, RS, MB } },
-{ "rlwinm.", M(21,1),  M_MASK,         PPCCOM,         { RA,RS,SH,MBE,ME } },
-{ "rlinm.",  M(21,1),  M_MASK,         PWRCOM,         { RA,RS,SH,MBE,ME } },
-
-{ "rlmi",    M(22,0),  M_MASK,         M601,           { RA,RS,RB,MBE,ME } },
-{ "rlmi.",   M(22,1),  M_MASK,         M601,           { RA,RS,RB,MBE,ME } },
-
-{ "rotlw",   MME(23,31,0), MMBME_MASK, PPCCOM,         { RA, RS, RB } },
-{ "rlwnm",   M(23,0),  M_MASK,         PPCCOM,         { RA,RS,RB,MBE,ME } },
-{ "rlnm",    M(23,0),  M_MASK,         PWRCOM,         { RA,RS,RB,MBE,ME } },
-{ "rotlw.",  MME(23,31,1), MMBME_MASK, PPCCOM,         { RA, RS, RB } },
-{ "rlwnm.",  M(23,1),  M_MASK,         PPCCOM,         { RA,RS,RB,MBE,ME } },
-{ "rlnm.",   M(23,1),  M_MASK,         PWRCOM,         { RA,RS,RB,MBE,ME } },
-
-{ "nop",     OP(24),   0xffffffff,     PPCCOM,         { 0 } },
-{ "ori",     OP(24),   OP_MASK,        PPCCOM,         { RA, RS, UI } },
-{ "oril",    OP(24),   OP_MASK,        PWRCOM,         { RA, RS, UI } },
-
-{ "oris",    OP(25),   OP_MASK,        PPCCOM,         { RA, RS, UI } },
-{ "oriu",    OP(25),   OP_MASK,        PWRCOM,         { RA, RS, UI } },
-
-{ "xori",    OP(26),   OP_MASK,        PPCCOM,         { RA, RS, UI } },
-{ "xoril",   OP(26),   OP_MASK,        PWRCOM,         { RA, RS, UI } },
-
-{ "xoris",   OP(27),   OP_MASK,        PPCCOM,         { RA, RS, UI } },
-{ "xoriu",   OP(27),   OP_MASK,        PWRCOM,         { RA, RS, UI } },
-
-{ "andi.",   OP(28),   OP_MASK,        PPCCOM,         { RA, RS, UI } },
-{ "andil.",  OP(28),   OP_MASK,        PWRCOM,         { RA, RS, UI } },
-
-{ "andis.",  OP(29),   OP_MASK,        PPCCOM,         { RA, RS, UI } },
-{ "andiu.",  OP(29),   OP_MASK,        PWRCOM,         { RA, RS, UI } },
-
-{ "rotldi",  MD(30,0,0), MDMB_MASK,    PPC64,          { RA, RS, SH6 } },
-{ "clrldi",  MD(30,0,0), MDSH_MASK,    PPC64,          { RA, RS, MB6 } },
-{ "rldicl",  MD(30,0,0), MD_MASK,      PPC64,          { RA, RS, SH6, MB6 } },
-{ "rotldi.", MD(30,0,1), MDMB_MASK,    PPC64,          { RA, RS, SH6 } },
-{ "clrldi.", MD(30,0,1), MDSH_MASK,    PPC64,          { RA, RS, MB6 } },
-{ "rldicl.", MD(30,0,1), MD_MASK,      PPC64,          { RA, RS, SH6, MB6 } },
-
-{ "rldicr",  MD(30,1,0), MD_MASK,      PPC64,          { RA, RS, SH6, ME6 } },
-{ "rldicr.", MD(30,1,1), MD_MASK,      PPC64,          { RA, RS, SH6, ME6 } },
-
-{ "rldic",   MD(30,2,0), MD_MASK,      PPC64,          { RA, RS, SH6, MB6 } },
-{ "rldic.",  MD(30,2,1), MD_MASK,      PPC64,          { RA, RS, SH6, MB6 } },
-
-{ "rldimi",  MD(30,3,0), MD_MASK,      PPC64,          { RA, RS, SH6, MB6 } },
-{ "rldimi.", MD(30,3,1), MD_MASK,      PPC64,          { RA, RS, SH6, MB6 } },
-
-{ "rotld",   MDS(30,8,0), MDSMB_MASK,  PPC64,          { RA, RS, RB } },
-{ "rldcl",   MDS(30,8,0), MDS_MASK,    PPC64,          { RA, RS, RB, MB6 } },
-{ "rotld.",  MDS(30,8,1), MDSMB_MASK,  PPC64,          { RA, RS, RB } },
-{ "rldcl.",  MDS(30,8,1), MDS_MASK,    PPC64,          { RA, RS, RB, MB6 } },
-
-{ "rldcr",   MDS(30,9,0), MDS_MASK,    PPC64,          { RA, RS, RB, ME6 } },
-{ "rldcr.",  MDS(30,9,1), MDS_MASK,    PPC64,          { RA, RS, RB, ME6 } },
-
-{ "cmpw",    XCMPL(31,0,0), XCMPL_MASK, PPCCOM,                { OBF, RA, RB } },
-{ "cmpd",    XCMPL(31,0,1), XCMPL_MASK, PPC64,         { OBF, RA, RB } },
-{ "cmp",     X(31,0),  XCMP_MASK,      PPCONLY,        { BF, L, RA, RB } },
-{ "cmp",     X(31,0),  XCMPL_MASK,     PWRCOM,         { BF, RA, RB } },
-
-{ "twlgt",   XTO(31,4,TOLGT), XTO_MASK, PPCCOM,                { RA, RB } },
-{ "tlgt",    XTO(31,4,TOLGT), XTO_MASK, PWRCOM,                { RA, RB } },
-{ "twllt",   XTO(31,4,TOLLT), XTO_MASK, PPCCOM,                { RA, RB } },
-{ "tllt",    XTO(31,4,TOLLT), XTO_MASK, PWRCOM,                { RA, RB } },
-{ "tweq",    XTO(31,4,TOEQ), XTO_MASK, PPCCOM,         { RA, RB } },
-{ "teq",     XTO(31,4,TOEQ), XTO_MASK, PWRCOM,         { RA, RB } },
-{ "twlge",   XTO(31,4,TOLGE), XTO_MASK, PPCCOM,                { RA, RB } },
-{ "tlge",    XTO(31,4,TOLGE), XTO_MASK, PWRCOM,                { RA, RB } },
-{ "twlnl",   XTO(31,4,TOLNL), XTO_MASK, PPCCOM,                { RA, RB } },
-{ "tlnl",    XTO(31,4,TOLNL), XTO_MASK, PWRCOM,                { RA, RB } },
-{ "twlle",   XTO(31,4,TOLLE), XTO_MASK, PPCCOM,                { RA, RB } },
-{ "tlle",    XTO(31,4,TOLLE), XTO_MASK, PWRCOM,                { RA, RB } },
-{ "twlng",   XTO(31,4,TOLNG), XTO_MASK, PPCCOM,                { RA, RB } },
-{ "tlng",    XTO(31,4,TOLNG), XTO_MASK, PWRCOM,                { RA, RB } },
-{ "twgt",    XTO(31,4,TOGT), XTO_MASK, PPCCOM,         { RA, RB } },
-{ "tgt",     XTO(31,4,TOGT), XTO_MASK, PWRCOM,         { RA, RB } },
-{ "twge",    XTO(31,4,TOGE), XTO_MASK, PPCCOM,         { RA, RB } },
-{ "tge",     XTO(31,4,TOGE), XTO_MASK, PWRCOM,         { RA, RB } },
-{ "twnl",    XTO(31,4,TONL), XTO_MASK, PPCCOM,         { RA, RB } },
-{ "tnl",     XTO(31,4,TONL), XTO_MASK, PWRCOM,         { RA, RB } },
-{ "twlt",    XTO(31,4,TOLT), XTO_MASK, PPCCOM,         { RA, RB } },
-{ "tlt",     XTO(31,4,TOLT), XTO_MASK, PWRCOM,         { RA, RB } },
-{ "twle",    XTO(31,4,TOLE), XTO_MASK, PPCCOM,         { RA, RB } },
-{ "tle",     XTO(31,4,TOLE), XTO_MASK, PWRCOM,         { RA, RB } },
-{ "twng",    XTO(31,4,TONG), XTO_MASK, PPCCOM,         { RA, RB } },
-{ "tng",     XTO(31,4,TONG), XTO_MASK, PWRCOM,         { RA, RB } },
-{ "twne",    XTO(31,4,TONE), XTO_MASK, PPCCOM,         { RA, RB } },
-{ "tne",     XTO(31,4,TONE), XTO_MASK, PWRCOM,         { RA, RB } },
-{ "trap",    XTO(31,4,TOU), 0xffffffff,        PPCCOM,         { 0 } },
-{ "tw",      X(31,4),  X_MASK,         PPCCOM,         { TO, RA, RB } },
-{ "t",       X(31,4),  X_MASK,         PWRCOM,         { TO, RA, RB } },
-
-{ "subfc",   XO(31,8,0,0), XO_MASK,    PPCCOM,         { RT, RA, RB } },
-{ "sf",      XO(31,8,0,0), XO_MASK,    PWRCOM,         { RT, RA, RB } },
-{ "subc",    XO(31,8,0,0), XO_MASK,    PPC,            { RT, RB, RA } },
-{ "subfc.",  XO(31,8,0,1), XO_MASK,    PPCCOM,         { RT, RA, RB } },
-{ "sf.",     XO(31,8,0,1), XO_MASK,    PWRCOM,         { RT, RA, RB } },
-{ "subc.",   XO(31,8,0,1), XO_MASK,    PPCCOM,         { RT, RB, RA } },
-{ "subfco",  XO(31,8,1,0), XO_MASK,    PPCCOM,         { RT, RA, RB } },
-{ "sfo",     XO(31,8,1,0), XO_MASK,    PWRCOM,         { RT, RA, RB } },
-{ "subco",   XO(31,8,1,0), XO_MASK,    PPC,            { RT, RB, RA } },
-{ "subfco.", XO(31,8,1,1), XO_MASK,    PPCCOM,         { RT, RA, RB } },
-{ "sfo.",    XO(31,8,1,1), XO_MASK,    PWRCOM,         { RT, RA, RB } },
-{ "subco.",  XO(31,8,1,1), XO_MASK,    PPC,            { RT, RB, RA } },
-
-{ "mulhdu",  XO(31,9,0,0), XO_MASK,    PPC64,          { RT, RA, RB } },
-{ "mulhdu.", XO(31,9,0,1), XO_MASK,    PPC64,          { RT, RA, RB } },
-
-{ "addc",    XO(31,10,0,0), XO_MASK,   PPCCOM,         { RT, RA, RB } },
-{ "a",       XO(31,10,0,0), XO_MASK,   PWRCOM,         { RT, RA, RB } },
-{ "addc.",   XO(31,10,0,1), XO_MASK,   PPCCOM,         { RT, RA, RB } },
-{ "a.",      XO(31,10,0,1), XO_MASK,   PWRCOM,         { RT, RA, RB } },
-{ "addco",   XO(31,10,1,0), XO_MASK,   PPCCOM,         { RT, RA, RB } },
-{ "ao",      XO(31,10,1,0), XO_MASK,   PWRCOM,         { RT, RA, RB } },
-{ "addco.",  XO(31,10,1,1), XO_MASK,   PPCCOM,         { RT, RA, RB } },
-{ "ao.",     XO(31,10,1,1), XO_MASK,   PWRCOM,         { RT, RA, RB } },
-
-{ "mulhwu",  XO(31,11,0,0), XO_MASK,   PPC,            { RT, RA, RB } },
-{ "mulhwu.", XO(31,11,0,1), XO_MASK,   PPC,            { RT, RA, RB } },
-
-{ "mfcr",    X(31,19), XRARB_MASK,     COM,            { RT } },
-
-{ "lwarx",   X(31,20), X_MASK,         PPC,            { RT, RA, RB } },
-
-{ "ldx",     X(31,21), X_MASK,         PPC64,          { RT, RA, RB } },
-
-{ "lwzx",    X(31,23), X_MASK,         PPCCOM,         { RT, RA, RB } },
-{ "lx",      X(31,23), X_MASK,         PWRCOM,         { RT, RA, RB } },
-
-{ "slw",     XRC(31,24,0), X_MASK,     PPCCOM,         { RA, RS, RB } },
-{ "sl",      XRC(31,24,0), X_MASK,     PWRCOM,         { RA, RS, RB } },
-{ "slw.",    XRC(31,24,1), X_MASK,     PPCCOM,         { RA, RS, RB } },
-{ "sl.",     XRC(31,24,1), X_MASK,     PWRCOM,         { RA, RS, RB } },
-
-{ "cntlzw",  XRC(31,26,0), XRB_MASK,   PPCCOM,         { RA, RS } },
-{ "cntlz",   XRC(31,26,0), XRB_MASK,   PWRCOM,         { RA, RS } },
-{ "cntlzw.", XRC(31,26,1), XRB_MASK,   PPCCOM,         { RA, RS } },
-{ "cntlz.",  XRC(31,26,1), XRB_MASK,   PWRCOM,         { RA, RS } },
-
-{ "sld",     XRC(31,27,0), X_MASK,     PPC64,          { RA, RS, RB } },
-{ "sld.",    XRC(31,27,1), X_MASK,     PPC64,          { RA, RS, RB } },
-
-{ "and",     XRC(31,28,0), X_MASK,     COM,            { RA, RS, RB } },
-{ "and.",    XRC(31,28,1), X_MASK,     COM,            { RA, RS, RB } },
-
-{ "maskg",   XRC(31,29,0), X_MASK,     M601,           { RA, RS, RB } },
-{ "maskg.",  XRC(31,29,1), X_MASK,     M601,           { RA, RS, RB } },
-
-{ "cmplw",   XCMPL(31,32,0), XCMPL_MASK, PPCCOM,       { OBF, RA, RB } },
-{ "cmpld",   XCMPL(31,32,1), XCMPL_MASK, PPC64,                { OBF, RA, RB } },
-{ "cmpl",    X(31,32), XCMP_MASK,       PPCONLY,       { BF, L, RA, RB } },
-{ "cmpl",    X(31,32), XCMPL_MASK,      PWRCOM,        { BF, RA, RB } },
-
-{ "subf",    XO(31,40,0,0), XO_MASK,   PPC,            { RT, RA, RB } },
-{ "sub",     XO(31,40,0,0), XO_MASK,   PPC,            { RT, RB, RA } },
-{ "subf.",   XO(31,40,0,1), XO_MASK,   PPC,            { RT, RA, RB } },
-{ "sub.",    XO(31,40,0,1), XO_MASK,   PPC,            { RT, RB, RA } },
-{ "subfo",   XO(31,40,1,0), XO_MASK,   PPC,            { RT, RA, RB } },
-{ "subo",    XO(31,40,1,0), XO_MASK,   PPC,            { RT, RB, RA } },
-{ "subfo.",  XO(31,40,1,1), XO_MASK,   PPC,            { RT, RA, RB } },
-{ "subo.",   XO(31,40,1,1), XO_MASK,   PPC,            { RT, RB, RA } },
-
-{ "ldux",    X(31,53), X_MASK,         PPC64,          { RT, RAL, RB } },
-
-{ "dcbst",   X(31,54), XRT_MASK,       PPC,            { RA, RB } },
-
-{ "lwzux",   X(31,55), X_MASK,         PPCCOM,         { RT, RAL, RB } },
-{ "lux",     X(31,55), X_MASK,         PWRCOM,         { RT, RA, RB } },
-
-{ "cntlzd",  XRC(31,58,0), XRB_MASK,   PPC64,          { RA, RS } },
-{ "cntlzd.", XRC(31,58,1), XRB_MASK,   PPC64,          { RA, RS } },
-
-{ "andc",    XRC(31,60,0), X_MASK,     COM,    { RA, RS, RB } },
-{ "andc.",   XRC(31,60,1), X_MASK,     COM,    { RA, RS, RB } },
-
-{ "tdlgt",   XTO(31,68,TOLGT), XTO_MASK, PPC64,                { RA, RB } },
-{ "tdllt",   XTO(31,68,TOLLT), XTO_MASK, PPC64,                { RA, RB } },
-{ "tdeq",    XTO(31,68,TOEQ), XTO_MASK,  PPC64,                { RA, RB } },
-{ "tdlge",   XTO(31,68,TOLGE), XTO_MASK, PPC64,                { RA, RB } },
-{ "tdlnl",   XTO(31,68,TOLNL), XTO_MASK, PPC64,                { RA, RB } },
-{ "tdlle",   XTO(31,68,TOLLE), XTO_MASK, PPC64,                { RA, RB } },
-{ "tdlng",   XTO(31,68,TOLNG), XTO_MASK, PPC64,                { RA, RB } },
-{ "tdgt",    XTO(31,68,TOGT), XTO_MASK,  PPC64,                { RA, RB } },
-{ "tdge",    XTO(31,68,TOGE), XTO_MASK,  PPC64,                { RA, RB } },
-{ "tdnl",    XTO(31,68,TONL), XTO_MASK,  PPC64,                { RA, RB } },
-{ "tdlt",    XTO(31,68,TOLT), XTO_MASK,  PPC64,                { RA, RB } },
-{ "tdle",    XTO(31,68,TOLE), XTO_MASK,  PPC64,                { RA, RB } },
-{ "tdng",    XTO(31,68,TONG), XTO_MASK,  PPC64,                { RA, RB } },
-{ "tdne",    XTO(31,68,TONE), XTO_MASK,  PPC64,                { RA, RB } },
-{ "td",             X(31,68),  X_MASK,          PPC64,         { TO, RA, RB } },
-
-{ "mulhd",   XO(31,73,0,0), XO_MASK,    PPC64,         { RT, RA, RB } },
-{ "mulhd.",  XO(31,73,0,1), XO_MASK,    PPC64,         { RT, RA, RB } },
-
-{ "mulhw",   XO(31,75,0,0), XO_MASK,   PPC,            { RT, RA, RB } },
-{ "mulhw.",  XO(31,75,0,1), XO_MASK,   PPC,            { RT, RA, RB } },
-
-{ "mtsrd",   X(31,82), XRB_MASK|(1<<20), PPC64,        { SR, RS } },
-
-{ "mfmsr",   X(31,83), XRARB_MASK,     COM,            { RT } },
-
-{ "ldarx",   X(31,84), X_MASK,         PPC64,          { RT, RA, RB } },
-
-{ "dcbf",    X(31,86), XRT_MASK,       PPC,            { RA, RB } },
-
-{ "lbzx",    X(31,87), X_MASK,         COM,            { RT, RA, RB } },
-
-{ "neg",     XO(31,104,0,0), XORB_MASK,        COM,            { RT, RA } },
-{ "neg.",    XO(31,104,0,1), XORB_MASK,        COM,            { RT, RA } },
-{ "nego",    XO(31,104,1,0), XORB_MASK,        COM,            { RT, RA } },
-{ "nego.",   XO(31,104,1,1), XORB_MASK,        COM,            { RT, RA } },
-
-{ "mul",     XO(31,107,0,0), XO_MASK,  M601,           { RT, RA, RB } },
-{ "mul.",    XO(31,107,0,1), XO_MASK,  M601,           { RT, RA, RB } },
-{ "mulo",    XO(31,107,1,0), XO_MASK,  M601,           { RT, RA, RB } },
-{ "mulo.",   XO(31,107,1,1), XO_MASK,  M601,           { RT, RA, RB } },
-
-{ "mtsrdin", X(31,114),        XRA_MASK,       PPC64,          { RS, RB } },
-
-{ "clf",     X(31,118), XRB_MASK,      POWER,          { RT, RA } },
-
-{ "lbzux",   X(31,119),        X_MASK,         COM,            { RT, RAL, RB } },
-
-{ "not",     XRC(31,124,0), X_MASK,    COM,            { RA, RS, RBS } },
-{ "nor",     XRC(31,124,0), X_MASK,    COM,            { RA, RS, RB } },
-{ "not.",    XRC(31,124,1), X_MASK,    COM,            { RA, RS, RBS } },
-{ "nor.",    XRC(31,124,1), X_MASK,    COM,            { RA, RS, RB } },
-
-{ "wrtee",   X(31,131),        XRARB_MASK,     PPC403,         { RS } },
-
-{ "subfe",   XO(31,136,0,0), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "sfe",     XO(31,136,0,0), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "subfe.",  XO(31,136,0,1), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "sfe.",    XO(31,136,0,1), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "subfeo",  XO(31,136,1,0), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "sfeo",    XO(31,136,1,0), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "subfeo.", XO(31,136,1,1), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "sfeo.",   XO(31,136,1,1), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-
-{ "adde",    XO(31,138,0,0), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "ae",      XO(31,138,0,0), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "adde.",   XO(31,138,0,1), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "ae.",     XO(31,138,0,1), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "addeo",   XO(31,138,1,0), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "aeo",     XO(31,138,1,0), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "addeo.",  XO(31,138,1,1), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "aeo.",    XO(31,138,1,1), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-
-{ "mtcr",    XFXM(31,144,0xff), XFXFXM_MASK|FXM_MASK, COM,     { RS }},
-{ "mtcrf",   X(31,144),        XFXFXM_MASK,    COM,            { FXM, RS } },
-
-{ "mtmsr",   X(31,146),        XRARB_MASK,     COM,            { RS } },
-
-{ "stdx",    X(31,149), X_MASK,                PPC64,          { RS, RA, RB } },
-
-{ "stwcx.",  XRC(31,150,1), X_MASK,    PPC,            { RS, RA, RB } },
-
-{ "stwx",    X(31,151), X_MASK,                PPCCOM,         { RS, RA, RB } },
-{ "stx",     X(31,151), X_MASK,                PWRCOM,         { RS, RA, RB } },
-
-{ "slq",     XRC(31,152,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "slq.",    XRC(31,152,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "sle",     XRC(31,153,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "sle.",    XRC(31,153,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "wrteei",  X(31,163),        XE_MASK,        PPC403,         { E } },
-
-{ "mtmsrd",  X(31,178),        XRARB_MASK,     PPC64,          { RS } },
-
-{ "stdux",   X(31,181),        X_MASK,         PPC64,          { RS, RAS, RB } },
-
-{ "stwux",   X(31,183),        X_MASK,         PPCCOM,         { RS, RAS, RB } },
-{ "stux",    X(31,183),        X_MASK,         PWRCOM,         { RS, RA, RB } },
-
-{ "sliq",    XRC(31,184,0), X_MASK,    M601,           { RA, RS, SH } },
-{ "sliq.",   XRC(31,184,1), X_MASK,    M601,           { RA, RS, SH } },
-
-{ "subfze",  XO(31,200,0,0), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "sfze",    XO(31,200,0,0), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "subfze.", XO(31,200,0,1), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "sfze.",   XO(31,200,0,1), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "subfzeo", XO(31,200,1,0), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "sfzeo",   XO(31,200,1,0), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "subfzeo.",XO(31,200,1,1), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "sfzeo.",  XO(31,200,1,1), XORB_MASK, PWRCOM,                { RT, RA } },
-
-{ "addze",   XO(31,202,0,0), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "aze",     XO(31,202,0,0), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "addze.",  XO(31,202,0,1), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "aze.",    XO(31,202,0,1), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "addzeo",  XO(31,202,1,0), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "azeo",    XO(31,202,1,0), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "addzeo.", XO(31,202,1,1), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "azeo.",   XO(31,202,1,1), XORB_MASK, PWRCOM,                { RT, RA } },
-
-{ "mtsr",    X(31,210),        XRB_MASK|(1<<20), COM32,        { SR, RS } },
-
-{ "stdcx.",  XRC(31,214,1), X_MASK,    PPC64,          { RS, RA, RB } },
-
-{ "stbx",    X(31,215),        X_MASK,         COM,    { RS, RA, RB } },
-
-{ "sllq",    XRC(31,216,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "sllq.",   XRC(31,216,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "sleq",    XRC(31,217,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "sleq.",   XRC(31,217,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "subfme",  XO(31,232,0,0), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "sfme",    XO(31,232,0,0), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "subfme.", XO(31,232,0,1), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "sfme.",   XO(31,232,0,1), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "subfmeo", XO(31,232,1,0), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "sfmeo",   XO(31,232,1,0), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "subfmeo.",XO(31,232,1,1), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "sfmeo.",  XO(31,232,1,1), XORB_MASK, PWRCOM,                { RT, RA } },
-
-{ "mulld",   XO(31,233,0,0), XO_MASK,  PPC64,          { RT, RA, RB } },
-{ "mulld.",  XO(31,233,0,1), XO_MASK,  PPC64,          { RT, RA, RB } },
-{ "mulldo",  XO(31,233,1,0), XO_MASK,  PPC64,          { RT, RA, RB } },
-{ "mulldo.", XO(31,233,1,1), XO_MASK,  PPC64,          { RT, RA, RB } },
-
-{ "addme",   XO(31,234,0,0), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "ame",     XO(31,234,0,0), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "addme.",  XO(31,234,0,1), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "ame.",    XO(31,234,0,1), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "addmeo",  XO(31,234,1,0), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "ameo",    XO(31,234,1,0), XORB_MASK, PWRCOM,                { RT, RA } },
-{ "addmeo.", XO(31,234,1,1), XORB_MASK, PPCCOM,                { RT, RA } },
-{ "ameo.",   XO(31,234,1,1), XORB_MASK, PWRCOM,                { RT, RA } },
-
-{ "mullw",   XO(31,235,0,0), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "muls",    XO(31,235,0,0), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "mullw.",  XO(31,235,0,1), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "muls.",   XO(31,235,0,1), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "mullwo",  XO(31,235,1,0), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "mulso",   XO(31,235,1,0), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "mullwo.", XO(31,235,1,1), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "mulso.",  XO(31,235,1,1), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-
-{ "mtsrin",  X(31,242),        XRA_MASK,       PPC32,          { RS, RB } },
-{ "mtsri",   X(31,242),        XRA_MASK,       POWER32,        { RS, RB } },
-
-{ "dcbtst",  X(31,246),        XRT_MASK,       PPC,            { RA, RB } },
-
-{ "stbux",   X(31,247),        X_MASK,         COM,            { RS, RAS, RB } },
-
-{ "slliq",   XRC(31,248,0), X_MASK,    M601,           { RA, RS, SH } },
-{ "slliq.",  XRC(31,248,1), X_MASK,    M601,           { RA, RS, SH } },
-
-{ "doz",     XO(31,264,0,0), XO_MASK,  M601,           { RT, RA, RB } },
-{ "doz.",    XO(31,264,0,1), XO_MASK,  M601,           { RT, RA, RB } },
-{ "dozo",    XO(31,264,1,0), XO_MASK,  M601,           { RT, RA, RB } },
-{ "dozo.",   XO(31,264,1,1), XO_MASK,  M601,           { RT, RA, RB } },
-
-{ "add",     XO(31,266,0,0), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "cax",     XO(31,266,0,0), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "add.",    XO(31,266,0,1), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "cax.",    XO(31,266,0,1), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "addo",    XO(31,266,1,0), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "caxo",    XO(31,266,1,0), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-{ "addo.",   XO(31,266,1,1), XO_MASK,  PPCCOM,         { RT, RA, RB } },
-{ "caxo.",   XO(31,266,1,1), XO_MASK,  PWRCOM,         { RT, RA, RB } },
-
-{ "lscbx",   XRC(31,277,0), X_MASK,    M601,           { RT, RA, RB } },
-{ "lscbx.",  XRC(31,277,1), X_MASK,    M601,           { RT, RA, RB } },
-
-{ "dcbt",    X(31,278),        XRT_MASK,       PPC,            { RA, RB } },
-
-{ "lhzx",    X(31,279),        X_MASK,         COM,            { RT, RA, RB } },
-
-{ "icbt",    X(31,262),        XRT_MASK,       PPC403,         { RA, RB } },
-
-{ "eqv",     XRC(31,284,0), X_MASK,    COM,            { RA, RS, RB } },
-{ "eqv.",    XRC(31,284,1), X_MASK,    COM,            { RA, RS, RB } },
-
-{ "tlbie",   X(31,306),        XRTRA_MASK,     PPC,            { RB } },
-{ "tlbi",    X(31,306),        XRT_MASK,       POWER,          { RA, RB } },
-
-{ "eciwx",   X(31,310), X_MASK,                PPC,            { RT, RA, RB } },
-
-{ "lhzux",   X(31,311),        X_MASK,         COM,            { RT, RAL, RB } },
-
-{ "xor",     XRC(31,316,0), X_MASK,    COM,            { RA, RS, RB } },
-{ "xor.",    XRC(31,316,1), X_MASK,    COM,            { RA, RS, RB } },
-
-{ "mfexisr", XSPR(31,323,64), XSPR_MASK, PPC403,       { RT } },
-{ "mfexier", XSPR(31,323,66), XSPR_MASK, PPC403,       { RT } },
-{ "mfbr0",   XSPR(31,323,128), XSPR_MASK, PPC403,      { RT } },
-{ "mfbr1",   XSPR(31,323,129), XSPR_MASK, PPC403,      { RT } },
-{ "mfbr2",   XSPR(31,323,130), XSPR_MASK, PPC403,      { RT } },
-{ "mfbr3",   XSPR(31,323,131), XSPR_MASK, PPC403,      { RT } },
-{ "mfbr4",   XSPR(31,323,132), XSPR_MASK, PPC403,      { RT } },
-{ "mfbr5",   XSPR(31,323,133), XSPR_MASK, PPC403,      { RT } },
-{ "mfbr6",   XSPR(31,323,134), XSPR_MASK, PPC403,      { RT } },
-{ "mfbr7",   XSPR(31,323,135), XSPR_MASK, PPC403,      { RT } },
-{ "mfbear",  XSPR(31,323,144), XSPR_MASK, PPC403,      { RT } },
-{ "mfbesr",  XSPR(31,323,145), XSPR_MASK, PPC403,      { RT } },
-{ "mfiocr",  XSPR(31,323,160), XSPR_MASK, PPC403,      { RT } },
-{ "mfdmacr0", XSPR(31,323,192), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmact0", XSPR(31,323,193), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmada0", XSPR(31,323,194), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmasa0", XSPR(31,323,195), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmacc0", XSPR(31,323,196), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmacr1", XSPR(31,323,200), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmact1", XSPR(31,323,201), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmada1", XSPR(31,323,202), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmasa1", XSPR(31,323,203), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmacc1", XSPR(31,323,204), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmacr2", XSPR(31,323,208), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmact2", XSPR(31,323,209), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmada2", XSPR(31,323,210), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmasa2", XSPR(31,323,211), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmacc2", XSPR(31,323,212), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmacr3", XSPR(31,323,216), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmact3", XSPR(31,323,217), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmada3", XSPR(31,323,218), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmasa3", XSPR(31,323,219), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmacc3", XSPR(31,323,220), XSPR_MASK, PPC403,     { RT } },
-{ "mfdmasr", XSPR(31,323,224), XSPR_MASK, PPC403,      { RT } },
-{ "mfdcr",   X(31,323),        X_MASK,         PPC403,         { RT, SPR } },
-
-{ "div",     XO(31,331,0,0), XO_MASK,  M601,           { RT, RA, RB } },
-{ "div.",    XO(31,331,0,1), XO_MASK,  M601,           { RT, RA, RB } },
-{ "divo",    XO(31,331,1,0), XO_MASK,  M601,           { RT, RA, RB } },
-{ "divo.",   XO(31,331,1,1), XO_MASK,  M601,           { RT, RA, RB } },
-
-{ "mfmq",     XSPR(31,339,0),   XSPR_MASK, M601,       { RT } },
-{ "mfxer",    XSPR(31,339,1),   XSPR_MASK, COM,                { RT } },
-{ "mfrtcu",   XSPR(31,339,4),   XSPR_MASK, COM,                { RT } },
-{ "mfrtcl",   XSPR(31,339,5),   XSPR_MASK, COM,                { RT } },
-{ "mfdec",    XSPR(31,339,6),   XSPR_MASK, MFDEC1,     { RT } },
-{ "mflr",     XSPR(31,339,8),   XSPR_MASK, COM,                { RT } },
-{ "mfctr",    XSPR(31,339,9),   XSPR_MASK, COM,                { RT } },
-{ "mftid",    XSPR(31,339,17),  XSPR_MASK, POWER,      { RT } },
-{ "mfdsisr",  XSPR(31,339,18),  XSPR_MASK, COM,                { RT } },
-{ "mfdar",    XSPR(31,339,19),  XSPR_MASK, COM,                { RT } },
-{ "mfdec",    XSPR(31,339,22),  XSPR_MASK, MFDEC2,     { RT } },
-{ "mfsdr0",   XSPR(31,339,24),  XSPR_MASK, POWER,      { RT } },
-{ "mfsdr1",   XSPR(31,339,25),  XSPR_MASK, COM,                { RT } },
-{ "mfsrr0",   XSPR(31,339,26),  XSPR_MASK, COM,                { RT } },
-{ "mfsrr1",   XSPR(31,339,27),  XSPR_MASK, COM,                { RT } },
-{ "mfcmpa",   XSPR(31,339,144), XSPR_MASK, PPC860,     { RT } },
-{ "mfcmpb",   XSPR(31,339,145), XSPR_MASK, PPC860,     { RT } },
-{ "mfcmpc",   XSPR(31,339,146), XSPR_MASK, PPC860,     { RT } },
-{ "mfcmpd",   XSPR(31,339,147), XSPR_MASK, PPC860,     { RT } },
-{ "mficr",    XSPR(31,339,148), XSPR_MASK, PPC860,     { RT } },
-{ "mfder",    XSPR(31,339,149), XSPR_MASK, PPC860,     { RT } },
-{ "mfcounta", XSPR(31,339,150), XSPR_MASK, PPC860,     { RT } },
-{ "mfcountb", XSPR(31,339,151), XSPR_MASK, PPC860,     { RT } },
-{ "mfcmpe",   XSPR(31,339,152), XSPR_MASK, PPC860,     { RT } },
-{ "mfcmpf",   XSPR(31,339,153), XSPR_MASK, PPC860,     { RT } },
-{ "mfcmpg",   XSPR(31,339,154), XSPR_MASK, PPC860,     { RT } },
-{ "mfcmph",   XSPR(31,339,155), XSPR_MASK, PPC860,     { RT } },
-{ "mflctrl1", XSPR(31,339,156), XSPR_MASK, PPC860,     { RT } },
-{ "mflctrl2", XSPR(31,339,157), XSPR_MASK, PPC860,     { RT } },
-{ "mfictrl",  XSPR(31,339,158), XSPR_MASK, PPC860,     { RT } },
-{ "mfbar",    XSPR(31,339,159), XSPR_MASK, PPC860,     { RT } },
-{ "mfsprg4",  XSPR(31,339,260), XSPR_MASK, PPC405,     { RT } },
-{ "mfsprg5",  XSPR(31,339,261), XSPR_MASK, PPC405,     { RT } },
-{ "mfsprg6",  XSPR(31,339,262), XSPR_MASK, PPC405,     { RT } },
-{ "mfsprg7",  XSPR(31,339,263), XSPR_MASK, PPC405,     { RT } },
-{ "mfsprg",   XSPR(31,339,272), XSPRG_MASK, PPC,       { RT, SPRG } },
-{ "mfsprg0",  XSPR(31,339,272), XSPR_MASK, PPC,                { RT } },
-{ "mfsprg1",  XSPR(31,339,273), XSPR_MASK, PPC,                { RT } },
-{ "mfsprg2",  XSPR(31,339,274), XSPR_MASK, PPC,                { RT } },
-{ "mfsprg3",  XSPR(31,339,275), XSPR_MASK, PPC,                { RT } },
-{ "mfasr",    XSPR(31,339,280), XSPR_MASK, PPC64,      { RT } },
-{ "mfear",    XSPR(31,339,282), XSPR_MASK, PPC,                { RT } },
-{ "mfpvr",    XSPR(31,339,287), XSPR_MASK, PPC,                { RT } },
-{ "mfibatu",  XSPR(31,339,528), XSPRBAT_MASK, PPC,     { RT, SPRBAT } },
-{ "mfibatl",  XSPR(31,339,529), XSPRBAT_MASK, PPC,     { RT, SPRBAT } },
-{ "mfdbatu",  XSPR(31,339,536), XSPRBAT_MASK, PPC,     { RT, SPRBAT } },
-{ "mfdbatl",  XSPR(31,339,537), XSPRBAT_MASK, PPC,     { RT, SPRBAT } },
-{ "mfic_cst", XSPR(31,339,560), XSPR_MASK, PPC860,     { RT } },
-{ "mfic_adr", XSPR(31,339,561), XSPR_MASK, PPC860,     { RT } },
-{ "mfic_dat", XSPR(31,339,562), XSPR_MASK, PPC860,     { RT } },
-{ "mfdc_cst", XSPR(31,339,568), XSPR_MASK, PPC860,     { RT } },
-{ "mfdc_adr", XSPR(31,339,569), XSPR_MASK, PPC860,     { RT } },
-{ "mfdc_dat", XSPR(31,339,570), XSPR_MASK, PPC860,     { RT } },
-{ "mfdpdr",   XSPR(31,339,630), XSPR_MASK, PPC860,     { RT } },
-{ "mfdpir",   XSPR(31,339,631), XSPR_MASK, PPC860,     { RT } },
-{ "mfimmr",   XSPR(31,339,638), XSPR_MASK, PPC860,     { RT } },
-{ "mfmi_ctr", XSPR(31,339,784), XSPR_MASK, PPC860,     { RT } },
-{ "mfmi_ap",  XSPR(31,339,786), XSPR_MASK, PPC860,     { RT } },
-{ "mfmi_epn", XSPR(31,339,787), XSPR_MASK, PPC860,     { RT } },
-{ "mfmi_twc", XSPR(31,339,789), XSPR_MASK, PPC860,     { RT } },
-{ "mfmi_rpn", XSPR(31,339,790), XSPR_MASK, PPC860,     { RT } },
-{ "mfmd_ctr", XSPR(31,339,792), XSPR_MASK, PPC860,     { RT } },
-{ "mfm_casid",XSPR(31,339,793), XSPR_MASK, PPC860,     { RT } },
-{ "mfmd_ap",  XSPR(31,339,794), XSPR_MASK, PPC860,     { RT } },
-{ "mfmd_epn", XSPR(31,339,795), XSPR_MASK, PPC860,     { RT } },
-{ "mfmd_twb", XSPR(31,339,796), XSPR_MASK, PPC860,     { RT } },
-{ "mfmd_twc", XSPR(31,339,797), XSPR_MASK, PPC860,     { RT } },
-{ "mfmd_rpn", XSPR(31,339,798), XSPR_MASK, PPC860,     { RT } },
-{ "mfm_tw",   XSPR(31,339,799), XSPR_MASK, PPC860,     { RT } },
-{ "mfmi_dbcam",XSPR(31,339,816), XSPR_MASK, PPC860,    { RT } },
-{ "mfmi_dbram0",XSPR(31,339,817), XSPR_MASK, PPC860,   { RT } },
-{ "mfmi_dbram1",XSPR(31,339,818), XSPR_MASK, PPC860,   { RT } },
-{ "mfmd_dbcam", XSPR(31,339,824), XSPR_MASK, PPC860,   { RT } },
-{ "mfmd_dbram0",XSPR(31,339,825), XSPR_MASK, PPC860,   { RT } },
-{ "mfmd_dbram1",XSPR(31,339,826), XSPR_MASK, PPC860,   { RT } },
-{ "mfzpr",     XSPR(31,339,944), XSPR_MASK, PPC403,    { RT } },
-{ "mfpid",     XSPR(31,339,945), XSPR_MASK, PPC403,    { RT } },
-{ "mfccr0",    XSPR(31,339,947), XSPR_MASK, PPC405,    { RT } },
-{ "mficdbdr",  XSPR(31,339,979), XSPR_MASK, PPC403,    { RT } },
-{ "mfummcr0",  XSPR(31,339,936),  XSPR_MASK, PPC750,   { RT } },
-{ "mfupmc1",   XSPR(31,339,937),  XSPR_MASK, PPC750,   { RT } },
-{ "mfupmc2",   XSPR(31,339,938),  XSPR_MASK, PPC750,   { RT } },
-{ "mfusia",    XSPR(31,339,939),  XSPR_MASK, PPC750,   { RT } },
-{ "mfummcr1",  XSPR(31,339,940),  XSPR_MASK, PPC750,   { RT } },
-{ "mfupmc3",   XSPR(31,339,941),  XSPR_MASK, PPC750,   { RT } },
-{ "mfupmc4",   XSPR(31,339,942),  XSPR_MASK, PPC750,   { RT } },
-{ "mfiac3",     XSPR(31,339,948),  XSPR_MASK, PPC405,  { RT } },
-{ "mfiac4",     XSPR(31,339,949),  XSPR_MASK, PPC405,  { RT } },
-{ "mfdvc1",     XSPR(31,339,950),  XSPR_MASK, PPC405,  { RT } },
-{ "mfdvc2",     XSPR(31,339,951),  XSPR_MASK, PPC405,  { RT } },
-{ "mfmmcr0",   XSPR(31,339,952),  XSPR_MASK, PPC750,   { RT } },
-{ "mfpmc1",    XSPR(31,339,953),  XSPR_MASK, PPC750,   { RT } },
-{ "mfsgr",     XSPR(31,339,953),  XSPR_MASK, PPC403,   { RT } },
-{ "mfpmc2",    XSPR(31,339,954),  XSPR_MASK, PPC750,   { RT } },
-{ "mfdcwr",    XSPR(31,339,954),  XSPR_MASK, PPC403,   { RT } },
-{ "mfsia",     XSPR(31,339,955),  XSPR_MASK, PPC750,   { RT } },
-{ "mfsler",    XSPR(31,339,955),  XSPR_MASK, PPC405,   { RT } },
-{ "mfmmcr1",   XSPR(31,339,956),  XSPR_MASK, PPC750,   { RT } },
-{ "mfsu0r",    XSPR(31,339,956),  XSPR_MASK, PPC405,   { RT } },
-{ "mfpmc3",    XSPR(31,339,957),  XSPR_MASK, PPC750,   { RT } },
-{ "mfdbcr1",   XSPR(31,339,957),  XSPR_MASK, PPC405,   { RT } },
-{ "mfpmc4",    XSPR(31,339,958),  XSPR_MASK, PPC750,   { RT } },
-{ "mfesr",   XSPR(31,339,980), XSPR_MASK, PPC403,      { RT } },
-{ "mfdear",  XSPR(31,339,981), XSPR_MASK, PPC403,      { RT } },
-{ "mfevpr",  XSPR(31,339,982), XSPR_MASK, PPC403,      { RT } },
-{ "mfcdbcr", XSPR(31,339,983), XSPR_MASK, PPC403,      { RT } },
-{ "mftsr",   XSPR(31,339,984), XSPR_MASK, PPC403,      { RT } },
-{ "mftcr",   XSPR(31,339,986), XSPR_MASK, PPC403,      { RT } },
-{ "mfpit",   XSPR(31,339,987), XSPR_MASK, PPC403,      { RT } },
-{ "mftbhi",  XSPR(31,339,988), XSPR_MASK, PPC403,      { RT } },
-{ "mftblo",  XSPR(31,339,989), XSPR_MASK, PPC403,      { RT } },
-{ "mfsrr2",  XSPR(31,339,990), XSPR_MASK, PPC403,      { RT } },
-{ "mfsrr3",  XSPR(31,339,991), XSPR_MASK, PPC403,      { RT } },
-{ "mfdbsr",  XSPR(31,339,1008), XSPR_MASK, PPC403,     { RT } },
-{ "mfdbcr0", XSPR(31,339,1010), XSPR_MASK, PPC405,     { RT } },
-{ "mfiac1",  XSPR(31,339,1012), XSPR_MASK, PPC403,     { RT } },
-{ "mfiac2",  XSPR(31,339,1013), XSPR_MASK, PPC403,     { RT } },
-{ "mfdac1",  XSPR(31,339,1014), XSPR_MASK, PPC403,     { RT } },
-{ "mfdac2",  XSPR(31,339,1015), XSPR_MASK, PPC403,     { RT } },
-{ "mfdccr",  XSPR(31,339,1018), XSPR_MASK, PPC403,     { RT } },
-{ "mficcr",  XSPR(31,339,1019), XSPR_MASK, PPC403,     { RT } },
-{ "mfpbl1",  XSPR(31,339,1020), XSPR_MASK, PPC403,     { RT } },
-{ "mfpbu1",  XSPR(31,339,1021), XSPR_MASK, PPC403,     { RT } },
-{ "mfpbl2",  XSPR(31,339,1022), XSPR_MASK, PPC403,     { RT } },
-{ "mfpbu2",  XSPR(31,339,1023), XSPR_MASK, PPC403,     { RT } },
-{ "mfl2cr",    XSPR(31,339,1017), XSPR_MASK, PPC750,   { RT } },
-{ "mfictc",    XSPR(31,339,1019), XSPR_MASK, PPC750,   { RT } },
-{ "mfthrm1",   XSPR(31,339,1020), XSPR_MASK, PPC750,   { RT } },
-{ "mfthrm2",   XSPR(31,339,1021), XSPR_MASK, PPC750,   { RT } },
-{ "mfthrm3",   XSPR(31,339,1022), XSPR_MASK, PPC750,   { RT } },
-{ "mfspr",   X(31,339),        X_MASK,         COM,            { RT, SPR } },
-
-{ "lwax",    X(31,341),        X_MASK,         PPC64,          { RT, RA, RB } },
-
-{ "lhax",    X(31,343),        X_MASK,         COM,            { RT, RA, RB } },
-
-{ "dccci",   X(31,454),        XRT_MASK,       PPC403,         { RA, RB } },
-
-{ "abs",     XO(31,360,0,0), XORB_MASK, M601,          { RT, RA } },
-{ "abs.",    XO(31,360,0,1), XORB_MASK, M601,          { RT, RA } },
-{ "abso",    XO(31,360,1,0), XORB_MASK, M601,          { RT, RA } },
-{ "abso.",   XO(31,360,1,1), XORB_MASK, M601,          { RT, RA } },
-
-{ "divs",    XO(31,363,0,0), XO_MASK,  M601,           { RT, RA, RB } },
-{ "divs.",   XO(31,363,0,1), XO_MASK,  M601,           { RT, RA, RB } },
-{ "divso",   XO(31,363,1,0), XO_MASK,  M601,           { RT, RA, RB } },
-{ "divso.",  XO(31,363,1,1), XO_MASK,  M601,           { RT, RA, RB } },
-
-{ "tlbia",   X(31,370),        0xffffffff,     PPC,            { 0 } },
-
-{ "mftbl",   XSPR(31,371,268), XSPR_MASK, PPC,         { RT } },
-{ "mftbu",   XSPR(31,371,269), XSPR_MASK, PPC,         { RT } },
-{ "mftb",    X(31,371),        X_MASK,         PPC,            { RT, TBR } },
-
-{ "lwaux",   X(31,373),        X_MASK,         PPC64,          { RT, RAL, RB } },
-
-{ "lhaux",   X(31,375),        X_MASK,         COM,            { RT, RAL, RB } },
-
-{ "sthx",    X(31,407),        X_MASK,         COM,            { RS, RA, RB } },
-
-{ "lfqx",    X(31,791),        X_MASK,         POWER2,         { FRT, RA, RB } },
-
-{ "lfqux",   X(31,823),        X_MASK,         POWER2,         { FRT, RA, RB } },
-
-{ "stfqx",   X(31,919),        X_MASK,         POWER2,         { FRS, RA, RB } },
-
-{ "stfqux",  X(31,951),        X_MASK,         POWER2,         { FRS, RA, RB } },
-
-{ "orc",     XRC(31,412,0), X_MASK,    COM,            { RA, RS, RB } },
-{ "orc.",    XRC(31,412,1), X_MASK,    COM,            { RA, RS, RB } },
-
-{ "sradi",   XS(31,413,0), XS_MASK,    PPC64,          { RA, RS, SH6 } },
-{ "sradi.",  XS(31,413,1), XS_MASK,    PPC64,          { RA, RS, SH6 } },
-
-{ "slbie",   X(31,434),        XRTRA_MASK,     PPC64,          { RB } },
-
-{ "ecowx",   X(31,438),        X_MASK,         PPC,            { RT, RA, RB } },
-
-{ "sthux",   X(31,439),        X_MASK,         COM,            { RS, RAS, RB } },
-
-{ "mr",             XRC(31,444,0), X_MASK,     COM,            { RA, RS, RBS } },
-{ "or",      XRC(31,444,0), X_MASK,    COM,            { RA, RS, RB } },
-{ "mr.",     XRC(31,444,1), X_MASK,    COM,            { RA, RS, RBS } },
-{ "or.",     XRC(31,444,1), X_MASK,    COM,            { RA, RS, RB } },
-
-{ "mtexisr", XSPR(31,451,64), XSPR_MASK, PPC403,       { RT } },
-{ "mtexier", XSPR(31,451,66), XSPR_MASK, PPC403,       { RT } },
-{ "mtbr0",   XSPR(31,451,128), XSPR_MASK, PPC403,      { RT } },
-{ "mtbr1",   XSPR(31,451,129), XSPR_MASK, PPC403,      { RT } },
-{ "mtbr2",   XSPR(31,451,130), XSPR_MASK, PPC403,      { RT } },
-{ "mtbr3",   XSPR(31,451,131), XSPR_MASK, PPC403,      { RT } },
-{ "mtbr4",   XSPR(31,451,132), XSPR_MASK, PPC403,      { RT } },
-{ "mtbr5",   XSPR(31,451,133), XSPR_MASK, PPC403,      { RT } },
-{ "mtbr6",   XSPR(31,451,134), XSPR_MASK, PPC403,      { RT } },
-{ "mtbr7",   XSPR(31,451,135), XSPR_MASK, PPC403,      { RT } },
-{ "mtbear",  XSPR(31,451,144), XSPR_MASK, PPC403,      { RT } },
-{ "mtbesr",  XSPR(31,451,145), XSPR_MASK, PPC403,      { RT } },
-{ "mtiocr",  XSPR(31,451,160), XSPR_MASK, PPC403,      { RT } },
-{ "mtdmacr0", XSPR(31,451,192), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmact0", XSPR(31,451,193), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmada0", XSPR(31,451,194), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmasa0", XSPR(31,451,195), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmacc0", XSPR(31,451,196), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmacr1", XSPR(31,451,200), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmact1", XSPR(31,451,201), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmada1", XSPR(31,451,202), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmasa1", XSPR(31,451,203), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmacc1", XSPR(31,451,204), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmacr2", XSPR(31,451,208), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmact2", XSPR(31,451,209), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmada2", XSPR(31,451,210), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmasa2", XSPR(31,451,211), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmacc2", XSPR(31,451,212), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmacr3", XSPR(31,451,216), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmact3", XSPR(31,451,217), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmada3", XSPR(31,451,218), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmasa3", XSPR(31,451,219), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmacc3", XSPR(31,451,220), XSPR_MASK, PPC403,     { RT } },
-{ "mtdmasr", XSPR(31,451,224), XSPR_MASK, PPC403,      { RT } },
-{ "mtummcr0",  XSPR(31,451,936),  XSPR_MASK, PPC750,   { RT } },
-{ "mtupmc1",   XSPR(31,451,937),  XSPR_MASK, PPC750,   { RT } },
-{ "mtupmc2",   XSPR(31,451,938),  XSPR_MASK, PPC750,   { RT } },
-{ "mtusia",    XSPR(31,451,939),  XSPR_MASK, PPC750,   { RT } },
-{ "mtummcr1",  XSPR(31,451,940),  XSPR_MASK, PPC750,   { RT } },
-{ "mtupmc3",   XSPR(31,451,941),  XSPR_MASK, PPC750,   { RT } },
-{ "mtupmc4",   XSPR(31,451,942),  XSPR_MASK, PPC750,   { RT } },
-{ "mtmmcr0",   XSPR(31,451,952),  XSPR_MASK, PPC750,   { RT } },
-{ "mtpmc1",    XSPR(31,451,953),  XSPR_MASK, PPC750,   { RT } },
-{ "mtpmc2",    XSPR(31,451,954),  XSPR_MASK, PPC750,   { RT } },
-{ "mtsia",     XSPR(31,451,955),  XSPR_MASK, PPC750,   { RT } },
-{ "mtmmcr1",   XSPR(31,451,956),  XSPR_MASK, PPC750,   { RT } },
-{ "mtpmc3",    XSPR(31,451,957),  XSPR_MASK, PPC750,   { RT } },
-{ "mtpmc4",    XSPR(31,451,958),  XSPR_MASK, PPC750,   { RT } },
-{ "mtl2cr",    XSPR(31,451,1017), XSPR_MASK, PPC750,   { RT } },
-{ "mtictc",    XSPR(31,451,1019), XSPR_MASK, PPC750,   { RT } },
-{ "mtthrm1",   XSPR(31,451,1020), XSPR_MASK, PPC750,   { RT } },
-{ "mtthrm2",   XSPR(31,451,1021), XSPR_MASK, PPC750,   { RT } },
-{ "mtthrm3",   XSPR(31,451,1022), XSPR_MASK, PPC750,   { RT } },
-{ "mtdcr",   X(31,451),        X_MASK,         PPC403,         { SPR, RS } },
-
-{ "divdu",   XO(31,457,0,0), XO_MASK,  PPC64,          { RT, RA, RB } },
-{ "divdu.",  XO(31,457,0,1), XO_MASK,  PPC64,          { RT, RA, RB } },
-{ "divduo",  XO(31,457,1,0), XO_MASK,  PPC64,          { RT, RA, RB } },
-{ "divduo.", XO(31,457,1,1), XO_MASK,  PPC64,          { RT, RA, RB } },
-
-{ "divwu",   XO(31,459,0,0), XO_MASK,  PPC,            { RT, RA, RB } },
-{ "divwu.",  XO(31,459,0,1), XO_MASK,  PPC,            { RT, RA, RB } },
-{ "divwuo",  XO(31,459,1,0), XO_MASK,  PPC,            { RT, RA, RB } },
-{ "divwuo.", XO(31,459,1,1), XO_MASK,  PPC,            { RT, RA, RB } },
-
-{ "mtmq",    XSPR(31,467,0),   XSPR_MASK,    M601,     { RS } },
-{ "mtxer",   XSPR(31,467,1),   XSPR_MASK,    COM,      { RS } },
-{ "mtlr",    XSPR(31,467,8),   XSPR_MASK,    COM,      { RS } },
-{ "mtctr",   XSPR(31,467,9),   XSPR_MASK,    COM,      { RS } },
-{ "mttid",   XSPR(31,467,17),  XSPR_MASK,    POWER,    { RS } },
-{ "mtdsisr", XSPR(31,467,18),  XSPR_MASK,    COM,      { RS } },
-{ "mtdar",   XSPR(31,467,19),  XSPR_MASK,    COM,      { RS } },
-{ "mtrtcu",  XSPR(31,467,20),  XSPR_MASK,    COM,      { RS } },
-{ "mtrtcl",  XSPR(31,467,21),  XSPR_MASK,    COM,      { RS } },
-{ "mtdec",   XSPR(31,467,22),  XSPR_MASK,    COM,      { RS } },
-{ "mtsdr0",  XSPR(31,467,24),  XSPR_MASK,    POWER,    { RS } },
-{ "mtsdr1",  XSPR(31,467,25),  XSPR_MASK,    COM,      { RS } },
-{ "mtsrr0",  XSPR(31,467,26),  XSPR_MASK,    COM,      { RS } },
-{ "mtsrr1",  XSPR(31,467,27),  XSPR_MASK,    COM,      { RS } },
-{ "mtcmpa",   XSPR(31,467,144), XSPR_MASK, PPC860,     { RT } },
-{ "mtcmpb",   XSPR(31,467,145), XSPR_MASK, PPC860,     { RT } },
-{ "mtcmpc",   XSPR(31,467,146), XSPR_MASK, PPC860,     { RT } },
-{ "mtcmpd",   XSPR(31,467,147), XSPR_MASK, PPC860,     { RT } },
-{ "mticr",    XSPR(31,467,148), XSPR_MASK, PPC860,     { RT } },
-{ "mtder",    XSPR(31,467,149), XSPR_MASK, PPC860,     { RT } },
-{ "mtcounta", XSPR(31,467,150), XSPR_MASK, PPC860,     { RT } },
-{ "mtcountb", XSPR(31,467,151), XSPR_MASK, PPC860,     { RT } },
-{ "mtcmpe",   XSPR(31,467,152), XSPR_MASK, PPC860,     { RT } },
-{ "mtcmpf",   XSPR(31,467,153), XSPR_MASK, PPC860,     { RT } },
-{ "mtcmpg",   XSPR(31,467,154), XSPR_MASK, PPC860,     { RT } },
-{ "mtcmph",   XSPR(31,467,155), XSPR_MASK, PPC860,     { RT } },
-{ "mtlctrl1", XSPR(31,467,156), XSPR_MASK, PPC860,     { RT } },
-{ "mtlctrl2", XSPR(31,467,157), XSPR_MASK, PPC860,     { RT } },
-{ "mtictrl",  XSPR(31,467,158), XSPR_MASK, PPC860,     { RT } },
-{ "mtbar",    XSPR(31,467,159), XSPR_MASK, PPC860,     { RT } },
-{ "mtsprg",  XSPR(31,467,272), XSPRG_MASK,   PPC,      { SPRG, RS } },
-{ "mtsprg0", XSPR(31,467,272), XSPR_MASK,    PPC,      { RT } },
-{ "mtsprg1", XSPR(31,467,273), XSPR_MASK,    PPC,      { RT } },
-{ "mtsprg2", XSPR(31,467,274), XSPR_MASK,    PPC,      { RT } },
-{ "mtsprg3", XSPR(31,467,275), XSPR_MASK,    PPC,      { RT } },
-{ "mtsprg4", XSPR(31,467,276), XSPR_MASK,    PPC405,   { RT } },
-{ "mtsprg5", XSPR(31,467,277), XSPR_MASK,    PPC405,   { RT } },
-{ "mtsprg6", XSPR(31,467,278), XSPR_MASK,    PPC405,   { RT } },
-{ "mtsprg7", XSPR(31,467,279), XSPR_MASK,    PPC405,   { RT } },
-{ "mtasr",   XSPR(31,467,280), XSPR_MASK,    PPC64,    { RS } },
-{ "mtear",   XSPR(31,467,282), XSPR_MASK,    PPC,      { RS } },
-{ "mttbl",   XSPR(31,467,284), XSPR_MASK,    PPC,      { RS } },
-{ "mttbu",   XSPR(31,467,285), XSPR_MASK,    PPC,      { RS } },
-{ "mtibatu", XSPR(31,467,528), XSPRBAT_MASK, PPC,      { SPRBAT, RS } },
-{ "mtibatl", XSPR(31,467,529), XSPRBAT_MASK, PPC,      { SPRBAT, RS } },
-{ "mtdbatu", XSPR(31,467,536), XSPRBAT_MASK, PPC,      { SPRBAT, RS } },
-{ "mtdbatl", XSPR(31,467,537), XSPRBAT_MASK, PPC,      { SPRBAT, RS } },
-{ "mtzpr",   XSPR(31,467,944), XSPR_MASK, PPC403,      { RT } },
-{ "mtpid",   XSPR(31,467,945), XSPR_MASK, PPC403,      { RT } },
-{ "mtccr0",  XSPR(31,467,947), XSPR_MASK, PPC405,      { RT } },
-{ "mtiac3",  XSPR(31,467,948), XSPR_MASK, PPC405,      { RT } },
-{ "mtiac4",  XSPR(31,467,949), XSPR_MASK, PPC405,      { RT } },
-{ "mtdvc1",  XSPR(31,467,950), XSPR_MASK, PPC405,      { RT } },
-{ "mtdvc2",  XSPR(31,467,951), XSPR_MASK, PPC405,      { RT } },
-{ "mtsgr",   XSPR(31,467,953), XSPR_MASK, PPC403,      { RT } },
-{ "mtdcwr",  XSPR(31,467,954), XSPR_MASK, PPC403,      { RT } },
-{ "mtsler",  XSPR(31,467,955), XSPR_MASK, PPC405,      { RT } },
-{ "mtsu0r",  XSPR(31,467,956), XSPR_MASK, PPC405,      { RT } },
-{ "mtdbcr1", XSPR(31,467,957), XSPR_MASK, PPC405,      { RT } },
-{ "mticdbdr",XSPR(31,467,979), XSPR_MASK, PPC403,      { RT } },
-{ "mtesr",   XSPR(31,467,980), XSPR_MASK, PPC403,      { RT } },
-{ "mtdear",  XSPR(31,467,981), XSPR_MASK, PPC403,      { RT } },
-{ "mtevpr",  XSPR(31,467,982), XSPR_MASK, PPC403,      { RT } },
-{ "mtcdbcr", XSPR(31,467,983), XSPR_MASK, PPC403,      { RT } },
-{ "mttsr",   XSPR(31,467,984), XSPR_MASK, PPC403,      { RT } },
-{ "mttcr",   XSPR(31,467,986), XSPR_MASK, PPC403,      { RT } },
-{ "mtpit",   XSPR(31,467,987), XSPR_MASK, PPC403,      { RT } },
-{ "mttbhi",  XSPR(31,467,988), XSPR_MASK, PPC403,      { RT } },
-{ "mttblo",  XSPR(31,467,989), XSPR_MASK, PPC403,      { RT } },
-{ "mtsrr2",  XSPR(31,467,990), XSPR_MASK, PPC403,      { RT } },
-{ "mtsrr3",  XSPR(31,467,991), XSPR_MASK, PPC403,      { RT } },
-{ "mtdbsr",  XSPR(31,467,1008), XSPR_MASK, PPC403,     { RT } },
-{ "mtdbcr0", XSPR(31,467,1010), XSPR_MASK, PPC405,     { RT } },
-{ "mtiac1",  XSPR(31,467,1012), XSPR_MASK, PPC403,     { RT } },
-{ "mtiac2",  XSPR(31,467,1013), XSPR_MASK, PPC403,     { RT } },
-{ "mtdac1",  XSPR(31,467,1014), XSPR_MASK, PPC403,     { RT } },
-{ "mtdac2",  XSPR(31,467,1015), XSPR_MASK, PPC403,     { RT } },
-{ "mtdccr",  XSPR(31,467,1018), XSPR_MASK, PPC403,     { RT } },
-{ "mticcr",  XSPR(31,467,1019), XSPR_MASK, PPC403,     { RT } },
-{ "mtpbl1",  XSPR(31,467,1020), XSPR_MASK, PPC403,     { RT } },
-{ "mtpbu1",  XSPR(31,467,1021), XSPR_MASK, PPC403,     { RT } },
-{ "mtpbl2",  XSPR(31,467,1022), XSPR_MASK, PPC403,     { RT } },
-{ "mtpbu2",  XSPR(31,467,1023), XSPR_MASK, PPC403,     { RT } },
-{ "mtspr",   X(31,467),               X_MASK,       COM,       { SPR, RS } },
-
-{ "dcbi",    X(31,470),        XRT_MASK,       PPC,            { RA, RB } },
-
-{ "nand",    XRC(31,476,0), X_MASK,    COM,            { RA, RS, RB } },
-{ "nand.",   XRC(31,476,1), X_MASK,    COM,            { RA, RS, RB } },
-
-{ "dcread",  X(31,486),        X_MASK,         PPC403,         { RT, RA, RB }},
-
-{ "nabs",    XO(31,488,0,0), XORB_MASK, M601,          { RT, RA } },
-{ "nabs.",   XO(31,488,0,1), XORB_MASK, M601,          { RT, RA } },
-{ "nabso",   XO(31,488,1,0), XORB_MASK, M601,          { RT, RA } },
-{ "nabso.",  XO(31,488,1,1), XORB_MASK, M601,          { RT, RA } },
-
-{ "divd",    XO(31,489,0,0), XO_MASK,  PPC64,          { RT, RA, RB } },
-{ "divd.",   XO(31,489,0,1), XO_MASK,  PPC64,          { RT, RA, RB } },
-{ "divdo",   XO(31,489,1,0), XO_MASK,  PPC64,          { RT, RA, RB } },
-{ "divdo.",  XO(31,489,1,1), XO_MASK,  PPC64,          { RT, RA, RB } },
-
-{ "divw",    XO(31,491,0,0), XO_MASK,  PPC,            { RT, RA, RB } },
-{ "divw.",   XO(31,491,0,1), XO_MASK,  PPC,            { RT, RA, RB } },
-{ "divwo",   XO(31,491,1,0), XO_MASK,  PPC,            { RT, RA, RB } },
-{ "divwo.",  XO(31,491,1,1), XO_MASK,  PPC,            { RT, RA, RB } },
-
-{ "slbia",   X(31,498),        0xffffffff,     PPC64,          { 0 } },
-
-{ "cli",     X(31,502), XRB_MASK,      POWER,          { RT, RA } },
-
-{ "mcrxr",   X(31,512),        XRARB_MASK|(3<<21), COM,        { BF } },
-
-{ "clcs",    X(31,531), XRB_MASK,      M601,           { RT, RA } },
-
-{ "lswx",    X(31,533),        X_MASK,         PPCCOM,         { RT, RA, RB } },
-{ "lsx",     X(31,533),        X_MASK,         PWRCOM,         { RT, RA, RB } },
-
-{ "lwbrx",   X(31,534),        X_MASK,         PPCCOM,         { RT, RA, RB } },
-{ "lbrx",    X(31,534),        X_MASK,         PWRCOM,         { RT, RA, RB } },
-
-{ "lfsx",    X(31,535),        X_MASK,         COM,            { FRT, RA, RB } },
-
-{ "srw",     XRC(31,536,0), X_MASK,    PPCCOM,         { RA, RS, RB } },
-{ "sr",      XRC(31,536,0), X_MASK,    PWRCOM,         { RA, RS, RB } },
-{ "srw.",    XRC(31,536,1), X_MASK,    PPCCOM,         { RA, RS, RB } },
-{ "sr.",     XRC(31,536,1), X_MASK,    PWRCOM,         { RA, RS, RB } },
-
-{ "rrib",    XRC(31,537,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "rrib.",   XRC(31,537,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "srd",     XRC(31,539,0), X_MASK,    PPC64,          { RA, RS, RB } },
-{ "srd.",    XRC(31,539,1), X_MASK,    PPC64,          { RA, RS, RB } },
-
-{ "maskir",  XRC(31,541,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "maskir.", XRC(31,541,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "tlbsync", X(31,566),        0xffffffff,     PPC,            { 0 } },
-
-{ "lfsux",   X(31,567),        X_MASK,         COM,            { FRT, RAS, RB } },
-
-{ "mfsr",    X(31,595),        XRB_MASK|(1<<20), COM32,        { RT, SR } },
-
-{ "lswi",    X(31,597),        X_MASK,         PPCCOM,         { RT, RA, NB } },
-{ "lsi",     X(31,597),        X_MASK,         PWRCOM,         { RT, RA, NB } },
-
-{ "sync",    X(31,598), 0xffffffff,    PPCCOM,         { 0 } },
-{ "dcs",     X(31,598), 0xffffffff,    PWRCOM,         { 0 } },
-
-{ "lfdx",    X(31,599), X_MASK,                COM,            { FRT, RA, RB } },
-
-{ "mfsri",   X(31,627), X_MASK,                PWRCOM,         { RT, RA, RB } },
-
-{ "dclst",   X(31,630), XRB_MASK,      PWRCOM,         { RS, RA } },
-
-{ "lfdux",   X(31,631), X_MASK,                COM,            { FRT, RAS, RB } },
-
-{ "mfsrin",  X(31,659), XRA_MASK,      PPC32,          { RT, RB } },
-
-{ "stswx",   X(31,661), X_MASK,                PPCCOM,         { RS, RA, RB } },
-{ "stsx",    X(31,661), X_MASK,                PWRCOM,         { RS, RA, RB } },
-
-{ "stwbrx",  X(31,662), X_MASK,                PPCCOM,         { RS, RA, RB } },
-{ "stbrx",   X(31,662), X_MASK,                PWRCOM,         { RS, RA, RB } },
-
-{ "stfsx",   X(31,663), X_MASK,                COM,            { FRS, RA, RB } },
-
-{ "srq",     XRC(31,664,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "srq.",    XRC(31,664,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "sre",     XRC(31,665,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "sre.",    XRC(31,665,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "stfsux",  X(31,695),        X_MASK,         COM,            { FRS, RAS, RB } },
-
-{ "sriq",    XRC(31,696,0), X_MASK,    M601,           { RA, RS, SH } },
-{ "sriq.",   XRC(31,696,1), X_MASK,    M601,           { RA, RS, SH } },
-
-{ "stswi",   X(31,725),        X_MASK,         PPCCOM,         { RS, RA, NB } },
-{ "stsi",    X(31,725),        X_MASK,         PWRCOM,         { RS, RA, NB } },
-
-{ "stfdx",   X(31,727),        X_MASK,         COM,            { FRS, RA, RB } },
-
-{ "srlq",    XRC(31,728,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "srlq.",   XRC(31,728,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "sreq",    XRC(31,729,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "sreq.",   XRC(31,729,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "dcba",    X(31,758),        XRT_MASK,       PPC405,         { RA, RB } },
-
-{ "stfdux",  X(31,759),        X_MASK,         COM,            { FRS, RAS, RB } },
-
-{ "srliq",   XRC(31,760,0), X_MASK,    M601,           { RA, RS, SH } },
-{ "srliq.",  XRC(31,760,1), X_MASK,    M601,           { RA, RS, SH } },
-
-{ "lhbrx",   X(31,790),        X_MASK,         COM,            { RT, RA, RB } },
-
-{ "sraw",    XRC(31,792,0), X_MASK,    PPCCOM,         { RA, RS, RB } },
-{ "sra",     XRC(31,792,0), X_MASK,    PWRCOM,         { RA, RS, RB } },
-{ "sraw.",   XRC(31,792,1), X_MASK,    PPCCOM,         { RA, RS, RB } },
-{ "sra.",    XRC(31,792,1), X_MASK,    PWRCOM,         { RA, RS, RB } },
-
-{ "srad",    XRC(31,794,0), X_MASK,    PPC64,          { RA, RS, RB } },
-{ "srad.",   XRC(31,794,1), X_MASK,    PPC64,          { RA, RS, RB } },
-
-{ "rac",     X(31,818),        X_MASK,         PWRCOM,         { RT, RA, RB } },
-
-{ "srawi",   XRC(31,824,0), X_MASK,    PPCCOM,         { RA, RS, SH } },
-{ "srai",    XRC(31,824,0), X_MASK,    PWRCOM,         { RA, RS, SH } },
-{ "srawi.",  XRC(31,824,1), X_MASK,    PPCCOM,         { RA, RS, SH } },
-{ "srai.",   XRC(31,824,1), X_MASK,    PWRCOM,         { RA, RS, SH } },
-
-{ "eieio",   X(31,854),        0xffffffff,     PPC,            { 0 } },
-
-{ "tlbsx",   XRC(31,914,0), X_MASK, PPC403,    { RT, RA, RB } },
-{ "tlbsx.",  XRC(31,914,1), X_MASK, PPC403,    { RT, RA, RB } },
-
-{ "sthbrx",  X(31,918),        X_MASK,         COM,            { RS, RA, RB } },
-
-{ "sraq",    XRC(31,920,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "sraq.",   XRC(31,920,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "srea",    XRC(31,921,0), X_MASK,    M601,           { RA, RS, RB } },
-{ "srea.",   XRC(31,921,1), X_MASK,    M601,           { RA, RS, RB } },
-
-{ "extsh",   XRC(31,922,0), XRB_MASK,  PPCCOM,         { RA, RS } },
-{ "exts",    XRC(31,922,0), XRB_MASK,  PWRCOM,         { RA, RS } },
-{ "extsh.",  XRC(31,922,1), XRB_MASK,  PPCCOM,         { RA, RS } },
-{ "exts.",   XRC(31,922,1), XRB_MASK,  PWRCOM,         { RA, RS } },
-
-{ "tlbrehi", XTLB(31,946,0), XTLB_MASK,        PPC403,         { RT, RA } },
-{ "tlbrelo", XTLB(31,946,1), XTLB_MASK,        PPC403,         { RT, RA } },
-{ "tlbre",   X(31,946),        X_MASK,         PPC403,         { RT, RA, SH } },
-
-{ "sraiq",   XRC(31,952,0), X_MASK,    M601,           { RA, RS, SH } },
-{ "sraiq.",  XRC(31,952,1), X_MASK,    M601,           { RA, RS, SH } },
-
-{ "extsb",   XRC(31,954,0), XRB_MASK,  PPC,            { RA, RS} },
-{ "extsb.",  XRC(31,954,1), XRB_MASK,  PPC,            { RA, RS} },
-
-{ "iccci",   X(31,966),        XRT_MASK,       PPC403,         { RA, RB } },
-
-{ "tlbld",   X(31,978),        XRTRA_MASK,     PPC,            { RB } },
-
-{ "tlbwehi", XTLB(31,978,0), XTLB_MASK,        PPC403,         { RT, RA } },
-{ "tlbwelo", XTLB(31,978,1), XTLB_MASK,        PPC403,         { RT, RA } },
-{ "tlbwe",   X(31,978),        X_MASK,         PPC403,         { RS, RA, SH } },
-
-{ "icbi",    X(31,982),        XRT_MASK,       PPC,            { RA, RB } },
-
-{ "stfiwx",  X(31,983),        X_MASK,         PPC,            { FRS, RA, RB } },
-
-{ "extsw",   XRC(31,986,0), XRB_MASK,  PPC,            { RA, RS } },
-{ "extsw.",  XRC(31,986,1), XRB_MASK,  PPC,            { RA, RS } },
-
-{ "icread",  X(31,998),        XRT_MASK,       PPC403,         { RA, RB } },
-
-{ "tlbli",   X(31,1010), XRTRA_MASK,   PPC,            { RB } },
-
-{ "dcbz",    X(31,1014), XRT_MASK,     PPC,            { RA, RB } },
-{ "dclz",    X(31,1014), XRT_MASK,     PPC,            { RA, RB } },
-
-{ "lvebx",   X(31,   7), X_MASK,       PPCVEC,         { VD, RA, RB } },
-{ "lvehx",   X(31,  39), X_MASK,       PPCVEC,         { VD, RA, RB } },
-{ "lvewx",   X(31,  71), X_MASK,       PPCVEC,         { VD, RA, RB } },
-{ "lvsl",    X(31,   6), X_MASK,       PPCVEC,         { VD, RA, RB } },
-{ "lvsr",    X(31,  38), X_MASK,       PPCVEC,         { VD, RA, RB } },
-{ "lvx",     X(31, 103), X_MASK,       PPCVEC,         { VD, RA, RB } },
-{ "lvxl",    X(31, 359), X_MASK,       PPCVEC,         { VD, RA, RB } },
-{ "stvebx",  X(31, 135), X_MASK,       PPCVEC,         { VS, RA, RB } },
-{ "stvehx",  X(31, 167), X_MASK,       PPCVEC,         { VS, RA, RB } },
-{ "stvewx",  X(31, 199), X_MASK,       PPCVEC,         { VS, RA, RB } },
-{ "stvx",    X(31, 231), X_MASK,       PPCVEC,         { VS, RA, RB } },
-{ "stvxl",   X(31, 487), X_MASK,       PPCVEC,         { VS, RA, RB } },
-
-{ "lwz",     OP(32),   OP_MASK,        PPCCOM,         { RT, D, RA } },
-{ "l",      OP(32),    OP_MASK,        PWRCOM,         { RT, D, RA } },
-
-{ "lwzu",    OP(33),   OP_MASK,        PPCCOM,         { RT, D, RAL } },
-{ "lu",      OP(33),   OP_MASK,        PWRCOM,         { RT, D, RA } },
-
-{ "lbz",     OP(34),   OP_MASK,        COM,            { RT, D, RA } },
-
-{ "lbzu",    OP(35),   OP_MASK,        COM,            { RT, D, RAL } },
-
-{ "stw",     OP(36),   OP_MASK,        PPCCOM,         { RS, D, RA } },
-{ "st",      OP(36),   OP_MASK,        PWRCOM,         { RS, D, RA } },
-
-{ "stwu",    OP(37),   OP_MASK,        PPCCOM,         { RS, D, RAS } },
-{ "stu",     OP(37),   OP_MASK,        PWRCOM,         { RS, D, RA } },
-
-{ "stb",     OP(38),   OP_MASK,        COM,            { RS, D, RA } },
-
-{ "stbu",    OP(39),   OP_MASK,        COM,            { RS, D, RAS } },
-
-{ "lhz",     OP(40),   OP_MASK,        COM,            { RT, D, RA } },
-
-{ "lhzu",    OP(41),   OP_MASK,        COM,            { RT, D, RAL } },
-
-{ "lha",     OP(42),   OP_MASK,        COM,            { RT, D, RA } },
-
-{ "lhau",    OP(43),   OP_MASK,        COM,            { RT, D, RAL } },
-
-{ "sth",     OP(44),   OP_MASK,        COM,            { RS, D, RA } },
-
-{ "sthu",    OP(45),   OP_MASK,        COM,            { RS, D, RAS } },
-
-{ "lmw",     OP(46),   OP_MASK,        PPCCOM,         { RT, D, RAM } },
-{ "lm",      OP(46),   OP_MASK,        PWRCOM,         { RT, D, RA } },
-
-{ "stmw",    OP(47),   OP_MASK,        PPCCOM,         { RS, D, RA } },
-{ "stm",     OP(47),   OP_MASK,        PWRCOM,         { RS, D, RA } },
-
-{ "lfs",     OP(48),   OP_MASK,        COM,            { FRT, D, RA } },
-
-{ "lfsu",    OP(49),   OP_MASK,        COM,            { FRT, D, RAS } },
-
-{ "lfd",     OP(50),   OP_MASK,        COM,            { FRT, D, RA } },
-
-{ "lfdu",    OP(51),   OP_MASK,        COM,            { FRT, D, RAS } },
-
-{ "stfs",    OP(52),   OP_MASK,        COM,            { FRS, D, RA } },
-
-{ "stfsu",   OP(53),   OP_MASK,        COM,            { FRS, D, RAS } },
-
-{ "stfd",    OP(54),   OP_MASK,        COM,            { FRS, D, RA } },
-
-{ "stfdu",   OP(55),   OP_MASK,        COM,            { FRS, D, RAS } },
-
-{ "lfq",     OP(56),   OP_MASK,        POWER2,         { FRT, D, RA } },
-
-{ "lfqu",    OP(57),   OP_MASK,        POWER2,         { FRT, D, RA } },
-
-{ "ld",      DSO(58,0),        DS_MASK,        PPC64,          { RT, DS, RA } },
-
-{ "ldu",     DSO(58,1), DS_MASK,       PPC64,          { RT, DS, RAL } },
-
-{ "lwa",     DSO(58,2), DS_MASK,       PPC64,          { RT, DS, RA } },
-
-{ "fdivs",   A(59,18,0), AFRC_MASK,    PPC,            { FRT, FRA, FRB } },
-{ "fdivs.",  A(59,18,1), AFRC_MASK,    PPC,            { FRT, FRA, FRB } },
-
-{ "fsubs",   A(59,20,0), AFRC_MASK,    PPC,            { FRT, FRA, FRB } },
-{ "fsubs.",  A(59,20,1), AFRC_MASK,    PPC,            { FRT, FRA, FRB } },
-
-{ "fadds",   A(59,21,0), AFRC_MASK,    PPC,            { FRT, FRA, FRB } },
-{ "fadds.",  A(59,21,1), AFRC_MASK,    PPC,            { FRT, FRA, FRB } },
-
-{ "fsqrts",  A(59,22,0), AFRAFRC_MASK, PPC,            { FRT, FRB } },
-{ "fsqrts.", A(59,22,1), AFRAFRC_MASK, PPC,            { FRT, FRB } },
-
-{ "fres",    A(59,24,0), AFRAFRC_MASK, PPC,            { FRT, FRB } },
-{ "fres.",   A(59,24,1), AFRAFRC_MASK, PPC,            { FRT, FRB } },
-
-{ "fmuls",   A(59,25,0), AFRB_MASK,    PPC,            { FRT, FRA, FRC } },
-{ "fmuls.",  A(59,25,1), AFRB_MASK,    PPC,            { FRT, FRA, FRC } },
-
-{ "fmsubs",  A(59,28,0), A_MASK,       PPC,            { FRT,FRA,FRC,FRB } },
-{ "fmsubs.", A(59,28,1), A_MASK,       PPC,            { FRT,FRA,FRC,FRB } },
-
-{ "fmadds",  A(59,29,0), A_MASK,       PPC,            { FRT,FRA,FRC,FRB } },
-{ "fmadds.", A(59,29,1), A_MASK,       PPC,            { FRT,FRA,FRC,FRB } },
-
-{ "fnmsubs", A(59,30,0), A_MASK,       PPC,            { FRT,FRA,FRC,FRB } },
-{ "fnmsubs.",A(59,30,1), A_MASK,       PPC,            { FRT,FRA,FRC,FRB } },
-
-{ "fnmadds", A(59,31,0), A_MASK,       PPC,            { FRT,FRA,FRC,FRB } },
-{ "fnmadds.",A(59,31,1), A_MASK,       PPC,            { FRT,FRA,FRC,FRB } },
-
-{ "stfq",    OP(60),   OP_MASK,        POWER2,         { FRS, D, RA } },
-
-{ "stfqu",   OP(61),   OP_MASK,        POWER2,         { FRS, D, RA } },
-
-{ "std",     DSO(62,0),        DS_MASK,        PPC64,          { RS, DS, RA } },
-
-{ "stdu",    DSO(62,1),        DS_MASK,        PPC64,          { RS, DS, RAS } },
-
-{ "fcmpu",   X(63,0),  X_MASK|(3<<21), COM,            { BF, FRA, FRB } },
-
-{ "frsp",    XRC(63,12,0), XRA_MASK,   COM,            { FRT, FRB } },
-{ "frsp.",   XRC(63,12,1), XRA_MASK,   COM,            { FRT, FRB } },
-
-{ "fctiw",   XRC(63,14,0), XRA_MASK,   PPCCOM,         { FRT, FRB } },
-{ "fcir",    XRC(63,14,0), XRA_MASK,   POWER2,         { FRT, FRB } },
-{ "fctiw.",  XRC(63,14,1), XRA_MASK,   PPCCOM,         { FRT, FRB } },
-{ "fcir.",   XRC(63,14,1), XRA_MASK,   POWER2,         { FRT, FRB } },
-
-{ "fctiwz",  XRC(63,15,0), XRA_MASK,   PPCCOM,         { FRT, FRB } },
-{ "fcirz",   XRC(63,15,0), XRA_MASK,   POWER2,         { FRT, FRB } },
-{ "fctiwz.", XRC(63,15,1), XRA_MASK,   PPCCOM,         { FRT, FRB } },
-{ "fcirz.",  XRC(63,15,1), XRA_MASK,   POWER2,         { FRT, FRB } },
-
-{ "fdiv",    A(63,18,0), AFRC_MASK,    PPCCOM,         { FRT, FRA, FRB } },
-{ "fd",      A(63,18,0), AFRC_MASK,    PWRCOM,         { FRT, FRA, FRB } },
-{ "fdiv.",   A(63,18,1), AFRC_MASK,    PPCCOM,         { FRT, FRA, FRB } },
-{ "fd.",     A(63,18,1), AFRC_MASK,    PWRCOM,         { FRT, FRA, FRB } },
-
-{ "fsub",    A(63,20,0), AFRC_MASK,    PPCCOM,         { FRT, FRA, FRB } },
-{ "fs",      A(63,20,0), AFRC_MASK,    PWRCOM,         { FRT, FRA, FRB } },
-{ "fsub.",   A(63,20,1), AFRC_MASK,    PPCCOM,         { FRT, FRA, FRB } },
-{ "fs.",     A(63,20,1), AFRC_MASK,    PWRCOM,         { FRT, FRA, FRB } },
-
-{ "fadd",    A(63,21,0), AFRC_MASK,    PPCCOM,         { FRT, FRA, FRB } },
-{ "fa",      A(63,21,0), AFRC_MASK,    PWRCOM,         { FRT, FRA, FRB } },
-{ "fadd.",   A(63,21,1), AFRC_MASK,    PPCCOM,         { FRT, FRA, FRB } },
-{ "fa.",     A(63,21,1), AFRC_MASK,    PWRCOM,         { FRT, FRA, FRB } },
-
-{ "fsqrt",   A(63,22,0), AFRAFRC_MASK, PPCPWR2,        { FRT, FRB } },
-{ "fsqrt.",  A(63,22,1), AFRAFRC_MASK, PPCPWR2,        { FRT, FRB } },
-
-{ "fsel",    A(63,23,0), A_MASK,       PPC,            { FRT,FRA,FRC,FRB } },
-{ "fsel.",   A(63,23,1), A_MASK,       PPC,            { FRT,FRA,FRC,FRB } },
-
-{ "fmul",    A(63,25,0), AFRB_MASK,    PPCCOM,         { FRT, FRA, FRC } },
-{ "fm",      A(63,25,0), AFRB_MASK,    PWRCOM,         { FRT, FRA, FRC } },
-{ "fmul.",   A(63,25,1), AFRB_MASK,    PPCCOM,         { FRT, FRA, FRC } },
-{ "fm.",     A(63,25,1), AFRB_MASK,    PWRCOM,         { FRT, FRA, FRC } },
-
-{ "frsqrte", A(63,26,0), AFRAFRC_MASK, PPC,            { FRT, FRB } },
-{ "frsqrte.",A(63,26,1), AFRAFRC_MASK, PPC,            { FRT, FRB } },
-
-{ "fmsub",   A(63,28,0), A_MASK,       PPCCOM,         { FRT,FRA,FRC,FRB } },
-{ "fms",     A(63,28,0), A_MASK,       PWRCOM,         { FRT,FRA,FRC,FRB } },
-{ "fmsub.",  A(63,28,1), A_MASK,       PPCCOM,         { FRT,FRA,FRC,FRB } },
-{ "fms.",    A(63,28,1), A_MASK,       PWRCOM,         { FRT,FRA,FRC,FRB } },
-
-{ "fmadd",   A(63,29,0), A_MASK,       PPCCOM,         { FRT,FRA,FRC,FRB } },
-{ "fma",     A(63,29,0), A_MASK,       PWRCOM,         { FRT,FRA,FRC,FRB } },
-{ "fmadd.",  A(63,29,1), A_MASK,       PPCCOM,         { FRT,FRA,FRC,FRB } },
-{ "fma.",    A(63,29,1), A_MASK,       PWRCOM,         { FRT,FRA,FRC,FRB } },
-
-{ "fnmsub",  A(63,30,0), A_MASK,       PPCCOM,         { FRT,FRA,FRC,FRB } },
-{ "fnms",    A(63,30,0), A_MASK,       PWRCOM,         { FRT,FRA,FRC,FRB } },
-{ "fnmsub.", A(63,30,1), A_MASK,       PPCCOM,         { FRT,FRA,FRC,FRB } },
-{ "fnms.",   A(63,30,1), A_MASK,       PWRCOM,         { FRT,FRA,FRC,FRB } },
-
-{ "fnmadd",  A(63,31,0), A_MASK,       PPCCOM,         { FRT,FRA,FRC,FRB } },
-{ "fnma",    A(63,31,0), A_MASK,       PWRCOM,         { FRT,FRA,FRC,FRB } },
-{ "fnmadd.", A(63,31,1), A_MASK,       PPCCOM,         { FRT,FRA,FRC,FRB } },
-{ "fnma.",   A(63,31,1), A_MASK,       PWRCOM,         { FRT,FRA,FRC,FRB } },
-
-{ "fcmpo",   X(63,32), X_MASK|(3<<21), COM,            { BF, FRA, FRB } },
-
-{ "mtfsb1",  XRC(63,38,0), XRARB_MASK, COM,            { BT } },
-{ "mtfsb1.", XRC(63,38,1), XRARB_MASK, COM,            { BT } },
-
-{ "fneg",    XRC(63,40,0), XRA_MASK,   COM,            { FRT, FRB } },
-{ "fneg.",   XRC(63,40,1), XRA_MASK,   COM,            { FRT, FRB } },
-
-{ "mcrfs",   X(63,64), XRB_MASK|(3<<21)|(3<<16), COM,  { BF, BFA } },
-
-{ "mtfsb0",  XRC(63,70,0), XRARB_MASK, COM,            { BT } },
-{ "mtfsb0.", XRC(63,70,1), XRARB_MASK, COM,            { BT } },
-
-{ "fmr",     XRC(63,72,0), XRA_MASK,   COM,            { FRT, FRB } },
-{ "fmr.",    XRC(63,72,1), XRA_MASK,   COM,            { FRT, FRB } },
-
-{ "mtfsfi",  XRC(63,134,0), XRA_MASK|(3<<21)|(1<<11), COM, { BF, U } },
-{ "mtfsfi.", XRC(63,134,1), XRA_MASK|(3<<21)|(1<<11), COM, { BF, U } },
-
-{ "fnabs",   XRC(63,136,0), XRA_MASK,  COM,            { FRT, FRB } },
-{ "fnabs.",  XRC(63,136,1), XRA_MASK,  COM,            { FRT, FRB } },
-
-{ "fabs",    XRC(63,264,0), XRA_MASK,  COM,            { FRT, FRB } },
-{ "fabs.",   XRC(63,264,1), XRA_MASK,  COM,            { FRT, FRB } },
-
-{ "mffs",    XRC(63,583,0), XRARB_MASK,        COM,            { FRT } },
-{ "mffs.",   XRC(63,583,1), XRARB_MASK,        COM,            { FRT } },
-
-{ "mtfsf",   XFL(63,711,0), XFL_MASK,  COM,            { FLM, FRB } },
-{ "mtfsf.",  XFL(63,711,1), XFL_MASK,  COM,            { FLM, FRB } },
-
-{ "fctid",   XRC(63,814,0), XRA_MASK,  PPC64,          { FRT, FRB } },
-{ "fctid.",  XRC(63,814,1), XRA_MASK,  PPC64,          { FRT, FRB } },
-
-{ "fctidz",  XRC(63,815,0), XRA_MASK,  PPC64,          { FRT, FRB } },
-{ "fctidz.", XRC(63,815,1), XRA_MASK,  PPC64,          { FRT, FRB } },
-
-{ "fcfid",   XRC(63,846,0), XRA_MASK,  PPC64,          { FRT, FRB } },
-{ "fcfid.",  XRC(63,846,1), XRA_MASK,  PPC64,          { FRT, FRB } },
-
-};
-
-const int powerpc_num_opcodes =
-  sizeof (powerpc_opcodes) / sizeof (powerpc_opcodes[0]);
-\f
-/* The macro table.  This is only used by the assembler.  */
-
-/* The expressions of the form (-x ! 31) & (x | 31) have the value 0
-   when x=0; 32-x when x is between 1 and 31; are negative if x is
-   negative; and are 32 or more otherwise.  This is what you want
-   when, for instance, you are emulating a right shift by a
-   rotate-left-and-mask, because the underlying instructions support
-   shifts of size 0 but not shifts of size 32.  By comparison, when
-   extracting x bits from some word you want to use just 32-x, because
-   the underlying instructions don't support extracting 0 bits but do
-   support extracting the whole word (32 bits in this case).  */
-
-const struct powerpc_macro powerpc_macros[] = {
-{ "extldi",  4,   PPC64,       "rldicr %0,%1,%3,(%2)-1" },
-{ "extldi.", 4,   PPC64,       "rldicr. %0,%1,%3,(%2)-1" },
-{ "extrdi",  4,   PPC64,       "rldicl %0,%1,(%2)+(%3),64-(%2)" },
-{ "extrdi.", 4,   PPC64,       "rldicl. %0,%1,(%2)+(%3),64-(%2)" },
-{ "insrdi",  4,   PPC64,       "rldimi %0,%1,64-((%2)+(%3)),%3" },
-{ "insrdi.", 4,   PPC64,       "rldimi. %0,%1,64-((%2)+(%3)),%3" },
-{ "rotrdi",  3,   PPC64,       "rldicl %0,%1,(-(%2)!63)&((%2)|63),0" },
-{ "rotrdi.", 3,   PPC64,       "rldicl. %0,%1,(-(%2)!63)&((%2)|63),0" },
-{ "sldi",    3,   PPC64,       "rldicr %0,%1,%2,63-(%2)" },
-{ "sldi.",   3,   PPC64,       "rldicr. %0,%1,%2,63-(%2)" },
-{ "srdi",    3,   PPC64,       "rldicl %0,%1,(-(%2)!63)&((%2)|63),%2" },
-{ "srdi.",   3,   PPC64,       "rldicl. %0,%1,(-(%2)!63)&((%2)|63),%2" },
-{ "clrrdi",  3,   PPC64,       "rldicr %0,%1,0,63-(%2)" },
-{ "clrrdi.", 3,   PPC64,       "rldicr. %0,%1,0,63-(%2)" },
-{ "clrlsldi",4,   PPC64,       "rldic %0,%1,%3,(%2)-(%3)" },
-{ "clrlsldi.",4,  PPC64,       "rldic. %0,%1,%3,(%2)-(%3)" },
-
-{ "extlwi",  4,   PPCCOM,      "rlwinm %0,%1,%3,0,(%2)-1" },
-{ "extlwi.", 4,   PPCCOM,      "rlwinm. %0,%1,%3,0,(%2)-1" },
-{ "extrwi",  4,   PPCCOM,      "rlwinm %0,%1,(%2)+(%3),32-(%2),31" },
-{ "extrwi.", 4,   PPCCOM,      "rlwinm. %0,%1,(%2)+(%3),32-(%2),31" },
-{ "inslwi",  4,   PPCCOM,      "rlwimi %0,%1,(-(%3)!31)&((%3)|31),%3,(%2)+(%3)-1" },
-{ "inslwi.", 4,   PPCCOM,      "rlwimi. %0,%1,(-(%3)!31)&((%3)|31),%3,(%2)+(%3)-1"},
-{ "insrwi",  4,   PPCCOM,      "rlwimi %0,%1,32-((%2)+(%3)),%3,(%2)+(%3)-1" },
-{ "insrwi.", 4,   PPCCOM,      "rlwimi. %0,%1,32-((%2)+(%3)),%3,(%2)+(%3)-1"},
-{ "rotrwi",  3,   PPCCOM,      "rlwinm %0,%1,(-(%2)!31)&((%2)|31),0,31" },
-{ "rotrwi.", 3,   PPCCOM,      "rlwinm. %0,%1,(-(%2)!31)&((%2)|31),0,31" },
-{ "slwi",    3,   PPCCOM,      "rlwinm %0,%1,%2,0,31-(%2)" },
-{ "sli",     3,   PWRCOM,      "rlinm %0,%1,%2,0,31-(%2)" },
-{ "slwi.",   3,   PPCCOM,      "rlwinm. %0,%1,%2,0,31-(%2)" },
-{ "sli.",    3,   PWRCOM,      "rlinm. %0,%1,%2,0,31-(%2)" },
-{ "srwi",    3,   PPCCOM,      "rlwinm %0,%1,(-(%2)!31)&((%2)|31),%2,31" },
-{ "sri",     3,   PWRCOM,      "rlinm %0,%1,(-(%2)!31)&((%2)|31),%2,31" },
-{ "srwi.",   3,   PPCCOM,      "rlwinm. %0,%1,(-(%2)!31)&((%2)|31),%2,31" },
-{ "sri.",    3,   PWRCOM,      "rlinm. %0,%1,(-(%2)!31)&((%2)|31),%2,31" },
-{ "clrrwi",  3,   PPCCOM,      "rlwinm %0,%1,0,0,31-(%2)" },
-{ "clrrwi.", 3,   PPCCOM,      "rlwinm. %0,%1,0,0,31-(%2)" },
-{ "clrlslwi",4,   PPCCOM,      "rlwinm %0,%1,%3,(%2)-(%3),31-(%3)" },
-{ "clrlslwi.",4,  PPCCOM,      "rlwinm. %0,%1,%3,(%2)-(%3),31-(%3)" },
-
-};
-
-const int powerpc_num_macros =
-  sizeof (powerpc_macros) / sizeof (powerpc_macros[0]);
diff --git a/arch/ppc64/kdb/ppc.h b/arch/ppc64/kdb/ppc.h
deleted file mode 100644 (file)
index 246e3c7..0000000
+++ /dev/null
@@ -1,259 +0,0 @@
-/* ppc.h -- Header file for PowerPC opcode table
-   Copyright 1994, 1995 Free Software Foundation, Inc.
-   Written by Ian Lance Taylor, Cygnus Support
-
-This file is part of GDB, GAS, and the GNU binutils.
-
-GDB, GAS, and the GNU binutils are free software; you can redistribute
-them and/or modify them under the terms of the GNU General Public
-License as published by the Free Software Foundation; either version
-1, or (at your option) any later version.
-
-GDB, GAS, and the GNU binutils are distributed in the hope that they
-will be useful, but WITHOUT ANY WARRANTY; without even the implied
-warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See
-the GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this file; see the file COPYING.  If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-#ifndef PPC_H
-#define PPC_H
-
-/* The opcode table is an array of struct powerpc_opcode.  */
-
-struct powerpc_opcode
-{
-  /* The opcode name.  */
-  const char *name;
-
-  /* The opcode itself.  Those bits which will be filled in with
-     operands are zeroes.  */
-  unsigned long opcode;
-
-  /* The opcode mask.  This is used by the disassembler.  This is a
-     mask containing ones indicating those bits which must match the
-     opcode field, and zeroes indicating those bits which need not
-     match (and are presumably filled in by operands).  */
-  unsigned long mask;
-
-  /* One bit flags for the opcode.  These are used to indicate which
-     specific processors support the instructions.  The defined values
-     are listed below.  */
-  unsigned long flags;
-
-  /* An array of operand codes.  Each code is an index into the
-     operand table.  They appear in the order which the operands must
-     appear in assembly code, and are terminated by a zero.  */
-  unsigned char operands[8];
-};
-
-/* The table itself is sorted by major opcode number, and is otherwise
-   in the order in which the disassembler should consider
-   instructions.  */
-extern const struct powerpc_opcode powerpc_opcodes[];
-extern const int powerpc_num_opcodes;
-
-/* Values defined for the flags field of a struct powerpc_opcode.  */
-
-/* Opcode is defined for the PowerPC architecture.  */
-#define PPC_OPCODE_PPC (01)
-
-/* Opcode is defined for the POWER (RS/6000) architecture.  */
-#define PPC_OPCODE_POWER (02)
-
-/* Opcode is defined for the POWER2 (Rios 2) architecture.  */
-#define PPC_OPCODE_POWER2 (04)
-
-/* Opcode is only defined on 32 bit architectures.  */
-#define PPC_OPCODE_32 (010)
-
-/* Opcode is only defined on 64 bit architectures.  */
-#define PPC_OPCODE_64 (020)
-
-/* Opcode is supported by the Motorola PowerPC 601 processor.  The 601
-   is assumed to support all PowerPC (PPC_OPCODE_PPC) instructions,
-   but it also supports many additional POWER instructions.  */
-#define PPC_OPCODE_601 (040)
-
-/* Opcode is supported in both the Power and PowerPC architectures
-   (ie, compiler's -mcpu=common or assembler's -mcom).  */
-#define PPC_OPCODE_COMMON (0100)
-
-/* Opcode is supported for any Power or PowerPC platform (this is
-   for the assembler's -many option, and it eliminates duplicates).  */
-#define PPC_OPCODE_ANY (0200)
-
-/* Opcode is supported as part of the 64-bit bridge.  */
-#define PPC_OPCODE_64_BRIDGE (0400)
-
-/* Opcode is supported by Altivec Vector Unit */
-#define PPC_OPCODE_ALTIVEC   (01000)
-
-/* A macro to extract the major opcode from an instruction.  */
-#define PPC_OP(i) (((i) >> 26) & 0x3f)
-\f
-/* The operands table is an array of struct powerpc_operand.  */
-
-struct powerpc_operand
-{
-  /* The number of bits in the operand.  */
-  int bits;
-
-  /* How far the operand is left shifted in the instruction.  */
-  int shift;
-
-  /* Insertion function.  This is used by the assembler.  To insert an
-     operand value into an instruction, check this field.
-
-     If it is NULL, execute
-         i |= (op & ((1 << o->bits) - 1)) << o->shift;
-     (i is the instruction which we are filling in, o is a pointer to
-     this structure, and op is the opcode value; this assumes twos
-     complement arithmetic).
-
-     If this field is not NULL, then simply call it with the
-     instruction and the operand value.  It will return the new value
-     of the instruction.  If the ERRMSG argument is not NULL, then if
-     the operand value is illegal, *ERRMSG will be set to a warning
-     string (the operand will be inserted in any case).  If the
-     operand value is legal, *ERRMSG will be unchanged (most operands
-     can accept any value).  */
-  unsigned long (*insert) PARAMS ((unsigned long instruction, long op,
-                                  const char **errmsg));
-
-  /* Extraction function.  This is used by the disassembler.  To
-     extract this operand type from an instruction, check this field.
-
-     If it is NULL, compute
-         op = ((i) >> o->shift) & ((1 << o->bits) - 1);
-        if ((o->flags & PPC_OPERAND_SIGNED) != 0
-            && (op & (1 << (o->bits - 1))) != 0)
-          op -= 1 << o->bits;
-     (i is the instruction, o is a pointer to this structure, and op
-     is the result; this assumes twos complement arithmetic).
-
-     If this field is not NULL, then simply call it with the
-     instruction value.  It will return the value of the operand.  If
-     the INVALID argument is not NULL, *INVALID will be set to
-     non-zero if this operand type can not actually be extracted from
-     this operand (i.e., the instruction does not match).  If the
-     operand is valid, *INVALID will not be changed.  */
-  long (*extract) PARAMS ((unsigned long instruction, int *invalid));
-
-  /* One bit syntax flags.  */
-  unsigned long flags;
-};
-
-/* Elements in the table are retrieved by indexing with values from
-   the operands field of the powerpc_opcodes table.  */
-
-extern const struct powerpc_operand powerpc_operands[];
-
-/* Values defined for the flags field of a struct powerpc_operand.  */
-
-/* This operand takes signed values.  */
-#define PPC_OPERAND_SIGNED (01)
-
-/* This operand takes signed values, but also accepts a full positive
-   range of values when running in 32 bit mode.  That is, if bits is
-   16, it takes any value from -0x8000 to 0xffff.  In 64 bit mode,
-   this flag is ignored.  */
-#define PPC_OPERAND_SIGNOPT (02)
-
-/* This operand does not actually exist in the assembler input.  This
-   is used to support extended mnemonics such as mr, for which two
-   operands fields are identical.  The assembler should call the
-   insert function with any op value.  The disassembler should call
-   the extract function, ignore the return value, and check the value
-   placed in the valid argument.  */
-#define PPC_OPERAND_FAKE (04)
-
-/* The next operand should be wrapped in parentheses rather than
-   separated from this one by a comma.  This is used for the load and
-   store instructions which want their operands to look like
-       reg,displacement(reg)
-   */
-#define PPC_OPERAND_PARENS (010)
-
-/* This operand may use the symbolic names for the CR fields, which
-   are
-       lt  0   gt  1   eq  2   so  3   un  3
-       cr0 0   cr1 1   cr2 2   cr3 3
-       cr4 4   cr5 5   cr6 6   cr7 7
-   These may be combined arithmetically, as in cr2*4+gt.  These are
-   only supported on the PowerPC, not the POWER.  */
-#define PPC_OPERAND_CR (020)
-
-/* This operand names a register.  The disassembler uses this to print
-   register names with a leading 'r'.  */
-#define PPC_OPERAND_GPR (040)
-
-/* This operand names a floating point register.  The disassembler
-   prints these with a leading 'f'.  */
-#define PPC_OPERAND_FPR (0100)
-
-/* This operand is a relative branch displacement.  The disassembler
-   prints these symbolically if possible.  */
-#define PPC_OPERAND_RELATIVE (0200)
-
-/* This operand is an absolute branch address.  The disassembler
-   prints these symbolically if possible.  */
-#define PPC_OPERAND_ABSOLUTE (0400)
-
-/* This operand is optional, and is zero if omitted.  This is used for
-   the optional BF and L fields in the comparison instructions.  The
-   assembler must count the number of operands remaining on the line,
-   and the number of operands remaining for the opcode, and decide
-   whether this operand is present or not.  The disassembler should
-   print this operand out only if it is not zero.  */
-#define PPC_OPERAND_OPTIONAL (01000)
-
-/* This flag is only used with PPC_OPERAND_OPTIONAL.  If this operand
-   is omitted, then for the next operand use this operand value plus
-   1, ignoring the next operand field for the opcode.  This wretched
-   hack is needed because the Power rotate instructions can take
-   either 4 or 5 operands.  The disassembler should print this operand
-   out regardless of the PPC_OPERAND_OPTIONAL field.  */
-#define PPC_OPERAND_NEXT (02000)
-
-/* This operand should be regarded as a negative number for the
-   purposes of overflow checking (i.e., the normal most negative
-   number is disallowed and one more than the normal most positive
-   number is allowed).  This flag will only be set for a signed
-   operand.  */
-#define PPC_OPERAND_NEGATIVE (04000)
-
-/* This operand names a vector unit register.  The disassembler
-   prints these with a leading 'v'.  */
-#define PPC_OPERAND_VR (010000)
-
-\f
-/* The POWER and PowerPC assemblers use a few macros.  We keep them
-   with the operands table for simplicity.  The macro table is an
-   array of struct powerpc_macro.  */
-
-struct powerpc_macro
-{
-  /* The macro name.  */
-  const char *name;
-
-  /* The number of operands the macro takes.  */
-  unsigned int operands;
-
-  /* One bit flags for the opcode.  These are used to indicate which
-     specific processors support the instructions.  The values are the
-     same as those for the struct powerpc_opcode flags field.  */
-  unsigned long flags;
-
-  /* A format string to turn the macro into a normal instruction.
-     Each %N in the string is replaced with operand number N (zero
-     based).  */
-  const char *format;
-};
-
-extern const struct powerpc_macro powerpc_macros[];
-extern const int powerpc_num_macros;
-
-#endif /* PPC_H */
diff --git a/arch/ppc64/kdb/privinst.h b/arch/ppc64/kdb/privinst.h
deleted file mode 100644 (file)
index 076bcf6..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-/*
- * Copyright (C) 1996 Paul Mackerras.
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- */
-#include <linux/config.h>
-
-#define GETREG(reg)            \
-    static inline unsigned long get_ ## reg (void)     \
-       { unsigned long ret; asm volatile ("mf" #reg " %0" : "=r" (ret) :); return ret; }
-
-#define SETREG(reg)            \
-    static inline void set_ ## reg (unsigned long val) \
-       { asm volatile ("mt" #reg " %0" : : "r" (val)); }
-
-GETREG(msr)
-SETREG(msr)
-SETREG(msrd)
-GETREG(cr)
-
-#define GSETSPR(n, name)       \
-    static inline long get_ ## name (void) \
-       { long ret; asm volatile ("mfspr %0," #n : "=r" (ret) : ); return ret; } \
-    static inline void set_ ## name (long val) \
-       { asm volatile ("mtspr " #n ",%0" : : "r" (val)); }
-
-GSETSPR(0, mq)
-GSETSPR(1, xer)
-GSETSPR(4, rtcu)
-GSETSPR(5, rtcl)
-GSETSPR(8, lr)
-GSETSPR(9, ctr)
-GSETSPR(18, dsisr)
-GSETSPR(19, dar)
-GSETSPR(22, dec)
-GSETSPR(25, sdr1)
-GSETSPR(26, srr0)
-GSETSPR(27, srr1)
-GSETSPR(272, sprg0)
-GSETSPR(273, sprg1)
-GSETSPR(274, sprg2)
-GSETSPR(275, sprg3)
-GSETSPR(282, ear)
-GSETSPR(287, pvr)
-GSETSPR(528, bat0u)
-GSETSPR(529, bat0l)
-GSETSPR(530, bat1u)
-GSETSPR(531, bat1l)
-GSETSPR(532, bat2u)
-GSETSPR(533, bat2l)
-GSETSPR(534, bat3u)
-GSETSPR(535, bat3l)
-GSETSPR(1008, hid0)
-GSETSPR(1009, hid1)
-GSETSPR(1010, iabr)
-GSETSPR(1013, dabr)
-GSETSPR(1023, pir)
-
-static inline int get_sr(int n)
-{
-    int ret;
-
-#if 0
-// DRENG does not assemble 
-    asm (" mfsrin %0,%1" : "=r" (ret) : "r" (n << 28));
-#endif
-    return ret;
-}
-
-static inline void set_sr(int n, int val)
-{
-#if 0
-// DRENG does not assemble 
-    asm ("mtsrin %0,%1" : : "r" (val), "r" (n << 28));
-#endif
-}
-
-static inline void store_inst(void *p)
-{
-    asm volatile ("dcbst 0,%0; sync; icbi 0,%0; isync" : : "r" (p));
-}
-
-static inline void cflush(void *p)
-{
-    asm volatile ("dcbf 0,%0; icbi 0,%0" : : "r" (p));
-}
-
-static inline void cinval(void *p)
-{
-    asm volatile ("dcbi 0,%0; icbi 0,%0" : : "r" (p));
-}
-
diff --git a/arch/ppc64/kdb/symcat.h b/arch/ppc64/kdb/symcat.h
deleted file mode 100644 (file)
index 61ce1e9..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/* Symbol concatenation utilities.
-
-   Copyright (C) 1998, 2000 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-   You should have received a copy of the GNU General Public License along
-   with this program; if not, write to the Free Software Foundation, Inc.,
-   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-#ifndef SYM_CAT_H
-#define SYM_CAT_H
-
-#if defined (__STDC__) || defined (ALMOST_STDC) || defined (HAVE_STRINGIZE)
-#define CONCAT2(a,b)    a##b
-#define CONCAT3(a,b,c)  a##b##c
-#define CONCAT4(a,b,c,d) a##b##c##d
-#define STRINGX(s) #s
-#else
-/* Note one should never pass extra whitespace to the CONCATn macros,
-   e.g. CONCAT2(foo, bar) because traditonal C will keep the space between
-   the two labels instead of concatenating them.  Instead, make sure to
-   write CONCAT2(foo,bar).  */
-#define CONCAT2(a,b)    a/**/b
-#define CONCAT3(a,b,c)  a/**/b/**/c
-#define CONCAT4(a,b,c,d) a/**/b/**/c/**/d
-#define STRINGX(s) "s"
-#endif
-
-#define XCONCAT2(a,b)     CONCAT2(a,b)
-#define XCONCAT3(a,b,c)   CONCAT3(a,b,c)
-#define XCONCAT4(a,b,c,d) CONCAT4(a,b,c,d)
-
-/* Note the layer of indirection here is typically used to allow
-   stringification of the expansion of macros.  I.e. "#define foo
-   bar", "XSTRING(foo)", to yield "bar".  Be aware that this only
-   works for __STDC__, not for traditional C which will still resolve
-   to "foo".  */
-#define XSTRING(s) STRINGX(s) 
-
-#endif /* SYM_CAT_H */
index 4ef173f..980cff0 100644 (file)
  * (at your option) any later version.
  */
 
+#include <linux/stddef.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <asm/system.h>
 #include <asm/page.h>
-#include <asm/abs_addr.h>
 #include <asm/iSeries/HvCall.h>
+#ifndef  _HVCALLSC_H
 #include <asm/iSeries/HvCallSc.h>
+#endif
+#include <asm/iSeries/LparData.h>
+
+#ifndef  _HVTYPES_H
 #include <asm/iSeries/HvTypes.h>
+#endif
 
 
-void HvCall_writeLogBuffer(const void *buffer, u64 len)
+/*=====================================================================
+ * Note that this call takes at MOST one page worth of data
+ */
+int HvCall_readLogBuffer(HvLpIndex lpIndex, void *buffer, u64 bufLen)
 {
-       struct HvLpBufferList hv_buf;
-       u64 left_this_page;
-       u64 cur = virt_to_absolute((unsigned long)buffer);
-
-       while (len) {
-               hv_buf.addr = cur;
-               left_this_page = ((cur & PAGE_MASK) + PAGE_SIZE) - cur;
-               if (left_this_page > len)
-                       left_this_page = len;
-               hv_buf.len = left_this_page;
-               len -= left_this_page;
-               HvCall2(HvCallBaseWriteLogBuffer,
-                               virt_to_absolute((unsigned long)&hv_buf),
-                               left_this_page);
-               cur = (cur & PAGE_MASK) + PAGE_SIZE;
+       struct HvLpBufferList *bufList;
+       u64 bytesLeft = bufLen;
+       u64 leftThisPage;
+       u64 curPtr = virt_to_absolute( (unsigned long) buffer );
+       u64 retVal;
+       int npages;
+       int i;
+
+       npages = 0;
+       while (bytesLeft) {
+               npages++;
+               leftThisPage = ((curPtr & PAGE_MASK) + PAGE_SIZE) - curPtr;
+
+               if (leftThisPage > bytesLeft)
+                       bytesLeft = 0;
+               else
+                       bytesLeft -= leftThisPage;
+
+               curPtr = (curPtr & PAGE_MASK) + PAGE_SIZE;
        }
+
+       if (npages == 0)
+               return 0;
+
+       bufList = (struct HvLpBufferList *)
+               kmalloc(npages * sizeof(struct HvLpBufferList), GFP_ATOMIC);
+       bytesLeft = bufLen;
+       curPtr = virt_to_absolute( (unsigned long) buffer );
+       for(i=0; i<npages; i++) {
+               bufList[i].addr = curPtr;
+      
+               leftThisPage = ((curPtr & PAGE_MASK) + PAGE_SIZE) - curPtr;
+
+               if (leftThisPage > bytesLeft) {
+                       bufList[i].len = bytesLeft;
+                       bytesLeft = 0;
+               } else {
+                       bufList[i].len = leftThisPage;
+                       bytesLeft -= leftThisPage;
+               }
+
+               curPtr = (curPtr & PAGE_MASK) + PAGE_SIZE;
+       }
+
+
+       retVal = HvCall3(HvCallBaseReadLogBuffer, lpIndex,
+                        virt_to_absolute((unsigned long)bufList), bufLen);
+
+       kfree(bufList);
+
+       return (int)retVal;
+}
+
+/*=====================================================================
+ */
+void HvCall_writeLogBuffer(const void *buffer, u64 bufLen)
+{
+       struct HvLpBufferList bufList;
+       u64 bytesLeft = bufLen;
+       u64 leftThisPage;
+       u64 curPtr = virt_to_absolute( (unsigned long) buffer );
+
+       while (bytesLeft) {
+               bufList.addr = curPtr;
+      
+               leftThisPage = ((curPtr & PAGE_MASK) + PAGE_SIZE) - curPtr;
+
+               if (leftThisPage > bytesLeft) {
+                       bufList.len = bytesLeft;
+                       bytesLeft = 0;
+               } else {
+                       bufList.len = leftThisPage;
+                       bytesLeft -= leftThisPage;
+               }
+
+               curPtr = (curPtr & PAGE_MASK) + PAGE_SIZE;
+       }
+
+
+       HvCall2(HvCallBaseWriteLogBuffer,
+               virt_to_absolute((unsigned long)&bufList), bufLen);
+
 }
index 71ce7d6..231ba77 100644 (file)
@@ -147,14 +147,17 @@ unsigned ItLpQueue_process( struct ItLpQueue * lpQueue, struct pt_regs *regs )
                                printk(KERN_INFO "Unexpected Lp Event type=%d\n", nextLpEvent->xType );
                        
                        ItLpQueue_clearValid( nextLpEvent );
-               } else if ( lpQueue->xPlicOverflowIntPending )
-                       /*
-                        * No more valid events. If overflow events are
-                        * pending process them
+               }
+               else    /* No more valid events
+                        * If overflow events are pending
+                        * process them
                         */
-                       HvCallEvent_getOverflowLpEvents( lpQueue->xIndex);
-               else
-                       break;
+                       if ( lpQueue->xPlicOverflowIntPending ) {
+                               HvCallEvent_getOverflowLpEvents( 
+                                               lpQueue->xIndex);
+                       }
+                       else    /* If nothing left then we are done */
+                               break;
        }
 
        ItLpQueueInProcess = 0;
index d93cb38..813780e 100644 (file)
@@ -71,7 +71,7 @@ struct HvReleaseData hvReleaseData = {
        6,              /* TEMP: This allows non-GA driver */
        4,              /* We are v5r2m0               */
        3,              /* Min supported PLIC = v5r1m0 */
-       3,              /* Min usable PLIC   = v5r1m0 */
+       3,              /* Min usuable PLIC   = v5r1m0 */
        { 0xd3, 0x89, 0x95, 0xa4, /* "Linux 2.4   "*/
          0xa7, 0x40, 0xf2, 0x4b,
          0xf4, 0x4b, 0xf6, 0xf4 },
@@ -175,7 +175,7 @@ struct ItVpdAreas itVpdAreas = {
        0, 0,
        26,             /* # VPD array entries */
        10,             /* # DMA array entries */
-       NR_CPUS*2, maxPhysicalProcessors,       /* Max logical, physical procs */
+       MAX_PROCESSORS*2, maxPhysicalProcessors,        /* Max logical, physical procs */
        offsetof(struct ItVpdAreas,xPlicDmaToks),/* offset to DMA toks */
        offsetof(struct ItVpdAreas,xSlicVpdAdrs),/* offset to VPD addrs */
        offsetof(struct ItVpdAreas,xPlicDmaLens),/* offset to DMA lens */
index 4a6797c..291b26e 100644 (file)
@@ -7,29 +7,24 @@ extra-y               := head.o vmlinux.lds.s
 
 obj-y               := setup.o entry.o traps.o irq.o idle.o \
                        time.o process.o signal.o syscalls.o misc.o ptrace.o \
-                       align.o semaphore.o bitops.o stab.o pacaData.o \
+                       align.o semaphore.o bitops.o stab.o htab.o pacaData.o \
                        udbg.o binfmt_elf32.o sys_ppc32.o ioctl32.o \
                        ptrace32.o signal32.o pmc.o rtc.o init_task.o \
-                       lmb.o cputable.o
+                       lmb.o pci.o pci_dn.o pci_dma.o cputable.o
 
-obj-$(CONFIG_PCI)      += pci.o pci_dn.o pci_dma.o
-
-ifdef CONFIG_PPC_ISERIES
-obj-$(CONFIG_PCI)      += iSeries_pci.o iSeries_pci_reset.o \
-                            iSeries_IoMmTable.o 
-endif
-
-obj-$(CONFIG_PPC_ISERIES) += iSeries_irq.o \
-                            iSeries_VpdInfo.o XmPciLpEvent.o \
+obj-$(CONFIG_PPC_ISERIES) += iSeries_pci.o       iSeries_pci_reset.o \
+                            iSeries_IoMmTable.o iSeries_irq.o \
+                            iSeries_VpdInfo.o   XmPciLpEvent.o \
                             HvCall.o HvLpConfig.o LparData.o mf_proc.o \
                             iSeries_setup.o ItLpQueue.o hvCall.o \
-                            mf.o HvLpEvent.o iSeries_proc.o iSeries_htab.o \
-                            proc_pmc.o
+                            mf.o HvLpEvent.o iSeries_proc.o 
 
 obj-$(CONFIG_PPC_PSERIES) += pSeries_pci.o pSeries_lpar.o pSeries_hvCall.o \
-                            eeh.o nvram.o rtasd.o ras.o \
-                            open_pic.o xics.o pSeries_htab.o rtas.o \
-                            chrp_setup.o i8259.o prom.o vio.o
+                            eeh.o rtasd.o nvram.o ras.o
+
+# Change this to pSeries only once we've got iSeries up to date
+obj-y                    += open_pic.o xics.o pSeries_htab.o rtas.o \
+                            chrp_setup.o i8259.o prom.o 
 
 obj-$(CONFIG_PROC_FS)          += proc_ppc64.o
 obj-$(CONFIG_RTAS_FLASH)       += rtas_flash.o
@@ -37,8 +32,5 @@ obj-$(CONFIG_SMP)             += smp.o
 obj-$(CONFIG_MODULES)          += module.o ppc_ksyms.o
 obj-$(CONFIG_PPC_RTAS)         += rtas-proc.o
 obj-$(CONFIG_SCANLOG)          += scanlog.o
-obj-$(CONFIG_VIOPATH)          += viopath.o
-obj-$(CONFIG_LPARCFG)          += lparcfg.o
-
 
 CFLAGS_ioctl32.o += -Ifs/
index 809c9bc..92ab43a 100644 (file)
@@ -1,10 +1,10 @@
 /*
- * File XmPciLpEvent.h created by Wayne Holm on Mon Jan 15 2001.
- *
- * This module handles PCI interrupt events sent by the iSeries Hypervisor.
+   * File XmPciLpEvent.h created by Wayne Holm on Mon Jan 15 2001.
+   *
+   * This module handles PCI interrupt events sent by the iSeries Hypervisor.
 */
 
-#include <linux/config.h>
+
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/threads.h>
 #include <asm/iSeries/XmPciLpEvent.h>
 #include <asm/ppcdebug.h>
 
-static long Pci_Interrupt_Count;
-static long Pci_Event_Count;
+long Pci_Interrupt_Count = 0;
+long Pci_Event_Count     = 0;
 
 enum XmPciLpEvent_Subtype {
        XmPciLpEvent_BusCreated    = 0,         // PHB has been created
        XmPciLpEvent_BusError      = 1,         // PHB has failed
-       XmPciLpEvent_BusFailed     = 2,         // Msg to Secondary, Primary failed bus
+       XmPciLpEvent_BusFailed     = 2,         // Msg to Seconday, Primary failed bus
        XmPciLpEvent_NodeFailed    = 4,         // Multi-adapter bridge has failed
        XmPciLpEvent_NodeRecovered = 5,         // Multi-adapter bridge has recovered
        XmPciLpEvent_BusRecovered  = 12,        // PHB has been recovered
@@ -36,14 +36,14 @@ enum XmPciLpEvent_Subtype {
 };
 
 struct XmPciLpEvent_BusInterrupt {
-       HvBusNumber     busNumber;
+       HvBusNumber             busNumber;
        HvSubBusNumber  subBusNumber;
 };
 
 struct XmPciLpEvent_NodeInterrupt {
-       HvBusNumber     busNumber;
+       HvBusNumber             busNumber;
        HvSubBusNumber  subBusNumber;
-       HvAgentId       deviceId;
+       HvAgentId               deviceId;
 };
 
 struct XmPciLpEvent {
@@ -53,10 +53,10 @@ struct XmPciLpEvent {
                u64 alignData;                  // Align on an 8-byte boundary
 
                struct {
-                       u32             fisr;
+                       u32                     fisr;
                        HvBusNumber     busNumber;
                        HvSubBusNumber  subBusNumber;
-                       HvAgentId       deviceId;
+                       HvAgentId               deviceId;
                } slotInterrupt;
 
                struct XmPciLpEvent_BusInterrupt busFailed;
@@ -70,52 +70,40 @@ struct XmPciLpEvent {
 
 };
 
-static void intReceived(struct XmPciLpEvent *eventParm,
-               struct pt_regs *regsParm);
+static void intReceived(struct XmPciLpEvent* eventParm, struct pt_regs* regsParm);
 
-static void XmPciLpEvent_handler(struct HvLpEvent *eventParm,
-               struct pt_regs *regsParm)
+static void XmPciLpEvent_handler( struct HvLpEvent* eventParm, struct pt_regs* regsParm)
 {
-#ifdef CONFIG_PCI
-#if 0
-       PPCDBG(PPCDBG_BUSWALK, "XmPciLpEvent_handler, type 0x%x\n",
-                       eventParm->xType);
-#endif
+       //PPCDBG(PPCDBG_BUSWALK,"XmPciLpEvent_handler, type 0x%x\n",eventParm->xType );
        ++Pci_Event_Count;
 
-       if (eventParm && (eventParm->xType == HvLpEvent_Type_PciIo)) {
-               switch (eventParm->xFlags.xFunction) {
+       if (eventParm && eventParm->xType == HvLpEvent_Type_PciIo) {
+               switch( eventParm->xFlags.xFunction ) {
                case HvLpEvent_Function_Int:
-                       intReceived((struct XmPciLpEvent *)eventParm, regsParm);
+                       intReceived( (struct XmPciLpEvent*)eventParm, regsParm );
                        break;
                case HvLpEvent_Function_Ack:
-                       printk(KERN_ERR
-                               "XmPciLpEvent.c: unexpected ack received\n");
+                       printk(KERN_ERR "XmPciLpEvent.c: unexpected ack received\n");
                        break;
                default:
-                       printk(KERN_ERR
-                               "XmPciLpEvent.c: unexpected event function %d\n",
-                               (int)eventParm->xFlags.xFunction);
+                       printk(KERN_ERR "XmPciLpEvent.c: unexpected event function %d\n",(int)eventParm->xFlags.xFunction);
                        break;
                }
-       } else if (eventParm)
-               printk(KERN_ERR
-                       "XmPciLpEvent.c: Unrecognized PCI event type 0x%x\n",
-                       (int)eventParm->xType);
-       else
+       }
+       else if (event) {
+               printk(KERN_ERR "XmPciLpEvent.c: Unrecognized PCI event type 0x%x\n",(int)eventParm->xType);
+       }
+       else {
                printk(KERN_ERR "XmPciLpEvent.c: NULL event received\n");
-#endif
+       }
 }
 
-static void intReceived(struct XmPciLpEvent *eventParm,
-               struct pt_regs *regsParm)
+static void intReceived(struct XmPciLpEvent* eventParm, struct pt_regs* regsParm)
 {
        int irq;
 
        ++Pci_Interrupt_Count;
-#if 0
-       PPCDBG(PPCDBG_BUSWALK, "PCI: XmPciLpEvent.c: intReceived\n");
-#endif
+       //PPCDBG(PPCDBG_BUSWALK,"PCI: XmPciLpEvent.c: intReceived\n");
 
        switch (eventParm->hvLpEvent.xSubtype) {
        case XmPciLpEvent_SlotInterrupt:
@@ -123,45 +111,33 @@ static void intReceived(struct XmPciLpEvent *eventParm,
                /* Dispatch the interrupt handlers for this irq */
                ppc_irq_dispatch_handler(regsParm, irq);
                HvCallPci_eoi(eventParm->eventData.slotInterrupt.busNumber,
-                       eventParm->eventData.slotInterrupt.subBusNumber,
-                       eventParm->eventData.slotInterrupt.deviceId);
+                             eventParm->eventData.slotInterrupt.subBusNumber,
+                             eventParm->eventData.slotInterrupt.deviceId);
                break;
                /* Ignore error recovery events for now */
        case XmPciLpEvent_BusCreated:
-               printk(KERN_INFO "XmPciLpEvent.c: system bus %d created\n",
-                       eventParm->eventData.busCreated.busNumber);
+               printk(KERN_INFO "XmPciLpEvent.c: system bus %d created\n", eventParm->eventData.busCreated.busNumber);
                break;
        case XmPciLpEvent_BusError:
        case XmPciLpEvent_BusFailed:
-               printk(KERN_INFO "XmPciLpEvent.c: system bus %d failed\n",
-                       eventParm->eventData.busFailed.busNumber);
+               printk(KERN_INFO "XmPciLpEvent.c: system bus %d failed\n", eventParm->eventData.busFailed.busNumber);
                break;
        case XmPciLpEvent_BusRecovered:
        case XmPciLpEvent_UnQuiesceBus:
-               printk(KERN_INFO "XmPciLpEvent.c: system bus %d recovered\n",
-                       eventParm->eventData.busRecovered.busNumber);
+               printk(KERN_INFO "XmPciLpEvent.c: system bus %d recovered\n", eventParm->eventData.busRecovered.busNumber);
                break;
        case XmPciLpEvent_NodeFailed:
        case XmPciLpEvent_BridgeError:
-               printk(KERN_INFO
-                       "XmPciLpEvent.c: multi-adapter bridge %d/%d/%d failed\n",
-                       eventParm->eventData.nodeFailed.busNumber,
-                       eventParm->eventData.nodeFailed.subBusNumber,
-                       eventParm->eventData.nodeFailed.deviceId);
+               printk(KERN_INFO "XmPciLpEvent.c: multi-adapter bridge %d/%d/%d failed\n", eventParm->eventData.nodeFailed.busNumber, eventParm->eventData.nodeFailed.subBusNumber, eventParm->eventData.nodeFailed.deviceId);
                break;
        case XmPciLpEvent_NodeRecovered:
-               printk(KERN_INFO
-                       "XmPciLpEvent.c: multi-adapter bridge %d/%d/%d recovered\n",
-                       eventParm->eventData.nodeRecovered.busNumber,
-                       eventParm->eventData.nodeRecovered.subBusNumber,
-                       eventParm->eventData.nodeRecovered.deviceId);
+               printk(KERN_INFO "XmPciLpEvent.c: multi-adapter bridge %d/%d/%d recovered\n", eventParm->eventData.nodeRecovered.busNumber, eventParm->eventData.nodeRecovered.subBusNumber, eventParm->eventData.nodeRecovered.deviceId);
                break;
        default:
-               printk(KERN_ERR
-                       "XmPciLpEvent.c: unrecognized event subtype 0x%x\n",
-                       eventParm->hvLpEvent.xSubtype);
+               printk(KERN_ERR "XmPciLpEvent.c: unrecognized event subtype 0x%x\n",
+                      eventParm->hvLpEvent.xSubtype);
                break;
-       }
+       };
 }
 
 
@@ -169,22 +145,18 @@ static void intReceived(struct XmPciLpEvent *eventParm,
 int XmPciLpEvent_init()
 {
        int xRc;
+       PPCDBG(PPCDBG_BUSWALK,"XmPciLpEvent_init, Register Event type 0x%04X\n",HvLpEvent_Type_PciIo);
 
-       PPCDBG(PPCDBG_BUSWALK,
-                       "XmPciLpEvent_init, Register Event type 0x%04X\n",
-                       HvLpEvent_Type_PciIo);
-
-       xRc = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo,
-                       &XmPciLpEvent_handler);
+       xRc = HvLpEvent_registerHandler(HvLpEvent_Type_PciIo, &XmPciLpEvent_handler);
        if (xRc == 0) {
                xRc = HvLpEvent_openPath(HvLpEvent_Type_PciIo, 0);
-               if (xRc != 0)
-                       printk(KERN_ERR
-                               "XmPciLpEvent.c: open event path failed with rc 0x%x\n",
-                               xRc);
-       } else
-               printk(KERN_ERR
-                       "XmPciLpEvent.c: register handler failed with rc 0x%x\n",
-                       xRc);
-       return xRc;
+               if (xRc != 0) {
+                       printk(KERN_ERR "XmPciLpEvent.c: open event path failed with rc 0x%x\n", xRc);
+               }
+       }
+       else {
+               printk(KERN_ERR "XmPciLpEvent.c: register handler failed with rc 0x%x\n", xRc);
+       }
+    return xRc;
 }
+
index 38bcdca..69c672f 100644 (file)
@@ -56,12 +56,6 @@ int main(void)
        DEFINE(THREAD_FPSCR, offsetof(struct thread_struct, fpscr));
        DEFINE(KSP, offsetof(struct thread_struct, ksp));
 
-#ifdef CONFIG_ALTIVEC
-       DEFINE(THREAD_VR0, offsetof(struct thread_struct, vr[0]));
-       DEFINE(THREAD_VRSAVE, offsetof(struct thread_struct, vrsave));
-       DEFINE(THREAD_VSCR, offsetof(struct thread_struct, vscr));
-       DEFINE(THREAD_USED_VR, offsetof(struct thread_struct, used_vr));
-#endif /* CONFIG_ALTIVEC */
        DEFINE(MM, offsetof(struct task_struct, mm));
 
        /* naca */
index c30f285..192c185 100644 (file)
@@ -57,7 +57,6 @@
 #include <asm/irq.h>
 #include <asm/naca.h>
 #include <asm/time.h>
-#include <asm/nvram.h>
 
 #include "i8259.h"
 #include "open_pic.h"
 #include <asm/ppcdebug.h>
 #include <asm/cputable.h>
 
+extern volatile unsigned char *chrp_int_ack_special;
+
 void chrp_progress(char *, unsigned short);
 
 extern void openpic_init_IRQ(void);
-extern void openpic_init_irq_desc(irq_desc_t *);
 
 extern void find_and_init_phbs(void);
 
@@ -96,19 +96,16 @@ chrp_get_cpuinfo(struct seq_file *m)
 
        seq_printf(m, "timebase\t: %lu\n", ppc_tb_freq);
 
-       root = of_find_node_by_path("/");
+       root = find_path_device("/");
        if (root)
                model = get_property(root, "model", NULL);
        seq_printf(m, "machine\t\t: CHRP %s\n", model);
-       of_node_put(root);
 }
 
 #define I8042_DATA_REG 0x60
 
-void __init chrp_request_regions(void)
+void __init chrp_request_regions(void) 
 {
-       struct device_node *i8042;
-
        request_region(0x20,0x20,"pic1");
        request_region(0xa0,0x20,"pic2");
        request_region(0x00,0x20,"dma1");
@@ -121,9 +118,8 @@ void __init chrp_request_regions(void)
         * tree and reserve the region if it does not appear. Later on
         * the i8042 code will try and reserve this region and fail.
         */
-       if (!(i8042 = of_find_node_by_type(NULL, "8042")))
+       if (!find_type_devices("8042"))
                request_region(I8042_DATA_REG, 16, "reserved (no i8042)");
-       of_node_put(i8042);
 }
 
 void __init
@@ -149,7 +145,8 @@ chrp_setup_arch(void)
        else
 #endif
        ROOT_DEV = Root_SDA2;
-       ROOT_DEV = Root_SDA3;
+
+       printk("Boot arguments: %s\n", cmd_line);
 
        fwnmi_init();
 
@@ -161,7 +158,7 @@ chrp_setup_arch(void)
 #endif
 
        /* Find the Open PIC if present */
-       root = of_find_node_by_path("/");
+       root = find_path_device("/");
        opprop = (unsigned int *) get_property(root,
                                "platform-open-pic", NULL);
        if (opprop != 0) {
@@ -173,7 +170,6 @@ chrp_setup_arch(void)
                printk(KERN_DEBUG "OpenPIC addr: %lx\n", openpic);
                OpenPIC_Addr = __ioremap(openpic, 0x40000, _PAGE_NO_CACHE);
        }
-       of_node_put(root);
 
 #ifdef CONFIG_DUMMY_CONSOLE
        conswitchp = &dummy_con;
@@ -233,10 +229,6 @@ void __init
 chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
          unsigned long r6, unsigned long r7)
 {
-       struct device_node * dn;
-       char * hypertas;
-       unsigned int len;
-
 #if 0 /* PPPBBB remove this later... -Peter */
 #ifdef CONFIG_BLK_DEV_INITRD
        /* take care of initrd if we have one */
@@ -252,12 +244,10 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.setup_residual = NULL;
        ppc_md.get_cpuinfo    = chrp_get_cpuinfo;
        if(naca->interrupt_controller == IC_OPEN_PIC) {
-               ppc_md.init_IRQ       = openpic_init_IRQ;
-               ppc_md.init_irq_desc  = openpic_init_irq_desc;
+               ppc_md.init_IRQ       = openpic_init_IRQ; 
                ppc_md.get_irq        = openpic_get_irq;
        } else {
                ppc_md.init_IRQ       = xics_init_IRQ;
-               ppc_md.init_irq_desc  = xics_init_irq_desc;
                ppc_md.get_irq        = xics_get_irq;
        }
 
@@ -272,40 +262,36 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
        ppc_md.set_rtc_time   = pSeries_set_rtc_time;
        ppc_md.calibrate_decr = pSeries_calibrate_decr;
 
-       ppc_md.progress       = chrp_progress;
+       ppc_md.progress = chrp_progress;
 
-       ppc_md.nvram_read     = pSeries_nvram_read;
-       ppc_md.nvram_write    = pSeries_nvram_write;
-
-        /* Build up the firmware_features bitmask field
+        /* build up the firmware_features bitmask field
          * using contents of device-tree/ibm,hypertas-functions.
          * Ultimately this functionality may be moved into prom.c prom_init().
          */
-       dn = of_find_node_by_path("/rtas");
+       struct device_node * dn;
+       char * hypertas;
+       unsigned int len;
+       dn = find_path_device("/rtas");
        cur_cpu_spec->firmware_features = 0;
        hypertas = get_property(dn, "ibm,hypertas-functions", &len);
        if (hypertas) {
-               while (len > 0){
-                       int i, hypertas_len;
-                       /* check value against table of strings */
-                       for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) {
-                               if ((firmware_features_table[i].name) &&
-                                   (strcmp(firmware_features_table[i].name,hypertas))==0) {
-                                       /* we have a match */
-                                       cur_cpu_spec->firmware_features |= 
-                                               (firmware_features_table[i].val);
-                                       break;
-                               } 
-                       }
-                       hypertas_len = strlen(hypertas);
-                       len -= hypertas_len +1;
-                       hypertas+= hypertas_len +1;
+           while (len > 0){
+               int i;
+               /* check value against table of strings */
+               for(i=0; i < FIRMWARE_MAX_FEATURES ;i++) {
+                   if ((firmware_features_table[i].name) && (strcmp(firmware_features_table[i].name,hypertas))==0) {
+                       /* we have a match */
+                       cur_cpu_spec->firmware_features |= (1UL << firmware_features_table[i].val);
+                       break;
+                   } 
                }
+               int hypertas_len = strlen(hypertas);
+               len -= hypertas_len +1;
+               hypertas+= hypertas_len +1;
+           }
        }
-
-       of_node_put(dn);
-       printk(KERN_INFO "firmware_features = 0x%lx\n", 
-              cur_cpu_spec->firmware_features);
+       udbg_printf("firmware_features bitmask: 0x%x \n",
+                   cur_cpu_spec->firmware_features);
 }
 
 void
@@ -333,13 +319,6 @@ chrp_progress(char *s, unsigned short hex)
                display_character = rtas_token("display-character");
                set_indicator = rtas_token("set-indicator");
        }
-       if (display_character == RTAS_UNKNOWN_SERVICE) {
-               /* use hex display */
-               if (set_indicator == RTAS_UNKNOWN_SERVICE)
-                       return;
-               rtas_call(set_indicator, 3, 1, NULL, 6, 0, hex);
-               return;
-       }
 
        if(display_character == RTAS_UNKNOWN_SERVICE) {
                /* use hex display if available */
@@ -426,11 +405,11 @@ void __init pSeries_calibrate_decr(void)
 
        /*
         * The cpu node should have a timebase-frequency property
-        * to tell us the rate at which the decrementer counts.
+        * to tell us the rate at which the decrementer counts. 
         */
        freq = 16666000;        /* hardcoded default */
-       cpu = of_find_node_by_type(NULL, "cpu");
-       if (cpu != 0) {
+       cpu = find_type_devices("cpu");
+       if (cpu != 0) { 
                fp = (int *) get_property(cpu, "timebase-frequency", NULL);
                if (fp != 0)
                        freq = *fp;
@@ -443,12 +422,11 @@ void __init pSeries_calibrate_decr(void)
                        processor_freq = *fp;
        }
        ppc_proc_freq = processor_freq;
-       of_node_put(cpu);
-
-       printk("time_init: decrementer frequency = %lu.%.6lu MHz\n",
-              freq/1000000, freq%1000000);
+       
+        printk("time_init: decrementer frequency = %lu.%.6lu MHz\n", 
+              freq/1000000, freq%1000000 );
        printk("time_init: processor frequency   = %lu.%.6lu MHz\n",
-              processor_freq/1000000, processor_freq%1000000);
+               processor_freq/1000000, processor_freq%1000000 );
 
        tb_ticks_per_jiffy = freq / HZ;
        tb_ticks_per_sec = tb_ticks_per_jiffy * HZ;
index 04fde43..78d7fd1 100644 (file)
 
 struct cpu_spec* cur_cpu_spec = NULL;
 
-/* NOTE:
- * Unlike ppc32, ppc64 will only call this once for the boot CPU, it's
- * the responsibility of the appropriate CPU save/restore functions to
- * eventually copy these settings over. Those save/restore aren't yet
- * part of the cputable though. That has to be fixed for both ppc32
- * and ppc64
- */
 extern void __setup_cpu_power3(unsigned long offset, struct cpu_spec* spec);
 extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
 
@@ -37,10 +30,8 @@ extern void __setup_cpu_power4(unsigned long offset, struct cpu_spec* spec);
  */
 #ifdef CONFIG_ALTIVEC
 #define CPU_FTR_ALTIVEC_COMP   CPU_FTR_ALTIVEC
-#define PPC_FEATURE_HAS_ALTIVEC_COMP PPC_FEATURE_HAS_ALTIVEC
 #else
 #define CPU_FTR_ALTIVEC_COMP   0
-#define PPC_FEATURE_HAS_ALTIVEC_COMP    0
 #endif
 
 struct cpu_spec        cpu_specs[] = {
@@ -116,24 +107,6 @@ struct cpu_spec    cpu_specs[] = {
            __setup_cpu_power4,
            COMMON_PPC64_FW
     },
-    {  /* PPC970 */
-           0xffff0000, 0x00390000, "PPC970",
-           CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
-           CPU_FTR_PPCAS_ARCH_V2 | CPU_FTR_ALTIVEC_COMP,
-           COMMON_USER_PPC64 | PPC_FEATURE_HAS_ALTIVEC_COMP,
-           128, 128,
-           __setup_cpu_power4,
-           COMMON_PPC64_FW
-    },
-    {  /* Power5 */
-           0xffff0000, 0x003a0000, "Power5",
-           CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
-           CPU_FTR_PPCAS_ARCH_V2,
-           COMMON_USER_PPC64,
-           128, 128,
-           __setup_cpu_power4,
-           COMMON_PPC64_FW
-    },
     {  /* default match */
            0x00000000, 0x00000000, "(Power4-Compatible)",
            CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE |
@@ -157,13 +130,4 @@ firmware_feature_t firmware_features_table[FIRMWARE_MAX_FEATURES] = {
     {FW_FEATURE_DUMP,          "hcall-dump"},
     {FW_FEATURE_INTERRUPT,     "hcall-interrupt"},
     {FW_FEATURE_MIGRATE,       "hcall-migrate"},
-    {FW_FEATURE_PERFMON,       "hcall-perfmon"},
-    {FW_FEATURE_CRQ,           "hcall-crq"},
-    {FW_FEATURE_VIO,           "hcall-vio"},
-    {FW_FEATURE_RDMA,          "hcall-rdma"},
-    {FW_FEATURE_LLAN,          "hcall-lLAN"},
-    {FW_FEATURE_BULK,          "hcall-bulk"},
-    {FW_FEATURE_XDABR,         "hcall-xdabr"},
-    {FW_FEATURE_MULTITCE,      "hcall-multi-tce"},
-    {FW_FEATURE_SPLPAR,                "hcall-splpar"},
 };
index 19d61e6..f6d928f 100644 (file)
@@ -257,7 +257,7 @@ void eeh_init(void)
 
        /* Enable EEH for all adapters.  Note that eeh requires buid's */
        info.adapters_enabled = 0;
-       for (phb = of_find_node_by_name(NULL, "pci"); phb; phb = of_find_node_by_name(phb, "pci")) {
+       for (phb = find_devices("pci"); phb; phb = phb->next) {
                int len;
                int *buid_vals = (int *) get_property(phb, "ibm,fw-phb-id", &len);
                if (!buid_vals)
index 84f41f6..b538e14 100644 (file)
@@ -29,7 +29,6 @@
 #include <asm/thread_info.h>
 #include <asm/ppc_asm.h>
 #include <asm/offsets.h>
-#include <asm/cputable.h>
 
 #ifdef CONFIG_PPC_ISERIES
 #define DO_SOFT_DISABLE
@@ -212,15 +211,6 @@ _GLOBAL(ret_from_syscall_2)
        .align  2,0
 #endif
 
-       
-_GLOBAL(ppc32_swapcontext)
-       bl      .sys32_swapcontext
-       b       80f
-       
-_GLOBAL(ppc64_swapcontext)
-       bl      .sys_swapcontext
-       b       80f
-
 _GLOBAL(ppc32_sigreturn)
        bl      .sys32_sigreturn
        b       80f
@@ -271,17 +261,10 @@ _GLOBAL(_switch)
        SAVE_10GPRS(22, r1)
        mflr    r20             /* Return to switch caller */
        mfmsr   r22
-       li      r0, MSR_FP
-#ifdef CONFIG_ALTIVEC
-BEGIN_FTR_SECTION
-       oris    r0,r0,MSR_VEC@h /* Disable altivec */
-       mfspr   r24,SPRN_VRSAVE /* save vrsave register value */
-       std     r24,THREAD_VRSAVE(r3)
-END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
-#endif /* CONFIG_ALTIVEC */
-       and.    r0,r0,r22
+       andi.   r21, r22, MSR_FP
        beq+    1f
-       andc    r22,r22,r0
+       li      r6,MSR_FP       /* Disable floating-point */
+       andc    r22,r22,r6
        mtmsrd  r22
        isync
 1:     std     r20,_NIP(r1)
@@ -292,30 +275,22 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
        addi    r6,r4,-THREAD   /* Convert THREAD to 'current' */
        std     r6,PACACURRENT(r13)     /* Set new 'current' */
 
+#ifdef CONFIG_PPC_ISERIES
+#error fixme
+       ld      r7,TI_FLAGS(r4) /* Get run light flag */
+       mfspr   r9,CTRLF
+       srdi    r7,r7,1         /* Align to run light bit in CTRL reg */
+       insrdi  r9,r7,1,63      /* Insert run light into CTRL */
+       mtspr   CTRLT,r9
+#endif
+
        ld      r1,KSP(r4)      /* Load new stack pointer */
        ld      r6,_CCR(r1)
        mtcrf   0xFF,r6
-
-#ifdef CONFIG_ALTIVEC
-BEGIN_FTR_SECTION
-       ld      r0,THREAD_VRSAVE(r4)
-       mtspr   SPRN_VRSAVE,r0          /* if G4, restore VRSAVE reg */
-END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
-#endif /* CONFIG_ALTIVEC */
-
        /* r3-r13 are destroyed -- Cort */
        REST_8GPRS(14, r1)
        REST_10GPRS(22, r1)
 
-#ifdef CONFIG_PPC_ISERIES
-       clrrdi  r7,r1,THREAD_SHIFT      /* get current_thread_info() */
-       ld      r7,TI_FLAGS(r7)         /* Get run light flag */
-       mfspr   r9,CTRLF
-       srdi    r7,r7,TIF_RUN_LIGHT
-       insrdi  r9,r7,1,63              /* Insert run light into CTRL */
-       mtspr   CTRLT,r9
-#endif
-
        /* convert old thread to its task_struct for return value */
        addi    r3,r3,-THREAD
        ld      r7,_NIP(r1)     /* Return to _switch caller in new task */
@@ -333,16 +308,39 @@ _GLOBAL(ret_from_fork)
        b       .ret_from_except
 
 _GLOBAL(ret_from_except)
+#ifdef CONFIG_PPC_ISERIES
+       ld      r5,SOFTE(r1)
+       cmpdi   0,r5,0
+       beq     4f
+irq_recheck:
+       /* Check for pending interrupts (iSeries) */
+       CHECKANYINT(r3,r4)
+       beq+    4f      /* skip do_IRQ if no interrupts */
+
+#warning FIX ISERIES
+       mfspr   r5,SPRG3
+       li      r3,0
+       stb     r3,PACAPROCENABLED(r5)  /* ensure we are disabled */
+       addi    r3,r1,STACK_FRAME_OVERHEAD
+       bl      .do_IRQ
+       b       irq_recheck     /* loop back and handle more */
+4:
+#endif
        /*
         * Disable interrupts so that current_thread_info()->flags
         * can't change between when we test it and when we return
         * from the interrupt.
         */
+recheck:
        mfmsr   r10             /* Get current interrupt state */
        li      r4,0
        ori     r4,r4,MSR_EE
-       andc    r9,r10,r4       /* clear MSR_EE */
-       mtmsrd  r9,1            /* Update machine state */
+       andc    r10,r10,r4      /* clear MSR_EE */
+       mtmsrd  r10,1           /* Update machine state */
+
+#ifdef CONFIG_PPC_ISERIES
+#error fix iSeries soft disable
+#endif
 
        ld      r3,_MSR(r1)     /* Returning to user mode? */
        andi.   r3,r3,MSR_PR
@@ -366,28 +364,6 @@ _GLOBAL(ret_from_except)
        REST_GPR(13,r1)
 
 restore:
-#ifdef CONFIG_PPC_ISERIES
-       ld      r5,SOFTE(r1)
-       mfspr   r4,SPRG3                /* get paca address */
-       cmpdi   0,r5,0
-       beq     4f
-       /* Check for pending interrupts (iSeries) */
-       /* this is CHECKANYINT except that we already have the paca address */
-       ld      r3,PACALPPACA+LPPACAANYINT(r4)
-       cmpdi   r3,0
-       beq+    4f                      /* skip do_IRQ if no interrupts */
-
-       mfspr   r13,SPRG3               /* get paca pointer back */
-       li      r3,0
-       stb     r3,PACAPROCENABLED(r13) /* ensure we are soft-disabled */
-       mtmsrd  r10                     /* hard-enable again */
-       addi    r3,r1,STACK_FRAME_OVERHEAD
-       bl      .do_IRQ
-       b       .ret_from_except                /* loop back and handle more */
-
-4:     stb     r5,PACAPROCENABLED(r4)
-#endif
-
        ld      r3,_CTR(r1)
        ld      r0,_LINK(r1)
        mtctr   r3
@@ -401,6 +377,12 @@ restore:
 
        stdcx.  r0,0,r1         /* to clear the reservation */
 
+#ifdef DO_SOFT_DISABLE
+       /* XXX do this in do_work, r13 isnt valid here */
+       ld      r0,SOFTE(r1)
+       stb     r0,PACAPROCENABLED(r13)
+#endif
+
        mfmsr   r0
        li      r2, MSR_RI
        andc    r0,r0,r2
@@ -425,21 +407,21 @@ restore:
 /* Note: this must change if we start using the  TIF_NOTIFY_RESUME bit */
 do_work:
        /* Enable interrupts */
+       ori     r10,r10,MSR_EE
        mtmsrd  r10,1
 
        andi.   r0,r3,_TIF_NEED_RESCHED
        beq     1f
        bl      .schedule
-       b       .ret_from_except
+       b       recheck
 
 1:     andi.   r0,r3,_TIF_SIGPENDING
-       beq     .ret_from_except
+       beq     recheck
        li      r3,0
        addi    r4,r1,STACK_FRAME_OVERHEAD
        bl      .do_signal
-       b       .ret_from_except
+       b       recheck
 
-#ifdef CONFIG_PPC_PSERIES
 /*
  * On CHRP, the Run-Time Abstraction Services (RTAS) have to be
  * called with the MMU off.
@@ -516,12 +498,6 @@ _STATIC(rtas_return_loc)
        mfspr   r4,SPRG3                /* Get PACA */
        SET_REG_TO_CONST(r5, KERNELBASE)
         sub     r4,r4,r5                /* RELOC the PACA base pointer */
-
-       mfmsr   r6
-       li      r0,MSR_RI
-       andc    r6,r6,r0
-       sync    
-       mtmsrd  r6
         
         ld     r1,PACAR1(r4)           /* Restore our SP */
        LOADADDR(r3,.rtas_restore_regs)
@@ -650,4 +626,3 @@ _GLOBAL(enter_prom)
 
        mtlr    r0
         blr                            /* return to caller */
-#endif /* defined(CONFIG_PPC_PSERIES) */
index 4e198da..ab26035 100644 (file)
@@ -52,7 +52,7 @@
 /*
  * hcall interface to pSeries LPAR
  */
-#define HVSC .long 0x44000022
+#define HSC .long 0x44000022
 #define H_SET_ASR              0x30
 
 /*
        .text
        .globl  _stext
 _stext:
-#ifdef CONFIG_PPC_PSERIES
 _STATIC(__start)
        b .__start_initialization_pSeries
-#endif
 #ifdef CONFIG_PPC_ISERIES
-       /*
-        * At offset 0x20, there is a pointer to iSeries LPAR data.
-        * This is required by the hypervisor
-        */
+       /* At offset 0x20, there is a pointer to iSeries LPAR data.
+        * This is required by the hypervisor */
        . = 0x20
        .llong hvReleaseData-KERNELBASE
 
-       /*
-        * At offset 0x28 and 0x30 are offsets to the msChunks
+       /* At offset 0x28 and 0x30 are offsets to the msChunks
         * array (used by the iSeries LPAR debugger to do translation
         * between physical addresses and absolute addresses) and
-        * to the pidhash table (also used by the debugger)
-        */
+        * to the pidhash table (also used by the debugger) */
        .llong msChunks-KERNELBASE
-       .llong 0 /* pidhash-KERNELBASE SFRXXX */
+       .llong pidhash-KERNELBASE
 
        /* Offset 0x38 - Pointer to start of embedded System.map */
        .globl  embedded_sysmap_start
@@ -120,7 +114,7 @@ embedded_sysmap_start:
        .globl  embedded_sysmap_end
 embedded_sysmap_end:
        .llong  0
-#else
+#endif
 
        /* Secondary processors spin on this value until it goes to 1. */
        .globl  __secondary_hold_spinloop
@@ -153,7 +147,6 @@ _GLOBAL(__secondary_hold)
        /* Relocation is off & we are located at an address less */
        /* than 0x100, so only need to grab low order offset.    */
        std     r24,__secondary_hold_acknowledge@l(0)
-       sync
 
        /* All secondary cpu's wait here until told to start. */
 100:    ld      r4,__secondary_hold_spinloop@l(0)
@@ -170,7 +163,6 @@ _GLOBAL(__secondary_hold)
        BUG_OPCODE
 #endif
 #endif
-#endif
 
 /*
  * The following macros define the code that appears as
@@ -252,14 +244,6 @@ _GLOBAL(__secondary_hold)
        std     r22,EX_SRR0(r21);           /* save SRR0 in exc. frame     */ \
        ld      r23,LPPACA+LPPACASRR1(r20); /* Get SRR1 from ItLpPaca      */ \
        std     r23,EX_SRR1(r21);           /* save SRR1 in exc. frame     */ \
-                                                                         \
-       mfspr   r23,DAR;                /* Save DAR in exc. frame      */ \
-       std     r23,EX_DAR(r21);                                          \
-       mfspr   r23,DSISR;              /* Save DSISR in exc. frame    */ \
-       stw     r23,EX_DSISR(r21);                                        \
-       mfspr   r23,SPRG2;              /* Save r20 in exc. frame      */ \
-       std     r23,EX_R20(r21);                                          \
-                                                                         \
        mfcr    r23;                        /* save CR in r23              */
 
 /*
@@ -391,34 +375,9 @@ __start_interrupts:
        STD_EXCEPTION_PSERIES( 0xc00, SystemCall )
        STD_EXCEPTION_PSERIES( 0xd00, SingleStep )
        STD_EXCEPTION_PSERIES( 0xe00, Trap_0e )
-
-       /* We need to deal with the Altivec unavailable exception
-        * here which is at 0xf20, thus in the middle of the
-        * prolog code of the PerformanceMonitor one. A little
-        * trickery is thus necessary
-        */
-       . = 0xf00
-       b       .PerformanceMonitor_Pseries
-       . = 0xf20
-       b       .AltivecUnavailable_Pseries
-
+       STD_EXCEPTION_PSERIES( 0xf00, PerformanceMonitor )
        STD_EXCEPTION_PSERIES( 0x1300, InstructionBreakpoint )
-       STD_EXCEPTION_PSERIES( 0x1700, AltivecAssist )
 
-       /* Here are the "moved" performance monitor and
-        * altivec unavailable exceptions
-        */
-       . = 0x3000
-       .globl PerformanceMonitor_Pseries;
-.PerformanceMonitor_Pseries:
-       EXCEPTION_PROLOG_PSERIES(0xf00, PerformanceMonitor_common)
-       
-       . = 0x3100
-       .globl AltivecUnavailable_Pseries;
-.AltivecUnavailable_Pseries:
-       EXCEPTION_PROLOG_PSERIES(0xf20, AltivecUnavailable_common)
-       
-               
        /* Space for the naca.  Architected to be located at real address
         * NACA_PHYS_ADDR.  Various tools rely on this location being fixed.
         * The first dword of the naca is required by iSeries LPAR to
@@ -605,11 +564,7 @@ __end_stab:
        STD_EXCEPTION_COMMON( 0xe00, Trap_0e, .UnknownException )
        STD_EXCEPTION_COMMON( 0xf00, PerformanceMonitor, .PerformanceMonitorException )
        STD_EXCEPTION_COMMON(0x1300, InstructionBreakpoint, .InstructionBreakpointException )
-#ifdef CONFIG_ALTIVEC
-       STD_EXCEPTION_COMMON(0x1700, AltivecAssist, .AltivecAssistException )
-#else
-       STD_EXCEPTION_COMMON(0x1700, AltivecAssist, .UnknownException )
-#endif
+
 /*
  * Return from an exception which is handled without calling
  * save_remaining_regs.  The caller is assumed to have done
@@ -784,23 +739,6 @@ FPUnavailable_common:
        bl      .KernelFPUnavailableException
        BUG_OPCODE
 
-       .globl AltivecUnavailable_common
-AltivecUnavailable_common:
-       EXCEPTION_PROLOG_COMMON
-#ifdef CONFIG_ALTIVEC
-       bne     .load_up_altivec                /* if from user, just load it up */
-#endif
-       addi    r3,r1,STACK_FRAME_OVERHEAD
-       DO_COPY_EE()
-       li      r6,0xf20
-       bl      .save_remaining_regs
-#ifdef CONFIG_ALTIVEC
-       bl      .KernelAltivecUnavailableException
-#else
-       bl      .UnknownException
-#endif
-       BUG_OPCODE
-               
        .globl SystemCall_common
 SystemCall_common:
        EXCEPTION_PROLOG_COMMON
@@ -1175,6 +1113,7 @@ _GLOBAL(save_remaining_regs)
        SET_REG_TO_CONST(r22, MSR_KERNEL)
 
 #ifdef DO_SOFT_DISABLE
+#warning FIX ISERIES
        stb     r20,PACAPROCENABLED(r13) /* possibly soft enable */
        ori     r22,r22,MSR_EE          /* always hard enable */
 #else
@@ -1280,7 +1219,6 @@ _GLOBAL(__start_initialization_iSeries)
        b       .start_here_common
 #endif
 
-#ifdef CONFIG_PPC_PSERIES
 _GLOBAL(__start_initialization_pSeries)
        mr      r31,r3                  /* save parameters */
        mr      r30,r4
@@ -1390,7 +1328,6 @@ _STATIC(__after_prom_start)
        sub     r5,r5,r27
        bl      .copy_and_flush         /* copy the rest */
        b       .start_here_pSeries
-#endif
 
 /*
  * Copy routine used to copy the kernel to start at physical address 0
@@ -1529,126 +1466,6 @@ _GLOBAL(giveup_fpu)
 #endif /* CONFIG_SMP */
        blr
 
-
-#ifdef CONFIG_ALTIVEC
-               
-/*
- * load_up_altivec(unused, unused, tsk)
- * Disable VMX for the task which had it previously,
- * and save its vector registers in its thread_struct.
- * Enables the VMX for use in the kernel on return.
- * On SMP we know the VMX is free, since we give it up every
- * switch (ie, no lazy save of the vector registers).
- * On entry: r13 == 'current' && last_task_used_altivec != 'current'
- */
-_STATIC(load_up_altivec)
-       mfmsr   r5                      /* grab the current MSR */
-       oris    r5,r5,MSR_VEC@h
-       mtmsrd  r5                      /* enable use of VMX now */
-       isync
-       
-/*
- * For SMP, we don't do lazy VMX switching because it just gets too
- * horrendously complex, especially when a task switches from one CPU
- * to another.  Instead we call giveup_altvec in switch_to.
- * VRSAVE isn't dealt with here, that is done in the normal context
- * switch code. Note that we could rely on vrsave value to eventually
- * avoid saving all of the VREGs here...
- */
-#ifndef CONFIG_SMP
-       LOADBASE(r3,last_task_used_altivec)
-       ld      r4,last_task_used_altivec@l(r3)
-       cmpi    0,r4,0
-       beq     1f
-       /* Save VMX state to last_task_used_altivec's THREAD struct */
-       addi    r4,r4,THREAD
-       SAVE_32VRS(0,r5,r4)
-       mfvscr  vr0
-       li      r10,THREAD_VSCR
-       stvx    vr0,r10,r4
-       /* Disable VMX for last_task_used_altivec */
-       ld      r5,PT_REGS(r4)
-       ld      r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-       lis     r20,MSR_VEC@h
-       andc    r4,r4,r20
-       std     r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-1:
-#endif /* CONFIG_SMP */
-       /* Hack: if we get an altivec unavailable trap with VRSAVE
-        * set to all zeros, we assume this is a broken application
-        * that fails to set it properly, and thus we switch it to
-        * all 1's
-        */
-       mfspr   r4,SPRN_VRSAVE
-       cmpi    0,r4,0
-       bne+    1f
-       li      r4,-1
-       mtspr   SPRN_VRSAVE,r4
-1:
-       /* enable use of VMX after return */
-       ld      r4,PACACURRENT(r13)
-       addi    r5,r4,THREAD            /* Get THREAD */
-       oris    r23,r23,MSR_VEC@h
-       li      r4,1
-       li      r10,THREAD_VSCR
-       stw     r4,THREAD_USED_VR(r5)
-       lvx     vr0,r10,r5
-       REST_32VRS(0,r4,r5)
-#ifndef CONFIG_SMP
-       /* Update last_task_used_math to 'current' */
-       subi    r4,r5,THREAD            /* Back to 'current' */
-       std     r4,last_task_used_altivec@l(r3)
-#endif /* CONFIG_SMP */
-       /* restore registers and return */
-       b       fast_exception_return
-
-/*
- * disable_kernel_altivec()
- * Disable the VMX.
- */
-_GLOBAL(disable_kernel_altivec)
-       mfmsr   r3
-       rldicl  r0,r3,(63-MSR_VEC_LG),1
-       rldicl  r3,r0,(MSR_VEC_LG+1),0
-       mtmsrd  r3                      /* disable use of VMX now */
-       isync
-       blr
-
-/*
- * giveup_altivec(tsk)
- * Disable VMX for the task given as the argument,
- * and save the vector registers in its thread_struct.
- * Enables the VMX for use in the kernel on return.
- */
-_GLOBAL(giveup_altivec)
-       mfmsr   r5
-       oris    r5,r5,MSR_VEC@h
-       mtmsrd  r5                      /* enable use of VMX now */
-       isync
-       cmpi    0,r3,0
-       beqlr-                          /* if no previous owner, done */
-       addi    r3,r3,THREAD            /* want THREAD of task */
-       ld      r5,PT_REGS(r3)
-       cmpi    0,r5,0
-       SAVE_32VRS(0,r4,r3)
-       mfvscr  vr0
-       li      r4,THREAD_VSCR
-       stvx    vr0,r4,r3
-       beq     1f
-       ld      r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-       lis     r3,MSR_VEC@h
-       andc    r4,r4,r3                /* disable FP for previous task */
-       std     r4,_MSR-STACK_FRAME_OVERHEAD(r5)
-1:
-#ifndef CONFIG_SMP
-       li      r5,0
-       LOADBASE(r4,last_task_used_altivec)
-       std     r5,last_task_used_altivec@l(r4)
-#endif /* CONFIG_SMP */
-       blr
-
-#endif /* CONFIG_ALTIVEC */
-
 #ifdef CONFIG_SMP
 /*
  * This function is called after the master CPU has released the
@@ -1718,7 +1535,7 @@ _GLOBAL(__secondary_start)
        cmpwi   r3,0x34         /* Pulsar */
        bne     98f
 97:    li      r3,H_SET_ASR    /* hcall = H_SET_ASR */
-       HVSC                    /* Invoking hcall */
+       HSC                     /* Invoking hcall */
        b       99f
 98:                             /* !(rpa hypervisor) || !(star)  */
        mtasr   r4              /* set the stab location         */
@@ -1777,7 +1594,6 @@ _GLOBAL(enable_32b_mode)
        isync
        blr
 
-#ifdef CONFIG_PPC_PSERIES
 /*
  * This is where the main kernel code starts.
  */
@@ -1887,7 +1703,7 @@ _STATIC(start_here_pSeries)
        cmpwi   r3,0x34         /* Pulsar */
        bne     98f
 97:    li      r3,H_SET_ASR    /* hcall = H_SET_ASR */
-       HVSC                    /* Invoking hcall */
+       HSC                     /* Invoking hcall */
        b       99f
 98:                             /* !(rpa hypervisor) || !(star) */
        mtasr   r4              /* set the stab location         */
@@ -1913,7 +1729,6 @@ _STATIC(start_here_pSeries)
        mtspr   SRR0,r3
        mtspr   SRR1,r4
        rfid
-#endif /* CONFIG_PPC_PSERIES */
 
        /* This is where all platforms converge execution */
 _STATIC(start_here_common)
@@ -1950,12 +1765,6 @@ _STATIC(start_here_common)
        addi    r2,r2,0x4000
        addi    r2,r2,0x4000
 
-       /* Apply the CPUs-specific fixups (nop out sections not relevant
-        * to this CPU
-        */
-       li      r3,0
-       bl      .do_cpu_ftr_fixups
-
        /* setup the systemcfg pointer */
        LOADADDR(r9,systemcfg)
        SET_REG_TO_CONST(r8, SYSTEMCFG_VIRT_ADDR)
@@ -1994,8 +1803,10 @@ _STATIC(start_here_common)
        /* Load up the kernel context */
 5:
 #ifdef DO_SOFT_DISABLE
+#warning FIX ISERIES
+       mfspr   r4,SPRG3
        li      r5,0
-       stb     r5,PACAPROCENABLED(r13) /* Soft Disabled */
+       stb     r5,PACAPROCENABLED(r4)  /* Soft Disabled */
        mfmsr   r5
        ori     r5,r5,MSR_EE            /* Hard Enabled */
        mtmsrd  r5
diff --git a/arch/ppc64/kernel/htab.c b/arch/ppc64/kernel/htab.c
new file mode 100644 (file)
index 0000000..e9bad03
--- /dev/null
@@ -0,0 +1,491 @@
+/*
+ * PowerPC64 port by Mike Corrigan and Dave Engebretsen
+ *   {mikejc|engebret}@us.ibm.com
+ *
+ *    Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com>
+ *
+ * SMP scalability work:
+ *    Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM
+ * 
+ *    Module name: htab.c
+ *
+ *    Description:
+ *      PowerPC Hashed Page Table functions
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ */
+
+#include <linux/spinlock.h>
+#include <linux/errno.h>
+#include <linux/sched.h>
+#include <linux/proc_fs.h>
+#include <linux/stat.h>
+#include <linux/sysctl.h>
+#include <linux/ctype.h>
+#include <linux/cache.h>
+
+#include <asm/ppcdebug.h>
+#include <asm/processor.h>
+#include <asm/pgtable.h>
+#include <asm/mmu.h>
+#include <asm/mmu_context.h>
+#include <asm/page.h>
+#include <asm/types.h>
+#include <asm/system.h>
+#include <asm/uaccess.h>
+#include <asm/naca.h>
+#include <asm/pmc.h>
+#include <asm/machdep.h>
+#include <asm/lmb.h>
+#include <asm/abs_addr.h>
+#include <asm/tlbflush.h>
+#include <asm/io.h>
+#include <asm/eeh.h>
+#include <asm/tlb.h>
+#include <asm/cacheflush.h>
+#include <asm/cputable.h>
+
+/*
+ * Note:  pte   --> Linux PTE
+ *        HPTE  --> PowerPC Hashed Page Table Entry
+ *
+ * Execution context:
+ *   htab_initialize is called with the MMU off (of course), but
+ *   the kernel has been copied down to zero so it can directly
+ *   reference global data.  At this point it is very difficult
+ *   to print debug info.
+ *
+ */
+
+HTAB htab_data = {NULL, 0, 0, 0, 0};
+
+extern unsigned long _SDR1;
+
+#define KB (1024)
+#define MB (1024*KB)
+
+static inline void
+loop_forever(void)
+{
+       volatile unsigned long x = 1;
+       for(;x;x|=1)
+               ;
+}
+
+static inline void
+create_pte_mapping(unsigned long start, unsigned long end,
+                  unsigned long mode, int large)
+{
+       unsigned long addr;
+       unsigned int step;
+
+       if (large)
+               step = 16*MB;
+       else
+               step = 4*KB;
+
+       for (addr = start; addr < end; addr += step) {
+               unsigned long vpn, hash, hpteg;
+               unsigned long vsid = get_kernel_vsid(addr);
+               unsigned long va = (vsid << 28) | (addr & 0xfffffff);
+               int ret;
+
+               if (large)
+                       vpn = va >> LARGE_PAGE_SHIFT;
+               else
+                       vpn = va >> PAGE_SHIFT;
+
+               hash = hpt_hash(vpn, large);
+
+               hpteg = ((hash & htab_data.htab_hash_mask)*HPTES_PER_GROUP);
+
+               if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
+                       ret = pSeries_lpar_hpte_insert(hpteg, va,
+                               (unsigned long)__v2a(addr) >> PAGE_SHIFT,
+                               0, mode, 1, large);
+               else
+                       ret = pSeries_hpte_insert(hpteg, va,
+                               (unsigned long)__v2a(addr) >> PAGE_SHIFT,
+                               0, mode, 1, large);
+
+               if (ret == -1) {
+                       ppc64_terminate_msg(0x20, "create_pte_mapping");
+                       loop_forever();
+               }
+       }
+}
+
+void
+htab_initialize(void)
+{
+       unsigned long table, htab_size_bytes;
+       unsigned long pteg_count;
+       unsigned long mode_rw;
+
+       /*
+        * Calculate the required size of the htab.  We want the number of
+        * PTEGs to equal one half the number of real pages.
+        */ 
+       htab_size_bytes = 1UL << naca->pftSize;
+       pteg_count = htab_size_bytes >> 7;
+
+       /* For debug, make the HTAB 1/8 as big as it normally would be. */
+       ifppcdebug(PPCDBG_HTABSIZE) {
+               pteg_count >>= 3;
+               htab_size_bytes = pteg_count << 7;
+       }
+
+       htab_data.htab_num_ptegs = pteg_count;
+       htab_data.htab_hash_mask = pteg_count - 1;
+
+       if (systemcfg->platform == PLATFORM_PSERIES) {
+               /* Find storage for the HPT.  Must be contiguous in
+                * the absolute address space.
+                */
+               table = lmb_alloc(htab_size_bytes, htab_size_bytes);
+               if ( !table ) {
+                       ppc64_terminate_msg(0x20, "hpt space");
+                       loop_forever();
+               }
+               htab_data.htab = (HPTE *)__a2v(table);
+
+               /* htab absolute addr + encoded htabsize */
+               _SDR1 = table + __ilog2(pteg_count) - 11;
+
+               /* Initialize the HPT with no entries */
+               memset((void *)table, 0, htab_size_bytes);
+       } else {
+               /* Using a hypervisor which owns the htab */
+               htab_data.htab = NULL;
+               _SDR1 = 0; 
+       }
+
+       mode_rw = _PAGE_ACCESSED | _PAGE_COHERENT | PP_RWXX;
+
+       /* XXX we currently map kernel text rw, should fix this */
+       if ((cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE)
+           && systemcfg->physicalMemorySize > 256*MB) {
+               create_pte_mapping((unsigned long)KERNELBASE, 
+                                  KERNELBASE + 256*MB, mode_rw, 0);
+               create_pte_mapping((unsigned long)KERNELBASE + 256*MB, 
+                                  KERNELBASE + (systemcfg->physicalMemorySize), 
+                                  mode_rw, 1);
+       } else {
+               create_pte_mapping((unsigned long)KERNELBASE, 
+                                  KERNELBASE+(systemcfg->physicalMemorySize), 
+                                  mode_rw, 0);
+       }
+}
+#undef KB
+#undef MB
+
+/*
+ * find_linux_pte returns the address of a linux pte for a given 
+ * effective address and directory.  If not found, it returns zero.
+ */
+pte_t *find_linux_pte(pgd_t *pgdir, unsigned long ea)
+{
+       pgd_t *pg;
+       pmd_t *pm;
+       pte_t *pt = NULL;
+       pte_t pte;
+
+       pg = pgdir + pgd_index(ea);
+       if (!pgd_none(*pg)) {
+
+               pm = pmd_offset(pg, ea);
+               if (pmd_present(*pm)) { 
+                       pt = pte_offset_kernel(pm, ea);
+                       pte = *pt;
+                       if (!pte_present(pte))
+                               pt = NULL;
+               }
+       }
+
+       return pt;
+}
+
+static inline unsigned long computeHptePP(unsigned long pte)
+{
+       return (pte & _PAGE_USER) |
+               (((pte & _PAGE_USER) >> 1) &
+                ((~((pte >> 2) &       /* _PAGE_RW */
+                    (pte >> 7))) &     /* _PAGE_DIRTY */
+                 1));
+}
+
+/*
+ * Handle a fault by adding an HPTE. If the address can't be determined
+ * to be valid via Linux page tables, return 1. If handled return 0
+ */
+int __hash_page(unsigned long ea, unsigned long access, unsigned long vsid,
+               pte_t *ptep, unsigned long trap, int local)
+{
+       unsigned long va, vpn;
+       unsigned long newpp, prpn;
+       unsigned long hpteflags;
+       long slot;
+       pte_t old_pte, new_pte;
+
+       /* XXX fix for large ptes */
+       int large = 0;
+
+       /* Search the Linux page table for a match with va */
+       va = (vsid << 28) | (ea & 0x0fffffff);
+
+       if (large)
+               vpn = va >> LARGE_PAGE_SHIFT;
+       else
+               vpn = va >> PAGE_SHIFT;
+
+       /*
+        * If no pte found or not present, send the problem up to
+        * do_page_fault
+        */
+       if (unlikely(!ptep || !pte_present(*ptep)))
+               return 1;
+
+       /* 
+        * Check the user's access rights to the page.  If access should be
+        * prevented then send the problem up to do_page_fault.
+        */
+       access |= _PAGE_PRESENT;
+       if (unlikely(access & ~(pte_val(*ptep))))
+               return 1;
+
+       /*
+        * At this point, we have a pte (old_pte) which can be used to build
+        * or update an HPTE. There are 2 cases:
+        *
+        * 1. There is a valid (present) pte with no associated HPTE (this is 
+        *      the most common case)
+        * 2. There is a valid (present) pte with an associated HPTE. The
+        *      current values of the pp bits in the HPTE prevent access
+        *      because we are doing software DIRTY bit management and the
+        *      page is currently not DIRTY. 
+        */
+
+       old_pte = *ptep;
+       new_pte = old_pte;
+       /* If the attempted access was a store */
+       if (access & _PAGE_RW)
+               pte_val(new_pte) |= _PAGE_ACCESSED | _PAGE_DIRTY;
+       else
+               pte_val(new_pte) |= _PAGE_ACCESSED;
+
+       newpp = computeHptePP(pte_val(new_pte));
+
+#define PPC64_HWNOEXEC (1 << 2)
+
+       /* We do lazy icache flushing on cpus that support it */
+       if (unlikely((cur_cpu_spec->cpu_features & CPU_FTR_NOEXECUTE)
+                    && pfn_valid(pte_pfn(new_pte)))) {
+               struct page *page = pte_page(new_pte);
+
+               /* page is dirty */
+               if (!PageReserved(page) &&
+                   !test_bit(PG_arch_1, &page->flags)) {
+                       if (trap == 0x400) {
+                               __flush_dcache_icache(page_address(page));
+                               set_bit(PG_arch_1, &page->flags);
+                       } else {
+                               newpp |= PPC64_HWNOEXEC;
+                       }
+               }
+       }
+
+       /* Check if pte already has an hpte (case 2) */
+       if (unlikely(pte_val(old_pte) & _PAGE_HASHPTE)) {
+               /* There MIGHT be an HPTE for this pte */
+               unsigned long hash, slot, secondary;
+
+               hash = hpt_hash(vpn, large);
+               secondary = (pte_val(old_pte) & _PAGE_SECONDARY) >> 15;
+               if (secondary)
+                       hash = ~hash;
+               slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP;
+               slot += (pte_val(old_pte) & _PAGE_GROUP_IX) >> 12;
+
+               if (ppc_md.hpte_updatepp(slot, newpp, va, large, local) == -1)
+                       pte_val(old_pte) &= ~_PAGE_HPTEFLAGS;
+               else
+                       if (!pte_same(old_pte, new_pte))
+                               *ptep = new_pte;
+       }
+
+       if (likely(!(pte_val(old_pte) & _PAGE_HASHPTE))) {
+               unsigned long hash = hpt_hash(vpn, large);
+               unsigned long hpte_group;
+               prpn = pte_val(old_pte) >> PTE_SHIFT;
+
+repeat:
+               hpte_group = ((hash & htab_data.htab_hash_mask) *
+                             HPTES_PER_GROUP) & ~0x7UL;
+
+               /* Update the linux pte with the HPTE slot */
+               pte_val(new_pte) &= ~_PAGE_HPTEFLAGS;
+               pte_val(new_pte) |= _PAGE_HASHPTE;
+
+               /* copy appropriate flags from linux pte */
+               hpteflags = (pte_val(new_pte) & 0x1f8) | newpp;
+
+               slot = ppc_md.hpte_insert(hpte_group, va, prpn, 0,
+                                         hpteflags, 0, large);
+
+               /* Primary is full, try the secondary */
+               if (unlikely(slot == -1)) {
+                       pte_val(new_pte) |= 1 << 15;
+                       hpte_group = ((~hash & htab_data.htab_hash_mask) *
+                                     HPTES_PER_GROUP) & ~0x7UL; 
+                       slot = ppc_md.hpte_insert(hpte_group, va, prpn,
+                                                 1, hpteflags, 0, large);
+                       if (slot == -1) {
+                               if (mftb() & 0x1)
+                                       hpte_group = ((hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP) & ~0x7UL;
+
+                               ppc_md.hpte_remove(hpte_group);
+                               goto repeat;
+                        }
+               }
+
+               if (unlikely(slot == -2))
+                       panic("hash_page: pte_insert failed\n");
+
+               pte_val(new_pte) |= (slot<<12) & _PAGE_GROUP_IX;
+
+               /* 
+                * No need to use ldarx/stdcx here because all who
+                * might be updating the pte will hold the
+                * page_table_lock or the hash_table_lock
+                * (we hold both)
+                */
+               *ptep = new_pte;
+       }
+
+       return 0;
+}
+
+int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
+{
+       void *pgdir;
+       unsigned long vsid;
+       struct mm_struct *mm;
+       pte_t *ptep;
+       int ret;
+       int user_region = 0;
+       int local = 0;
+       cpumask_t tmp;
+
+       /* Check for invalid addresses. */
+       if (!IS_VALID_EA(ea))
+               return 1;
+
+       switch (REGION_ID(ea)) {
+       case USER_REGION_ID:
+               user_region = 1;
+               mm = current->mm;
+               if (mm == NULL)
+                       return 1;
+
+               vsid = get_vsid(mm->context, ea);
+               break;
+       case IO_REGION_ID:
+               mm = &ioremap_mm;
+               vsid = get_kernel_vsid(ea);
+               break;
+       case VMALLOC_REGION_ID:
+               mm = &init_mm;
+               vsid = get_kernel_vsid(ea);
+               break;
+#if 0
+       case EEH_REGION_ID:
+               /*
+                * Should only be hit if there is an access to MMIO space
+                * which is protected by EEH.
+                * Send the problem up to do_page_fault 
+                */
+       case KERNEL_REGION_ID:
+               /*
+                * Should never get here - entire 0xC0... region is bolted.
+                * Send the problem up to do_page_fault 
+                */
+#endif
+       default:
+               /* Not a valid range
+                * Send the problem up to do_page_fault 
+                */
+               return 1;
+               break;
+       }
+
+       pgdir = mm->pgd;
+
+       if (pgdir == NULL)
+               return 1;
+
+       /*
+        * Lock the Linux page table to prevent mmap and kswapd
+        * from modifying entries while we search and update
+        */
+       spin_lock(&mm->page_table_lock);
+
+       tmp = cpumask_of_cpu(smp_processor_id());
+       if (user_region && cpus_equal(mm->cpu_vm_mask, tmp))
+               local = 1;
+
+       ret = hash_huge_page(mm, access, ea, vsid, local);
+       if (ret < 0) {
+               ptep = find_linux_pte(pgdir, ea);
+               ret = __hash_page(ea, access, vsid, ptep, trap, local);
+       }
+
+       spin_unlock(&mm->page_table_lock);
+
+       return ret;
+}
+
+void flush_hash_page(unsigned long context, unsigned long ea, pte_t pte,
+                    int local)
+{
+       unsigned long vsid, vpn, va, hash, secondary, slot;
+
+       /* XXX fix for large ptes */
+       unsigned long large = 0;
+
+       if ((ea >= USER_START) && (ea <= USER_END))
+               vsid = get_vsid(context, ea);
+       else
+               vsid = get_kernel_vsid(ea);
+
+       va = (vsid << 28) | (ea & 0x0fffffff);
+       if (large)
+               vpn = va >> LARGE_PAGE_SHIFT;
+       else
+               vpn = va >> PAGE_SHIFT;
+       hash = hpt_hash(vpn, large);
+       secondary = (pte_val(pte) & _PAGE_SECONDARY) >> 15;
+       if (secondary)
+               hash = ~hash;
+       slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP;
+       slot += (pte_val(pte) & _PAGE_GROUP_IX) >> 12;
+
+       ppc_md.hpte_invalidate(slot, va, large, local);
+}
+
+void flush_hash_range(unsigned long context, unsigned long number, int local)
+{
+       if (ppc_md.flush_hash_range) {
+               ppc_md.flush_hash_range(context, number, local);
+       } else {
+               int i;
+               struct ppc64_tlb_batch *batch =
+                       &ppc64_tlb_batch[smp_processor_id()];
+
+               for (i = 0; i < number; i++)
+                       flush_hash_page(context, batch->addr[i], batch->pte[i],
+                                       local);
+       }
+}
index 2f2b9bf..c1026da 100644 (file)
@@ -124,8 +124,8 @@ static void i8259_unmask_irq(unsigned int irq_nr)
 
 static void i8259_end_irq(unsigned int irq)
 {
-       if (!(get_irq_desc(irq)->status & (IRQ_DISABLED|IRQ_INPROGRESS)) &&
-           get_irq_desc(irq)->action)
+       if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)) &&
+           irq_desc[irq].action)
                i8259_unmask_irq(irq);
 }
 
index 8a5c776..f1d0176 100644 (file)
@@ -1,4 +1,3 @@
-#define PCIFR(...)
 /************************************************************************/
 /* This module supports the iSeries I/O Address translation mapping     */
 /* Copyright (C) 20yy  <Allan H Trautman> <IBM Corp>                    */
 #include <linux/pci.h>
 #include <linux/spinlock.h>
 #include <asm/ppcdebug.h>
+#include <asm/flight_recorder.h>
 #include <asm/iSeries/HvCallPci.h>
 #include <asm/iSeries/iSeries_pci.h>
 
 #include "iSeries_IoMmTable.h"
 #include "pci.h"
 
-/*
- * Table defines
- * Each Entry size is 4 MB * 1024 Entries = 4GB I/O address space.
- */
+/*******************************************************************/
+/* Table defines                                                   */
+/* Each Entry size is 4 MB * 1024 Entries = 4GB I/O address space. */
+/*******************************************************************/
 #define Max_Entries 1024
 unsigned long iSeries_IoMmTable_Entry_Size = 0x0000000000400000; 
 unsigned long iSeries_Base_Io_Memory       = 0xE000000000000000;
 unsigned long iSeries_Max_Io_Memory        = 0xE000000000000000;
 static   long iSeries_CurrentIndex         = 0;
 
-/*
- * Lookup Tables.
- */
-struct iSeries_Device_Node **iSeries_IoMmTable;
-u8 *iSeries_IoBarTable;
+/*******************************************************************/
+/* Lookup Tables.                                                  */
+/*******************************************************************/
+struct iSeries_Device_Node** iSeries_IoMmTable;
+u8*                          iSeries_IoBarTable;
 
-/*
- * Static and Global variables
- */
-static char *iSeriesPciIoText = "iSeries PCI I/O";
+/*******************************************************************/
+/* Static and Global variables                                     */
+/*******************************************************************/
+static char*      iSeriesPciIoText     = "iSeries PCI I/O";
 static spinlock_t iSeriesIoMmTableLock = SPIN_LOCK_UNLOCKED;
 
-/*
- * iSeries_IoMmTable_Initialize
- *
- * Allocates and initalizes the Address Translation Table and Bar
- * Tables to get them ready for use.  Must be called before any
- * I/O space is handed out to the device BARs.
- * A follow up method,iSeries_IoMmTable_Status can be called to
- * adjust the table after the device BARs have been assiged to
- * resize the table.
- */
+/*******************************************************************/
+/* iSeries_IoMmTable_Initialize                                    */
+/*******************************************************************/
+/* Allocates and initalizes the Address Translation Table and Bar  */
+/* Tables to get them ready for use.  Must be called before any    */
+/* I/O space is handed out to the device BARs.                     */
+/* A follow up method,iSeries_IoMmTable_Status can be called to    */
+/* adjust the table after the device BARs have been assiged to     */
+/* resize the table.                                               */
+/*******************************************************************/
 void iSeries_IoMmTable_Initialize(void)
 {
        spin_lock(&iSeriesIoMmTableLock);
-       iSeries_IoMmTable  = kmalloc(sizeof(void *) * Max_Entries, GFP_KERNEL);
-       iSeries_IoBarTable = kmalloc(sizeof(u8) * Max_Entries, GFP_KERNEL);
+       iSeries_IoMmTable  = kmalloc(sizeof(void*)*Max_Entries,GFP_KERNEL);
+       iSeries_IoBarTable = kmalloc(sizeof(u8)*Max_Entries,   GFP_KERNEL);
        spin_unlock(&iSeriesIoMmTableLock);
-       PCIFR("IoMmTable Initialized 0x%p", iSeries_IoMmTable);
-       if ((iSeries_IoMmTable == NULL) || (iSeries_IoBarTable == NULL))
+       PCIFR("IoMmTable Initialized 0x%p",  iSeries_IoMmTable);
+       if(iSeries_IoMmTable == NULL || iSeries_IoBarTable == NULL) {
                panic("PCI: I/O tables allocation failed.\n");
+       }
 }
 
-/*
- * iSeries_IoMmTable_AllocateEntry
- *
- * Adds pci_dev entry in address translation table
- *
- * - Allocates the number of entries required in table base on BAR
- *   size.
- * - Allocates starting at iSeries_Base_Io_Memory and increases.
- * - The size is round up to be a multiple of entry size.
- * - CurrentIndex is incremented to keep track of the last entry.
- * - Builds the resource entry for allocated BARs.
- */
-static void iSeries_IoMmTable_AllocateEntry(struct pci_dev *PciDev,
-               int BarNumber)
+/*******************************************************************/
+/* iSeries_IoMmTable_AllocateEntry                                 */
+/*******************************************************************/
+/* Adds pci_dev entry in address translation table                 */
+/*******************************************************************/
+/* - Allocates the number of entries required in table base on BAR */
+/*   size.                                                         */
+/* - Allocates starting at iSeries_Base_Io_Memory and increases.   */
+/* - The size is round up to be a multiple of entry size.          */
+/* - CurrentIndex is incremented to keep track of the last entry.  */
+/* - Builds the resource entry for allocated BARs.                 */
+/*******************************************************************/
+static void iSeries_IoMmTable_AllocateEntry(struct pci_dev* PciDev, int BarNumber)
 {
-       struct resource *BarResource = &PciDev->resource[BarNumber];
-       long BarSize = pci_resource_len(PciDev, BarNumber);
-
-       /*
-        * No space to allocate, quick exit, skip Allocation.
-        */
-       if (BarSize == 0)
-               return;
-       /*
-        * Set Resource values.
-        */
+       struct resource* BarResource = &PciDev->resource[BarNumber];
+       long             BarSize     = pci_resource_len(PciDev,BarNumber);
+       /***********************************************************/
+       /* No space to allocate, quick exit, skip Allocation.      */
+       /***********************************************************/
+       if(BarSize == 0) return;
+       /***********************************************************/
+       /* Set Resource values.                                    */
+       /***********************************************************/
        spin_lock(&iSeriesIoMmTableLock);
-       BarResource->name = iSeriesPciIoText;
-       BarResource->start =
-               iSeries_IoMmTable_Entry_Size * iSeries_CurrentIndex;
-       BarResource->start += iSeries_Base_Io_Memory;
-       BarResource->end = BarResource->start+BarSize-1;
-       /*
-        * Allocate the number of table entries needed for BAR.
-        */
+       BarResource->name  = iSeriesPciIoText;
+       BarResource->start = iSeries_IoMmTable_Entry_Size*iSeries_CurrentIndex;
+       BarResource->start+= iSeries_Base_Io_Memory;
+       BarResource->end   = BarResource->start+BarSize-1;
+       /***********************************************************/
+       /* Allocate the number of table entries needed for BAR.    */
+       /***********************************************************/
        while (BarSize > 0 ) {
-               *(iSeries_IoMmTable + iSeries_CurrentIndex) =
-                       (struct iSeries_Device_Node *)PciDev->sysdata;
-               *(iSeries_IoBarTable + iSeries_CurrentIndex) = BarNumber;
+               *(iSeries_IoMmTable +iSeries_CurrentIndex) = (struct iSeries_Device_Node*)PciDev->sysdata;
+               *(iSeries_IoBarTable+iSeries_CurrentIndex) = BarNumber;
                BarSize -= iSeries_IoMmTable_Entry_Size;
                ++iSeries_CurrentIndex;
        }
-       iSeries_Max_Io_Memory = iSeries_Base_Io_Memory +
-               (iSeries_IoMmTable_Entry_Size * iSeries_CurrentIndex);
+       iSeries_Max_Io_Memory = (iSeries_IoMmTable_Entry_Size*iSeries_CurrentIndex)+iSeries_Base_Io_Memory;
        spin_unlock(&iSeriesIoMmTableLock);
 }
 
-/*
- * iSeries_allocateDeviceBars
- *
- * - Allocates ALL pci_dev BAR's and updates the resources with the
- *   BAR value.  BARS with zero length will have the resources
- *   The HvCallPci_getBarParms is used to get the size of the BAR
- *   space.  It calls iSeries_IoMmTable_AllocateEntry to allocate
- *   each entry.
- * - Loops through The Bar resources(0 - 5) including the ROM
- *   is resource(6).
- */
-void iSeries_allocateDeviceBars(struct pci_dev *PciDev)
+/*******************************************************************/
+/* iSeries_allocateDeviceBars                                      */
+/*******************************************************************/
+/* - Allocates ALL pci_dev BAR's and updates the resources with the*/
+/*   BAR value.  BARS with zero length will have the resources     */
+/*   The HvCallPci_getBarParms is used to get the size of the BAR  */
+/*   space.  It calls iSeries_IoMmTable_AllocateEntry to allocate  */
+/*   each entry.                                                   */
+/* - Loops through The Bar resources(0 - 5) including the ROM      */
+/*   is resource(6).                                               */
+/*******************************************************************/
+void iSeries_allocateDeviceBars(struct pci_dev* PciDev)
 {
-       struct resource *BarResource;
-       int BarNumber;
-
-       for (BarNumber = 0; BarNumber <= PCI_ROM_RESOURCE; ++BarNumber) {
+       struct resource* BarResource;
+       int              BarNumber;
+       for(BarNumber = 0; BarNumber <= PCI_ROM_RESOURCE; ++BarNumber) {
                BarResource = &PciDev->resource[BarNumber];
                iSeries_IoMmTable_AllocateEntry(PciDev, BarNumber);
        }
 }
 
-/*
- * Translates the IoAddress to the device that is mapped to IoSpace.
- * This code is inlined, see the iSeries_pci.c file for the replacement.
- */
-struct iSeries_Device_Node *iSeries_xlateIoMmAddress(void *IoAddress)
+/************************************************************************/
+/* Translates the IoAddress to the device that is mapped to IoSpace.    */
+/* This code is inlined, see the iSeries_pci.c file for the replacement.*/
+/************************************************************************/
+struct iSeries_Device_Node* iSeries_xlateIoMmAddress(void* IoAddress)
 {
        return NULL;       
 }
 
-/*
+/************************************************************************
  * Status hook for IoMmTable
- */
-void iSeries_IoMmTable_Status(void)
+ ************************************************************************/
+void     iSeries_IoMmTable_Status(void)
 {
-       PCIFR("IoMmTable......: 0x%p", iSeries_IoMmTable);
-       PCIFR("IoMmTable Range: 0x%p to 0x%p", iSeries_Base_Io_Memory,
-                       iSeries_Max_Io_Memory);
+       PCIFR("IoMmTable......: 0x%p",iSeries_IoMmTable);
+       PCIFR("IoMmTable Range: 0x%p to 0x%p",iSeries_Base_Io_Memory,iSeries_Max_Io_Memory);
+       return;
 }
index 1b0cc53..a5b9e65 100644 (file)
 struct pci_dev;
 struct iSeries_Device_Node;
 
-extern struct iSeries_Device_Node **iSeries_IoMmTable;
-extern u8 *iSeries_IoBarTable;
+extern struct iSeries_Device_Node** iSeries_IoMmTable;
+extern u8*                          iSeries_IoBarTable;
 extern unsigned long iSeries_Base_Io_Memory;
 extern unsigned long iSeries_Max_Io_Memory;
 extern unsigned long iSeries_Base_Io_Memory;
 extern unsigned long iSeries_IoMmTable_Entry_Size;
-/*
- * iSeries_IoMmTable_Initialize
- *
- * - Initalizes the Address Translation Table and get it ready for use.
- *   Must be called before any client calls any of the other methods.
- *
- * Parameters: None.
- *
- * Return: None.
- */
-extern void iSeries_IoMmTable_Initialize(void);
-extern void iSeries_IoMmTable_Status(void);
+/************************************************************************/
+/* iSeries_IoMmTable_Initialize                                         */
+/************************************************************************/
+/* - Initalizes the Address Translation Table and get it ready for use. */
+/*   Must be called before any client calls any of the other methods.   */
+/*                                                                      */
+/* Parameters: None.                                                    */
+/*                                                                      */
+/* Return: None.                                                        */  
+/************************************************************************/
+extern  void iSeries_IoMmTable_Initialize(void);
+extern  void iSeries_IoMmTable_Status(void);
 
-/*
- * iSeries_allocateDeviceBars
- *
- * - Allocates ALL pci_dev BAR's and updates the resources with the BAR
- *   value.  BARS with zero length will not have the resources.  The
- *   HvCallPci_getBarParms is used to get the size of the BAR space.
- *   It calls iSeries_IoMmTable_AllocateEntry to allocate each entry.
- *
- * Parameters:
- * pci_dev = Pointer to pci_dev structure that will be mapped to pseudo
- *           I/O Address.
- *
- * Return:
- *   The pci_dev I/O resources updated with pseudo I/O Addresses.
- */
-extern void iSeries_allocateDeviceBars(struct pci_dev *);
+/************************************************************************/
+/* iSeries_allocateDeviceBars                                           */
+/************************************************************************/
+/* - Allocates ALL pci_dev BAR's and updates the resources with the BAR */
+/*   value.  BARS with zero length will not have the resources.  The    */
+/*   HvCallPci_getBarParms is used to get the size of the BAR space.    */
+/*   It calls iSeries_IoMmTable_AllocateEntry to allocate each entry.   */
+/*                                                                      */
+/* Parameters:                                                          */
+/* pci_dev = Pointer to pci_dev structure that will be mapped to pseudo */
+/*           I/O Address.                                               */
+/*                                                                      */
+/* Return:                                                              */
+/*   The pci_dev I/O resources updated with pseudo I/O Addresses.       */
+/************************************************************************/
+extern  void iSeries_allocateDeviceBars(struct pci_dev* );
 
-/*
- * iSeries_xlateIoMmAddress
- *
- * - Translates an I/O Memory address to Device Node that has been the
- *   allocated the psuedo I/O Address.
- *
- * Parameters:
- * IoAddress = I/O Memory Address.
- *
- * Return:
- *   An iSeries_Device_Node to the device mapped to the I/O address. The
- *   BarNumber and BarOffset are valid if the Device Node is returned.
- */
-extern struct iSeries_Device_Node *iSeries_xlateIoMmAddress(void *IoAddress);
+/************************************************************************/
+/* iSeries_xlateIoMmAddress                                             */
+/************************************************************************/
+/* - Translates an I/O Memory address to Device Node that has been the  */
+/*   allocated the psuedo I/O Address.                                  */
+/*                                                                      */
+/* Parameters:                                                          */
+/* IoAddress = I/O Memory Address.                                      */
+/*                                                                      */
+/* Return:                                                              */
+/*   An iSeries_Device_Node to the device mapped to the I/O address. The*/
+/*   BarNumber and BarOffset are valid if the Device Node is returned.  */
+/************************************************************************/
+extern struct iSeries_Device_Node* iSeries_xlateIoMmAddress(void* IoAddress);
 
 #endif /* _ISERIES_IOMMTABLE_H */
index 5173cee..a7c3eae 100644 (file)
 #include <asm/iSeries/iSeries_pci.h>
 #include "pci.h"
 
-/*
- * Size of Bus VPD data
- */
+/************************************************/
+/* Size of Bus VPD data                         */
+/************************************************/
 #define BUS_VPDSIZE      1024
-/*
- * Bus Vpd Tags
- */
+/************************************************/
+/* Bus Vpd Tags                                 */
+/************************************************/
 #define  VpdEndOfDataTag   0x78
 #define  VpdEndOfAreaTag   0x79
 #define  VpdIdStringTag    0x82
 #define  VpdVendorAreaTag  0x84
-/*
- * Mfg Area Tags
- */
+/************************************************/
+/* Mfg Area Tags                                */
+/************************************************/
 #define  VpdFruFlag       0x4647     // "FG"
 #define  VpdFruFrameId    0x4649     // "FI"
 #define  VpdSlotMapFormat 0x4D46     // "MF"
@@ -59,9 +59,9 @@
 #define  VpdFruSerial     0x534E     // "SN"
 #define  VpdSlotMap       0x534D     // "SM"
 
-/*
- * Structures of the areas
- */
+/************************************************/
+/* Structures of the areas                      */
+/************************************************/
 struct MfgVpdAreaStruct {
        u16 Tag;
        u8  TagLength;
@@ -82,172 +82,168 @@ struct SlotMapStruct {
 typedef struct SlotMapStruct SlotMap;
 #define SLOT_ENTRY_SIZE   16
 
-/*
- * Bus, Card, Board, FrameId, CardLocation.
- */
-LocationData* iSeries_GetLocationData(struct pci_dev *PciDev)
+/****************************************************************
+ *                                                              *
+ * Bus, Card, Board, FrameId, CardLocation.                     *
+ ****************************************************************/
+LocationData* iSeries_GetLocationData(struct pci_dev* PciDev)
 {
-       struct iSeries_Device_Node *DevNode =
-               (struct iSeries_Device_Node *)PciDev->sysdata;
-       LocationData *LocationPtr =
-               (LocationData *)kmalloc(LOCATION_DATA_SIZE, GFP_KERNEL);
-
+       struct iSeries_Device_Node* DevNode = (struct iSeries_Device_Node*)PciDev->sysdata;
+       LocationData* LocationPtr = (LocationData*)kmalloc(LOCATION_DATA_SIZE, GFP_KERNEL);
        if (LocationPtr == NULL) {
                printk("PCI: LocationData area allocation failed!\n");
                return NULL;
        }
-       memset(LocationPtr, 0, LOCATION_DATA_SIZE);
-       LocationPtr->Bus = ISERIES_BUS(DevNode);
-       LocationPtr->Board = DevNode->Board;
-       LocationPtr->FrameId = DevNode->FrameId;
-       LocationPtr->Card = PCI_SLOT(DevNode->DevFn);
-       strcpy(&LocationPtr->CardLocation[0], &DevNode->CardLocation[0]);
+       memset(LocationPtr,0,LOCATION_DATA_SIZE);
+       LocationPtr->Bus              = ISERIES_BUS(DevNode);
+       LocationPtr->Board            = DevNode->Board;
+       LocationPtr->FrameId          = DevNode->FrameId;
+       LocationPtr->Card             = PCI_SLOT(DevNode->DevFn);
+       strcpy(&LocationPtr->CardLocation[0],&DevNode->CardLocation[0]);
        return LocationPtr;
 }
 
-/*
- * Formats the device information.
- * - Pass in pci_dev* pointer to the device.
- * - Pass in buffer to place the data.  Danger here is the buffer must
- *   be as big as the client says it is.   Should be at least 128 bytes.
- * Return will the length of the string data put in the buffer.
- * Format:
- * PCI: Bus  0, Device 26, Vendor 0x12AE  Frame  1, Card  C10  Ethernet
- * controller
- */
-int iSeries_Device_Information(struct pci_dev *PciDev, char *buffer,
-               int BufferSize)
+/************************************************************************/
+/* Formats the device information.                                      */
+/* - Pass in pci_dev* pointer to the device.                            */
+/* - Pass in buffer to place the data.  Danger here is the buffer must  */
+/*   be as big as the client says it is.   Should be at least 128 bytes.*/
+/* Return will the length of the string data put in the buffer.         */
+/* Format:                                                              */
+/* PCI: Bus  0, Device 26, Vendor 0x12AE  Frame  1, Card  C10  Ethernet */
+/* controller                                                           */
+/************************************************************************/
+int  iSeries_Device_Information(struct pci_dev* PciDev,char* Buffer, int BufferSize)
 {
-       struct iSeries_Device_Node *DevNode =
-               (struct iSeries_Device_Node *)PciDev->sysdata;
-       int len;
+       struct iSeries_Device_Node* DevNode = (struct iSeries_Device_Node*)PciDev->sysdata;
+       char*          BufPtr  = Buffer;
+       int            LineLen = 0;
 
-       if (DevNode == NULL)
-               return sprintf(buffer,
-                               "PCI: iSeries_Device_Information DevNode is NULL");
+       if (DevNode == NULL) {
+               LineLen = sprintf(BufPtr+LineLen, "PCI: iSeries_Device_Information DevNode is NULL");
+               return LineLen;
+       }
 
-       if (BufferSize < 128)
-               return 0;
+       if (BufferSize >= 128) {
+               LineLen =  sprintf(BufPtr+LineLen,"PCI: Bus%3d, Device%3d, Vendor %04X ",
+                                  ISERIES_BUS(DevNode), PCI_SLOT(PciDev->devfn),PciDev->vendor);
 
-       len = sprintf(buffer, "PCI: Bus%3d, Device%3d, Vendor %04X ",
-                       ISERIES_BUS(DevNode), PCI_SLOT(PciDev->devfn),
-                       PciDev->vendor);
-       len += sprintf(buffer + len, "Frame%3d, Card %4s  ",
-                       DevNode->FrameId, DevNode->CardLocation);
-#ifdef CONFIG_PCI
-       if (pci_class_name(PciDev->class >> 8) == 0)
-               len += sprintf(buffer + len, "0x%04X  ",
-                               (int)(PciDev->class >> 8));
-       else
-               len += sprintf(buffer + len, "%s",
-                               pci_class_name(PciDev->class >> 8));
-#endif
-       return len;
-}
+               LineLen += sprintf(BufPtr+LineLen,"Frame%3d, Card %4s  ", DevNode->FrameId,DevNode->CardLocation);
 
-/*
- * Build a character string of the device location, Frame  1, Card  C10
- */
-int device_Location(struct pci_dev *PciDev, char *BufPtr)
+               if (pci_class_name(PciDev->class >> 8) == 0) {
+                       LineLen += sprintf(BufPtr+LineLen,"0x%04X  ",(int)(PciDev->class >> 8));
+               }
+               else {
+                       LineLen += sprintf(BufPtr+LineLen,"%s",pci_class_name(PciDev->class >> 8) );
+               }
+       }
+       return LineLen;
+}
+/************************************************************************/
+/* Build a character string of the device location, Frame  1, Card  C10 */
+/************************************************************************/
+int   device_Location(struct pci_dev* PciDev,char* BufPtr)
 {
-       struct iSeries_Device_Node *DevNode =
-               (struct iSeries_Device_Node *)PciDev->sysdata;
-       return sprintf(BufPtr, "PCI: Bus%3d, AgentId%3d, Vendor %04X, Location %s",
-                      DevNode->DsaAddr.Dsa.busNumber, DevNode->AgentId,
-                      DevNode->Vendor, DevNode->Location);
+       struct iSeries_Device_Node* DevNode = (struct iSeries_Device_Node*)PciDev->sysdata;
+       return sprintf(BufPtr,"PCI: Bus%3d, AgentId%3d, Vendor %04X, Location %s",
+                      DevNode->DsaAddr.busNumber,
+                      DevNode->AgentId,
+                      DevNode->Vendor,
+                      DevNode->Location);
 }
 
-/*
- * Parse the Slot Area
- */
-void iSeries_Parse_SlotArea(SlotMap *MapPtr, int MapLen,
-               struct iSeries_Device_Node *DevNode)
+/*****************************************************************/
+/* Parse the Slot Area                                           */
+/*****************************************************************/
+void  iSeries_Parse_SlotArea(SlotMap* MapPtr,int MapLen, struct iSeries_Device_Node* DevNode)
 {
-       int SlotMapLen = MapLen;
-       SlotMap *SlotMapPtr = MapPtr;
-
-       /*
-        * Parse Slot label until we find the one requrested
-        */
+       int      SlotMapLen = MapLen;
+       SlotMap* SlotMapPtr = MapPtr;
+       /*************************************************************/
+       /* Parse Slot label until we find the one requrested         */
+       /*************************************************************/
        while (SlotMapLen > 0) {
                if (SlotMapPtr->AgentId == DevNode->AgentId ) {
-                       /*
-                        * If Phb wasn't found, grab the entry first one found.
-                        */
-                       if (DevNode->PhbId == 0xff)
+                       /*******************************************************/
+                       /* If Phb wasn't found, grab the entry first one found.*/ 
+                       /*******************************************************/
+                       if (DevNode->PhbId == 0xff) {
                                DevNode->PhbId = SlotMapPtr->PhbId; 
-                       /* Found it, extract the data. */
+                       }
+                       /**************************************************/
+                       /* Found it, extract the data.                    */
+                       /**************************************************/
                        if (SlotMapPtr->PhbId == DevNode->PhbId ) {
-                               memcpy(&DevNode->CardLocation,
-                                               &SlotMapPtr->CardLocation, 3);
+                               memcpy(&DevNode->CardLocation,&SlotMapPtr->CardLocation,3);
                                DevNode->CardLocation[3]  = 0;
                                break;
                        }
                }
-               /* Point to the next Slot */
-               SlotMapPtr = (SlotMap *)((char *)SlotMapPtr + SLOT_ENTRY_SIZE);
+               /*********************************************************/
+               /* Point to the next Slot                                */
+               /*********************************************************/
+               SlotMapPtr = (SlotMap*)((char*)SlotMapPtr+SLOT_ENTRY_SIZE);
                SlotMapLen -= SLOT_ENTRY_SIZE;
        }
 }
 
-/*
- * Parse the Mfg Area
- */
-static void iSeries_Parse_MfgArea(u8 *AreaData, int AreaLen,
-               struct iSeries_Device_Node *DevNode)
+/*****************************************************************/
+/* Parse the Mfg Area                                            */
+/*****************************************************************/
+static void  iSeries_Parse_MfgArea(u8* AreaData,int AreaLen, struct iSeries_Device_Node* DevNode)
 {
-       MfgArea *MfgAreaPtr = (MfgArea *)AreaData;
-       int MfgAreaLen = AreaLen;
-       u16 SlotMapFmt = 0;
+       MfgArea* MfgAreaPtr = (MfgArea*)AreaData;
+       int      MfgAreaLen = AreaLen;
+       u16      SlotMapFmt = 0;
 
-       /* Parse Mfg Data */
+       /*************************************************************/
+       /* Parse Mfg Data                                            */
+       /*************************************************************/
        while (MfgAreaLen > 0) {
-               int MfgTagLen = MfgAreaPtr->TagLength;
-               /* Frame ID         (FI 4649020310 ) */
-               if (MfgAreaPtr->Tag == VpdFruFrameId)           /* FI  */
+               int MfgTagLen  = MfgAreaPtr->TagLength;
+               /*******************************************************/
+               /* Frame ID         (FI 4649020310 )                   */
+               /*******************************************************/
+               if (MfgAreaPtr->Tag == VpdFruFrameId) {     /* FI  */
                        DevNode->FrameId = MfgAreaPtr->AreaData1;
-               /* Slot Map Format  (MF 4D46020004 ) */
-               else if (MfgAreaPtr->Tag == VpdSlotMapFormat)   /* MF  */
-                       SlotMapFmt = (MfgAreaPtr->AreaData1 * 256)
-                               + MfgAreaPtr->AreaData2;
-               /* Slot Map         (SM 534D90 */
-               else if (MfgAreaPtr->Tag == VpdSlotMap) {       /* SM  */
-                       SlotMap *SlotMapPtr;
-
-                       if (SlotMapFmt == 0x1004)
-                               SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr
-                                               + MFG_ENTRY_SIZE + 1);
-                       else
-                               SlotMapPtr = (SlotMap *)((char *)MfgAreaPtr
-                                               + MFG_ENTRY_SIZE);
-                       iSeries_Parse_SlotArea(SlotMapPtr, MfgTagLen, DevNode);
                }
-               /*
-                * Point to the next Mfg Area
-                * Use defined size, sizeof give wrong answer
-                */
-               MfgAreaPtr = (MfgArea *)((char *)MfgAreaPtr + MfgTagLen
-                               + MFG_ENTRY_SIZE);
+               /*******************************************************/
+               /* Slot Map Format  (MF 4D46020004 )                   */
+               /*******************************************************/
+               else if (MfgAreaPtr->Tag == VpdSlotMapFormat){   /* MF  */
+                       SlotMapFmt = (MfgAreaPtr->AreaData1*256)+(MfgAreaPtr->AreaData2);
+               }
+               /*******************************************************/
+               /* Slot Map         (SM 534D90                         */
+               /*******************************************************/
+               else if (MfgAreaPtr->Tag == VpdSlotMap){         /* SM  */
+                       SlotMap*  SlotMapPtr;
+                       if (SlotMapFmt == 0x1004) SlotMapPtr = (SlotMap*)((char*)MfgAreaPtr+MFG_ENTRY_SIZE+1);
+                       else                     SlotMapPtr = (SlotMap*)((char*)MfgAreaPtr+MFG_ENTRY_SIZE);
+                       iSeries_Parse_SlotArea(SlotMapPtr,MfgTagLen, DevNode);
+               }
+               /*********************************************************/
+               /* Point to the next Mfg Area                            */
+               /* Use defined size, sizeof give wrong answer            */
+               /*********************************************************/
+               MfgAreaPtr = (MfgArea*)((char*)MfgAreaPtr + MfgTagLen + MFG_ENTRY_SIZE);
                MfgAreaLen -= (MfgTagLen + MFG_ENTRY_SIZE); 
        }       
 }
 
-/*
- * Look for "BUS".. Data is not Null terminated.
- * PHBID of 0xFF indicates PHB was not found in VPD Data.
- */
-static int iSeries_Parse_PhbId(u8 *AreaPtr, int AreaLength)
+/*****************************************************************/
+/* Look for "BUS".. Data is not Null terminated.                 */
+/* PHBID of 0xFF indicates PHB was not found in VPD Data.        */    
+/*****************************************************************/
+static int iSeries_Parse_PhbId(u8* AreaPtr,int AreaLength)
 {
-       u8 *PhbPtr = AreaPtr;
-       int DataLen = AreaLength;
-       char PhbId = 0xFF;                   
-
+       u8*  PhbPtr  = AreaPtr;
+       int  DataLen = AreaLength;
+       char PhbId   = 0xFF;                   
        while (DataLen > 0) {
-               if ((*PhbPtr == 'B') && (*(PhbPtr + 1) == 'U')
-                               && (*(PhbPtr + 2) == 'S')) {
+               if (*PhbPtr == 'B' && *(PhbPtr+1) == 'U' && *(PhbPtr+2) == 'S') {
                        PhbPtr += 3;
-                       while (*PhbPtr == ' ')
-                               ++PhbPtr;
+                       while(*PhbPtr == ' ') ++PhbPtr;
                        PhbId = (*PhbPtr & 0x0F);
                        break;
                }
@@ -257,54 +253,64 @@ static int iSeries_Parse_PhbId(u8 *AreaPtr, int AreaLength)
        return PhbId;
 }
 
-/*
- * Parse out the VPD Areas
- */
-static void iSeries_Parse_Vpd(u8 *VpdData, int VpdDataLen,
-               struct iSeries_Device_Node *DevNode)
+/****************************************************************/
+/* Parse out the VPD Areas                                      */
+/****************************************************************/
+static void  iSeries_Parse_Vpd(u8* VpdData, int VpdDataLen, struct iSeries_Device_Node* DevNode)
 {
-       u8 *TagPtr = VpdData;
-       int DataLen = VpdDataLen - 3;
-
-       while ((*TagPtr != VpdEndOfAreaTag) && (DataLen > 0)) {
-               int AreaLen = *(TagPtr + 1) + (*(TagPtr + 2) * 256);    
-               u8 *AreaData  = TagPtr + 3;
+       u8*  TagPtr  = VpdData;
+       int  DataLen = VpdDataLen-3;
+       /*************************************************************/
+       /* Parse the Areas                                           */
+       /*************************************************************/
+       while (*TagPtr != VpdEndOfAreaTag && DataLen > 0) {
+               int  AreaLen   = *(TagPtr+1) + (*(TagPtr+2)*256);       
+               u8*  AreaData  = TagPtr+3;
 
-               if (*TagPtr == VpdIdStringTag)
-                       DevNode->PhbId = iSeries_Parse_PhbId(AreaData, AreaLen);
-               else if (*TagPtr == VpdVendorAreaTag)
-                       iSeries_Parse_MfgArea(AreaData, AreaLen, DevNode);
-               /* Point to next Area. */
+               if (*TagPtr == VpdIdStringTag) {
+                       DevNode->PhbId = iSeries_Parse_PhbId(AreaData,AreaLen);
+               }
+               else if (*TagPtr == VpdVendorAreaTag) {
+                       iSeries_Parse_MfgArea(AreaData,AreaLen,DevNode);
+               }
+               /*********************************************************
+                * Point to next Area.
+                *********************************************************/
                TagPtr  = AreaData + AreaLen;
                DataLen -= AreaLen;
        }
 }    
 
-void iSeries_Get_Location_Code(struct iSeries_Device_Node *DevNode)
+/****************************************************************
+ *  iSeries_Get_Location_Code(struct iSeries_Device_Node*)      *
+ *
+ ****************************************************************/
+void  iSeries_Get_Location_Code(struct iSeries_Device_Node* DevNode)
 {
-       int BusVpdLen = 0;
-       u8 *BusVpdPtr = (u8 *)kmalloc(BUS_VPDSIZE, GFP_KERNEL);
-
+       int  BusVpdLen = 0;
+       u8*  BusVpdPtr = (u8*)kmalloc(BUS_VPDSIZE, GFP_KERNEL);
        if (BusVpdPtr == NULL) {
                printk("PCI: Bus VPD Buffer allocation failure.\n");
                return;
        }
-       BusVpdLen = HvCallPci_getBusVpd(ISERIES_BUS(DevNode),
-                       REALADDR(BusVpdPtr), BUS_VPDSIZE);
+       BusVpdLen  = HvCallPci_getBusVpd(ISERIES_BUS(DevNode),REALADDR(BusVpdPtr),BUS_VPDSIZE);
        if (BusVpdLen == 0) {
                kfree(BusVpdPtr);
                printk("PCI: Bus VPD Buffer zero length.\n");
                return;
        }
-       /* printk("PCI: BusVpdPtr: %p, %d\n",BusVpdPtr, BusVpdLen); */
-       /* Make sure this is what I think it is */
-       if (*BusVpdPtr != VpdIdStringTag) {     /* 0x82 */
+       //printk("PCI: BusVpdPtr: %p, %d\n",BusVpdPtr, BusVpdLen);
+       /*************************************************************/
+       /* Make sure this is what I think it is                      */
+       /*************************************************************/
+       if (*BusVpdPtr != VpdIdStringTag) {               /*0x82     */
                printk("PCI: Bus VPD Buffer missing starting tag.\n");
                kfree(BusVpdPtr);
                return;
        }
+       /***************************************************************/
+       /***************************************************************/
        iSeries_Parse_Vpd(BusVpdPtr,BusVpdLen, DevNode);
-       sprintf(DevNode->Location, "Frame%3d, Card %-4s", DevNode->FrameId,
-                       DevNode->CardLocation);
+       sprintf(DevNode->Location,"Frame%3d, Card %-4s",DevNode->FrameId,DevNode->CardLocation);
        kfree(BusVpdPtr);
 }
diff --git a/arch/ppc64/kernel/iSeries_htab.c b/arch/ppc64/kernel/iSeries_htab.c
deleted file mode 100644 (file)
index e04e3d8..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-/*
- * iSeries hashtable management.
- *     Derived from pSeries_htab.c
- *
- * SMP scalability work:
- *    Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-#include <asm/machdep.h>
-#include <asm/pgtable.h>
-#include <asm/mmu.h>
-#include <asm/mmu_context.h>
-#include <asm/iSeries/HvCallHpt.h>
-#include <asm/abs_addr.h>
-
-#if 0
-#include <linux/spinlock.h>
-#include <linux/bitops.h>
-#include <linux/threads.h>
-#include <linux/smp.h>
-
-#include <asm/tlbflush.h>
-#include <asm/tlb.h>
-#include <asm/cputable.h>
-#endif
-
-static long iSeries_hpte_insert(unsigned long hpte_group, unsigned long va,
-                        unsigned long prpn, int secondary,
-                        unsigned long hpteflags, int bolted, int large)
-{
-       long slot;
-       HPTE lhpte;
-
-       /*
-        * The hypervisor tries both primary and secondary.
-        * If we are being called to insert in the secondary,
-        * it means we have already tried both primary and secondary,
-        * so we return failure immediately.
-        */
-       if (secondary)
-               return -1;
-
-       slot = HvCallHpt_findValid(&lhpte, va >> PAGE_SHIFT);
-       if (lhpte.dw0.dw0.v)
-               panic("select_hpte_slot found entry already valid\n");
-
-       if (slot == -1) /* No available entry found in either group */
-               return -1;
-
-       if (slot < 0) {         /* MSB set means secondary group */
-               secondary = 1;
-               slot &= 0x7fffffffffffffff;
-       }
-
-       lhpte.dw1.dword1      = 0;
-       lhpte.dw1.dw1.rpn     = physRpn_to_absRpn(prpn);
-       lhpte.dw1.flags.flags = hpteflags;
-
-       lhpte.dw0.dword0      = 0;
-       lhpte.dw0.dw0.avpn    = va >> 23;
-       lhpte.dw0.dw0.h       = secondary;
-       lhpte.dw0.dw0.bolted  = bolted;
-       lhpte.dw0.dw0.v       = 1;
-
-       /* Now fill in the actual HPTE */
-       HvCallHpt_addValidate(slot, secondary, &lhpte);
-
-       return (secondary << 3) | (slot & 7);
-}
-
-static unsigned long iSeries_hpte_getword0(unsigned long slot)
-{
-       unsigned long dword0;
-       HPTE hpte;
-
-       HvCallHpt_get(&hpte, slot);
-       dword0 = hpte.dw0.dword0;
-
-       return dword0;
-}
-
-static long iSeries_hpte_remove(unsigned long hpte_group)
-{
-       unsigned long slot_offset;
-       int i;
-       HPTE lhpte;
-
-       /* Pick a random slot to start at */
-       slot_offset = mftb() & 0x7;
-
-       for (i = 0; i < HPTES_PER_GROUP; i++) {
-               lhpte.dw0.dword0 = 
-                       iSeries_hpte_getword0(hpte_group + slot_offset);
-
-               if (!lhpte.dw0.dw0.bolted) {
-                       HvCallHpt_invalidateSetSwBitsGet(hpte_group + 
-                                                        slot_offset, 0, 0);
-                       return i;
-               }
-
-               slot_offset++;
-               slot_offset &= 0x7;
-       }
-
-       return -1;
-}
-
-static long iSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
-                                 unsigned long va, int large, int local)
-{
-       HPTE hpte;
-       unsigned long avpn = va >> 23;
-
-       HvCallHpt_get(&hpte, slot);
-       if ((hpte.dw0.dw0.avpn == avpn) && (hpte.dw0.dw0.v)) {
-               HvCallHpt_setPp(slot, newpp);
-               return 0;
-       }
-       return -1;
-}
-
-/*
- * Functions used to find the PTE for a particular virtual address. 
- * Only used during boot when bolting pages.
- *
- * Input : vpn      : virtual page number
- * Output: PTE index within the page table of the entry
- *         -1 on failure
- */
-static long iSeries_hpte_find(unsigned long vpn)
-{
-       HPTE hpte;
-       long slot;
-
-       /*
-        * The HvCallHpt_findValid interface is as follows:
-        * 0xffffffffffffffff : No entry found.
-        * 0x00000000xxxxxxxx : Entry found in primary group, slot x
-        * 0x80000000xxxxxxxx : Entry found in secondary group, slot x
-        */
-       slot = HvCallHpt_findValid(&hpte, vpn); 
-       if (hpte.dw0.dw0.v) {
-               if (slot < 0) {
-                       slot &= 0x7fffffffffffffff;
-                       slot = -slot;
-               }
-       } else
-               slot = -1;
-       return slot;
-}
-
-/*
- * Update the page protection bits. Intended to be used to create
- * guard pages for kernel data structures on pages which are bolted
- * in the HPT. Assumes pages being operated on will not be stolen.
- * Does not work on large pages.
- *
- * No need to lock here because we should be the only user.
- */
-static void iSeries_hpte_updateboltedpp(unsigned long newpp, unsigned long ea)
-{
-       unsigned long vsid,va,vpn;
-       long slot;
-
-       vsid = get_kernel_vsid(ea);
-       va = (vsid << 28) | (ea & 0x0fffffff);
-       vpn = va >> PAGE_SHIFT;
-       slot = iSeries_hpte_find(vpn); 
-       if (slot == -1)
-               panic("updateboltedpp: Could not find page to bolt\n");
-       HvCallHpt_setPp(slot, newpp);
-}
-
-static void iSeries_hpte_invalidate(unsigned long slot, unsigned long va,
-                                   int large, int local)
-{
-       HPTE lhpte;
-       unsigned long avpn = va >> 23;
-
-       lhpte.dw0.dword0 = iSeries_hpte_getword0(slot);
-       
-       if ((lhpte.dw0.dw0.avpn == avpn) && lhpte.dw0.dw0.v)
-               HvCallHpt_invalidateSetSwBitsGet(slot, 0, 0);
-}
-
-void hpte_init_iSeries(void)
-{
-       ppc_md.hpte_invalidate  = iSeries_hpte_invalidate;
-       ppc_md.hpte_updatepp    = iSeries_hpte_updatepp;
-       ppc_md.hpte_updateboltedpp = iSeries_hpte_updateboltedpp;
-       ppc_md.hpte_insert      = iSeries_hpte_insert;
-       ppc_md.hpte_remove      = iSeries_hpte_remove;
-}
index b0ef150..2b2b8b5 100644 (file)
 #include <asm/iSeries/iSeries_irq.h>
 #include <asm/iSeries/XmPciLpEvent.h>
 
-static unsigned int iSeries_startup_IRQ(unsigned int irq);
-static void iSeries_shutdown_IRQ(unsigned int irq);
-static void iSeries_enable_IRQ(unsigned int irq);
-static void iSeries_disable_IRQ(unsigned int irq);
-static void iSeries_end_IRQ(unsigned int irq);
-
-static hw_irq_controller iSeries_IRQ_handler = {
-       .typename = "iSeries irq controller",
-       .startup = iSeries_startup_IRQ,
-       .shutdown = iSeries_shutdown_IRQ,
-       .enable = iSeries_enable_IRQ,
-       .disable = iSeries_disable_IRQ,
-       .end = iSeries_end_IRQ
+
+hw_irq_controller iSeries_IRQ_handler = {
+       "iSeries irq controller",
+       iSeries_startup_IRQ,    /* startup */
+       iSeries_shutdown_IRQ,   /* shutdown */
+       iSeries_enable_IRQ,     /* enable */
+       iSeries_disable_IRQ,    /* disable */
+       NULL,                   /* ack  */
+       iSeries_end_IRQ,        /* end  */
+       NULL                    /* set_affinity */
 };
 
-void iSeries_init_irq_desc(irq_desc_t *desc)
-{
-}
 
-/* This is called by init_IRQ.  set in ppc_md.init_IRQ by iSeries_setup.c */
+struct iSeries_irqEntry {
+       u32 dsa;
+       struct iSeries_irqEntry* next;
+};
+
+struct iSeries_irqAnchor {
+       u8  valid : 1;
+       u8  reserved : 7;
+       u16  entryCount;
+       struct iSeries_irqEntry* head;
+};
+
+struct iSeries_irqAnchor iSeries_irqMap[NR_IRQS];
+
+void iSeries_init_irqMap(int irq);
+
+/*  This is called by init_IRQ.  set in ppc_md.init_IRQ by iSeries_setup.c */
 void __init iSeries_init_IRQ(void)
 {
+       int i;
+       for (i = 0; i < NR_IRQS; i++) {
+               irq_desc[i].handler = &iSeries_IRQ_handler;
+               irq_desc[i].status = 0;
+               irq_desc[i].status |= IRQ_DISABLED;
+               irq_desc[i].depth = 1;
+               iSeries_init_irqMap(i);
+       }
        /* Register PCI event handler and open an event path */
-       PPCDBG(PPCDBG_BUSWALK,
-                       "Register PCI event handler and open an event path\n");
+       PPCDBG(PPCDBG_BUSWALK,"Register PCI event handler and open an event path\n");
        XmPciLpEvent_init();
        return;
 }
 
-/*
- * This is called out of iSeries_scan_slot to allocate an IRQ for an EADS slot
- * It calculates the irq value for the slot.
- * Note that subBusNumber is always 0 (at the moment at least).
- */
-int __init iSeries_allocate_IRQ(HvBusNumber busNumber,
-               HvSubBusNumber subBusNumber, HvAgentId deviceId)
+/**********************************************************************
+ *  Called by iSeries_init_IRQ 
+ * Prevent IRQs 0 and 255 from being used.  IRQ 0 appears in
+ * uninitialized devices.  IRQ 255 appears in the PCI interrupt
+ * line register if a PCI error occurs,
+ *********************************************************************/
+void __init iSeries_init_irqMap(int irq)
 {
-       u8 idsel = (deviceId >> 4);
-       u8 function = deviceId & 7;
-
-       return ((busNumber - 1) << 6) + ((idsel - 1) << 3) + function + 1;
+       iSeries_irqMap[irq].valid = (irq == 0 || irq == 255)? 0 : 1;
+       iSeries_irqMap[irq].entryCount = 0;
+       iSeries_irqMap[irq].head = NULL;
 }
 
-#define IRQ_TO_BUS(irq)                (((((irq) - 1) >> 6) & 0xff) + 1)
-#define IRQ_TO_IDSEL(irq)      (((((irq) - 1) >> 3) & 7) + 1)
-#define IRQ_TO_FUNC(irq)       (((irq) - 1) & 7)
+/* This is called out of iSeries_scan_slot to allocate an IRQ for an EADS slot */
+/* It calculates the irq value for the slot.                                   */
+int __init iSeries_allocate_IRQ(HvBusNumber busNumber, HvSubBusNumber subBusNumber, HvAgentId deviceId)
+{
+       u8 idsel = (deviceId >> 4);
+       u8 function = deviceId & 0x0F;
+       int irq = ((((busNumber-1)*16 + (idsel-1)*8 + function)*9/8) % 253) + 2;
+       return irq;
+}
 
-/*
- * This is called out of iSeries_scan_slot to assign the EADS slot
- * to its IRQ number
- */
-int __init iSeries_assign_IRQ(int irq, HvBusNumber busNumber,
-               HvSubBusNumber subBusNumber, HvAgentId deviceId)
+/* This is called out of iSeries_scan_slot to assign the EADS slot to its IRQ number */
+int __init iSeries_assign_IRQ(int irq, HvBusNumber busNumber, HvSubBusNumber subBusNumber, HvAgentId deviceId)
 {
-       irq_desc_t *desc = get_real_irq_desc(irq);
+       int rc;
+       u32 dsa = (busNumber << 16) | (subBusNumber << 8) | deviceId;
+       struct iSeries_irqEntry* newEntry;
+       unsigned long flags;
 
-       if (desc == NULL)
+       if (irq < 0 || irq >= NR_IRQS) {
                return -1;
-       desc->handler = &iSeries_IRQ_handler;
-       return 0;
+       }
+       newEntry = kmalloc(sizeof(*newEntry), GFP_KERNEL);
+       if (newEntry == NULL) {
+               return -ENOMEM;
+       }
+       newEntry->dsa  = dsa;
+       newEntry->next = NULL;
+       /********************************************************************
+       * Probably not necessary to lock the irq since allocation is only 
+       * done during buswalk, but it should not hurt anything except a 
+       * little performance to be smp safe.
+       *******************************************************************/
+       spin_lock_irqsave(&irq_desc[irq].lock, flags);
+
+       if (iSeries_irqMap[irq].valid) {
+               /* Push the new element onto the irq stack */
+               newEntry->next = iSeries_irqMap[irq].head;
+               iSeries_irqMap[irq].head = newEntry;
+               ++iSeries_irqMap[irq].entryCount;
+               rc = 0;
+               PPCDBG(PPCDBG_BUSWALK,"iSeries_assign_IRQ   0x%04X.%02X.%02X = 0x%04X\n",busNumber, subBusNumber, deviceId, irq);
+       }
+       else {
+               printk("PCI: Something is wrong with the iSeries_irqMap. \n");
+               kfree(newEntry);
+               rc = -1;
+    }
+       spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
+       return rc;
 }
 
 
 /* This is called by iSeries_activate_IRQs */
-static unsigned int iSeries_startup_IRQ(unsigned int irq)
+unsigned int iSeries_startup_IRQ(unsigned int irq)
 {
-       u32 bus, deviceId, function, mask;
-       const u32 subBus = 0;
-
-       bus = IRQ_TO_BUS(irq);
-       function = IRQ_TO_FUNC(irq);
-       deviceId = (IRQ_TO_IDSEL(irq) << 4) + function;
-
-       /* Link the IRQ number to the bridge */
-       HvCallXm_connectBusUnit(bus, subBus, deviceId, irq);
-
-       /* Unmask bridge interrupts in the FISR */
-       mask = 0x01010000 << function;
-       HvCallPci_unmaskFisr(bus, subBus, deviceId, mask);
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_activate_IRQ 0x%02X.%02X.%02X  Irq:0x%02X\n",
-                               bus, subBus, deviceId, irq);
+       struct iSeries_irqEntry* entry;
+       u32 bus, subBus, deviceId, function, mask;
+       for(entry=iSeries_irqMap[irq].head; entry!=NULL; entry=entry->next) {
+               bus      = (entry->dsa >> 16) & 0xFFFF;
+               subBus   = (entry->dsa >> 8) & 0xFF;
+               deviceId = entry->dsa & 0xFF;
+               function = deviceId & 0x0F;
+               /* Link the IRQ number to the bridge */
+               HvCallXm_connectBusUnit(bus, subBus, deviceId, irq);
+               /* Unmask bridge interrupts in the FISR */
+               mask = 0x01010000 << function;
+               HvCallPci_unmaskFisr(bus, subBus, deviceId, mask);
+               PPCDBG(PPCDBG_BUSWALK,"iSeries_activate_IRQ 0x%02X.%02X.%02X  Irq:0x%02X\n",bus,subBus,deviceId,irq);
+       }
        return 0;
 }
 
-/*
- * This is called out of iSeries_fixup to activate interrupt
- * generation for usable slots
- */
+/* This is called out of iSeries_fixup to activate interrupt
+ * generation for usable slots                              */
 void __init iSeries_activate_IRQs()
 {
        int irq;
        unsigned long flags;
-
-       for_each_irq (irq) {
-               irq_desc_t *desc = get_irq_desc(irq);
-
-               if (desc && desc->handler && desc->handler->startup) {
-                       spin_lock_irqsave(&desc->lock, flags);
-                       desc->handler->startup(irq);
-                       spin_unlock_irqrestore(&desc->lock, flags);
-               }
+       for (irq=0; irq < NR_IRQS; irq++) {
+               spin_lock_irqsave(&irq_desc[irq].lock, flags);
+               irq_desc[irq].handler->startup(irq);
+               spin_unlock_irqrestore(&irq_desc[irq].lock, flags);
        }
 }
 
 /*  this is not called anywhere currently */
-static void iSeries_shutdown_IRQ(unsigned int irq)
-{
-       u32 bus, deviceId, function, mask;
-       const u32 subBus = 0;
+void iSeries_shutdown_IRQ(unsigned int irq) {
+       struct iSeries_irqEntry* entry;
+       u32 bus, subBus, deviceId, function, mask;
 
        /* irq should be locked by the caller */
-       bus = IRQ_TO_BUS(irq);
-       function = IRQ_TO_FUNC(irq);
-       deviceId = (IRQ_TO_IDSEL(irq) << 4) + function;
 
-       /* Invalidate the IRQ number in the bridge */
-       HvCallXm_connectBusUnit(bus, subBus, deviceId, 0);
+       for (entry=iSeries_irqMap[irq].head; entry; entry=entry->next) {
+               bus = (entry->dsa >> 16) & 0xFFFF;
+               subBus = (entry->dsa >> 8) & 0xFF;
+               deviceId = entry->dsa & 0xFF;
+               function = deviceId & 0x0F;
+               /* Invalidate the IRQ number in the bridge */
+               HvCallXm_connectBusUnit(bus, subBus, deviceId, 0);
+               /* Mask bridge interrupts in the FISR */
+               mask = 0x01010000 << function;
+               HvCallPci_maskFisr(bus, subBus, deviceId, mask);
+       }
 
-       /* Mask bridge interrupts in the FISR */
-       mask = 0x01010000 << function;
-       HvCallPci_maskFisr(bus, subBus, deviceId, mask);
 }
 
-/*
+/***********************************************************
  * This will be called by device drivers (via disable_IRQ)
  * to disable INTA in the bridge interrupt status register.
- */
-static void iSeries_disable_IRQ(unsigned int irq)
+ ***********************************************************/
+void iSeries_disable_IRQ(unsigned int irq)
 {
-       u32 bus, deviceId, function, mask;
-       const u32 subBus = 0;
+       struct iSeries_irqEntry* entry;
+       u32 bus, subBus, deviceId, mask;
 
        /* The IRQ has already been locked by the caller */
-       bus = IRQ_TO_BUS(irq);
-       function = IRQ_TO_FUNC(irq);
-       deviceId = (IRQ_TO_IDSEL(irq) << 4) + function;
-
-       /* Mask secondary INTA   */
-       mask = 0x80000000;
-       HvCallPci_maskInterrupts(bus, subBus, deviceId, mask);
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_disable_IRQ 0x%02X.%02X.%02X 0x%04X\n",
-              bus, subBus, deviceId, irq);
+
+       for (entry=iSeries_irqMap[irq].head; entry; entry=entry->next) {
+               bus      = (entry->dsa >> 16) & 0xFFFF;
+               subBus   = (entry->dsa >> 8) & 0xFF;
+               deviceId = entry->dsa & 0xFF;
+               /* Mask secondary INTA   */
+               mask = 0x80000000;
+               HvCallPci_maskInterrupts(bus, subBus, deviceId, mask);
+               PPCDBG(PPCDBG_BUSWALK,"iSeries_disable_IRQ 0x%02X.%02X.%02X 0x%04X\n",bus,subBus,deviceId,irq);
+       }
 }
 
-/*
+/***********************************************************
  * This will be called by device drivers (via enable_IRQ)
  * to enable INTA in the bridge interrupt status register.
- */
-static void iSeries_enable_IRQ(unsigned int irq)
+ ***********************************************************/
+void iSeries_enable_IRQ(unsigned int irq)
 {
-       u32 bus, deviceId, function, mask;
-       const u32 subBus = 0;
+       struct iSeries_irqEntry* entry;
+       u32 bus, subBus, deviceId, mask;
 
        /* The IRQ has already been locked by the caller */
-       bus = IRQ_TO_BUS(irq);
-       function = IRQ_TO_FUNC(irq);
-       deviceId = (IRQ_TO_IDSEL(irq) << 4) + function;
-
-       /* Unmask secondary INTA */
-       mask = 0x80000000;
-       HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask);
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_enable_IRQ 0x%02X.%02X.%02X 0x%04X\n",
-              bus, subBus, deviceId, irq);
+       for (entry=iSeries_irqMap[irq].head; entry; entry=entry->next) {
+               bus      = (entry->dsa >> 16) & 0xFFFF;
+               subBus   = (entry->dsa >> 8) & 0xFF;
+               deviceId = entry->dsa & 0xFF;
+               /* Unmask secondary INTA */
+               mask = 0x80000000;
+               HvCallPci_unmaskInterrupts(bus, subBus, deviceId, mask);
+               PPCDBG(PPCDBG_BUSWALK,"iSeries_enable_IRQ 0x%02X.%02X.%02X 0x%04X\n",bus,subBus,deviceId,irq);
+       }
 }
 
-/*
- * Need to define this so ppc_irq_dispatch_handler will NOT call
- * enable_IRQ at the end of interrupt handling.  However, this does
- * nothing because there is not enough information provided to do
- * the EOI HvCall.  This is done by XmPciLpEvent.c
- */
-static void iSeries_end_IRQ(unsigned int irq)
+/* Need to define this so ppc_irq_dispatch_handler will NOT call
+   enable_IRQ at the end of interrupt handling.  However, this
+   does nothing because there is not enough information provided
+   to do the EOI HvCall.  This is done by XmPciLpEvent.c */
+void iSeries_end_IRQ(unsigned int irq)
 {
 }
+
index 7e5ee28..5b48861 100644 (file)
@@ -1,4 +1,3 @@
-#define PCIFR(...)
 /*
  * iSeries_pci.c
  *
@@ -36,6 +35,7 @@
 #include <asm/pci-bridge.h>
 #include <asm/ppcdebug.h>
 #include <asm/naca.h>
+#include <asm/flight_recorder.h>
 #include <asm/pci_dma.h>
 
 #include <asm/iSeries/HvCallPci.h>
 #include "iSeries_IoMmTable.h"
 #include "pci.h"
 
-extern int panic_timeout;
+extern struct pci_controller* hose_head;
+extern struct pci_controller** hose_tail;
+extern int    global_phb_number;
+extern int    panic_timeout;
 
+extern struct device_node *allnodes;
 extern unsigned long iSeries_Base_Io_Memory;    
 
-extern struct TceTable *tceTables[256];
+extern struct pci_ops iSeries_pci_ops;
+extern struct flightRecorder* PciFr;
+extern struct TceTable* tceTables[256];
+
+/*******************************************************************
+ * Counters and control flags. 
+ *******************************************************************/
+extern long   Pci_Io_Read_Count;
+extern long   Pci_Io_Write_Count;
+extern long   Pci_Cfg_Read_Count;
+extern long   Pci_Cfg_Write_Count;
+extern long   Pci_Error_Count;
+
+extern int    Pci_Retry_Max;   
+extern int    Pci_Error_Flag;
+extern int    Pci_Trace_Flag;
 
 extern void iSeries_MmIoTest(void);
 
-/*
+
+/*******************************************************************
  * Forward declares of prototypes. 
- */
-static struct iSeries_Device_Node *find_Device_Node(int bus, int devfn);
-static void iSeries_Scan_PHBs_Slots(struct pci_controller *Phb);
-static void iSeries_Scan_EADs_Bridge(HvBusNumber Bus, HvSubBusNumber SubBus,
-               int IdSel);
-static int iSeries_Scan_Bridge_Slot(HvBusNumber Bus,
-               struct HvCallPci_BridgeInfo *Info);
+ *******************************************************************/
+struct iSeries_Device_Node* find_Device_Node(struct pci_dev* PciDev);
+struct iSeries_Device_Node* get_Device_Node(struct pci_dev* PciDev);
+
+unsigned long find_and_init_phbs(void);
+struct        pci_controller* alloc_phb(struct device_node *dev, char *model, unsigned int addr_size_words) ;
+
+void  iSeries_Scan_PHBs_Slots(struct pci_controller* Phb);
+void  iSeries_Scan_EADs_Bridge(HvBusNumber Bus, HvSubBusNumber SubBus, int IdSel);
+int   iSeries_Scan_Bridge_Slot(HvBusNumber Bus, struct HvCallPci_BridgeInfo* Info);
+void  list_device_nodes(void);
+
+struct pci_dev;
 
 LIST_HEAD(iSeries_Global_Device_List);
 
-static int DeviceCount;
+int DeviceCount = 0;
+
 
 /* Counters and control flags. */
-static long Pci_Io_Read_Count;
-static long Pci_Io_Write_Count;
-#if 0
-static long Pci_Cfg_Read_Count;
-static long Pci_Cfg_Write_Count;
-#endif
-static long Pci_Error_Count;
+static long   Pci_Io_Read_Count  = 0;
+static long   Pci_Io_Write_Count = 0;
+static long   Pci_Cfg_Read_Count = 0;
+static long   Pci_Cfg_Write_Count= 0;
+static long   Pci_Error_Count    = 0;
 
-static int Pci_Retry_Max = 3;  /* Only retry 3 times  */       
-static int Pci_Error_Flag = 1; /* Set Retry Error on. */
+static int    Pci_Retry_Max      = 3;  /* Only retry 3 times  */       
+static int    Pci_Error_Flag     = 1;  /* Set Retry Error on. */
+static int    Pci_Trace_Flag     = 0;
 
-static struct pci_ops iSeries_pci_ops;
 
-/*
+/**********************************************************************************
  * Log Error infor in Flight Recorder to system Console.
  * Filter out the device not there errors.
  * PCI: EADs Connect Failed 0x18.58.10 Rc: 0x00xx
  * PCI: Read Vendor Failed 0x18.58.10 Rc: 0x00xx
  * PCI: Connect Bus Unit Failed 0x18.58.10 Rc: 0x00xx
- */
-static void pci_Log_Error(char *Error_Text, int Bus, int SubBus,
-               int AgentId, int HvRc)
+ **********************************************************************************/
+void  pci_Log_Error(char* Error_Text, int Bus, int SubBus, int AgentId, int HvRc)
 {
-       if (HvRc == 0x0302)
-               return;
-
-       printk(KERN_ERR "PCI: %s Failed: 0x%02X.%02X.%02X Rc: 0x%04X",
-              Error_Text, Bus, SubBus, AgentId, HvRc);
+       if( HvRc != 0x0302) { 
+               char ErrorString[128];
+               sprintf(ErrorString,"%s Failed: 0x%02X.%02X.%02X Rc: 0x%04X",Error_Text,Bus,SubBus,AgentId,HvRc);
+               PCIFR(ErrorString);
+               printk("PCI: %s\n",ErrorString);
+       }
 }
 
-#if 0
-/*
+/**********************************************************************************
  * Dump the iSeries Temp Device Node 
- * <4>buswalk [swapper : - DeviceNode: 0xC000000000634300
- * <4>00. Device Node   = 0xC000000000634300
- * <4>    - PciDev      = 0x0000000000000000
- * <4>    - tDevice     = 0x  17:01.00  0x1022 00
- * <4>  4. Device Node = 0xC000000000634480
- * <4>     - PciDev    = 0x0000000000000000
- * <4>     - Device    = 0x  18:38.16 Irq:0xA7 Vendor:0x1014  Flags:0x00
- * <4>     - Devfn     = 0xB0: 22.18
- */
-void dumpDevice_Node(struct iSeries_Device_Node *DevNode)
+ *<4>buswalk [swapper : - DeviceNode: 0xC000000000634300
+ *<4>00. Device Node   = 0xC000000000634300
+ *<4>    - PciDev      = 0x0000000000000000
+ *<4>    - tDevice     = 0x  17:01.00  0x1022 00
+ *<4>  4. Device Node = 0xC000000000634480
+ *<4>     - PciDev    = 0x0000000000000000
+ *<4>     - Device    = 0x  18:38.16 Irq:0xA7 Vendor:0x1014  Flags:0x00
+ *<4>     - Devfn     = 0xB0: 22.18
+ **********************************************************************************/
+void dumpDevice_Node(struct iSeries_Device_Node* DevNode)
 {
-       udbg_printf("Device Node      = 0x%p\n", DevNode);
-       udbg_printf("     - PciDev    = 0x%p\n", DevNode->PciDev);
+       udbg_printf("Device Node      = 0x%p\n",DevNode);
+       udbg_printf("     - PciDev    = 0x%p\n",DevNode->PciDev);
        udbg_printf("     - Device    = 0x%4X:%02X.%02X (0x%02X)\n",
-                       ISERIES_BUS(DevNode), ISERIES_SUBBUS(DevNode),
-                       DevNode->AgentId, DevNode->DevFn);
-       udbg_printf("     - LSlot     = 0x%02X\n", DevNode->LogicalSlot);
-       udbg_printf("     - TceTable  = 0x%p\n  ", DevNode->DevTceTable);
-       udbg_printf("     - DSA       = 0x%04X\n", ISERIES_DSA(DevNode) >> 32);
+                   ISERIES_BUS(DevNode),
+                   ISERIES_SUBBUS(DevNode),
+                   DevNode->AgentId,
+                   DevNode->DevFn);
+       udbg_printf("     - LSlot     = 0x%02X\n",DevNode->LogicalSlot);
+       udbg_printf("     - TceTable  = 0x%p\n  ",DevNode->DevTceTable);
+
+       udbg_printf("     - DSA       = 0x%04X\n",ISERIES_DSA(DevNode)>>32 );
+
        udbg_printf("                 = Irq:0x%02X Vendor:0x%04X  Flags:0x%02X\n",
-                       DevNode->Irq, DevNode->Vendor, DevNode->Flags);
-       udbg_printf("     - Location  = %s\n", DevNode->CardLocation);
-}
+                   DevNode->Irq,
+                   DevNode->Vendor,
+                   DevNode->Flags );
+       udbg_printf("     - Location  = %s\n",DevNode->CardLocation);
 
-/*
+
+}
+/**********************************************************************************
  * Walk down the device node chain 
- */
-static void list_device_nodes(void)
+ **********************************************************************************/
+void  list_device_nodes(void)
 {
-       struct list_head *Device_Node_Ptr = iSeries_Global_Device_List.next;
-
-       while (Device_Node_Ptr != &iSeries_Global_Device_List) {
-               dumpDevice_Node((struct iSeries_Device_Node*)Device_Node_Ptr);
+       struct list_head* Device_Node_Ptr = iSeries_Global_Device_List.next;
+       while(Device_Node_Ptr != &iSeries_Global_Device_List) {
+               dumpDevice_Node( (struct iSeries_Device_Node*)Device_Node_Ptr );
                Device_Node_Ptr = Device_Node_Ptr->next;
        }
 }
-#endif
+       
 
-/*
+/***********************************************************************
  * build_device_node(u16 Bus, int SubBus, u8 DevFn)
- */
-static struct iSeries_Device_Node *build_device_node(HvBusNumber Bus,
-               HvSubBusNumber SubBus, int AgentId, int Function)
-{
-       struct iSeries_Device_Node *node;
-
-       PPCDBG(PPCDBG_BUSWALK,
-                       "-build_device_node 0x%02X.%02X.%02X Function: %02X\n",
-                       Bus, SubBus, AgentId, Function);
-
-       node = kmalloc(sizeof(struct iSeries_Device_Node), GFP_KERNEL);
-       if (node == NULL)
-               return NULL;
-
-       memset(node, 0, sizeof(struct iSeries_Device_Node));
-       list_add_tail(&node->Device_List, &iSeries_Global_Device_List);
-#if 0
-       node->DsaAddr = ((u64)Bus << 48) + ((u64)SubBus << 40) + ((u64)0x10 << 32);
-#endif
-       node->DsaAddr.DsaAddr = 0;
-       node->DsaAddr.Dsa.busNumber = Bus;
-       node->DsaAddr.Dsa.subBusNumber = SubBus;
-       node->DsaAddr.Dsa.deviceId = 0x10;
-       node->AgentId = AgentId;
-       node->DevFn = PCI_DEVFN(ISERIES_ENCODE_DEVICE(AgentId), Function);
-       node->IoRetry = 0;
-       iSeries_Get_Location_Code(node);
-       PCIFR("Device 0x%02X.%2X, Node:0x%p ", ISERIES_BUS(node),
-                       ISERIES_DEVFUN(node), node);
-       return node;
+ *
+ ***********************************************************************/
+struct iSeries_Device_Node* build_device_node(HvBusNumber Bus, HvSubBusNumber  SubBus, int AgentId, int Function)
+{
+       struct iSeries_Device_Node*  DeviceNode;
+
+       PPCDBG(PPCDBG_BUSWALK,"-build_device_node 0x%02X.%02X.%02X Function: %02X\n",Bus,SubBus,AgentId, Function);
+
+       DeviceNode = kmalloc(sizeof(struct iSeries_Device_Node), GFP_KERNEL);
+       if(DeviceNode == NULL) return NULL;
+
+       memset(DeviceNode,0,sizeof(struct iSeries_Device_Node) );
+       list_add_tail(&DeviceNode->Device_List,&iSeries_Global_Device_List);
+       /*DeviceNode->DsaAddr      = ((u64)Bus<<48)+((u64)SubBus<<40)+((u64)0x10<<32); */
+       ISERIES_BUS(DeviceNode)       = Bus;
+       ISERIES_SUBBUS(DeviceNode)    = SubBus;
+       DeviceNode->DsaAddr.deviceId  = 0x10;
+        DeviceNode->DsaAddr.barNumber = 0;
+       DeviceNode->AgentId           = AgentId;
+       DeviceNode->DevFn             = PCI_DEVFN(ISERIES_ENCODE_DEVICE(AgentId),Function );
+       DeviceNode->IoRetry           = 0;
+       iSeries_Get_Location_Code(DeviceNode);
+       PCIFR("Device 0x%02X.%2X, Node:0x%p ",ISERIES_BUS(DeviceNode),ISERIES_DEVFUN(DeviceNode),DeviceNode);
+       return DeviceNode;
+}
+/****************************************************************************
+* 
+* Allocate pci_controller(phb) initialized common variables. 
+* 
+*****************************************************************************/
+struct pci_controller* pci_alloc_pci_controllerX(char *model, enum phb_types controller_type)
+{
+       struct pci_controller *hose;
+       hose = (struct pci_controller*)kmalloc(sizeof(struct pci_controller), GFP_KERNEL);
+       if(hose == NULL) return NULL;
+
+       memset(hose, 0, sizeof(struct pci_controller));
+       if(strlen(model) < 8) strcpy(hose->what,model);
+       else                  memcpy(hose->what,model,7);
+       hose->type = controller_type;
+       hose->global_number = global_phb_number;
+       global_phb_number++;
+
+       *hose_tail = hose;
+       hose_tail = &hose->next;
+       return hose;
 }
 
-/*
- * unsigned long __init find_and_init_phbs(void)
+/****************************************************************************
+ *
+ * unsigned int __init find_and_init_phbs(void)
  *
  * Description:
  *   This function checks for all possible system PCI host bridges that connect
  *   PCI buses.  The system hypervisor is queried as to the guest partition
- *   ownership status.  A pci_controller is built for any bus which is partially
+ *   ownership status.  A pci_controller is build for any bus which is partially
  *   owned or fully owned by this guest partition.
- */
+ ****************************************************************************/
 unsigned long __init find_and_init_phbs(void)
 {
-       struct pci_controller *phb;
-       HvBusNumber bus;
+       struct      pci_controller* phb;
+       HvBusNumber BusNumber;
 
-       PPCDBG(PPCDBG_BUSWALK, "find_and_init_phbs Entry\n");
+       PPCDBG(PPCDBG_BUSWALK,"find_and_init_phbs Entry\n");
 
        /* Check all possible buses. */
-       for (bus = 0; bus < 256; bus++) {
-               int ret = HvCallXm_testBus(bus);
-               if (ret == 0) {
-                       printk("bus %d appears to exist\n", bus);
-                       phb = pci_alloc_pci_controller(phb_type_hypervisor);
-                       if (phb == NULL) {
-                               PCIFR("Allocate pci_controller failed.");
+       for (BusNumber = 0; BusNumber < 256; BusNumber++) {
+               int RtnCode = HvCallXm_testBus(BusNumber);
+               if (RtnCode == 0) {
+                       phb = pci_alloc_pci_controllerX("PHB HV", phb_type_hypervisor);
+                       if(phb == NULL) {
+                               printk("PCI: Allocate pci_controller failed.\n");
+                               PCIFR(      "Allocate pci_controller failed.");
                                return -1;
                        }
-                       phb->pci_mem_offset = phb->local_number = bus;
-                       phb->first_busno = bus;
-                       phb->last_busno = bus;
-                       phb->ops = &iSeries_pci_ops;
+                       phb->pci_mem_offset = phb->local_number = BusNumber;
+                       phb->first_busno  = BusNumber;
+                       phb->last_busno   = BusNumber;
+                       phb->ops          = &iSeries_pci_ops;
 
-                       PPCDBG(PPCDBG_BUSWALK, "PCI:Create iSeries pci_controller(%p), Bus: %04X\n",
-                                       phb, bus);
-                       PCIFR("Create iSeries PHB controller: %04X", bus);
+                       PPCDBG(PPCDBG_BUSWALK, "PCI:Create iSeries pci_controller(%p), Bus: %04X\n",phb,BusNumber);
+                       PCIFR("Create iSeries PHB controller: %04X",BusNumber);
 
-                       /* Find and connect the devices. */
+                       /***************************************************/
+                       /* Find and connect the devices.                   */
+                       /***************************************************/
                        iSeries_Scan_PHBs_Slots(phb);
                }
-               /*
-                * Check for Unexpected Return code, a clue that something
-                * has gone wrong.
-                */
-               else if (ret != 0x0301)
-                       printk(KERN_ERR "Unexpected Return on Probe(0x%04X): 0x%04X",
-                              bus, ret);
+               /* Check for Unexpected Return code, a clue that something */
+               /* has gone wrong.                                         */
+               else if(RtnCode != 0x0301) {
+                       PCIFR("Unexpected Return on Probe(0x%04X): 0x%04X",BusNumber,RtnCode);
+               }
+
        }
        return 0;
 }
-
-/*
+/*********************************************************************** 
  * iSeries_pcibios_init
  *  
  * Chance to initialize and structures or variable before PCI Bus walk.
- */
+ *  
+ *<4>buswalk [swapper : iSeries_pcibios_init Entry.
+ *<4>buswalk [swapper : IoMmTable Initialized 0xC00000000034BD30
+ *<4>buswalk [swapper : find_and_init_phbs Entry
+ *<4>buswalk [swapper : Create iSeries pci_controller:(0xC00000001F5C7000), Bus 0x0017
+ *<4>buswalk [swapper : Connect EADs: 0x17.00.12 = 0x00
+ *<4>buswalk [swapper : iSeries_assign_IRQ   0x0017.00.12 = 0x0091
+ *<4>buswalk [swapper : - allocate and assign IRQ 0x17.00.12 = 0x91
+ *<4>buswalk [swapper : - FoundDevice: 0x17.28.10 = 0x12AE
+ *<4>buswalk [swapper : - build_device_node 0x17.28.12
+ *<4>buswalk [swapper : iSeries_pcibios_init Exit.
+ ***********************************************************************/
 void iSeries_pcibios_init(void)
 {
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Entry.\n"); 
+       PPCDBG(PPCDBG_BUSWALK,"iSeries_pcibios_init Entry.\n"); 
+
        iSeries_IoMmTable_Initialize();
+
        find_and_init_phbs();
-       /* pci_assign_all_busses = 0;           SFRXXX*/
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_init Exit.\n"); 
-}
 
-/*
+       pci_assign_all_busses = 0;
+       PPCDBG(PPCDBG_BUSWALK,"iSeries_pcibios_init Exit.\n"); 
+}
+/***********************************************************************
  * pcibios_final_fixup(void)  
- */
+ ***********************************************************************/
 void __init pcibios_final_fixup(void)
 {
-       struct pci_dev *pdev = NULL;
-       struct iSeries_Device_Node *node;
-       char Buffer[256];
-       int DeviceCount = 0;
-
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup Entry.\n"); 
+       struct pci_dev* PciDev = NULL;
+       struct iSeries_Device_Node* DeviceNode;
+       char   Buffer[256];
+       int    DeviceCount = 0;
 
+       PPCDBG(PPCDBG_BUSWALK,"iSeries_pcibios_fixup Entry.\n"); 
+       /******************************************************/
        /* Fix up at the device node and pci_dev relationship */
+       /******************************************************/
        mf_displaySrc(0xC9000100);
 
-       printk("pcibios_final_fixup\n");
-       while ((pdev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev))
-                       != NULL) {
-               node = find_Device_Node(pdev->bus->number, pdev->devfn);
-               printk("pci dev %p (%x.%x), node %p\n", pdev,
-                      pdev->bus->number, pdev->devfn, node);
-
-               if (node != NULL) {
+       while ((PciDev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, PciDev)) != NULL) {
+               DeviceNode = find_Device_Node(PciDev);
+               if(DeviceNode != NULL) {
                        ++DeviceCount;
-                       pdev->sysdata = (void *)node;
-                       node->PciDev = pdev;
-                       PPCDBG(PPCDBG_BUSWALK,
-                                       "pdev 0x%p <==> DevNode 0x%p\n",
-                                       pdev, node);
-                       iSeries_allocateDeviceBars(pdev);
-                       iSeries_Device_Information(pdev, Buffer,
-                                       sizeof(Buffer));
-                       printk("%d. %s\n", DeviceCount, Buffer);
-                       create_pci_bus_tce_table((unsigned long)node);
-               } else
-                       printk("PCI: Device Tree not found for 0x%016lX\n",
-                                       (unsigned long)pdev);
+                       PciDev->sysdata    = (void*)DeviceNode;
+                       DeviceNode->PciDev = PciDev;
+
+                       PPCDBG(PPCDBG_BUSWALK,"PciDev 0x%p <==> DevNode 0x%p\n",PciDev,DeviceNode );
+
+                       iSeries_allocateDeviceBars(PciDev);
+
+                       iSeries_Device_Information(PciDev,Buffer, sizeof(Buffer) );
+                       printk("%d. %s\n",DeviceCount,Buffer);
+
+                       create_pci_bus_tce_table((unsigned long)DeviceNode);
+               } else {
+                       printk("PCI: Device Tree not found for 0x%016lX\n",(unsigned long)PciDev);
+               }
        }
        iSeries_IoMmTable_Status();
+
        iSeries_activate_IRQs();
+
        mf_displaySrc(0xC9000200);
 }
 
-void pcibios_fixup_bus(struct pci_bus *PciBus)
+void pcibios_fixup_bus(struct pci_bus* PciBus)
 {
-       PPCDBG(PPCDBG_BUSWALK, "iSeries_pcibios_fixup_bus(0x%04X) Entry.\n",
-                       PciBus->number); 
+       PPCDBG(PPCDBG_BUSWALK,"iSeries_pcibios_fixup_bus(0x%04X) Entry.\n",PciBus->number); 
+
 }
 
-void pcibios_fixup_resources(struct pci_dev *pdev)
+
+/***********************************************************************
+ * pcibios_fixup_resources(struct pci_dev *dev) 
+ *     
+ ***********************************************************************/
+void pcibios_fixup_resources(struct pci_dev *PciDev)
 {
-       PPCDBG(PPCDBG_BUSWALK, "fixup_resources pdev %p\n", pdev);
+       PPCDBG(PPCDBG_BUSWALK,"pcibios_fixup_resources PciDev %p\n",PciDev);
 }   
 
-/*
- * Loop through each node function to find usable EADs bridges.  
- */
-static void iSeries_Scan_PHBs_Slots(struct pci_controller *Phb)
+
+/********************************************************************************
+* Loop through each node function to find usable EADs bridges.  
+*********************************************************************************/
+void  iSeries_Scan_PHBs_Slots(struct pci_controller* Phb)
 {
-       struct HvCallPci_DeviceInfo *DevInfo;
-       HvBusNumber bus = Phb->local_number;    /* System Bus */        
-       const HvSubBusNumber SubBus = 0;        /* EADs is always 0. */
-       int HvRc = 0;
-       int IdSel;      
-       const int MaxAgents = 8;
+       struct HvCallPci_DeviceInfo* DevInfo;
+       HvBusNumber    Bus       = Phb->local_number;       /* System Bus        */     
+       HvSubBusNumber SubBus    = 0;                       /* EADs is always 0. */
+       int            HvRc      = 0;
+       int            IdSel     = 1;   
+       int            MaxAgents = 8;
 
-       DevInfo = (struct HvCallPci_DeviceInfo*)
-               kmalloc(sizeof(struct HvCallPci_DeviceInfo), GFP_KERNEL);
-       if (DevInfo == NULL)
-               return;
+       DevInfo    = (struct HvCallPci_DeviceInfo*)kmalloc(sizeof(struct HvCallPci_DeviceInfo), GFP_KERNEL);
+       if(DevInfo == NULL) return;
 
-       /*
+       /********************************************************************************
         * Probe for EADs Bridges      
-        */
-       for (IdSel = 1; IdSel < MaxAgents; ++IdSel) {
-               HvRc = HvCallPci_getDeviceInfo(bus, SubBus, IdSel,
-                               REALADDR(DevInfo),
-                               sizeof(struct HvCallPci_DeviceInfo));
+        ********************************************************************************/
+       for (IdSel=1; IdSel < MaxAgents; ++IdSel) {
+               HvRc = HvCallPci_getDeviceInfo(Bus, SubBus, IdSel,REALADDR(DevInfo), sizeof(struct HvCallPci_DeviceInfo));
                if (HvRc == 0) {
-                       if (DevInfo->deviceType == HvCallPci_NodeDevice)
-                               iSeries_Scan_EADs_Bridge(bus, SubBus, IdSel);
-                       else
-                               printk("PCI: Invalid System Configuration(0x%02X)"
-                                      " for bus 0x%02x id 0x%02x.\n",
-                                      DevInfo->deviceType, bus, IdSel);
+                       if(DevInfo->deviceType == HvCallPci_NodeDevice) {
+                               iSeries_Scan_EADs_Bridge(Bus, SubBus, IdSel);
+                       }
+                       else printk("PCI: Invalid System Configuration(0x%02X.\n",DevInfo->deviceType);
                }
-               else
-                       pci_Log_Error("getDeviceInfo", bus, SubBus, IdSel, HvRc);
+               else pci_Log_Error("getDeviceInfo",Bus, SubBus, IdSel,HvRc);
        }
        kfree(DevInfo);
 }
 
-static void iSeries_Scan_EADs_Bridge(HvBusNumber bus, HvSubBusNumber SubBus,
-               int IdSel)
+/********************************************************************************
+* 
+*********************************************************************************/
+void  iSeries_Scan_EADs_Bridge(HvBusNumber Bus, HvSubBusNumber SubBus, int IdSel)
 {
-       struct HvCallPci_BridgeInfo *BridgeInfo;
-       HvAgentId AgentId;
-       int Function;
-       int HvRc;
-
-       BridgeInfo = (struct HvCallPci_BridgeInfo *)
-               kmalloc(sizeof(struct HvCallPci_BridgeInfo), GFP_KERNEL);
-       if (BridgeInfo == NULL)
-               return;
-
-       /* Note: hvSubBus and irq is always be 0 at this level! */
-       for (Function = 0; Function < 8; ++Function) {
+       struct HvCallPci_BridgeInfo* BridgeInfo;
+       HvAgentId      AgentId;
+       int            Function;
+       int            HvRc;
+
+       BridgeInfo = (struct HvCallPci_BridgeInfo*)kmalloc(sizeof(struct HvCallPci_BridgeInfo), GFP_KERNEL);
+       if(BridgeInfo == NULL) return;
+
+       /*********************************************************************
+        * Note: hvSubBus and irq is always be 0 at this level!
+        *********************************************************************/
+       for (Function=0; Function < 8; ++Function) {
                AgentId = ISERIES_PCI_AGENTID(IdSel, Function);
-               HvRc = HvCallXm_connectBusUnit(bus, SubBus, AgentId, 0);
+               HvRc = HvCallXm_connectBusUnit(Bus, SubBus, AgentId, 0);
                if (HvRc == 0) {
-                       printk("found device at bus %d idsel %d func %d (AgentId %x)\n",
-                              bus, IdSel, Function, AgentId);
                        /*  Connect EADs: 0x18.00.12 = 0x00 */
-                       PPCDBG(PPCDBG_BUSWALK,
-                                       "PCI:Connect EADs: 0x%02X.%02X.%02X\n",
-                                       bus, SubBus, AgentId);
-                       HvRc = HvCallPci_getBusUnitInfo(bus, SubBus, AgentId,
-                                       REALADDR(BridgeInfo),
-                                       sizeof(struct HvCallPci_BridgeInfo));
+                       PPCDBG(PPCDBG_BUSWALK,"PCI:Connect EADs: 0x%02X.%02X.%02X\n",Bus, SubBus, AgentId);
+                       PCIFR(                    "Connect EADs: 0x%02X.%02X.%02X",  Bus, SubBus, AgentId);
+                       HvRc = HvCallPci_getBusUnitInfo(Bus, SubBus, AgentId, 
+                                                       REALADDR(BridgeInfo), sizeof(struct HvCallPci_BridgeInfo));
                        if (HvRc == 0) {
-                               printk("bridge info: type %x subbus %x maxAgents %x maxsubbus %x logslot %x\n",
-                                       BridgeInfo->busUnitInfo.deviceType,
-                                       BridgeInfo->subBusNumber,
-                                       BridgeInfo->maxAgents,
-                                       BridgeInfo->maxSubBusNumber,
-                                       BridgeInfo->logicalSlotNumber);
-                               PPCDBG(PPCDBG_BUSWALK,
-                                       "PCI: BridgeInfo, Type:0x%02X, SubBus:0x%02X, MaxAgents:0x%02X, MaxSubBus: 0x%02X, LSlot: 0x%02X\n",
-                                       BridgeInfo->busUnitInfo.deviceType,
-                                       BridgeInfo->subBusNumber,
-                                       BridgeInfo->maxAgents,
-                                       BridgeInfo->maxSubBusNumber,
-                                       BridgeInfo->logicalSlotNumber);
-
-                               if (BridgeInfo->busUnitInfo.deviceType ==
-                                               HvCallPci_BridgeDevice)  {
+                               PPCDBG(PPCDBG_BUSWALK,"PCI: BridgeInfo, Type:0x%02X, SubBus:0x%02X, MaxAgents:0x%02X, MaxSubBus: 0x%02X, LSlot: 0x%02X\n",
+                                      BridgeInfo->busUnitInfo.deviceType,
+                                      BridgeInfo->subBusNumber,
+                                      BridgeInfo->maxAgents,
+                                      BridgeInfo->maxSubBusNumber,
+                                      BridgeInfo->logicalSlotNumber);
+                               PCIFR(                     "BridgeInfo, Type:0x%02X, SubBus:0x%02X, MaxAgents:0x%02X, MaxSubBus: 0x%02X, LSlot: 0x%02X",
+                                      BridgeInfo->busUnitInfo.deviceType,
+                                      BridgeInfo->subBusNumber,
+                                      BridgeInfo->maxAgents,
+                                      BridgeInfo->maxSubBusNumber,
+                                      BridgeInfo->logicalSlotNumber);
+
+                               if (BridgeInfo->busUnitInfo.deviceType == HvCallPci_BridgeDevice)  {
                                        /* Scan_Bridge_Slot...: 0x18.00.12 */
-                                       iSeries_Scan_Bridge_Slot(bus, BridgeInfo);
-                               } else
-                                       printk("PCI: Invalid Bridge Configuration(0x%02X)",
-                                               BridgeInfo->busUnitInfo.deviceType);
+                                       iSeries_Scan_Bridge_Slot(Bus,BridgeInfo);
+                               }
+                               else printk("PCI: Invalid Bridge Configuration(0x%02X)",BridgeInfo->busUnitInfo.deviceType);
                        }
-               } else if (HvRc != 0x000B)
-                       pci_Log_Error("EADs Connect",
-                                       bus, SubBus, AgentId, HvRc);
+               }
+               else if(HvRc != 0x000B) pci_Log_Error("EADs Connect",Bus,SubBus,AgentId,HvRc);
        }
        kfree(BridgeInfo);
 }
 
-/*
- * This assumes that the node slot is always on the primary bus!
- */
-static int iSeries_Scan_Bridge_Slot(HvBusNumber Bus,
-               struct HvCallPci_BridgeInfo *BridgeInfo)
+/********************************************************************************
+* 
+* This assumes that the node slot is always on the primary bus!
+*
+*********************************************************************************/
+int iSeries_Scan_Bridge_Slot(HvBusNumber Bus, struct HvCallPci_BridgeInfo* BridgeInfo)
 {
-       struct iSeries_Device_Node *node;
+       struct iSeries_Device_Node* DeviceNode;
        HvSubBusNumber SubBus = BridgeInfo->subBusNumber;
-       u16 VendorId = 0;
-       int HvRc = 0;
-       u8 Irq = 0;
-       int IdSel = ISERIES_GET_DEVICE_FROM_SUBBUS(SubBus);
-       int Function = ISERIES_GET_FUNCTION_FROM_SUBBUS(SubBus);
-       HvAgentId EADsIdSel = ISERIES_PCI_AGENTID(IdSel, Function);
-
-       /* iSeries_allocate_IRQ.: 0x18.00.12(0xA3) */
-       Irq = iSeries_allocate_IRQ(Bus, 0, EADsIdSel);
-       iSeries_assign_IRQ(Irq, Bus, 0, EADsIdSel);
-       PPCDBG(PPCDBG_BUSWALK,
-               "PCI:- allocate and assign IRQ 0x%02X.%02X.%02X = 0x%02X\n",
-               Bus, 0, AgentId, Irq);
-
-       /*
+       u16       VendorId    = 0;
+       int       HvRc        = 0;
+       u8        Irq         = 0;
+       int       IdSel       = ISERIES_GET_DEVICE_FROM_SUBBUS(SubBus);
+       int       Function    = ISERIES_GET_FUNCTION_FROM_SUBBUS(SubBus);
+       HvAgentId AgentId     = ISERIES_PCI_AGENTID(IdSel, Function);
+       HvAgentId EADsIdSel   = ISERIES_PCI_AGENTID(IdSel, Function);
+       int       FirstSlotId = 0;      
+
+       /**********************************************************/
+       /* iSeries_allocate_IRQ.: 0x18.00.12(0xA3)                */
+       /**********************************************************/
+       Irq   = iSeries_allocate_IRQ(Bus, 0, AgentId);
+       iSeries_assign_IRQ(Irq, Bus, 0, AgentId);
+       PPCDBG(PPCDBG_BUSWALK,"PCI:- allocate and assign IRQ 0x%02X.%02X.%02X = 0x%02X\n",Bus, 0, AgentId, Irq );
+
+       /****************************************************************************
         * Connect all functions of any device found.  
-        */
+        ****************************************************************************/
        for (IdSel = 1; IdSel <= BridgeInfo->maxAgents; ++IdSel) {
                for (Function = 0; Function < 8; ++Function) {
-                       HvAgentId AgentId = ISERIES_PCI_AGENTID(IdSel, Function);
-                       HvRc = HvCallXm_connectBusUnit(Bus, SubBus,
-                                       AgentId, Irq);
-                       if (HvRc != 0) {
-                               pci_Log_Error("Connect Bus Unit",
-                                             Bus, SubBus, AgentId, HvRc);
-                               continue;
-                       }
-                       printk("connected bus unit at bus %d subbus 0x%x agentid 0x%x (idsel=%d func=%d)\n",
-                              Bus, SubBus, AgentId, IdSel, Function);
-
-                       HvRc = HvCallPci_configLoad16(Bus, SubBus, AgentId,
-                                                     PCI_VENDOR_ID, &VendorId);
-                       if (HvRc != 0) {
-                               pci_Log_Error("Read Vendor",
-                                             Bus, SubBus, AgentId, HvRc);
-                               continue;
+                       AgentId = ISERIES_PCI_AGENTID(IdSel, Function);
+                       HvRc = HvCallXm_connectBusUnit(Bus, SubBus, AgentId, Irq);
+                       if( HvRc == 0) {
+                               HvRc = HvCallPci_configLoad16(Bus, SubBus, AgentId, PCI_VENDOR_ID, &VendorId);
+                               if( HvRc == 0) {
+                                       /**********************************************************/
+                                       /* FoundDevice: 0x18.28.10 = 0x12AE                       */
+                                       /**********************************************************/
+                                       PPCDBG(PPCDBG_BUSWALK,"PCI:- FoundDevice: 0x%02X.%02X.%02X = 0x%04X\n",
+                                                                              Bus, SubBus, AgentId, VendorId);
+
+                                       HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId, PCI_INTERRUPT_LINE, Irq);  
+                                       if( HvRc != 0) {
+                                               pci_Log_Error("PciCfgStore Irq Failed!",Bus,SubBus,AgentId,HvRc);
+                                       }
+
+                                       ++DeviceCount;
+                                       DeviceNode = build_device_node(Bus, SubBus, EADsIdSel, Function);
+                                       DeviceNode->Vendor      = VendorId;
+                                       DeviceNode->Irq         = Irq;
+                                       DeviceNode->LogicalSlot = BridgeInfo->logicalSlotNumber;
+                                       PCIFR("Device(%4d): 0x%02X.%02X.%02X 0x%02X 0x%04X",
+                                             DeviceCount,Bus, SubBus, AgentId,
+                                             DeviceNode->LogicalSlot,DeviceNode->Vendor);
+
+                                       /***********************************************************
+                                        * On the first device/function, assign irq to slot
+                                        ***********************************************************/
+                                       if(Function == 0) { 
+                                               FirstSlotId = AgentId;
+                                               // AHT iSeries_assign_IRQ(Irq, Bus, SubBus, AgentId);
+                                       }
+                               }
+                               else pci_Log_Error("Read Vendor",Bus,SubBus,AgentId,HvRc);
                        }
-                       printk("read vendor ID: %x\n", VendorId);
-
-                       /* FoundDevice: 0x18.28.10 = 0x12AE */
-                       PPCDBG(PPCDBG_BUSWALK,
-                              "PCI:- FoundDevice: 0x%02X.%02X.%02X = 0x%04X\n",
-                              Bus, SubBus, AgentId, VendorId);
-                       HvRc = HvCallPci_configStore8(Bus, SubBus, AgentId,
-                                                     PCI_INTERRUPT_LINE, Irq);  
-                       if (HvRc != 0)
-                               pci_Log_Error("PciCfgStore Irq Failed!",
-                                             Bus, SubBus, AgentId, HvRc);
-
-                       ++DeviceCount;
-                       node = build_device_node(Bus, SubBus, EADsIdSel, Function);
-                       node->Vendor = VendorId;
-                       node->Irq = Irq;
-                       node->LogicalSlot = BridgeInfo->logicalSlotNumber;
-
+                       else pci_Log_Error("Connect Bus Unit",Bus,SubBus, AgentId,HvRc);
                } /* for (Function = 0; Function < 8; ++Function) */
        } /* for (IdSel = 1; IdSel <= MaxAgents; ++IdSel) */
        return HvRc;
 }
-
-/*
- * I/0 Memory copy MUST use mmio commands on iSeries
- * To do; For performance, include the hv call directly
- */
-void *iSeries_memset_io(void *dest, char c, size_t Count)
+/************************************************************************/
+/* I/0 Memory copy MUST use mmio commands on iSeries                    */
+/* To do; For performance, include the hv call directly                 */
+/************************************************************************/
+void* iSeries_memset_io(void* dest, char c, size_t Count)
 {
-       u8 ByteValue = c;
-       long NumberOfBytes = Count;
-       char *IoBuffer = dest;
-
-       while (NumberOfBytes > 0) {
-               iSeries_Write_Byte(ByteValue, (void *)IoBuffer);
+       u8    ByteValue     = c;
+       long  NumberOfBytes = Count;
+       char* IoBuffer      = dest;
+       while(NumberOfBytes > 0) {
+               iSeries_Write_Byte( ByteValue, (void*)IoBuffer );
                ++IoBuffer;
                -- NumberOfBytes;
        }
        return dest;
-}
-
-void *iSeries_memcpy_toio(void *dest, void *source, size_t count)
+}      
+void* iSeries_memcpy_toio(void *dest, void *source, size_t count)
 {
-       char *dst = dest;
-       char *src = source;
-       long NumberOfBytes = count;
-
-       while (NumberOfBytes > 0) {
-               iSeries_Write_Byte(*src++, (void *)dst++);
+       char *dst           = dest;
+       char *src           = source;
+       long  NumberOfBytes = count;
+       while(NumberOfBytes > 0) {
+               iSeries_Write_Byte(*src++, (void*)dst++);
                -- NumberOfBytes;
        }
        return dest;
 }
-
-void *iSeries_memcpy_fromio(void *dest, void *source, size_t count)
+void* iSeries_memcpy_fromio(void *dest, void *source, size_t count)
 {
        char *dst = dest;
        char *src = source;
-       long NumberOfBytes = count;
-
-       while (NumberOfBytes > 0) {
-               *dst++ = iSeries_Read_Byte((void *)src++);
+       long  NumberOfBytes = count;
+       while(NumberOfBytes > 0) {
+               *dst++ = iSeries_Read_Byte( (void*)src++);
                -- NumberOfBytes;
        }
        return dest;
 }
-
-/*
+/**********************************************************************************
  * Look down the chain to find the matching Device Device
- */
-static struct iSeries_Device_Node *find_Device_Node(int bus, int devfn)
+ **********************************************************************************/
+struct iSeries_Device_Node* find_Device_Node(struct pci_dev* PciDev)
 {
-       struct list_head *pos;
-
-       list_for_each(pos, &iSeries_Global_Device_List) {
-               struct iSeries_Device_Node *node =
-                       list_entry(pos, struct iSeries_Device_Node, Device_List);
-
-               if ((bus == ISERIES_BUS(node)) && (devfn == node->DevFn))
-                       return node;
+       struct list_head* Device_Node_Ptr = iSeries_Global_Device_List.next;
+       int Bus   = PciDev->bus->number;
+       int DevFn = PciDev->devfn;
+       
+       while(Device_Node_Ptr != &iSeries_Global_Device_List) { 
+               struct iSeries_Device_Node* DevNode = (struct iSeries_Device_Node*)Device_Node_Ptr;
+               if(Bus == ISERIES_BUS(DevNode) && DevFn == DevNode->DevFn) {
+                       return DevNode;
+               }
+               Device_Node_Ptr = Device_Node_Ptr->next;
        }
        return NULL;
 }
-
-#if 0
-/*
- * Returns the device node for the passed pci_dev
- * Sanity Check Node PciDev to passed pci_dev
- * If none is found, returns a NULL which the client must handle.
- */
-static struct iSeries_Device_Node *get_Device_Node(struct pci_dev *pdev)
+/******************************************************************/
+/* Returns the device node for the passed pci_dev                 */
+/* Sanity Check Node PciDev to passed pci_dev                     */
+/* If none is found, returns a NULL which the client must handle. */
+/******************************************************************/
+struct iSeries_Device_Node* get_Device_Node(struct pci_dev* PciDev)
 {
-       struct iSeries_Device_Node *node;
-
-       node = pdev->sysdata;
-       if (node == NULL || node->PciDev != pdev)
-               node = find_Device_Node(pdev->bus->number, pdev->devfn);
-       return node;
+       struct iSeries_Device_Node* Node;
+       Node = (struct iSeries_Device_Node*)PciDev->sysdata;
+       if(Node == NULL ) {
+               Node = find_Device_Node(PciDev);
+       }
+       else if(Node->PciDev != PciDev) { 
+               Node = find_Device_Node(PciDev);
+       }
+       return Node;
 }
-#endif
-
-/*
- * Config space read and write functions.
- * For now at least, we look for the device node for the bus and devfn
- * that we are asked to access.  It may be possible to translate the devfn
- * to a subbus and deviceid more directly.
- */
-static u64 hv_cfg_read_func[4]  = {
-       HvCallPciConfigLoad8, HvCallPciConfigLoad16,
-       HvCallPciConfigLoad32, HvCallPciConfigLoad32
-};
-
-static u64 hv_cfg_write_func[4] = {
-       HvCallPciConfigStore8, HvCallPciConfigStore16,
-       HvCallPciConfigStore32, HvCallPciConfigStore32
-};
-
-/*
- * Read PCI config space
- */
-static int iSeries_pci_read_config(struct pci_bus *bus, unsigned int devfn,
-               int offset, int size, u32 *val)
+/**********************************************************************************
+ *
+ * Read PCI Config Space Code 
+ *
+ **********************************************************************************/
+/** BYTE  *************************************************************************/
+int iSeries_Node_read_config_byte(struct iSeries_Device_Node* DevNode, int Offset, u8* ReadValue)
 {
-       struct iSeries_Device_Node *node = find_Device_Node(bus->number, devfn);
-       u64 fn;
-       struct HvCallPci_LoadReturn ret;
-
-       if (node == NULL)
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       fn = hv_cfg_read_func[(size - 1) & 3];
-       HvCall3Ret16(fn, &ret, node->DsaAddr.DsaAddr, offset, 0);
-
-       if (ret.rc != 0) {
-               *val = ~0;
-               return PCIBIOS_DEVICE_NOT_FOUND;        /* or something */
+       u8  ReadData; 
+       if(DevNode == NULL) { return 0x301; } 
+       ++Pci_Cfg_Read_Count;
+       DevNode->ReturnCode = HvCallPci_configLoad8(ISERIES_BUS(DevNode),ISERIES_SUBBUS(DevNode),0x10,
+                                                       Offset,&ReadData);
+       if(Pci_Trace_Flag == 1) {
+               PCIFR("RCB: 0x%04X.%02X 0x%04X = 0x%02X",ISERIES_BUS(DevNode),DevNode->DevFn,Offset,ReadData);
        }
-
-       *val = ret.value;
-       return 0;
+       if(DevNode->ReturnCode != 0 ) { 
+               printk("PCI: RCB: 0x%04X.%02X  Error: 0x%04X\n",ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+               PCIFR(      "RCB: 0x%04X.%02X  Error: 0x%04X",  ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+       }
+       *ReadValue = ReadData; 
+       return DevNode->ReturnCode;
 }
-
-/*
- * Write PCI config space
- */
-
-static int iSeries_pci_write_config(struct pci_bus *bus, unsigned int devfn,
-               int offset, int size, u32 val)
+/** WORD  *************************************************************************/
+int iSeries_Node_read_config_word(struct iSeries_Device_Node* DevNode, int Offset, u16* ReadValue)
 {
-       struct iSeries_Device_Node *node = find_Device_Node(bus->number, devfn);
-       u64 fn;
-       u64 ret;
-
-       if (node == NULL)
-               return PCIBIOS_DEVICE_NOT_FOUND;
-
-       fn = hv_cfg_write_func[(size - 1) & 3];
-       ret = HvCall4(fn, node->DsaAddr.DsaAddr, offset, val, 0);
-
-       if (ret != 0)
-               return PCIBIOS_DEVICE_NOT_FOUND;
+       u16  ReadData; 
+       if(DevNode == NULL) { return 0x301; } 
+       ++Pci_Cfg_Read_Count;
+       DevNode->ReturnCode = HvCallPci_configLoad16(ISERIES_BUS(DevNode),ISERIES_SUBBUS(DevNode),0x10,
+                                                       Offset,&ReadData);
+       if(Pci_Trace_Flag == 1) {
+               PCIFR("RCW: 0x%04X.%02X 0x%04X = 0x%04X",ISERIES_BUS(DevNode),DevNode->DevFn,Offset,ReadData);
+       }
+       if(DevNode->ReturnCode != 0 ) { 
+               printk("PCI: RCW: 0x%04X.%02X  Error: 0x%04X\n",ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+               PCIFR(      "RCW: 0x%04X.%02X  Error: 0x%04X",  ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
 
-       return 0;
+       }
+       *ReadValue = ReadData; 
+       return DevNode->ReturnCode;
+}
+/** DWORD *************************************************************************/
+int iSeries_Node_read_config_dword(struct iSeries_Device_Node* DevNode, int Offset, u32* ReadValue)
+{
+       u32  ReadData; 
+       if(DevNode == NULL) { return 0x301; } 
+       ++Pci_Cfg_Read_Count;
+       DevNode->ReturnCode = HvCallPci_configLoad32(ISERIES_BUS(DevNode),ISERIES_SUBBUS(DevNode),0x10,
+                                                       Offset,&ReadData);
+       if(Pci_Trace_Flag == 1) {
+               PCIFR("RCL: 0x%04X.%02X 0x%04X = 0x%08X",ISERIES_BUS(DevNode),DevNode->DevFn,Offset,ReadData);
+       }
+       if(DevNode->ReturnCode != 0 ) { 
+               printk("PCI: RCL: 0x%04X.%02X  Error: 0x%04X\n",ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+               PCIFR(      "RCL: 0x%04X.%02X  Error: 0x%04X",  ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+       }
+       *ReadValue = ReadData; 
+       return DevNode->ReturnCode;
+}
+int iSeries_pci_read_config_byte(struct pci_dev* PciDev, int Offset, u8* ReadValue) { 
+       struct iSeries_Device_Node* DevNode = get_Device_Node(PciDev);
+       if(DevNode == NULL) return 0x0301;
+       return iSeries_Node_read_config_byte( DevNode ,Offset,ReadValue);
+}
+int iSeries_pci_read_config_word(struct pci_dev* PciDev, int Offset, u16* ReadValue) { 
+       struct iSeries_Device_Node* DevNode = get_Device_Node(PciDev);
+       if(DevNode == NULL) return 0x0301;
+       return iSeries_Node_read_config_word( DevNode ,Offset,ReadValue );
+}
+int iSeries_pci_read_config_dword(struct pci_dev* PciDev, int Offset, u32* ReadValue) { 
+       struct iSeries_Device_Node* DevNode = get_Device_Node(PciDev);
+       if(DevNode == NULL) return 0x0301;
+       return iSeries_Node_read_config_dword(DevNode ,Offset,ReadValue  );
+}
+/**********************************************************************************/
+/*                                                                                */
+/* Write PCI Config Space                                                         */
+/*                                                                                */
+/** BYTE  *************************************************************************/
+int iSeries_Node_write_config_byte(struct iSeries_Device_Node* DevNode, int Offset, u8 WriteData)
+{
+       ++Pci_Cfg_Write_Count;
+       DevNode->ReturnCode = HvCallPci_configStore8(ISERIES_BUS(DevNode),ISERIES_SUBBUS(DevNode),0x10,
+                                                         Offset,WriteData);
+       if(Pci_Trace_Flag == 1) {
+               PCIFR("WCB: 0x%04X.%02X 0x%04X = 0x%02X",ISERIES_BUS(DevNode),DevNode->DevFn,Offset,WriteData);
+       }
+       if(DevNode->ReturnCode != 0 ) { 
+               printk("PCI: WCB: 0x%04X.%02X  Error: 0x%04X\n",ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+               PCIFR(      "WCB: 0x%04X.%02X  Error: 0x%04X",  ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+       }
+       return DevNode->ReturnCode;
+}
+/** WORD  *************************************************************************/
+int iSeries_Node_write_config_word(struct iSeries_Device_Node* DevNode, int Offset, u16 WriteData)
+{
+       ++Pci_Cfg_Write_Count;
+       DevNode->ReturnCode = HvCallPci_configStore16(ISERIES_BUS(DevNode),ISERIES_SUBBUS(DevNode),0x10,
+                                                         Offset,WriteData);
+       if(Pci_Trace_Flag == 1) {
+               PCIFR("WCW: 0x%04X.%02X 0x%04X = 0x%04X",ISERIES_BUS(DevNode),DevNode->DevFn,Offset,WriteData);
+       }
+       if(DevNode->ReturnCode != 0 ) { 
+               printk("PCI: WCW: 0x%04X.%02X  Error: 0x%04X\n",ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+               PCIFR(      "WCW: 0x%04X.%02X  Error: 0x%04X",  ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+       }
+       return DevNode->ReturnCode;
+}
+/** DWORD *************************************************************************/
+int iSeries_Node_write_config_dword(struct iSeries_Device_Node* DevNode, int Offset, u32 WriteData)
+{
+       ++Pci_Cfg_Write_Count;
+       DevNode->ReturnCode = HvCallPci_configStore32(ISERIES_BUS(DevNode),ISERIES_SUBBUS(DevNode),0x10,
+                                                         Offset,WriteData);
+       if(Pci_Trace_Flag == 1) {
+               PCIFR("WCL: 0x%04X.%02X 0x%04X = 0x%08X",ISERIES_BUS(DevNode),DevNode->DevFn,Offset,WriteData);
+       }
+       if(DevNode->ReturnCode != 0 ) { 
+               printk("PCI: WCL: 0x%04X.%02X  Error: 0x%04X\n",ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+               PCIFR(      "WCL: 0x%04X.%02X  Error: 0x%04X",  ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->ReturnCode);
+       }
+       return DevNode->ReturnCode;
+}
+int iSeries_pci_write_config_byte( struct pci_dev* PciDev,int Offset, u8 WriteValue)
+{
+       struct iSeries_Device_Node* DevNode = get_Device_Node(PciDev);
+       if(DevNode == NULL) return 0x0301;
+       return iSeries_Node_write_config_byte( DevNode,Offset,WriteValue);
+}
+int iSeries_pci_write_config_word( struct pci_dev* PciDev,int Offset,u16 WriteValue)
+{
+       struct iSeries_Device_Node* DevNode = get_Device_Node(PciDev);
+       if(DevNode == NULL) return 0x0301;
+       return iSeries_Node_write_config_word( DevNode,Offset,WriteValue);
+}
+int iSeries_pci_write_config_dword(struct pci_dev* PciDev,int Offset,u32 WriteValue)
+{
+       struct iSeries_Device_Node* DevNode = get_Device_Node(PciDev);
+       if(DevNode == NULL) return 0x0301;
+       return iSeries_Node_write_config_dword(DevNode,Offset,WriteValue);
 }
 
-static struct pci_ops iSeries_pci_ops = {
-       .read = iSeries_pci_read_config,
-       .write = iSeries_pci_write_config
+/************************************************************************/
+/* Branch Table                                                         */
+/************************************************************************/
+struct pci_ops iSeries_pci_ops = {
+       iSeries_pci_read_config_byte,
+       iSeries_pci_read_config_word,
+       iSeries_pci_read_config_dword,
+       iSeries_pci_write_config_byte,
+       iSeries_pci_write_config_word,
+       iSeries_pci_write_config_dword 
 };
 
-/*
+/************************************************************************
  * Check Return Code
  * -> On Failure, print and log information.
  *    Increment Retry Count, if exceeds max, panic partition.
  * -> If in retry, print and log success 
- *
+ ************************************************************************
  * PCI: Device 23.90 ReadL I/O Error( 0): 0x1234
  * PCI: Device 23.90 ReadL Retry( 1)
  * PCI: Device 23.90 ReadL Retry Successful(1)
- */
-static int CheckReturnCode(char *TextHdr, struct iSeries_Device_Node *DevNode,
-               u64 ret)
+ ************************************************************************/
+int  CheckReturnCode(char* TextHdr, struct iSeries_Device_Node* DevNode, u64 RtnCode)
 {
-       if (ret != 0)  {
+       if(RtnCode != 0)  {
                ++Pci_Error_Count;
                ++DevNode->IoRetry;
+               PCIFR(      "%s: Device 0x%04X:%02X  I/O Error(%2d): 0x%04X",
+                           TextHdr,ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->IoRetry,(int)RtnCode);
                printk("PCI: %s: Device 0x%04X:%02X  I/O Error(%2d): 0x%04X\n",
-                               TextHdr, DevNode->DsaAddr.Dsa.busNumber, DevNode->DevFn,
-                               DevNode->IoRetry, (int)ret);
-               /*
-                * Bump the retry and check for retry count exceeded.
-                * If, Exceeded, panic the system.
-                */
-               if ((DevNode->IoRetry > Pci_Retry_Max) &&
-                               (Pci_Error_Flag > 0)) {
+                           TextHdr,ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->IoRetry,(int)RtnCode);
+               /*******************************************************/
+               /* Bump the retry and check for retry count exceeded.  */
+               /* If, Exceeded, panic the system.                     */           
+               /*******************************************************/
+               if(DevNode->IoRetry > Pci_Retry_Max && Pci_Error_Flag > 0 ) {
                        mf_displaySrc(0xB6000103);
                        panic_timeout = 0; 
-                       panic("PCI: Hardware I/O Error, SRC B6000103, "
-                                       "Automatic Reboot Disabled.\n");
+                       panic("PCI: Hardware I/O Error, SRC B6000103, Automatic Reboot Disabled.\n");
                }
                return -1;      /* Retry Try */
        }
-       /* If retry was in progress, log success and rest retry count */
-       if (DevNode->IoRetry > 0) {
+       /********************************************************************
+       * If retry was in progress, log success and rest retry count        *
+       *********************************************************************/
+       else if(DevNode->IoRetry > 0) {
                PCIFR("%s: Device 0x%04X:%02X Retry Successful(%2d).",
-                               TextHdr, DevNode->DsaAddr.Dsa.busNumber, DevNode->DevFn,
-                               DevNode->IoRetry);
+                     TextHdr,ISERIES_BUS(DevNode),DevNode->DevFn,DevNode->IoRetry);
                DevNode->IoRetry = 0;
+               return 0; 
        }
        return 0; 
 }
-
-/*
- * Translate the I/O Address into a device node, bar, and bar offset.
- * Note: Make sure the passed variable end up on the stack to avoid
- * the exposure of being device global.
- */
-static inline struct iSeries_Device_Node *xlateIoMmAddress(void *IoAddress,
-                u64 *dsaptr, u64 *BarOffsetPtr)
-{
-       unsigned long BaseIoAddr;
-       unsigned long TableIndex;
-       struct iSeries_Device_Node *DevNode;
-
-       if (((unsigned long)IoAddress < iSeries_Base_Io_Memory) ||
-                       ((unsigned long)IoAddress >= iSeries_Max_Io_Memory))
-               return NULL;
-       BaseIoAddr = (unsigned long)IoAddress - iSeries_Base_Io_Memory;
-       TableIndex = BaseIoAddr / iSeries_IoMmTable_Entry_Size;
-       DevNode = iSeries_IoMmTable[TableIndex];
-
-       if (DevNode != NULL) {
-               int barnum = iSeries_IoBarTable[TableIndex];
-               *dsaptr = DevNode->DsaAddr.DsaAddr | (barnum << 24);
-               *BarOffsetPtr = BaseIoAddr % iSeries_IoMmTable_Entry_Size;
-       } else
+/************************************************************************/
+/* Translate the I/O Address into a device node, bar, and bar offset.   */
+/* Note: Make sure the passed variable end up on the stack to avoid     */
+/* the exposure of being device global.                                 */
+/************************************************************************/
+static inline struct iSeries_Device_Node* xlateIoMmAddress(void* IoAddress,
+                                                           union HvDsaMap* DsaPtr,
+                                                          u64* BarOffsetPtr) {
+
+       unsigned long BaseIoAddr = (unsigned long)IoAddress-iSeries_Base_Io_Memory;
+       long          TableIndex = BaseIoAddr/iSeries_IoMmTable_Entry_Size;
+       struct iSeries_Device_Node* DevNode = *(iSeries_IoMmTable +TableIndex);
+       if(DevNode != NULL) {
+               DsaPtr->DsaAddr       = ISERIES_DSA(DevNode);
+               DsaPtr->Dsa.barNumber = *(iSeries_IoBarTable+TableIndex);
+               *BarOffsetPtr         = BaseIoAddr % iSeries_IoMmTable_Entry_Size;
+       }
+       else {
                panic("PCI: Invalid PCI IoAddress detected!\n");
+       }
        return DevNode;
 }
 
-/*
- * Read MM I/O Instructions for the iSeries
- * On MM I/O error, all ones are returned and iSeries_pci_IoError is cal
- * else, data is returned in big Endian format.
- *
- * iSeries_Read_Byte = Read Byte  ( 8 bit)
- * iSeries_Read_Word = Read Word  (16 bit)
- * iSeries_Read_Long = Read Long  (32 bit)
- */
-u8 iSeries_Read_Byte(void *IoAddress)
+/************************************************************************/
+/* Read MM I/O Instructions for the iSeries                             */
+/* On MM I/O error, all ones are returned and iSeries_pci_IoError is cal*/
+/* else, data is returned in big Endian format.                         */
+/************************************************************************/
+/* iSeries_Read_Byte = Read Byte  ( 8 bit)                              */
+/* iSeries_Read_Word = Read Word  (16 bit)                              */
+/* iSeries_Read_Long = Read Long  (32 bit)                              */
+/************************************************************************/
+u8  iSeries_Read_Byte(void* IoAddress)
 {
-       u64 BarOffset;
-       u64 dsa;
-       struct HvCallPci_LoadReturn ret;
-       struct iSeries_Device_Node *DevNode =
-               xlateIoMmAddress(IoAddress, &dsa, &BarOffset);
-
-       if (DevNode == NULL) {
-               static unsigned long last_jiffies;
-               static int num_printed;
+       u64    BarOffset;
+       union  HvDsaMap DsaData;
+       struct HvCallPci_LoadReturn Return;
+       struct iSeries_Device_Node* DevNode = xlateIoMmAddress(IoAddress,&DsaData,&BarOffset);
 
-               if ((jiffies - last_jiffies) > 60 * HZ) {
-                       last_jiffies = jiffies;
-                       num_printed = 0;
-               }
-               if (num_printed++ < 10)
-                       printk(KERN_ERR "iSeries_Read_Byte: invalid access at IO address %p\n", IoAddress);
-               return 0xff;
-       }
        do {
                ++Pci_Io_Read_Count;
-               HvCall3Ret16(HvCallPciBarLoad8, &ret, dsa, BarOffset, 0);
-       } while (CheckReturnCode("RDB", DevNode, ret.rc) != 0);
+               HvCall3Ret16(HvCallPciBarLoad8, &Return, DsaData.DsaAddr,BarOffset, 0);
+       } while (CheckReturnCode("RDB",DevNode, Return.rc) != 0);
 
-       return (u8)ret.value;
+       if(Pci_Trace_Flag == 1) PCIFR("RDB: IoAddress 0x%p = 0x%02X",IoAddress, (u8)Return.value); 
+       return (u8)Return.value;
 }
-
-u16 iSeries_Read_Word(void *IoAddress)
+u16  iSeries_Read_Word(void* IoAddress)
 {
-       u64 BarOffset;
-       u64 dsa;
-       struct HvCallPci_LoadReturn ret;
-       struct iSeries_Device_Node *DevNode =
-               xlateIoMmAddress(IoAddress, &dsa, &BarOffset);
-
-       if (DevNode == NULL) {
-               static unsigned long last_jiffies;
-               static int num_printed;
+       u64    BarOffset;
+       union  HvDsaMap DsaData;
+       struct HvCallPci_LoadReturn Return;
+       struct iSeries_Device_Node* DevNode = xlateIoMmAddress(IoAddress,&DsaData,&BarOffset);
 
-               if ((jiffies - last_jiffies) > 60 * HZ) {
-                       last_jiffies = jiffies;
-                       num_printed = 0;
-               }
-               if (num_printed++ < 10)
-                       printk(KERN_ERR "iSeries_Read_Word: invalid access at IO address %p\n", IoAddress);
-               return 0xffff;
-       }
        do {
                ++Pci_Io_Read_Count;
-               HvCall3Ret16(HvCallPciBarLoad16, &ret, dsa,
-                               BarOffset, 0);
-       } while (CheckReturnCode("RDW", DevNode, ret.rc) != 0);
+               HvCall3Ret16(HvCallPciBarLoad16,&Return, DsaData.DsaAddr,BarOffset, 0);
+       } while (CheckReturnCode("RDW",DevNode, Return.rc) != 0);
 
-       return swab16((u16)ret.value);
+       if(Pci_Trace_Flag == 1) PCIFR("RDW: IoAddress 0x%p = 0x%04X",IoAddress, swab16((u16)Return.value));
+       return swab16((u16)Return.value);
 }
-
-u32 iSeries_Read_Long(void *IoAddress)
+u32  iSeries_Read_Long(void* IoAddress)
 {
-       u64 BarOffset;
-       u64 dsa;
-       struct HvCallPci_LoadReturn ret;
-       struct iSeries_Device_Node *DevNode =
-               xlateIoMmAddress(IoAddress, &dsa, &BarOffset);
-
-       if (DevNode == NULL) {
-               static unsigned long last_jiffies;
-               static int num_printed;
+       u64    BarOffset;
+       union  HvDsaMap DsaData;
+       struct HvCallPci_LoadReturn Return;
+       struct iSeries_Device_Node* DevNode = xlateIoMmAddress(IoAddress,&DsaData,&BarOffset);
 
-               if ((jiffies - last_jiffies) > 60 * HZ) {
-                       last_jiffies = jiffies;
-                       num_printed = 0;
-               }
-               if (num_printed++ < 10)
-                       printk(KERN_ERR "iSeries_Read_Long: invalid access at IO address %p\n", IoAddress);
-               return 0xffffffff;
-       }
        do {
                ++Pci_Io_Read_Count;
-               HvCall3Ret16(HvCallPciBarLoad32, &ret, dsa,
-                               BarOffset, 0);
-       } while (CheckReturnCode("RDL", DevNode, ret.rc) != 0);
+               HvCall3Ret16(HvCallPciBarLoad32,&Return, DsaData.DsaAddr,BarOffset, 0);
+       } while (CheckReturnCode("RDL",DevNode, Return.rc) != 0);
 
-       return swab32((u32)ret.value);
+       if(Pci_Trace_Flag == 1) PCIFR("RDL: IoAddress 0x%p = 0x%04X",IoAddress, swab32((u32)Return.value));
+       return swab32((u32)Return.value);
 }
-
-/*
- * Write MM I/O Instructions for the iSeries
- *
- * iSeries_Write_Byte = Write Byte (8 bit)
- * iSeries_Write_Word = Write Word(16 bit)
- * iSeries_Write_Long = Write Long(32 bit)
- */
-void iSeries_Write_Byte(u8 data, void *IoAddress)
+/************************************************************************/
+/* Write MM I/O Instructions for the iSeries                            */
+/************************************************************************/
+/* iSeries_Write_Byte = Write Byte (8 bit)                              */
+/* iSeries_Write_Word = Write Word(16 bit)                              */
+/* iSeries_Write_Long = Write Long(32 bit)                              */
+/************************************************************************/
+void iSeries_Write_Byte(u8 Data, void* IoAddress)
 {
-       u64 BarOffset;
-       u64 dsa;
-       u64 rc;
-       struct iSeries_Device_Node *DevNode =
-               xlateIoMmAddress(IoAddress, &dsa, &BarOffset);
-
-       if (DevNode == NULL) {
-               static unsigned long last_jiffies;
-               static int num_printed;
+       u64    BarOffset;
+       union  HvDsaMap DsaData;
+       struct HvCallPci_LoadReturn Return;
+       struct iSeries_Device_Node* DevNode = xlateIoMmAddress(IoAddress,&DsaData,&BarOffset);
 
-               if ((jiffies - last_jiffies) > 60 * HZ) {
-                       last_jiffies = jiffies;
-                       num_printed = 0;
-               }
-               if (num_printed++ < 10)
-                       printk(KERN_ERR "iSeries_Write_Byte: invalid access at IO address %p\n", IoAddress);
-               return;
-       }
        do {
                ++Pci_Io_Write_Count;
-               rc = HvCall4(HvCallPciBarStore8, dsa, BarOffset, data, 0);
-       } while (CheckReturnCode("WWB", DevNode, rc) != 0);
+               Return.rc = HvCall4(HvCallPciBarStore8, DsaData.DsaAddr,BarOffset, Data, 0);
+       } while (CheckReturnCode("WWB",DevNode, Return.rc) != 0);
+       if(Pci_Trace_Flag == 1) PCIFR("WWB: IoAddress 0x%p = 0x%02X",IoAddress,Data);
 }
-
-void iSeries_Write_Word(u16 data, void *IoAddress)
+void iSeries_Write_Word(u16 Data, void* IoAddress)
 {
-       u64 BarOffset;
-       u64 dsa;
-       u64 rc;
-       struct iSeries_Device_Node *DevNode =
-               xlateIoMmAddress(IoAddress, &dsa, &BarOffset);
-
-       if (DevNode == NULL) {
-               static unsigned long last_jiffies;
-               static int num_printed;
+       u64    BarOffset;
+       union  HvDsaMap DsaData;
+       struct HvCallPci_LoadReturn Return;
+       struct iSeries_Device_Node* DevNode = xlateIoMmAddress(IoAddress,&DsaData,&BarOffset);
 
-               if ((jiffies - last_jiffies) > 60 * HZ) {
-                       last_jiffies = jiffies;
-                       num_printed = 0;
-               }
-               if (num_printed++ < 10)
-                       printk(KERN_ERR "iSeries_Write_Word: invalid access at IO address %p\n", IoAddress);
-               return;
-       }
        do {
                ++Pci_Io_Write_Count;
-               rc = HvCall4(HvCallPciBarStore16, dsa, BarOffset, swab16(data), 0);
-       } while (CheckReturnCode("WWW", DevNode, rc) != 0);
+               Return.rc = HvCall4(HvCallPciBarStore16,DsaData.DsaAddr,BarOffset, swab16(Data), 0);
+       } while (CheckReturnCode("WWW",DevNode, Return.rc) != 0);
+       if(Pci_Trace_Flag == 1) PCIFR("WWW: IoAddress 0x%p = 0x%04X",IoAddress,Data);
 }
-
-void iSeries_Write_Long(u32 data, void *IoAddress)
+void iSeries_Write_Long(u32 Data, void* IoAddress)
 {
-       u64 BarOffset;
-       u64 dsa;
-       u64 rc;
-       struct iSeries_Device_Node *DevNode =
-               xlateIoMmAddress(IoAddress, &dsa, &BarOffset);
-
-       if (DevNode == NULL) {
-               static unsigned long last_jiffies;
-               static int num_printed;
+       u64    BarOffset;
+       union  HvDsaMap DsaData;
+       struct HvCallPci_LoadReturn Return;
+       struct iSeries_Device_Node* DevNode = xlateIoMmAddress(IoAddress,&DsaData,&BarOffset);
 
-               if ((jiffies - last_jiffies) > 60 * HZ) {
-                       last_jiffies = jiffies;
-                       num_printed = 0;
-               }
-               if (num_printed++ < 10)
-                       printk(KERN_ERR "iSeries_Write_Long: invalid access at IO address %p\n", IoAddress);
-               return;
-       }
        do {
                ++Pci_Io_Write_Count;
-               rc = HvCall4(HvCallPciBarStore32, dsa, BarOffset, swab32(data), 0);
-       } while (CheckReturnCode("WWL", DevNode, rc) != 0);
-}
-
-void pcibios_name_device(struct pci_dev *dev)
-{
+               Return.rc = HvCall4(HvCallPciBarStore32,DsaData.DsaAddr,BarOffset, swab32(Data), 0);
+       } while (CheckReturnCode("WWL",DevNode, Return.rc) != 0);
+       if(Pci_Trace_Flag == 1) PCIFR("WWL: IoAddress 0x%p = 0x%08X",IoAddress, Data);
 }
index 3140586..6b9b702 100644 (file)
@@ -1,4 +1,3 @@
-#define PCIFR(...)
 /************************************************************************/
 /* File iSeries_pci_reset.c created by Allan Trautman on Mar 21 2001.   */
 /************************************************************************/
 #include <asm/iSeries/HvCallPci.h>
 #include <asm/iSeries/HvTypes.h>
 #include <asm/iSeries/mf.h>
+#include <asm/flight_recorder.h>
 #include <asm/pci.h>
 
 #include <asm/iSeries/iSeries_pci.h>
 #include "pci.h"
 
-/*
- * Interface to toggle the reset line
- * Time is in .1 seconds, need for seconds.
- */
-int iSeries_Device_ToggleReset(struct pci_dev *PciDev, int AssertTime,
-               int DelayTime)
+/************************************************************************/
+/* Interface to toggle the reset line                                   */
+/* Time is in .1 seconds, need for seconds.                             */
+/************************************************************************/
+int  iSeries_Device_ToggleReset(struct pci_dev* PciDev, int AssertTime, int DelayTime)
 {
        unsigned long AssertDelay, WaitDelay;
-       struct iSeries_Device_Node *DeviceNode =
-               (struct iSeries_Device_Node *)PciDev->sysdata;
-
+       struct iSeries_Device_Node* DeviceNode = (struct iSeries_Device_Node*)PciDev->sysdata;
        if (DeviceNode == NULL) { 
-               printk("PCI: Pci Reset Failed, Device Node not found for pci_dev %p\n",
-                               PciDev);
+               printk("PCI: Pci Reset Failed, Device Node not found for pci_dev %p\n",PciDev);
                return -1;
        }
-       /*
+       /********************************************************************
         * Set defaults, Assert is .5 second, Wait is 3 seconds.
-        */
-       if (AssertTime == 0)
-               AssertDelay = (5 * HZ) / 10;
-       else
-               AssertDelay = (AssertTime * HZ) / 10;
-       if (WaitDelay == 0)
-               WaitDelay = (30 * HZ) / 10;
-       else
-               WaitDelay = (DelayTime * HZ) / 10;
+        ********************************************************************/
+       if (AssertTime == 0) AssertDelay = ( 5 * HZ)/10;
+       else                 AssertDelay = (AssertTime*HZ)/10;
+       if (WaitDelay == 0)  WaitDelay   = (30 * HZ)/10;
+       else                 WaitDelay   = (DelayTime* HZ)/10;
 
-       /*
+       /********************************************************************
         * Assert reset
-        */
-       DeviceNode->ReturnCode = HvCallPci_setSlotReset(ISERIES_BUS(DeviceNode),
-                       0x00, DeviceNode->AgentId, 1);
+        ********************************************************************/
+       DeviceNode->ReturnCode = HvCallPci_setSlotReset(ISERIES_BUS(DeviceNode),0x00,DeviceNode->AgentId,1);
        if (DeviceNode->ReturnCode == 0) {
                set_current_state(TASK_UNINTERRUPTIBLE);
-               schedule_timeout(AssertDelay);       /* Sleep for the time */
-               DeviceNode->ReturnCode =
-                       HvCallPci_setSlotReset(ISERIES_BUS(DeviceNode),
-                                       0x00, DeviceNode->AgentId, 0);
+               schedule_timeout(AssertDelay);       /* Sleep for the time     */
+               DeviceNode->ReturnCode = HvCallPci_setSlotReset(ISERIES_BUS(DeviceNode),0x00,DeviceNode->AgentId, 0);
 
-               /*
+               /***************************************************************
                 * Wait for device to reset
-                */
+                ***************************************************************/
                set_current_state(TASK_UNINTERRUPTIBLE);  
                schedule_timeout(WaitDelay);
        }
-       if (DeviceNode->ReturnCode == 0)
-               PCIFR("Slot 0x%04X.%02 Reset\n", ISERIES_BUS(DeviceNode),
-                               DeviceNode->AgentId);
+       if (DeviceNode->ReturnCode == 0) {
+               PCIFR("Slot 0x%04X.%02 Reset\n",ISERIES_BUS(DeviceNode),DeviceNode->AgentId );
+       } 
        else {
-               printk("PCI: Slot 0x%04X.%02X Reset Failed, RCode: %04X\n",
-                               ISERIES_BUS(DeviceNode), DeviceNode->AgentId,
-                               DeviceNode->ReturnCode);
-               PCIFR("Slot 0x%04X.%02X Reset Failed, RCode: %04X\n",
-                               ISERIES_BUS(DeviceNode), DeviceNode->AgentId,
-                               DeviceNode->ReturnCode);
+               printk("PCI: Slot 0x%04X.%02X Reset Failed, RCode: %04X\n",ISERIES_BUS(DeviceNode),DeviceNode->AgentId,DeviceNode->ReturnCode);
+               PCIFR(      "Slot 0x%04X.%02X Reset Failed, RCode: %04X\n",ISERIES_BUS(DeviceNode),DeviceNode->AgentId,DeviceNode->ReturnCode);
        }
        return DeviceNode->ReturnCode;
 }
index 47be7ad..b71cbc2 100644 (file)
   * along with this program; if not, write to the Free Software
   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
   */
+
+
+/* Change Activity: */
+/* End Change Activity */
+
 #include <linux/proc_fs.h>
 #include <linux/spinlock.h>
-#include <linux/init.h>
+#ifndef _ISERIES_PROC_H
 #include <asm/iSeries/iSeries_proc.h>
+#endif
 
-static struct proc_dir_entry *iSeries_proc_root;
-static int iSeries_proc_initializationDone;
+
+static struct proc_dir_entry * iSeries_proc_root = NULL;
+static int iSeries_proc_initializationDone = 0;
 static spinlock_t iSeries_proc_lock;
 
-struct iSeries_proc_registration {
+struct iSeries_proc_registration
+{
        struct iSeries_proc_registration *next;
        iSeriesProcFunction functionMember;
 };
 
-struct iSeries_proc_registration preallocated[16];
 
+struct iSeries_proc_registration preallocated[16];
 #define MYQUEUETYPE(T) struct MYQueue##T
 #define MYQUEUE(T) \
 MYQUEUETYPE(T) \
@@ -61,71 +69,74 @@ do { \
        if ((q)->tail == NULL) \
                (q)->head = NULL; \
 } while(0)
-
 MYQUEUE(iSeries_proc_registration);
 typedef MYQUEUETYPE(iSeries_proc_registration) aQueue;
 
-static aQueue iSeries_free;
-static aQueue iSeries_queued;
+
+aQueue iSeries_free;
+aQueue iSeries_queued;
 
 void iSeries_proc_early_init(void)
 {
        int i = 0;
        unsigned long flags;
-
        iSeries_proc_initializationDone = 0;
        spin_lock_init(&iSeries_proc_lock);
        MYQUEUECTOR(&iSeries_free);
        MYQUEUECTOR(&iSeries_queued);
 
        spin_lock_irqsave(&iSeries_proc_lock, flags);
-       for (i = 0; i < 16; ++i)
-               MYQUEUEENQ(&iSeries_free, preallocated + i);
+       for (i = 0; i < 16; ++i) {
+               MYQUEUEENQ(&iSeries_free, preallocated+i);
+       }
        spin_unlock_irqrestore(&iSeries_proc_lock, flags);
 }
 
-static int iSeries_proc_create(void)
+void iSeries_proc_create(void)
 {
        unsigned long flags;
-       struct iSeries_proc_registration *reg;
-
+       struct iSeries_proc_registration *reg = NULL;
+       spin_lock_irqsave(&iSeries_proc_lock, flags);
        printk("iSeries_proc: Creating /proc/iSeries\n");
 
-       spin_lock_irqsave(&iSeries_proc_lock, flags);
        iSeries_proc_root = proc_mkdir("iSeries", 0);
-       if (!iSeries_proc_root)
-               goto out;
+       if (!iSeries_proc_root) return;
 
        MYQUEUEDEQ(&iSeries_queued, reg);
+
        while (reg != NULL) {
                (*(reg->functionMember))(iSeries_proc_root);
+
                MYQUEUEDEQ(&iSeries_queued, reg);
        }
 
        iSeries_proc_initializationDone = 1;
-out:
        spin_unlock_irqrestore(&iSeries_proc_lock, flags);
-       return 0;
 }
 
-arch_initcall(iSeries_proc_create);
-
 void iSeries_proc_callback(iSeriesProcFunction initFunction)
 {
        unsigned long flags;
-
        spin_lock_irqsave(&iSeries_proc_lock, flags);
-       if (iSeries_proc_initializationDone)
+
+       if (iSeries_proc_initializationDone) {
                (*initFunction)(iSeries_proc_root);
-       else {
+       } else {
                struct iSeries_proc_registration *reg = NULL;
 
                MYQUEUEDEQ(&iSeries_free, reg);
+
                if (reg != NULL) {
+                       /* printk("Registering %p in reg %p\n", initFunction, reg); */
                        reg->functionMember = initFunction;
+
                        MYQUEUEENQ(&iSeries_queued, reg);
-               } else
+               } else {
                        printk("Couldn't get a queue entry\n");
+               }
        }
+
        spin_unlock_irqrestore(&iSeries_proc_lock, flags);
 }
+
+
index 35617a9..fa1e331 100644 (file)
@@ -25,8 +25,6 @@
 #include <linux/bootmem.h>
 #include <linux/initrd.h>
 #include <linux/seq_file.h>
-#include <linux/kdev_t.h>
-#include <linux/major.h>
 #include <linux/root_dev.h>
 
 #include <asm/processor.h>
 #include <asm/iSeries/mf.h>
 
 /* Function Prototypes */
+
 extern void abort(void);
+#ifdef CONFIG_PPC_ISERIES
+static void build_iSeries_Memory_Map( void );
+static void setup_iSeries_cache_sizes( void );
+static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr);
+#endif
+void build_valid_hpte( unsigned long vsid, unsigned long ea, unsigned long pa,
+                      pte_t * ptep, unsigned hpteflags, unsigned bolted );
 extern void ppcdbg_initialize(void);
 extern void iSeries_pcibios_init(void);
-
-static void build_iSeries_Memory_Map(void);
-static void setup_iSeries_cache_sizes(void);
-static void iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr);
-void build_valid_hpte(unsigned long vsid, unsigned long ea, unsigned long pa,
-               pte_t *ptep, unsigned hpteflags, unsigned bolted);
 static void iSeries_setup_dprofile(void);
-void iSeries_setup_arch(void);
 
 /* Global Variables */
-static unsigned long procFreqHz;
-static unsigned long procFreqMhz;
-static unsigned long procFreqMhzHundreths;
 
-static unsigned long tbFreqHz;
-static unsigned long tbFreqMhz;
-static unsigned long tbFreqMhzHundreths;
+static unsigned long procFreqHz = 0;
+static unsigned long procFreqMhz = 0;
+static unsigned long procFreqMhzHundreths = 0;
 
-unsigned long dprof_shift;
-unsigned long dprof_len;
-unsigned int *dprof_buffer;
+static unsigned long tbFreqHz = 0;
+static unsigned long tbFreqMhz = 0;
+static unsigned long tbFreqMhzHundreths = 0;
 
-int piranha_simulator;
+unsigned long dprof_shift = 0;
+unsigned long dprof_len = 0;
+unsigned int * dprof_buffer = NULL;
 
-int boot_cpuid;
+int piranha_simulator = 0;
 
 extern char _end[];
 
@@ -94,7 +92,7 @@ extern unsigned long embedded_sysmap_end;
 extern unsigned long iSeries_recal_tb;
 extern unsigned long iSeries_recal_titan;
 
-static int mf_initialized;
+static int mf_initialized = 0;
 
 struct MemoryBlock {
        unsigned long absStart;
@@ -108,30 +106,30 @@ struct MemoryBlock {
  * and return the number of physical blocks and fill in the array of
  * block data.
  */
-unsigned long iSeries_process_Condor_mainstore_vpd(struct MemoryBlock *mb_array,
-               unsigned long max_entries)
+
+unsigned long iSeries_process_Condor_mainstore_vpd( struct MemoryBlock *mb_array, unsigned long max_entries )
 {
+       /* Determine if absolute memory has any
+        * holes so that we can interpret the
+        * access map we get back from the hypervisor
+        * correctly.
+        */
+       
        unsigned long holeFirstChunk, holeSizeChunks;
        unsigned long numMemoryBlocks = 1;
-       struct IoHriMainStoreSegment4 *msVpd =
-               (struct IoHriMainStoreSegment4 *)xMsVpd;
+       struct IoHriMainStoreSegment4 * msVpd = (struct IoHriMainStoreSegment4 *)xMsVpd;
        unsigned long holeStart = msVpd->nonInterleavedBlocksStartAdr;
-       unsigned long holeEnd = msVpd->nonInterleavedBlocksEndAdr;
+       unsigned long holeEnd   = msVpd->nonInterleavedBlocksEndAdr;
        unsigned long holeSize = holeEnd - holeStart;
 
        printk("Mainstore_VPD: Condor\n");
-       /*
-        * Determine if absolute memory has any
-        * holes so that we can interpret the
-        * access map we get back from the hypervisor
-        * correctly.
-        */
+
        mb_array[0].logicalStart = 0;
-       mb_array[0].logicalEnd = 0x100000000;
-       mb_array[0].absStart = 0;
-       mb_array[0].absEnd = 0x100000000;
+       mb_array[0].logicalEnd   = 0x100000000;
+       mb_array[0].absStart     = 0;
+       mb_array[0].absEnd       = 0x100000000;
 
-       if (holeSize) {
+       if ( holeSize ) {
                numMemoryBlocks = 2;
                holeStart = holeStart & 0x000fffffffffffff;
                holeStart = addr_to_chunk(holeStart);
@@ -140,264 +138,275 @@ unsigned long iSeries_process_Condor_mainstore_vpd(struct MemoryBlock *mb_array,
                holeSizeChunks = holeSize;
                printk( "Main store hole: start chunk = %0lx, size = %0lx chunks\n",
                                holeFirstChunk, holeSizeChunks );
-               mb_array[0].logicalEnd = holeFirstChunk;
-               mb_array[0].absEnd = holeFirstChunk;
+               mb_array[0].logicalEnd   = holeFirstChunk;
+               mb_array[0].absEnd       = holeFirstChunk;
                mb_array[1].logicalStart = holeFirstChunk;
-               mb_array[1].logicalEnd = 0x100000000 - holeSizeChunks;
-               mb_array[1].absStart = holeFirstChunk + holeSizeChunks;
-               mb_array[1].absEnd = 0x100000000;
+               mb_array[1].logicalEnd   = 0x100000000 - holeSizeChunks;
+               mb_array[1].absStart     = holeFirstChunk + holeSizeChunks;
+               mb_array[1].absEnd       = 0x100000000;
        }
+
+       
        return numMemoryBlocks;
 }
 
-#define MaxSegmentAreas                        32
-#define MaxSegmentAdrRangeBlocks       128
-#define MaxAreaRangeBlocks             4
-
-unsigned long iSeries_process_Regatta_mainstore_vpd(
-               struct MemoryBlock *mb_array, unsigned long max_entries)
+#define MaxSegmentAreas 32
+#define MaxSegmentAdrRangeBlocks 128
+#define MaxAreaRangeBlocks 4
+unsigned long iSeries_process_Regatta_mainstore_vpd( struct MemoryBlock *mb_array, unsigned long max_entries )
 {
-       struct IoHriMainStoreSegment5 *msVpdP =
-               (struct IoHriMainStoreSegment5 *)xMsVpd;
+       struct IoHriMainStoreSegment5 * msVpdP = (struct IoHriMainStoreSegment5 *)xMsVpd;
        unsigned long numSegmentBlocks = 0;
        u32 existsBits = msVpdP->msAreaExists;
        unsigned long area_num;
 
        printk("Mainstore_VPD: Regatta\n");
 
-       for (area_num = 0; area_num < MaxSegmentAreas; ++area_num ) {
+       for ( area_num = 0; area_num < MaxSegmentAreas; ++area_num ) {
                unsigned long numAreaBlocks;
-               struct IoHriMainStoreArea4 *currentArea;
+               struct IoHriMainStoreArea4 * currentArea;
 
-               if (existsBits & 0x80000000) {
+               if ( existsBits & 0x80000000 ) {
                        unsigned long block_num;
 
                        currentArea = &msVpdP->msAreaArray[area_num];
                        numAreaBlocks = currentArea->numAdrRangeBlocks;
-                       printk("ms_vpd: processing area %2ld  blocks=%ld",
-                                       area_num, numAreaBlocks);
-                       for (block_num = 0; block_num < numAreaBlocks;
-                                       ++block_num ) {
+
+                       printk("ms_vpd: processing area %2ld  blocks=%ld", area_num, numAreaBlocks);
+
+                       for ( block_num = 0; block_num < numAreaBlocks; ++block_num ) {
                                /* Process an address range block */
                                struct MemoryBlock tempBlock;
                                unsigned long i;
 
-                               tempBlock.absStart =
-                                       (unsigned long)currentArea->xAdrRangeBlock[block_num].blockStart;
-                               tempBlock.absEnd =
-                                       (unsigned long)currentArea->xAdrRangeBlock[block_num].blockEnd;
+                               tempBlock.absStart = (unsigned long)currentArea->xAdrRangeBlock[block_num].blockStart;
+                               tempBlock.absEnd   = (unsigned long)currentArea->xAdrRangeBlock[block_num].blockEnd;
                                tempBlock.logicalStart = 0;
                                tempBlock.logicalEnd   = 0;
-                               printk("\n          block %ld absStart=%016lx absEnd=%016lx",
-                                               block_num, tempBlock.absStart,
-                                               tempBlock.absEnd);
 
-                               for (i = 0; i < numSegmentBlocks; ++i) {
-                                       if (mb_array[i].absStart ==
-                                                       tempBlock.absStart)
+                               printk("\n          block %ld absStart=%016lx absEnd=%016lx", block_num,
+                                                       tempBlock.absStart, tempBlock.absEnd);
+
+                               for ( i=0; i<numSegmentBlocks; ++i ) {
+                                       if ( mb_array[i].absStart == tempBlock.absStart )
                                                break;
                                }
-                               if (i == numSegmentBlocks) {
-                                       if (numSegmentBlocks == max_entries)
+                               if ( i == numSegmentBlocks ) {
+                                       if ( numSegmentBlocks == max_entries ) {
                                                panic("iSeries_process_mainstore_vpd: too many memory blocks");
+                                       }
                                        mb_array[numSegmentBlocks] = tempBlock;
                                        ++numSegmentBlocks;
-                               } else
+                               }
+                               else {
                                        printk(" (duplicate)");
+                               }
                        }
                        printk("\n");
                }
                existsBits <<= 1;
        }
        /* Now sort the blocks found into ascending sequence */
-       if (numSegmentBlocks > 1) {
+       if ( numSegmentBlocks > 1 ) {
                unsigned long m, n;
-
-               for (m = 0; m < numSegmentBlocks - 1; ++m) {
-                       for (n = numSegmentBlocks - 1; m < n; --n) {
-                               if (mb_array[n].absStart <
-                                               mb_array[n-1].absStart) {
+               for ( m=0; m<numSegmentBlocks-1; ++m ) {
+                       for ( n=numSegmentBlocks-1; m<n; --n ) {
+                               if ( mb_array[n].absStart < mb_array[n-1].absStart ) {
                                        struct MemoryBlock tempBlock;
-
                                        tempBlock = mb_array[n];
                                        mb_array[n] = mb_array[n-1];
                                        mb_array[n-1] = tempBlock;
                                }
+                               
                        }
                }
        }
-       /*
-        * Assign "logical" addresses to each block.  These
+       /* Assign "logical" addresses to each block.  These
         * addresses correspond to the hypervisor "bitmap" space.
         * Convert all addresses into units of 256K chunks.
         */
        {
        unsigned long i, nextBitmapAddress;
-
        printk("ms_vpd: %ld sorted memory blocks\n", numSegmentBlocks);
        nextBitmapAddress = 0;
-       for (i = 0; i < numSegmentBlocks; ++i) {
-               unsigned long length = mb_array[i].absEnd -
-                       mb_array[i].absStart;
-
+       for ( i=0; i<numSegmentBlocks; ++i ) {
+               unsigned long length = mb_array[i].absEnd - mb_array[i].absStart;
                mb_array[i].logicalStart = nextBitmapAddress;
                mb_array[i].logicalEnd = nextBitmapAddress + length;
                nextBitmapAddress += length;
                printk("          Bitmap range: %016lx - %016lx\n"
-                               "        Absolute range: %016lx - %016lx\n",
-                               mb_array[i].logicalStart,
-                               mb_array[i].logicalEnd, 
+                      "        Absolute range: %016lx - %016lx\n",
+                               mb_array[i].logicalStart, mb_array[i].logicalEnd, 
                                mb_array[i].absStart, mb_array[i].absEnd);
-               mb_array[i].absStart = addr_to_chunk(mb_array[i].absStart &
-                               0x000fffffffffffff);
-               mb_array[i].absEnd = addr_to_chunk(mb_array[i].absEnd &
-                               0x000fffffffffffff);
-               mb_array[i].logicalStart =
-                       addr_to_chunk(mb_array[i].logicalStart);
-               mb_array[i].logicalEnd = addr_to_chunk(mb_array[i].logicalEnd);
+               mb_array[i].absStart     = addr_to_chunk( mb_array[i].absStart & 0x000fffffffffffff );
+               mb_array[i].absEnd       = addr_to_chunk( mb_array[i].absEnd & 0x000fffffffffffff );
+               mb_array[i].logicalStart = addr_to_chunk( mb_array[i].logicalStart );
+               mb_array[i].logicalEnd   = addr_to_chunk( mb_array[i].logicalEnd );
        }
        }
 
        return numSegmentBlocks;
+
 }
 
-unsigned long iSeries_process_mainstore_vpd(struct MemoryBlock *mb_array,
-               unsigned long max_entries)
+unsigned long iSeries_process_mainstore_vpd( struct MemoryBlock *mb_array, unsigned long max_entries )
 {
        unsigned long i;
        unsigned long mem_blocks = 0;
-
        if (cur_cpu_spec->cpu_features & CPU_FTR_SLB)
-               mem_blocks = iSeries_process_Regatta_mainstore_vpd(mb_array,
-                               max_entries);
+               mem_blocks = iSeries_process_Regatta_mainstore_vpd( mb_array, max_entries );
        else
-               mem_blocks = iSeries_process_Condor_mainstore_vpd(mb_array,
-                               max_entries);
+               mem_blocks = iSeries_process_Condor_mainstore_vpd( mb_array, max_entries );
 
        printk("Mainstore_VPD: numMemoryBlocks = %ld \n", mem_blocks);
-       for (i = 0; i < mem_blocks; ++i) {
+       for ( i=0; i<mem_blocks; ++i ) {
                printk("Mainstore_VPD: block %3ld logical chunks %016lx - %016lx\n"
                       "                             abs chunks %016lx - %016lx\n",
                        i, mb_array[i].logicalStart, mb_array[i].logicalEnd,
                        mb_array[i].absStart, mb_array[i].absEnd);
        }
+
        return mem_blocks;
 }
 
-void __init iSeries_init_early(void)
+/*
+ * void __init iSeries_init_early()
+ */
+
+
+
+void __init
+iSeries_init_early(void)
 {
+#ifdef CONFIG_PPC_ISERIES
        ppcdbg_initialize();
-
+       
 #if defined(CONFIG_BLK_DEV_INITRD)
        /*
         * If the init RAM disk has been configured and there is
         * a non-zero starting address for it, set it up
         */
-       if (naca->xRamDisk) {
+
+       if ( naca->xRamDisk ) {
                initrd_start = (unsigned long)__va(naca->xRamDisk);
-               initrd_end = initrd_start + naca->xRamDiskSize * PAGE_SIZE;
+               initrd_end   = initrd_start + naca->xRamDiskSize * PAGE_SIZE;
                initrd_below_start_ok = 1;      // ramdisk in kernel space
                ROOT_DEV = Root_RAM0;
-               if (((rd_size * 1024) / PAGE_SIZE) < naca->xRamDiskSize)
-                       rd_size = (naca->xRamDiskSize * PAGE_SIZE) / 1024;
+
+               if ( ((rd_size*1024)/PAGE_SIZE) < naca->xRamDiskSize )
+                       rd_size = (naca->xRamDiskSize*PAGE_SIZE)/1024;
        } else
+       
 #endif /* CONFIG_BLK_DEV_INITRD */
-       {
-           /* ROOT_DEV = MKDEV(VIODASD_MAJOR, 1); */
-       }
+         {
+                
+           /*          ROOT_DEV = MKDEV( VIODASD_MAJOR, 1 ); */
+         }
 
        iSeries_recal_tb = get_tb();
        iSeries_recal_titan = HvCallXm_loadTod();
 
-       ppc_md.setup_arch = iSeries_setup_arch;
-       ppc_md.setup_residual = iSeries_setup_residual;
-       ppc_md.get_cpuinfo = iSeries_get_cpuinfo;
-       ppc_md.init_IRQ = iSeries_init_IRQ;
-       ppc_md.init_irq_desc = iSeries_init_irq_desc;
-       ppc_md.get_irq = iSeries_get_irq;
-       ppc_md.init = NULL;
+       ppc_md.setup_arch               = iSeries_setup_arch;
+       ppc_md.setup_residual           = iSeries_setup_residual;
+       ppc_md.get_cpuinfo              = iSeries_get_cpuinfo;
+       ppc_md.init_IRQ                 = iSeries_init_IRQ;
+       ppc_md.get_irq                  = iSeries_get_irq;
+       ppc_md.init                     = NULL;
 
-       ppc_md.restart = iSeries_restart;
-       ppc_md.power_off = iSeries_power_off;
-       ppc_md.halt = iSeries_halt;
+       ppc_md.restart                  = iSeries_restart;
+       ppc_md.power_off                = iSeries_power_off;
+       ppc_md.halt                     = iSeries_halt;
 
-       ppc_md.get_boot_time = iSeries_get_boot_time;
-       ppc_md.set_rtc_time = iSeries_set_rtc_time;
-       ppc_md.get_rtc_time = iSeries_get_rtc_time;
-       ppc_md.calibrate_decr = iSeries_calibrate_decr;
-       ppc_md.progress = iSeries_progress;
+       ppc_md.get_boot_time            = iSeries_get_boot_time;
+       ppc_md.set_rtc_time             = iSeries_set_rtc_time;
+       ppc_md.get_rtc_time             = iSeries_get_rtc_time;
+       ppc_md.calibrate_decr           = iSeries_calibrate_decr;
+       ppc_md.progress                 = iSeries_progress;
 
        hpte_init_iSeries();
        tce_init_iSeries();
 
-       /*
-        * Initialize the table which translate Linux physical addresses to
+       /* Initialize the table which translate Linux physical addresses to
         * AS/400 absolute addresses
         */
+
        build_iSeries_Memory_Map();
+
        setup_iSeries_cache_sizes();
+
        /* Initialize machine-dependency vectors */
+
+
 #ifdef CONFIG_SMP
        smp_init_iSeries();
 #endif
-       if (itLpNaca.xPirEnvironMode == 0) 
+
+       if ( itLpNaca.xPirEnvironMode == 0 ) 
                piranha_simulator = 1;
+#endif
 }
 
-void __init iSeries_init(unsigned long r3, unsigned long r4, unsigned long r5, 
+/*
+ * void __init iSeries_init()
+ */
+
+void __init
+iSeries_init(unsigned long r3, unsigned long r4, unsigned long r5, 
           unsigned long r6, unsigned long r7)
 {
-       char *p, *q;
-
        /* Associate Lp Event Queue 0 with processor 0 */
-       HvCallEvent_setLpEventQueueInterruptProc(0, 0);
-
-       /* copy the command line parameter from the primary VSP  */
-       HvCallEvent_dmaToSp(cmd_line, 2 * 64* 1024, 256,
-                       HvLpDma_Direction_RemoteToLocal);
-
-       p = q = cmd_line + 255;
-       while (p > cmd_line) {
-               if ((*p == 0) || (*p == ' ') || (*p == '\n'))
-                       --p;
-               else
-                       break;
+       HvCallEvent_setLpEventQueueInterruptProc( 0, 0 );
+
+       {
+               /* copy the command line parameter from the primary VSP  */
+               char *p, *q;
+               HvCallEvent_dmaToSp( cmd_line,
+                                    2*64*1024,
+                                    256,
+                                    HvLpDma_Direction_RemoteToLocal );
+
+               p = q = cmd_line + 255;
+               while( p > cmd_line ) {
+                       if ((*p == 0) || (*p == ' ') || (*p == '\n'))
+                               --p;
+                       else
+                               break;
+               }
+               if ( p < q )
+                       *(p+1) = 0;
        }
-       if (p < q)
-               *(p + 1) = 0;
 
         if (strstr(cmd_line, "dprofile=")) {
+                char *p, *q;
+
                 for (q = cmd_line; (p = strstr(q, "dprofile=")) != 0; ) {
                        unsigned long size, new_klimit;
-
                         q = p + 9;
-                        if ((p > cmd_line) && (p[-1] != ' '))
+                        if (p > cmd_line && p[-1] != ' ')
                                 continue;
                         dprof_shift = simple_strtoul(q, &q, 0);
-                       dprof_len = (unsigned long)_etext -
-                               (unsigned long)_stext;
+                       dprof_len = (unsigned long)_etext - (unsigned long)_stext;
                        dprof_len >>= dprof_shift;
-                       size = ((dprof_len * sizeof(unsigned int)) +
-                                       (PAGE_SIZE-1)) & PAGE_MASK;
-                       dprof_buffer = (unsigned int *)((klimit +
-                                               (PAGE_SIZE-1)) & PAGE_MASK);
+                       size = ((dprof_len * sizeof(unsigned int)) + (PAGE_SIZE-1)) & PAGE_MASK;
+                       dprof_buffer = (unsigned int *)((klimit + (PAGE_SIZE-1)) & PAGE_MASK);
                        new_klimit = ((unsigned long)dprof_buffer) + size;
-                       lmb_reserve(__pa(klimit), (new_klimit-klimit));
+                       lmb_reserve( __pa(klimit), (new_klimit-klimit));
                        klimit = new_klimit;
-                       memset(dprof_buffer, 0, size);
+                       memset( dprof_buffer, 0, size );
                 }
         }
 
        iSeries_setup_dprofile();
 
-       iSeries_proc_early_init();
+       iSeries_proc_early_init();      
        mf_init();
        mf_initialized = 1;
        mb();
 
-       iSeries_proc_callback(&pmc_proc_init);
+       iSeries_proc_callback( &pmc_proc_init );
 }
 
+#ifdef CONFIG_PPC_ISERIES
 /*
  * The iSeries may have very large memories ( > 128 GB ) and a partition
  * may get memory in "chunks" that may be anywhere in the 2**52 real
@@ -435,10 +444,9 @@ static void __init build_iSeries_Memory_Map(void)
 
        /* Chunk size on iSeries is 256K bytes */
        totalChunks = (u32)HvLpConfig_getMsChunks();
-       klimit = msChunks_alloc(klimit, totalChunks, 1UL << 18);
+       klimit = msChunks_alloc(klimit, totalChunks, 1UL<<18);
 
-       /*
-        * Get absolute address of our load area
+       /* Get absolute address of our load area
         * and map it to physical address 0
         * This guarantees that the loadarea ends up at physical 0
         * otherwise, it might not be returned by PLIC as the first
@@ -448,68 +456,63 @@ static void __init build_iSeries_Memory_Map(void)
        loadAreaFirstChunk = (u32)addr_to_chunk(itLpNaca.xLoadAreaAddr);
        loadAreaSize =  itLpNaca.xLoadAreaChunks;
 
-       /*
-        * Only add the pages already mapped here.  
+       /* Only add the pages already mapped here.  
         * Otherwise we might add the hpt pages 
         * The rest of the pages of the load area
         * aren't in the HPT yet and can still
         * be assigned an arbitrary physical address
         */
-       if ((loadAreaSize * 64) > HvPagesToMap)
+       if ( (loadAreaSize * 64) > HvPagesToMap )
                loadAreaSize = HvPagesToMap / 64;
 
        loadAreaLastChunk = loadAreaFirstChunk + loadAreaSize - 1;
 
-       /*
-        * TODO Do we need to do something if the HPT is in the 64MB load area?
+       /* TODO Do we need to do something if the HPT is in the 64MB load area?
         * This would be required if the itLpNaca.xLoadAreaChunks includes 
         * the HPT size
         */
 
-       printk("Mapping load area - physical addr = 0000000000000000\n"
-               "                    absolute addr = %016lx\n",
-               chunk_to_addr(loadAreaFirstChunk));
-       printk("Load area size %dK\n", loadAreaSize * 256);
+       printk( "Mapping load area - physical addr = 0000000000000000\n"
+                "                    absolute addr = %016lx\n", 
+                       chunk_to_addr(loadAreaFirstChunk) );
+       printk( "Load area size %dK\n", loadAreaSize*256 );
        
-       for (nextPhysChunk = 0; nextPhysChunk < loadAreaSize; ++nextPhysChunk)
-               msChunks.abs[nextPhysChunk] =
-                       loadAreaFirstChunk + nextPhysChunk;
+       for (   nextPhysChunk = 0; 
+               nextPhysChunk < loadAreaSize; 
+               ++nextPhysChunk ) {
+               msChunks.abs[nextPhysChunk] = loadAreaFirstChunk+nextPhysChunk;
+       }
        
-       /*
-        * Get absolute address of our HPT and remember it so
+       /* Get absolute address of our HPT and remember it so
         * we won't map it to any physical address
         */
+
        hptFirstChunk = (u32)addr_to_chunk(HvCallHpt_getHptAddress());
-       hptSizePages = (u32)HvCallHpt_getHptPages();
-       hptSizeChunks = hptSizePages >> (msChunks.chunk_shift - PAGE_SHIFT);
+       hptSizePages =  (u32)(HvCallHpt_getHptPages());
+       hptSizeChunks = hptSizePages >> (msChunks.chunk_shift-PAGE_SHIFT);
        hptLastChunk = hptFirstChunk + hptSizeChunks - 1;
-
-       printk("HPT absolute addr = %016lx, size = %dK\n",
-                       chunk_to_addr(hptFirstChunk), hptSizeChunks * 256);
+       
+       printk( "HPT absolute addr = %016lx, size = %dK\n",
+                       chunk_to_addr(hptFirstChunk), hptSizeChunks*256 );
 
        /* Fill in the htab_data structure */
+       
        /* Fill in size of hashed page table */
-       num_ptegs = hptSizePages *
-               (PAGE_SIZE / (sizeof(HPTE) * HPTES_PER_GROUP));
+       num_ptegs = hptSizePages * (PAGE_SIZE/(sizeof(HPTE)*HPTES_PER_GROUP));
        htab_data.htab_num_ptegs = num_ptegs;
        htab_data.htab_hash_mask = num_ptegs - 1;
        
-       /*
-        * The actual hashed page table is in the hypervisor,
-        * we have no direct access
-        */
+       /* The actual hashed page table is in the hypervisor, we have no direct access */
        htab_data.htab = NULL;
 
-       /*
-        * Determine if absolute memory has any
+       /* Determine if absolute memory has any
         * holes so that we can interpret the
         * access map we get back from the hypervisor
         * correctly.
         */
-       numMemoryBlocks = iSeries_process_mainstore_vpd(mb, 32);
+       numMemoryBlocks = iSeries_process_mainstore_vpd( mb, 32 );
 
-       /*
-        * Process the main store access map from the hypervisor
+       /* Process the main store access map from the hypervisor
         * to build up our physical -> absolute translation table
         */
        curBlock = 0;
@@ -517,29 +520,30 @@ static void __init build_iSeries_Memory_Map(void)
        currDword = 0;
        moreChunks = totalChunks;
 
-       while (moreChunks) {
-               map = HvCallSm_get64BitsOfAccessMap(itLpNaca.xLpIndex,
-                               currDword);
+       while ( moreChunks ) {
+               map = HvCallSm_get64BitsOfAccessMap( itLpNaca.xLpIndex,
+                                                    currDword );
                thisChunk = currChunk;
-               while (map) {
+               while ( map ) {
                        chunkBit = map >> 63;
                        map <<= 1;
-                       if (chunkBit) {
+                       if ( chunkBit ) {
                                --moreChunks;
-                               while (thisChunk >= mb[curBlock].logicalEnd) {
+
+                               while ( thisChunk >= mb[curBlock].logicalEnd ) {
                                        ++curBlock;
-                                       if (curBlock >= numMemoryBlocks)
+                                       if ( curBlock >= numMemoryBlocks )
                                                panic("out of memory blocks");
                                }
-                               if (thisChunk < mb[curBlock].logicalStart)
+                               if ( thisChunk < mb[curBlock].logicalStart )
                                        panic("memory block error");
 
-                               absChunk = mb[curBlock].absStart +
-                                       (thisChunk - mb[curBlock].logicalStart);
-                               if (((absChunk < hptFirstChunk) ||
-                                    (absChunk > hptLastChunk)) &&
-                                   ((absChunk < loadAreaFirstChunk) ||
-                                    (absChunk > loadAreaLastChunk))) {
+                               absChunk = mb[curBlock].absStart + ( thisChunk - mb[curBlock].logicalStart );
+
+                               if ( ( ( absChunk < hptFirstChunk ) ||
+                                      ( absChunk > hptLastChunk ) ) &&
+                                    ( ( absChunk < loadAreaFirstChunk ) ||
+                                      ( absChunk > loadAreaLastChunk ) ) ) {
                                        msChunks.abs[nextPhysChunk] = absChunk;
                                        ++nextPhysChunk;
                                }
@@ -549,9 +553,8 @@ static void __init build_iSeries_Memory_Map(void)
                ++currDword;
                currChunk += 64;
        }
-
-       /*
-        * main store size (in chunks) is 
+                                       
+       /* main store size (in chunks) is 
         *   totalChunks - hptSizeChunks
         * which should be equal to 
         *   nextPhysChunk
@@ -559,12 +562,12 @@ static void __init build_iSeries_Memory_Map(void)
        systemcfg->physicalMemorySize = chunk_to_addr(nextPhysChunk);
 
        /* Bolt kernel mappings for all of memory */
-       iSeries_bolt_kernel(0, systemcfg->physicalMemorySize);
+       iSeries_bolt_kernel( 0, systemcfg->physicalMemorySize );
 
        lmb_init();
-       lmb_add(0, systemcfg->physicalMemorySize);
+       lmb_add( 0, systemcfg->physicalMemorySize );
        lmb_analyze();  /* ?? */
-       lmb_reserve(0, __pa(klimit));
+       lmb_reserve( 0, __pa(klimit));
 
        /* 
         * Hardcode to GP size.  I am not sure where to get this info. DRENG
@@ -576,94 +579,59 @@ static void __init build_iSeries_Memory_Map(void)
  * Set up the variables that describe the cache line sizes
  * for this machine.
  */
+
 static void __init setup_iSeries_cache_sizes(void)
 {
        unsigned int i, n;
        unsigned int procIx = get_paca()->xLpPaca.xDynHvPhysicalProcIndex;
 
-       systemcfg->iCacheL1Size =
-               xIoHriProcessorVpd[procIx].xInstCacheSize * 1024;
-       systemcfg->iCacheL1LineSize =
-               xIoHriProcessorVpd[procIx].xInstCacheOperandSize;
-       systemcfg->dCacheL1Size =
-               xIoHriProcessorVpd[procIx].xDataL1CacheSizeKB * 1024;
-       systemcfg->dCacheL1LineSize =
-               xIoHriProcessorVpd[procIx].xDataCacheOperandSize;
+       systemcfg->iCacheL1Size = xIoHriProcessorVpd[procIx].xInstCacheSize * 1024;
+       systemcfg->iCacheL1LineSize = xIoHriProcessorVpd[procIx].xInstCacheOperandSize;
+       systemcfg->dCacheL1Size = xIoHriProcessorVpd[procIx].xDataL1CacheSizeKB * 1024;
+       systemcfg->dCacheL1LineSize = xIoHriProcessorVpd[procIx].xDataCacheOperandSize;
        naca->iCacheL1LinesPerPage = PAGE_SIZE / systemcfg->iCacheL1LineSize;
        naca->dCacheL1LinesPerPage = PAGE_SIZE / systemcfg->dCacheL1LineSize;
 
        i = systemcfg->iCacheL1LineSize;
        n = 0;
-       while ((i = (i / 2)))
-               ++n;
+       while ((i=(i/2))) ++n;
        naca->iCacheL1LogLineSize = n;
 
        i = systemcfg->dCacheL1LineSize;
        n = 0;
-       while ((i = (i / 2)))
-               ++n;
+       while ((i=(i/2))) ++n;
        naca->dCacheL1LogLineSize = n;
 
-       printk("D-cache line size = %d\n",
-                       (unsigned int)systemcfg->dCacheL1LineSize);
-       printk("I-cache line size = %d\n",
-                       (unsigned int)systemcfg->iCacheL1LineSize);
-}
-
-/*
- * Create a pte. Used during initialization only.
- */
-static void iSeries_make_pte(unsigned long va, unsigned long pa,
-                            int mode)
-{
-       HPTE local_hpte, rhpte;
-       unsigned long hash, vpn;
-       long slot;
-
-       vpn = va >> PAGE_SHIFT;
-       hash = hpt_hash(vpn, 0);
-
-       local_hpte.dw1.dword1 = pa | mode;
-       local_hpte.dw0.dword0 = 0;
-       local_hpte.dw0.dw0.avpn = va >> 23;
-       local_hpte.dw0.dw0.bolted = 1;          /* bolted */
-       local_hpte.dw0.dw0.v = 1;
-
-       slot = HvCallHpt_findValid(&rhpte, vpn);
-       if (slot < 0) {
-               /* Must find space in primary group */
-               panic("hash_page: hpte already exists\n");
-       }
-       HvCallHpt_addValidate(slot, 0, (HPTE *)&local_hpte );
+       printk( "D-cache line size = %d\n", (unsigned int)systemcfg->dCacheL1LineSize);
+       printk( "I-cache line size = %d\n", (unsigned int)systemcfg->iCacheL1LineSize);
 }
 
 /*
  * Bolt the kernel addr space into the HPT
  */
+
 static void __init iSeries_bolt_kernel(unsigned long saddr, unsigned long eaddr)
 {
        unsigned long pa;
        unsigned long mode_rw = _PAGE_ACCESSED | _PAGE_COHERENT | PP_RWXX;
        HPTE hpte;
 
-       for (pa = saddr; pa < eaddr ;pa += PAGE_SIZE) {
+       for (pa=saddr; pa < eaddr ;pa+=PAGE_SIZE) {
                unsigned long ea = (unsigned long)__va(pa);
-               unsigned long vsid = get_kernel_vsid(ea);
-               unsigned long va = (vsid << 28) | (pa & 0xfffffff);
+               unsigned long vsid = get_kernel_vsid( ea );
+               unsigned long va = ( vsid << 28 ) | ( pa & 0xfffffff );
                unsigned long vpn = va >> PAGE_SHIFT;
-               unsigned long slot = HvCallHpt_findValid(&hpte, vpn);
-
-               if (hpte.dw0.dw0.v) {
+               unsigned long slot = HvCallHpt_findValid( &hpte, vpn );
+               if ( hpte.dw0.dw0.v ) {
                        /* HPTE exists, so just bolt it */
-                       HvCallHpt_setSwBits(slot, 0x10, 0);
-                       /* And make sure the pp bits are correct */
-                       HvCallHpt_setPp(slot, PP_RWXX);
-               } else
+                       HvCallHpt_setSwBits( slot, 0x10, 0 );
+               } else {
                        /* No HPTE exists, so create a new bolted one */
-                       iSeries_make_pte(va, (unsigned long)__v2a(ea),
-                                       mode_rw);
+                       build_valid_hpte(vsid, ea, pa, NULL, mode_rw, 1);
+               }
        }
 }
+#endif /* CONFIG_PPC_ISERIES */
 
 extern unsigned long ppc_proc_freq;
 extern unsigned long ppc_tb_freq;
@@ -671,9 +639,10 @@ extern unsigned long ppc_tb_freq;
 /*
  * Document me.
  */
-void __init iSeries_setup_arch(void)
+void __init
+iSeries_setup_arch(void)
 {
-       void *eventStack;
+       void *  eventStack;
        unsigned procIx = get_paca()->xLpPaca.xDynHvPhysicalProcIndex;
 
        /* Add an eye catcher and the systemcfg layout version number */
@@ -688,43 +657,50 @@ void __init iSeries_setup_arch(void)
         * we subtract out the KERNELBASE and add in the
         * absolute real address of the kernel load area
         */
-       eventStack = alloc_bootmem_pages(LpEventStackSize);
-       memset(eventStack, 0, LpEventStackSize);
+       
+       eventStack = alloc_bootmem_pages( LpEventStackSize );
+       
+       memset( eventStack, 0, LpEventStackSize );
        
        /* Invoke the hypervisor to initialize the event stack */
-       HvCallEvent_setLpEventStack(0, eventStack, LpEventStackSize);
-
+       
+       HvCallEvent_setLpEventStack( 0, eventStack, LpEventStackSize );
+       
        /* Initialize fields in our Lp Event Queue */
+       
        xItLpQueue.xSlicEventStackPtr = (char *)eventStack;
        xItLpQueue.xSlicCurEventPtr = (char *)eventStack;
        xItLpQueue.xSlicLastValidEventPtr = (char *)eventStack + 
                                        (LpEventStackSize - LpEventMaxSize);
        xItLpQueue.xIndex = 0;
-
+       
        /* Compute processor frequency */
-       procFreqHz = ((1UL << 34) * 1000000) /
-                       xIoHriProcessorVpd[procIx].xProcFreq;
+       procFreqHz = (((1UL<<34) * 1000000) / xIoHriProcessorVpd[procIx].xProcFreq );
        procFreqMhz = procFreqHz / 1000000;
-       procFreqMhzHundreths = (procFreqHz / 10000) - (procFreqMhz * 100);
+       procFreqMhzHundreths = (procFreqHz/10000) - (procFreqMhz*100);
+
        ppc_proc_freq = procFreqHz;
 
        /* Compute time base frequency */
-       tbFreqHz = ((1UL << 32) * 1000000) /
-               xIoHriProcessorVpd[procIx].xTimeBaseFreq;
+       tbFreqHz = (((1UL<<32) * 1000000) / xIoHriProcessorVpd[procIx].xTimeBaseFreq );
        tbFreqMhz = tbFreqHz / 1000000;
-       tbFreqMhzHundreths = (tbFreqHz / 10000) - (tbFreqMhz * 100);
+       tbFreqMhzHundreths = (tbFreqHz/10000) - (tbFreqMhz*100);
+
        ppc_tb_freq = tbFreqHz;
 
        printk("Max  logical processors = %d\n", 
-                       itVpdAreas.xSlicMaxLogicalProcs);
+                       itVpdAreas.xSlicMaxLogicalProcs );
        printk("Max physical processors = %d\n",
-                       itVpdAreas.xSlicMaxPhysicalProcs);
-       printk("Processor frequency = %lu.%02lu\n", procFreqMhz,
-                       procFreqMhzHundreths);
-       printk("Time base frequency = %lu.%02lu\n", tbFreqMhz,
-                       tbFreqMhzHundreths);
+                       itVpdAreas.xSlicMaxPhysicalProcs );
+       printk("Processor frequency = %lu.%02lu\n",
+                       procFreqMhz, 
+                       procFreqMhzHundreths );
+       printk("Time base frequency = %lu.%02lu\n",
+                       tbFreqMhz,
+                       tbFreqMhzHundreths );
        systemcfg->processor = xIoHriProcessorVpd[procIx].xPVR;
        printk("Processor version = %x\n", systemcfg->processor);
+
 }
 
 /*
@@ -739,27 +715,38 @@ void __init iSeries_setup_arch(void)
  *
  * Output(s):
  *  *buffer - Buffer with CPU data.
+ *
+ * Returns:
+ *   The number of bytes copied into 'buffer' if OK, otherwise zero or less
+ *   on error.
  */
-void iSeries_setup_residual(struct seq_file *m, int cpu_id)
+void iSeries_setup_residual(struct seq_file *m)
 {
-       seq_printf(m, "clock\t\t: %lu.%02luMhz\n", procFreqMhz,
-                       procFreqMhzHundreths);
-       seq_printf(m, "time base\t: %lu.%02luMHz\n", tbFreqMhz,
-                       tbFreqMhzHundreths);
-       seq_printf(m, "i-cache\t\t: %d\n", systemcfg->iCacheL1LineSize);
-       seq_printf(m, "d-cache\t\t: %d\n", systemcfg->dCacheL1LineSize);
+       
+       seq_printf(m,"clock\t\t: %lu.%02luMhz\n",
+               procFreqMhz, procFreqMhzHundreths );
+       seq_printf(m,"time base\t: %lu.%02luMHz\n",
+               tbFreqMhz, tbFreqMhzHundreths );
+       seq_printf(m,"i-cache\t\t: %d\n",
+               systemcfg->iCacheL1LineSize);
+       seq_printf(m,"d-cache\t\t: %d\n",
+               systemcfg->dCacheL1LineSize);
+
 }
 
 void iSeries_get_cpuinfo(struct seq_file *m)
 {
-       seq_printf(m, "machine\t\t: 64-bit iSeries Logical Partition\n");
+
+       seq_printf(m,"machine\t\t: 64-bit iSeries Logical Partition\n");
+
 }
 
 /*
  * Document me.
  * and Implement me.
  */
-int iSeries_get_irq(struct pt_regs *regs)
+int
+iSeries_get_irq(struct pt_regs *regs)
 {
        /* -2 means ignore this interrupt */
        return -2;
@@ -768,7 +755,8 @@ int iSeries_get_irq(struct pt_regs *regs)
 /*
  * Document me.
  */
-void iSeries_restart(char *cmd)
+void
+iSeries_restart(char *cmd)
 {
        mf_reboot();
 }
@@ -776,7 +764,8 @@ void iSeries_restart(char *cmd)
 /*
  * Document me.
  */
-void iSeries_power_off(void)
+void
+iSeries_power_off(void)
 {
        mf_powerOff();
 }
@@ -784,7 +773,8 @@ void iSeries_power_off(void)
 /*
  * Document me.
  */
-void iSeries_halt(void)
+void
+iSeries_halt(void)
 {
        mf_powerOff();
 }
@@ -802,19 +792,24 @@ extern void setup_default_decr(void);
  *   and sets up the kernel timer decrementer based on that value.
  *
  */
-void __init iSeries_calibrate_decr(void)
+void __init
+iSeries_calibrate_decr(void)
 {
        unsigned long   cyclesPerUsec;
+
        struct div_result divres;
        
-       /* Compute decrementer (and TB) frequency in cycles/sec */
-       cyclesPerUsec = ppc_tb_freq / 1000000;
+       /* Compute decrementer (and TB) frequency 
+        * in cycles/sec 
+        */
 
-       /*
-        * Set the amount to refresh the decrementer by.  This
+       cyclesPerUsec = ppc_tb_freq / 1000000;  /* cycles / usec */
+
+       /* Set the amount to refresh the decrementer by.  This
         * is the number of decrementer ticks it takes for 
         * 1/HZ seconds.
         */
+
        tb_ticks_per_jiffy = ppc_tb_freq / HZ;
 
 #if 0
@@ -829,54 +824,47 @@ void __init iSeries_calibrate_decr(void)
         * that jiffies (and xtime) will match the time returned
         * by do_gettimeofday.
         */
-       tb_ticks_per_sec = tb_ticks_per_jiffy * HZ;
+       tb_ticks_per_sec   = tb_ticks_per_jiffy * HZ;
        tb_ticks_per_usec = cyclesPerUsec;
        tb_to_us = mulhwu_scale_factor(ppc_tb_freq, 1000000);
-       div128_by_32(1024 * 1024, 0, tb_ticks_per_sec, &divres);
+       div128_by_32( 1024*1024, 0, tb_ticks_per_sec, &divres );
        tb_to_xs = divres.result_low;
        setup_default_decr();
 }
 
-void __init iSeries_progress(char * st, unsigned short code)
+void __init
+iSeries_progress( char * st, unsigned short code )
 {
-       printk("Progress: [%04x] - %s\n", (unsigned)code, st);
-       if (!piranha_simulator && mf_initialized) {
-               if (code != 0xffff)
-                       mf_displayProgress(code);
-               else
-                       mf_clearSrc();
+       printk( "Progress: [%04x] - %s\n", (unsigned)code, st );
+       if ( !piranha_simulator && mf_initialized ) {
+           if (code != 0xffff)
+               mf_displayProgress( code );
+           else
+               mf_clearSrc();
        }
 }
 
+
 void iSeries_fixup_klimit(void)
 {
-       /*
-        * Change klimit to take into account any ram disk
-        * that may be included
-        */
+       /* Change klimit to take into account any ram disk that may be included */
        if (naca->xRamDisk)
-               klimit = KERNELBASE + (u64)naca->xRamDisk +
-                       (naca->xRamDiskSize * PAGE_SIZE);
+               klimit = KERNELBASE + (u64)naca->xRamDisk + (naca->xRamDiskSize * PAGE_SIZE);
        else {
-               /*
-                * No ram disk was included - check and see if there
-                * was an embedded system map.  Change klimit to take
-                * into account any embedded system map
-                */
+               /* No ram disk was included - check and see if there was an embedded system map */
+               /* Change klimit to take into account any embedded system map */
                if (embedded_sysmap_end)
-                       klimit = KERNELBASE + ((embedded_sysmap_end + 4095) &
-                                       0xfffffffffffff000);
+                       klimit = KERNELBASE + ((embedded_sysmap_end+4095) & 0xfffffffffffff000);
        }
 }
 
 static void iSeries_setup_dprofile(void)
 {
-       if (dprof_buffer) {
+       if ( dprof_buffer ) {
                unsigned i;
-
-               for (i = 0; i < NR_CPUS; ++i) {
+               for (i=0; i<NR_CPUS; ++i) {
                        paca[i].prof_shift = dprof_shift;
-                       paca[i].prof_len = dprof_len - 1;
+                       paca[i].prof_len = dprof_len-1;
                        paca[i].prof_buffer = dprof_buffer;
                        paca[i].prof_stext = (unsigned *)_stext;
                        mb();
index 93470fc..cf5f443 100644 (file)
 #ifndef        __ISERIES_SETUP_H__
 #define        __ISERIES_SETUP_H__
 
-extern void iSeries_init_early(void);
-extern void iSeries_init(unsigned long r3, unsigned long ird_start,
-               unsigned long ird_end, unsigned long cline_start,
-               unsigned long cline_end);
-extern void iSeries_setup_arch(void);
-extern void iSeries_setup_residual(struct seq_file *m, int cpu_id);
-extern void iSeries_get_cpuinfo(struct seq_file *m);
-extern void iSeries_init_IRQ(void);
-extern void iSeries_init_irq_desc(irq_desc_t *);
-extern int iSeries_get_irq(struct pt_regs *regs);
-extern void iSeries_restart(char *cmd);
-extern void iSeries_power_off(void);
-extern void iSeries_halt(void);
-extern void iSeries_time_init(void);
-extern void iSeries_get_boot_time(struct rtc_time *tm);
-extern int iSeries_set_rtc_time(struct rtc_time *tm);
-extern void iSeries_get_rtc_time(struct rtc_time *tm);
-extern void iSeries_calibrate_decr(void);
-extern void iSeries_progress( char *, unsigned short );
+extern void             iSeries_init_early(void);
+extern void             iSeries_init(unsigned long r3,
+                                   unsigned long ird_start,
+                                   unsigned long ird_end,
+                                   unsigned long cline_start,
+                                   unsigned long cline_end);
+extern void             iSeries_setup_arch(void);
+extern void             iSeries_setup_residual(struct seq_file *m);
+extern void             iSeries_get_cpuinfo(struct seq_file *m);
+extern void             iSeries_init_IRQ(void);
+extern int              iSeries_get_irq(struct pt_regs *regs);
+extern void             iSeries_restart(char *cmd);
+extern void             iSeries_power_off(void);
+extern void             iSeries_halt(void);
+extern void             iSeries_time_init(void);
+extern void      iSeries_get_boot_time(struct rtc_time *tm);
+extern int              iSeries_set_rtc_time(unsigned long now);
+extern unsigned long    iSeries_get_rtc_time(void);
+extern void             iSeries_calibrate_decr(void);
+extern void     iSeries_progress( char *, unsigned short );
 
 #endif /* __ISERIES_SETUP_H__ */
index eb4655e..3577036 100644 (file)
@@ -1,13 +1,5 @@
 /*
- * Idle daemon for PowerPC.  Idle daemon will handle any action
- * that needs to be taken when the system becomes idle.
- *
- * Originally Written by Cort Dougan (cort@cs.nmt.edu)
- *
- * iSeries supported added by Mike Corrigan <mikejc@us.ibm.com>
- *
- * Additional shared processor, SMT, and firmware support
- *    Copyright (c) 2003 Dave Engebretsen <engebret@us.ibm.com>
+ * idle.c
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
 #include <asm/processor.h>
 #include <asm/mmu.h>
 #include <asm/cache.h>
-#include <asm/cputable.h>
 #include <asm/time.h>
+
+#ifdef CONFIG_PPC_ISERIES
+
 #include <asm/iSeries/LparData.h>
 #include <asm/iSeries/HvCall.h>
 #include <asm/iSeries/ItLpQueue.h>
 
-extern long cede_processor(void);
-extern long poll_pending(void);
-
-int (*idle_loop)(void);
-
-#ifdef CONFIG_PPC_ISERIES
 unsigned long maxYieldTime = 0;
 unsigned long minYieldTime = 0xffffffffffffffffUL;
 
@@ -78,24 +66,24 @@ static void yield_shared_processor(void)
        process_iSeries_events();
 }
 
-int iSeries_idle(void)
+int cpu_idle(void)
 {
        struct paca_struct *lpaca;
        long oldval;
        unsigned long CTRL;
 
+#warning fix iseries run light
+#if 0
        /* ensure iSeries run light will be out when idle */
-       clear_thread_flag(TIF_RUN_LIGHT);
+       current->thread.flags &= ~PPC_FLAG_RUN_LIGHT;
        CTRL = mfspr(CTRLF);
        CTRL &= ~RUNLATCH;
        mtspr(CTRLT, CTRL);
-#if 0
-       init_idle();    
 #endif
 
        lpaca = get_paca();
 
-       for (;;) {
+       while (1) {
                if (lpaca->xLpPaca.xSharedProc) {
                        if (ItLpQueue_isLpIntPending(lpaca->lpQueuePtr))
                                process_iSeries_events();
@@ -121,13 +109,16 @@ int iSeries_idle(void)
                        }
                }
 
-               schedule();
+               if (need_resched())
+                       schedule();
        }
+
        return 0;
 }
-#endif
 
-int default_idle(void)
+#else /* CONFIG_PPC_ISERIES */
+
+int cpu_idle(void)
 {
        long oldval;
 
@@ -154,155 +145,9 @@ int default_idle(void)
        return 0;
 }
 
-#ifdef CONFIG_PPC_PSERIES
-int dedicated_idle(void)
-{
-       long oldval;
-       struct paca_struct *lpaca = get_paca(), *ppaca;
-       unsigned long start_snooze;
-
-       ppaca = &paca[(lpaca->xPacaIndex) ^ 1];
-
-       while (1) {
-               /* Indicate to the HV that we are idle.  Now would be
-                * a good time to find other work to dispatch. */
-               lpaca->xLpPaca.xIdle = 1;
-
-               oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED);
-               if (!oldval) {
-                       set_thread_flag(TIF_POLLING_NRFLAG);
-                       start_snooze = __get_tb();
-                       while (!need_resched()) {
-                               /* need_resched could be 1 or 0 at this 
-                                * point.  If it is 0, set it to 0, so
-                                * an IPI/Prod is sent.  If it is 1, keep
-                                * it that way & schedule work.
-                                */
-                               if (__get_tb() < 
-                                   (start_snooze + 
-                                    naca->smt_snooze_delay*tb_ticks_per_usec)) {  
-                                       HMT_low(); /* Low thread priority */
-                                       continue;
-                               }
-
-                               HMT_very_low(); /* Low power mode */
-
-                               /* If the SMT mode is system controlled & the 
-                                * partner thread is doing work, switch into
-                                * ST mode.
-                                */
-                               if((naca->smt_state == SMT_DYNAMIC) &&
-                                  (!(ppaca->xLpPaca.xIdle))) {
-                                       /* Indicate we are no longer polling for
-                                        * work, and then clear need_resched.  If
-                                        * need_resched was 1, set it back to 1
-                                        * and schedule work
-                                        */
-                                       clear_thread_flag(TIF_POLLING_NRFLAG);
-                                       oldval = test_and_clear_thread_flag(TIF_NEED_RESCHED);
-                                       if(oldval == 1) {
-                                               set_need_resched();
-                                               break;
-                                       }
-
-                                       /* DRENG: Go HMT_medium here ? */
-                                       local_irq_disable(); 
-                                       lpaca->yielded = 1;
-
-                                       /* SMT dynamic mode.  Cede will result 
-                                        * in this thread going dormant, if the
-                                        * partner thread is still doing work.
-                                        * Thread wakes up if partner goes idle,
-                                        * an interrupt is presented, or a prod
-                                        * occurs.  Returning from the cede
-                                        * enables external interrupts.
-                                        */
-                                       cede_processor();
-
-                                       lpaca->yielded = 0;
-                               } else {
-                                       /* Give the HV an opportunity at the
-                                        * processor, since we are not doing
-                                        * any work.
-                                        */
-                                       poll_pending();
-                               }
-                       }
-               } else {
-                       set_need_resched();
-               }
-
-               HMT_medium();
-               lpaca->xLpPaca.xIdle = 0;
-               schedule();
-       }
-       return 0;
-}
-
-int shared_idle(void)
-{
-       struct paca_struct *lpaca = get_paca();
-
-       while (1) {
-               /* Indicate to the HV that we are idle.  Now would be
-                * a good time to find other work to dispatch. */
-               lpaca->xLpPaca.xIdle = 1;
-
-               if (!need_resched()) {
-                       local_irq_disable(); 
-                       lpaca->yielded = 1;
-                       
-                       /* 
-                        * Yield the processor to the hypervisor.  We return if
-                        * an external interrupt occurs (which are driven prior
-                        * to returning here) or if a prod occurs from another 
-                        * processor.  When returning here, external interrupts 
-                        * are enabled.
-                        */
-                       cede_processor();
-                       
-                       lpaca->yielded = 0;
-               }
-
-               HMT_medium();
-               lpaca->xLpPaca.xIdle = 0;
-               schedule();
-       }
-
-       return 0;
-}
-#endif
-
-int cpu_idle(void)
-{
-       idle_loop();
-       return 0; 
-}
+#endif /* CONFIG_PPC_ISERIES */
 
-int idle_setup(void)
+void default_idle(void)
 {
-#ifdef CONFIG_PPC_ISERIES
-       idle_loop = iSeries_idle;
-#else
-       if (systemcfg->platform & PLATFORM_PSERIES) {
-               if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
-                       if(get_paca()->xLpPaca.xSharedProc) {
-                               printk("idle = shared_idle\n");
-                               idle_loop = shared_idle;
-                       } else {
-                               printk("idle = dedicated_idle\n");
-                               idle_loop = dedicated_idle;
-                       }
-               } else {
-                       printk("idle = default_idle\n");
-                       idle_loop = default_idle;
-               }
-       } else {
-               printk("idle_setup: unknown platform, use default_idle\n");
-               idle_loop = default_idle;
-       }
-#endif
-
-       return 1;
+       barrier();
 }
-
index 5234c5a..88db567 100644 (file)
@@ -40,7 +40,6 @@
 #include <linux/irq.h>
 #include <linux/proc_fs.h>
 #include <linux/random.h>
-#include <linux/bootmem.h>
 #include <linux/kallsyms.h>
 
 #include <asm/uaccess.h>
 #include <asm/machdep.h>
 #include <asm/paca.h>
 
-/*
- * Because the name space for interrupts is so large on ppc64 systems we
- * avoid declaring a single array of "NR_IRQ" interrupts and instead build
- * a three level tree leading to the irq_desc_t (similar to page tables).
- *
- * Currently we cover 24-bit irq values:
- *    10-bits:  the "base" dir (2-pages)
- *     9-bits:  the "middle" dir (1-page)
- *     5-bits:  the "bottom" page (1-page) holding 128byte irq_desc's.
- *
- * We pack a hw_irq_stat struct directly after the irq_desc in the otherwise
- * wasted space of the cacheline.
- *
- * MAX_IRQS is the max this implementation will support.
- * It is much larger than NR_IRQS which is bogus on this arch and often used
- * to declare arrays.
- *
- * Note that all "undefined" mid table and bottom table pointers will point
- * to dummy tables.  Therefore, we don't need to check for NULL on spurious
- * interrupts.
- */
-
-#define IRQ_BASE_INDEX_SIZE  10
-#define IRQ_MID_INDEX_SIZE  9
-#define IRQ_BOT_DESC_SIZE 5
-
-#define IRQ_BASE_PTRS  (1 << IRQ_BASE_INDEX_SIZE)
-#define IRQ_MID_PTRS   (1 << IRQ_MID_INDEX_SIZE)
-#define IRQ_BOT_DESCS (1 << IRQ_BOT_DESC_SIZE)
-
-#define IRQ_BASE_IDX_SHIFT (IRQ_MID_INDEX_SIZE + IRQ_BOT_DESC_SIZE)
-#define IRQ_MID_IDX_SHIFT (IRQ_BOT_DESC_SIZE)
-
-#define IRQ_MID_IDX_MASK  ((1 << IRQ_MID_INDEX_SIZE) - 1)
-#define IRQ_BOT_IDX_MASK  ((1 << IRQ_BOT_DESC_SIZE) - 1)
-
-
-/* The hw_irq_stat struct is stored directly after the irq_desc_t
- * in the same cacheline.  We need to use care to make sure we don't
- * overrun the size of the cacheline.
- *
- * Currently sizeof(irq_desc_t) is 32 bytes or less and this hw_irq_stat
- * fills the rest of the cache line.
- *
- * The irqs_per_cpu field is an optimization for systems with 4 cpus or less
- * to avoid allocating space for irq-per-cpu statistics (and hitting another
- * cacheline to do the counting).  This field could be discarded.
- */
-struct hw_irq_stat {
-       unsigned long irqs;             /* statistic per irq */
-       unsigned long *per_cpu_stats;
-       struct proc_dir_entry *irq_dir, *smp_affinity;
-       cpumask_t irq_affinity;
-       unsigned long irqs_per_cpu[4];
-};
-static inline struct hw_irq_stat *get_irq_stat(irq_desc_t *desc)
-{
-       /* WARNING: this assume lock is the last field! */
-       return (struct hw_irq_stat *)(&desc->lock+1);
-}
-static inline unsigned long *get_irq_per_cpu(struct hw_irq_stat *hw)
-{
-       return hw->per_cpu_stats;
-}
-
 #ifdef CONFIG_SMP
 extern void iSeries_smp_message_recv( struct pt_regs * );
 #endif
 
+volatile unsigned char *chrp_int_ack_special;
 static void register_irq_proc (unsigned int irq);
-static irq_desc_t *add_irq_desc(unsigned int irq);
+
+irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned = {
+       [0 ... NR_IRQS-1] = {
+               .lock = SPIN_LOCK_UNLOCKED
+       }
+};
        
 int ppc_spurious_interrupts = 0;
 unsigned long lpEvent_count = 0;
 
-extern int mem_init_done;
-
-irq_desc_t **irq_desc_base_dir[IRQ_BASE_PTRS] __page_aligned = {0};
-irq_desc_t **irq_desc_mid_null;
-irq_desc_t *irq_desc_bot_null;
-
-static inline irq_desc_t **get_irq_mid_table(unsigned int irq)
-{
-       /* Assume irq < MAX_IRQS so we won't index off the end. */
-       return irq_desc_base_dir[irq >> IRQ_BASE_IDX_SHIFT];
-}
-
-static inline irq_desc_t *get_irq_bot_table(unsigned int irq,
-                                           irq_desc_t **mid_ptr)
-{
-       return mid_ptr[(irq >> IRQ_MID_IDX_SHIFT) & IRQ_MID_IDX_MASK];
-}
-
-
-/* This should be inline. */
-void *_get_irq_desc(unsigned int irq)
-{
-       irq_desc_t **mid_table, *bot_table, *desc;
-
-       mid_table = get_irq_mid_table(irq);
-       bot_table = get_irq_bot_table(irq, mid_table);
-
-       desc = bot_table + (irq & IRQ_BOT_IDX_MASK);
-       return desc;
-}
-
-/* This is used by the for_each_irq(i) macro to iterate quickly over
- * all interrupt.  It optimizes by skipping over ptrs to the null tables
- * when possible, but it may produce false positives.
- */
-unsigned int _next_irq(unsigned int irq)
-{
-       irq_desc_t **mid_table, *bot_table;
-
-       irq++;
-       /* Easy case first...staying on the current bot_table. */
-       if (irq & IRQ_BOT_IDX_MASK)
-               return irq;
-
-       /* Now skip empty mid tables */
-       while (irq < MAX_IRQS &&
-              (mid_table = get_irq_mid_table(irq)) == irq_desc_mid_null) {
-               /* index to the next base index (i.e. the next mid table) */
-               irq = (irq & ~(IRQ_BASE_IDX_SHIFT-1)) + IRQ_BASE_IDX_SHIFT;
-       }
-       /* And skip empty bot tables */
-       while (irq < MAX_IRQS &&
-              (bot_table = get_irq_bot_table(irq, mid_table)) == irq_desc_bot_null) {
-               /* index to the next mid index (i.e. the next bot table) */
-               irq = (irq & ~(IRQ_MID_IDX_SHIFT-1)) + IRQ_MID_IDX_SHIFT;
-       }
-       return irq;
-}
-
-
-/* Same as get_irq_desc(irq) except it will "fault in" a real desc as needed
- * rather than return the null entry.
- * This is used by code that is actually defining the irq.
- *
- * NULL may be returned on memory allocation failure.  In general, init code
- * doesn't look for this, but setup_irq does.  In this failure case the desc
- * is left pointing at the null pages so callers of get_irq_desc() should
- * always return something.
- */
-void *_get_real_irq_desc(unsigned int irq)
-{
-       irq_desc_t *desc = get_irq_desc(irq);
-       if (((unsigned long)desc & PAGE_MASK) ==
-           (unsigned long)irq_desc_bot_null) {
-               desc = add_irq_desc(irq);
-       }
-       return desc;
-}
-
-/* Allocate an irq middle page and init entries to null page. */
-static irq_desc_t **alloc_irq_mid_page(void)
-{
-       irq_desc_t **m, **ent;
-
-       if (mem_init_done)
-               m = (irq_desc_t **)__get_free_page(GFP_KERNEL);
-       else
-               m = (irq_desc_t **)alloc_bootmem_pages(PAGE_SIZE);
-       if (m) {
-               for (ent = m; ent < m + IRQ_MID_PTRS; ent++) {
-                       *ent = irq_desc_bot_null;
-               }
-       }
-       return m;
-}
-
-/* Allocate an irq bottom page and init the entries. */
-static irq_desc_t *alloc_irq_bot_page(void)
-{
-       irq_desc_t *b, *ent;
-       if (mem_init_done)
-               b = (irq_desc_t *)get_zeroed_page(GFP_KERNEL);
-       else
-               b = (irq_desc_t *)alloc_bootmem_pages(PAGE_SIZE);
-       if (b) {
-               for (ent = b; ent < b + IRQ_BOT_DESCS; ent++) {
-                       ent->lock = SPIN_LOCK_UNLOCKED;
-               }
-       }
-       return b;
-}
-
-/*
- * The universe of interrupt numbers ranges from 0 to 2^24.
- * Use a sparsely populated tree to map from the irq to the handler.
- * Top level is 2 contiguous pages, covering the 10 most significant 
- * bits.  Mid level is 1 page, covering 9 bits.  Last page covering
- * 5 bits is the irq_desc, each of which is 128B.
- */
-static void irq_desc_init(void) {
-       irq_desc_t ***entry_p;
-
-       /* 
-        * Now initialize the tables to point though the NULL tables for
-        * the default case of no interrupt handler (spurious).
-        */
-       irq_desc_bot_null = alloc_irq_bot_page();
-       irq_desc_mid_null = alloc_irq_mid_page();
-       if (!irq_desc_bot_null || !irq_desc_mid_null)
-               panic("irq_desc_init: could not allocate pages\n");
-       for(entry_p = irq_desc_base_dir;
-           entry_p < irq_desc_base_dir + IRQ_BASE_PTRS;
-           entry_p++) {
-               *entry_p = irq_desc_mid_null;
-       }
-}
-
-/*
- * Add a new irq desc for the given irq if needed.
- * This breaks any ptr to the "null" middle or "bottom" irq desc page.
- * Note that we don't ever coalesce pages as the interrupts are released.
- * This isn't worth the effort.  We add the cpu stats info when the
- * interrupt is actually requested.
- *
- * May return NULL if memory could not be allocated.
- */
-static irq_desc_t *add_irq_desc(unsigned int irq)
-{
-       irq_desc_t **mid_table_p, *bot_table_p;
-
-       mid_table_p = get_irq_mid_table(irq); 
-       if(mid_table_p == irq_desc_mid_null) {
-               /* No mid table for this IRQ - create it */
-               mid_table_p = alloc_irq_mid_page();
-               if (!mid_table_p) return NULL;
-               irq_desc_base_dir[irq >> IRQ_BASE_IDX_SHIFT] = mid_table_p;
-       }
-
-       bot_table_p = (irq_desc_t *)(*(mid_table_p + ((irq >> 5) & 0x1ff)));
-
-       if(bot_table_p == irq_desc_bot_null) {
-               /* No bot table for this IRQ - create it */
-               bot_table_p = alloc_irq_bot_page();
-               if (!bot_table_p) return NULL;
-               mid_table_p[(irq >> IRQ_MID_IDX_SHIFT) & IRQ_MID_IDX_MASK] = bot_table_p;
-       }
-
-       return bot_table_p + (irq & IRQ_BOT_IDX_MASK);
-}
-
-void allocate_per_cpu_stats(struct hw_irq_stat *hwstat)
-{
-       unsigned long *p;
-
-       if (naca->interrupt_controller == IC_OPEN_PIC) {
-               /* Cheap optimization -- assume max cpus on open pic is 4
-                * and so they will fit in cacheline after desc.
-                * ToDo: verify max cpus.  Assume no hot plug?
-                */
-               hwstat->per_cpu_stats = hwstat->irqs_per_cpu;
-               return;
-       }
-       if (mem_init_done) {
-               p = (unsigned long *)kmalloc(sizeof(long)*NR_CPUS, GFP_KERNEL);
-               if (p) memset(p, 0, sizeof(long)*NR_CPUS);
-       } else
-               p = (unsigned long *)alloc_bootmem(sizeof(long)*NR_CPUS);
-       hwstat->per_cpu_stats = p;
-}
-
 int
 setup_irq(unsigned int irq, struct irqaction * new)
 {
        int shared = 0;
        unsigned long flags;
        struct irqaction *old, **p;
-       irq_desc_t *desc = get_real_irq_desc(irq);
-       struct hw_irq_stat *hwstat;
-
-       if (!desc)
-               return -ENOMEM;
-
-       ppc_md.init_irq_desc(desc);
-
-       hwstat = get_irq_stat(desc);
-
-#ifdef CONFIG_IRQ_ALL_CPUS
-       hwstat->irq_affinity = CPU_MASK_ALL;
-#else
-       hwstat->irq_affinity = CPU_MASK_NONE;
-#endif
+       irq_desc_t *desc = irq_desc + irq;
 
-       /* Now is the time to add per-cpu kstat data to the desc
-        * since it appears we are actually going to use the irq.
-        */
-       allocate_per_cpu_stats(hwstat);
        /*
         * Some drivers like serial.c use request_irq() heavily,
         * so we have to be careful not to interfere with a
@@ -401,7 +133,7 @@ setup_irq(unsigned int irq, struct irqaction * new)
 
 inline void synchronize_irq(unsigned int irq)
 {
-       while (get_irq_desc(irq)->status & IRQ_INPROGRESS)
+       while (irq_desc[irq].status & IRQ_INPROGRESS)
                cpu_relax();
 }
 
@@ -415,10 +147,11 @@ EXPORT_SYMBOL(synchronize_irq);
 static int
 do_free_irq(int irq, void* dev_id)
 {
-       irq_desc_t *desc = get_irq_desc(irq);
+       irq_desc_t *desc;
        struct irqaction **p;
        unsigned long flags;
 
+       desc = irq_desc + irq;
        spin_lock_irqsave(&desc->lock,flags);
        p = &desc->action;
        for (;;) {
@@ -449,6 +182,41 @@ do_free_irq(int irq, void* dev_id)
        return -ENOENT;
 }
 
+int request_irq(unsigned int irq,
+       irqreturn_t (*handler)(int, void *, struct pt_regs *),
+       unsigned long irqflags, const char * devname, void *dev_id)
+{
+       struct irqaction *action;
+       int retval;
+
+       if (irq >= NR_IRQS)
+               return -EINVAL;
+       if (!handler)
+               /* We could implement really free_irq() instead of that... */
+               return do_free_irq(irq, dev_id);
+       
+       action = (struct irqaction *)
+               kmalloc(sizeof(struct irqaction), GFP_KERNEL);
+       if (!action) {
+               printk(KERN_ERR "kmalloc() failed for irq %d !\n", irq);
+               return -ENOMEM;
+       }
+       
+       action->handler = handler;
+       action->flags = irqflags;                                       
+       action->mask = 0;
+       action->name = devname;
+       action->dev_id = dev_id;
+       action->next = NULL;
+       
+       retval = setup_irq(irq, action);
+       if (retval)
+               kfree(action);
+               
+       return 0;
+}
+
+EXPORT_SYMBOL(request_irq);
 
 void free_irq(unsigned int irq, void *dev_id)
 {
@@ -477,7 +245,7 @@ EXPORT_SYMBOL(free_irq);
  
 inline void disable_irq_nosync(unsigned int irq)
 {
-       irq_desc_t *desc = get_irq_desc(irq);
+       irq_desc_t *desc = irq_desc + irq;
        unsigned long flags;
 
        spin_lock_irqsave(&desc->lock, flags);
@@ -506,7 +274,7 @@ EXPORT_SYMBOL(disable_irq_nosync);
  
 void disable_irq(unsigned int irq)
 {
-       irq_desc_t *desc = get_irq_desc(irq);
+       irq_desc_t *desc = irq_desc + irq;
        disable_irq_nosync(irq);
        if (desc->action)
                synchronize_irq(irq);
@@ -526,13 +294,13 @@ EXPORT_SYMBOL(disable_irq);
  
 void enable_irq(unsigned int irq)
 {
-       irq_desc_t *desc = get_irq_desc(irq);
+       irq_desc_t *desc = irq_desc + irq;
        unsigned long flags;
 
        spin_lock_irqsave(&desc->lock, flags);
        switch (desc->depth) {
        case 1: {
-               unsigned int status = desc->status & ~IRQ_DISABLED;
+               unsigned int status = desc->status & ~(IRQ_DISABLED | IRQ_INPROGRESS);
                desc->status = status;
                if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
                        desc->status = status | IRQ_REPLAY;
@@ -553,89 +321,48 @@ void enable_irq(unsigned int irq)
 
 EXPORT_SYMBOL(enable_irq);
 
-int request_irq(unsigned int irq,
-       irqreturn_t (*handler)(int, void *, struct pt_regs *),
-       unsigned long irqflags, const char * devname, void *dev_id)
-{
-       struct irqaction *action;
-       int retval;
-
-       if (irq >= MAX_IRQS)
-               return -EINVAL;
-       if (!handler)
-               /* We could implement really free_irq() instead of that... */
-               return do_free_irq(irq, dev_id);
-       
-       action = (struct irqaction *)
-               kmalloc(sizeof(struct irqaction), GFP_KERNEL);
-       if (!action) {
-               printk(KERN_ERR "kmalloc() failed for irq %d !\n", irq);
-               return -ENOMEM;
-       }
-       
-       action->handler = handler;
-       action->flags = irqflags;                                       
-       action->mask = 0;
-       action->name = devname;
-       action->dev_id = dev_id;
-       action->next = NULL;
-       
-       retval = setup_irq(irq, action);
-       if (retval)
-               kfree(action);
-               
-       return 0;
-}
-
-EXPORT_SYMBOL(request_irq);
-
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, j;
+       int i = *(loff_t *) v, j;
        struct irqaction * action;
-       irq_desc_t *desc;
-       struct hw_irq_stat *hwstat;
-       unsigned long *per_cpus;
        unsigned long flags;
 
-       seq_printf(p, "           ");
-       for (j=0; j<NR_CPUS; j++) {
-               if (cpu_online(j))
-                       seq_printf(p, "CPU%d       ",j);
+       if (i == 0) {
+               seq_printf(p, "           ");
+               for (j=0; j<NR_CPUS; j++) {
+                       if (cpu_online(j))
+                               seq_printf(p, "CPU%d       ",j);
+               }
+               seq_putc(p, '\n');
        }
-       seq_putc(p, '\n');
-
-       for_each_irq(i) {
-               desc = get_irq_desc(i);
-               spin_lock_irqsave(&desc->lock, flags);
-               action = desc->action;
 
+       if (i < NR_IRQS) {
+               spin_lock_irqsave(&irq_desc[i].lock, flags);
+               action = irq_desc[i].action;
                if (!action || !action->handler)
                        goto skip;
-               seq_printf(p, "%3d: ", i);
-               hwstat = get_irq_stat(desc);
-               per_cpus = get_irq_per_cpu(hwstat);
-               if (per_cpus) {
-                       for (j = 0; j < NR_CPUS; j++) {
-                               if (cpu_online(j))
-                                       seq_printf(p, "%10lu ", per_cpus[j]);
-                       }
-               } else {
-                       seq_printf(p, "%10lu ", hwstat->irqs);
+               seq_printf(p, "%3d: ", i);              
+#ifdef CONFIG_SMP
+               for (j = 0; j < NR_CPUS; j++) {
+                       if (cpu_online(j))
+                               seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
                }
-               if (get_irq_desc(i)->handler)           
-                       seq_printf(p, " %s ", get_irq_desc(i)->handler->typename );
+#else          
+               seq_printf(p, "%10u ", kstat_irqs(i));
+#endif /* CONFIG_SMP */
+               if (irq_desc[i].handler)                
+                       seq_printf(p, " %s ", irq_desc[i].handler->typename );
                else
                        seq_printf(p, "  None      ");
-               seq_printf(p, "%s", (get_irq_desc(i)->status & IRQ_LEVEL) ? "Level " : "Edge  ");
+               seq_printf(p, "%s", (irq_desc[i].status & IRQ_LEVEL) ? "Level " : "Edge  ");
                seq_printf(p, "    %s",action->name);
                for (action=action->next; action; action = action->next)
                        seq_printf(p, ", %s", action->name);
                seq_putc(p, '\n');
 skip:
-               spin_unlock_irqrestore(&desc->lock, flags);
-       }
-       seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts);
+               spin_unlock_irqrestore(&irq_desc[i].lock, flags);
+       } else if (i == NR_IRQS)
+               seq_printf(p, "BAD: %10u\n", ppc_spurious_interrupts);
        return 0;
 }
 
@@ -749,17 +476,9 @@ void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq)
        int status;
        struct irqaction *action;
        int cpu = smp_processor_id();
-       irq_desc_t *desc = get_irq_desc(irq);
-       struct hw_irq_stat *hwstat;
-       unsigned long *per_cpus;
-
-       /* Statistics. */
-       hwstat = get_irq_stat(desc);    /* same cache line as desc */
-       hwstat->irqs++;
-       per_cpus = get_irq_per_cpu(hwstat); /* same cache line for < 8 cpus */
-       if (per_cpus)
-               per_cpus[cpu]++;
+       irq_desc_t *desc = irq_desc + irq;
 
+       kstat_cpu(cpu).irqs[irq]++;
        spin_lock(&desc->lock);
        ack_irq(irq);   
        /*
@@ -833,23 +552,26 @@ out:
         * The ->end() handler has to deal with interrupts which got
         * disabled while the handler was running.
         */
-       if (desc->handler) {
-               if (desc->handler->end)
-                       desc->handler->end(irq);
-               else if (desc->handler->enable)
-                       desc->handler->enable(irq);
+       if (irq_desc[irq].handler) {
+               if (irq_desc[irq].handler->end)
+                       irq_desc[irq].handler->end(irq);
+               else if (irq_desc[irq].handler->enable)
+                       irq_desc[irq].handler->enable(irq);
        }
        spin_unlock(&desc->lock);
 }
 
-#ifdef CONFIG_PPC_ISERIES
 int do_IRQ(struct pt_regs *regs)
 {
+       int irq, first = 1;
+#ifdef CONFIG_PPC_ISERIES
        struct paca_struct *lpaca;
        struct ItLpQueue *lpq;
+#endif
 
        irq_enter();
 
+#ifdef CONFIG_PPC_ISERIES
        lpaca = get_paca();
 #ifdef CONFIG_SMP
        if (lpaca->xLpPaca.xIntDword.xFields.xIpiCnt) {
@@ -860,26 +582,7 @@ int do_IRQ(struct pt_regs *regs)
        lpq = lpaca->lpQueuePtr;
        if (lpq && ItLpQueue_isLpIntPending(lpq))
                lpEvent_count += ItLpQueue_process(lpq, regs);
-
-       irq_exit();
-
-       if (lpaca->xLpPaca.xIntDword.xFields.xDecrInt) {
-               lpaca->xLpPaca.xIntDword.xFields.xDecrInt = 0;
-               /* Signal a fake decrementer interrupt */
-               timer_interrupt(regs);
-       }
-
-       return 1; /* lets ret_from_int know we can do checks */
-}
-
-#else  /* CONFIG_PPC_ISERIES */
-
-int do_IRQ(struct pt_regs *regs)
-{
-       int irq, first = 1;
-
-       irq_enter();
-
+#else
        /*
         * Every arch is required to implement ppc_md.get_irq.
         * This function will either return an irq number or -1 to
@@ -895,12 +598,20 @@ int do_IRQ(struct pt_regs *regs)
        if (irq != -2 && first)
                /* That's not SMP safe ... but who cares ? */
                ppc_spurious_interrupts++;
+#endif
 
        irq_exit();
 
+#ifdef CONFIG_PPC_ISERIES
+       if (lpaca->xLpPaca.xIntDword.xFields.xDecrInt) {
+               lpaca->xLpPaca.xIntDword.xFields.xDecrInt = 0;
+               /* Signal a fake decrementer interrupt */
+               timer_interrupt(regs);
+       }
+#endif
+
        return 1; /* lets ret_from_int know we can do checks */
 }
-#endif /* CONFIG_PPC_ISERIES */
 
 unsigned long probe_irq_on (void)
 {
@@ -925,110 +636,47 @@ void __init init_IRQ(void)
 {
        static int once = 0;
 
-       if (once)
+       if ( once )
                return;
-
-       once++;
-
-       /* Initialize the irq tree */
-       irq_desc_init();
-
+       else
+               once++;
+       
        ppc_md.init_IRQ();
 }
 
 static struct proc_dir_entry * root_irq_dir;
+static struct proc_dir_entry * irq_dir [NR_IRQS];
+static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
 
-/* XXX Fix this when we clean up large irq support */
-cpumask_t get_irq_affinity(unsigned int irq)
-{
-       irq_desc_t *desc = get_irq_desc(irq);
-       struct hw_irq_stat *hwstat = get_irq_stat(desc);
-
-       return hwstat->irq_affinity;
-}
-
-#define HEX_DIGITS (2*sizeof(cpumask_t))
+#ifdef CONFIG_IRQ_ALL_CPUS
+cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
+#else  /* CONFIG_IRQ_ALL_CPUS */
+cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_NONE };
+#endif /* CONFIG_IRQ_ALL_CPUS */
 
 static int irq_affinity_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       int len;
-       unsigned int irq = (long)data;
-
-       if (count < HEX_DIGITS+1)
-               return -EINVAL;
-
-       len = format_cpumask(page, get_irq_affinity(irq));
-       page += len;
-       len += sprintf(page, "\n");
-       return len;
-}
-
-static unsigned int parse_hex_value (const char *buffer,
-               unsigned long count, cpumask_t *ret)
-{
-       unsigned char hexnum[HEX_DIGITS];
-       cpumask_t value = CPU_MASK_NONE;
-       int i;
-
-       if (!count)
+       int len = cpumask_snprintf(page, count, irq_affinity[(long)data]);
+       if (count - len < 2)
                return -EINVAL;
-       if (count > HEX_DIGITS)
-               count = HEX_DIGITS;
-       if (copy_from_user(hexnum, buffer, count))
-               return -EFAULT;
-
-       /*
-        * Parse the first HEX_DIGITS characters as a hex string, any non-hex char
-        * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
-        */
-
-       for (i = 0; i < count; i++) {
-               unsigned long c = hexnum[i];
-               int k;
-
-               switch (c) {
-                       case '0' ... '9': c -= '0'; break;
-                       case 'a' ... 'f': c -= 'a'-10; break;
-                       case 'A' ... 'F': c -= 'A'-10; break;
-               default:
-                       goto out;
-               }
-               cpus_shift_left(value, value, 4);
-               for (k = 0; k < 4; ++k)
-                       if (test_bit(k, &c))
-                               cpu_set(k, value);
-       }
-out:
-       *ret = value;
-       return 0;
+       len += sprintf(page + len, "\n");
+       return len;
 }
 
 static int irq_affinity_write_proc (struct file *file, const char *buffer,
                                        unsigned long count, void *data)
 {
-       unsigned int irq = (long)data;
-       irq_desc_t *desc = get_irq_desc(irq);
-       struct hw_irq_stat *hwstat = get_irq_stat(desc);
-       int full_count = count, err;
+       int irq = (long)data, full_count = count, err;
        cpumask_t new_value, tmp;
-       cpumask_t allcpus = CPU_MASK_ALL;
 
-       if (!desc->handler->set_affinity)
+       if (!irq_desc[irq].handler->set_affinity)
                return -EIO;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
        if (err)
                return err;
 
-       /* 
-        * We check for CPU_MASK_ALL in xics to send irqs to all cpus.
-        * In some cases CPU_MASK_ALL is smaller than the cpumask (eg
-        * NR_CPUS == 32 and cpumask is a long), so we mask it here to
-        * be consistent.
-        */
-       cpus_and(new_value, new_value, allcpus);
-
        /*
         * Do not allow disabling IRQs completely - it's a too easy
         * way to make the system unusable accidentally :-) At least
@@ -1038,23 +686,19 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
        if (cpus_empty(tmp))
                return -EINVAL;
 
-       hwstat->irq_affinity = new_value;
-       desc->handler->set_affinity(irq, new_value);
+       irq_affinity[irq] = new_value;
+       irq_desc[irq].handler->set_affinity(irq, new_value);
+
        return full_count;
 }
 
 static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       int len;
-       cpumask_t *mask = (cpumask_t *) data;
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, *(cpumask_t *)data);
+       if (count - len < 2)
                return -EINVAL;
-
-       len = format_cpumask(page, *mask);
-       page += len;
-       len += sprintf (page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
@@ -1065,7 +709,7 @@ static int prof_cpu_mask_write_proc (struct file *file, const char __user *buffe
        unsigned long full_count = count, err;
        cpumask_t new_value;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
        if (err)
                return err;
 
@@ -1093,24 +737,18 @@ static void register_irq_proc (unsigned int irq)
 {
        struct proc_dir_entry *entry;
        char name [MAX_NAMELEN];
-       irq_desc_t *desc;
-       struct hw_irq_stat *hwstat;
 
-       desc = get_real_irq_desc(irq);
-       if (!root_irq_dir || !desc || !desc->handler)
-               return;
-       hwstat = get_irq_stat(desc);
-       if (hwstat->irq_dir)
+       if (!root_irq_dir || (irq_desc[irq].handler == NULL) || irq_dir[irq])
                return;
 
        memset(name, 0, MAX_NAMELEN);
        sprintf(name, "%d", irq);
 
        /* create /proc/irq/1234 */
-       hwstat->irq_dir = proc_mkdir(name, root_irq_dir);       
+       irq_dir[irq] = proc_mkdir(name, root_irq_dir);
 
        /* create /proc/irq/1234/smp_affinity */
-       entry = create_proc_entry("smp_affinity", 0600, hwstat->irq_dir);
+       entry = create_proc_entry("smp_affinity", 0600, irq_dir[irq]);
 
        if (entry) {
                entry->nlink = 1;
@@ -1118,7 +756,8 @@ static void register_irq_proc (unsigned int irq)
                entry->read_proc = irq_affinity_read_proc;
                entry->write_proc = irq_affinity_write_proc;
        }
-       hwstat->smp_affinity = entry;
+
+       smp_affinity_entry[irq] = entry;
 }
 
 unsigned long prof_cpu_mask = -1;
@@ -1145,8 +784,8 @@ void init_irq_proc (void)
        /*
         * Create entries for all existing IRQs.
         */
-       for_each_irq(i) {
-               if (get_irq_desc(i)->handler == NULL)
+       for (i = 0; i < NR_IRQS; i++) {
+               if (irq_desc[i].handler == NULL)
                        continue;
                register_irq_proc(i);
        }
diff --git a/arch/ppc64/kernel/lparcfg.c b/arch/ppc64/kernel/lparcfg.c
deleted file mode 100644 (file)
index f86db08..0000000
+++ /dev/null
@@ -1,478 +0,0 @@
-/*
- * PowerPC64 LPAR Configuration Information Driver
- *
- * Dave Engebretsen engebret@us.ibm.com
- *    Copyright (c) 2003 Dave Engebretsen
- * Will Schmidt willschm@us.ibm.com
- *    SPLPAR updates, Copyright (c) 2003 Will Schmidt IBM Corporation.
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- *
- * This driver creates a proc file at /proc/ppc64/lparcfg which contains
- * keyword - value pairs that specify the configuration of the partition.
- */
-
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/errno.h>
-#include <linux/proc_fs.h>
-#include <linux/init.h>
-#include <asm/uaccess.h>
-#include <asm/iSeries/HvLpConfig.h>
-#include <asm/iSeries/ItLpPaca.h>
-#include <asm/hvcall.h>
-#include <asm/cputable.h>
-
-#define MODULE_VERSION "1.0"
-#define MODULE_NAME "lparcfg"
-
-static struct proc_dir_entry *proc_ppc64_lparcfg;
-#define LPARCFG_BUFF_SIZE 4096
-
-#ifdef CONFIG_PPC_ISERIES
-static unsigned char e2a(unsigned char x)
-{
-        switch (x) {
-        case 0xF0:
-                return '0';
-        case 0xF1:
-                return '1';
-        case 0xF2:
-                return '2';
-        case 0xF3:
-                return '3';
-        case 0xF4:
-                return '4';
-        case 0xF5:
-                return '5';
-        case 0xF6:
-                return '6';
-        case 0xF7:
-                return '7';
-        case 0xF8:
-                return '8';
-        case 0xF9:
-                return '9';
-        case 0xC1:
-                return 'A';
-        case 0xC2:
-                return 'B';
-        case 0xC3:
-                return 'C';
-        case 0xC4:
-                return 'D';
-        case 0xC5:
-                return 'E';
-        case 0xC6:
-                return 'F';
-        case 0xC7:
-                return 'G';
-        case 0xC8:
-                return 'H';
-        case 0xC9:
-                return 'I';
-        case 0xD1:
-                return 'J';
-        case 0xD2:
-                return 'K';
-        case 0xD3:
-                return 'L';
-        case 0xD4:
-                return 'M';
-        case 0xD5:
-                return 'N';
-        case 0xD6:
-                return 'O';
-        case 0xD7:
-                return 'P';
-        case 0xD8:
-                return 'Q';
-        case 0xD9:
-                return 'R';
-        case 0xE2:
-                return 'S';
-        case 0xE3:
-                return 'T';
-        case 0xE4:
-                return 'U';
-        case 0xE5:
-                return 'V';
-        case 0xE6:
-                return 'W';
-        case 0xE7:
-                return 'X';
-        case 0xE8:
-                return 'Y';
-        case 0xE9:
-                return 'Z';
-        }
-        return ' ';
-}
-
-/* 
- * Methods used to fetch LPAR data when running on an iSeries platform.
- */
-static int lparcfg_data(unsigned char *buf, unsigned long size)
-{
-       unsigned long n = 0, pool_id, lp_index; 
-       int shared, entitled_capacity, max_entitled_capacity;
-       int processors, max_processors;
-       struct paca_struct *lpaca = get_paca();
-
-       if((buf == NULL) || (size > LPARCFG_BUFF_SIZE)) {
-               return -EFAULT;
-       }
-       memset(buf, 0, size); 
-
-       shared = (int)(lpaca->xLpPacaPtr->xSharedProc);
-       n += snprintf(buf, LPARCFG_BUFF_SIZE - n,
-                     "serial_number=%c%c%c%c%c%c%c\n", 
-                     e2a(xItExtVpdPanel.mfgID[2]),
-                     e2a(xItExtVpdPanel.mfgID[3]),
-                     e2a(xItExtVpdPanel.systemSerial[1]),
-                     e2a(xItExtVpdPanel.systemSerial[2]),
-                     e2a(xItExtVpdPanel.systemSerial[3]),
-                     e2a(xItExtVpdPanel.systemSerial[4]),
-                     e2a(xItExtVpdPanel.systemSerial[5])); 
-
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "system_type=%c%c%c%c\n",
-                     e2a(xItExtVpdPanel.machineType[0]),
-                     e2a(xItExtVpdPanel.machineType[1]),
-                     e2a(xItExtVpdPanel.machineType[2]),
-                     e2a(xItExtVpdPanel.machineType[3])); 
-
-       lp_index = HvLpConfig_getLpIndex(); 
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "partition_id=%d\n", (int)lp_index); 
-
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "system_active_processors=%d\n", 
-                     (int)HvLpConfig_getSystemPhysicalProcessors()); 
-
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "system_potential_processors=%d\n", 
-                     (int)HvLpConfig_getSystemPhysicalProcessors()); 
-
-       processors = (int)HvLpConfig_getPhysicalProcessors(); 
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "partition_active_processors=%d\n", processors);  
-
-       max_processors = (int)HvLpConfig_getMaxPhysicalProcessors(); 
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "partition_potential_processors=%d\n", max_processors);  
-
-       if(shared) {
-               entitled_capacity = HvLpConfig_getSharedProcUnits(); 
-               max_entitled_capacity = HvLpConfig_getMaxSharedProcUnits(); 
-       } else {
-               entitled_capacity = processors * 100; 
-               max_entitled_capacity = max_processors * 100; 
-       }
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "partition_entitled_capacity=%d\n", entitled_capacity);
-
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "partition_max_entitled_capacity=%d\n", 
-                     max_entitled_capacity);
-
-       if(shared) {
-               pool_id = HvLpConfig_getSharedPoolIndex(); 
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, "pool=%d\n", 
-                             (int)pool_id); 
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "pool_capacity=%d\n", (int)(HvLpConfig_getNumProcsInSharedPool(pool_id)*100)); 
-       }
-
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "shared_processor_mode=%d\n", shared);
-
-       return 0;
-}
-#endif /* CONFIG_PPC_ISERIES */
-
-#ifdef CONFIG_PPC_PSERIES
-/* 
- * Methods used to fetch LPAR data when running on a pSeries platform.
- */
-
-/*
- * H_GET_PPP hcall returns info in 4 parms.
- *  entitled_capacity,unallocated_capacity,
- *  aggregation, resource_capability).
- *
- *  R4 = Entitled Processor Capacity Percentage. 
- *  R5 = Unallocated Processor Capacity Percentage.
- *  R6 (AABBCCDDEEFFGGHH).
- *      XXXX - reserved (0)
- *          XXXX - reserved (0)
- *              XXXX - Group Number
- *                  XXXX - Pool Number.
- *  R7 (PPOONNMMLLKKJJII)
- *      XX - reserved. (0)
- *        XX - bit 0-6 reserved (0).   bit 7 is Capped indicator.
- *          XX - variable processor Capacity Weight
- *            XX - Unallocated Variable Processor Capacity Weight.
- *              XXXX - Active processors in Physical Processor Pool.
- *                  XXXX  - Processors active on platform. 
- */
-unsigned int h_get_ppp(unsigned long *entitled,unsigned long  *unallocated,unsigned long *aggregation,unsigned long *resource)
-{
-       unsigned long rc;
-       rc = plpar_hcall_4out(H_GET_PPP,0,0,0,0,entitled,unallocated,aggregation,resource);
-       return 0;
-}
-
-/*
- * get_splpar_potential_characteristics().
- * Retrieve the potential_processors and max_entitled_capacity values
- * through the get-system-parameter rtas call.
- */
-#define SPLPAR_CHARACTERISTICS_TOKEN 20
-#define SPLPAR_MAXLENGTH 1026*(sizeof(char))
-unsigned int get_splpar_potential_characteristics()
-{
-       /* return 0 for now.  Underlying rtas functionality is not yet complete. 12/01/2003*/
-       return 0; 
-#if 0 
-       long call_status;
-       unsigned long ret[2];
-
-       char * buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);
-
-       printk("token for ibm,get-system-parameter (0x%x)\n",rtas_token("ibm,get-system-parameter"));
-
-       call_status = rtas_call(rtas_token("ibm,get-system-parameter"), 3, 1,
-                               NULL,
-                               SPLPAR_CHARACTERISTICS_TOKEN,
-                               &buffer,
-                               SPLPAR_MAXLENGTH,
-                               (void *)&ret);
-
-       if (call_status!=0) {
-               printk("Error calling get-system-parameter (0x%lx)\n",call_status);
-               kfree(buffer);
-               return -1;
-       } else {
-               printk("get-system-parameter (%s)\n",buffer);
-               kfree(buffer);
-               /* TODO: Add code here to parse out value for system_potential_processors and partition_max_entitled_capacity */
-               return 1;
-       }
-#endif
-}
-
-static int lparcfg_data(unsigned char *buf, unsigned long size)
-{
-       unsigned long n = 0;
-       int shared, max_entitled_capacity;
-       int processors, system_active_processors, system_potential_processors;
-       struct device_node *root;
-       const char *model = "";
-       const char *system_id = "";
-       unsigned int *lp_index_ptr, lp_index = 0;
-       struct device_node *rtas_node;
-       int *ip;
-       unsigned long h_entitled,h_unallocated,h_aggregation,h_resource;
-
-       if((buf == NULL) || (size > LPARCFG_BUFF_SIZE)) {
-               return -EFAULT;
-       }
-       memset(buf, 0, size); 
-
-       root = find_path_device("/");
-       if (root) {
-               model = get_property(root, "model", NULL);
-               system_id = get_property(root, "system-id", NULL);
-               lp_index_ptr = (unsigned int *)get_property(root, "ibm,partition-no", NULL);
-               if(lp_index_ptr) lp_index = *lp_index_ptr;
-       }
-
-       n  = snprintf(buf, LPARCFG_BUFF_SIZE - n,
-                     "serial_number=%s\n", system_id); 
-
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "system_type=%s\n", model); 
-
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "partition_id=%d\n", (int)lp_index); 
-
-       rtas_node = find_path_device("/rtas");
-       ip = (int *)get_property(rtas_node, "ibm,lrdr-capacity", NULL);
-       if (ip == NULL) {
-               system_active_processors = systemcfg->processorCount; 
-       } else {
-               system_active_processors = *(ip + 4);
-       }
-
-       if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
-               h_get_ppp(&h_entitled,&h_unallocated,&h_aggregation,&h_resource);
-#ifdef DEBUG
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "R4=0x%lx\n", h_entitled);
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "R5=0x%lx\n", h_unallocated);
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "R6=0x%lx\n", h_aggregation);
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "R7=0x%lx\n", h_resource);
-#endif /* DEBUG */
-       }
-
-       if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
-               system_potential_processors =  get_splpar_potential_characteristics();
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "system_active_processors=%d\n", 
-                             (h_resource >> 2*8) && 0xffff);
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "system_potential_processors=%d\n", 
-                             system_potential_processors);
-       } else {
-               system_potential_processors = system_active_processors;
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "system_active_processors=%d\n", 
-                             system_active_processors);
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "system_potential_processors=%d\n", 
-                             system_potential_processors);
-       }
-
-       processors = systemcfg->processorCount;
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "partition_active_processors=%d\n", processors);  
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "partition_potential_processors=%d\n",
-                     system_active_processors);
-
-       /* max_entitled_capacity will come out of get_splpar_potential_characteristics() when that function is complete */
-       max_entitled_capacity = system_active_processors * 100; 
-       if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "partition_entitled_capacity=%ld\n", h_entitled);
-       } else {
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "partition_entitled_capacity=%d\n", system_active_processors*100);
-       }
-
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "partition_max_entitled_capacity=%d\n", 
-                     max_entitled_capacity);
-
-       shared = 0;
-       n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                     "shared_processor_mode=%d\n", shared);
-
-       if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "pool=%d\n", (h_aggregation >> 0*8)&&0xffff);
-
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "pool_capacity=%d\n", (h_resource >> 3*8) &&0xffff);
-
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "group=%d\n", (h_aggregation >> 2*8)&&0xffff);
-
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "capped=%d\n", (h_resource >> 6*8)&&0x40);
-
-               n += snprintf(buf+n, LPARCFG_BUFF_SIZE - n, 
-                             "capacity_weight=%d\n", (int)(h_resource>>5*8)&0xFF);
-       }
-       return 0;
-}
-#endif /* CONFIG_PPC_PSERIES */
-
-
-static ssize_t lparcfg_read(struct file *file, char *buf,
-                           size_t count, loff_t *ppos)
-{
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
-       unsigned long *data = (unsigned long *)dp->data;
-       unsigned long p;
-       ssize_t read;
-       char * pnt;
-
-       if (!data) {
-               printk(KERN_ERR "lparcfg: read failed no data\n");
-               return -EIO;
-       }
-
-       if(ppos) {
-               p = *ppos;
-       } else {
-               return -EFAULT;
-       }
-
-       if (p >= LPARCFG_BUFF_SIZE) return 0;
-
-       lparcfg_data((unsigned char *)data, LPARCFG_BUFF_SIZE); 
-       if (count > (strlen((char *)data) - p))
-               count = (strlen((char *)data)) - p;
-       read = 0;
-
-       pnt = (char *)(data) + p;
-       copy_to_user(buf, (void *)pnt, count);
-       read += count;
-       *ppos += read;
-       return read;
-}
-
-static int lparcfg_open(struct inode * inode, struct file * file)
-{
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
-       unsigned int *data = (unsigned int *)dp->data;
-
-       if (!data) {
-               printk(KERN_ERR "lparcfg: open failed no data\n");
-               return -EIO;
-       }
-
-       return 0;
-}
-
-struct file_operations lparcfg_fops = {
-       owner:          THIS_MODULE,
-       read:           lparcfg_read,
-       open:           lparcfg_open,
-};
-
-int __init lparcfg_init(void)
-{
-       struct proc_dir_entry *ent;
-
-       ent = create_proc_entry("ppc64/lparcfg", S_IRUSR, NULL);
-       if (ent) {
-               ent->proc_fops = &lparcfg_fops;
-               ent->data = kmalloc(LPARCFG_BUFF_SIZE, GFP_KERNEL);
-               if (!ent->data) {
-                       printk(KERN_ERR "Failed to allocate buffer for lparcfg\n");
-                       remove_proc_entry("lparcfg", ent->parent);
-                       return -ENOMEM;
-               }
-       } else {
-               printk(KERN_ERR "Failed to create ppc64/lparcfg\n");
-               return -EIO;
-       }
-
-       proc_ppc64_lparcfg = ent;
-       return 0;
-}
-
-void __exit lparcfg_cleanup(void)
-{
-       if (proc_ppc64_lparcfg) {
-               if (proc_ppc64_lparcfg->data) {
-                   kfree(proc_ppc64_lparcfg->data);
-               }
-               remove_proc_entry("lparcfg", proc_ppc64_lparcfg->parent);
-       }
-}
-
-module_init(lparcfg_init);
-module_exit(lparcfg_cleanup);
-MODULE_DESCRIPTION("Interface for LPAR configuration data");
-MODULE_AUTHOR("Dave Engebretsen");
-MODULE_LICENSE("GPL");
index e5ad750..8765703 100644 (file)
 #include <asm/nvram.h>
 #include <asm/time.h>
 #include <asm/iSeries/ItSpCommArea.h>
+#include <asm/iSeries/mf_proc.h>
 #include <asm/iSeries/iSeries_proc.h>
 #include <asm/uaccess.h>
 #include <linux/pci.h>
 #include <linux/bcd.h>
 
-extern struct pci_dev *iSeries_vio_dev;
+extern struct pci_dev * iSeries_vio_dev;
 
 /*
  * This is the structure layout for the Machine Facilites LPAR event
  * flows.
  */
-union safe_cast {
-       u64 ptr_as_u64;
+struct VspCmdData;
+struct CeMsgData;
+union SafeCast
+{
+       u64 ptrAsU64;
        void *ptr;
 };
 
-struct VspCmdData {
-       union safe_cast token;
-       u16 cmd;
-       HvLpIndex lp_index;
-       u8 result_code;
-       u32 reserved;
-       union {
-               u64 state;      /* GetStateOut */
-               u64 ipl_type;   /* GetIplTypeOut, Function02SelectIplTypeIn */
-               u64 ipl_mode;   /* GetIplModeOut, Function02SelectIplModeIn */
-               u64 page[4];    /* GetSrcHistoryIn */
-               u64 flag;       /* GetAutoIplWhenPrimaryIplsOut,
-                                  SetAutoIplWhenPrimaryIplsIn,
-                                  WhiteButtonPowerOffIn,
-                                  Function08FastPowerOffIn,
-                                  IsSpcnRackPowerIncompleteOut */
-               struct {
-                       u64 token;
-                       u64 address_type;
-                       u64 side;
-                       u32 length;
-                       u32 offset;
-               } kern;         /* SetKernelImageIn, GetKernelImageIn,
-                                  SetKernelCmdLineIn, GetKernelCmdLineIn */
-               u32 length_out; /* GetKernelImageOut, GetKernelCmdLineOut */
-               u8 reserved[80];
-       } sub_data;
-};
-
-struct VspRspData {
-       struct semaphore *sem;
-       struct VspCmdData *response;
-};
-
-struct AllocData {
-       u16 size;
-       u16 type;
-       u32 count;
-       u16 reserved1;
-       u8 reserved2;
-       HvLpIndex target_lp;
-};
-
-struct CeMsgData;
 
-typedef void (*CeMsgCompleteHandler)(void *token, struct CeMsgData *vspCmdRsp);
+typedef void (*CeMsgCompleteHandler)( void *token, struct CeMsgData *vspCmdRsp );
 
-struct CeMsgCompleteData {
-       CeMsgCompleteHandler handler;
-       void *token;
+struct CeMsgCompleteData
+{
+       CeMsgCompleteHandler xHdlr;
+       void *xToken;
 };
 
-struct CeMsgData {
-       u8 ce_msg[12];
-       char reserved[4];
-       struct CeMsgCompleteData *completion;
+struct VspRspData
+{
+       struct semaphore *xSemaphore;
+       struct VspCmdData *xResponse;
 };
 
-struct IoMFLpEvent {
-       struct HvLpEvent hp_lp_event;
-       u16 subtype_result_code;
-       u16 reserved1;
-       u32 reserved2;
-       union {
-               struct AllocData alloc;
-               struct CeMsgData ce_msg;
-               struct VspCmdData vsp_cmd;
-       } data;
+struct IoMFLpEvent
+{
+       struct HvLpEvent xHvLpEvent;
+
+       u16 xSubtypeRc;
+       u16 xRsvd1;
+       u32 xRsvd2;
+
+       union
+       {
+
+               struct AllocData
+               {
+                       u16 xSize;
+                       u16 xType;
+                       u32 xCount;
+                       u16 xRsvd3;
+                       u8 xRsvd4;
+                       HvLpIndex xTargetLp;
+               } xAllocData;
+
+               struct CeMsgData
+               {
+                       u8 xCEMsg[12];
+                       char xReserved[4];
+                       struct CeMsgCompleteData *xToken;
+               } xCEMsgData;
+
+               struct VspCmdData
+               {
+                       union SafeCast xTokenUnion;
+                       u16 xCmd;
+                       HvLpIndex xLpIndex;
+                       u8 xRc;
+                       u32 xReserved1;
+
+                       union VspCmdSubData
+                       {
+                               struct
+                               {
+                                       u64 xState;
+                               } xGetStateOut;
+
+                               struct
+                               {
+                                       u64 xIplType;
+                               } xGetIplTypeOut, xFunction02SelectIplTypeIn;
+
+                               struct
+                               {
+                                       u64 xIplMode;
+                               } xGetIplModeOut, xFunction02SelectIplModeIn;
+
+                               struct
+                               {
+                                       u64 xPage[4];
+                               } xGetSrcHistoryIn;
+
+                               struct
+                               {
+                                       u64 xFlag;
+                               } xGetAutoIplWhenPrimaryIplsOut,
+                                       xSetAutoIplWhenPrimaryIplsIn,
+                                       xWhiteButtonPowerOffIn,
+                                       xFunction08FastPowerOffIn,
+                                       xIsSpcnRackPowerIncompleteOut;
+
+                               struct
+                               {
+                                       u64 xToken;
+                                       u64 xAddressType;
+                                       u64 xSide;
+                                       u32 xTransferLength;
+                                       u32 xOffset;
+                               } xSetKernelImageIn,
+                                       xGetKernelImageIn,
+                                       xSetKernelCmdLineIn,
+                                       xGetKernelCmdLineIn;
+
+                               struct
+                               {
+                                       u32 xTransferLength;
+                               } xGetKernelImageOut,xGetKernelCmdLineOut;
+
+
+                               u8 xReserved2[80];
+
+                       } xSubData;
+               } xVspCmd;
+       } xUnion;
 };
 
-#define subtype_data(a, b, c, d)       \
-               (((a) << 24) + ((b) << 16) + ((c) << 8) + (d))
 
 /*
  * All outgoing event traffic is kept on a FIFO queue.  The first
  * pointer points to the one that is outstanding, and all new
  * requests get stuck on the end.  Also, we keep a certain number of
- * preallocated pending events so that we can operate very early in
+ * preallocated stack elements so that we can operate very early in
  * the boot up sequence (before kmalloc is ready).
  */
-struct pending_event {
-       struct pending_event *next;
+struct StackElement
+{
+       struct StackElement * next;
        struct IoMFLpEvent event;
        MFCompleteHandler hdlr;
-       char dma_data[72];
-       unsigned dma_data_length;
-       unsigned remote_address;
+       char dmaData[72];
+       unsigned dmaDataLength;
+       unsigned remoteAddress;
 };
-static spinlock_t pending_event_spinlock;
-static struct pending_event *pending_event_head;
-static struct pending_event *pending_event_tail;
-static struct pending_event *pending_event_avail;
-static struct pending_event pending_event_prealloc[16];
+static spinlock_t spinlock;
+static struct StackElement * head = NULL;
+static struct StackElement * tail = NULL;
+static struct StackElement * avail = NULL;
+static struct StackElement prealloc[16];
 
 /*
- * Put a pending event onto the available queue, so it can get reused.
- * Attention! You must have the pending_event_spinlock before calling!
+ * Put a stack element onto the available queue, so it can get reused.
+ * Attention! You must have the spinlock before calling!
  */
-static void free_pending_event(struct pending_event *ev)
+void free( struct StackElement * element )
 {
-       if (ev != NULL) {
-               ev->next = pending_event_avail;
-               pending_event_avail = ev;
+       if ( element != NULL )
+       {
+               element->next = avail;
+               avail = element;
        }
 }
 
@@ -162,68 +203,68 @@ static void free_pending_event(struct pending_event *ev)
  * Enqueue the outbound event onto the stack.  If the queue was
  * empty to begin with, we must also issue it via the Hypervisor
  * interface.  There is a section of code below that will touch
- * the first stack pointer without the protection of the pending_event_spinlock.
+ * the first stack pointer without the protection of the spinlock.
  * This is OK, because we know that nobody else will be modifying
  * the first pointer when we do this.
  */
-static int signal_event(struct pending_event *ev)
+static int signalEvent( struct StackElement * newElement )
 {
        int rc = 0;
        unsigned long flags;
        int go = 1;
-       struct pending_event *ev1;
+       struct StackElement * element;
        HvLpEvent_Rc hvRc;
 
        /* enqueue the event */
-       if (ev != NULL) {
-               ev->next = NULL;
-               spin_lock_irqsave(&pending_event_spinlock, flags);
-               if (pending_event_head == NULL)
-                       pending_event_head = ev;
+       if ( newElement != NULL )
+       {
+               spin_lock_irqsave( &spinlock, flags );
+               if ( head == NULL )
+                       head = newElement;
                else {
                        go = 0;
-                       pending_event_tail->next = ev;
+                       tail->next = newElement;
                }
-               pending_event_tail = ev;
-               spin_unlock_irqrestore(&pending_event_spinlock, flags);
+               newElement->next = NULL;
+               tail = newElement;
+               spin_unlock_irqrestore( &spinlock, flags );
        }
 
        /* send the event */
-       while (go) {
+       while ( go )
+       {
                go = 0;
 
                /* any DMA data to send beforehand? */
-               if (pending_event_head->dma_data_length > 0)
-                       HvCallEvent_dmaToSp(pending_event_head->dma_data,
-                                       pending_event_head->remote_address,
-                                       pending_event_head->dma_data_length,
-                                       HvLpDma_Direction_LocalToRemote);
-
-               hvRc = HvCallEvent_signalLpEvent(
-                               &pending_event_head->event.hp_lp_event);
-               if (hvRc != HvLpEvent_Rc_Good) {
-                       printk(KERN_ERR "mf.c: HvCallEvent_signalLpEvent() failed with %d\n",
-                                       (int)hvRc);
-
-                       spin_lock_irqsave(&pending_event_spinlock, flags);
-                       ev1 = pending_event_head;
-                       pending_event_head = pending_event_head->next;
-                       if (pending_event_head != NULL)
+               if ( head->dmaDataLength > 0 )
+                       HvCallEvent_dmaToSp( head->dmaData, head->remoteAddress, head->dmaDataLength, HvLpDma_Direction_LocalToRemote );
+
+               hvRc = HvCallEvent_signalLpEvent(&head->event.xHvLpEvent);
+               if ( hvRc != HvLpEvent_Rc_Good )
+               {
+                       printk( KERN_ERR "mf.c: HvCallEvent_signalLpEvent() failed with %d\n", (int)hvRc );
+
+                       spin_lock_irqsave( &spinlock, flags );
+                       element = head;
+                       head = head->next;
+                       if ( head != NULL )
                                go = 1;
-                       spin_unlock_irqrestore(&pending_event_spinlock, flags);
+                       spin_unlock_irqrestore( &spinlock, flags );
 
-                       if (ev1 == ev)
+                       if ( element == newElement )
                                rc = -EIO;
-                       else if (ev1->hdlr != NULL) {
-                               union safe_cast mySafeCast;
-
-                               mySafeCast.ptr_as_u64 = ev1->event.hp_lp_event.xCorrelationToken;
-                               (*ev1->hdlr)(mySafeCast.ptr, -EIO);
+                       else {
+                               if ( element->hdlr != NULL )
+                               {
+                                       union SafeCast mySafeCast;
+                                       mySafeCast.ptrAsU64 = element->event.xHvLpEvent.xCorrelationToken;
+                                       (*element->hdlr)( mySafeCast.ptr, -EIO );
+                               }
                        }
 
-                       spin_lock_irqsave(&pending_event_spinlock, flags);
-                       free_pending_event(ev1);
-                       spin_unlock_irqrestore(&pending_event_spinlock, flags);
+                       spin_lock_irqsave( &spinlock, flags );
+                       free( element );
+                       spin_unlock_irqrestore( &spinlock, flags );
                }
        }
 
@@ -231,74 +272,80 @@ static int signal_event(struct pending_event *ev)
 }
 
 /*
- * Allocate a new pending_event structure, and initialize it.
+ * Allocate a new StackElement structure, and initialize it.
  */
-static struct pending_event *new_pending_event(void)
+static struct StackElement * newStackElement( void )
 {
-       struct pending_event *ev = NULL;
+       struct StackElement * newElement = NULL;
        HvLpIndex primaryLp = HvLpConfig_getPrimaryLpIndex();
        unsigned long flags;
-       struct HvLpEvent *hev;
 
-       spin_lock_irqsave(&pending_event_spinlock, flags);
-       if (pending_event_avail != NULL) {
-               ev = pending_event_avail;
-               pending_event_avail = pending_event_avail->next;
+       if ( newElement == NULL )
+       {
+               spin_lock_irqsave( &spinlock, flags );
+               if ( avail != NULL )
+               {
+                       newElement = avail;
+                       avail = avail->next;
+               }
+               spin_unlock_irqrestore( &spinlock, flags );
        }
-       spin_unlock_irqrestore(&pending_event_spinlock, flags);
-       if (ev == NULL)
-               ev = kmalloc(sizeof(struct pending_event),GFP_ATOMIC);
-       if (ev == NULL) {
-               printk(KERN_ERR "mf.c: unable to kmalloc %ld bytes\n",
-                               sizeof(struct pending_event));
+
+       if ( newElement == NULL )
+               newElement = kmalloc(sizeof(struct StackElement),GFP_ATOMIC);
+
+       if ( newElement == NULL )
+       {
+               printk( KERN_ERR "mf.c: unable to kmalloc %ld bytes\n", sizeof(struct StackElement) );
                return NULL;
        }
-       memset(ev, 0, sizeof(struct pending_event));
-       hev = &ev->event.hp_lp_event;
-       hev->xFlags.xValid = 1;
-       hev->xFlags.xAckType = HvLpEvent_AckType_ImmediateAck;
-       hev->xFlags.xAckInd = HvLpEvent_AckInd_DoAck;
-       hev->xFlags.xFunction = HvLpEvent_Function_Int;
-       hev->xType = HvLpEvent_Type_MachineFac;
-       hev->xSourceLp = HvLpConfig_getLpIndex();
-       hev->xTargetLp = primaryLp;
-       hev->xSizeMinus1 = sizeof(ev->event)-1;
-       hev->xRc = HvLpEvent_Rc_Good;
-       hev->xSourceInstanceId = HvCallEvent_getSourceLpInstanceId(primaryLp,
-                       HvLpEvent_Type_MachineFac);
-       hev->xTargetInstanceId = HvCallEvent_getTargetLpInstanceId(primaryLp,
-                       HvLpEvent_Type_MachineFac);
-
-       return ev;
+
+       memset( newElement, 0, sizeof(struct StackElement) );
+       newElement->event.xHvLpEvent.xFlags.xValid = 1;
+       newElement->event.xHvLpEvent.xFlags.xAckType = HvLpEvent_AckType_ImmediateAck;
+       newElement->event.xHvLpEvent.xFlags.xAckInd = HvLpEvent_AckInd_DoAck;
+       newElement->event.xHvLpEvent.xFlags.xFunction = HvLpEvent_Function_Int;
+       newElement->event.xHvLpEvent.xType = HvLpEvent_Type_MachineFac;
+       newElement->event.xHvLpEvent.xSourceLp = HvLpConfig_getLpIndex();
+       newElement->event.xHvLpEvent.xTargetLp = primaryLp;
+       newElement->event.xHvLpEvent.xSizeMinus1 = sizeof(newElement->event)-1;
+       newElement->event.xHvLpEvent.xRc = HvLpEvent_Rc_Good;
+       newElement->event.xHvLpEvent.xSourceInstanceId = HvCallEvent_getSourceLpInstanceId(primaryLp,HvLpEvent_Type_MachineFac);
+       newElement->event.xHvLpEvent.xTargetInstanceId = HvCallEvent_getTargetLpInstanceId(primaryLp,HvLpEvent_Type_MachineFac);
+
+       return newElement;
 }
 
-static int signal_vsp_instruction(struct VspCmdData *vspCmd)
+static int signalVspInstruction( struct VspCmdData *vspCmd )
 {
-       struct pending_event *ev = new_pending_event();
-       int rc;
+       struct StackElement * newElement = newStackElement();
+       int rc = 0;
        struct VspRspData response;
        DECLARE_MUTEX_LOCKED(Semaphore);
+       response.xSemaphore = &Semaphore;
+       response.xResponse = vspCmd;
 
-       if (ev == NULL)
-               return -ENOMEM;
-
-       response.sem = &Semaphore;
-       response.response = vspCmd;
-       ev->event.hp_lp_event.xSubtype = 6;
-       ev->event.hp_lp_event.x.xSubtypeData =
-               subtype_data('M', 'F',  'V',  'I');
-       ev->event.data.vsp_cmd.token.ptr = &response;
-       ev->event.data.vsp_cmd.cmd = vspCmd->cmd;
-       ev->event.data.vsp_cmd.lp_index = HvLpConfig_getLpIndex();
-       ev->event.data.vsp_cmd.result_code = 0xFF;
-       ev->event.data.vsp_cmd.reserved = 0;
-       memcpy(&(ev->event.data.vsp_cmd.sub_data),
-                       &(vspCmd->sub_data), sizeof(vspCmd->sub_data));
-       mb();
+       if ( newElement == NULL )
+               rc = -ENOMEM;
+       else {
+               newElement->event.xHvLpEvent.xSubtype = 6;
+               newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('V'<<8)+('I'<<0);
+               newElement->event.xUnion.xVspCmd.xTokenUnion.ptr = &response;
+               newElement->event.xUnion.xVspCmd.xCmd = vspCmd->xCmd;
+               newElement->event.xUnion.xVspCmd.xLpIndex = HvLpConfig_getLpIndex();
+               newElement->event.xUnion.xVspCmd.xRc = 0xFF;
+               newElement->event.xUnion.xVspCmd.xReserved1 = 0;
+               memcpy(&(newElement->event.xUnion.xVspCmd.xSubData),&(vspCmd->xSubData), sizeof(vspCmd->xSubData));
+               mb();
+
+               rc = signalEvent(newElement);
+       }
 
-       rc = signal_event(ev);
        if (rc == 0)
+       {
                down(&Semaphore);
+       }
+
        return rc;
 }
 
@@ -306,42 +353,46 @@ static int signal_vsp_instruction(struct VspCmdData *vspCmd)
 /*
  * Send a 12-byte CE message to the primary partition VSP object
  */
-static int signal_ce_msg(char *ce_msg, struct CeMsgCompleteData *completion)
+static int signalCEMsg( char * ceMsg, void * token )
 {
-       struct pending_event *ev = new_pending_event();
+       struct StackElement * newElement = newStackElement();
+       int rc = 0;
 
-       if (ev == NULL)
-               return -ENOMEM;
+       if ( newElement == NULL )
+               rc = -ENOMEM;
+       else {
+               newElement->event.xHvLpEvent.xSubtype = 0;
+               newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('C'<<8)+('E'<<0);
+               memcpy( newElement->event.xUnion.xCEMsgData.xCEMsg, ceMsg, 12 );
+               newElement->event.xUnion.xCEMsgData.xToken = token;
+               rc = signalEvent(newElement);
+       }
 
-       ev->event.hp_lp_event.xSubtype = 0;
-       ev->event.hp_lp_event.x.xSubtypeData =
-               subtype_data('M',  'F',  'C',  'E');
-       memcpy(ev->event.data.ce_msg.ce_msg, ce_msg, 12);
-       ev->event.data.ce_msg.completion = completion;
-       return signal_event(ev);
+       return rc;
 }
 
 /*
  * Send a 12-byte CE message and DMA data to the primary partition VSP object
  */
-static int dma_and_signal_ce_msg(char *ce_msg,
-               struct CeMsgCompleteData *completion, void *dma_data,
-               unsigned dma_data_length, unsigned remote_address)
+static int dmaAndSignalCEMsg( char * ceMsg, void * token, void * dmaData, unsigned dmaDataLength, unsigned remoteAddress )
 {
-       struct pending_event *ev = new_pending_event();
+       struct StackElement * newElement = newStackElement();
+       int rc = 0;
 
-       if (ev == NULL)
-               return -ENOMEM;
+       if ( newElement == NULL )
+               rc = -ENOMEM;
+       else {
+               newElement->event.xHvLpEvent.xSubtype = 0;
+               newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('C'<<8)+('E'<<0);
+               memcpy( newElement->event.xUnion.xCEMsgData.xCEMsg, ceMsg, 12 );
+               newElement->event.xUnion.xCEMsgData.xToken = token;
+               memcpy( newElement->dmaData, dmaData, dmaDataLength );
+               newElement->dmaDataLength = dmaDataLength;
+               newElement->remoteAddress = remoteAddress;
+               rc = signalEvent(newElement);
+       }
 
-       ev->event.hp_lp_event.xSubtype = 0;
-       ev->event.hp_lp_event.x.xSubtypeData =
-               subtype_data('M', 'F', 'C', 'E');
-       memcpy(ev->event.data.ce_msg.ce_msg, ce_msg, 12);
-       ev->event.data.ce_msg.completion = completion;
-       memcpy(ev->dma_data, dma_data, dma_data_length);
-       ev->dma_data_length = dma_data_length;
-       ev->remote_address = remote_address;
-       return signal_event(ev);
+       return rc;
 }
 
 /*
@@ -350,17 +401,18 @@ static int dma_and_signal_ce_msg(char *ce_msg,
  * this fails (why?), we'll simply force it off in a not-so-nice
  * manner.
  */
-static int shutdown(void)
+static int shutdown( void )
 {
-       int rc = kill_proc(1, SIGINT, 1);
+       int rc = kill_proc(1,SIGINT,1);
 
-       if (rc) {
-               printk(KERN_ALERT "mf.c: SIGINT to init failed (%d), "
-                               "hard shutdown commencing\n", rc);
+       if ( rc )
+       {
+               printk( KERN_ALERT "mf.c: SIGINT to init failed (%d), hard shutdown commencing\n", rc );
                mf_powerOff();
-       } else
-               printk(KERN_INFO "mf.c: init has been successfully notified "
-                               "to proceed with shutdown\n");
+       }
+       else
+               printk( KERN_INFO "mf.c: init has been successfully notified to proceed with shutdown\n" );
+
        return rc;
 }
 
@@ -368,64 +420,67 @@ static int shutdown(void)
  * The primary partition VSP object is sending us a new
  * event flow.  Handle it...
  */
-static void intReceived(struct IoMFLpEvent *event)
+static void intReceived( struct IoMFLpEvent * event )
 {
        int freeIt = 0;
-       struct pending_event *two = NULL;
-
+       struct StackElement * two = NULL;
        /* ack the interrupt */
-       event->hp_lp_event.xRc = HvLpEvent_Rc_Good;
-       HvCallEvent_ackLpEvent(&event->hp_lp_event);
+       event->xHvLpEvent.xRc = HvLpEvent_Rc_Good;
+       HvCallEvent_ackLpEvent( &event->xHvLpEvent );
 
-       /* process interrupt */
-       switch (event->hp_lp_event.xSubtype) {
+    /* process interrupt */
+       switch( event->xHvLpEvent.xSubtype )
+       {
        case 0: /* CE message */
-               switch (event->data.ce_msg.ce_msg[3]) {
+               switch( event->xUnion.xCEMsgData.xCEMsg[3] )
+               {
                case 0x5B:      /* power control notification */
-                       if ((event->data.ce_msg.ce_msg[5] & 0x20) != 0) {
-                               printk(KERN_INFO "mf.c: Commencing partition shutdown\n");
-                               if (shutdown() == 0)
-                                       signal_ce_msg("\x00\x00\x00\xDB\x00\x00\x00\x00\x00\x00\x00\x00", NULL);
+                       if ( (event->xUnion.xCEMsgData.xCEMsg[5]&0x20) != 0 )
+                       {
+                               printk( KERN_INFO "mf.c: Commencing partition shutdown\n" );
+                               if ( shutdown() == 0 )
+                                       signalCEMsg( "\x00\x00\x00\xDB\x00\x00\x00\x00\x00\x00\x00\x00", NULL );
                        }
                        break;
                case 0xC0:      /* get time */
-                       if ((pending_event_head == NULL) ||
-                           (pending_event_head->event.data.ce_msg.ce_msg[3]
-                            != 0x40))
-                               break;
-                       freeIt = 1;
-                       if (pending_event_head->event.data.ce_msg.completion != 0) {
-                               CeMsgCompleteHandler handler = pending_event_head->event.data.ce_msg.completion->handler;
-                               void *token = pending_event_head->event.data.ce_msg.completion->token;
+                       {
+                               if ( (head != NULL) && ( head->event.xUnion.xCEMsgData.xCEMsg[3] == 0x40 ) )
+                               {
+                                       freeIt = 1;
+                                       if ( head->event.xUnion.xCEMsgData.xToken != 0 )
+                                       {
+                                               CeMsgCompleteHandler xHdlr = head->event.xUnion.xCEMsgData.xToken->xHdlr;
+                                               void * token = head->event.xUnion.xCEMsgData.xToken->xToken;
 
-                               if (handler != NULL)
-                                       (*handler)(token, &(event->data.ce_msg));
+                                               if (xHdlr != NULL)
+                                                       (*xHdlr)( token, &(event->xUnion.xCEMsgData) );
+                                       }
+                               }
                        }
                        break;
                }
 
                /* remove from queue */
-               if (freeIt == 1) {
+               if ( freeIt == 1 )
+               {
                        unsigned long flags;
-
-                       spin_lock_irqsave(&pending_event_spinlock, flags);
-                       if (pending_event_head != NULL) {
-                               struct pending_event *oldHead =
-                                       pending_event_head;
-
-                               pending_event_head = pending_event_head->next;
-                               two = pending_event_head;
-                               free_pending_event(oldHead);
+                       spin_lock_irqsave( &spinlock, flags );
+                       if ( head != NULL )
+                       {
+                               struct StackElement *oldHead = head;
+                               head = head->next;
+                               two = head;
+                               free( oldHead );
                        }
-                       spin_unlock_irqrestore(&pending_event_spinlock, flags);
+                       spin_unlock_irqrestore( &spinlock, flags );
                }
 
                /* send next waiting event */
-               if (two != NULL)
-                       signal_event(NULL);
+               if ( two != NULL )
+                       signalEvent( NULL );
                break;
        case 1: /* IT sys shutdown */
-               printk(KERN_INFO "mf.c: Commencing system shutdown\n");
+               printk( KERN_INFO "mf.c: Commencing system shutdown\n" );
                shutdown();
                break;
        }
@@ -436,74 +491,81 @@ static void intReceived(struct IoMFLpEvent *event)
  * of a flow we sent to them.  If there are other flows queued
  * up, we must send another one now...
  */
-static void ackReceived(struct IoMFLpEvent *event)
+static void ackReceived( struct IoMFLpEvent * event )
 {
        unsigned long flags;
-       struct pending_event * two = NULL;
+       struct StackElement * two = NULL;
        unsigned long freeIt = 0;
 
-       /* handle current event */
-       if (pending_event_head != NULL) {
-               switch (event->hp_lp_event.xSubtype) {
+    /* handle current event */
+       if ( head != NULL )
+       {
+               switch( event->xHvLpEvent.xSubtype )
+               {
                case 0:     /* CE msg */
-                       if (event->data.ce_msg.ce_msg[3] == 0x40) {
-                               if (event->data.ce_msg.ce_msg[2] != 0) {
+                       if ( event->xUnion.xCEMsgData.xCEMsg[3] == 0x40 )
+                       {
+                               if ( event->xUnion.xCEMsgData.xCEMsg[2] != 0 )
+                               {
                                        freeIt = 1;
-                                       if (pending_event_head->event.data.ce_msg.completion
-                                                       != 0) {
-                                               CeMsgCompleteHandler handler = pending_event_head->event.data.ce_msg.completion->handler;
-                                               void *token = pending_event_head->event.data.ce_msg.completion->token;
+                                       if ( head->event.xUnion.xCEMsgData.xToken != 0 )
+                                       {
+                                               CeMsgCompleteHandler xHdlr = head->event.xUnion.xCEMsgData.xToken->xHdlr;
+                                               void * token = head->event.xUnion.xCEMsgData.xToken->xToken;
 
-                                               if (handler != NULL)
-                                                       (*handler)(token, &(event->data.ce_msg));
+                                               if (xHdlr != NULL)
+                                                       (*xHdlr)( token, &(event->xUnion.xCEMsgData) );
                                        }
                                }
-                       } else
+                       } else {
                                freeIt = 1;
+                       }
                        break;
                case 4: /* allocate */
                case 5: /* deallocate */
-                       if (pending_event_head->hdlr != NULL) {
-                               union safe_cast mySafeCast;
-
-                               mySafeCast.ptr_as_u64 = event->hp_lp_event.xCorrelationToken;
-                               (*pending_event_head->hdlr)(mySafeCast.ptr, event->data.alloc.count);
+                       if ( head->hdlr != NULL )
+                       {
+                               union SafeCast mySafeCast;
+                               mySafeCast.ptrAsU64 = event->xHvLpEvent.xCorrelationToken;
+                               (*head->hdlr)( mySafeCast.ptr, event->xUnion.xAllocData.xCount );
                        }
                        freeIt = 1;
                        break;
                case 6:
                        {
-                               struct VspRspData *rsp = (struct VspRspData *)event->data.vsp_cmd.token.ptr;
-
-                               if (rsp != NULL) {
-                                       if (rsp->response != NULL)
-                                               memcpy(rsp->response, &(event->data.vsp_cmd), sizeof(event->data.vsp_cmd));
-                                       if (rsp->sem != NULL)
-                                               up(rsp->sem);
-                               } else
-                                       printk(KERN_ERR "mf.c: no rsp\n");
+                               struct VspRspData *rsp = (struct VspRspData *)event->xUnion.xVspCmd.xTokenUnion.ptr;
+
+                               if (rsp != NULL)
+                               {
+                                       if (rsp->xResponse != NULL)
+                                               memcpy(rsp->xResponse, &(event->xUnion.xVspCmd), sizeof(event->xUnion.xVspCmd));
+                                       if (rsp->xSemaphore != NULL)
+                                               up(rsp->xSemaphore);
+                               } else {
+                                       printk( KERN_ERR "mf.c: no rsp\n");
+                               }
                                freeIt = 1;
                        }
                        break;
                }
        }
        else
-               printk(KERN_ERR "mf.c: stack empty for receiving ack\n");
-
-       /* remove from queue */
-       spin_lock_irqsave(&pending_event_spinlock, flags);
-       if ((pending_event_head != NULL) && (freeIt == 1)) {
-               struct pending_event *oldHead = pending_event_head;
-
-               pending_event_head = pending_event_head->next;
-               two = pending_event_head;
-               free_pending_event(oldHead);
+               printk( KERN_ERR "mf.c: stack empty for receiving ack\n" );
+
+    /* remove from queue */
+       spin_lock_irqsave( &spinlock, flags );
+       if (( head != NULL ) && ( freeIt == 1 ))
+       {
+               struct StackElement *oldHead = head;
+               head = head->next;
+               two = head;
+               free( oldHead );
        } 
-       spin_unlock_irqrestore(&pending_event_spinlock, flags);
+       spin_unlock_irqrestore( &spinlock, flags );
 
-       /* send next waiting event */
-       if (two != NULL)
-               signal_event(NULL);
+    /* send next waiting event */
+       if ( two != NULL )
+               signalEvent( NULL );
 }
 
 /*
@@ -512,94 +574,101 @@ static void ackReceived(struct IoMFLpEvent *event)
  * parse it enough to know if it is an interrupt or an
  * acknowledge.
  */
-static void hvHandler(struct HvLpEvent *event, struct pt_regs *regs)
+static void hvHandler( struct HvLpEvent * event, struct pt_regs * regs )
 {
-       if ((event != NULL) && (event->xType == HvLpEvent_Type_MachineFac)) {
-               switch(event->xFlags.xFunction) {
+       if ( (event != NULL) && (event->xType == HvLpEvent_Type_MachineFac) )
+       {
+               switch( event->xFlags.xFunction )
+               {
                case HvLpEvent_Function_Ack:
-                       ackReceived((struct IoMFLpEvent *)event);
+                       ackReceived( (struct IoMFLpEvent *)event );
                        break;
                case HvLpEvent_Function_Int:
-                       intReceived((struct IoMFLpEvent *)event);
+                       intReceived( (struct IoMFLpEvent *)event );
                        break;
                default:
-                       printk(KERN_ERR "mf.c: non ack/int event received\n");
+                       printk( KERN_ERR "mf.c: non ack/int event received\n" );
                        break;
                }
-       } else
-               printk(KERN_ERR "mf.c: alien event received\n");
+       }
+       else
+               printk( KERN_ERR "mf.c: alien event received\n" );
 }
 
 /*
  * Global kernel interface to allocate and seed events into the
  * Hypervisor.
  */
-void mf_allocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type,
-               unsigned size, unsigned count, MFCompleteHandler hdlr,
-               void *userToken)
+void mf_allocateLpEvents( HvLpIndex targetLp,
+                         HvLpEvent_Type type,
+                         unsigned size,
+                         unsigned count,
+                         MFCompleteHandler hdlr,
+                         void * userToken )
 {
-       struct pending_event *ev = new_pending_event();
-       int rc;
+       struct StackElement * newElement = newStackElement();
+       int rc = 0;
 
-       if (ev == NULL) {
+       if ( newElement == NULL )
                rc = -ENOMEM;
-       } else {
-               union safe_cast mine;
-
+       else {
+               union SafeCast mine;
                mine.ptr = userToken;
-               ev->event.hp_lp_event.xSubtype = 4;
-               ev->event.hp_lp_event.xCorrelationToken = mine.ptr_as_u64;
-               ev->event.hp_lp_event.x.xSubtypeData =
-                       subtype_data('M', 'F', 'M', 'A');
-               ev->event.data.alloc.target_lp = targetLp;
-               ev->event.data.alloc.type = type;
-               ev->event.data.alloc.size = size;
-               ev->event.data.alloc.count = count;
-               ev->hdlr = hdlr;
-               rc = signal_event(ev);
+               newElement->event.xHvLpEvent.xSubtype = 4;
+               newElement->event.xHvLpEvent.xCorrelationToken = mine.ptrAsU64;
+               newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('M'<<8)+('A'<<0);
+               newElement->event.xUnion.xAllocData.xTargetLp = targetLp;
+               newElement->event.xUnion.xAllocData.xType = type;
+               newElement->event.xUnion.xAllocData.xSize = size;
+               newElement->event.xUnion.xAllocData.xCount = count;
+               newElement->hdlr = hdlr;
+               rc = signalEvent(newElement);
        }
-       if ((rc != 0) && (hdlr != NULL))
-               (*hdlr)(userToken, rc);
+
+       if ( (rc != 0) && (hdlr != NULL) )
+               (*hdlr)( userToken, rc );
 }
 
 /*
  * Global kernel interface to unseed and deallocate events already in
  * Hypervisor.
  */
-void mf_deallocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type,
-               unsigned count, MFCompleteHandler hdlr, void *userToken)
+void mf_deallocateLpEvents( HvLpIndex targetLp,
+                           HvLpEvent_Type type,
+                           unsigned count,
+                           MFCompleteHandler hdlr,
+                           void * userToken )
 {
-       struct pending_event *ev = new_pending_event();
-       int rc;
+       struct StackElement * newElement = newStackElement();
+       int rc = 0;
 
-       if (ev == NULL)
+       if ( newElement == NULL )
                rc = -ENOMEM;
        else {
-               union safe_cast mine;
-
+               union SafeCast mine;
                mine.ptr = userToken;
-               ev->event.hp_lp_event.xSubtype = 5;
-               ev->event.hp_lp_event.xCorrelationToken = mine.ptr_as_u64;
-               ev->event.hp_lp_event.x.xSubtypeData =
-                       subtype_data('M', 'F', 'M', 'D');
-               ev->event.data.alloc.target_lp = targetLp;
-               ev->event.data.alloc.type = type;
-               ev->event.data.alloc.count = count;
-               ev->hdlr = hdlr;
-               rc = signal_event(ev);
+               newElement->event.xHvLpEvent.xSubtype = 5;
+               newElement->event.xHvLpEvent.xCorrelationToken = mine.ptrAsU64;
+               newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('M'<<8)+('D'<<0);
+               newElement->event.xUnion.xAllocData.xTargetLp = targetLp;
+               newElement->event.xUnion.xAllocData.xType = type;
+               newElement->event.xUnion.xAllocData.xCount = count;
+               newElement->hdlr = hdlr;
+               rc = signalEvent(newElement);
        }
-       if ((rc != 0) && (hdlr != NULL))
-               (*hdlr)(userToken, rc);
+
+       if ( (rc != 0) && (hdlr != NULL) )
+               (*hdlr)( userToken, rc );
 }
 
 /*
  * Global kernel interface to tell the VSP object in the primary
  * partition to power this partition off.
  */
-void mf_powerOff(void)
+void mf_powerOff( void )
 {
-       printk(KERN_INFO "mf.c: Down it goes...\n");
-       signal_ce_msg("\x00\x00\x00\x4D\x00\x00\x00\x00\x00\x00\x00\x00", NULL);
+       printk( KERN_INFO "mf.c: Down it goes...\n" );
+       signalCEMsg( "\x00\x00\x00\x4D\x00\x00\x00\x00\x00\x00\x00\x00", NULL );
        for (;;);
 }
 
@@ -607,104 +676,111 @@ void mf_powerOff(void)
  * Global kernel interface to tell the VSP object in the primary
  * partition to reboot this partition.
  */
-void mf_reboot(void)
+void mf_reboot( void )
 {
-       printk(KERN_INFO "mf.c: Preparing to bounce...\n");
-       signal_ce_msg("\x00\x00\x00\x4E\x00\x00\x00\x00\x00\x00\x00\x00", NULL);
+       printk( KERN_INFO "mf.c: Preparing to bounce...\n" );
+       signalCEMsg( "\x00\x00\x00\x4E\x00\x00\x00\x00\x00\x00\x00\x00", NULL );
        for (;;);
 }
 
 /*
  * Display a single word SRC onto the VSP control panel.
  */
-void mf_displaySrc(u32 word)
+void mf_displaySrc( u32 word )
 {
        u8 ce[12];
 
-       memcpy(ce, "\x00\x00\x00\x4A\x00\x00\x00\x01\x00\x00\x00\x00", 12);
-       ce[8] = word >> 24;
-       ce[9] = word >> 16;
-       ce[10] = word >> 8;
+       memcpy( ce, "\x00\x00\x00\x4A\x00\x00\x00\x01\x00\x00\x00\x00", 12 );
+       ce[8] = word>>24;
+       ce[9] = word>>16;
+       ce[10] = word>>8;
        ce[11] = word;
-       signal_ce_msg(ce, NULL);
+       signalCEMsg( ce, NULL );
 }
 
 /*
  * Display a single word SRC of the form "PROGXXXX" on the VSP control panel.
  */
-void mf_displayProgress(u16 value)
+void mf_displayProgress( u16 value )
 {
        u8 ce[12];
        u8 src[72];
 
-       memcpy(ce, "\x00\x00\x04\x4A\x00\x00\x00\x48\x00\x00\x00\x00", 12);
-       memcpy(src, "\x01\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00"
-               "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
-               "\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
-               "\x00\x00\x00\x00PROGxxxx                        ",
-               72);
-       src[6] = value >> 8;
-       src[7] = value & 255;
-       src[44] = "0123456789ABCDEF"[(value >> 12) & 15];
-       src[45] = "0123456789ABCDEF"[(value >> 8) & 15];
-       src[46] = "0123456789ABCDEF"[(value >> 4) & 15];
-       src[47] = "0123456789ABCDEF"[value & 15];
-       dma_and_signal_ce_msg(ce, NULL, src, sizeof(src), 9 * 64 * 1024);
+       memcpy( ce, "\x00\x00\x04\x4A\x00\x00\x00\x48\x00\x00\x00\x00", 12 );
+       memcpy( src,
+               "\x01\x00\x00\x01"
+               "\x00\x00\x00\x00"
+               "\x00\x00\x00\x00"
+               "\x00\x00\x00\x00"
+               "\x00\x00\x00\x00"
+               "\x00\x00\x00\x00"
+               "\x00\x00\x00\x00"
+               "\x00\x00\x00\x00"
+               "\x00\x00\x00\x00"
+               "\x00\x00\x00\x00"
+               "PROGxxxx"
+               "                        ",
+               72 );
+       src[6] = value>>8;
+       src[7] = value&255;
+       src[44] = "0123456789ABCDEF"[(value>>12)&15];
+       src[45] = "0123456789ABCDEF"[(value>>8)&15];
+       src[46] = "0123456789ABCDEF"[(value>>4)&15];
+       src[47] = "0123456789ABCDEF"[value&15];
+       dmaAndSignalCEMsg( ce, NULL, src, sizeof(src), 9*64*1024 );
 }
 
 /*
  * Clear the VSP control panel.  Used to "erase" an SRC that was
  * previously displayed.
  */
-void mf_clearSrc(void)
+void mf_clearSrc( void )
 {
-       signal_ce_msg("\x00\x00\x00\x4B\x00\x00\x00\x00\x00\x00\x00\x00", NULL);
+       signalCEMsg( "\x00\x00\x00\x4B\x00\x00\x00\x00\x00\x00\x00\x00", NULL );
 }
 
 /*
  * Initialization code here.
  */
-void mf_init(void)
+void mf_init( void )
 {
        int i;
 
-       /* initialize */
-       spin_lock_init(&pending_event_spinlock);
-       for (i = 0;
-            i < sizeof(pending_event_prealloc) / sizeof(*pending_event_prealloc);
-            ++i)
-               free_pending_event(&pending_event_prealloc[i]);
-       HvLpEvent_registerHandler(HvLpEvent_Type_MachineFac, &hvHandler);
+    /* initialize */
+       spin_lock_init( &spinlock );
+       for ( i = 0; i < sizeof(prealloc)/sizeof(*prealloc); ++i )
+               free( &prealloc[i] );
+       HvLpEvent_registerHandler( HvLpEvent_Type_MachineFac, &hvHandler );
 
        /* virtual continue ack */
-       signal_ce_msg("\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00", NULL);
+       signalCEMsg( "\x00\x00\x00\x57\x00\x00\x00\x00\x00\x00\x00\x00", NULL );
 
        /* initialization complete */
-       printk(KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities initialized\n");
+       printk( KERN_NOTICE "mf.c: iSeries Linux LPAR Machine Facilities initialized\n" );
 
        iSeries_proc_callback(&mf_proc_init);
 }
 
 void mf_setSide(char side)
 {
-       u64 newSide;
+       int rc = 0;
+       u64 newSide = 0;
        struct VspCmdData myVspCmd;
 
        memset(&myVspCmd, 0, sizeof(myVspCmd));
-       switch (side) {
-       case 'A':       newSide = 0;
-                       break;
-       case 'B':       newSide = 1;
-                       break;
-       case 'C':       newSide = 2; 
-                       break;
-       default:        newSide = 3;
-                       break;
-       }
-       myVspCmd.sub_data.ipl_type = newSide;
-       myVspCmd.cmd = 10;
+       if (side == 'A')
+               newSide = 0;
+       else if (side == 'B')
+               newSide = 1;
+       else if (side == 'C')
+               newSide = 2; 
+       else
+               newSide = 3;
+
+       myVspCmd.xSubData.xFunction02SelectIplTypeIn.xIplType = newSide;
+       myVspCmd.xCmd = 10;
 
-       (void)signal_vsp_instruction(&myVspCmd);
+       rc = signalVspInstruction(&myVspCmd);
 }
 
 char mf_getSide(void)
@@ -714,82 +790,91 @@ char mf_getSide(void)
        struct VspCmdData myVspCmd;
 
        memset(&myVspCmd, 0, sizeof(myVspCmd));
-       myVspCmd.cmd = 2;
-       myVspCmd.sub_data.ipl_type = 0;
+       myVspCmd.xCmd = 2;
+       myVspCmd.xSubData.xFunction02SelectIplTypeIn.xIplType = 0;
        mb();
-       rc = signal_vsp_instruction(&myVspCmd);
+       rc = signalVspInstruction(&myVspCmd);
 
        if (rc != 0)
+       {
                return returnValue;
-
-       if (myVspCmd.result_code == 0) {
-               switch (myVspCmd.sub_data.ipl_type) {
-               case 0: returnValue = 'A';
-                       break;
-               case 1: returnValue = 'B';
-                       break;
-               case 2: returnValue = 'C';
-                       break;
-               default:        returnValue = 'D';
-                       break;
+       } else {
+               if (myVspCmd.xRc == 0)
+               {
+                       if (myVspCmd.xSubData.xGetIplTypeOut.xIplType == 0)
+                               returnValue = 'A';
+                       else if (myVspCmd.xSubData.xGetIplTypeOut.xIplType == 1)
+                               returnValue = 'B';
+                       else if (myVspCmd.xSubData.xGetIplTypeOut.xIplType == 2)
+                               returnValue = 'C';
+                       else
+                               returnValue = 'D';
                }
        }
+
        return returnValue;
 }
 
 void mf_getSrcHistory(char *buffer, int size)
 {
-#if 0
-       struct IplTypeReturnStuff returnStuff;
-       struct pending_event *ev = new_pending_event();
-       int rc = 0;
-       char *pages[4];
-
-       pages[0] = kmalloc(4096, GFP_ATOMIC);
-       pages[1] = kmalloc(4096, GFP_ATOMIC);
-       pages[2] = kmalloc(4096, GFP_ATOMIC);
-       pages[3] = kmalloc(4096, GFP_ATOMIC);
-       if ((ev == NULL) || (pages[0] == NULL) || (pages[1] == NULL)
-                        || (pages[2] == NULL) || (pages[3] == NULL))
-               return -ENOMEM;
-
-       returnStuff.xType = 0;
-       returnStuff.xRc = 0;
-       returnStuff.xDone = 0;
-       ev->event.hp_lp_event.xSubtype = 6;
-       ev->event.hp_lp_event.x.xSubtypeData =
-               subtype_data('M', 'F', 'V', 'I');
-       ev->event.data.vsp_cmd.xEvent = &returnStuff;
-       ev->event.data.vsp_cmd.cmd = 4;
-       ev->event.data.vsp_cmd.lp_index = HvLpConfig_getLpIndex();
-       ev->event.data.vsp_cmd.result_code = 0xFF;
-       ev->event.data.vsp_cmd.reserved = 0;
-       ev->event.data.vsp_cmd.sub_data.page[0] =
-               (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[0]));
-       ev->event.data.vsp_cmd.sub_data.page[1] =
-               (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[1]));
-       ev->event.data.vsp_cmd.sub_data.page[2] =
-               (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[2]));
-       ev->event.data.vsp_cmd.sub_data.page[3] =
-               (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[3]));
-       mb();
-       if (signal_event(ev) != 0)
-               return;
-
-       while (returnStuff.xDone != 1)
-               udelay(10);
-       if (returnStuff.xRc == 0)
-               memcpy(buffer, pages[0], size);
-       kfree(pages[0]);
-       kfree(pages[1]);
-       kfree(pages[2]);
-       kfree(pages[3]);
-#endif
+    /*    struct IplTypeReturnStuff returnStuff;
+     struct StackElement * newElement = newStackElement();
+     int rc = 0;
+     char *pages[4];
+
+     pages[0] = kmalloc(4096, GFP_ATOMIC);
+     pages[1] = kmalloc(4096, GFP_ATOMIC);
+     pages[2] = kmalloc(4096, GFP_ATOMIC);
+     pages[3] = kmalloc(4096, GFP_ATOMIC);
+     if (( newElement == NULL ) || (pages[0] == NULL) || (pages[1] == NULL) || (pages[2] == NULL) || (pages[3] == NULL))
+     rc = -ENOMEM;
+     else
+     {
+     returnStuff.xType = 0;
+     returnStuff.xRc = 0;
+     returnStuff.xDone = 0;
+     newElement->event.xHvLpEvent.xSubtype = 6;
+     newElement->event.xHvLpEvent.x.xSubtypeData = ('M'<<24)+('F'<<16)+('V'<<8)+('I'<<0);
+     newElement->event.xUnion.xVspCmd.xEvent = &returnStuff;
+     newElement->event.xUnion.xVspCmd.xCmd = 4;
+     newElement->event.xUnion.xVspCmd.xLpIndex = HvLpConfig_getLpIndex();
+     newElement->event.xUnion.xVspCmd.xRc = 0xFF;
+     newElement->event.xUnion.xVspCmd.xReserved1 = 0;
+     newElement->event.xUnion.xVspCmd.xSubData.xGetSrcHistoryIn.xPage[0] = (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[0]));
+     newElement->event.xUnion.xVspCmd.xSubData.xGetSrcHistoryIn.xPage[1] = (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[1]));
+     newElement->event.xUnion.xVspCmd.xSubData.xGetSrcHistoryIn.xPage[2] = (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[2]));
+     newElement->event.xUnion.xVspCmd.xSubData.xGetSrcHistoryIn.xPage[3] = (0x8000000000000000ULL | virt_to_absolute((unsigned long)pages[3]));
+     mb();
+     rc = signalEvent(newElement);
+     }
+
+     if (rc != 0)
+     {
+     return;
+     }
+     else
+     {
+     while (returnStuff.xDone != 1)
+     {
+     udelay(10);
+     }
+
+     if (returnStuff.xRc == 0)
+     {
+     memcpy(buffer, pages[0], size);
+     }
+     }
+
+     kfree(pages[0]);
+     kfree(pages[1]);
+     kfree(pages[2]);
+     kfree(pages[3]);*/
 }
 
 void mf_setCmdLine(const char *cmdline, int size, u64 side)
 {
        struct VspCmdData myVspCmd;
+       int rc = 0;
        dma_addr_t dma_addr = 0;
        char *page = pci_alloc_consistent(iSeries_vio_dev, size, &dma_addr);
 
@@ -801,13 +886,13 @@ void mf_setCmdLine(const char *cmdline, int size, u64 side)
        copy_from_user(page, cmdline, size);
 
        memset(&myVspCmd, 0, sizeof(myVspCmd));
-       myVspCmd.cmd = 31;
-       myVspCmd.sub_data.kern.token = dma_addr;
-       myVspCmd.sub_data.kern.address_type = HvLpDma_AddressType_TceIndex;
-       myVspCmd.sub_data.kern.side = side;
-       myVspCmd.sub_data.kern.length = size;
+       myVspCmd.xCmd = 31;
+       myVspCmd.xSubData.xSetKernelCmdLineIn.xToken = dma_addr;
+       myVspCmd.xSubData.xSetKernelCmdLineIn.xAddressType = HvLpDma_AddressType_TceIndex;
+       myVspCmd.xSubData.xSetKernelCmdLineIn.xSide = side;
+       myVspCmd.xSubData.xSetKernelCmdLineIn.xTransferLength = size;
        mb();
-       (void)signal_vsp_instruction(&myVspCmd);
+       rc = signalVspInstruction(&myVspCmd);
 
        pci_free_consistent(iSeries_vio_dev, size, page, dma_addr);
 }
@@ -815,29 +900,31 @@ void mf_setCmdLine(const char *cmdline, int size, u64 side)
 int mf_getCmdLine(char *cmdline, int *size, u64 side)
 {
        struct VspCmdData myVspCmd;
-       int rc;
+       int rc = 0;
        int len = *size;
-       dma_addr_t dma_addr;
+       dma_addr_t dma_addr = pci_map_single(iSeries_vio_dev, cmdline, *size, PCI_DMA_FROMDEVICE);
 
-       dma_addr = pci_map_single(iSeries_vio_dev, cmdline, len,
-                       PCI_DMA_FROMDEVICE);
-       memset(cmdline, 0, len);
+       memset(cmdline, 0, *size);
        memset(&myVspCmd, 0, sizeof(myVspCmd));
-       myVspCmd.cmd = 33;
-       myVspCmd.sub_data.kern.token = dma_addr;
-       myVspCmd.sub_data.kern.address_type = HvLpDma_AddressType_TceIndex;
-       myVspCmd.sub_data.kern.side = side;
-       myVspCmd.sub_data.kern.length = len;
+       myVspCmd.xCmd = 33;
+       myVspCmd.xSubData.xGetKernelCmdLineIn.xToken = dma_addr;
+       myVspCmd.xSubData.xGetKernelCmdLineIn.xAddressType = HvLpDma_AddressType_TceIndex;
+       myVspCmd.xSubData.xGetKernelCmdLineIn.xSide = side;
+       myVspCmd.xSubData.xGetKernelCmdLineIn.xTransferLength = *size;
        mb();
-       rc = signal_vsp_instruction(&myVspCmd);
+       rc = signalVspInstruction(&myVspCmd);
+
+       if ( ! rc ) {
 
-       if (rc == 0) {
-               if (myVspCmd.result_code == 0)
-                       len = myVspCmd.sub_data.length_out;
-#if 0
-               else
+               if (myVspCmd.xRc == 0)
+               {
+                       len = myVspCmd.xSubData.xGetKernelCmdLineOut.xTransferLength;
+               }
+               /* else
+                       {
                        memcpy(cmdline, "Bad cmdline", 11);
-#endif
+                       }
+               */
        }
 
        pci_unmap_single(iSeries_vio_dev, dma_addr, *size, PCI_DMA_FROMDEVICE);
@@ -849,8 +936,10 @@ int mf_getCmdLine(char *cmdline, int *size, u64 side)
 int mf_setVmlinuxChunk(const char *buffer, int size, int offset, u64 side)
 {
        struct VspCmdData myVspCmd;
-       int rc;
+       int rc = 0;
+
        dma_addr_t dma_addr = 0;
+
        char *page = pci_alloc_consistent(iSeries_vio_dev, size, &dma_addr);
 
        if (page == NULL) {
@@ -861,19 +950,23 @@ int mf_setVmlinuxChunk(const char *buffer, int size, int offset, u64 side)
        copy_from_user(page, buffer, size);
        memset(&myVspCmd, 0, sizeof(myVspCmd));
 
-       myVspCmd.cmd = 30;
-       myVspCmd.sub_data.kern.token = dma_addr;
-       myVspCmd.sub_data.kern.address_type = HvLpDma_AddressType_TceIndex;
-       myVspCmd.sub_data.kern.side = side;
-       myVspCmd.sub_data.kern.offset = offset;
-       myVspCmd.sub_data.kern.length = size;
+       myVspCmd.xCmd = 30;
+       myVspCmd.xSubData.xGetKernelImageIn.xToken = dma_addr;
+       myVspCmd.xSubData.xGetKernelImageIn.xAddressType = HvLpDma_AddressType_TceIndex;
+       myVspCmd.xSubData.xGetKernelImageIn.xSide = side;
+       myVspCmd.xSubData.xGetKernelImageIn.xOffset = offset;
+       myVspCmd.xSubData.xGetKernelImageIn.xTransferLength = size;
        mb();
-       rc = signal_vsp_instruction(&myVspCmd);
-       if (rc == 0) {
-               if (myVspCmd.result_code == 0)
+       rc = signalVspInstruction(&myVspCmd);
+
+       if (rc == 0)
+       {
+               if (myVspCmd.xRc == 0)
+               {
                        rc = 0;
-               else
+               } else {
                        rc = -ENOMEM;
+               }
        }
 
        pci_free_consistent(iSeries_vio_dev, size, page, dma_addr);
@@ -884,27 +977,31 @@ int mf_setVmlinuxChunk(const char *buffer, int size, int offset, u64 side)
 int mf_getVmlinuxChunk(char *buffer, int *size, int offset, u64 side)
 {
        struct VspCmdData myVspCmd;
-       int rc;
+       int rc = 0;
        int len = *size;
-       dma_addr_t dma_addr;
 
-       dma_addr = pci_map_single(iSeries_vio_dev, buffer, len,
-                       PCI_DMA_FROMDEVICE);
+       dma_addr_t dma_addr = pci_map_single(iSeries_vio_dev, buffer, *size, PCI_DMA_FROMDEVICE);
+
        memset(buffer, 0, len);
+
        memset(&myVspCmd, 0, sizeof(myVspCmd));
-       myVspCmd.cmd = 32;
-       myVspCmd.sub_data.kern.token = dma_addr;
-       myVspCmd.sub_data.kern.address_type = HvLpDma_AddressType_TceIndex;
-       myVspCmd.sub_data.kern.side = side;
-       myVspCmd.sub_data.kern.offset = offset;
-       myVspCmd.sub_data.kern.length = len;
+       myVspCmd.xCmd = 32;
+       myVspCmd.xSubData.xGetKernelImageIn.xToken = dma_addr;
+       myVspCmd.xSubData.xGetKernelImageIn.xAddressType = HvLpDma_AddressType_TceIndex;
+       myVspCmd.xSubData.xGetKernelImageIn.xSide = side;
+       myVspCmd.xSubData.xGetKernelImageIn.xOffset = offset;
+       myVspCmd.xSubData.xGetKernelImageIn.xTransferLength = len;
        mb();
-       rc = signal_vsp_instruction(&myVspCmd);
-       if (rc == 0) {
-               if (myVspCmd.result_code == 0)
-                       *size = myVspCmd.sub_data.length_out;
-               else
+       rc = signalVspInstruction(&myVspCmd);
+
+       if (rc == 0)
+       {
+               if (myVspCmd.xRc == 0)
+               {
+                       *size = myVspCmd.xSubData.xGetKernelImageOut.xTransferLength;
+               } else {
                        rc = -ENOMEM;
+               }
        }
 
        pci_unmap_single(iSeries_vio_dev, dma_addr, len, PCI_DMA_FROMDEVICE);
@@ -918,11 +1015,12 @@ int mf_setRtcTime(unsigned long time)
 
        to_tm(time, &tm);
 
-       return mf_setRtc(&tm);
+       return mf_setRtc( &tm );
 }
 
-struct RtcTimeData {
-       struct semaphore *sem;
+struct RtcTimeData
+{
+       struct semaphore *xSemaphore;
        struct CeMsgData xCeMsg;
        int xRc;
 };
@@ -932,23 +1030,26 @@ void getRtcTimeComplete(void * token, struct CeMsgData *ceMsg)
        struct RtcTimeData *rtc = (struct RtcTimeData *)token;
 
        memcpy(&(rtc->xCeMsg), ceMsg, sizeof(rtc->xCeMsg));
+
        rtc->xRc = 0;
-       up(rtc->sem);
+       up(rtc->xSemaphore);
 }
 
 static unsigned long lastsec = 1;
 
 int mf_getRtcTime(unsigned long *time)
 {
+/*    unsigned long usec, tsec; */
+       
        u32 dataWord1 = *((u32 *)(&xSpCommArea.xBcdTimeAtIplStart));
        u32 dataWord2 = *(((u32 *)&(xSpCommArea.xBcdTimeAtIplStart)) + 1);
        int year = 1970;
-       int year1 = (dataWord1 >> 24) & 0x000000FF;
-       int year2 = (dataWord1 >> 16) & 0x000000FF;
-       int sec = (dataWord1 >> 8) & 0x000000FF;
+       int year1 = ( dataWord1 >> 24 ) & 0x000000FF;
+       int year2 = ( dataWord1 >> 16 ) & 0x000000FF;
+       int sec = ( dataWord1 >> 8 ) & 0x000000FF;
        int min = dataWord1 & 0x000000FF;
-       int hour = (dataWord2 >> 24) & 0x000000FF;
-       int day = (dataWord2 >> 8) & 0x000000FF;
+       int hour = ( dataWord2 >> 24 ) & 0x000000FF;
+       int day = ( dataWord2 >> 8 ) & 0x000000FF;
        int mon = dataWord2 & 0x000000FF;
 
        BCD_TO_BIN(sec);
@@ -961,41 +1062,49 @@ int mf_getRtcTime(unsigned long *time)
        year = year1 * 100 + year2;
 
        *time = mktime(year, mon, day, hour, min, sec);
-       *time += (jiffies / HZ);
+
+       *time += ( jiffies / HZ );
     
-       /*
-        * Now THIS is a nasty hack!
+       /* Now THIS is a nasty hack!
         * It ensures that the first two calls to mf_getRtcTime get different
         * answers.  That way the loop in init_time (time.c) will not think
         * the clock is stuck.
         */
-       if (lastsec) {
+       if ( lastsec ) {
                *time -= lastsec;
                --lastsec;
        }
+    
        return 0;
+
 }
 
-int mf_getRtc(struct rtc_time *tm)
+int mf_getRtc( struct rtc_time * tm )
 {
+
        struct CeMsgCompleteData ceComplete;
        struct RtcTimeData rtcData;
-       int rc;
+       int rc = 0;
        DECLARE_MUTEX_LOCKED(Semaphore);
 
        memset(&ceComplete, 0, sizeof(ceComplete));
        memset(&rtcData, 0, sizeof(rtcData));
-       rtcData.sem = &Semaphore;
-       ceComplete.handler = &getRtcTimeComplete;
-       ceComplete.token = (void *)&rtcData;
-       rc = signal_ce_msg("\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00",
-                       &ceComplete);
-       if (rc == 0) {
+
+       rtcData.xSemaphore = &Semaphore;
+
+       ceComplete.xHdlr = &getRtcTimeComplete;
+       ceComplete.xToken = (void *)&rtcData;
+
+       rc = signalCEMsg( "\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00", &ceComplete );
+
+       if ( rc == 0 )
+       {
                down(&Semaphore);
 
-               if (rtcData.xRc == 0) {
-                       if ((rtcData.xCeMsg.ce_msg[2] == 0xa9) ||
-                           (rtcData.xCeMsg.ce_msg[2] == 0xaf)) {
+               if ( rtcData.xRc == 0)
+               {
+                       if ( ( rtcData.xCeMsg.xCEMsg[2] == 0xa9 ) ||
+                            ( rtcData.xCeMsg.xCEMsg[2] == 0xaf ) ) {
                                /* TOD clock is not set */
                                tm->tm_sec = 1;
                                tm->tm_min = 1;
@@ -1003,16 +1112,16 @@ int mf_getRtc(struct rtc_time *tm)
                                tm->tm_mday = 10;
                                tm->tm_mon = 8;
                                tm->tm_year = 71;
-                               mf_setRtc(tm);
+                               mf_setRtc( tm );
                        }
                        {
-                               u32 dataWord1 = *((u32 *)(rtcData.xCeMsg.ce_msg+4));
-                               u32 dataWord2 = *((u32 *)(rtcData.xCeMsg.ce_msg+8));
-                               u8 year = (dataWord1 >> 16) & 0x000000FF;
-                               u8 sec = (dataWord1 >> 8) & 0x000000FF;
+                               u32 dataWord1 = *((u32 *)(rtcData.xCeMsg.xCEMsg+4));
+                               u32 dataWord2 = *((u32 *)(rtcData.xCeMsg.xCEMsg+8));
+                               u8 year = (dataWord1 >> 16 ) & 0x000000FF;
+                               u8 sec = ( dataWord1 >> 8 ) & 0x000000FF;
                                u8 min = dataWord1 & 0x000000FF;
-                               u8 hour = (dataWord2 >> 24) & 0x000000FF;
-                               u8 day = (dataWord2 >> 8) & 0x000000FF;
+                               u8 hour = ( dataWord2 >> 24 ) & 0x000000FF;
+                               u8 day = ( dataWord2 >> 8 ) & 0x000000FF;
                                u8 mon = dataWord2 & 0x000000FF;
 
                                BCD_TO_BIN(sec);
@@ -1022,7 +1131,7 @@ int mf_getRtc(struct rtc_time *tm)
                                BCD_TO_BIN(mon);
                                BCD_TO_BIN(year);
 
-                               if (year <= 69)
+                               if ( year <= 69 )
                                        year += 100;
            
                                tm->tm_sec = sec;
@@ -1045,14 +1154,17 @@ int mf_getRtc(struct rtc_time *tm)
                tm->tm_wday = 0;
                tm->tm_yday = 0;
                tm->tm_isdst = 0;
+
        }
 
        return rc;
+
 }
 
 int mf_setRtc(struct rtc_time * tm)
 {
        char ceTime[12] = "\x00\x00\x00\x41\x00\x00\x00\x00\x00\x00\x00\x00";
+       int rc = 0;
        u8 day, mon, hour, min, sec, y1, y2;
        unsigned year;
     
@@ -1082,5 +1194,10 @@ int mf_setRtc(struct rtc_time * tm)
        ceTime[10] = day;
        ceTime[11] = mon;
    
-       return signal_ce_msg(ceTime, NULL);
+       rc = signalCEMsg( ceTime, NULL );
+
+       return rc;
 }
+
+
+
index 0bc8097..a6ec2dd 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#include <asm/uaccess.h>
+
+
+/* Change Activity: */
+/* End Change Activity */
+
+#ifndef _MF_PROC_H
+#include <asm/iSeries/mf_proc.h>
+#endif
+#ifndef MF_H_INCLUDED
 #include <asm/iSeries/mf.h>
+#endif
+#include <asm/uaccess.h>
 
 static struct proc_dir_entry *mf_proc_root = NULL;
 
-static int proc_mf_dump_cmdline(char *page, char **start, off_t off,
-               int count, int *eof, void *data)
+int proc_mf_dump_cmdline
+(char *page, char **start, off_t off, int count, int *eof, void *data);
+
+int proc_mf_dump_vmlinux
+(char *page, char **start, off_t off, int count, int *eof, void *data);
+
+int proc_mf_dump_side
+(char *page, char **start, off_t off, int count, int *eof, void *data);
+
+int proc_mf_change_side
+(struct file *file, const char *buffer, unsigned long count, void *data);
+
+int proc_mf_dump_src
+(char *page, char **start, off_t off, int count, int *eof, void *data);
+int proc_mf_change_src (struct file *file, const char *buffer, unsigned long count, void *data);
+int proc_mf_change_cmdline(struct file *file, const char *buffer, unsigned long count, void *data);
+int proc_mf_change_vmlinux(struct file *file, const char *buffer, unsigned long count, void *data);
+
+
+void mf_proc_init(struct proc_dir_entry *iSeries_proc)
+{
+       struct proc_dir_entry *ent = NULL;
+       struct proc_dir_entry *mf_a = NULL;
+       struct proc_dir_entry *mf_b = NULL;
+       struct proc_dir_entry *mf_c = NULL;
+       struct proc_dir_entry *mf_d = NULL;
+
+       mf_proc_root = proc_mkdir("mf", iSeries_proc);
+       if (!mf_proc_root) return;
+
+       mf_a = proc_mkdir("A", mf_proc_root);
+       if (!mf_a) return;
+
+       ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf_a);
+       if (!ent) return;
+       ent->nlink = 1;
+       ent->data = (void *)0;
+       ent->read_proc = proc_mf_dump_cmdline;
+       ent->write_proc = proc_mf_change_cmdline;
+
+       ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf_a);
+       if (!ent) return;
+       ent->nlink = 1;
+       ent->data = (void *)0;
+       ent->write_proc = proc_mf_change_vmlinux;
+       ent->read_proc = NULL;
+
+       mf_b = proc_mkdir("B", mf_proc_root);
+       if (!mf_b) return;
+
+       ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf_b);
+       if (!ent) return;
+       ent->nlink = 1;
+       ent->data = (void *)1;
+       ent->read_proc = proc_mf_dump_cmdline;
+       ent->write_proc = proc_mf_change_cmdline;
+
+       ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf_b);
+       if (!ent) return;
+       ent->nlink = 1;
+       ent->data = (void *)1;
+       ent->write_proc = proc_mf_change_vmlinux;
+       ent->read_proc = NULL;
+
+       mf_c = proc_mkdir("C", mf_proc_root);
+       if (!mf_c) return;
+
+       ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf_c);
+       if (!ent) return;
+       ent->nlink = 1;
+       ent->data = (void *)2;
+       ent->read_proc = proc_mf_dump_cmdline;
+       ent->write_proc = proc_mf_change_cmdline;
+
+       ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf_c);
+       if (!ent) return;
+       ent->nlink = 1;
+       ent->data = (void *)2;
+       ent->write_proc = proc_mf_change_vmlinux;
+       ent->read_proc = NULL;
+
+       mf_d = proc_mkdir("D", mf_proc_root);
+       if (!mf_d) return;
+
+
+       ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf_d);
+       if (!ent) return;
+       ent->nlink = 1;
+       ent->data = (void *)3;
+       ent->read_proc = proc_mf_dump_cmdline;
+       ent->write_proc = proc_mf_change_cmdline;
+#if 0
+       ent = create_proc_entry("vmlinux", S_IFREG|S_IRUSR, mf_d);
+       if (!ent) return;
+       ent->nlink = 1;
+       ent->data = (void *)3;
+       ent->read_proc = proc_mf_dump_vmlinux;
+       ent->write_proc = NULL;
+#endif
+       ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
+       if (!ent) return;
+       ent->nlink = 1;
+       ent->data = (void *)0;
+       ent->read_proc = proc_mf_dump_side;
+       ent->write_proc = proc_mf_change_side;
+
+       ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
+       if (!ent) return;
+       ent->nlink = 1;
+       ent->data = (void *)0;
+       ent->read_proc = proc_mf_dump_src;
+       ent->write_proc = proc_mf_change_src;
+}
+
+int proc_mf_dump_cmdline
+(char *page, char **start, off_t off, int count, int *eof, void *data)
 {
-       int len = count;
+       int             len = count;
        char *p;
     
        len = mf_getCmdLine(page, &len, (u64)data);
    
        p = page + len - 1;
-       while (p > page) {
-               if ((*p == 0) || (*p == ' '))
+       while ( p > page ) {
+               if ( (*p == 0) || (*p == ' ') )
                        --p;
                else
                        break;
        }
-       if (*p != '\n') {
+       if ( *p != '\n' ) {
                ++p;
                *p = '\n';
        }
@@ -55,76 +179,68 @@ static int proc_mf_dump_cmdline(char *page, char **start, off_t off,
        return len;                     
 }
 
-#if 0
-static int proc_mf_dump_vmlinux(char *page, char **start, off_t off,
-               int count, int *eof, void *data)
+int proc_mf_dump_vmlinux
+(char *page, char **start, off_t off, int count, int *eof, void *data)
 {
        int sizeToGet = count;
-
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
 
-       if (mf_getVmlinuxChunk(page, &sizeToGet, off, (u64)data) == 0) {
-               if (sizeToGet != 0) {
+       if (mf_getVmlinuxChunk(page, &sizeToGet, off, (u64)data) == 0)
+       {
+               if (sizeToGet != 0)
+               {
                        *start = page + off;
                        return sizeToGet;
+               } else {
+                       *eof = 1;
+                       return 0;
                }
+       } else {
                *eof = 1;
                return 0;
        }
-       *eof = 1;
-       return 0;
 }
-#endif
 
-static int proc_mf_dump_side(char *page, char **start, off_t off,
-               int count, int *eof, void *data)
+int proc_mf_dump_side
+(char *page, char **start, off_t off, int count, int *eof, void *data)
 {
-       int len;
-       char mf_current_side = mf_getSide();
+       int             len = 0;
 
+       char mf_current_side = mf_getSide();
        len = sprintf(page, "%c\n", mf_current_side);
 
-       if (len <= (off + count))
-               *eof = 1;
+       if (len <= off+count) *eof = 1;
        *start = page + off;
        len -= off;
-       if (len > count)
-               len = count;
-       if (len < 0)
-               len = 0;
+       if (len>count) len = count;
+       if (len<0) len = 0;
        return len;                     
 }
 
-static int proc_mf_change_side(struct file *file, const char __user *buffer,
-               unsigned long count, void *data)
+int proc_mf_change_side(struct file *file, const char *buffer, unsigned long count, void *data)
 {
-       char stkbuf[10];
-
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
 
-       if (count > (sizeof(stkbuf) - 1))
-               count = sizeof(stkbuf) - 1;
-       if (copy_from_user(stkbuf, buffer, count))
-               return -EFAULT;
-       stkbuf[count] = 0;
-       if ((*stkbuf != 'A') && (*stkbuf != 'B') &&
-           (*stkbuf != 'C') && (*stkbuf != 'D')) {
+       if ((*buffer != 'A') &&
+           (*buffer != 'B') &&
+           (*buffer != 'C') &&
+           (*buffer != 'D'))
+       {
                printk(KERN_ERR "mf_proc.c: proc_mf_change_side: invalid side\n");
                return -EINVAL;
        }
 
-       mf_setSide(*stkbuf);
+       mf_setSide(*buffer);
 
-       return count;
+       return count;                   
 }
 
-static int proc_mf_dump_src(char *page, char **start, off_t off,
-               int count, int *eof, void *data)
+int proc_mf_dump_src
+(char *page, char **start, off_t off, int count, int *eof, void *data)
 {
-       int len;
-
+       int             len = 0;
        mf_getSrcHistory(page, count);
        len = count;
        len -= off;                     
@@ -138,34 +254,28 @@ static int proc_mf_dump_src(char *page, char **start, off_t off,
        return len;                     
 }
 
-static int proc_mf_change_src(struct file *file, const char __user *buffer,
-               unsigned long count, void *data)
+int proc_mf_change_src(struct file *file, const char *buffer, unsigned long count, void *data)
 {
-       char stkbuf[10];
-
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
 
-       if ((count < 4) && (count != 1)) {
+       if ((count < 4) && (count != 1))
+       {
                printk(KERN_ERR "mf_proc: invalid src\n");
                return -EINVAL;
        }
 
-       if (count > (sizeof(stkbuf) - 1))
-               count = sizeof(stkbuf) - 1;
-       if (copy_from_user(stkbuf, buffer, count))
-               return -EFAULT;
-
-       if ((count == 1) && (*stkbuf == '\0'))
+       if ((count == 1) && ((*buffer) == '\0'))
+       {
                mf_clearSrc();
-       else
-               mf_displaySrc(*(u32 *)stkbuf);
+       } else {
+               mf_displaySrc(*(u32 *)buffer);
+       }
 
        return count;                   
 }
 
-static int proc_mf_change_cmdline(struct file *file, const char *buffer,
-               unsigned long count, void *data)
+int proc_mf_change_cmdline(struct file *file, const char *buffer, unsigned long count, void *data)
 {
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
@@ -175,8 +285,7 @@ static int proc_mf_change_cmdline(struct file *file, const char *buffer,
        return count;                   
 }
 
-static int proc_mf_change_vmlinux(struct file *file, const char *buffer,
-               unsigned long count, void *data)
+int proc_mf_change_vmlinux(struct file *file, const char *buffer, unsigned long count, void *data)
 {
        if (!capable(CAP_SYS_ADMIN))
                return -EACCES;
@@ -186,70 +295,3 @@ static int proc_mf_change_vmlinux(struct file *file, const char *buffer,
 
        return count;                   
 }
-
-void mf_proc_init(struct proc_dir_entry *iSeries_proc)
-{
-       struct proc_dir_entry *ent;
-       struct proc_dir_entry *mf;
-       char name[2];
-       int i;
-
-       mf_proc_root = proc_mkdir("mf", iSeries_proc);
-       if (!mf_proc_root)
-               return;
-
-       name[1] = '\0';
-       for (i = 0; i < 4; i++) {
-               name[0] = 'A' + i;
-               mf = proc_mkdir(name, mf_proc_root);
-               if (!mf)
-                       return;
-
-               ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf);
-               if (!ent)
-                       return;
-               ent->nlink = 1;
-               ent->data = (void *)(long)i;
-               ent->read_proc = proc_mf_dump_cmdline;
-               ent->write_proc = proc_mf_change_cmdline;
-
-               if (i == 3)     /* no vmlinux entry for 'D' */
-                       continue;
-
-               ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf);
-               if (!ent)
-                       return;
-               ent->nlink = 1;
-               ent->data = (void *)(long)i;
-#if 0
-               if (i == 3) {
-                       /*
-                        * if we had a 'D' vmlinux entry, it would only
-                        * be readable.
-                        */
-                       ent->read_proc = proc_mf_dump_vmlinux;
-                       ent->write_proc = NULL;
-               } else
-#endif
-               {
-                       ent->write_proc = proc_mf_change_vmlinux;
-                       ent->read_proc = NULL;
-               }
-       }
-
-       ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
-       if (!ent)
-               return;
-       ent->nlink = 1;
-       ent->data = (void *)0;
-       ent->read_proc = proc_mf_dump_side;
-       ent->write_proc = proc_mf_change_side;
-
-       ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
-       if (!ent)
-               return;
-       ent->nlink = 1;
-       ent->data = (void *)0;
-       ent->read_proc = proc_mf_dump_src;
-       ent->write_proc = proc_mf_change_src;
-}
index 42c1842..a39ff1d 100644 (file)
@@ -66,31 +66,32 @@ _GLOBAL(get_sp)
        blr
                
 #ifdef CONFIG_PPC_ISERIES
-/* unsigned long local_save_flags(void) */
-_GLOBAL(local_get_flags)
-       lbz     r3,PACAPROCENABLED(r13)
+/* unsigned long __no_use_save_flags(void) */
+_GLOBAL(__no_use_save_flags)
+#warning FIX ISERIES
+       mfspr   r4,SPRG3
+       lbz     r3,PACAPROCENABLED(r4)
        blr
 
-/* unsigned long local_irq_disable(void) */
-_GLOBAL(local_irq_disable)
-       lbz     r3,PACAPROCENABLED(r13)
-       li      r4,0
-       stb     r4,PACAPROCENABLED(r13)
-       blr                     /* Done */
-
-/* void local_irq_restore(unsigned long flags) */      
-_GLOBAL(local_irq_restore)
-       lbz     r5,PACAPROCENABLED(r13)
+/* void __no_use_restore_flags(unsigned long flags) */ 
+_GLOBAL(__no_use_restore_flags)
+/*
+ * Just set/clear the MSR_EE bit through restore/flags but do not
+ * change anything else.  This is needed by the RT system and makes
+ * sense anyway.
+ *    -- Cort
+ */
+#warning FIX ISERIES
+       mfspr   r6,SPRG3
+       lbz     r5,PACAPROCENABLED(r6)
         /* Check if things are setup the way we want _already_. */
        cmpw    0,r3,r5
        beqlr
        /* are we enabling interrupts? */
        cmpi    0,r3,0
-       stb     r3,PACAPROCENABLED(r13)
+       stb     r3,PACAPROCENABLED(r6)
        beqlr
        /* Check pending interrupts */
-       /*   A decrementer, IPI or PMC interrupt may have occurred
-        *   while we were in the hypervisor (which enables) */
        CHECKANYINT(r4,r5)
        beqlr
 
@@ -100,8 +101,35 @@ _GLOBAL(local_irq_restore)
        li      r0,0x5555
        sc
        blr
-#endif /* CONFIG_PPC_ISERIES */
 
+_GLOBAL(__no_use_cli)
+#warning FIX ISERIES
+       mfspr   r5,SPRG3
+       lbz     r3,PACAPROCENABLED(r5)
+       li      r4,0
+       stb     r4,PACAPROCENABLED(r5)
+       blr                     /* Done */
+
+_GLOBAL(__no_use_sti)
+#warning FIX ISERIES
+       mfspr   r6,SPRG3
+       li      r3,1
+       stb     r3,PACAPROCENABLED(r6)
+
+       /* Check for pending interrupts
+        *   A decrementer, IPI or PMC interrupt may have occurred
+        *   while we were in the hypervisor (which enables)
+        */
+       CHECKANYINT(r4,r5)
+       beqlr
+
+       /* 
+        * Handle pending interrupts in interrupt context
+        */
+       li      r0,0x5555
+       sc      
+       blr
+#endif
 /*
  * Flush instruction cache.
  */
@@ -418,7 +446,7 @@ _GLOBAL(cvt_df)
        blr
 
 /*
- * identify_cpu and calls setup_cpu
+ * identify_cpu,
  * In: r3 = base of the cpu_specs array
  *     r4 = address of cur_cpu_spec
  *     r5 = relocation offset
@@ -434,17 +462,9 @@ _GLOBAL(identify_cpu)
        addi    r3,r3,CPU_SPEC_ENTRY_SIZE
        b       1b
 1:
-       add     r0,r3,r5
-       std     r0,0(r4)
-       ld      r4,CPU_SPEC_SETUP(r3)
-       sub     r4,r4,r5
-       ld      r4,0(r4)
-       sub     r4,r4,r5
-       mtctr   r4
-       /* Calling convention for cpu setup is r3=offset, r4=cur_cpu_spec */
-       mr      r4,r3
-       mr      r3,r5
-       bctr
+       add     r3,r3,r5
+       std     r3,0(r4)
+       blr
 
 /*
  * do_cpu_ftr_fixups - goes through the list of CPU feature fixups
@@ -494,6 +514,25 @@ _GLOBAL(do_cpu_ftr_fixups)
        isync
        b       1b
 
+/*
+ * call_setup_cpu - call the setup_cpu function for this cpu
+ * r3 = data offset
+ *
+ * Setup function is called with:
+ *   r3 = data offset
+ *   r4 = ptr to CPU spec (relocated)
+ */
+_GLOBAL(call_setup_cpu)
+       LOADADDR(r4, cur_cpu_spec)
+       sub     r4,r4,r3
+       lwz     r4,0(r4)                # load pointer to cpu_spec
+       sub     r4,r4,r3                # relocate
+       lwz     r6,CPU_SPEC_SETUP(r4)   # load function pointer
+       sub     r6,r6,r3
+       mtctr   r6
+       bctr
+
+
 
 /*
  * Create a kernel thread
@@ -556,10 +595,6 @@ SYSCALL(dup)
 SYSCALL(execve)
 SYSCALL(waitpid)
 
-#ifdef CONFIG_PPC_ISERIES      /* hack hack hack */
-#define ppc_rtas       sys_ni_syscall
-#endif
-
 /* Why isn't this a) automatic, b) written in 'C'? */  
        .balign 8
 _GLOBAL(sys_call_table32)
@@ -803,22 +838,20 @@ _GLOBAL(sys_call_table32)
        .llong .sys_epoll_ctl
        .llong .sys_epoll_wait
        .llong .sys_remap_file_pages
-       .llong .ppc32_timer_create      /* 240 */
-       .llong .compat_timer_settime
-       .llong .compat_timer_gettime
-       .llong .sys_timer_getoverrun
-       .llong .sys_timer_delete
-       .llong .compat_clock_settime    /* 245 */
-       .llong .compat_clock_gettime
-       .llong .compat_clock_getres
-       .llong .compat_clock_nanosleep
-       .llong .ppc32_swapcontext
+       .llong .sys_ni_syscall          /* 240 */
+       .llong .sys_ni_syscall
+       .llong .sys_ni_syscall
+       .llong .sys_ni_syscall
+       .llong .sys_ni_syscall
+       .llong .sys_ni_syscall          /* 245 */
+       .llong .sys_ni_syscall
+       .llong .sys_ni_syscall
+       .llong .sys_ni_syscall
+       .llong .sys_ni_syscall
        .llong .sys32_tgkill            /* 250 */
        .llong .sys32_utimes
-       .llong .compat_statfs64
-       .llong .compat_fstatfs64
-       .llong .ppc32_fadvise64_64      /* 32bit only fadvise64_64 */
-       .llong .ppc_rtas                /* 255 */
+       .llong .sys_statfs64
+       .llong .sys_fstatfs64
 
        .balign 8
 _GLOBAL(sys_call_table)
@@ -1071,10 +1104,8 @@ _GLOBAL(sys_call_table)
        .llong .sys_clock_gettime
        .llong .sys_clock_getres
        .llong .sys_clock_nanosleep
-       .llong .ppc64_swapcontext
+       .llong .sys_ni_syscall
        .llong .sys_tgkill              /* 250 */
        .llong .sys_utimes
        .llong .sys_statfs64
        .llong .sys_fstatfs64
-       .llong .sys_ni_syscall          /* 32bit only fadvise64_64 */
-       .llong .ppc_rtas                /* 255 */
index e40db38..4f14d91 100644 (file)
 #include <linux/fcntl.h>
 #include <linux/nvram.h>
 #include <linux/init.h>
-#include <linux/slab.h>
-#include <linux/spinlock.h>
 #include <asm/uaccess.h>
 #include <asm/nvram.h>
 #include <asm/rtas.h>
 #include <asm/prom.h>
-#include <asm/machdep.h>
 
-#define DEBUG_NVRAM
-
-static int nvram_scan_partitions(void);
-static int nvram_setup_partition(void);
-static int nvram_create_os_partition(void);
-static int nvram_remove_os_partition(void);
-static unsigned char nvram_checksum(struct nvram_header *p);
-static int nvram_write_header(struct nvram_partition * part);
-
-static unsigned int nvram_size;
+static unsigned int rtas_nvram_size;
 static unsigned int nvram_fetch, nvram_store;
-static char nvram_buf[NVRW_CNT];       /* assume this is in the first 4GB */
-static struct nvram_partition * nvram_part;
-static long nvram_error_log_index = -1;
-static long nvram_error_log_size = 0;
-static spinlock_t nvram_lock = SPIN_LOCK_UNLOCKED;
-
-volatile int no_more_logging = 1; /* Until we initialize everything,
-                                  * make sure we don't try logging
-                                  * anything */
-
-extern volatile int error_log_cnt;
-
-struct err_log_info {
-       int error_type;
-       unsigned int seq_num;
-};
+static char nvram_buf[4];      /* assume this is in the first 4GB */
 
-static loff_t dev_nvram_llseek(struct file *file, loff_t offset, int origin)
+static loff_t nvram_llseek(struct file *file, loff_t offset, int origin)
 {
        switch (origin) {
        case 1:
                offset += file->f_pos;
                break;
        case 2:
-               offset += nvram_size;
+               offset += rtas_nvram_size;
                break;
        }
        if (offset < 0)
@@ -73,76 +46,53 @@ static loff_t dev_nvram_llseek(struct file *file, loff_t offset, int origin)
 }
 
 
-static ssize_t dev_nvram_read(struct file *file, char *buf,
+static ssize_t read_nvram(struct file *file, char *buf,
                          size_t count, loff_t *ppos)
 {
-       ssize_t len;
-       char *tmp_buffer;
+       unsigned int i;
+       unsigned long len;
+       char *p = buf;
 
        if (verify_area(VERIFY_WRITE, buf, count))
                return -EFAULT;
-       if (*ppos >= nvram_size)
+       if (*ppos >= rtas_nvram_size)
                return 0;
-       if (count > nvram_size) 
-               count = nvram_size;
-
-       tmp_buffer = (char *) kmalloc(count, GFP_KERNEL);
-       if (!tmp_buffer) {
-               printk(KERN_ERR "dev_read_nvram: kmalloc failed\n");
-               return -ENOMEM;
-       }
-
-       len = ppc_md.nvram_read(tmp_buffer, count, ppos);
-       if ((long)len <= 0) {
-               kfree(tmp_buffer);
-               return len;
-       }
-
-       if (copy_to_user(buf, tmp_buffer, len)) {
-               kfree(tmp_buffer);
-               return -EFAULT;
+       for (i = *ppos; count > 0 && i < rtas_nvram_size; ++i, ++p, --count) {
+               if ((rtas_call(nvram_fetch, 3, 2, &len, i, __pa(nvram_buf), 1) != 0) ||
+                   len != 1)
+                       return -EIO;
+               if (__put_user(nvram_buf[0], p))
+                       return -EFAULT;
        }
-
-       kfree(tmp_buffer);
-       return len;
-
+       *ppos = i;
+       return p - buf;
 }
 
-static ssize_t dev_nvram_write(struct file *file, const char *buf,
+static ssize_t write_nvram(struct file *file, const char *buf,
                           size_t count, loff_t *ppos)
 {
-       ssize_t len;
-       char * tmp_buffer;
+       unsigned int i;
+       unsigned long len;
+       const char *p = buf;
+       char c;
 
        if (verify_area(VERIFY_READ, buf, count))
                return -EFAULT;
-       if (*ppos >= nvram_size)
+       if (*ppos >= rtas_nvram_size)
                return 0;
-       if (count > nvram_size)
-               count = nvram_size;
-
-       tmp_buffer = (char *) kmalloc(count, GFP_KERNEL);
-       if (!tmp_buffer) {
-               printk(KERN_ERR "dev_nvram_write: kmalloc failed\n");
-               return -ENOMEM;
-       }
-       
-       if (copy_from_user(tmp_buffer, buf, count)) {
-               kfree(tmp_buffer);
-               return -EFAULT;
-       }
-
-       len = ppc_md.nvram_write(tmp_buffer, count, ppos);
-       if ((long)len <= 0) {
-               kfree(tmp_buffer);
-               return len;
+       for (i = *ppos; count > 0 && i < rtas_nvram_size; ++i, ++p, --count) {
+               if (__get_user(c, p))
+                       return -EFAULT;
+               nvram_buf[0] = c;
+               if ((rtas_call(nvram_store, 3, 2, &len, i, __pa(nvram_buf), 1) != 0) ||
+                   len != 1)
+                       return -EIO;
        }
-
-       kfree(tmp_buffer);
-       return len;
+       *ppos = i;
+       return p - buf;
 }
 
-static int dev_nvram_ioctl(struct inode *inode, struct file *file,
+static int nvram_ioctl(struct inode *inode, struct file *file,
        unsigned int cmd, unsigned long arg)
 {
        return -EINVAL;
@@ -150,10 +100,10 @@ static int dev_nvram_ioctl(struct inode *inode, struct file *file,
 
 struct file_operations nvram_fops = {
        .owner =        THIS_MODULE,
-       .llseek =       dev_nvram_llseek,
-       .read =         dev_nvram_read,
-       .write =        dev_nvram_write,
-       .ioctl =        dev_nvram_ioctl,
+       .llseek =       nvram_llseek,
+       .read =         read_nvram,
+       .write =        write_nvram,
+       .ioctl =        nvram_ioctl,
 };
 
 static struct miscdevice nvram_dev = {
@@ -162,135 +112,21 @@ static struct miscdevice nvram_dev = {
        &nvram_fops
 };
 
-ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index)
-{
-       unsigned int i;
-       unsigned long len, done;
-       unsigned long flags;
-       char *p = buf;
-
-       if (*index >= nvram_size)
-               return 0;
-
-       i = *index;
-       if (i + count > nvram_size)
-               count = nvram_size - i;
-
-       spin_lock_irqsave(&nvram_lock, flags);
-
-       for (; count != 0; count -= len) {
-               len = count;
-               if (len > NVRW_CNT)
-                       len = NVRW_CNT;
-               
-               if ((rtas_call(nvram_fetch, 3, 2, &done, i, __pa(nvram_buf),
-                              len) != 0) || len != done) {
-                       spin_unlock_irqrestore(&nvram_lock, flags);
-                       return -EIO;
-               }
-               
-               memcpy(p, nvram_buf, len);
-
-               p += len;
-               i += len;
-       }
-
-       spin_unlock_irqrestore(&nvram_lock, flags);
-       
-       *index = i;
-       return p - buf;
-}
-
-ssize_t pSeries_nvram_write(char *buf, size_t count, loff_t *index)
-{
-       unsigned int i;
-       unsigned long len, done;
-       unsigned long flags;
-       const char *p = buf;
-
-       if (*index >= nvram_size)
-               return 0;
-
-       i = *index;
-       if (i + count > nvram_size)
-               count = nvram_size - i;
-
-       spin_lock_irqsave(&nvram_lock, flags);
-
-       for (; count != 0; count -= len) {
-               len = count;
-               if (len > NVRW_CNT)
-                       len = NVRW_CNT;
-
-               memcpy(nvram_buf, p, len);
-
-               if ((rtas_call(nvram_store, 3, 2, &done, i, __pa(nvram_buf),
-                              len) != 0) || len != done) {
-                       spin_unlock_irqrestore(&nvram_lock, flags);
-                       return -EIO;
-               }
-               
-               p += len;
-               i += len;
-       }
-       spin_unlock_irqrestore(&nvram_lock, flags);
-       
-       *index = i;
-       return p - buf;
-}
 int __init nvram_init(void)
 {
        struct device_node *nvram;
        unsigned int *nbytes_p, proplen;
-       int error;
-       int rc;
-       
-       if ((nvram = of_find_node_by_type(NULL, "nvram")) != NULL) {
+       if ((nvram = find_type_devices("nvram")) != NULL) {
                nbytes_p = (unsigned int *)get_property(nvram, "#bytes", &proplen);
                if (nbytes_p && proplen == sizeof(unsigned int)) {
-                       nvram_size = *nbytes_p;
-               } else {
-                       return -EIO;
+                       rtas_nvram_size = *nbytes_p;
                }
        }
        nvram_fetch = rtas_token("nvram-fetch");
        nvram_store = rtas_token("nvram-store");
-       printk(KERN_INFO "PPC64 nvram contains %d bytes\n", nvram_size);
-       of_node_put(nvram);
-
-       rc = misc_register(&nvram_dev);
-  
-       /* If we don't know how big NVRAM is then we shouldn't touch
-          the nvram partitions */
-       if (nvram == NULL) {
-               return rc;
-       }
-       
-       /* initialize our anchor for the nvram partition list */
-       nvram_part = (struct nvram_partition *) kmalloc(sizeof(struct nvram_partition), GFP_KERNEL);
-       if (!nvram_part) {
-               printk(KERN_ERR "nvram_init: Failed kmalloc\n");
-               return -ENOMEM;
-       }
-       INIT_LIST_HEAD(&nvram_part->partition);
-  
-       /* Get all the NVRAM partitions */
-       error = nvram_scan_partitions();
-       if (error) {
-               printk(KERN_ERR "nvram_init: Failed nvram_scan_partitions\n");
-               return error;
-       }
-               
-       if(nvram_setup_partition()) 
-               printk(KERN_WARNING "nvram_init: Could not find nvram partition"
-                      " for nvram buffered error logging.\n");
-  
-#ifdef DEBUG_NVRAM
-       nvram_print_partitions("NVRAM Partitions");
-#endif
+       printk(KERN_INFO "PPC64 nvram contains %d bytes\n", rtas_nvram_size);
 
-       return rc;
+       return misc_register(&nvram_dev);
 }
 
 void __exit nvram_cleanup(void)
@@ -298,444 +134,6 @@ void __exit nvram_cleanup(void)
         misc_deregister( &nvram_dev );
 }
 
-static int nvram_scan_partitions(void)
-{
-       loff_t cur_index = 0;
-       struct nvram_header phead;
-       struct nvram_partition * tmp_part;
-       unsigned char c_sum;
-       char * header;
-       long size;
-       
-       header = (char *) kmalloc(NVRAM_HEADER_LEN, GFP_KERNEL);
-       if (!header) {
-               printk(KERN_ERR "nvram_scan_partitions: Failed kmalloc\n");
-               return -ENOMEM;
-       }
-
-       while (cur_index < nvram_size) {
-
-               size = ppc_md.nvram_read(header, NVRAM_HEADER_LEN, &cur_index);
-               if (size != NVRAM_HEADER_LEN) {
-                       printk(KERN_ERR "nvram_scan_partitions: Error parsing "
-                              "nvram partitions\n");
-                       kfree(header);
-                       return size;
-               }
-
-               cur_index -= NVRAM_HEADER_LEN; /* nvram_read will advance us */
-
-               memcpy(&phead, header, NVRAM_HEADER_LEN);
-
-               c_sum = nvram_checksum(&phead);
-               if (c_sum != phead.checksum)
-                       printk(KERN_WARNING "WARNING: nvram partition checksum "
-                              "was %02x, should be %02x!\n", phead.checksum, c_sum);
-               
-               tmp_part = (struct nvram_partition *)
-                       kmalloc(sizeof(struct nvram_partition), GFP_KERNEL);
-               if (!tmp_part) {
-                       printk(KERN_ERR "nvram_scan_partitions: kmalloc failed\n");
-                       kfree(header);
-                       return -ENOMEM;
-               }
-               
-               memcpy(&tmp_part->header, &phead, NVRAM_HEADER_LEN);
-               tmp_part->index = cur_index;
-               list_add_tail(&tmp_part->partition, &nvram_part->partition);
-               
-               cur_index += phead.length * NVRAM_BLOCK_LEN;
-       }
-
-       kfree(header);
-       return 0;
-}
-
-/* nvram_setup_partition
- *
- * This will setup the partition we need for buffering the
- * error logs and cleanup partitions if needed.
- *
- * The general strategy is the following:
- * 1.) If there is ppc64,linux partition large enough then use it.
- * 2.) If there is not a ppc64,linux partition large enough, search
- * for a free partition that is large enough.
- * 3.) If there is not a free partition large enough remove 
- * _all_ OS partitions and consolidate the space.
- * 4.) Will first try getting a chunk that will satisfy the maximum
- * error log size (NVRAM_MAX_REQ).
- * 5.) If the max chunk cannot be allocated then try finding a chunk
- * that will satisfy the minum needed (NVRAM_MIN_REQ).
- */
-static int nvram_setup_partition(void)
-{
-       struct list_head * p;
-       struct nvram_partition * part;
-       int rc;
-
-       /* see if we have an OS partition that meets our needs.
-          will try getting the max we need.  If not we'll delete
-          partitions and try again. */
-       list_for_each(p, &nvram_part->partition) {
-               part = list_entry(p, struct nvram_partition, partition);
-               if (part->header.signature != NVRAM_SIG_OS)
-                       continue;
-
-               if (strcmp(part->header.name, "ppc64,linux"))
-                       continue;
-
-               if (part->header.length >= NVRAM_MIN_REQ) {
-                       /* found our partition */
-                       nvram_error_log_index = part->index + NVRAM_HEADER_LEN;
-                       nvram_error_log_size = ((part->header.length - 1) *
-                                               NVRAM_BLOCK_LEN) - sizeof(struct err_log_info);
-                       return 0;
-               }
-       }
-       
-       /* try creating a partition with the free space we have */
-       rc = nvram_create_os_partition();
-       if (!rc) {
-               return 0;
-       }
-               
-       /* need to free up some space */
-       rc = nvram_remove_os_partition();
-       if (rc) {
-               return rc;
-       }
-       
-       /* create a partition in this new space */
-       rc = nvram_create_os_partition();
-       if (rc) {
-               printk(KERN_ERR "nvram_create_os_partition: Could not find a "
-                      "NVRAM partition large enough\n");
-               return rc;
-       }
-       
-       return 0;
-}
-
-static int nvram_remove_os_partition(void)
-{
-       struct list_head *i;
-       struct list_head *j;
-       struct nvram_partition * part;
-       struct nvram_partition * cur_part;
-       int rc;
-
-       list_for_each(i, &nvram_part->partition) {
-               part = list_entry(i, struct nvram_partition, partition);
-               if (part->header.signature != NVRAM_SIG_OS)
-                       continue;
-               
-               /* Make os partition a free partition */
-               part->header.signature = NVRAM_SIG_FREE;
-               sprintf(part->header.name, "wwwwwwwwwwww");
-               part->header.checksum = nvram_checksum(&part->header);
-
-               /* Merge contiguous free partitions backwards */
-               list_for_each_prev(j, &part->partition) {
-                       cur_part = list_entry(j, struct nvram_partition, partition);
-                       if (cur_part == nvram_part || cur_part->header.signature != NVRAM_SIG_FREE) {
-                               break;
-                       }
-                       
-                       part->header.length += cur_part->header.length;
-                       part->header.checksum = nvram_checksum(&part->header);
-                       part->index = cur_part->index;
-
-                       list_del(&cur_part->partition);
-                       kfree(cur_part);
-                       j = &part->partition; /* fixup our loop */
-               }
-               
-               /* Merge contiguous free partitions forwards */
-               list_for_each(j, &part->partition) {
-                       cur_part = list_entry(j, struct nvram_partition, partition);
-                       if (cur_part == nvram_part || cur_part->header.signature != NVRAM_SIG_FREE) {
-                               break;
-                       }
-
-                       part->header.length += cur_part->header.length;
-                       part->header.checksum = nvram_checksum(&part->header);
-
-                       list_del(&cur_part->partition);
-                       kfree(cur_part);
-                       j = &part->partition; /* fixup our loop */
-               }
-               
-               rc = nvram_write_header(part);
-               if (rc <= 0) {
-                       printk(KERN_ERR "nvram_remove_os_partition: nvram_write failed (%d)\n", rc);
-                       return rc;
-               }
-
-       }
-       
-       return 0;
-}
-
-/* nvram_create_os_partition
- *
- * Create a OS linux partition to buffer error logs.
- * Will create a partition starting at the first free
- * space found if space has enough room.
- */
-static int nvram_create_os_partition(void)
-{
-       struct list_head * p;
-       struct nvram_partition * part;
-       struct nvram_partition * new_part = NULL;
-       struct nvram_partition * free_part;
-       int seq_init[2] = { 0, 0 };
-       loff_t tmp_index;
-       long size = 0;
-       int rc;
-       
-       /* Find a free partition that will give us the maximum needed size 
-          If can't find one that will give us the minimum size needed */
-       list_for_each(p, &nvram_part->partition) {
-               part = list_entry(p, struct nvram_partition, partition);
-               if (part->header.signature != NVRAM_SIG_FREE)
-                       continue;
-
-               if (part->header.length >= NVRAM_MAX_REQ) {
-                       size = NVRAM_MAX_REQ;
-                       free_part = part;
-                       break;
-               }
-               if (!size && part->header.length >= NVRAM_MIN_REQ) {
-                       size = NVRAM_MIN_REQ;
-                       free_part = part;
-               }
-       }
-       if (!size) {
-               return -ENOSPC;
-       }
-       
-       /* Create our OS partition */
-       new_part = (struct nvram_partition *)
-               kmalloc(sizeof(struct nvram_partition), GFP_KERNEL);
-       if (!new_part) {
-               printk(KERN_ERR "nvram_create_os_partition: kmalloc failed\n");
-               return -ENOMEM;
-       }
-
-       new_part->index = free_part->index;
-       new_part->header.signature = NVRAM_SIG_OS;
-       new_part->header.length = size;
-       sprintf(new_part->header.name, "ppc64,linux");
-       new_part->header.checksum = nvram_checksum(&new_part->header);
-
-       rc = nvram_write_header(new_part);
-       if (rc <= 0) {
-               printk(KERN_ERR "nvram_create_os_partition: nvram_write_header \
-                               failed (%d)\n", rc);
-               return rc;
-       }
-
-       /* make sure and initialize to zero the sequence number and the error
-          type logged */
-       tmp_index = new_part->index + NVRAM_HEADER_LEN;
-       rc = ppc_md.nvram_write((char *)&seq_init, sizeof(seq_init), &tmp_index);
-       if (rc <= 0) {
-               printk(KERN_ERR "nvram_create_os_partition: nvram_write failed (%d)\n", rc);
-               return rc;
-       }
-       
-       nvram_error_log_index = new_part->index + NVRAM_HEADER_LEN;
-       nvram_error_log_size = ((part->header.length - 1) *
-                               NVRAM_BLOCK_LEN) - sizeof(struct err_log_info);
-       
-       list_add_tail(&new_part->partition, &free_part->partition);
-
-       if (free_part->header.length <= size) {
-               list_del(&free_part->partition);
-               kfree(free_part);
-               return 0;
-       } 
-
-       /* Adjust the partition we stole the space from */
-       free_part->index += size * NVRAM_BLOCK_LEN;
-       free_part->header.length -= size;
-       free_part->header.checksum = nvram_checksum(&free_part->header);
-       
-       rc = nvram_write_header(free_part);
-       if (rc <= 0) {
-               printk(KERN_ERR "nvram_create_os_partition: nvram_write_header "
-                      "failed (%d)\n", rc);
-               return rc;
-       }
-
-       return 0;
-}
-
-
-void nvram_print_partitions(char * label)
-{
-       struct list_head * p;
-       struct nvram_partition * tmp_part;
-       
-       printk(KERN_WARNING "--------%s---------\n", label);
-       printk(KERN_WARNING "indx\t\tsig\tchks\tlen\tname\n");
-       list_for_each(p, &nvram_part->partition) {
-               tmp_part = list_entry(p, struct nvram_partition, partition);
-               printk(KERN_WARNING "%d    \t%02x\t%02x\t%d\t%s\n",
-                      tmp_part->index, tmp_part->header.signature,
-                      tmp_part->header.checksum, tmp_part->header.length,
-                      tmp_part->header.name);
-       }
-}
-
-/* nvram_write_error_log
- *
- * We need to buffer the error logs into nvram to ensure that we have
- * the failure information to decode.  If we have a severe error there
- * is no way to guarantee that the OS or the machine is in a state to
- * get back to user land and write the error to disk.  For example if
- * the SCSI device driver causes a Machine Check by writing to a bad
- * IO address, there is no way of guaranteeing that the device driver
- * is in any state that is would also be able to write the error data
- * captured to disk, thus we buffer it in NVRAM for analysis on the
- * next boot.
- *
- * In NVRAM the partition containing the error log buffer will looks like:
- * Header (in bytes):
- * +-----------+----------+--------+------------+------------------+
- * | signature | checksum | length | name       | data             |
- * |0          |1         |2      3|4         15|16        length-1|
- * +-----------+----------+--------+------------+------------------+
- *
- * The 'data' section would look like (in bytes):
- * +--------------+------------+-----------------------------------+
- * | event_logged | sequence # | error log                         |
- * |0            3|4          7|8            nvram_error_log_size-1|
- * +--------------+------------+-----------------------------------+
- *
- * event_logged: 0 if event has not been logged to syslog, 1 if it has
- * sequence #: The unique sequence # for each event. (until it wraps)
- * error log: The error log from event_scan
- */
-int nvram_write_error_log(char * buff, int length, unsigned int err_type)
-{
-       int rc;
-       loff_t tmp_index;
-       struct err_log_info info;
-       
-       if (no_more_logging) {
-               return -EPERM;
-       }
-
-       if (nvram_error_log_index == -1) {
-               return -ESPIPE;
-       }
-
-       if (length > nvram_error_log_size) {
-               length = nvram_error_log_size;
-       }
-
-       info.error_type = err_type;
-       info.seq_num = error_log_cnt;
-
-       tmp_index = nvram_error_log_index;
-
-       rc = ppc_md.nvram_write((char *)&info, sizeof(struct err_log_info), &tmp_index);
-       if (rc <= 0) {
-               printk(KERN_ERR "nvram_write_error_log: Failed nvram_write (%d)\n", rc);
-               return rc;
-       }
-
-       rc = ppc_md.nvram_write(buff, length, &tmp_index);
-       if (rc <= 0) {
-               printk(KERN_ERR "nvram_write_error_log: Failed nvram_write (%d)\n", rc);
-               return rc;
-       }
-       
-       return 0;
-}
-
-/* nvram_read_error_log
- *
- * Reads nvram for error log for at most 'length'
- */
-int nvram_read_error_log(char * buff, int length, unsigned int * err_type)
-{
-       int rc;
-       loff_t tmp_index;
-       struct err_log_info info;
-       
-       if (nvram_error_log_index == -1)
-               return -1;
-
-       if (length > nvram_error_log_size)
-               length = nvram_error_log_size;
-
-       tmp_index = nvram_error_log_index;
-
-       rc = ppc_md.nvram_read((char *)&info, sizeof(struct err_log_info), &tmp_index);
-       if (rc <= 0) {
-               printk(KERN_ERR "nvram_read_error_log: Failed nvram_read (%d)\n", rc);
-               return rc;
-       }
-
-       rc = ppc_md.nvram_read(buff, length, &tmp_index);
-       if (rc <= 0) {
-               printk(KERN_ERR "nvram_read_error_log: Failed nvram_read (%d)\n", rc);
-               return rc;
-       }
-
-       error_log_cnt = info.seq_num;
-       *err_type = info.error_type;
-
-       return 0;
-}
-
-/* This doesn't actually zero anything, but it sets the event_logged
- * word to tell that this event is safely in syslog.
- */
-int nvram_clear_error_log()
-{
-       loff_t tmp_index;
-       int clear_word = ERR_FLAG_ALREADY_LOGGED;
-       int rc;
-
-       tmp_index = nvram_error_log_index;
-       
-       rc = ppc_md.nvram_write((char *)&clear_word, sizeof(int), &tmp_index);
-       if (rc <= 0) {
-               printk(KERN_ERR "nvram_clear_error_log: Failed nvram_write (%d)\n", rc);
-               return rc;
-       }
-
-       return 0;
-}
-
-static int nvram_write_header(struct nvram_partition * part)
-{
-       loff_t tmp_index;
-       int rc;
-       
-       tmp_index = part->index;
-       rc = ppc_md.nvram_write((char *)&part->header, NVRAM_HEADER_LEN, &tmp_index); 
-
-       return rc;
-}
-
-static unsigned char nvram_checksum(struct nvram_header *p)
-{
-       unsigned int c_sum, c_sum2;
-       unsigned short *sp = (unsigned short *)p->name; /* assume 6 shorts */
-       c_sum = p->signature + p->length + sp[0] + sp[1] + sp[2] + sp[3] + sp[4] + sp[5];
-
-       /* The sum may have spilled into the 3rd byte.  Fold it back. */
-       c_sum = ((c_sum & 0xffff) + (c_sum >> 16)) & 0xffff;
-       /* The sum cannot exceed 2 bytes.  Fold it into a checksum */
-       c_sum2 = (c_sum >> 8) + (c_sum << 8);
-       c_sum = ((c_sum + c_sum2) >> 8) & 0xff;
-       return c_sum;
-}
-
-late_initcall(nvram_init);
+module_init(nvram_init);
 module_exit(nvram_cleanup);
 MODULE_LICENSE("GPL");
index a3f2aeb..426b46b 100644 (file)
@@ -85,10 +85,10 @@ unsigned int openpic_vec_spurious;
  */
 #ifdef CONFIG_SMP
 #define THIS_CPU               Processor[cpu]
-#define DECL_THIS_CPU          int cpu = hard_smp_processor_id()
+#define DECL_THIS_CPU          int cpu = smp_processor_id()
 #define CHECK_THIS_CPU         check_arg_cpu(cpu)
 #else
-#define THIS_CPU               Processor[hard_smp_processor_id()]
+#define THIS_CPU               Processor[smp_processor_id()]
 #define DECL_THIS_CPU
 #define CHECK_THIS_CPU
 #endif /* CONFIG_SMP */
@@ -130,29 +130,19 @@ unsigned int openpic_vec_spurious;
 
 #define GET_ISU(source)        ISU[(source) >> 4][(source) & 0xf]
 
-void
-openpic_init_irq_desc(irq_desc_t *desc)
-{
-       /* Don't mess with the handler if already set.
-        * This leaves the setup of isa/ipi handlers undisturbed.
-        */
-       if (!desc->handler)
-               desc->handler = &open_pic;
-}
-
 void __init openpic_init_IRQ(void)
 {
         struct device_node *np;
         int i;
         unsigned int *addrp;
         unsigned char* chrp_int_ack_special = 0;
-        unsigned char init_senses[NR_IRQS - NUM_ISA_INTERRUPTS];
+        unsigned char init_senses[NR_IRQS - NUM_8259_INTERRUPTS];
         int nmi_irq = -1;
 #if defined(CONFIG_VT) && defined(CONFIG_ADB_KEYBOARD) && defined(XMON)
         struct device_node *kbd;
 #endif
 
-        if (!(np = of_find_node_by_name(NULL, "pci"))
+        if (!(np = find_devices("pci"))
             || !(addrp = (unsigned int *)
                  get_property(np, "8259-interrupt-acknowledge", NULL)))
                 printk(KERN_ERR "Cannot find pci to get ack address\n");
@@ -161,14 +151,13 @@ void __init openpic_init_IRQ(void)
                        __ioremap(addrp[prom_n_addr_cells(np)-1], 1, _PAGE_NO_CACHE);
         /* hydra still sets OpenPIC_InitSenses to a static set of values */
         if (OpenPIC_InitSenses == NULL) {
-                prom_get_irq_senses(init_senses, NUM_ISA_INTERRUPTS, NR_IRQS);
+                prom_get_irq_senses(init_senses, NUM_8259_INTERRUPTS, NR_IRQS);
                 OpenPIC_InitSenses = init_senses;
-                OpenPIC_NumInitSenses = NR_IRQS - NUM_ISA_INTERRUPTS;
+                OpenPIC_NumInitSenses = NR_IRQS - NUM_8259_INTERRUPTS;
         }
-        openpic_init(1, NUM_ISA_INTERRUPTS, chrp_int_ack_special, nmi_irq);
-        for ( i = 0 ; i < NUM_ISA_INTERRUPTS  ; i++ )
-                get_real_irq_desc(i)->handler = &i8259_pic;
-       of_node_put(np);
+        openpic_init(1, NUM_8259_INTERRUPTS, chrp_int_ack_special, nmi_irq);
+        for ( i = 0 ; i < NUM_8259_INTERRUPTS  ; i++ )
+                irq_desc[i].handler = &i8259_pic;
 }
 
 static inline u_int openpic_read(volatile u_int *addr)
@@ -352,8 +341,8 @@ void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack,
                /* Disabled, Priority 10..13 */
                openpic_initipi(i, 10+i, openpic_vec_ipi+i);
                /* IPIs are per-CPU */
-               get_real_irq_desc(openpic_vec_ipi+i)->status |= IRQ_PER_CPU;
-               get_real_irq_desc(openpic_vec_ipi+i)->handler = &open_pic_ipi;
+               irq_desc[openpic_vec_ipi+i].status |= IRQ_PER_CPU;
+               irq_desc[openpic_vec_ipi+i].handler = &open_pic_ipi;
        }
 #endif
 
@@ -365,7 +354,7 @@ void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack,
        /* SIOint (8259 cascade) is special */
        if (offset) {
                openpic_initirq(0, 8, offset, 1, 1);
-               openpic_mapirq(0, 1 << get_hard_smp_processor_id(boot_cpuid));
+               openpic_mapirq(0, 1 << boot_cpuid);
        }
 
        /* Init all external sources */
@@ -378,14 +367,18 @@ void __init openpic_init(int main_pic, int offset, unsigned char* chrp_ack,
                pri = (i == programmer_switch_irq)? 9: 8;
                sense = (i < OpenPIC_NumInitSenses)? OpenPIC_InitSenses[i]: 1;
                if (sense)
-                       get_real_irq_desc(i+offset)->status = IRQ_LEVEL;
+                       irq_desc[i+offset].status = IRQ_LEVEL;
 
                /* Enabled, Priority 8 or 9 */
                openpic_initirq(i, pri, i+offset, !sense, sense);
                /* Processor 0 */
-               openpic_mapirq(i, 1 << get_hard_smp_processor_id(boot_cpuid));
+               openpic_mapirq(i, 1 << boot_cpuid);
        }
 
+       /* Init descriptors */
+       for (i = offset; i < NumSources + offset; i++)
+               irq_desc[i].handler = &open_pic;
+
        /* Initialize the spurious interrupt */
        ppc64_boot_msg(0x24, "OpenPic Spurious");
        openpic_set_spurious(openpic_vec_spurious);
@@ -404,7 +397,7 @@ static int __init openpic_setup_i8259(void)
 {
        if (naca->interrupt_controller == IC_OPEN_PIC) {
                /* Initialize the cascade */
-               if (request_irq(NUM_ISA_INTERRUPTS, no_action, SA_INTERRUPT,
+               if (request_irq(NUM_8259_INTERRUPTS, no_action, SA_INTERRUPT,
                                "82c59 cascade", NULL))
                        printk(KERN_ERR "Unable to get OpenPIC IRQ 0 for cascade\n");
                i8259_init();
@@ -520,23 +513,10 @@ static void openpic_set_spurious(u_int vec)
                           vec);
 }
 
-/*
- * Convert a cpu mask from logical to physical cpu numbers.
- */
-static inline u32 physmask(u32 cpumask)
-{
-       int i;
-       u32 mask = 0;
-
-       for (i = 0; i < NR_CPUS; ++i, cpumask >>= 1)
-               mask |= (cpumask & 1) << get_hard_smp_processor_id(i);
-       return mask;
-}
-
 void openpic_init_processor(u_int cpumask)
 {
        openpic_write(&OpenPIC->Global.Processor_Initialization,
-                     physmask(cpumask & cpus_coerce(cpu_online_map)));
+                     cpumask & cpus_coerce(cpu_online_map));
 }
 
 #ifdef CONFIG_SMP
@@ -570,7 +550,7 @@ void openpic_cause_IPI(u_int ipi, u_int cpumask)
        CHECK_THIS_CPU;
        check_arg_ipi(ipi);
        openpic_write(&OpenPIC->THIS_CPU.IPI_Dispatch(ipi),
-                     physmask(cpumask & cpus_coerce(cpu_online_map)));
+                     cpumask & cpus_coerce(cpu_online_map));
 }
 
 void openpic_request_IPIs(void)
@@ -611,7 +591,7 @@ void __devinit do_openpic_setup_cpu(void)
 {
 #ifdef CONFIG_IRQ_ALL_CPUS
        int i;
-       u32 msk = 1 << hard_smp_processor_id();
+       u32 msk = 1 << smp_processor_id();
 #endif
 
        spin_lock(&openpic_setup_lock);
@@ -656,7 +636,7 @@ static void __init openpic_maptimer(u_int timer, u_int cpumask)
 {
        check_arg_timer(timer);
        openpic_write(&OpenPIC->Global.Timer[timer].Destination,
-                     physmask(cpumask & cpus_coerce(cpu_online_map)));
+                     cpumask & cpus_coerce(cpu_online_map));
 }
 
 
@@ -773,7 +753,7 @@ static inline void openpic_set_sense(u_int irq, int sense)
 
 static void openpic_end_irq(unsigned int irq_nr)
 {
-       if ((get_irq_desc(irq_nr)->status & IRQ_LEVEL) != 0)
+       if ((irq_desc[irq_nr].status & IRQ_LEVEL) != 0)
                openpic_eoi();
 }
 
@@ -782,7 +762,7 @@ static void openpic_set_affinity(unsigned int irq_nr, cpumask_t cpumask)
        cpumask_t tmp;
 
        cpus_and(tmp, cpumask, cpu_online_map);
-       openpic_mapirq(irq_nr - open_pic_irq_offset, physmask(cpus_coerce(tmp)));
+       openpic_mapirq(irq_nr - open_pic_irq_offset, cpus_coerce(tmp));
 }
 
 #ifdef CONFIG_SMP
index 8881cba..4439294 100644 (file)
@@ -38,4 +38,9 @@ extern void openpic_init_processor(u_int cpumask);
 extern void openpic_setup_ISU(int isu_num, unsigned long addr);
 extern void openpic_cause_IPI(u_int ipi, u_int cpumask);
 
+extern inline int openpic_to_irq(int irq)
+{
+       return irq += NUM_8259_INTERRUPTS;
+}
+/*extern int open_pic_irq_offset;*/
 #endif /* _PPC64_KERNEL_OPEN_PIC_H */
index 9b51591..8028f98 100644 (file)
@@ -219,10 +219,10 @@ static long pSeries_hpte_updatepp(unsigned long slot, unsigned long newpp,
 
        /* Ensure it is out of the tlb too */
        if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) {
-               tlbiel(va);
+               _tlbiel(va);
        } else {
                spin_lock_irqsave(&pSeries_tlbie_lock, flags);
-               tlbie(va, large);
+               _tlbie(va, large);
                spin_unlock_irqrestore(&pSeries_tlbie_lock, flags);
        }
 
@@ -256,7 +256,7 @@ static void pSeries_hpte_updateboltedpp(unsigned long newpp, unsigned long ea)
 
        /* Ensure it is out of the tlb too */
        spin_lock_irqsave(&pSeries_tlbie_lock, flags);
-       tlbie(va, 0);
+       _tlbie(va, 0);
        spin_unlock_irqrestore(&pSeries_tlbie_lock, flags);
 }
 
@@ -285,10 +285,10 @@ static void pSeries_hpte_invalidate(unsigned long slot, unsigned long va,
 
        /* Invalidate the tlb */
        if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) {
-               tlbiel(va);
+               _tlbiel(va);
        } else {
                spin_lock_irqsave(&pSeries_tlbie_lock, flags);
-               tlbie(va, large);
+               _tlbie(va, large);
                spin_unlock_irqrestore(&pSeries_tlbie_lock, flags);
        }
 }
@@ -350,8 +350,12 @@ static void pSeries_flush_hash_range(unsigned long context,
        if ((cur_cpu_spec->cpu_features & CPU_FTR_TLBIEL) && !large && local) {
                asm volatile("ptesync":::"memory");
 
-               for (i = 0; i < j; i++)
-                       __tlbiel(batch->vaddr[i]);
+               for (i = 0; i < j; i++) {
+                       asm volatile("\n\
+                       clrldi  %0,%0,16\n\
+                       tlbiel   %0"
+                       : : "r" (batch->vaddr[i]) : "memory" );
+               }
 
                asm volatile("ptesync":::"memory");
        } else {
@@ -360,8 +364,12 @@ static void pSeries_flush_hash_range(unsigned long context,
 
                asm volatile("ptesync":::"memory");
 
-               for (i = 0; i < j; i++)
-                       __tlbie(batch->vaddr[i], 0);
+               for (i = 0; i < j; i++) {
+                       asm volatile("\n\
+                       clrldi  %0,%0,16\n\
+                       tlbie   %0"
+                       : : "r" (batch->vaddr[i]) : "memory" );
+               }
 
                asm volatile("eieio; tlbsync; ptesync":::"memory");
 
@@ -381,11 +389,10 @@ void hpte_init_pSeries(void)
        ppc_md.hpte_remove      = pSeries_hpte_remove;
 
        /* Disable TLB batching on nighthawk */
-       root = of_find_node_by_path("/");
+       root = find_path_device("/");
        if (root) {
                model = get_property(root, "model", NULL);
                if (strcmp(model, "CHRP IBM,9076-N81"))
                        ppc_md.flush_hash_range = pSeries_flush_hash_range;
-               of_node_put(root);
        }
 }
index df604cf..1eb9c93 100644 (file)
@@ -22,7 +22,7 @@
 /*
  * hcall interface to pSeries LPAR
  */
-#define HVSC .long 0x44000022
+#define HSC .long 0x44000022
 
 /* long plpar_hcall(unsigned long opcode,       R3 
                 unsigned long arg1,             R4 
@@ -44,7 +44,7 @@ _GLOBAL(plpar_hcall)
         std     r9,-16(r1)
         std     r10,-24(r1)
        
-       HVSC                    /* invoke the hypervisor */
+       HSC                     /* invoke the hypervisor */
 
         ld      r10,-8(r1)      /* Fetch r4-r7 ret args. */
         std     r4,0(r10)
@@ -63,81 +63,7 @@ _GLOBAL(plpar_hcall)
 _GLOBAL(plpar_hcall_norets)
        mfcr    r0
        std     r0,-8(r1)
-       HVSC                    /* invoke the hypervisor */
-       ld      r0,-8(r1)
-       mtcrf   0xff,r0
-       blr                     /* return r3 = status */
-
-
-/* long plpar_hcall_8arg_2ret(unsigned long opcode,             R3 
-                            unsigned long arg1,                 R4 
-                            unsigned long arg2,                 R5 
-                            unsigned long arg3,                 R6 
-                            unsigned long arg4,                 R7 
-                            unsigned long arg5,                 R8 
-                            unsigned long arg6,                 R9 
-                            unsigned long arg7,                 R10 
-                            unsigned long arg8,                 112(R1)
-                            unsigned long *out1);               120(R1)
-
- */
-
-       .text
-_GLOBAL(plpar_hcall_8arg_2ret)
-       mfcr    r0
-
-       ld              r11, 112(r1) /* put arg8 and out1 in R11 and R12 */
-       ld              r12, 120(r1)
-
-       std     r0,-8(r1)
-       stdu    r1,-32(r1)
-
-        std     r12,-8(r1)      /* Save out ptr */
-       
-       HVSC                    /* invoke the hypervisor */
-
-        ld      r10,-8(r1)      /* Fetch r4 ret arg */
-        std     r4,0(r10)
-
-       ld      r1,0(r1)
-       ld      r0,-8(r1)
-       mtcrf   0xff,r0
-       blr                     /* return r3 = status */
-
-
-/* long plpar_hcall_4out(unsigned long opcode,  R3 
-                unsigned long arg1,             R4 
-                unsigned long arg2,             R5 
-                unsigned long arg3,             R6 
-                unsigned long arg4,             R7 
-                unsigned long *out1,   (r4)     R8 
-                unsigned long *out2,   (r5)     R9
-                unsigned long *out3,   (r6)     R10
-                unsigned long *out4);  (r7)     112(R1). From Parameter save area. 
- */
-_GLOBAL(plpar_hcall_4out)
-       mfcr    r0
-       std     r0,-8(r1)
-       ld      r14,112(r1)
-       stdu    r1,-48(r1) 
-
-       std     r8,32(r1)       /* Save out ptrs. */
-       std     r9,24(r1)
-       std     r10,16(r1)
-       std     r14,8(r1)
-       
-       HVSC                    /* invoke the hypervisor */
-
-       ld      r14,32(r1)      /* Fetch r4-r7 ret args. */
-       std     r4,0(r14)
-       ld      r14,24(r1)
-       std     r5,0(r14)
-       ld      r14,16(r1)
-       std     r6,0(r14)
-       ld      r14,8(r1)
-       std     r7,0(r14)
-
-       ld      r1,0(r1) 
+       HSC                     /* invoke the hypervisor */
        ld      r0,-8(r1)
        mtcrf   0xff,r0
        blr                     /* return r3 = status */
index 23c75ac..15acc7c 100644 (file)
 #include <asm/tlbflush.h>
 #include <asm/tlb.h>
 #include <asm/hvcall.h>
-#include <asm/prom.h>
-
-long poll_pending(void)
-{
-       unsigned long dummy;
-       return plpar_hcall(H_POLL_PENDING, 0, 0, 0, 0,
-                          &dummy, &dummy, &dummy);
-}
-
-long prod_processor(void)
-{
-       plpar_hcall_norets(H_PROD);
-       return(0); 
-}
-
-long cede_processor(void)
-{
-       plpar_hcall_norets(H_CEDE);
-       return(0); 
-}
-
-long register_vpa(unsigned long flags, unsigned long proc, unsigned long vpa)
-{
-       plpar_hcall_norets(H_REGISTER_VPA, flags, proc, vpa);
-       return(0); 
-}
 
 long plpar_pte_remove(unsigned long flags,
                      unsigned long ptex,
@@ -232,61 +206,6 @@ static unsigned char udbg_getcLP(void)
        }
 }
 
-/* returns 0 if couldn't find or use /chosen/stdout as console */
-static int find_udbg_vterm(void)
-{
-       struct device_node *stdout_node;
-       u32 *termno;
-       char *name;
-       int found = 0;
-
-       /* find the boot console from /chosen/stdout */
-       if (!of_stdout_device) {
-               printk(KERN_WARNING "couldn't get path from /chosen/stdout!\n");
-               return found;
-       }
-       stdout_node = of_find_node_by_path(of_stdout_device);
-       if (!stdout_node) {
-               printk(KERN_WARNING "couldn't find node from /chosen/stdout\n");
-               return found;
-       }
-
-       /* now we have the stdout node; figure out what type of device it is. */
-       name = (char *)get_property(stdout_node, "name", 0);
-       if (!name) {
-               printk(KERN_WARNING "stdout node missing 'name' property!\n");
-               goto out;
-       }
-
-       if (strncmp(name, "vty", 3) == 0) {
-               if (device_is_compatible(stdout_node, "hvterm1")) {
-                       termno = (u32 *)get_property(stdout_node, "reg", 0);
-                       if (termno) {
-                               vtermno = termno[0];
-                               ppc_md.udbg_putc = udbg_putcLP;
-                               ppc_md.udbg_getc = udbg_getcLP;
-                               ppc_md.udbg_getc_poll = udbg_getc_pollLP;
-                               found = 1;
-                       }
-               } else {
-                       /* XXX implement udbg_putcLP_vtty for hvterm-protocol1 case */
-                       printk(KERN_WARNING "%s doesn't speak hvterm1; "
-                                       "can't print udbg messages\n", of_stdout_device);
-               }
-       } else if (strncmp(name, "serial", 6)) {
-               /* XXX fix ISA serial console */
-               printk(KERN_WARNING "serial stdout on LPAR ('%s')! "
-                               "can't print udbg messages\n", of_stdout_device);
-       } else {
-               printk(KERN_WARNING "don't know how to print to stdout '%s'\n",
-                               of_stdout_device);
-       }
-
-out:
-       of_node_put(stdout_node);
-       return found;
-}
-
 void pSeries_lpar_mm_init(void);
 
 /* This is called early in setup.c.
@@ -294,6 +213,8 @@ void pSeries_lpar_mm_init(void);
  */
 void pSeriesLP_init_early(void)
 {
+       struct device_node *np;
+
        pSeries_lpar_mm_init();
 
        ppc_md.tce_build         = tce_build_pSeriesLP;
@@ -304,13 +225,24 @@ void pSeriesLP_init_early(void)
 #endif
 
        /* The keyboard is not useful in the LPAR environment.
-        * Leave all the ppc_md keyboard interfaces NULL.
+        * Leave all the interfaces NULL.
         */
 
-       if (0 == find_udbg_vterm()) {
-               printk(KERN_WARNING
-                       "can't use stdout; can't print early debug messages.\n");
+       /* lookup the first virtual terminal number in case we don't have a
+        * com port. Zero is probably correct in case someone calls udbg
+        * before the init. The property is a pair of numbers.  The first
+        * is the starting termno (the one we use) and the second is the
+        * number of terminals.
+        */
+       np = find_path_device("/rtas");
+       if (np) {
+               u32 *termno = (u32 *)get_property(np, "ibm,termno", 0);
+               if (termno)
+                       vtermno = termno[0];
        }
+       ppc_md.udbg_putc = udbg_putcLP;
+       ppc_md.udbg_getc = udbg_getcLP;
+       ppc_md.udbg_getc_poll = udbg_getc_pollLP;
 }
 
 int hvc_get_chars(int index, char *buf, int count)
@@ -353,29 +285,24 @@ int hvc_put_chars(int index, const char *buf, int count)
        return -1;
 }
 
-/* return the number of client vterms present */
-/* XXX this requires an interface change to handle multiple discontiguous
- * vterms */
 int hvc_count(int *start_termno)
 {
-       struct device_node *vty;
-       int num_found = 0;
-
-       /* consider only the first vty node.
-        * we should _always_ be able to find one. */
-       vty = of_find_node_by_name(NULL, "vty");
-       if (vty && device_is_compatible(vty, "hvterm1")) {
-               u32 *termno = (u32 *)get_property(vty, "reg", 0);
-
-               if (termno && start_termno)
-                       *start_termno = *termno;
-               num_found = 1;
-               of_node_put(vty);
-       }
+       u32 *termno;
+       struct device_node *dn;
 
-       return num_found;
+       if ((dn = find_path_device("/rtas")) != NULL) {
+               if ((termno = (u32 *)get_property(dn, "ibm,termno", 0)) != NULL) {
+                       if (start_termno)
+                               *start_termno = termno[0];
+                       return termno[1];
+               }
+       }
+       return 0;
 }
 
+
+
+
 long pSeries_lpar_hpte_insert(unsigned long hpte_group,
                              unsigned long va, unsigned long prpn,
                              int secondary, unsigned long hpteflags,
index 9b07f7d..85d7e8e 100644 (file)
@@ -176,55 +176,6 @@ int pci_read_irq_line(struct pci_dev *pci_dev)
               pci_name(pci_dev), pci_dev->irq);
        return 0;
 }
-EXPORT_SYMBOL(pci_read_irq_line);
-
-#define ISA_SPACE_MASK 0x1
-#define ISA_SPACE_IO 0x1
-
-static void pci_process_ISA_OF_ranges(struct device_node *isa_node,
-                                     unsigned long phb_io_base_phys,
-                                     void * phb_io_base_virt)
-{
-       struct isa_range *range;
-       unsigned long pci_addr;
-       unsigned int isa_addr;
-       unsigned int size;
-       int rlen = 0;
-
-       range = (struct isa_range *) get_property(isa_node, "ranges", &rlen);
-       if (rlen < sizeof(struct isa_range)) {
-               printk(KERN_ERR "unexpected isa range size: %s\n", 
-                               __FUNCTION__);
-               return; 
-       }
-       
-       /* From "ISA Binding to 1275"
-        * The ranges property is laid out as an array of elements,
-        * each of which comprises:
-        *   cells 0 - 1:       an ISA address
-        *   cells 2 - 4:       a PCI address 
-        *                      (size depending on dev->n_addr_cells)
-        *   cell 5:            the size of the range
-        */
-       if ((range->isa_addr.a_hi && ISA_SPACE_MASK) == ISA_SPACE_IO) {
-               isa_addr = range->isa_addr.a_lo;
-               pci_addr = (unsigned long) range->pci_addr.a_mid << 32 | 
-                       range->pci_addr.a_lo;
-
-               /* Assume these are both zero */
-               if ((pci_addr != 0) || (isa_addr != 0)) {
-                       printk(KERN_ERR "unexpected isa to pci mapping: %s\n",
-                                       __FUNCTION__);
-                       return;
-               }
-               
-               size = PAGE_ALIGN(range->size);
-
-               __ioremap_explicit(phb_io_base_phys, 
-                                  (unsigned long) phb_io_base_virt, 
-                                  size, _PAGE_NO_CACHE);
-       }
-}
 
 static void __init pci_process_bridge_OF_ranges(struct pci_controller *hose,
                                                struct device_node *dev,
@@ -237,11 +188,10 @@ static void __init pci_process_bridge_OF_ranges(struct pci_controller *hose,
        struct resource *res;
        int np, na = prom_n_addr_cells(dev);
        unsigned long pci_addr, cpu_phys_addr;
-       struct device_node *isa_dn;
 
        np = na + 5;
 
-       /* From "PCI Binding to 1275"
+       /*
         * The ranges property is laid out as an array of elements,
         * each of which comprises:
         *   cells 0 - 2:       a PCI address
@@ -265,22 +215,12 @@ static void __init pci_process_bridge_OF_ranges(struct pci_controller *hose,
                switch (ranges[0] >> 24) {
                case 1:         /* I/O space */
                        hose->io_base_phys = cpu_phys_addr;
-                       hose->io_base_virt = reserve_phb_iospace(size);
-                       PPCDBG(PPCDBG_PHBINIT, 
-                              "phb%d io_base_phys 0x%lx io_base_virt 0x%lx\n", 
-                              hose->global_number, hose->io_base_phys, 
-                              (unsigned long) hose->io_base_virt);
-
+                       hose->io_base_virt = __ioremap(hose->io_base_phys,
+                                                      size, _PAGE_NO_CACHE);
                        if (primary) {
                                pci_io_base = (unsigned long)hose->io_base_virt;
-                               isa_dn = of_find_node_by_type(NULL, "isa");
-                               if (isa_dn) {
+                               if (find_type_devices("isa"))
                                        isa_io_base = pci_io_base;
-                                       of_node_put(isa_dn);
-                                       pci_process_ISA_OF_ranges(isa_dn,
-                                               hose->io_base_phys,
-                                               hose->io_base_virt);
-                               }
                        }
 
                        res = &hose->io_resource;
@@ -446,7 +386,7 @@ unsigned long __init find_and_init_phbs(void)
        unsigned int root_size_cells = 0;
        unsigned int index;
        unsigned int *opprop;
-       struct device_node *root = of_find_node_by_path("/");
+       struct device_node *root = find_path_device("/");
 
        read_pci_config = rtas_token("read-pci-config");
        write_pci_config = rtas_token("write-pci-config");
@@ -462,9 +402,7 @@ unsigned long __init find_and_init_phbs(void)
 
        index = 0;
 
-       for (node = of_get_next_child(root, NULL);
-            node != NULL;
-            node = of_get_next_child(root, node)) {
+       for (node = root->child; node != NULL; node = node->sibling) {
                if (node->type == NULL || strcmp(node->type, "pci") != 0)
                        continue;
 
@@ -482,7 +420,6 @@ unsigned long __init find_and_init_phbs(void)
                index++;
        }
 
-       of_node_put(root);
        pci_devs_phb_init();
 
        return 0;
@@ -513,7 +450,7 @@ void pcibios_name_device(struct pci_dev *dev)
 #endif
 }   
 
-void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
+void __init pcibios_fixup_device_resources(struct pci_dev *dev,
                                           struct pci_bus *bus)
 {
        /* Update device resources.  */
@@ -532,9 +469,8 @@ void __devinit pcibios_fixup_device_resources(struct pci_dev *dev,
                }
         }
 }
-EXPORT_SYMBOL(pcibios_fixup_device_resources);
 
-void __devinit pcibios_fixup_bus(struct pci_bus *bus)
+void __init pcibios_fixup_bus(struct pci_bus *bus)
 {
        struct pci_controller *hose = PCI_GET_PHB_PTR(bus);
        struct list_head *ln;
@@ -583,108 +519,20 @@ void __devinit pcibios_fixup_bus(struct pci_bus *bus)
                        pcibios_fixup_device_resources(dev, bus);
        }
 }
-EXPORT_SYMBOL(pcibios_fixup_bus);
 
 static void check_s7a(void)
 {
        struct device_node *root;
        char *model;
 
-       root = of_find_node_by_path("/");
+       root = find_path_device("/");
        if (root) {
                model = get_property(root, "model", NULL);
                if (model && !strcmp(model, "IBM,7013-S7A"))
                        s7a_workaround = 1;
-               of_node_put(root);
        }
 }
 
-static int get_bus_io_range(struct pci_bus *bus, unsigned long *start_phys,
-                               unsigned long *start_virt, unsigned long *size)
-{
-       struct pci_controller *hose = PCI_GET_PHB_PTR(bus);
-       struct pci_bus_region region;
-       struct resource *res;
-
-       if (bus->self) {
-               res = bus->resource[0];
-               pcibios_resource_to_bus(bus->self, &region, res);
-               *start_phys = hose->io_base_phys + region.start;
-               *start_virt = (unsigned long) hose->io_base_virt + 
-                               region.start;
-               if (region.end > region.start) 
-                       *size = region.end - region.start + 1;
-               else {
-                       printk("%s(): unexpected region 0x%lx->0x%lx\n", 
-                                       __FUNCTION__, region.start, region.end);
-                       return 1;
-               }
-               
-       } else {
-               /* Root Bus */
-               res = &hose->io_resource;
-               *start_phys = hose->io_base_phys;
-               *start_virt = (unsigned long) hose->io_base_virt;
-               if (res->end > res->start)
-                       *size = res->end - res->start + 1;
-               else {
-                       printk("%s(): unexpected region 0x%lx->0x%lx\n", 
-                                       __FUNCTION__, res->start, res->end);
-                       return 1;
-               }
-       }
-
-       return 0;
-}
-
-int unmap_bus_range(struct pci_bus *bus)
-{
-       unsigned long start_phys;
-       unsigned long start_virt;
-       unsigned long size;
-
-       if (!bus) {
-               printk(KERN_ERR "%s() expected bus\n", __FUNCTION__);
-               return 1;
-       }
-       
-       if (get_bus_io_range(bus, &start_phys, &start_virt, &size))
-               return 1;
-       if (iounmap_explicit((void *) start_virt, size))
-               return 1;
-
-       return 0;
-}
-EXPORT_SYMBOL(unmap_bus_range);
-
-int remap_bus_range(struct pci_bus *bus)
-{
-       unsigned long start_phys;
-       unsigned long start_virt;
-       unsigned long size;
-
-       if (!bus) {
-               printk(KERN_ERR "%s() expected bus\n", __FUNCTION__);
-               return 1;
-       }
-       
-       if (get_bus_io_range(bus, &start_phys, &start_virt, &size))
-               return 1;
-       if (__ioremap_explicit(start_phys, start_virt, size, _PAGE_NO_CACHE))
-               return 1;
-
-       return 0;
-}
-EXPORT_SYMBOL(remap_bus_range);
-
-static void phbs_fixup_io(void)
-{
-       struct pci_controller *hose;
-
-       for (hose=hose_head;hose;hose=hose->next) 
-               remap_bus_range(hose->bus);
-}
-
 extern void chrp_request_regions(void);
 
 void __init pcibios_final_fixup(void)
@@ -696,7 +544,6 @@ void __init pcibios_final_fixup(void)
        while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL)
                pci_read_irq_line(dev);
 
-       phbs_fixup_io();
        chrp_request_regions();
        pci_fix_bus_sysdata();
        create_tce_tables();
index 50fa690..280b2fb 100644 (file)
@@ -126,7 +126,6 @@ struct pci_dev *pci_find_dev_by_addr(unsigned long addr)
        while ((dev = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
                if ((dev->class >> 16) == PCI_BASE_CLASS_BRIDGE)
                        continue;
-               
                for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
                        unsigned long start = pci_resource_start(dev,i);
                        unsigned long end = pci_resource_end(dev,i);
@@ -145,7 +144,7 @@ struct pci_dev *pci_find_dev_by_addr(unsigned long addr)
        return NULL;
 }
 
-void 
+void __devinit
 pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
                        struct resource *res)
 {
@@ -225,11 +224,7 @@ pci_alloc_pci_controller(enum phb_types controller_type)
         struct pci_controller *hose;
        char *model;
 
-#ifdef CONFIG_PPC_ISERIES
-        hose = (struct pci_controller *)kmalloc(sizeof(struct pci_controller), GFP_KERNEL);
-#else
         hose = (struct pci_controller *)alloc_bootmem(sizeof(struct pci_controller));
-#endif
         if(hose == NULL) {
                 printk(KERN_ERR "PCI: Allocate pci_controller failed.\n");
                 return NULL;
@@ -237,11 +232,6 @@ pci_alloc_pci_controller(enum phb_types controller_type)
         memset(hose, 0, sizeof(struct pci_controller));
 
        switch(controller_type) {
-#ifdef CONFIG_PPC_ISERIES
-       case phb_type_hypervisor:
-               model = "PHB HV";
-               break;
-#endif
        case phb_type_python:
                model = "PHB PY";
                break;
@@ -321,7 +311,6 @@ static int __init pcibios_init(void)
                hose->last_busno = bus->subordinate;
        }
 
-#ifndef CONFIG_PPC_ISERIES
        if (pci_probe_only)
                pcibios_claim_of_setup();
        else
@@ -329,7 +318,6 @@ static int __init pcibios_init(void)
                   pci_assign_unassigned_resources() is able to work
                   correctly with [partially] allocated PCI tree. */
                pci_assign_unassigned_resources();
-#endif
 
        /* Call machine dependent fixup */
        pcibios_final_fixup();
@@ -387,27 +375,19 @@ int pcibios_enable_device(struct pci_dev *dev, int mask)
  */
 int pci_domain_nr(struct pci_bus *bus)
 {
-#ifdef CONFIG_PPC_ISERIES
-       return 0;
-#else
        struct pci_controller *hose = PCI_GET_PHB_PTR(bus);
 
        return hose->global_number;
-#endif
 }
 
-EXPORT_SYMBOL(pci_domain_nr);
-
 /* Set the name of the bus as it appears in /proc/bus/pci */
 int pci_name_bus(char *name, struct pci_bus *bus)
 {
-#ifndef CONFIG_PPC_ISERIES
        struct pci_controller *hose = PCI_GET_PHB_PTR(bus);
 
        if (hose->buid)
                sprintf(name, "%04x:%02x", pci_domain_nr(bus), bus->number);
        else
-#endif
                sprintf(name, "%02x", bus->number);
 
        return 0;
index 0d054e3..a25ade4 100644 (file)
 /* #define MONITOR_TCE 1 */ /* Turn on to sanity check TCE generation. */
 
 
-#ifdef CONFIG_PPC_PSERIES
 /* Initialize so this guy does not end up in the BSS section.
  * Only used to pass OF initialization data set in prom.c into the main 
  * kernel code -- data ultimately copied into tceTables[].
  */
 extern struct _of_tce_table of_tce_table[];
-#endif
 
 extern struct pci_controller* hose_head;
 extern struct pci_controller** hose_tail;
@@ -555,7 +553,7 @@ inline dma_addr_t get_tces( struct TceTable *tbl, unsigned order, void *page, un
 }
 
 #ifdef CONFIG_PPC_ISERIES
-void tce_free_one_iSeries( struct TceTable *tbl, long tcenum )
+static void tce_free_one_iSeries( struct TceTable *tbl, long tcenum )
 {
        u64 set_tce_rc;
        union Tce tce;
@@ -703,7 +701,6 @@ void create_tce_tables_for_buses(struct list_head *bus_list)
        }
 }
 
-#ifdef CONFIG_PPC_PSERIES
 void create_tce_tables_for_busesLP(struct list_head *bus_list)
 {
        struct list_head *ln;
@@ -725,19 +722,15 @@ void create_tce_tables_for_busesLP(struct list_head *bus_list)
                create_tce_tables_for_busesLP(&bus->children);
        }
 }
-#endif
 
 void create_tce_tables(void) {
        struct pci_dev *dev = NULL;
        struct device_node *dn, *mydn;
 
-#ifdef CONFIG_PPC_PSERIES
        if (systemcfg->platform == PLATFORM_PSERIES_LPAR) {
                create_tce_tables_for_busesLP(&pci_root_buses);
        }
-       else
-#endif
-       {
+       else {
                create_tce_tables_for_buses(&pci_root_buses);
        }
        /* Now copy the tce_table ptr from the bus devices down to every
@@ -891,7 +884,6 @@ static void getTceTableParmsiSeries(struct iSeries_Device_Node* DevNode,
 static void getTceTableParmsPSeries(struct pci_controller *phb,
                                    struct device_node *dn,
                                    struct TceTable *newTceTable ) {
-#ifdef CONFIG_PPC_PSERIES
        phandle node;
        unsigned long i;
 
@@ -961,7 +953,6 @@ static void getTceTableParmsPSeries(struct pci_controller *phb,
                }
                i++;
        }
-#endif
 }
 
 /*
@@ -979,7 +970,6 @@ static void getTceTableParmsPSeries(struct pci_controller *phb,
 static void getTceTableParmsPSeriesLP(struct pci_controller *phb,
                                    struct device_node *dn,
                                    struct TceTable *newTceTable ) {
-#ifdef CONFIG_PPC_PSERIES
        u32 *dma_window = (u32 *)get_property(dn, "ibm,dma-window", 0);
        if (!dma_window) {
                panic("PCI_DMA: getTceTableParmsPSeriesLP: device %s has no ibm,dma-window property!\n", dn->full_name);
@@ -995,7 +985,6 @@ static void getTceTableParmsPSeriesLP(struct pci_controller *phb,
        PPCDBG(PPCDBG_TCEINIT, "\tnewTceTable->index       = 0x%lx\n", newTceTable->index);
        PPCDBG(PPCDBG_TCEINIT, "\tnewTceTable->startOffset = 0x%lx\n", newTceTable->startOffset);
        PPCDBG(PPCDBG_TCEINIT, "\tnewTceTable->size        = 0x%lx\n", newTceTable->size);
-#endif
 }
 
 /* Allocates a contiguous real buffer and creates TCEs over it.
index c809d73..0a943d2 100644 (file)
@@ -46,7 +46,6 @@
 static void * __init
 update_dn_pci_info(struct device_node *dn, void *data)
 {
-#ifdef CONFIG_PPC_PSERIES
        struct pci_controller *phb = (struct pci_controller *)data;
        u32 *regs;
        char *device_type = get_property(dn, "device_type", 0);
@@ -65,7 +64,6 @@ update_dn_pci_info(struct device_node *dn, void *data)
                        dn->devfn = (regs[0] >> 8) & 0xff;
                }
        }
-#endif
        return NULL;
 }
 
@@ -99,7 +97,6 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, travers
                return ret;
        for (dn = start->child; dn; dn = nextdn) {
                nextdn = NULL;
-#ifdef CONFIG_PPC_PSERIES
                if (get_property(dn, "class-code", 0)) {
                        if (pre && (ret = pre(dn, data)) != NULL)
                                return ret;
@@ -115,7 +112,6 @@ void *traverse_pci_devices(struct device_node *start, traverse_func pre, travers
                                        post(dn, data);
                        }
                }
-#endif
                if (!nextdn) {
                        /* Walk up to next valid sibling. */
                        do {
index fb40290..9889336 100644 (file)
@@ -39,7 +39,6 @@
 #include <asm/hw_irq.h>
 #include <asm/abs_addr.h>
 #include <asm/cacheflush.h>
-#include <asm/proc_fs.h>
 #ifdef CONFIG_PPC_ISERIES
 #include <asm/iSeries/iSeries_pci.h>
 #include <asm/iSeries/iSeries_proc.h>
@@ -83,7 +82,7 @@ EXPORT_SYMBOL(__up);
 EXPORT_SYMBOL(naca);
 EXPORT_SYMBOL(__down);
 
-EXPORT_SYMBOL(csum_partial);
+/* EXPORT_SYMBOL(csum_partial); already in net/netsyms.c */
 EXPORT_SYMBOL(csum_partial_copy_generic);
 EXPORT_SYMBOL(ip_fast_csum);
 EXPORT_SYMBOL(csum_tcpudp_magic);
@@ -164,23 +163,21 @@ EXPORT_SYMBOL(kernel_thread);
 EXPORT_SYMBOL(flush_instruction_cache);
 EXPORT_SYMBOL(_get_PVR);
 EXPORT_SYMBOL(giveup_fpu);
-#ifdef CONFIG_ALTIVEC
-EXPORT_SYMBOL(giveup_altivec);
-#endif
+EXPORT_SYMBOL(enable_kernel_fp);
 EXPORT_SYMBOL(flush_icache_range);
 EXPORT_SYMBOL(flush_icache_user_range);
 EXPORT_SYMBOL(flush_dcache_page);
 #ifdef CONFIG_SMP
 #ifdef CONFIG_PPC_ISERIES
-EXPORT_SYMBOL(local_get_flags);
-EXPORT_SYMBOL(local_irq_disable);
-EXPORT_SYMBOL(local_irq_restore);
+EXPORT_SYMBOL(__no_use_restore_flags);
+EXPORT_SYMBOL(__no_use_save_flags);
+EXPORT_SYMBOL(__no_use_sti);
+EXPORT_SYMBOL(__no_use_cli);
 #endif
 #endif
 
 EXPORT_SYMBOL(ppc_md);
 
-#ifdef CONFIG_PPC_PSERIES
 EXPORT_SYMBOL(find_devices);
 EXPORT_SYMBOL(find_type_devices);
 EXPORT_SYMBOL(find_compatible_devices);
@@ -189,7 +186,6 @@ EXPORT_SYMBOL(device_is_compatible);
 EXPORT_SYMBOL(machine_is_compatible);
 EXPORT_SYMBOL(find_all_nodes);
 EXPORT_SYMBOL(get_property);
-#endif
 
 
 EXPORT_SYMBOL_NOVERS(memcpy);
@@ -201,6 +197,7 @@ EXPORT_SYMBOL_NOVERS(memcmp);
 EXPORT_SYMBOL(abs);
 
 EXPORT_SYMBOL(timer_interrupt);
+EXPORT_SYMBOL(irq_desc);
 EXPORT_SYMBOL(get_wchan);
 EXPORT_SYMBOL(console_drivers);
 #ifdef CONFIG_XMON
@@ -225,4 +222,3 @@ EXPORT_SYMBOL(debugger_fault_handler);
 
 EXPORT_SYMBOL(tb_ticks_per_usec);
 EXPORT_SYMBOL(paca);
-EXPORT_SYMBOL(proc_ppc64);
index 8ad2be7..2b4fec3 100644 (file)
@@ -44,6 +44,8 @@
 
 static int proc_pmc_control_mode = 0;
 
+static struct proc_dir_entry *proc_ppc64_root = NULL;
+static struct proc_dir_entry *proc_ppc64_pmc_root = NULL;
 static struct proc_dir_entry *proc_ppc64_pmc_system_root = NULL;
 static struct proc_dir_entry *proc_ppc64_pmc_cpu_root[NR_CPUS] = {NULL, };
 
@@ -80,8 +82,8 @@ int proc_pmc_set_pmc6(  struct file *file, const char *buffer, unsigned long cou
 int proc_pmc_set_pmc7(  struct file *file, const char *buffer, unsigned long count, void *data);
 int proc_pmc_set_pmc8(  struct file *file, const char *buffer, unsigned long count, void *data);
 
-#if 0
-int proc_ppc64_init(void)
+
+void proc_ppc64_init(void)
 {
        unsigned long i;
        struct proc_dir_entry *ent = NULL;
@@ -95,21 +97,15 @@ int proc_ppc64_init(void)
         *   /proc/ppc64/pmc/cpu0 
         */
        spin_lock(&proc_ppc64_lock);
-       if (proc_ppc64.root == NULL) {
-               proc_ppc64_init();
-               if (!proc_ppc64.root) {
-                       spin_unlock(&proc_ppc64_lock);
-                       return;
-               }
-       }
+       proc_ppc64_root = proc_mkdir("ppc64", 0);
+       if (!proc_ppc64_root) return;
        spin_unlock(&proc_ppc64_lock);
 
        /* Placeholder for rtas interfaces. */
-       if (proc_ppc64.rtas == NULL) {
-               return;
-       }
+       rtas_proc_dir = proc_mkdir("rtas", proc_ppc64_root);
 
-       proc_ppc64_pmc_root = proc_mkdir("pmc", proc_ppc64.root);
+
+       proc_ppc64_pmc_root = proc_mkdir("pmc", proc_ppc64_root);
 
        proc_ppc64_pmc_system_root = proc_mkdir("system", proc_ppc64_pmc_root);
        for (i = 0; i < NR_CPUS; i++) {
@@ -120,6 +116,7 @@ int proc_ppc64_init(void)
                }
        }
 
+
        /* Create directories for the software counters. */
        for (i = 0; i < NR_CPUS; i++) {
                if (!cpu_online(i))
@@ -130,7 +127,7 @@ int proc_ppc64_init(void)
                        ent->nlink = 1;
                        ent->data = (void *)proc_ppc64_pmc_cpu_root[i];
                        ent->read_proc = (void *)proc_ppc64_pmc_stab_read;
-                       ent->write_proc = NULL;
+                       ent->write_proc = (void *)proc_ppc64_pmc_stab_read;
                }
 
                ent = create_proc_entry("htab", S_IRUGO | S_IWUSR, 
@@ -139,7 +136,7 @@ int proc_ppc64_init(void)
                        ent->nlink = 1;
                        ent->data = (void *)proc_ppc64_pmc_cpu_root[i];
                        ent->read_proc = (void *)proc_ppc64_pmc_htab_read;
-                       ent->write_proc = NULL;
+                       ent->write_proc = (void *)proc_ppc64_pmc_htab_read;
                }
        }
 
@@ -149,7 +146,7 @@ int proc_ppc64_init(void)
                ent->nlink = 1;
                ent->data = (void *)proc_ppc64_pmc_system_root;
                ent->read_proc = (void *)proc_ppc64_pmc_stab_read;
-               ent->write_proc = NULL;
+               ent->write_proc = (void *)proc_ppc64_pmc_stab_read;
        }
 
        ent = create_proc_entry("htab", S_IRUGO | S_IWUSR, 
@@ -158,7 +155,7 @@ int proc_ppc64_init(void)
                ent->nlink = 1;
                ent->data = (void *)proc_ppc64_pmc_system_root;
                ent->read_proc = (void *)proc_ppc64_pmc_htab_read;
-               ent->write_proc = NULL;
+               ent->write_proc = (void *)proc_ppc64_pmc_htab_read;
        }
 
        /* Create directories for the hardware counters. */
@@ -171,7 +168,7 @@ int proc_ppc64_init(void)
                        ent->nlink = 1;
                        ent->data = (void *)proc_ppc64_pmc_cpu_root[i];
                        ent->read_proc = (void *)proc_ppc64_pmc_hw_read;
-                       ent->write_proc = NULL;
+                       ent->write_proc = (void *)proc_ppc64_pmc_hw_read;
                }
        }
 
@@ -181,10 +178,9 @@ int proc_ppc64_init(void)
                ent->nlink = 1;
                ent->data = (void *)proc_ppc64_pmc_system_root;
                ent->read_proc = (void *)proc_ppc64_pmc_hw_read;
-               ent->write_proc = NULL;
+               ent->write_proc = (void *)proc_ppc64_pmc_hw_read;
        }
 }
-#endif
 
 /*
  * Find the requested 'file' given a proc token.
@@ -680,22 +676,15 @@ static inline void proc_pmc_tlb(void)
 
 int proc_pmc_set_control( struct file *file, const char *buffer, unsigned long count, void *data )
 {
-       char stkbuf[10];
-       if (count > 9) count = 9;
-       if (copy_from_user (stkbuf, buffer, count)) {
-               return -EFAULT;
-       }
-       stkbuf[count] = 0;
-
-       if      ( ! strncmp( stkbuf, "stop", 4 ) )
+       if      ( ! strncmp( buffer, "stop", 4 ) )
                proc_pmc_stop();
-       else if ( ! strncmp( stkbuf, "start", 5 ) )
+       else if ( ! strncmp( buffer, "start", 5 ) )
                proc_pmc_start();
-       else if ( ! strncmp( stkbuf, "reset", 5 ) )
+       else if ( ! strncmp( buffer, "reset", 5 ) )
                proc_pmc_reset();
-       else if ( ! strncmp( stkbuf, "cpi", 3 ) )
+       else if ( ! strncmp( buffer, "cpi", 3 ) )
                proc_pmc_cpi();
-       else if ( ! strncmp( stkbuf, "tlb", 3 ) )
+       else if ( ! strncmp( buffer, "tlb", 3 ) )
                proc_pmc_tlb();
        
        /* IMPLEMENT ME */
index e9addc9..1e6762c 100644 (file)
@@ -30,8 +30,6 @@
 #include <linux/init.h>
 #include <linux/mm.h>
 #include <linux/proc_fs.h>
-#include <linux/slab.h>
-#include <linux/kernel.h>
 
 #include <asm/proc_fs.h>
 #include <asm/naca.h>
 #include <asm/systemcfg.h>
 #include <asm/rtas.h>
 #include <asm/uaccess.h>
-#include <asm/prom.h>
 
 struct proc_ppc64_t proc_ppc64;
 
 void proc_ppc64_create_paca(int num);
-void proc_ppc64_create_smt(void);
 
 static loff_t  page_map_seek( struct file *file, loff_t off, int whence);
 static ssize_t page_map_read( struct file *file, char *buf, size_t nbytes, loff_t *ppos);
@@ -56,32 +52,15 @@ static struct file_operations page_map_fops = {
        .mmap   = page_map_mmap
 };
 
-#ifdef CONFIG_PPC_PSERIES
-/* routines for /proc/ppc64/ofdt */
-static ssize_t ofdt_write(struct file *, const char __user *, size_t, loff_t *);
-static void proc_ppc64_create_ofdt(struct proc_dir_entry *);
-static int do_remove_node(char *);
-static int do_add_node(char *, size_t);
-static void release_prop_list(const struct property *);
-static struct property *new_property(const char *, const int, const unsigned char *, struct property *);
-static char * parse_next_property(char *, char *, char **, int *, unsigned char**);
-static struct file_operations ofdt_fops = {
-       .write = ofdt_write
-};
-#endif
 
-int __init proc_ppc64_init(void)
+static int __init proc_ppc64_init(void)
 {
 
+       printk(KERN_INFO "proc_ppc64: Creating /proc/ppc64/\n");
 
-       if (proc_ppc64.root == NULL) {
-               printk(KERN_INFO "proc_ppc64: Creating /proc/ppc64/\n");
-               proc_ppc64.root = proc_mkdir("ppc64", 0);
-               if (!proc_ppc64.root)
-                       return 0;
-       } else {
+       proc_ppc64.root = proc_mkdir("ppc64", 0);
+       if (!proc_ppc64.root)
                return 0;
-       }
 
        proc_ppc64.naca = create_proc_entry("naca", S_IRUSR, proc_ppc64.root);
        if ( proc_ppc64.naca ) {
@@ -111,18 +90,8 @@ int __init proc_ppc64_init(void)
                }
        }
 
-#ifdef CONFIG_PPC_PSERIES
        /* Placeholder for rtas interfaces. */
-       if (proc_ppc64.rtas == NULL)
-               proc_ppc64.rtas = proc_mkdir("rtas", proc_ppc64.root);
-
-       if (proc_ppc64.rtas)
-               proc_symlink("rtas", 0, "ppc64/rtas");
-
-       proc_ppc64_create_smt();
-
-       proc_ppc64_create_ofdt(proc_ppc64.root);
-#endif
+       proc_ppc64.rtas = proc_mkdir("rtas", proc_ppc64.root);
 
        return 0;
 }
@@ -204,310 +173,5 @@ static int page_map_mmap( struct file *file, struct vm_area_struct *vma )
        return 0;
 }
 
-#ifdef CONFIG_PPC_PSERIES
-/* create /proc/ppc64/ofdt write-only by root */
-static void proc_ppc64_create_ofdt(struct proc_dir_entry *parent)
-{
-       struct proc_dir_entry *ent;
-
-       ent = create_proc_entry("ofdt", S_IWUSR, parent);
-       if (ent) {
-               ent->nlink = 1;
-               ent->data = NULL;
-               ent->size = 0;
-               ent->proc_fops = &ofdt_fops;
-       }
-}
-
-/**
- * ofdt_write - perform operations on the Open Firmware device tree
- *
- * @file: not used
- * @buf: command and arguments
- * @count: size of the command buffer
- * @off: not used
- *
- * Operations supported at this time are addition and removal of
- * whole nodes along with their properties.  Operations on individual
- * properties are not implemented (yet).
- */
-static ssize_t ofdt_write(struct file *file, const char __user *buf, size_t count, loff_t *off)
-{
-       int rv = 0;
-       char *kbuf;
-       char *tmp;
-
-       if (!(kbuf = kmalloc(count + 1, GFP_KERNEL))) {
-               rv = -ENOMEM;
-               goto out;
-       }
-       if (copy_from_user(kbuf, buf, count)) {
-               rv = -EFAULT;
-               goto out;
-       }
-
-       kbuf[count] = '\0';
-
-       tmp = strchr(kbuf, ' ');
-       if (!tmp) {
-               rv = -EINVAL;
-               goto out;
-       }
-       *tmp = '\0';
-       tmp++;
-
-       if (!strcmp(kbuf, "add_node"))
-               rv = do_add_node(tmp, count - (tmp - kbuf));
-       else if (!strcmp(kbuf, "remove_node"))
-               rv = do_remove_node(tmp);
-       else
-               rv = -EINVAL;
-out:
-       kfree(kbuf);
-       return rv ? rv : count;
-}
-
-static int do_remove_node(char *buf)
-{
-       struct device_node *node;
-       int rv = 0;
-
-       if ((node = of_find_node_by_path(buf)))
-               of_remove_node(node);
-       else
-               rv = -ENODEV;
-
-       of_node_put(node);
-       return rv;
-}
-
-static int do_add_node(char *buf, size_t bufsize)
-{
-       char *path, *end, *name;
-       struct device_node *np;
-       struct property *prop = NULL;
-       unsigned char* value;
-       int length, rv = 0;
-
-       end = buf + bufsize;
-       path = buf;
-       buf = strchr(buf, ' ');
-       if (!buf)
-               return -EINVAL;
-       *buf = '\0';
-       buf++;
-
-       if ((np = of_find_node_by_path(path))) {
-               of_node_put(np);
-               return -EINVAL;
-       }
-
-       /* rv = build_prop_list(tmp, bufsize - (tmp - buf), &proplist); */
-       while (buf < end &&
-              (buf = parse_next_property(buf, end, &name, &length, &value))) {
-               struct property *last = prop;
-
-               prop = new_property(name, length, value, last);
-               if (!prop) {
-                       rv = -ENOMEM;
-                       prop = last;
-                       goto out;
-               }
-       }
-       if (!buf) {
-               rv = -EINVAL;
-               goto out;
-       }
-
-       rv = of_add_node(path, prop);
-
-out:
-       if (rv)
-               release_prop_list(prop);
-       return rv;
-}
-
-static struct property *new_property(const char *name, const int length, const unsigned char *value, struct property *last)
-{
-       struct property *new = kmalloc(sizeof(*new), GFP_KERNEL);
-
-       if (!new)
-               return NULL;
-       memset(new, 0, sizeof(*new));
-
-       if (!(new->name = kmalloc(strlen(name) + 1, GFP_KERNEL)))
-               goto cleanup;
-       if (!(new->value = kmalloc(length + 1, GFP_KERNEL)))
-               goto cleanup;
-
-       strcpy(new->name, name);
-       memcpy(new->value, value, length);
-       *(((char *)new->value) + length) = 0;
-       new->length = length;
-       new->next = last;
-       return new;
-
-cleanup:
-       if (new->name)
-               kfree(new->name);
-       if (new->value)
-               kfree(new->value);
-       kfree(new);
-       return NULL;
-}
-
-/**
- * parse_next_property - process the next property from raw input buffer
- * @buf: input buffer, must be nul-terminated
- * @end: end of the input buffer + 1, for validation
- * @name: return value; set to property name in buf
- * @length: return value; set to length of value
- * @value: return value; set to the property value in buf
- *
- * Note that the caller must make copies of the name and value returned,
- * this function does no allocation or copying of the data.  Return value
- * is set to the next name in buf, or NULL on error.
- */
-static char * parse_next_property(char *buf, char *end, char **name, int *length, unsigned char **value)
-{
-       char *tmp;
-
-       *name = buf;
-
-       tmp = strchr(buf, ' ');
-       if (!tmp) {
-               printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__);
-               return NULL;
-       }
-       *tmp = '\0';
-
-       if (++tmp >= end) {
-               printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__);
-               return NULL;
-       }
-
-       /* now we're on the length */
-       *length = -1;
-       *length = simple_strtoul(tmp, &tmp, 10);
-       if (*length == -1) {
-               printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__);
-               return NULL;
-       }
-       if (*tmp != ' ' || ++tmp >= end) {
-               printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__);
-               return NULL;
-       }
-
-       /* now we're on the value */
-       *value = tmp;
-       tmp += *length;
-       if (tmp > end) {
-               printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__);
-               return NULL;
-       }
-       else if (tmp < end && *tmp != ' ' && *tmp != '\0') {
-               printk(KERN_ERR "property parse failed in %s at line %d\n", __FUNCTION__, __LINE__);
-               return NULL;
-       }
-       tmp++;
-
-       /* and now we should be on the next name, or the end */
-       return tmp;
-}
-
-static void release_prop_list(const struct property *prop)
-{
-       struct property *next;
-       for (; prop; prop = next) {
-               next = prop->next;
-               kfree(prop->name);
-               kfree(prop->value);
-               kfree(prop);
-       }
-
-}
-#endif /* defined(CONFIG_PPC_PSERIES) */
-
-static int proc_ppc64_smt_snooze_read(char *page, char **start, off_t off,
-                                     int count, int *eof, void *data)
-{
-       if (naca->smt_snooze_delay)
-               return sprintf(page, "%lu\n", naca->smt_snooze_delay);
-       else 
-               return sprintf(page, "disabled\n");
-}
-static int proc_ppc64_smt_snooze_write(struct file* file, const char *buffer,
-                                      unsigned long count, void *data)
-{
-       unsigned long val;
-       char val_string[22];
-
-       if (!capable(CAP_SYS_ADMIN))
-               return -EACCES;
-
-       if (count > sizeof(val_string) - 1)
-               return -EINVAL;
-
-       if (copy_from_user(val_string, buffer, count))
-               return -EFAULT;
-
-       val_string[count] = '\0';
-
-       if (val_string[0] == '0' && (val_string[1] == '\n' || val_string[1] == '\0')) {
-               naca->smt_snooze_delay = 0;
-               return count;
-       }
-       val = simple_strtoul(val_string, NULL, 10);
-       if (val != 0) 
-               naca->smt_snooze_delay = val;
-       else
-               return -EINVAL;
-
-       return count;
-}
-static int proc_ppc64_smt_state_read(char *page, char **start, off_t off,
-                                     int count, int *eof, void *data)
-{
-       switch(naca->smt_state) {
-       case SMT_OFF:
-               return sprintf(page, "off\n");
-               break;
-       case SMT_ON:
-               return sprintf(page, "on\n");
-               break;
-       case SMT_DYNAMIC:
-               return sprintf(page, "dynamic\n");
-               break;
-       default:
-               return sprintf(page, "unknown\n");
-               break;
-       }
-}
-void proc_ppc64_create_smt(void)
-{
-       struct proc_dir_entry *ent_snooze = 
-               create_proc_entry("smt-snooze-delay", S_IRUGO | S_IWUSR, 
-                                 proc_ppc64.root);
-       struct proc_dir_entry *ent_enabled = 
-               create_proc_entry("smt-enabled", S_IRUGO | S_IWUSR, 
-                                 proc_ppc64.root);
-       if (ent_snooze) {
-               ent_snooze->nlink = 1;
-               ent_snooze->data = NULL;
-               ent_snooze->read_proc = (void *)proc_ppc64_smt_snooze_read;
-               ent_snooze->write_proc = (void *)proc_ppc64_smt_snooze_write;
-       }
-
-       if (ent_enabled) {
-               ent_enabled->nlink = 1;
-               ent_enabled->data = NULL;
-               ent_enabled->read_proc = (void *)proc_ppc64_smt_state_read;
-               ent_enabled->write_proc = NULL;
-       }
-}
-
 fs_initcall(proc_ppc64_init);
+
index 00a9a80..0b16f76 100644 (file)
 #include <asm/cputable.h>
 #include <asm/sections.h>
 
-#ifndef CONFIG_SMP
 struct task_struct *last_task_used_math = NULL;
-struct task_struct *last_task_used_altivec = NULL;
-#endif
 
 struct mm_struct ioremap_mm = { pgd             : ioremap_dir  
                                ,page_table_lock : SPIN_LOCK_UNLOCKED };
@@ -61,7 +58,8 @@ struct mm_struct ioremap_mm = { pgd             : ioremap_dir
 char *sysmap = NULL;
 unsigned long sysmap_size = 0;
 
-void enable_kernel_fp(void)
+void
+enable_kernel_fp(void)
 {
 #ifdef CONFIG_SMP
        if (current->thread.regs && (current->thread.regs->msr & MSR_FP))
@@ -72,7 +70,6 @@ void enable_kernel_fp(void)
        giveup_fpu(last_task_used_math);
 #endif /* CONFIG_SMP */
 }
-EXPORT_SYMBOL(enable_kernel_fp);
 
 int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs)
 {
@@ -88,31 +85,6 @@ int dump_task_fpu(struct task_struct *tsk, elf_fpregset_t *fpregs)
        return 1;
 }
 
-#ifdef CONFIG_ALTIVEC
-
-void enable_kernel_altivec(void)
-{
-#ifdef CONFIG_SMP
-       if (current->thread.regs && (current->thread.regs->msr & MSR_VEC))
-               giveup_altivec(current);
-       else
-               giveup_altivec(NULL);   /* just enables FP for kernel */
-#else
-       giveup_altivec(last_task_used_altivec);
-#endif /* CONFIG_SMP */
-}
-EXPORT_SYMBOL(enable_kernel_altivec);
-
-int dump_task_altivec(struct pt_regs *regs, elf_vrregset_t *vrregs)
-{
-       if (regs->msr & MSR_VEC)
-               giveup_altivec(current);
-       memcpy(vrregs, &current->thread.vr[0], sizeof(*vrregs));
-       return 1;
-}
-
-#endif /* CONFIG_ALTIVEC */
-
 struct task_struct *__switch_to(struct task_struct *prev,
                                struct task_struct *new)
 {
@@ -132,20 +104,8 @@ struct task_struct *__switch_to(struct task_struct *prev,
         */
        if (prev->thread.regs && (prev->thread.regs->msr & MSR_FP))
                giveup_fpu(prev);
-#ifdef CONFIG_ALTIVEC
-       if (prev->thread.regs && (prev->thread.regs->msr & MSR_VEC))
-               giveup_altivec(prev);
-#endif /* CONFIG_ALTIVEC */
 #endif /* CONFIG_SMP */
 
-#if defined(CONFIG_ALTIVEC) && !defined(CONFIG_SMP)
-       /* Avoid the trap.  On smp this this never happens since
-        * we don't set last_task_used_altivec -- Cort
-        */
-       if (new->thread.regs && last_task_used_altivec == new)
-               new->thread.regs->msr |= MSR_VEC;
-#endif /* CONFIG_ALTIVEC */
-
        new_thread = &new->thread;
        old_thread = &current->thread;
 
@@ -198,14 +158,8 @@ void show_regs(struct pt_regs * regs)
 
 void exit_thread(void)
 {
-#ifndef CONFIG_SMP
        if (last_task_used_math == current)
                last_task_used_math = NULL;
-#ifdef CONFIG_ALTIVEC
-       if (last_task_used_altivec == current)
-               last_task_used_altivec = NULL;
-#endif /* CONFIG_ALTIVEC */
-#endif /* CONFIG_SMP */
 }
 
 void flush_thread(void)
@@ -215,14 +169,8 @@ void flush_thread(void)
        if (t->flags & _TIF_ABI_PENDING)
                t->flags ^= (_TIF_ABI_PENDING | _TIF_32BIT);
 
-#ifndef CONFIG_SMP
        if (last_task_used_math == current)
                last_task_used_math = NULL;
-#ifdef CONFIG_ALTIVEC
-       if (last_task_used_altivec == current)
-               last_task_used_altivec = NULL;
-#endif /* CONFIG_ALTIVEC */
-#endif /* CONFIG_SMP */
 }
 
 void
@@ -230,25 +178,6 @@ release_thread(struct task_struct *t)
 {
 }
 
-
-/*
- * This gets called before we allocate a new thread and copy
- * the current task into it.
- */
-void prepare_to_copy(struct task_struct *tsk)
-{
-       struct pt_regs *regs = tsk->thread.regs;
-
-       if (regs == NULL)
-               return;
-       if (regs->msr & MSR_FP)
-               giveup_fpu(current);
-#ifdef CONFIG_ALTIVEC
-       if (regs->msr & MSR_VEC)
-               giveup_altivec(current);
-#endif /* CONFIG_ALTIVEC */
-}
-
 /*
  * Copy a thread..
  */
@@ -339,25 +268,9 @@ void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp)
        regs->gpr[1] = sp;
        regs->gpr[2] = toc;
        regs->msr = MSR_USER64;
-#ifndef CONFIG_SMP
        if (last_task_used_math == current)
                last_task_used_math = 0;
-#endif /* CONFIG_SMP */
-       memset(current->thread.fpr, 0, sizeof(current->thread.fpr));
        current->thread.fpscr = 0;
-#ifdef CONFIG_ALTIVEC
-#ifndef CONFIG_SMP
-       if (last_task_used_altivec == current)
-               last_task_used_altivec = 0;
-#endif /* CONFIG_SMP */
-       memset(current->thread.vr, 0, sizeof(current->thread.vr));
-       current->thread.vscr.u[0] = 0;
-       current->thread.vscr.u[1] = 0;
-       current->thread.vscr.u[2] = 0;
-       current->thread.vscr.u[3] = 0x00010000; /* Java mode disabled */
-       current->thread.vrsave = 0;
-       current->thread.used_vr = 0;
-#endif /* CONFIG_ALTIVEC */
 }
 
 int set_fpexc_mode(struct task_struct *tsk, unsigned int val)
@@ -401,6 +314,9 @@ int sys_clone(unsigned long clone_flags, unsigned long p2, unsigned long p3,
                }
        }
 
+       if (regs->msr & MSR_FP)
+               giveup_fpu(current);
+
        return do_fork(clone_flags & ~CLONE_IDLETASK, p2, regs, 0,
                    (int *)parent_tidptr, (int *)child_tidptr);
 }
@@ -409,6 +325,9 @@ int sys_fork(unsigned long p1, unsigned long p2, unsigned long p3,
             unsigned long p4, unsigned long p5, unsigned long p6,
             struct pt_regs *regs)
 {
+       if (regs->msr & MSR_FP)
+               giveup_fpu(current);
+
        return do_fork(SIGCHLD, regs->gpr[1], regs, 0, NULL, NULL);
 }
 
@@ -416,6 +335,9 @@ int sys_vfork(unsigned long p1, unsigned long p2, unsigned long p3,
              unsigned long p4, unsigned long p5, unsigned long p6,
              struct pt_regs *regs)
 {
+       if (regs->msr & MSR_FP)
+               giveup_fpu(current);
+
        return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, regs->gpr[1], regs, 0,
                    NULL, NULL);
 }
@@ -433,10 +355,7 @@ int sys_execve(unsigned long a0, unsigned long a1, unsigned long a2,
                goto out;
        if (regs->msr & MSR_FP)
                giveup_fpu(current);
-#ifdef CONFIG_ALTIVEC
-       if (regs->msr & MSR_VEC)
-               giveup_altivec(current);
-#endif /* CONFIG_ALTIVEC */
+  
        error = do_execve(filename, (char **) a1, (char **) a2, regs);
   
        if (error == 0)
@@ -470,8 +389,12 @@ unsigned long get_wchan(struct task_struct *p)
                        return 0;
                if (count > 0) {
                        ip = *(unsigned long *)(sp + 16);
+                       /*
+                        * XXX we mask the upper 32 bits until procps
+                        * gets fixed.
+                        */
                        if (ip < first_sched || ip >= last_sched)
-                               return ip;
+                               return (ip & 0xFFFFFFFF);
                }
        } while (count++ < 16);
        return 0;
@@ -489,10 +412,7 @@ void show_stack(struct task_struct *p, unsigned long *_sp)
 
        if (sp == 0)
                sp = p->thread.ksp;
-       printk("Call Trace:");
-#ifdef CONFIG_KALLSYMS
-       printk("\n");
-#endif
+       printk("Call Trace:\n");
        do {
                if (__get_user(sp, (unsigned long *)sp))
                        break;
@@ -502,12 +422,9 @@ void show_stack(struct task_struct *p, unsigned long *_sp)
                        break;
                if (__get_user(ip, (unsigned long *)(sp + 16)))
                        break;
-               printk("[<%016lx>] ", ip);
+               printk("[%016lx] ", ip);
                print_symbol("%s\n", ip);
        } while (count++ < 32);
-#if !CONFIG_KALLSYMS
-       printk("\n");
-#endif
 }
 
 void dump_stack(void)
index 54d84ed..47ce635 100644 (file)
@@ -29,7 +29,6 @@
 #include <linux/spinlock.h>
 #include <linux/types.h>
 #include <linux/pci.h>
-#include <linux/proc_fs.h>
 #include <asm/prom.h>
 #include <asm/rtas.h>
 #include <asm/lmb.h>
@@ -45,7 +44,6 @@
 #include <asm/bitops.h>
 #include <asm/naca.h>
 #include <asm/pci.h>
-#include <asm/pci_dma.h>
 #include <asm/bootinfo.h>
 #include <asm/ppcdebug.h>
 #include "open_pic.h"
@@ -149,16 +147,16 @@ char *bootpath = 0;
 char *bootdevice = 0;
 
 int boot_cpuid = 0;
-#define MAX_CPU_THREADS 2
 
 struct device_node *allnodes = 0;
-/* use when traversing tree through the allnext, child, sibling,
- * or parent members of struct device_node.
- */
-static rwlock_t devtree_lock = RW_LOCK_UNLOCKED;
+
+#define UNDEFINED_IRQ 0xffff
+unsigned short real_irq_to_virt_map[NR_HW_IRQS];
+unsigned short virt_irq_to_real_map[NR_IRQS];
+int last_virt_irq = 2; /* index of last virt_irq.  Skip through IPI */
 
 static unsigned long call_prom(const char *service, int nargs, int nret, ...);
-static void prom_panic(const char *reason);
+static void prom_exit(void);
 static unsigned long copy_device_tree(unsigned long);
 static unsigned long inspect_node(phandle, struct device_node *, unsigned long,
                                  unsigned long, struct device_node ***);
@@ -170,11 +168,6 @@ static int prom_next_node(phandle *);
 static struct bi_record * prom_bi_rec_verify(struct bi_record *);
 static unsigned long prom_bi_rec_reserve(unsigned long);
 static struct device_node *find_phandle(phandle);
-static void of_node_cleanup(struct device_node *);
-static struct device_node *derive_parent(const char *);
-static void add_node_proc_entries(struct device_node *);
-static void remove_node_proc_entries(struct device_node *);
-static int of_finish_dynamic_node(struct device_node *);
 
 #ifdef DEBUG_PROM
 void prom_dump_lmb(void);
@@ -230,12 +223,10 @@ call_prom(const char *service, int nargs, int nret, ...)
 
 
 static void __init
-prom_panic(const char *reason)
+prom_exit()
 {
        unsigned long offset = reloc_offset();
 
-       prom_print(reason);
-       /* ToDo: should put up an SRC here */
        call_prom(RELOC("exit"), 0, 0);
 
        for (;;)                        /* should never get here */
@@ -611,9 +602,6 @@ prom_instantiate_rtas(void)
                                                      _rtas->base) >= 0) {
                                _rtas->entry = (long)_prom->args.rets[1];
                        }
-                       RELOC(rtas_rmo_buf)
-                               = lmb_alloc_base(RTAS_RMOBUF_MAX, PAGE_SIZE,
-                                                       rtas_region);
                }
 
                if (_rtas->entry <= 0) {
@@ -797,7 +785,8 @@ prom_initialize_tce_table(void)
                base = lmb_alloc(minsize, align);
 
                if ( !base ) {
-                       prom_panic(RELOC("ERROR, cannot find space for TCE table.\n"));
+                       prom_print(RELOC("ERROR, cannot find space for TCE table.\n"));
+                       prom_exit();
                }
 
                vbase = absolute_to_virt(base);
@@ -895,21 +884,16 @@ static void
 prom_hold_cpus(unsigned long mem)
 {
        unsigned long i;
-       unsigned int reg;
+       unsigned int cpuid;
        phandle node;
        unsigned long offset = reloc_offset();
        char type[64], *path;
-       int cpuid = 0;
-       unsigned int interrupt_server[MAX_CPU_THREADS];
-       unsigned int cpu_threads, hw_cpu_num;
-       int propsize;
        extern void __secondary_hold(void);
         extern unsigned long __secondary_hold_spinloop;
         extern unsigned long __secondary_hold_acknowledge;
         unsigned long *spinloop     = __v2a(&__secondary_hold_spinloop);
         unsigned long *acknowledge  = __v2a(&__secondary_hold_acknowledge);
         unsigned long secondary_hold = (unsigned long)__v2a(*PTRRELOC((unsigned long *)__secondary_hold));
-        struct naca_struct *_naca = RELOC(naca);
         struct systemcfg *_systemcfg = RELOC(systemcfg);
        struct paca_struct *_xPaca = PTRRELOC(&paca[0]);
        struct prom_t *_prom = PTRRELOC(&prom);
@@ -962,9 +946,13 @@ prom_hold_cpus(unsigned long mem)
                if (strcmp(type, RELOC("okay")) != 0)
                        continue;
 
-                reg = -1;
+                cpuid = -1;
                call_prom(RELOC("getprop"), 4, 1, node, RELOC("reg"),
-                         &reg, sizeof(reg));
+                         &cpuid, sizeof(cpuid));
+
+               /* Only need to start secondary procs, not ourself. */
+               if ( cpuid == _prom->cpu )
+                       continue;
 
                path = (char *) mem;
                memset(path, 0, 256);
@@ -974,14 +962,12 @@ prom_hold_cpus(unsigned long mem)
 
 #ifdef DEBUG_PROM
                prom_print_nl();
-               prom_print(RELOC("cpuid        = 0x"));
-               prom_print_hex(cpuid);
-               prom_print_nl();
                prom_print(RELOC("cpu hw idx   = 0x"));
-               prom_print_hex(reg);
+               prom_print_hex(cpuid);
                prom_print_nl();
 #endif
-               _xPaca[cpuid].xHwProcNum = reg;
+               prom_print(RELOC("starting cpu "));
+               prom_print(path);
 
                /* Init the acknowledge var which will be reset by
                 * the secondary cpu when it awakens from its OF
@@ -989,85 +975,45 @@ prom_hold_cpus(unsigned long mem)
                 */
                *acknowledge = (unsigned long)-1;
 
-               propsize = call_prom(RELOC("getprop"), 4, 1, node,
-                                    RELOC("ibm,ppc-interrupt-server#s"), 
-                                    &interrupt_server, 
-                                    sizeof(interrupt_server));
-               if (propsize < 0) {
-                       /* no property.  old hardware has no SMT */
-                       cpu_threads = 1;
-                       interrupt_server[0] = reg; /* fake it with phys id */
-               } else {
-                       /* We have a threaded processor */
-                       cpu_threads = propsize / sizeof(u32);
-                       if (cpu_threads > MAX_CPU_THREADS) {
-                               prom_print(RELOC("SMT: too many threads!\nSMT: found "));
-                               prom_print_hex(cpu_threads);
-                               prom_print(RELOC(", max is "));
-                               prom_print_hex(MAX_CPU_THREADS);
-                               prom_print_nl();
-                               cpu_threads = 1; /* ToDo: panic? */
-                       }
-               }
-
-               hw_cpu_num = interrupt_server[0];
-               if (hw_cpu_num != _prom->cpu) {
-                       /* Primary Thread of non-boot cpu */
-                       prom_print_hex(cpuid);
-                       prom_print(RELOC(" : starting cpu "));
-                       prom_print(path);
-                       prom_print(RELOC("..."));
-                       call_prom(RELOC("start-cpu"), 3, 0, node, 
-                                 secondary_hold, cpuid);
-
-                       for ( i = 0 ; (i < 100000000) && 
-                             (*acknowledge == ((unsigned long)-1)); i++ ) ;
-
-                       if (*acknowledge == cpuid) {
-                               prom_print(RELOC("ok\n"));
-#ifdef CONFIG_SMP
-                               /* Set the number of active processors. */
-                               _systemcfg->processorCount++;
-                               cpu_set(cpuid, RELOC(cpu_available_map));
-                               cpu_set(cpuid, RELOC(cpu_possible_map));
-                               cpu_set(cpuid, RELOC(cpu_present_at_boot));
+#ifdef DEBUG_PROM
+               prom_print(RELOC("    3) spinloop       = 0x"));
+               prom_print_hex(spinloop);
+               prom_print_nl();
+               prom_print(RELOC("    3) *spinloop      = 0x"));
+               prom_print_hex(*spinloop);
+               prom_print_nl();
+               prom_print(RELOC("    3) acknowledge    = 0x"));
+               prom_print_hex(acknowledge);
+               prom_print_nl();
+               prom_print(RELOC("    3) *acknowledge   = 0x"));
+               prom_print_hex(*acknowledge);
+               prom_print_nl();
+               prom_print(RELOC("    3) secondary_hold = 0x"));
+               prom_print_hex(secondary_hold);
+               prom_print_nl();
 #endif
-                       } else {
-                               prom_print(RELOC("failed: "));
-                               prom_print_hex(*acknowledge);
-                               prom_print_nl();
-                               /* prom_panic(RELOC("cpu failed to start")); */
-                       }
-               }
-#ifdef CONFIG_SMP
-               else {
-                       prom_print_hex(cpuid);
-                       prom_print(RELOC(" : booting  cpu "));
-                       prom_print(path);
+               call_prom(RELOC("start-cpu"), 3, 0, node, secondary_hold, cpuid);
+               prom_print(RELOC("..."));
+               for ( i = 0 ; (i < 100000000) && 
+                             (*acknowledge == ((unsigned long)-1)); i++ ) ;
+#ifdef DEBUG_PROM
+               {
+                       unsigned long *p = 0x0;
+                       prom_print(RELOC("    4) 0x0 = 0x"));
+                       prom_print_hex(*p);
                        prom_print_nl();
-                       cpu_set(cpuid, RELOC(cpu_available_map));
-                       cpu_set(cpuid, RELOC(cpu_possible_map));
-                       cpu_set(cpuid, RELOC(cpu_online_map));
-                       cpu_set(cpuid, RELOC(cpu_present_at_boot));
                }
-
-               /* Init paca for secondary threads.   They start later. */
-               for (i=1; i < cpu_threads; i++) {
-                       cpuid++;
-                       _xPaca[cpuid].xHwProcNum = interrupt_server[i];
-                       prom_print_hex(interrupt_server[i]);
-                       prom_print(RELOC(" : preparing thread ... "));
-                       if (_naca->smt_state) {
-                               cpu_set(cpuid, RELOC(cpu_available_map));
-                               cpu_set(cpuid, RELOC(cpu_present_at_boot));
-                               prom_print(RELOC("available"));
-                       } else {
-                               prom_print(RELOC("not available"));
-                       }
+#endif
+               if (*acknowledge == cpuid) {
+                       prom_print(RELOC("ok\n"));
+                       /* Set the number of active processors. */
+                       _systemcfg->processorCount++;
+                       _xPaca[cpuid].active = 1;
+               } else {
+                       prom_print(RELOC("failed: "));
+                       prom_print_hex(*acknowledge);
                        prom_print_nl();
                }
-#endif
-               cpuid++;
        }
 #ifdef CONFIG_HMT
        /* Only enable HMT on processors that provide support. */
@@ -1077,10 +1023,10 @@ prom_hold_cpus(unsigned long mem)
                prom_print(RELOC("    starting secondary threads\n"));
 
                for (i = 0; i < NR_CPUS; i += 2) {
-                       if (!cpu_online(i))
+                       if (!_xPaca[i].active)
                                continue;
 
-                       if (i == 0) {
+                       if (i == boot_cpuid) {
                                unsigned long pir = _get_PIR();
                                if (__is_processor(PV_PULSAR)) {
                                        RELOC(hmt_thread_data)[i].pir = 
@@ -1090,8 +1036,7 @@ prom_hold_cpus(unsigned long mem)
                                                pir & 0x3ff;
                                }
                        }
-/*                     cpu_set(i+1, cpu_online_map); */
-                       cpu_set(i+1, RELOC(cpu_possible_map));
+                       _xPaca[i+1].active = 1;
                }
                _systemcfg->processorCount *= 2;
        } else {
@@ -1104,105 +1049,6 @@ prom_hold_cpus(unsigned long mem)
 #endif
 }
 
-static void
-smt_setup(void)
-{
-       char *p, *q;
-       char my_smt_enabled = SMT_DYNAMIC;
-       unsigned long my_smt_snooze_delay; 
-       ihandle prom_options = NULL;
-       char option[9];
-       unsigned long offset = reloc_offset();
-        struct naca_struct *_naca = RELOC(naca);
-       char found = 0;
-
-       if (strstr(RELOC(cmd_line), RELOC("smt-enabled="))) {
-               for (q = RELOC(cmd_line); (p = strstr(q, RELOC("smt-enabled="))) != 0; ) {
-                       q = p + 12;
-                       if (p > RELOC(cmd_line) && p[-1] != ' ')
-                               continue;
-                       found = 1;
-                       if (q[0] == 'o' && q[1] == 'f' && 
-                           q[2] == 'f' && (q[3] == ' ' || q[3] == '\0')) {
-                               my_smt_enabled = SMT_OFF;
-                       } else if (q[0]=='o' && q[1] == 'n' && 
-                                  (q[2] == ' ' || q[2] == '\0')) {
-                               my_smt_enabled = SMT_ON;
-                       } else {
-                               my_smt_enabled = SMT_DYNAMIC;
-                       } 
-               }
-       }
-       if (!found) {
-               prom_options = (ihandle)call_prom(RELOC("finddevice"), 1, 1, RELOC("/options"));
-               if (prom_options != (ihandle) -1) {
-                       call_prom(RELOC("getprop"), 
-                               4, 1, prom_options,
-                               RELOC("ibm,smt-enabled"), 
-                               option, 
-                               sizeof(option));
-                       if (option[0] != 0) {
-                               found = 1;
-                               if (!strcmp(option, "off"))     
-                                       my_smt_enabled = SMT_OFF;
-                               else if (!strcmp(option, "on")) 
-                                       my_smt_enabled = SMT_ON;
-                               else
-                                       my_smt_enabled = SMT_DYNAMIC;
-                       }
-               }
-       }
-
-       if (!found )
-               my_smt_enabled = SMT_DYNAMIC; /* default to on */
-
-       found = 0;
-       if (my_smt_enabled) {
-               if (strstr(RELOC(cmd_line), RELOC("smt-snooze-delay="))) {
-                       for (q = RELOC(cmd_line); (p = strstr(q, RELOC("smt-snooze-delay="))) != 0; ) {
-                               q = p + 17;
-                               if (p > RELOC(cmd_line) && p[-1] != ' ')
-                                       continue;
-                               found = 1;
-                               /* Don't use simple_strtoul() because _ctype & others aren't RELOC'd */
-                               my_smt_snooze_delay = 0;
-                               while (*q >= '0' && *q <= '9') {
-                                       my_smt_snooze_delay = my_smt_snooze_delay * 10 + *q - '0';
-                                       q++;
-                               }
-                       }
-               }
-
-               if (!found) {
-                       prom_options = (ihandle)call_prom(RELOC("finddevice"), 1, 1, RELOC("/options"));
-                       if (prom_options != (ihandle) -1) {
-                               call_prom(RELOC("getprop"), 
-                                       4, 1, prom_options,
-                                       RELOC("ibm,smt-snooze-delay"), 
-                                       option, 
-                                       sizeof(option));
-                               if (option[0] != 0) {
-                                       found = 1;
-                                       /* Don't use simple_strtoul() because _ctype & others aren't RELOC'd */
-                                       my_smt_snooze_delay = 0;
-                                       q = option;
-                                       while (*q >= '0' && *q <= '9') {
-                                               my_smt_snooze_delay = my_smt_snooze_delay * 10 + *q - '0';
-                                               q++;
-                                       }
-                               }
-                       }
-               }
-
-               if (!found) {
-                       my_smt_snooze_delay = 30000; /* default value */
-               }
-       } else {
-               my_smt_snooze_delay = 0; /* default value */
-       }
-       _naca->smt_snooze_delay = my_smt_snooze_delay;
-       _naca->smt_state = my_smt_enabled;
-}
 
 /*
  * We enter here early on, when the Open Firmware prom is still
@@ -1214,7 +1060,7 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
          unsigned long r6, unsigned long r7)
 {
        unsigned long mem;
-       ihandle prom_mmu,prom_root, prom_cpu;
+       ihandle prom_root, prom_cpu;
        phandle cpu_pkg;
        unsigned long offset = reloc_offset();
        long l;
@@ -1246,12 +1092,12 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
                                       RELOC("/chosen"));
 
        if ((long)_prom->chosen <= 0)
-               prom_panic(RELOC("cannot find chosen")); /* msg won't be printed :( */
+               prom_exit();
 
         if ((long)call_prom(RELOC("getprop"), 4, 1, _prom->chosen,
                            RELOC("stdout"), &getprop_rval,
                            sizeof(getprop_rval)) <= 0)
-                prom_panic(RELOC("cannot find stdout"));
+                prom_exit();
 
         _prom->stdout = (ihandle)(unsigned long)getprop_rval;
 
@@ -1277,7 +1123,7 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
         if ((long)call_prom(RELOC("getprop"), 4, 1, _prom->chosen,
                            RELOC("cpu"), &getprop_rval,
                            sizeof(getprop_rval)) <= 0)
-                prom_panic(RELOC("cannot find boot cpu"));
+                prom_exit();
 
        prom_cpu = (ihandle)(unsigned long)getprop_rval;
        cpu_pkg = call_prom(RELOC("instance-to-package"), 1, 1, prom_cpu);
@@ -1285,9 +1131,11 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
                cpu_pkg, RELOC("reg"),
                &getprop_rval, sizeof(getprop_rval));
        _prom->cpu = (int)(unsigned long)getprop_rval;
-       _xPaca[0].xHwProcNum = _prom->cpu;
-
-       RELOC(boot_cpuid) = 0;
+       _xPaca[_prom->cpu].active = 1;
+#ifdef CONFIG_SMP
+       cpu_set(_prom->cpu, RELOC(cpu_online_map));
+#endif
+       RELOC(boot_cpuid) = _prom->cpu;
 
 #ifdef DEBUG_PROM
        prom_print(RELOC("Booting CPU hw index = 0x"));
@@ -1310,15 +1158,6 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
                mem = DOUBLEWORD_ALIGN(mem + strlen(d) + 1);
        }
 
-       RELOC(cmd_line[0]) = 0;
-       if ((long)_prom->chosen > 0) {
-               call_prom(RELOC("getprop"), 4, 1, _prom->chosen, 
-                         RELOC("bootargs"), p, sizeof(cmd_line));
-               if (p != NULL && p[0] != 0)
-                       strncpy(RELOC(cmd_line), p, sizeof(cmd_line));
-       }
-       RELOC(cmd_line[sizeof(cmd_line) - 1]) = 0;
-
        mem = prom_initialize_lmb(mem);
 
        mem = prom_bi_rec_reserve(mem);
@@ -1330,12 +1169,11 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
         /* Initialize some system info into the Naca early... */
         mem = prom_initialize_naca(mem);
 
-       smt_setup();
-       
         /* If we are on an SMP machine, then we *MUST* do the
          * following, regardless of whether we have an SMP
          * kernel or not.
          */
+        if (_systemcfg->processorCount > 1)
                prom_hold_cpus(mem);
 
 #ifdef DEBUG_PROM
@@ -1350,34 +1188,9 @@ prom_init(unsigned long r3, unsigned long r4, unsigned long pp,
        if (_systemcfg->platform == PLATFORM_PSERIES)
                prom_initialize_tce_table();
 
-       if ((long) call_prom(RELOC("getprop"), 4, 1,
-                               _prom->chosen,
-                               RELOC("mmu"),
-                               &getprop_rval,
-                               sizeof(getprop_rval)) <= 0) {   
-                prom_panic(RELOC(" no MMU found\n"));
-       }
-
-       /* We assume the phys. address size is 3 cells */
-       RELOC(prom_mmu) = (ihandle)(unsigned long)getprop_rval;
-
-       if ((long)call_prom(RELOC("call-method"), 4, 4,
-                               RELOC("translate"),
-                               prom_mmu,
-                               (void *)(KERNELBASE - offset),
-                               (void *)1) != 0) {
-               prom_print(RELOC(" (translate failed) "));
-       } else {
-               prom_print(RELOC(" (translate ok) "));
-               phys = (unsigned long)_prom->args.rets[3];
-       }
-
-       /* If OpenFirmware version >= 3, then use quiesce call */
-       if (_prom->version >= 3) {
-               prom_print(RELOC("Calling quiesce ...\n"));
-               call_prom(RELOC("quiesce"), 0, 0);
-               phys = KERNELBASE - offset;
-       }
+       prom_print(RELOC("Calling quiesce ...\n"));
+       call_prom(RELOC("quiesce"), 0, 0);
+       phys = KERNELBASE - offset;
 
        prom_print(RELOC("returning from prom_init\n"));
        return phys;
@@ -1495,6 +1308,46 @@ check_display(unsigned long mem)
        return DOUBLEWORD_ALIGN(mem);
 }
 
+void
+virt_irq_init(void)
+{
+       int i;
+       for (i = 0; i < NR_IRQS; i++)
+               virt_irq_to_real_map[i] = UNDEFINED_IRQ;
+       for (i = 0; i < NR_HW_IRQS; i++)
+               real_irq_to_virt_map[i] = UNDEFINED_IRQ;
+}
+
+/* Create a mapping for a real_irq if it doesn't already exist.
+ * Return the virtual irq as a convenience.
+ */
+unsigned long
+virt_irq_create_mapping(unsigned long real_irq)
+{
+       unsigned long virq;
+       if (naca->interrupt_controller == IC_OPEN_PIC)
+               return real_irq;        /* no mapping for openpic (for now) */
+       virq = real_irq_to_virt(real_irq);
+       if (virq == UNDEFINED_IRQ) {
+               /* Assign a virtual IRQ number */
+               if (real_irq < NR_IRQS && virt_irq_to_real(real_irq) == UNDEFINED_IRQ) {
+                       /* A 1-1 mapping will work. */
+                       virq = real_irq;
+               } else {
+                       while (last_virt_irq < NR_IRQS &&
+                              virt_irq_to_real(++last_virt_irq) != UNDEFINED_IRQ)
+                               /* skip irq's in use */;
+                       if (last_virt_irq >= NR_IRQS)
+                               panic("Too many IRQs are required on this system.  NR_IRQS=%d\n", NR_IRQS);
+                       virq = last_virt_irq;
+               }
+               virt_irq_to_real_map[virq] = real_irq;
+               real_irq_to_virt_map[real_irq] = virq;
+       }
+       return virq;
+}
+
+
 static int __init
 prom_next_node(phandle *nodep)
 {
@@ -1528,7 +1381,8 @@ copy_device_tree(unsigned long mem_start)
 
        root = call_prom(RELOC("peer"), 1, 1, (phandle)0);
        if (root == (phandle)0) {
-               prom_panic(RELOC("couldn't get device tree root\n"));
+               prom_print(RELOC("couldn't get device tree root\n"));
+               prom_exit();
        }
        allnextp = &RELOC(allnodes);
        mem_start = DOUBLEWORD_ALIGN(mem_start);
@@ -1590,23 +1444,6 @@ inspect_node(phandle node, struct device_node *dad,
                *prev_propp = PTRUNRELOC(pp);
                prev_propp = &pp->next;
        }
-
-       /* Add a "linux_phandle" value */
-        if (np->node) {
-               u32 ibm_phandle = 0;
-               int len;
-
-                /* First see if "ibm,phandle" exists and use its value */
-                len = (int)
-                        call_prom(RELOC("getprop"), 4, 1, node, RELOC("ibm,phandle"),
-                                  &ibm_phandle, sizeof(ibm_phandle));
-                if (len < 0) {
-                        np->linux_phandle = np->node;
-                } else {
-                        np->linux_phandle = ibm_phandle;
-               }
-       }
-
        *prev_propp = 0;
 
        /* get the node's full name */
@@ -1640,6 +1477,8 @@ finish_device_tree(void)
 {
        unsigned long mem = klimit;
 
+       virt_irq_init();
+
        mem = finish_node(allnodes, mem, NULL, 0, 0);
        dev_tree_size = mem - (unsigned long) allnodes;
 
@@ -1648,7 +1487,7 @@ finish_device_tree(void)
 
        klimit = mem;
 
-       rtas.dev = of_find_node_by_name(NULL, "rtas");
+       rtas.dev = find_devices("rtas");
 }
 
 static unsigned long __init
@@ -1701,7 +1540,7 @@ finish_node(struct device_node *np, unsigned long mem_start,
 /*
  * Find the interrupt parent of a node.
  */
-static struct device_node * __devinit
+static struct device_node * __init
 intr_parent(struct device_node *p)
 {
        phandle *parp;
@@ -1716,7 +1555,7 @@ intr_parent(struct device_node *p)
  * Find out the size of each entry of the interrupts property
  * for a node.
  */
-static int __devinit
+static int __init
 prom_n_intr_cells(struct device_node *np)
 {
        struct device_node *p;
@@ -1744,7 +1583,7 @@ prom_n_intr_cells(struct device_node *np)
  * Map an interrupt from a device up to the platform interrupt
  * descriptor.
  */
-static int __devinit
+static int __init
 map_interrupt(unsigned int **irq, struct device_node **ictrler,
              struct device_node *np, unsigned int *ints, int nintrc)
 {
@@ -1865,7 +1704,7 @@ finish_node_interrupts(struct device_node *np, unsigned long mem_start)
                n = map_interrupt(&irq, &ic, np, ints, intrcells);
                if (n <= 0)
                        continue;
-               np->intrs[i].line = irq_offset_up(irq[0]);
+               np->intrs[i].line = openpic_to_irq(virt_irq_create_mapping(irq[0]));
                if (n > 1)
                        np->intrs[i].sense = irq[1];
                if (n > 2) {
@@ -2100,14 +1939,11 @@ int
 machine_is_compatible(const char *compat)
 {
        struct device_node *root;
-       int rc = 0;
-  
-       root = of_find_node_by_path("/");
-       if (root) {
-               rc = device_is_compatible(root, compat);
-               of_node_put(root);
-       }
-       return rc;
+       
+       root = find_path_device("/");
+       if (root == 0)
+               return 0;
+       return device_is_compatible(root, compat);
 }
 
 /*
@@ -2147,560 +1983,16 @@ find_path_device(const char *path)
        return NULL;
 }
 
-/*******
- *
- * New implementation of the OF "find" APIs, return a refcounted
- * object, call of_node_put() when done.  The device tree and list
- * are protected by a rw_lock.
- *
- * Note that property management will need some locking as well,
- * this isn't dealt with yet.
- *
- *******/
-
-/**
- *     of_find_node_by_name - Find a node by its "name" property
- *     @from:  The node to start searching from or NULL, the node
- *             you pass will not be searched, only the next one
- *             will; typically, you pass what the previous call
- *             returned. of_node_put() will be called on it
- *     @name:  The name string to match against
- *
- *     Returns a node pointer with refcount incremented, use
- *     of_node_put() on it when done.
- */
-struct device_node *of_find_node_by_name(struct device_node *from,
-       const char *name)
-{
-       struct device_node *np;
-
-       read_lock(&devtree_lock);
-       np = from ? from->allnext : allnodes;
-       for (; np != 0; np = np->allnext)
-               if (np->name != 0 && strcasecmp(np->name, name) == 0
-                   && of_node_get(np))
-                       break;
-       if (from)
-               of_node_put(from);
-       read_unlock(&devtree_lock);
-       return np;
-}
-
-/**
- *     of_find_node_by_type - Find a node by its "device_type" property
- *     @from:  The node to start searching from or NULL, the node
- *             you pass will not be searched, only the next one
- *             will; typically, you pass what the previous call
- *             returned. of_node_put() will be called on it
- *     @name:  The type string to match against
- *
- *     Returns a node pointer with refcount incremented, use
- *     of_node_put() on it when done.
- */
-struct device_node *of_find_node_by_type(struct device_node *from,
-       const char *type)
-{
-       struct device_node *np;
-
-       read_lock(&devtree_lock);
-       np = from ? from->allnext : allnodes;
-       for (; np != 0; np = np->allnext)
-               if (np->type != 0 && strcasecmp(np->type, type) == 0
-                   && of_node_get(np))
-                       break;
-       if (from)
-               of_node_put(from);
-       read_unlock(&devtree_lock);
-       return np;
-}
-EXPORT_SYMBOL(of_find_node_by_type);
-
-/**
- *     of_find_compatible_node - Find a node based on type and one of the
- *                                tokens in its "compatible" property
- *     @from:          The node to start searching from or NULL, the node
- *                     you pass will not be searched, only the next one
- *                     will; typically, you pass what the previous call
- *                     returned. of_node_put() will be called on it
- *     @type:          The type string to match "device_type" or NULL to ignore
- *     @compatible:    The string to match to one of the tokens in the device
- *                     "compatible" list.
- *
- *     Returns a node pointer with refcount incremented, use
- *     of_node_put() on it when done.
- */
-struct device_node *of_find_compatible_node(struct device_node *from,
-       const char *type, const char *compatible)
-{
-       struct device_node *np;
-
-       read_lock(&devtree_lock);
-       np = from ? from->allnext : allnodes;
-       for (; np != 0; np = np->allnext) {
-               if (type != NULL
-                   && !(np->type != 0 && strcasecmp(np->type, type) == 0))
-                       continue;
-               if (device_is_compatible(np, compatible) && of_node_get(np))
-                       break;
-       }
-       if (from)
-               of_node_put(from);
-       read_unlock(&devtree_lock);
-       return np;
-}
-
-/**
- *     of_find_node_by_path - Find a node matching a full OF path
- *     @path:  The full path to match
- *
- *     Returns a node pointer with refcount incremented, use
- *     of_node_put() on it when done.
- */
-struct device_node *of_find_node_by_path(const char *path)
-{
-       struct device_node *np = allnodes;
-
-       read_lock(&devtree_lock);
-       for (; np != 0; np = np->allnext)
-               if (np->full_name != 0 && strcasecmp(np->full_name, path) == 0
-                   && of_node_get(np))
-                       break;
-       read_unlock(&devtree_lock);
-       return np;
-}
-
-/**
- *     of_find_all_nodes - Get next node in global list
- *     @prev:  Previous node or NULL to start iteration
- *             of_node_put() will be called on it
- *
- *     Returns a node pointer with refcount incremented, use
- *     of_node_put() on it when done.
- */
-struct device_node *of_find_all_nodes(struct device_node *prev)
-{
-       struct device_node *np;
-
-       read_lock(&devtree_lock);
-       np = prev ? prev->allnext : allnodes;
-       for (; np != 0; np = np->allnext)
-               if (of_node_get(np))
-                       break;
-       if (prev)
-               of_node_put(prev);
-       read_unlock(&devtree_lock);
-       return np;
-}
-
-/**
- *     of_get_parent - Get a node's parent if any
- *     @node:  Node to get parent
- *
- *     Returns a node pointer with refcount incremented, use
- *     of_node_put() on it when done.
- */
-struct device_node *of_get_parent(const struct device_node *node)
-{
-       struct device_node *np;
-
-       if (!node)
-               return NULL;
-
-       read_lock(&devtree_lock);
-       np = of_node_get(node->parent);
-       read_unlock(&devtree_lock);
-       return np;
-}
-
-/**
- *     of_get_next_child - Iterate a node childs
- *     @node:  parent node
- *     @prev:  previous child of the parent node, or NULL to get first
- *
- *     Returns a node pointer with refcount incremented, use
- *     of_node_put() on it when done.
- */
-struct device_node *of_get_next_child(const struct device_node *node,
-       struct device_node *prev)
-{
-       struct device_node *next;
-
-       read_lock(&devtree_lock);
-       next = prev ? prev->sibling : node->child;
-       for (; next != 0; next = next->sibling)
-               if (of_node_get(next))
-                       break;
-       if (prev)
-               of_node_put(prev);
-       read_unlock(&devtree_lock);
-       return next;
-}
-
-/**
- *     of_node_get - Increment refcount of a node
- *     @node:  Node to inc refcount, NULL is supported to
- *             simplify writing of callers
- *
- *     Returns the node itself or NULL if gone.
- */
-struct device_node *of_node_get(struct device_node *node)
-{
-       if (node && !OF_IS_STALE(node)) {
-               atomic_inc(&node->_users);
-               return node;
-       }
-       return NULL;
-}
-
-/**
- *     of_node_put - Decrement refcount of a node
- *     @node:  Node to dec refcount, NULL is supported to
- *             simplify writing of callers
- *
- */
-void of_node_put(struct device_node *node)
-{
-       if (!node)
-               return;
-
-       WARN_ON(0 == atomic_read(&node->_users));
-
-       if (OF_IS_STALE(node)) {
-               if (atomic_dec_and_test(&node->_users)) {
-                       of_node_cleanup(node);
-                       return;
-               }
-       }
-       else
-               atomic_dec(&node->_users);
-}
-
-/**
- *     of_node_cleanup - release a dynamically allocated node
- *     @arg:  Node to be released
- */
-static void of_node_cleanup(struct device_node *node)
-{
-       struct property *prop = node->properties;
-
-       if (!OF_IS_DYNAMIC(node))
-               return;
-       while (prop) {
-               struct property *next = prop->next;
-               kfree(prop->name);
-               kfree(prop->value);
-               kfree(prop);
-               prop = next;
-       }
-       kfree(node->intrs);
-       kfree(node->addrs);
-       kfree(node->full_name);
-       kfree(node);
-}
-
-/**
- *     derive_parent - basically like dirname(1)
- *     @path:  the full_name of a node to be added to the tree
- *
- *     Returns the node which should be the parent of the node
- *     described by path.  E.g., for path = "/foo/bar", returns
- *     the node with full_name = "/foo".
- */
-static struct device_node *derive_parent(const char *path)
-{
-       struct device_node *parent = NULL;
-       char *parent_path = "/";
-       size_t parent_path_len = strrchr(path, '/') - path + 1;
-
-       /* reject if path is "/" */
-       if (!strcmp(path, "/"))
-               return NULL;
-
-       if (strrchr(path, '/') != path) {
-               parent_path = kmalloc(parent_path_len, GFP_KERNEL);
-               if (!parent_path)
-                       return NULL;
-               strlcpy(parent_path, path, parent_path_len);
-       }
-       parent = of_find_node_by_path(parent_path);
-       if (strcmp(parent_path, "/"))
-               kfree(parent_path);
-       return parent;
-}
-
-/*
- * Routines for "runtime" addition and removal of device tree nodes.
- */
-
-/*
- * Given a path and a property list, construct an OF device node, add
- * it to the device tree and global list, and place it in
- * /proc/device-tree.  This function may sleep.
- */
-int of_add_node(const char *path, struct property *proplist)
-{
-       struct device_node *np;
-       int err = 0;
-
-       np = kmalloc(sizeof(struct device_node), GFP_KERNEL);
-       if (!np)
-               return -ENOMEM;
-
-       memset(np, 0, sizeof(*np));
-
-       np->full_name = kmalloc(strlen(path) + 1, GFP_KERNEL);
-       if (!np->full_name) {
-               kfree(np);
-               return -ENOMEM;
-       }
-       strcpy(np->full_name, path);
-
-       np->properties = proplist;
-       OF_MARK_DYNAMIC(np);
-       of_node_get(np);
-       np->parent = derive_parent(path);
-       if (!np->parent) {
-               kfree(np);
-               return -EINVAL; /* could also be ENOMEM, though */
-       }
-
-       if (0 != (err = of_finish_dynamic_node(np))) {
-               kfree(np);
-               return err;
-       }
-
-       write_lock(&devtree_lock);
-       np->sibling = np->parent->child;
-       np->allnext = allnodes;
-       np->parent->child = np;
-       allnodes = np;
-       write_unlock(&devtree_lock);
-
-       add_node_proc_entries(np);
-
-       of_node_put(np->parent);
-       of_node_put(np);
-       return 0;
-}
-
-/*
- * Remove an OF device node from the system.
- */
-int of_remove_node(struct device_node *np)
-{
-       struct device_node *parent, *child;
-
-       parent = of_get_parent(np);
-       child = of_get_next_child(np, NULL);
-       if (child && !child->child && !child->sibling) {
-               /* For now, we will allow removal of a
-                * node with one and only one child, so
-                * that we can support removing a slot with
-                * an IOA in it.  More general support for
-                * subtree removal to be implemented later, if
-                * necessary.
-                */
-               of_remove_node(child);
-       }
-       else if (child) {
-               of_node_put(child);
-               of_node_put(parent);
-               return -EINVAL;
-       }
-       of_node_put(child);
-
-       write_lock(&devtree_lock);
-       OF_MARK_STALE(np);
-       remove_node_proc_entries(np);
-       if (allnodes == np)
-               allnodes = np->allnext;
-       else {
-               struct device_node *prev;
-               for (prev = allnodes;
-                    prev->allnext != np;
-                    prev = prev->allnext)
-                       ;
-               prev->allnext = np->allnext;
-       }
-
-       if (np->parent->child == np)
-               np->parent->child = np->sibling;
-       else {
-               struct device_node *prevsib;
-               for (prevsib = np->parent->child;
-                    prevsib->sibling != np;
-                    prevsib = prevsib->sibling)
-                       ;
-               prevsib->sibling = np->sibling;
-       }
-       write_unlock(&devtree_lock);
-       of_node_put(parent);
-       return 0;
-}
-
-/*
- * Add a node to /proc/device-tree.
- */
-static void add_node_proc_entries(struct device_node *np)
-{
-       struct proc_dir_entry *ent;
-
-       ent = proc_mkdir(strrchr(np->full_name, '/') + 1, np->parent->pde);
-       if (ent)
-               proc_device_tree_add_node(np, ent);
-}
-
-static void remove_node_proc_entries(struct device_node *np)
-{
-       struct property *pp = np->properties;
-       struct device_node *parent = np->parent;
-
-       while (pp) {
-               remove_proc_entry(pp->name, np->pde);
-               pp = pp->next;
-       }
-
-       /* Assuming that symlinks have the same parent directory as
-        * np->pde.
-        */
-       if (np->name_link)
-               remove_proc_entry(np->name_link->name, parent->pde);
-       if (np->addr_link)
-               remove_proc_entry(np->addr_link->name, parent->pde);
-       if (np->pde)
-               remove_proc_entry(np->pde->name, parent->pde);
-}
-
-/*
- * Fix up the uninitialized fields in a new device node:
- * name, type, n_addrs, addrs, n_intrs, intrs, and pci-specific fields
- *
- * A lot of boot-time code is duplicated here, because functions such
- * as finish_node_interrupts, interpret_pci_props, etc. cannot use the
- * slab allocator.
- *
- * This should probably be split up into smaller chunks.
- */
-
-static int of_finish_dynamic_node(struct device_node *node)
-{
-       struct device_node *parent = of_get_parent(node);
-       u32 *regs;
-       unsigned int *ints;
-       int intlen, intrcells;
-       int i, j, n, err = 0;
-       unsigned int *irq;
-       struct device_node *ic;
-       node->name = get_property(node, "name", 0);
-       node->type = get_property(node, "device_type", 0);
-
-       if (!parent) {
-               err = -ENODEV;
-               goto out;
-       }
-
-       /* do the work of interpret_pci_props */
-       if (parent->type && !strcmp(parent->type, "pci")) {
-               struct address_range *adr;
-               struct pci_reg_property *pci_addrs;
-               int i, l;
-
-               pci_addrs = (struct pci_reg_property *)
-                       get_property(node, "assigned-addresses", &l);
-               if (pci_addrs != 0 && l >= sizeof(struct pci_reg_property)) {
-                       i = 0;
-                       adr = kmalloc(sizeof(struct address_range) * 
-                                     (l / sizeof(struct pci_reg_property)),
-                                     GFP_KERNEL);
-                       if (!adr) {
-                               err = -ENOMEM;
-                               goto out;
-                       }
-                       while ((l -= sizeof(struct pci_reg_property)) >= 0) {
-                               adr[i].space = pci_addrs[i].addr.a_hi;
-                               adr[i].address = pci_addrs[i].addr.a_lo;
-                               adr[i].size = pci_addrs[i].size_lo;
-                               ++i;
-                       }
-                       node->addrs = adr;
-                       node->n_addrs = i;
-               }
-       }
-
-       /* now do the work of finish_node_interrupts */
-
-       ints = (unsigned int *) get_property(node, "interrupts", &intlen);
-       if (!ints)
-               goto out;
-
-       intrcells = prom_n_intr_cells(node);
-       intlen /= intrcells * sizeof(unsigned int);
-       node->n_intrs = intlen;
-       node->intrs = kmalloc(sizeof(struct interrupt_info) * intlen,
-                             GFP_KERNEL);
-       if (!node->intrs) {
-               err = -ENOMEM;
-               goto out;
-       }
-
-       for (i = 0; i < intlen; ++i) {
-               node->intrs[i].line = 0;
-               node->intrs[i].sense = 1;
-               n = map_interrupt(&irq, &ic, node, ints, intrcells);
-               if (n <= 0)
-                       continue;
-               node->intrs[i].line = irq_offset_up(irq[0]);
-               if (n > 1)
-                       node->intrs[i].sense = irq[1];
-               if (n > 2) {
-                       printk(KERN_DEBUG "hmmm, got %d intr cells for %s:", n,
-                              node->full_name);
-                       for (j = 0; j < n; ++j)
-                               printk(" %d", irq[j]);
-                       printk("\n");
-               }
-               ints += intrcells;
-       }
-
-       /* now do the rough equivalent of update_dn_pci_info, this
-        * probably is not correct for phb's, but should work for
-       * IOAs and slots.
-        */
-
-       node->phb = parent->phb;
-
-       regs = (u32 *)get_property(node, "reg", 0);
-       if (regs) {
-               node->busno = (regs[0] >> 16) & 0xff;
-               node->devfn = (regs[0] >> 8) & 0xff;
-       }
-
-       /* fixing up tce_table */
-
-       if(strcmp(node->name, "pci") == 0 &&
-                get_property(node, "ibm,dma-window", NULL)) {
-                node->bussubno = node->busno;
-                create_pci_bus_tce_table((unsigned long)node);
-        }
-       else
-               node->tce_table = parent->tce_table;
-
-out:
-       of_node_put(parent);
-       return err;
-}
-
 /*
  * Find the device_node with a given phandle.
  */
-static struct device_node * __devinit
+static struct device_node * __init
 find_phandle(phandle ph)
 {
        struct device_node *np;
 
        for (np = allnodes; np != 0; np = np->allnext)
-               if (np->linux_phandle == ph)
+               if (np->node == ph)
                        return np;
        return NULL;
 }
@@ -2790,6 +2082,17 @@ print_properties(struct device_node *np)
 #endif
 
 
+void __init
+abort()
+{
+#ifdef CONFIG_XMON
+       xmon(NULL);
+#endif
+       for (;;)
+               prom_exit();
+}
+
+
 /* Verify bi_recs are good */
 static struct bi_record *
 prom_bi_rec_verify(struct bi_record *bi_recs)
index 7796f3c..76a9bd5 100644 (file)
@@ -1,3 +1,4 @@
+
 /*
  * ras.c
  * Copyright (C) 2001 Dave Engebretsen IBM Corporation
@@ -69,29 +70,27 @@ static int __init init_ras_IRQ(void)
        struct device_node *np;
        unsigned int *ireg, len, i;
 
-       if ((np = of_find_node_by_path("/event-sources/internal-errors")) &&
-           (ireg = (unsigned int *)get_property(np, "open-pic-interrupt",
-                                                &len))) {
-               for (i=0; i<(len / sizeof(*ireg)); i++) {
-                       request_irq(irq_offset_up(*(ireg)), 
+       if((np = find_path_device("/event-sources/internal-errors")) &&
+          (ireg = (unsigned int *)get_property(np, "open-pic-interrupt", 
+                                               &len))) {
+               for(i=0; i<(len / sizeof(*ireg)); i++) {
+                       request_irq(virt_irq_create_mapping(*(ireg)) + NUM_8259_INTERRUPTS, 
                                    ras_error_interrupt, 0, 
                                    "RAS_ERROR", NULL);
                        ireg++;
                }
        }
-       of_node_put(np);
 
-       if ((np = of_find_node_by_path("/event-sources/epow-events")) &&
-           (ireg = (unsigned int *)get_property(np, "open-pic-interrupt",
-                                                &len))) {
-               for (i=0; i<(len / sizeof(*ireg)); i++) {
-                       request_irq(irq_offset_up(*(ireg)),
+       if((np = find_path_device("/event-sources/epow-events")) &&
+          (ireg = (unsigned int *)get_property(np, "open-pic-interrupt", 
+                                               &len))) {
+               for(i=0; i<(len / sizeof(*ireg)); i++) {
+                       request_irq(virt_irq_create_mapping(*(ireg)) + NUM_8259_INTERRUPTS, 
                                    ras_epow_interrupt, 0, 
                                    "RAS_EPOW", NULL);
                        ireg++;
                }
        }
-       of_node_put(np);
 
        return 1;
 }
@@ -113,7 +112,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 
        status = rtas_call(rtas_token("check-exception"), 6, 1, NULL, 
                           0x500, irq, 
-                          RTAS_EPOW_WARNING | RTAS_POWERMGM_EVENTS, 
+                          EPOW_WARNING | POWERMGM_EVENTS, 
                           1,  /* Time Critical */
                           __pa(&log_entry), size);
 
@@ -121,10 +120,6 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
                    *((unsigned long *)&log_entry), status); 
        printk(KERN_WARNING 
                "EPOW <0x%lx 0x%lx>\n",*((unsigned long *)&log_entry), status);
-
-       /* format and print the extended information */
-       log_error((char *)&log_entry, ERR_TYPE_RTAS_LOG, 0);
-       
        return IRQ_HANDLED;
 }
 
@@ -142,23 +137,15 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
        struct rtas_error_log log_entry;
        unsigned int size = sizeof(log_entry);
        long status = 0xdeadbeef;
-       int fatal;
 
        status = rtas_call(rtas_token("check-exception"), 6, 1, NULL, 
                           0x500, irq, 
-                          RTAS_INTERNAL_ERROR, 
+                          INTERNAL_ERROR, 
                           1, /* Time Critical */
                           __pa(&log_entry), size);
 
-       if ((status == 0) && (log_entry.severity >= SEVERITY_ERROR_SYNC)) 
-               fatal = 1;
-       else
-               fatal = 0;
-
-       /* format and print the extended information */
-       log_error((char *)&log_entry, ERR_TYPE_RTAS_LOG, fatal); 
-
-       if (fatal) {
+       if((status != 1) && 
+          (log_entry.severity >= SEVERITY_ERROR_SYNC)) {
                udbg_printf("HW Error <0x%lx 0x%lx>\n",
                            *((unsigned long *)&log_entry), status);
                printk(KERN_EMERG 
@@ -168,7 +155,6 @@ ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 #ifndef DEBUG
                /* Don't actually power off when debugging so we can test
                 * without actually failing while injecting errors.
-                * Error data will not be logged to syslog.
                 */
                ppc_md.power_off();
 #endif
index 46f8d5c..b7e133a 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/ctype.h>
 #include <linux/time.h>
 #include <linux/string.h>
-#include <linux/init.h>
 
 #include <asm/uaccess.h>
 #include <asm/bitops.h>
@@ -28,7 +27,6 @@
 #include <asm/io.h>
 #include <asm/prom.h>
 #include <asm/rtas.h>
-#include <asm/proc_fs.h>
 #include <asm/machdep.h> /* for ppc_md */
 #include <asm/time.h>
 
@@ -163,8 +161,6 @@ static ssize_t ppc_rtas_tone_volume_write(struct file * file, const char * buf,
                size_t count, loff_t *ppos);
 static ssize_t ppc_rtas_tone_volume_read(struct file * file, char * buf,
                size_t count, loff_t *ppos);
-static ssize_t ppc_rtas_rmo_buf_read(struct file *file, char *buf,
-                                   size_t count, loff_t *ppos);
 
 struct file_operations ppc_rtas_poweron_operations = {
        .read =         ppc_rtas_poweron_read,
@@ -189,10 +185,6 @@ struct file_operations ppc_rtas_tone_volume_operations = {
        .write =        ppc_rtas_tone_volume_write
 };
 
-static struct file_operations ppc_rtas_rmo_buf_ops = {
-       .read =         ppc_rtas_rmo_buf_read,
-};
-
 int ppc_rtas_find_all_sensors (void);
 int ppc_rtas_process_sensor(struct individual_sensor s, int state, 
                int error, char * buf);
@@ -208,42 +200,39 @@ void proc_rtas_init(void)
 {
        struct proc_dir_entry *entry;
 
-       rtas_node = of_find_node_by_name(NULL, "rtas");
+       rtas_node = find_devices("rtas");
        if ((rtas_node == NULL) || (systemcfg->platform == PLATFORM_ISERIES_LPAR)) {
                return;
        }
        
-       if (proc_ppc64.rtas == NULL) {
-               proc_ppc64_init();
+       if (proc_rtas == NULL) {
+               proc_rtas = proc_mkdir("rtas", 0);
        }
 
-       if (proc_ppc64.rtas == NULL) {
+       if (proc_rtas == NULL) {
                printk(KERN_ERR "Failed to create /proc/rtas in proc_rtas_init\n");
                return;
        }
 
        /* /proc/rtas entries */
 
-       entry = create_proc_entry("progress", S_IRUGO|S_IWUSR, proc_ppc64.rtas);
+       entry = create_proc_entry("progress", S_IRUGO|S_IWUSR, proc_rtas);
        if (entry) entry->proc_fops = &ppc_rtas_progress_operations;
 
-       entry = create_proc_entry("clock", S_IRUGO|S_IWUSR, proc_ppc64.rtas); 
+       entry = create_proc_entry("clock", S_IRUGO|S_IWUSR, proc_rtas); 
        if (entry) entry->proc_fops = &ppc_rtas_clock_operations;
 
-       entry = create_proc_entry("poweron", S_IWUSR|S_IRUGO, proc_ppc64.rtas); 
+       entry = create_proc_entry("poweron", S_IWUSR|S_IRUGO, proc_rtas); 
        if (entry) entry->proc_fops = &ppc_rtas_poweron_operations;
 
-       create_proc_read_entry("sensors", S_IRUGO, proc_ppc64.rtas, 
+       create_proc_read_entry("sensors", S_IRUGO, proc_rtas, 
                        ppc_rtas_sensor_read, NULL);
        
-       entry = create_proc_entry("frequency", S_IWUSR|S_IRUGO, proc_ppc64.rtas); 
+       entry = create_proc_entry("frequency", S_IWUSR|S_IRUGO, proc_rtas); 
        if (entry) entry->proc_fops = &ppc_rtas_tone_freq_operations;
 
-       entry = create_proc_entry("volume", S_IWUSR|S_IRUGO, proc_ppc64.rtas); 
+       entry = create_proc_entry("volume", S_IWUSR|S_IRUGO, proc_rtas); 
        if (entry) entry->proc_fops = &ppc_rtas_tone_volume_operations;
-
-       entry = create_proc_entry("rmo_buffer", S_IRUSR, proc_ppc64.rtas);
-       if (entry) entry->proc_fops = &ppc_rtas_rmo_buf_ops;
 }
 
 /* ****************************************************************** */
@@ -252,18 +241,12 @@ void proc_rtas_init(void)
 static ssize_t ppc_rtas_poweron_write(struct file * file, const char * buf,
                size_t count, loff_t *ppos)
 {
-       char stkbuf[40];  /* its small, its on stack */
        struct rtc_time tm;
        unsigned long nowtime;
        char *dest;
        int error;
 
-       if (39 < count) count = 39;
-       if (copy_from_user (stkbuf, buf, count)) {
-               return -EFAULT;
-       }
-       stkbuf[count] = 0;
-       nowtime = simple_strtoul(stkbuf, &dest, 10);
+       nowtime = simple_strtoul(buf, &dest, 10);
        if (*dest != '\0' && *dest != '\n') {
                printk("ppc_rtas_poweron_write: Invalid time\n");
                return count;
@@ -284,23 +267,18 @@ static ssize_t ppc_rtas_poweron_write(struct file * file, const char * buf,
 static ssize_t ppc_rtas_poweron_read(struct file * file, char * buf,
                size_t count, loff_t *ppos)
 {
-       char stkbuf[40];  /* its small, its on stack */
        int n;
        if (power_on_time == 0)
-               n = snprintf(stkbuf, 40, "Power on time not set\n");
+               n = sprintf(buf, "Power on time not set\n");
        else
-               n = snprintf(stkbuf, 40, "%lu\n", power_on_time);
+               n = sprintf(buf, "%lu\n", power_on_time);
 
-       int sn = strlen (stkbuf) +1;
-       if (*ppos >= sn)
+       if (*ppos >= strlen(buf))
                return 0;
-       if (n > sn - *ppos)
-               n = sn - *ppos;
+       if (n > strlen(buf) - *ppos)
+               n = strlen(buf) - *ppos;
        if (n > count)
                n = count;
-       if (copy_to_user (buf, stkbuf + (*ppos), n)) {
-               return -EFAULT;
-       }
        *ppos += n;
        return n;
 }
@@ -313,16 +291,11 @@ static ssize_t ppc_rtas_progress_write(struct file * file, const char * buf,
 {
        unsigned long hex;
 
-       if (count >= MAX_LINELENGTH) count = MAX_LINELENGTH -1;
-       if (copy_from_user (progress_led, buf, count)) { /* save the string */
-               return -EFAULT;
-       }
-       progress_led[count] = 0;
-
+       strcpy(progress_led, buf); /* save the string */
        /* Lets see if the user passed hexdigits */
-       hex = simple_strtoul(progress_led, NULL, 10);
-
-       ppc_md.progress ((char *)progress_led, hex);
+       hex = simple_strtoul(buf, NULL, 10);
+       
+       ppc_md.progress ((char *)buf, hex);
        return count;
 
        /* clear the line */ /* ppc_md.progress("                   ", 0xffff);*/
@@ -332,30 +305,14 @@ static ssize_t ppc_rtas_progress_read(struct file * file, char * buf,
                size_t count, loff_t *ppos)
 {
        int n = 0;
-       
-       if (progress_led == NULL) return 0;
-
-       char * tmpbuf = kmalloc (MAX_LINELENGTH, GFP_KERNEL);
-       if (!tmpbuf) {
-               printk(KERN_ERR "error: kmalloc failed\n");
-               return -ENOMEM;
-       }
-       n = sprintf (tmpbuf, "%s\n", progress_led);
-
-       int sn = strlen (tmpbuf) +1;
-       if (*ppos >= sn) {
-               kfree (tmpbuf);
+       if (progress_led != NULL)
+               n = sprintf (buf, "%s\n", progress_led);
+       if (*ppos >= strlen(buf))
                return 0;
-       }
-       if (n > sn - *ppos)
-               n = sn - *ppos;
+       if (n > strlen(buf) - *ppos)
+               n = strlen(buf) - *ppos;
        if (n > count)
                n = count;
-       if (copy_to_user (buf, tmpbuf + (*ppos), n)) {
-               kfree (tmpbuf);
-               return -EFAULT;
-       }
-       kfree (tmpbuf);
        *ppos += n;
        return n;
 }
@@ -366,18 +323,12 @@ static ssize_t ppc_rtas_progress_read(struct file * file, char * buf,
 static ssize_t ppc_rtas_clock_write(struct file * file, const char * buf, 
                size_t count, loff_t *ppos)
 {
-       char stkbuf[40];  /* its small, its on stack */
        struct rtc_time tm;
        unsigned long nowtime;
        char *dest;
        int error;
 
-       if (39 < count) count = 39;
-       if (copy_from_user (stkbuf, buf, count)) {
-               return -EFAULT;
-       }
-       stkbuf[count] = 0;
-       nowtime = simple_strtoul(stkbuf, &dest, 10);
+       nowtime = simple_strtoul(buf, &dest, 10);
        if (*dest != '\0' && *dest != '\n') {
                printk("ppc_rtas_clock_write: Invalid time\n");
                return count;
@@ -405,27 +356,21 @@ static ssize_t ppc_rtas_clock_read(struct file * file, char * buf,
        year = ret[0]; mon  = ret[1]; day  = ret[2];
        hour = ret[3]; min  = ret[4]; sec  = ret[5];
 
-       char stkbuf[40];  /* its small, its on stack */
-
        if (error != 0){
                printk(KERN_WARNING "error: reading the clock returned: %s\n", 
                                ppc_rtas_process_error(error));
-               n = snprintf (stkbuf, 40, "0");
+               n = sprintf (buf, "0");
        } else { 
-               n = snprintf (stkbuf, 40, "%lu\n", mktime(year, mon, day, hour, min, sec));
+               n = sprintf (buf, "%lu\n", mktime(year, mon, day, hour, min, sec));
        }
        kfree(ret);
 
-       int sn = strlen (stkbuf) +1;
-       if (*ppos >= sn)
+       if (*ppos >= strlen(buf))
                return 0;
-       if (n > sn - *ppos)
-               n = sn - *ppos;
+       if (n > strlen(buf) - *ppos)
+               n = strlen(buf) - *ppos;
        if (n > count)
                n = count;
-       if (copy_to_user (buf, stkbuf + (*ppos), n)) {
-               return -EFAULT;
-       }
        *ppos += n;
        return n;
 }
@@ -819,7 +764,7 @@ int get_location_code(struct individual_sensor s, char * buffer)
                n += check_location_string(ret, buffer + n);
                n += sprintf ( buffer+n, " ");
                /* see how many characters we have printed */
-               snprintf ( t, 50, "%s ", ret);
+               sprintf ( t, "%s ", ret);
 
                pos += strlen(t);
                if (pos >= llen) pos=0;
@@ -832,17 +777,10 @@ int get_location_code(struct individual_sensor s, char * buffer)
 static ssize_t ppc_rtas_tone_freq_write(struct file * file, const char * buf,
                size_t count, loff_t *ppos)
 {
-       char stkbuf[40];  /* its small, its on stack */
        unsigned long freq;
        char *dest;
        int error;
-
-       if (39 < count) count = 39;
-       if (copy_from_user (stkbuf, buf, count)) {
-               return -EFAULT;
-       }
-       stkbuf[count] = 0;
-       freq = simple_strtoul(stkbuf, &dest, 10);
+       freq = simple_strtoul(buf, &dest, 10);
        if (*dest != '\0' && *dest != '\n') {
                printk("ppc_rtas_tone_freq_write: Invalid tone freqency\n");
                return count;
@@ -861,19 +799,14 @@ static ssize_t ppc_rtas_tone_freq_read(struct file * file, char * buf,
                size_t count, loff_t *ppos)
 {
        int n;
-       char stkbuf[40];  /* its small, its on stack */
-       n = snprintf(stkbuf, 40, "%lu\n", rtas_tone_frequency);
+       n = sprintf(buf, "%lu\n", rtas_tone_frequency);
 
-       int sn = strlen (stkbuf) +1;
-       if (*ppos >= sn)
+       if (*ppos >= strlen(buf))
                return 0;
-       if (n > sn - *ppos)
-               n = sn - *ppos;
+       if (n > strlen(buf) - *ppos)
+               n = strlen(buf) - *ppos;
        if (n > count)
                n = count;
-       if (copy_to_user (buf, stkbuf + (*ppos), n)) {
-               return -EFAULT;
-       }
        *ppos += n;
        return n;
 }
@@ -883,17 +816,10 @@ static ssize_t ppc_rtas_tone_freq_read(struct file * file, char * buf,
 static ssize_t ppc_rtas_tone_volume_write(struct file * file, const char * buf,
                size_t count, loff_t *ppos)
 {
-       char stkbuf[40];  /* its small, its on stack */
        unsigned long volume;
        char *dest;
        int error;
-
-       if (39 < count) count = 39;
-       if (copy_from_user (stkbuf, buf, count)) {
-               return -EFAULT;
-       }
-       stkbuf[count] = 0;
-       volume = simple_strtoul(stkbuf, &dest, 10);
+       volume = simple_strtoul(buf, &dest, 10);
        if (*dest != '\0' && *dest != '\n') {
                printk("ppc_rtas_tone_volume_write: Invalid tone volume\n");
                return count;
@@ -914,44 +840,14 @@ static ssize_t ppc_rtas_tone_volume_read(struct file * file, char * buf,
                size_t count, loff_t *ppos)
 {
        int n;
-       char stkbuf[40];  /* its small, its on stack */
-       n = snprintf(stkbuf, 40, "%lu\n", rtas_tone_volume);
+       n = sprintf(buf, "%lu\n", rtas_tone_volume);
 
-       int sn = strlen (stkbuf) +1;
-       if (*ppos >= sn)
+       if (*ppos >= strlen(buf))
                return 0;
-       if (n > sn - *ppos)
-               n = sn - *ppos;
+       if (n > strlen(buf) - *ppos)
+               n = strlen(buf) - *ppos;
        if (n > count)
                n = count;
-       if (copy_to_user (buf, stkbuf + (*ppos), n)) {
-               return -EFAULT;
-       }
        *ppos += n;
        return n;
 }
-
-#define RMO_READ_BUF_MAX 30
-
-/* RTAS Userspace access */
-static ssize_t ppc_rtas_rmo_buf_read(struct file *file, char __user *buf,
-                                   size_t count, loff_t *ppos)
-{
-       char kbuf[RMO_READ_BUF_MAX];
-       int n;
-
-       n = sprintf(kbuf, "%016lx %x\n", rtas_rmo_buf, RTAS_RMOBUF_MAX);
-       if (n > count)
-               n = count;
-
-       if (ppos && *ppos != 0)
-               return 0;
-
-       if (copy_to_user(buf, kbuf, n))
-               return -EFAULT;
-
-       if (ppos)
-               *ppos = n;
-       
-       return n;
-}
index 58fb2ad..d6e50eb 100644 (file)
@@ -16,7 +16,6 @@
 #include <linux/types.h>
 #include <linux/spinlock.h>
 #include <linux/module.h>
-#include <linux/init.h>
 
 #include <asm/prom.h>
 #include <asm/proc_fs.h>
@@ -29,8 +28,6 @@
 #include <asm/system.h>
 #include <asm/abs_addr.h>
 #include <asm/udbg.h>
-#include <asm/delay.h>
-#include <asm/uaccess.h>
 
 struct flash_block_list_header rtas_firmware_flash_list = {0, 0};
 
@@ -62,7 +59,7 @@ struct rtas_t rtas = {
 extern unsigned long reloc_offset(void);
 
 spinlock_t rtas_data_buf_lock = SPIN_LOCK_UNLOCKED;
-char rtas_data_buf[RTAS_DATA_BUF_SIZE]__page_aligned;
+char rtas_data_buf[RTAS_DATA_BUF_SIZE];
 
 void
 phys_call_rtas(int token, int nargs, int nret, ...)
@@ -183,18 +180,18 @@ rtas_call(int token, int nargs, int nret,
 }
 
 /* Given an RTAS status code of 990n compute the hinted delay of 10^n
- * (last digit) milliseconds.  For now we bound at n=5 (100 sec).
+ * (last digit) milliseconds.  For now we bound at n=3 (1 sec).
  */
 unsigned int
 rtas_extended_busy_delay_time(int status)
 {
        int order = status - 9900;
-       unsigned long ms;
+       unsigned int ms;
 
        if (order < 0)
                order = 0;      /* RTC depends on this for -2 clock busy */
-       else if (order > 5)
-               order = 5;      /* bound */
+       else if (order > 3)
+               order = 3;      /* bound */
 
        /* Use microseconds for reasonable accuracy */
        for (ms = 1000; order > 0; order--)
@@ -202,80 +199,6 @@ rtas_extended_busy_delay_time(int status)
        return ms / (1000000/HZ); /* round down is fine */
 }
 
-int
-rtas_get_power_level(int powerdomain, int *level)
-{
-       int token = rtas_token("get-power-level");
-       long powerlevel;
-       int rc;
-
-       if (token == RTAS_UNKNOWN_SERVICE)
-               return RTAS_UNKNOWN_OP;
-
-       while(1) {
-               rc = (int) rtas_call(token, 1, 2, &powerlevel, powerdomain);
-               if (rc == RTAS_BUSY)
-                       udelay(1);
-               else
-                       break;
-       }
-       *level = (int) powerlevel;
-       return rc;
-}
-
-int
-rtas_get_sensor(int sensor, int index, int *state)
-{
-       int token = rtas_token("get-sensor-state");
-       unsigned int wait_time;
-       long returned_state;
-       int rc;
-
-       if (token == RTAS_UNKNOWN_SERVICE)
-               return RTAS_UNKNOWN_OP;
-
-       while (1) {
-               rc = (int) rtas_call(token, 2, 2, &returned_state, sensor,
-                                       index);
-               if (rc == RTAS_BUSY)
-                       udelay(1);
-               else if (rtas_is_extended_busy(rc)) {
-                       wait_time = rtas_extended_busy_delay_time(rc);
-                       udelay(wait_time * 1000);
-               }
-               else
-                       break;
-       }
-       *state = (int) returned_state;
-       return rc;
-}
-
-int
-rtas_set_indicator(int indicator, int index, int new_value)
-{
-       int token = rtas_token("set-indicator");
-       unsigned int wait_time;
-       int rc;
-
-       if (token == RTAS_UNKNOWN_SERVICE)
-               return RTAS_UNKNOWN_OP;
-
-       while (1) {
-               rc = (int) rtas_call(token, 3, 1, NULL, indicator, index,
-                                       new_value);
-               if (rc == RTAS_BUSY)
-                       udelay(1);
-               else if (rtas_is_extended_busy(rc)) {
-                       wait_time = rtas_extended_busy_delay_time(rc);
-                       udelay(wait_time * 1000);
-               }
-               else
-                       break;
-       }
-
-       return rc;
-}
-
 #define FLASH_BLOCK_LIST_VERSION (1UL)
 static void
 rtas_flash_firmware(void)
@@ -385,51 +308,9 @@ rtas_halt(void)
         rtas_power_off();
 }
 
-unsigned long rtas_rmo_buf = 0;
-
-asmlinkage int ppc_rtas(struct rtas_args __user *uargs)
-{
-       struct rtas_args args;
-       unsigned long flags;
-
-       if (!capable(CAP_SYS_ADMIN))
-               return -EPERM;
-
-       if (copy_from_user(&args, uargs, 3 * sizeof(u32)) != 0)
-               return -EFAULT;
-
-       if (args.nargs > ARRAY_SIZE(args.args)
-           || args.nret > ARRAY_SIZE(args.args)
-           || args.nargs + args.nret > ARRAY_SIZE(args.args))
-               return -EINVAL;
-
-       /* Copy in args. */
-       if (copy_from_user(args.args, uargs->args,
-                          args.nargs * sizeof(rtas_arg_t)) != 0)
-               return -EFAULT;
-
-       spin_lock_irqsave(&rtas.lock, flags);
-       get_paca()->xRtas = args;
-       enter_rtas((void *)__pa((unsigned long)&get_paca()->xRtas));
-       args = get_paca()->xRtas;
-       spin_unlock_irqrestore(&rtas.lock, flags);
-
-       /* Copy out args. */
-       if (copy_to_user(uargs->args + args.nargs,
-                        args.args + args.nargs,
-                        args.nret * sizeof(rtas_arg_t)) != 0)
-               return -EFAULT;
-
-       return 0;
-}
-
-
+EXPORT_SYMBOL(proc_ppc64);
 EXPORT_SYMBOL(rtas_firmware_flash_list);
 EXPORT_SYMBOL(rtas_token);
 EXPORT_SYMBOL(rtas_call);
 EXPORT_SYMBOL(rtas_data_buf);
 EXPORT_SYMBOL(rtas_data_buf_lock);
-EXPORT_SYMBOL(rtas_extended_busy_delay_time);
-EXPORT_SYMBOL(rtas_get_sensor);
-EXPORT_SYMBOL(rtas_get_power_level);
-EXPORT_SYMBOL(rtas_set_indicator);
index 25bd5da..636fee6 100644 (file)
  */
 
 #include <linux/module.h>
-
-#include <linux/config.h>
+#include <linux/proc_fs.h>
 #include <linux/init.h>
-#include <asm/proc_fs.h>
-#include <asm/delay.h>
 #include <asm/uaccess.h>
 #include <asm/rtas.h>
 
 #define MODULE_VERSION "1.0"
 #define MODULE_NAME "rtas_flash"
 
-#define FIRMWARE_FLASH_NAME "firmware_flash"   
-#define FIRMWARE_UPDATE_NAME "firmware_update"
-#define MANAGE_FLASH_NAME "manage_flash"
-#define VALIDATE_FLASH_NAME "validate_flash"
-
-/* General RTAS Status Codes */
-#define RTAS_RC_SUCCESS  0
-#define RTAS_RC_HW_ERR -1
-#define RTAS_RC_BUSY   -2
-
-/* Flash image status values */
-#define FLASH_AUTH           -9002 /* RTAS Not Service Authority Partition */
-#define FLASH_NO_OP          -1099 /* No operation initiated by user */        
-#define FLASH_IMG_SHORT             -1005 /* Flash image shorter than expected */
-#define FLASH_IMG_BAD_LEN    -1004 /* Bad length value in flash list block */
-#define FLASH_IMG_NULL_DATA  -1003 /* Bad data value in flash list block */
-#define FLASH_IMG_READY      0     /* Firmware img ready for flash on reboot */
-
-/* Manage image status values */
-#define MANAGE_AUTH          -9002 /* RTAS Not Service Authority Partition */
-#define MANAGE_ACTIVE_ERR    -9001 /* RTAS Cannot Overwrite Active Img */
-#define MANAGE_NO_OP         -1099 /* No operation initiated by user */
-#define MANAGE_PARAM_ERR     -3    /* RTAS Parameter Error */
-#define MANAGE_HW_ERR        -1    /* RTAS Hardware Error */
-
-/* Validate image status values */
-#define VALIDATE_AUTH          -9002 /* RTAS Not Service Authority Partition */
-#define VALIDATE_NO_OP         -1099 /* No operation initiated by the user */
-#define VALIDATE_INCOMPLETE    -1002 /* User copied < VALIDATE_BUF_SIZE */
-#define VALIDATE_READY        -1001 /* Firmware image ready for validation */
-#define VALIDATE_PARAM_ERR     -3    /* RTAS Parameter Error */
-#define VALIDATE_HW_ERR        -1    /* RTAS Hardware Error */
-#define VALIDATE_TMP_UPDATE    0     /* Validate Return Status */
-#define VALIDATE_FLASH_AUTH    1     /* Validate Return Status */
-#define VALIDATE_INVALID_IMG   2     /* Validate Return Status */
-#define VALIDATE_CUR_UNKNOWN   3     /* Validate Return Status */
-#define VALIDATE_TMP_COMMIT_DL 4     /* Validate Return Status */
-#define VALIDATE_TMP_COMMIT    5     /* Validate Return Status */
-#define VALIDATE_TMP_UPDATE_DL 6     /* Validate Return Status */
-
-/* ibm,manage-flash-image operation tokens */
-#define RTAS_REJECT_TMP_IMG   0
-#define RTAS_COMMIT_TMP_IMG   1
-
-/* Array sizes */
-#define VALIDATE_BUF_SIZE 4096    
-#define RTAS_MSG_MAXLEN   64
+#define FIRMWARE_FLASH_NAME "firmware_flash"
 
 /* Local copy of the flash block list.
  * We only allow one open of the flash proc file and create this
  * is treated as the number of entries currently in the block
  * (i.e. not a byte count).  This is all fixed on release.
  */
+static struct flash_block_list *flist;
+static char *flash_msg;
+static int flash_possible;
 
-/* Status int must be first member of struct */
-struct rtas_update_flash_t
-{
-       int status;                     /* Flash update status */
-       struct flash_block_list *flist; /* Local copy of flash block list */
-};
-
-/* Status int must be first member of struct */
-struct rtas_manage_flash_t
-{
-       int status;                     /* Returned status */
-       unsigned int op;                /* Reject or commit image */
-};
-
-/* Status int must be first member of struct */
-struct rtas_validate_flash_t
+static int rtas_flash_open(struct inode *inode, struct file *file)
 {
-       int status;                     /* Returned status */   
-       char buf[VALIDATE_BUF_SIZE];    /* Candidate image buffer */
-       unsigned int buf_size;          /* Size of image buf */
-       unsigned int update_results;    /* Update results token */
-};
-
-static spinlock_t flash_file_open_lock = SPIN_LOCK_UNLOCKED;
-static struct proc_dir_entry *firmware_flash_pde = NULL;
-static struct proc_dir_entry *firmware_update_pde = NULL;
-static struct proc_dir_entry *validate_pde = NULL;
-static struct proc_dir_entry *manage_pde = NULL;
+       if ((file->f_mode & FMODE_WRITE) && flash_possible) {
+               if (flist)
+                       return -EBUSY;
+               flist = (struct flash_block_list *)get_zeroed_page(GFP_KERNEL);
+               if (!flist)
+                       return -ENOMEM;
+       }
+       return 0;
+}
 
 /* Do simple sanity checks on the flash image. */
 static int flash_list_valid(struct flash_block_list *flist)
@@ -120,29 +57,32 @@ static int flash_list_valid(struct flash_block_list *flist)
        int i;
        unsigned long block_size, image_size;
 
+       flash_msg = NULL;
        /* Paranoid self test here.  We also collect the image size. */
        image_size = 0;
        for (f = flist; f; f = f->next) {
                for (i = 0; i < f->num_blocks; i++) {
                        if (f->blocks[i].data == NULL) {
-                               return FLASH_IMG_NULL_DATA;
+                               flash_msg = "error: internal error null data\n";
+                               return 0;
                        }
                        block_size = f->blocks[i].length;
                        if (block_size <= 0 || block_size > PAGE_SIZE) {
-                               return FLASH_IMG_BAD_LEN;
+                               flash_msg = "error: internal error bad length\n";
+                               return 0;
                        }
                        image_size += block_size;
                }
        }
-
        if (image_size < (256 << 10)) {
-               if (image_size < 2) 
-                       return FLASH_NO_OP;
+               if (image_size < 2)
+                       flash_msg = NULL;       /* allow "clear" of image */
+               else
+                       flash_msg = "error: flash image short\n";
+               return 0;
        }
-
        printk(KERN_INFO "FLASH: flash image with %ld bytes stored for hardware flash on reboot\n", image_size);
-
-       return FLASH_IMG_READY;
+       return 1;
 }
 
 static void free_flash_list(struct flash_block_list *f)
@@ -161,80 +101,40 @@ static void free_flash_list(struct flash_block_list *f)
 
 static int rtas_flash_release(struct inode *inode, struct file *file)
 {
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
-       struct rtas_update_flash_t *uf;
-       
-       uf = (struct rtas_update_flash_t *) dp->data;
-       if (uf->flist) {    
-               /* File was opened in write mode for a new flash attempt */
-               /* Clear saved list */
+       if (flist) {
+               /* Always clear saved list on a new attempt. */
                if (rtas_firmware_flash_list.next) {
                        free_flash_list(rtas_firmware_flash_list.next);
                        rtas_firmware_flash_list.next = NULL;
                }
 
-               if (uf->status != FLASH_AUTH)  
-                       uf->status = flash_list_valid(uf->flist);
-
-               if (uf->status == FLASH_IMG_READY) 
-                       rtas_firmware_flash_list.next = uf->flist;
+               if (flash_list_valid(flist))
+                       rtas_firmware_flash_list.next = flist;
                else
-                       free_flash_list(uf->flist);
-
-               uf->flist = NULL;
+                       free_flash_list(flist);
+               flist = NULL;
        }
-
-       atomic_dec(&dp->count);
        return 0;
 }
 
-static void get_flash_status_msg(int status, char *buf)
-{
-       char *msg;
-
-       switch (status) {
-       case FLASH_AUTH:
-               msg = "error: this partition does not have service authority\n";
-               break;
-       case FLASH_NO_OP:
-               msg = "info: no firmware image for flash\n";
-               break;
-       case FLASH_IMG_SHORT:
-               msg = "error: flash image short\n";
-               break;
-       case FLASH_IMG_BAD_LEN:
-               msg = "error: internal error bad length\n";
-               break;
-       case FLASH_IMG_NULL_DATA:
-               msg = "error: internal error null data\n";
-               break;
-       case FLASH_IMG_READY:
-               msg = "ready: firmware image ready for flash on reboot\n";
-               break;
-       default:
-               sprintf(buf, "error: unexpected status value %d\n", status);
-               return;
-       }
-
-       strcpy(buf, msg);       
-}
-
 /* Reading the proc file will show status (not the firmware contents) */
 static ssize_t rtas_flash_read(struct file *file, char *buf,
                               size_t count, loff_t *ppos)
 {
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
-       struct rtas_update_flash_t *uf;
-       char msg[RTAS_MSG_MAXLEN];
        int error;
+       char *msg;
        int msglen;
 
-       uf = (struct rtas_update_flash_t *) dp->data;
-
-       if (!strcmp(dp->name, FIRMWARE_FLASH_NAME)) {
-               get_flash_status_msg(uf->status, msg);
-       } else {           /* FIRMWARE_UPDATE_NAME */
-               sprintf(msg, "%d\n", uf->status);
+       if (!flash_possible) {
+               msg = "error: this partition does not have service authority\n";
+       } else if (flist) {
+               msg = "info: this file is busy for write by some process\n";
+       } else if (flash_msg) {
+               msg = flash_msg;        /* message from last flash attempt */
+       } else if (rtas_firmware_flash_list.next) {
+               msg = "ready: firmware image ready for flash on reboot\n";
+       } else {
+               msg = "info: no firmware image for flash\n";
        }
        msglen = strlen(msg);
        if (msglen > count)
@@ -247,8 +147,7 @@ static ssize_t rtas_flash_read(struct file *file, char *buf,
        if (error)
                return -EINVAL;
 
-       if (copy_to_user(buf, msg, msglen))
-               return -EFAULT;
+       copy_to_user(buf, msg, msglen);
 
        if (ppos)
                *ppos = msglen;
@@ -263,28 +162,14 @@ static ssize_t rtas_flash_read(struct file *file, char *buf,
 static ssize_t rtas_flash_write(struct file *file, const char *buffer,
                                size_t count, loff_t *off)
 {
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
-       struct rtas_update_flash_t *uf;
+       size_t len = count;
        char *p;
        int next_free;
-       struct flash_block_list *fl;
-
-       uf = (struct rtas_update_flash_t *) dp->data;
+       struct flash_block_list *fl = flist;
 
-       if (uf->status == FLASH_AUTH || count == 0)
-               return count;   /* discard data */
-
-       /* In the case that the image is not ready for flashing, the memory
-        * allocated for the block list will be freed upon the release of the 
-        * proc file
-        */
-       if (uf->flist == NULL) {
-               uf->flist = (struct flash_block_list *) get_zeroed_page(GFP_KERNEL);
-               if (!uf->flist)
-                       return -ENOMEM;
-       }
+       if (!flash_possible || len == 0)
+               return len;     /* discard data */
 
-       fl = uf->flist;
        while (fl->next)
                fl = fl->next; /* seek to last block_list for append */
        next_free = fl->num_blocks;
@@ -297,392 +182,47 @@ static ssize_t rtas_flash_write(struct file *file, const char *buffer,
                next_free = 0;
        }
 
-       if (count > PAGE_SIZE)
-               count = PAGE_SIZE;
+       if (len > PAGE_SIZE)
+               len = PAGE_SIZE;
        p = (char *)get_zeroed_page(GFP_KERNEL);
        if (!p)
                return -ENOMEM;
-       
-       if(copy_from_user(p, buffer, count)) {
+       if(copy_from_user(p, buffer, len)) {
                free_page((unsigned long)p);
                return -EFAULT;
        }
        fl->blocks[next_free].data = p;
-       fl->blocks[next_free].length = count;
+       fl->blocks[next_free].length = len;
        fl->num_blocks++;
 
-       return count;
-}
-
-static int rtas_excl_open(struct inode *inode, struct file *file)
-{
-       struct proc_dir_entry *dp = PDE(inode);
-
-       /* Enforce exclusive open with use count of PDE */
-       spin_lock(&flash_file_open_lock);
-       if (atomic_read(&dp->count) > 1) {
-               spin_unlock(&flash_file_open_lock);
-               return -EBUSY;
-       }
-
-       atomic_inc(&dp->count);
-       spin_unlock(&flash_file_open_lock);
-       
-       return 0;
-}
-
-static int rtas_excl_release(struct inode *inode, struct file *file)
-{
-       struct proc_dir_entry *dp = PDE(inode);
-
-       atomic_dec(&dp->count);
-
-       return 0;
-}
-
-static void manage_flash(struct rtas_manage_flash_t *args_buf)
-{
-       unsigned int wait_time;
-       s32 rc;
-
-       while (1) {
-               rc = (s32) rtas_call(rtas_token("ibm,manage-flash-image"), 1, 
-                               1, NULL, (long) args_buf->op);
-               if (rc == RTAS_RC_BUSY)
-                       udelay(1);
-               else if (rtas_is_extended_busy(rc)) {
-                       wait_time = rtas_extended_busy_delay_time(rc);
-                       udelay(wait_time * 1000);
-               } else
-                       break;
-       }
-
-       args_buf->status = rc;
-}
-
-static ssize_t manage_flash_read(struct file *file, char *buf,
-                              size_t count, loff_t *ppos)
-{
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
-       struct rtas_manage_flash_t *args_buf;
-       char msg[RTAS_MSG_MAXLEN];
-       int msglen;
-       int error;
-
-       args_buf = (struct rtas_manage_flash_t *) dp->data;
-       if (args_buf == NULL)
-               return 0;
-
-       msglen = sprintf(msg, "%d\n", args_buf->status);
-       if (msglen > count)
-               msglen = count;
-
-       if (ppos && *ppos != 0)
-               return 0;       /* be cheap */
-
-       error = verify_area(VERIFY_WRITE, buf, msglen);
-       if (error)
-               return -EINVAL;
-
-       if (copy_to_user(buf, msg, msglen))
-               return -EFAULT;
-
-       if (ppos)
-               *ppos = msglen;
-       return msglen;
-}
-
-static ssize_t manage_flash_write(struct file *file, const char *buf,
-                               size_t count, loff_t *off)
-{
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
-       struct rtas_manage_flash_t *args_buf;
-       const char reject_str[] = "0";
-       const char commit_str[] = "1";
-       char stkbuf[10];
-       int op;
-
-       args_buf = (struct rtas_manage_flash_t *) dp->data;
-       if ((args_buf->status == MANAGE_AUTH) || (count == 0))
-               return count;
-               
-       op = -1;
-       if (buf) {
-               if (count > 9) count = 9;
-               if (copy_from_user (stkbuf, buf, count)) {
-                       return -EFAULT;
-               }
-               if (strncmp(stkbuf, reject_str, strlen(reject_str)) == 0) 
-                       op = RTAS_REJECT_TMP_IMG;
-               else if (strncmp(stkbuf, commit_str, strlen(commit_str)) == 0) 
-                       op = RTAS_COMMIT_TMP_IMG;
-       }
-       
-       if (op == -1)   /* buf is empty, or contains invalid string */
-               return -EINVAL;
-
-       args_buf->op = op;
-       manage_flash(args_buf);
-
-       return count;
-}
-
-static void validate_flash(struct rtas_validate_flash_t *args_buf)
-{
-       int token = rtas_token("ibm,validate-flash-image");
-       unsigned int wait_time;
-       long update_results;
-       s32 rc; 
-
-       rc = 0;
-       while(1) {
-               spin_lock(&rtas_data_buf_lock);
-               memcpy(rtas_data_buf, args_buf->buf, VALIDATE_BUF_SIZE);
-               rc = (s32) rtas_call(token, 2, 2, &update_results, 
-                                    __pa(rtas_data_buf), args_buf->buf_size);
-               memcpy(args_buf->buf, rtas_data_buf, VALIDATE_BUF_SIZE);
-               spin_unlock(&rtas_data_buf_lock);
-                       
-               if (rc == RTAS_RC_BUSY)
-                       udelay(1);
-               else if (rtas_is_extended_busy(rc)) {
-                       wait_time = rtas_extended_busy_delay_time(rc);
-                       udelay(wait_time * 1000);
-               } else
-                       break;
-       }
-
-       args_buf->status = rc;
-       args_buf->update_results = (u32) update_results;
-}
-
-static int get_validate_flash_msg(struct rtas_validate_flash_t *args_buf, 
-                                  char *msg)
-{
-       int n;
-
-       if (args_buf->status >= VALIDATE_TMP_UPDATE) { 
-               n = sprintf(msg, "%d\n", args_buf->update_results);
-               if ((args_buf->update_results >= VALIDATE_CUR_UNKNOWN) ||
-                   (args_buf->update_results == VALIDATE_TMP_UPDATE))
-                       n += sprintf(msg + n, "%s\n", args_buf->buf);
-       } else {
-               n = sprintf(msg, "%d\n", args_buf->status);
-       }
-       return n;
-}
-
-static ssize_t validate_flash_read(struct file *file, char *buf,
-                              size_t count, loff_t *ppos)
-{
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
-       struct rtas_validate_flash_t *args_buf;
-       char msg[RTAS_MSG_MAXLEN];
-       int msglen;
-       int error;
-
-       args_buf = (struct rtas_validate_flash_t *) dp->data;
-
-       if (ppos && *ppos != 0)
-               return 0;       /* be cheap */
-       
-       msglen = get_validate_flash_msg(args_buf, msg);
-       if (msglen > count)
-               msglen = count;
-
-       error = verify_area(VERIFY_WRITE, buf, msglen);
-       if (error)
-               return -EINVAL;
-
-       if (copy_to_user(buf, msg, msglen))
-               return -EFAULT;
-
-       if (ppos)
-               *ppos = msglen;
-       return msglen;
-}
-
-static ssize_t validate_flash_write(struct file *file, const char *buf,
-                               size_t count, loff_t *off)
-{
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
-       struct rtas_validate_flash_t *args_buf;
-       int rc;
-
-       args_buf = (struct rtas_validate_flash_t *) dp->data;
-
-       if (dp->data == NULL) {
-               dp->data = kmalloc(sizeof(struct rtas_validate_flash_t), 
-                               GFP_KERNEL);
-               if (dp->data == NULL) 
-                       return -ENOMEM;
-       }
-
-       /* We are only interested in the first 4K of the
-        * candidate image */
-       if ((*off >= VALIDATE_BUF_SIZE) || 
-               (args_buf->status == VALIDATE_AUTH)) {
-               *off += count;
-               return count;
-       }
-
-       if (*off + count >= VALIDATE_BUF_SIZE)  {
-               count = VALIDATE_BUF_SIZE - *off;
-               args_buf->status = VALIDATE_READY;      
-       } else {
-               args_buf->status = VALIDATE_INCOMPLETE;
-       }
-
-       if (verify_area(VERIFY_READ, buf, count)) {
-               rc = -EFAULT;
-               goto done;
-       }
-       if (copy_from_user(args_buf->buf + *off, buf, count)) {
-               rc = -EFAULT;
-               goto done;
-       }
-
-       *off += count;
-       rc = count;
-done:
-       if (rc < 0) {
-               kfree(dp->data);
-               dp->data = NULL;
-       }
-       return rc;
-}
-
-static int validate_flash_release(struct inode *inode, struct file *file)
-{
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
-       struct rtas_validate_flash_t *args_buf;
-
-       args_buf = (struct rtas_validate_flash_t *) dp->data;
-
-       if (args_buf->status == VALIDATE_READY) {
-               args_buf->buf_size = VALIDATE_BUF_SIZE;
-               validate_flash(args_buf);
-       }
-
-       atomic_dec(&dp->count);
-
-       return 0;
-}
-
-static inline void remove_flash_pde(struct proc_dir_entry *dp)
-{
-       if (dp) {
-               if (dp->data != NULL)
-                       kfree(dp->data);
-               remove_proc_entry(dp->name, proc_ppc64.rtas);
-       }
-}
-
-static inline int initialize_flash_pde_data(const char *rtas_call_name, 
-                                           size_t buf_size,
-                                           struct proc_dir_entry *dp)
-{
-       int *status;
-       int token;
-
-       dp->data = kmalloc(buf_size, GFP_KERNEL);
-       if (dp->data == NULL) {
-               remove_flash_pde(dp);
-               return -ENOMEM;
-       }
-
-       memset(dp->data, 0, buf_size);
-
-       /* This code assumes that the status int is the first member of the
-        * struct 
-        */
-       status = (int *) dp->data;
-       token = rtas_token(rtas_call_name);
-       if (token == RTAS_UNKNOWN_SERVICE)
-               *status = FLASH_AUTH;
-       else
-               *status = FLASH_NO_OP;
-
-       return 0;
-}
-
-static inline struct proc_dir_entry * create_flash_pde(const char *filename, 
-                                       struct file_operations *fops)
-{
-       struct proc_dir_entry *ent = NULL;
-
-       ent = create_proc_entry(filename, S_IRUSR | S_IWUSR, proc_ppc64.rtas);
-       if (ent != NULL) {
-               ent->nlink = 1;
-               ent->proc_fops = fops;
-               ent->owner = THIS_MODULE;
-       }
-
-       return ent;
+       return len;
 }
 
 static struct file_operations rtas_flash_operations = {
        .read           = rtas_flash_read,
        .write          = rtas_flash_write,
-       .open           = rtas_excl_open,
+       .open           = rtas_flash_open,
        .release        = rtas_flash_release,
 };
 
-static struct file_operations manage_flash_operations = {
-       .read           = manage_flash_read,
-       .write          = manage_flash_write,
-       .open           = rtas_excl_open,
-       .release        = rtas_excl_release,
-};
-
-static struct file_operations validate_flash_operations = {
-       .read           = validate_flash_read,
-       .write          = validate_flash_write,
-       .open           = rtas_excl_open,
-       .release        = validate_flash_release,
-};
 
 int __init rtas_flash_init(void)
 {
-       int rc;
+       struct proc_dir_entry *ent = NULL;
 
        if (!proc_ppc64.rtas) {
                printk(KERN_WARNING "rtas proc dir does not already exist");
                return -ENOENT;
        }
 
-       firmware_flash_pde = create_flash_pde(FIRMWARE_FLASH_NAME, 
-                                             &rtas_flash_operations);
-       rc = initialize_flash_pde_data("ibm,update-flash-64-and-reboot",
-                                      sizeof(struct rtas_update_flash_t), 
-                                      firmware_flash_pde);
-       if (rc != 0)
-               return rc;
-       
-       firmware_update_pde = create_flash_pde(FIRMWARE_UPDATE_NAME, 
-                                              &rtas_flash_operations);
-       rc = initialize_flash_pde_data("ibm,update-flash-64-and-reboot",
-                                      sizeof(struct rtas_update_flash_t), 
-                                      firmware_update_pde);
-       if (rc != 0)
-               return rc;
-       
-       validate_pde = create_flash_pde(VALIDATE_FLASH_NAME, 
-                                       &validate_flash_operations);
-       rc = initialize_flash_pde_data("ibm,validate-flash-image",
-                                      sizeof(struct rtas_validate_flash_t), 
-                                      validate_pde);
-       if (rc != 0)
-               return rc;
-       
-       manage_pde = create_flash_pde(MANAGE_FLASH_NAME, 
-                                     &manage_flash_operations);
-       rc = initialize_flash_pde_data("ibm,manage-flash-image",
-                                      sizeof(struct rtas_manage_flash_t),
-                                      manage_pde);
-       if (rc != 0)
-               return rc;
-       
+       if (rtas_token("ibm,update-flash-64-and-reboot") != RTAS_UNKNOWN_SERVICE)
+               flash_possible = 1;
+
+       if ((ent = create_proc_entry(FIRMWARE_FLASH_NAME, S_IRUSR | S_IWUSR, proc_ppc64.rtas)) != NULL) {
+               ent->nlink = 1;
+               ent->proc_fops = &rtas_flash_operations;
+               ent->owner = THIS_MODULE;
+       }
        return 0;
 }
 
@@ -690,10 +230,7 @@ void __exit rtas_flash_cleanup(void)
 {
        if (!proc_ppc64.rtas)
                return;
-       remove_flash_pde(firmware_flash_pde);
-       remove_flash_pde(firmware_update_pde);
-       remove_flash_pde(validate_pde);
-       remove_flash_pde(manage_pde);
+       remove_proc_entry(FIRMWARE_FLASH_NAME, proc_ppc64.rtas);
 }
 
 module_init(rtas_flash_init);
index 36bb742..1fcd7ff 100644 (file)
 #include <linux/proc_fs.h>
 #include <linux/init.h>
 #include <linux/vmalloc.h>
-#include <linux/spinlock.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
 #include <asm/rtas.h>
 #include <asm/prom.h>
-#include <asm/nvram.h>
-#include <asm/atomic.h>
-#include <asm/proc_fs.h>
 
 #if 0
 #define DEBUG(A...)    printk(KERN_ERR A)
 #define DEBUG(A...)
 #endif
 
-static spinlock_t log_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t rtas_log_lock = SPIN_LOCK_UNLOCKED;
 
 DECLARE_WAIT_QUEUE_HEAD(rtas_log_wait);
 
+#define LOG_NUMBER             64              /* must be a power of two */
+#define LOG_NUMBER_MASK                (LOG_NUMBER-1)
+
 static char *rtas_log_buf;
 static unsigned long rtas_log_start;
 static unsigned long rtas_log_size;
 
-static int surveillance_timeout = -1;
+static int surveillance_requested;
 static unsigned int rtas_event_scan_rate;
 static unsigned int rtas_error_log_max;
-static unsigned int rtas_error_log_buffer_max;
 
-extern spinlock_t proc_ppc64_lock;
-extern volatile int no_more_logging;
+#define EVENT_SCAN_ALL_EVENTS  0xf0000000
+#define SURVEILLANCE_TOKEN     9000
+#define SURVEILLANCE_TIMEOUT   1
+#define SURVEILLANCE_SCANRATE  1
 
-volatile int error_log_cnt = 0;
+struct proc_dir_entry *proc_rtas;
 
 /*
  * Since we use 32 bit RTAS, the physical address of this must be below
  * 4G or else bad things happen. Allocate this in the kernel data and
  * make it big enough.
  */
+#define RTAS_ERROR_LOG_MAX 1024
 static unsigned char logdata[RTAS_ERROR_LOG_MAX];
 
-/* To see this info, grep RTAS /var/log/messages and each entry
- * will be collected together with obvious begin/end.
- * There will be a unique identifier on the begin and end lines.
- * This will persist across reboots.
- *
- * format of error logs returned from RTAS:
- * bytes       (size)  : contents
- * --------------------------------------------------------
- * 0-7         (8)     : rtas_error_log
- * 8-47                (40)    : extended info
- * 48-51       (4)     : vendor id
- * 52-1023 (vendor specific) : location code and debug data
- */
-static void printk_log_rtas(char *buf, int len)
-{
-
-       int i,j,n;
-       int perline = 16;
-       char buffer[64];
-       char * str = "RTAS event";
-
-       printk(RTAS_ERR "%d -------- %s begin --------\n", error_log_cnt, str);
-
-       /*
-        * Print perline bytes on each line, each line will start
-        * with RTAS and a changing number, so syslogd will
-        * print lines that are otherwise the same.  Separate every
-        * 4 bytes with a space.
-        */
-       for (i=0; i < len; i++) {
-               j = i % perline;
-               if (j == 0) {
-                       memset(buffer, 0, sizeof(buffer));
-                       n = sprintf(buffer, "RTAS %d:", i/perline);
-               }
-
-               if ((i % 4) == 0)
-                       n += sprintf(buffer+n, " ");
-
-               n += sprintf(buffer+n, "%02x", (unsigned char)buf[i]);
-
-               if (j == (perline-1))
-                       printk(KERN_ERR "%s\n", buffer);
-       }
-       if ((i % perline) != 0)
-               printk(KERN_ERR "%s\n", buffer);
-
-       printk(RTAS_ERR "%d -------- %s end ----------\n", error_log_cnt, str);
-}
-
-static int log_rtas_len(char * buf)
-{
-       int len;
-       struct rtas_error_log *err;
-
-       /* rtas fixed header */
-       len = 8;
-       err = (struct rtas_error_log *)buf;
-       if (err->extended_log_length) {
-
-               /* extended header */
-               len += err->extended_log_length;
-
-               if (len > RTAS_ERROR_LOG_MAX)
-                       len = RTAS_ERROR_LOG_MAX;
-       }
-       return len;
-}
-
-/*
- * First write to nvram, if fatal error, that is the only
- * place we log the info.  The error will be picked up
- * on the next reboot by rtasd.  If not fatal, run the
- * method for the type of error.  Currently, only RTAS
- * errors have methods implemented, but in the future
- * there might be a need to store data in nvram before a
- * call to panic().
- *
- * XXX We write to nvram periodically, to indicate error has
- * been written and sync'd, but there is a possibility
- * that if we don't shutdown correctly, a duplicate error
- * record will be created on next reboot.
- */
-void pSeries_log_error(char *buf, unsigned int err_type, int fatal)
-{
-       unsigned long offset;
-       unsigned long s;
-       int len = 0;
-
-       DEBUG("logging event\n");
-
-       if (buf == NULL)
-               return;
-
-       spin_lock_irqsave(&log_lock, s);
-
-       /* get length and increase count */
-       switch (err_type & ERR_TYPE_MASK) {
-       case ERR_TYPE_RTAS_LOG:
-               len = log_rtas_len(buf);
-               if (!(err_type & ERR_FLAG_BOOT))
-                       error_log_cnt++;
-               break;
-       case ERR_TYPE_KERNEL_PANIC:
-       default:
-               spin_unlock_irqrestore(&log_lock, s);
-               return;
-       }
-
-       /* Write error to NVRAM */
-       if (!no_more_logging && !(err_type & ERR_FLAG_BOOT))
-               nvram_write_error_log(buf, len, err_type);
-
-       /* Check to see if we need to or have stopped logging */
-       if (fatal || no_more_logging) {
-               no_more_logging = 1;
-               spin_unlock_irqrestore(&log_lock, s);
-               return;
-       }
-
-       /* call type specific method for error */
-       switch (err_type & ERR_TYPE_MASK) {
-       case ERR_TYPE_RTAS_LOG:
-               /* put into syslog and error_log file */
-               printk_log_rtas(buf, len);
-
-               offset = rtas_error_log_buffer_max *
-                       ((rtas_log_start+rtas_log_size) & LOG_NUMBER_MASK);
-
-               /* First copy over sequence number */
-               memcpy(&rtas_log_buf[offset], (void *) &error_log_cnt, sizeof(int));
-
-               /* Second copy over error log data */
-               offset += sizeof(int);
-               memcpy(&rtas_log_buf[offset], buf, len);
-
-               if (rtas_log_size < LOG_NUMBER)
-                       rtas_log_size += 1;
-               else
-                       rtas_log_start += 1;
-
-               spin_unlock_irqrestore(&log_lock, s);
-               wake_up_interruptible(&rtas_log_wait);
-               break;
-       case ERR_TYPE_KERNEL_PANIC:
-       default:
-               spin_unlock_irqrestore(&log_lock, s);
-               return;
-       }
-
-}
-
-
 static int rtas_log_open(struct inode * inode, struct file * file)
 {
        return 0;
@@ -221,50 +69,36 @@ static int rtas_log_release(struct inode * inode, struct file * file)
        return 0;
 }
 
-/* This will check if all events are logged, if they are then, we
- * know that we can safely clear the events in NVRAM.
- * Next we'll sit and wait for something else to log.
- */
 static ssize_t rtas_log_read(struct file * file, char * buf,
                         size_t count, loff_t *ppos)
 {
        int error;
        char *tmp;
-       unsigned long s;
        unsigned long offset;
 
-       if (!buf || count < rtas_error_log_buffer_max)
+       if (!buf || count < rtas_error_log_max)
                return -EINVAL;
 
-       count = rtas_error_log_buffer_max;
+       count = rtas_error_log_max;
 
        error = verify_area(VERIFY_WRITE, buf, count);
        if (error)
-               return -EFAULT;
+               return -EINVAL;
 
-       tmp = kmalloc(count, GFP_KERNEL);
+       tmp = kmalloc(rtas_error_log_max, GFP_KERNEL);
        if (!tmp)
                return -ENOMEM;
 
-
-       spin_lock_irqsave(&log_lock, s);
-       /* if it's 0, then we know we got the last one (the one in NVRAM) */
-       if (rtas_log_size == 0 && !no_more_logging)
-               nvram_clear_error_log();
-       spin_unlock_irqrestore(&log_lock, s);
-
-
        error = wait_event_interruptible(rtas_log_wait, rtas_log_size);
        if (error)
                goto out;
 
-       spin_lock_irqsave(&log_lock, s);
-       offset = rtas_error_log_buffer_max * (rtas_log_start & LOG_NUMBER_MASK);
+       spin_lock(&rtas_log_lock);
+       offset = rtas_error_log_max * (rtas_log_start & LOG_NUMBER_MASK);
        memcpy(tmp, &rtas_log_buf[offset], count);
-
        rtas_log_start += 1;
        rtas_log_size -= 1;
-       spin_unlock_irqrestore(&log_lock, s);
+       spin_unlock(&rtas_log_lock);
 
        error = copy_to_user(buf, tmp, count) ? -EFAULT : count;
 out:
@@ -287,18 +121,42 @@ struct file_operations proc_rtas_log_operations = {
        .release =      rtas_log_release,
 };
 
-static int enable_surveillance(int timeout)
+static void log_rtas(char *buf)
+{
+       unsigned long offset;
+
+       DEBUG("logging rtas event\n");
+
+       spin_lock(&rtas_log_lock);
+
+       offset = rtas_error_log_max *
+                       ((rtas_log_start+rtas_log_size) & LOG_NUMBER_MASK);
+
+       memcpy(&rtas_log_buf[offset], buf, rtas_error_log_max);
+
+       if (rtas_log_size < LOG_NUMBER)
+               rtas_log_size += 1;
+       else
+               rtas_log_start += 1;
+
+       spin_unlock(&rtas_log_lock);
+       wake_up_interruptible(&rtas_log_wait);
+}
+
+static int enable_surveillance(void)
 {
        int error;
 
        error = rtas_call(rtas_token("set-indicator"), 3, 1, NULL,
-                         SURVEILLANCE_TOKEN, 0, timeout);
+                         SURVEILLANCE_TOKEN, 0, SURVEILLANCE_TIMEOUT);
 
        if (error) {
                printk(KERN_ERR "rtasd: could not enable surveillance\n");
                return -1;
        }
 
+       rtas_event_scan_rate = SURVEILLANCE_SCANRATE;
+
        return 0;
 }
 
@@ -307,12 +165,11 @@ static int get_eventscan_parms(void)
        struct device_node *node;
        int *ip;
 
-       node = of_find_node_by_path("/rtas");
+       node = find_path_device("/rtas");
 
        ip = (int *)get_property(node, "rtas-event-scan-rate", NULL);
        if (ip == NULL) {
                printk(KERN_ERR "rtasd: no rtas-event-scan-rate\n");
-               of_node_put(node);
                return -1;
        }
        rtas_event_scan_rate = *ip;
@@ -321,7 +178,6 @@ static int get_eventscan_parms(void)
        ip = (int *)get_property(node, "rtas-error-log-max", NULL);
        if (ip == NULL) {
                printk(KERN_ERR "rtasd: no rtas-error-log-max\n");
-               of_node_put(node);
                return -1;
        }
        rtas_error_log_max = *ip;
@@ -331,7 +187,6 @@ static int get_eventscan_parms(void)
                printk(KERN_ERR "rtasd: truncated error log from %d to %d bytes\n", rtas_error_log_max, RTAS_ERROR_LOG_MAX);
                rtas_error_log_max = RTAS_ERROR_LOG_MAX;
        }
-       of_node_put(node);
 
        return 0;
 }
@@ -340,12 +195,10 @@ extern long sys_sched_get_priority_max(int policy);
 
 static int rtasd(void *unused)
 {
-       unsigned int err_type;
        int cpu = 0;
        int error;
        int first_pass = 1;
        int event_scan = rtas_token("event-scan");
-       int rc;
 
        if (event_scan == RTAS_UNKNOWN_SERVICE || get_eventscan_parms() == -1)
                goto error;
@@ -356,9 +209,6 @@ static int rtasd(void *unused)
                goto error;
        }
 
-       /* We can use rtas_log_buf now */
-       no_more_logging = 0;
-
        DEBUG("will sleep for %d jiffies\n", (HZ*60/rtas_event_scan_rate) / 2);
 
        daemonize("rtasd");
@@ -369,16 +219,6 @@ static int rtasd(void *unused)
        current->nice = sys_sched_get_priority_max(SCHED_FIFO) + 1;
 #endif
 
-       /* See if we have any error stored in NVRAM */
-       memset(logdata, 0, rtas_error_log_max);
-
-       rc = nvram_read_error_log(logdata, rtas_error_log_max, &err_type);
-       if (!rc) {
-               if (err_type != ERR_FLAG_ALREADY_LOGGED) {
-                       pSeries_log_error(logdata, err_type | ERR_FLAG_BOOT, 0);
-               }
-       }
-
 repeat:
        for (cpu = 0; cpu < NR_CPUS; cpu++) {
                if (!cpu_online(cpu))
@@ -391,7 +231,7 @@ repeat:
                do {
                        memset(logdata, 0, rtas_error_log_max);
                        error = rtas_call(event_scan, 4, 1, NULL,
-                                       RTAS_EVENT_SCAN_ALL_EVENTS, 0,
+                                       EVENT_SCAN_ALL_EVENTS, 0,
                                        __pa(logdata), rtas_error_log_max);
                        if (error == -1) {
                                printk(KERN_ERR "event-scan failed\n");
@@ -399,7 +239,7 @@ repeat:
                        }
 
                        if (error == 0)
-                               pSeries_log_error(logdata, ERR_TYPE_RTAS_LOG, 0);
+                               log_rtas(logdata);
 
                } while(error == 0);
 
@@ -412,9 +252,9 @@ repeat:
                schedule_timeout(first_pass ? HZ : (HZ*60/rtas_event_scan_rate) / 2);
        }
 
-       if (first_pass && (surveillance_timeout != -1)) {
+       if (first_pass && surveillance_requested) {
                DEBUG("enabling surveillance\n");
-               if (enable_surveillance(surveillance_timeout))
+               if (enable_surveillance())
                        goto error_vfree;
                DEBUG("surveillance enabled\n");
        }
@@ -433,29 +273,25 @@ static int __init rtas_init(void)
 {
        struct proc_dir_entry *entry;
 
-       if (proc_ppc64.rtas == NULL) {
-               proc_ppc64_init();
+       if (proc_rtas == NULL) {
+               proc_rtas = proc_mkdir("rtas", 0);
        }
 
-       if (proc_ppc64.rtas == NULL) {
-               printk(KERN_ERR "rtas_init: /proc/ppc64/rtas does not exist.");
-               return -EIO;
+       if (proc_rtas == NULL) {
+               printk(KERN_ERR "Failed to create /proc/rtas in rtas_init\n");
+       } else {
+               entry = create_proc_entry("error_log", S_IRUSR, proc_rtas);
+               if (entry)
+                       entry->proc_fops = &proc_rtas_log_operations;
+               else
+                       printk(KERN_ERR "Failed to create rtas/error_log proc entry\n");
        }
 
-       entry = create_proc_entry("error_log", S_IRUSR, proc_ppc64.rtas);
-       if (entry)
-               entry->proc_fops = &proc_rtas_log_operations;
-       else
-               printk(KERN_ERR "Failed to create rtas/error_log proc entry\n");
-
        if (kernel_thread(rtasd, 0, CLONE_FS) < 0)
                printk(KERN_ERR "Failed to start RTAS daemon\n");
 
        printk(KERN_ERR "RTAS daemon started\n");
 
-       /* Make room for the sequence number */
-       rtas_error_log_buffer_max = rtas_error_log_max + sizeof(int);
-
        return 0;
 }
 
@@ -464,8 +300,8 @@ static int __init surveillance_setup(char *str)
        int i;
 
        if (get_option(&str,&i)) {
-               if (i >= 0 && i <= 255)
-                       surveillance_timeout = i;
+               if (i == 1)
+                       surveillance_requested = 1;
        }
 
        return 1;
index a4aeee6..938c78f 100644 (file)
@@ -221,7 +221,7 @@ static void __exit rtc_exit (void)
        misc_deregister(&rtc_dev);
 }
 
-late_initcall(rtc_init);
+module_init(rtc_init);
 module_exit(rtc_exit);
 
 /*
index 82d43b2..725d3c7 100644 (file)
@@ -28,7 +28,6 @@
 #include <asm/uaccess.h>
 #include <asm/rtas.h>
 #include <asm/prom.h>
-#include <asm/proc_fs.h>
 
 #define MODULE_VERSION "1.0"
 #define MODULE_NAME "scanlog"
@@ -44,6 +43,9 @@ static int scanlog_debug;
 static unsigned int ibm_scan_log_dump;                 /* RTAS token */
 static struct proc_dir_entry *proc_ppc64_scan_log_dump;        /* The proc file */
 
+extern struct proc_dir_entry *proc_rtas;
+
+
 static ssize_t scanlog_read(struct file *file, char *buf,
                            size_t count, loff_t *ppos)
 {
@@ -133,24 +135,17 @@ static ssize_t scanlog_read(struct file *file, char *buf,
 static ssize_t scanlog_write(struct file * file, const char * buf,
                             size_t count, loff_t *ppos)
 {
-       char stkbuf[20];
        unsigned long status;
 
-       if (count > 19) count = 19;
-       if (copy_from_user (stkbuf, buf, count)) {
-               return -EFAULT;
-       }
-       stkbuf[count] = 0;
-
        if (buf) {
-               if (strncmp(stkbuf, "reset", 5) == 0) {
+               if (strncmp(buf, "reset", 5) == 0) {
                        DEBUG("reset scanlog\n");
                        status = rtas_call(ibm_scan_log_dump, 2, 1, NULL, NULL, 0);
                        DEBUG("rtas returns %ld\n", status);
-               } else if (strncmp(stkbuf, "debugon", 7) == 0) {
+               } else if (strncmp(buf, "debugon", 7) == 0) {
                        printk(KERN_ERR "scanlog: debug on\n");
                        scanlog_debug = 1;
-               } else if (strncmp(stkbuf, "debugoff", 8) == 0) {
+               } else if (strncmp(buf, "debugoff", 8) == 0) {
                        printk(KERN_ERR "scanlog: debug off\n");
                        scanlog_debug = 0;
                }
@@ -212,16 +207,15 @@ int __init scanlog_init(void)
                return -EIO;
        }
 
-       if (proc_ppc64.rtas == NULL) {
-               proc_ppc64_init();
-       }
+       if (proc_rtas == NULL)
+                proc_rtas = proc_mkdir("rtas", 0);
 
-       if (proc_ppc64.rtas == NULL) {
+       if (proc_rtas == NULL) {
                printk(KERN_ERR "Failed to create /proc/rtas in scanlog_init\n");
                return -EIO;
        }
 
-        ent = create_proc_entry("scan-log-dump",  S_IRUSR, proc_ppc64.rtas);
+        ent = create_proc_entry("scan-log-dump",  S_IRUSR, proc_rtas);
        if (ent) {
                ent->proc_fops = &scanlog_fops;
                /* Ideally we could allocate a buffer < 4G */
index 98b87ff..b0d0d54 100644 (file)
@@ -38,7 +38,6 @@
 #include <asm/paca.h>
 #include <asm/ppcdebug.h>
 #include <asm/time.h>
-#include <asm/cputable.h>
 #include <asm/sections.h>
 
 extern unsigned long klimit;
@@ -59,9 +58,6 @@ extern void iSeries_init_early( void );
 extern void pSeries_init_early( void );
 extern void pSeriesLP_init_early(void);
 extern void mm_init_ppc64( void ); 
-extern void pseries_secondary_smp_init(unsigned long); 
-extern int  idle_setup(void);
-extern void vpa_init(int cpu);
 
 unsigned long decr_overclock = 1;
 unsigned long decr_overclock_proc0 = 1;
@@ -141,16 +137,12 @@ void __init disable_early_printk(void)
 }
 
 /*
- * Do some initial setup of the system.  The parameters are those which 
+ * Do some initial setup of the system.  The paramters are those which 
  * were passed in from the bootloader.
  */
 void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
                  unsigned long r6, unsigned long r7)
 {
-#ifdef CONFIG_PPC_PSERIES
-        unsigned int ret, i;
-#endif
-
 #ifdef CONFIG_XMON_DEFAULT
        debugger = xmon;
        debugger_bpt = xmon_bpt;
@@ -191,33 +183,10 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
 #endif
        }
 
-#ifdef CONFIG_PPC_PSERIES
        if (systemcfg->platform & PLATFORM_PSERIES) {
                early_console_initialized = 1;
                register_console(&udbg_console);
-               finish_device_tree();
-               chrp_init(r3, r4, r5, r6, r7);
-
-#ifdef CONFIG_SMP
-               /* Start secondary threads on SMT systems */
-               for (i = 0; i < NR_CPUS; i++) {
-                       if(cpu_available(i)  && !cpu_possible(i)) {
-                               printk("%16.16x : starting thread\n", i);
-                               rtas_call(rtas_token("start-cpu"), 3, 1, 
-                                         (void *)&ret,
-                                         get_hard_smp_processor_id(i), 
-                                         *((unsigned long *)pseries_secondary_smp_init), i);
-                               cpu_set(i, cpu_possible_map);
-                               systemcfg->processorCount++;
-                       }
-               }
-#endif
        }
-#endif
-       /* Finish initializing the hash table (do the dynamic
-        * patching for the fast-path hashtable.S code)
-        */
-       htab_finish_init();
 
        printk("Starting Linux PPC64 %s\n", UTS_RELEASE);
 
@@ -235,16 +204,12 @@ void setup_system(unsigned long r3, unsigned long r4, unsigned long r5,
        printk("htab_data.num_ptegs           = 0x%lx\n", htab_data.htab_num_ptegs);
        printk("-----------------------------------------------------\n");
 
-       mm_init_ppc64();
-
-#if defined(CONFIG_SMP) && defined(CONFIG_PPC_PSERIES)
-       if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
-               vpa_init(boot_cpuid);
+       if (systemcfg->platform & PLATFORM_PSERIES) {
+               finish_device_tree();
+               chrp_init(r3, r4, r5, r6, r7);
        }
-#endif
 
-       /* Select the correct idle loop for the platform. */
-       idle_setup();
+       mm_init_ppc64();
 
        switch (systemcfg->platform) {
 #ifdef CONFIG_PPC_ISERIES
@@ -312,19 +277,36 @@ static int show_cpuinfo(struct seq_file *m, void *v)
        seq_printf(m, "processor\t: %lu\n", cpu_id);
        seq_printf(m, "cpu\t\t: ");
 
-       if (cur_cpu_spec->pvr_mask)
-               seq_printf(m, "%s", cur_cpu_spec->cpu_name);
-       else
-               seq_printf(m, "unknown (%08x)", pvr);
-
-#ifdef CONFIG_ALTIVEC
-       if (cur_cpu_spec->cpu_features & CPU_FTR_ALTIVEC)
-               seq_printf(m, ", altivec supported");
-#endif /* CONFIG_ALTIVEC */
-
-       seq_printf(m, "\n");
+       switch (PVR_VER(pvr)) {
+       case PV_NORTHSTAR:
+               seq_printf(m, "RS64-II (northstar)\n");
+               break;
+       case PV_PULSAR:
+               seq_printf(m, "RS64-III (pulsar)\n");
+               break;
+       case PV_POWER4:
+               seq_printf(m, "POWER4 (gp)\n");
+               break;
+       case PV_ICESTAR:
+               seq_printf(m, "RS64-III (icestar)\n");
+               break;
+       case PV_SSTAR:
+               seq_printf(m, "RS64-IV (sstar)\n");
+               break;
+       case PV_POWER4p:
+               seq_printf(m, "POWER4+ (gq)\n");
+               break;
+       case PV_630:
+               seq_printf(m, "POWER3 (630)\n");
+               break;
+       case PV_630p:
+               seq_printf(m, "POWER3 (630+)\n");
+               break;
+       default:
+               seq_printf(m, "Unknown (%08x)\n", pvr);
+               break;
+       }
 
-#ifdef CONFIG_PPC_PSERIES
        /*
         * Assume here that all clock rates are the same in a
         * smp system.  -- Cort
@@ -333,17 +315,15 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                struct device_node *cpu_node;
                int *fp;
 
-               cpu_node = of_find_node_by_type(NULL, "cpu");
+               cpu_node = find_type_devices("cpu");
                if (cpu_node) {
                        fp = (int *) get_property(cpu_node, "clock-frequency",
                                                  NULL);
                        if (fp)
                                seq_printf(m, "clock\t\t: %dMHz\n",
                                           *fp / 1000000);
-                       of_node_put(cpu_node);
                }
        }
-#endif
 
        if (ppc_md.setup_residual != NULL)
                ppc_md.setup_residual(m, cpu_id);
@@ -373,11 +353,13 @@ struct seq_operations cpuinfo_op = {
 };
 
 /*
- * Fetch the cmd_line from open firmware. 
- */
+ * Fetch the cmd_line from open firmware. */
 void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
                  unsigned long r6, unsigned long r7)
 {
+       struct device_node *chosen;
+       char *p;
+
 #ifdef CONFIG_BLK_DEV_INITRD
        if ((initrd_start == 0) && r3 && r4 && r4 != 0xdeadbeef) {
                initrd_start = (r3 >= KERNELBASE) ? r3 : (unsigned long)__va(r3);
@@ -393,58 +375,12 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
        strlcpy(cmd_line, CONFIG_CMDLINE, sizeof(cmd_line));
 #endif /* CONFIG_CMDLINE */
 
-#ifdef CONFIG_PPC_PSERIES
-       {
-       struct device_node *chosen;
-
-       chosen = of_find_node_by_name(NULL, "chosen");
+       chosen = find_devices("chosen");
        if (chosen != NULL) {
-               char *p;
                p = get_property(chosen, "bootargs", NULL);
                if (p != NULL && p[0] != 0)
                        strlcpy(cmd_line, p, sizeof(cmd_line));
-               of_node_put(chosen);
-       }
        }
-#endif
-
-#ifdef CONFIG_PPC_PSERIES
-       /* Hack -- add console=ttySn,9600 if necessary */
-       if(strstr(cmd_line, "console=") == NULL) {
-               struct device_node *prom_stdout = find_path_device(of_stdout_device);
-               u32 *reg;
-               int i;
-               char *name, *val = NULL;
-               printk("of_stdout_device %s\n", of_stdout_device);
-               if (prom_stdout) {
-                       name = (char *)get_property(prom_stdout, "name", NULL);
-                       if (name) {
-                               if (strcmp(name, "serial") == 0) {
-                                       reg = (u32 *)get_property(prom_stdout, "reg", &i);
-                                       if (i > 8) {
-                                               switch (reg[1]) {
-                                                       case 0x3f8: val = "ttyS0,9600"; break;
-                                                       case 0x2f8: val = "ttyS1,9600"; break;
-                                                       case 0x898: val = "ttyS2,9600"; break;
-                                                       case 0x890: val = "ttyS3,9600"; break;
-                                               }
-                                       }
-                               } else if (strcmp(name, "vty") == 0) {
-                                       /* pSeries LPAR virtual console */
-                                       val = "hvc0";
-                               }
-                               if (val) {
-                                       char tmp_cmd_line[CMD_LINE_SIZE];
-                                       snprintf(tmp_cmd_line, CMD_LINE_SIZE,
-                                                       "AUTOCONSOLE console=%s %s",
-                                                       val, cmd_line);
-                                       memcpy(cmd_line, tmp_cmd_line, CMD_LINE_SIZE);
-                                       printk("console= not found, add console=%s\n", val);
-                               }
-                       }
-               }
-       }
-#endif
 
        /* Look for mem= option on command line */
        if (strstr(cmd_line, "mem=")) {
@@ -470,7 +406,28 @@ void parse_cmd_line(unsigned long r3, unsigned long r4, unsigned long r5,
 }
 
 
-#ifdef CONFIG_PPC_PSERIES
+char *bi_tag2str(unsigned long tag)
+{
+       switch (tag) {
+       case BI_FIRST:
+               return "BI_FIRST";
+       case BI_LAST:
+               return "BI_LAST";
+       case BI_CMD_LINE:
+               return "BI_CMD_LINE";
+       case BI_BOOTLOADER_ID:
+               return "BI_BOOTLOADER_ID";
+       case BI_INITRD:
+               return "BI_INITRD";
+       case BI_SYSMAP:
+               return "BI_SYSMAP";
+       case BI_MACHTYPE:
+               return "BI_MACHTYPE";
+       default:
+               return "BI_UNKNOWN";
+       }
+}
+
 int parse_bootinfo(void)
 {
        struct bi_record *rec;
@@ -488,7 +445,8 @@ int parse_bootinfo(void)
                        memcpy(cmd_line, (void *)rec->data, rec->size);
                        break;
                case BI_SYSMAP:
-                       sysmap = __va(rec->data[0]);
+                       sysmap = (char *)((rec->data[0] >= (KERNELBASE))
+                                       ? rec->data[0] : (unsigned long)__va(rec->data[0]));
                        sysmap_size = rec->data[1];
                        break;
 #ifdef CONFIG_BLK_DEV_INITRD
@@ -504,7 +462,6 @@ int parse_bootinfo(void)
 
        return 0;
 }
-#endif
 
 int __init ppc_init(void)
 {
index c7ec472..f6b0cba 100644 (file)
@@ -95,7 +95,7 @@ long sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize, int p3, int p4,
        regs->gpr[3] = EINTR;
        regs->ccr |= 0x10000000;
        while (1) {
-               set_current_state(TASK_INTERRUPTIBLE);
+               current->state = TASK_INTERRUPTIBLE;
                schedule();
                if (do_signal(&saveset, regs))
                        return regs->gpr[3];
@@ -114,49 +114,19 @@ long sys_sigaltstack(const stack_t *uss, stack_t *uoss, unsigned long r5,
  * Set up the sigcontext for the signal frame.
  */
 
-static int setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
+static int
+setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
                 int signr, sigset_t *set, unsigned long handler)
 {
-       /* When CONFIG_ALTIVEC is set, we _always_ setup v_regs even if the
-        * process never used altivec yet (MSR_VEC is zero in pt_regs of
-        * the context). This is very important because we must ensure we
-        * don't lose the VRSAVE content that may have been set prior to
-        * the process doing its first vector operation
-        * Userland shall check AT_HWCAP to know wether it can rely on the
-        * v_regs pointer or not
-        */
-#ifdef CONFIG_ALTIVEC
-       elf_vrreg_t *v_regs = (elf_vrreg_t *)(((unsigned long)sc->vmx_reserve) & ~0xful);
-#endif
        int err = 0;
 
        if (regs->msr & MSR_FP)
                giveup_fpu(current);
 
-       /* Make sure signal doesn't get spurrious FP exceptions */
-       current->thread.fpscr = 0;
+       current->thread.saved_msr = regs->msr & ~(MSR_FP | MSR_FE0 | MSR_FE1);
+       regs->msr = current->thread.saved_msr | current->thread.fpexc_mode;
+       current->thread.saved_softe = regs->softe;
 
-#ifdef CONFIG_ALTIVEC
-       err |= __put_user(v_regs, &sc->v_regs);
-
-       /* save altivec registers */
-       if (current->thread.used_vr) {          
-               if (regs->msr & MSR_VEC)
-                       giveup_altivec(current);
-               /* Copy 33 vec registers (vr0..31 and vscr) to the stack */
-               err |= __copy_to_user(v_regs, current->thread.vr, 33 * sizeof(vector128));
-               /* set MSR_VEC in the MSR value in the frame to indicate that sc->v_reg)
-                * contains valid data.
-                */
-               regs->msr |= MSR_VEC;
-       }
-       /* We always copy to/from vrsave, it's 0 if we don't have or don't
-        * use altivec.
-        */
-       err |= __put_user(current->thread.vrsave, (u32 *)&v_regs[33]);
-#else /* CONFIG_ALTIVEC */
-       err |= __put_user(0, &sc->v_regs);
-#endif /* CONFIG_ALTIVEC */
        err |= __put_user(&sc->gp_regs, &sc->regs);
        err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE);
        err |= __copy_to_user(&sc->fp_regs, &current->thread.fpr, FP_REGS_SIZE);
@@ -165,6 +135,9 @@ static int setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
        if (set != NULL)
                err |=  __put_user(set->sig[0], &sc->oldmask);
 
+       regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1);
+       current->thread.fpscr = 0;
+
        return err;
 }
 
@@ -172,42 +145,23 @@ static int setup_sigcontext(struct sigcontext *sc, struct pt_regs *regs,
  * Restore the sigcontext from the signal frame.
  */
 
-static int restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, struct sigcontext *sc)
+static int
+restore_sigcontext(struct pt_regs *regs, sigset_t *set, struct sigcontext *sc)
 {
-#ifdef CONFIG_ALTIVEC
-       elf_vrreg_t *v_regs;
-#endif
        unsigned int err = 0;
-       unsigned long save_r13;
 
-       /* If this is not a signal return, we preserve the TLS in r13 */
-       if (!sig)
-               save_r13 = regs->gpr[13];
+       if (regs->msr & MSR_FP)
+               giveup_fpu(current);
+
        err |= __copy_from_user(regs, &sc->gp_regs, GP_REGS_SIZE);
-       if (!sig)
-               regs->gpr[13] = save_r13;
        err |= __copy_from_user(&current->thread.fpr, &sc->fp_regs, FP_REGS_SIZE);
+       current->thread.fpexc_mode = regs->msr & (MSR_FE0 | MSR_FE1);
        if (set != NULL)
                err |=  __get_user(set->sig[0], &sc->oldmask);
 
-#ifdef CONFIG_ALTIVEC
-       err |= __get_user(v_regs, &sc->v_regs);
-       if (err)
-               return err;
-       /* Copy 33 vec registers (vr0..31 and vscr) from the stack */
-       if (v_regs != 0 && (regs->msr & MSR_VEC) != 0)
-               err |= __copy_from_user(current->thread.vr, v_regs, 33 * sizeof(vector128));
-       else if (current->thread.used_vr)
-               memset(&current->thread.vr, 0, 33);
-       /* Always get VRSAVE back */
-       if (v_regs != 0)
-               err |= __get_user(current->thread.vrsave, (u32 *)&v_regs[33]);
-       else
-               current->thread.vrsave = 0;
-#endif /* CONFIG_ALTIVEC */
-
-       /* Force reload of FP/VEC */
-       regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1 | MSR_VEC);
+       /* Don't allow the signal handler to change these modulo FE{0,1} */
+       regs->msr = current->thread.saved_msr & ~(MSR_FP | MSR_FE0 | MSR_FE1);
+       regs->softe = current->thread.saved_softe;
 
        return err;
 }
@@ -215,8 +169,8 @@ static int restore_sigcontext(struct pt_regs *regs, sigset_t *set, int sig, stru
 /*
  * Allocate space for the signal frame
  */
-static inline void * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
-                                 size_t frame_size)
+static inline void *
+get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)
 {
         unsigned long newsp;
 
@@ -231,10 +185,8 @@ static inline void * get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
         return (void *)((newsp - frame_size) & -8ul);
 }
 
-/*
- * Setup the trampoline code on the stack
- */
-static int setup_trampoline(unsigned int syscall, unsigned int *tramp)
+static int
+setup_trampoline(unsigned int syscall, unsigned int *tramp)
 {
        int i, err = 0;
 
@@ -257,72 +209,6 @@ static int setup_trampoline(unsigned int syscall, unsigned int *tramp)
 }
 
 /*
- * Restore the user process's signal mask (also used by signal32.c)
- */
-void restore_sigmask(sigset_t *set)
-{
-       sigdelsetmask(set, ~_BLOCKABLE);
-       spin_lock_irq(&current->sighand->siglock);
-       current->blocked = *set;
-       recalc_sigpending();
-       spin_unlock_irq(&current->sighand->siglock);
-}
-
-
-/*
- * Handle {get,set,swap}_context operations
- */
-int sys_swapcontext(struct ucontext __user *old_ctx,
-                   struct ucontext __user *new_ctx,
-                   long ctx_size, long r6, long r7, long r8, struct pt_regs *regs)
-{
-       unsigned char tmp;
-       sigset_t set;
-
-       /* Context size is for future use. Right now, we only make sure
-        * we are passed something we understand
-        */
-       if (ctx_size < sizeof(struct ucontext))
-               return -EINVAL;
-
-       if (old_ctx != NULL) {
-               if (verify_area(VERIFY_WRITE, old_ctx, sizeof(*old_ctx))
-                   || setup_sigcontext(&old_ctx->uc_mcontext, regs, 0, NULL, 0)
-                   || __copy_to_user(&old_ctx->uc_sigmask,
-                                     &current->blocked, sizeof(sigset_t)))
-                       return -EFAULT;
-       }
-       if (new_ctx == NULL)
-               return 0;
-       if (verify_area(VERIFY_READ, new_ctx, sizeof(*new_ctx))
-           || __get_user(tmp, (u8 *) new_ctx)
-           || __get_user(tmp, (u8 *) (new_ctx + 1) - 1))
-               return -EFAULT;
-
-       /*
-        * If we get a fault copying the context into the kernel's
-        * image of the user's registers, we can't just return -EFAULT
-        * because the user's registers will be corrupted.  For instance
-        * the NIP value may have been updated but not some of the
-        * other registers.  Given that we have done the verify_area
-        * and successfully read the first and last bytes of the region
-        * above, this should only happen in an out-of-memory situation
-        * or if another thread unmaps the region containing the context.
-        * We kill the task with a SIGSEGV in this situation.
-        */
-
-       if (__copy_from_user(&set, &new_ctx->uc_sigmask, sizeof(set)))
-               do_exit(SIGSEGV);
-       restore_sigmask(&set);
-       if (restore_sigcontext(regs, NULL, 0, &new_ctx->uc_mcontext))
-               do_exit(SIGSEGV);
-
-       /* This returns like rt_sigreturn */
-       return 0;
-}
-
-
-/*
  * Do a signal return; undo the signal stack.
  */
 
@@ -332,6 +218,7 @@ int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
 {
        struct ucontext *uc = (struct ucontext *)regs->gpr[1];
        sigset_t set;
+       stack_t st;
 
        /* Always make any pending restarted system calls return -EINTR */
        current_thread_info()->restart_block.fn = do_no_restart_syscall;
@@ -341,14 +228,20 @@ int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
 
        if (__copy_from_user(&set, &uc->uc_sigmask, sizeof(set)))
                goto badframe;
-       restore_sigmask(&set);
-       if (restore_sigcontext(regs, NULL, 1, &uc->uc_mcontext))
+       sigdelsetmask(&set, ~_BLOCKABLE);
+       spin_lock_irq(&current->sighand->siglock);
+       current->blocked = set;
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
+
+       if (restore_sigcontext(regs, NULL, &uc->uc_mcontext))
                goto badframe;
 
-       /* do_sigaltstack expects a __user pointer and won't modify
-        * what's in there anyway
-        */
-       do_sigaltstack(&uc->uc_stack, NULL, regs->gpr[1]);
+       if (__copy_from_user(&st, &uc->uc_stack, sizeof(st)))
+               goto badframe;
+       /* This function sets back the stack flags into
+          the current task structure.  */
+       sys_sigaltstack(&st, NULL, 0, 0, 0, 0, regs);
 
        return regs->result;
 
@@ -360,7 +253,8 @@ badframe:
        do_exit(SIGSEGV);
 }
 
-static void setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info,
+static void
+setup_rt_frame(int signr, struct k_sigaction *ka, siginfo_t *info,
                sigset_t *set, struct pt_regs *regs)
 {
        /* Handler is *really* a pointer to the function descriptor for
@@ -438,8 +332,9 @@ badframe:
 /*
  * OK, we're invoking a handler
  */
-static void handle_signal(unsigned long sig, struct k_sigaction *ka,
-                         siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
+static void
+handle_signal(unsigned long sig, struct k_sigaction *ka,
+             siginfo_t *info, sigset_t *oldset, struct pt_regs *regs)
 {
        /* Set up Signal Frame */
        setup_rt_frame(sig, ka, info, oldset, regs);
@@ -457,7 +352,8 @@ static void handle_signal(unsigned long sig, struct k_sigaction *ka,
        return;
 }
 
-static inline void syscall_restart(struct pt_regs *regs, struct k_sigaction *ka)
+static inline void
+syscall_restart(struct pt_regs *regs, struct k_sigaction *ka)
 {
        switch ((int)regs->result) {
        case -ERESTART_RESTARTBLOCK:
index 1d33332..bd371a5 100644 (file)
 #define DEBUG_SIG 0
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
-
-#define GP_REGS_SIZE32 min(sizeof(elf_gregset_t32), sizeof(struct pt_regs32))
-
+/* 
+ * These are the flags in the MSR that the user is allowed to change
+ * by modifying the saved value of the MSR on the stack.  SE and BE
+ * should not be in this list since gdb may want to change these.  I.e,
+ * you should be able to step out of a signal handler to see what
+ * instruction executes next after the signal handler completes.
+ * Alternately, if you stepped into a signal handler, you should be
+ * able to continue 'til the next breakpoint from within the signal
+ * handler, even if the handler returns.
+ */
+#if 0
+#define MSR_USERCHANGE (MSR_FE0 | MSR_FE1)
+#else
 /*
- * When we have signals to deliver, we set up on the
- * user stack, going down from the original stack pointer:
- *     a sigregs32 struct
- *     a sigcontext32 struct
- *     a gap of __SIGNAL_FRAMESIZE32 bytes
- *
- * Each of these things must be a multiple of 16 bytes in size.
- *
+ * glibc tries to set FE0/FE1 via a signal handler. Since it only ever
+ * sets both bits and this is the default setting we now disable this
+ * behaviour. This is done to insure the new prctl which alters FE0/FE1 does
+ * not get overriden by glibc. Setting and clearing FE0/FE1 via signal
+ * handler has always been bogus since load_up_fpu used to set FE0/FE1
+ * unconditionally.
  */
+#define MSR_USERCHANGE 0
+#endif
+
 struct sigregs32 {
-       struct mcontext32       mctx;           /* all the register values */
        /*
-        * Programs using the rs6000/xcoff abi can save up to 19 gp
-        * regs and 18 fp regs below sp before decrementing it.
+        * the gp_regs array is 32 bit representation of the pt_regs
+        * structure that was stored on the kernel stack during the
+        * system call that was interrupted for the signal.
+        *
+        * Note that the entire pt_regs regs structure will fit in
+        * the gp_regs structure because the ELF_NREG value is 48 for
+        * PPC and the pt_regs structure contains 44 registers
         */
-       int                     abigap[56];
-};
-
-/* We use the mc_pad field for the signal return trampoline. */
-#define tramp  mc_pad
-
-/*
- *  When we have rt signals to deliver, we set up on the
- *  user stack, going down from the original stack pointer:
- *     one rt_sigframe32 struct (siginfo + ucontext + ABI gap)
- *     a gap of __SIGNAL_FRAMESIZE32+16 bytes
- *  (the +16 is to get the siginfo and ucontext32 in the same
- *  positions as in older kernels).
- *
- *  Each of these things must be a multiple of 16 bytes in size.
- *
- */
-struct rt_sigframe32 {
-       struct compat_siginfo   info;
-       struct ucontext32       uc;
+       elf_gregset_t32 gp_regs;
+       double          fp_regs[ELF_NFPREG];
+       unsigned int    tramp[2];
        /*
         * Programs using the rs6000/xcoff abi can save up to 19 gp
         * regs and 18 fp regs below sp before decrementing it.
         */
-       int                     abigap[56];
+       int             abigap[56];
 };
 
 
-/*
- * Common utility functions used by signal and context support
- *
- */
-
-/*
- * Restore the user process's signal mask
- * (implemented in signal.c)
- */
-extern void restore_sigmask(sigset_t *set);
-
-/*
- * Functions for flipping sigsets (thanks to brain dead generic
- * implementation that makes things simple for little endian only
- */
-static inline void compat_from_sigset(compat_sigset_t *compat, sigset_t *set)
-{
-       switch (_NSIG_WORDS) {
-       case 4: compat->sig[5] = set->sig[3] & 0xffffffffull ;
-               compat->sig[7] = set->sig[3] >> 32; 
-       case 3: compat->sig[4] = set->sig[2] & 0xffffffffull ;
-               compat->sig[5] = set->sig[2] >> 32; 
-       case 2: compat->sig[2] = set->sig[1] & 0xffffffffull ;
-               compat->sig[3] = set->sig[1] >> 32; 
-       case 1: compat->sig[0] = set->sig[0] & 0xffffffffull ;
-               compat->sig[1] = set->sig[0] >> 32; 
-       }
-}
-
-static inline void sigset_from_compat(sigset_t *set, compat_sigset_t *compat)
-{
-       switch (_NSIG_WORDS) {
-       case 4: set->sig[3] = compat->sig[6] | (((long)compat->sig[7]) << 32);
-       case 3: set->sig[2] = compat->sig[4] | (((long)compat->sig[5]) << 32);
-       case 2: set->sig[1] = compat->sig[2] | (((long)compat->sig[3]) << 32);
-       case 1: set->sig[0] = compat->sig[0] | (((long)compat->sig[1]) << 32);
-       }
-}
-
-
-/*
- * Save the current user registers on the user stack.
- * We only save the altivec registers if the process has used
- * altivec instructions at some point.
- */
-static int save_user_regs(struct pt_regs *regs, struct mcontext32 *frame, int sigret)
-{
-       elf_greg_t64 *gregs = (elf_greg_t64 *)regs;
-       int i, err = 0;
-       
-       /* Make sure floating point registers are stored in regs */ 
-       if (regs->msr & MSR_FP)
-               giveup_fpu(current);
-       
-       /* save general and floating-point registers */
-       for (i = 0; i <= PT_RESULT; i ++)
-               err |= __put_user((unsigned int)gregs[i], &frame->mc_gregs[i]);
-       err |= __copy_to_user(&frame->mc_fregs, current->thread.fpr,
-                             ELF_NFPREG * sizeof(double));
-       if (err)
-               return 1;
-
-       current->thread.fpscr = 0;      /* turn off all fp exceptions */
-
-#ifdef CONFIG_ALTIVEC
-       /* save altivec registers */
-       if (current->thread.used_vr) {
-               if (regs->msr & MSR_VEC)
-                       giveup_altivec(current);
-               if (__copy_to_user(&frame->mc_vregs, current->thread.vr,
-                                  ELF_NVRREG32 * sizeof(vector128)))
-                       return 1;
-               /* set MSR_VEC in the saved MSR value to indicate that
-                  frame->mc_vregs contains valid data */
-               if (__put_user(regs->msr | MSR_VEC, &frame->mc_gregs[PT_MSR]))
-                       return 1;
-       }
-       /* else assert((regs->msr & MSR_VEC) == 0) */
-
-       /* We always copy to/from vrsave, it's 0 if we don't have or don't
-        * use altivec. Since VSCR only contains 32 bits saved in the least
-        * significant bits of a vector, we "cheat" and stuff VRSAVE in the
-        * most significant bits of that same vector. --BenH
+struct rt_sigframe_32 {
+       /*
+        * Unused space at start of frame to allow for storing of
+        * stack pointers
         */
-       if (__put_user(current->thread.vrsave, (u32 *)&frame->mc_vregs[32]))
-               return 1;
-#endif /* CONFIG_ALTIVEC */
-
-       if (sigret) {
-               /* Set up the sigreturn trampoline: li r0,sigret; sc */
-               if (__put_user(0x38000000UL + sigret, &frame->tramp[0])
-                   || __put_user(0x44000002UL, &frame->tramp[1]))
-                       return 1;
-               flush_icache_range((unsigned long) &frame->tramp[0],
-                                  (unsigned long) &frame->tramp[2]);
-       }
-
-       return 0;
-}
-
-/*
- * Restore the current user register values from the user stack,
- * (except for MSR).
- */
-static int restore_user_regs(struct pt_regs *regs, struct mcontext32 __user *sr, int sig)
-{
-       elf_greg_t64 *gregs = (elf_greg_t64 *)regs;
-       int i, err = 0;
-       unsigned int save_r2;
-#ifdef CONFIG_ALTIVEC
-       unsigned long msr;
-#endif
-
+       unsigned long _unused;
+       /*
+        * This is a 32 bit pointer in user address space 
+        * it is a pointer to the siginfo stucture in the rt stack frame 
+        */
+       u32 pinfo;
        /*
-        * restore general registers but not including MSR. Also take
-        * care of keeping r2 (TLS) intact if not a signal
+        * This is a 32 bit pointer in user address space
+        * it is a pointer to the user context in the rt stack frame
         */
-       if (!sig)
-               save_r2 = (unsigned int)regs->gpr[2];
-       for (i = 0; i < PT_MSR; i ++)
-               err |= __get_user(gregs[i], &sr->mc_gregs[i]);
-       for (i ++; i <= PT_RESULT; i ++)
-               err |= __get_user(gregs[i], &sr->mc_gregs[i]);
-       if (!sig)
-               regs->gpr[2] = (unsigned long) save_r2;
-       if (err)
-               return 1;
-
-       /* force the process to reload the FP registers from
-          current->thread when it next does FP instructions */
-       regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1);
-       if (__copy_from_user(current->thread.fpr, &sr->mc_fregs,
-                            sizeof(sr->mc_fregs)))
-               return 1;
-
-#ifdef CONFIG_ALTIVEC
-       /* force the process to reload the altivec registers from
-          current->thread when it next does altivec instructions */
-       regs->msr &= ~MSR_VEC;
-       if (!__get_user(msr, &sr->mc_gregs[PT_MSR]) && (msr & MSR_VEC) != 0) {
-               /* restore altivec registers from the stack */
-               if (__copy_from_user(current->thread.vr, &sr->mc_vregs,
-                                    sizeof(sr->mc_vregs)))
-                       return 1;
-       } else if (current->thread.used_vr)
-               memset(&current->thread.vr, 0, ELF_NVRREG32 * sizeof(vector128));
-
-       /* Always get VRSAVE back */
-       if (__get_user(current->thread.vrsave, (u32 *)&sr->mc_vregs[32]))
-               return 1;
-#endif /* CONFIG_ALTIVEC */
+       u32 puc;
+       struct siginfo32  info;
+       struct ucontext32 uc;
+};
 
-       return 0;
-}
 
 
 /*
@@ -269,7 +133,7 @@ long sys32_sigsuspend(old_sigset_t mask, int p2, int p3, int p4, int p6, int p7,
        regs->gpr[3] = EINTR;
        regs->ccr |= 0x10000000;
        while (1) {
-               set_current_state(TASK_INTERRUPTIBLE);
+               current->state = TASK_INTERRUPTIBLE;
                schedule();
                if (do_signal32(&saveset, regs))
                        /*
@@ -317,6 +181,209 @@ long sys32_sigaction(int sig, struct old_sigaction32 *act,
 }
 
 
+/*
+ * When we have signals to deliver, we set up on the
+ * user stack, going down from the original stack pointer:
+ *     a sigregs struct
+ *     one or more sigcontext structs
+ *     a gap of __SIGNAL_FRAMESIZE32 bytes
+ *
+ * Each of these things must be a multiple of 16 bytes in size.
+ *
+ */
+
+
+/*
+ * Do a signal return; undo the signal stack.
+ */
+long sys32_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
+                    unsigned long r6, unsigned long r7, unsigned long r8,
+                    struct pt_regs *regs)
+{
+       struct sigcontext32 *sc, sigctx;
+       struct sigregs32 *sr;
+       int ret;
+       elf_gregset_t32 saved_regs;  /* an array of ELF_NGREG unsigned ints (32 bits) */
+       sigset_t set;
+       int i;
+
+       sc = (struct sigcontext32 *)(regs->gpr[1] + __SIGNAL_FRAMESIZE32);
+       if (copy_from_user(&sigctx, sc, sizeof(sigctx)))
+               goto badframe;
+
+       /*
+        * Note that PPC32 puts the upper 32 bits of the sigmask in the
+        * unused part of the signal stackframe
+        */
+       set.sig[0] = sigctx.oldmask + ((long)(sigctx._unused[3]) << 32);
+       sigdelsetmask(&set, ~_BLOCKABLE);
+       spin_lock_irq(&current->sighand->siglock);
+       current->blocked = set;
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
+       if (regs->msr & MSR_FP )
+               giveup_fpu(current);
+       /* Last stacked signal - restore registers */
+       sr = (struct sigregs32*)(u64)sigctx.regs;
+       /*
+        * copy the 32 bit register values off the user stack
+        * into the 32 bit register area
+        */
+       if (copy_from_user(saved_regs, &sr->gp_regs, sizeof(sr->gp_regs)))
+               goto badframe;
+       /*
+        * The saved reg structure in the frame is an elf_grepset_t32,
+        * it is a 32 bit register save of the registers in the
+        * pt_regs structure that was stored on the kernel stack
+        * during the system call when the system call was interrupted
+        * for the signal. Only 32 bits are saved because the
+        * sigcontext contains a pointer to the regs and the sig
+        * context address is passed as a pointer to the signal
+        * handler.  
+        *
+        * The entries in the elf_grepset have the same index as the
+        * elements in the pt_regs structure.
+        */
+       saved_regs[PT_MSR] = (regs->msr & ~MSR_USERCHANGE)
+               | (saved_regs[PT_MSR] & MSR_USERCHANGE);
+       /*
+        * Register 2 is the kernel toc - should be reset on
+        * any calls into the kernel 
+        */
+       for (i = 0; i < 32; i++)
+               regs->gpr[i] = (u64)(saved_regs[i]) & 0xFFFFFFFF;
+
+       /*
+        *  restore the non gpr registers 
+        */
+       regs->msr = (u64)(saved_regs[PT_MSR]) & 0xFFFFFFFF;
+       /*
+        * Insure that the interrupt mode is 64 bit, during 32 bit
+        * execution. (This is necessary because we only saved
+        * lower 32 bits of msr.)
+        */
+       regs->msr = regs->msr | MSR_ISF;  /* When this thread is interrupted it should run in 64 bit mode. */
+
+       regs->nip = (u64)(saved_regs[PT_NIP]) & 0xFFFFFFFF;
+       regs->orig_gpr3 = (u64)(saved_regs[PT_ORIG_R3]) & 0xFFFFFFFF; 
+       regs->ctr = (u64)(saved_regs[PT_CTR]) & 0xFFFFFFFF; 
+       regs->link = (u64)(saved_regs[PT_LNK]) & 0xFFFFFFFF; 
+       regs->xer = (u64)(saved_regs[PT_XER]) & 0xFFFFFFFF; 
+       regs->ccr = (u64)(saved_regs[PT_CCR]) & 0xFFFFFFFF;
+       /* regs->softe is left unchanged (like the MSR.EE bit) */
+       /******************************************************/
+       /* the DAR and the DSISR are only relevant during a   */
+       /*   data or instruction storage interrupt. The value */
+       /*   will be set to zero.                             */
+       /******************************************************/
+       regs->dar = 0; 
+       regs->dsisr = 0;
+       regs->result = (u64)(saved_regs[PT_RESULT]) & 0xFFFFFFFF;
+
+       if (copy_from_user(current->thread.fpr, &sr->fp_regs,
+                          sizeof(sr->fp_regs)))
+               goto badframe;
+
+       ret = regs->result;
+       return ret;
+
+badframe:
+       do_exit(SIGSEGV);
+}      
+
+/*
+ * Set up a signal frame.
+ */
+static void setup_frame32(struct pt_regs *regs, struct sigregs32 *frame,
+            unsigned int newsp)
+{
+       struct sigcontext32 *sc = (struct sigcontext32 *)(u64)newsp;
+       int i;
+
+       /* Always make any pending restarted system calls return -EINTR */
+       current_thread_info()->restart_block.fn = do_no_restart_syscall;
+
+       if (verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
+               goto badframe;
+       if (regs->msr & MSR_FP)
+               giveup_fpu(current);
+
+       /*
+        * Copy the register contents for the pt_regs structure on the
+        *   kernel stack to the elf_gregset_t32 structure on the user
+        *   stack. This is a copy of 64 bit register values to 32 bit
+        *   register values. The high order 32 bits of the 64 bit
+        *   registers are not needed since a 32 bit application is
+        *   running and the saved registers are the contents of the
+        *   user registers at the time of a system call.
+        * 
+        * The values saved on the user stack will be restored into
+        *  the registers during the signal return processing
+        */
+       for (i = 0; i < 32; i++) {
+               if (__put_user((u32)regs->gpr[i], &frame->gp_regs[i]))
+                       goto badframe;
+       }
+
+       /*
+        * Copy the non gpr registers to the user stack
+        */
+       if (__put_user((u32)regs->gpr[PT_NIP], &frame->gp_regs[PT_NIP])
+           || __put_user((u32)regs->gpr[PT_MSR], &frame->gp_regs[PT_MSR])
+           || __put_user((u32)regs->gpr[PT_ORIG_R3], &frame->gp_regs[PT_ORIG_R3])
+           || __put_user((u32)regs->gpr[PT_CTR], &frame->gp_regs[PT_CTR])
+           || __put_user((u32)regs->gpr[PT_LNK], &frame->gp_regs[PT_LNK])
+           || __put_user((u32)regs->gpr[PT_XER], &frame->gp_regs[PT_XER])
+           || __put_user((u32)regs->gpr[PT_CCR], &frame->gp_regs[PT_CCR])
+#if 0
+           || __put_user((u32)regs->gpr[PT_MQ], &frame->gp_regs[PT_MQ])
+#endif
+           || __put_user((u32)regs->gpr[PT_RESULT], &frame->gp_regs[PT_RESULT]))
+               goto badframe;
+
+
+       /*
+        * Now copy the floating point registers onto the user stack 
+        *
+        * Also set up so on the completion of the signal handler, the
+        * sys_sigreturn will get control to reset the stack
+        */
+       if (__copy_to_user(&frame->fp_regs, current->thread.fpr,
+                          ELF_NFPREG * sizeof(double))
+           /* li r0, __NR_sigreturn */
+           || __put_user(0x38000000U + __NR_sigreturn, &frame->tramp[0])
+           /* sc */
+           || __put_user(0x44000002U, &frame->tramp[1]))
+               goto badframe;
+       flush_icache_range((unsigned long)&frame->tramp[0],
+                          (unsigned long)&frame->tramp[2]);
+       current->thread.fpscr = 0;      /* turn off all fp exceptions */
+
+       newsp -= __SIGNAL_FRAMESIZE32;
+       if (put_user(regs->gpr[1], (u32*)(u64)newsp)
+           || get_user(regs->nip, &sc->handler)
+           || get_user(regs->gpr[3], &sc->signal))
+               goto badframe;
+
+       regs->gpr[1] = newsp & 0xFFFFFFFF;
+       /*
+        * first parameter to the signal handler is the signal number
+        *  - the value is in gpr3
+        * second parameter to the signal handler is the sigcontext
+        *   - set the value into gpr4
+        */
+       regs->gpr[4] = (unsigned long) sc;
+       regs->link = (unsigned long) frame->tramp;
+       return;
+
+badframe:
+#if DEBUG_SIG
+       printk("badframe in setup_frame32, regs=%p frame=%p newsp=%lx\n",
+              regs, frame, newsp);
+#endif
+       do_exit(SIGSEGV);
+}
+
 
 /*
  *  Start of RT signal support
@@ -338,6 +405,115 @@ long sys32_sigaction(int sig, struct old_sigaction32 *act,
  *        siginfo32to64
  */
 
+/*
+ * This code executes after the rt signal handler in 32 bit mode has
+ * completed and returned  
+ */
+long sys32_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,
+                       unsigned long r6, unsigned long r7, unsigned long r8,
+                       struct pt_regs * regs)
+{
+       struct rt_sigframe_32 *rt_sf;
+       struct sigcontext32 sigctx;
+       struct sigregs32 *sr;
+       int ret;
+       elf_gregset_t32 saved_regs;   /* an array of 32 bit register values */
+       sigset_t set; 
+       stack_t st;
+       int i;
+       mm_segment_t old_fs;
+
+       /* Always make any pending restarted system calls return -EINTR */
+       current_thread_info()->restart_block.fn = do_no_restart_syscall;
+
+       /* Adjust the inputted reg1 to point to the first rt signal frame */
+       rt_sf = (struct rt_sigframe_32 *)(regs->gpr[1] + __SIGNAL_FRAMESIZE32);
+       /* Copy the information from the user stack  */
+       if (copy_from_user(&sigctx, &rt_sf->uc.uc_mcontext, sizeof(sigctx))
+           || copy_from_user(&set, &rt_sf->uc.uc_sigmask, sizeof(set))
+           || copy_from_user(&st,&rt_sf->uc.uc_stack, sizeof(st)))
+               goto badframe;
+
+       /*
+        * Unblock the signal that was processed 
+        *   After a signal handler runs - 
+        *     if the signal is blockable - the signal will be unblocked  
+        *       (sigkill and sigstop are not blockable)
+        */
+       sigdelsetmask(&set, ~_BLOCKABLE); 
+       /* update the current based on the sigmask found in the rt_stackframe */
+       spin_lock_irq(&current->sighand->siglock);
+       current->blocked = set;
+       recalc_sigpending();
+       spin_unlock_irq(&current->sighand->siglock);
+
+       /* If currently owning the floating point - give them up */
+       if (regs->msr & MSR_FP)
+               giveup_fpu(current);
+       /*
+        * Set to point to the next rt_sigframe - this is used to
+        * determine whether this is the last signal to process
+        */
+       sr = (struct sigregs32 *)(u64)sigctx.regs;
+       if (copy_from_user(saved_regs, &sr->gp_regs, sizeof(sr->gp_regs))) 
+               goto badframe;
+       /*
+        * The saved reg structure in the frame is an elf_grepset_t32,
+        * it is a 32 bit register save of the registers in the
+        * pt_regs structure that was stored on the kernel stack
+        * during the system call when the system call was interrupted
+        * for the signal. Only 32 bits are saved because the
+        * sigcontext contains a pointer to the regs and the sig
+        * context address is passed as a pointer to the signal handler
+        *
+        * The entries in the elf_grepset have the same index as
+        * the elements in the pt_regs structure.
+        */
+       saved_regs[PT_MSR] = (regs->msr & ~MSR_USERCHANGE)
+               | (saved_regs[PT_MSR] & MSR_USERCHANGE);
+       /*
+        * Register 2 is the kernel toc - should be reset on any
+        * calls into the kernel
+        */
+       for (i = 0; i < 32; i++)
+               regs->gpr[i] = (u64)(saved_regs[i]) & 0xFFFFFFFF;
+       /*
+        * restore the non gpr registers
+        */
+       regs->msr = (u64)(saved_regs[PT_MSR]) & 0xFFFFFFFF;
+       regs->nip = (u64)(saved_regs[PT_NIP]) & 0xFFFFFFFF;
+       regs->orig_gpr3 = (u64)(saved_regs[PT_ORIG_R3]) & 0xFFFFFFFF; 
+       regs->ctr = (u64)(saved_regs[PT_CTR]) & 0xFFFFFFFF; 
+       regs->link = (u64)(saved_regs[PT_LNK]) & 0xFFFFFFFF; 
+       regs->xer = (u64)(saved_regs[PT_XER]) & 0xFFFFFFFF; 
+       regs->ccr = (u64)(saved_regs[PT_CCR]) & 0xFFFFFFFF;
+       /* regs->softe is left unchanged (like MSR.EE) */
+       /*
+        * the DAR and the DSISR are only relevant during a
+        *   data or instruction storage interrupt. The value
+        *   will be set to zero.
+        */
+       regs->dar = 0; 
+       regs->dsisr = 0;
+       regs->result = (u64)(saved_regs[PT_RESULT]) & 0xFFFFFFFF;
+       if (copy_from_user(current->thread.fpr, &sr->fp_regs,
+                          sizeof(sr->fp_regs)))
+               goto badframe;
+       /* This function sets back the stack flags into
+          the current task structure.  */
+       old_fs = get_fs();
+       set_fs(KERNEL_DS);
+       do_sigaltstack(&st, NULL, regs->gpr[1]);
+       set_fs(old_fs);
+
+       ret = regs->result;
+       return ret;
+
+ badframe:
+       do_exit(SIGSEGV);     
+}
+
+
 
 long sys32_rt_sigaction(int sig, const struct sigaction32 *act,
                struct sigaction32 *oact, size_t sigsetsize)
@@ -354,7 +530,16 @@ long sys32_rt_sigaction(int sig, const struct sigaction32 *act,
                ret = get_user((long)new_ka.sa.sa_handler, &act->sa_handler);
                ret |= __copy_from_user(&set32, &act->sa_mask,
                                        sizeof(compat_sigset_t));
-               sigset_from_compat(&new_ka.sa.sa_mask, &set32);
+               switch (_NSIG_WORDS) {
+               case 4: new_ka.sa.sa_mask.sig[3] = set32.sig[6]
+                               | (((long)set32.sig[7]) << 32);
+               case 3: new_ka.sa.sa_mask.sig[2] = set32.sig[4]
+                               | (((long)set32.sig[5]) << 32);
+               case 2: new_ka.sa.sa_mask.sig[1] = set32.sig[2]
+                               | (((long)set32.sig[3]) << 32);
+               case 1: new_ka.sa.sa_mask.sig[0] = set32.sig[0]
+                               | (((long)set32.sig[1]) << 32);
+               }
                ret |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
                if (ret)
                        return -EFAULT;
@@ -362,7 +547,20 @@ long sys32_rt_sigaction(int sig, const struct sigaction32 *act,
 
        ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
        if (!ret && oact) {
-               compat_from_sigset(&set32, &old_ka.sa.sa_mask);
+               switch (_NSIG_WORDS) {
+               case 4:
+                       set32.sig[7] = (old_ka.sa.sa_mask.sig[3] >> 32);
+                       set32.sig[6] = old_ka.sa.sa_mask.sig[3];
+               case 3:
+                       set32.sig[5] = (old_ka.sa.sa_mask.sig[2] >> 32);
+                       set32.sig[4] = old_ka.sa.sa_mask.sig[2];
+               case 2:
+                       set32.sig[3] = (old_ka.sa.sa_mask.sig[1] >> 32);
+                       set32.sig[2] = old_ka.sa.sa_mask.sig[1];
+               case 1:
+                       set32.sig[1] = (old_ka.sa.sa_mask.sig[0] >> 32);
+                       set32.sig[0] = old_ka.sa.sa_mask.sig[0];
+               }
                ret = put_user((long)old_ka.sa.sa_handler, &oact->sa_handler);
                ret |= __copy_to_user(&oact->sa_mask, &set32,
                                      sizeof(compat_sigset_t));
@@ -388,8 +586,14 @@ long sys32_rt_sigprocmask(u32 how, compat_sigset_t *set,
 
        if (set) {
                if (copy_from_user (&s32, set, sizeof(compat_sigset_t)))
-                       return -EFAULT;    
-               sigset_from_compat(&s, &s32);
+                       return -EFAULT;
+    
+               switch (_NSIG_WORDS) {
+               case 4: s.sig[3] = s32.sig[6] | (((long)s32.sig[7]) << 32);
+               case 3: s.sig[2] = s32.sig[4] | (((long)s32.sig[5]) << 32);
+               case 2: s.sig[1] = s32.sig[2] | (((long)s32.sig[3]) << 32);
+               case 1: s.sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32);
+               }
        }
        
        set_fs(KERNEL_DS);
@@ -399,7 +603,12 @@ long sys32_rt_sigprocmask(u32 how, compat_sigset_t *set,
        if (ret)
                return ret;
        if (oset) {
-               compat_from_sigset(&s32, &s);
+               switch (_NSIG_WORDS) {
+               case 4: s32.sig[7] = (s.sig[3] >> 32); s32.sig[6] = s.sig[3];
+               case 3: s32.sig[5] = (s.sig[2] >> 32); s32.sig[4] = s.sig[2];
+               case 2: s32.sig[3] = (s.sig[1] >> 32); s32.sig[2] = s.sig[1];
+               case 1: s32.sig[1] = (s.sig[0] >> 32); s32.sig[0] = s.sig[0];
+               }
                if (copy_to_user (oset, &s32, sizeof(compat_sigset_t)))
                        return -EFAULT;
        }
@@ -417,7 +626,12 @@ long sys32_rt_sigpending(compat_sigset_t *set, compat_size_t sigsetsize)
        ret = sys_rt_sigpending(&s, sigsetsize);
        set_fs(old_fs);
        if (!ret) {
-               compat_from_sigset(&s32, &s);
+               switch (_NSIG_WORDS) {
+               case 4: s32.sig[7] = (s.sig[3] >> 32); s32.sig[6] = s.sig[3];
+               case 3: s32.sig[5] = (s.sig[2] >> 32); s32.sig[4] = s.sig[2];
+               case 2: s32.sig[3] = (s.sig[1] >> 32); s32.sig[2] = s.sig[1];
+               case 1: s32.sig[1] = (s.sig[0] >> 32); s32.sig[0] = s.sig[0];
+               }
                if (copy_to_user (set, &s32, sizeof(compat_sigset_t)))
                        return -EFAULT;
        }
@@ -425,7 +639,7 @@ long sys32_rt_sigpending(compat_sigset_t *set, compat_size_t sigsetsize)
 }
 
 
-static int copy_siginfo_to_user32(compat_siginfo_t *d, siginfo_t *s)
+static int copy_siginfo_to_user32(siginfo_t32 *d, siginfo_t *s)
 {
        int err;
 
@@ -467,7 +681,7 @@ static int copy_siginfo_to_user32(compat_siginfo_t *d, siginfo_t *s)
        return err;
 }
 
-long sys32_rt_sigtimedwait(compat_sigset_t *uthese, compat_siginfo_t *uinfo,
+long sys32_rt_sigtimedwait(compat_sigset_t *uthese, siginfo_t32 *uinfo,
                struct compat_timespec *uts, compat_size_t sigsetsize)
 {
        sigset_t s;
@@ -479,7 +693,12 @@ long sys32_rt_sigtimedwait(compat_sigset_t *uthese, compat_siginfo_t *uinfo,
 
        if (copy_from_user(&s32, uthese, sizeof(compat_sigset_t)))
                return -EFAULT;
-       sigset_from_compat(&s, &s32);
+       switch (_NSIG_WORDS) {
+       case 4: s.sig[3] = s32.sig[6] | (((long)s32.sig[7]) << 32);
+       case 3: s.sig[2] = s32.sig[4] | (((long)s32.sig[5]) << 32);
+       case 2: s.sig[1] = s32.sig[2] | (((long)s32.sig[3]) << 32);
+       case 1: s.sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32);
+       }
        if (uts && get_compat_timespec(&t, uts))
                return -EFAULT;
        set_fs(KERNEL_DS);
@@ -495,7 +714,7 @@ long sys32_rt_sigtimedwait(compat_sigset_t *uthese, compat_siginfo_t *uinfo,
 
 
 
-static siginfo_t * siginfo32to64(siginfo_t *d, compat_siginfo_t *s)
+static siginfo_t * siginfo32to64(siginfo_t *d, siginfo_t32 *s)
 {
        d->si_signo = s->si_signo;
        d->si_errno = s->si_errno;
@@ -539,14 +758,14 @@ static siginfo_t * siginfo32to64(siginfo_t *d, compat_siginfo_t *s)
  * (msr in 32-bit mode) and the register representation of a signed int
  * (msr in 64-bit mode) is performed.
  */
-long sys32_rt_sigqueueinfo(u32 pid, u32 sig, compat_siginfo_t *uinfo)
+long sys32_rt_sigqueueinfo(u32 pid, u32 sig, siginfo_t32 *uinfo)
 {
        siginfo_t info;
-       compat_siginfo_t info32;
+       siginfo_t32 info32;
        int ret;
        mm_segment_t old_fs = get_fs();
        
-       if (copy_from_user (&info32, uinfo, sizeof(compat_siginfo_t)))
+       if (copy_from_user (&info32, uinfo, sizeof(siginfo_t32)))
                return -EFAULT;
        /* XXX: Is this correct? */
        siginfo32to64(&info, &info32);
@@ -574,9 +793,15 @@ int sys32_rt_sigsuspend(compat_sigset_t* unewset, size_t sigsetsize, int p3,
         * Swap the 2 words of the 64-bit sigset_t (they are stored
         * in the "wrong" endian in 32-bit user storage).
         */
-       sigset_from_compat(&newset, &s32);
+       switch (_NSIG_WORDS) {
+       case 4: newset.sig[3] = s32.sig[6] | (((long)s32.sig[7]) << 32);
+       case 3: newset.sig[2] = s32.sig[4] | (((long)s32.sig[5]) << 32);
+       case 2: newset.sig[1] = s32.sig[2] | (((long)s32.sig[3]) << 32);
+       case 1: newset.sig[0] = s32.sig[0] | (((long)s32.sig[1]) << 32);
+       }
 
        sigdelsetmask(&newset, ~_BLOCKABLE);
+
        spin_lock_irq(&current->sighand->siglock);
        saveset = current->blocked;
        current->blocked = newset;
@@ -587,7 +812,7 @@ int sys32_rt_sigsuspend(compat_sigset_t* unewset, size_t sigsetsize, int p3,
        regs->gpr[3] = EINTR;
        regs->ccr |= 0x10000000;
        while (1) {
-               set_current_state(TASK_INTERRUPTIBLE);
+               current->state = TASK_INTERRUPTIBLE;
                schedule();
                if (do_signal32(&saveset, regs))
                        /*
@@ -602,324 +827,237 @@ int sys32_rt_sigsuspend(compat_sigset_t* unewset, size_t sigsetsize, int p3,
        }
 }
 
+
 /*
- *  Start Alternate signal stack support
- *
- *  System Calls
- *       sigaltatck               sys32_sigaltstack
+ * Set up a rt signal frame.
  */
-
-int sys32_sigaltstack(u32 newstack, u32 oldstack, int r5,
-                     int r6, int r7, int r8, struct pt_regs *regs)
+static void setup_rt_frame32(struct pt_regs *regs, struct sigregs32 *frame,
+            unsigned int newsp)
 {
-       stack_t uss, uoss;
-       int ret;
-       mm_segment_t old_fs;
-       unsigned long sp;
+       unsigned int copyreg4, copyreg5;
+       struct rt_sigframe_32 * rt_sf = (struct rt_sigframe_32 *) (u64)newsp;
+       int i;
+  
+       if (verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
+               goto badframe;
+       if (regs->msr & MSR_FP)
+               giveup_fpu(current);
 
        /*
-        * set sp to the user stack on entry to the system call
-        * the system call router sets R9 to the saved registers
+        * Copy the register contents for the pt_regs structure on the
+        *   kernel stack to the elf_gregset_t32 structure on the user
+        *   stack. This is a copy of 64 bit register values to 32 bit
+        *   register values. The high order 32 bits of the 64 bit
+        *   registers are not needed since a 32 bit application is
+        *   running and the saved registers are the contents of the
+        *   user registers at the time of a system call.
+        *
+        * The values saved on the user stack will be restored into
+        *  the registers during the signal return processing
         */
-       sp = regs->gpr[1];
-
-       /* Put new stack info in local 64 bit stack struct */
-       if (newstack &&
-               (get_user((long)uss.ss_sp,
-                         &((stack_32_t *)(long)newstack)->ss_sp) ||
-                __get_user(uss.ss_flags,
-                        &((stack_32_t *)(long)newstack)->ss_flags) ||
-                __get_user(uss.ss_size,
-                        &((stack_32_t *)(long)newstack)->ss_size)))
-               return -EFAULT; 
-
-       old_fs = get_fs();
-       set_fs(KERNEL_DS);
-       ret = do_sigaltstack(newstack ? &uss : NULL, oldstack ? &uoss : NULL,
-                       sp);
-       set_fs(old_fs);
-       /* Copy the stack information to the user output buffer */
-       if (!ret && oldstack  &&
-               (put_user((long)uoss.ss_sp,
-                         &((stack_32_t *)(long)oldstack)->ss_sp) ||
-                __put_user(uoss.ss_flags,
-                        &((stack_32_t *)(long)oldstack)->ss_flags) ||
-                __put_user(uoss.ss_size,
-                        &((stack_32_t *)(long)oldstack)->ss_size)))
-               return -EFAULT;
-       return ret;
-}
-
-
-/*
- * Set up a signal frame for a "real-time" signal handler
- * (one which gets siginfo).
- */
-static void handle_rt_signal32(unsigned long sig, struct k_sigaction *ka,
-                              siginfo_t *info, sigset_t *oldset,
-                              struct pt_regs * regs, unsigned long newsp)
-{
-       struct rt_sigframe32 __user *rt_sf;
-       struct mcontext32 __user *frame;
-       unsigned long origsp = newsp;
-       compat_sigset_t c_oldset;
+       for (i = 0; i < 32; i++) {
+               if (__put_user((u32)regs->gpr[i], &frame->gp_regs[i]))
+                       goto badframe;
+       }
 
-       /* Set up Signal Frame */
-       /* Put a Real Time Context onto stack */
-       newsp -= sizeof(*rt_sf);
-       rt_sf = (struct rt_sigframe32 __user *)newsp;
+       /*
+        * Copy the non gpr registers to the user stack
+        */
+       if (__put_user((u32)regs->gpr[PT_NIP], &frame->gp_regs[PT_NIP])
+           || __put_user((u32)regs->gpr[PT_MSR], &frame->gp_regs[PT_MSR])
+           || __put_user((u32)regs->gpr[PT_ORIG_R3], &frame->gp_regs[PT_ORIG_R3])
+           || __put_user((u32)regs->gpr[PT_CTR], &frame->gp_regs[PT_CTR])
+           || __put_user((u32)regs->gpr[PT_LNK], &frame->gp_regs[PT_LNK])
+           || __put_user((u32)regs->gpr[PT_XER], &frame->gp_regs[PT_XER])
+           || __put_user((u32)regs->gpr[PT_CCR], &frame->gp_regs[PT_CCR])
+           || __put_user((u32)regs->gpr[PT_RESULT], &frame->gp_regs[PT_RESULT]))
+               goto badframe;
 
-       /* create a stack frame for the caller of the handler */
-       newsp -= __SIGNAL_FRAMESIZE32 + 16;
 
-       if (verify_area(VERIFY_WRITE, (void __user *)newsp, origsp - newsp))
+       /*
+        * Now copy the floating point registers onto the user stack
+        *
+        * Also set up so on the completion of the signal handler, the
+        * sys_sigreturn will get control to reset the stack
+        */
+       if (__copy_to_user(&frame->fp_regs, current->thread.fpr,
+                          ELF_NFPREG * sizeof(double))
+           || __put_user(0x38000000U + __NR_rt_sigreturn, &frame->tramp[0])    /* li r0, __NR_rt_sigreturn */
+           || __put_user(0x44000002U, &frame->tramp[1]))   /* sc */
                goto badframe;
 
-       compat_from_sigset(&c_oldset, oldset);
-
-       /* Put the siginfo & fill in most of the ucontext */
-       if (copy_siginfo_to_user32(&rt_sf->info, info)
-           || __put_user(0, &rt_sf->uc.uc_flags)
-           || __put_user(0, &rt_sf->uc.uc_link)
-           || __put_user(current->sas_ss_sp, &rt_sf->uc.uc_stack.ss_sp)
-           || __put_user(sas_ss_flags(regs->gpr[1]),
-                         &rt_sf->uc.uc_stack.ss_flags)
-           || __put_user(current->sas_ss_size, &rt_sf->uc.uc_stack.ss_size)
-           || __put_user((u32)(u64)&rt_sf->uc.uc_mcontext, &rt_sf->uc.uc_regs)
-           || __copy_to_user(&rt_sf->uc.uc_sigmask, &c_oldset, sizeof(c_oldset)))
-               goto badframe;
+       flush_icache_range((unsigned long) &frame->tramp[0],
+                          (unsigned long) &frame->tramp[2]);
+       current->thread.fpscr = 0;      /* turn off all fp exceptions */
 
-       /* Save user registers on the stack */
-       frame = &rt_sf->uc.uc_mcontext;
-       if (save_user_regs(regs, frame, __NR_rt_sigreturn))
-               goto badframe;
+       /*
+        * Retrieve rt_sigframe from stack and
+        * set up registers for signal handler
+        */
+       newsp -= __SIGNAL_FRAMESIZE32;
+      
 
-       if (put_user(regs->gpr[1], (unsigned long __user *)newsp))
+       if (put_user((u32)(regs->gpr[1]), (unsigned int *)(u64)newsp)
+           || get_user(regs->nip, &rt_sf->uc.uc_mcontext.handler)
+           || get_user(regs->gpr[3], &rt_sf->uc.uc_mcontext.signal)
+           || get_user(copyreg4, &rt_sf->pinfo)
+           || get_user(copyreg5, &rt_sf->puc))
                goto badframe;
-       regs->gpr[1] = (unsigned long) newsp;
-       regs->gpr[3] = sig;
-       regs->gpr[4] = (unsigned long) &rt_sf->info;
-       regs->gpr[5] = (unsigned long) &rt_sf->uc;
+
+       regs->gpr[4] = copyreg4;
+       regs->gpr[5] = copyreg5;
+       regs->gpr[1] = newsp;
        regs->gpr[6] = (unsigned long) rt_sf;
-       regs->nip = (unsigned long) ka->sa.sa_handler;
        regs->link = (unsigned long) frame->tramp;
-       regs->trap = 0;
 
        return;
 
 badframe:
 #if DEBUG_SIG
-       printk("badframe in handle_rt_signal, regs=%p frame=%p newsp=%lx\n",
+       printk("badframe in setup_frame32, regs=%p frame=%p newsp=%lx\n",
               regs, frame, newsp);
 #endif
-       if (sig == SIGSEGV)
-               ka->sa.sa_handler = SIG_DFL;
-       force_sig(SIGSEGV, current);
+       do_exit(SIGSEGV);
 }
 
-static long do_setcontext32(struct ucontext32 __user *ucp, struct pt_regs *regs, int sig)
-{
-       compat_sigset_t c_set;
-       sigset_t set;
-       u32 mcp;
-
-       if (__copy_from_user(&c_set, &ucp->uc_sigmask, sizeof(c_set))
-           || __get_user(mcp, &ucp->uc_regs))
-               return -EFAULT;
-       sigset_from_compat(&set, &c_set);
-       restore_sigmask(&set);
-       if (restore_user_regs(regs, (struct mcontext32 *)(u64)mcp, sig))
-               return -EFAULT;
-
-       return 0;
-}
 
 /*
- * Handle {get,set,swap}_context operations for 32 bits processes
+ * OK, we're invoking a handler
  */
-
-long sys32_swapcontext(struct ucontext32 __user *old_ctx,
-                      struct ucontext32 __user *new_ctx,
-                      int ctx_size, int r6, int r7, int r8, struct pt_regs *regs)
+static void handle_signal32(unsigned long sig, siginfo_t *info,
+               sigset_t *oldset, struct pt_regs * regs, unsigned int *newspp,
+               unsigned int frame)
 {
-       unsigned char tmp;
-       compat_sigset_t c_set;
-
-       /* Context size is for future use. Right now, we only make sure
-        * we are passed something we understand
-        */
-       if (ctx_size < sizeof(struct ucontext32))
-               return -EINVAL;
-
-       if (old_ctx != NULL) {
-               compat_from_sigset(&c_set, &current->blocked);
-               if (verify_area(VERIFY_WRITE, old_ctx, sizeof(*old_ctx))
-                   || save_user_regs(regs, &old_ctx->uc_mcontext, 0)
-                   || __copy_to_user(&old_ctx->uc_sigmask, &c_set, sizeof(c_set))
-                   || __put_user((u32)(u64)&old_ctx->uc_mcontext, &old_ctx->uc_regs))
-                       return -EFAULT;
+       struct sigcontext32 *sc;
+       struct rt_sigframe_32 *rt_sf;
+       struct k_sigaction *ka = &current->sighand->action[sig-1];
+
+       if (regs->trap == 0x0C00 /* System Call! */
+           && ((int)regs->result == -ERESTARTNOHAND ||
+               (int)regs->result == -ERESTART_RESTARTBLOCK ||
+               ((int)regs->result == -ERESTARTSYS &&
+                !(ka->sa.sa_flags & SA_RESTART)))) {
+               if ((int)regs->result == -ERESTART_RESTARTBLOCK)
+                       current_thread_info()->restart_block.fn
+                               = do_no_restart_syscall;
+               regs->result = -EINTR;
        }
-       if (new_ctx == NULL)
-               return 0;
-       if (verify_area(VERIFY_READ, new_ctx, sizeof(*new_ctx))
-           || __get_user(tmp, (u8 *) new_ctx)
-           || __get_user(tmp, (u8 *) (new_ctx + 1) - 1))
-               return -EFAULT;
 
        /*
-        * If we get a fault copying the context into the kernel's
-        * image of the user's registers, we can't just return -EFAULT
-        * because the user's registers will be corrupted.  For instance
-        * the NIP value may have been updated but not some of the
-        * other registers.  Given that we have done the verify_area
-        * and successfully read the first and last bytes of the region
-        * above, this should only happen in an out-of-memory situation
-        * or if another thread unmaps the region containing the context.
-        * We kill the task with a SIGSEGV in this situation.
+        * Set up the signal frame
+        * Determine if a real time frame and a siginfo is required
         */
-       if (do_setcontext32(new_ctx, regs, 0))
-               do_exit(SIGSEGV);
-
-       return 0;
-}
-
-long sys32_rt_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
-                    struct pt_regs *regs)
-{
-       struct rt_sigframe32 __user *rt_sf;
-       int ret;
-
-
-       /* Always make any pending restarted system calls return -EINTR */
-       current_thread_info()->restart_block.fn = do_no_restart_syscall;
-
-       rt_sf = (struct rt_sigframe32 __user *)
-               (regs->gpr[1] + __SIGNAL_FRAMESIZE32 + 16);
-       if (verify_area(VERIFY_READ, rt_sf, sizeof(*rt_sf)))
-               goto bad;
-       if (do_setcontext32(&rt_sf->uc, regs, 1))
-               goto bad;
-
-       /*
-        * It's not clear whether or why it is desirable to save the
-        * sigaltstack setting on signal delivery and restore it on
-        * signal return.  But other architectures do this and we have
-        * always done it up until now so it is probably better not to
-        * change it.  -- paulus
-        * We use the sys32_ version that does the 32/64 bits conversion
-        * and takes userland pointer directly. What about error checking ?
-        * nobody does any...
-        */
-               sys32_sigaltstack((u32)(u64)&rt_sf->uc.uc_stack, 0, 0, 0, 0, 0, regs);
-
-       regs->result &= 0xFFFFFFFF;
-       ret = regs->result;
-
-       return ret;
-
- bad:
-       force_sig(SIGSEGV, current);
-       return 0;
-}
-
-
-/*
- * OK, we're invoking a handler
- */
-static void handle_signal32(unsigned long sig, struct k_sigaction *ka,
-                           siginfo_t *info, sigset_t *oldset,
-                           struct pt_regs * regs, unsigned long newsp)
-{
-       struct sigcontext32 __user *sc;
-       struct sigregs32 __user *frame;
-       unsigned long origsp = newsp;
-
-       /* Set up Signal Frame */
-       newsp -= sizeof(struct sigregs32);
-       frame = (struct sigregs32 __user *) newsp;
-
-       /* Put a sigcontext on the stack */
-       newsp -= sizeof(*sc);
-       sc = (struct sigcontext32 __user *) newsp;
-
-       /* create a stack frame for the caller of the handler */
-       newsp -= __SIGNAL_FRAMESIZE32;
-
-       if (verify_area(VERIFY_WRITE, (void *) newsp, origsp - newsp))
-               goto badframe;
-
-#if _NSIG != 64
-#error "Please adjust handle_signal32()"
-#endif
-       if (__put_user((u32)(u64)ka->sa.sa_handler, &sc->handler)
-           || __put_user(oldset->sig[0], &sc->oldmask)
-           || __put_user((oldset->sig[0] >> 32), &sc->_unused[3])
-           || __put_user((u32)(u64)frame, &sc->regs)
-           || __put_user(sig, &sc->signal))
-               goto badframe;
-
-       if (save_user_regs(regs, &frame->mctx, __NR_sigreturn))
-               goto badframe;
+       if (ka->sa.sa_flags & SA_SIGINFO) {
+               *newspp -= sizeof(*rt_sf);
+               rt_sf = (struct rt_sigframe_32 *)(u64)(*newspp);
+               if (verify_area(VERIFY_WRITE, rt_sf, sizeof(*rt_sf)))
+                       goto badframe;
+               if (__put_user((u32)(u64)ka->sa.sa_handler,
+                                       &rt_sf->uc.uc_mcontext.handler)
+                   || __put_user((u32)(u64)&rt_sf->info, &rt_sf->pinfo)
+                   || __put_user((u32)(u64)&rt_sf->uc, &rt_sf->puc)
+                   /*  put the siginfo on the user stack                    */
+                   || copy_siginfo_to_user32(&rt_sf->info, info)
+                   /*  set the ucontext on the user stack                   */ 
+                   || __put_user(0, &rt_sf->uc.uc_flags)
+                   || __put_user(0, &rt_sf->uc.uc_link)
+                   || __put_user(current->sas_ss_sp, &rt_sf->uc.uc_stack.ss_sp)
+                   || __put_user(sas_ss_flags(regs->gpr[1]),
+                           &rt_sf->uc.uc_stack.ss_flags)
+                   || __put_user(current->sas_ss_size,
+                           &rt_sf->uc.uc_stack.ss_size)
+                   || __copy_to_user(&rt_sf->uc.uc_sigmask,
+                           oldset, sizeof(*oldset))
+                   /* point the mcontext.regs to the pramble register frame  */
+                   || __put_user(frame, &rt_sf->uc.uc_mcontext.regs)
+                   || __put_user(sig,&rt_sf->uc.uc_mcontext.signal))
+                       goto badframe; 
+       } else {
+               /* Put a sigcontext on the stack */
+               *newspp -= sizeof(*sc);
+               sc = (struct sigcontext32 *)(u64)*newspp;
+               if (verify_area(VERIFY_WRITE, sc, sizeof(*sc)))
+                       goto badframe;
+               /*
+                * Note the upper 32 bits of the signal mask are stored
+                * in the unused part of the signal stack frame
+                */
+               if (__put_user((u32)(u64)ka->sa.sa_handler, &sc->handler)
+                   || __put_user(oldset->sig[0], &sc->oldmask)
+                   || __put_user((oldset->sig[0] >> 32), &sc->_unused[3])
+                   || __put_user((unsigned int)frame, &sc->regs)
+                   || __put_user(sig, &sc->signal))
+                       goto badframe;
+       }
 
-       if (put_user(regs->gpr[1], (unsigned long __user *)newsp))
-               goto badframe;
-       regs->gpr[1] = (unsigned long) newsp;
-       regs->gpr[3] = sig;
-       regs->gpr[4] = (unsigned long) sc;
-       regs->nip = (unsigned long) ka->sa.sa_handler;
-       regs->link = (unsigned long) frame->mctx.tramp;
-       regs->trap = 0;
+       if (ka->sa.sa_flags & SA_ONESHOT)
+               ka->sa.sa_handler = SIG_DFL;
 
+       if (!(ka->sa.sa_flags & SA_NODEFER)) {
+               spin_lock_irq(&current->sighand->siglock);
+               sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
+               sigaddset(&current->blocked,sig);
+               recalc_sigpending();
+               spin_unlock_irq(&current->sighand->siglock);
+       }
        return;
 
 badframe:
 #if DEBUG_SIG
-       printk("badframe in handle_signal, regs=%p frame=%x newsp=%x\n",
+       printk("badframe in handle_signal32, regs=%p frame=%lx newsp=%lx\n",
               regs, frame, *newspp);
+       printk("sc=%p sig=%d ka=%p info=%p oldset=%p\n", sc, sig, ka, info, oldset);
 #endif
-       if (sig == SIGSEGV)
-               ka->sa.sa_handler = SIG_DFL;
-       force_sig(SIGSEGV, current);
+       do_exit(SIGSEGV);
 }
 
+
 /*
- * Do a signal return; undo the signal stack.
+ *  Start Alternate signal stack support
+ *
+ *  System Calls
+ *       sigaltatck               sys32_sigaltstack
  */
-long sys32_sigreturn(int r3, int r4, int r5, int r6, int r7, int r8,
-                      struct pt_regs *regs)
+
+int sys32_sigaltstack(u32 newstack, u32 oldstack, int p3,
+                     int p4, int p6, int p7, struct pt_regs *regs)
 {
-       struct sigcontext32 __user *sc;
-       struct sigcontext32 sigctx;
-       struct mcontext32 __user *sr;
-       sigset_t set;
+       stack_t uss, uoss;
        int ret;
-
-       /* Always make any pending restarted system calls return -EINTR */
-       current_thread_info()->restart_block.fn = do_no_restart_syscall;
-
-       sc = (struct sigcontext32 __user *)(regs->gpr[1] + __SIGNAL_FRAMESIZE32);
-       if (copy_from_user(&sigctx, sc, sizeof(sigctx)))
-               goto badframe;
+       mm_segment_t old_fs;
+       unsigned long sp;
 
        /*
-        * Note that PPC32 puts the upper 32 bits of the sigmask in the
-        * unused part of the signal stackframe
+        * set sp to the user stack on entry to the system call
+        * the system call router sets R9 to the saved registers
         */
-       set.sig[0] = sigctx.oldmask + ((long)(sigctx._unused[3]) << 32);
-       restore_sigmask(&set);
+       sp = regs->gpr[1];
 
-       sr = (struct mcontext32 *)(u64)sigctx.regs;
-       if (verify_area(VERIFY_READ, sr, sizeof(*sr))
-           || restore_user_regs(regs, sr, 1))
-               goto badframe;
+       /* Put new stack info in local 64 bit stack struct */
+       if (newstack &&
+               (get_user((long)uss.ss_sp,
+                         &((stack_32_t *)(long)newstack)->ss_sp) ||
+                __get_user(uss.ss_flags,
+                        &((stack_32_t *)(long)newstack)->ss_flags) ||
+                __get_user(uss.ss_size,
+                        &((stack_32_t *)(long)newstack)->ss_size)))
+               return -EFAULT; 
 
-       regs->result &= 0xFFFFFFFF;
-       ret = regs->result;
+       old_fs = get_fs();
+       set_fs(KERNEL_DS);
+       ret = do_sigaltstack(newstack ? &uss : NULL, oldstack ? &uoss : NULL,
+                       sp);
+       set_fs(old_fs);
+       /* Copy the stack information to the user output buffer */
+       if (!ret && oldstack  &&
+               (put_user((long)uoss.ss_sp,
+                         &((stack_32_t *)(long)oldstack)->ss_sp) ||
+                __put_user(uoss.ss_flags,
+                        &((stack_32_t *)(long)oldstack)->ss_flags) ||
+                __put_user(uoss.ss_size,
+                        &((stack_32_t *)(long)oldstack)->ss_size)))
+               return -EFAULT;
        return ret;
-
-badframe:
-       force_sig(SIGSEGV, current);
-       return 0;
 }
 
 
@@ -944,7 +1082,7 @@ int do_signal32(sigset_t *oldset, struct pt_regs *regs)
        siginfo_t info;
        struct k_sigaction *ka;
        unsigned int frame, newsp;
-       int signr, ret;
+       int signr;
 
        if (!oldset)
                oldset = &current->blocked;
@@ -952,60 +1090,40 @@ int do_signal32(sigset_t *oldset, struct pt_regs *regs)
        newsp = frame = 0;
 
        signr = get_signal_to_deliver(&info, regs, NULL);
+       if (signr > 0) {
+               ka = &current->sighand->action[signr-1];
+               if ((ka->sa.sa_flags & SA_ONSTACK)
+                    && (!on_sig_stack(regs->gpr[1])))
+                       newsp = (current->sas_ss_sp + current->sas_ss_size);
+               else
+                       newsp = regs->gpr[1];
+               newsp = frame = newsp - sizeof(struct sigregs32);
+
+               /* Whee!  Actually deliver the signal.  */
+               handle_signal32(signr, &info, oldset, regs, &newsp, frame);
+       }
 
-       ka = (signr == 0)? NULL: &current->sighand->action[signr-1];
-
-       if (regs->trap == 0x0C00                /* System Call! */
-           && regs->ccr & 0x10000000           /* error signalled */
-           && ((ret = regs->gpr[3]) == ERESTARTSYS
-               || ret == ERESTARTNOHAND || ret == ERESTARTNOINTR
-               || ret == ERESTART_RESTARTBLOCK)) {
-
-               if (signr > 0
-                   && (ret == ERESTARTNOHAND || ret == ERESTART_RESTARTBLOCK
-                       || (ret == ERESTARTSYS
-                           && !(ka->sa.sa_flags & SA_RESTART)))) {
-                       /* make the system call return an EINTR error */
-                       regs->result = -EINTR;
-                       regs->gpr[3] = EINTR;
-                       /* note that the cr0.SO bit is already set */
-               } else {
-                       regs->nip -= 4; /* Back up & retry system call */
+       if (regs->trap == 0x0C00) {     /* System Call! */
+               if ((int)regs->result == -ERESTARTNOHAND ||
+                   (int)regs->result == -ERESTARTSYS ||
+                   (int)regs->result == -ERESTARTNOINTR) {
+                       regs->gpr[3] = regs->orig_gpr3;
+                       regs->nip -= 4; /* Back up & retry system call */
+                       regs->result = 0;
+               } else if ((int)regs->result == -ERESTART_RESTARTBLOCK) {
+                       regs->gpr[0] = __NR_restart_syscall;
+                       regs->nip -= 4;
                        regs->result = 0;
-                       regs->trap = 0;
-                       if (ret == ERESTART_RESTARTBLOCK)
-                               regs->gpr[0] = __NR_restart_syscall;
-                       else
-                               regs->gpr[3] = regs->orig_gpr3;
                }
        }
 
-       if (signr == 0)
+       if (newsp == frame)
                return 0;               /* no signals delivered */
 
-       if ((ka->sa.sa_flags & SA_ONSTACK) && current->sas_ss_size
-           && (!on_sig_stack(regs->gpr[1])))
-               newsp = (current->sas_ss_sp + current->sas_ss_size);
-       else
-               newsp = regs->gpr[1];
-       newsp &= ~0xfUL;
-
-       /* Whee!  Actually deliver the signal.  */
+       /* Invoke correct stack setup routine */
        if (ka->sa.sa_flags & SA_SIGINFO)
-               handle_rt_signal32(signr, ka, &info, oldset, regs, newsp);
+               setup_rt_frame32(regs, (struct sigregs32*)(u64)frame, newsp);
        else
-               handle_signal32(signr, ka, &info, oldset, regs, newsp);
-
-       if (ka->sa.sa_flags & SA_ONESHOT)
-               ka->sa.sa_handler = SIG_DFL;
-
-       if (!(ka->sa.sa_flags & SA_NODEFER)) {
-               spin_lock_irq(&current->sighand->siglock);
-               sigorsets(&current->blocked,&current->blocked,&ka->sa.sa_mask);
-               sigaddset(&current->blocked, signr);
-               recalc_sigpending();
-               spin_unlock_irq(&current->sighand->siglock);
-       }
-
+               setup_frame32(regs, (struct sigregs32*)(u64)frame, newsp);
        return 1;
 }
index a0162e0..5c35dca 100644 (file)
 #include <asm/xics.h>
 #include <asm/cputable.h>
 
-#ifdef CONFIG_KDB
-#include <linux/kdb.h>
-#endif
-
 int smp_threads_ready;
 unsigned long cache_decay_ticks;
 
-/* Initialised so it doesn't end up in bss */
-cpumask_t cpu_possible_map    = CPU_MASK_NONE;
+/* initialised so it doesn't end up in bss */
 cpumask_t cpu_online_map = CPU_MASK_NONE;
-cpumask_t cpu_available_map   = CPU_MASK_NONE;
-cpumask_t cpu_present_at_boot = CPU_MASK_NONE;
 
 EXPORT_SYMBOL(cpu_online_map);
-EXPORT_SYMBOL(cpu_possible_map);
 
 static struct smp_ops_t *smp_ops;
 
@@ -75,8 +67,6 @@ extern unsigned char stab_array[];
 extern int cpu_idle(void *unused);
 void smp_call_function_interrupt(void);
 void smp_message_pass(int target, int msg, unsigned long data, int wait);
-extern long register_vpa(unsigned long flags, unsigned long proc,
-                        unsigned long vpa);
 
 #define smp_message_pass(t,m,d,w) smp_ops->message_pass((t),(m),(d),(w))
 
@@ -87,24 +77,6 @@ static inline void set_tb(unsigned int upper, unsigned int lower)
        mttbl(lower);
 }
 
-#ifdef CONFIG_KDB
-       /* save regs here before calling kdb_ipi */
-struct pt_regs *kdb_smp_regs[NR_CPUS];
-       
-/* called for each processor.. drop each into kdb. */
-static void smp_kdb_stop_proc(void *dummy)
-{
-    kdb_ipi(kdb_smp_regs[smp_processor_id()], NULL);
-}
-       
-void smp_kdb_stop(void)
-{
-    int ret=0;
-    ret = smp_call_function(smp_kdb_stop_proc, NULL, 1, 0);
-}
-#endif
-
-
 #ifdef CONFIG_PPC_ISERIES
 static unsigned long iSeries_smp_message[NR_CPUS];
 
@@ -148,9 +120,6 @@ static int smp_iSeries_numProcs(void)
         for (i=0; i < NR_CPUS; ++i) {
                 lpPaca = paca[i].xLpPacaPtr;
                 if ( lpPaca->xDynProcStatus < 2 ) {
-                       cpu_set(i, cpu_available_map);
-                       cpu_set(i, cpu_possible_map);
-                       cpu_set(i, cpu_present_at_boot);
                         ++np;
                 }
         }
@@ -166,7 +135,7 @@ static int smp_iSeries_probe(void)
        for (i=0; i < NR_CPUS; ++i) {
                lpPaca = paca[i].xLpPacaPtr;
                if (lpPaca->xDynProcStatus < 2) {
-                       /*paca[i].active = 1;*/
+                       paca[i].active = 1;
                        ++np;
                }
        }
@@ -212,6 +181,7 @@ void __init smp_init_iSeries(void)
        smp_ops->probe        = smp_iSeries_probe;
        smp_ops->kick_cpu     = smp_iSeries_kick_cpu;
        smp_ops->setup_cpu    = smp_iSeries_setup_cpu;
+#warning fix for iseries
        systemcfg->processorCount       = smp_iSeries_numProcs();
 }
 #endif
@@ -296,17 +266,6 @@ static void __init smp_space_timers(unsigned int max_cpus)
 }
 
 #ifdef CONFIG_PPC_PSERIES
-void vpa_init(int cpu)
-{
-       unsigned long flags;
-
-       /* Register the Virtual Processor Area (VPA) */
-       printk(KERN_INFO "register_vpa: cpu 0x%x\n", cpu);
-       flags = 1UL << (63 - 18);
-       paca[cpu].xLpPaca.xSLBCount = 64; /* SLB restore highwater mark */
-       register_vpa(flags, cpu, __pa((unsigned long)&(paca[cpu].xLpPaca))); 
-}
-
 static void __devinit pSeries_setup_cpu(int cpu)
 {
        if (OpenPIC_Addr) {
@@ -336,8 +295,6 @@ smp_xics_message_pass(int target, int msg, unsigned long data, int wait)
        }
 }
 
-extern void xics_request_IPIs(void);
-
 static int __init smp_xics_probe(void)
 {
        int i;
@@ -348,6 +305,7 @@ static int __init smp_xics_probe(void)
                        nr_cpus++;
        }
 #ifdef CONFIG_SMP
+       extern void xics_request_IPIs(void);
        xics_request_IPIs();
 #endif
 
@@ -414,9 +372,6 @@ void smp_message_recv(int msg, struct pt_regs *regs)
 {
        switch( msg ) {
        case PPC_MSG_CALL_FUNCTION:
-#ifdef CONFIG_KDB
-               kdb_smp_regs[smp_processor_id()]=regs;
-#endif
                smp_call_function_interrupt();
                break;
        case PPC_MSG_RESCHEDULE: 
@@ -525,13 +480,13 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
        while (atomic_read(&data.started) != cpus) {
                HMT_low();
                if (--timeout == 0) {
-                       printk("smp_call_function on cpu %d: other cpus not "
-                              "responding (%d)\n", smp_processor_id(),
-                              atomic_read(&data.started));
 #ifdef CONFIG_DEBUG_KERNEL
                        if (debugger)
                                debugger(0);
 #endif
+                       printk("smp_call_function on cpu %d: other cpus not "
+                              "responding (%d)\n", smp_processor_id(),
+                              atomic_read(&data.started));
                        goto out;
                }
        }
@@ -541,15 +496,15 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
                while (atomic_read(&data.finished) != cpus) {
                        HMT_low();
                        if (--timeout == 0) {
+#ifdef CONFIG_DEBUG_KERNEL
+                               if (debugger)
+                                       debugger(0);
+#endif
                                printk("smp_call_function on cpu %d: other "
                                       "cpus not finishing (%d/%d)\n",
                                       smp_processor_id(),
                                       atomic_read(&data.finished),
                                       atomic_read(&data.started));
-#ifdef CONFIG_DEBUG_KERNEL
-                               if (debugger)
-                                       debugger(0);
-#endif
                                goto out;
                        }
                }
@@ -558,7 +513,6 @@ int smp_call_function (void (*func) (void *info), void *info, int nonatomic,
        ret = 0;
 
 out:
-       call_data = NULL;
        HMT_medium();
        spin_unlock(&call_lock);
        return ret;
@@ -566,19 +520,9 @@ out:
 
 void smp_call_function_interrupt(void)
 {
-       void (*func) (void *info);
-       void *info;
-       int wait;
-
-       /* call_data will be NULL if the sender timed out while
-        * waiting on us to receive the call.
-        */
-       if (!call_data)
-               return;
-
-       func = call_data->func;
-       info = call_data->info;
-       wait = call_data->wait;
+       void (*func) (void *info) = call_data->func;
+       void *info = call_data->info;
+       int wait = call_data->wait;
 
        /*
         * Notify initiating CPU that I've grabbed the data and am
@@ -714,14 +658,6 @@ int __devinit start_secondary(void *unused)
        if (smp_ops->take_timebase)
                smp_ops->take_timebase();
 
-       get_paca()->yielded = 0;
-
-#ifdef CONFIG_PPC_PSERIES
-       if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
-               vpa_init(cpu); 
-       }
-#endif
-
        local_irq_enable();
 
        return cpu_idle(NULL);
index 0ea0209..656a347 100644 (file)
@@ -23,7 +23,6 @@
 #include <asm/pmc.h>
 #include <asm/cputable.h>
 
-
 int make_ste(unsigned long stab, unsigned long esid, unsigned long vsid);
 void make_slbe(unsigned long esid, unsigned long vsid, int large,
               int kernel_segment);
index ae4d036..167ff51 100644 (file)
@@ -2106,10 +2106,6 @@ long sys32_execve(unsigned long a0, unsigned long a1, unsigned long a2,
                goto out;
        if (regs->msr & MSR_FP)
                giveup_fpu(current);
-#ifdef CONFIG_ALTIVEC
-       if (regs->msr & MSR_VEC)
-               giveup_altivec(current);
-#endif /* CONFIG_ALTIVEC */
 
        error = do_execve32(filename, (u32*) a1, (u32*) a2, regs);
 
@@ -2130,25 +2126,9 @@ void start_thread32(struct pt_regs* regs, unsigned long nip, unsigned long sp)
        regs->nip = nip;
        regs->gpr[1] = sp;
        regs->msr = MSR_USER32;
-#ifndef CONFIG_SMP
        if (last_task_used_math == current)
                last_task_used_math = 0;
-#endif /* CONFIG_SMP */
        current->thread.fpscr = 0;
-       memset(current->thread.fpr, 0, sizeof(current->thread.fpr));
-#ifdef CONFIG_ALTIVEC
-#ifndef CONFIG_SMP
-       if (last_task_used_altivec == current)
-               last_task_used_altivec = 0;
-#endif /* CONFIG_SMP */
-       memset(current->thread.vr, 0, sizeof(current->thread.vr));
-       current->thread.vscr.u[0] = 0;
-       current->thread.vscr.u[1] = 0;
-       current->thread.vscr.u[2] = 0;
-       current->thread.vscr.u[3] = 0x00010000; /* Java mode disabled */
-       current->thread.vrsave = 0;
-       current->thread.used_vr = 0;
-#endif /* CONFIG_ALTIVEC */
 }
 
 extern asmlinkage int sys_prctl(int option, unsigned long arg2, unsigned long arg3,
@@ -2898,46 +2878,3 @@ long ppc32_fadvise64(int fd, u32 unused, u32 offset_high, u32 offset_low,
                             advice);
 }
 
-long ppc32_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low,
-                       u32 len_high, u32 len_low)
-{
-       return sys_fadvise64(fd, (u64)offset_high << 32 | offset_low,
-                            (u64)len_high << 32 | len_low, advice);
-}
-
-extern long sys_timer_create(clockid_t, sigevent_t *, timer_t *);
-
-long ppc32_timer_create(clockid_t clock,
-                       struct compat_sigevent __user *ev32,
-                       timer_t __user *timer_id)
-{
-       sigevent_t event;
-       timer_t t;
-       long err;
-       mm_segment_t savefs;
-
-       if (ev32 == NULL)
-               return sys_timer_create(clock, NULL, timer_id);
-
-       memset(&event, 0, sizeof(event));
-       if (!access_ok(VERIFY_READ, ev32, sizeof(struct compat_sigevent))
-           || __get_user(event.sigev_value.sival_int,
-                         &ev32->sigev_value.sival_int)
-           || __get_user(event.sigev_signo, &ev32->sigev_signo)
-           || __get_user(event.sigev_notify, &ev32->sigev_notify)
-           || __get_user(event.sigev_notify_thread_id,
-                         &ev32->sigev_notify_thread_id))
-               return -EFAULT;
-
-       if (!access_ok(VERIFY_WRITE, timer_id, sizeof(timer_t)))
-               return -EFAULT;
-
-       savefs = get_fs();
-       err = sys_timer_create(clock, &event, &t);
-       set_fs(savefs);
-
-       if (err == 0)
-               err = __put_user(t, timer_id);
-
-       return err;
-}
index deb4b65..b3b093b 100644 (file)
@@ -41,7 +41,6 @@
 #include <asm/ipc.h>
 #include <asm/semaphore.h>
 #include <asm/time.h>
-#include <asm/unistd.h>
 
 extern unsigned long wall_jiffies;
 
@@ -235,6 +234,3 @@ asmlinkage time_t sys64_time(time_t* tloc)
 
        return secs;
 }
-
-/* Only exists on P-series. */
-cond_syscall(ppc_rtas);
index be7687e..3f652e5 100644 (file)
@@ -91,9 +91,6 @@ unsigned      tb_to_us;
 unsigned long processor_freq;
 spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
 
-unsigned long tb_to_ns_scale;
-unsigned long tb_to_ns_shift;
-
 struct gettimeofday_struct do_gtod;
 
 extern unsigned long wall_jiffies;
@@ -315,10 +312,12 @@ int timer_interrupt(struct pt_regs * regs)
 
 /*
  * Scheduler clock - returns current time in nanosec units.
+ *
+ * This is wrong, but my CPUs run at 1GHz, so nyer nyer.
  */
 unsigned long long sched_clock(void)
 {
-       return mulhdu(get_tb(), tb_to_ns_scale) << tb_to_ns_shift;
+       return get_tb();
 }
 
 /*
@@ -474,22 +473,9 @@ void __init time_init(void)
        /* This function is only called on the boot processor */
        unsigned long flags;
        struct rtc_time tm;
-       struct div_result res;
-       unsigned long scale, shift;
 
        ppc_md.calibrate_decr();
 
-       /* Compute scale factor for sched_clock. */
-       /* The calibrate_decr() function has set tb_ticks_per_sec */
-       div128_by_32(1000000000, 0, tb_ticks_per_sec, &res);
-       scale = res.result_low;
-       for (shift = 0; res.result_high != 0; ++shift) {
-               scale = (scale >> 1) | (res.result_high << 63);
-               res.result_high >>= 1;
-       }
-       tb_to_ns_scale = scale;
-       tb_to_ns_shift = shift;
-
 #ifdef CONFIG_PPC_ISERIES
        if (!piranha_simulator)
 #endif
index 56b6598..564f01f 100644 (file)
@@ -16,7 +16,6 @@
  * This file handles the architecture-dependent parts of hardware exceptions
  */
 
-#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
@@ -27,6 +26,7 @@
 #include <linux/user.h>
 #include <linux/a.out.h>
 #include <linux/interrupt.h>
+#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/module.h>
 
 extern int fix_alignment(struct pt_regs *);
 extern void bad_page_fault(struct pt_regs *, unsigned long, int);
 
-#ifdef CONFIG_PPC_PSERIES
 /* This is true if we are using the firmware NMI handler (typically LPAR) */
 extern int fwnmi_active;
-#endif
 
 #ifdef CONFIG_DEBUG_KERNEL
 void (*debugger)(struct pt_regs *regs);
@@ -98,7 +96,6 @@ _exception(int signr, siginfo_t *info, struct pt_regs *regs)
        force_sig_info(signr, info, current);
 }
 
-#ifdef CONFIG_PPC_PSERIES
 /* Get the error information for errors coming through the
  * FWNMI vectors.  The pt_regs' r3 will be updated to reflect
  * the actual r3 if possible, and a ptr to the error log entry
@@ -131,12 +128,10 @@ static void FWNMI_release_errinfo(void)
        if (ret != 0)
                printk("FWNMI: nmi-interlock failed: %ld\n", ret);
 }
-#endif
 
 void
 SystemResetException(struct pt_regs *regs)
 {
-#ifdef CONFIG_PPC_PSERIES
        if (fwnmi_active) {
                struct rtas_error_log *errhdr = FWNMI_get_errinfo(regs);
                if (errhdr) {
@@ -144,7 +139,6 @@ SystemResetException(struct pt_regs *regs)
                }
                FWNMI_release_errinfo();
        }
-#endif
 
 #ifdef CONFIG_DEBUG_KERNEL
        if (debugger)
@@ -160,7 +154,6 @@ SystemResetException(struct pt_regs *regs)
        /* What should we do here? We could issue a shutdown or hard reset. */
 }
 
-#ifdef CONFIG_PPC_PSERIES
 /* 
  * See if we can recover from a machine check exception.
  * This is only called on power4 (or above) and only via
@@ -197,7 +190,6 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log err)
        }
        return 0;
 }
-#endif
 
 /*
  * Handle a machine check.
@@ -215,7 +207,6 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log err)
 void
 MachineCheckException(struct pt_regs *regs)
 {
-#ifdef CONFIG_PPC_PSERIES
        struct rtas_error_log err, *errp;
 
        if (fwnmi_active) {
@@ -226,7 +217,6 @@ MachineCheckException(struct pt_regs *regs)
                if (errp && recover_mce(regs, err))
                        return;
        }
-#endif
 
 #ifdef CONFIG_DEBUG_KERNEL
        if (debugger_fault_handler) {
@@ -420,14 +410,6 @@ KernelFPUnavailableException(struct pt_regs *regs)
 }
 
 void
-KernelAltivecUnavailableException(struct pt_regs *regs)
-{
-       printk("Illegal VMX/Altivec used in kernel (task=0x%p, "
-               "pc=0x%016lx, trap=0x%lx)\n", current, regs->nip, regs->trap);
-       panic("Unrecoverable VMX/Altivec Unavailable Exception in Kernel");
-}
-
-void
 SingleStepException(struct pt_regs *regs)
 {
        siginfo_t info;
@@ -496,17 +478,6 @@ AlignmentException(struct pt_regs *regs)
        _exception(SIGBUS, &info, regs);        
 }
 
-#ifdef CONFIG_ALTIVEC
-void
-AltivecAssistException(struct pt_regs *regs)
-{
-       if (regs->msr & MSR_VEC)
-               giveup_altivec(current);
-       /* XXX quick hack for now: set the non-Java bit in the VSCR */
-       current->thread.vscr.u[3] |= 0x10000;
-}
-#endif /* CONFIG_ALTIVEC */
-
 void __init trap_init(void)
 {
 }
index ab0f956..aa456dd 100644 (file)
@@ -127,10 +127,8 @@ udbg_write(const char *s, int n)
 {
        int remain = n;
        char c;
-
        if (!ppc_md.udbg_putc)
-               return 0;
-
+               for (;;);       /* stop here for cpuctl */
        if ( s && *s != '\0' ) {
                while ( (( c = *s++ ) != '\0') && (remain-- > 0)) {
                        ppc_md.udbg_putc(c);
diff --git a/arch/ppc64/kernel/vio.c b/arch/ppc64/kernel/vio.c
deleted file mode 100644 (file)
index 29043f5..0000000
+++ /dev/null
@@ -1,534 +0,0 @@
-/*
- * IBM PowerPC Virtual I/O Infrastructure Support.
- *
- *    Copyright (c) 2003 IBM Corp.
- *     Dave Engebretsen engebret@us.ibm.com
- *     Santiago Leon santil@us.ibm.com
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- */
-
-#include <linux/init.h>
-#include <linux/console.h>
-#include <linux/pci.h>
-#include <linux/version.h>
-#include <linux/module.h>
-#include <asm/rtas.h>
-#include <asm/pci_dma.h>
-#include <asm/dma.h>
-#include <asm/ppcdebug.h>
-#include <asm/vio.h>
-#include <asm/hvcall.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-#include <linux/mm.h>
-#endif
-
-extern struct TceTable *build_tce_table(struct TceTable *tbl);
-
-extern dma_addr_t get_tces(struct TceTable *, unsigned order,
-                          void *page, unsigned numPages, int direction);
-extern void tce_free(struct TceTable *tbl, dma_addr_t dma_addr,
-                    unsigned order, unsigned num_pages);
-
-
-static struct vio_bus vio_bus;
-static LIST_HEAD(registered_vio_drivers);
-int vio_num_address_cells;
-EXPORT_SYMBOL(vio_num_address_cells);
-
-/* TODO:
- *   really fit into driver model (see include/linux/device.h)
- *   locking around list accesses
- */
-
-/**
- * vio_register_driver: - Register a new vio driver
- * @drv:       The vio_driver structure to be registered.
- *
- * Adds the driver structure to the list of registered drivers
- * Returns the number of vio devices which were claimed by the driver
- * during registration.  The driver remains registered even if the
- * return value is zero.
- */
-int vio_register_driver(struct vio_driver *drv)
-{
-       int count = 0;
-       struct vio_dev *dev;
-
-       printk(KERN_DEBUG "%s: driver %s/%s registering\n", __FUNCTION__,
-               drv->id_table[0].type, drv->id_table[0].type);
-
-       /* find matching devices not already claimed by other drivers and pass
-        * them to probe() */
-       list_for_each_entry(dev, &vio_bus.devices, devices_list) {
-               const struct vio_device_id* id;
-
-               if (dev->driver)
-                       continue; /* this device is already owned */
-
-               id = vio_match_device(drv->id_table, dev);
-               if (drv && id) {
-                       if (0 == drv->probe(dev, id)) {
-                               printk(KERN_DEBUG "  took device %p\n", dev);
-                               dev->driver = drv;
-                               count++;
-                       }
-               }
-       }
-
-       list_add_tail(&drv->node, &registered_vio_drivers);
-
-       return count;
-}
-EXPORT_SYMBOL(vio_register_driver);
-
-/**
- * vio_unregister_driver - Remove registration of vio driver.
- * @driver:    The vio_driver struct to be removed form registration
- *
- * Searches for devices that are assigned to the driver and calls
- * driver->remove() for each one.  Removes the driver from the list
- * of registered drivers.  Returns the number of devices that were
- * assigned to that driver.
- */
-int vio_unregister_driver(struct vio_driver *driver)
-{
-       struct vio_dev *dev;
-       int devices_found = 0;
-
-       list_for_each_entry(dev, &vio_bus.devices, devices_list) {
-               if (dev->driver == driver) {
-                       driver->remove(dev);
-                       dev->driver = NULL;
-                       devices_found++;
-               }
-       }
-
-       list_del(&driver->node);
-
-       return devices_found;
-}
-EXPORT_SYMBOL(vio_unregister_driver);
-
-/**
- * vio_match_device: - Tell if a VIO device has a matching VIO device id structure.
- * @ids:       array of VIO device id structures to search in
- * @dev:       the VIO device structure to match against
- *
- * Used by a driver to check whether a VIO device present in the
- * system is in its list of supported devices. Returns the matching
- * vio_device_id structure or NULL if there is no match.
- */
-const struct vio_device_id *
-vio_match_device(const struct vio_device_id *ids, const struct vio_dev *dev)
-{
-       while (ids->type) {
-               if ((strncmp(dev->archdata->type, ids->type, strlen(ids->type)) == 0) &&
-                       device_is_compatible((struct device_node*)dev->archdata, ids->compat))
-                       return ids;
-               ids++;
-       }
-       return NULL;
-}
-
-/**
- * vio_bus_init: - Initialize the virtual IO bus
- */
-int __init
-vio_bus_init(void)
-{
-       struct device_node *node_vroot, *node_vdev;
-
-       INIT_LIST_HEAD(&vio_bus.devices);
-
-       /*
-        * Create device node entries for each virtual device
-        * identified in the device tree.
-        * Functionally takes the place of pci_scan_bus
-        */
-       node_vroot = find_devices("vdevice");
-       if (!node_vroot) {
-               printk(KERN_WARNING "%s: no /vdevice node\n", __FUNCTION__);
-               return 0;
-       }
-
-       vio_num_address_cells = prom_n_addr_cells(node_vroot->child);
-
-       for (node_vdev = node_vroot->child;
-                       node_vdev != NULL;
-                       node_vdev = node_vdev->sibling) {
-               printk(KERN_DEBUG "%s: processing %p\n", __FUNCTION__, node_vdev);
-
-               vio_register_device(node_vdev);
-       }
-
-       return 0;
-}
-
-__initcall(vio_bus_init);
-
-
-/**
- * vio_probe_device - attach dev to appropriate driver
- * @dev:       device to find a driver for
- *
- * Walks the list of registered VIO drivers looking for one to take this
- * device.
- *
- * Returns a pointer to the matched driver or NULL if driver is not
- * found.
- */
-struct vio_driver * __devinit vio_probe_device(struct vio_dev* dev)
-{
-       struct vio_driver *driver;
-
-       list_for_each_entry(driver, &registered_vio_drivers, node) {
-               const struct vio_device_id* id;
-
-               id = vio_match_device(driver->id_table, dev);
-               if (id && (0 < driver->probe(dev, id))) {
-                       printk(KERN_DEBUG "%s: driver %s/%s took device %p\n",
-                               __FUNCTION__, id->type, id->compat, dev);
-                       dev->driver = driver;
-                       return driver;
-               }
-       }
-
-       printk(KERN_DEBUG "%s: device %p found no driver\n", __FUNCTION__, dev);
-       return NULL;
-}
-
-/**
- * vio_register_device: - Register a new vio device.
- * @archdata:  The OF node for this device.
- *
- * Creates and initializes a vio_dev structure from the data in
- * node_vdev (archdata) and adds it to the list of virtual devices.
- * Returns a pointer to the created vio_dev or NULL if node has
- * NULL device_type or compatible fields.
- */
-struct vio_dev * __devinit vio_register_device(struct device_node *node_vdev)
-{
-       struct vio_dev *dev;
-       unsigned int *unit_address;
-       unsigned int *irq_p;
-
-       /* guarantee all vio_devs have 'device_type' field*/
-       if ((NULL == node_vdev->type)) {
-               printk(KERN_WARNING
-                       "%s: node %s missing 'device_type'\n", __FUNCTION__,
-                       node_vdev->name ? node_vdev->name : "<unknown>");
-               return NULL;
-       }
-
-       unit_address = (unsigned int *)get_property(node_vdev, "reg", NULL);
-       if (!unit_address) {
-               printk(KERN_WARNING "%s: node %s missing 'reg'\n", __FUNCTION__,
-                       node_vdev->name ? node_vdev->name : "<unknown>");
-               return NULL;
-       }
-
-       /* allocate a vio_dev for this node */
-       dev = kmalloc(sizeof(*dev), GFP_KERNEL);
-       if (!dev)
-               return NULL;
-       memset(dev, 0, sizeof(*dev));
-
-       dev->archdata = (void*)of_node_get(node_vdev);
-       dev->bus = &vio_bus;
-       dev->unit_address = *unit_address;
-       dev->tce_table = vio_build_tce_table(dev);
-
-       irq_p = (unsigned int *) get_property(node_vdev, "interrupts", 0);
-       if(irq_p) {
-               dev->irq = irq_offset_up(*irq_p);
-       } else {
-               dev->irq = (unsigned int) -1;
-       }
-
-       list_add_tail(&dev->devices_list, &vio_bus.devices);
-
-       vio_probe_device(dev); /* finally, assign it to a driver */
-
-       return dev;
-}
-
-int __devinit vio_unregister_device(struct vio_dev *dev)
-{
-       list_del(&dev->devices_list);
-       of_node_put(dev->archdata);
-
-       return 0;
-}
-
-/**
- * vio_get_attribute: - get attribute for virtual device
- * @vdev:      The vio device to get property.
- * @which:     The property/attribute to be extracted.
- * @length:    Pointer to length of returned data size (unused if NULL).
- *
- * Calls prom.c's get_property() to return the value of the
- * attribute specified by the preprocessor constant @which
-*/
-const void * vio_get_attribute(struct vio_dev *vdev, void* which, int* length)
-{
-       return get_property((struct device_node *)vdev->archdata, (char*)which, length);
-}
-EXPORT_SYMBOL(vio_get_attribute);
-
-/**
- * vio_build_tce_table: - gets the dma information from OF and builds the TCE tree.
- * @dev: the virtual device.
- *
- * Returns a pointer to the built tce tree, or NULL if it can't
- * find property.
-*/
-struct TceTable * vio_build_tce_table(struct vio_dev *dev)
-{
-       unsigned int *dma_window;
-       struct TceTable *newTceTable;
-       unsigned long offset;
-       unsigned long size;
-       int dma_window_property_size;
-
-       dma_window = (unsigned int *) get_property((struct device_node *)dev->archdata, "ibm,my-dma-window", &dma_window_property_size);
-       if(!dma_window) {
-               return NULL;
-       }
-
-       newTceTable = (struct TceTable *) kmalloc(sizeof(struct TceTable), GFP_KERNEL);
-
-       /* RPA docs say that #address-cells is always 1 for virtual
-               devices, but some older boxes' OF returns 2.  This should
-               be removed by GA, unless there is legacy OFs that still
-               have 2 for #address-cells */
-       size = ((dma_window[1+vio_num_address_cells]
-               >> PAGE_SHIFT) << 3) >> PAGE_SHIFT;
-
-       /* This is just an ugly kludge. Remove as soon as the OF for all
-       machines actually follow the spec and encodes the offset field
-       as phys-encode (that is, #address-cells wide)*/
-       if (dma_window_property_size == 12) {
-               size = ((dma_window[1] >> PAGE_SHIFT) << 3) >> PAGE_SHIFT;
-       } else if (dma_window_property_size == 20) {
-               size = ((dma_window[4] >> PAGE_SHIFT) << 3) >> PAGE_SHIFT;
-       } else {
-               printk(KERN_WARNING "vio_build_tce_table: Invalid size of ibm,my-dma-window=%i, using 0x80 for size\n", dma_window_property_size);
-               size = 0x80;
-       }
-
-       /*  There should be some code to extract the phys-encoded offset
-               using prom_n_addr_cells(). However, according to a comment
-               on earlier versions, it's always zero, so we don't bother */
-       offset = dma_window[1] >>  PAGE_SHIFT;
-
-       /* TCE table size - measured in units of pages of tce table */
-       newTceTable->size = size;
-       /* offset for VIO should always be 0 */
-       newTceTable->startOffset = offset;
-       newTceTable->busNumber   = 0;
-       newTceTable->index       = (unsigned long)dma_window[0];
-       newTceTable->tceType     = TCE_VB;
-
-       return build_tce_table(newTceTable);
-}
-
-int vio_enable_interrupts(struct vio_dev *dev)
-{
-       int rc = h_vio_signal(dev->unit_address, VIO_IRQ_ENABLE);
-       if (rc != H_Success) {
-               printk(KERN_ERR "vio: Error 0x%x enabling interrupts\n", rc);
-       }
-       return rc;
-}
-EXPORT_SYMBOL(vio_enable_interrupts);
-
-int vio_disable_interrupts(struct vio_dev *dev)
-{
-       int rc = h_vio_signal(dev->unit_address, VIO_IRQ_DISABLE);
-       if (rc != H_Success) {
-               printk(KERN_ERR "vio: Error 0x%x disabling interrupts\n", rc);
-       }
-       return rc;
-}
-EXPORT_SYMBOL(vio_disable_interrupts);
-
-
-dma_addr_t vio_map_single(struct vio_dev *dev, void *vaddr,
-                         size_t size, int direction )
-{
-       struct TceTable * tbl;
-       dma_addr_t dma_handle = NO_TCE;
-       unsigned long uaddr;
-       unsigned order, nPages;
-
-       if(direction == PCI_DMA_NONE) BUG();
-
-       uaddr = (unsigned long)vaddr;
-       nPages = PAGE_ALIGN( uaddr + size ) - ( uaddr & PAGE_MASK );
-       order = get_order( nPages & PAGE_MASK );
-       nPages >>= PAGE_SHIFT;
-
-       /* Client asked for way to much space.  This is checked later anyway */
-       /* It is easier to debug here for the drivers than in the tce tables.*/
-       if(order >= NUM_TCE_LEVELS) {
-               printk("VIO_DMA: vio_map_single size to large: 0x%lx \n",size);
-               return NO_TCE;
-       }
-
-       tbl = dev->tce_table;
-
-       if(tbl) {
-               dma_handle = get_tces(tbl, order, vaddr, nPages, direction);
-               dma_handle |= (uaddr & ~PAGE_MASK);
-       }
-
-       return dma_handle;
-}
-EXPORT_SYMBOL(vio_map_single);
-
-void vio_unmap_single(struct vio_dev *dev, dma_addr_t dma_handle,
-                     size_t size, int direction)
-{
-       struct TceTable * tbl;
-       unsigned order, nPages;
-
-       if (direction == PCI_DMA_NONE) BUG();
-
-       nPages = PAGE_ALIGN( dma_handle + size ) - ( dma_handle & PAGE_MASK );
-       order = get_order( nPages & PAGE_MASK );
-       nPages >>= PAGE_SHIFT;
-
-       /* Client asked for way to much space.  This is checked later anyway */
-       /* It is easier to debug here for the drivers than in the tce tables.*/
-       if(order >= NUM_TCE_LEVELS) {
-               printk("VIO_DMA: vio_unmap_single 0x%lx size to large: 0x%lx \n",(unsigned long)dma_handle,(unsigned long)size);
-               return;
-       }
-
-       tbl = dev->tce_table;
-       if(tbl) tce_free(tbl, dma_handle, order, nPages);
-}
-EXPORT_SYMBOL(vio_unmap_single);
-
-int vio_map_sg(struct vio_dev *vdev, struct scatterlist *sglist, int nelems,
-              int direction)
-{
-       int i;
-
-       for (i = 0; i < nelems; i++) {
-
-               /* 2.4 scsi scatterlists use address field.
-                  Not sure about other subsystems. */
-               void *vaddr;
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0)
-               if (sglist->address)
-                       vaddr = sglist->address;
-               else
-#endif
-                       vaddr = page_address(sglist->page) + sglist->offset;
-
-               sglist->dma_address = vio_map_single(vdev, vaddr,
-                                                    sglist->length,
-                                                    direction);
-               sglist->dma_length = sglist->length;
-               sglist++;
-       }
-
-       return nelems;
-}
-EXPORT_SYMBOL(vio_map_sg);
-
-void vio_unmap_sg(struct vio_dev *vdev, struct scatterlist *sglist, int nelems,
-                 int direction)
-{
-       while (nelems--) {
-               vio_unmap_single(vdev, sglist->dma_address,
-                                sglist->dma_length, direction);
-               sglist++;
-       }
-}
-
-void *vio_alloc_consistent(struct vio_dev *dev, size_t size,
-                          dma_addr_t *dma_handle)
-{
-       struct TceTable * tbl;
-       void *ret = NULL;
-       unsigned order, nPages;
-       dma_addr_t tce;
-
-       size = PAGE_ALIGN(size);
-       order = get_order(size);
-       nPages = 1 << order;
-
-       /* Client asked for way to much space.  This is checked later anyway */
-       /* It is easier to debug here for the drivers than in the tce tables.*/
-       if(order >= NUM_TCE_LEVELS) {
-               printk("VIO_DMA: vio_alloc_consistent size to large: 0x%lx \n",size);
-               return (void *)NO_TCE;
-       }
-
-       tbl = dev->tce_table;
-
-       if ( tbl ) {
-               /* Alloc enough pages (and possibly more) */
-               ret = (void *)__get_free_pages( GFP_ATOMIC, order );
-               if ( ret ) {
-                       /* Page allocation succeeded */
-                       memset(ret, 0, nPages << PAGE_SHIFT);
-                       /* Set up tces to cover the allocated range */
-                       tce = get_tces( tbl, order, ret, nPages, PCI_DMA_BIDIRECTIONAL );
-                       if ( tce == NO_TCE ) {
-                               PPCDBG(PPCDBG_TCE, "vio_alloc_consistent: get_tces failed\n" );
-                               free_pages( (unsigned long)ret, order );
-                               ret = NULL;
-                       }
-                       else
-                               {
-                                       *dma_handle = tce;
-                               }
-               }
-               else PPCDBG(PPCDBG_TCE, "vio_alloc_consistent: __get_free_pages failed for order = %d\n", order);
-       }
-       else PPCDBG(PPCDBG_TCE, "vio_alloc_consistent: get_tce_table failed for 0x%016lx\n", dev);
-
-       PPCDBG(PPCDBG_TCE, "\tvio_alloc_consistent: dma_handle = 0x%16.16lx\n", *dma_handle);
-       PPCDBG(PPCDBG_TCE, "\tvio_alloc_consistent: return     = 0x%16.16lx\n", ret);
-       return ret;
-}
-EXPORT_SYMBOL(vio_alloc_consistent);
-
-void vio_free_consistent(struct vio_dev *dev, size_t size,
-                        void *vaddr, dma_addr_t dma_handle)
-{
-       struct TceTable * tbl;
-       unsigned order, nPages;
-
-       PPCDBG(PPCDBG_TCE, "vio_free_consistent:\n");
-       PPCDBG(PPCDBG_TCE, "\tdev = 0x%16.16lx, size = 0x%16.16lx, dma_handle = 0x%16.16lx, vaddr = 0x%16.16lx\n", dev, size, dma_handle, vaddr);
-
-       size = PAGE_ALIGN(size);
-       order = get_order(size);
-       nPages = 1 << order;
-
-       /* Client asked for way to much space.  This is checked later anyway */
-       /* It is easier to debug here for the drivers than in the tce tables.*/
-       if(order >= NUM_TCE_LEVELS) {
-               printk("PCI_DMA: pci_free_consistent size to large: 0x%lx \n",size);
-               return;
-       }
-
-       tbl = dev->tce_table;
-
-       if ( tbl ) {
-               tce_free(tbl, dma_handle, order, nPages);
-               free_pages( (unsigned long)vaddr, order );
-       }
-}
-EXPORT_SYMBOL(vio_free_consistent);
-
-EXPORT_SYMBOL(plpar_hcall_norets);
-EXPORT_SYMBOL(plpar_hcall_8arg_2ret);
diff --git a/arch/ppc64/kernel/viopath.c b/arch/ppc64/kernel/viopath.c
deleted file mode 100644 (file)
index c782901..0000000
+++ /dev/null
@@ -1,755 +0,0 @@
-/* -*- linux-c -*-
- *  arch/ppc64/kernel/viopath.c
- *
- *  iSeries Virtual I/O Message Path code
- *
- *  Authors: Dave Boutcher <boutcher@us.ibm.com>
- *           Ryan Arnold <ryanarn@us.ibm.com>
- *           Colin Devilbiss <devilbis@us.ibm.com>
- *
- * (C) Copyright 2000-2003 IBM Corporation
- *
- * This code is used by the iSeries virtual disk, cd,
- * tape, and console to communicate with OS/400 in another
- * partition.
- *
- * This program is free software;  you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) anyu later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#include <linux/config.h>
-#include <asm/uaccess.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/vmalloc.h>
-#include <linux/string.h>
-#include <linux/proc_fs.h>
-#include <linux/pci.h>
-#include <linux/wait.h>
-
-#include <asm/hardirq.h>       /* for is_atomic */
-
-#include <asm/iSeries/LparData.h>
-#include <asm/iSeries/HvLpEvent.h>
-#include <asm/iSeries/HvLpConfig.h>
-#include <asm/iSeries/HvCallCfg.h>
-#include <asm/iSeries/mf.h>
-#include <asm/iSeries/iSeries_proc.h>
-#include <asm/iSeries/vio.h>
-
-extern struct pci_dev *iSeries_vio_dev;
-
-/* Status of the path to each other partition in the system.
- * This is overkill, since we will only ever establish connections
- * to our hosting partition and the primary partition on the system.
- * But this allows for other support in the future.
- */
-static struct viopathStatus {
-       int isOpen:1;           /* Did we open the path?            */
-       int isActive:1;         /* Do we have a mon msg outstanding */
-       int users[VIO_MAX_SUBTYPES];
-       HvLpInstanceId mSourceInst;
-       HvLpInstanceId mTargetInst;
-       int numberAllocated;
-} viopathStatus[HVMAXARCHITECTEDLPS];
-
-static spinlock_t statuslock = SPIN_LOCK_UNLOCKED;
-
-/*
- * For each kind of event we allocate a buffer that is
- * guaranteed not to cross a page boundary
- */
-static unsigned char event_buffer[VIO_MAX_SUBTYPES * 256] __page_aligned;
-static atomic_t event_buffer_available[VIO_MAX_SUBTYPES];
-static int event_buffer_initialised;
-
-static void handleMonitorEvent(struct HvLpEvent *event);
-
-/*
- * We use this structure to handle asynchronous responses.  The caller
- * blocks on the semaphore and the handler posts the semaphore.  However,
- * if in_atomic() is true in the caller, then wait_atomic is used ...
- */
-struct doneAllocParms_t {
-       struct semaphore *sem;
-       int number;
-       volatile unsigned long *wait_atomic;
-       int used_wait_atomic;
-};
-
-/* Put a sequence number in each mon msg.  The value is not
- * important.  Start at something other than 0 just for
- * readability.  wrapping this is ok.
- */
-static u8 viomonseq = 22;
-
-/* Our hosting logical partition.  We get this at startup
- * time, and different modules access this variable directly.
- */
-HvLpIndex viopath_hostLp = 0xff;       /* HvLpIndexInvalid */
-EXPORT_SYMBOL(viopath_hostLp);
-HvLpIndex viopath_ourLp = 0xff;
-EXPORT_SYMBOL(viopath_ourLp);
-
-/* For each kind of incoming event we set a pointer to a
- * routine to call.
- */
-static vio_event_handler_t *vio_handler[VIO_MAX_SUBTYPES];
-
-static unsigned char e2a(unsigned char x)
-{
-       switch (x) {
-       case 0xF0:
-               return '0';
-       case 0xF1:
-               return '1';
-       case 0xF2:
-               return '2';
-       case 0xF3:
-               return '3';
-       case 0xF4:
-               return '4';
-       case 0xF5:
-               return '5';
-       case 0xF6:
-               return '6';
-       case 0xF7:
-               return '7';
-       case 0xF8:
-               return '8';
-       case 0xF9:
-               return '9';
-       case 0xC1:
-               return 'A';
-       case 0xC2:
-               return 'B';
-       case 0xC3:
-               return 'C';
-       case 0xC4:
-               return 'D';
-       case 0xC5:
-               return 'E';
-       case 0xC6:
-               return 'F';
-       case 0xC7:
-               return 'G';
-       case 0xC8:
-               return 'H';
-       case 0xC9:
-               return 'I';
-       case 0xD1:
-               return 'J';
-       case 0xD2:
-               return 'K';
-       case 0xD3:
-               return 'L';
-       case 0xD4:
-               return 'M';
-       case 0xD5:
-               return 'N';
-       case 0xD6:
-               return 'O';
-       case 0xD7:
-               return 'P';
-       case 0xD8:
-               return 'Q';
-       case 0xD9:
-               return 'R';
-       case 0xE2:
-               return 'S';
-       case 0xE3:
-               return 'T';
-       case 0xE4:
-               return 'U';
-       case 0xE5:
-               return 'V';
-       case 0xE6:
-               return 'W';
-       case 0xE7:
-               return 'X';
-       case 0xE8:
-               return 'Y';
-       case 0xE9:
-               return 'Z';
-       }
-       return ' ';
-}
-
-/* Handle reads from the proc file system
- */
-static int proc_read(char *buf, char **start, off_t offset,
-                    int blen, int *eof, void *data)
-{
-       HvLpEvent_Rc hvrc;
-       DECLARE_MUTEX_LOCKED(Semaphore);
-       dma_addr_t dmaa =
-           pci_map_single(iSeries_vio_dev, buf, PAGE_SIZE,
-                          PCI_DMA_FROMDEVICE);
-       int len = PAGE_SIZE;
-
-       if (len > blen)
-               len = blen;
-
-       memset(buf, 0x00, len);
-       hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
-                       HvLpEvent_Type_VirtualIo,
-                       viomajorsubtype_config | vioconfigget,
-                       HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
-                       viopath_sourceinst(viopath_hostLp),
-                       viopath_targetinst(viopath_hostLp),
-                       (u64)(unsigned long)&Semaphore, VIOVERSION << 16,
-                       ((u64)dmaa) << 32, len, 0, 0);
-       if (hvrc != HvLpEvent_Rc_Good)
-               printk("viopath hv error on op %d\n", (int) hvrc);
-
-       down(&Semaphore);
-
-       pci_unmap_single(iSeries_vio_dev, dmaa, PAGE_SIZE,
-                        PCI_DMA_FROMDEVICE);
-
-       sprintf(buf + strlen(buf), "SRLNBR=");
-       buf[strlen(buf)] = e2a(xItExtVpdPanel.mfgID[2]);
-       buf[strlen(buf)] = e2a(xItExtVpdPanel.mfgID[3]);
-       buf[strlen(buf)] = e2a(xItExtVpdPanel.systemSerial[1]);
-       buf[strlen(buf)] = e2a(xItExtVpdPanel.systemSerial[2]);
-       buf[strlen(buf)] = e2a(xItExtVpdPanel.systemSerial[3]);
-       buf[strlen(buf)] = e2a(xItExtVpdPanel.systemSerial[4]);
-       buf[strlen(buf)] = e2a(xItExtVpdPanel.systemSerial[5]);
-       buf[strlen(buf)] = '\n';
-       *eof = 1;
-       return strlen(buf);
-}
-
-/* Handle writes to our proc file system
- */
-static int proc_write(struct file *file, const char *buffer,
-                     unsigned long count, void *data)
-{
-       /* Doesn't do anything today!!!
-        */
-       return count;
-}
-
-/* setup our proc file system entries
- */
-static void vio_proc_init(struct proc_dir_entry *iSeries_proc)
-{
-       struct proc_dir_entry *ent;
-       ent = create_proc_entry("config", S_IFREG | S_IRUSR, iSeries_proc);
-       if (!ent)
-               return;
-       ent->nlink = 1;
-       ent->data = NULL;
-       ent->read_proc = proc_read;
-       ent->write_proc = proc_write;
-}
-
-/* See if a given LP is active.  Allow for invalid lps to be passed in
- * and just return invalid
- */
-int viopath_isactive(HvLpIndex lp)
-{
-       if (lp == HvLpIndexInvalid)
-               return 0;
-       if (lp < HVMAXARCHITECTEDLPS)
-               return viopathStatus[lp].isActive;
-       else
-               return 0;
-}
-EXPORT_SYMBOL(viopath_isactive);
-
-/*
- * We cache the source and target instance ids for each
- * partition.  
- */
-HvLpInstanceId viopath_sourceinst(HvLpIndex lp)
-{
-       return viopathStatus[lp].mSourceInst;
-}
-EXPORT_SYMBOL(viopath_sourceinst);
-
-HvLpInstanceId viopath_targetinst(HvLpIndex lp)
-{
-       return viopathStatus[lp].mTargetInst;
-}
-EXPORT_SYMBOL(viopath_targetinst);
-
-/*
- * Send a monitor message.  This is a message with the acknowledge
- * bit on that the other side will NOT explicitly acknowledge.  When
- * the other side goes down, the hypervisor will acknowledge any
- * outstanding messages....so we will know when the other side dies.
- */
-static void sendMonMsg(HvLpIndex remoteLp)
-{
-       HvLpEvent_Rc hvrc;
-
-       viopathStatus[remoteLp].mSourceInst =
-               HvCallEvent_getSourceLpInstanceId(remoteLp,
-                               HvLpEvent_Type_VirtualIo);
-       viopathStatus[remoteLp].mTargetInst =
-               HvCallEvent_getTargetLpInstanceId(remoteLp,
-                               HvLpEvent_Type_VirtualIo);
-
-       /*
-        * Deliberately ignore the return code here.  if we call this
-        * more than once, we don't care.
-        */
-       vio_setHandler(viomajorsubtype_monitor, handleMonitorEvent);
-
-       hvrc = HvCallEvent_signalLpEventFast(remoteLp, HvLpEvent_Type_VirtualIo,
-                       viomajorsubtype_monitor, HvLpEvent_AckInd_DoAck,
-                       HvLpEvent_AckType_DeferredAck,
-                       viopathStatus[remoteLp].mSourceInst,
-                       viopathStatus[remoteLp].mTargetInst,
-                       viomonseq++, 0, 0, 0, 0, 0);
-
-       if (hvrc == HvLpEvent_Rc_Good)
-               viopathStatus[remoteLp].isActive = 1;
-       else {
-               printk(KERN_WARNING_VIO "could not connect to partition %d\n",
-                               remoteLp);
-               viopathStatus[remoteLp].isActive = 0;
-       }
-}
-
-static void handleMonitorEvent(struct HvLpEvent *event)
-{
-       HvLpIndex remoteLp;
-       int i;
-
-       /*
-        * This handler is _also_ called as part of the loop
-        * at the end of this routine, so it must be able to
-        * ignore NULL events...
-        */
-       if (!event)
-               return;
-
-       /*
-        * First see if this is just a normal monitor message from the
-        * other partition
-        */
-       if (event->xFlags.xFunction == HvLpEvent_Function_Int) {
-               remoteLp = event->xSourceLp;
-               if (!viopathStatus[remoteLp].isActive)
-                       sendMonMsg(remoteLp);
-               return;
-       }
-
-       /*
-        * This path is for an acknowledgement; the other partition
-        * died
-        */
-       remoteLp = event->xTargetLp;
-       if ((event->xSourceInstanceId != viopathStatus[remoteLp].mSourceInst) ||
-           (event->xTargetInstanceId != viopathStatus[remoteLp].mTargetInst)) {
-               printk(KERN_WARNING_VIO "ignoring ack....mismatched instances\n");
-               return;
-       }
-
-       printk(KERN_WARNING_VIO "partition %d ended\n", remoteLp);
-
-       viopathStatus[remoteLp].isActive = 0;
-
-       /*
-        * For each active handler, pass them a NULL
-        * message to indicate that the other partition
-        * died
-        */
-       for (i = 0; i < VIO_MAX_SUBTYPES; i++) {
-               if (vio_handler[i] != NULL)
-                       (*vio_handler[i])(NULL);
-       }
-}
-
-int vio_setHandler(int subtype, vio_event_handler_t *beh)
-{
-       subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT;
-       if ((subtype < 0) || (subtype >= VIO_MAX_SUBTYPES))
-               return -EINVAL;
-       if (vio_handler[subtype] != NULL)
-               return -EBUSY;
-       vio_handler[subtype] = beh;
-       return 0;
-}
-EXPORT_SYMBOL(vio_setHandler);
-
-int vio_clearHandler(int subtype)
-{
-       subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT;
-       if ((subtype < 0) || (subtype >= VIO_MAX_SUBTYPES))
-               return -EINVAL;
-       if (vio_handler[subtype] == NULL)
-               return -EAGAIN;
-       vio_handler[subtype] = NULL;
-       return 0;
-}
-EXPORT_SYMBOL(vio_clearHandler);
-
-static void handleConfig(struct HvLpEvent *event)
-{
-       if (!event)
-               return;
-       if (event->xFlags.xFunction == HvLpEvent_Function_Int) {
-               printk(KERN_WARNING_VIO
-                      "unexpected config request from partition %d",
-                      event->xSourceLp);
-
-               if ((event->xFlags.xFunction == HvLpEvent_Function_Int) &&
-                   (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck)) {
-                       event->xRc = HvLpEvent_Rc_InvalidSubtype;
-                       HvCallEvent_ackLpEvent(event);
-               }
-               return;
-       }
-
-       up((struct semaphore *)event->xCorrelationToken);
-}
-
-/*
- * Initialization of the hosting partition
- */
-void vio_set_hostlp(void)
-{
-       /*
-        * If this has already been set then we DON'T want to either change
-        * it or re-register the proc file system
-        */
-       if (viopath_hostLp != HvLpIndexInvalid)
-               return;
-
-       /*
-        * Figure out our hosting partition.  This isn't allowed to change
-        * while we're active
-        */
-       viopath_ourLp = HvLpConfig_getLpIndex();
-       viopath_hostLp = HvCallCfg_getHostingLpIndex(viopath_ourLp);
-
-       /* If we have a valid hosting LP, create a proc file system entry
-        * for config information
-        */
-       if (viopath_hostLp != HvLpIndexInvalid) {
-               iSeries_proc_callback(&vio_proc_init);
-               vio_setHandler(viomajorsubtype_config, handleConfig);
-       }
-}
-EXPORT_SYMBOL(vio_set_hostlp);
-
-static void vio_handleEvent(struct HvLpEvent *event, struct pt_regs *regs)
-{
-       HvLpIndex remoteLp;
-       int subtype = (event->xSubtype & VIOMAJOR_SUBTYPE_MASK)
-               >> VIOMAJOR_SUBTYPE_SHIFT;
-
-       if (event->xFlags.xFunction == HvLpEvent_Function_Int) {
-               remoteLp = event->xSourceLp;
-               /*
-                * The isActive is checked because if the hosting partition
-                * went down and came back up it would not be active but it
-                * would have different source and target instances, in which
-                * case we'd want to reset them.  This case really protects
-                * against an unauthorized active partition sending interrupts
-                * or acks to this linux partition.
-                */
-               if (viopathStatus[remoteLp].isActive
-                   && (event->xSourceInstanceId !=
-                       viopathStatus[remoteLp].mTargetInst)) {
-                       printk(KERN_WARNING_VIO
-                              "message from invalid partition. "
-                              "int msg rcvd, source inst (%d) doesnt match (%d)\n",
-                              viopathStatus[remoteLp].mTargetInst,
-                              event->xSourceInstanceId);
-                       return;
-               }
-
-               if (viopathStatus[remoteLp].isActive
-                   && (event->xTargetInstanceId !=
-                       viopathStatus[remoteLp].mSourceInst)) {
-                       printk(KERN_WARNING_VIO
-                              "message from invalid partition. "
-                              "int msg rcvd, target inst (%d) doesnt match (%d)\n",
-                              viopathStatus[remoteLp].mSourceInst,
-                              event->xTargetInstanceId);
-                       return;
-               }
-       } else {
-               remoteLp = event->xTargetLp;
-               if (event->xSourceInstanceId !=
-                   viopathStatus[remoteLp].mSourceInst) {
-                       printk(KERN_WARNING_VIO
-                              "message from invalid partition. "
-                              "ack msg rcvd, source inst (%d) doesnt match (%d)\n",
-                              viopathStatus[remoteLp].mSourceInst,
-                              event->xSourceInstanceId);
-                       return;
-               }
-
-               if (event->xTargetInstanceId !=
-                   viopathStatus[remoteLp].mTargetInst) {
-                       printk(KERN_WARNING_VIO
-                              "message from invalid partition. "
-                              "viopath: ack msg rcvd, target inst (%d) doesnt match (%d)\n",
-                              viopathStatus[remoteLp].mTargetInst,
-                              event->xTargetInstanceId);
-                       return;
-               }
-       }
-
-       if (vio_handler[subtype] == NULL) {
-               printk(KERN_WARNING_VIO
-                      "unexpected virtual io event subtype %d from partition %d\n",
-                      event->xSubtype, remoteLp);
-               /* No handler.  Ack if necessary */
-               if ((event->xFlags.xFunction == HvLpEvent_Function_Int) &&
-                   (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck)) {
-                       event->xRc = HvLpEvent_Rc_InvalidSubtype;
-                       HvCallEvent_ackLpEvent(event);
-               }
-               return;
-       }
-
-       /* This innocuous little line is where all the real work happens */
-       (*vio_handler[subtype])(event);
-}
-
-static void viopath_donealloc(void *parm, int number)
-{
-       struct doneAllocParms_t *parmsp = (struct doneAllocParms_t *)parm;
-
-       parmsp->number = number;
-       if (parmsp->used_wait_atomic)
-               *(parmsp->wait_atomic) = 0;
-       else
-               up(parmsp->sem);
-}
-
-static int allocateEvents(HvLpIndex remoteLp, int numEvents)
-{
-       struct doneAllocParms_t parms;
-       DECLARE_MUTEX_LOCKED(Semaphore);
-       volatile unsigned long wait_atomic = 1;
-
-       if (in_atomic()) {
-               parms.used_wait_atomic = 1;
-               parms.wait_atomic = &wait_atomic;
-       } else {
-               parms.used_wait_atomic = 0;
-               parms.sem = &Semaphore;
-       }
-       mf_allocateLpEvents(remoteLp, HvLpEvent_Type_VirtualIo, 250,    /* It would be nice to put a real number here! */
-                           numEvents, &viopath_donealloc, &parms);
-       if (in_atomic()) {
-               while (wait_atomic)
-                       mb();
-       } else
-               down(&Semaphore);
-       return parms.number;
-}
-
-int viopath_open(HvLpIndex remoteLp, int subtype, int numReq)
-{
-       int i;
-       unsigned long flags;
-       int tempNumAllocated;
-
-       if ((remoteLp >= HvMaxArchitectedLps) || (remoteLp == HvLpIndexInvalid))
-               return -EINVAL;
-
-       subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT;
-       if ((subtype < 0) || (subtype >= VIO_MAX_SUBTYPES))
-               return -EINVAL;
-
-       spin_lock_irqsave(&statuslock, flags);
-
-       if (!event_buffer_initialised) {
-               for (i = 0; i < VIO_MAX_SUBTYPES; i++)
-                       atomic_set(&event_buffer_available[i], 1);
-               event_buffer_initialised = 1;
-       }
-
-       viopathStatus[remoteLp].users[subtype]++;
-
-       if (!viopathStatus[remoteLp].isOpen) {
-               viopathStatus[remoteLp].isOpen = 1;
-               HvCallEvent_openLpEventPath(remoteLp, HvLpEvent_Type_VirtualIo);
-
-               /*
-                * Don't hold the spinlock during an operation that
-                * can sleep.
-                */
-               spin_unlock_irqrestore(&statuslock, flags);
-               tempNumAllocated = allocateEvents(remoteLp, 1);
-               spin_lock_irqsave(&statuslock, flags);
-
-               viopathStatus[remoteLp].numberAllocated += tempNumAllocated;
-
-               if (viopathStatus[remoteLp].numberAllocated == 0) {
-                       HvCallEvent_closeLpEventPath(remoteLp,
-                                       HvLpEvent_Type_VirtualIo);
-
-                       spin_unlock_irqrestore(&statuslock, flags);
-                       return -ENOMEM;
-               }
-
-               viopathStatus[remoteLp].mSourceInst =
-                       HvCallEvent_getSourceLpInstanceId(remoteLp,
-                                       HvLpEvent_Type_VirtualIo);
-               viopathStatus[remoteLp].mTargetInst =
-                       HvCallEvent_getTargetLpInstanceId(remoteLp,
-                                       HvLpEvent_Type_VirtualIo);
-               HvLpEvent_registerHandler(HvLpEvent_Type_VirtualIo,
-                                         &vio_handleEvent);
-               sendMonMsg(remoteLp);
-               printk(KERN_INFO_VIO
-                      "Opening connection to partition %d, setting sinst %d, tinst %d\n",
-                      remoteLp, viopathStatus[remoteLp].mSourceInst,
-                      viopathStatus[remoteLp].mTargetInst);
-       }
-
-       spin_unlock_irqrestore(&statuslock, flags);
-       tempNumAllocated = allocateEvents(remoteLp, numReq);
-       spin_lock_irqsave(&statuslock, flags);
-       viopathStatus[remoteLp].numberAllocated += tempNumAllocated;
-       spin_unlock_irqrestore(&statuslock, flags);
-
-       return 0;
-}
-EXPORT_SYMBOL(viopath_open);
-
-int viopath_close(HvLpIndex remoteLp, int subtype, int numReq)
-{
-       unsigned long flags;
-       int i;
-       int numOpen;
-       struct doneAllocParms_t doneAllocParms;
-       DECLARE_MUTEX_LOCKED(Semaphore);
-
-       if ((remoteLp >= HvMaxArchitectedLps) || (remoteLp == HvLpIndexInvalid))
-               return -EINVAL;
-
-       subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT;
-       if ((subtype < 0) || (subtype >= VIO_MAX_SUBTYPES))
-               return -EINVAL;
-
-       spin_lock_irqsave(&statuslock, flags);
-       /*
-        * If the viopath_close somehow gets called before a
-        * viopath_open it could decrement to -1 which is a non
-        * recoverable state so we'll prevent this from
-        * happening.
-        */
-       if (viopathStatus[remoteLp].users[subtype] > 0)
-               viopathStatus[remoteLp].users[subtype]--;
-
-       spin_unlock_irqrestore(&statuslock, flags);
-
-       doneAllocParms.sem = &Semaphore;
-       mf_deallocateLpEvents(remoteLp, HvLpEvent_Type_VirtualIo,
-                             numReq, &viopath_donealloc, &doneAllocParms);
-       down(&Semaphore);
-
-       spin_lock_irqsave(&statuslock, flags);
-       for (i = 0, numOpen = 0; i < VIO_MAX_SUBTYPES; i++)
-               numOpen += viopathStatus[remoteLp].users[i];
-
-       if ((viopathStatus[remoteLp].isOpen) && (numOpen == 0)) {
-               printk(KERN_INFO_VIO "Closing connection to partition %d",
-                               remoteLp);
-
-               HvCallEvent_closeLpEventPath(remoteLp,
-                                            HvLpEvent_Type_VirtualIo);
-               viopathStatus[remoteLp].isOpen = 0;
-               viopathStatus[remoteLp].isActive = 0;
-
-               for (i = 0; i < VIO_MAX_SUBTYPES; i++)
-                       atomic_set(&event_buffer_available[i], 0);
-               event_buffer_initialised = 0;
-       }
-       spin_unlock_irqrestore(&statuslock, flags);
-       return 0;
-}
-EXPORT_SYMBOL(viopath_close);
-
-void *vio_get_event_buffer(int subtype)
-{
-       subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT;
-       if ((subtype < 0) || (subtype >= VIO_MAX_SUBTYPES))
-               return NULL;
-
-       if (atomic_dec_if_positive(&event_buffer_available[subtype]) == 0)
-               return &event_buffer[subtype * 256];
-       else
-               return NULL;
-}
-EXPORT_SYMBOL(vio_get_event_buffer);
-
-void vio_free_event_buffer(int subtype, void *buffer)
-{
-       subtype = subtype >> VIOMAJOR_SUBTYPE_SHIFT;
-       if ((subtype < 0) || (subtype >= VIO_MAX_SUBTYPES)) {
-               printk(KERN_WARNING_VIO
-                      "unexpected subtype %d freeing event buffer\n",
-                      subtype);
-               return;
-       }
-
-       if (atomic_read(&event_buffer_available[subtype]) != 0) {
-               printk(KERN_WARNING_VIO
-                      "freeing unallocated event buffer, subtype %d\n",
-                      subtype);
-               return;
-       }
-
-       if (buffer != &event_buffer[subtype * 256]) {
-               printk(KERN_WARNING_VIO
-                      "freeing invalid event buffer, subtype %d\n",
-                      subtype);
-       }
-
-       atomic_set(&event_buffer_available[subtype], 1);
-}
-EXPORT_SYMBOL(vio_free_event_buffer);
-
-static const struct vio_error_entry vio_no_error =
-    { 0, 0, "Non-VIO Error" };
-static const struct vio_error_entry vio_unknown_error =
-    { 0, EIO, "Unknown Error" };
-
-static const struct vio_error_entry vio_default_errors[] = {
-       {0x0001, EIO, "No Connection"},
-       {0x0002, EIO, "No Receiver"},
-       {0x0003, EIO, "No Buffer Available"},
-       {0x0004, EBADRQC, "Invalid Message Type"},
-       {0x0000, 0, NULL},
-};
-
-const struct vio_error_entry *vio_lookup_rc(
-               const struct vio_error_entry *local_table, u16 rc)
-{
-       const struct vio_error_entry *cur;
-
-       if (!rc)
-               return &vio_no_error;
-       if (local_table)
-               for (cur = local_table; cur->rc; ++cur)
-                       if (cur->rc == rc)
-                               return cur;
-       for (cur = vio_default_errors; cur->rc; ++cur)
-               if (cur->rc == rc)
-                       return cur;
-       return &vio_unknown_error;
-}
-EXPORT_SYMBOL(vio_lookup_rc);
index 724f29e..d8d1d09 100644 (file)
@@ -53,6 +53,7 @@ SECTIONS
     *(.data1)
     *(.sdata)
     *(.sdata2)
+    *(.got.plt) *(.got)
     *(.dynamic)
     CONSTRUCTORS
   }
@@ -125,7 +126,6 @@ SECTIONS
   /* freed after init ends here */
 
   __toc_start = .;
-  .got : { *(.got.plt) *(.got) }
   .toc : { *(.toc) }
   . = ALIGN(4096);
   __toc_end = .;
index ba9be58..f6cc9d9 100644 (file)
@@ -58,6 +58,7 @@ struct hw_interrupt_type xics_8259_pic = {
 };
 
 #define XICS_IPI               2
+#define XICS_IRQ_OFFSET                0x10
 #define XICS_IRQ_SPURIOUS      0
 
 /* Want a priority other than 0.  Various HW issues require this. */
@@ -201,7 +202,7 @@ static void pSeriesLP_qirr_info(int n_cpu , u8 value)
 {
        unsigned long lpar_rc;
 
-       lpar_rc = plpar_ipi(get_hard_smp_processor_id(n_cpu), value);
+       lpar_rc = plpar_ipi(n_cpu, value);
        if (lpar_rc != H_Success)
                panic("bad return code qirr - rc = %lx\n", lpar_rc); 
 }
@@ -213,37 +214,22 @@ xics_ops pSeriesLP_ops = {
        pSeriesLP_qirr_info
 };
 
-/* XXX Fix this when we clean up large irq support */
-extern cpumask_t get_irq_affinity(unsigned int irq);
-
-void xics_enable_irq(unsigned int irq)
+void xics_enable_irq(u_int virq)
 {
+       u_int irq;
        long call_status;
        unsigned int server;
-       cpumask_t cpumask = get_irq_affinity(irq);
-       cpumask_t allcpus = CPU_MASK_ALL;
-       cpumask_t tmp = CPU_MASK_NONE;
 
-       irq = irq_offset_down(irq);
+       virq -= XICS_IRQ_OFFSET;
+       irq = virt_irq_to_real(virq);
        if (irq == XICS_IPI)
                return;
 
 #ifdef CONFIG_IRQ_ALL_CPUS
-       /* For the moment only implement delivery to all cpus or one cpu */
-       if (smp_threads_ready) {
-               if (cpus_equal(cpumask, allcpus)) {
-                       server = default_distrib_server;
-               } else {
-                       cpus_and(tmp, cpu_online_map, cpumask);
-
-                       if (cpus_empty(tmp))
-                               server = default_distrib_server;
-                       else
-                               server = get_hard_smp_processor_id(first_cpu(tmp));
-               }
-       } else {
+       if (smp_threads_ready)
+               server = default_distrib_server;
+       else
                server = default_server;
-       }
 #else
        server = default_server;
 #endif
@@ -265,11 +251,13 @@ void xics_enable_irq(unsigned int irq)
        }
 }
 
-void xics_disable_irq(unsigned int irq)
+void xics_disable_irq(u_int virq)
 {
+       u_int irq;
        long call_status;
 
-       irq = irq_offset_down(irq);
+       virq -= XICS_IRQ_OFFSET;
+       irq = virt_irq_to_real(virq);
        if (irq == XICS_IPI)
                return;
 
@@ -290,20 +278,20 @@ void xics_disable_irq(unsigned int irq)
        }
 }
 
-void xics_end_irq(unsigned int irq)
+void xics_end_irq(u_int        irq)
 {
        int cpu = smp_processor_id();
 
        iosync();
-       ops->xirr_info_set(cpu, ((0xff<<24) | (irq_offset_down(irq))));
-
+       ops->xirr_info_set(cpu, ((0xff<<24) |
+                                (virt_irq_to_real(irq-XICS_IRQ_OFFSET))));
 }
 
 void xics_mask_and_ack_irq(u_int irq)
 {
        int cpu = smp_processor_id();
 
-       if (irq < irq_offset_value()) {
+       if (irq < XICS_IRQ_OFFSET) {
                i8259_pic.ack(irq);
                iosync();
                ops->xirr_info_set(cpu, ((0xff<<24) |
@@ -327,14 +315,13 @@ int xics_get_irq(struct pt_regs *regs)
                irq = i8259_irq(cpu);
                if (irq == -1) {
                        /* Spurious cascaded interrupt.  Still must ack xics */
-                       xics_end_irq(irq_offset_up(xics_irq_8259_cascade));
-
+                        xics_end_irq(XICS_IRQ_OFFSET + xics_irq_8259_cascade);
                        irq = -1;
                }
        } else if (vec == XICS_IRQ_SPURIOUS) {
                irq = -1;
        } else {
-               irq = irq_offset_up(vec);
+               irq = real_irq_to_virt(vec) + XICS_IRQ_OFFSET;
        }
        return irq;
 }
@@ -392,16 +379,6 @@ void xics_setup_cpu(void)
 
 #endif /* CONFIG_SMP */
 
-void
-xics_init_irq_desc(irq_desc_t *desc)
-{
-       /* Don't mess with the handler if already set.
-        * This leaves the setup of isa handlers undisturbed.
-        */
-       if (!desc->handler)
-               desc->handler = &xics_pic;
-}
-
 void xics_init_IRQ(void)
 {
        int i;
@@ -421,7 +398,7 @@ void xics_init_IRQ(void)
        ibm_int_on  = rtas_token("ibm,int-on");
        ibm_int_off = rtas_token("ibm,int-off");
 
-       np = of_find_node_by_type(NULL, "PowerPC-External-Interrupt-Presentation");
+       np = find_type_devices("PowerPC-External-Interrupt-Presentation");
        if (!np) {
                printk(KERN_WARNING "Can't find Interrupt Presentation\n");
                udbg_printf("Can't find Interrupt Presentation\n");
@@ -456,15 +433,13 @@ nextnode:
                if (indx >= NR_CPUS) break;
        }
 
-       np = of_find_node_by_type(np, "PowerPC-External-Interrupt-Presentation");
+       np = np->next;
        if ((indx < NR_CPUS) && np) goto nextnode;
 
        /* Find the server numbers for the boot cpu. */
-       for (np = of_find_node_by_type(NULL, "cpu");
-            np;
-            np = of_find_node_by_type(np, "cpu")) {
+       for (np = find_type_devices("cpu"); np; np = np->next) {
                ireg = (uint *)get_property(np, "reg", &ilen);
-               if (ireg && ireg[0] == hard_smp_processor_id()) {
+               if (ireg && ireg[0] == smp_processor_id()) {
                        ireg = (uint *)get_property(np, "ibm,ppc-interrupt-gserver#s", &ilen);
                        i = ilen / sizeof(int);
                        if (ireg && i > 0) {
@@ -474,12 +449,11 @@ nextnode:
                        break;
                }
        }
-       of_node_put(np);
 
        intr_base = inodes[0].addr;
        intr_size = (ulong)inodes[0].size;
 
-       np = of_find_node_by_type(NULL, "interrupt-controller");
+       np = find_type_devices("interrupt-controller");
        if (!np) {
                printk(KERN_WARNING "xics:  no ISA Interrupt Controller\n");
                xics_irq_8259_cascade_real = -1;
@@ -492,8 +466,7 @@ nextnode:
                        while (1);
                }
                xics_irq_8259_cascade_real = *ireg;
-               xics_irq_8259_cascade = xics_irq_8259_cascade_real;
-               of_node_put(np);
+               xics_irq_8259_cascade = virt_irq_create_mapping(xics_irq_8259_cascade_real);
        }
 
        if (systemcfg->platform == PLATFORM_PSERIES) {
@@ -501,8 +474,8 @@ nextnode:
                for (i = 0; i < NR_CPUS; ++i) {
                        if (!cpu_possible(i))
                                continue;
-                       xics_per_cpu[i] = __ioremap((ulong)inodes[get_hard_smp_processor_id(i)].addr, 
-                                                   (ulong)inodes[get_hard_smp_processor_id(i)].size,
+                       xics_per_cpu[i] = __ioremap((ulong)inodes[i].addr, 
+                                                   (ulong)inodes[i].size,
                                                    _PAGE_NO_CACHE);
                }
 #else
@@ -521,7 +494,9 @@ nextnode:
        xics_8259_pic.enable = i8259_pic.enable;
        xics_8259_pic.disable = i8259_pic.disable;
        for (i = 0; i < 16; ++i)
-               get_real_irq_desc(i)->handler = &xics_8259_pic;
+               irq_desc[i].handler = &xics_8259_pic;
+       for (; i < NR_IRQS; ++i)
+               irq_desc[i].handler = &xics_pic;
 
        ops->cppr_info(boot_cpuid, 0xff);
        iosync();
@@ -537,7 +512,7 @@ static int __init xics_setup_i8259(void)
 {
        if (naca->interrupt_controller == IC_PPC_XIC &&
            xics_irq_8259_cascade != -1) {
-               if (request_irq(irq_offset_up(xics_irq_8259_cascade), 
+               if (request_irq(xics_irq_8259_cascade + XICS_IRQ_OFFSET,
                                no_action, 0, "8259 cascade", 0))
                        printk(KERN_ERR "xics_init_IRQ: couldn't get 8259 cascade\n");
                i8259_init();
@@ -549,15 +524,19 @@ arch_initcall(xics_setup_i8259);
 #ifdef CONFIG_SMP
 void xics_request_IPIs(void)
 {
+       real_irq_to_virt_map[XICS_IPI] = virt_irq_to_real_map[XICS_IPI] =
+               XICS_IPI;
        /* IPIs are marked SA_INTERRUPT as they must run with irqs disabled */
-       request_irq(irq_offset_up(XICS_IPI), xics_ipi_action, SA_INTERRUPT, "IPI", 0);
-       get_real_irq_desc(irq_offset_up(XICS_IPI))->status |= IRQ_PER_CPU;
+       request_irq(XICS_IPI + XICS_IRQ_OFFSET, xics_ipi_action, SA_INTERRUPT,
+                   "IPI", 0);
+       irq_desc[XICS_IPI+XICS_IRQ_OFFSET].status |= IRQ_PER_CPU;
 }
 #endif
 
-void xics_set_affinity(unsigned int irq, cpumask_t cpumask)
+void xics_set_affinity(unsigned int virq, cpumask_t cpumask)
 {
-       irq_desc_t *desc = get_irq_desc(irq);
+        irq_desc_t *desc = irq_desc + virq;
+       unsigned int irq;
        unsigned long flags;
        long status;
        unsigned long xics_status[2];
@@ -565,7 +544,8 @@ void xics_set_affinity(unsigned int irq, cpumask_t cpumask)
        cpumask_t allcpus = CPU_MASK_ALL;
        cpumask_t tmp = CPU_MASK_NONE;
 
-       irq = irq_offset_down(irq);
+       virq -= XICS_IRQ_OFFSET;
+       irq = virt_irq_to_real(virq);
        if (irq == XICS_IPI)
                return;
 
@@ -586,7 +566,7 @@ void xics_set_affinity(unsigned int irq, cpumask_t cpumask)
                cpus_and(tmp, cpu_online_map, cpumask);
                if (cpus_empty(tmp))
                        goto out;
-               newmask = get_hard_smp_processor_id(first_cpu(tmp));
+               newmask = first_cpu(cpumask);
        }
 
        status = rtas_call(ibm_set_xive, 3, 1, NULL,
index 94b182f..7e801d6 100644 (file)
@@ -4,6 +4,6 @@
 
 EXTRA_CFLAGS += -mno-minimal-toc
 
-obj-y := fault.o init.o extable.o imalloc.o hash_utils.o hash_low.o
+obj-y := fault.o init.o extable.o imalloc.o
 obj-$(CONFIG_DISCONTIGMEM) += numa.o
 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
diff --git a/arch/ppc64/mm/hash_low.S b/arch/ppc64/mm/hash_low.S
deleted file mode 100644 (file)
index 8eec1c7..0000000
+++ /dev/null
@@ -1,285 +0,0 @@
-/*
- * ppc64 MMU hashtable management routines
- *
- * (c) Copyright IBM Corp. 2003
- *
- * Maintained by: Benjamin Herrenschmidt
- *                <benh@kernel.crashing.org>
- *
- * This file is covered by the GNU Public Licence v2 as
- * described in the kernel's COPYING file.
- */
-
-#include <linux/config.h>
-#include <asm/processor.h>
-#include <asm/pgtable.h>
-#include <asm/mmu.h>
-#include <asm/page.h>
-#include <asm/types.h>
-#include <asm/ppc_asm.h>
-#include <asm/offsets.h>
-#include <asm/cputable.h>
-
-       .text
-
-/*
- * Stackframe:
- *             
- *         +-> Back chain                      (SP + 256)
- *         |   General register save area      (SP + 112)
- *         |   Parameter save area             (SP + 48)
- *         |   TOC save area                   (SP + 40)
- *         |   link editor doubleword          (SP + 32)
- *         |   compiler doubleword             (SP + 24)
- *         |   LR save area                    (SP + 16)
- *         |   CR save area                    (SP + 8)
- * SP ---> +-- Back chain                      (SP + 0)
- */
-#define STACKFRAMESIZE 256
-
-/* Save parameters offsets */
-#define STK_PARM(i)    (STACKFRAMESIZE + 48 + ((i)-3)*8)
-
-/* Save non-volatile offsets */
-#define STK_REG(i)     (112 + ((i)-14)*8)
-
-/*
- * _hash_page(unsigned long ea, unsigned long access, unsigned long vsid,
- *             pte_t *ptep, unsigned long trap, int local)
- *
- * Adds a page to the hash table. This is the non-LPAR version for now
- */
-
-_GLOBAL(__hash_page)
-       mflr    r0
-       std     r0,16(r1)
-       stdu    r1,-STACKFRAMESIZE(r1)
-       /* Save all params that we need after a function call */
-       std     r6,STK_PARM(r6)(r1)
-       std     r8,STK_PARM(r8)(r1)
-       
-       /* Add _PAGE_PRESENT to access */
-       ori     r4,r4,_PAGE_PRESENT
-
-       /* Save non-volatile registers.
-        * r31 will hold "old PTE"
-        * r30 is "new PTE"
-        * r29 is "va"
-        * r28 is a hash value
-        * r27 is hashtab mask (maybe dynamic patched instead ?)
-        */
-       std     r27,STK_REG(r27)(r1)
-       std     r28,STK_REG(r28)(r1)
-       std     r29,STK_REG(r29)(r1)
-       std     r30,STK_REG(r30)(r1)
-       std     r31,STK_REG(r31)(r1)
-       
-       /* Step 1:
-        *
-        * Check permissions, atomically mark the linux PTE busy
-        * and hashed.
-        */ 
-1:
-       ldarx   r31,0,r6
-       /* Check access rights (access & ~(pte_val(*ptep))) */
-       andc.   r0,r4,r31
-       bne-    htab_wrong_access
-       /* Check if PTE is busy */
-       andi.   r0,r31,_PAGE_BUSY
-       bne-    1b
-       /* Prepare new PTE value (turn access RW into DIRTY, then
-        * add BUSY,HASHPTE and ACCESSED)
-        */
-       rlwinm  r30,r4,5,24,24  /* _PAGE_RW -> _PAGE_DIRTY */
-       or      r30,r30,r31
-       ori     r30,r30,_PAGE_BUSY | _PAGE_ACCESSED | _PAGE_HASHPTE
-       /* Write the linux PTE atomically (setting busy) */
-       stdcx.  r30,0,r6
-       bne-    1b
-       
-
-       /* Step 2:
-        *
-        * Insert/Update the HPTE in the hash table. At this point,
-        * r4 (access) is re-useable, we use it for the new HPTE flags
-        */
-
-       /* Calc va and put it in r29 */
-       rldicr  r29,r5,28,63-28
-       rldicl  r3,r3,0,36
-       or      r29,r3,r29
-
-       /* Calculate hash value for primary slot and store it in r28 */
-       rldicl  r5,r5,0,25              /* vsid & 0x0000007fffffffff */
-       rldicl  r0,r3,64-12,48          /* (ea >> 12) & 0xffff */
-       xor     r28,r5,r0
-       
-       /* Convert linux PTE bits into HW equivalents
-        */
-       andi.   r3,r30,0x1fa            /* Get basic set of flags */
-       rlwinm  r0,r30,32-2+1,30,30     /* _PAGE_RW -> _PAGE_USER (r0) */
-       rlwinm  r4,r30,32-7+1,30,30     /* _PAGE_DIRTY -> _PAGE_USER (r4) */
-       and     r0,r0,r4                /* _PAGE_RW & _PAGE_DIRTY -> r0 bit 30 */
-       andc    r0,r30,r0               /* r0 = pte & ~r0 */
-       rlwimi  r3,r0,32-1,31,31        /* Insert result into PP lsb */
-
-       /* We eventually do the icache sync here (maybe inline that
-        * code rather than call a C function...) 
-        */
-BEGIN_FTR_SECTION
-       mr      r4,r30
-       mr      r5,r7
-       bl      .hash_page_do_lazy_icache
-END_FTR_SECTION_IFSET(CPU_FTR_NOEXECUTE)
-
-       /* At this point, r3 contains new PP bits, save them in
-        * place of "access" in the param area (sic)
-        */
-       std     r3,STK_PARM(r4)(r1)
-
-       /* Get htab_hash_mask */
-       ld      r4,htab_data@got(2)
-       ld      r27,16(r4)      /* htab_data.htab_hash_mask -> r27 */
-
-       /* Check if we may already be in the hashtable, in this case, we
-        * go to out-of-line code to try to modify the HPTE
-        */
-       andi.   r0,r31,_PAGE_HASHPTE
-       bne     htab_modify_pte
-
-htab_insert_pte:
-       /* Clear hpte bits in new pte (we also clear BUSY btw) and
-        * add _PAGE_HASHPTE
-        */
-       lis     r0,_PAGE_HPTEFLAGS@h
-       ori     r0,r0,_PAGE_HPTEFLAGS@l
-       andc    r30,r30,r0
-       ori     r30,r30,_PAGE_HASHPTE
-
-1:
-       /* page number in r5 */
-       rldicl  r5,r31,64-PTE_SHIFT,PTE_SHIFT
-
-       /* Calculate primary group hash */
-       and     r0,r28,r27
-       rldicr  r3,r0,3,63-3    /* r0 = (hash & mask) << 3 */
-
-       /* Call ppc_md.hpte_insert */
-       ld      r7,STK_PARM(r4)(r1)     /* Retreive new pp bits */
-       mr      r4,r29                  /* Retreive va */
-       li      r6,0                    /* primary slot *
-       li      r8,0                    /* not bolted and not large */
-       li      r9,0
-_GLOBAL(htab_call_hpte_insert1)
-       bl      .                       /* Will be patched by htab_finish_init() */
-       cmpi    0,r3,0
-       bge     htab_pte_insert_ok      /* Insertion successful */
-       cmpi    0,r3,-2                 /* Critical failure */
-       beq-    htab_pte_insert_failure
-
-       /* Now try secondary slot */
-       ori     r30,r30,_PAGE_SECONDARY
-       
-       /* page number in r5 */
-       rldicl  r5,r31,64-PTE_SHIFT,PTE_SHIFT
-
-       /* Calculate secondary group hash */
-       not     r3,r28
-       and     r0,r3,r27
-       rldicr  r3,r0,3,63-3    /* r0 = (~hash & mask) << 3 */
-       
-       /* Call ppc_md.hpte_insert */
-       ld      r7,STK_PARM(r4)(r1)     /* Retreive new pp bits */
-       mr      r4,r29                  /* Retreive va */
-       li      r6,1                    /* secondary slot *
-       li      r8,0                    /* not bolted and not large */
-       li      r9,0
-_GLOBAL(htab_call_hpte_insert2)
-       bl      .                       /* Will be patched by htab_finish_init() */
-       cmpi    0,r3,0
-       bge+    htab_pte_insert_ok      /* Insertion successful */
-       cmpi    0,r3,-2                 /* Critical failure */
-       beq-    htab_pte_insert_failure
-
-       /* Both are full, we need to evict something */
-       mftb    r0
-       /* Pick a random group based on TB */
-       andi.   r0,r0,1
-       mr      r5,r28
-       bne     2f
-       not     r5,r5
-2:     and     r0,r5,r27
-       rldicr  r3,r0,3,63-3    /* r0 = (hash & mask) << 3 */   
-       /* Call ppc_md.hpte_remove */
-_GLOBAL(htab_call_hpte_remove)
-       bl      .                       /* Will be patched by htab_finish_init() */
-
-       /* Try all again */
-       b       1b      
-
-htab_pte_insert_ok:
-       /* Insert slot number in PTE */
-       rldimi  r30,r3,12,63-14
-               
-       /* Write out the PTE with a normal write
-        * (maybe add eieio may be good still ?)
-        */
-htab_write_out_pte:
-       ld      r6,STK_PARM(r6)(r1)
-       std     r30,0(r6)
-       li      r3, 0
-bail:
-       ld      r27,STK_REG(r27)(r1)
-       ld      r28,STK_REG(r28)(r1)
-       ld      r29,STK_REG(r29)(r1)
-       ld      r30,STK_REG(r30)(r1)
-       ld      r31,STK_REG(r31)(r1)
-       addi    r1,r1,STACKFRAMESIZE
-       ld      r0,16(r1)
-       mtlr    r0
-       blr
-
-htab_modify_pte:
-       /* Keep PP bits in r4 and slot idx from the PTE around in r3 */
-       mr      r4,r3
-       rlwinm  r3,r31,32-12,29,31
-
-       /* Secondary group ? if yes, get a inverted hash value */
-       mr      r5,r28
-       andi.   r0,r31,_PAGE_SECONDARY
-       beq     1f
-       not     r5,r5
-1:
-       /* Calculate proper slot value for ppc_md.hpte_updatepp */
-       and     r0,r5,r27
-       rldicr  r0,r0,3,63-3    /* r0 = (hash & mask) << 3 */
-       add     r3,r0,r3        /* add slot idx */
-
-       /* Call ppc_md.hpte_updatepp */
-       mr      r5,r29                  /* va */
-       li      r6,0                    /* large is 0 */
-       ld      r7,STK_PARM(r8)(r1)     /* get "local" param */
-_GLOBAL(htab_call_hpte_updatepp)
-       bl      .                       /* Will be patched by htab_finish_init() */
-
-       /* if we failed because typically the HPTE wasn't really here
-        * we try an insertion. 
-        */
-       cmpi    0,r3,-1
-       beq-    htab_insert_pte
-
-       /* Clear the BUSY bit and Write out the PTE */
-       li      r0,_PAGE_BUSY
-       andc    r30,r30,r0
-       b       htab_write_out_pte
-
-htab_wrong_access:
-       /* Bail out clearing reservation */
-       stdcx.  r31,0,r6
-       li      r3,1
-       b       bail
-
-htab_pte_insert_failure:
-       b       .htab_insert_failure
-
-
diff --git a/arch/ppc64/mm/hash_utils.c b/arch/ppc64/mm/hash_utils.c
deleted file mode 100644 (file)
index 0170b2c..0000000
+++ /dev/null
@@ -1,366 +0,0 @@
-/*
- * PowerPC64 port by Mike Corrigan and Dave Engebretsen
- *   {mikejc|engebret}@us.ibm.com
- *
- *    Copyright (c) 2000 Mike Corrigan <mikejc@us.ibm.com>
- *
- * SMP scalability work:
- *    Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM
- * 
- *    Module name: htab.c
- *
- *    Description:
- *      PowerPC Hashed Page Table functions
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- */
-
-#include <linux/config.h>
-#include <linux/spinlock.h>
-#include <linux/errno.h>
-#include <linux/sched.h>
-#include <linux/proc_fs.h>
-#include <linux/stat.h>
-#include <linux/sysctl.h>
-#include <linux/ctype.h>
-#include <linux/cache.h>
-#include <linux/init.h>
-
-#include <asm/ppcdebug.h>
-#include <asm/processor.h>
-#include <asm/pgtable.h>
-#include <asm/mmu.h>
-#include <asm/mmu_context.h>
-#include <asm/page.h>
-#include <asm/types.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-#include <asm/naca.h>
-#include <asm/pmc.h>
-#include <asm/machdep.h>
-#include <asm/lmb.h>
-#include <asm/abs_addr.h>
-#include <asm/tlbflush.h>
-#include <asm/io.h>
-#include <asm/eeh.h>
-#include <asm/tlb.h>
-#include <asm/cacheflush.h>
-#include <asm/cputable.h>
-/*
- * Note:  pte   --> Linux PTE
- *        HPTE  --> PowerPC Hashed Page Table Entry
- *
- * Execution context:
- *   htab_initialize is called with the MMU off (of course), but
- *   the kernel has been copied down to zero so it can directly
- *   reference global data.  At this point it is very difficult
- *   to print debug info.
- *
- */
-
-HTAB htab_data = {NULL, 0, 0, 0, 0};
-
-extern unsigned long _SDR1;
-
-#define KB (1024)
-#define MB (1024*KB)
-
-static inline void loop_forever(void)
-{
-       volatile unsigned long x = 1;
-       for(;x;x|=1)
-               ;
-}
-
-#ifdef CONFIG_PPC_PSERIES
-static inline void create_pte_mapping(unsigned long start, unsigned long end,
-                                     unsigned long mode, int large)
-{
-       unsigned long addr;
-       unsigned int step;
-
-       if (large)
-               step = 16*MB;
-       else
-               step = 4*KB;
-
-       for (addr = start; addr < end; addr += step) {
-               unsigned long vpn, hash, hpteg;
-               unsigned long vsid = get_kernel_vsid(addr);
-               unsigned long va = (vsid << 28) | (addr & 0xfffffff);
-               int ret;
-
-               if (large)
-                       vpn = va >> LARGE_PAGE_SHIFT;
-               else
-                       vpn = va >> PAGE_SHIFT;
-
-               hash = hpt_hash(vpn, large);
-
-               hpteg = ((hash & htab_data.htab_hash_mask)*HPTES_PER_GROUP);
-
-               if (systemcfg->platform == PLATFORM_PSERIES_LPAR)
-                       ret = pSeries_lpar_hpte_insert(hpteg, va,
-                               (unsigned long)__v2a(addr) >> PAGE_SHIFT,
-                               0, mode, 1, large);
-               else
-                       ret = pSeries_hpte_insert(hpteg, va,
-                               (unsigned long)__v2a(addr) >> PAGE_SHIFT,
-                               0, mode, 1, large);
-
-               if (ret == -1) {
-                       ppc64_terminate_msg(0x20, "create_pte_mapping");
-                       loop_forever();
-               }
-       }
-}
-
-void __init htab_initialize(void)
-{
-       unsigned long table, htab_size_bytes;
-       unsigned long pteg_count;
-       unsigned long mode_rw;
-
-       /*
-        * Calculate the required size of the htab.  We want the number of
-        * PTEGs to equal one half the number of real pages.
-        */ 
-       htab_size_bytes = 1UL << naca->pftSize;
-       pteg_count = htab_size_bytes >> 7;
-
-       /* For debug, make the HTAB 1/8 as big as it normally would be. */
-       ifppcdebug(PPCDBG_HTABSIZE) {
-               pteg_count >>= 3;
-               htab_size_bytes = pteg_count << 7;
-       }
-
-       htab_data.htab_num_ptegs = pteg_count;
-       htab_data.htab_hash_mask = pteg_count - 1;
-
-       if (systemcfg->platform == PLATFORM_PSERIES) {
-               /* Find storage for the HPT.  Must be contiguous in
-                * the absolute address space.
-                */
-               table = lmb_alloc(htab_size_bytes, htab_size_bytes);
-               if ( !table ) {
-                       ppc64_terminate_msg(0x20, "hpt space");
-                       loop_forever();
-               }
-               htab_data.htab = (HPTE *)__a2v(table);
-
-               /* htab absolute addr + encoded htabsize */
-               _SDR1 = table + __ilog2(pteg_count) - 11;
-
-               /* Initialize the HPT with no entries */
-               memset((void *)table, 0, htab_size_bytes);
-       } else {
-               /* Using a hypervisor which owns the htab */
-               htab_data.htab = NULL;
-               _SDR1 = 0; 
-       }
-
-       mode_rw = _PAGE_ACCESSED | _PAGE_COHERENT | PP_RWXX;
-
-       /* XXX we currently map kernel text rw, should fix this */
-       if ((cur_cpu_spec->cpu_features & CPU_FTR_16M_PAGE)
-           && systemcfg->physicalMemorySize > 256*MB) {
-               create_pte_mapping((unsigned long)KERNELBASE, 
-                                  KERNELBASE + 256*MB, mode_rw, 0);
-               create_pte_mapping((unsigned long)KERNELBASE + 256*MB, 
-                                  KERNELBASE + (systemcfg->physicalMemorySize), 
-                                  mode_rw, 1);
-       } else {
-               create_pte_mapping((unsigned long)KERNELBASE, 
-                                  KERNELBASE+(systemcfg->physicalMemorySize), 
-                                  mode_rw, 0);
-       }
-}
-#undef KB
-#undef MB
-#endif
-
-/*
- * Called by asm hashtable.S for doing lazy icache flush
- */
-unsigned int hash_page_do_lazy_icache(unsigned int pp, pte_t pte, int trap)
-{
-       struct page *page;
-
-#define PPC64_HWNOEXEC (1 << 2)
-
-       if (!pfn_valid(pte_pfn(pte)))
-               return pp;
-
-       page = pte_page(pte);
-
-       /* page is dirty */
-       if (!test_bit(PG_arch_1, &page->flags) && !PageReserved(page)) {
-               if (trap == 0x400) {
-                       __flush_dcache_icache(page_address(page));
-                       set_bit(PG_arch_1, &page->flags);
-               } else
-                       pp |= PPC64_HWNOEXEC;
-       }
-       return pp;
-}
-
-/*
- * Called by asm hashtable.S in case of critical insert failure
- */
-void htab_insert_failure(void)
-{
-       panic("hash_page: pte_insert failed\n");
-}
-
-/*
- * Handle a fault by adding an HPTE. If the address can't be determined
- * to be valid via Linux page tables, return 1. If handled return 0
- */
-extern int __hash_page(unsigned long ea, unsigned long access, unsigned long vsid,
-                      pte_t *ptep, unsigned long trap, int local);
-
-
-int hash_page(unsigned long ea, unsigned long access, unsigned long trap)
-{
-       void *pgdir;
-       unsigned long vsid;
-       struct mm_struct *mm;
-       pte_t *ptep;
-       int ret;
-       int user_region = 0;
-       int local = 0;
-       cpumask_t tmp;
-
-       /* Check for invalid addresses. */
-       if (!IS_VALID_EA(ea))
-               return 1;
-
-       switch (REGION_ID(ea)) {
-       case USER_REGION_ID:
-               user_region = 1;
-               mm = current->mm;
-               if (mm == NULL)
-                       return 1;
-
-               vsid = get_vsid(mm->context, ea);
-               break;
-       case IO_REGION_ID:
-               mm = &ioremap_mm;
-               vsid = get_kernel_vsid(ea);
-               break;
-       case VMALLOC_REGION_ID:
-               mm = &init_mm;
-               vsid = get_kernel_vsid(ea);
-               break;
-#if 0
-       case EEH_REGION_ID:
-               /*
-                * Should only be hit if there is an access to MMIO space
-                * which is protected by EEH.
-                * Send the problem up to do_page_fault 
-                */
-       case KERNEL_REGION_ID:
-               /*
-                * Should never get here - entire 0xC0... region is bolted.
-                * Send the problem up to do_page_fault 
-                */
-#endif
-       default:
-               /* Not a valid range
-                * Send the problem up to do_page_fault 
-                */
-               return 1;
-               break;
-       }
-
-       pgdir = mm->pgd;
-
-       if (pgdir == NULL)
-               return 1;
-
-       tmp = cpumask_of_cpu(smp_processor_id());
-       if (user_region && cpus_equal(mm->cpu_vm_mask, tmp))
-               local = 1;
-
-       /* Is this a huge page ? */
-       if (unlikely(in_hugepage_area(mm->context, ea)))
-               ret = hash_huge_page(mm, access, ea, vsid, local);
-       else {
-               ptep = find_linux_pte(pgdir, ea);
-               if (ptep == NULL)
-                       return 1;
-               ret = __hash_page(ea, access, vsid, ptep, trap, local);
-       }
-
-
-       return ret;
-}
-
-void flush_hash_page(unsigned long context, unsigned long ea, pte_t pte,
-                    int local)
-{
-       unsigned long vsid, vpn, va, hash, secondary, slot;
-
-       /* XXX fix for large ptes */
-       unsigned long large = 0;
-
-       if ((ea >= USER_START) && (ea <= USER_END))
-               vsid = get_vsid(context, ea);
-       else
-               vsid = get_kernel_vsid(ea);
-
-       va = (vsid << 28) | (ea & 0x0fffffff);
-       if (large)
-               vpn = va >> LARGE_PAGE_SHIFT;
-       else
-               vpn = va >> PAGE_SHIFT;
-       hash = hpt_hash(vpn, large);
-       secondary = (pte_val(pte) & _PAGE_SECONDARY) >> 15;
-       if (secondary)
-               hash = ~hash;
-       slot = (hash & htab_data.htab_hash_mask) * HPTES_PER_GROUP;
-       slot += (pte_val(pte) & _PAGE_GROUP_IX) >> 12;
-
-       ppc_md.hpte_invalidate(slot, va, large, local);
-}
-
-void flush_hash_range(unsigned long context, unsigned long number, int local)
-{
-       if (ppc_md.flush_hash_range) {
-               ppc_md.flush_hash_range(context, number, local);
-       } else {
-               int i;
-               struct ppc64_tlb_batch *batch =
-                       &ppc64_tlb_batch[smp_processor_id()];
-
-               for (i = 0; i < number; i++)
-                       flush_hash_page(context, batch->addr[i], batch->pte[i],
-                                       local);
-       }
-}
-
-static inline void make_bl(unsigned int *insn_addr, void *func)
-{
-       unsigned long funcp = *((unsigned long *)func);
-       int offset = funcp - (unsigned long)insn_addr;
-
-       *insn_addr = (unsigned int)(0x48000001 | (offset & 0x03fffffc));
-       flush_icache_range((unsigned long)insn_addr, 4+
-                          (unsigned long)insn_addr);
-}
-
-void __init htab_finish_init(void)
-{
-       extern unsigned int *htab_call_hpte_insert1;
-       extern unsigned int *htab_call_hpte_insert2;
-       extern unsigned int *htab_call_hpte_remove;
-       extern unsigned int *htab_call_hpte_updatepp;
-
-       make_bl(htab_call_hpte_insert1, ppc_md.hpte_insert);
-       make_bl(htab_call_hpte_insert2, ppc_md.hpte_insert);
-       make_bl(htab_call_hpte_remove, ppc_md.hpte_remove);
-       make_bl(htab_call_hpte_updatepp, ppc_md.hpte_updatepp);
-}
index 0b30f6d..061b6f0 100644 (file)
@@ -652,9 +652,13 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
        unsigned long va, vpn;
        int is_write;
        hugepte_t old_pte, new_pte;
-       unsigned long hpteflags, prpn, flags;
+       unsigned long hpteflags, prpn;
        long slot;
 
+       /* Is this for us? */
+       if (!in_hugepage_area(mm->context, ea))
+               return -1;
+
        ea &= ~(HPAGE_SIZE-1);
 
        /* We have to find the first hugepte in the batch, since
@@ -694,8 +698,6 @@ int hash_huge_page(struct mm_struct *mm, unsigned long access,
         *      page is currently not DIRTY. 
         */
 
-       spin_lock_irqsave(&mm->page_table_lock, flags);
-
        old_pte = *ptep;
        new_pte = old_pte;
 
@@ -767,8 +769,6 @@ repeat:
                *ptep = new_pte;
        }
 
-       spin_unlock_irqrestore(&mm->page_table_lock, flags);
-
        return 0;
 }
 
@@ -921,7 +921,7 @@ int is_hugepage_mem_enough(size_t size)
  * this far.
  */
 static struct page *hugetlb_nopage(struct vm_area_struct *vma,
-                               unsigned long address, int unused)
+                               unsigned long address, int *unused)
 {
        BUG();
        return NULL;
index d6bf228..68ad683 100644 (file)
 rwlock_t imlist_lock = RW_LOCK_UNLOCKED;
 struct vm_struct * imlist = NULL;
 
-static int get_free_im_addr(unsigned long size, unsigned long *im_addr)
+struct vm_struct *get_im_area(unsigned long size)
 {
        unsigned long addr;
-       struct vm_struct **p, *tmp;
-
+       struct vm_struct **p, *tmp, *area;
+  
+       area = (struct vm_struct *) kmalloc(sizeof(*area), GFP_KERNEL);
+       if (!area)
+               return NULL;
        addr = IMALLOC_START;
+       write_lock(&imlist_lock);
        for (p = &imlist; (tmp = *p) ; p = &tmp->next) {
                if (size + addr < (unsigned long) tmp->addr)
                        break;
-               if ((unsigned long)tmp->addr >= IMALLOC_START) 
-                       addr = tmp->size + (unsigned long) tmp->addr;
-               if (addr > IMALLOC_END-size) 
-                       return 1;
-       }
-       *im_addr = addr;
-
-       return 0;
-}
-
-/* Return whether the region described by v_addr and size overlaps
- * the region described by vm.  Overlapping regions meet the 
- * following conditions:
- * 1) The regions share some part of the address space
- * 2) The regions aren't identical
- * 3) The first region is not a subset of the second
- */
-static inline int im_region_overlaps(unsigned long v_addr, unsigned long size,
-                    struct vm_struct *vm)
-{
-       return (v_addr + size > (unsigned long) vm->addr + vm->size &&
-               v_addr < (unsigned long) vm->addr + vm->size) ||
-              (v_addr < (unsigned long) vm->addr &&
-               v_addr + size > (unsigned long) vm->addr);
-}
-
-/* Return whether the region described by v_addr and size is a subset
- * of the region described by vm
- */
-static inline int im_region_is_subset(unsigned long v_addr, unsigned long size,
-                       struct vm_struct *vm)
-{
-       return (int) (v_addr >= (unsigned long) vm->addr && 
-                     v_addr < (unsigned long) vm->addr + vm->size &&
-                     size < vm->size);
-}
-
-/* Determine imalloc status of region described by v_addr and size.
- * Can return one of the following:
- * IM_REGION_UNUSED   -  Entire region is unallocated in imalloc space.
- * IM_REGION_SUBSET -    Region is a subset of a region that is already
- *                      allocated in imalloc space.
- *                      vm will be assigned to a ptr to the parent region.
- * IM_REGION_EXISTS -    Exact region already allocated in imalloc space.
- *                       vm will be assigned to a ptr to the existing imlist
- *                       member.
- * IM_REGION_OVERLAPS -  A portion of the region is already allocated in 
- *                       imalloc space.
- */
-static int im_region_status(unsigned long v_addr, unsigned long size, 
-                   struct vm_struct **vm)
-{
-       struct vm_struct *tmp;
-
-       for (tmp = imlist; tmp; tmp = tmp->next) 
-               if (v_addr < (unsigned long) tmp->addr + tmp->size) 
-                       break;
-                                       
-       if (tmp) {
-               if (im_region_overlaps(v_addr, size, tmp))
-                       return IM_REGION_OVERLAP;
-
-               *vm = tmp;
-               if (im_region_is_subset(v_addr, size, tmp))
-                       return IM_REGION_SUBSET;
-               else if (v_addr == (unsigned long) tmp->addr && 
-                        size == tmp->size) 
-                       return IM_REGION_EXISTS;
-       }
-
-       *vm = NULL;
-       return IM_REGION_UNUSED;
-}
-
-static struct vm_struct * split_im_region(unsigned long v_addr, 
-               unsigned long size, struct vm_struct *parent)
-{
-       struct vm_struct *vm1 = NULL;
-       struct vm_struct *vm2 = NULL;
-       struct vm_struct *new_vm = NULL;
-       
-       vm1 = (struct vm_struct *) kmalloc(sizeof(*vm1), GFP_KERNEL);
-       if (vm1 == NULL) {
-               printk(KERN_ERR "%s() out of memory\n", __FUNCTION__);
-               return NULL;
-       }
-
-       if (v_addr == (unsigned long) parent->addr) {
-               /* Use existing parent vm_struct to represent child, allocate
-                * new one for the remainder of parent range
-                */
-               vm1->size = parent->size - size;
-               vm1->addr = (void *) (v_addr + size);
-               vm1->next = parent->next;
-
-               parent->size = size;
-               parent->next = vm1;
-               new_vm = parent;
-       } else if (v_addr + size == (unsigned long) parent->addr + 
-                       parent->size) {
-               /* Allocate new vm_struct to represent child, use existing
-                * parent one for remainder of parent range
-                */
-               vm1->size = size;
-               vm1->addr = (void *) v_addr;
-               vm1->next = parent->next;
-               new_vm = vm1;
-
-               parent->size -= size;
-               parent->next = vm1;
-       } else {
-               /* Allocate two new vm_structs for the new child and 
-                * uppermost remainder, and use existing parent one for the
-                * lower remainder of parent range
-                */
-               vm2 = (struct vm_struct *) kmalloc(sizeof(*vm2), GFP_KERNEL);
-               if (vm2 == NULL) {
-                       printk(KERN_ERR "%s() out of memory\n", __FUNCTION__);
-                       kfree(vm1);
+               addr = tmp->size + (unsigned long) tmp->addr;
+               if (addr > IMALLOC_END-size) {
+                       write_unlock(&imlist_lock);
+                       kfree(area);
                        return NULL;
                }
-
-               vm1->size = size;
-               vm1->addr = (void *) v_addr;
-               vm1->next = vm2;
-               new_vm = vm1;
-
-               vm2->size = ((unsigned long) parent->addr + parent->size) - 
-                               (v_addr + size);
-               vm2->addr = (void *) v_addr + size;
-               vm2->next = parent->next;
-
-               parent->size = v_addr - (unsigned long) parent->addr;
-               parent->next = vm1;
-       }
-
-       return new_vm;
-}
-
-static struct vm_struct * __add_new_im_area(unsigned long req_addr, 
-                                           unsigned long size)
-{
-       struct vm_struct **p, *tmp, *area;
-               
-       for (p = &imlist; (tmp = *p) ; p = &tmp->next) {
-               if (req_addr + size <= (unsigned long)tmp->addr)
-                       break;
        }
-       
-       area = (struct vm_struct *) kmalloc(sizeof(*area), GFP_KERNEL);
-       if (!area)
-               return NULL;
        area->flags = 0;
-       area->addr = (void *)req_addr;
+       area->addr = (void *)addr;
        area->size = size;
        area->next = *p;
        *p = area;
-
-       return area;
-}
-
-static struct vm_struct * __im_get_area(unsigned long req_addr, 
-                                       unsigned long size,
-                                       int criteria)
-{
-       struct vm_struct *tmp;
-       int status;
-
-       status = im_region_status(req_addr, size, &tmp);
-       if ((criteria & status) == 0) {
-               return NULL;
-       }
-       
-       switch (status) {
-       case IM_REGION_UNUSED:
-               tmp = __add_new_im_area(req_addr, size);
-               break;
-       case IM_REGION_SUBSET:
-               tmp = split_im_region(req_addr, size, tmp);
-               break;
-       case IM_REGION_EXISTS:
-               break;
-       default:
-               printk(KERN_ERR "%s() unexpected imalloc region status\n",
-                               __FUNCTION__);
-               tmp = NULL;
-       }
-
-       return tmp;
-}
-
-struct vm_struct * im_get_free_area(unsigned long size)
-{
-       struct vm_struct *area;
-       unsigned long addr;
-       
-       write_lock(&imlist_lock);
-       if (get_free_im_addr(size, &addr)) {
-               printk(KERN_ERR "%s() cannot obtain addr for size 0x%lx\n",
-                               __FUNCTION__, size);
-               area = NULL;
-               goto next_im_done;
-       }
-
-       area = __im_get_area(addr, size, IM_REGION_UNUSED);
-       if (area == NULL) {
-               printk(KERN_ERR 
-                      "%s() cannot obtain area for addr 0x%lx size 0x%lx\n",
-                       __FUNCTION__, addr, size);
-       }
-next_im_done:
        write_unlock(&imlist_lock);
        return area;
 }
 
-struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size,
-               int criteria)
-{
-       struct vm_struct *area;
-
-       write_lock(&imlist_lock);
-       area = __im_get_area(v_addr, size, criteria);
-       write_unlock(&imlist_lock);
-       return area;
-}
-
-unsigned long im_free(void * addr)
+void ifree(void * addr)
 {
        struct vm_struct **p, *tmp;
-       unsigned long ret_size = 0;
   
        if (!addr)
-               return ret_size;
+               return;
        if ((PAGE_SIZE-1) & (unsigned long) addr) {
-               printk(KERN_ERR "Trying to %s bad address (%p)\n", __FUNCTION__,                        addr);
-               return ret_size;
+               printk(KERN_ERR "Trying to ifree() bad address (%p)\n", addr);
+               return;
        }
        write_lock(&imlist_lock);
        for (p = &imlist ; (tmp = *p) ; p = &tmp->next) {
                if (tmp->addr == addr) {
-                       ret_size = tmp->size;
                        *p = tmp->next;
                        kfree(tmp);
                        write_unlock(&imlist_lock);
-                       return ret_size;
+                       return;
                }
        }
        write_unlock(&imlist_lock);
-       printk(KERN_ERR "Trying to %s nonexistent area (%p)\n", __FUNCTION__,
-                       addr);
-       return ret_size;
+       printk(KERN_ERR "Trying to ifree() nonexistent area (%p)\n", addr);
 }
+
index 3af02c6..e238b2c 100644 (file)
@@ -67,7 +67,6 @@
 struct mmu_context_queue_t mmu_context_queue;
 int mem_init_done;
 unsigned long ioremap_bot = IMALLOC_BASE;
-static unsigned long phbs_io_bot = PHBS_IO_BASE;
 
 extern pgd_t swapper_pg_dir[];
 extern struct task_struct *current_set[NR_CPUS];
@@ -75,9 +74,6 @@ extern struct task_struct *current_set[NR_CPUS];
 extern pgd_t ioremap_dir[];
 pgd_t * ioremap_pgd = (pgd_t *)&ioremap_dir;
 
-static void * __ioremap_com(unsigned long addr, unsigned long pa, 
-                           unsigned long ea, unsigned long size, 
-                           unsigned long flags);
 static void map_io_page(unsigned long va, unsigned long pa, int flags);
 
 unsigned long klimit = (unsigned long)_end;
@@ -94,52 +90,6 @@ unsigned long __max_memory;
  * include/asm-ppc64/tlb.h file -- tgall
  */
 DEFINE_PER_CPU(struct mmu_gather, mmu_gathers);
-DEFINE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
-unsigned long pte_freelist_forced_free;
-
-static void pte_free_smp_sync(void *arg)
-{
-       /* Do nothing, just ensure we sync with all CPUs */
-}
-
-/* This is only called when we are critically out of memory
- * (and fail to get a page in pte_free_tlb).
- */
-void pte_free_now(struct page *ptepage)
-{
-       pte_freelist_forced_free++;
-
-       smp_call_function(pte_free_smp_sync, NULL, 0, 1);
-
-       pte_free(ptepage);
-}
-
-static void pte_free_rcu_callback(void *arg)
-{
-       struct pte_freelist_batch *batch = arg;
-       unsigned int i;
-
-       for (i = 0; i < batch->index; i++)
-               pte_free(batch->pages[i]);
-       free_page((unsigned long)batch);
-}
-
-void pte_free_submit(struct pte_freelist_batch *batch)
-{
-       INIT_RCU_HEAD(&batch->rcu);
-       call_rcu(&batch->rcu, pte_free_rcu_callback, batch);
-}
-
-void pte_free_finish(void)
-{
-       /* This is safe as we are holding page_table_lock */
-       struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
-       
-       if (*batchp == NULL)
-               return;
-       pte_free_submit(*batchp);
-       *batchp = NULL;
-}
 
 void show_mem(void)
 {
@@ -183,10 +133,12 @@ ioremap(unsigned long addr, unsigned long size)
 #endif
 }
 
+extern struct vm_struct * get_im_area( unsigned long size );
+
 void *
 __ioremap(unsigned long addr, unsigned long size, unsigned long flags)
 {
-       unsigned long pa, ea;
+       unsigned long pa, ea, i;
 
        /*
         * Choose an address to map it to.
@@ -205,163 +157,26 @@ __ioremap(unsigned long addr, unsigned long size, unsigned long flags)
 
        if (mem_init_done) {
                struct vm_struct *area;
-               area = im_get_free_area(size);
-               if (area == NULL)
+               area = get_im_area(size);
+               if (area == 0)
                        return NULL;
                ea = (unsigned long)(area->addr);
-       } else {
+       } 
+       else {
                ea = ioremap_bot;
                ioremap_bot += size;
        }
 
-       return __ioremap_com(addr, pa, ea, size, flags);
-}
-
-#define IS_PAGE_ALIGNED(_val) ((_val) == ((_val) & PAGE_MASK))
-
-int __ioremap_explicit(unsigned long pa, unsigned long ea,
-                      unsigned long size, unsigned long flags)
-{
-       struct vm_struct *area;
-       
-       /* For now, require page-aligned values for pa, ea, and size */
-       if (!IS_PAGE_ALIGNED(pa) || !IS_PAGE_ALIGNED(ea) ||
-           !IS_PAGE_ALIGNED(size)) {
-               printk(KERN_ERR "unaligned value in %s\n", __FUNCTION__);
-               return 1;
-       }
-       
-       if (!mem_init_done) {
-               /* Two things to consider in this case:
-                * 1) No records will be kept (imalloc, etc) that the region
-                *    has been remapped
-                * 2) It won't be easy to iounmap() the region later (because
-                *    of 1)
-                */
-               ;
-       } else {
-               area = im_get_area(ea, size, IM_REGION_UNUSED|IM_REGION_SUBSET);
-               if (area == NULL) {
-                       printk(KERN_ERR "could not obtain imalloc area for ea 0x%lx\n", ea);
-                       return 1;
-               }
-               if (ea != (unsigned long) area->addr) {
-                       printk(KERN_ERR "unexpected addr return from im_get_area\n");
-                       return 1;
-               }
-       }
-       
-       if (__ioremap_com(pa, pa, ea, size, flags) != (void *) ea) {
-               printk(KERN_ERR "__ioremap_com() returned unexpected addr\n");
-               return 1;
-       }
-
-       return 0;
-}
-
-static void unmap_im_area_pte(pmd_t *pmd, unsigned long address,
-                                 unsigned long size)
-{
-       unsigned long end;
-       pte_t *pte;
-
-       if (pmd_none(*pmd))
-               return;
-       if (pmd_bad(*pmd)) {
-               pmd_ERROR(*pmd);
-               pmd_clear(pmd);
-               return;
-       }
-
-       pte = pte_offset_kernel(pmd, address);
-       address &= ~PMD_MASK;
-       end = address + size;
-       if (end > PMD_SIZE)
-               end = PMD_SIZE;
-
-       do {
-               pte_t page;
-               page = ptep_get_and_clear(pte);
-               address += PAGE_SIZE;
-               pte++;
-               if (pte_none(page))
-                       continue;
-               if (pte_present(page))
-                       continue;
-               printk(KERN_CRIT "Whee.. Swapped out page in kernel page table\n");
-       } while (address < end);
-}
-
-static void unmap_im_area_pmd(pgd_t *dir, unsigned long address,
-                                 unsigned long size)
-{
-       unsigned long end;
-       pmd_t *pmd;
-
-       if (pgd_none(*dir))
-               return;
-       if (pgd_bad(*dir)) {
-               pgd_ERROR(*dir);
-               pgd_clear(dir);
-               return;
-       }
-
-       pmd = pmd_offset(dir, address);
-       address &= ~PGDIR_MASK;
-       end = address + size;
-       if (end > PGDIR_SIZE)
-               end = PGDIR_SIZE;
-
-       do {
-               unmap_im_area_pte(pmd, address, end - address);
-               address = (address + PMD_SIZE) & PMD_MASK;
-               pmd++;
-       } while (address < end);
-}
-
-/*  
- * Unmap an IO region and remove it from imalloc'd list.
- * Access to IO memory should be serialized by driver.
- * This code is modeled after vmalloc code - unmap_vm_area()
- *
- * XXX what about calls before mem_init_done (ie python_countermeasures())     
- */
-void pSeries_iounmap(void *addr)
-{
-       unsigned long address, start, end, size;
-       struct mm_struct *mm;
-       pgd_t *dir;
+       if ((flags & _PAGE_PRESENT) == 0)
+               flags |= pgprot_val(PAGE_KERNEL);
+       if (flags & (_PAGE_NO_CACHE | _PAGE_WRITETHRU))
+               flags |= _PAGE_GUARDED;
 
-       if (!mem_init_done) {
-               return;
-       }
-       
-       /* addr could be in EEH or IO region, map it to IO region regardless.
-        */
-       addr = (void *) (IO_TOKEN_TO_ADDR(addr) & PAGE_MASK);
-       
-       if ((size = im_free(addr)) == 0) {
-               return;
+       for (i = 0; i < size; i += PAGE_SIZE) {
+               map_io_page(ea+i, pa+i, flags);
        }
 
-       address = (unsigned long)addr; 
-       start = address;
-       end = address + size;
-
-       mm = &ioremap_mm;
-       spin_lock(&mm->page_table_lock);
-
-       dir = pgd_offset_i(address);
-       flush_cache_all();
-       do {
-               unmap_im_area_pmd(dir, address, end - address);
-               address = (address + PGDIR_SIZE) & PGDIR_MASK;
-               dir++;
-       } while (address && (address < end));
-       __flush_tlb_range(mm, start, end);
-
-       spin_unlock(&mm->page_table_lock);
-       return;
+       return (void *) (ea + (addr & ~PAGE_MASK));
 }
 
 void iounmap(void *addr) 
@@ -371,52 +186,10 @@ void iounmap(void *addr)
        return;
 #else
        /* DRENG / PPPBBB todo */
-       return pSeries_iounmap(addr);
+       return;
 #endif
 }
 
-int iounmap_explicit(void *addr, unsigned long size)
-{
-       struct vm_struct *area;
-       
-       /* addr could be in EEH or IO region, map it to IO region regardless.
-        */
-       addr = (void *) (IO_TOKEN_TO_ADDR(addr) & PAGE_MASK);
-
-       /* Verify that the region either exists or is a subset of an existing
-        * region.  In the latter case, split the parent region to create 
-        * the exact region 
-        */
-       area = im_get_area((unsigned long) addr, size, 
-                           IM_REGION_EXISTS | IM_REGION_SUBSET);
-       if (area == NULL) {
-               printk(KERN_ERR "%s() cannot unmap nonexistant range 0x%lx\n",
-                               __FUNCTION__, (unsigned long) addr);
-               return 1;
-       }
-
-       iounmap(area->addr);
-       return 0;
-}
-
-static void * __ioremap_com(unsigned long addr, unsigned long pa, 
-                           unsigned long ea, unsigned long size, 
-                           unsigned long flags)
-{
-       unsigned long i;
-       
-       if ((flags & _PAGE_PRESENT) == 0)
-               flags |= pgprot_val(PAGE_KERNEL);
-       if (flags & (_PAGE_NO_CACHE | _PAGE_WRITETHRU))
-               flags |= _PAGE_GUARDED;
-
-       for (i = 0; i < size; i += PAGE_SIZE) {
-               map_io_page(ea+i, pa+i, flags);
-       }
-
-       return (void *) (ea + (addr & ~PAGE_MASK));
-}
-
 /*
  * map_io_page currently only called by __ioremap
  * map_io_page adds an entry to the ioremap page table
@@ -954,19 +727,6 @@ void update_mmu_cache(struct vm_area_struct *vma, unsigned long ea,
                    0x300, local);
 }
 
-void * reserve_phb_iospace(unsigned long size)
-{
-       void *virt_addr;
-               
-       if (phbs_io_bot >= IMALLOC_BASE) 
-               panic("reserve_phb_iospace(): phb io space overflow\n");
-                       
-       virt_addr = (void *) phbs_io_bot;
-       phbs_io_bot += size;
-
-       return virt_addr;
-}
-
 kmem_cache_t *zero_cache;
 
 static void zero_ctor(void *pte, kmem_cache_t *cache, unsigned long flags)
index f4a67cf..397985d 100644 (file)
@@ -46,29 +46,29 @@ static inline void map_cpu_to_node(int cpu, int node)
 
 static int __init parse_numa_properties(void)
 {
-       struct device_node *cpu = NULL;
-       struct device_node *memory = NULL;
+       struct device_node *cpu;
+       struct device_node *memory;
        int *cpu_associativity;
        int *memory_associativity;
        int depth;
        int max_domain = 0;
 
-       cpu = of_find_node_by_type(NULL, "cpu");
+       cpu = find_type_devices("cpu");
        if (!cpu)
-               goto err;
+               return -1;
 
-       memory = of_find_node_by_type(NULL, "memory");
+       memory = find_type_devices("memory");
        if (!memory)
-               goto err;
+               return -1;
 
        cpu_associativity = (int *)get_property(cpu, "ibm,associativity", NULL);
        if (!cpu_associativity)
-               goto err;
+               return -1;
 
        memory_associativity = (int *)get_property(memory, "ibm,associativity",
                                                   NULL);
        if (!memory_associativity)
-               goto err;
+               return -1;
 
        /* find common depth */
        if (cpu_associativity[0] < memory_associativity[0])
@@ -76,7 +76,7 @@ static int __init parse_numa_properties(void)
        else
                depth = memory_associativity[0];
 
-       for (; cpu; cpu = of_find_node_by_type(cpu, "cpu")) {
+       for (cpu = find_type_devices("cpu"); cpu; cpu = cpu->next) {
                int *tmp;
                int cpu_nr, numa_domain;
 
@@ -106,7 +106,8 @@ static int __init parse_numa_properties(void)
                map_cpu_to_node(cpu_nr, numa_domain);
        }
 
-       for (; memory; memory = of_find_node_by_type(memory, "memory")) {
+       for (memory = find_type_devices("memory"); memory;
+            memory = memory->next) {
                int *tmp1, *tmp2;
                unsigned long i;
                unsigned long start = 0;
@@ -195,10 +196,6 @@ new_range:
        numnodes = max_domain + 1;
 
        return 0;
-err:
-       of_node_put(cpu);
-       of_node_put(memory);
-       return -1;
 }
 
 void setup_nonnuma(void)
index 390881f..5f74503 100644 (file)
  * ioctl32.c: Conversion between 32bit and 64bit native ioctls.
  *
  *  S390 version
- *    Copyright (C) 2000-2003 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ *    Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
  *    Author(s): Gerhard Tonn (ton@de.ibm.com)
- *               Arnd Bergmann (arndb@de.ibm.com)
  *
- * Original implementation from 32-bit Sparc compat code which is
+ * Heavily inspired by the 32-bit Sparc compat code which is  
  * Copyright (C) 2000 Silicon Graphics, Inc.
  * Written by Ulf Carlsson (ulfc@engr.sgi.com) 
+ *
  */
 
-#include "compat_linux.h"
-#define INCLUDES
-#define CODE
-#include "../../../fs/compat_ioctl.c"
+#include <linux/compat.h>
+#include <linux/init.h>
+#include <linux/ioctl32.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/types.h>
+
+#include <asm/ioctls.h>
+#include <asm/types.h>
+#include <asm/uaccess.h>
+
+#include <linux/blkdev.h>
+#include <linux/blkpg.h>
+#include <linux/cdrom.h>
+#include <linux/dm-ioctl.h>
+#include <linux/elevator.h>
+#include <linux/file.h>
+#include <linux/fs.h>
+#include <linux/hdreg.h>
+#include <linux/kd.h>
+#include <linux/loop.h>
+#include <linux/lp.h>
+#include <linux/mtio.h>
+#include <linux/netdevice.h>
+#include <linux/nbd.h>
+#include <linux/ppp_defs.h>
+#include <linux/raid/md_u.h>
+#include <linux/random.h>
+#include <linux/raw.h>
+#include <linux/route.h>
+#include <linux/rtc.h>
+#include <linux/vt.h>
+#include <linux/watchdog.h>
+
+#include <linux/auto_fs.h>
+#include <linux/auto_fs4.h>
+#include <linux/devfs_fs.h>
+#include <linux/ext2_fs.h>
+#include <linux/ncp_fs.h>
+#include <linux/smb_fs.h>
+
+#include <linux/if_bonding.h>
+#include <linux/if_ppp.h>
+#include <linux/if_pppox.h>
+#include <linux/if_tun.h>
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_ioctl.h>
+#include <scsi/sg.h>
+
 #include <asm/dasd.h>
+#include <asm/sockios.h>
 #include <asm/tape390.h>
 
-static int do_ioctl32_pointer(unsigned int fd, unsigned int cmd,
-                               unsigned long arg, struct file *f)
+#include "compat_linux.h"
+
+long sys_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg);
+
+struct hd_geometry32 {
+       unsigned char   heads;
+       unsigned char   sectors;
+       unsigned short  cylinders;
+       __u32           start;
+};  
+
+static inline int hd_geometry_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg,
+                                   struct file *f)
+{
+       struct hd_geometry32 *hg32 = (struct hd_geometry32 *) A(arg);
+       struct hd_geometry hg;
+       int ret;
+       mm_segment_t old_fs = get_fs();
+       
+       set_fs (KERNEL_DS);
+       ret = sys_ioctl (fd, cmd, (long)&hg);
+       set_fs (old_fs);
+
+       if (ret)
+               return ret;
+
+       ret = put_user (hg.heads, &(hg32->heads));
+       ret |= __put_user (hg.sectors, &(hg32->sectors));
+       ret |= __put_user (hg.cylinders, &(hg32->cylinders));
+       ret |= __put_user (hg.start, &(hg32->start));
+
+       return ret;
+}
+
+#define EXT2_IOC32_GETFLAGS               _IOR('f', 1, int)
+#define EXT2_IOC32_SETFLAGS               _IOW('f', 2, int)
+#define EXT2_IOC32_GETVERSION             _IOR('v', 1, int)
+#define EXT2_IOC32_SETVERSION             _IOW('v', 2, int)
+
+struct ifmap32 {
+       unsigned int mem_start;
+       unsigned int mem_end;
+       unsigned short base_addr;
+       unsigned char irq;
+       unsigned char dma;
+       unsigned char port;
+};
+
+struct ifreq32 {
+#define IFHWADDRLEN     6
+#define IFNAMSIZ        16
+        union {
+                char    ifrn_name[IFNAMSIZ];   /* if name, e.g. "en0" */
+        } ifr_ifrn;
+        union {
+                struct  sockaddr ifru_addr;
+                struct  sockaddr ifru_dstaddr;
+                struct  sockaddr ifru_broadaddr;
+                struct  sockaddr ifru_netmask;
+                struct  sockaddr ifru_hwaddr;
+                short   ifru_flags;
+                int     ifru_ivalue;
+                int     ifru_mtu;
+                struct  ifmap32 ifru_map;
+                char    ifru_slave[IFNAMSIZ];   /* Just fits the size */
+               char    ifru_newname[IFNAMSIZ];
+                __u32  ifru_data;
+        } ifr_ifru;
+};
+
+struct ifconf32 {
+        int     ifc_len;                        /* size of buffer       */
+        __u32  ifcbuf;
+};
+
+static int dev_ifname32(unsigned int fd, unsigned int cmd,
+                       unsigned long arg, struct file *f)
+{
+       struct ireq32 *uir32 = (struct ireq32 *) A(arg);
+       struct net_device *dev;
+       struct ifreq32 ifr32;
+
+       if (copy_from_user(&ifr32, uir32, sizeof(struct ifreq32)))
+               return -EFAULT;
+
+       read_lock(&dev_base_lock);
+       dev = __dev_get_by_index(ifr32.ifr_ifindex);
+       if (!dev) {
+               read_unlock(&dev_base_lock);
+               return -ENODEV;
+       }
+
+       strcpy(ifr32.ifr_name, dev->name);
+       read_unlock(&dev_base_lock);
+
+       if (copy_to_user(uir32, &ifr32, sizeof(struct ifreq32)))
+           return -EFAULT;
+
+       return 0;
+}
+
+static int dev_ifconf(unsigned int fd, unsigned int cmd,
+                     unsigned long arg, struct file *f)
+{
+       struct ioconf32 *uifc32 = (struct ioconf32 *) A(arg);
+       struct ifconf32 ifc32;
+       struct ifconf ifc;
+       struct ifreq32 *ifr32;
+       struct ifreq *ifr;
+       mm_segment_t old_fs;
+       int len;
+       int err;
+
+       if (copy_from_user(&ifc32, uifc32, sizeof(struct ifconf32)))
+               return -EFAULT;
+
+       if(ifc32.ifcbuf == 0) {
+               ifc32.ifc_len = 0;
+               ifc.ifc_len = 0;
+               ifc.ifc_buf = NULL;
+       } else {
+               ifc.ifc_len = ((ifc32.ifc_len / sizeof (struct ifreq32))) *
+                       sizeof (struct ifreq);
+               ifc.ifc_buf = kmalloc (ifc.ifc_len, GFP_KERNEL);
+               if (!ifc.ifc_buf)
+                       return -ENOMEM;
+       }
+       ifr = ifc.ifc_req;
+       ifr32 = (struct ifreq32 *) A(ifc32.ifcbuf);
+       len = ifc32.ifc_len / sizeof (struct ifreq32);
+       while (len--) {
+               if (copy_from_user(ifr++, ifr32++, sizeof (struct ifreq32))) {
+                       err = -EFAULT;
+                       goto out;
+               }
+       }
+
+       old_fs = get_fs();
+       set_fs (KERNEL_DS);
+       err = sys_ioctl (fd, SIOCGIFCONF, (unsigned long)&ifc); 
+       set_fs (old_fs);
+       if (err)
+               goto out;
+
+       ifr = ifc.ifc_req;
+       ifr32 = (struct ifreq32 *) A(ifc32.ifcbuf);
+       len = ifc.ifc_len / sizeof (struct ifreq);
+       ifc32.ifc_len = len * sizeof (struct ifreq32);
+
+       while (len--) {
+               if (copy_to_user(ifr32++, ifr++, sizeof (struct ifreq32))) {
+                       err = -EFAULT;
+                       goto out;
+               }
+       }
+
+       if (copy_to_user(uifc32, &ifc32, sizeof(struct ifconf32))) {
+               err = -EFAULT;
+               goto out;
+       }
+out:
+       if(ifc.ifc_buf != NULL)
+               kfree (ifc.ifc_buf);
+       return err;
+}
+
+static int bond_ioctl(unsigned int fd, unsigned int cmd,
+                     unsigned long arg, struct file *f)
+{
+       struct ifreq ifr;
+       mm_segment_t old_fs;
+       int err, len;
+       u32 data;
+       
+       if (copy_from_user(&ifr, (struct ifreq32 *)arg, sizeof(struct ifreq32)))
+               return -EFAULT;
+       ifr.ifr_data = (__kernel_caddr_t)get_zeroed_page(GFP_KERNEL);
+       if (!ifr.ifr_data)
+               return -EAGAIN;
+
+       switch (cmd) {
+       case SIOCBONDENSLAVE:
+       case SIOCBONDRELEASE:
+       case SIOCBONDSETHWADDR:
+       case SIOCBONDCHANGEACTIVE:
+               len = IFNAMSIZ * sizeof(char);
+               break;
+       case SIOCBONDSLAVEINFOQUERY:
+               len = sizeof(struct ifslave);
+               break;
+       case SIOCBONDINFOQUERY:
+               len = sizeof(struct ifbond);
+               break;
+       default:
+               err = -EINVAL;
+               goto out;
+       };
+
+       __get_user(data, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_data));
+       if (copy_from_user(ifr.ifr_data, (char *)A(data), len)) {
+               err = -EFAULT;
+               goto out;
+       }
+
+       old_fs = get_fs();
+       set_fs (KERNEL_DS);
+       err = sys_ioctl (fd, cmd, (unsigned long)&ifr);
+       set_fs (old_fs);
+       if (!err) {
+               len = copy_to_user((char *)A(data), ifr.ifr_data, len);
+               if (len)
+                       err = -EFAULT;
+       }
+
+out:
+       free_page((unsigned long)ifr.ifr_data);
+       return err;
+}
+
+static int dev_ifsioc(unsigned int fd, unsigned int cmd,
+                            unsigned long arg, struct file *f)
 {
-       return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg));
+       struct ifreq32 *uifr = (struct ifreq32 *) A(arg);
+       struct ifreq ifr;
+       mm_segment_t old_fs;
+       int err;
+       
+       switch (cmd) {
+       case SIOCSIFMAP:
+               err = copy_from_user(&ifr, uifr, sizeof(ifr.ifr_name));
+               err |= __get_user(ifr.ifr_map.mem_start, &(uifr->ifr_ifru.ifru_map.mem_start));
+               err |= __get_user(ifr.ifr_map.mem_end, &(uifr->ifr_ifru.ifru_map.mem_end));
+               err |= __get_user(ifr.ifr_map.base_addr, &(uifr->ifr_ifru.ifru_map.base_addr));
+               err |= __get_user(ifr.ifr_map.irq, &(uifr->ifr_ifru.ifru_map.irq));
+               err |= __get_user(ifr.ifr_map.dma, &(uifr->ifr_ifru.ifru_map.dma));
+               err |= __get_user(ifr.ifr_map.port, &(uifr->ifr_ifru.ifru_map.port));
+               if (err)
+                       return -EFAULT;
+               break;
+       default:
+               if (copy_from_user(&ifr, uifr, sizeof(struct ifreq32)))
+                       return -EFAULT;
+               break;
+       }
+       old_fs = get_fs();
+       set_fs (KERNEL_DS);
+       err = sys_ioctl (fd, cmd, (unsigned long)&ifr);
+       set_fs (old_fs);
+       if (!err) {
+               switch (cmd) {
+               case SIOCGIFFLAGS:
+               case SIOCGIFMETRIC:
+               case SIOCGIFMTU:
+               case SIOCGIFMEM:
+               case SIOCGIFHWADDR:
+               case SIOCGIFINDEX:
+               case SIOCGIFADDR:
+               case SIOCGIFBRDADDR:
+               case SIOCGIFDSTADDR:
+               case SIOCGIFNETMASK:
+               case SIOCGIFTXQLEN:
+                       if (copy_to_user(uifr, &ifr, sizeof(struct ifreq32)))
+                               return -EFAULT;
+                       break;
+               case SIOCGIFMAP:
+                       err = copy_to_user(uifr, &ifr, sizeof(ifr.ifr_name));
+                       err |= __put_user(ifr.ifr_map.mem_start, &(uifr->ifr_ifru.ifru_map.mem_start));
+                       err |= __put_user(ifr.ifr_map.mem_end, &(uifr->ifr_ifru.ifru_map.mem_end));
+                       err |= __put_user(ifr.ifr_map.base_addr, &(uifr->ifr_ifru.ifru_map.base_addr));
+                       err |= __put_user(ifr.ifr_map.irq, &(uifr->ifr_ifru.ifru_map.irq));
+                       err |= __put_user(ifr.ifr_map.dma, &(uifr->ifr_ifru.ifru_map.dma));
+                       err |= __put_user(ifr.ifr_map.port, &(uifr->ifr_ifru.ifru_map.port));
+                       if (err)
+                               err = -EFAULT;
+                       break;
+               }
+       }
+       return err;
 }
 
-static int do_ioctl32_ulong(unsigned int fd, unsigned int cmd,
-                               unsigned long arg, struct file *f)
+struct rtentry32
+{
+       unsigned int    rt_pad1;
+       struct sockaddr rt_dst;         /* target address               */
+       struct sockaddr rt_gateway;     /* gateway addr (RTF_GATEWAY)   */
+       struct sockaddr rt_genmask;     /* target network mask (IP)     */
+       unsigned short  rt_flags;
+       short           rt_pad2;
+       unsigned int    rt_pad3;
+       unsigned int    rt_pad4;
+       short           rt_metric;      /* +1 for binary compatibility! */
+       unsigned int    rt_dev;         /* forcing the device at add    */
+       unsigned int    rt_mtu;         /* per route MTU/Window         */
+#ifndef __KERNEL__
+#define rt_mss rt_mtu                  /* Compatibility :-(            */
+#endif
+       unsigned int    rt_window;      /* Window clamping              */
+       unsigned short  rt_irtt;        /* Initial RTT                  */
+};
+
+static int routing_ioctl(unsigned int fd, unsigned int cmd,
+                        unsigned long arg, struct file *f)
 {
+       struct rtentry32 *ur = (struct rtentry32 *) A(arg);
+       struct rtentry r;
+       char devname[16];
+       u32 rtdev;
+       int ret;
+       mm_segment_t old_fs = get_fs();
+       
+       ret = copy_from_user (&r.rt_dst, &(ur->rt_dst), 3 * sizeof(struct sockaddr));
+       ret |= __get_user (r.rt_flags, &(ur->rt_flags));
+       ret |= __get_user (r.rt_metric, &(ur->rt_metric));
+       ret |= __get_user (r.rt_mtu, &(ur->rt_mtu));
+       ret |= __get_user (r.rt_window, &(ur->rt_window));
+       ret |= __get_user (r.rt_irtt, &(ur->rt_irtt));
+       ret |= __get_user (rtdev, &(ur->rt_dev));
+       if (rtdev) {
+               ret |= copy_from_user (devname, (char *) A(rtdev), 15);
+               r.rt_dev = devname; devname[15] = 0;
+       } else
+               r.rt_dev = 0;
+       if (ret)
+               return -EFAULT;
+       set_fs (KERNEL_DS);
+       ret = sys_ioctl (fd, cmd, (long)&r);
+       set_fs (old_fs);
+       return ret;
+}
+
+static int do_ext2_ioctl(unsigned int fd, unsigned int cmd,
+                        unsigned long arg, struct file *f)
+{
+       /* These are just misnamed, they actually get/put from/to user an int */
+       switch (cmd) {
+       case EXT2_IOC32_GETFLAGS: cmd = EXT2_IOC_GETFLAGS; break;
+       case EXT2_IOC32_SETFLAGS: cmd = EXT2_IOC_SETFLAGS; break;
+       case EXT2_IOC32_GETVERSION: cmd = EXT2_IOC_GETVERSION; break;
+       case EXT2_IOC32_SETVERSION: cmd = EXT2_IOC_SETVERSION; break;
+       }
        return sys_ioctl(fd, cmd, arg);
 }
 
-#define COMPATIBLE_IOCTL(cmd)          HANDLE_IOCTL((cmd),(ioctl_trans_handler_t)do_ioctl32_pointer)
-#define ULONG_IOCTL(cmd)               HANDLE_IOCTL((cmd),(ioctl_trans_handler_t)do_ioctl32_ulong)
-#define HANDLE_IOCTL(cmd,handler)      { (cmd), (ioctl_trans_handler_t)(handler), NULL },
 
-struct ioctl_trans ioctl_start[] = {
-/* architecture independent ioctls */
+struct loop_info32 {
+       int                     lo_number;      /* ioctl r/o */
+       compat_dev_t    lo_device;      /* ioctl r/o */
+       unsigned int            lo_inode;       /* ioctl r/o */
+       compat_dev_t    lo_rdevice;     /* ioctl r/o */
+       int                     lo_offset;
+       int                     lo_encrypt_type;
+       int                     lo_encrypt_key_size;    /* ioctl w/o */
+       int                     lo_flags;       /* ioctl r/o */
+       char                    lo_name[LO_NAME_SIZE];
+       unsigned char           lo_encrypt_key[LO_KEY_SIZE]; /* ioctl w/o */
+       unsigned int            lo_init[2];
+       char                    reserved[4];
+};
+
+static int loop_status(unsigned int fd, unsigned int cmd,
+                      unsigned long arg, struct file *f)
+{
+       mm_segment_t old_fs = get_fs();
+       struct loop_info l;
+       int err = -EINVAL;
+
+       switch(cmd) {
+       case LOOP_SET_STATUS:
+               err = get_user(l.lo_number, &((struct loop_info32 *)arg)->lo_number);
+               err |= __get_user(l.lo_device, &((struct loop_info32 *)arg)->lo_device);
+               err |= __get_user(l.lo_inode, &((struct loop_info32 *)arg)->lo_inode);
+               err |= __get_user(l.lo_rdevice, &((struct loop_info32 *)arg)->lo_rdevice);
+               err |= __copy_from_user((char *)&l.lo_offset, (char *)&((struct loop_info32 *)arg)->lo_offset,
+                                          8 + (unsigned long)l.lo_init - (unsigned long)&l.lo_offset);
+               if (err) {
+                       err = -EFAULT;
+               } else {
+                       set_fs (KERNEL_DS);
+                       err = sys_ioctl (fd, cmd, (unsigned long)&l);
+                       set_fs (old_fs);
+               }
+               break;
+       case LOOP_GET_STATUS:
+               set_fs (KERNEL_DS);
+               err = sys_ioctl (fd, cmd, (unsigned long)&l);
+               set_fs (old_fs);
+               if (!err) {
+                       err = put_user(l.lo_number, &((struct loop_info32 *)arg)->lo_number);
+                       err |= __put_user(l.lo_device, &((struct loop_info32 *)arg)->lo_device);
+                       err |= __put_user(l.lo_inode, &((struct loop_info32 *)arg)->lo_inode);
+                       err |= __put_user(l.lo_rdevice, &((struct loop_info32 *)arg)->lo_rdevice);
+                       err |= __copy_to_user((char *)&((struct loop_info32 *)arg)->lo_offset,
+                                          (char *)&l.lo_offset, (unsigned long)l.lo_init - (unsigned long)&l.lo_offset);
+                       if (err)
+                               err = -EFAULT;
+               }
+               break;
+       default: {
+               static int count = 0;
+               if (++count <= 20)
+                       printk("%s: Unknown loop ioctl cmd, fd(%d) "
+                              "cmd(%08x) arg(%08lx)\n",
+                              __FUNCTION__, fd, cmd, arg);
+       }
+       }
+       return err;
+}
+
+
+struct blkpg_ioctl_arg32 {
+       int op;
+       int flags;
+       int datalen;
+       u32 data;
+};
+                                
+static int blkpg_ioctl_trans(unsigned int fd, unsigned int cmd,
+                            unsigned long uarg, struct file *f)
+{
+       struct blkpg_ioctl_arg a;
+       struct blkpg_partition p;
+       struct blkpg_ioctl_arg32 *arg = (void*)A(uarg);
+       int err;
+       mm_segment_t old_fs = get_fs();
+       
+       err = get_user(a.op, &arg->op);
+       err |= __get_user(a.flags, &arg->flags);
+       err |= __get_user(a.datalen, &arg->datalen);
+       err |= __get_user((long)a.data, &arg->data);
+       if (err) return err;
+       switch (a.op) {
+       case BLKPG_ADD_PARTITION:
+       case BLKPG_DEL_PARTITION:
+               if (a.datalen < sizeof(struct blkpg_partition))
+                       return -EINVAL;
+                if (copy_from_user(&p, a.data, sizeof(struct blkpg_partition)))
+                       return -EFAULT;
+               a.data = &p;
+               set_fs (KERNEL_DS);
+               err = sys_ioctl(fd, cmd, (unsigned long)&a);
+               set_fs (old_fs);
+       default:
+               return -EINVAL;
+       }                                        
+       return err;
+}
+
+
+typedef struct ica_z90_status_t {
+  int totalcount;
+  int leedslitecount;
+  int leeds2count;
+  int requestqWaitCount;
+  int pendingqWaitCount;
+  int totalOpenCount;
+  int cryptoDomain;
+  unsigned char status[64];
+  unsigned char qdepth[64];
+} ica_z90_status;
+
+typedef struct _ica_rsa_modexpo {
+  char         *inputdata;
+  unsigned int  inputdatalength;
+  char         *outputdata;
+  unsigned int  outputdatalength;
+  char         *b_key;
+  char         *n_modulus;
+} ica_rsa_modexpo_t;
+
+typedef struct _ica_rsa_modexpo_32 {
+  u32          inputdata;
+  u32          inputdatalength;
+  u32          outputdata;
+  u32          outputdatalength;
+  u32          b_key;
+  u32          n_modulus;
+} ica_rsa_modexpo_32_t;
+
+typedef struct _ica_rsa_modexpo_crt {
+  char         *inputdata;
+  unsigned int  inputdatalength;
+  char         *outputdata;
+  unsigned int  outputdatalength;
+  char         *bp_key;
+  char         *bq_key;
+  char         *np_prime;
+  char         *nq_prime;
+  char         *u_mult_inv;
+} ica_rsa_modexpo_crt_t;
+
+typedef struct _ica_rsa_modexpo_crt_32 {
+  u32          inputdata;
+  u32          inputdatalength;
+  u32          outputdata;
+  u32          outputdatalength;
+  u32          bp_key;
+  u32          bq_key;
+  u32          np_prime;
+  u32          nq_prime;
+  u32          u_mult_inv;
+} ica_rsa_modexpo_crt_32_t;
+
+#define ICA_IOCTL_MAGIC 'z'
+#define ICARSAMODEXPO   _IOC(_IOC_READ|_IOC_WRITE, ICA_IOCTL_MAGIC, 0x05, 0)
+#define ICARSACRT       _IOC(_IOC_READ|_IOC_WRITE, ICA_IOCTL_MAGIC, 0x06, 0) 
+#define ICARSAMODMULT   _IOC(_IOC_READ|_IOC_WRITE, ICA_IOCTL_MAGIC, 0x07, 0)
+#define ICAZ90STATUS    _IOC(_IOC_READ, ICA_IOCTL_MAGIC, 0x10, sizeof(ica_z90_status))
+#define ICAZ90QUIESCE   _IOC(_IOC_NONE, ICA_IOCTL_MAGIC, 0x11, 0)
+#define ICAZ90HARDRESET _IOC(_IOC_NONE, ICA_IOCTL_MAGIC, 0x12, 0)
+#define ICAZ90HARDERROR _IOC(_IOC_NONE, ICA_IOCTL_MAGIC, 0x13, 0)
+
+static int do_rsa_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *f)
+{
+       mm_segment_t old_fs = get_fs();
+       int err = 0;
+       ica_rsa_modexpo_t rsa;
+       ica_rsa_modexpo_32_t *rsa32 = (ica_rsa_modexpo_32_t *)arg;
+       u32 inputdata, outputdata, b_key, n_modulus;
+
+       memset (&rsa, 0, sizeof(rsa));
+
+       err |= __get_user (inputdata, &rsa32->inputdata);
+       err |= __get_user (rsa.inputdatalength, &rsa32->inputdatalength);
+       err |= __get_user (outputdata, &rsa32->outputdata);
+       err |= __get_user (rsa.outputdatalength, &rsa32->outputdatalength);
+       err |= __get_user (b_key, &rsa32->b_key);
+       err |= __get_user (n_modulus, &rsa32->n_modulus);
+       if (err)
+               return -EFAULT;
+
+       rsa.inputdata = (char *)kmalloc(rsa.inputdatalength, GFP_KERNEL);
+       if (!rsa.inputdata) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+       if (copy_from_user(rsa.inputdata, (char *)(u64)(inputdata & 0x7fffffff), 
+                          rsa.inputdatalength)) {
+               err = -EFAULT;
+               goto cleanup;
+       }
+
+       rsa.outputdata = (char *)kmalloc(rsa.outputdatalength, GFP_KERNEL);
+       if (!rsa.outputdata) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+
+       rsa.b_key = (char *)kmalloc(rsa.inputdatalength, GFP_KERNEL);
+       if (!rsa.b_key) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+       if (copy_from_user(rsa.b_key, (char *)(u64)(b_key & 0x7fffffff), 
+                          rsa.inputdatalength)) {
+               err = -EFAULT;
+               goto cleanup;
+       }
+
+       rsa.n_modulus = (char *)kmalloc(rsa.inputdatalength, GFP_KERNEL);
+       if (!rsa.n_modulus) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+       if (copy_from_user(rsa.n_modulus, (char *)(u64)(n_modulus & 0x7fffffff), 
+                          rsa.inputdatalength)) {
+               err = -EFAULT;
+               goto cleanup;
+       }
+
+       set_fs(KERNEL_DS);
+       err = sys_ioctl(fd, cmd, (unsigned long)&rsa);
+       set_fs(old_fs);
+       if (err < 0)
+               goto cleanup;
+
+       if (copy_to_user((char *)(u64)(outputdata & 0x7fffffff), rsa.outputdata,
+                        rsa.outputdatalength))
+               err = -EFAULT;
+
+cleanup:
+       if (rsa.inputdata)
+               kfree(rsa.inputdata);
+       if (rsa.outputdata)
+               kfree(rsa.outputdata);
+       if (rsa.b_key)
+               kfree(rsa.b_key);
+       if (rsa.n_modulus)
+               kfree(rsa.n_modulus);
+       
+       return err;
+}
+
+static int do_rsa_crt_ioctl(unsigned int fd, unsigned int cmd,
+                           unsigned long arg, struct file *f)
+{
+       mm_segment_t old_fs = get_fs();
+       int err = 0;
+       ica_rsa_modexpo_crt_t rsa;
+       ica_rsa_modexpo_crt_32_t *rsa32 = (ica_rsa_modexpo_crt_32_t *)arg;
+       u32 inputdata, outputdata, bp_key, bq_key, np_prime, nq_prime, u_mult_inv;
+
+       memset (&rsa, 0, sizeof(rsa));
+
+       err |= __get_user (inputdata, &rsa32->inputdata);
+       err |= __get_user (rsa.inputdatalength, &rsa32->inputdatalength);
+       err |= __get_user (outputdata, &rsa32->outputdata);
+       err |= __get_user (rsa.outputdatalength, &rsa32->outputdatalength);
+       err |= __get_user (bp_key, &rsa32->bp_key);
+       err |= __get_user (bq_key, &rsa32->bq_key);
+       err |= __get_user (np_prime, &rsa32->np_prime);
+       err |= __get_user (nq_prime, &rsa32->nq_prime);
+       err |= __get_user (u_mult_inv, &rsa32->u_mult_inv);
+       if (err)
+               return -EFAULT;
+
+       rsa.inputdata = (char *)kmalloc(rsa.inputdatalength, GFP_KERNEL);
+       if (!rsa.inputdata) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+       if (copy_from_user(rsa.inputdata, (char *)(u64)(inputdata & 0x7fffffff), 
+                          rsa.inputdatalength)) {
+               err = -EFAULT;
+               goto cleanup;
+       }
+
+       rsa.outputdata = (char *)kmalloc(rsa.outputdatalength, GFP_KERNEL);
+       if (!rsa.outputdata) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+
+       rsa.bp_key = (char *)kmalloc(rsa.inputdatalength/2 + 8, GFP_KERNEL);
+       if (!rsa.bp_key) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+       if (copy_from_user(rsa.bp_key, (char *)(u64)(bp_key & 0x7fffffff), 
+                          rsa.inputdatalength/2 + 8)) {
+               err = -EFAULT;
+               goto cleanup;
+       }
+
+       rsa.bq_key = (char *)kmalloc(rsa.inputdatalength/2, GFP_KERNEL);
+       if (!rsa.bq_key) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+       if (copy_from_user(rsa.bq_key, (char *)(u64)(bq_key & 0x7fffffff), 
+                          rsa.inputdatalength/2)) {
+               err = -EFAULT;
+               goto cleanup;
+       }
+
+       rsa.np_prime = (char *)kmalloc(rsa.inputdatalength/2 + 8, GFP_KERNEL);
+       if (!rsa.np_prime) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+       if (copy_from_user(rsa.np_prime, (char *)(u64)(np_prime & 0x7fffffff), 
+                          rsa.inputdatalength/2 + 8)) {
+               err = -EFAULT;
+               goto cleanup;
+       }
+
+       rsa.nq_prime = (char *)kmalloc(rsa.inputdatalength/2, GFP_KERNEL);
+       if (!rsa.nq_prime) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+       if (copy_from_user(rsa.nq_prime, (char *)(u64)(nq_prime & 0x7fffffff), 
+                          rsa.inputdatalength/2)) {
+               err = -EFAULT;
+               goto cleanup;
+       }
+
+       rsa.u_mult_inv = (char *)kmalloc(rsa.inputdatalength/2 + 8, GFP_KERNEL);
+       if (!rsa.u_mult_inv) {
+               err = -ENOMEM;
+               goto cleanup;
+       }
+       if (copy_from_user(rsa.u_mult_inv, (char *)(u64)(u_mult_inv & 0x7fffffff), 
+                          rsa.inputdatalength/2 + 8)) {
+               err = -EFAULT;
+               goto cleanup;
+       }
+
+       set_fs(KERNEL_DS);
+       err = sys_ioctl(fd, cmd, (unsigned long)&rsa);
+       set_fs(old_fs);
+       if (err < 0)
+               goto cleanup;
+
+       if (copy_to_user((char *)(u64)(outputdata & 0x7fffffff), rsa.outputdata,
+                        rsa.outputdatalength))
+               err = -EFAULT;
+
+cleanup:
+       if (rsa.inputdata)
+               kfree(rsa.inputdata);
+       if (rsa.outputdata)
+               kfree(rsa.outputdata);
+       if (rsa.bp_key)
+               kfree(rsa.bp_key);
+       if (rsa.bq_key)
+               kfree(rsa.bq_key);
+       if (rsa.np_prime)
+               kfree(rsa.np_prime);
+       if (rsa.nq_prime)
+               kfree(rsa.nq_prime);
+       if (rsa.u_mult_inv)
+               kfree(rsa.u_mult_inv);
+       
+       return err;
+}
+
+static int w_long(unsigned int fd, unsigned int cmd, unsigned long arg,
+                 struct file *f)
+{
+       mm_segment_t old_fs = get_fs();
+       int err;
+       unsigned long val;
+       
+       set_fs (KERNEL_DS);
+       err = sys_ioctl(fd, cmd, (unsigned long)&val);
+       set_fs (old_fs);
+       if (!err && put_user((unsigned int) val, (u32 *)arg))
+               return -EFAULT;
+       return err;
+}
+
+int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd,
+                        unsigned long arg, struct file *f)
+{
+       /* siocdevprivate cannot be emulated properly */
+       return -EINVAL;
+}
+
+#define COMPATIBLE_IOCTL(cmd)          HANDLE_IOCTL((cmd), NULL)
+#define HANDLE_IOCTL(cmd,handler)      { (cmd), (handler), NULL },
+#define IOCTL_TABLE_START \
+       struct ioctl_trans ioctl_start[] = {
+#define IOCTL_TABLE_END \
+       };
+
+IOCTL_TABLE_START
 #include <linux/compat_ioctl.h>
-#define DECLARES
-#include "../../../fs/compat_ioctl.c"
 
-/* s390 only ioctls */
-#if defined(CONFIG_DASD) || defined(CONFIG_DASD_MODULE)
 COMPATIBLE_IOCTL(DASDAPIVER)
 COMPATIBLE_IOCTL(BIODASDDISABLE)
 COMPATIBLE_IOCTL(BIODASDENABLE)
@@ -50,18 +822,83 @@ COMPATIBLE_IOCTL(BIODASDRLSE)
 COMPATIBLE_IOCTL(BIODASDSLCK)
 COMPATIBLE_IOCTL(BIODASDINFO)
 COMPATIBLE_IOCTL(BIODASDFMT)
-#endif
 
-#if defined(CONFIG_S390_TAPE) || defined(CONFIG_S390_TAPE_MODULE)
 COMPATIBLE_IOCTL(TAPE390_DISPLAY)
-#endif
+COMPATIBLE_IOCTL(BLKRASET)
+COMPATIBLE_IOCTL(BLKFRASET)
+COMPATIBLE_IOCTL(BLKBSZGET)
+COMPATIBLE_IOCTL(BLKGETSIZE64)
+
+HANDLE_IOCTL(HDIO_GETGEO, hd_geometry_ioctl)
 
-/* This one should be architecture independent */
 COMPATIBLE_IOCTL(TCSBRKP)
 
-/* s390 doesn't need handlers here */
 COMPATIBLE_IOCTL(TIOCGSERIAL)
 COMPATIBLE_IOCTL(TIOCSSERIAL)
-};
+
+COMPATIBLE_IOCTL(SIOCGSTAMP)
+
+HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32)
+HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf)
+HANDLE_IOCTL(SIOCGIFFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMETRIC, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMETRIC, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMTU, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMTU, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMEM, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMEM, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFHWADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFHWADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCADDMULTI, dev_ifsioc)
+HANDLE_IOCTL(SIOCDELMULTI, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFINDEX, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFMAP, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFMAP, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFBRDADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFBRDADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFDSTADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFDSTADDR, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFNETMASK, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFNETMASK, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFPFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFPFLAGS, dev_ifsioc)
+HANDLE_IOCTL(SIOCGIFTXQLEN, dev_ifsioc)
+HANDLE_IOCTL(SIOCSIFTXQLEN, dev_ifsioc)
+HANDLE_IOCTL(SIOCADDRT, routing_ioctl)
+HANDLE_IOCTL(SIOCDELRT, routing_ioctl)
+HANDLE_IOCTL(SIOCBONDENSLAVE, bond_ioctl)
+HANDLE_IOCTL(SIOCBONDRELEASE, bond_ioctl)
+HANDLE_IOCTL(SIOCBONDSETHWADDR, bond_ioctl)
+HANDLE_IOCTL(SIOCBONDSLAVEINFOQUERY, bond_ioctl)
+HANDLE_IOCTL(SIOCBONDINFOQUERY, bond_ioctl)
+HANDLE_IOCTL(SIOCBONDCHANGEACTIVE, bond_ioctl)
+
+HANDLE_IOCTL(EXT2_IOC32_GETFLAGS, do_ext2_ioctl)
+HANDLE_IOCTL(EXT2_IOC32_SETFLAGS, do_ext2_ioctl)
+HANDLE_IOCTL(EXT2_IOC32_GETVERSION, do_ext2_ioctl)
+HANDLE_IOCTL(EXT2_IOC32_SETVERSION, do_ext2_ioctl)
+
+HANDLE_IOCTL(LOOP_SET_STATUS, loop_status)
+HANDLE_IOCTL(LOOP_GET_STATUS, loop_status)
+
+HANDLE_IOCTL(ICARSAMODEXPO, do_rsa_ioctl)
+HANDLE_IOCTL(ICARSACRT, do_rsa_crt_ioctl)
+HANDLE_IOCTL(ICARSAMODMULT, do_rsa_ioctl)
+
+COMPATIBLE_IOCTL(ICAZ90STATUS)
+COMPATIBLE_IOCTL(ICAZ90QUIESCE)
+COMPATIBLE_IOCTL(ICAZ90HARDRESET)
+COMPATIBLE_IOCTL(ICAZ90HARDERROR)
+
+HANDLE_IOCTL(BLKRAGET, w_long)
+HANDLE_IOCTL(BLKGETSIZE, w_long)
+HANDLE_IOCTL(BLKFRAGET, w_long)
+HANDLE_IOCTL(BLKSECTGET, w_long)
+HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans)
+
+IOCTL_TABLE_END
 
 int ioctl_table_size = ARRAY_SIZE(ioctl_start);
index 8ed30b4..1b03d27 100644 (file)
@@ -5,7 +5,6 @@
  *    Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
  *    Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
  *               Gerhard Tonn (ton@de.ibm.com)   
- *               Thomas Spatzier (tspat@de.ibm.com)
  *
  *  Conversion between 31bit and 64bit native syscalls.
  *
@@ -1501,6 +1500,50 @@ out:
        return err;
 }
 
+struct rusage32 {
+        struct compat_timeval ru_utime;
+        struct compat_timeval ru_stime;
+        s32    ru_maxrss;
+        s32    ru_ixrss;
+        s32    ru_idrss;
+        s32    ru_isrss;
+        s32    ru_minflt;
+        s32    ru_majflt;
+        s32    ru_nswap;
+        s32    ru_inblock;
+        s32    ru_oublock;
+        s32    ru_msgsnd; 
+        s32    ru_msgrcv; 
+        s32    ru_nsignals;
+        s32    ru_nvcsw;
+        s32    ru_nivcsw;
+};
+
+static int put_rusage (struct rusage32 *ru, struct rusage *r)
+{
+       int err;
+       
+       err = put_user (r->ru_utime.tv_sec, &ru->ru_utime.tv_sec);
+       err |= __put_user (r->ru_utime.tv_usec, &ru->ru_utime.tv_usec);
+       err |= __put_user (r->ru_stime.tv_sec, &ru->ru_stime.tv_sec);
+       err |= __put_user (r->ru_stime.tv_usec, &ru->ru_stime.tv_usec);
+       err |= __put_user (r->ru_maxrss, &ru->ru_maxrss);
+       err |= __put_user (r->ru_ixrss, &ru->ru_ixrss);
+       err |= __put_user (r->ru_idrss, &ru->ru_idrss);
+       err |= __put_user (r->ru_isrss, &ru->ru_isrss);
+       err |= __put_user (r->ru_minflt, &ru->ru_minflt);
+       err |= __put_user (r->ru_majflt, &ru->ru_majflt);
+       err |= __put_user (r->ru_nswap, &ru->ru_nswap);
+       err |= __put_user (r->ru_inblock, &ru->ru_inblock);
+       err |= __put_user (r->ru_oublock, &ru->ru_oublock);
+       err |= __put_user (r->ru_msgsnd, &ru->ru_msgsnd);
+       err |= __put_user (r->ru_msgrcv, &ru->ru_msgrcv);
+       err |= __put_user (r->ru_nsignals, &ru->ru_nsignals);
+       err |= __put_user (r->ru_nvcsw, &ru->ru_nvcsw);
+       err |= __put_user (r->ru_nivcsw, &ru->ru_nivcsw);
+       return err;
+}
+
 struct sysinfo32 {
         s32 uptime;
         u32 loads[3];
@@ -2663,6 +2706,56 @@ out:
        return error;
 }
 
+extern asmlinkage int sys_sched_setaffinity(pid_t pid, unsigned int len,
+                                           unsigned long *user_mask_ptr);
+
+asmlinkage int sys32_sched_setaffinity(compat_pid_t pid, unsigned int len,
+                                      u32 *user_mask_ptr)
+{
+       unsigned long kernel_mask;
+       mm_segment_t old_fs;
+       int ret;
+
+       if (get_user(kernel_mask, user_mask_ptr))
+               return -EFAULT;
+
+       old_fs = get_fs();
+       set_fs(KERNEL_DS);
+       ret = sys_sched_setaffinity(pid,
+                                   /* XXX Nice api... */
+                                   sizeof(kernel_mask),
+                                   &kernel_mask);
+       set_fs(old_fs);
+
+       return ret;
+}
+
+extern asmlinkage int sys_sched_getaffinity(pid_t pid, unsigned int len,
+                                           unsigned long *user_mask_ptr);
+
+asmlinkage int sys32_sched_getaffinity(compat_pid_t pid, unsigned int len,
+                                      u32 *user_mask_ptr)
+{
+       unsigned long kernel_mask;
+       mm_segment_t old_fs;
+       int ret;
+
+       old_fs = get_fs();
+       set_fs(KERNEL_DS);
+       ret = sys_sched_getaffinity(pid,
+                                   /* XXX Nice api... */
+                                   sizeof(kernel_mask),
+                                   &kernel_mask);
+       set_fs(old_fs);
+
+       if (ret == 0) {
+               if (put_user(kernel_mask, user_mask_ptr))
+                       ret = -EFAULT;
+       }
+
+       return ret;
+}
+
 asmlinkage ssize_t sys_read(unsigned int fd, char * buf, size_t count);
 
 asmlinkage compat_ssize_t sys32_read(unsigned int fd, char * buf, size_t count)
@@ -2699,47 +2792,4 @@ asmlinkage int sys32_clone(struct pt_regs regs)
                       parent_tidptr, child_tidptr);
 }
 
-/*
- * Wrapper function for sys_timer_create.
- */
-extern asmlinkage long
-sys_timer_create(clockid_t, struct sigevent *, timer_t *);
-
-#define SIGEV_PAD_SIZE32 ((SIGEV_MAX_SIZE/sizeof(int)) - 3)
-struct sigevent32 {
-       /* TODO: how to handle this union sigev_value and _sigev_un ??? */
-       union {
-               int sival_int;
-               u32 sival_ptr;
-       } sigev_value;
-       int sigev_signo;
-       int sigev_notify;
-       union {
-               int _pad[SIGEV_PAD_SIZE32];
-               int _tid;
-               struct {
-                       u32 *_function;
-                       u32 *_attribute;
-               } _sigev_thread;
-       } _sigev_un;
-};
-
-asmlinkage long
-sys32_timer_create(clockid_t which_clock,
-               struct sigevent32 *se32,
-               timer_t *timer_id)
-{
-       /* see TODO below 
-       struct sigevent se;
-       timer_t ktimer_id;
-       mm_segment_t old_fs;
-       long ret;
-       */
-
-       if (se32 == NULL)
-               return sys_timer_create(which_clock, NULL, timer_id);
 
-
-       /* TODO: convert se32 to se; tricky because of unions */
-       return -ENOSYS;
-}
index 600b549..a74f356 100644 (file)
@@ -135,7 +135,7 @@ sys32_alarm_wrapper:
 compat_sys_utime_wrapper:
        llgtr   %r2,%r2                 # char *
        llgtr   %r3,%r3                 # struct compat_utimbuf *
-       jg      compat_sys_utime        # branch to system call
+       jg      compat_sys_utime                # branch to system call
 
        .globl  sys32_access_wrapper 
 sys32_access_wrapper:
@@ -1192,14 +1192,14 @@ sys32_sched_setaffinity_wrapper:
        lgfr    %r2,%r2                 # int
        llgfr   %r3,%r3                 # unsigned int
        llgtr   %r4,%r4                 # unsigned long *
-       jg      compat_sys_sched_setaffinity
+       jg      sys32_sched_setaffinity
 
        .globl  sys32_sched_getaffinity_wrapper
 sys32_sched_getaffinity_wrapper:
        lgfr    %r2,%r2                 # int
        llgfr   %r3,%r3                 # unsigned int
        llgtr   %r4,%r4                 # unsigned long *
-       jg      compat_sys_sched_getaffinity
+       jg      sys32_sched_getaffinity
 
        .globl  sys32_exit_group_wrapper
 sys32_exit_group_wrapper:
@@ -1232,20 +1232,6 @@ sys_epoll_wait_wrapper:
        lgfr    %r5,%r5                 # int
        jg      sys_epoll_wait          # branch to system call
 
-       .globl  sys32_fadvise64_wrapper
-sys32_fadvise64_wrapper:
-       lgfr    %r2,%r2                 # int
-       sllg    %r3,%r3,32              # get high word of 64bit loff_t
-       or      %r3,%r4                 # get low word of 64bit loff_t
-       llgfr   %r4,%r5                 # size_t (unsigned long)
-       lgfr    %r5,%r6                 # int
-       jg      sys_fadvise64
-
-       .globl  sys32_fadvise64_64_wrapper
-sys32_fadvise64_64_wrapper:
-       llgtr   %r2,%r2                 # struct fadvise64_64_args *
-       jg      s390_fadvise64_64
-
        .globl  sys32_io_setup_wrapper
 sys32_io_setup_wrapper:
        llgfr   %r2,%r2                 # unsigned int
@@ -1279,60 +1265,3 @@ sys32_io_cancel_wrapper:
        llgtr   %r3,%r3                 # struct iocb *
        llgtr   %r4,%r4                 # struct io_event *
        jg      sys_io_cancel
-
-       .globl  sys32_clock_settime_wrapper
-sys32_clock_settime_wrapper:
-       lgfr    %r2,%r2                 # clockid_t (int)
-       llgtr   %r3,%r3                 # struct compat_timespec *
-       jg      compat_clock_settime
-
-       .globl  sys32_clock_gettime_wrapper
-sys32_clock_gettime_wrapper:
-       lgfr    %r2,%r2                 # clockid_t (int)
-       llgtr   %r3,%r3                 # struct compat_timespec *
-       jg      compat_clock_gettime
-
-       .globl  sys32_clock_getres_wrapper
-sys32_clock_getres_wrapper:
-       lgfr    %r2,%r2                 # clockid_t (int)
-       llgtr   %r3,%r3                 # struct compat_timespec *
-       jg      compat_clock_getres
-
-       .globl  sys32_clock_nanosleep_wrapper
-sys32_clock_nanosleep_wrapper:
-       lgfr    %r2,%r2                 # clockid_t (int)
-       lgfr    %r3,%r3                 # int
-       llgtr   %r4,%r4                 # struct compat_timespec *
-       llgtr   %r5,%r5                 # struct compat_timespec *
-       jg      compat_clock_nanosleep
-
-       .globl  sys32_timer_create_wrapper
-sys32_timer_create_wrapper:
-       lgfr    %r2,%r2                 # timer_t (int)
-       llgtr   %r3,%r3                 # struct compat_sigevent *
-       llgtr   %r4,%r4                 # timer_t *
-       jg      sys32_timer_create
-
-       .globl  sys32_timer_settime_wrapper
-sys32_timer_settime_wrapper:
-       lgfr    %r2,%r2                 # timer_t (int)
-       llgtr   %r3,%r3                 # struct compat_itimerspec *
-       llgtr   %r4,%r4                 # struct compat_itimerspec *
-       jg      compat_timer_settime
-
-       .globl  sys32_timer_gettime_wrapper
-sys32_timer_gettime_wrapper:
-       lgfr    %r2,%r2                 # timer_t (int)
-       llgtr   %r3,%r3                 # struct compat_itimerspec *
-       jg      compat_timer_settime
-
-       .globl  sys32_timer_getoverrun_wrapper
-sys32_timer_getoverrun_wrapper:
-       lgfr    %r2,%r2                 # timer_t (int)
-       jg      sys_timer_getoverrun
-
-       .globl  sys32_timer_delete_wrapper
-sys32_timer_delete_wrapper:
-       lgfr    %r2,%r2                 # timer_t (int)
-       jg      sys_timer_delete
-
index 9d24948..fc703b1 100644 (file)
@@ -622,17 +622,17 @@ static const char *intrclass_names[] = {
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-        int i, j;
+        int i = *(loff_t *) v, j;
        
-        seq_puts(p, "           ");
-       
-        for (j=0; j<NR_CPUS; j++)
-                if (cpu_online(j))
-                        seq_printf(p, "CPU%d       ",j);
-       
-        seq_putc(p, '\n');
+       if (i == 0) {
+               seq_puts(p, "           ");
+               for (j=0; j<NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "CPU%d       ",j);
+               seq_putc(p, '\n');
+       }
        
-        for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                seq_printf(p, "%s: ", intrclass_names[i]);
 #ifndef CONFIG_SMP
                seq_printf(p, "%10u ", kstat_irqs(i));
index 2ffffc8..cb7e265 100644 (file)
@@ -261,15 +261,15 @@ SYSCALL(sys_epoll_create,sys_epoll_create,sys_epoll_create_wrapper)
 SYSCALL(sys_epoll_ctl,sys_epoll_ctl,sys_epoll_ctl_wrapper)     /* 250 */
 SYSCALL(sys_epoll_wait,sys_epoll_wait,sys_epoll_wait_wrapper)
 SYSCALL(sys_set_tid_address,sys_set_tid_address,sys32_set_tid_address_wrapper)
-SYSCALL(s390_fadvise64,sys_fadvise64_64,sys32_fadvise64_wrapper)
-SYSCALL(sys_timer_create,sys_timer_create,sys32_timer_create_wrapper)
-SYSCALL(sys_timer_settime,sys_timer_settime,sys32_timer_settime_wrapper)       /* 255 */
-SYSCALL(sys_timer_gettime,sys_timer_gettime,sys32_timer_gettime_wrapper)
-SYSCALL(sys_timer_getoverrun,sys_timer_getoverrun,sys32_timer_getoverrun_wrapper)
-SYSCALL(sys_timer_delete,sys_timer_delete,sys32_timer_delete_wrapper)
-SYSCALL(sys_clock_settime,sys_clock_settime,sys32_clock_settime_wrapper)
-SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper)       /* 260 */
-SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper)
-SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,sys32_clock_nanosleep_wrapper)
+SYSCALL(s390_fadvise64,sys_fadvise64_64,sys_ni_syscall)
+SYSCALL(sys_timer_create,sys_timer_create,sys_ni_syscall)
+SYSCALL(sys_timer_settime,sys_timer_settime,sys_ni_syscall)    /* 255 */
+SYSCALL(sys_timer_gettime,sys_timer_gettime,sys_ni_syscall)
+SYSCALL(sys_timer_getoverrun,sys_timer_getoverrun,sys_ni_syscall)
+SYSCALL(sys_timer_delete,sys_timer_delete,sys_ni_syscall)
+SYSCALL(sys_clock_settime,sys_clock_settime,sys_ni_syscall)
+SYSCALL(sys_clock_gettime,sys_clock_gettime,sys_ni_syscall)    /* 260 */
+SYSCALL(sys_clock_getres,sys_clock_getres,sys_ni_syscall)
+SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,sys_ni_syscall)
 NI_SYSCALL                                                     /* reserved for vserver */
-SYSCALL(s390_fadvise64_64,sys_fadvise64_64,sys32_fadvise64_64_wrapper)
+SYSCALL(s390_fadvise64_64,sys_fadvise64_64,sys_ni_syscall)
index 8940d44..1490bc6 100644 (file)
@@ -73,41 +73,6 @@ __copy_to_user_asm:
 
         .align 4
         .text
-        .globl __copy_in_user_asm
-__copy_in_user_asm:
-       stm     %r6,%r15,24(%r15)
-       lr      %r5,%r3
-       lr      %r7,%r3
-       lr      %r6,%r2
-       cpya    6,4          # ar6 = ar4
-       sacf    512
-0:     mvcle   %r4,%r6,0
-       jo      0b
-1:     sacf    0
-       lr      %r2,%r7
-       lm      %r6,%r15,24(%r15)
-       br      %r14
-2:     lhi     %r1,-4096
-       lr      %r5,%r4
-       slr     %r5,%r1      # %r5 = %r4 + 4096
-       nr      %r5,%r1      # %r5 = (%r4 + 4096) & -4096
-       slr     %r5,%r4      # %r5 = #bytes to next user page boundary
-       clr     %r7,%r5      # copy crosses next page boundary ?
-       jnh     1b           # no, the current page fauled
-       # The page after the current user page might have faulted.
-       # We cant't find out which page because the program check handler
-       # might have callled schedule, destroying all lowcore information.
-       # We retry with the shortened length.
-3:     mvcle   %r4,%r6,0
-       jo      3b
-       j       1b
-        .section __ex_table,"a"
-       .long   0b,2b
-       .long   3b,1b
-        .previous
-
-        .align 4
-        .text
         .globl __clear_user_asm
 __clear_user_asm:
        lr      %r4,%r2
index 0480a11..7e90f20 100644 (file)
@@ -73,41 +73,6 @@ __copy_to_user_asm:
 
         .align 4
         .text
-        .globl __copy_in_user_asm
-__copy_in_user_asm:
-       stmg    %r6,%r15,48(%r15)
-       lgr     %r5,%r3
-       lgr     %r7,%r5
-       lgr     %r6,%r2
-       cpya    6,4          # ar6 = ar4
-       sacf    512
-0:     mvcle   %r4,%r6,0
-       jo      0b
-1:     sacf    0
-       lgr     %r2,%r7
-       lmg     %r6,%r15,48(%r15)
-       br      %r14
-2:     lghi    %r1,-4096
-       lgr     %r5,%r4
-       slgr    %r5,%r1      # %r5 = %r4 + 4096
-       ngr     %r5,%r1      # %r5 = (%r4 + 4096) & -4096
-       slgr    %r5,%r4      # %r5 = #bytes to next user page boundary
-       clgr    %r7,%r5      # copy crosses next page boundary ?
-       jnh     1b           # no, the current page fauled
-       # The page after the current user page might have faulted.
-       # We cant't find out which page because the program check handler
-       # might have callled schedule, destroying all lowcore information.
-       # We retry with the shortened length.
-3:     mvcle   %r4,%r6,0
-       jo      3b
-       j       1b
-        .section __ex_table,"a"
-       .quad   0b,2b
-       .quad   3b,1b
-        .previous
-
-        .align 4
-        .text
         .globl __clear_user_asm
 __clear_user_asm:
        lgr     %r4,%r2
index b27a8f3..ad9951b 100644 (file)
@@ -1053,7 +1053,7 @@ config WATCHDOG
          implementation entirely in software (which can sometimes fail to
          reboot the machine) and a driver for hardware watchdog boards, which
          are more robust and can also keep track of the temperature inside
-         your computer. For details, read <file:Documentation/watchdog.txt>
+         your computer. For details, read <file:Documentation/watchdog/watchdog.txt>
          in the kernel source.
 
          The watchdog is usually used together with the watchdog daemon
index c226e09..8383220 100644 (file)
@@ -93,17 +93,19 @@ struct hw_interrupt_type no_irq_type = {
 #if defined(CONFIG_PROC_FS)
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, j;
+       int i = *(loff_t *) v, j;
        struct irqaction * action;
        unsigned long flags;
 
-       seq_puts(p, "           ");
-       for (j=0; j<NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "CPU%d       ",j);
-       seq_putc(p, '\n');
+       if (i == 0) {
+               seq_puts(p, "           ");
+               for (j=0; j<NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "CPU%d       ",j);
+               seq_putc(p, '\n');
+       }
 
-       for (i = 0 ; i < ACTUAL_NR_IRQS ; i++) {
+       if (i < ACTUAL_NR_IRQS) {
                spin_lock_irqsave(&irq_desc[i].lock, flags);
                action = irq_desc[i].action;
                if (!action)
index 6689ddc..a7c532e 100644 (file)
@@ -49,7 +49,12 @@ NET_Y                := $(patsubst %/, %/built-in.o, $(net-y))
 LIBS_Y1                := $(patsubst %/, %/lib.a, $(libs-y))
 LIBS_Y2                := $(patsubst %/, %/built-in.o, $(libs-y))
 LIBS_Y         := $(LIBS_Y1) $(LIBS_Y2)
-export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD_Y
+
+ifdef CONFIG_KALLSYMS
+kallsyms.o := .tmp_kallsyms2.o
+endif
+
+export INIT_Y CORE_Y DRIVERS_Y NET_Y LIBS_Y HEAD_Y kallsyms.o
 
 # Default target
 all: image
index 8c2fce6..58e18d3 100644 (file)
@@ -19,7 +19,7 @@ quiet_cmd_btfix               = BTFIX $@
 
 BTOBJS := $(HEAD_Y) $(INIT_Y)
 BTLIBS := $(CORE_Y) $(LIBS_Y) $(DRIVERS_Y) $(NET_Y)
-LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.s $(BTOBJS) --start-group $(BTLIBS) --end-group
+LDFLAGS_image := -T arch/sparc/kernel/vmlinux.lds.s $(BTOBJS) --start-group $(BTLIBS) --end-group $(kallsyms.o)
 
 # Actual linking
 $(obj)/image: $(obj)/btfix.o FORCE
index 74be5fd..1f55231 100644 (file)
@@ -38,12 +38,6 @@ int foo(void)
        DEFINE(AOFF_thread_fork_kpsr,
                        offsetof(struct thread_struct, fork_kpsr));
        BLANK();
-       DEFINE(AOFF_thread_w_saved, offsetof(struct thread_struct, w_saved));
-       DEFINE(AOFF_thread_rwbuf_stkptrs,
-                       offsetof(struct thread_struct, rwbuf_stkptrs));
-       DEFINE(AOFF_thread_reg_window,
-                       offsetof(struct thread_struct, reg_window));
-       BLANK();
        DEFINE(AOFF_mm_context, offsetof(struct mm_struct, context));
 
        /* DEFINE(NUM_USER_SEGMENTS, TASK_SIZE>>28); */
index 0b96b55..51ce40c 100644 (file)
@@ -1907,9 +1907,8 @@ kuw_patch1:
        wr      %o5, 0x0, %psr                  ! re-enable interrupts
        WRITE_PAUSE                             ! burn baby burn
 3:
-       ld      [%g6 + TI_TASK], %o4
        retl                                    ! return
-        st     %g0, [%o4 + AOFF_task_thread + AOFF_thread_w_saved]     ! no windows saved
+        st     %g0, [%g6 + TI_W_SAVED]         ! no windows saved
 
        .align  4
        .globl  C_LABEL(restore_current)
index 0f598f0..17a6595 100644 (file)
@@ -12,7 +12,6 @@
 #include <asm/page.h>
 #include <asm/psr.h>
 #include <asm/ptrace.h>
-#include <asm/asm_offsets.h>
 #include <asm/winmacro.h>
 #include <asm/asmmacro.h>
 #include <asm/thread_info.h>
@@ -57,7 +56,7 @@ tsetup_7win_patch6:   and     %g2, 0x7f, %g2
         *
         * sethi        %hi(trap_setup), %l4
         * jmpl         %l4 + %lo(trap_setup), %l6
-        * mov          1, %l4
+        * nop
         */
 
        /* 2 3 4  window number
@@ -156,9 +155,8 @@ trap_setup_from_user:
        and     %t_kstack, %curptr, %curptr
 #endif
 
-       /* Clear current->thread.w_saved */
-       ld      [%curptr + TI_TASK], %g2
-       st      %g0, [%g2 + AOFF_task_thread + AOFF_thread_w_saved]
+       /* Clear current_thread_info->w_saved */
+       st      %g0, [%curptr + TI_W_SAVED]
 
        /* See if we are in the trap window. */
        andcc   %t_twinmask, %t_wim, %g0
@@ -292,8 +290,7 @@ trap_setup_user_stack_is_bolixed:
        /* From user/kernel into invalid window w/bad user
         * stack. Save bad user stack, and return to caller.
         */
-       ld      [%curptr + TI_TASK], %glob_tmp
-       SAVE_BOLIXED_USER_STACK(glob_tmp, g3)
+       SAVE_BOLIXED_USER_STACK(curptr, g3)
        restore %g0, %g0, %g0
 
        jmpl    %t_retpc + 0x8, %g0
index d53d1ec..e04eb26 100644 (file)
@@ -102,7 +102,7 @@ struct irqaction *irq_action[NR_IRQS] = {
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
        struct irqaction * action;
        unsigned long flags;
 #ifdef CONFIG_SMP
@@ -114,7 +114,7 @@ int show_interrupts(struct seq_file *p, void *v)
                
                return show_sun4d_interrupts(p, v);
        }
-       for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                local_irq_save(flags);
                action = *(i + irq_action);
                if (!action) 
index ad2ebf4..f7f2079 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/module.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
+#include <linux/kallsyms.h>
 #include <linux/mm.h>
 #include <linux/stddef.h>
 #include <linux/unistd.h>
@@ -207,11 +208,12 @@ void __show_backtrace(unsigned long fp)
         while(rw && (((unsigned long) rw) >= PAGE_OFFSET) &&
             !(((unsigned long) rw) & 0x7)) {
                printk("CPU[%d]: ARGS[%08lx,%08lx,%08lx,%08lx,%08lx,%08lx] "
-                      "FP[%08lx] CALLER[%08lx]\n", cpu,
+                      "FP[%08lx] CALLER[%08lx]: ", cpu,
                       rw->ins[0], rw->ins[1], rw->ins[2], rw->ins[3],
                       rw->ins[4], rw->ins[5],
                       rw->ins[6],
                       rw->ins[7]);
+               print_symbol("%s\n", rw->ins[7]);
                rw = (struct reg_window *) rw->ins[6];
        }
        spin_unlock_irqrestore(&sparc_backtrace_lock, flags);
@@ -279,12 +281,14 @@ void show_regs(struct pt_regs *r)
 
         printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx    %s\n",
               r->psr, r->pc, r->npc, r->y, print_tainted());
+       print_symbol("PC: <%s>\n", r->pc);
        printk("%%G: %08lx %08lx  %08lx %08lx  %08lx %08lx  %08lx %08lx\n",
               r->u_regs[0], r->u_regs[1], r->u_regs[2], r->u_regs[3],
               r->u_regs[4], r->u_regs[5], r->u_regs[6], r->u_regs[7]);
        printk("%%O: %08lx %08lx  %08lx %08lx  %08lx %08lx  %08lx %08lx\n",
               r->u_regs[8], r->u_regs[9], r->u_regs[10], r->u_regs[11],
               r->u_regs[12], r->u_regs[13], r->u_regs[14], r->u_regs[15]);
+       print_symbol("RPC: <%s>\n", r->u_regs[15]);
 
        printk("%%L: %08lx %08lx  %08lx %08lx  %08lx %08lx  %08lx %08lx\n",
               rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3],
@@ -318,7 +322,8 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
                        break;
                rw = (struct reg_window *) fp;
                pc = rw->ins[7];
-               printk("[%08lx] ", pc);
+               printk("[%08lx : ", pc);
+               print_symbol("%s ] ", pc);
                fp = rw->ins[6];
        } while (++count < 16);
        printk("\n");
@@ -356,7 +361,7 @@ void exit_thread(void)
 
 void flush_thread(void)
 {
-       current->thread.w_saved = 0;
+       current_thread_info()->w_saved = 0;
 
        /* No new signal delivery by default */
        current->thread.new_signal = 0;
@@ -490,9 +495,6 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
        ti->kpsr = current->thread.fork_kpsr | PSR_PIL;
        ti->kwim = current->thread.fork_kwim;
 
-       /* This is used for sun4c only */
-       atomic_set(&p->thread.refcount, 1);
-
        if(regs->psr & PSR_PS) {
                extern struct pt_regs fake_swapper_regs;
 
index 1a14bf4..b1b6cda 100644 (file)
@@ -72,7 +72,7 @@ static inline void read_sunos_user(struct pt_regs *regs, unsigned long offset,
                                   struct task_struct *tsk, long *addr)
 {
        struct pt_regs *cregs = tsk->thread.kregs;
-       struct thread_struct *t = &tsk->thread;
+       struct thread_info *t = tsk->thread_info;
        int v;
        
        if(offset >= 1024)
@@ -93,16 +93,16 @@ static inline void read_sunos_user(struct pt_regs *regs, unsigned long offset,
        }
        switch(offset) {
        case 0:
-               v = tsk->thread_info->ksp;
+               v = t->ksp;
                break;
        case 4:
-               v = tsk->thread_info->kpc;
+               v = t->kpc;
                break;
        case 8:
-               v = tsk->thread_info->kpsr;
+               v = t->kpsr;
                break;
        case 12:
-               v = tsk->thread_info->uwinmask;
+               v = t->uwinmask;
                break;
        case 832:
                v = t->w_saved;
@@ -167,7 +167,7 @@ static inline void write_sunos_user(struct pt_regs *regs, unsigned long offset,
                                    struct task_struct *tsk)
 {
        struct pt_regs *cregs = tsk->thread.kregs;
-       struct thread_struct *t = &tsk->thread;
+       struct thread_info *t = tsk->thread_info;
        unsigned long value = regs->u_regs[UREG_I3];
 
        if(offset >= 1024)
index ee1a4a4..66bf253 100644 (file)
@@ -7,7 +7,6 @@
 #include <asm/cprefix.h>
 #include <asm/page.h>
 #include <asm/ptrace.h>
-#include <asm/asm_offsets.h>
 #include <asm/psr.h>
 #include <asm/asi.h>
 #include <asm/smp.h>
@@ -87,8 +86,7 @@ ret_trap_continue:
        wr      %t_psr, 0x0, %psr
        WRITE_PAUSE
 
-       ld      [%curptr + TI_TASK], %o5
-       ld      [%o5 + AOFF_task_thread + AOFF_thread_w_saved], %twin_tmp1
+       ld      [%curptr + TI_W_SAVED], %twin_tmp1
        orcc    %g0, %twin_tmp1, %g0
        be      ret_trap_nobufwins
         nop
index 2092af9..b9869d3 100644 (file)
@@ -105,8 +105,6 @@ unsigned int boot_flags __initdata = 0;
 #define BOOTME_DEBUG  0x1
 #define BOOTME_SINGLE 0x2
 
-static int console_fb __initdata = 0;
-
 /* Exported for mm/init.c:paging_init. */
 unsigned long cmdline_memory_size __initdata = 0;
 
@@ -160,6 +158,31 @@ static void __init process_switch(char c)
        }
 }
 
+static void __init process_console(char *commands)
+{
+       serial_console = 0;
+       commands += 8;
+       /* Linux-style serial */
+       if (!strncmp(commands, "ttyS", 4))
+               serial_console = simple_strtoul(commands + 4, NULL, 10) + 1;
+       else if (!strncmp(commands, "tty", 3)) {
+               char c = *(commands + 3);
+               /* Solaris-style serial */
+               if (c == 'a' || c == 'b')
+                       serial_console = c - 'a' + 1;
+               /* else Linux-style fbcon, not serial */
+       }
+#if defined(CONFIG_PROM_CONSOLE)
+       if (!strncmp(commands, "prom", 4)) {
+               char *p;
+
+               for (p = commands - 8; *p && *p != ' '; p++)
+                       *p = ' ';
+               conswitchp = &prom_con;
+       }
+#endif
+}
+
 static void __init boot_flags_init(char *commands)
 {
        while (*commands) {
@@ -174,37 +197,27 @@ static void __init boot_flags_init(char *commands)
                        commands++;
                        while (*commands && *commands != ' ')
                                process_switch(*commands++);
-               } else {
-                       if (!strncmp(commands, "console=", 8)) {
-                               commands += 8;
-#if defined(CONFIG_PROM_CONSOLE)
-                               if (!strncmp (commands, "prom", 4)) {
-                                       char *p;
-                                       
-                                       for (p = commands - 8; *p && *p != ' '; p++)
-                                               *p = ' ';
-                                       conswitchp = &prom_con;
-                                       console_fb = 1;
-                               }
-#endif
-                       } else if (!strncmp(commands, "mem=", 4)) {
-                               /*
-                                * "mem=XXX[kKmM] overrides the PROM-reported
-                                * memory size.
-                                */
-                               cmdline_memory_size = simple_strtoul(commands + 4,
-                                                            &commands, 0);
-                               if (*commands == 'K' || *commands == 'k') {
-                                       cmdline_memory_size <<= 10;
-                                       commands++;
-                               } else if (*commands=='M' || *commands=='m') {
-                                       cmdline_memory_size <<= 20;
-                                       commands++;
-                               }
-                       }
-                       while (*commands && *commands != ' ')
+                       continue;
+               }
+               if (!strncmp(commands, "console=", 8)) {
+                       process_console(commands);
+               } else if (!strncmp(commands, "mem=", 4)) {
+                       /*
+                        * "mem=XXX[kKmM] overrides the PROM-reported
+                        * memory size.
+                        */
+                       cmdline_memory_size = simple_strtoul(commands + 4,
+                                                    &commands, 0);
+                       if (*commands == 'K' || *commands == 'k') {
+                               cmdline_memory_size <<= 10;
+                               commands++;
+                       } else if (*commands=='M' || *commands=='m') {
+                               cmdline_memory_size <<= 20;
                                commands++;
+                       }
                }
+               while (*commands && *commands != ' ')
+                       commands++;
        }
 }
 
@@ -330,34 +343,6 @@ void __init setup_arch(char **cmdline_p)
 
        prom_setsync(prom_sync_me);
 
-#ifndef CONFIG_SERIAL_CONSOLE  /* Not CONFIG_SERIAL_SUNCORE: to be gone. */
-       serial_console = 0;
-#else
-       if (console_fb != 0) {
-               serial_console = 0;
-       } else {
-               int idev = prom_query_input_device();
-               int odev = prom_query_output_device();
-               if (idev == PROMDEV_IKBD && odev == PROMDEV_OSCREEN) {
-                       serial_console = 0;
-               } else if (idev == PROMDEV_ITTYA && odev == PROMDEV_OTTYA) {
-                       serial_console = 1;
-               } else if (idev == PROMDEV_ITTYB && odev == PROMDEV_OTTYB) {
-                       serial_console = 2;
-               } else if (idev == PROMDEV_I_UNK && odev == PROMDEV_OTTYA) {
-                       prom_printf("MrCoffee ttya\n");
-                       serial_console = 1;
-               } else if (idev == PROMDEV_I_UNK && odev == PROMDEV_OSCREEN) {
-                       serial_console = 0;
-                       prom_printf("MrCoffee keyboard\n");
-               } else {
-                       prom_printf("Confusing console (idev %d, odev %d)\n",
-                           idev, odev);
-                       serial_console = 1;
-               }
-       }
-#endif
-
        if((boot_flags&BOOTME_DEBUG) && (linux_dbvec!=0) && 
           ((*(short *)linux_dbvec) != -1)) {
                printk("Booted under KADB. Syncing trap table.\n");
@@ -370,6 +355,41 @@ void __init setup_arch(char **cmdline_p)
        paging_init();
 }
 
+static int __init set_preferred_console(void)
+{
+       int idev, odev;
+
+       /* The user has requested a console so this is already set up. */
+       if (serial_console >= 0)
+               return -EBUSY;
+
+       idev = prom_query_input_device();
+       odev = prom_query_output_device();
+       if (idev == PROMDEV_IKBD && odev == PROMDEV_OSCREEN) {
+               serial_console = 0;
+       } else if (idev == PROMDEV_ITTYA && odev == PROMDEV_OTTYA) {
+               serial_console = 1;
+       } else if (idev == PROMDEV_ITTYB && odev == PROMDEV_OTTYB) {
+               serial_console = 2;
+       } else if (idev == PROMDEV_I_UNK && odev == PROMDEV_OTTYA) {
+               prom_printf("MrCoffee ttya\n");
+               serial_console = 1;
+       } else if (idev == PROMDEV_I_UNK && odev == PROMDEV_OSCREEN) {
+               serial_console = 0;
+               prom_printf("MrCoffee keyboard\n");
+       } else {
+               prom_printf("Confusing console (idev %d, odev %d)\n",
+                   idev, odev);
+               serial_console = 1;
+       }
+
+       if (serial_console)
+               return add_preferred_console("ttyS", serial_console - 1, NULL);
+
+       return -ENODEV;
+}
+console_initcall(set_preferred_console);
+
 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on)
 {
        return -EIO;
@@ -458,5 +478,5 @@ void sun_do_break(void)
        prom_cmdline();
 }
 
-int serial_console;
+int serial_console = -1;
 int stop_a_enabled = 1;
index 8036e8c..55fca29 100644 (file)
@@ -432,6 +432,7 @@ setup_frame(struct sigaction *sa, struct pt_regs *regs, int signr, sigset_t *old
        int window = 0, err;
        unsigned long pc = regs->pc;
        unsigned long npc = regs->npc;
+       struct thread_info *tp = current_thread_info();
        void *sig_address;
        int sig_code;
 
@@ -459,20 +460,20 @@ setup_frame(struct sigaction *sa, struct pt_regs *regs, int signr, sigset_t *old
        err |= __put_user(regs->psr, &sc->sigc_psr);
        err |= __put_user(regs->u_regs[UREG_G1], &sc->sigc_g1);
        err |= __put_user(regs->u_regs[UREG_I0], &sc->sigc_o0);
-       err |= __put_user(current->thread.w_saved, &sc->sigc_oswins);
-       if (current->thread.w_saved)
-               for (window = 0; window < current->thread.w_saved; window++) {
-                       put_user((char *)current->thread.rwbuf_stkptrs[window],
+       err |= __put_user(tp->w_saved, &sc->sigc_oswins);
+       if (tp->w_saved)
+               for (window = 0; window < tp->w_saved; window++) {
+                       put_user((char *)tp->rwbuf_stkptrs[window],
                                 &sc->sigc_spbuf[window]);
                        err |= __copy_to_user(&sc->sigc_wbuf[window],
-                                             &current->thread.reg_window[window],
+                                             &tp->reg_window[window],
                                              sizeof(struct reg_window));
                }
        else
                err |= __copy_to_user(sframep, (char *) regs->u_regs[UREG_FP],
                                      sizeof(struct reg_window));
 
-       current->thread.w_saved = 0; /* So process is allowed to execute. */
+       tp->w_saved = 0; /* So process is allowed to execute. */
 
        err |= __put_user(signr, &sframep->sig_num);
        sig_address = NULL;
@@ -601,7 +602,7 @@ new_setup_frame(struct k_sigaction *ka, struct pt_regs *regs,
        if (invalid_frame_pointer(sf, sigframe_size))
                goto sigill_and_return;
 
-       if (current->thread.w_saved != 0)
+       if (current_thread_info()->w_saved != 0)
                goto sigill_and_return;
 
        /* 2. Save the current process state */
@@ -675,7 +676,7 @@ new_setup_rt_frame(struct k_sigaction *ka, struct pt_regs *regs,
                get_sigframe(&ka->sa, regs, sigframe_size);
        if (invalid_frame_pointer(sf, sigframe_size))
                goto sigill;
-       if (current->thread.w_saved != 0)
+       if (current_thread_info()->w_saved != 0)
                goto sigill;
 
        err  = __put_user(regs->pc, &sf->regs.pc);
@@ -752,6 +753,7 @@ setup_svr4_frame(struct sigaction *sa, unsigned long pc, unsigned long npc,
        svr4_gwindows_t __user *gw;
        svr4_ucontext_t __user *uc;
        svr4_sigset_t   setv;
+       struct thread_info *tp = current_thread_info();
        int window = 0, err;
 
        synchronize_user_stack();
@@ -808,7 +810,7 @@ setup_svr4_frame(struct sigaction *sa, unsigned long pc, unsigned long npc,
        err |= __put_user(gw, &mc->gwin);
            
        /* 2. Number of windows to restore at setcontext(): */
-       err |= __put_user(current->thread.w_saved, &gw->count);
+       err |= __put_user(tp->w_saved, &gw->count);
 
        /* 3. Save each valid window
         *    Currently, it makes a copy of the windows from the kernel copy.
@@ -821,16 +823,16 @@ setup_svr4_frame(struct sigaction *sa, unsigned long pc, unsigned long npc,
         *    These windows are just used in case synchronize_user_stack failed
         *    to flush the user windows.
         */
-       for (window = 0; window < current->thread.w_saved; window++) {
+       for (window = 0; window < tp->w_saved; window++) {
                err |= __put_user((int *) &(gw->win[window]), &gw->winptr[window]);
                err |= __copy_to_user(&gw->win[window],
-                                     &current->thread.reg_window[window],
+                                     &tp->reg_window[window],
                                      sizeof(svr4_rwindow_t));
                err |= __put_user(0, gw->winptr[window]);
        }
 
        /* 4. We just pay attention to the gw->count field on setcontext */
-       current->thread.w_saved = 0; /* So process is allowed to execute. */
+       tp->w_saved = 0; /* So process is allowed to execute. */
 
        /* Setup the signal information.  Solaris expects a bunch of
         * information to be passed to the signal handler, we don't provide
@@ -878,7 +880,7 @@ asmlinkage int svr4_getcontext(svr4_ucontext_t __user *uc, struct pt_regs *regs)
 
        synchronize_user_stack();
 
-       if (current->thread.w_saved)
+       if (current_thread_info()->w_saved)
                goto sigsegv_and_return;
 
        err = clear_user(uc, sizeof(*uc));
@@ -928,7 +930,6 @@ sigsegv_and_return:
 /* Set the context for a svr4 application, this is Solaris way to sigreturn */
 asmlinkage int svr4_setcontext(svr4_ucontext_t __user *c, struct pt_regs *regs)
 {
-       struct thread_struct *tp = &current->thread;
        svr4_gregset_t  __user *gr;
        unsigned long pc, npc, psr;
        sigset_t set;
@@ -940,8 +941,8 @@ asmlinkage int svr4_setcontext(svr4_ucontext_t __user *c, struct pt_regs *regs)
         * svr4_setup_frame when sync_user_windows is done?
         */
        flush_user_windows();
-       
-       if (tp->w_saved)
+
+       if (current_thread_info()->w_saved)
                goto sigsegv_and_return;
 
        if (((uint) c) & 3)
index 1d55d52..4368d95 100644 (file)
@@ -75,25 +75,25 @@ spinlock_t sun4d_imsk_lock = SPIN_LOCK_UNLOCKED;
 
 int show_sun4d_interrupts(struct seq_file *p, void *v)
 {
-       int i, j = 0, k = 0, sbusl;
+       int i = *(loff_t *) v, j = 0, k = 0, sbusl;
        struct irqaction * action;
 #ifdef CONFIG_SMP
        int x;
 #endif
 
-       for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                sbusl = pil_to_sbus[i];
                if (!sbusl) {
                        action = *(i + irq_action);
                        if (!action) 
-                               continue;
+                               goto out;
                } else {
                        for (j = 0; j < nsbi; j++) {
                                for (k = 0; k < 4; k++)
                                        if ((action = sbus_actions [(j << 5) + (sbusl << 2) + k].action))
                                                goto found_it;
                        }
-                       continue;
+                       goto out;
                }
 found_it:      seq_printf(p, "%3d: ", i);
 #ifndef CONFIG_SMP
@@ -128,6 +128,7 @@ found_it:   seq_printf(p, "%3d: ", i);
                }
                seq_putc(p, '\n');
        }
+out:
        return 0;
 }
 
index f2fb913..9ada281 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/config.h>
 #include <linux/sched.h>  /* for jiffies */
 #include <linux/kernel.h>
+#include <linux/kallsyms.h>
 #include <linux/signal.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
@@ -118,7 +119,9 @@ void die_if_kernel(char *str, struct pt_regs *regs)
                      count++ < 30                              &&
                       (((unsigned long) rw) >= PAGE_OFFSET)    &&
                      !(((unsigned long) rw) & 0x7)) {
-                       printk("Caller[%08lx]\n", rw->ins[7]);
+                       printk("Caller[%08lx]", rw->ins[7]);
+                       print_symbol(": %s\n", rw->ins[7]);
+                       printk("\n");
                        rw = (struct reg_window *)rw->ins[6];
                }
        }
@@ -497,7 +500,10 @@ void trap_init(void)
            TI_KSP         != offsetof(struct thread_info, ksp) ||
            TI_KPC         != offsetof(struct thread_info, kpc) ||
            TI_KPSR        != offsetof(struct thread_info, kpsr) ||
-           TI_KWIM        != offsetof(struct thread_info, kwim))
+           TI_KWIM        != offsetof(struct thread_info, kwim) ||
+           TI_REG_WINDOW  != offsetof(struct thread_info, reg_window) ||
+           TI_RWIN_SPTRS  != offsetof(struct thread_info, rwbuf_stkptrs) ||
+           TI_W_SAVED     != offsetof(struct thread_info, w_saved))
                thread_info_offsets_are_bolixed_pete();
 
        /* Attach to the address space of init_task. */
index 4b03d81..b4bd495 100644 (file)
@@ -36,7 +36,7 @@ void flush_user_windows(void)
        : "g4", "cc");
 }
 
-static inline void shift_window_buffer(int first_win, int last_win, struct thread_struct *tp)
+static inline void shift_window_buffer(int first_win, int last_win, struct thread_info *tp)
 {
        int i;
 
@@ -57,11 +57,10 @@ static inline void shift_window_buffer(int first_win, int last_win, struct threa
  */
 void synchronize_user_stack(void)
 {
-       struct thread_struct *tp;
+       struct thread_info *tp = current_thread_info();
        int window;
 
        flush_user_windows();
-       tp = &current->thread;
        if(!tp->w_saved)
                return;
 
@@ -110,12 +109,11 @@ static inline void copy_aligned_window(void *dest, const void *src)
 
 void try_to_clear_window_buffer(struct pt_regs *regs, int who)
 {
-       struct thread_struct *tp;
+       struct thread_info *tp = current_thread_info();
        int window;
 
        lock_kernel();
        flush_user_windows();
-       tp = &current->thread;
        for(window = 0; window < tp->w_saved; window++) {
                unsigned long sp = tp->rwbuf_stkptrs[window];
 
index 8baa0fa..7fa6888 100644 (file)
@@ -8,7 +8,6 @@
 #include <asm/contregs.h>
 #include <asm/page.h>
 #include <asm/ptrace.h>
-#include <asm/asm_offsets.h>
 #include <asm/psr.h>
 #include <asm/smp.h>
 #include <asm/asi.h>
@@ -211,20 +210,18 @@ spwin_user_stack_is_bolixed:
        bne     spwin_bad_ustack_from_kernel
         nop
 
-       ld      [%curptr + TI_TASK], %glob_tmp
-
        /* Oh well, throw this one window into the per-task window
         * buffer, the first one.
         */
-       st      %sp, [%glob_tmp + AOFF_task_thread + AOFF_thread_rwbuf_stkptrs]
-       STORE_WINDOW(glob_tmp + AOFF_task_thread + AOFF_thread_reg_window)
+       st      %sp, [%curptr + TI_RWIN_SPTRS]
+       STORE_WINDOW(curptr + TI_REG_WINDOW)
        restore %g0, %g0, %g0
 
        /* LOCATION: Trap Window */
 
        /* Back in the trap window, update winbuffer save count. */
        mov     1, %twin_tmp
-       st      %twin_tmp, [%glob_tmp + AOFF_task_thread + AOFF_thread_w_saved]
+       st      %twin_tmp, [%curptr + TI_W_SAVED]
 
                /* Compute new user window mask.  What we are basically
                 * doing is taking two windows, the invalid one at trap
@@ -275,8 +272,7 @@ spwin_bad_ustack_from_kernel:
         * a per-process window buffer until we can properly handle
         * this later on.
         */
-       ld      [%curptr + TI_TASK], %glob_tmp  /* Using curptr one last time */
-       SAVE_BOLIXED_USER_STACK(glob_tmp, g6)   /* ...now using g6 as scratch */
+       SAVE_BOLIXED_USER_STACK(curptr, glob_tmp)
        restore %g0, %g0, %g0
 
        /* LOCATION: Trap window */
index f3dd495..bb254da 100644 (file)
@@ -8,7 +8,6 @@
 #include <asm/contregs.h>
 #include <asm/page.h>
 #include <asm/ptrace.h>
-#include <asm/asm_offsets.h>
 #include <asm/psr.h>
 #include <asm/smp.h>
 #include <asm/asi.h>
@@ -187,8 +186,7 @@ fwin_user_stack_is_bolixed:
        mov     0x1, %g5
        sll     %g5, %g3, %g5
        st      %g5, [%curptr + TI_UWINMASK]            ! one live user window still
-       ld      [%curptr + TI_TASK], %g5
-       st      %g0, [%g5 + AOFF_task_thread + AOFF_thread_w_saved]             ! no windows in the buffer
+       st      %g0, [%curptr + TI_W_SAVED]             ! no windows in the buffer
 
        wr      %t_psr, PSR_ET, %psr                    ! enable traps
        nop
index e8ba587..469d2c9 100644 (file)
@@ -422,6 +422,12 @@ asmlinkage void do_sun4c_fault(struct pt_regs *regs, int text_fault, int write,
                }
        }
 
+       if (!mm) {
+               /* We are oopsing. */
+               do_sparc_fault(regs, text_fault, write, address);
+               BUG();  /* P3 Oops already, you bitch */
+       }
+
        pgdp = pgd_offset(mm, address);
        ptep = sun4c_pte_offset_kernel((pmd_t *) pgdp, address);
 
@@ -544,7 +550,7 @@ void window_overflow_fault(void)
 {
        unsigned long sp;
 
-       sp = current->thread.rwbuf_stkptrs[0];
+       sp = current_thread_info()->rwbuf_stkptrs[0];
        if(((sp + 0x38) & PAGE_MASK) != (sp & PAGE_MASK))
                force_user_fault(sp + 0x38, 1);
        force_user_fault(sp, 1);
index 0bfbc06..e17d007 100644 (file)
@@ -33,6 +33,7 @@ void *kmap_atomic(struct page *page, enum km_type type)
        unsigned long idx;
        unsigned long vaddr;
 
+       /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
        inc_preempt_count();
        if (page < highmem_start_page)
                return page_address(page);
@@ -69,6 +70,7 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
 
        if (vaddr < fix_kmap_begin) { // FIXME
                dec_preempt_count();
+               preempt_check_resched();
                return;
        }
 
@@ -96,4 +98,5 @@ void kunmap_atomic(void *kvaddr, enum km_type type)
 #endif
 #endif
        dec_preempt_count();
+       preempt_check_resched();
 }
index 3208829..fc536c8 100644 (file)
@@ -209,7 +209,8 @@ unsigned long __init bootmem_init(unsigned long *pages_avail)
        if (max_low_pfn > (SRMMU_MAXMEM >> PAGE_SHIFT)) {
                highstart_pfn = (SRMMU_MAXMEM >> PAGE_SHIFT);
                max_low_pfn = calc_max_low_pfn();
-               printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", calc_highpages());
+               printk(KERN_NOTICE "%ldMB HIGHMEM available.\n",
+                   calc_highpages() >> (20 - PAGE_SHIFT));
        }
 
 #ifdef CONFIG_BLK_DEV_INITRD
index 289a3f4..04d1ed9 100644 (file)
@@ -1067,23 +1067,21 @@ static void sun4c_free_thread_info(struct thread_info *ti)
        unsigned long pages = BUCKET_PTE_PAGE(sun4c_get_pte(tiaddr));
        int entry = BUCKET_NUM(tiaddr);
 
-       if (atomic_dec_and_test(&ti->task->thread.refcount)) {
-               /* We are deleting a mapping, so the flush here is mandatory. */
-               sun4c_flush_page(tiaddr);
+       /* We are deleting a mapping, so the flush here is mandatory. */
+       sun4c_flush_page(tiaddr);
 #ifndef CONFIG_SUN4    
-               sun4c_flush_page(tiaddr + PAGE_SIZE);
+       sun4c_flush_page(tiaddr + PAGE_SIZE);
 #endif
-               sun4c_put_pte(tiaddr, 0);
+       sun4c_put_pte(tiaddr, 0);
 #ifndef CONFIG_SUN4    
-               sun4c_put_pte(tiaddr + PAGE_SIZE, 0);
+       sun4c_put_pte(tiaddr + PAGE_SIZE, 0);
 #endif
-               sun4c_bucket[entry] = BUCKET_EMPTY;
-               if (entry < sun4c_lowbucket_avail)
-                       sun4c_lowbucket_avail = entry;
+       sun4c_bucket[entry] = BUCKET_EMPTY;
+       if (entry < sun4c_lowbucket_avail)
+               sun4c_lowbucket_avail = entry;
 
-               free_pages(pages, THREAD_INFO_ORDER);
-               garbage_collect(entry);
-       }
+       free_pages(pages, THREAD_INFO_ORDER);
+       garbage_collect(entry);
 }
 
 static void __init sun4c_init_buckets(void)
index 5d05bfe..f232f3a 100644 (file)
@@ -808,16 +808,9 @@ config DEBUG_SPINLOCK
          best used in conjunction with the NMI watchdog so that spinlock
          deadlocks are also debuggable.
 
-# We have a custom atomic_dec_and_lock() implementation but it's not
-# compatible with spinlock debugging so we need to fall back on
-# the generic version in that case.
-config HAVE_DEC_LOCK
-       bool
-       depends on SMP && !DEBUG_SPINLOCK
-       default y
-
 config DEBUG_SPINLOCK_SLEEP
        bool "Sleep-inside-spinlock checking"
+       depends DEBUG_KERNEL
        help
          If you say Y here, various routines which may sleep will become very
          noisy if they are called with a spinlock held.        
@@ -844,8 +837,17 @@ config DEBUG_INFO
          If you don't debug the kernel, you can say N.
          
 config STACK_DEBUG
+       depends on DEBUG_KERNEL
        bool "Stack Overflow Detection Support"
 
+# We have a custom atomic_dec_and_lock() implementation but it's not
+# compatible with spinlock debugging so we need to fall back on
+# the generic version in that case.
+config HAVE_DEC_LOCK
+       bool
+       depends on SMP && !DEBUG_SPINLOCK
+       default y
+
 config MCOUNT
        bool
        depends on STACK_DEBUG
index 6523b52..d57ff02 100644 (file)
@@ -27,6 +27,7 @@ CONFIG_EPOLL=y
 CONFIG_IOSCHED_NOOP=y
 CONFIG_IOSCHED_AS=y
 CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
 
 #
 # Loadable module support
@@ -138,7 +139,6 @@ CONFIG_FB_FFB=y
 #
 # Console display driver support
 #
-# CONFIG_VGA_CONSOLE is not set
 # CONFIG_MDA_CONSOLE is not set
 # CONFIG_PROM_CONSOLE is not set
 CONFIG_DUMMY_CONSOLE=y
@@ -243,7 +243,6 @@ CONFIG_BLK_DEV_IDEPCI=y
 # CONFIG_BLK_DEV_GENERIC is not set
 CONFIG_BLK_DEV_OPTI621=m
 CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDE_TCQ is not set
 # CONFIG_BLK_DEV_IDEDMA_FORCED is not set
 CONFIG_IDEDMA_PCI_AUTO=y
 CONFIG_IDEDMA_ONLYDISK=y
@@ -347,6 +346,8 @@ CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
 # CONFIG_SCSI_QLOGIC_1280 is not set
 CONFIG_SCSI_QLOGICPTI=m
 CONFIG_SCSI_DC395x=m
+CONFIG_SCSI_DC390T=m
+# CONFIG_SCSI_DC390T_NOGENSUPP is not set
 # CONFIG_SCSI_NSP32 is not set
 CONFIG_SCSI_DEBUG=m
 CONFIG_SCSI_SUNESP=y
@@ -1009,7 +1010,6 @@ CONFIG_KEYBOARD_SUNKBD=y
 # CONFIG_KEYBOARD_NEWTON is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_PS2_SYNAPTICS is not set
 CONFIG_MOUSE_SERIAL=y
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
@@ -1060,6 +1060,7 @@ CONFIG_SENSORS_EEPROM=m
 CONFIG_SENSORS_IT87=m
 CONFIG_SENSORS_LM75=m
 CONFIG_SENSORS_LM78=m
+CONFIG_SENSORS_LM83=m
 CONFIG_SENSORS_LM85=m
 CONFIG_SENSORS_VIA686A=m
 CONFIG_SENSORS_W83781D=m
@@ -1186,12 +1187,11 @@ CONFIG_RXRPC=m
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
 CONFIG_SUN_PARTITION=y
-CONFIG_SMB_NLS=y
-CONFIG_NLS=y
 
 #
 # Native Language Support
 #
+CONFIG_NLS=y
 CONFIG_NLS_DEFAULT="iso8859-1"
 # CONFIG_NLS_CODEPAGE_437 is not set
 # CONFIG_NLS_CODEPAGE_737 is not set
@@ -1276,6 +1276,7 @@ CONFIG_DVB_CORE=m
 #
 # Supported Frontend Modules
 #
+CONFIG_DVB_TWINHAN_DST=m
 CONFIG_DVB_STV0299=m
 CONFIG_DVB_SP887X=m
 CONFIG_DVB_ALPS_TDLB7=m
@@ -1287,6 +1288,7 @@ CONFIG_DVB_GRUNDIG_29504_401=m
 CONFIG_DVB_MT312=m
 CONFIG_DVB_VES1820=m
 CONFIG_DVB_VES1X93=m
+CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
 
 #
 # Supported SAA7146 based PCI Adapters
@@ -1301,11 +1303,17 @@ CONFIG_DVB_BUDGET_PATCH=m
 # Supported USB Adapters
 #
 # CONFIG_DVB_TTUSB_BUDGET is not set
+CONFIG_DVB_TTUSB_DEC=m
 
 #
 # Supported FlexCopII (B2C2) Adapters
 #
 CONFIG_DVB_B2C2_SKYSTAR=m
+
+#
+# Supported BT878 Adapters
+#
+CONFIG_DVB_BT8XX=m
 CONFIG_VIDEO_SAA7146=m
 CONFIG_VIDEO_SAA7146_VV=m
 CONFIG_VIDEO_VIDEOBUF=m
@@ -1465,6 +1473,7 @@ CONFIG_USB_HPUSBSCSI=m
 # CONFIG_USB_PWC is not set
 # CONFIG_USB_SE401 is not set
 # CONFIG_USB_STV680 is not set
+CONFIG_USB_W9968CF=m
 
 #
 # USB Network adaptors
@@ -1508,7 +1517,6 @@ CONFIG_USB_USS720=m
 CONFIG_USB_SERIAL=m
 CONFIG_USB_SERIAL_GENERIC=y
 CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
 CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
 CONFIG_USB_SERIAL_EMPEG=m
 CONFIG_USB_SERIAL_FTDI_SIO=m
@@ -1547,6 +1555,7 @@ CONFIG_USB_EZUSB=y
 # CONFIG_USB_TIGL is not set
 CONFIG_USB_AUERSWALD=m
 CONFIG_USB_RIO500=m
+CONFIG_USB_LEGOTOWER=m
 # CONFIG_USB_BRLVGER is not set
 CONFIG_USB_LCD=m
 CONFIG_USB_SPEEDTOUCH=m
@@ -1571,12 +1580,12 @@ CONFIG_DEBUG_KERNEL=y
 # CONFIG_DEBUG_SLAB is not set
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_SPINLOCK is not set
-CONFIG_HAVE_DEC_LOCK=y
 # CONFIG_DEBUG_SPINLOCK_SLEEP is not set
 # CONFIG_DEBUG_BUGVERBOSE is not set
 # CONFIG_DEBUG_DCFLUSH is not set
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_STACK_DEBUG is not set
+CONFIG_HAVE_DEC_LOCK=y
 
 #
 # Security options
index e9c3009..1300827 100644 (file)
@@ -424,7 +424,8 @@ void __init fill_ebus_child(int node, struct linux_prom_registers *preg,
 
 static int __init child_regs_nonstandard(struct linux_ebus_device *dev)
 {
-       if (!strcmp(dev->prom_name, "i2c"))
+       if (!strcmp(dev->prom_name, "i2c") ||
+           !strcmp(dev->prom_name, "SUNW,lombus"))
                return 1;
        return 0;
 }
index 81bce65..17058cc 100644 (file)
@@ -128,16 +128,16 @@ static void register_irq_proc (unsigned int irq);
 int show_interrupts(struct seq_file *p, void *v)
 {
        unsigned long flags;
-       int i;
+       int i = *(loff_t *) v;
        struct irqaction *action;
 #ifdef CONFIG_SMP
        int j;
 #endif
 
        spin_lock_irqsave(&irq_action_lock, flags);
-       for (i = 0; i < (NR_IRQS + 1); i++) {
+       if (i <= NR_IRQS) {
                if (!(action = *(i + irq_action)))
-                       continue;
+                       goto out_unlock;
                seq_printf(p, "%3d: ", i);
 #ifndef CONFIG_SMP
                seq_printf(p, "%10u ", kstat_irqs(i));
@@ -157,6 +157,7 @@ int show_interrupts(struct seq_file *p, void *v)
                }
                seq_putc(p, '\n');
        }
+out_unlock:
        spin_unlock_irqrestore(&irq_action_lock, flags);
 
        return 0;
@@ -1204,11 +1205,17 @@ static int irq_affinity_read_proc (char *page, char **start, off_t off,
 {
        struct ino_bucket *bp = ivector_table + (long)data;
        struct irqaction *ap = bp->irq_info;
-       unsigned long mask = get_smpaff_in_irqaction(ap);
+       cpumask_t mask = get_smpaff_in_irqaction(ap);
+       int len;
+
+       if (cpus_empty(mask))
+               mask = cpu_online_map;
 
-       if (count < HEX_DIGITS+1)
+       len = cpumask_snprintf(page, count, mask);
+       if (count - len < 2)
                return -EINVAL;
-       return sprintf (page, "%016lx\n", mask == 0 ? ~0UL : mask);
+       len += sprintf(page + len, "\n");
+       return len;
 }
 
 static inline void set_intr_affinity(int irq, unsigned long hw_aff)
index cb43f48..6a266a7 100644 (file)
@@ -321,10 +321,7 @@ static int __sabre_read_pci_cfg(struct pci_bus *bus_dev, unsigned int devfn,
 static int sabre_read_pci_cfg(struct pci_bus *bus, unsigned int devfn,
                              int where, int size, u32 *value)
 {
-       if (bus->number)
-               return __sabre_read_pci_cfg(bus, devfn, where, size, value);
-
-       if (sabre_out_of_range(devfn)) {
+       if (!bus->number && sabre_out_of_range(devfn)) {
                switch (size) {
                case 1:
                        *value = 0xff;
@@ -339,6 +336,15 @@ static int sabre_read_pci_cfg(struct pci_bus *bus, unsigned int devfn,
                return PCIBIOS_SUCCESSFUL;
        }
 
+       if (bus->number || PCI_SLOT(devfn))
+               return __sabre_read_pci_cfg(bus, devfn, where, size, value);
+
+       /* When accessing PCI config space of the PCI controller itself (bus
+        * 0, device slot 0, function 0) there are restrictions.  Each
+        * register must be accessed as it's natural size.  Thus, for example
+        * the Vendor ID must be accessed as a 16-bit quantity.
+        */
+
        switch (size) {
        case 1:
                if (where < 8) {
index 3b5598a..c6ec788 100644 (file)
@@ -320,8 +320,6 @@ unsigned int boot_flags = 0;
 #define BOOTME_DEBUG  0x1
 #define BOOTME_SINGLE 0x2
 
-static int console_fb __initdata = 0;
-
 /* Exported for mm/init.c:paging_init. */
 unsigned long cmdline_memory_size = 0;
 
@@ -374,6 +372,33 @@ static void __init process_switch(char c)
        }
 }
 
+static void __init process_console(char *commands)
+{
+       serial_console = 0;
+       commands += 8;
+       /* Linux-style serial */
+       if (!strncmp(commands, "ttyS", 4))
+               serial_console = simple_strtoul(commands + 4, NULL, 10) + 1;
+       else if (!strncmp(commands, "tty", 3)) {
+               char c = *(commands + 3);
+               /* Solaris-style serial */
+               if (c == 'a' || c == 'b') {
+                       serial_console = c - 'a' + 1;
+                       prom_printf ("Using /dev/tty%c as console.\n", c);
+               }
+               /* else Linux-style fbcon, not serial */
+       }
+#if defined(CONFIG_PROM_CONSOLE)
+       if (!strncmp(commands, "prom", 4)) {
+               char *p;
+
+               for (p = commands - 8; *p && *p != ' '; p++)
+                       *p = ' ';
+               conswitchp = &prom_con;
+       }
+#endif
+}
+
 static void __init boot_flags_init(char *commands)
 {
        while (*commands) {
@@ -384,49 +409,31 @@ static void __init boot_flags_init(char *commands)
                /* Process any command switches, otherwise skip it. */
                if (*commands == '\0')
                        break;
-               else if (*commands == '-') {
+               if (*commands == '-') {
                        commands++;
                        while (*commands && *commands != ' ')
                                process_switch(*commands++);
-               } else {
-                       if (!strncmp(commands, "console=", 8)) {
-                               commands += 8;
-                               if (!strncmp (commands, "ttya", 4)) {
-                                       console_fb = 2;
-                                       prom_printf ("Using /dev/ttya as console.\n");
-                               } else if (!strncmp (commands, "ttyb", 4)) {
-                                       console_fb = 3;
-                                       prom_printf ("Using /dev/ttyb as console.\n");
-#if defined(CONFIG_PROM_CONSOLE)
-                               } else if (!strncmp (commands, "prom", 4)) {
-                                       char *p;
-                                       
-                                       for (p = commands - 8; *p && *p != ' '; p++)
-                                               *p = ' ';
-                                       conswitchp = &prom_con;
-                                       console_fb = 1;
-#endif
-                               } else {
-                                       console_fb = 1;
-                               }
-                       } else if (!strncmp(commands, "mem=", 4)) {
-                               /*
-                                * "mem=XXX[kKmM]" overrides the PROM-reported
-                                * memory size.
-                                */
-                               cmdline_memory_size = simple_strtoul(commands + 4,
-                                                                    &commands, 0);
-                               if (*commands == 'K' || *commands == 'k') {
-                                       cmdline_memory_size <<= 10;
-                                       commands++;
-                               } else if (*commands=='M' || *commands=='m') {
-                                       cmdline_memory_size <<= 20;
-                                       commands++;
-                               }
-                       }
-                       while (*commands && *commands != ' ')
+                       continue;
+               }
+               if (!strncmp(commands, "console=", 8)) {
+                       process_console(commands);
+               } else if (!strncmp(commands, "mem=", 4)) {
+                       /*
+                        * "mem=XXX[kKmM]" overrides the PROM-reported
+                        * memory size.
+                        */
+                       cmdline_memory_size = simple_strtoul(commands + 4,
+                                                            &commands, 0);
+                       if (*commands == 'K' || *commands == 'k') {
+                               cmdline_memory_size <<= 10;
+                               commands++;
+                       } else if (*commands=='M' || *commands=='m') {
+                               cmdline_memory_size <<= 20;
                                commands++;
+                       }
                }
+               while (*commands && *commands != ' ')
+                       commands++;
        }
 }
 
@@ -546,38 +553,38 @@ void __init setup_arch(char **cmdline_p)
        }
 #endif
 
-       switch (console_fb) {
-       case 0: /* Let's get our io devices from prom */
-               {
-                       int idev = prom_query_input_device();
-                       int odev = prom_query_output_device();
-                       if (idev == PROMDEV_IKBD && odev == PROMDEV_OSCREEN) {
-                               serial_console = 0;
-                       } else if (idev == PROMDEV_ITTYA && odev == PROMDEV_OTTYA) {
-                               serial_console = 1;
-                       } else if (idev == PROMDEV_ITTYB && odev == PROMDEV_OTTYB) {
-                               serial_console = 2;
-                       } else {
-                               prom_printf("Inconsistent console: "
-                                           "input %d, output %d\n",
-                                           idev, odev);
-                               prom_halt();
-                       }
-               }
-               break;
-       case 1: /* Force one of the framebuffers as console */
+       paging_init();
+}
+
+static int __init set_preferred_console(void)
+{
+       int idev, odev;
+
+       /* The user has requested a console so this is already set up. */
+       if (serial_console >= 0)
+               return -EBUSY;
+
+       idev = prom_query_input_device();
+       odev = prom_query_output_device();
+       if (idev == PROMDEV_IKBD && odev == PROMDEV_OSCREEN) {
                serial_console = 0;
-               break;
-       case 2: /* Force ttya as console */
+       } else if (idev == PROMDEV_ITTYA && odev == PROMDEV_OTTYA) {
                serial_console = 1;
-               break;
-       case 3: /* Force ttyb as console */
+       } else if (idev == PROMDEV_ITTYB && odev == PROMDEV_OTTYB) {
                serial_console = 2;
-               break;
-       };
+       } else {
+               prom_printf("Inconsistent console: "
+                           "input %d, output %d\n",
+                           idev, odev);
+               prom_halt();
+       }
 
-       paging_init();
+       if (serial_console)
+               return add_preferred_console("ttyS", serial_console - 1, NULL);
+
+       return -ENODEV;
 }
+console_initcall(set_preferred_console);
 
 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on)
 {
@@ -671,7 +678,7 @@ void sun_do_break(void)
        prom_cmdline();
 }
 
-int serial_console;
+int serial_console = -1;
 int stop_a_enabled = 1;
 
 static int __init topology_init(void)
index 7f45d1b..3779bb8 100644 (file)
@@ -72,8 +72,8 @@ sys_call_table32:
 /*250*/        .word sys32_mremap, sys32_sysctl, sys_getsid, sys_fdatasync, sys32_nfsservctl
        .word sys_ni_syscall, compat_clock_settime, compat_clock_gettime, compat_clock_getres, compat_clock_nanosleep
 /*260*/        .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, compat_timer_settime, compat_timer_gettime, sys_timer_getoverrun
-       .word sys_timer_delete, sys32_timer_create, sys_ni_syscall, sys_ni_syscall, sys_ni_syscall
-/*270*/        .word sys_ni_syscall, sys_ni_syscall, sys_ni_syscall, sys_ni_syscall
+       .word sys_timer_delete, sys32_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
+/*270*/        .word compat_sys_io_submit, sys_io_cancel, compat_sys_io_getevents, sys_ni_syscall
 
        /* Now the 64-bit native Linux syscall table. */
 
index ed4967a..db74fdd 100644 (file)
@@ -504,7 +504,7 @@ int is_hugepage_mem_enough(size_t size)
  * this far.
  */
 static struct page *hugetlb_nopage(struct vm_area_struct *vma,
-                                  unsigned long address, int unused)
+                                  unsigned long address, int *unused)
 {
        BUG();
        return NULL;
index d77b9c8..ca2c6d7 100644 (file)
@@ -61,20 +61,6 @@ config MODE_SKAS
 
 config NET
        bool "Networking support"
-       help
-       Unless you really know what you are doing, you should say Y here.
-       The reason is that some programs need kernel networking support even
-       when running on a stand-alone machine that isn't connected to any
-       other computer. If you are upgrading from an older kernel, you
-       should consider updating your networking tools too because changes
-       in the kernel and the tools often go hand in hand. The tools are
-       contained in the package net-tools, the location and version number
-       of which are given in Documentation/Changes.
-
-       For a general introduction to Linux networking, it is highly
-       recommended to read the NET-HOWTO, available from
-       <http://www.tldp.org/docs.html#howto>.
-
 
 source "fs/Kconfig.binfmt"
 
@@ -99,19 +85,6 @@ config HOSTFS
         If you'd like to be able to work with files stored on the host, 
         say Y or M here; otherwise say N.
 
-config HPPFS
-       tristate "HoneyPot ProcFS"
-       help
-       hppfs (HoneyPot ProcFS) is a filesystem which allows UML /proc 
-       entries to be overridden, removed, or fabricated from the host.
-       Its purpose is to allow a UML to appear to be a physical machine
-       by removing or changing anything in /proc which gives away the
-       identity of a UML.
-
-       See http://user-mode-linux.sf.net/hppfs.html for more information.
-
-       You only need this if you are setting up a UML honeypot.  Otherwise,
-       it is safe to say 'N' here.
 
 config MCONSOLE
        bool "Management console"
@@ -132,16 +105,6 @@ config MCONSOLE
 config MAGIC_SYSRQ
        bool "Magic SysRq key"
        depends on MCONSOLE
-       help
-       If you say Y here, you will have some control over the system even
-       if the system crashes for example during kernel debugging (e.g., you
-       will be able to flush the buffer cache to disk, reboot the system
-       immediately or dump some status information). This is accomplished
-       by pressing various keys while holding SysRq (Alt+PrintScreen). It
-       also works on a serial console (on PC hardware at least), if you
-       send a BREAK and then within 5 seconds a command keypress. The
-       keys are documented in Documentation/sysrq.txt. Don't say Y
-       unless you really know what this hack does.
 
 config HOST_2G_2G
        bool "2G/2G host address space split"
@@ -196,9 +159,6 @@ config KERNEL_HALF_GIGS
 config HIGHMEM
        bool "Highmem support"
 
-config PROC_MM
-       bool "/proc/mm support"
-
 config KERNEL_STACK_ORDER
        int "Kernel stack size order"
        default 2
@@ -279,10 +239,6 @@ config FRAME_POINTER
 config PT_PROXY
        bool "Enable ptrace proxy"
        depends on XTERM_CHAN && DEBUG_INFO
-       help
-       This option enables a debugging interface which allows gdb to debug
-       the kernel without needing to actually attach to kernel threads.
-       If you want to do kernel debugging, say Y here; otherwise say N.
 
 config GPROF
        bool "Enable gprof support"
index 46e97fc..fba53d9 100644 (file)
@@ -29,20 +29,6 @@ config BLK_DEV_UBD_SYNC
         wise choice too.  In all other cases (for example, if you're just
         playing around with User-Mode Linux) you can choose N.
 
-# Turn this back on when the driver actually works
-#
-#config BLK_DEV_COW
-#      tristate "COW block device"
-#      help
-#      This is a layered driver which sits above two other block devices.
-#      One is read-only, and the other is a read-write layer which stores
-#      all changes.  This provides the illusion that the read-only layer
-#      can be mounted read-write and changed.
-
-config BLK_DEV_COW_COMMON
-       bool
-       default BLK_DEV_COW || BLK_DEV_UBD
-
 config BLK_DEV_LOOP
        tristate "Loopback device support"
 
index 94c6bf0..443a74b 100644 (file)
@@ -1,5 +1,5 @@
 
-menu "UML Network Devices"
+menu "Network Devices"
        depends on NET
 
 # UML virtual driver
@@ -176,5 +176,73 @@ config UML_NET_SLIRP
        
         Startup example: "eth0=slirp,FE:FD:01:02:03:04,/usr/local/bin/slirp"
 
+
+# Below are hardware-independent drivers mirrored from
+# drivers/net/Config.in. It would be nice if Linux
+# had HW independent drivers separated from the other
+# but it does not. Until then each non-ISA/PCI arch
+# needs to provide it's own menu of network drivers
+config DUMMY
+       tristate "Dummy net driver support"
+
+config BONDING
+       tristate "Bonding driver support"
+
+config EQUALIZER
+       tristate "EQL (serial line load balancing) support"
+
+config TUN
+       tristate "Universal TUN/TAP device driver support"
+
+config ETHERTAP
+       tristate "Ethertap network tap (OBSOLETE)"
+       depends on EXPERIMENTAL && NETLINK
+
+config PPP
+       tristate "PPP (point-to-point protocol) support"
+
+config PPP_MULTILINK
+       bool "PPP multilink support (EXPERIMENTAL)"
+       depends on PPP && EXPERIMENTAL
+
+config PPP_FILTER
+       bool "PPP filtering"
+       depends on PPP && FILTER
+
+config PPP_ASYNC
+       tristate "PPP support for async serial ports"
+       depends on PPP
+
+config PPP_SYNC_TTY
+       tristate "PPP support for sync tty ports"
+       depends on PPP
+
+config PPP_DEFLATE
+       tristate "PPP Deflate compression"
+       depends on PPP
+
+config PPP_BSDCOMP
+       tristate "PPP BSD-Compress compression"
+       depends on PPP
+
+config PPPOE
+       tristate "PPP over Ethernet (EXPERIMENTAL)"
+       depends on PPP && EXPERIMENTAL
+
+config SLIP
+       tristate "SLIP (serial line) support"
+
+config SLIP_COMPRESSED
+       bool "CSLIP compressed headers"
+       depends on SLIP=y
+
+config SLIP_SMART
+       bool "Keepalive and linefill"
+       depends on SLIP=y
+
+config SLIP_MODE_SLIP6
+       bool "Six bit SLIP encapsulation"
+       depends on SLIP=y
+
 endmenu
 
index 76b581d..bb7d3f6 100644 (file)
@@ -24,17 +24,15 @@ core-y                      += $(ARCH_DIR)/kernel/           \
 # Have to precede the include because the included Makefiles reference them.
 SYMLINK_HEADERS = include/asm-um/archparam.h include/asm-um/system.h \
        include/asm-um/sigcontext.h include/asm-um/processor.h \
-       include/asm-um/ptrace.h include/asm-um/arch-signal.h \
-       include/asm-um/module.h
+       include/asm-um/ptrace.h include/asm-um/arch-signal.h
 
 ARCH_SYMLINKS = include/asm-um/arch $(ARCH_DIR)/include/sysdep $(ARCH_DIR)/os \
        $(SYMLINK_HEADERS) $(ARCH_DIR)/include/uml-config.h
 
 GEN_HEADERS += $(ARCH_DIR)/include/task.h $(ARCH_DIR)/include/kern_constants.h
 
-.PHONY: sys_prepare
-sys_prepare:
-       @:
+include $(ARCH_DIR)/Makefile-$(SUBARCH)
+include $(ARCH_DIR)/Makefile-os-$(OS)
 
 MAKEFILE-$(CONFIG_MODE_TT) += Makefile-tt
 MAKEFILE-$(CONFIG_MODE_SKAS) += Makefile-skas
@@ -43,10 +41,7 @@ ifneq ($(MAKEFILE-y),)
   include $(addprefix $(ARCH_DIR)/,$(MAKEFILE-y))
 endif
 
-include $(ARCH_DIR)/Makefile-$(SUBARCH)
-include $(ARCH_DIR)/Makefile-os-$(OS)
-
-#EXTRAVERSION := $(EXTRAVERSION)-1um
+EXTRAVERSION := $(EXTRAVERSION)-1um
 
 ARCH_INCLUDE = -I$(ARCH_DIR)/include
 
@@ -57,14 +52,14 @@ ARCH_INCLUDE = -I$(ARCH_DIR)/include
 
 CFLAGS += $(CFLAGS-y) -D__arch_um__ -DSUBARCH=\"$(SUBARCH)\" \
        -D_LARGEFILE64_SOURCE $(ARCH_INCLUDE) -Derrno=kernel_errno \
-       -Dsigprocmask=kernel_sigprocmask $(MODE_INCLUDE)
+       $(MODE_INCLUDE)
 
 LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
 
 SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000)
 
 ifeq ($(CONFIG_MODE_SKAS), y)
-$(SYS_HEADERS) : $(TOPDIR)/$(ARCH_DIR)/include/skas_ptregs.h
+$(SYS_HEADERS) : $(ARCH_DIR)/kernel/skas/include/skas_ptregs.h
 endif
 
 include/linux/version.h: arch/$(ARCH)/Makefile
@@ -103,17 +98,17 @@ CPP_MODE_TT := $(shell [ "$(CONFIG_MODE_TT)" = "y" ] && echo -DMODE_TT)
 CONFIG_KERNEL_STACK_ORDER ?= 2
 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] )
 
-AFLAGS_vmlinux.lds.o = $(shell echo -U$(SUBARCH) \
+AFLAGS_vmlinux.lds.o = -U$(SUBARCH) \
        -DSTART=$$(($(TOP_ADDR) - $(SIZE))) -DELF_ARCH=$(ELF_ARCH) \
        -DELF_FORMAT=\"$(ELF_FORMAT)\" $(CPP_MODE_TT) \
-       -DKERNEL_STACK_SIZE=$(STACK_SIZE))
+       -DKERNEL_STACK_SIZE=$(STACK_SIZE)
 
-export AFLAGS_$(LD_SCRIPT-y:.s=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
+AFLAGS_$(LD_SCRIPT-y:.s=).o = $(AFLAGS_vmlinux.lds.o) -P -C -Uum
 
 LD_SCRIPT-y := $(ARCH_DIR)/$(LD_SCRIPT-y)
 
-#$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.s=.S) scripts FORCE
-#      $(call if_changed_dep,as_s_S)
+$(LD_SCRIPT-y) : $(LD_SCRIPT-y:.s=.S) scripts FORCE
+       $(call if_changed_dep,as_s_S)
 
 linux: vmlinux $(LD_SCRIPT-y)
        $(CC) -Wl,-T,$(LD_SCRIPT-y) $(LINK-y) $(LINK_WRAPS) \
@@ -121,7 +116,6 @@ linux: vmlinux $(LD_SCRIPT-y)
 
 USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))
 USER_CFLAGS := $(patsubst -Derrno=kernel_errno,,$(USER_CFLAGS))
-USER_CFLAGS := $(patsubst -Dsigprocmask=kernel_sigprocmask,,$(USER_CFLAGS))
 USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
        $(MODE_INCLUDE)
 
@@ -129,10 +123,9 @@ USER_CFLAGS := $(patsubst -D__KERNEL__,,$(USER_CFLAGS)) $(ARCH_INCLUDE) \
 USER_CFLAGS += -D_GNU_SOURCE
 
 CLEAN_FILES += linux x.i gmon.out $(ARCH_DIR)/uml.lds.s \
-       $(ARCH_DIR)/dyn_link.ld.s $(ARCH_DIR)/include/uml-config.h \
-       $(GEN_HEADERS)
+       $(ARCH_DIR)/dyn_link.ld.s $(GEN_HEADERS)
 
-$(ARCH_DIR)/main.o: $(ARCH_DIR)/main.c sys_prepare
+$(ARCH_DIR)/main.o: $(ARCH_DIR)/main.c
        $(CC) $(USER_CFLAGS) $(EXTRA_CFLAGS) -c -o $@ $<
 
 archmrproper:
@@ -168,23 +161,19 @@ $(ARCH_DIR)/include/sysdep:
 $(ARCH_DIR)/os:
        cd $(ARCH_DIR) && ln -sf os-$(OS) os
 
-$(ARCH_DIR)/include/uml-config.h : $(TOPDIR)/include/linux/autoconf.h
+$(ARCH_DIR)/include/uml-config.h :
        sed 's/ CONFIG/ UML_CONFIG/' $(TOPDIR)/include/linux/autoconf.h > $@
 
-filechk_$(ARCH_DIR)/include/task.h := $(ARCH_DIR)/util/mk_task
-
 $(ARCH_DIR)/include/task.h : $(ARCH_DIR)/util/mk_task
-       $(call filechk,$@)
-
-filechk_$(ARCH_DIR)/include/kern_constants.h := $(ARCH_DIR)/util/mk_constants
+       $< > $@
 
 $(ARCH_DIR)/include/kern_constants.h : $(ARCH_DIR)/util/mk_constants
-       $(call filechk,$@)
+       $< > $@
 
-$(ARCH_DIR)/util/mk_task $(ARCH_DIR)/util/mk_constants : $(ARCH_DIR)/util \
-       sys_prepare FORCE ;
+$(ARCH_DIR)/util/mk_task : $(ARCH_DIR)/kernel/skas/include/skas_ptregs.h \
+       $(ARCH_DIR)/util FORCE ;
 
 $(ARCH_DIR)/util: FORCE
-       $(MAKE) -f scripts/Makefile.build obj=$@
+       @$(call descend,$@,)
 
-export SUBARCH USER_CFLAGS OS 
+export SUBARCH USER_CFLAGS OS
index 437f063..3bd90fb 100644 (file)
@@ -16,28 +16,22 @@ SYS_UTIL_DIR        := $(ARCH_DIR)/sys-i386/util
 
 SYS_HEADERS = $(SYS_DIR)/sc.h $(SYS_DIR)/thread.h
 
-sys_prepare: $(SYS_DIR)/sc.h
-
 prepare: $(SYS_HEADERS)
 
-filechk_$(SYS_DIR)/sc.h := $(SYS_UTIL_DIR)/mk_sc
-
 $(SYS_DIR)/sc.h: $(SYS_UTIL_DIR)/mk_sc
-       $(call filechk,$@)
-
-filechk_$(SYS_DIR)/thread.h := $(SYS_UTIL_DIR)/mk_thread 
+       $< > $@
 
 $(SYS_DIR)/thread.h: $(SYS_UTIL_DIR)/mk_thread 
-       $(call filechk,$@)
+       $< > $@
 
-$(SYS_UTIL_DIR)/mk_sc: scripts/fixdep include/config/MARKER FORCE ; 
-       +@$(call descend,$(SYS_UTIL_DIR),$@)
+$(SYS_UTIL_DIR)/mk_sc: FORCE ; 
+       @$(call descend,$(SYS_UTIL_DIR),$@)
 
-$(SYS_UTIL_DIR)/mk_thread: $(ARCH_SYMLINKS) $(GEN_HEADERS) sys_prepare FORCE ; 
-       +@$(call descend,$(SYS_UTIL_DIR),$@)
+$(SYS_UTIL_DIR)/mk_thread: $(ARCH_SYMLINKS) $(GEN_HEADERS) FORCE ; 
+       @$(call descend,$(SYS_UTIL_DIR),$@)
 
 $(SYS_UTIL_DIR): include/asm FORCE
-       +@$(call descend,$@,)
+       @$(call descend,$@,)
 
 sysclean :
        rm -f $(SYS_HEADERS)
index 804b3dd..b9dfec5 100644 (file)
@@ -14,7 +14,7 @@ MODE_INCLUDE += -I$(TOPDIR)/$(ARCH_DIR)/kernel/skas/include
 LINK_SKAS = -Wl,-rpath,/lib 
 LD_SCRIPT_SKAS = dyn.lds.s
 
-GEN_HEADERS += $(TOPDIR)/$(ARCH_DIR)/include/skas_ptregs.h
+GEN_HEADERS += $(ARCH_DIR)/kernel/skas/include/skas_ptregs.h
 
-$(TOPDIR)/$(ARCH_DIR)/include/skas_ptregs.h :
-       $(call descend,$(ARCH_DIR)/kernel/skas,$@)
+$(ARCH_DIR)/kernel/skas/include/skas_ptregs.h :
+       $(MAKE) -C $(ARCH_DIR)/kernel/skas include/skas_ptregs.h
index ea9f269..82d3bad 100644 (file)
@@ -228,6 +228,7 @@ CONFIG_ROMFS_FS=m
 CONFIG_EXT2_FS=y
 CONFIG_SYSV_FS=m
 CONFIG_UDF_FS=m
+# CONFIG_UDF_RW is not set
 CONFIG_UFS_FS=m
 # CONFIG_UFS_FS_WRITE is not set
 
index 0a7650c..3430e12 100644 (file)
@@ -3,19 +3,29 @@
 #
 CONFIG_USERMODE=y
 CONFIG_MMU=y
+CONFIG_SWAP=y
 CONFIG_UID16=y
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_CONFIG_LOG_BUF_SHIFT=14
 
 #
-# UML-specific options
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
+#
+# General Setup
 #
 CONFIG_MODE_TT=y
 CONFIG_MODE_SKAS=y
 CONFIG_NET=y
+CONFIG_SYSVIPC=y
+CONFIG_BSD_PROCESS_ACCT=y
+CONFIG_SYSCTL=y
+CONFIG_BINFMT_AOUT=y
 CONFIG_BINFMT_ELF=y
 CONFIG_BINFMT_MISC=y
 CONFIG_HOSTFS=y
-CONFIG_HPPFS=y
 CONFIG_MCONSOLE=y
 CONFIG_MAGIC_SYSRQ=y
 # CONFIG_HOST_2G_2G is not set
@@ -28,38 +38,10 @@ CONFIG_PROC_MM=y
 CONFIG_KERNEL_STACK_ORDER=2
 
 #
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
-CONFIG_BROKEN_ON_SMP=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_IKCONFIG is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-
-#
 # Loadable module support
 #
-# CONFIG_MODULES is not set
-
-#
-# Generic Driver Options
-#
+CONFIG_MODULES=y
+# CONFIG_KMOD is not set
 
 #
 # Character Devices
@@ -87,7 +69,6 @@ CONFIG_HOSTAUDIO=y
 #
 CONFIG_BLK_DEV_UBD=y
 # CONFIG_BLK_DEV_UBD_SYNC is not set
-CONFIG_BLK_DEV_COW_COMMON=y
 CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_NBD=y
 CONFIG_BLK_DEV_RAM=y
@@ -97,7 +78,7 @@ CONFIG_BLK_DEV_INITRD=y
 CONFIG_NETDEVICES=y
 
 #
-# UML Network Devices
+# Network Devices
 #
 CONFIG_UML_NET=y
 CONFIG_UML_NET_ETHERTAP=y
@@ -107,6 +88,22 @@ CONFIG_UML_NET_DAEMON=y
 CONFIG_UML_NET_MCAST=y
 # CONFIG_UML_NET_PCAP is not set
 CONFIG_UML_NET_SLIRP=y
+CONFIG_DUMMY=y
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+CONFIG_TUN=y
+# CONFIG_ETHERTAP is not set
+CONFIG_PPP=y
+# CONFIG_PPP_MULTILINK is not set
+# CONFIG_PPP_ASYNC is not set
+# CONFIG_PPP_SYNC_TTY is not set
+# CONFIG_PPP_DEFLATE is not set
+# CONFIG_PPP_BSDCOMP is not set
+# CONFIG_PPPOE is not set
+CONFIG_SLIP=y
+# CONFIG_SLIP_COMPRESSED is not set
+# CONFIG_SLIP_SMART is not set
+# CONFIG_SLIP_MODE_SLIP6 is not set
 
 #
 # Networking support
@@ -118,6 +115,8 @@ CONFIG_UML_NET_SLIRP=y
 CONFIG_PACKET=y
 CONFIG_PACKET_MMAP=y
 # CONFIG_NETLINK_DEV is not set
+# CONFIG_NETFILTER is not set
+# CONFIG_FILTER is not set
 CONFIG_UNIX=y
 # CONFIG_NET_KEY is not set
 CONFIG_INET=y
@@ -131,11 +130,8 @@ CONFIG_INET=y
 # CONFIG_SYN_COOKIES is not set
 # CONFIG_INET_AH is not set
 # CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
+# CONFIG_XFRM_USER is not set
 # CONFIG_IPV6 is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_NETFILTER is not set
 
 #
 # SCTP Configuration (EXPERIMENTAL)
@@ -144,9 +140,9 @@ CONFIG_IPV6_SCTP__=y
 # CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
 # CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+# CONFIG_LLC is not set
+# CONFIG_DECNET is not set
+# CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_NET_DIVERT is not set
@@ -164,10 +160,6 @@ CONFIG_IPV6_SCTP__=y
 # Network testing
 #
 # CONFIG_NET_PKTGEN is not set
-CONFIG_DUMMY=y
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=y
 
 #
 # Ethernet (10 or 100Mbit)
@@ -179,28 +171,12 @@ CONFIG_TUN=y
 #
 
 #
-# Ethernet (10000 Mbit)
-#
-CONFIG_PPP=y
-# CONFIG_PPP_MULTILINK is not set
-# CONFIG_PPP_FILTER is not set
-# CONFIG_PPP_ASYNC is not set
-# CONFIG_PPP_SYNC_TTY is not set
-# CONFIG_PPP_DEFLATE is not set
-# CONFIG_PPP_BSDCOMP is not set
-# CONFIG_PPPOE is not set
-CONFIG_SLIP=y
-# CONFIG_SLIP_COMPRESSED is not set
-# CONFIG_SLIP_SMART is not set
-# CONFIG_SLIP_MODE_SLIP6 is not set
-
-#
 # Wireless LAN (non-hamradio)
 #
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
 # CONFIG_SHAPER is not set
 
@@ -210,101 +186,68 @@ CONFIG_SLIP=y
 # CONFIG_WAN is not set
 
 #
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
-
-#
 # File systems
 #
-CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
-# CONFIG_EXT3_FS is not set
-# CONFIG_JBD is not set
-CONFIG_REISERFS_FS=y
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_XFS_FS is not set
-CONFIG_MINIX_FS=y
-# CONFIG_ROMFS_FS is not set
 CONFIG_QUOTA=y
 # CONFIG_QFMT_V1 is not set
 # CONFIG_QFMT_V2 is not set
 CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=y
-CONFIG_AUTOFS4_FS=y
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-CONFIG_DEVPTS_FS=y
-# CONFIG_DEVPTS_FS_XATTR is not set
-# CONFIG_TMPFS is not set
-# CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
-
-#
-# Miscellaneous filesystems
-#
+CONFIG_AUTOFS_FS=m
+CONFIG_AUTOFS4_FS=m
+CONFIG_REISERFS_FS=m
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
 # CONFIG_AFFS_FS is not set
 # CONFIG_HFS_FS is not set
 # CONFIG_BEFS_FS is not set
 # CONFIG_BFS_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
+CONFIG_VFAT_FS=m
 # CONFIG_EFS_FS is not set
 CONFIG_JFFS_FS=y
 CONFIG_JFFS_FS_VERBOSE=0
+CONFIG_JFFS_PROC_FS=y
 # CONFIG_JFFS2_FS is not set
 # CONFIG_CRAMFS is not set
+# CONFIG_TMPFS is not set
+CONFIG_RAMFS=y
+CONFIG_ISO9660_FS=m
+# CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_MINIX_FS=m
 # CONFIG_VXFS_FS is not set
+# CONFIG_NTFS_FS is not set
 # CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+CONFIG_DEVFS_FS=y
+CONFIG_DEVFS_MOUNT=y
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
 # CONFIG_QNX4FS_FS is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_EXT2_FS_XATTR is not set
 # CONFIG_SYSV_FS is not set
+# CONFIG_UDF_FS is not set
 # CONFIG_UFS_FS is not set
+# CONFIG_XFS_FS is not set
 
 #
 # Network File Systems
 #
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_NFS_FS is not set
 # CONFIG_NFSD is not set
 # CONFIG_EXPORTFS is not set
-# CONFIG_SMB_FS is not set
 # CONFIG_CIFS is not set
+# CONFIG_SMB_FS is not set
 # CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
 # CONFIG_AFS_FS is not set
 
 #
@@ -374,7 +317,28 @@ CONFIG_NLS_DEFAULT="iso8859-1"
 #
 # SCSI support
 #
-# CONFIG_SCSI is not set
+CONFIG_SCSI=y
+CONFIG_GENERIC_ISA_DMA=y
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=y
+CONFIG_SD_EXTRA_DEVS=40
+CONFIG_CHR_DEV_ST=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_DEV_SR_VENDOR=y
+CONFIG_SR_EXTRA_DEVS=2
+CONFIG_CHR_DEV_SG=y
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+CONFIG_SCSI_DEBUG_QUEUES=y
+CONFIG_SCSI_MULTI_LUN=y
+CONFIG_SCSI_CONSTANTS=y
+CONFIG_SCSI_LOGGING=y
+CONFIG_SCSI_DEBUG=y
 
 #
 # Multi-device support (RAID and LVM)
@@ -396,7 +360,6 @@ CONFIG_MTD_CHAR=y
 CONFIG_MTD_BLOCK=y
 # CONFIG_FTL is not set
 # CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
 
 #
 # RAM/ROM/Flash chip drivers
@@ -411,21 +374,20 @@ CONFIG_MTD_BLOCK=y
 #
 # Mapping drivers for chip access
 #
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
 
 #
 # Self-contained MTD device drivers
 #
 # CONFIG_MTD_SLRAM is not set
 # CONFIG_MTD_MTDRAM is not set
-CONFIG_MTD_BLKMTD=y
+CONFIG_MTD_BLKMTD=m
 
 #
 # Disk-On-Chip Device Drivers
 #
+# CONFIG_MTD_DOC1000 is not set
 # CONFIG_MTD_DOC2000 is not set
 # CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
 
 #
 # NAND Flash Device Drivers
index c3b110e..8ea9ada 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2000, 2002, 2003 Jeff Dike (jdike@karaya.com)
+# Copyright (C) 2000, 2002 Jeff Dike (jdike@karaya.com)
 # Licensed under the GPL
 #
 
@@ -39,8 +39,6 @@ obj-$(CONFIG_PTY_CHAN) += pty.o
 obj-$(CONFIG_TTY_CHAN) += tty.o 
 obj-$(CONFIG_XTERM_CHAN) += xterm.o xterm_kern.o
 obj-$(CONFIG_UML_WATCHDOG) += harddog.o
-obj-$(CONFIG_BLK_DEV_COW) += cow_kern.o
-obj-$(CONFIG_BLK_DEV_COW_COMMON) += cow_user.o
 
 obj-y += stdio_console.o $(CHAN_OBJS)
 
@@ -48,7 +46,7 @@ USER_SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
 
 USER_OBJS := $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) fd.o \
        null.o pty.o tty.o xterm.o
-USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
+USER_OBJS := $(foreach file,$(USER_OBJS),arch/um/drivers/$(file))
 
 $(USER_OBJS) : %.o: %.c
        $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<
index 13d377a..9e45a08 100644 (file)
@@ -8,7 +8,6 @@
 #include <linux/list.h>
 #include <linux/slab.h>
 #include <linux/tty.h>
-#include <linux/string.h>
 #include <linux/tty_flip.h>
 #include <asm/irq.h>
 #include "chan_kern.h"
index e1e46e8..714bace 100644 (file)
@@ -188,8 +188,8 @@ void register_winch(int fd, void *device_data)
        if(!isatty(fd)) return;
 
        pid = tcgetpgrp(fd);
-       if(!CHOOSE_MODE_PROC(is_tracer_winch, is_skas_winch, pid, fd, 
-                            device_data) && (pid == -1)){
+       if(!CHOOSE_MODE(is_tracer_winch(pid, fd, device_data), 0) && 
+          (pid == -1)){
                thread = winch_tramp(fd, device_data, &thread_fd);
                if(fd != -1){
                        register_winch_irq(thread_fd, fd, thread, device_data);
diff --git a/arch/um/drivers/cow.h b/arch/um/drivers/cow.h
deleted file mode 100644 (file)
index 662ac5c..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef __COW_H__
-#define __COW_H__
-
-#include <asm/types.h>
-
-#if __BYTE_ORDER == __BIG_ENDIAN
-# define ntohll(x) (x)
-# define htonll(x) (x)
-#elif __BYTE_ORDER == __LITTLE_ENDIAN
-# define ntohll(x)  bswap_64(x)
-# define htonll(x)  bswap_64(x)
-#else
-#error "__BYTE_ORDER not defined"
-#endif
-
-extern int init_cow_file(int fd, char *cow_file, char *backing_file, 
-                        int sectorsize, int *bitmap_offset_out, 
-                        unsigned long *bitmap_len_out, int *data_offset_out);
-
-extern int file_reader(__u64 offset, char *buf, int len, void *arg);
-extern int read_cow_header(int (*reader)(__u64, char *, int, void *), 
-                          void *arg, __u32 *magic_out, 
-                          char **backing_file_out, time_t *mtime_out, 
-                          __u64 *size_out, int *sectorsize_out, 
-                          int *bitmap_offset_out);
-
-extern int write_cow_header(char *cow_file, int fd, char *backing_file, 
-                           int sectorsize, long long *size);
-
-extern void cow_sizes(__u64 size, int sectorsize, int bitmap_offset, 
-                     unsigned long *bitmap_len_out, int *data_offset_out);
-
-#endif
-
-/*
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff --git a/arch/um/drivers/cow_kern.c b/arch/um/drivers/cow_kern.c
deleted file mode 100644 (file)
index 374ad52..0000000
+++ /dev/null
@@ -1,628 +0,0 @@
-#define COW_MAJOR 60
-#define MAJOR_NR COW_MAJOR
-
-#include <linux/stddef.h>
-#include <linux/kernel.h>
-#include <linux/ctype.h>
-#include <linux/stat.h>
-#include <linux/vmalloc.h>
-#include <linux/blkdev.h>
-#include <linux/blk.h>
-#include <linux/fs.h>
-#include <linux/genhd.h>
-#include <linux/devfs_fs.h>
-#include <asm/uaccess.h>
-#include "2_5compat.h"
-#include "cow.h"
-#include "ubd_user.h"
-
-#define COW_SHIFT 4
-
-struct cow {
-       int count;
-       char *cow_path;
-       dev_t cow_dev;
-       struct block_device *cow_bdev;
-       char *backing_path;
-       dev_t backing_dev;
-       struct block_device *backing_bdev;
-       int sectorsize;
-       unsigned long *bitmap;
-       unsigned long bitmap_len;
-       int bitmap_offset;
-       int data_offset;
-       devfs_handle_t devfs;
-       struct semaphore sem;
-       struct semaphore io_sem;
-       atomic_t working;
-       spinlock_t io_lock;
-       struct buffer_head *bh;
-       struct buffer_head *bhtail;
-       void *end_io;
-};
-
-#define DEFAULT_COW { \
-       .count                  = 0, \
-       .cow_path               = NULL, \
-       .cow_dev                = 0, \
-       .backing_path           = NULL, \
-       .backing_dev            = 0, \
-        .bitmap                        = NULL, \
-       .bitmap_len             = 0, \
-       .bitmap_offset          = 0, \
-        .data_offset           = 0, \
-       .devfs                  = NULL, \
-       .working                = ATOMIC_INIT(0), \
-       .io_lock                = SPIN_LOCK_UNLOCKED, \
-}
-
-#define MAX_DEV (8)
-#define MAX_MINOR (MAX_DEV << COW_SHIFT)
-
-struct cow cow_dev[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_COW };
-
-/* Not modified by this driver */
-static int blk_sizes[MAX_MINOR] = { [ 0 ... MAX_MINOR - 1 ] = BLOCK_SIZE };
-static int hardsect_sizes[MAX_MINOR] = { [ 0 ... MAX_MINOR - 1 ] = 512 };
-
-/* Protected by cow_lock */
-static int sizes[MAX_MINOR] = { [ 0 ... MAX_MINOR - 1 ] = 0 };
-
-static struct hd_struct        cow_part[MAX_MINOR] =
-       { [ 0 ... MAX_MINOR - 1 ] = { 0, 0, 0 } };
-
-/* Protected by io_request_lock */
-static request_queue_t *cow_queue;
-
-static int cow_open(struct inode *inode, struct file *filp);
-static int cow_release(struct inode * inode, struct file * file);
-static int cow_ioctl(struct inode * inode, struct file * file,
-                    unsigned int cmd, unsigned long arg);
-static int cow_revalidate(kdev_t rdev);
-
-static struct block_device_operations cow_blops = {
-       .open           = cow_open,
-       .release        = cow_release,
-       .ioctl          = cow_ioctl,
-       .revalidate     = cow_revalidate,
-};
-
-/* Initialized in an initcall, and unchanged thereafter */
-devfs_handle_t cow_dir_handle;
-
-#define INIT_GENDISK(maj, name, parts, shift, bsizes, max, blops) \
-{ \
-       .major          = maj, \
-       .major_name     = name, \
-       .minor_shift    = shift, \
-       .max_p          = 1 << shift, \
-       .part           = parts, \
-       .sizes          = bsizes, \
-       .nr_real        = max, \
-       .real_devices   = NULL, \
-       .next           = NULL, \
-       .fops           = blops, \
-       .de_arr         = NULL, \
-       .flags          = 0 \
-}
-
-static spinlock_t cow_lock = SPIN_LOCK_UNLOCKED;
-
-static struct gendisk cow_gendisk = INIT_GENDISK(MAJOR_NR, "cow", cow_part,
-                                                COW_SHIFT, sizes, MAX_DEV, 
-                                                &cow_blops);
-
-static int cow_add(int n)
-{
-       struct cow *dev = &cow_dev[n];
-       char name[sizeof("nnnnnn\0")];
-       int err = -ENODEV;
-
-       if(dev->cow_path == NULL)
-               goto out;
-
-       sprintf(name, "%d", n);
-       dev->devfs = devfs_register(cow_dir_handle, name, DEVFS_FL_REMOVABLE,
-                                   MAJOR_NR, n << COW_SHIFT, S_IFBLK | 
-                                   S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP,
-                                   &cow_blops, NULL);
-
-       init_MUTEX_LOCKED(&dev->sem);
-       init_MUTEX(&dev->io_sem);
-
-       return(0);
-
-out:
-       return(err);
-}
-
-/*
-* Add buffer_head to back of pending list
-*/
-static void cow_add_bh(struct cow *cow, struct buffer_head *bh)
-{
-       unsigned long flags;
-
-       spin_lock_irqsave(&cow->io_lock, flags);
-       if(cow->bhtail != NULL){
-               cow->bhtail->b_reqnext = bh;
-               cow->bhtail = bh;
-       }
-       else {
-               cow->bh = bh;
-               cow->bhtail = bh;
-       }
-       spin_unlock_irqrestore(&cow->io_lock, flags);
-}
-
-/*
-* Grab first pending buffer
-*/
-static struct buffer_head *cow_get_bh(struct cow *cow)
-{
-       struct buffer_head *bh;
-
-       spin_lock_irq(&cow->io_lock);
-       bh = cow->bh;
-       if(bh != NULL){
-               if(bh == cow->bhtail)
-                       cow->bhtail = NULL;
-               cow->bh = bh->b_reqnext;
-               bh->b_reqnext = NULL;
-       }
-       spin_unlock_irq(&cow->io_lock);
-
-       return(bh);
-}
-
-static void cow_handle_bh(struct cow *cow, struct buffer_head *bh, 
-                         struct buffer_head **cow_bh, int ncow_bh)
-{
-       int i;
-
-       if(ncow_bh > 0)
-               ll_rw_block(WRITE, ncow_bh, cow_bh);
-
-       for(i = 0; i < ncow_bh ; i++){
-               wait_on_buffer(cow_bh[i]);
-               brelse(cow_bh[i]);
-       }
-
-       ll_rw_block(WRITE, 1, &bh);
-       brelse(bh);
-}
-
-static struct buffer_head *cow_new_bh(struct cow *dev, int sector)
-{
-       struct buffer_head *bh;
-
-       sector = (dev->bitmap_offset + sector / 8) / dev->sectorsize;
-       bh = getblk(dev->cow_dev, sector, dev->sectorsize);
-       memcpy(bh->b_data, dev->bitmap + sector / (8 * sizeof(dev->bitmap[0])),
-              dev->sectorsize);
-       return(bh);
-}
-
-/* Copied from loop.c, needed to avoid deadlocking in make_request. */
-
-static int cow_thread(void *data)
-{
-       struct cow *dev = data;
-       struct buffer_head *bh;
-
-       daemonize();
-       exit_files(current);
-
-       sprintf(current->comm, "cow%d", dev - cow_dev);
-
-       spin_lock_irq(&current->sigmask_lock);
-       sigfillset(&current->blocked);
-       flush_signals(current);
-       spin_unlock_irq(&current->sigmask_lock);
-
-       atomic_inc(&dev->working);
-
-       current->policy = SCHED_OTHER;
-       current->nice = -20;
-
-       current->flags |= PF_NOIO;
-
-       /*
-        * up sem, we are running
-        */
-       up(&dev->sem);
-
-       for(;;){
-               int start, len, nbh, i, update_bitmap = 0;
-               struct buffer_head *cow_bh[2];
-
-               down_interruptible(&dev->io_sem);
-               /*
-                * could be upped because of tear-down, not because of
-                * pending work
-                */
-               if(!atomic_read(&dev->working))
-                       break;
-
-               bh = cow_get_bh(dev);
-               if(bh == NULL){
-                       printk(KERN_ERR "cow: missing bh\n");
-                       continue;
-               }
-
-               start = bh->b_blocknr * bh->b_size / dev->sectorsize;
-               len = bh->b_size / dev->sectorsize;
-               for(i = 0; i < len ; i++){
-                       if(ubd_test_bit(start +ni, 
-                                       (unsigned char *) dev->bitmap))
-                               continue;
-
-                       update_bitmap = 1;
-                       ubd_set_bit(start + i, (unsigned char *) dev->bitmap);
-               }
-
-               cow_bh[0] = NULL;
-               cow_bh[1] = NULL;
-               nbh = 0;
-               if(update_bitmap){
-                       cow_bh[0] = cow_new_bh(dev, start);
-                       nbh++;
-                       if(start / dev->sectorsize != 
-                          (start + len) / dev->sectorsize){
-                               cow_bh[1] = cow_new_bh(dev, start + len);
-                               nbh++;
-                       }
-               }
-               
-               bh->b_dev = dev->cow_dev;
-               bh->b_blocknr += dev->data_offset / dev->sectorsize;
-
-               cow_handle_bh(dev, bh, cow_bh, nbh);
-
-               /*
-                * upped both for pending work and tear-down, lo_pending
-                * will hit zero then
-                */
-               if(atomic_dec_and_test(&dev->working))
-                       break;
-       }
-
-       up(&dev->sem);
-       return(0);
-}
-
-static int cow_make_request(request_queue_t *q, int rw, struct buffer_head *bh)
-{
-       struct cow *dev;
-       int n, minor;
-
-       minor = MINOR(bh->b_rdev);
-       n = minor >> COW_SHIFT;
-       dev = &cow_dev[n];
-
-       dev->end_io = NULL;
-       if(ubd_test_bit(bh->b_rsector, (unsigned char *) dev->bitmap)){
-               bh->b_rdev = dev->cow_dev;
-               bh->b_rsector += dev->data_offset / dev->sectorsize;
-       }
-       else if(rw == WRITE){
-               bh->b_dev = dev->cow_dev;
-               bh->b_blocknr += dev->data_offset / dev->sectorsize;
-
-               cow_add_bh(dev, bh);
-               up(&dev->io_sem);
-               return(0);
-       }
-       else {
-               bh->b_rdev = dev->backing_dev;
-       }
-
-       return(1);
-}
-
-int cow_init(void)
-{
-       int i;
-
-       cow_dir_handle = devfs_mk_dir (NULL, "cow", NULL);
-       if (devfs_register_blkdev(MAJOR_NR, "cow", &cow_blops)) {
-               printk(KERN_ERR "cow: unable to get major %d\n", MAJOR_NR);
-               return -1;
-       }
-       read_ahead[MAJOR_NR] = 8;               /* 8 sector (4kB) read-ahead */
-       blksize_size[MAJOR_NR] = blk_sizes;
-       blk_size[MAJOR_NR] = sizes;
-       INIT_HARDSECT(hardsect_size, MAJOR_NR, hardsect_sizes);
-
-       cow_queue = BLK_DEFAULT_QUEUE(MAJOR_NR);
-       blk_init_queue(cow_queue, NULL);
-       INIT_ELV(cow_queue, &cow_queue->elevator);
-       blk_queue_make_request(cow_queue, cow_make_request);
-
-       add_gendisk(&cow_gendisk);
-
-       for(i=0;i<MAX_DEV;i++) 
-               cow_add(i);
-
-       return(0);
-}
-
-__initcall(cow_init);
-
-static int reader(__u64 start, char *buf, int count, void *arg)
-{
-       dev_t dev = *((dev_t *) arg);
-       struct buffer_head *bh;
-       __u64 block;
-       int cur, offset, left, n, blocksize = get_hardsect_size(dev);
-
-       if(blocksize == 0)
-               panic("Zero blocksize");
-
-       block = start / blocksize;
-       offset = start % blocksize;
-       left = count;
-       cur = 0;
-       while(left > 0){
-               n = (left > blocksize) ? blocksize : left;
-
-               bh = bread(dev, block, (n < 512) ? 512 : n);
-               if(bh == NULL)
-                       return(-EIO);
-
-               n -= offset;
-               memcpy(&buf[cur], bh->b_data + offset, n);
-               block++;
-               left -= n;
-               cur += n;
-               offset = 0;
-               brelse(bh);
-       }
-
-       return(count);
-}
-
-static int cow_open(struct inode *inode, struct file *filp)
-{
-       int (*dev_ioctl)(struct inode *, struct file *, unsigned int, 
-                        unsigned long);
-       mm_segment_t fs;
-       struct cow *dev;
-       __u64 size;
-       __u32 magic;
-       time_t mtime;
-       char *backing_file;
-       int n, offset, err = 0;
-
-       n = DEVICE_NR(inode->i_rdev);
-       if(n >= MAX_DEV)
-               return(-ENODEV);
-       dev = &cow_dev[n];
-       offset = n << COW_SHIFT;
-
-       spin_lock(&cow_lock);
-
-       if(dev->count == 0){
-               dev->cow_dev = name_to_kdev_t(dev->cow_path);
-               if(dev->cow_dev == 0){
-                       printk(KERN_ERR "cow_open - name_to_kdev_t(\"%s\") "
-                              "failed\n", dev->cow_path);
-                       err = -ENODEV;
-               }
-
-               dev->backing_dev = name_to_kdev_t(dev->backing_path);
-               if(dev->backing_dev == 0){
-                       printk(KERN_ERR "cow_open - name_to_kdev_t(\"%s\") "
-                              "failed\n", dev->backing_path);
-                       err = -ENODEV;
-               }
-
-               if(err) 
-                       goto out;
-
-               dev->cow_bdev = bdget(dev->cow_dev);
-               if(dev->cow_bdev == NULL){
-                       printk(KERN_ERR "cow_open - bdget(\"%s\") failed\n", 
-                              dev->cow_path);
-                       err = -ENOMEM;
-               }
-               dev->backing_bdev = bdget(dev->backing_dev);
-               if(dev->backing_bdev == NULL){
-                       printk(KERN_ERR "cow_open - bdget(\"%s\") failed\n", 
-                              dev->backing_path);
-                       err = -ENOMEM;
-               }
-
-               if(err) 
-                       goto out;
-
-               err = blkdev_get(dev->cow_bdev, FMODE_READ|FMODE_WRITE, 0, 
-                                BDEV_RAW);
-               if(err){
-                       printk("cow_open - blkdev_get of COW device failed, "
-                              "error = %d\n", err);
-                       goto out;
-               }
-               
-               err = blkdev_get(dev->backing_bdev, FMODE_READ, 0, BDEV_RAW);
-               if(err){
-                       printk("cow_open - blkdev_get of backing device "
-                              "failed, error = %d\n", err);
-                       goto out;
-               }
-               
-               err = read_cow_header(reader, &dev->cow_dev, &magic, 
-                                     &backing_file, &mtime, &size,
-                                     &dev->sectorsize, &dev->bitmap_offset);
-               if(err){
-                       printk(KERN_ERR "cow_open - read_cow_header failed, "
-                              "err = %d\n", err);
-                       goto out;
-               }
-
-               cow_sizes(size, dev->sectorsize, dev->bitmap_offset, 
-                         &dev->bitmap_len, &dev->data_offset);
-               dev->bitmap = (void *) vmalloc(dev->bitmap_len);
-               if(dev->bitmap == NULL){
-                       err = -ENOMEM;
-                       printk(KERN_ERR "Failed to vmalloc COW bitmap\n");
-                       goto out;
-               }
-               flush_tlb_kernel_vm();
-               
-               err = reader(dev->bitmap_offset, (char *) dev->bitmap, 
-                            dev->bitmap_len, &dev->cow_dev);
-               if(err < 0){
-                       printk(KERN_ERR "Failed to read COW bitmap\n");
-                       vfree(dev->bitmap);
-                       goto out;
-               }
-
-               dev_ioctl = dev->backing_bdev->bd_op->ioctl;
-               fs = get_fs();
-               set_fs(KERNEL_DS);
-               err = (*dev_ioctl)(inode, filp, BLKGETSIZE, 
-                                  (unsigned long) &sizes[offset]);
-               set_fs(fs);
-               if(err){
-                       printk(KERN_ERR "cow_open - BLKGETSIZE failed, "
-                              "error = %d\n", err);
-                       goto out;
-               }
-
-               kernel_thread(cow_thread, dev, 
-                             CLONE_FS | CLONE_FILES | CLONE_SIGHAND);
-               down(&dev->sem);
-       }
-       dev->count++;
-out:
-       spin_unlock(&cow_lock);
-       return(err);
-}
-
-static int cow_release(struct inode * inode, struct file * file)
-{
-       struct cow *dev;
-       int n, err;
-
-       n = DEVICE_NR(inode->i_rdev);
-       if(n >= MAX_DEV)
-               return(-ENODEV);
-       dev = &cow_dev[n];
-
-       spin_lock(&cow_lock);
-
-       if(--dev->count > 0)
-               goto out;
-
-       err = blkdev_put(dev->cow_bdev, BDEV_RAW);
-       if(err)
-               printk("cow_release - blkdev_put of cow device failed, "
-                      "error = %d\n", err);
-       bdput(dev->cow_bdev);
-       dev->cow_bdev = 0;
-
-       err = blkdev_put(dev->backing_bdev, BDEV_RAW);
-       if(err)
-               printk("cow_release - blkdev_put of backing device failed, "
-                      "error = %d\n", err);
-       bdput(dev->backing_bdev);
-       dev->backing_bdev = 0;
-
-out:
-       spin_unlock(&cow_lock);
-       return(0);
-}
-
-static int cow_ioctl(struct inode * inode, struct file * file,
-                    unsigned int cmd, unsigned long arg)
-{
-       struct cow *dev;
-       int (*dev_ioctl)(struct inode *, struct file *, unsigned int, 
-                        unsigned long);
-       int n;
-
-       n = DEVICE_NR(inode->i_rdev);
-       if(n >= MAX_DEV)
-               return(-ENODEV);
-       dev = &cow_dev[n];
-
-       dev_ioctl = dev->backing_bdev->bd_op->ioctl;
-       return((*dev_ioctl)(inode, file, cmd, arg));
-}
-
-static int cow_revalidate(kdev_t rdev)
-{
-       printk(KERN_ERR "Need to implement cow_revalidate\n");
-       return(0);
-}
-
-static int parse_unit(char **ptr)
-{
-       char *str = *ptr, *end;
-       int n = -1;
-
-       if(isdigit(*str)) {
-               n = simple_strtoul(str, &end, 0);
-               if(end == str)
-                       return(-1);
-               *ptr = end;
-       }
-       else if (('a' <= *str) && (*str <= 'h')) {
-               n = *str - 'a';
-               str++;
-               *ptr = str;
-       }
-       return(n);
-}
-
-static int cow_setup(char *str)
-{
-       struct cow *dev;
-       char *cow_name, *backing_name;
-       int unit;
-
-       unit = parse_unit(&str);
-       if(unit < 0){
-               printk(KERN_ERR "cow_setup - Couldn't parse unit number\n");
-               return(1);
-       }
-
-       if(*str != '='){
-               printk(KERN_ERR "cow_setup - Missing '=' after unit "
-                      "number\n");
-               return(1);
-       }
-       str++;
-
-       cow_name = str;
-       backing_name = strchr(str, ',');
-       if(backing_name == NULL){
-               printk(KERN_ERR "cow_setup - missing backing device name\n");
-               return(0);
-       }
-       *backing_name = '\0';
-       backing_name++;
-
-       spin_lock(&cow_lock);
-
-       dev = &cow_dev[unit];
-       dev->cow_path = cow_name;
-       dev->backing_path = backing_name;
-       
-       spin_unlock(&cow_lock);
-       return(0);
-}
-
-__setup("cow", cow_setup);
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff --git a/arch/um/drivers/cow_sys.h b/arch/um/drivers/cow_sys.h
deleted file mode 100644 (file)
index ce251f0..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef __COW_SYS_H__
-#define __COW_SYS_H__
-
-#include "kern_util.h"
-#include "user_util.h"
-#include "os.h"
-#include "user.h"
-
-static inline void *cow_malloc(int size)
-{
-       return(um_kmalloc(size));
-}
-
-static inline void cow_free(void *ptr)
-{
-       kfree(ptr);
-}
-
-#define cow_printf printk
-
-static inline char *cow_strdup(char *str)
-{
-       return(uml_strdup(str));
-}
-
-static inline int cow_seek_file(int fd, __u64 offset)
-{
-       return(os_seek_file(fd, offset));
-}
-
-static inline int cow_file_size(char *file, __u64 *size_out)
-{
-       return(os_file_size(file, size_out));
-}
-
-static inline int cow_write_file(int fd, char *buf, int size)
-{
-       return(os_write_file(fd, buf, size));
-}
-
-#endif
-
-/*
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff --git a/arch/um/drivers/cow_user.c b/arch/um/drivers/cow_user.c
deleted file mode 100644 (file)
index 0cae723..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-#include <stddef.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <byteswap.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/param.h>
-#include <netinet/in.h>
-
-#include "cow.h"
-#include "cow_sys.h"
-
-#define PATH_LEN_V1 256
-
-struct cow_header_v1 {
-       int magic;
-       int version;
-       char backing_file[PATH_LEN_V1];
-       time_t mtime;
-       __u64 size;
-       int sectorsize;
-};
-
-#define PATH_LEN_V2 MAXPATHLEN
-
-struct cow_header_v2 {
-       unsigned long magic;
-       unsigned long version;
-       char backing_file[PATH_LEN_V2];
-       time_t mtime;
-       __u64 size;
-       int sectorsize;
-};
-
-union cow_header {
-       struct cow_header_v1 v1;
-       struct cow_header_v2 v2;
-};
-
-#define COW_MAGIC 0x4f4f4f4d  /* MOOO */
-#define COW_VERSION 2
-
-void cow_sizes(__u64 size, int sectorsize, int bitmap_offset, 
-              unsigned long *bitmap_len_out, int *data_offset_out)
-{
-       *bitmap_len_out = (size + sectorsize - 1) / (8 * sectorsize);
-
-       *data_offset_out = bitmap_offset + *bitmap_len_out;
-       *data_offset_out = (*data_offset_out + sectorsize - 1) / sectorsize;
-       *data_offset_out *= sectorsize;
-}
-
-static int absolutize(char *to, int size, char *from)
-{
-       char save_cwd[256], *slash;
-       int remaining;
-
-       if(getcwd(save_cwd, sizeof(save_cwd)) == NULL) {
-               cow_printf("absolutize : unable to get cwd - errno = %d\n", 
-                          errno);
-               return(-1);
-       }
-       slash = strrchr(from, '/');
-       if(slash != NULL){
-               *slash = '\0';
-               if(chdir(from)){
-                       *slash = '/';
-                       cow_printf("absolutize : Can't cd to '%s' - " 
-                                  "errno = %d\n", from, errno);
-                       return(-1);
-               }
-               *slash = '/';
-               if(getcwd(to, size) == NULL){
-                       cow_printf("absolutize : unable to get cwd of '%s' - "
-                              "errno = %d\n", from, errno);
-                       return(-1);
-               }
-               remaining = size - strlen(to);
-               if(strlen(slash) + 1 > remaining){
-                       cow_printf("absolutize : unable to fit '%s' into %d "
-                              "chars\n", from, size);
-                       return(-1);
-               }
-               strcat(to, slash);
-       }
-       else {
-               if(strlen(save_cwd) + 1 + strlen(from) + 1 > size){
-                       cow_printf("absolutize : unable to fit '%s' into %d "
-                              "chars\n", from, size);
-                       return(-1);
-               }
-               strcpy(to, save_cwd);
-               strcat(to, "/");
-               strcat(to, from);
-       }
-       chdir(save_cwd);
-       return(0);
-}
-
-int write_cow_header(char *cow_file, int fd, char *backing_file, 
-                    int sectorsize, long long *size)
-{
-       struct cow_header_v2 *header;
-       struct stat64 buf;
-       int err;
-
-       err = cow_seek_file(fd, 0);
-       if(err != 0){
-               cow_printf("write_cow_header - lseek failed, errno = %d\n", 
-                          errno);
-               return(-errno);
-       }
-
-       err = -ENOMEM;
-       header = cow_malloc(sizeof(*header));
-       if(header == NULL){
-               cow_printf("Failed to allocate COW V2 header\n");
-               goto out;
-       }
-       header->magic = htonl(COW_MAGIC);
-       header->version = htonl(COW_VERSION);
-
-       err = -EINVAL;
-       if(strlen(backing_file) > sizeof(header->backing_file) - 1){
-               cow_printf("Backing file name \"%s\" is too long - names are "
-                          "limited to %d characters\n", backing_file, 
-                          sizeof(header->backing_file) - 1);
-               goto out_free;
-       }
-
-       if(absolutize(header->backing_file, sizeof(header->backing_file), 
-                     backing_file))
-               goto out_free;
-
-       err = stat64(header->backing_file, &buf);
-       if(err < 0){
-               cow_printf("Stat of backing file '%s' failed, errno = %d\n",
-                          header->backing_file, errno);
-               err = -errno;
-               goto out_free;
-       }
-
-       err = cow_file_size(header->backing_file, size);
-       if(err){
-               cow_printf("Couldn't get size of backing file '%s', "
-                          "errno = %d\n", header->backing_file, -*size);
-               goto out_free;
-       }
-
-       header->mtime = htonl(buf.st_mtime);
-       header->size = htonll(*size);
-       header->sectorsize = htonl(sectorsize);
-
-       err = write(fd, header, sizeof(*header));
-       if(err != sizeof(*header)){
-               cow_printf("Write of header to new COW file '%s' failed, "
-                          "errno = %d\n", cow_file, errno);
-               goto out_free;
-       }
-       err = 0;
- out_free:
-       cow_free(header);
- out:
-       return(err);
-}
-
-int file_reader(__u64 offset, char *buf, int len, void *arg)
-{
-       int fd = *((int *) arg);
-
-       return(pread(fd, buf, len, offset));
-}
-
-int read_cow_header(int (*reader)(__u64, char *, int, void *), void *arg, 
-                   __u32 *magic_out, char **backing_file_out, 
-                   time_t *mtime_out, __u64 *size_out, 
-                   int *sectorsize_out, int *bitmap_offset_out)
-{
-       union cow_header *header;
-       char *file;
-       int err, n;
-       unsigned long version, magic;
-
-       header = cow_malloc(sizeof(*header));
-       if(header == NULL){
-               cow_printf("read_cow_header - Failed to allocate header\n");
-               return(-ENOMEM);
-       }
-       err = -EINVAL;
-       n = (*reader)(0, (char *) header, sizeof(*header), arg);
-       if(n < offsetof(typeof(header->v1), backing_file)){
-               cow_printf("read_cow_header - short header\n");
-               goto out;
-       }
-
-       magic = header->v1.magic;
-       if(magic == COW_MAGIC) {
-               version = header->v1.version;
-       }
-       else if(magic == ntohl(COW_MAGIC)){
-               version = ntohl(header->v1.version);
-       }
-       /* No error printed because the non-COW case comes through here */
-       else goto out;
-
-       *magic_out = COW_MAGIC;
-
-       if(version == 1){
-               if(n < sizeof(header->v1)){
-                       cow_printf("read_cow_header - failed to read V1 "
-                                  "header\n");
-                       goto out;
-               }
-               *mtime_out = header->v1.mtime;
-               *size_out = header->v1.size;
-               *sectorsize_out = header->v1.sectorsize;
-               *bitmap_offset_out = sizeof(header->v1);
-               file = header->v1.backing_file;
-       }
-       else if(version == 2){
-               if(n < sizeof(header->v2)){
-                       cow_printf("read_cow_header - failed to read V2 "
-                                  "header\n");
-                       goto out;
-               }
-               *mtime_out = ntohl(header->v2.mtime);
-               *size_out = ntohll(header->v2.size);
-               *sectorsize_out = ntohl(header->v2.sectorsize);
-               *bitmap_offset_out = sizeof(header->v2);
-               file = header->v2.backing_file;
-       }
-       else {
-               cow_printf("read_cow_header - invalid COW version\n");
-               goto out;
-       }
-       err = -ENOMEM;
-       *backing_file_out = cow_strdup(file);
-       if(*backing_file_out == NULL){
-               cow_printf("read_cow_header - failed to allocate backing "
-                          "file\n");
-               goto out;
-       }
-       err = 0;
- out:
-       cow_free(header);
-       return(err);
-}
-
-int init_cow_file(int fd, char *cow_file, char *backing_file, int sectorsize,
-                 int *bitmap_offset_out, unsigned long *bitmap_len_out, 
-                 int *data_offset_out)
-{
-       __u64 size, offset;
-       char zero = 0;
-       int err;
-
-       err = write_cow_header(cow_file, fd, backing_file, sectorsize, &size);
-       if(err) 
-               goto out;
-       
-       cow_sizes(size, sectorsize, sizeof(struct cow_header_v2), 
-                 bitmap_len_out, data_offset_out);
-       *bitmap_offset_out = sizeof(struct cow_header_v2);
-
-       offset = *data_offset_out + size - sizeof(zero);
-       err = cow_seek_file(fd, offset);
-       if(err != 0){
-               cow_printf("cow bitmap lseek failed : errno = %d\n", errno);
-               goto out;
-       }
-
-       /* does not really matter how much we write it is just to set EOF 
-        * this also sets the entire COW bitmap
-        * to zero without having to allocate it 
-        */
-       err = cow_write_file(fd, &zero, sizeof(zero));
-       if(err != sizeof(zero)){
-               err = -EINVAL;
-               cow_printf("Write of bitmap to new COW file '%s' failed, "
-                          "errno = %d\n", cow_file, errno);
-               goto out;
-       }
-
-       return(0);
-
- out:
-       return(err);
-}
-
-/*
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 8df2d6a..b512783 100644 (file)
@@ -11,7 +11,6 @@
 #include "linux/fs.h"
 #include "linux/sound.h"
 #include "linux/soundcard.h"
-#include "asm/uaccess.h"
 #include "kern_util.h"
 #include "init.h"
 #include "hostaudio.h"
@@ -23,7 +22,7 @@ char *mixer = HOSTAUDIO_DEV_MIXER;
 #ifndef MODULE
 static int set_dsp(char *name, int *add)
 {
-       dsp = name;
+       dsp = uml_strdup(name);
        return(0);
 }
 
@@ -35,7 +34,7 @@ __uml_setup("dsp=", set_dsp,
 
 static int set_mixer(char *name, int *add)
 {
-       mixer = name;
+       mixer = uml_strdup(name);
        return(0);
 }
 
@@ -52,55 +51,23 @@ static ssize_t hostaudio_read(struct file *file, char *buffer, size_t count,
                              loff_t *ppos)
 {
         struct hostaudio_state *state = file->private_data;
-       void *kbuf;
-       int err;
 
 #ifdef DEBUG
         printk("hostaudio: read called, count = %d\n", count);
 #endif
 
-       kbuf = kmalloc(count, GFP_KERNEL);
-       if(kbuf == NULL)
-               return(-ENOMEM);
-
-        err = hostaudio_read_user(state, kbuf, count, ppos);
-       if(err < 0)
-               goto out;
-
-       if(copy_to_user(buffer, kbuf, err))
-               err = -EFAULT;
-
- out:
-       kfree(kbuf);
-       return(err);
+        return(hostaudio_read_user(state, buffer, count, ppos));
 }
 
 static ssize_t hostaudio_write(struct file *file, const char *buffer, 
                               size_t count, loff_t *ppos)
 {
         struct hostaudio_state *state = file->private_data;
-       void *kbuf;
-       int err;
 
 #ifdef DEBUG
         printk("hostaudio: write called, count = %d\n", count);
 #endif
-
-       kbuf = kmalloc(count, GFP_KERNEL);
-       if(kbuf == NULL)
-               return(-ENOMEM);
-
-       err = -EFAULT;
-       if(copy_from_user(kbuf, buffer, count))
-               goto out;
-
-        err = hostaudio_write_user(state, kbuf, count, ppos);
-       if(err < 0)
-               goto out;
-
- out:
-       kfree(kbuf);
-       return(err);
+        return(hostaudio_write_user(state, buffer, count, ppos));
 }
 
 static unsigned int hostaudio_poll(struct file *file, 
@@ -119,43 +86,12 @@ static int hostaudio_ioctl(struct inode *inode, struct file *file,
                           unsigned int cmd, unsigned long arg)
 {
         struct hostaudio_state *state = file->private_data;
-       unsigned long data = 0;
-       int err;
 
 #ifdef DEBUG
         printk("hostaudio: ioctl called, cmd = %u\n", cmd);
 #endif
-       switch(cmd){
-       case SNDCTL_DSP_SPEED:
-       case SNDCTL_DSP_STEREO:
-       case SNDCTL_DSP_GETBLKSIZE:
-       case SNDCTL_DSP_CHANNELS:
-       case SNDCTL_DSP_SUBDIVIDE:
-       case SNDCTL_DSP_SETFRAGMENT:
-               if(get_user(data, (int *) arg))
-                       return(-EFAULT);
-               break;
-       default:
-               break;
-       }
-
-        err = hostaudio_ioctl_user(state, cmd, (unsigned long) &data);
-
-       switch(cmd){
-       case SNDCTL_DSP_SPEED:
-       case SNDCTL_DSP_STEREO:
-       case SNDCTL_DSP_GETBLKSIZE:
-       case SNDCTL_DSP_CHANNELS:
-       case SNDCTL_DSP_SUBDIVIDE:
-       case SNDCTL_DSP_SETFRAGMENT:
-               if(put_user(data, (int *) arg))
-                       return(-EFAULT);
-               break;
-       default:
-               break;
-       }
-
-       return(err);
+
+        return(hostaudio_ioctl_user(state, cmd, arg));
 }
 
 static int hostaudio_open(struct inode *inode, struct file *file)
@@ -289,8 +225,7 @@ MODULE_LICENSE("GPL");
 
 static int __init hostaudio_init_module(void)
 {
-        printk(KERN_INFO "UML Audio Relay (host dsp = %s, host mixer = %s)\n",
-              dsp, mixer);
+        printk(KERN_INFO "UML Audio Relay\n");
 
        module_data.dev_audio = register_sound_dsp(&hostaudio_fops, -1);
         if(module_data.dev_audio < 0){
index cde3ba3..92efc73 100644 (file)
@@ -6,8 +6,8 @@
 #include "linux/sched.h"
 #include "linux/slab.h"
 #include "linux/list.h"
-#include "linux/interrupt.h"
 #include "linux/devfs_fs_kernel.h"
+#include "asm/irq.h"
 #include "asm/uaccess.h"
 #include "chan_kern.h"
 #include "irq_user.h"
 #include "user_util.h"
 #include "kern_util.h"
 #include "os.h"
-#include "irq_kern.h"
 
 #define LINE_BUFSIZE 4096
 
-irqreturn_t line_interrupt(int irq, void *data, struct pt_regs *unused)
+void line_interrupt(int irq, void *data, struct pt_regs *unused)
 {
        struct line *dev = data;
 
        if(dev->count > 0) 
                chan_interrupt(&dev->chan_list, &dev->task, dev->tty, irq, 
                               dev);
-       return IRQ_HANDLED;
 }
 
 void line_timer_cb(void *arg)
@@ -138,22 +136,20 @@ int line_write(struct line *lines, struct tty_struct *tty, int from_user,
        return(len);
 }
 
-irqreturn_t line_write_interrupt(int irq, void *data, struct pt_regs *unused)
+void line_write_interrupt(int irq, void *data, struct pt_regs *unused)
 {
        struct line *dev = data;
        struct tty_struct *tty = dev->tty;
        int err;
 
        err = flush_buffer(dev);
-       if(err == 0) 
-               return(IRQ_NONE);
+       if(err == 0) return;
        else if(err < 0){
                dev->head = dev->buffer;
                dev->tail = dev->buffer;
        }
 
-       if(tty == NULL) 
-               return(IRQ_NONE);
+       if(tty == NULL) return;
 
        if(test_bit(TTY_DO_WRITE_WAKEUP, &tty->flags) &&
           (tty->ldisc.write_wakeup != NULL))
@@ -165,9 +161,9 @@ irqreturn_t line_write_interrupt(int irq, void *data, struct pt_regs *unused)
         * writes.
         */
 
-       if(waitqueue_active(&tty->write_wait))
+       if (waitqueue_active(&tty->write_wait))
                wake_up_interruptible(&tty->write_wait);
-       return(IRQ_HANDLED);
+
 }
 
 int line_write_room(struct tty_struct *tty)
@@ -373,7 +369,7 @@ int line_get_config(char *name, struct line *lines, int num, char *str,
 
        dev = simple_strtoul(name, &end, 0);
        if((*end != '\0') || (end == name)){
-               *error_out = "line_get_config failed to parse device number";
+               *error_out = "line_setup failed to parse device number";
                return(0);
        }
 
@@ -383,15 +379,15 @@ int line_get_config(char *name, struct line *lines, int num, char *str,
        }
 
        line = &lines[dev];
-
        down(&line->sem);
+       
        if(!line->valid)
                CONFIG_CHUNK(str, size, n, "none", 1);
        else if(line->count == 0)
                CONFIG_CHUNK(str, size, n, line->init_str, 1);
        else n = chan_config_string(&line->chan_list, str, size, error_out);
-       up(&line->sem);
 
+       up(&line->sem);
        return(n);
 }
 
@@ -416,8 +412,7 @@ struct tty_driver *line_register_devfs(struct lines *set,
                return NULL;
 
        driver->driver_name = line_driver->name;
-       driver->name = line_driver->device_name;
-       driver->devfs_name = line_driver->devfs_name;
+       driver->name = line_driver->devfs_name;
        driver->major = line_driver->major;
        driver->minor_start = line_driver->minor_start;
        driver->type = line_driver->type;
@@ -437,7 +432,7 @@ struct tty_driver *line_register_devfs(struct lines *set,
 
        for(i = 0; i < nlines; i++){
                if(!lines[i].valid) 
-                       tty_unregister_device(driver, i);
+                       tty_unregister_devfs(driver, i);
        }
 
        mconsole_register_dev(&line_driver->mc);
@@ -470,25 +465,24 @@ struct winch {
        struct line *line;
 };
 
-irqreturn_t winch_interrupt(int irq, void *data, struct pt_regs *unused)
+void winch_interrupt(int irq, void *data, struct pt_regs *unused)
 {
        struct winch *winch = data;
        struct tty_struct *tty;
        int err;
        char c;
 
-       if(winch->fd != -1){
-               err = generic_read(winch->fd, &c, NULL);
-               if(err < 0){
-                       if(err != -EAGAIN){
-                               printk("winch_interrupt : read failed, "
-                                      "errno = %d\n", -err);
-                               printk("fd %d is losing SIGWINCH support\n", 
-                                      winch->tty_fd);
-                               return(IRQ_HANDLED);
-                       }
-                       goto out;
+       err = generic_read(winch->fd, &c, NULL);
+       if(err < 0){
+               if(err != -EAGAIN){
+                       printk("winch_interrupt : read failed, errno = %d\n", 
+                              -err);
+                       printk("fd %d is losing SIGWINCH support\n", 
+                              winch->tty_fd);
+                       free_irq(irq, data);
+                       return;
                }
+               goto out;
        }
        tty = winch->line->tty;
        if(tty != NULL){
@@ -498,9 +492,7 @@ irqreturn_t winch_interrupt(int irq, void *data, struct pt_regs *unused)
                kill_pg(tty->pgrp, SIGWINCH, 1);
        }
  out:
-       if(winch->fd != -1)
-               reactivate_fd(winch->fd, WINCH_IRQ);
-       return(IRQ_HANDLED);
+       reactivate_fd(winch->fd, WINCH_IRQ);
 }
 
 DECLARE_MUTEX(winch_handler_sem);
@@ -537,10 +529,7 @@ static void winch_cleanup(void)
 
        list_for_each(ele, &winch_handlers){
                winch = list_entry(ele, struct winch, list);
-               if(winch->fd != -1){
-                       deactivate_fd(winch->fd, WINCH_IRQ);
-                       close(winch->fd);
-               }
+               close(winch->fd);
                if(winch->pid != -1) 
                        os_kill_process(winch->pid, 1);
        }
index 14947be..b12cb18 100644 (file)
@@ -27,7 +27,6 @@
 #include "init.h"
 #include "os.h"
 #include "umid.h"
-#include "irq_kern.h"
 
 static int do_unlink_socket(struct notifier_block *notifier, 
                            unsigned long what, void *data)
@@ -68,7 +67,7 @@ void mc_work_proc(void *unused)
 
 DECLARE_WORK(mconsole_work, mc_work_proc, NULL);
 
-irqreturn_t mconsole_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+void mconsole_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
        int fd;
        struct mconsole_entry *new;
@@ -89,7 +88,6 @@ irqreturn_t mconsole_interrupt(int irq, void *dev_id, struct pt_regs *regs)
        }
        if(!list_empty(&mc_requests)) schedule_work(&mconsole_work);
        reactivate_fd(fd, MCONSOLE_IRQ);
-       return(IRQ_HANDLED);
 }
 
 void mconsole_version(struct mc_request *req)
@@ -102,34 +100,20 @@ void mconsole_version(struct mc_request *req)
        mconsole_reply(req, version, 0, 0);
 }
 
-void mconsole_log(struct mc_request *req)
-{
-       int len;
-       char *ptr = req->request.data;
-       
-       ptr += strlen("log");
-       while(isspace(*ptr)) ptr++;
-
-       len = ptr - req->request.data;
-       printk("%.*s", len, ptr);
-       mconsole_reply(req, "", 0, 0);
-}
-
 #define UML_MCONSOLE_HELPTEXT \
-"Commands: \n\
-    version - Get kernel version \n\
-    help - Print this message \n\
-    halt - Halt UML \n\
-    reboot - Reboot UML \n\
-    config <dev>=<config> - Add a new device to UML;  \n\
-       same syntax as command line \n\
-    config <dev> - Query the configuration of a device \n\
-    remove <dev> - Remove a device from UML \n\
-    sysrq <letter> - Performs the SysRq action controlled by the letter \n\
-    cad - invoke the Ctl-Alt-Del handler \n\
-    stop - pause the UML; it will do nothing until it receives a 'go' \n\
-    go - continue the UML after a 'stop' \n\
-    log <string> - make UML enter <string> into the kernel log\n\
+"Commands:
+    version - Get kernel version
+    help - Print this message
+    halt - Halt UML
+    reboot - Reboot UML
+    config <dev>=<config> - Add a new device to UML; 
+       same syntax as command line
+    config <dev> - Query the configuration of a device
+    remove <dev> - Remove a device from UML
+    sysrq <letter> - Performs the SysRq action controlled by the letter
+    cad - invoke the Ctl-Alt-Del handler
+    stop - pause the UML; it will do nothing until it receives a 'go'
+    go - continue the UML after a 'stop'
 "
 
 void mconsole_help(struct mc_request *req)
@@ -318,7 +302,7 @@ int mconsole_init(void)
        if(umid_file_name("mconsole", file, sizeof(file))) return(-1);
        snprintf(mconsole_socket_name, sizeof(file), "%s", file);
 
-       sock = create_unix_socket(file, sizeof(file), 1);
+       sock = create_unix_socket(file, sizeof(file));
        if (sock < 0){
                printk("Failed to initialize management console\n");
                return(1);
index 4f8607b..11b09a9 100644 (file)
@@ -28,7 +28,6 @@ static struct mconsole_command commands[] = {
        { "cad", mconsole_cad, 1 },
        { "stop", mconsole_stop, 0 },
        { "go", mconsole_go, 1 },
-       { "log", mconsole_log, 1 },
 };
 
 /* Initialized in mconsole_init, which is an initcall */
@@ -140,7 +139,6 @@ int mconsole_reply(struct mc_request *req, char *str, int err, int more)
                memcpy(reply.data, str, len);
                reply.data[len] = '\0';
                total -= len;
-               str += len;
                reply.len = len + 1;
 
                len = sizeof(reply) + reply.len - sizeof(reply.data);
index 1862691..628d8f8 100644 (file)
@@ -120,10 +120,7 @@ static int __init mmapper_init(void)
        printk(KERN_INFO "Mapper v0.1\n");
 
        v_buf = (char *) find_iomem("mmapper", &mmapper_size);
-       if(mmapper_size == 0){
-               printk(KERN_ERR "mmapper_init - find_iomem failed\n");
-               return(0);
-       }
+       if(mmapper_size == 0) return(0);
 
        p_buf = __pa(v_buf);
 
index e5fc856..d8f7468 100644 (file)
@@ -26,7 +26,6 @@
 #include "mconsole_kern.h"
 #include "init.h"
 #include "irq_user.h"
-#include "irq_kern.h"
 
 static spinlock_t opened_lock = SPIN_LOCK_UNLOCKED;
 LIST_HEAD(opened);
@@ -62,14 +61,14 @@ static int uml_net_rx(struct net_device *dev)
        return pkt_len;
 }
 
-irqreturn_t uml_net_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+void uml_net_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
        struct net_device *dev = dev_id;
        struct uml_net_private *lp = dev->priv;
        int err;
 
        if(!netif_running(dev))
-               return(IRQ_NONE);
+               return;
 
        spin_lock(&lp->lock);
        while((err = uml_net_rx(dev)) > 0) ;
@@ -84,7 +83,6 @@ irqreturn_t uml_net_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 
  out:
        spin_unlock(&lp->lock);
-       return(IRQ_HANDLED);
 }
 
 static int uml_net_open(struct net_device *dev)
@@ -254,6 +252,37 @@ void uml_net_user_timer_expire(unsigned long _conn)
 #endif
 }
 
+/*
+ * default do nothing hard header packet routines for struct net_device init.
+ * real ethernet transports will overwrite with real routines.
+ */
+static int uml_net_hard_header(struct sk_buff *skb, struct net_device *dev,
+                 unsigned short type, void *daddr, void *saddr, unsigned len)
+{
+       return(0); /* no change */
+}
+
+static int uml_net_rebuild_header(struct sk_buff *skb)
+{
+       return(0); /* ignore */ 
+}
+
+static int uml_net_header_cache(struct neighbour *neigh, struct hh_cache *hh)
+{
+       return(-1); /* fail */
+}
+
+static void uml_net_header_cache_update(struct hh_cache *hh,
+                 struct net_device *dev, unsigned char * haddr)
+{
+       /* ignore */
+}
+
+static int uml_net_header_parse(struct sk_buff *skb, unsigned char *haddr)
+{
+       return(0); /* nothing */
+}
+
 static spinlock_t devices_lock = SPIN_LOCK_UNLOCKED;
 static struct list_head devices = LIST_HEAD_INIT(devices);
 
@@ -263,7 +292,7 @@ static int eth_configure(int n, void *init, char *mac,
        struct uml_net *device;
        struct net_device *dev;
        struct uml_net_private *lp;
-       int save, err, size;
+       int err, size;
 
        size = transport->private_size + sizeof(struct uml_net_private) + 
                sizeof(((struct uml_net_private *) 0)->user);
@@ -305,6 +334,12 @@ static int eth_configure(int n, void *init, char *mac,
        snprintf(dev->name, sizeof(dev->name), "eth%d", n);
        device->dev = dev;
 
+        dev->hard_header = uml_net_hard_header;
+        dev->rebuild_header = uml_net_rebuild_header;
+        dev->hard_header_cache = uml_net_header_cache;
+        dev->header_cache_update= uml_net_header_cache_update;
+        dev->hard_header_parse = uml_net_header_parse;
+
        (*transport->kern->init)(dev, init);
 
        dev->mtu = transport->user->max_packet;
@@ -327,29 +362,21 @@ static int eth_configure(int n, void *init, char *mac,
                return 1;
        lp = dev->priv;
 
-       /* lp.user is the first four bytes of the transport data, which
-        * has already been initialized.  This structure assignment will
-        * overwrite that, so we make sure that .user gets overwritten with
-        * what it already has.
-        */
-       save = lp->user[0];
-       *lp = ((struct uml_net_private) 
-               { .list                 = LIST_HEAD_INIT(lp->list),
-                 .lock                 = SPIN_LOCK_UNLOCKED,
-                 .dev                  = dev,
-                 .fd                   = -1,
-                 .mac                  = { 0xfe, 0xfd, 0x0, 0x0, 0x0, 0x0},
-                 .have_mac             = device->have_mac,
-                 .protocol             = transport->kern->protocol,
-                 .open                 = transport->user->open,
-                 .close                = transport->user->close,
-                 .remove               = transport->user->remove,
-                 .read                 = transport->kern->read,
-                 .write                = transport->kern->write,
-                 .add_address          = transport->user->add_address,
-                 .delete_address       = transport->user->delete_address,
-                 .set_mtu              = transport->user->set_mtu,
-                 .user                 = { save } });
+       INIT_LIST_HEAD(&lp->list);
+       spin_lock_init(&lp->lock);
+       lp->dev = dev;
+       lp->fd = -1;
+       lp->mac = { 0xfe, 0xfd, 0x0, 0x0, 0x0, 0x0 };
+       lp->have_mac = device->have_mac;
+       lp->protocol = transport->kern->protocol;
+       lp->open = transport->user->open;
+       lp->close = transport->user->close;
+       lp->remove = transport->user->remove;
+       lp->read = transport->kern->read;
+       lp->write = transport->kern->write;
+       lp->add_address = transport->user->add_address;
+       lp->delete_address = transport->user->delete_address;
+       lp->set_mtu = transport->user->set_mtu;
 
        init_timer(&lp->tl);
        lp->tl.function = uml_net_user_timer_expire;
@@ -582,8 +609,7 @@ static int net_remove(char *str)
        unregister_netdev(dev);
 
        list_del(&device->list);
-       kfree(device);
-       free_netdev(dev);
+       free_netdev(device);
        return(0);
 }
 
index 6bde4a8..3c44630 100644 (file)
@@ -6,7 +6,6 @@
 #include "linux/list.h"
 #include "linux/sched.h"
 #include "linux/slab.h"
-#include "linux/interrupt.h"
 #include "linux/irq.h"
 #include "linux/spinlock.h"
 #include "linux/errno.h"
@@ -15,7 +14,6 @@
 #include "kern_util.h"
 #include "kern.h"
 #include "irq_user.h"
-#include "irq_kern.h"
 #include "port.h"
 #include "init.h"
 #include "os.h"
@@ -46,7 +44,7 @@ struct connection {
        struct port_list *port;
 };
 
-static irqreturn_t pipe_interrupt(int irq, void *data, struct pt_regs *regs)
+static void pipe_interrupt(int irq, void *data, struct pt_regs *regs)
 {
        struct connection *conn = data;
        int fd;
@@ -54,7 +52,7 @@ static irqreturn_t pipe_interrupt(int irq, void *data, struct pt_regs *regs)
        fd = os_rcv_fd(conn->socket[0], &conn->helper_pid);
        if(fd < 0){
                if(fd == -EAGAIN)
-                       return(IRQ_NONE);
+                       return;
 
                printk(KERN_ERR "pipe_interrupt : os_rcv_fd returned %d\n", 
                       -fd);
@@ -67,7 +65,6 @@ static irqreturn_t pipe_interrupt(int irq, void *data, struct pt_regs *regs)
        list_add(&conn->list, &conn->port->connections);
 
        up(&conn->port->sem);
-       return(IRQ_HANDLED);
 }
 
 static int port_accept(struct port_list *port)
@@ -141,13 +138,12 @@ void port_work_proc(void *unused)
 
 DECLARE_WORK(port_work, port_work_proc, NULL);
 
-static irqreturn_t port_interrupt(int irq, void *data, struct pt_regs *regs)
+static void port_interrupt(int irq, void *data, struct pt_regs *regs)
 {
        struct port_list *port = data;
 
        port->has_connection = 1;
        schedule_work(&port_work);
-       return(IRQ_HANDLED);
 } 
 
 void *port_data(int port_num)
index ebb9fda..826a77c 100644 (file)
@@ -10,7 +10,6 @@
 #include "linux/major.h"
 #include "linux/mm.h"
 #include "linux/init.h"
-#include "linux/console.h"
 #include "asm/termbits.h"
 #include "asm/irq.h"
 #include "line.h"
@@ -54,9 +53,8 @@ static int ssl_remove(char *str);
 
 static struct line_driver driver = {
        .name                   = "UML serial line",
-       .device_name            = "ttS",
-       .devfs_name             = "tts/",
-       .major                  = TTY_MAJOR,
+       .devfs_name             = "tts/%d",
+       .major                  = TTYAUX_MAJOR,
        .minor_start            = 64,
        .type                   = TTY_DRIVER_TYPE_SERIAL,
        .subtype                = 0,
@@ -151,8 +149,6 @@ static int ssl_ioctl(struct tty_struct *tty, struct file * file,
        case TCSETSW:
        case TCGETA:
        case TIOCMGET:
-       case TCSBRK:
-       case TCSBRKP:
                ret = -ENOIOCTLCMD;
                break;
        default:
@@ -216,40 +212,6 @@ static struct tty_operations ssl_ops = {
  */
 static int ssl_init_done = 0;
 
-extern int tty_init(void);
-
-static void ssl_console_write(struct console *c, const char *string, 
-                             unsigned len)
-{
-       struct line *line = &serial_lines[c->index];
-
-       if(ssl_init_done)
-               down(&line->sem);
-       console_write_chan(&line->chan_list, string, len);
-       if(ssl_init_done)
-               up(&line->sem);
-}
-
-static struct tty_driver *ssl_console_device(struct console *c, int *index)
-{
-       *index = c->index;
-       return ssl_driver;
-}
-
-static int ssl_console_setup(struct console *co, char *options)
-{
-       return(0);
-}
-
-static struct console ssl_cons = {
-       name:           "ttyS",
-       write:          ssl_console_write,
-       device:         ssl_console_device,
-       setup:          ssl_console_setup,
-       flags:          CON_PRINTBUFFER,
-       index:          -1,
-};
-
 int ssl_init(void)
 {
        char *new_title;
@@ -257,8 +219,6 @@ int ssl_init(void)
        printk(KERN_INFO "Initializing software serial port version %d\n", 
               ssl_version);
 
-       tty_init();
-
        ssl_driver = line_register_devfs(&lines, &driver, &ssl_ops,
                serial_lines, sizeof(serial_lines)/sizeof(serial_lines[0]));
 
@@ -267,7 +227,6 @@ int ssl_init(void)
        new_title = add_xterm_umid(opts.xterm_title);
        if(new_title != NULL) opts.xterm_title = new_title;
 
-       register_console(&ssl_cons);
        ssl_init_done = 1;
        return(0);
 }
index 9fef3c3..3ae795e 100644 (file)
@@ -83,8 +83,7 @@ static int con_remove(char *str);
 
 static struct line_driver driver = {
        .name                   = "UML console",
-       .device_name            = "tty",
-       .devfs_name             = "vc/",
+       .devfs_name             = "vc/%d",
        .major                  = TTY_MAJOR,
        .minor_start            = 0,
        .type                   = TTY_DRIVER_TYPE_CONSOLE,
@@ -160,28 +159,14 @@ static int chars_in_buffer(struct tty_struct *tty)
 
 static int con_init_done = 0;
 
-static struct tty_operations console_ops = {
-       .open                   = con_open,
-       .close                  = con_close,
-       .write                  = con_write,
-       .chars_in_buffer        = chars_in_buffer,
-       .set_termios            = set_termios,
-       .write_room             = line_write_room,
-};
-
-extern int tty_init(void);
-
 int stdio_init(void)
 {
        char *new_title;
 
        printk(KERN_INFO "Initializing stdio console driver\n");
 
-       tty_init();
-
        console_driver = line_register_devfs(&console_lines, &driver,
-                                            &console_ops, vts,
-                                            sizeof(vts)/sizeof(vts[0]));
+                               &console_ops, vts, sizeof(vts)/sizeof(vts[0]));
 
        lines_init(vts, sizeof(vts)/sizeof(vts[0]));
 
@@ -203,6 +188,15 @@ static void console_write(struct console *console, const char *string,
        if(con_init_done) up(&vts[console->index].sem);
 }
 
+static struct tty_operations console_ops = {
+       .open                   = con_open,
+       .close                  = con_close,
+       .write                  = con_write,
+       .chars_in_buffer        = chars_in_buffer,
+       .set_termios            = set_termios,
+       .write_room             = line_write_room,
+};
+
 static struct tty_driver *console_device(struct console *c, int *index)
 {
        *index = c->index;
@@ -218,20 +212,17 @@ static struct console stdiocons = INIT_CONSOLE("tty", console_write,
                                               console_device, console_setup,
                                               CON_PRINTBUFFER);
 
-static int __init stdio_console_init(void)
+static void __init stdio_console_init(void)
 {
        INIT_LIST_HEAD(&vts[0].chan_list);
        list_add(&init_console_chan.list, &vts[0].chan_list);
        register_console(&stdiocons);
-       return(0);
 }
-
 console_initcall(stdio_console_init);
 
 static int console_chan_setup(char *str)
 {
-       if (0 != line_setup(vts, sizeof(vts)/sizeof(vts[0]), str, 1))
-               return 0;
+       line_setup(vts, sizeof(vts)/sizeof(vts[0]), str, 1);
        return(1);
 }
 
index 4dd81d4..0c3890b 100644 (file)
@@ -8,13 +8,6 @@
  * old style ubd by setting UBD_SHIFT to 0
  * 2002-09-27...2002-10-18 massive tinkering for 2.5
  * partitions have changed in 2.5
- * 2003-01-29 more tinkering for 2.5.59-1
- * This should now address the sysfs problems and has
- * the symlink for devfs to allow for booting with
- * the common /dev/ubd/discX/... names rather than
- * only /dev/ubdN/discN this version also has lots of
- * clean ups preparing for ubd-many.
- * James McMechan
  */
 
 #define MAJOR_NR UBD_MAJOR
@@ -47,7 +40,6 @@
 #include "mconsole_kern.h"
 #include "init.h"
 #include "irq_user.h"
-#include "irq_kern.h"
 #include "ubd_user.h"
 #include "2_5compat.h"
 #include "os.h"
@@ -75,7 +67,7 @@ static struct block_device_operations ubd_blops = {
 static request_queue_t *ubd_queue;
 
 /* Protected by ubd_lock */
-static int fake_major = MAJOR_NR;
+static int fake_major = 0;
 
 static struct gendisk *ubd_gendisk[MAX_DEV];
 static struct gendisk *fake_gendisk[MAX_DEV];
@@ -104,12 +96,12 @@ struct cow {
 
 struct ubd {
        char *file;
+       int is_dir;
        int count;
        int fd;
        __u64 size;
        struct openflags boot_openflags;
        struct openflags openflags;
-       int no_cow;
        struct cow cow;
 };
 
@@ -123,12 +115,12 @@ struct ubd {
 
 #define DEFAULT_UBD { \
        .file =                 NULL, \
+       .is_dir =               0, \
        .count =                0, \
        .fd =                   -1, \
        .size =                 -1, \
        .boot_openflags =       OPEN_FLAGS, \
        .openflags =            OPEN_FLAGS, \
-        .no_cow =               0, \
         .cow =                 DEFAULT_COW, \
 }
 
@@ -136,10 +128,8 @@ struct ubd ubd_dev[MAX_DEV] = { [ 0 ... MAX_DEV - 1 ] = DEFAULT_UBD };
 
 static int ubd0_init(void)
 {
-       struct ubd *dev = &ubd_dev[0];
-
-       if(dev->file == NULL)
-               dev->file = "root_fs";
+       if(ubd_dev[0].file == NULL)
+               ubd_dev[0].file = "root_fs";
        return(0);
 }
 
@@ -206,39 +196,19 @@ __uml_help(fake_ide_setup,
 "    Create ide0 entries that map onto ubd devices.\n\n"
 );
 
-static int parse_unit(char **ptr)
-{
-       char *str = *ptr, *end;
-       int n = -1;
-
-       if(isdigit(*str)) {
-               n = simple_strtoul(str, &end, 0);
-               if(end == str)
-                       return(-1);
-               *ptr = end;
-       }
-       else if (('a' <= *str) && (*str <= 'h')) {
-               n = *str - 'a';
-               str++;
-               *ptr = str;
-       }
-       return(n);
-}
-
 static int ubd_setup_common(char *str, int *index_out)
 {
-       struct ubd *dev;
        struct openflags flags = global_openflags;
        char *backing_file;
        int n, err;
 
        if(index_out) *index_out = -1;
-       n = *str;
+       n = *str++;
        if(n == '='){
+               static int fake_major_allowed = 1;
                char *end;
                int major;
 
-               str++;
                if(!strcmp(str, "sync")){
                        global_openflags.s = 1;
                        return(0);
@@ -250,14 +220,20 @@ static int ubd_setup_common(char *str, int *index_out)
                        return(1);
                }
 
+               if(!fake_major_allowed){
+                       printk(KERN_ERR "Can't assign a fake major twice\n");
+                       return(1);
+               }
+
                err = 1;
                spin_lock(&ubd_lock);
-               if(fake_major != MAJOR_NR){
+               if(!fake_major_allowed){
                        printk(KERN_ERR "Can't assign a fake major twice\n");
                        goto out1;
                }
  
                fake_major = major;
+               fake_major_allowed = 0;
 
                printk(KERN_INFO "Setting extra ubd major number to %d\n",
                       major);
@@ -267,23 +243,25 @@ static int ubd_setup_common(char *str, int *index_out)
                return(err);
        }
 
-       n = parse_unit(&str);
-       if(n < 0){
-               printk(KERN_ERR "ubd_setup : couldn't parse unit number "
-                      "'%s'\n", str);
+       if(n < '0'){
+               printk(KERN_ERR "ubd_setup : index out of range\n"); }
+
+       if((n >= '0') && (n <= '9')) n -= '0';
+       else if((n >= 'a') && (n <= 'z')) n -= 'a';
+       else {
+               printk(KERN_ERR "ubd_setup : device syntax invalid\n");
                return(1);
        }
        if(n >= MAX_DEV){
-               printk(KERN_ERR "ubd_setup : index %d out of range "
-                      "(%d devices)\n", n, MAX_DEV);
+               printk(KERN_ERR "ubd_setup : index out of range "
+                      "(%d devices)\n", MAX_DEV);      
                return(1);
        }
 
        err = 1;
        spin_lock(&ubd_lock);
 
-       dev = &ubd_dev[n];
-       if(dev->file != NULL){
+       if(ubd_dev[n].file != NULL){
                printk(KERN_ERR "ubd_setup : device already configured\n");
                goto out2;
        }
@@ -298,11 +276,6 @@ static int ubd_setup_common(char *str, int *index_out)
                flags.s = 1;
                str++;
        }
-       if (*str == 'd'){
-               dev->no_cow = 1;
-               str++;
-       }
-
        if(*str++ != '='){
                printk(KERN_ERR "ubd_setup : Expected '='\n");
                goto out2;
@@ -311,17 +284,14 @@ static int ubd_setup_common(char *str, int *index_out)
        err = 0;
        backing_file = strchr(str, ',');
        if(backing_file){
-               if(dev->no_cow)
-                       printk(KERN_ERR "Can't specify both 'd' and a "
-                              "cow file\n");
-               else {
-                       *backing_file = '\0';
-                       backing_file++;
-               }
-       }
-       dev->file = str;
-       dev->cow.file = backing_file;
-       dev->boot_openflags = flags;
+               *backing_file = '\0';
+               backing_file++;
+       }
+       ubd_dev[n].file = str;
+       if(ubd_is_dir(ubd_dev[n].file))
+               ubd_dev[n].is_dir = 1;
+       ubd_dev[n].cow.file = backing_file;
+       ubd_dev[n].boot_openflags = flags;
  out2:
        spin_unlock(&ubd_lock);
        return(err);
@@ -351,7 +321,8 @@ __uml_help(ubd_setup,
 static int fakehd_set = 0;
 static int fakehd(char *str)
 {
-       printk(KERN_INFO "fakehd : Changing ubd name to \"hd\".\n");
+       printk(KERN_INFO 
+              "fakehd : Changing ubd name to \"hd\".\n");
        fakehd_set = 1;
        return 1;
 }
@@ -420,10 +391,9 @@ static void ubd_handler(void)
        do_ubd_request(ubd_queue);
 }
 
-static irqreturn_t ubd_intr(int irq, void *dev, struct pt_regs *unused)
+static void ubd_intr(int irq, void *dev, struct pt_regs *unused)
 {
        ubd_handler();
-       return(IRQ_HANDLED);
 }
 
 /* Only changed by ubd_init, which is an initcall. */
@@ -459,18 +429,16 @@ static void ubd_close(struct ubd *dev)
 static int ubd_open_dev(struct ubd *dev)
 {
        struct openflags flags;
-       char **back_ptr;
-       int err, create_cow, *create_ptr;
+       int err, n, create_cow, *create_ptr;
 
-       dev->openflags = dev->boot_openflags;
        create_cow = 0;
        create_ptr = (dev->cow.file != NULL) ? &create_cow : NULL;
-       back_ptr = dev->no_cow ? NULL : &dev->cow.file;
-       dev->fd = open_ubd_file(dev->file, &dev->openflags, back_ptr,
+       dev->fd = open_ubd_file(dev->file, &dev->openflags, &dev->cow.file,
                                &dev->cow.bitmap_offset, &dev->cow.bitmap_len, 
                                &dev->cow.data_offset, create_ptr);
 
        if((dev->fd == -ENOENT) && create_cow){
+               n = dev - ubd_dev;
                dev->fd = create_cow_file(dev->file, dev->cow.file, 
                                          dev->openflags, 1 << 9,
                                          &dev->cow.bitmap_offset, 
@@ -487,10 +455,7 @@ static int ubd_open_dev(struct ubd *dev)
        if(dev->cow.file != NULL){
                err = -ENOMEM;
                dev->cow.bitmap = (void *) vmalloc(dev->cow.bitmap_len);
-               if(dev->cow.bitmap == NULL){
-                       printk(KERN_ERR "Failed to vmalloc COW bitmap\n");
-                       goto error;
-               }
+               if(dev->cow.bitmap == NULL) goto error;
                flush_tlb_kernel_vm();
 
                err = read_cow_bitmap(dev->fd, dev->cow.bitmap, 
@@ -516,31 +481,17 @@ static int ubd_new_disk(int major, u64 size, int unit,
                        
 {
        struct gendisk *disk;
-       char from[sizeof("ubd/nnnnn\0")], to[sizeof("discnnnnn/disc\0")];
-       int err;
 
        disk = alloc_disk(1 << UBD_SHIFT);
-       if(disk == NULL)
-               return(-ENOMEM);
+       if (!disk)
+               return -ENOMEM;
 
        disk->major = major;
        disk->first_minor = unit << UBD_SHIFT;
        disk->fops = &ubd_blops;
        set_capacity(disk, size / 512);
-       if(major == MAJOR_NR){
-               sprintf(disk->disk_name, "ubd%c", 'a' + unit);
-               sprintf(disk->devfs_name, "ubd/disc%d", unit);
-               sprintf(from, "ubd/%d", unit);
-               sprintf(to, "disc%d/disc", unit);
-               err = devfs_mk_symlink(from, to);
-               if(err)
-                       printk("ubd_new_disk failed to make link from %s to "
-                              "%s, error = %d\n", from, to, err);
-       }
-       else {
-               sprintf(disk->disk_name, "ubd_fake%d", unit);
-               sprintf(disk->devfs_name, "ubd_fake/disc%d", unit);
-       }
+       sprintf(disk->disk_name, "ubd");
+       sprintf(disk->devfs_name, "ubd/disc%d", unit);
 
        disk->private_data = &ubd_dev[unit];
        disk->queue = ubd_queue;
@@ -555,7 +506,10 @@ static int ubd_add(int n)
        struct ubd *dev = &ubd_dev[n];
        int err;
 
-       if(dev->file == NULL)
+       if(dev->is_dir)
+               return(-EISDIR);
+
+       if (!dev->file)
                return(-ENODEV);
 
        if (ubd_open_dev(dev))
@@ -569,7 +523,7 @@ static int ubd_add(int n)
        if(err) 
                return(err);
  
-       if(fake_major != MAJOR_NR)
+       if(fake_major)
                ubd_new_disk(fake_major, dev->size, n, 
                             &fake_gendisk[n]);
 
@@ -607,42 +561,42 @@ static int ubd_config(char *str)
        return(err);
 }
 
-static int ubd_get_config(char *name, char *str, int size, char **error_out)
+static int ubd_get_config(char *dev, char *str, int size, char **error_out)
 {
-       struct ubd *dev;
+       struct ubd *ubd;
        char *end;
-       int n, len = 0;
+       int major, n = 0;
 
-       n = simple_strtoul(name, &end, 0);
-       if((*end != '\0') || (end == name)){
-               *error_out = "ubd_get_config : didn't parse device number";
+       major = simple_strtoul(dev, &end, 0);
+       if((*end != '\0') || (end == dev)){
+               *error_out = "ubd_get_config : didn't parse major number";
                return(-1);
        }
 
-       if((n >= MAX_DEV) || (n < 0)){
-               *error_out = "ubd_get_config : device number out of range";
+       if((major >= MAX_DEV) || (major < 0)){
+               *error_out = "ubd_get_config : major number out of range";
                return(-1);
        }
 
-       dev = &ubd_dev[n];
+       ubd = &ubd_dev[major];
        spin_lock(&ubd_lock);
 
-       if(dev->file == NULL){
-               CONFIG_CHUNK(str, size, len, "", 1);
+       if(ubd->file == NULL){
+               CONFIG_CHUNK(str, size, n, "", 1);
                goto out;
        }
 
-       CONFIG_CHUNK(str, size, len, dev->file, 0);
+       CONFIG_CHUNK(str, size, n, ubd->file, 0);
 
-       if(dev->cow.file != NULL){
-               CONFIG_CHUNK(str, size, len, ",", 0);
-               CONFIG_CHUNK(str, size, len, dev->cow.file, 1);
+       if(ubd->cow.file != NULL){
+               CONFIG_CHUNK(str, size, n, ",", 0);
+               CONFIG_CHUNK(str, size, n, ubd->cow.file, 1);
        }
-       else CONFIG_CHUNK(str, size, len, "", 1);
+       else CONFIG_CHUNK(str, size, n, "", 1);
 
  out:
        spin_unlock(&ubd_lock);
-       return(len);
+       return(n);
 }
 
 static int ubd_remove(char *str)
@@ -650,9 +604,11 @@ static int ubd_remove(char *str)
        struct ubd *dev;
        int n, err = -ENODEV;
 
-       n = parse_unit(&str);
+       if(!isdigit(*str))
+               return(err);    /* it should be a number 0-7/a-h */
 
-       if((n < 0) || (n >= MAX_DEV))
+       n = *str - '0';
+       if(n >= MAX_DEV) 
                return(err);
 
        dev = &ubd_dev[n];
@@ -713,7 +669,7 @@ int ubd_init(void)
                
        elevator_init(ubd_queue, &elevator_noop);
 
-       if (fake_major != MAJOR_NR) {
+       if (fake_major != 0) {
                char name[sizeof("ubd_nnn\0")];
 
                snprintf(name, sizeof(name), "ubd_%d", fake_major);
@@ -758,9 +714,15 @@ static int ubd_open(struct inode *inode, struct file *filp)
 {
        struct gendisk *disk = inode->i_bdev->bd_disk;
        struct ubd *dev = disk->private_data;
-       int err = 0;
+       int err = -EISDIR;
+
+       if(dev->is_dir == 1)
+               goto out;
 
+       err = 0;
        if(dev->count == 0){
+               dev->openflags = dev->boot_openflags;
+
                err = ubd_open_dev(dev);
                if(err){
                        printk(KERN_ERR "%s: Can't open \"%s\": errno = %d\n",
@@ -834,6 +796,15 @@ static int prepare_request(struct request *req, struct io_thread_req *io_req)
 
        if(req->rq_status == RQ_INACTIVE) return(1);
 
+       if(dev->is_dir){
+               strcpy(req->buffer, "HOSTFS:");
+               strcat(req->buffer, dev->file);
+               spin_lock(&ubd_io_lock);
+               end_request(req, 1);
+               spin_unlock(&ubd_io_lock);
+               return(1);
+       }
+
        if((rq_data_dir(req) == WRITE) && !dev->openflags.w){
                printk("Write attempted on readonly ubd device %s\n", 
                       disk->disk_name);
index 53c3bf3..93b6f3e 100644 (file)
 #include "user.h"
 #include "ubd_user.h"
 #include "os.h"
-#include "cow.h"
 
 #include <endian.h>
 #include <byteswap.h>
+#if __BYTE_ORDER == __BIG_ENDIAN
+# define ntohll(x) (x)
+# define htonll(x) (x)
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
+# define ntohll(x)  bswap_64(x)
+# define htonll(x)  bswap_64(x)
+#else
+#error "__BYTE_ORDER not defined"
+#endif
+
+#define PATH_LEN_V1 256
+
+struct cow_header_v1 {
+       int magic;
+       int version;
+       char backing_file[PATH_LEN_V1];
+       time_t mtime;
+       __u64 size;
+       int sectorsize;
+};
+
+#define PATH_LEN_V2 MAXPATHLEN
+
+struct cow_header_v2 {
+       unsigned long magic;
+       unsigned long version;
+       char backing_file[PATH_LEN_V2];
+       time_t mtime;
+       __u64 size;
+       int sectorsize;
+};
+
+union cow_header {
+       struct cow_header_v1 v1;
+       struct cow_header_v2 v2;
+};
+
+#define COW_MAGIC 0x4f4f4f4d  /* MOOO */
+#define COW_VERSION 2
+
+static void sizes(__u64 size, int sectorsize, int bitmap_offset, 
+                 unsigned long *bitmap_len_out, int *data_offset_out)
+{
+       *bitmap_len_out = (size + sectorsize - 1) / (8 * sectorsize);
+
+       *data_offset_out = bitmap_offset + *bitmap_len_out;
+       *data_offset_out = (*data_offset_out + sectorsize - 1) / sectorsize;
+       *data_offset_out *= sectorsize;
+}
+
+static int read_cow_header(int fd, int *magic_out, char **backing_file_out, 
+                          time_t *mtime_out, __u64 *size_out, 
+                          int *sectorsize_out, int *bitmap_offset_out)
+{
+       union cow_header *header;
+       char *file;
+       int err, n;
+       unsigned long version, magic;
+
+       header = um_kmalloc(sizeof(*header));
+       if(header == NULL){
+               printk("read_cow_header - Failed to allocate header\n");
+               return(-ENOMEM);
+       }
+       err = -EINVAL;
+       n = read(fd, header, sizeof(*header));
+       if(n < offsetof(typeof(header->v1), backing_file)){
+               printk("read_cow_header - short header\n");
+               goto out;
+       }
+
+       magic = header->v1.magic;
+       if(magic == COW_MAGIC) {
+               version = header->v1.version;
+       }
+       else if(magic == ntohl(COW_MAGIC)){
+               version = ntohl(header->v1.version);
+       }
+       else goto out;
+
+       *magic_out = COW_MAGIC;
+
+       if(version == 1){
+               if(n < sizeof(header->v1)){
+                       printk("read_cow_header - failed to read V1 header\n");
+                       goto out;
+               }
+               *mtime_out = header->v1.mtime;
+               *size_out = header->v1.size;
+               *sectorsize_out = header->v1.sectorsize;
+               *bitmap_offset_out = sizeof(header->v1);
+               file = header->v1.backing_file;
+       }
+       else if(version == 2){
+               if(n < sizeof(header->v2)){
+                       printk("read_cow_header - failed to read V2 header\n");
+                       goto out;
+               }
+               *mtime_out = ntohl(header->v2.mtime);
+               *size_out = ntohll(header->v2.size);
+               *sectorsize_out = ntohl(header->v2.sectorsize);
+               *bitmap_offset_out = sizeof(header->v2);
+               file = header->v2.backing_file;
+       }
+       else {
+               printk("read_cow_header - invalid COW version\n");
+               goto out;
+       }
+       err = -ENOMEM;
+       *backing_file_out = uml_strdup(file);
+       if(*backing_file_out == NULL){
+               printk("read_cow_header - failed to allocate backing file\n");
+               goto out;
+       }
+       err = 0;
+ out:
+       kfree(header);
+       return(err);
+}
 
 static int same_backing_files(char *from_cmdline, char *from_cow, char *cow)
 {
-       struct stat64 buf1, buf2;
+       struct stat buf1, buf2;
 
        if(from_cmdline == NULL) return(1);
        if(!strcmp(from_cmdline, from_cow)) return(1);
 
-       if(stat64(from_cmdline, &buf1) < 0){
+       if(stat(from_cmdline, &buf1) < 0){
                printk("Couldn't stat '%s', errno = %d\n", from_cmdline, 
                       errno);
                return(1);
        }
-       if(stat64(from_cow, &buf2) < 0){
+       if(stat(from_cow, &buf2) < 0){
                printk("Couldn't stat '%s', errno = %d\n", from_cow, errno);
                return(1);
        }
@@ -97,6 +215,118 @@ int read_cow_bitmap(int fd, void *buf, int offset, int len)
        return(0);
 }
 
+static int absolutize(char *to, int size, char *from)
+{
+       char save_cwd[256], *slash;
+       int remaining;
+
+       if(getcwd(save_cwd, sizeof(save_cwd)) == NULL) {
+               printk("absolutize : unable to get cwd - errno = %d\n", errno);
+               return(-1);
+       }
+       slash = strrchr(from, '/');
+       if(slash != NULL){
+               *slash = '\0';
+               if(chdir(from)){
+                       *slash = '/';
+                       printk("absolutize : Can't cd to '%s' - errno = %d\n",
+                              from, errno);
+                       return(-1);
+               }
+               *slash = '/';
+               if(getcwd(to, size) == NULL){
+                       printk("absolutize : unable to get cwd of '%s' - "
+                              "errno = %d\n", from, errno);
+                       return(-1);
+               }
+               remaining = size - strlen(to);
+               if(strlen(slash) + 1 > remaining){
+                       printk("absolutize : unable to fit '%s' into %d "
+                              "chars\n", from, size);
+                       return(-1);
+               }
+               strcat(to, slash);
+       }
+       else {
+               if(strlen(save_cwd) + 1 + strlen(from) + 1 > size){
+                       printk("absolutize : unable to fit '%s' into %d "
+                              "chars\n", from, size);
+                       return(-1);
+               }
+               strcpy(to, save_cwd);
+               strcat(to, "/");
+               strcat(to, from);
+       }
+       chdir(save_cwd);
+       return(0);
+}
+
+static int write_cow_header(char *cow_file, int fd, char *backing_file, 
+                           int sectorsize, long long *size)
+{
+        struct cow_header_v2 *header;
+       struct stat64 buf;
+       int err;
+
+       err = os_seek_file(fd, 0);
+       if(err != 0){
+               printk("write_cow_header - lseek failed, errno = %d\n", errno);
+               return(-errno);
+       }
+
+       err = -ENOMEM;
+       header = um_kmalloc(sizeof(*header));
+       if(header == NULL){
+               printk("Failed to allocate COW V2 header\n");
+               goto out;
+       }
+       header->magic = htonl(COW_MAGIC);
+       header->version = htonl(COW_VERSION);
+
+       err = -EINVAL;
+       if(strlen(backing_file) > sizeof(header->backing_file) - 1){
+               printk("Backing file name \"%s\" is too long - names are "
+                      "limited to %d characters\n", backing_file, 
+                      sizeof(header->backing_file) - 1);
+               goto out_free;
+       }
+
+       if(absolutize(header->backing_file, sizeof(header->backing_file), 
+                     backing_file))
+               goto out_free;
+
+       err = stat64(header->backing_file, &buf);
+       if(err < 0){
+               printk("Stat of backing file '%s' failed, errno = %d\n",
+                      header->backing_file, errno);
+               err = -errno;
+               goto out_free;
+       }
+
+       err = os_file_size(header->backing_file, size);
+       if(err){
+               printk("Couldn't get size of backing file '%s', errno = %d\n",
+                      header->backing_file, -*size);
+               goto out_free;
+       }
+
+       header->mtime = htonl(buf.st_mtime);
+       header->size = htonll(*size);
+       header->sectorsize = htonl(sectorsize);
+
+       err = write(fd, header, sizeof(*header));
+       if(err != sizeof(*header)){
+               printk("Write of header to new COW file '%s' failed, "
+                      "errno = %d\n", cow_file, errno);
+               goto out_free;
+       }
+       err = 0;
+ out_free:
+       kfree(header);
+ out:
+       return(err);
+}
+
 int open_ubd_file(char *file, struct openflags *openflags, 
                  char **backing_file_out, int *bitmap_offset_out, 
                  unsigned long *bitmap_len_out, int *data_offset_out, 
@@ -116,17 +346,10 @@ int open_ubd_file(char *file, struct openflags *openflags,
                 if((fd = os_open_file(file, *openflags, mode)) < 0) 
                        return(fd);
         }
-
-       err = os_lock_file(fd, openflags->w);
-       if(err){
-               printk("Failed to lock '%s', errno = %d\n", file, -err);
-               goto error;
-       }
-       
        if(backing_file_out == NULL) return(fd);
 
-       err = read_cow_header(file_reader, &fd, &magic, &backing_file, &mtime, 
-                             &size, &sectorsize, bitmap_offset_out);
+       err = read_cow_header(fd, &magic, &backing_file, &mtime, &size, 
+                             &sectorsize, bitmap_offset_out);
        if(err && (*backing_file_out != NULL)){
                printk("Failed to read COW header from COW file \"%s\", "
                       "errno = %d\n", file, err);
@@ -153,12 +376,12 @@ int open_ubd_file(char *file, struct openflags *openflags,
                if(err) goto error;
        }
 
-       cow_sizes(size, sectorsize, *bitmap_offset_out, bitmap_len_out, 
-                 data_offset_out);
+       sizes(size, sectorsize, *bitmap_offset_out, bitmap_len_out, 
+             data_offset_out);
 
         return(fd);
  error:
-       os_close_file(fd);
+       close(fd);
        return(err);
 }
 
@@ -166,7 +389,10 @@ int create_cow_file(char *cow_file, char *backing_file, struct openflags flags,
                    int sectorsize, int *bitmap_offset_out, 
                    unsigned long *bitmap_len_out, int *data_offset_out)
 {
-       int err, fd;
+       __u64 blocks;
+       long zero;
+       int err, fd, i;
+       long long size;
 
        flags.c = 1;
        fd = open_ubd_file(cow_file, &flags, NULL, NULL, NULL, NULL, NULL);
@@ -177,12 +403,29 @@ int create_cow_file(char *cow_file, char *backing_file, struct openflags flags,
                goto out;
        }
 
-       err = init_cow_file(fd, cow_file, backing_file, sectorsize, 
-                           bitmap_offset_out, bitmap_len_out, 
-                           data_offset_out);
-       if(!err)
-               return(fd);
-       os_close_file(fd);
+       err = write_cow_header(cow_file, fd, backing_file, sectorsize, &size);
+       if(err) goto out_close;
+
+       blocks = (size + sectorsize - 1) / sectorsize;
+       blocks = (blocks + sizeof(long) * 8 - 1) / (sizeof(long) * 8);
+       zero = 0;
+       for(i = 0; i < blocks; i++){
+               err = write(fd, &zero, sizeof(zero));
+               if(err != sizeof(zero)){
+                       printk("Write of bitmap to new COW file '%s' failed, "
+                              "errno = %d\n", cow_file, errno);
+                       goto out_close;
+               }
+       }
+
+       sizes(size, sectorsize, sizeof(struct cow_header_v2), 
+             bitmap_len_out, data_offset_out);
+       *bitmap_offset_out = sizeof(struct cow_header_v2);
+
+       return(fd);
+
+ out_close:
+       close(fd);
  out:
        return(err);
 }
@@ -205,6 +448,14 @@ int write_ubd_fs(int fd, char *buffer, int len)
        else return(n);
 }
 
+int ubd_is_dir(char *file)
+{
+       struct stat64 buf;
+
+       if(stat64(file, &buf) < 0) return(0);
+       return(S_ISDIR(buf.st_mode));
+}
+
 void do_io(struct io_thread_req *req)
 {
        char *buf;
index ad26b27..59c4ba8 100644 (file)
@@ -108,7 +108,7 @@ int xterm_open(int input, int output, int primary, void *d, char **dev_out)
        }
        close(fd);
 
-       fd = create_unix_socket(file, sizeof(file), 1);
+       fd = create_unix_socket(file, sizeof(file));
        if(fd < 0){
                printk("xterm_open : create_unix_socket failed, errno = %d\n", 
                       -fd);
index f644e71..1b4683f 100644 (file)
@@ -5,12 +5,9 @@
 
 #include "linux/errno.h"
 #include "linux/slab.h"
-#include "linux/signal.h"
-#include "linux/interrupt.h"
 #include "asm/semaphore.h"
 #include "asm/irq.h"
 #include "irq_user.h"
-#include "irq_kern.h"
 #include "kern_util.h"
 #include "os.h"
 #include "xterm.h"
@@ -22,18 +19,17 @@ struct xterm_wait {
        int new_fd;
 };
 
-static irqreturn_t xterm_interrupt(int irq, void *data, struct pt_regs *regs)
+static void xterm_interrupt(int irq, void *data, struct pt_regs *regs)
 {
        struct xterm_wait *xterm = data;
        int fd;
 
        fd = os_rcv_fd(xterm->fd, &xterm->pid);
        if(fd == -EAGAIN)
-               return(IRQ_NONE);
+               return;
 
        xterm->new_fd = fd;
        up(&xterm->sem);
-       return(IRQ_HANDLED);
 }
 
 int xterm_fd(int socket, int *pid_out)
index c17a962..361d930 100644 (file)
@@ -15,11 +15,7 @@ SECTIONS
   . = ALIGN(4096);             /* Init code and data */
   _stext = .;
   __init_begin = .;
-  .init.text : { 
-       _sinittext = .;
-       *(.init.text)
-       _einittext = .;
-  }
+  .text.init : { *(.text.init) }
 
   . = ALIGN(4096);
 
@@ -71,7 +67,7 @@ SECTIONS
 
   #include "asm/common.lds.S"
 
-  init.data : { *(.init.data) }
+  .data.init : { *(.data.init) }
 
   /* Ensure the __preinit_array_start label is properly aligned.  We
      could instead move the label definition inside the section, but
diff --git a/arch/um/include/irq_kern.h b/arch/um/include/irq_kern.h
deleted file mode 100644 (file)
index 4bcb829..0000000
+++ /dev/null
@@ -1,28 +0,0 @@
-/* 
- * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#ifndef __IRQ_KERN_H__
-#define __IRQ_KERN_H__
-
-#include "linux/interrupt.h"
-
-extern int um_request_irq(unsigned int irq, int fd, int type,
-                         irqreturn_t (*handler)(int, void *, 
-                                                struct pt_regs *),
-                         unsigned long irqflags,  const char * devname,
-                         void *dev_id);
-
-#endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 49e294e..d393282 100644 (file)
@@ -63,9 +63,10 @@ extern void init_flush_vm(void);
 extern void *syscall_sp(void *t);
 extern void syscall_trace(void);
 extern int hz(void);
-extern void uml_idle_timer(void);
+extern void idle_timer(void);
 extern unsigned int do_IRQ(int irq, union uml_pt_regs *regs);
 extern int external_pid(void *t);
+extern int pid_to_processor_id(int pid);
 extern void boot_timer_handler(int sig);
 extern void interrupt_end(void);
 extern void initial_thread_cb(void (*proc)(void *), void *arg);
@@ -89,7 +90,9 @@ extern int remove_gdb(void);
 extern char *uml_strdup(char *string);
 extern void unprotect_kernel_mem(void);
 extern void protect_kernel_mem(void);
+extern void set_kmem_end(unsigned long);
 extern void uml_cleanup(void);
+extern int pid_to_processor_id(int pid);
 extern void set_current(void *t);
 extern void lock_signalled_task(void *t);
 extern void IPI_handler(int cpu);
@@ -98,9 +101,7 @@ extern void *get_init_task(void);
 extern int clear_user_proc(void *buf, int size);
 extern int copy_to_user_proc(void *to, void *from, int size);
 extern int copy_from_user_proc(void *to, void *from, int size);
-extern int strlen_user_proc(char *str);
 extern void bus_handler(int sig, union uml_pt_regs *regs);
-extern void winch(int sig, union uml_pt_regs *regs);
 extern long execute_syscall(void *r);
 extern int smp_sigio_handler(void);
 extern void *get_current(void);
index 64e7e36..e9783dc 100644 (file)
@@ -9,14 +9,12 @@
 #include "linux/list.h"
 #include "linux/workqueue.h"
 #include "linux/tty.h"
-#include "linux/interrupt.h"
 #include "asm/semaphore.h"
 #include "chan_user.h"
 #include "mconsole_kern.h"
 
 struct line_driver {
        char *name;
-       char *device_name;
        char *devfs_name;
        short major;
        short minor_start;
@@ -69,9 +67,8 @@ struct lines {
 
 #define LINES_INIT(n) {  num :         n }
 
-extern irqreturn_t line_interrupt(int irq, void *data, struct pt_regs *unused);
-extern irqreturn_t line_write_interrupt(int irq, void *data, 
-                                       struct pt_regs *unused);
+extern void line_interrupt(int irq, void *data, struct pt_regs *unused);
+extern void line_write_interrupt(int irq, void *data, struct pt_regs *unused);
 extern void line_close(struct line *lines, struct tty_struct *tty);
 extern int line_open(struct line *lines, struct tty_struct *tty, 
                     struct chan_opts *opts);
index 14ccb3a..7eea2fa 100644 (file)
@@ -77,7 +77,6 @@ extern void mconsole_sysrq(struct mc_request *req);
 extern void mconsole_cad(struct mc_request *req);
 extern void mconsole_stop(struct mc_request *req);
 extern void mconsole_go(struct mc_request *req);
-extern void mconsole_log(struct mc_request *req);
 
 extern int mconsole_get_request(int fd, struct mc_request *req);
 extern int mconsole_notify(char *sock_name, int type, const void *data, 
index e7835b5..bad6b30 100644 (file)
@@ -13,6 +13,7 @@ struct vm_reserved {
 };
 
 extern void set_usable_vm(unsigned long start, unsigned long end);
+extern void set_kmem_end(unsigned long new);
 
 #endif
 
index cecece9..d80ac35 100644 (file)
@@ -51,6 +51,9 @@ extern unsigned long task_size;
 
 extern int init_mem_user(void);
 extern int create_mem_file(unsigned long len);
+extern void setup_range(int fd, char *driver, unsigned long start,
+                       unsigned long pfn, unsigned long total, int need_vm, 
+                       struct mem_region *region, void *reserved);
 extern void setup_memory(void *entry);
 extern unsigned long find_iomem(char *driver, unsigned long *len_out);
 extern int init_maps(struct mem_region *region);
index ea31e59..b9b1f0c 100644 (file)
@@ -103,11 +103,10 @@ extern int os_accept_connection(int fd);
 extern int os_shutdown_socket(int fd, int r, int w);
 extern void os_close_file(int fd);
 extern int os_rcv_fd(int fd, int *helper_pid_out);
-extern int create_unix_socket(char *file, int len, int close_on_exec);
+extern int create_unix_socket(char *file, int len);
 extern int os_connect_socket(char *name);
 extern int os_file_type(char *file);
 extern int os_file_mode(char *file, struct openflags *mode_out);
-extern int os_lock_file(int fd, int excl);
 
 extern unsigned long os_process_pc(int pid);
 extern int os_process_parent(int pid);
@@ -121,7 +120,6 @@ extern int os_map_memory(void *virt, int fd, unsigned long off,
 extern int os_protect_memory(void *addr, unsigned long len, 
                             int r, int w, int x);
 extern int os_unmap_memory(void *addr, int len);
-extern void os_flush_stdout(void);
 
 #endif
 
index 887fdb6..26c70cf 100644 (file)
@@ -28,8 +28,8 @@
  */
 #define SC_START_SYSCALL(sc) do SC_EAX(sc) = -ENOSYS; while(0)
 
-/* This is Page Fault */
-#define SEGV_IS_FIXABLE(trap) (trap == 14)
+/* These are General Protection and Page Fault */
+#define SEGV_IS_FIXABLE(trap) ((trap == 13) || (trap == 14))
 
 #define SC_SEGV_IS_FIXABLE(sc) (SEGV_IS_FIXABLE(SC_TRAPNO(sc)))
 
index 6e63af7..b28beaf 100644 (file)
@@ -39,6 +39,7 @@ extern int read_ubd_fs(int fd, void *buffer, int len);
 extern int write_ubd_fs(int fd, char *buffer, int len);
 extern int start_io_thread(unsigned long sp, int *fds_out);
 extern void do_io(struct io_thread_req *req);
+extern int ubd_is_dir(char *file);
 
 static inline int ubd_test_bit(__u64 bit, unsigned char *data)
 {
index e9cf19e..6f009be 100644 (file)
@@ -14,7 +14,6 @@ extern void *um_kmalloc_atomic(int size);
 extern void kfree(void *ptr);
 extern int in_aton(char *str);
 extern int open_gdb_chan(void);
-extern int strlcpy(char *, const char *, int);
 
 #endif
 
index ed373e2..e87b8fc 100644 (file)
@@ -59,6 +59,7 @@ extern int wait_for_stop(int pid, int sig, int cont_type, void *relay);
 extern void *add_signal_handler(int sig, void (*handler)(int));
 extern int start_fork_tramp(void *arg, unsigned long temp_stack, 
                            int clone_flags, int (*tramp)(void *));
+extern int clone_and_wait(int (*fn)(void *), void *arg, void *sp, int flags);
 extern int linux_main(int argc, char **argv);
 extern void set_cmdline(char *cmd);
 extern void input_cb(void (*proc)(void *), void *arg, int arg_len);
@@ -89,8 +90,7 @@ extern int arch_handle_signal(int sig, union uml_pt_regs *regs);
 extern int arch_fixup(unsigned long address, void *sc_ptr);
 extern void forward_pending_sigio(int target);
 extern int can_do_skas(void);
-extern void arch_init_thread(void);
-
 #endif
 
 /*
index 12f78cc..0f13dd4 100644 (file)
@@ -21,8 +21,6 @@ obj-$(CONFIG_TTY_LOG) += tty_log.o
 obj-$(CONFIG_MODE_TT) += tt/
 obj-$(CONFIG_MODE_SKAS) += skas/
 
-clean-files    := config.c
-
 user-objs-$(CONFIG_TTY_LOG) += tty_log.o
 
 USER_OBJS := $(filter %_user.o,$(obj-y))  $(user-objs-y) config.o helper.o \
@@ -47,13 +45,17 @@ $(USER_OBJS) : %.o: %.c
 $(obj)/frame.o: $(src)/frame.c
        $(CC) $(CFLAGS_$(notdir $@)) -c -o $@ $<
 
-QUOTE = 'my $$config=`cat $(TOPDIR)/.config`; $$config =~ s/"/\\"/g ; $$config =~ s/\n/\\n"\n"/g ; while(<STDIN>) { $$_ =~ s/CONFIG/$$config/; print $$_ }'
+QUOTE = 'my $$config=`cat $(TOPDIR)/.config`; $$config =~ s/"/\\"/g ; while(<STDIN>) { $$_ =~ s/CONFIG/$$config/; print $$_ }'
 
 $(obj)/config.c : $(src)/config.c.in $(TOPDIR)/.config
        $(PERL) -e $(QUOTE) < $(src)/config.c.in > $@
 
 $(obj)/config.o : $(obj)/config.c
 
+clean:
+       rm -f config.c
+       for dir in $(subdir-y) ; do $(MAKE) -C $$dir clean; done
+
 modules:
 
 fastdep:
index c062cbf..f6c96b9 100644 (file)
@@ -7,7 +7,9 @@
 #include <stdlib.h>
 #include "init.h"
 
-static __initdata char *config = "CONFIG";
+static __initdata char *config = "
+CONFIG
+";
 
 static int __init print_config(char *line, int *add)
 {
index a5f2128..a6be6b5 100644 (file)
@@ -32,15 +32,10 @@ void start_thread(struct pt_regs *regs, unsigned long eip, unsigned long esp)
        CHOOSE_MODE_PROC(start_thread_tt, start_thread_skas, regs, eip, esp);
 }
 
-extern void log_exec(char **argv, void *tty);
-
 static int execve1(char *file, char **argv, char **env)
 {
         int error;
 
-#ifdef CONFIG_TTY_LOG
-       log_exec(argv, current->tty);
-#endif
         error = do_execve(file, argv, env, &current->thread.regs);
         if (error == 0){
                 current->ptrace &= ~PT_DTRACE;
index c8bed0a..7d6bb96 100644 (file)
@@ -18,7 +18,7 @@ static struct fs_struct init_fs = INIT_FS;
 struct mm_struct init_mm = INIT_MM(init_mm);
 static struct files_struct init_files = INIT_FILES;
 static struct signal_struct init_signals = INIT_SIGNALS(init_signals);
-static struct sighand_struct init_sighand = INIT_SIGHAND(init_sighand);
+
 EXPORT_SYMBOL(init_mm);
 
 /*
@@ -43,12 +43,26 @@ union thread_union init_thread_union
 __attribute__((__section__(".data.init_task"))) = 
 { INIT_THREAD_INFO(init_task) };
 
+struct task_struct *alloc_task_struct(void)
+{
+       return((struct task_struct *) 
+              __get_free_pages(GFP_KERNEL, CONFIG_KERNEL_STACK_ORDER));
+}
+
 void unprotect_stack(unsigned long stack)
 {
        protect_memory(stack, (1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE, 
                       1, 1, 0, 1);
 }
 
+void free_task_struct(struct task_struct *task)
+{
+       /* free_pages decrements the page counter and only actually frees
+        * the pages if they are now not accessed by anything.
+        */
+       free_pages((unsigned long) task, CONFIG_KERNEL_STACK_ORDER);
+}
+
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically
index 5af2dd0..0aedf8c 100644 (file)
@@ -29,7 +29,6 @@
 #include "user_util.h"
 #include "kern_util.h"
 #include "irq_user.h"
-#include "irq_kern.h"
 
 static void register_irq_proc (unsigned int irq);
 
@@ -84,52 +83,65 @@ struct hw_interrupt_type no_irq_type = {
        end_none
 };
 
+/* Not changed */
+volatile unsigned long irq_err_count;
+
 /*
  * Generic, controller-independent functions:
  */
 
-int show_interrupts(struct seq_file *p, void *v)
+int get_irq_list(char *buf)
 {
        int i, j;
-       struct irqaction * action;
        unsigned long flags;
+       struct irqaction * action;
+       char *p = buf;
 
-       seq_printf(p, "           ");
-       for (j=0; j<NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "CPU%d       ",j);
-       seq_putc(p, '\n');
+       p += sprintf(p, "           ");
+       for (j=0; j<num_online_cpus(); j++)
+               p += sprintf(p, "CPU%d       ",j);
+       *p++ = '\n';
 
        for (i = 0 ; i < NR_IRQS ; i++) {
                spin_lock_irqsave(&irq_desc[i].lock, flags);
                action = irq_desc[i].action;
                if (!action) 
-                       goto skip;
-               seq_printf(p, "%3d: ",i);
+                       goto end;
+               p += sprintf(p, "%3d: ",i);
 #ifndef CONFIG_SMP
-               seq_printf(p, "%10u ", kstat_irqs(i));
+               p += sprintf(p, "%10u ", kstat_irqs(i));
 #else
-               for (j = 0; j < NR_CPUS; j++)
-                       if (cpu_online(j))
-                               seq_printf(p, "%10u ", kstat_cpu(j).irqs[i]);
+               for (j = 0; j < num_online_cpus(); j++)
+                       p += sprintf(p, "%10u ",
+                               kstat_cpu(cpu_logical_map(j)).irqs[i]);
 #endif
-               seq_printf(p, " %14s", irq_desc[i].handler->typename);
-               seq_printf(p, "  %s", action->name);
+               p += sprintf(p, " %14s", irq_desc[i].handler->typename);
+               p += sprintf(p, "  %s", action->name);
 
                for (action=action->next; action; action = action->next)
-                       seq_printf(p, ", %s", action->name);
-
-               seq_putc(p, '\n');
-skip:
+                       p += sprintf(p, ", %s", action->name);
+               *p++ = '\n';
+       end:
                spin_unlock_irqrestore(&irq_desc[i].lock, flags);
        }
-       seq_printf(p, "NMI: ");
-       for (j = 0; j < NR_CPUS; j++)
-               if (cpu_online(j))
-                       seq_printf(p, "%10u ", nmi_count(j));
-       seq_putc(p, '\n');
+       p += sprintf(p, "\n");
+#ifdef notdef
+#ifdef CONFIG_SMP
+       p += sprintf(p, "LOC: ");
+       for (j = 0; j < num_online_cpus(); j++)
+               p += sprintf(p, "%10u ",
+                       apic_timer_irqs[cpu_logical_map(j)]);
+       p += sprintf(p, "\n");
+#endif
+#endif
+       p += sprintf(p, "ERR: %10lu\n", irq_err_count);
+       return p - buf;
+}
 
-       return 0;
+
+int show_interrupts(struct seq_file *p, void *v)
+{
+       return(0);
 }
 
 /*
@@ -218,11 +230,8 @@ inline void synchronize_irq(unsigned int irq)
  
 void disable_irq(unsigned int irq)
 {
-       irq_desc_t *desc = irq_desc + irq;
-
        disable_irq_nosync(irq);
-       if(desc->action)
-               synchronize_irq(irq);
+       synchronize_irq(irq);
 }
 
 /**
@@ -243,7 +252,7 @@ void enable_irq(unsigned int irq)
        spin_lock_irqsave(&desc->lock, flags);
        switch (desc->depth) {
        case 1: {
-               unsigned int status = desc->status & IRQ_DISABLED;
+               unsigned int status = desc->status & ~IRQ_DISABLED;
                desc->status = status;
                if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
                        desc->status = status | IRQ_REPLAY;
@@ -273,12 +282,13 @@ unsigned int do_IRQ(int irq, union uml_pt_regs *regs)
         * 0 return value means that this irq is already being
         * handled by some other CPU. (or is disabled)
         */
+       int cpu = smp_processor_id();
        irq_desc_t *desc = irq_desc + irq;
        struct irqaction * action;
        unsigned int status;
 
        irq_enter();
-       kstat_this_cpu.irqs[irq]++;
+       kstat_cpu(cpu).irqs[irq]++;
        spin_lock(&desc->lock);
        desc->handler->ack(irq);
        /*
@@ -375,7 +385,7 @@ out:
  */
  
 int request_irq(unsigned int irq,
-               irqreturn_t (*handler)(int, void *, struct pt_regs *),
+               void (*handler)(int, void *, struct pt_regs *),
                unsigned long irqflags, 
                const char * devname,
                void *dev_id)
@@ -423,19 +433,15 @@ int request_irq(unsigned int irq,
 EXPORT_SYMBOL(request_irq);
 
 int um_request_irq(unsigned int irq, int fd, int type,
-                  irqreturn_t (*handler)(int, void *, struct pt_regs *),
+                  void (*handler)(int, void *, struct pt_regs *),
                   unsigned long irqflags, const char * devname,
                   void *dev_id)
 {
-       int err;
-
-       err = request_irq(irq, handler, irqflags, devname, dev_id);
-       if(err) 
-               return(err);
+       int retval;
 
-       if(fd != -1)
-               err = activate_fd(irq, fd, type, dev_id);
-       return(err);
+       retval = request_irq(irq, handler, irqflags, devname, dev_id);
+       if(retval) return(retval);
+       return(activate_fd(irq, fd, type, dev_id));
 }
 
 /* this was setup_x86_irq but it seems pretty generic */
@@ -566,67 +572,26 @@ static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
  */
 static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
 
-#define HEX_DIGITS (2*sizeof(cpumask_t))
-
 static int irq_affinity_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, irq_affinity[(long)data]);
+       if (count - len < 2)
                return -EINVAL;
-       return sprintf (page, "%08lx\n", irq_affinity[(long)data]);
-}
-
-static unsigned int parse_hex_value (const char *buffer,
-               unsigned long count, cpumask_t *ret)
-{
-       unsigned char hexnum [HEX_DIGITS];
-       cpumask_t value = CPU_MASK_NONE;
-       int i;
-
-       if (!count)
-               return -EINVAL;
-       if (count > HEX_DIGITS)
-               count = HEX_DIGITS;
-       if (copy_from_user(hexnum, buffer, count))
-               return -EFAULT;
-
-       /*
-        * Parse the first HEX_DIGITS characters as a hex string, any non-hex 
-        * char is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
-        */
-
-       for (i = 0; i < count; i++) {
-               unsigned int k, c = hexnum[i];
-
-               switch (c) {
-                       case '0' ... '9': c -= '0'; break;
-                       case 'a' ... 'f': c -= 'a'-10; break;
-                       case 'A' ... 'F': c -= 'A'-10; break;
-               default:
-                       goto out;
-               }
-               cpus_shift_left(value, value, 16);
-               for (k = 0; k < 4; ++k)
-                       if (c & (1 << k))
-                               cpu_set(k, value);
-       }
-out:
-       *ret = value;
-       return 0;
+       len += sprintf(page + len, "\n");
+       return len;
 }
 
 static int irq_affinity_write_proc (struct file *file, const char *buffer,
                                        unsigned long count, void *data)
 {
        int irq = (long) data, full_count = count, err;
-       cpumask_t new_value;
+       cpumask_t new_value, tmp;
 
        if (!irq_desc[irq].handler->set_affinity)
                return -EIO;
 
-       err = parse_hex_value(buffer, count, &new_value);
-       if(err)
-               return(err);
+       err = cpumask_parse(buffer, count, new_value);
 
 #ifdef CONFIG_SMP
        /*
@@ -648,19 +613,10 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
 static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       cpumask_t tmp, *mask = (cpumask_t *) data;
-       int k, len = 0;
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, *(cpumask_t *)data);
+       if (count - len < 2)
                return -EINVAL;
-       tmp = *mask;
-       for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(page, "%04hx", (short) cpus_coerce(tmp));
-               len += j;
-               page += j;
-               cpus_shift_right(tmp, tmp, 16);
-       }
-       len += sprintf(page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
@@ -670,7 +626,7 @@ static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
        cpumask_t *mask = (cpumask_t *)data, new_value;
        unsigned long full_count = count, err;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
        if (err)
                return err;
 
index 7fcc565..1f82ad7 100644 (file)
@@ -62,9 +62,6 @@ EXPORT_SYMBOL(run_helper);
 EXPORT_SYMBOL(start_thread);
 EXPORT_SYMBOL(dump_thread);
 
-EXPORT_SYMBOL(do_gettimeofday);
-EXPORT_SYMBOL(do_settimeofday);
-
 /* This is here because UML expands open to sys_open, not to a system
  * call instruction.
  */
index a41efa4..5bcef3e 100644 (file)
@@ -120,6 +120,11 @@ unsigned long get_kmem_end(void)
        return(kmem_top);
 }
 
+void set_kmem_end(unsigned long new)
+{
+       kmem_top = new;
+}
+
 #ifdef CONFIG_HIGHMEM
 /* Changed during early boot */
 pte_t *kmap_pte;
@@ -217,7 +222,7 @@ static int setup_one_range(int fd, char *driver, unsigned long start,
                if(regions[i] == NULL) break;           
        }
        if(i == NREGIONS){
-               printk("setup_one_range : no free regions\n");
+               printk("setup_range : no free regions\n");
                i = -1;
                goto out;
        }
@@ -226,9 +231,7 @@ static int setup_one_range(int fd, char *driver, unsigned long start,
                fd = create_mem_file(len);
 
        if(region == NULL){
-               if(kmalloc_ok)
-                       region = kmalloc(sizeof(*region), GFP_KERNEL);
-               else region = alloc_bootmem_low_pages(sizeof(*region));
+               region = alloc_bootmem_low_pages(sizeof(*region));
                if(region == NULL)
                        panic("Failed to allocating mem_region");
        }
@@ -529,9 +532,9 @@ int nregions(void)
        return(NREGIONS);
 }
 
-static void setup_range(int fd, char *driver, unsigned long start, 
-                       unsigned long pfn, unsigned long len, int need_vm, 
-                       struct mem_region *region, void *reserved)
+void setup_range(int fd, char *driver, unsigned long start, unsigned long pfn,
+                unsigned long len, int need_vm, struct mem_region *region, 
+                void *reserved)
 {
        int i, cur;
 
index 40be133..d90345b 100644 (file)
@@ -111,11 +111,6 @@ int setup_region(struct mem_region *region, void *entry)
                offset = 0;
        }
 
-       if(offset >= region->len){
-               printf("%ld bytes of physical memory is insufficient\n",
-                      region->len);
-               exit(1);
-       }
        loc = mmap(start, region->len - offset, PROT_READ | PROT_WRITE, 
                   MAP_SHARED | MAP_FIXED, region->fd, offset);
        if(loc != start){
@@ -127,26 +122,26 @@ int setup_region(struct mem_region *region, void *entry)
 
 static int __init parse_iomem(char *str, int *add)
 {
-       struct stat64 buf;
+       struct stat buf;
        char *file, *driver;
        int fd;
 
        driver = str;
        file = strchr(str,',');
        if(file == NULL){
-               printf("parse_iomem : failed to parse iomem\n");
+               printk("parse_iomem : failed to parse iomem\n");
                return(1);
        }
        *file = '\0';
        file++;
        fd = os_open_file(file, of_rdwr(OPENFLAGS()), 0);
        if(fd < 0){
-               printf("parse_iomem - Couldn't open io file, errno = %d\n", 
+               printk("parse_iomem - Couldn't open io file, errno = %d\n", 
                       errno);
                return(1);
        }
-       if(fstat64(fd, &buf) < 0) {
-               printf("parse_iomem - cannot fstat file, errno = %d\n", errno);
+       if(fstat(fd, &buf) < 0) {
+               printk("parse_iomem - cannot fstat file, errno = %d\n", errno);
                return(1);
        }
        add_iomem(driver, fd, buf.st_size);
index 6ce829e..4c3aa45 100644 (file)
@@ -72,6 +72,7 @@ void init_new_thread_signals(int altstack)
                    SIGUSR1, SIGIO, SIGWINCH, SIGALRM, SIGVTALRM, -1);
        set_handler(SIGUSR2, (__sighandler_t) sig_handler, 
                    SA_NOMASK | flags, -1);
+       (void) CHOOSE_MODE(signal(SIGCHLD, SIG_IGN), (void *) 0);
        signal(SIGHUP, SIG_IGN);
 
        init_irq_signals(altstack);
@@ -126,8 +127,7 @@ int start_fork_tramp(void *thread_arg, unsigned long temp_stack,
        if(err < 0) panic("Waiting for outer trampoline failed - errno = %d", 
                          errno);
        if(!WIFSIGNALED(status) || (WTERMSIG(status) != SIGKILL))
-               panic("outer trampoline didn't exit with SIGKILL, "
-                     "status = %d", status);
+               panic("outer trampoline didn't exit with SIGKILL");
 
        return(arg.pid);
 }
index a03e24d..e17600a 100644 (file)
@@ -52,12 +52,17 @@ struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { -1, NULL } };
 
 struct task_struct *get_task(int pid, int require)
 {
-        struct task_struct *ret;
+        struct task_struct *task, *ret;
 
+        ret = NULL;
         read_lock(&tasklist_lock);
-       ret = find_task_by_pid(pid);
+        for_each_process(task){
+                if(task->pid == pid){
+                        ret = task;
+                        break;
+                }
+        }
         read_unlock(&tasklist_lock);
-
         if(require && (ret == NULL)) panic("get_task couldn't find a task\n");
         return(ret);
 }
@@ -98,14 +103,13 @@ unsigned long alloc_stack(int order, int atomic)
 
 int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
 {
-       int pid;
+       struct task_struct *p;
 
        current->thread.request.u.thread.proc = fn;
        current->thread.request.u.thread.arg = arg;
-       pid = do_fork(CLONE_VM | flags, 0, NULL, 0, NULL, NULL);
-       if(pid < 0)
-               panic("do_fork failed in kernel_thread, errno = %d", pid);
-       return(pid);
+       p = do_fork(CLONE_VM | flags, 0, NULL, 0, NULL, NULL);
+       if(IS_ERR(p)) panic("do_fork failed in kernel_thread");
+       return(p->pid);
 }
 
 void switch_mm(struct mm_struct *prev, struct mm_struct *next, 
@@ -125,7 +129,7 @@ void set_current(void *t)
                { external_pid(task), task });
 }
 
-void *_switch_to(void *prev, void *next, void *last)
+void *switch_to(void *prev, void *next, void *last)
 {
        return(CHOOSE_MODE(switch_to_tt(prev, next), 
                           switch_to_skas(prev, next)));
@@ -145,7 +149,7 @@ void release_thread(struct task_struct *task)
 void exit_thread(void)
 {
        CHOOSE_MODE(exit_thread_tt(), exit_thread_skas());
-       unprotect_stack((unsigned long) current_thread);
+       unprotect_stack((unsigned long) current->thread_info);
 }
  
 void *get_current(void)
@@ -153,10 +157,6 @@ void *get_current(void)
        return(current);
 }
 
-void prepare_to_copy(struct task_struct *tsk)
-{
-}
-
 int copy_thread(int nr, unsigned long clone_flags, unsigned long sp,
                unsigned long stack_top, struct task_struct * p, 
                struct pt_regs *regs)
@@ -190,7 +190,7 @@ int current_pid(void)
 
 void default_idle(void)
 {
-       uml_idle_timer();
+       idle_timer();
 
        atomic_inc(&init_mm.mm_count);
        current->mm = &init_mm;
@@ -367,15 +367,10 @@ int clear_user_proc(void *buf, int size)
        return(clear_user(buf, size));
 }
 
-int strlen_user_proc(char *str)
-{
-       return(strlen_user(str));
-}
-
 int smp_sigio_handler(void)
 {
 #ifdef CONFIG_SMP
-       int cpu = current_thread->cpu;
+       int cpu = current->thread_info->cpu;
        IPI_handler(cpu);
        if(cpu != 0)
                return(1);
@@ -390,7 +385,7 @@ int um_in_interrupt(void)
 
 int cpu(void)
 {
-       return(current_thread->cpu);
+       return(current->thread_info->cpu);
 }
 
 /*
index 9609999..c68c937 100644 (file)
@@ -311,8 +311,11 @@ void syscall_trace(void)
 
        /* the 0x80 provides a way for the tracing parent to distinguish
           between a syscall stop and SIGTRAP delivery */
-       ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
-                                ? 0x80 : 0));
+       current->exit_code = SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD)
+                                       ? 0x80 : 0);
+       current->state = TASK_STOPPED;
+       notify_parent(current, SIGCHLD);
+       schedule();
 
        /*
         * this isn't the same as continuing with a signal, but it will do
index 92658ea..02272e6 100644 (file)
@@ -6,21 +6,18 @@
 #include "linux/kernel.h"
 #include "linux/list.h"
 #include "linux/slab.h"
-#include "linux/signal.h"
-#include "linux/interrupt.h"
+#include "asm/irq.h"
 #include "init.h"
 #include "sigio.h"
 #include "irq_user.h"
-#include "irq_kern.h"
 
 /* Protected by sigio_lock() called from write_sigio_workaround */
 static int sigio_irq_fd = -1;
 
-irqreturn_t sigio_interrupt(int irq, void *data, struct pt_regs *unused)
+void sigio_interrupt(int irq, void *data, struct pt_regs *unused)
 {
        read_sigio_fd(sigio_irq_fd);
        reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ);
-       return(IRQ_HANDLED);
 }
 
 int write_sigio_irq(int fd)
index bef7e45..6e13847 100644 (file)
@@ -36,7 +36,7 @@ static void force_segv(int sig)
        if(sig == SIGSEGV){
                struct k_sigaction *ka;
 
-               ka = &current->sighand->action[SIGSEGV - 1];
+               ka = &current->sig->action[SIGSEGV - 1];
                ka->sa.sa_handler = SIG_DFL;
        }
        force_sig(SIGSEGV, current);
@@ -142,7 +142,7 @@ static int kern_do_signal(struct pt_regs *regs, sigset_t *oldset, int error)
                return(0);
 
        /* Whee!  Actually deliver the signal.  */
-       ka = &current->sighand->action[sig -1 ];
+       ka = &current->sig->action[sig -1 ];
        err = handle_signal(regs, sig, ka, &info, oldset, error);
        if(!err) return(1);
 
@@ -201,7 +201,7 @@ int sys_sigsuspend(int history0, int history1, old_sigset_t mask)
        }
 }
 
-int sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize)
+int sys_rt_sigsuspend(sigset_t *unewset, size_t sigsetsize)
 {
        sigset_t saveset, newset;
 
@@ -227,42 +227,6 @@ int sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize)
        }
 }
 
-int sys_sigaction(int sig, const struct old_sigaction __user *act,
-                        struct old_sigaction __user *oact)
-{
-       struct k_sigaction new_ka, old_ka;
-       int ret;
-
-       if (act) {
-               old_sigset_t mask;
-               if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
-                   __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
-                   __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
-                       return -EFAULT;
-               __get_user(new_ka.sa.sa_flags, &act->sa_flags);
-               __get_user(mask, &act->sa_mask);
-               siginitset(&new_ka.sa.sa_mask, mask);
-       }
-
-       ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
-
-       if (!ret && oact) {
-               if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
-                   __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
-                   __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
-                       return -EFAULT;
-               __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
-               __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
-       }
-
-       return ret;
-}
-
-int sys_sigaltstack(const stack_t *uss, stack_t *uoss)
-{
-       return(do_sigaltstack(uss, uoss, PT_REGS_SP(&current->thread.regs)));
-}
-
 static int copy_sc_from_user(struct pt_regs *to, void *from, 
                             struct arch_frame_data *arch)
 {
@@ -275,8 +239,8 @@ static int copy_sc_from_user(struct pt_regs *to, void *from,
 
 int sys_sigreturn(struct pt_regs regs)
 {
-       void __user *sc = sp_to_sc(PT_REGS_SP(&current->thread.regs));
-       void __user *mask = sp_to_mask(PT_REGS_SP(&current->thread.regs));
+       void *sc = sp_to_sc(PT_REGS_SP(&current->thread.regs));
+       void *mask = sp_to_mask(PT_REGS_SP(&current->thread.regs));
        int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
 
        spin_lock_irq(&current->sighand->siglock);
@@ -293,8 +257,7 @@ int sys_sigreturn(struct pt_regs regs)
 
 int sys_rt_sigreturn(struct pt_regs regs)
 {
-       unsigned long sp = PT_REGS_SP(&current->thread.regs);
-       struct ucontext __user *uc = sp_to_uc(sp);
+       struct ucontext *uc = sp_to_uc(PT_REGS_SP(&current->thread.regs));
        void *fp;
        int sig_size = _NSIG_WORDS * sizeof(unsigned long);
 
index adb7291..72c7995 100644 (file)
@@ -7,22 +7,18 @@ obj-y = exec_kern.o exec_user.o mem.o mem_user.o mmu.o process.o \
        process_kern.o syscall_kern.o syscall_user.o time.o tlb.o trap_user.o \
        sys-$(SUBARCH)/
 
-host-progs     := util/mk_ptregs
-clean-files    := include/skas_ptregs.h
-
 USER_OBJS = $(filter %_user.o,$(obj-y)) process.o time.o
 USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
 
-$(TOPDIR)/arch/um/include/skas_ptregs.h : $(src)/util/mk_ptregs
-       @echo -n '  Generating $@'
-       @$< > $@.tmp
-       @if [ -r $@ ] && cmp -s $@ $@.tmp; then \
-               echo ' (unchanged)'; \
-               rm -f $@.tmp; \
-       else \
-               echo ' (updated)'; \
-               mv -f $@.tmp $@; \
-       fi
+include/skas_ptregs.h : util/mk_ptregs
+       util/mk_ptregs > $@
+
+util/mk_ptregs :
+       $(MAKE) -C util
 
 $(USER_OBJS) : %.o: %.c
        $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<
+
+clean :
+       $(MAKE) -C util clean
+       $(RM) -f include/skas_ptregs.h
index 99563cd..7516206 100644 (file)
@@ -20,7 +20,6 @@ extern void sig_handler_common_skas(int sig, void *sc_ptr);
 extern void halt_skas(void);
 extern void reboot_skas(void);
 extern void kill_off_processes_skas(void);
-extern int is_skas_winch(int pid, int fd, void *data);
 
 #endif
 
index f1aca64..d28c4b1 100644 (file)
@@ -19,7 +19,7 @@
 #define access_ok_skas(type, addr, size) \
        ((segment_eq(get_fs(), KERNEL_DS)) || \
         (((unsigned long) (addr) < TASK_SIZE) && \
-         ((unsigned long) (addr) + (size) <= TASK_SIZE)))
+         ((unsigned long) (addr) + (size) < TASK_SIZE)))
 
 static inline int verify_area_skas(int type, const void * addr, 
                                   unsigned long size)
index 7e837bf..cb91f8c 100644 (file)
@@ -4,7 +4,6 @@
  */
 
 #include <stdlib.h>
-#include <unistd.h>
 #include <errno.h>
 #include <signal.h>
 #include <setjmp.h>
 #include "os.h"
 #include "proc_mm.h"
 #include "skas_ptrace.h"
-#include "chan_user.h"
-
-int is_skas_winch(int pid, int fd, void *data)
-{
-       if(pid != getpid())
-               return(0);
-
-       register_winch_irq(-1, fd, -1, data);
-       return(1);
-}
 
 unsigned long exec_regs[FRAME_SIZE];
 unsigned long exec_fp_regs[HOST_FP_SIZE];
@@ -59,11 +48,11 @@ static void handle_trap(int pid, union uml_pt_regs *regs)
        int err, syscall_nr, status;
 
        syscall_nr = PT_SYSCALL_NR(regs->skas.regs);
-       UPT_SYSCALL_NR(regs) = syscall_nr;
        if(syscall_nr < 1){
                relay_signal(SIGTRAP, regs);
                return;
        }
+       UPT_SYSCALL_NR(regs) = syscall_nr;
 
        err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, __NR_getpid);
        if(err < 0)
@@ -83,6 +72,8 @@ static void handle_trap(int pid, union uml_pt_regs *regs)
        handle_syscall(regs);
 }
 
+int userspace_pid;
+
 static int userspace_tramp(void *arg)
 {
        init_new_thread_signals(0);
@@ -92,8 +83,6 @@ static int userspace_tramp(void *arg)
        return(0);
 }
 
-int userspace_pid;
-
 void start_userspace(void)
 {
        void *stack;
@@ -160,7 +149,6 @@ void userspace(union uml_pt_regs *regs)
                        case SIGILL:
                        case SIGBUS:
                        case SIGFPE:
-                       case SIGWINCH:
                                user_signal(WSTOPSIG(status), regs);
                                break;
                        default:
@@ -340,8 +328,7 @@ void reboot_skas(void)
 int new_mm(int from)
 {
        struct proc_mm_op copy;
-       int n, fd = os_open_file("/proc/mm", 
-                                of_cloexec(of_write(OPENFLAGS())), 0);
+       int n, fd = os_open_file("/proc/mm", of_write(OPENFLAGS()), 0);
 
        if(fd < 0)
                return(-errno);
@@ -355,7 +342,6 @@ int new_mm(int from)
                        printk("new_mm : /proc/mm copy_segments failed, "
                               "errno = %d\n", errno);
        }
-
        return(fd);
 }
 
index c5ad0e0..128146c 100644 (file)
@@ -61,8 +61,9 @@ void new_thread_handler(int sig)
        thread_wait(&current->thread.mode.skas.switch_buf, 
                    current->thread.mode.skas.fork_buf);
 
-       if(current->thread.prev_sched != NULL)
-               schedule_tail(current->thread.prev_sched);
+#ifdef CONFIG_SMP
+       schedule_tail(NULL);
+#endif
        current->thread.prev_sched = NULL;
 
        n = run_kernel_thread(fn, arg, &current->thread.exec_buf);
@@ -92,8 +93,9 @@ void fork_handler(int sig)
                    current->thread.mode.skas.fork_buf);
        
        force_flush_all();
-       if(current->thread.prev_sched != NULL)
-               schedule_tail(current->thread.prev_sched);
+#ifdef CONFIG_SMP
+       schedule_tail(current->thread.prev_sched);
+#endif
        current->thread.prev_sched = NULL;
        unblock_signals();
 
@@ -134,7 +136,7 @@ int copy_thread_skas(int nr, unsigned long clone_flags, unsigned long sp,
 
 void init_idle_skas(void)
 {
-       cpu_tasks[current_thread->cpu].pid = os_getpid();
+       cpu_tasks[current->thread_info->cpu].pid = os_getpid();
        default_idle();
 }
 
@@ -162,7 +164,7 @@ int start_uml_skas(void)
        capture_signal_stack();
 
        init_new_thread_signals(1);
-       uml_idle_timer();
+       idle_timer();
 
        init_task.thread.request.u.thread.proc = start_kernel_proc;
        init_task.thread.request.u.thread.arg = NULL;
index 116f74d..6587910 100644 (file)
@@ -1,4 +1,3 @@
-#include <stdio.h>
 #include <asm/ptrace.h>
 #include <asm/user.h>
 
index 7c76cb6..34f826c 100644 (file)
@@ -23,7 +23,7 @@
 #include "os.h"
 
 /* CPU online map, set by smp_boot_cpus */
-unsigned long cpu_online_map = CPU_MASK_NONE;
+unsigned long cpu_online_map = cpumask_of_cpu(0);
 
 EXPORT_SYMBOL(cpu_online_map);
 
@@ -100,15 +100,15 @@ void smp_send_stop(void)
 
        printk(KERN_INFO "Stopping all CPUs...");
        for(i = 0; i < num_online_cpus(); i++){
-               if(i == current_thread->cpu)
+               if(i == current->thread_info->cpu)
                        continue;
                write(cpu_data[i].ipi_pipe[1], "S", 1);
        }
        printk("done\n");
 }
 
-static cpumask_t smp_commenced_mask = CPU_MASK_NONE;
-static cpumask_t cpu_callin_map = CPU_MASK_NONE;
+static cpumask_t smp_commenced_mask;
+static cpumask_t smp_callin_map = CPU_MASK_NONE;
 
 static int idle_proc(void *cpup)
 {
@@ -123,12 +123,12 @@ static int idle_proc(void *cpup)
                     current->thread.mode.tt.extern_pid);
  
        wmb();
-       if (cpu_test_and_set(cpu, cpu_callin_map)) {
+       if (cpu_test_and_set(cpu, &smp_callin_map)) {
                printk("huh, CPU#%d already present??\n", cpu);
                BUG();
        }
 
-       while (!cpu_isset(cpu, smp_commenced_mask))
+       while (!cpu_isset(cpu, &smp_commenced_mask))
                cpu_relax();
 
        cpu_set(cpu, cpu_online_map);
@@ -143,11 +143,8 @@ static struct task_struct *idle_thread(int cpu)
 
         current->thread.request.u.thread.proc = idle_proc;
         current->thread.request.u.thread.arg = (void *) cpu;
-       new_task = copy_process(CLONE_VM | CLONE_IDLETASK, 0, NULL, 0, NULL, 
-                               NULL);
-       if(IS_ERR(new_task)) 
-               panic("copy_process failed in idle_thread, error = %ld",
-                     PTR_ERR(new_task));
+       new_task = do_fork(CLONE_VM | CLONE_IDLETASK, 0, NULL, 0, NULL, NULL);
+       if(IS_ERR(new_task)) panic("do_fork failed in idle_thread");
 
        cpu_tasks[cpu] = ((struct cpu_task) 
                          { .pid =      new_task->thread.mode.tt.extern_pid,
@@ -156,7 +153,6 @@ static struct task_struct *idle_thread(int cpu)
        CHOOSE_MODE(write(new_task->thread.mode.tt.switch_pipe[1], &c, 
                          sizeof(c)),
                    ({ panic("skas mode doesn't support SMP"); }));
-       wake_up_forked_process(new_task);
        return(new_task);
 }
 
@@ -164,16 +160,15 @@ void smp_prepare_cpus(unsigned int maxcpus)
 {
        struct task_struct *idle;
        unsigned long waittime;
-       int err, cpu, me = smp_processor_id();
+       int err, cpu;
 
-       cpu_clear(me, cpu_online_map);
-       cpu_set(me, cpu_online_map);
-       cpu_set(me, cpu_callin_map);
+       cpu_set(0, cpu_online_map);
+       cpu_set(0, smp_callin_map);
 
-       err = os_pipe(cpu_data[me].ipi_pipe, 1, 1);
+       err = os_pipe(cpu_data[0].ipi_pipe, 1, 1);
        if(err) panic("CPU#0 failed to create IPI pipe, errno = %d", -err);
 
-       activate_ipi(cpu_data[me].ipi_pipe[0], 
+       activate_ipi(cpu_data[0].ipi_pipe[0], 
                     current->thread.mode.tt.extern_pid);
 
        for(cpu = 1; cpu < ncpus; cpu++){
@@ -185,10 +180,10 @@ void smp_prepare_cpus(unsigned int maxcpus)
                unhash_process(idle);
 
                waittime = 200000000;
-               while (waittime-- && !cpu_isset(cpu, cpu_callin_map))
+               while (waittime-- && !cpu_isset(cpu, smp_callin_map))
                        cpu_relax();
 
-               if (cpu_isset(cpu, cpu_callin_map))
+               if (cpu_isset(cpu, smp_callin_map))
                        printk("done\n");
                else printk("failed\n");
        }
@@ -278,7 +273,7 @@ int smp_call_function(void (*_func)(void *info), void *_info, int nonatomic,
        info = _info;
 
        for (i=0;i<NR_CPUS;i++)
-               if((i != current_thread->cpu) && 
+               if((i != current->thread_info->cpu) && 
                   cpu_isset(i, cpu_online_map))
                        write(cpu_data[i].ipi_pipe[1], "C", 1);
 
index 61d6b07..c651311 100644 (file)
@@ -219,30 +219,15 @@ extern syscall_handler_t sys_getdents64;
 extern syscall_handler_t sys_gettid;
 extern syscall_handler_t sys_readahead;
 extern syscall_handler_t sys_tkill;
-extern syscall_handler_t sys_setxattr;
-extern syscall_handler_t sys_lsetxattr;
-extern syscall_handler_t sys_fsetxattr;
-extern syscall_handler_t sys_getxattr;
-extern syscall_handler_t sys_lgetxattr;
-extern syscall_handler_t sys_fgetxattr;
-extern syscall_handler_t sys_listxattr;
-extern syscall_handler_t sys_llistxattr;
-extern syscall_handler_t sys_flistxattr;
-extern syscall_handler_t sys_removexattr;
-extern syscall_handler_t sys_lremovexattr;
-extern syscall_handler_t sys_fremovexattr;
 extern syscall_handler_t sys_sendfile64;
 extern syscall_handler_t sys_futex;
 extern syscall_handler_t sys_sched_setaffinity;
 extern syscall_handler_t sys_sched_getaffinity;
-extern syscall_handler_t sys_set_thread_area;
-extern syscall_handler_t sys_get_thread_area;
 extern syscall_handler_t sys_io_setup;
 extern syscall_handler_t sys_io_destroy;
 extern syscall_handler_t sys_io_getevents;
 extern syscall_handler_t sys_io_submit;
 extern syscall_handler_t sys_io_cancel;
-extern syscall_handler_t sys_fadvise64;
 extern syscall_handler_t sys_exit_group;
 extern syscall_handler_t sys_lookup_dcookie;
 extern syscall_handler_t sys_epoll_create;
@@ -250,20 +235,6 @@ extern syscall_handler_t sys_epoll_ctl;
 extern syscall_handler_t sys_epoll_wait;
 extern syscall_handler_t sys_remap_file_pages;
 extern syscall_handler_t sys_set_tid_address;
-extern syscall_handler_t sys_timer_create;
-extern syscall_handler_t sys_timer_settime;
-extern syscall_handler_t sys_timer_gettime;
-extern syscall_handler_t sys_timer_getoverrun;
-extern syscall_handler_t sys_timer_delete;
-extern syscall_handler_t sys_clock_settime;
-extern syscall_handler_t sys_clock_gettime;
-extern syscall_handler_t sys_clock_getres;
-extern syscall_handler_t sys_clock_nanosleep;
-extern syscall_handler_t sys_statfs64;
-extern syscall_handler_t sys_fstatfs64;
-extern syscall_handler_t sys_tgkill;
-extern syscall_handler_t sys_utimes;
-extern syscall_handler_t sys_fadvise64_64;
 
 #ifdef CONFIG_NFSD
 #define NFSSERVCTL sys_nfsservctl
@@ -275,7 +246,7 @@ extern syscall_handler_t um_mount;
 extern syscall_handler_t um_time;
 extern syscall_handler_t um_stime;
 
-#define LAST_GENERIC_SYSCALL __NR_vserver
+#define LAST_GENERIC_SYSCALL __NR_set_tid_address
 
 #if LAST_GENERIC_SYSCALL > LAST_ARCH_SYSCALL
 #define LAST_SYSCALL LAST_GENERIC_SYSCALL
@@ -484,37 +455,32 @@ syscall_handler_t *sys_call_table[] = {
        [ __NR_stat64 ] = sys_stat64,
        [ __NR_lstat64 ] = sys_lstat64,
        [ __NR_fstat64 ] = sys_fstat64,
-       [ __NR_getdents64 ] = sys_getdents64,
        [ __NR_fcntl64 ] = sys_fcntl64,
-       [ 223 ] = sys_ni_syscall,
+       [ __NR_getdents64 ] = sys_getdents64,
        [ __NR_gettid ] = sys_gettid,
        [ __NR_readahead ] = sys_readahead,
-       [ __NR_setxattr ] = sys_setxattr,
-       [ __NR_lsetxattr ] = sys_lsetxattr,
-       [ __NR_fsetxattr ] = sys_fsetxattr,
-       [ __NR_getxattr ] = sys_getxattr,
-       [ __NR_lgetxattr ] = sys_lgetxattr,
-       [ __NR_fgetxattr ] = sys_fgetxattr,
-       [ __NR_listxattr ] = sys_listxattr,
-       [ __NR_llistxattr ] = sys_llistxattr,
-       [ __NR_flistxattr ] = sys_flistxattr,
-       [ __NR_removexattr ] = sys_removexattr,
-       [ __NR_lremovexattr ] = sys_lremovexattr,
-       [ __NR_fremovexattr ] = sys_fremovexattr,
+       [ __NR_setxattr ] = sys_ni_syscall,
+       [ __NR_lsetxattr ] = sys_ni_syscall,
+       [ __NR_fsetxattr ] = sys_ni_syscall,
+       [ __NR_getxattr ] = sys_ni_syscall,
+       [ __NR_lgetxattr ] = sys_ni_syscall,
+       [ __NR_fgetxattr ] = sys_ni_syscall,
+       [ __NR_listxattr ] = sys_ni_syscall,
+       [ __NR_llistxattr ] = sys_ni_syscall,
+       [ __NR_flistxattr ] = sys_ni_syscall,
+       [ __NR_removexattr ] = sys_ni_syscall,
+       [ __NR_lremovexattr ] = sys_ni_syscall,
+       [ __NR_fremovexattr ] = sys_ni_syscall,
        [ __NR_tkill ] = sys_tkill,
        [ __NR_sendfile64 ] = sys_sendfile64,
        [ __NR_futex ] = sys_futex,
        [ __NR_sched_setaffinity ] = sys_sched_setaffinity,
        [ __NR_sched_getaffinity ] = sys_sched_getaffinity,
-       [ __NR_set_thread_area ] = sys_ni_syscall,
-       [ __NR_get_thread_area ] = sys_ni_syscall,
        [ __NR_io_setup ] = sys_io_setup,
        [ __NR_io_destroy ] = sys_io_destroy,
        [ __NR_io_getevents ] = sys_io_getevents,
        [ __NR_io_submit ] = sys_io_submit,
        [ __NR_io_cancel ] = sys_io_cancel,
-       [ __NR_fadvise64 ] = sys_fadvise64,
-       [ 251 ] = sys_ni_syscall,
        [ __NR_exit_group ] = sys_exit_group,
        [ __NR_lookup_dcookie ] = sys_lookup_dcookie,
        [ __NR_epoll_create ] = sys_epoll_create,
@@ -522,21 +488,6 @@ syscall_handler_t *sys_call_table[] = {
        [ __NR_epoll_wait ] = sys_epoll_wait,
         [ __NR_remap_file_pages ] = sys_remap_file_pages,
         [ __NR_set_tid_address ] = sys_set_tid_address,
-       [ __NR_timer_create ] = sys_timer_create,
-       [ __NR_timer_settime ] = sys_timer_settime,
-       [ __NR_timer_gettime ] = sys_timer_gettime,
-       [ __NR_timer_getoverrun ] = sys_timer_getoverrun,
-       [ __NR_timer_delete ] = sys_timer_delete,
-       [ __NR_clock_settime ] = sys_clock_settime,
-       [ __NR_clock_gettime ] = sys_clock_gettime,
-       [ __NR_clock_getres ] = sys_clock_getres,
-       [ __NR_clock_nanosleep ] = sys_clock_nanosleep,
-       [ __NR_statfs64 ] = sys_statfs64,
-       [ __NR_fstatfs64 ] = sys_fstatfs64,
-       [ __NR_tgkill ] = sys_tgkill,
-       [ __NR_utimes ] = sys_utimes,
-       [ __NR_fadvise64_64 ] = sys_fadvise64_64,
-       [ __NR_vserver ] = sys_ni_syscall,
 
        ARCH_SYSCALLS
        [ LAST_SYSCALL + 1 ... NR_syscalls ] = 
index e00123a..bcebea2 100644 (file)
@@ -35,40 +35,39 @@ long um_mount(char * dev_name, char * dir_name, char * type,
 
 long sys_fork(void)
 {
-       long ret;
+       struct task_struct *p;
 
        current->thread.forking = 1;
-        ret = do_fork(SIGCHLD, 0, NULL, 0, NULL, NULL);
+        p = do_fork(SIGCHLD, 0, NULL, 0, NULL, NULL);
        current->thread.forking = 0;
-       return(ret);
+       return(IS_ERR(p) ? PTR_ERR(p) : p->pid);
 }
 
-long sys_clone(unsigned long clone_flags, unsigned long newsp, 
-              int *parent_tid, int *child_tid)
+long sys_clone(unsigned long clone_flags, unsigned long newsp)
 {
-       long ret;
+       struct task_struct *p;
 
        current->thread.forking = 1;
-       ret = do_fork(clone_flags, newsp, NULL, 0, parent_tid, child_tid);
+       p = do_fork(clone_flags, newsp, NULL, 0, NULL, NULL);
        current->thread.forking = 0;
-       return(ret);
+       return(IS_ERR(p) ? PTR_ERR(p) : p->pid);
 }
 
 long sys_vfork(void)
 {
-       long ret;
+       struct task_struct *p;
 
        current->thread.forking = 1;
-       ret = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0, NULL, 0, NULL, 
-                     NULL);
+       p = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0, NULL, 0, NULL, NULL);
        current->thread.forking = 0;
-       return(ret);
+       return(IS_ERR(p) ? PTR_ERR(p) : p->pid);
 }
 
 /* common code for old and new mmaps */
-long do_mmap2(struct mm_struct *mm, unsigned long addr, unsigned long len,
-             unsigned long prot, unsigned long flags, unsigned long fd,
-             unsigned long pgoff)
+static inline long do_mmap2(
+       unsigned long addr, unsigned long len,
+       unsigned long prot, unsigned long flags,
+       unsigned long fd, unsigned long pgoff)
 {
        int error = -EBADF;
        struct file * file = NULL;
@@ -80,9 +79,9 @@ long do_mmap2(struct mm_struct *mm, unsigned long addr, unsigned long len,
                        goto out;
        }
 
-       down_write(&mm->mmap_sem);
-       error = __do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
-       up_write(&mm->mmap_sem);
+       down_write(&current->mm->mmap_sem);
+       error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
+       up_write(&current->mm->mmap_sem);
 
        if (file)
                fput(file);
@@ -94,7 +93,7 @@ long sys_mmap2(unsigned long addr, unsigned long len,
               unsigned long prot, unsigned long flags,
               unsigned long fd, unsigned long pgoff)
 {
-       return do_mmap2(current->mm, addr, len, prot, flags, fd, pgoff);
+       return do_mmap2(addr, len, prot, flags, fd, pgoff);
 }
 
 /*
@@ -121,8 +120,7 @@ int old_mmap(unsigned long addr, unsigned long len,
        if (offset & ~PAGE_MASK)
                goto out;
 
-       err = do_mmap2(current->mm, addr, len, prot, flags, fd, 
-                      offset >> PAGE_SHIFT);
+       err = do_mmap2(addr, len, prot, flags, fd, offset >> PAGE_SHIFT);
  out:
        return err;
 }
@@ -143,6 +141,37 @@ int sys_pipe(unsigned long * fildes)
         return error;
 }
 
+int sys_sigaction(int sig, const struct old_sigaction *act,
+                        struct old_sigaction *oact)
+{
+       struct k_sigaction new_ka, old_ka;
+       int ret;
+
+       if (act) {
+               old_sigset_t mask;
+               if (verify_area(VERIFY_READ, act, sizeof(*act)) ||
+                   __get_user(new_ka.sa.sa_handler, &act->sa_handler) ||
+                   __get_user(new_ka.sa.sa_restorer, &act->sa_restorer))
+                       return -EFAULT;
+               __get_user(new_ka.sa.sa_flags, &act->sa_flags);
+               __get_user(mask, &act->sa_mask);
+               siginitset(&new_ka.sa.sa_mask, mask);
+       }
+
+       ret = do_sigaction(sig, act ? &new_ka : NULL, oact ? &old_ka : NULL);
+
+       if (!ret && oact) {
+               if (verify_area(VERIFY_WRITE, oact, sizeof(*oact)) ||
+                   __put_user(old_ka.sa.sa_handler, &oact->sa_handler) ||
+                   __put_user(old_ka.sa.sa_restorer, &oact->sa_restorer))
+                       return -EFAULT;
+               __put_user(old_ka.sa.sa_flags, &oact->sa_flags);
+               __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
+       }
+
+       return ret;
+}
+
 /*
  * sys_ipc() is the de-multiplexer for the SysV IPC calls..
  *
@@ -224,7 +253,7 @@ int sys_ipc (uint call, int first, int second,
                return sys_shmctl (first, second,
                                   (struct shmid_ds *) ptr);
        default:
-               return -ENOSYS;
+               return -EINVAL;
        }
 }
 
@@ -273,6 +302,11 @@ int sys_olduname(struct oldold_utsname * name)
        return error;
 }
 
+int sys_sigaltstack(const stack_t *uss, stack_t *uoss)
+{
+       return(do_sigaltstack(uss, uoss, PT_REGS_SP(&current->thread.regs)));
+}
+
 long execute_syscall(void *r)
 {
        return(CHOOSE_MODE_PROC(execute_syscall_tt, execute_syscall_skas, r));
index 724497f..078dc11 100644 (file)
@@ -55,14 +55,6 @@ void show_trace_task(struct task_struct *tsk)
        show_trace((unsigned long *)esp);
 }
 
-void show_stack(struct task_struct *task, unsigned long *sp)
-{
-       if(task)
-               show_trace_task(task);
-       else
-               show_trace(sp);
-}
-
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically
index 356ef3f..737bd2e 100644 (file)
@@ -9,27 +9,19 @@
 #include <sys/time.h>
 #include <signal.h>
 #include <errno.h>
+#include "linux/module.h"
 #include "user_util.h"
 #include "kern_util.h"
 #include "user.h"
 #include "process.h"
 #include "signal_user.h"
 #include "time_user.h"
-#include "kern_constants.h"
-
-/* XXX This really needs to be declared and initialized in a kernel file since 
- * it's in <linux/time.h>
- */
-extern struct timespec wall_to_monotonic;
 
 extern struct timeval xtime;
 
-struct timeval local_offset = { 0, 0 };
-
 void timer(void)
 {
        gettimeofday(&xtime, NULL);
-       timeradd(&xtime, &local_offset, &xtime);
 }
 
 void set_interval(int timer_type)
@@ -74,7 +66,7 @@ void switch_timers(int to_real)
                       errno);
 }
 
-void uml_idle_timer(void)
+void idle_timer(void)
 {
        if(signal(SIGVTALRM, SIG_IGN) == SIG_ERR)
                panic("Couldn't unset SIGVTALRM handler");
@@ -86,17 +78,13 @@ void uml_idle_timer(void)
 
 void time_init(void)
 {
-       struct timespec now;
        if(signal(SIGVTALRM, boot_timer_handler) == SIG_ERR)
                panic("Couldn't set SIGVTALRM handler");
        set_interval(ITIMER_VIRTUAL);
-
-       do_posix_clock_monotonic_gettime(&now);
-       wall_to_monotonic.tv_sec = -now.tv_sec;
-       wall_to_monotonic.tv_nsec = -now.tv_nsec;
 }
 
+struct timeval local_offset = { 0, 0 };
+
 void do_gettimeofday(struct timeval *tv)
 {
        unsigned long flags;
@@ -107,13 +95,15 @@ void do_gettimeofday(struct timeval *tv)
        time_unlock(flags);
 }
 
+EXPORT_SYMBOL(do_gettimeofday);
+
 int do_settimeofday(struct timespec *tv)
 {
        struct timeval now;
        unsigned long flags;
        struct timeval tv_in;
 
-       if ((unsigned long) tv->tv_nsec >= UM_NSEC_PER_SEC)
+       if ((unsigned long)tv->tv_nsec >= NSEC_PER_SEC)
                return -EINVAL;
 
        tv_in.tv_sec = tv->tv_sec;
@@ -123,10 +113,10 @@ int do_settimeofday(struct timespec *tv)
        gettimeofday(&now, NULL);
        timersub(&tv_in, &now, &local_offset);
        time_unlock(flags);
-
-       return(0);
 }
 
+EXPORT_SYMBOL(do_settimeofday);
+
 void idle_sleep(int secs)
 {
        struct timespec ts;
index 7ebbe37..752fd03 100644 (file)
@@ -30,14 +30,6 @@ int hz(void)
        return(HZ);
 }
 
-/*
- * Scheduler clock - returns current time in nanosec units.
- */
-unsigned long long sched_clock(void)
-{
-       return (unsigned long long)jiffies_64 * (1000000000 / HZ);
-}
-
 /* Changed at early boot */
 int timer_irq_inited = 0;
 
@@ -49,7 +41,7 @@ int __attribute__ ((__section__ (".unprotected"))) missed_ticks[NR_CPUS];
 
 void timer_irq(union uml_pt_regs *regs)
 {
-       int cpu = current_thread->cpu, ticks = missed_ticks[cpu];
+       int cpu = current->thread_info->cpu, ticks = missed_ticks[cpu];
 
         if(!timer_irq_inited) return;
        missed_ticks[cpu] = 0;
@@ -66,13 +58,12 @@ void boot_timer_handler(int sig)
        do_timer(&regs);
 }
 
-irqreturn_t um_timer(int irq, void *dev, struct pt_regs *regs)
+void um_timer(int irq, void *dev, struct pt_regs *regs)
 {
        do_timer(regs);
-       write_seqlock_irq(&xtime_lock);
+       write_seqlock(&xtime_lock);
        timer();
-       write_sequnlock_irq(&xtime_lock);
-       return(IRQ_HANDLED);
+       write_sequnlock(&xtime_lock);
 }
 
 long um_time(int * tloc)
@@ -90,12 +81,12 @@ long um_time(int * tloc)
 long um_stime(int * tptr)
 {
        int value;
-       struct timespec new;
+       struct timeval new;
 
        if (get_user(value, tptr))
                 return -EFAULT;
        new.tv_sec = value;
-       new.tv_nsec = 0;
+       new.tv_usec = 0;
        do_settimeofday(&new);
        return 0;
 }
@@ -134,11 +125,9 @@ void __const_udelay(um_udelay_t usecs)
 void timer_handler(int sig, union uml_pt_regs *regs)
 {
 #ifdef CONFIG_SMP
-       local_irq_disable();
        update_process_times(user_context(UPT_SP(regs)));
-       local_irq_enable();
 #endif
-       if(current_thread->cpu == 0)
+       if(current->thread_info->cpu == 0)
                timer_irq(regs);
 }
 
index 4df8461..7925dc4 100644 (file)
@@ -16,7 +16,6 @@
 #include "asm/tlbflush.h"
 #include "asm/a.out.h"
 #include "asm/current.h"
-#include "asm/irq.h"
 #include "user_util.h"
 #include "kern_util.h"
 #include "kern.h"
@@ -52,7 +51,7 @@ int handle_page_fault(unsigned long address, unsigned long ip,
        if(is_write && !(vma->vm_flags & VM_WRITE)) 
                goto out;
        page = address & PAGE_MASK;
-       if(page == (unsigned long) current_thread + PAGE_SIZE)
+       if(page == (unsigned long) current->thread_info + PAGE_SIZE)
                panic("Kernel stack overflow");
        pgd = pgd_offset(mm, page);
        pmd = pmd_offset(pgd, page);
@@ -181,11 +180,6 @@ void bus_handler(int sig, union uml_pt_regs *regs)
        else relay_signal(sig, regs);
 }
 
-void winch(int sig, union uml_pt_regs *regs)
-{
-       do_IRQ(WINCH_IRQ, regs);
-}
-
 void trap_init(void)
 {
 }
index 93d4e61..63812e5 100644 (file)
@@ -82,8 +82,6 @@ struct signal_info sig_info[] = {
                     .is_irq            = 0 },
        [ SIGILL ] { .handler           = relay_signal,
                     .is_irq            = 0 },
-       [ SIGWINCH ] { .handler         = winch,
-                      .is_irq          = 1 },
        [ SIGBUS ] { .handler           = bus_handler,
                     .is_irq            = 0 },
        [ SIGSEGV] { .handler           = segv_handler,
index 07d089e..afd9471 100644 (file)
@@ -47,17 +47,17 @@ void flush_thread_tt(void)
                do_exit(SIGKILL);
        }
 
-       if(current_thread->cpu == 0)
+       if(current->thread_info->cpu == 0)
                forward_interrupts(new_pid);
        current->thread.request.op = OP_EXEC;
        current->thread.request.u.exec.pid = new_pid;
-       unprotect_stack((unsigned long) current_thread);
+       unprotect_stack((unsigned long) current->thread_info);
        os_usr1_process(os_getpid());
 
        enable_timer();
        free_page(stack);
        protect_memory(uml_reserved, high_physmem - uml_reserved, 1, 1, 0, 1);
-       task_protections((unsigned long) current_thread);
+       task_protections((unsigned long) current->thread_info);
        force_flush_all();
        unblock_signals();
 }
index 16b8052..42425a2 100644 (file)
@@ -46,20 +46,18 @@ extern int __do_copy_from_user(void *to, const void *from, int n,
 
 static inline int copy_from_user_tt(void *to, const void *from, int n)
 {
-       if(!access_ok_tt(VERIFY_READ, from, n)) 
-               return(n);
-
-       return(__do_copy_from_user(to, from, n, &current->thread.fault_addr,
-                                  &current->thread.fault_catcher));
+       return(access_ok_tt(VERIFY_READ, from, n) ?
+              __do_copy_from_user(to, from, n, 
+                                  &current->thread.fault_addr,
+                                  &current->thread.fault_catcher) : n);
 }
 
 static inline int copy_to_user_tt(void *to, const void *from, int n)
 {
-       if(!access_ok_tt(VERIFY_WRITE, to, n))
-               return(n);
-               
-       return(__do_copy_to_user(to, from, n, &current->thread.fault_addr,
-                                &current->thread.fault_catcher));
+       return(access_ok_tt(VERIFY_WRITE, to, n) ?
+              __do_copy_to_user(to, from, n, 
+                                  &current->thread.fault_addr,
+                                  &current->thread.fault_catcher) : n);
 }
 
 extern int __do_strncpy_from_user(char *dst, const char *src, size_t n,
@@ -69,9 +67,7 @@ static inline int strncpy_from_user_tt(char *dst, const char *src, int count)
 {
        int n;
 
-       if(!access_ok_tt(VERIFY_READ, src, 1)) 
-               return(-EFAULT);
-
+       if(!access_ok_tt(VERIFY_READ, src, 1)) return(-EFAULT);
        n = __do_strncpy_from_user(dst, src, count, 
                                   &current->thread.fault_addr,
                                   &current->thread.fault_catcher);
@@ -91,11 +87,10 @@ static inline int __clear_user_tt(void *mem, int len)
 
 static inline int clear_user_tt(void *mem, int len)
 {
-       if(!access_ok_tt(VERIFY_WRITE, mem, len))
-               return(len);
-
-       return(__do_clear_user(mem, len, &current->thread.fault_addr,
-                              &current->thread.fault_catcher));
+       return(access_ok_tt(VERIFY_WRITE, mem, len) ? 
+              __do_clear_user(mem, len, 
+                              &current->thread.fault_addr,
+                              &current->thread.fault_catcher) : len);
 }
 
 extern int __do_strnlen_user(const char *str, unsigned long n,
index e1f5291..7a2f330 100644 (file)
@@ -104,10 +104,7 @@ void *switch_to_tt(void *prev, void *next, void *last)
 
 void release_thread_tt(struct task_struct *task)
 {
-       int pid = task->thread.mode.tt.extern_pid;
-
-       if(os_getpid() != pid)
-               os_kill_process(pid, 0);
+       os_kill_process(task->thread.mode.tt.extern_pid, 0);
 }
 
 void exit_thread_tt(void)
@@ -128,27 +125,27 @@ static void new_thread_handler(int sig)
        UPT_SC(&current->thread.regs.regs) = (void *) (&sig + 1);
        suspend_new_thread(current->thread.mode.tt.switch_pipe[0]);
 
-       force_flush_all();
-       if(current->thread.prev_sched != NULL)
-               schedule_tail(current->thread.prev_sched);
-       current->thread.prev_sched = NULL;
-
+       block_signals();
        init_new_thread_signals(1);
+#ifdef CONFIG_SMP
+       schedule_tail(current->thread.prev_sched);
+#endif
        enable_timer();
        free_page(current->thread.temp_stack);
        set_cmdline("(kernel thread)");
+       force_flush_all();
 
+       current->thread.prev_sched = NULL;
        change_sig(SIGUSR1, 1);
        change_sig(SIGVTALRM, 1);
        change_sig(SIGPROF, 1);
-       local_irq_enable();
+       unblock_signals();
        if(!run_kernel_thread(fn, arg, &current->thread.exec_buf))
                do_exit(0);
 }
 
 static int new_thread_proc(void *stack)
 {
-       local_irq_disable();
        init_new_thread_stack(stack, new_thread_handler);
        os_usr1_process(os_getpid());
        return(0);
@@ -168,32 +165,35 @@ void finish_fork_handler(int sig)
        UPT_SC(&current->thread.regs.regs) = (void *) (&sig + 1);
        suspend_new_thread(current->thread.mode.tt.switch_pipe[0]);
 
-       force_flush_all();
-       if(current->thread.prev_sched != NULL)
-               schedule_tail(current->thread.prev_sched);
-       current->thread.prev_sched = NULL;
-
+#ifdef CONFIG_SMP      
+       schedule_tail(NULL);
+#endif
        enable_timer();
        change_sig(SIGVTALRM, 1);
        local_irq_enable();
+       force_flush_all();
        if(current->mm != current->parent->mm)
                protect_memory(uml_reserved, high_physmem - uml_reserved, 1, 
                               1, 0, 1);
-       task_protections((unsigned long) current_thread);
+       task_protections((unsigned long) current->thread_info);
+
+       current->thread.prev_sched = NULL;
 
        free_page(current->thread.temp_stack);
-       local_irq_disable();
        change_sig(SIGUSR1, 0);
        set_user_mode(current);
 }
 
+static int sigusr1 = SIGUSR1;
+
 int fork_tramp(void *stack)
 {
+       int sig = sigusr1;
+
        local_irq_disable();
-       arch_init_thread();
        init_new_thread_stack(stack, finish_fork_handler);
 
-       os_usr1_process(os_getpid());
+       kill(os_getpid(), sig);
        return(0);
 }
 
@@ -377,8 +377,8 @@ static void mprotect_kernel_mem(int w)
 
        pages = (1 << CONFIG_KERNEL_STACK_ORDER);
 
-       start = (unsigned long) current_thread + PAGE_SIZE;
-       end = (unsigned long) current_thread + PAGE_SIZE * pages;
+       start = (unsigned long) current->thread_info + PAGE_SIZE;
+       end = (unsigned long) current + PAGE_SIZE * pages;
        protect_memory(uml_reserved, start - uml_reserved, 1, w, 1, 1);
        protect_memory(end, high_physmem - end, 1, w, 1, 1);
 
index fea1dea..65504f8 100644 (file)
@@ -293,10 +293,10 @@ void fake_child_exit(void)
 }
 
 char gdb_init_string[] = 
-"att 1 \n\
-b panic \n\
-b stop \n\
-handle SIGWINCH nostop noprint pass \n\
+"att 1
+b panic
+b stop
+handle SIGWINCH nostop noprint pass
 ";
 
 int start_debugger(char *prog, int startup, int stop, int *fd_out)
index 51502e1..6a6322a 100644 (file)
@@ -39,7 +39,7 @@ int is_tracer_winch(int pid, int fd, void *data)
                return(0);
 
        register_winch_irq(tracer_winch[0], fd, -1, data);
-       return(1);
+       return(0);
 }
 
 static void tracer_winch_handler(int sig)
@@ -401,7 +401,7 @@ static int __init uml_debug_setup(char *line, int *add)
                
                if(!strcmp(line, "go")) debug_stop = 0;
                else if(!strcmp(line, "parent")) debug_parent = 1;
-               else printf("Unknown debug option : '%s'\n", line);
+               else printk("Unknown debug option : '%s'\n", line);
 
                line = next;
        }
index 45a6bc8..537ee9f 100644 (file)
@@ -8,20 +8,15 @@
 #include <string.h>
 #include "user_util.h"
 #include "uml_uaccess.h"
-#include "task.h"
-#include "kern_util.h"
 
 int __do_copy_from_user(void *to, const void *from, int n,
                        void **fault_addr, void **fault_catcher)
 {
-       struct tt_regs save = TASK_REGS(get_current())->tt;
        unsigned long fault;
        int faulted;
 
        fault = __do_user_copy(to, from, n, fault_addr, fault_catcher,
                               __do_copy, &faulted);
-       TASK_REGS(get_current())->tt = save;
-
        if(!faulted) return(0);
        else return(n - (fault - (unsigned long) from));
 }
@@ -34,14 +29,11 @@ static void __do_strncpy(void *dst, const void *src, int count)
 int __do_strncpy_from_user(char *dst, const char *src, unsigned long count,
                           void **fault_addr, void **fault_catcher)
 {
-       struct tt_regs save = TASK_REGS(get_current())->tt;
        unsigned long fault;
        int faulted;
 
        fault = __do_user_copy(dst, src, count, fault_addr, fault_catcher,
                               __do_strncpy, &faulted);
-       TASK_REGS(get_current())->tt = save;
-
        if(!faulted) return(strlen(dst));
        else return(-1);
 }
@@ -54,14 +46,11 @@ static void __do_clear(void *to, const void *from, int n)
 int __do_clear_user(void *mem, unsigned long len,
                    void **fault_addr, void **fault_catcher)
 {
-       struct tt_regs save = TASK_REGS(get_current())->tt;
        unsigned long fault;
        int faulted;
 
        fault = __do_user_copy(mem, NULL, len, fault_addr, fault_catcher,
                               __do_clear, &faulted);
-       TASK_REGS(get_current())->tt = save;
-
        if(!faulted) return(0);
        else return(len - (fault - (unsigned long) mem));
 }
@@ -69,7 +58,6 @@ int __do_clear_user(void *mem, unsigned long len,
 int __do_strnlen_user(const char *str, unsigned long n,
                      void **fault_addr, void **fault_catcher)
 {
-       struct tt_regs save = TASK_REGS(get_current())->tt;
        int ret;
        unsigned long *faddrp = (unsigned long *)fault_addr;
        jmp_buf jbuf;
@@ -83,8 +71,6 @@ int __do_strnlen_user(const char *str, unsigned long n,
        }
        *fault_addr = NULL;
        *fault_catcher = NULL;
-
-       TASK_REGS(get_current())->tt = save;
        return ret;
 }
 
index 2b1e8b0..61c4cc3 100644 (file)
@@ -13,7 +13,6 @@
 #include <sys/time.h>
 #include "init.h"
 #include "user.h"
-#include "kern_util.h"
 #include "os.h"
 
 #define TTY_LOG_DIR "./"
@@ -25,40 +24,29 @@ static int tty_log_fd = -1;
 #define TTY_LOG_OPEN 1
 #define TTY_LOG_CLOSE 2
 #define TTY_LOG_WRITE 3
-#define TTY_LOG_EXEC 4
-
-#define TTY_READ 1
-#define TTY_WRITE 2
 
 struct tty_log_buf {
        int what;
        unsigned long tty;
        int len;
-       int direction;
-       unsigned long sec;
-       unsigned long usec;
 };
 
-int open_tty_log(void *tty, void *current_tty)
+int open_tty_log(void *tty)
 {
        struct timeval tv;
        struct tty_log_buf data;
        char buf[strlen(tty_log_dir) + sizeof("01234567890-01234567\0")];
        int fd;
 
-       gettimeofday(&tv, NULL);
        if(tty_log_fd != -1){
-               data = ((struct tty_log_buf) { .what    = TTY_LOG_OPEN,
-                                              .tty  = (unsigned long) tty,
-                                              .len  = sizeof(current_tty),
-                                              .direction = 0,
-                                              .sec = tv.tv_sec,
-                                              .usec = tv.tv_usec } );
+               data = ((struct tty_log_buf) { what :   TTY_LOG_OPEN,
+                                              tty : (unsigned long) tty,
+                                              len : 0 });
                write(tty_log_fd, &data, sizeof(data));
-               write(tty_log_fd, &current_tty, data.len);
                return(tty_log_fd);
        }
 
+       gettimeofday(&tv, NULL);
        sprintf(buf, "%s/%0u-%0u", tty_log_dir, (unsigned int) tv.tv_sec, 
                (unsigned int) tv.tv_usec);
 
@@ -74,114 +62,30 @@ int open_tty_log(void *tty, void *current_tty)
 void close_tty_log(int fd, void *tty)
 {
        struct tty_log_buf data;
-       struct timeval tv;
 
        if(tty_log_fd != -1){
-               gettimeofday(&tv, NULL);
-               data = ((struct tty_log_buf) { .what    = TTY_LOG_CLOSE,
-                                              .tty  = (unsigned long) tty,
-                                              .len  = 0,
-                                              .direction = 0,
-                                              .sec = tv.tv_sec,
-                                              .usec = tv.tv_usec } );
+               data = ((struct tty_log_buf) { what :   TTY_LOG_CLOSE,
+                                              tty : (unsigned long) tty,
+                                              len : 0 });
                write(tty_log_fd, &data, sizeof(data));
                return;
        }
        close(fd);
 }
 
-static int log_chunk(int fd, const char *buf, int len)
-{
-       int total = 0, try, missed, n;
-       char chunk[64];
-
-       while(len > 0){
-               try = (len > sizeof(chunk)) ? sizeof(chunk) : len;
-               missed = copy_from_user_proc(chunk, (char *) buf, try);
-               try -= missed;
-               n = write(fd, chunk, try);
-               if(n != try)
-                       return(-errno);
-               if(missed != 0)
-                       return(-EFAULT);
-
-               len -= try;
-               total += try;
-               buf += try;
-       }
-
-       return(total);
-}
-
-int write_tty_log(int fd, const char *buf, int len, void *tty, int is_read)
+int write_tty_log(int fd, char *buf, int len, void *tty)
 {
-       struct timeval tv;
        struct tty_log_buf data;
-       int direction;
 
        if(fd == tty_log_fd){
-               gettimeofday(&tv, NULL);
-               direction = is_read ? TTY_READ : TTY_WRITE;
-               data = ((struct tty_log_buf) { .what    = TTY_LOG_WRITE,
-                                              .tty  = (unsigned long) tty,
-                                              .len  = len,
-                                              .direction = direction,
-                                              .sec = tv.tv_sec,
-                                              .usec = tv.tv_usec } );
+               data = ((struct tty_log_buf) { what :   TTY_LOG_WRITE,
+                                              tty : (unsigned long) tty,
+                                              len : len });
                write(tty_log_fd, &data, sizeof(data));
        }
-
-       return(log_chunk(fd, buf, len));
-}
-
-void log_exec(char **argv, void *tty)
-{
-       struct timeval tv;
-       struct tty_log_buf data;
-       char **ptr,*arg;
-       int len;
-       
-       if(tty_log_fd == -1) return;
-
-       gettimeofday(&tv, NULL);
-
-       len = 0;
-       for(ptr = argv; ; ptr++){
-               if(copy_from_user_proc(&arg, ptr, sizeof(arg)))
-                       return;
-               if(arg == NULL) break;
-               len += strlen_user_proc(arg);
-       }
-
-       data = ((struct tty_log_buf) { .what    = TTY_LOG_EXEC,
-                                      .tty  = (unsigned long) tty,
-                                      .len  = len,
-                                      .direction = 0,
-                                      .sec = tv.tv_sec,
-                                      .usec = tv.tv_usec } );
-       write(tty_log_fd, &data, sizeof(data));
-
-       for(ptr = argv; ; ptr++){
-               if(copy_from_user_proc(&arg, ptr, sizeof(arg)))
-                       return;
-               if(arg == NULL) break;
-               log_chunk(tty_log_fd, arg, strlen_user_proc(arg));
-       }
+       return(write(fd, buf, len));
 }
 
-extern void register_tty_logger(int (*opener)(void *, void *),
-                               int (*writer)(int, const char *, int, 
-                                             void *, int),
-                               void (*closer)(int, void *));
-
-static int register_logger(void)
-{
-       register_tty_logger(open_tty_log, write_tty_log, close_tty_log);
-       return(0);
-}
-
-__uml_initcall(register_logger);
-
 static int __init set_tty_log_dir(char *name, int *add)
 {
        tty_log_dir = name;
@@ -200,7 +104,7 @@ static int __init set_tty_log_fd(char *name, int *add)
 
        tty_log_fd = strtoul(name, &end, 0);
        if((*end != '\0') || (end == name)){
-               printf("set_tty_log_fd - strtoul failed on '%s'\n", name);
+               printk("set_tty_log_fd - strtoul failed on '%s'\n", name);
                tty_log_fd = -1;
        }
        return 0;
index 02179f6..445d143 100644 (file)
 #include "mode_kern.h"
 #include "mode.h"
 
-#define DEFAULT_COMMAND_LINE "root=98:0"
+#define DEFAULT_COMMAND_LINE "root=6200"
 
 struct cpuinfo_um boot_cpu_data = { 
        .loops_per_jiffy        = 0,
        .ipi_pipe               = { -1, -1 }
 };
 
-/* Placeholder to make UML link until the vsyscall stuff is actually 
- * implemented
- */
-void *__kernel_vsyscall;
-
 unsigned long thread_saved_pc(struct task_struct *task)
 {
        return(os_process_pc(CHOOSE_MODE_PROC(thread_pid_tt, thread_pid_skas,
@@ -66,14 +61,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
                return 0;
 #endif
 
-       seq_printf(m, "processor\t: %d\n", index);
-       seq_printf(m, "vendor_id\t: User Mode Linux\n");
-       seq_printf(m, "model name\t: UML\n");
-       seq_printf(m, "mode\t\t: %s\n", CHOOSE_MODE("tt", "skas"));
-       seq_printf(m, "host\t\t: %s\n", host_info);
-       seq_printf(m, "bogomips\t: %lu.%02lu\n\n",
+       seq_printf(m, "bogomips\t: %lu.%02lu\n",
                   loops_per_jiffy/(500000/HZ),
                   (loops_per_jiffy/(5000/HZ)) % 100);
+       seq_printf(m, "host\t\t: %s\n", host_info);
 
        return(0);
 }
@@ -143,12 +134,12 @@ void set_cmdline(char *cmd)
        if(umid != NULL){
                snprintf(argv1_begin, 
                         (argv1_end - argv1_begin) * sizeof(*ptr), 
-                        "(%s) ", umid);
+                        "(%s)", umid);
                ptr = &argv1_begin[strlen(argv1_begin)];
        }
        else ptr = argv1_begin;
 
-       snprintf(ptr, (argv1_end - ptr) * sizeof(*ptr), "[%s]", cmd);
+       snprintf(ptr, (argv1_end - ptr) * sizeof(*ptr), " [%s]", cmd);
        memset(argv1_begin + strlen(argv1_begin), '\0', 
               argv1_end - argv1_begin - strlen(argv1_begin));
 #endif
@@ -188,7 +179,7 @@ __uml_setup("root=", uml_root_setup,
 static int __init uml_ncpus_setup(char *line, int *add)
 {
        if (!sscanf(line, "%d", &ncpus)) {
-               printf("Couldn't parse [%s]\n", line);
+               printk("Couldn't parse [%s]\n", line);
                return -1;
        }
 
@@ -219,7 +210,7 @@ static int __init mode_tt_setup(char *line, int *add)
 
 static int __init mode_tt_setup(char *line, int *add)
 {
-       printf("CONFIG_MODE_TT disabled - 'mode=tt' ignored\n");
+       printk("CONFIG_MODE_TT disabled - 'mode=tt' ignored\n");
        return(0);
 }
 
@@ -230,7 +221,7 @@ static int __init mode_tt_setup(char *line, int *add)
 
 static int __init mode_tt_setup(char *line, int *add)
 {
-       printf("CONFIG_MODE_SKAS disabled - 'mode=tt' redundant\n");
+       printk("CONFIG_MODE_SKAS disabled - 'mode=tt' redundant\n");
        return(0);
 }
 
@@ -378,7 +369,6 @@ int linux_main(int argc, char **argv)
                2 * PAGE_SIZE;
 
        task_protections((unsigned long) &init_thread_info);
-       os_flush_stdout();
 
        return(CHOOSE_MODE(start_uml_tt(), start_uml_skas()));
 }
index 9daeb0f..1da1a0d 100644 (file)
@@ -33,19 +33,18 @@ static char *uml_dir = UML_DIR;
 static int umid_is_random = 1;
 static int umid_inited = 0;
 
-static int make_umid(int (*printer)(const char *fmt, ...));
+static int make_umid(void);
 
-static int __init set_umid(char *name, int is_random, 
-                          int (*printer)(const char *fmt, ...))
+static int __init set_umid(char *name, int is_random)
 {
        if(umid_inited){
-               (*printer)("Unique machine name can't be set twice\n");
+               printk("Unique machine name can't be set twice\n");
                return(-1);
        }
 
        if(strlen(name) > UMID_LEN - 1)
-               (*printer)("Unique machine name is being truncated to %s "
-                          "characters\n", UMID_LEN);
+               printk("Unique machine name is being truncated to %s "
+                      "characters\n", UMID_LEN);
        strlcpy(umid, name, sizeof(umid));
 
        umid_is_random = is_random;
@@ -55,7 +54,7 @@ static int __init set_umid(char *name, int is_random,
 
 static int __init set_umid_arg(char *name, int *add)
 {
-       return(set_umid(name, 0, printf));
+       return(set_umid(name, 0));
 }
 
 __uml_setup("umid=", set_umid_arg,
@@ -68,7 +67,7 @@ int __init umid_file_name(char *name, char *buf, int len)
 {
        int n;
 
-       if(!umid_inited && make_umid(printk)) return(-1);
+       if(!umid_inited && make_umid()) return(-1);
 
        n = strlen(uml_dir) + strlen(umid) + strlen(name) + 1;
        if(n > len){
@@ -93,14 +92,14 @@ static int __init create_pid_file(void)
        fd = os_open_file(file, of_create(of_excl(of_rdwr(OPENFLAGS()))), 
                          0644);
        if(fd < 0){
-               printf("Open of machine pid file \"%s\" failed - "
+               printk("Open of machine pid file \"%s\" failed - "
                       "errno = %d\n", file, -fd);
                return 0;
        }
 
        sprintf(pid, "%d\n", os_getpid());
        if(write(fd, pid, strlen(pid)) != strlen(pid))
-               printf("Write of pid file failed - errno = %d\n", errno);
+               printk("Write of pid file failed - errno = %d\n", errno);
        close(fd);
        return 0;
 }
@@ -198,7 +197,7 @@ static int __init set_uml_dir(char *name, int *add)
        if((strlen(name) > 0) && (name[strlen(name) - 1] != '/')){
                uml_dir = malloc(strlen(name) + 1);
                if(uml_dir == NULL){
-                       printf("Failed to malloc uml_dir - error = %d\n",
+                       printk("Failed to malloc uml_dir - error = %d\n",
                               errno);
                        uml_dir = name;
                        return(0);
@@ -218,7 +217,7 @@ static int __init make_uml_dir(void)
                char *home = getenv("HOME");
 
                if(home == NULL){
-                       printf("make_uml_dir : no value in environment for "
+                       printk("make_uml_dir : no value in environment for "
                               "$HOME\n");
                        exit(1);
                }
@@ -240,25 +239,25 @@ static int __init make_uml_dir(void)
        strcpy(uml_dir, dir);
        
        if((mkdir(uml_dir, 0777) < 0) && (errno != EEXIST)){
-               printf("Failed to mkdir %s - errno = %i\n", uml_dir, errno);
+               printk("Failed to mkdir %s - errno = %i\n", uml_dir, errno);
                return(-1);
        }
        return 0;
 }
 
-static int __init make_umid(int (*printer)(const char *fmt, ...))
+static int __init make_umid(void)
 {
        int fd, err;
        char tmp[strlen(uml_dir) + UMID_LEN + 1];
 
        strlcpy(tmp, uml_dir, sizeof(tmp));
 
-       if(!umid_inited){
+       if(*umid == 0){
                strcat(tmp, "XXXXXX");
                fd = mkstemp(tmp);
                if(fd < 0){
-                       (*printer)("make_umid - mkstemp failed, errno = %d\n",
-                                  errno);
+                       printk("make_umid - mkstemp failed, errno = %d\n",
+                              errno);
                        return(1);
                }
 
@@ -268,7 +267,7 @@ static int __init make_umid(int (*printer)(const char *fmt, ...))
                 * for directories.
                 */
                unlink(tmp);
-               set_umid(&tmp[strlen(uml_dir)], 1, printer);
+               set_umid(&tmp[strlen(uml_dir)], 1);
        }
        
        sprintf(tmp, "%s%s", uml_dir, umid);
@@ -276,14 +275,14 @@ static int __init make_umid(int (*printer)(const char *fmt, ...))
        if((err = mkdir(tmp, 0777)) < 0){
                if(errno == EEXIST){
                        if(not_dead_yet(tmp)){
-                               (*printer)("umid '%s' is in use\n", umid);
+                               printk("umid '%s' is in use\n", umid);
                                return(-1);
                        }
                        err = mkdir(tmp, 0777);
                }
        }
        if(err < 0){
-               (*printer)("Failed to create %s - errno = %d\n", umid, errno);
+               printk("Failed to create %s - errno = %d\n", umid, errno);
                return(-1);
        }
 
@@ -296,13 +295,7 @@ __uml_setup("uml_dir=", set_uml_dir,
 );
 
 __uml_postsetup(make_uml_dir);
-
-static int __init make_umid_setup(void)
-{
-       return(make_umid(printf));
-}
-
-__uml_postsetup(make_umid_setup);
+__uml_postsetup(make_umid);
 __uml_postsetup(create_pid_file);
 
 /*
index 3006f42..2d32ea3 100644 (file)
@@ -27,7 +27,7 @@ struct module_symbol
 #define __MODULE_STRING_1(x)   #x
 #define __MODULE_STRING(x)     __MODULE_STRING_1(x)
 
-#if !defined(AUTOCONF_INCLUDED)
+#if !defined(__AUTOCONF_INCLUDED__)
 
 #define __EXPORT_SYMBOL(sym,str)   error config_must_be_included_before_module
 #define EXPORT_SYMBOL(var)        error config_must_be_included_before_module
index 311d753..a953a08 100644 (file)
@@ -119,6 +119,17 @@ int wait_for_stop(int pid, int sig, int cont_type, void *relay)
        }
 }
 
+int clone_and_wait(int (*fn)(void *), void *arg, void *sp, int flags)
+{
+       int pid;
+
+       pid = clone(fn, sp, flags, arg);
+       if(pid < 0) return(-1);
+       wait_for_stop(pid, SIGSTOP, PTRACE_CONT, NULL);
+       ptrace(PTRACE_CONT, pid, 0, 0);
+       return(pid);
+}
+
 int raw(int fd, int complain)
 {
        struct termios tt;
index ee6eaa9..c858f11 100644 (file)
@@ -142,7 +142,7 @@ static int tuntap_open(void *data)
                        return(-errno);
                }
                memset(&ifr, 0, sizeof(ifr));
-               ifr.ifr_flags = IFF_TAP | IFF_NO_PI;
+               ifr.ifr_flags = IFF_TAP;
                strlcpy(ifr.ifr_name, pri->dev_name, sizeof(ifr.ifr_name));
                if(ioctl(pri->fd, TUNSETIFF, (void *) &ifr) < 0){
                        printk("TUNSETIFF failed, errno = %d", errno);
index 871b990..e622db0 100644 (file)
@@ -315,7 +315,7 @@ int os_rcv_fd(int fd, int *helper_pid_out)
        return(new);
 }
 
-int create_unix_socket(char *file, int len, int close_on_exec)
+int create_unix_socket(char *file, int len)
 {
        struct sockaddr_un addr;
        int sock, err;
@@ -327,10 +327,6 @@ int create_unix_socket(char *file, int len, int close_on_exec)
                return(-errno);
        }
 
-       if(close_on_exec && fcntl(sock, F_SETFD, 1) < 0)
-               printk("create_unix_socket : Setting FD_CLOEXEC failed, "
-                      "errno = %d", errno);
-
        addr.sun_family = AF_UNIX;
 
        /* XXX Be more careful about overflow */
@@ -346,37 +342,6 @@ int create_unix_socket(char *file, int len, int close_on_exec)
        return(sock);
 }
 
-void os_flush_stdout(void)
-{
-       fflush(stdout);
-}
-
-int os_lock_file(int fd, int excl)
-{
-       int type = excl ? F_WRLCK : F_RDLCK;
-       struct flock lock = ((struct flock) { .l_type   = type,
-                                             .l_whence = SEEK_SET,
-                                             .l_start  = 0,
-                                             .l_len    = 0 } );
-       int err, save;
-
-       err = fcntl(fd, F_SETLK, &lock);
-       if(!err)
-               goto out;
-
-       save = -errno;
-       err = fcntl(fd, F_GETLK, &lock);
-       if(err){
-               err = -errno;
-               goto out;
-       }
-       
-       printk("F_SETLK failed, file already locked by pid %d\n", lock.l_pid);
-       err = save;
- out:
-       return(err);
-}
-
 /*
  * Overrides for Emacs so that we follow Linus's tabbing style.
  * Emacs will notice this stuff at the end of the file and automatically
index 4855ded..7525859 100644 (file)
@@ -1,8 +1,7 @@
-obj-y = bugs.o checksum.o extable.o fault.o ksyms.o ldt.o ptrace.o \
-       ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o
+obj-y = bugs.o checksum.o extable.o fault.o ksyms.o ldt.o module.o \
+       ptrace.o ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o
 
 obj-$(CONFIG_HIGHMEM) += highmem.o
-obj-$(CONFIG_MODULES) += module.o
 
 USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o
 USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
@@ -10,8 +9,6 @@ USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
 SYMLINKS = semaphore.c highmem.c module.c
 SYMLINKS := $(foreach f,$(SYMLINKS),$(src)/$f)
 
-clean-files := $(SYMLINKS)
-
 semaphore.c-dir = kernel
 highmem.c-dir = mm
 module.c-dir = kernel
@@ -27,7 +24,8 @@ $(USER_OBJS) : %.o: %.c
 $(SYMLINKS): 
        $(call make_link,$@)
 
-subdir- := util
+clean:
+       $(MAKE) -C util clean
 
 fastdep:
 
index 4be8822..3905bab 100644 (file)
@@ -8,7 +8,6 @@
 #include <errno.h>
 #include <string.h>
 #include <sys/signal.h>
-#include <asm/ldt.h>
 #include "kern_util.h"
 #include "user.h"
 #include "sysdep/ptrace.h"
@@ -17,8 +16,8 @@
 #define MAXTOKEN 64
 
 /* Set during early boot */
-int host_has_cmov = 1;
-int host_has_xmm = 0;
+int cpu_has_cmov = 1;
+int cpu_has_xmm = 0;
 
 static char token(int fd, char *buf, int len, char stop)
 {
@@ -105,25 +104,6 @@ static int check_cpu_feature(char *feature, int *have_it)
        return(1);
 }
 
-static void disable_lcall(void)
-{
-       struct user_desc ldt;
-       int err;
-
-       bzero(&ldt, sizeof(ldt));
-       ldt.entry_number = 7;
-       ldt.base_addr = 0;
-       ldt.limit = 0;
-       err = modify_ldt(1, &ldt, sizeof(ldt));
-       if(err)
-               printk("Failed to disable lcall7 - errno = %d\n", errno);
-}
-
-void arch_init_thread(void)
-{
-       disable_lcall();
-}
-
 void arch_check_bugs(void)
 {
        int have_it;
@@ -133,8 +113,8 @@ void arch_check_bugs(void)
                       "checks\n");
                return;
        }
-       if(check_cpu_feature("cmov", &have_it)) host_has_cmov = have_it;
-       if(check_cpu_feature("xmm", &have_it)) host_has_xmm = have_it;
+       if(check_cpu_feature("cmov", &have_it)) cpu_has_cmov = have_it;
+       if(check_cpu_feature("xmm", &have_it)) cpu_has_xmm = have_it;
 }
 
 int arch_handle_signal(int sig, union uml_pt_regs *regs)
@@ -150,18 +130,18 @@ int arch_handle_signal(int sig, union uml_pt_regs *regs)
        if((*((char *) ip) != 0x0f) || ((*((char *) (ip + 1)) & 0xf0) != 0x40))
                return(0);
 
-       if(host_has_cmov == 0)
+       if(cpu_has_cmov == 0)
                panic("SIGILL caused by cmov, which this processor doesn't "
                      "implement, boot a filesystem compiled for older "
                      "processors");
-       else if(host_has_cmov == 1)
+       else if(cpu_has_cmov == 1)
                panic("SIGILL caused by cmov, which this processor claims to "
                      "implement");
-       else if(host_has_cmov == -1)
+       else if(cpu_has_cmov == -1)
                panic("SIGILL caused by cmov, couldn't tell if this processor "
                      "implements it, boot a filesystem compiled for older "
                      "processors");
-       else panic("Bad value for host_has_cmov (%d)", host_has_cmov);
+       else panic("Bad value for cpu_has_cmov (%d)", cpu_has_cmov);
        return(0);
 }
 
index d480a66..70da623 100644 (file)
@@ -39,7 +39,7 @@ static void write_debugregs(int pid, unsigned long *regs)
        nregs = sizeof(dummy->u_debugreg)/sizeof(dummy->u_debugreg[0]);
        for(i = 0; i < nregs; i++){
                if((i == 4) || (i == 5)) continue;
-               if(ptrace(PTRACE_POKEUSER, pid, &dummy->u_debugreg[i],
+               if(ptrace(PTRACE_POKEUSR, pid, &dummy->u_debugreg[i],
                          regs[i]) < 0)
                        printk("write_debugregs - ptrace failed, "
                               "errno = %d\n", errno);
@@ -54,7 +54,7 @@ static void read_debugregs(int pid, unsigned long *regs)
        dummy = NULL;
        nregs = sizeof(dummy->u_debugreg)/sizeof(dummy->u_debugreg[0]);
        for(i = 0; i < nregs; i++){
-               regs[i] = ptrace(PTRACE_PEEKUSER, pid, 
+               regs[i] = ptrace(PTRACE_PEEKUSR, pid, 
                                 &dummy->u_debugreg[i], 0);
        }
 }
index 6c4e2f2..d182fb5 100644 (file)
@@ -9,15 +9,7 @@ SECTIONS
 {
   . = START + SIZEOF_HEADERS;
 
-#if 0
   . = ALIGN(4096);
-#else
-/* dirty trick time -- don't page align the binary start, otherwise the
- * first page will not be mapped and a tls-enabled glibc will crash
- * while trying to read the ELF headers located there ... */
-  . = ALIGN(2048);
-#endif
-
   __binary_start = .;
 #ifdef MODE_TT
   .thread_private : {
@@ -34,11 +26,7 @@ SECTIONS
   . = ALIGN(4096);             /* Init code and data */
   _stext = .;
   __init_begin = .;
-  .init.text : { 
-       _sinittext = .;
-       *(.init.text)
-       _einittext = .;
-  }
+  .text.init : { *(.text.init) }
   . = ALIGN(4096);
   .text      :
   {
@@ -50,7 +38,7 @@ SECTIONS
 
   #include "asm/common.lds.S"
 
-  init.data : { *(init.data) }
+  .data.init : { *(.data.init) }
   .data    :
   {
     . = ALIGN(KERNEL_STACK_SIZE);              /* init_task */
index cdcb123..7e74934 100644 (file)
@@ -1,6 +1,5 @@
 #include "linux/kernel.h"
 #include "linux/stringify.h"
-#include "linux/time.h"
 #include "asm/page.h"
 
 extern void print_head(void);
@@ -12,7 +11,6 @@ int main(int argc, char **argv)
 {
   print_head();
   print_constant_int("UM_KERN_PAGE_SIZE", PAGE_SIZE);
-
   print_constant_str("UM_KERN_EMERG", KERN_EMERG);
   print_constant_str("UM_KERN_ALERT", KERN_ALERT);
   print_constant_str("UM_KERN_CRIT", KERN_CRIT);
@@ -21,8 +19,6 @@ int main(int argc, char **argv)
   print_constant_str("UM_KERN_NOTICE", KERN_NOTICE);
   print_constant_str("UM_KERN_INFO", KERN_INFO);
   print_constant_str("UM_KERN_DEBUG", KERN_DEBUG);
-
-  print_constant_int("UM_NSEC_PER_SEC", NSEC_PER_SEC);
   print_tail();
   return(0);
 }
index ffa66b3..a5d918e 100644 (file)
@@ -81,16 +81,18 @@ volatile unsigned long irq_err_count, spurious_count;
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i;
+       int i = *(loff_t *) v;
        struct irqaction * action;
        unsigned long flags;
 
-       seq_puts(p, "           ");
-       for (i=0; i < 1 /*smp_num_cpus*/; i++)
-               seq_printf(p, "CPU%d       ", i);
-       seq_putc(p, '\n');
+       if (i == 0) {
+               seq_puts(p, "           ");
+               for (i=0; i < 1 /*smp_num_cpus*/; i++)
+                       seq_printf(p, "CPU%d       ", i);
+               seq_putc(p, '\n');
+       }
 
-       for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                int j, count, num;
                const char *type_name = irq_desc[i].handler->typename;
                spin_lock_irqsave(&irq_desc[j].lock, flags);
@@ -121,8 +123,8 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
 skip:
                spin_unlock_irqrestore(&irq_desc[j].lock, flags);
-       }
-       seq_printf(p, "ERR: %10lu\n", irq_err_count);
+       } else if (i == NR_IRQS)
+               seq_printf(p, "ERR: %10lu\n", irq_err_count);
        return 0;
 }
 
index 88c5bb7..3c49b4e 100644 (file)
@@ -314,7 +314,7 @@ config SOFTWARE_SUSPEND
          This option is close to getting stable. However there is still some
          absence of features.
 
-         For more information take a look at Documentation/swsusp.txt.
+         For more information take a look at Documentation/power/swsusp.txt.
 
 source "drivers/acpi/Kconfig"
 
@@ -333,6 +333,11 @@ config PCI_DIRECT
        depends on PCI
        default y
 
+# the drivers/pci/msi.c code needs to be fixed first before enabling
+config PCI_USE_VECTOR
+       bool
+       default n
+
 source "drivers/pci/Kconfig"
 
 config HOTPLUG
@@ -371,6 +376,12 @@ config IA32_EMULATION
          turn this on, unless you're 100% sure that you don't have any 32-bit programs
          left.
 
+config IA32_AOUT
+       bool "IA32 a.out support"
+       depends on IA32_EMULATION
+       help
+         Support old a.out binaries in the 32bit emulation.
+
 config COMPAT
        bool
        depends on IA32_EMULATION
index 346ea8f..90f2452 100644 (file)
@@ -21,6 +21,7 @@
 
 # User may have a custom install script
 
+if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi
 if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi
 
 # Default install - same as make zlilo
index 555a24e..6f08987 100644 (file)
@@ -59,6 +59,7 @@ CONFIG_X86_CPUID=y
 CONFIG_X86_IO_APIC=y
 CONFIG_X86_LOCAL_APIC=y
 CONFIG_MTRR=y
+# CONFIG_HUGETLB_PAGE is not set
 CONFIG_SMP=y
 # CONFIG_PREEMPT is not set
 CONFIG_K8_NUMA=y
@@ -78,9 +79,9 @@ CONFIG_SOFTWARE_SUSPEND=y
 #
 # ACPI (Advanced Configuration and Power Interface) Support
 #
+# CONFIG_ACPI_HT is not set
 CONFIG_ACPI=y
 CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
 CONFIG_ACPI_SLEEP=y
 CONFIG_ACPI_SLEEP_PROC_FS=y
 CONFIG_ACPI_AC=y
@@ -93,29 +94,11 @@ CONFIG_ACPI_THERMAL=y
 CONFIG_ACPI_TOSHIBA=y
 CONFIG_ACPI_DEBUG=y
 CONFIG_ACPI_BUS=y
+CONFIG_ACPI_INTERPRETER=y
 CONFIG_ACPI_EC=y
 CONFIG_ACPI_POWER=y
 CONFIG_ACPI_PCI=y
 CONFIG_ACPI_SYSTEM=y
-CONFIG_ACPI_RELAXED_AML=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_PROC_INTF=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_TABLE=y
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=y
 
 #
 # Bus options (PCI etc.)
@@ -263,7 +246,6 @@ CONFIG_BLK_DEV_SD=y
 # CONFIG_SCSI_AIC79XX is not set
 # CONFIG_SCSI_ADVANSYS is not set
 # CONFIG_SCSI_MEGARAID is not set
-# CONFIG_SCSI_SATA is not set
 # CONFIG_SCSI_BUSLOGIC is not set
 # CONFIG_SCSI_CPQFCTS is not set
 # CONFIG_SCSI_DMX3191D is not set
@@ -343,9 +325,7 @@ CONFIG_IPV6_SCTP__=y
 # CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
 # CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
+# CONFIG_LLC is not set
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_NET_DIVERT is not set
@@ -378,7 +358,7 @@ CONFIG_NETDEVICES=y
 # Ethernet (10 or 100Mbit)
 #
 CONFIG_NET_ETHERNET=y
-CONFIG_MII=y
+# CONFIG_MII is not set
 # CONFIG_HAPPYMEAL is not set
 # CONFIG_SUNGEM is not set
 # CONFIG_NET_VENDOR_3COM is not set
@@ -408,6 +388,7 @@ CONFIG_8139TOO=m
 # CONFIG_SIS900 is not set
 # CONFIG_EPIC100 is not set
 # CONFIG_SUNDANCE is not set
+# CONFIG_TLAN is not set
 # CONFIG_VIA_RHINE is not set
 
 #
@@ -440,10 +421,10 @@ CONFIG_TIGON3=y
 # CONFIG_NET_RADIO is not set
 
 #
-# Token Ring devices
+# Token Ring devices (depends on LLC=y)
 #
-# CONFIG_TR is not set
 # CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
 # CONFIG_SHAPER is not set
 
 #
@@ -462,11 +443,6 @@ CONFIG_TIGON3=y
 # CONFIG_IRDA is not set
 
 #
-# Bluetooth support
-#
-# CONFIG_BT is not set
-
-#
 # ISDN subsystem
 #
 # CONFIG_ISDN_BOOL is not set
@@ -509,7 +485,6 @@ CONFIG_KEYBOARD_ATKBD=y
 # CONFIG_KEYBOARD_NEWTON is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_PS2_SYNAPTICS is not set
 # CONFIG_MOUSE_SERIAL is not set
 # CONFIG_INPUT_JOYSTICK is not set
 # CONFIG_INPUT_TOUCHSCREEN is not set
@@ -529,7 +504,6 @@ CONFIG_HW_CONSOLE=y
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 # CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
 # CONFIG_SERIAL_8250_EXTENDED is not set
 
 #
@@ -546,11 +520,7 @@ CONFIG_UNIX98_PTY_COUNT=256
 # CONFIG_I2C is not set
 
 #
-# I2C Algorithms
-#
-
-#
-# I2C Hardware Bus support
+# I2C Hardware Sensors Mainboard support
 #
 
 #
@@ -579,6 +549,7 @@ CONFIG_RTC=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
+# CONFIG_SONYPI is not set
 
 #
 # Ftape, the floppy tape device driver
@@ -588,7 +559,6 @@ CONFIG_AGP_AMD64=y
 # CONFIG_DRM is not set
 # CONFIG_MWAVE is not set
 CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=256
 CONFIG_HANGCHECK_TIMER=y
 
 #
@@ -649,13 +619,10 @@ CONFIG_ISO9660_FS=y
 # Pseudo filesystems
 #
 CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
 # CONFIG_DEVFS_FS is not set
 CONFIG_DEVPTS_FS=y
 # CONFIG_DEVPTS_FS_XATTR is not set
 CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
 CONFIG_RAMFS=y
 
 #
@@ -680,7 +647,6 @@ CONFIG_RAMFS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
 CONFIG_NFSD=y
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V4 is not set
@@ -741,15 +707,13 @@ CONFIG_SOUND_PRIME=y
 # CONFIG_SOUND_MAESTRO is not set
 # CONFIG_SOUND_MAESTRO3 is not set
 CONFIG_SOUND_ICH=y
+# CONFIG_SOUND_RME96XX is not set
 # CONFIG_SOUND_SONICVIBES is not set
 # CONFIG_SOUND_TRIDENT is not set
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
 # CONFIG_SOUND_VIA82CXXX is not set
 # CONFIG_SOUND_OSS is not set
 # CONFIG_SOUND_ALI5455 is not set
 # CONFIG_SOUND_FORTE is not set
-# CONFIG_SOUND_RME96XX is not set
 # CONFIG_SOUND_AD1980 is not set
 
 #
@@ -759,6 +723,11 @@ CONFIG_SOUND_ICH=y
 # CONFIG_USB_GADGET is not set
 
 #
+# Bluetooth support
+#
+# CONFIG_BT is not set
+
+#
 # Profiling support
 #
 CONFIG_PROFILING=y
@@ -775,6 +744,7 @@ CONFIG_MAGIC_SYSRQ=y
 # CONFIG_DEBUG_INFO is not set
 # CONFIG_FRAME_POINTER is not set
 # CONFIG_IOMMU_DEBUG is not set
+CONFIG_IOMMU_LEAK=y
 CONFIG_MCE_DEBUG=y
 
 #
@@ -790,4 +760,4 @@ CONFIG_MCE_DEBUG=y
 #
 # Library routines
 #
-CONFIG_CRC32=y
+# CONFIG_CRC32 is not set
index 8ee4d78..768e5f1 100644 (file)
@@ -6,6 +6,8 @@ obj-$(CONFIG_IA32_EMULATION) := ia32entry.o sys_ia32.o ia32_ioctl.o \
        ia32_signal.o tls32.o \
        ia32_binfmt.o fpu32.o ptrace32.o ipc32.o syscall32.o
 
+obj-$(CONFIG_IA32_AOUT) += ia32_aout.o
+
 $(obj)/syscall32.o: $(src)/syscall32.c $(obj)/vsyscall.so
 
 # Teach kbuild about targets
diff --git a/arch/x86_64/ia32/ia32_aout.c b/arch/x86_64/ia32/ia32_aout.c
new file mode 100644 (file)
index 0000000..382b10d
--- /dev/null
@@ -0,0 +1,506 @@
+/*
+ *  a.out loader for x86-64
+ *
+ *  Copyright (C) 1991, 1992, 1996  Linus Torvalds
+ *  Hacked together by Andi Kleen
+ */
+
+#include <linux/module.h>
+
+#include <linux/time.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+#include <linux/mman.h>
+#include <linux/a.out.h>
+#include <linux/errno.h>
+#include <linux/signal.h>
+#include <linux/string.h>
+#include <linux/fs.h>
+#include <linux/file.h>
+#include <linux/stat.h>
+#include <linux/fcntl.h>
+#include <linux/ptrace.h>
+#include <linux/user.h>
+#include <linux/slab.h>
+#include <linux/binfmts.h>
+#include <linux/personality.h>
+#include <linux/init.h>
+
+#include <asm/system.h>
+#include <asm/uaccess.h>
+#include <asm/pgalloc.h>
+#include <asm/cacheflush.h>
+#include <asm/user32.h>
+
+#undef WARN_OLD
+
+extern int ia32_setup_arg_pages(struct linux_binprm *bprm);
+
+static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs);
+static int load_aout_library(struct file*);
+static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file);
+
+/*
+ * fill in the user structure for a core dump..
+ */
+static void dump_thread32(struct pt_regs * regs, struct user32 * dump)
+{
+       u32 fs,gs;
+
+/* changed the size calculations - should hopefully work better. lbt */
+       dump->magic = CMAGIC;
+       dump->start_code = 0;
+       dump->start_stack = regs->rsp & ~(PAGE_SIZE - 1);
+       dump->u_tsize = ((unsigned long) current->mm->end_code) >> PAGE_SHIFT;
+       dump->u_dsize = ((unsigned long) (current->mm->brk + (PAGE_SIZE-1))) >> PAGE_SHIFT;
+       dump->u_dsize -= dump->u_tsize;
+       dump->u_ssize = 0;
+       dump->u_debugreg[0] = current->thread.debugreg0;  
+       dump->u_debugreg[1] = current->thread.debugreg1;  
+       dump->u_debugreg[2] = current->thread.debugreg2;  
+       dump->u_debugreg[3] = current->thread.debugreg3;  
+       dump->u_debugreg[4] = 0;  
+       dump->u_debugreg[5] = 0;  
+       dump->u_debugreg[6] = current->thread.debugreg6;  
+       dump->u_debugreg[7] = current->thread.debugreg7;  
+
+       if (dump->start_stack < 0xc0000000)
+               dump->u_ssize = ((unsigned long) (0xc0000000 - dump->start_stack)) >> PAGE_SHIFT;
+
+       dump->regs.ebx = regs->rbx;
+       dump->regs.ecx = regs->rcx;
+       dump->regs.edx = regs->rdx;
+       dump->regs.esi = regs->rsi;
+       dump->regs.edi = regs->rdi;
+       dump->regs.ebp = regs->rbp;
+       dump->regs.eax = regs->rax;
+       dump->regs.ds = current->thread.ds;
+       dump->regs.es = current->thread.es;
+       asm("movl %%fs,%0" : "=r" (fs)); dump->regs.fs = fs;
+       asm("movl %%gs,%0" : "=r" (gs)); dump->regs.gs = gs; 
+       dump->regs.orig_eax = regs->orig_rax;
+       dump->regs.eip = regs->rip;
+       dump->regs.cs = regs->cs;
+       dump->regs.eflags = regs->eflags;
+       dump->regs.esp = regs->rsp;
+       dump->regs.ss = regs->ss;
+
+#if 1 /* FIXME */
+       dump->u_fpvalid = 0;
+#else
+       dump->u_fpvalid = dump_fpu (regs, &dump->i387);
+#endif
+}
+
+static struct linux_binfmt aout_format = {
+       .module         = THIS_MODULE,
+       .load_binary    = load_aout_binary,
+       .load_shlib     = load_aout_library,
+       .core_dump      = aout_core_dump,
+       .min_coredump   = PAGE_SIZE
+};
+
+static void set_brk(unsigned long start, unsigned long end)
+{
+       start = PAGE_ALIGN(start);
+       end = PAGE_ALIGN(end);
+       if (end <= start)
+               return;
+       do_brk(start, end - start);
+}
+
+/*
+ * These are the only things you should do on a core-file: use only these
+ * macros to write out all the necessary info.
+ */
+
+static int dump_write(struct file *file, const void *addr, int nr)
+{
+       return file->f_op->write(file, addr, nr, &file->f_pos) == nr;
+}
+
+#define DUMP_WRITE(addr, nr)   \
+       if (!dump_write(file, (void *)(addr), (nr))) \
+               goto end_coredump;
+
+#define DUMP_SEEK(offset) \
+if (file->f_op->llseek) { \
+       if (file->f_op->llseek(file,(offset),0) != (offset)) \
+               goto end_coredump; \
+} else file->f_pos = (offset)
+
+/*
+ * Routine writes a core dump image in the current directory.
+ * Currently only a stub-function.
+ *
+ * Note that setuid/setgid files won't make a core-dump if the uid/gid
+ * changed due to the set[u|g]id. It's enforced by the "current->mm->dumpable"
+ * field, which also makes sure the core-dumps won't be recursive if the
+ * dumping of the process results in another error..
+ */
+
+static int aout_core_dump(long signr, struct pt_regs * regs, struct file *file)
+{
+       mm_segment_t fs;
+       int has_dumped = 0;
+       unsigned long dump_start, dump_size;
+       struct user32 dump;
+#       define START_DATA(u)   (u.u_tsize << PAGE_SHIFT)
+#       define START_STACK(u)   (u.start_stack)
+
+       fs = get_fs();
+       set_fs(KERNEL_DS);
+       has_dumped = 1;
+       current->flags |= PF_DUMPCORE;
+               strncpy(dump.u_comm, current->comm, sizeof(current->comm));
+       dump.u_ar0 = (u32)(((unsigned long)(&dump.regs)) - ((unsigned long)(&dump)));
+       dump.signal = signr;
+       dump_thread32(regs, &dump);
+
+/* If the size of the dump file exceeds the rlimit, then see what would happen
+   if we wrote the stack, but not the data area.  */
+       if ((dump.u_dsize+dump.u_ssize+1) * PAGE_SIZE >
+           current->rlim[RLIMIT_CORE].rlim_cur)
+               dump.u_dsize = 0;
+
+/* Make sure we have enough room to write the stack and data areas. */
+       if ((dump.u_ssize+1) * PAGE_SIZE >
+           current->rlim[RLIMIT_CORE].rlim_cur)
+               dump.u_ssize = 0;
+
+/* make sure we actually have a data and stack area to dump */
+       set_fs(USER_DS);
+       if (verify_area(VERIFY_READ, (void *) (unsigned long)START_DATA(dump), dump.u_dsize << PAGE_SHIFT))
+               dump.u_dsize = 0;
+       if (verify_area(VERIFY_READ, (void *) (unsigned long)START_STACK(dump), dump.u_ssize << PAGE_SHIFT))
+               dump.u_ssize = 0;
+
+       set_fs(KERNEL_DS);
+/* struct user */
+       DUMP_WRITE(&dump,sizeof(dump));
+/* Now dump all of the user data.  Include malloced stuff as well */
+       DUMP_SEEK(PAGE_SIZE);
+/* now we start writing out the user space info */
+       set_fs(USER_DS);
+/* Dump the data area */
+       if (dump.u_dsize != 0) {
+               dump_start = START_DATA(dump);
+               dump_size = dump.u_dsize << PAGE_SHIFT;
+               DUMP_WRITE(dump_start,dump_size);
+       }
+/* Now prepare to dump the stack area */
+       if (dump.u_ssize != 0) {
+               dump_start = START_STACK(dump);
+               dump_size = dump.u_ssize << PAGE_SHIFT;
+               DUMP_WRITE(dump_start,dump_size);
+       }
+/* Finally dump the task struct.  Not be used by gdb, but could be useful */
+       set_fs(KERNEL_DS);
+       DUMP_WRITE(current,sizeof(*current));
+end_coredump:
+       set_fs(fs);
+       return has_dumped;
+}
+
+/*
+ * create_aout_tables() parses the env- and arg-strings in new user
+ * memory and creates the pointer tables from them, and puts their
+ * addresses on the "stack", returning the new stack pointer value.
+ */
+static u32 * create_aout_tables(char * p, struct linux_binprm * bprm)
+{
+       u32 *argv, *envp;
+       u32 * sp;
+       int argc = bprm->argc;
+       int envc = bprm->envc;
+
+       sp = (u32 *) ((-(unsigned long)sizeof(u32)) & (unsigned long) p);
+       sp -= envc+1;
+       envp = (u32 *) sp;
+       sp -= argc+1;
+       argv = (u32 *) sp;
+       put_user((unsigned long) envp,--sp);
+       put_user((unsigned long) argv,--sp);
+       put_user(argc,--sp);
+       current->mm->arg_start = (unsigned long) p;
+       while (argc-->0) {
+               char c;
+               put_user((u32)(unsigned long)p,argv++);
+               do {
+                       get_user(c,p++);
+               } while (c);
+       }
+       put_user(NULL,argv);
+       current->mm->arg_end = current->mm->env_start = (unsigned long) p;
+       while (envc-->0) {
+               char c;
+               put_user((u32)(unsigned long)p,envp++);
+               do {
+                       get_user(c,p++);
+               } while (c);
+       }
+       put_user(NULL,envp);
+       current->mm->env_end = (unsigned long) p;
+       return sp;
+}
+
+/*
+ * These are the functions used to load a.out style executables and shared
+ * libraries.  There is no binary dependent code anywhere else.
+ */
+
+static int load_aout_binary(struct linux_binprm * bprm, struct pt_regs * regs)
+{
+       struct exec ex;
+       unsigned long error;
+       unsigned long fd_offset;
+       unsigned long rlim;
+       int retval;
+
+       ex = *((struct exec *) bprm->buf);              /* exec-header */
+       if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != OMAGIC &&
+            N_MAGIC(ex) != QMAGIC && N_MAGIC(ex) != NMAGIC) ||
+           N_TRSIZE(ex) || N_DRSIZE(ex) ||
+           i_size_read(bprm->file->f_dentry->d_inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
+               return -ENOEXEC;
+       }
+
+       fd_offset = N_TXTOFF(ex);
+
+       /* Check initial limits. This avoids letting people circumvent
+        * size limits imposed on them by creating programs with large
+        * arrays in the data or bss.
+        */
+       rlim = current->rlim[RLIMIT_DATA].rlim_cur;
+       if (rlim >= RLIM_INFINITY)
+               rlim = ~0;
+       if (ex.a_data + ex.a_bss > rlim)
+               return -ENOMEM;
+
+       /* Flush all traces of the currently running executable */
+       retval = flush_old_exec(bprm);
+       if (retval)
+               return retval;
+
+       regs->cs = __USER32_CS; 
+       regs->r8 = regs->r9 = regs->r10 = regs->r11 = regs->r12 =
+               regs->r13 = regs->r14 = regs->r15 = 0;
+       set_thread_flag(TIF_IA32); 
+
+       /* OK, This is the point of no return */
+       set_personality(PER_LINUX);
+
+       current->mm->end_code = ex.a_text +
+               (current->mm->start_code = N_TXTADDR(ex));
+       current->mm->end_data = ex.a_data +
+               (current->mm->start_data = N_DATADDR(ex));
+       current->mm->brk = ex.a_bss +
+               (current->mm->start_brk = N_BSSADDR(ex));
+       current->mm->free_area_cache = TASK_UNMAPPED_BASE;
+
+       current->mm->rss = 0;
+       current->mm->mmap = NULL;
+       compute_creds(bprm);
+       current->flags &= ~PF_FORKNOEXEC;
+
+       if (N_MAGIC(ex) == OMAGIC) {
+               unsigned long text_addr, map_size;
+               loff_t pos;
+
+               text_addr = N_TXTADDR(ex);
+
+               pos = 32;
+               map_size = ex.a_text+ex.a_data;
+
+               error = do_brk(text_addr & PAGE_MASK, map_size);
+               if (error != (text_addr & PAGE_MASK)) {
+                       send_sig(SIGKILL, current, 0);
+                       return error;
+               }
+
+               error = bprm->file->f_op->read(bprm->file, (char *)text_addr,
+                         ex.a_text+ex.a_data, &pos);
+               if ((signed long)error < 0) {
+                       send_sig(SIGKILL, current, 0);
+                       return error;
+               }
+                        
+               flush_icache_range(text_addr, text_addr+ex.a_text+ex.a_data);
+       } else {
+#ifdef WARN_OLD
+               static unsigned long error_time, error_time2;
+               if ((ex.a_text & 0xfff || ex.a_data & 0xfff) &&
+                   (N_MAGIC(ex) != NMAGIC) && (jiffies-error_time2) > 5*HZ)
+               {
+                       printk(KERN_NOTICE "executable not page aligned\n");
+                       error_time2 = jiffies;
+               }
+
+               if ((fd_offset & ~PAGE_MASK) != 0 &&
+                   (jiffies-error_time) > 5*HZ)
+               {
+                       printk(KERN_WARNING 
+                              "fd_offset is not page aligned. Please convert program: %s\n",
+                              bprm->file->f_dentry->d_name.name);
+                       error_time = jiffies;
+               }
+#endif
+
+               if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
+                       loff_t pos = fd_offset;
+                       do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
+                       bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex),
+                                       ex.a_text+ex.a_data, &pos);
+                       flush_icache_range((unsigned long) N_TXTADDR(ex),
+                                          (unsigned long) N_TXTADDR(ex) +
+                                          ex.a_text+ex.a_data);
+                       goto beyond_if;
+               }
+
+               down_write(&current->mm->mmap_sem);
+               error = do_mmap(bprm->file, N_TXTADDR(ex), ex.a_text,
+                       PROT_READ | PROT_EXEC,
+                       MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE | MAP_32BIT,
+                       fd_offset);
+               up_write(&current->mm->mmap_sem);
+
+               if (error != N_TXTADDR(ex)) {
+                       send_sig(SIGKILL, current, 0);
+                       return error;
+               }
+
+               down_write(&current->mm->mmap_sem);
+               error = do_mmap(bprm->file, N_DATADDR(ex), ex.a_data,
+                               PROT_READ | PROT_WRITE | PROT_EXEC,
+                               MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_EXECUTABLE | MAP_32BIT,
+                               fd_offset + ex.a_text);
+               up_write(&current->mm->mmap_sem);
+               if (error != N_DATADDR(ex)) {
+                       send_sig(SIGKILL, current, 0);
+                       return error;
+               }
+       }
+beyond_if:
+       set_binfmt(&aout_format);
+
+       set_brk(current->mm->start_brk, current->mm->brk);
+
+       retval = ia32_setup_arg_pages(bprm); 
+       if (retval < 0) { 
+               /* Someone check-me: is this error path enough? */ 
+               send_sig(SIGKILL, current, 0); 
+               return retval;
+       }
+
+       current->mm->start_stack =
+               (unsigned long) create_aout_tables((char *) bprm->p, bprm);
+       /* start thread */
+       asm volatile("movl %0,%%fs" :: "r" (0)); \
+       asm volatile("movl %0,%%es; movl %0,%%ds": :"r" (__USER32_DS));
+       load_gs_index(0); 
+       (regs)->rip = ex.a_entry;
+       (regs)->rsp = current->mm->start_stack;
+       (regs)->eflags = 0x200;
+       (regs)->cs = __USER32_CS;
+       (regs)->ss = __USER32_DS;
+       set_fs(USER_DS);
+       if (unlikely(current->ptrace & PT_PTRACED)) {
+               if (current->ptrace & PT_TRACE_EXEC)
+                       ptrace_notify ((PTRACE_EVENT_EXEC << 8) | SIGTRAP);
+               else
+                       send_sig(SIGTRAP, current, 0);
+       }
+       return 0;
+}
+
+static int load_aout_library(struct file *file)
+{
+       struct inode * inode;
+       unsigned long bss, start_addr, len;
+       unsigned long error;
+       int retval;
+       struct exec ex;
+
+       inode = file->f_dentry->d_inode;
+
+       retval = -ENOEXEC;
+       error = kernel_read(file, 0, (char *) &ex, sizeof(ex));
+       if (error != sizeof(ex))
+               goto out;
+
+       /* We come in here for the regular a.out style of shared libraries */
+       if ((N_MAGIC(ex) != ZMAGIC && N_MAGIC(ex) != QMAGIC) || N_TRSIZE(ex) ||
+           N_DRSIZE(ex) || ((ex.a_entry & 0xfff) && N_MAGIC(ex) == ZMAGIC) ||
+           i_size_read(inode) < ex.a_text+ex.a_data+N_SYMSIZE(ex)+N_TXTOFF(ex)) {
+               goto out;
+       }
+
+       if (N_FLAGS(ex))
+               goto out;
+
+       /* For  QMAGIC, the starting address is 0x20 into the page.  We mask
+          this off to get the starting address for the page */
+
+       start_addr =  ex.a_entry & 0xfffff000;
+
+       if ((N_TXTOFF(ex) & ~PAGE_MASK) != 0) {
+               loff_t pos = N_TXTOFF(ex);
+
+#ifdef WARN_OLD
+               static unsigned long error_time;
+               if ((jiffies-error_time) > 5*HZ)
+               {
+                       printk(KERN_WARNING 
+                              "N_TXTOFF is not page aligned. Please convert library: %s\n",
+                              file->f_dentry->d_name.name);
+                       error_time = jiffies;
+               }
+#endif
+
+               do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
+               
+               file->f_op->read(file, (char *)start_addr,
+                       ex.a_text + ex.a_data, &pos);
+               flush_icache_range((unsigned long) start_addr,
+                                  (unsigned long) start_addr + ex.a_text + ex.a_data);
+
+               retval = 0;
+               goto out;
+       }
+       /* Now use mmap to map the library into memory. */
+       down_write(&current->mm->mmap_sem);
+       error = do_mmap(file, start_addr, ex.a_text + ex.a_data,
+                       PROT_READ | PROT_WRITE | PROT_EXEC,
+                       MAP_FIXED | MAP_PRIVATE | MAP_DENYWRITE | MAP_32BIT,
+                       N_TXTOFF(ex));
+       up_write(&current->mm->mmap_sem);
+       retval = error;
+       if (error != start_addr)
+               goto out;
+
+       len = PAGE_ALIGN(ex.a_text + ex.a_data);
+       bss = ex.a_text + ex.a_data + ex.a_bss;
+       if (bss > len) {
+               error = do_brk(start_addr + len, bss - len);
+               retval = error;
+               if (error != start_addr + len)
+                       goto out;
+       }
+       retval = 0;
+out:
+       return retval;
+}
+
+static int __init init_aout_binfmt(void)
+{
+       return register_binfmt(&aout_format);
+}
+
+static void __exit exit_aout_binfmt(void)
+{
+       unregister_binfmt(&aout_format);
+}
+
+module_init(init_aout_binfmt);
+module_exit(exit_aout_binfmt);
+MODULE_LICENSE("GPL");
index 5a1a65e..056ec72 100644 (file)
@@ -59,7 +59,7 @@ static int rtc32_ioctl(unsigned fd, unsigned cmd, unsigned long arg)
                return ret; 
 
        case RTC_IRQP_SET32: 
-               cmd = RTC_EPOCH_SET; 
+               cmd = RTC_IRQP_SET; 
                break; 
 
        case RTC_EPOCH_READ32:
index a02d623..2230670 100644 (file)
@@ -55,15 +55,15 @@ static int ia32_copy_siginfo_to_user(siginfo_t32 *to, siginfo_t *from)
                   It should never copy any pad contained in the structure
                   to avoid security leaks, but must copy the generic
                   3 ints plus the relevant union member.  */
-       
+
        if (from->si_code < 0) {
                err = __put_user(from->si_signo, &to->si_signo);
-               err |= __put_user(from->si_errno, &to->si_errno); 
-               err |= __put_user(from->si_code, &to->si_code); 
-               err |= __put_user(from->_sifields._rt._pid, &to->_sifields._rt._pid); 
-               err |= __put_user(from->_sifields._rt._uid, &to->_sifields._rt._uid); 
-               err |= __put_user((u32)(u64)from->_sifields._rt._sigval.sival_ptr, 
-                                 &to->_sifields._rt._sigval.sival_ptr); 
+               err |= __put_user(from->si_errno, &to->si_errno);
+               err |= __put_user(from->si_code, &to->si_code);
+               err |= __put_user(from->_sifields._rt._pid, &to->_sifields._rt._pid);
+               err |= __put_user(from->_sifields._rt._uid, &to->_sifields._rt._uid);
+               err |= __put_user((u32)(u64)from->_sifields._rt._sigval.sival_ptr,
+                                 &to->_sifields._rt._sigval.sival_ptr);
        } else {
                err = __put_user(from->si_signo, &to->si_signo);
                err |= __put_user(from->si_errno, &to->si_errno);
@@ -175,7 +175,7 @@ ia32_restore_sigcontext(struct pt_regs *regs, struct sigcontext_ia32 *sc, unsign
        
        /* Always make any pending restarted system calls return -EINTR */
        current_thread_info()->restart_block.fn = do_no_restart_syscall;
-       
+
 #if DEBUG_SIG
        printk("SIG restore_sigcontext: sc=%p err(%x) eip(%x) cs(%x) flg(%x)\n",
                sc, sc->err, sc->eip, sc->cs, sc->eflags);
index 86ba10e..062cbf1 100644 (file)
@@ -221,7 +221,7 @@ ia32_sys_call_table:
        .quad sys_chmod         /* 15 */
        .quad sys_lchown16
        .quad ni_syscall                        /* old break syscall holder */
-       .quad ni_syscall        /* (old)stat */ 
+       .quad sys_stat
        .quad sys32_lseek
        .quad sys_getpid                /* 20 */
        .quad sys_mount /* mount  */
@@ -231,7 +231,7 @@ ia32_sys_call_table:
        .quad sys_stime         /* stime */             /* 25 */
        .quad sys32_ptrace      /* ptrace */
        .quad sys_alarm         /* XXX sign extension??? */ 
-       .quad ni_syscall        /* (old)fstat */
+       .quad sys_fstat /* (old)fstat */
        .quad sys_pause
        .quad compat_sys_utime  /* 30 */
        .quad ni_syscall        /* old stty syscall holder */
@@ -287,7 +287,7 @@ ia32_sys_call_table:
        .quad sys_setgroups16
        .quad sys32_old_select
        .quad sys_symlink
-       .quad ni_syscall        /* (old)lstat */
+       .quad sys_lstat
        .quad sys_readlink              /* 85 */
        .quad sys_uselib
        .quad sys_swapon
index 3137b8f..11f6ec2 100644 (file)
@@ -110,8 +110,8 @@ int cp_compat_stat(struct kstat *kbuf, struct compat_stat *ubuf)
        return 0;
 }
 
-extern long sys_truncate(char *, loff_t); 
-extern long sys_ftruncate(int, loff_t); 
+extern long sys_truncate(char *, loff_t);
+extern long sys_ftruncate(int, loff_t);
 
 asmlinkage long
 sys32_truncate64(char * filename, unsigned long offset_low, unsigned long offset_high)
index 20e9266..c7e0a3a 100644 (file)
@@ -56,7 +56,6 @@
 
 /* address in low memory of the wakeup routine. */
 unsigned long acpi_wakeup_address = 0;
-unsigned long acpi_video_flags;
 extern char wakeup_start, wakeup_end;
 
 extern unsigned long FASTCALL(acpi_copy_wakeup_routine(unsigned long));
@@ -117,22 +116,6 @@ void __init acpi_reserve_bootmem(void)
        printk(KERN_DEBUG "ACPI: have wakeup address 0x%8.8lx\n", acpi_wakeup_address);
 }
 
-static int __init acpi_sleep_setup(char *str)
-{
-       while ((str != NULL) && (*str != '\0')) {
-               if (strncmp(str, "s3_bios", 7) == 0)
-                       acpi_video_flags = 1;
-               if (strncmp(str, "s3_mode", 7) == 0)
-                       acpi_video_flags |= 2;
-               str = strchr(str, ',');
-               if (str != NULL)
-                       str += strspn(str, ", \t");
-       }
-       return 1;
-}
-
-__setup("acpi_sleep=", acpi_sleep_setup);
-
 #endif /*CONFIG_ACPI_SLEEP*/
 
 void acpi_pci_link_exit(void) {}
index b388b58..f7f8515 100644 (file)
@@ -41,19 +41,7 @@ wakeup_code:
        cmpl    $0x12345678, %eax
        jne     bogus_real_magic
 
-       testl   $1, video_flags - wakeup_code
-       jz      1f
        lcall   $0xc000,$3
-       movw    %cs, %ax
-       movw    %ax, %ds                                        # Bios might have played with that
-       movw    %ax, %ss
-1:
-
-       testl   $2, video_flags - wakeup_code
-       jz      1f
-       mov     video_mode - wakeup_code, %ax
-       call    mode_seta
-1:
 
        movw    $0xb800, %ax
        movw    %ax,%fs
@@ -262,7 +250,6 @@ real_save_gdt:      .word 0
                .quad 0
 real_magic:    .quad 0
 video_mode:    .quad 0
-video_flags:   .quad 0
 
 bogus_real_magic:
        movb    $0xba,%al       ;  outb %al,$0x80               
@@ -395,10 +382,8 @@ ENTRY(acpi_copy_wakeup_routine)
        movl    %eax, saved_efer
        movl    %edx, saved_efer2
 
-       movl    saved_video_mode, %edx
-       movl    %edx, video_mode - wakeup_start (,%rdi)
-       movl    acpi_video_flags, %edx
-       movl    %edx, video_flags - wakeup_start (,%rdi)
+#      movq    saved_videomode, %rdx                           # FIXME:         videomode
+       movq    %rdx, video_mode - wakeup_start (,%rdi)
        movq    $0x12345678, real_magic - wakeup_start (,%rdi)
        movq    $0x123456789abcdef0, %rdx
        movq    %rdx, saved_magic
@@ -430,6 +415,8 @@ do_suspend_lowlevel:
 .LFB5:
        subq    $8, %rsp
 .LCFI2:
+       testl   %edi, %edi
+       jne     .L99
        xorl    %eax, %eax
        call    save_processor_state
 
index cbe59b2..52e8da8 100644 (file)
@@ -446,8 +446,10 @@ void __init init_IRQ(void)
         * us. (some of these will be overridden and become
         * 'special' SMP interrupts)
         */
-       for (i = 0; i < NR_IRQS; i++) {
+       for (i = 0; i < (NR_VECTORS - FIRST_EXTERNAL_VECTOR); i++) {
                int vector = FIRST_EXTERNAL_VECTOR + i;
+               if (i >= NR_IRQS)
+                       break;
                if (vector != IA32_SYSCALL_VECTOR && vector != KDB_VECTOR) { 
                        set_intr_gate(vector, interrupt[i]);
        }
index 7df6f29..de830cb 100644 (file)
@@ -66,6 +66,14 @@ static struct irq_pin_list {
        short apic, pin, next;
 } irq_2_pin[PIN_MAP_SIZE];
 
+#ifdef CONFIG_PCI_USE_VECTOR
+int vector_irq[NR_IRQS] = { [0 ... NR_IRQS -1] = -1};
+#define vector_to_irq(vector)  \
+       (platform_legacy_irq(vector) ? vector : vector_irq[vector])
+#else
+#define vector_to_irq(vector)  (vector)
+#endif
+
 /*
  * The common case is 1:1 IRQ<->pin mappings. Sometimes there are
  * shared ISA-space IRQs, so we have to support them. We are super
@@ -632,7 +640,8 @@ static inline int IO_APIC_irq_trigger(int irq)
 /* irq_vectors is indexed by the sum of all RTEs in all I/O APICs. */
 u8 irq_vector[NR_IRQ_VECTORS] = { FIRST_DEVICE_VECTOR , 0 };
 
-static int __init assign_irq_vector(int irq)
+#ifndef CONFIG_PCI_USE_VECTOR
+int __init assign_irq_vector(int irq)
 {
        static int current_vector = FIRST_DEVICE_VECTOR, offset = 0;
        BUG_ON(irq >= NR_IRQ_VECTORS);
@@ -654,10 +663,34 @@ next:
        IO_APIC_VECTOR(irq) = current_vector;
        return current_vector;
 }
+#endif
 
 extern void (*interrupt[NR_IRQS])(void);
-static struct hw_interrupt_type ioapic_level_irq_type;
-static struct hw_interrupt_type ioapic_edge_irq_type;
+static struct hw_interrupt_type ioapic_level_type;
+static struct hw_interrupt_type ioapic_edge_type;
+
+#define IOAPIC_AUTO    -1
+#define IOAPIC_EDGE    0
+#define IOAPIC_LEVEL   1
+
+static inline void ioapic_register_intr(int irq, int vector, unsigned long trigger)
+{
+       if (use_pci_vector() && !platform_legacy_irq(irq)) {
+               if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
+                               trigger == IOAPIC_LEVEL)
+                       irq_desc[vector].handler = &ioapic_level_type;
+               else
+                       irq_desc[vector].handler = &ioapic_edge_type;
+               set_intr_gate(vector, interrupt[vector]);
+       } else  {
+               if ((trigger == IOAPIC_AUTO && IO_APIC_irq_trigger(irq)) ||
+                               trigger == IOAPIC_LEVEL)
+                       irq_desc[irq].handler = &ioapic_level_type;
+               else
+                       irq_desc[irq].handler = &ioapic_edge_type;
+               set_intr_gate(vector, interrupt[irq]);
+       }
+}
 
 void __init setup_IO_APIC_irqs(void)
 {
@@ -709,13 +742,7 @@ void __init setup_IO_APIC_irqs(void)
                        vector = assign_irq_vector(irq);
                        entry.vector = vector;
 
-                       if (IO_APIC_irq_trigger(irq))
-                               irq_desc[irq].handler = &ioapic_level_irq_type;
-                       else
-                               irq_desc[irq].handler = &ioapic_edge_irq_type;
-
-                       set_intr_gate(vector, interrupt[irq]);
-               
+                       ioapic_register_intr(irq, vector, IOAPIC_AUTO);
                        if (!apic && (irq < 16))
                                disable_8259A_irq(irq);
                }
@@ -762,7 +789,7 @@ void __init setup_ExtINT_IRQ0_pin(unsigned int pin, int vector)
         * The timer IRQ doesn't have to know that behind the
         * scene we have a 8259A-master in AEOI mode ...
         */
-       irq_desc[0].handler = &ioapic_edge_irq_type;
+       irq_desc[0].handler = &ioapic_edge_type;
 
        /*
         * Add it to the IO-APIC irq-routing table:
@@ -1217,9 +1244,6 @@ static int __init timer_irq_works(void)
  * that was delayed but this is now handled in the device
  * independent code.
  */
-#define enable_edge_ioapic_irq unmask_IO_APIC_irq
-
-static void disable_edge_ioapic_irq (unsigned int irq) { /* nothing */ }
 
 /*
  * Starting up a edge-triggered IO-APIC interrupt is
@@ -1248,8 +1272,6 @@ static unsigned int startup_edge_ioapic_irq(unsigned int irq)
        return was_pending;
 }
 
-#define shutdown_edge_ioapic_irq       disable_edge_ioapic_irq
-
 /*
  * Once we have recorded IRQ_PENDING already, we can mask the
  * interrupt for real. This prevents IRQ storms from unhandled
@@ -1263,9 +1285,6 @@ static void ack_edge_ioapic_irq(unsigned int irq)
        ack_APIC_irq();
 }
 
-static void end_edge_ioapic_irq (unsigned int i) { /* nothing */ }
-
-
 /*
  * Level triggered interrupts can just be masked,
  * and shutting down and starting up the interrupt
@@ -1287,10 +1306,6 @@ static unsigned int startup_level_ioapic_irq (unsigned int irq)
        return 0; /* don't check for pending */
 }
 
-#define shutdown_level_ioapic_irq      mask_IO_APIC_irq
-#define enable_level_ioapic_irq                unmask_IO_APIC_irq
-#define disable_level_ioapic_irq       mask_IO_APIC_irq
-
 static void end_level_ioapic_irq (unsigned int irq)
 {
        unsigned long v;
@@ -1350,9 +1365,7 @@ static void end_level_ioapic_irq (unsigned int irq)
        }
 }
 
-static void mask_and_ack_level_ioapic_irq (unsigned int irq) { /* nothing */ }
-
-static void set_ioapic_affinity (unsigned int irq, cpumask_t mask)
+static void set_ioapic_affinity_irq(unsigned int irq, cpumask_t mask)
 {
        unsigned long flags;
        unsigned int dest;
@@ -1369,6 +1382,58 @@ static void set_ioapic_affinity (unsigned int irq, cpumask_t mask)
        spin_unlock_irqrestore(&ioapic_lock, flags);
 }
 
+#ifdef CONFIG_PCI_USE_VECTOR
+static unsigned int startup_edge_ioapic_vector(unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       return startup_edge_ioapic_irq(irq);
+}
+
+static void ack_edge_ioapic_vector(unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       ack_edge_ioapic_irq(irq);
+}
+
+static unsigned int startup_level_ioapic_vector (unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       return startup_level_ioapic_irq (irq);
+}
+
+static void end_level_ioapic_vector (unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       end_level_ioapic_irq(irq);
+}
+
+static void mask_IO_APIC_vector (unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       mask_IO_APIC_irq(irq);
+}
+
+static void unmask_IO_APIC_vector (unsigned int vector)
+{
+       int irq = vector_to_irq(vector);
+
+       unmask_IO_APIC_irq(irq);
+}
+
+static void set_ioapic_affinity_vector (unsigned int vector,
+                                       cpumask_t cpu_mask)
+{
+       int irq = vector_to_irq(vector);
+
+       set_ioapic_affinity_irq(irq, cpu_mask);
+}
+#endif
+
 /*
  * Level and edge triggered IO-APIC interrupts need different handling,
  * so we use two separate IRQ descriptors. Edge triggered IRQs can be
@@ -1378,25 +1443,25 @@ static void set_ioapic_affinity (unsigned int irq, cpumask_t mask)
  * races.
  */
 
-static struct hw_interrupt_type ioapic_edge_irq_type = {
+static struct hw_interrupt_type ioapic_edge_type = {
        .typename = "IO-APIC-edge",
-       .startup = startup_edge_ioapic_irq,
-       .shutdown = shutdown_edge_ioapic_irq,
-       .enable = enable_edge_ioapic_irq,
-       .disable = disable_edge_ioapic_irq,
-       .ack = ack_edge_ioapic_irq,
-       .end = end_edge_ioapic_irq,
+       .startup        = startup_edge_ioapic,
+       .shutdown       = shutdown_edge_ioapic,
+       .enable         = enable_edge_ioapic,
+       .disable        = disable_edge_ioapic,
+       .ack            = ack_edge_ioapic,
+       .end            = end_edge_ioapic,
        .set_affinity = set_ioapic_affinity,
 };
 
-static struct hw_interrupt_type ioapic_level_irq_type = {
+static struct hw_interrupt_type ioapic_level_type = {
        .typename = "IO-APIC-level",
-       .startup = startup_level_ioapic_irq,
-       .shutdown = shutdown_level_ioapic_irq,
-       .enable = enable_level_ioapic_irq,
-       .disable = disable_level_ioapic_irq,
-       .ack = mask_and_ack_level_ioapic_irq,
-       .end = end_level_ioapic_irq,
+       .startup        = startup_level_ioapic,
+       .shutdown       = shutdown_level_ioapic,
+       .enable         = enable_level_ioapic,
+       .disable        = disable_level_ioapic,
+       .ack            = mask_and_ack_level_ioapic,
+       .end            = end_level_ioapic,
        .set_affinity = set_ioapic_affinity,
 };
 
@@ -1416,7 +1481,13 @@ static inline void init_IO_APIC_traps(void)
         * 0x80, because int 0x80 is hm, kind of importantish. ;)
         */
        for (irq = 0; irq < NR_IRQS ; irq++) {
-               if (IO_APIC_IRQ(irq) && !IO_APIC_VECTOR(irq)) {
+               int tmp = irq;
+               if (use_pci_vector()) {
+                       if (!platform_legacy_irq(tmp))
+                               if ((tmp = vector_to_irq(tmp)) == -1)
+                                       continue;
+               }
+               if (IO_APIC_IRQ(tmp) && !IO_APIC_VECTOR(tmp)) {
                        /*
                         * Hmm.. We don't have an entry for this,
                         * so default to an old-fashioned 8259
@@ -1844,10 +1915,12 @@ int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level, int a
               mp_ioapics[ioapic].mpc_apicid, pin, entry.vector, irq,
               edge_level, active_high_low);
 
+       if (use_pci_vector() && !platform_legacy_irq(irq))
+               irq = IO_APIC_VECTOR(irq);
        if (edge_level) {
-               irq_desc[irq].handler = &ioapic_level_irq_type;
+               irq_desc[irq].handler = &ioapic_level_type;
        } else {
-               irq_desc[irq].handler = &ioapic_edge_irq_type;
+               irq_desc[irq].handler = &ioapic_edge_type;
        }
 
        set_intr_gate(entry.vector, interrupt[irq]);
index 3946c6d..f6298de 100644 (file)
@@ -138,17 +138,19 @@ atomic_t irq_mis_count;
 
 int show_interrupts(struct seq_file *p, void *v)
 {
-       int i, j;
+       int i = *(loff_t *) v, j;
        struct irqaction * action;
        unsigned long flags;
 
-       seq_printf(p, "           ");
-       for (j=0; j<NR_CPUS; j++)
-               if (cpu_online(j))
-               seq_printf(p, "CPU%d       ",j);
-       seq_putc(p, '\n');
+       if (i == 0) {
+               seq_printf(p, "           ");
+               for (j=0; j<NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "CPU%d       ",j);
+               seq_putc(p, '\n');
+       }
 
-       for (i = 0 ; i < NR_IRQS ; i++) {
+       if (i < NR_IRQS) {
                spin_lock_irqsave(&irq_desc[i].lock, flags);
                action = irq_desc[i].action;
                if (!action) 
@@ -170,25 +172,26 @@ int show_interrupts(struct seq_file *p, void *v)
                seq_putc(p, '\n');
 skip:
                spin_unlock_irqrestore(&irq_desc[i].lock, flags);
-       }
-       seq_printf(p, "NMI: ");
-       for (j = 0; j < NR_CPUS; j++)
-               if (cpu_online(j))
-               seq_printf(p, "%10u ", cpu_pda[j].__nmi_count);
-       seq_putc(p, '\n');
+       } else if (i == NR_IRQS) {
+               seq_printf(p, "NMI: ");
+               for (j = 0; j < NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "%10u ", cpu_pda[j].__nmi_count);
+               seq_putc(p, '\n');
 #ifdef CONFIG_X86_LOCAL_APIC
-       seq_printf(p, "LOC: ");
-       for (j = 0; j < NR_CPUS; j++)
-               if (cpu_online(j))
-               seq_printf(p, "%10u ", cpu_pda[j].apic_timer_irqs);
-       seq_putc(p, '\n');
+               seq_printf(p, "LOC: ");
+               for (j = 0; j < NR_CPUS; j++)
+                       if (cpu_online(j))
+                               seq_printf(p, "%10u ", cpu_pda[j].apic_timer_irqs);
+               seq_putc(p, '\n');
 #endif
-       seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
+               seq_printf(p, "ERR: %10u\n", atomic_read(&irq_err_count));
 #ifdef CONFIG_X86_IO_APIC
 #ifdef APIC_MISMATCH_DEBUG
-       seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
+               seq_printf(p, "MIS: %10u\n", atomic_read(&irq_mis_count));
 #endif
 #endif
+       }
        return 0;
 }
 
@@ -405,6 +408,20 @@ out:
        return 1;
 }
 
+int can_request_irq(unsigned int irq, unsigned long irqflags)
+{
+       struct irqaction *action;
+
+       if (irq >= NR_IRQS)
+               return 0;
+       action = irq_desc[irq].action;
+       if (action) {
+               if (irqflags & action->flags & SA_SHIRQ)
+                       action = NULL;
+       }
+       return !action;
+}
+
 /**
  *     request_irq - allocate an interrupt line
  *     @irq: Interrupt line to allocate
@@ -801,47 +818,6 @@ int setup_irq(unsigned int irq, struct irqaction * new)
 static struct proc_dir_entry * root_irq_dir;
 static struct proc_dir_entry * irq_dir [NR_IRQS];
 
-#define HEX_DIGITS (2*sizeof(cpumask_t))
-
-static unsigned int parse_hex_value (const char *buffer,
-               unsigned long count, cpumask_t *ret)
-{
-       unsigned char hexnum [HEX_DIGITS];
-       cpumask_t value = CPU_MASK_NONE;
-       unsigned i;
-
-       if (!count)
-               return -EINVAL;
-       if (count > HEX_DIGITS)
-               count = HEX_DIGITS;
-       if (copy_from_user(hexnum, buffer, count))
-               return -EFAULT;
-
-       /*
-        * Parse the first 8 characters as a hex string, any non-hex char
-        * is end-of-string. '00e1', 'e1', '00E1', 'E1' are all the same.
-        */
-
-       for (i = 0; i < count; i++) {
-               unsigned int k, c = hexnum[i];
-
-               switch (c) {
-                       case '0' ... '9': c -= '0'; break;
-                       case 'a' ... 'f': c -= 'a'-10; break;
-                       case 'A' ... 'F': c -= 'A'-10; break;
-               default:
-                       goto out;
-               }
-               cpus_shift_left(value, value, 4);
-               for (k = 0; k < 4; ++k)
-                       if (c & (1 << k))
-                               cpu_set(k, value);
-       }
-out:
-       *ret = value;
-       return 0;
-}
-
 #ifdef CONFIG_SMP
 
 static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
@@ -850,19 +826,10 @@ static cpumask_t irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = CPU_MASK_ALL };
 static int irq_affinity_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       int k, len;
-       cpumask_t tmp = irq_affinity[(long)data];
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, irq_affinity[(long)data]);
+       if (count - len < 2)
                return -EINVAL;
-
-       for (k = len = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(page, "%04hx", (u16)cpus_coerce(tmp));
-               len += j;
-               page += j;
-               cpus_shift_right(tmp, tmp, 16);
-       }
-       len += sprintf(page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
@@ -875,7 +842,7 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
        if (!irq_desc[irq].handler->set_affinity)
                return -EIO;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
 
        /*
         * Do not allow disabling IRQs completely - it's a too easy
@@ -897,20 +864,10 @@ static int irq_affinity_write_proc (struct file *file, const char *buffer,
 static int prof_cpu_mask_read_proc (char *page, char **start, off_t off,
                        int count, int *eof, void *data)
 {
-       cpumask_t tmp, *mask = (cpumask_t *) data;
-       int k, len;
-
-       if (count < HEX_DIGITS+1)
+       int len = cpumask_snprintf(page, count, *(cpumask_t *)data);
+       if (count - len < 2)
                return -EINVAL;
-
-       tmp = *mask;
-       for (k = len = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(page, "%04hx", (u16)cpus_coerce(tmp));
-               len += j;
-               page += j;
-               cpus_shift_right(tmp, tmp, 16);
-       }
-       len += sprintf(page, "\n");
+       len += sprintf(page + len, "\n");
        return len;
 }
 
@@ -920,7 +877,7 @@ static int prof_cpu_mask_write_proc (struct file *file, const char *buffer,
        unsigned long full_count = count, err;
        cpumask_t new_value, *mask = (cpumask_t *)data;
 
-       err = parse_hex_value(buffer, count, &new_value);
+       err = cpumask_parse(buffer, count, new_value);
        if (err)
                return err;
 
index b763140..3541ef6 100644 (file)
@@ -881,7 +881,6 @@ void __init mp_parse_prt (void)
 {
        struct list_head        *node = NULL;
        struct acpi_prt_entry   *entry = NULL;
-       int                     vector = 0;
        int                     ioapic = -1;
        int                     ioapic_pin = 0;
        int                     irq = 0;
@@ -933,20 +932,22 @@ void __init mp_parse_prt (void)
                if ((1<<bit) & mp_ioapic_routing[ioapic].pin_programmed[idx]) {
                        printk(KERN_DEBUG "Pin %d-%d already programmed\n",
                                mp_ioapic_routing[ioapic].apic_id, ioapic_pin);
+                       if (use_pci_vector() && !platform_legacy_irq(irq))
+                               irq = IO_APIC_VECTOR(irq);
                        entry->irq = irq;
                        continue;
                }
 
                mp_ioapic_routing[ioapic].pin_programmed[idx] |= (1<<bit);
-
-               vector = io_apic_set_pci_routing(ioapic, ioapic_pin, irq, edge_level, active_high_low);
-               if (vector)
+               if (!io_apic_set_pci_routing(ioapic, ioapic_pin, irq, edge_level, active_high_low)) {
+                       if (use_pci_vector() && !platform_legacy_irq(irq))
+                               irq = IO_APIC_VECTOR(irq);
                        entry->irq = irq;
-
-               printk(KERN_DEBUG "%02x:%02x:%02x[%c] -> %d-%d -> vector 0x%02x"
+               }
+               printk(KERN_DEBUG "%02x:%02x:%02x[%c] -> %d-%d"
                        " -> IRQ %d\n", entry->id.segment, entry->id.bus, 
                        entry->id.device, ('A' + entry->pin), 
-                       mp_ioapic_routing[ioapic].apic_id, ioapic_pin, vector, 
+                       mp_ioapic_routing[ioapic].apic_id, ioapic_pin,
                        entry->irq);
        }
        
index 4153e7d..5a649f1 100644 (file)
 #include <asm/kdebug.h>
 #include <asm/proto.h>
 
-/* Workarounds for specific drivers */
-#define FUSION_WORKAROUND 1 
-#define FLUSH_WORKAROUND 1
-
 dma_addr_t bad_dma_address;
 
 unsigned long iommu_bus_base;  /* GART remapping area (physical) */
@@ -54,7 +50,9 @@ int force_iommu = 0;
 #endif
 int iommu_merge = 0; 
 int iommu_sac_force = 0; 
-int iommu_fullflush = 0;
+int iommu_fullflush = 1;
+
+#define MAX_NB 8
 
 /* Allocation bitmap for the remapping area */ 
 static spinlock_t iommu_bitmap_lock = SPIN_LOCK_UNLOCKED;
@@ -75,8 +73,8 @@ static unsigned long *iommu_gart_bitmap; /* guarded by iommu_bitmap_lock */
             if (dev->bus->number == 0 &&                                    \
                    (PCI_SLOT(dev->devfn) >= 24) && (PCI_SLOT(dev->devfn) <= 31))
 
-static struct pci_dev *northbridges[NR_CPUS + 1];
-static u32 northbridge_flush_word[NR_CPUS + 1];
+static struct pci_dev *northbridges[MAX_NB];
+static u32 northbridge_flush_word[MAX_NB];
 
 #define EMERGENCY_PAGES 32 /* = 128KB */ 
 
@@ -111,6 +109,8 @@ static unsigned long alloc_iommu(int size)
                        need_flush = 1;
                } 
        } 
+       if (iommu_fullflush)
+               need_flush = 1;
        spin_unlock_irqrestore(&iommu_bitmap_lock, flags);      
        return offset;
 } 
@@ -139,9 +139,11 @@ static void flush_gart(struct pci_dev *dev)
        int i;
 
        spin_lock_irqsave(&iommu_bitmap_lock, flags);
-       if (need_flush || iommu_fullflush) { 
-               for (i = 0; northbridges[i]; i++) {
+       if (need_flush) { 
+               for (i = 0; i < MAX_NB; i++) {
                        u32 w;
+                       if (!northbridges[i]) 
+                               continue;
                        if (bus >= 0 && !(cpu_isset_const(i, bus_cpumask)))
                                continue;
                        pci_write_config_dword(northbridges[i], 0x9c, 
@@ -389,16 +391,6 @@ static int pci_map_sg_nonforce(struct pci_dev *dev, struct scatterlist *sg,
        return nents;
 }
 
-static void dump_sg(struct scatterlist *sg, int stopat)
-{
-       int k;
-       for (k = 0; k < stopat; k++) 
-               printk(KERN_EMERG "sg[%d] page:%p dma:%lx offset:%u length:%u\n",
-                      k,
-                      sg[k].page, (unsigned long)sg[k].dma_address, sg[k].offset,
-                      sg[k].length);           
-}                         
-
 /* Map multiple scatterlist entries continuous into the first. */
 static int __pci_map_cont(struct scatterlist *sg, int start, int stopat, 
                      struct scatterlist *sout, unsigned long pages)
@@ -433,13 +425,7 @@ static int __pci_map_cont(struct scatterlist *sg, int start, int stopat,
                        iommu_page++;
        } 
        } 
-       if (iommu_page - iommu_start != pages) { 
-               printk(KERN_EMERG
-             "iommu_page:%lx iommu_start:%lx pages:%lu start:%d stopat:%d\n",
-                      iommu_page, iommu_start, pages, start, stopat); 
-               dump_sg(sg, stopat);       
-               panic("IOMMU confused"); 
-       } 
+       BUG_ON(iommu_page - iommu_start != pages);      
        return 0;
 }
 
@@ -568,19 +554,6 @@ int pci_dma_supported(struct pci_dev *dev, u64 mask)
         if (mask < 0x00ffffff)
                 return 0;
 
-#ifdef FUSION_WORKAROUND
-       if (dev->vendor == PCI_VENDOR_ID_LSI_LOGIC && mask > 0xffffffff) { 
-               force_iommu = 1;
-               iommu_merge = 1; 
-               return 0; 
-       } 
-#endif
-#ifdef FLUSH_WORKAROUND
-       if ((dev->vendor == PCI_VENDOR_ID_3WARE && mask <= 0xffffffff) ||
-           (dev->vendor == PCI_VENDOR_ID_QLOGIC && force_iommu))
-               iommu_fullflush = 1;
-#endif
-
        /* Tell the device to use SAC when IOMMU force is on. 
           This allows the driver to use cheaper accesses in some cases.
 
@@ -800,10 +773,9 @@ static int __init pci_iommu_init(void)
        for_all_nb(dev) {
                u32 flag; 
                int cpu = PCI_SLOT(dev->devfn) - 24;
-               if (cpu >= NR_CPUS)
+               if (cpu >= MAX_NB)
                        continue;
                northbridges[cpu] = dev;
-
                pci_read_config_dword(dev, 0x9c, &flag); /* cache flush word */
                northbridge_flush_word[cpu] = flag; 
        }
index 60c32c5..c1700f7 100644 (file)
@@ -54,7 +54,7 @@
 #include <asm/proto.h>
 
 /* Bitmask of currently online CPUs */
-cpumask_t cpu_online_map = { 1 };
+cpumask_t cpu_online_map;
 
 static cpumask_t cpu_callin_map;
 cpumask_t cpu_callout_map;
index f72f3a1..b45dc57 100644 (file)
@@ -111,21 +111,14 @@ void do_gettimeofday(struct timeval *tv)
                sec = xtime.tv_sec;
                usec = xtime.tv_nsec / 1000;
 
-#if 0
-               /*
-                * If time_adjust is negative then NTP is slowing the clock
-                * so make sure not to go into next possible interval.
-                * Better to lose some accuracy than have time go backwards..
-                */
-               unsigned long lost = jiffies - wall_jiffies;
-               if (unlikely(time_adjust < 0)) {
-                       unsigned long max_ntp_tick = tick_usec - tickadj;
-                       usec = min_t(unsigned, usec, max_ntp_tick);
-                       if (lost)
-                               usec += lost * max_ntp_tick;
-               } else if (unlikely(lost))
-                       usec += lost * tick_usec;
-#endif                 
+               /* i386 does some correction here to keep the clock 
+                  monotonus even when ntpd is fixing drift.
+                  But they didn't work for me, there is a non monotonic
+                  clock anyways with ntp.
+                  I dropped all corrections now until a real solution can
+                  be found. Note when you fix it here you need to do the same
+                  in arch/x86_64/kernel/vsyscall.c and export all needed
+                  variables in vmlinux.lds. -AK */ 
 
                t = (jiffies - wall_jiffies) * (1000000L / HZ) +
                        do_gettimeoffset();
index 2e0db1b..1e9a36c 100644 (file)
@@ -218,7 +218,7 @@ void show_stack(struct task_struct *tsk, unsigned long * rsp)
        // debugging aid: "show_stack(NULL, NULL);" prints the
        // back trace for this cpu.
 
-       if (rsp == NULL) { 
+       if (rsp == NULL) {
                if (tsk)
                        rsp = (unsigned long *)tsk->thread.rsp;
                else
@@ -355,8 +355,8 @@ void __die(const char * str, struct pt_regs * regs, long err)
        printk(KERN_EMERG "%s: %04lx [%u]\n", str, err & 0xffff,++die_counter);
        notify_die(DIE_OOPS, (char *)str, regs, err, 255, SIGSEGV);
        show_registers(regs);
-       /* Execute summary in case the oops scrolled away */
-       printk(KERN_EMERG "RIP "); 
+       /* Executive summary in case the oops scrolled away */
+       printk("RIP "); 
        printk_address(regs->rip); 
        printk(" RSP <%016lx>\n", regs->rsp); 
 }
index 7ffe787..7e1cdd4 100644 (file)
@@ -62,13 +62,7 @@ SECTIONS
   .sysctl_vsyscall : AT ((LOADADDR(.sys_tz) + SIZEOF(.sys_tz) + 15) & ~(15)) { *(.sysctl_vsyscall) }
   sysctl_vsyscall = LOADADDR(.sysctl_vsyscall);
   . = ALIGN(16);
-  .time_adjust : AT ((LOADADDR(.sysctl_vsyscall) + SIZEOF(.sysctl_vsyscall) + 16) & ~(15)) { *(.time_adjust) }
-  time_adjust = LOADADDR(.time_adjust);
-  . = ALIGN(16);
-  .tick_usec : AT ((LOADADDR(.time_adjust) + SIZEOF(.time_adjust) + 16) & ~(15)) { *(.tick_usec) }
-  tick_usec = LOADADDR(.tick_usec);    
-  . = ALIGN(16);
-  .jiffies : AT ((LOADADDR(.tick_usec) + SIZEOF(.tick_usec) + 16) & ~(15)) { *(.jiffies) }
+  .jiffies : AT ((LOADADDR(.sysctl_vsyscall) + SIZEOF(.sysctl_vsyscall) + 15) & ~(15)) { *(.jiffies) }
   jiffies = LOADADDR(.jiffies);
   . = ALIGN(16);
   .xtime : AT ((LOADADDR(.jiffies) + SIZEOF(.jiffies) + 15) & ~(15)) { *(.xtime) }
index e1c632b..66ac457 100644 (file)
@@ -56,8 +56,6 @@
 
 int __sysctl_vsyscall __section_sysctl_vsyscall = 1;
 seqlock_t __xtime_lock __section_xtime_lock = SEQLOCK_UNLOCKED;
-long __time_adjust __section_time_adjust; 
-long __tick_usec __section_tick_usec;
 
 #include <asm/unistd.h>
 
@@ -85,28 +83,13 @@ static force_inline void do_vgettimeofday(struct timeval * tv)
                usec = (__xtime.tv_nsec / 1000) +
                        (__jiffies - __wall_jiffies) * (1000000 / HZ);
 
-#if 0
-               /*
-                * If time_adjust is negative then NTP is slowing the clock
-                * so make sure not to go into next possible interval.
-                * Better to lose some accuracy than have time go backwards..
-                */
-               unsigned long lost = __jiffies - __wall_jiffies;
-               if (unlikely(__time_adjust < 0)) {
-                       unsigned long max_ntp_tick = __tick_usec - tickadj;
-                       usec = min(usec, max_ntp_tick);
-                       if (lost)
-                               usec += lost * max_ntp_tick;
-               } else if (unlikely(lost))
-                       usec += lost * __tick_usec;
-#endif                 
-
                if (__vxtime.mode == VXTIME_TSC) {
                        sync_core();
                        rdtscll(t);
                        if (t < __vxtime.last_tsc) t = __vxtime.last_tsc;
                        usec += ((t - __vxtime.last_tsc) *
                                 __vxtime.tsc_quot) >> 32;
+                       /* See comment in x86_64 do_gettimeopfday. */ 
                } else {
                        usec += ((readl(fix_to_virt(VSYSCALL_HPET) + 0xf0) -
                                  __vxtime.last) * __vxtime.quot) >> 32;
index f0a7bca..4b4c406 100644 (file)
@@ -113,7 +113,7 @@ memset_c:
        /* expand byte value  */
        movzbl %sil,%esi
        movabs $0x0101010101010101,%rax
-       mul    %esi             /* with rax, clobbers rdx */
+       mulq   %rsi             /* with rax, clobbers rdx */
        rep
        stosq   
        movl %r8d,%ecx
index 338f48c..3c1c0ae 100644 (file)
  *
  * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
  * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
- * 
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option) 
- * any later version.
- *
- */
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/mm.h>
-#include <linux/slab.h>
-#include <asm/scatterlist.h>
-#include <linux/string.h>
-#include <linux/crypto.h>
-#include <linux/highmem.h>
-#include "tcrypt.h"
-
-/*
- * Need to kmalloc() memory for testing kmap().
- */
-#define TVMEMSIZE      4096
-#define XBUFSIZE       32768
-
-/*
- * Indexes into the xbuf to simulate cross-page access.
- */
-#define IDX1           37
-#define IDX2           32400
-#define IDX3           1
-#define IDX4           8193
-#define IDX5           22222
-#define IDX6           17101
-#define IDX7           27333
-#define IDX8           3000
-
-static int mode;
-static char *xbuf;
-static char *tvmem;
-
-static char *check[] = {
-       "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish",
-       "twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6", 
-       "deflate", NULL
-};
-
-static void
-hexdump(unsigned char *buf, unsigned int len)
-{
-       while (len--)
-               printk("%02x", *buf++);
-
-       printk("\n");
-}
-
-static void
-test_md5(void)
-{
-       char *p;
-       unsigned int i;
-       struct scatterlist sg[2];
-       char result[128];
-       struct crypto_tfm *tfm;
-       struct md5_testvec *md5_tv;
-       unsigned int tsize;
-
-       printk("\ntesting md5\n");
-
-       tsize = sizeof (md5_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, md5_tv_template, tsize);
-       md5_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("md5", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for md5\n");
-               return;
-       }
-
-       for (i = 0; i < MD5_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-               memset(result, 0, sizeof (result));
-
-               p = md5_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = strlen(md5_tv[i].plaintext);
-
-               crypto_digest_init(tfm);
-               crypto_digest_update(tfm, sg, 1);
-               crypto_digest_final(tfm, result);
-
-               hexdump(result, crypto_tfm_alg_digestsize(tfm));
-               printk("%s\n",
-                      memcmp(result, md5_tv[i].digest,
-                             crypto_tfm_alg_digestsize(tfm)) ? "fail" :
-                      "pass");
-       }
-
-       printk("\ntesting md5 across pages\n");
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, XBUFSIZE);
-       memcpy(&xbuf[IDX1], "abcdefghijklm", 13);
-       memcpy(&xbuf[IDX2], "nopqrstuvwxyz", 13);
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 13;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 13;
-
-       memset(result, 0, sizeof (result));
-       crypto_digest_digest(tfm, sg, 2, result);
-       hexdump(result, crypto_tfm_alg_digestsize(tfm));
-
-       printk("%s\n",
-              memcmp(result, md5_tv[4].digest,
-                     crypto_tfm_alg_digestsize(tfm)) ? "fail" : "pass");
-       crypto_free_tfm(tfm);
-}
-
-#ifdef CONFIG_CRYPTO_HMAC
-static void
-test_hmac_md5(void)
-{
-       char *p;
-       unsigned int i, klen;
-       struct scatterlist sg[2];
-       char result[128];
-       struct crypto_tfm *tfm;
-       struct hmac_md5_testvec *hmac_md5_tv;
-       unsigned int tsize;
-
-       tfm = crypto_alloc_tfm("md5", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for md5\n");
-               return;
-       }
-
-       printk("\ntesting hmac_md5\n");
-       
-       tsize = sizeof (hmac_md5_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               goto out;
-       }
-
-       memcpy(tvmem, hmac_md5_tv_template, tsize);
-       hmac_md5_tv = (void *) tvmem;
-
-       for (i = 0; i < HMAC_MD5_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-               memset(result, 0, sizeof (result));
-
-               p = hmac_md5_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = strlen(hmac_md5_tv[i].plaintext);
-
-               klen = strlen(hmac_md5_tv[i].key);
-               crypto_hmac(tfm, hmac_md5_tv[i].key, &klen, sg, 1, result);
-
-               hexdump(result, crypto_tfm_alg_digestsize(tfm));
-               printk("%s\n",
-                      memcmp(result, hmac_md5_tv[i].digest,
-                             crypto_tfm_alg_digestsize(tfm)) ? "fail" :
-                      "pass");
-       }
-
-       printk("\ntesting hmac_md5 across pages\n");
-
-       memset(xbuf, 0, XBUFSIZE);
-
-       memcpy(&xbuf[IDX1], "what do ya want ", 16);
-       memcpy(&xbuf[IDX2], "for nothing?", 12);
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 16;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 12;
-
-       memset(result, 0, sizeof (result));
-       klen = strlen(hmac_md5_tv[7].key);
-       crypto_hmac(tfm, hmac_md5_tv[7].key, &klen, sg, 2, result);
-       hexdump(result, crypto_tfm_alg_digestsize(tfm));
-
-       printk("%s\n",
-              memcmp(result, hmac_md5_tv[7].digest,
-                     crypto_tfm_alg_digestsize(tfm)) ? "fail" : "pass");
-out:
-       crypto_free_tfm(tfm);
-}
-
-static void
-test_hmac_sha1(void)
-{
-       char *p;
-       unsigned int i, klen;
-       struct crypto_tfm *tfm;
-       struct hmac_sha1_testvec *hmac_sha1_tv;
-       struct scatterlist sg[2];
-       unsigned int tsize;
-       char result[SHA1_DIGEST_SIZE];
-
-       tfm = crypto_alloc_tfm("sha1", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for sha1\n");
-               return;
-       }
-
-       printk("\ntesting hmac_sha1\n");
-
-       tsize = sizeof (hmac_sha1_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               goto out;
-       }
-
-       memcpy(tvmem, hmac_sha1_tv_template, tsize);
-       hmac_sha1_tv = (void *) tvmem;
-
-       for (i = 0; i < HMAC_SHA1_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-               memset(result, 0, sizeof (result));
-
-               p = hmac_sha1_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = strlen(hmac_sha1_tv[i].plaintext);
-
-               klen = strlen(hmac_sha1_tv[i].key);
-               
-               crypto_hmac(tfm, hmac_sha1_tv[i].key, &klen, sg, 1, result);
-
-               hexdump(result, sizeof (result));
-               printk("%s\n",
-                      memcmp(result, hmac_sha1_tv[i].digest,
-                             crypto_tfm_alg_digestsize(tfm)) ? "fail" :
-                      "pass");
-       }
-
-       printk("\ntesting hmac_sha1 across pages\n");
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, XBUFSIZE);
-
-       memcpy(&xbuf[IDX1], "what do ya want ", 16);
-       memcpy(&xbuf[IDX2], "for nothing?", 12);
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 16;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 12;
-
-       memset(result, 0, sizeof (result));
-       klen = strlen(hmac_sha1_tv[7].key);
-       crypto_hmac(tfm, hmac_sha1_tv[7].key, &klen, sg, 2, result);
-       hexdump(result, crypto_tfm_alg_digestsize(tfm));
-
-       printk("%s\n",
-              memcmp(result, hmac_sha1_tv[7].digest,
-                     crypto_tfm_alg_digestsize(tfm)) ? "fail" : "pass");
-out:
-       crypto_free_tfm(tfm);
-}
-
-static void
-test_hmac_sha256(void)
-{
-       char *p;
-       unsigned int i, klen;
-       struct crypto_tfm *tfm;
-       struct hmac_sha256_testvec *hmac_sha256_tv;
-       struct scatterlist sg[2];
-       unsigned int tsize;
-       char result[SHA256_DIGEST_SIZE];
-
-       tfm = crypto_alloc_tfm("sha256", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for sha256\n");
-               return;
-       }
-
-       printk("\ntesting hmac_sha256\n");
-
-       tsize = sizeof (hmac_sha256_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               goto out;
-       }
-
-       memcpy(tvmem, hmac_sha256_tv_template, tsize);
-       hmac_sha256_tv = (void *) tvmem;
-
-       for (i = 0; i < HMAC_SHA256_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-               memset(result, 0, sizeof (result));
-
-               p = hmac_sha256_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = strlen(hmac_sha256_tv[i].plaintext);
-
-               klen = strlen(hmac_sha256_tv[i].key);
-       
-               hexdump(hmac_sha256_tv[i].key, strlen(hmac_sha256_tv[i].key));
-               crypto_hmac(tfm, hmac_sha256_tv[i].key, &klen, sg, 1, result);
-               hexdump(result, crypto_tfm_alg_digestsize(tfm));
-               printk("%s\n",
-                      memcmp(result, hmac_sha256_tv[i].digest,
-                      crypto_tfm_alg_digestsize(tfm)) ? "fail" : "pass");
-       }
-
-out:
-       crypto_free_tfm(tfm);
-}
-
-#endif /* CONFIG_CRYPTO_HMAC */
-
-static void
-test_md4(void)
-{
-       char *p;
-       unsigned int i;
-       struct scatterlist sg[1];
-       char result[128];
-       struct crypto_tfm *tfm;
-       struct md4_testvec *md4_tv;
-       unsigned int tsize;
-
-       printk("\ntesting md4\n");
-
-       tsize = sizeof (md4_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, md4_tv_template, tsize);
-       md4_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("md4", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for md4\n");
-               return;
-       }
-
-       for (i = 0; i < MD4_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-               memset(result, 0, sizeof (result));
-
-               p = md4_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = strlen(md4_tv[i].plaintext);
-
-               crypto_digest_digest(tfm, sg, 1, result);
-
-               hexdump(result, crypto_tfm_alg_digestsize(tfm));
-               printk("%s\n",
-                      memcmp(result, md4_tv[i].digest,
-                             crypto_tfm_alg_digestsize(tfm)) ? "fail" :
-                      "pass");
-       }
-
-       crypto_free_tfm(tfm);
-}
-
-static void
-test_sha1(void)
-{
-       char *p;
-       unsigned int i;
-       struct crypto_tfm *tfm;
-       struct sha1_testvec *sha1_tv;
-       struct scatterlist sg[2];
-       unsigned int tsize;
-       char result[SHA1_DIGEST_SIZE];
-
-       printk("\ntesting sha1\n");
-
-       tsize = sizeof (sha1_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, sha1_tv_template, tsize);
-       sha1_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("sha1", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for sha1\n");
-               return;
-       }
-
-       for (i = 0; i < SHA1_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-               memset(result, 0, sizeof (result));
-
-               p = sha1_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = strlen(sha1_tv[i].plaintext);
-
-               crypto_digest_init(tfm);
-               crypto_digest_update(tfm, sg, 1);
-               crypto_digest_final(tfm, result);
-
-               hexdump(result, crypto_tfm_alg_digestsize(tfm));
-               printk("%s\n",
-                      memcmp(result, sha1_tv[i].digest,
-                             crypto_tfm_alg_digestsize(tfm)) ? "fail" :
-                      "pass");
-       }
-
-       printk("\ntesting sha1 across pages\n");
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, XBUFSIZE);
-       memcpy(&xbuf[IDX1], "abcdbcdecdefdefgefghfghighij", 28);
-       memcpy(&xbuf[IDX2], "hijkijkljklmklmnlmnomnopnopq", 28);
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 28;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 28;
-
-       memset(result, 0, sizeof (result));
-       crypto_digest_digest(tfm, sg, 2, result);
-       hexdump(result, crypto_tfm_alg_digestsize(tfm));
-       printk("%s\n",
-              memcmp(result, sha1_tv[1].digest,
-                     crypto_tfm_alg_digestsize(tfm)) ? "fail" : "pass");
-       crypto_free_tfm(tfm);
-}
-
-static void
-test_sha256(void)
-{
-       char *p;
-       unsigned int i;
-       struct crypto_tfm *tfm;
-       struct sha256_testvec *sha256_tv;
-       struct scatterlist sg[2];
-       unsigned int tsize;
-       char result[SHA256_DIGEST_SIZE];
-
-       printk("\ntesting sha256\n");
-
-       tsize = sizeof (sha256_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, sha256_tv_template, tsize);
-       sha256_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("sha256", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for sha256\n");
-               return;
-       }
-
-       for (i = 0; i < SHA256_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-               memset(result, 0, sizeof (result));
-
-               p = sha256_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = strlen(sha256_tv[i].plaintext);
-
-               crypto_digest_init(tfm);
-               crypto_digest_update(tfm, sg, 1);
-               crypto_digest_final(tfm, result);
-
-               hexdump(result, crypto_tfm_alg_digestsize(tfm));
-               printk("%s\n",
-                      memcmp(result, sha256_tv[i].digest,
-                             crypto_tfm_alg_digestsize(tfm)) ? "fail" :
-                      "pass");
-       }
-
-       printk("\ntesting sha256 across pages\n");
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, XBUFSIZE);
-       memcpy(&xbuf[IDX1], "abcdbcdecdefdefgefghfghighij", 28);
-       memcpy(&xbuf[IDX2], "hijkijkljklmklmnlmnomnopnopq", 28);
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 28;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 28;
-
-       memset(result, 0, sizeof (result));
-       crypto_digest_digest(tfm, sg, 2, result);
-       hexdump(result, crypto_tfm_alg_digestsize(tfm));
-       printk("%s\n",
-              memcmp(result, sha256_tv[1].digest,
-                     crypto_tfm_alg_digestsize(tfm)) ? "fail" : "pass");
-                    
-       crypto_free_tfm(tfm);
-}
-
-static void
-test_sha384(void)
-{
-       char *p;
-       unsigned int i;
-       struct crypto_tfm *tfm;
-       struct sha384_testvec *sha384_tv;
-       struct scatterlist sg[2];
-       unsigned int tsize;
-       char result[SHA384_DIGEST_SIZE];
-
-       printk("\ntesting sha384\n");
-
-       tsize = sizeof (sha384_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, sha384_tv_template, tsize);
-       sha384_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("sha384", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for sha384\n");
-               return;
-       }
-
-       for (i = 0; i < SHA384_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-               memset(result, 0, sizeof (result));
-
-               p = sha384_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = strlen(sha384_tv[i].plaintext);
-
-               crypto_digest_init(tfm);
-               crypto_digest_update(tfm, sg, 1);
-               crypto_digest_final(tfm, result);
-
-               hexdump(result, crypto_tfm_alg_digestsize(tfm));
-               printk("%s\n",
-                      memcmp(result, sha384_tv[i].digest,
-                             crypto_tfm_alg_digestsize(tfm)) ? "fail" :
-                      "pass");
-       }
-
-       crypto_free_tfm(tfm);
-}
-
-static void
-test_sha512(void)
-{
-       char *p;
-       unsigned int i;
-       struct crypto_tfm *tfm;
-       struct sha512_testvec *sha512_tv;
-       struct scatterlist sg[2];
-       unsigned int tsize;
-       char result[SHA512_DIGEST_SIZE];
-
-       printk("\ntesting sha512\n");
-
-       tsize = sizeof (sha512_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, sha512_tv_template, tsize);
-       sha512_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("sha512", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for sha512\n");
-               return;
-       }
-
-       for (i = 0; i < SHA512_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-               memset(result, 0, sizeof (result));
-
-               p = sha512_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = strlen(sha512_tv[i].plaintext);
-
-               crypto_digest_init(tfm);
-               crypto_digest_update(tfm, sg, 1);
-               crypto_digest_final(tfm, result);
-
-               hexdump(result, crypto_tfm_alg_digestsize(tfm));
-               printk("%s\n",
-                      memcmp(result, sha512_tv[i].digest,
-                             crypto_tfm_alg_digestsize(tfm)) ? "fail" :
-                      "pass");
-       }
-
-       crypto_free_tfm(tfm);
-}
-
-void
-test_des(void)
-{
-       unsigned int ret, i, len;
-       unsigned int tsize;
-       char *p, *q;
-       struct crypto_tfm *tfm;
-       char *key;
-       char res[8];
-       struct des_tv *des_tv;
-       struct scatterlist sg[8];
-
-       printk("\ntesting des encryption\n");
-
-       tsize = sizeof (des_enc_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, des_enc_tv_template, tsize);
-       des_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("des", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for des (default ecb)\n");
-               return;
-       }
-
-       for (i = 0; i < DES_ENC_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-
-               key = des_tv[i].key;
-               tfm->crt_flags |= CRYPTO_TFM_REQ_WEAK_KEY;
-
-               ret = crypto_cipher_setkey(tfm, key, 8);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!des_tv[i].fail)
-                               goto out;
-               }
-
-               len = des_tv[i].len;
-
-               p = des_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = len;
-               ret = crypto_cipher_encrypt(tfm, sg, sg, len);
-               if (ret) {
-                       printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, len);
-
-               printk("%s\n",
-                      memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
-
-       }
-
-       printk("\ntesting des ecb encryption across pages\n");
-
-       i = 5;
-       key = des_tv[i].key;
-       tfm->crt_flags = 0;
-
-       hexdump(key, 8);
-
-       ret = crypto_cipher_setkey(tfm, key, 8);
-       if (ret) {
-               printk("setkey() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, sizeof (xbuf));
-       memcpy(&xbuf[IDX1], des_tv[i].plaintext, 8);
-       memcpy(&xbuf[IDX2], des_tv[i].plaintext + 8, 8);
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 8;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 8;
-
-       ret = crypto_cipher_encrypt(tfm, sg, sg, 16);
-       if (ret) {
-               printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       printk("page 1\n");
-       q = kmap(sg[0].page) + sg[0].offset;
-       hexdump(q, 8);
-       printk("%s\n", memcmp(q, des_tv[i].result, 8) ? "fail" : "pass");
-
-       printk("page 2\n");
-       q = kmap(sg[1].page) + sg[1].offset;
-       hexdump(q, 8);
-       printk("%s\n", memcmp(q, des_tv[i].result + 8, 8) ? "fail" : "pass");
-
-       printk("\ntesting des ecb encryption chunking scenario A\n");
-
-       /*
-        * Scenario A:
-        * 
-        *  F1       F2      F3
-        *  [8 + 6]  [2 + 8] [8]
-        *       ^^^^^^   ^
-        *       a    b   c
-        *
-        * Chunking should begin at a, then end with b, and
-        * continue encrypting at an offset of 2 until c.
-        *
-        */
-       i = 7;
-
-       key = des_tv[i].key;
-       tfm->crt_flags = 0;
-
-       ret = crypto_cipher_setkey(tfm, key, 8);
-       if (ret) {
-               printk("setkey() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, sizeof (xbuf));
-
-       /* Frag 1: 8 + 6 */
-       memcpy(&xbuf[IDX3], des_tv[i].plaintext, 14);
-
-       /* Frag 2: 2 + 8 */
-       memcpy(&xbuf[IDX4], des_tv[i].plaintext + 14, 10);
-
-       /* Frag 3: 8 */
-       memcpy(&xbuf[IDX5], des_tv[i].plaintext + 24, 8);
-
-       p = &xbuf[IDX3];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 14;
-
-       p = &xbuf[IDX4];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 10;
-
-       p = &xbuf[IDX5];
-       sg[2].page = virt_to_page(p);
-       sg[2].offset = offset_in_page(p);
-       sg[2].length = 8;
-
-       ret = crypto_cipher_encrypt(tfm, sg, sg, 32);
-
-       if (ret) {
-               printk("decrypt() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       printk("page 1\n");
-       q = kmap(sg[0].page) + sg[0].offset;
-       hexdump(q, 14);
-       printk("%s\n", memcmp(q, des_tv[i].result, 14) ? "fail" : "pass");
-
-       printk("page 2\n");
-       q = kmap(sg[1].page) + sg[1].offset;
-       hexdump(q, 10);
-       printk("%s\n", memcmp(q, des_tv[i].result + 14, 10) ? "fail" : "pass");
-
-       printk("page 3\n");
-       q = kmap(sg[2].page) + sg[2].offset;
-       hexdump(q, 8);
-       printk("%s\n", memcmp(q, des_tv[i].result + 24, 8) ? "fail" : "pass");
-
-       printk("\ntesting des ecb encryption chunking scenario B\n");
-
-       /*
-        * Scenario B:
-        * 
-        *  F1  F2  F3  F4
-        *  [2] [1] [3] [2 + 8 + 8]
-        */
-       i = 7;
-
-       key = des_tv[i].key;
-       tfm->crt_flags = 0;
-
-       ret = crypto_cipher_setkey(tfm, key, 8);
-       if (ret) {
-               printk("setkey() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, sizeof (xbuf));
-
-       /* Frag 1: 2 */
-       memcpy(&xbuf[IDX3], des_tv[i].plaintext, 2);
-
-       /* Frag 2: 1 */
-       memcpy(&xbuf[IDX4], des_tv[i].plaintext + 2, 1);
-
-       /* Frag 3: 3 */
-       memcpy(&xbuf[IDX5], des_tv[i].plaintext + 3, 3);
-
-       /* Frag 4: 2 + 8 + 8 */
-       memcpy(&xbuf[IDX6], des_tv[i].plaintext + 6, 18);
-
-       p = &xbuf[IDX3];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 2;
-
-       p = &xbuf[IDX4];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 1;
-
-       p = &xbuf[IDX5];
-       sg[2].page = virt_to_page(p);
-       sg[2].offset = offset_in_page(p);
-       sg[2].length = 3;
-
-       p = &xbuf[IDX6];
-       sg[3].page = virt_to_page(p);
-       sg[3].offset = offset_in_page(p);
-       sg[3].length = 18;
-
-       ret = crypto_cipher_encrypt(tfm, sg, sg, 24);
-
-       if (ret) {
-               printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       printk("page 1\n");
-       q = kmap(sg[0].page) + sg[0].offset;
-       hexdump(q, 2);
-       printk("%s\n", memcmp(q, des_tv[i].result, 2) ? "fail" : "pass");
-
-       printk("page 2\n");
-       q = kmap(sg[1].page) + sg[1].offset;
-       hexdump(q, 1);
-       printk("%s\n", memcmp(q, des_tv[i].result + 2, 1) ? "fail" : "pass");
-
-       printk("page 3\n");
-       q = kmap(sg[2].page) + sg[2].offset;
-       hexdump(q, 3);
-       printk("%s\n", memcmp(q, des_tv[i].result + 3, 3) ? "fail" : "pass");
-
-       printk("page 4\n");
-       q = kmap(sg[3].page) + sg[3].offset;
-       hexdump(q, 18);
-       printk("%s\n", memcmp(q, des_tv[i].result + 6, 18) ? "fail" : "pass");
-
-       printk("\ntesting des ecb encryption chunking scenario C\n");
-
-       /*
-        * Scenario B:
-        * 
-        *  F1  F2  F3  F4  F5
-        *  [2] [2] [2] [2] [8]
-        */
-       i = 7;
-
-       key = des_tv[i].key;
-       tfm->crt_flags = 0;
-
-       ret = crypto_cipher_setkey(tfm, key, 8);
-       if (ret) {
-               printk("setkey() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, sizeof (xbuf));
-
-       /* Frag 1: 2 */
-       memcpy(&xbuf[IDX3], des_tv[i].plaintext, 2);
-
-       /* Frag 2: 2 */
-       memcpy(&xbuf[IDX4], des_tv[i].plaintext + 2, 2);
-
-       /* Frag 3: 2 */
-       memcpy(&xbuf[IDX5], des_tv[i].plaintext + 4, 2);
-
-       /* Frag 4: 2 */
-       memcpy(&xbuf[IDX6], des_tv[i].plaintext + 6, 2);
-
-       /* Frag 5: 8 */
-       memcpy(&xbuf[IDX7], des_tv[i].plaintext + 8, 8);
-
-       p = &xbuf[IDX3];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 2;
-
-       p = &xbuf[IDX4];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 2;
-
-       p = &xbuf[IDX5];
-       sg[2].page = virt_to_page(p);
-       sg[2].offset = offset_in_page(p);
-       sg[2].length = 2;
-
-       p = &xbuf[IDX6];
-       sg[3].page = virt_to_page(p);
-       sg[3].offset = offset_in_page(p);
-       sg[3].length = 2;
-
-       p = &xbuf[IDX7];
-       sg[4].page = virt_to_page(p);
-       sg[4].offset = offset_in_page(p);
-       sg[4].length = 8;
-
-       ret = crypto_cipher_encrypt(tfm, sg, sg, 16);
-
-       if (ret) {
-               printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       printk("page 1\n");
-       q = kmap(sg[0].page) + sg[0].offset;
-       hexdump(q, 2);
-       printk("%s\n", memcmp(q, des_tv[i].result, 2) ? "fail" : "pass");
-
-       printk("page 2\n");
-       q = kmap(sg[1].page) + sg[1].offset;
-       hexdump(q, 2);
-       printk("%s\n", memcmp(q, des_tv[i].result + 2, 2) ? "fail" : "pass");
-
-       printk("page 3\n");
-       q = kmap(sg[2].page) + sg[2].offset;
-       hexdump(q, 2);
-       printk("%s\n", memcmp(q, des_tv[i].result + 4, 2) ? "fail" : "pass");
-
-       printk("page 4\n");
-       q = kmap(sg[3].page) + sg[3].offset;
-       hexdump(q, 2);
-       printk("%s\n", memcmp(q, des_tv[i].result + 6, 2) ? "fail" : "pass");
-
-       printk("page 5\n");
-       q = kmap(sg[4].page) + sg[4].offset;
-       hexdump(q, 8);
-       printk("%s\n", memcmp(q, des_tv[i].result + 8, 8) ? "fail" : "pass");
-
-       printk("\ntesting des ecb encryption chunking scenario D\n");
-
-       /*
-        * Scenario D, torture test, one byte per frag.
-        */
-       i = 7;
-       key = des_tv[i].key;
-       tfm->crt_flags = 0;
-
-       ret = crypto_cipher_setkey(tfm, key, 8);
-       if (ret) {
-               printk("setkey() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, XBUFSIZE);
-
-       xbuf[IDX1] = des_tv[i].plaintext[0];
-       xbuf[IDX2] = des_tv[i].plaintext[1];
-       xbuf[IDX3] = des_tv[i].plaintext[2];
-       xbuf[IDX4] = des_tv[i].plaintext[3];
-       xbuf[IDX5] = des_tv[i].plaintext[4];
-       xbuf[IDX6] = des_tv[i].plaintext[5];
-       xbuf[IDX7] = des_tv[i].plaintext[6];
-       xbuf[IDX8] = des_tv[i].plaintext[7];
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 1;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 1;
-
-       p = &xbuf[IDX3];
-       sg[2].page = virt_to_page(p);
-       sg[2].offset = offset_in_page(p);
-       sg[2].length = 1;
-
-       p = &xbuf[IDX4];
-       sg[3].page = virt_to_page(p);
-       sg[3].offset = offset_in_page(p);
-       sg[3].length = 1;
-
-       p = &xbuf[IDX5];
-       sg[4].page = virt_to_page(p);
-       sg[4].offset = offset_in_page(p);
-       sg[4].length = 1;
-
-       p = &xbuf[IDX6];
-       sg[5].page = virt_to_page(p);
-       sg[5].offset = offset_in_page(p);
-       sg[5].length = 1;
-
-       p = &xbuf[IDX7];
-       sg[6].page = virt_to_page(p);
-       sg[6].offset = offset_in_page(p);
-       sg[6].length = 1;
-
-       p = &xbuf[IDX8];
-       sg[7].page = virt_to_page(p);
-       sg[7].offset = offset_in_page(p);
-       sg[7].length = 1;
-
-       ret = crypto_cipher_encrypt(tfm, sg, sg, 8);
-       if (ret) {
-               printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       for (i = 0; i < 8; i++)
-               res[i] = *(char *) (kmap(sg[i].page) + sg[i].offset);
-
-       hexdump(res, 8);
-       printk("%s\n", memcmp(res, des_tv[7].result, 8) ? "fail" : "pass");
-
-       printk("\ntesting des decryption\n");
-
-       tsize = sizeof (des_dec_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-       memcpy(tvmem, des_dec_tv_template, tsize);
-       des_tv = (void *) tvmem;
-
-       for (i = 0; i < DES_DEC_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-
-               key = des_tv[i].key;
-
-               tfm->crt_flags = 0;
-               ret = crypto_cipher_setkey(tfm, key, 8);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               len = des_tv[i].len;
-
-               p = des_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = len;
-
-               ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("des_decrypt() failed flags=%x\n",
-                              tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, len);
-
-               printk("%s\n",
-                      memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
-
-       }
-
-       printk("\ntesting des ecb decryption across pages\n");
-
-       i = 6;
-
-       key = des_tv[i].key;
-       tfm->crt_flags = 0;
-
-       ret = crypto_cipher_setkey(tfm, key, 8);
-       if (ret) {
-               printk("setkey() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, sizeof (xbuf));
-       memcpy(&xbuf[IDX1], des_tv[i].plaintext, 8);
-       memcpy(&xbuf[IDX2], des_tv[i].plaintext + 8, 8);
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 8;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 8;
-
-       ret = crypto_cipher_decrypt(tfm, sg, sg, 16);
-       if (ret) {
-               printk("decrypt() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       printk("page 1\n");
-       q = kmap(sg[0].page) + sg[0].offset;
-       hexdump(q, 8);
-       printk("%s\n", memcmp(q, des_tv[i].result, 8) ? "fail" : "pass");
-
-       printk("page 2\n");
-       q = kmap(sg[1].page) + sg[1].offset;
-       hexdump(q, 8);
-       printk("%s\n", memcmp(q, des_tv[i].result + 8, 8) ? "fail" : "pass");
-
-       /*
-        * Scenario E:
-        * 
-        *  F1   F2      F3
-        *  [3]  [5 + 7] [1]
-        *
-        */
-       printk("\ntesting des ecb decryption chunking scenario E\n");
-       i = 2;
-
-       key = des_tv[i].key;
-       tfm->crt_flags = 0;
-
-       ret = crypto_cipher_setkey(tfm, key, 8);
-       if (ret) {
-               printk("setkey() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, sizeof (xbuf));
-
-       memcpy(&xbuf[IDX1], des_tv[i].plaintext, 3);
-       memcpy(&xbuf[IDX2], des_tv[i].plaintext + 3, 12);
-       memcpy(&xbuf[IDX3], des_tv[i].plaintext + 15, 1);
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 3;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 12;
-
-       p = &xbuf[IDX3];
-       sg[2].page = virt_to_page(p);
-       sg[2].offset = offset_in_page(p);
-       sg[2].length = 1;
-
-       ret = crypto_cipher_decrypt(tfm, sg, sg, 16);
-
-       if (ret) {
-               printk("decrypt() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       printk("page 1\n");
-       q = kmap(sg[0].page) + sg[0].offset;
-       hexdump(q, 3);
-       printk("%s\n", memcmp(q, des_tv[i].result, 3) ? "fail" : "pass");
-
-       printk("page 2\n");
-       q = kmap(sg[1].page) + sg[1].offset;
-       hexdump(q, 12);
-       printk("%s\n", memcmp(q, des_tv[i].result + 3, 12) ? "fail" : "pass");
-
-       printk("page 3\n");
-       q = kmap(sg[2].page) + sg[2].offset;
-       hexdump(q, 1);
-       printk("%s\n", memcmp(q, des_tv[i].result + 15, 1) ? "fail" : "pass");
-
-       crypto_free_tfm(tfm);
-
-       tfm = crypto_alloc_tfm("des", CRYPTO_TFM_MODE_CBC);
-       if (tfm == NULL) {
-               printk("failed to load transform for des cbc\n");
-               return;
-       }
-
-       printk("\ntesting des cbc encryption\n");
-
-       tsize = sizeof (des_cbc_enc_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-       memcpy(tvmem, des_cbc_enc_tv_template, tsize);
-       des_tv = (void *) tvmem;
-
-       crypto_cipher_set_iv(tfm, des_tv[i].iv, crypto_tfm_alg_ivsize(tfm));
-       crypto_cipher_get_iv(tfm, res, crypto_tfm_alg_ivsize(tfm));
-       
-       if (memcmp(res, des_tv[i].iv, sizeof(res))) {
-               printk("crypto_cipher_[set|get]_iv() failed\n");
-               goto out;
-       }
-       
-       for (i = 0; i < DES_CBC_ENC_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-
-               key = des_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, 8);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               len = des_tv[i].len;
-               p = des_tv[i].plaintext;
-
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = len;
-
-               crypto_cipher_set_iv(tfm, des_tv[i].iv,
-                                    crypto_tfm_alg_ivsize(tfm));
-
-               ret = crypto_cipher_encrypt(tfm, sg, sg, len);
-               if (ret) {
-                       printk("des_cbc_encrypt() failed flags=%x\n",
-                              tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, len);
-
-               printk("%s\n",
-                      memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
-       }
-
-       crypto_free_tfm(tfm);
-
-       /*
-        * Scenario F:
-        * 
-        *  F1       F2      
-        *  [8 + 5]  [3 + 8]
-        *
-        */
-       printk("\ntesting des cbc encryption chunking scenario F\n");
-       i = 4;
-
-       tfm = crypto_alloc_tfm("des", CRYPTO_TFM_MODE_CBC);
-       if (tfm == NULL) {
-               printk("failed to load transform for CRYPTO_ALG_DES_CCB\n");
-               return;
-       }
-
-       tfm->crt_flags = 0;
-       key = des_tv[i].key;
-
-       ret = crypto_cipher_setkey(tfm, key, 8);
-       if (ret) {
-               printk("setkey() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, sizeof (xbuf));
-
-       memcpy(&xbuf[IDX1], des_tv[i].plaintext, 13);
-       memcpy(&xbuf[IDX2], des_tv[i].plaintext + 13, 11);
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 13;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 11;
-
-       crypto_cipher_set_iv(tfm, des_tv[i].iv, crypto_tfm_alg_ivsize(tfm));
-
-       ret = crypto_cipher_encrypt(tfm, sg, sg, 24);
-       if (ret) {
-               printk("des_cbc_decrypt() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       printk("page 1\n");
-       q = kmap(sg[0].page) + sg[0].offset;
-       hexdump(q, 13);
-       printk("%s\n", memcmp(q, des_tv[i].result, 13) ? "fail" : "pass");
-
-       printk("page 2\n");
-       q = kmap(sg[1].page) + sg[1].offset;
-       hexdump(q, 11);
-       printk("%s\n", memcmp(q, des_tv[i].result + 13, 11) ? "fail" : "pass");
-
-       tsize = sizeof (des_cbc_dec_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-       memcpy(tvmem, des_cbc_dec_tv_template, tsize);
-       des_tv = (void *) tvmem;
-
-       printk("\ntesting des cbc decryption\n");
-
-       for (i = 0; i < DES_CBC_DEC_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-
-               tfm->crt_flags = 0;
-               key = des_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, 8);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               len = des_tv[i].len;
-               p = des_tv[i].plaintext;
-
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = len;
-
-               crypto_cipher_set_iv(tfm, des_tv[i].iv,
-                                     crypto_tfm_alg_blocksize(tfm));
-
-               ret = crypto_cipher_decrypt(tfm, sg, sg, len);
-               if (ret) {
-                       printk("des_cbc_decrypt() failed flags=%x\n",
-                              tfm->crt_flags);
-                       goto out;
-               }
-
-               hexdump(tfm->crt_cipher.cit_iv, 8);
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, len);
-
-               printk("%s\n",
-                      memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
-       }
-
-       /*
-        * Scenario G:
-        * 
-        *  F1   F2      
-        *  [4]  [4]
-        *
-        */
-       printk("\ntesting des cbc decryption chunking scenario G\n");
-       i = 3;
-
-       tfm->crt_flags = 0;
-       key = des_tv[i].key;
-
-       ret = crypto_cipher_setkey(tfm, key, 8);
-       if (ret) {
-               printk("setkey() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       /* setup the dummy buffer first */
-       memset(xbuf, 0, sizeof (xbuf));
-       memcpy(&xbuf[IDX1], des_tv[i].plaintext, 4);
-       memcpy(&xbuf[IDX2], des_tv[i].plaintext + 4, 4);
-
-       p = &xbuf[IDX1];
-       sg[0].page = virt_to_page(p);
-       sg[0].offset = offset_in_page(p);
-       sg[0].length = 4;
-
-       p = &xbuf[IDX2];
-       sg[1].page = virt_to_page(p);
-       sg[1].offset = offset_in_page(p);
-       sg[1].length = 4;
-
-       crypto_cipher_set_iv(tfm, des_tv[i].iv, crypto_tfm_alg_ivsize(tfm));
-
-       ret = crypto_cipher_decrypt(tfm, sg, sg, 8);
-       if (ret) {
-               printk("des_cbc_decrypt() failed flags=%x\n", tfm->crt_flags);
-               goto out;
-       }
-
-       printk("page 1\n");
-       q = kmap(sg[0].page) + sg[0].offset;
-       hexdump(q, 4);
-       printk("%s\n", memcmp(q, des_tv[i].result, 4) ? "fail" : "pass");
-
-       printk("page 2\n");
-       q = kmap(sg[1].page) + sg[1].offset;
-       hexdump(q, 4);
-       printk("%s\n", memcmp(q, des_tv[i].result + 4, 4) ? "fail" : "pass");
-
-      out:
-       crypto_free_tfm(tfm);
-}
-
-void
-test_des3_ede(void)
-{
-       unsigned int ret, i, len;
-       unsigned int tsize;
-       char *p, *q;
-       struct crypto_tfm *tfm;
-       char *key;
-       /*char res[8]; */
-       struct des_tv *des_tv;
-       struct scatterlist sg[8];
-
-       printk("\ntesting des3 ede encryption\n");
-
-       tsize = sizeof (des3_ede_enc_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, des3_ede_enc_tv_template, tsize);
-       des_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("des3_ede", CRYPTO_TFM_MODE_ECB);
-       if (tfm == NULL) {
-               printk("failed to load transform for 3des ecb\n");
-               return;
-       }
-
-       for (i = 0; i < DES3_EDE_ENC_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-
-               key = des_tv[i].key;
-               ret = crypto_cipher_setkey(tfm, key, 24);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!des_tv[i].fail)
-                               goto out;
-               }
-
-               len = des_tv[i].len;
-
-               p = des_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = len;
-               ret = crypto_cipher_encrypt(tfm, sg, sg, len);
-               if (ret) {
-                       printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, len);
-
-               printk("%s\n",
-                      memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
-       }
-
-       printk("\ntesting des3 ede decryption\n");
-
-       tsize = sizeof (des3_ede_dec_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, des3_ede_dec_tv_template, tsize);
-       des_tv = (void *) tvmem;
-
-       for (i = 0; i < DES3_EDE_DEC_TEST_VECTORS; i++) {
-               printk("test %u:\n", i + 1);
-
-               key = des_tv[i].key;
-               ret = crypto_cipher_setkey(tfm, key, 24);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!des_tv[i].fail)
-                               goto out;
-               }
-
-               len = des_tv[i].len;
-
-               p = des_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = len;
-               ret = crypto_cipher_decrypt(tfm, sg, sg, len);
-               if (ret) {
-                       printk("decrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, len);
-
-               printk("%s\n",
-                      memcmp(q, des_tv[i].result, len) ? "fail" : "pass");
-       }
-
-      out:
-       crypto_free_tfm(tfm);
-}
-
-void
-test_blowfish(void)
-{
-       unsigned int ret, i;
-       unsigned int tsize;
-       char *p, *q;
-       struct crypto_tfm *tfm;
-       char *key;
-       struct bf_tv *bf_tv;
-       struct scatterlist sg[1];
-
-       printk("\ntesting blowfish encryption\n");
-
-       tsize = sizeof (bf_enc_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, bf_enc_tv_template, tsize);
-       bf_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("blowfish", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for blowfish (default ecb)\n");
-               return;
-       }
-
-       for (i = 0; i < BF_ENC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n",
-                       i + 1, bf_tv[i].keylen * 8);
-               key = bf_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, bf_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!bf_tv[i].fail)
-                               goto out;
-               }
-
-               p = bf_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = bf_tv[i].plen;
-               ret = crypto_cipher_encrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, bf_tv[i].rlen);
-
-               printk("%s\n", memcmp(q, bf_tv[i].result, bf_tv[i].rlen) ?
-                       "fail" : "pass");
-       }
-
-       printk("\ntesting blowfish decryption\n");
-
-       tsize = sizeof (bf_dec_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, bf_dec_tv_template, tsize);
-       bf_tv = (void *) tvmem;
-
-       for (i = 0; i < BF_DEC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n",
-                       i + 1, bf_tv[i].keylen * 8);
-               key = bf_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, bf_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!bf_tv[i].fail)
-                               goto out;
-               }
-
-               p = bf_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = bf_tv[i].plen;
-               ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("decrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, bf_tv[i].rlen);
-
-               printk("%s\n", memcmp(q, bf_tv[i].result, bf_tv[i].rlen) ?
-                       "fail" : "pass");
-       }
-       
-       crypto_free_tfm(tfm);
-       
-       tfm = crypto_alloc_tfm("blowfish", CRYPTO_TFM_MODE_CBC);
-       if (tfm == NULL) {
-               printk("failed to load transform for blowfish cbc\n");
-               return;
-       }
-
-       printk("\ntesting blowfish cbc encryption\n");
-
-       tsize = sizeof (bf_cbc_enc_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               goto out;
-       }
-       memcpy(tvmem, bf_cbc_enc_tv_template, tsize);
-       bf_tv = (void *) tvmem;
-
-       for (i = 0; i < BF_CBC_ENC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n",
-                       i + 1, bf_tv[i].keylen * 8);
-
-               key = bf_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, bf_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               p = bf_tv[i].plaintext;
-
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length =  bf_tv[i].plen;
-
-               crypto_cipher_set_iv(tfm, bf_tv[i].iv,
-                                    crypto_tfm_alg_ivsize(tfm));
-
-               ret = crypto_cipher_encrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("blowfish_cbc_encrypt() failed flags=%x\n",
-                              tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, bf_tv[i].rlen);
-
-               printk("%s\n", memcmp(q, bf_tv[i].result, bf_tv[i].rlen)
-                       ? "fail" : "pass");
-       }
-
-       printk("\ntesting blowfish cbc decryption\n");
-
-       tsize = sizeof (bf_cbc_dec_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               goto out;
-       }
-       memcpy(tvmem, bf_cbc_dec_tv_template, tsize);
-       bf_tv = (void *) tvmem;
-
-       for (i = 0; i < BF_CBC_ENC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n",
-                       i + 1, bf_tv[i].keylen * 8);
-               key = bf_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, bf_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               p = bf_tv[i].plaintext;
-
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length =  bf_tv[i].plen;
-
-               crypto_cipher_set_iv(tfm, bf_tv[i].iv,
-                                    crypto_tfm_alg_ivsize(tfm));
-
-               ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("blowfish_cbc_decrypt() failed flags=%x\n",
-                              tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, bf_tv[i].rlen);
-
-               printk("%s\n", memcmp(q, bf_tv[i].result, bf_tv[i].rlen)
-                       ? "fail" : "pass");
-       }
-
-out:
-       crypto_free_tfm(tfm);
-}
-
-
-void
-test_twofish(void)
-{
-       unsigned int ret, i;
-       unsigned int tsize;
-       char *p, *q;
-       struct crypto_tfm *tfm;
-       char *key;
-       struct tf_tv *tf_tv;
-       struct scatterlist sg[1];
-
-       printk("\ntesting twofish encryption\n");
-
-       tsize = sizeof (tf_enc_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, tf_enc_tv_template, tsize);
-       tf_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("twofish", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for blowfish (default ecb)\n");
-               return;
-       }
-
-       for (i = 0; i < TF_ENC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n",
-                       i + 1, tf_tv[i].keylen * 8);
-               key = tf_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, tf_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!tf_tv[i].fail)
-                               goto out;
-               }
-
-               p = tf_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = tf_tv[i].plen;
-               ret = crypto_cipher_encrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, tf_tv[i].rlen);
-
-               printk("%s\n", memcmp(q, tf_tv[i].result, tf_tv[i].rlen) ?
-                       "fail" : "pass");
-       }
-
-       printk("\ntesting twofish decryption\n");
-
-       tsize = sizeof (tf_dec_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, tf_dec_tv_template, tsize);
-       tf_tv = (void *) tvmem;
-
-       for (i = 0; i < TF_DEC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n",
-                       i + 1, tf_tv[i].keylen * 8);
-               key = tf_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, tf_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!tf_tv[i].fail)
-                               goto out;
-               }
-
-               p = tf_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = tf_tv[i].plen;
-               ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("decrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, tf_tv[i].rlen);
-
-               printk("%s\n", memcmp(q, tf_tv[i].result, tf_tv[i].rlen) ?
-                       "fail" : "pass");
-       }
-
-       crypto_free_tfm(tfm);
-       
-       tfm = crypto_alloc_tfm("twofish", CRYPTO_TFM_MODE_CBC);
-       if (tfm == NULL) {
-               printk("failed to load transform for twofish cbc\n");
-               return;
-       }
-
-       printk("\ntesting twofish cbc encryption\n");
-
-       tsize = sizeof (tf_cbc_enc_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               goto out;
-       }
-       memcpy(tvmem, tf_cbc_enc_tv_template, tsize);
-       tf_tv = (void *) tvmem;
-
-       for (i = 0; i < TF_CBC_ENC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n",
-                       i + 1, tf_tv[i].keylen * 8);
-
-               key = tf_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, tf_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               p = tf_tv[i].plaintext;
-
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length =  tf_tv[i].plen;
-
-               crypto_cipher_set_iv(tfm, tf_tv[i].iv,
-                                    crypto_tfm_alg_ivsize(tfm));
-
-               ret = crypto_cipher_encrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("blowfish_cbc_encrypt() failed flags=%x\n",
-                              tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, tf_tv[i].rlen);
-
-               printk("%s\n", memcmp(q, tf_tv[i].result, tf_tv[i].rlen)
-                       ? "fail" : "pass");
-       }
-
-       printk("\ntesting twofish cbc decryption\n");
-
-       tsize = sizeof (tf_cbc_dec_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               goto out;
-       }
-       memcpy(tvmem, tf_cbc_dec_tv_template, tsize);
-       tf_tv = (void *) tvmem;
-
-       for (i = 0; i < TF_CBC_DEC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n",
-                       i + 1, tf_tv[i].keylen * 8);
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option) 
+ * any later version.
+ *
+ * 14 - 09 - 2003 
+ *     Rewritten by Kartikey Mahendra Bhatt
+ */
 
-               key = tf_tv[i].key;
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/mm.h>
+#include <linux/slab.h>
+#include <asm/scatterlist.h>
+#include <linux/string.h>
+#include <linux/crypto.h>
+#include <linux/highmem.h>
+#include "tcrypt.h"
 
-               ret = crypto_cipher_setkey(tfm, key, tf_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
+/*
+ * Need to kmalloc() memory for testing kmap().
+ */
+#define TVMEMSIZE      4096
+#define XBUFSIZE       32768
 
-               p = tf_tv[i].plaintext;
+/*
+ * Indexes into the xbuf to simulate cross-page access.
+ */
+#define IDX1           37
+#define IDX2           32400
+#define IDX3           1
+#define IDX4           8193
+#define IDX5           22222
+#define IDX6           17101
+#define IDX7           27333
+#define IDX8           3000
 
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length =  tf_tv[i].plen;
+/*
+* Used by test_cipher()
+*/
+#define ENCRYPT 1
+#define DECRYPT 0
+#define MODE_ECB 1
+#define MODE_CBC 0
 
-               crypto_cipher_set_iv(tfm, tf_tv[i].iv,
-                                    crypto_tfm_alg_ivsize(tfm));
+static unsigned int IDX[8] = { IDX1, IDX2, IDX3, IDX4, IDX5, IDX6, IDX7, IDX8 };
 
-               ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("blowfish_cbc_decrypt() failed flags=%x\n",
-                              tfm->crt_flags);
-                       goto out;
-               }
+static int mode;
+static char *xbuf;
+static char *tvmem;
 
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, tf_tv[i].rlen);
+static char *check[] = {
+       "des", "md5", "des3_ede", "rot13", "sha1", "sha256", "blowfish",
+       "twofish", "serpent", "sha384", "sha512", "md4", "aes", "cast6", 
+       "deflate", NULL
+};
 
-               printk("%s\n", memcmp(q, tf_tv[i].result, tf_tv[i].rlen)
-                       ? "fail" : "pass");
-       }
+static void
+hexdump(unsigned char *buf, unsigned int len)
+{
+       while (len--)
+               printk("%02x", *buf++);
 
-out:   
-       crypto_free_tfm(tfm);
+       printk("\n");
 }
 
-void
-test_serpent(void)
+static void 
+test_hash (char * algo, struct hash_testvec * template, unsigned int tcount)
 {
-       unsigned int ret, i, tsize;
-       u8 *p, *q, *key;
-       struct crypto_tfm *tfm;
-       struct serpent_tv *serp_tv;
-       struct scatterlist sg[1];
-
-       printk("\ntesting serpent encryption\n");
-
-       tfm = crypto_alloc_tfm("serpent", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for serpent (default ecb)\n");
+       char *p; 
+        unsigned int i, j, k, temp;
+        struct scatterlist sg[8];
+        char result[64];
+        struct crypto_tfm *tfm;
+        struct hash_testvec *hash_tv;
+        unsigned int tsize;
+        
+        printk("\ntesting %s\n", algo);
+
+       tsize = sizeof (struct hash_testvec);
+       tsize *= tcount;
+       
+       if (tsize > TVMEMSIZE) {
+               printk("template (%u) too big for tvmem (%u)\n", tsize, TVMEMSIZE);
                return;
        }
 
-       tsize = sizeof (serpent_enc_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
+       memcpy(tvmem, template, tsize);
+       hash_tv = (void *) tvmem;
+       tfm = crypto_alloc_tfm(algo, 0);
+       if (tfm == NULL) {
+               printk("failed to load transform for %s\n", algo);
                return;
        }
 
-       memcpy(tvmem, serpent_enc_tv_template, tsize);
-       serp_tv = (void *) tvmem;
-       for (i = 0; i < SERPENT_ENC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n", i + 1, serp_tv[i].keylen * 8);
-               key = serp_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, serp_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!serp_tv[i].fail)
-                               goto out;
-               }
-
-               p = serp_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = sizeof(serp_tv[i].plaintext);
-               ret = crypto_cipher_encrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, sizeof(serp_tv[i].result));
+       for (i = 0; i < tcount; i++) {
+               printk ("test %u:\n", i + 1);
+               memset (result, 0, 64);
 
-               printk("%s\n", memcmp(q, serp_tv[i].result,
-                       sizeof(serp_tv[i].result)) ? "fail" : "pass");
-       }
+               p = hash_tv[i].plaintext;
+               sg[0].page = virt_to_page (p);
+               sg[0].offset = offset_in_page (p);
+               sg[0].length = hash_tv[i].psize;
 
-       printk("\ntesting serpent decryption\n");
+               crypto_digest_init (tfm);
+               crypto_digest_update (tfm, sg, 1);
+               crypto_digest_final (tfm, result);
 
-       tsize = sizeof (serpent_dec_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
+               hexdump (result, crypto_tfm_alg_digestsize (tfm));
+               printk("%s\n",
+                       memcmp(result, hash_tv[i].digest,
+                               crypto_tfm_alg_digestsize(tfm)) ? "fail" :
+                       "pass");
        }
 
-       memcpy(tvmem, serpent_dec_tv_template, tsize);
-       serp_tv = (void *) tvmem;
-       for (i = 0; i < SERPENT_DEC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n", i + 1, serp_tv[i].keylen * 8);
-               key = serp_tv[i].key;
+       printk ("testing %s across pages\n", algo);
 
-               ret = crypto_cipher_setkey(tfm, key, serp_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!serp_tv[i].fail)
-                               goto out;
-               }
-
-               p = serp_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = sizeof(serp_tv[i].plaintext);
-               ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("decrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
+       /* setup the dummy buffer first */
+        memset(xbuf, 0, XBUFSIZE);
+
+       j = 0;
+       for (i = 0; i < tcount; i++) {
+               if (hash_tv[i].np) {
+                       j++;
+                       printk ("test %u:\n", j);
+                       memset (result, 0, 64);
+
+                       temp = 0;
+                       for (k = 0; k < hash_tv[i].np; k++) {
+                               memcpy (&xbuf[IDX[k]], hash_tv[i].plaintext + temp, 
+                                               hash_tv[i].tap[k]);     
+                               temp += hash_tv[i].tap[k];
+                               p = &xbuf[IDX[k]];
+                               sg[k].page = virt_to_page (p);
+                               sg[k].offset = offset_in_page (p);
+                               sg[k].length = hash_tv[i].tap[k];
+                       }
+
+                       crypto_digest_digest (tfm, sg, hash_tv[i].np, result);
+                       
+                       hexdump (result, crypto_tfm_alg_digestsize (tfm));
+                       printk("%s\n",
+                               memcmp(result, hash_tv[i].digest,
+                                       crypto_tfm_alg_digestsize(tfm)) ? "fail" :
+                               "pass");
                }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, sizeof(serp_tv[i].result));
-
-               printk("%s\n", memcmp(q, serp_tv[i].result,
-                       sizeof(serp_tv[i].result)) ? "fail" : "pass");
        }
-
-out:
-       crypto_free_tfm(tfm);
+       
+       crypto_free_tfm (tfm);
 }
 
+
+#ifdef CONFIG_CRYPTO_HMAC
+
 static void
-test_cast6(void)
+test_hmac(char *algo, struct hmac_testvec * template, unsigned int tcount)
 {
-       unsigned int ret, i, tsize;
-       u8 *p, *q, *key;
+       char *p;
+       unsigned int i, j, k, temp;
+       struct scatterlist sg[8];
+       char result[64];
        struct crypto_tfm *tfm;
-       struct cast6_tv *cast_tv;
-       struct scatterlist sg[1];
-
-       printk("\ntesting cast6 encryption\n");
+       struct hmac_testvec *hmac_tv;
+       unsigned int tsize, klen;
 
-       tfm = crypto_alloc_tfm("cast6", 0);
+       tfm = crypto_alloc_tfm(algo, 0);
        if (tfm == NULL) {
-               printk("failed to load transform for cast6 (default ecb)\n");
+               printk("failed to load transform for %s\n", algo);
                return;
        }
 
-       tsize = sizeof (cast6_enc_tv_template);
+       printk("\ntesting hmac_%s\n", algo);
+       
+       tsize = sizeof (struct hmac_testvec);
+       tsize *= tcount;
        if (tsize > TVMEMSIZE) {
                printk("template (%u) too big for tvmem (%u)\n", tsize,
                       TVMEMSIZE);
-               return;
+               goto out;
        }
 
-       memcpy(tvmem, cast6_enc_tv_template, tsize);
-       cast_tv = (void *) tvmem;
-       for (i = 0; i < CAST6_ENC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n", i + 1, cast_tv[i].keylen * 8);
-               key = cast_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, cast_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
+       memcpy(tvmem, template, tsize);
+       hmac_tv = (void *) tvmem;
 
-                       if (!cast_tv[i].fail)
-                               goto out;
-               }
+       for (i = 0; i < tcount; i++) {
+               printk("test %u:\n", i + 1);
+               memset(result, 0, sizeof (result));
 
-               p = cast_tv[i].plaintext;
+               p = hmac_tv[i].plaintext;
+               klen = hmac_tv[i].ksize;
                sg[0].page = virt_to_page(p);
-               sg[0].offset = ((long) p & ~PAGE_MASK);
-               sg[0].length = sizeof(cast_tv[i].plaintext);
-               ret = crypto_cipher_encrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, sizeof(cast_tv[i].result));
-
-               printk("%s\n", memcmp(q, cast_tv[i].result,
-                       sizeof(cast_tv[i].result)) ? "fail" : "pass");
-       }
+               sg[0].offset = offset_in_page(p);
+               sg[0].length = hmac_tv[i].psize;
 
-       printk("\ntesting cast6 decryption\n");
+               crypto_hmac(tfm, hmac_tv[i].key, &klen, sg, 1, result);
 
-       tsize = sizeof (cast6_dec_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
+               hexdump(result, crypto_tfm_alg_digestsize(tfm));
+               printk("%s\n",
+                      memcmp(result, hmac_tv[i].digest,
+                             crypto_tfm_alg_digestsize(tfm)) ? "fail" :
+                      "pass");
        }
 
-       memcpy(tvmem, cast6_dec_tv_template, tsize);
-       cast_tv = (void *) tvmem;
-       for (i = 0; i < CAST6_DEC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n", i + 1, cast_tv[i].keylen * 8);
-               key = cast_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, cast_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!cast_tv[i].fail)
-                               goto out;
-               }
+       printk("\ntesting hmac_%s across pages\n", algo);
 
-               p = cast_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = ((long) p & ~PAGE_MASK);
-               sg[0].length = sizeof(cast_tv[i].plaintext);
-               ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("decrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
+       memset(xbuf, 0, XBUFSIZE);
+       
+       j = 0;
+       for (i = 0; i < tcount; i++) {
+               if (hmac_tv[i].np) {
+                       j++;
+                       printk ("test %u:\n",j);
+                       memset (result, 0, 64);
+
+                       temp = 0;
+                       klen = hmac_tv[i].ksize;
+                       for (k = 0; k < hmac_tv[i].np; k++) {
+                               memcpy (&xbuf[IDX[k]], hmac_tv[i].plaintext + temp, 
+                                               hmac_tv[i].tap[k]);     
+                               temp += hmac_tv[i].tap[k];
+                               p = &xbuf[IDX[k]];
+                               sg[k].page = virt_to_page (p);
+                               sg[k].offset = offset_in_page (p);
+                               sg[k].length = hmac_tv[i].tap[k];
+                       }
+
+                       crypto_hmac(tfm, hmac_tv[i].key, &klen, sg, hmac_tv[i].np, 
+                                       result);
+                       hexdump(result, crypto_tfm_alg_digestsize(tfm));
+                       
+                       printk("%s\n",
+                               memcmp(result, hmac_tv[i].digest,
+                                       crypto_tfm_alg_digestsize(tfm)) ? "fail" : 
+                               "pass");
                }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, sizeof(cast_tv[i].result));
-
-               printk("%s\n", memcmp(q, cast_tv[i].result,
-                       sizeof(cast_tv[i].result)) ? "fail" : "pass");
        }
-
 out:
        crypto_free_tfm(tfm);
 }
 
+#endif /* CONFIG_CRYPTO_HMAC */
+
 void
-test_aes(void)
+test_cipher(char * algo, int mode, int enc, struct cipher_testvec * template, unsigned int tcount)
 {
-       unsigned int ret, i;
+       unsigned int ret, i, j, k, temp;
        unsigned int tsize;
        char *p, *q;
        struct crypto_tfm *tfm;
        char *key;
-       struct aes_tv *aes_tv;
-       struct scatterlist sg[1];
-
-       printk("\ntesting aes encryption\n");
-
-       tsize = sizeof (aes_enc_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, aes_enc_tv_template, tsize);
-       aes_tv = (void *) tvmem;
-
-       tfm = crypto_alloc_tfm("aes", 0);
-       if (tfm == NULL) {
-               printk("failed to load transform for aes (default ecb)\n");
-               return;
-       }
-
-       for (i = 0; i < AES_ENC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n",
-                       i + 1, aes_tv[i].keylen * 8);
-               key = aes_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, aes_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!aes_tv[i].fail)
-                               goto out;
-               }
+       struct cipher_testvec *cipher_tv;
+       struct scatterlist sg[8];
+       char e[11], m[4];
 
-               p = aes_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = aes_tv[i].plen;
-               ret = crypto_cipher_encrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
+       if (enc == ENCRYPT)
+               strncpy(e, "encryption", 11);
+       else
+               strncpy(e, "decryption", 11);
+       if (mode == MODE_ECB)
+               strncpy(m, "ECB", 4);
+       else
+               strncpy(m, "CBC", 4);
 
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, aes_tv[i].rlen);
+       printk("\ntesting %s %s %s \n", algo, m, e);
 
-               printk("%s\n", memcmp(q, aes_tv[i].result, aes_tv[i].rlen) ?
-                       "fail" : "pass");
-       }
+       tsize = sizeof (struct cipher_testvec); 
+       tsize *= tcount;
        
-       printk("\ntesting aes decryption\n");
-
-       tsize = sizeof (aes_dec_tv_template);
        if (tsize > TVMEMSIZE) {
                printk("template (%u) too big for tvmem (%u)\n", tsize,
                       TVMEMSIZE);
                return;
        }
 
-       memcpy(tvmem, aes_dec_tv_template, tsize);
-       aes_tv = (void *) tvmem;
-
-       for (i = 0; i < AES_DEC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n",
-                       i + 1, aes_tv[i].keylen * 8);
-               key = aes_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, aes_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!aes_tv[i].fail)
-                               goto out;
-               }
-
-               p = aes_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = offset_in_page(p);
-               sg[0].length = aes_tv[i].plen;
-               ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("decrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, aes_tv[i].rlen);
-
-               printk("%s\n", memcmp(q, aes_tv[i].result, aes_tv[i].rlen) ?
-                       "fail" : "pass");
-       }
-
-out:
-       crypto_free_tfm(tfm);
-}
-
-void
-test_cast5(void)
-{
-       unsigned int ret, i, tsize;
-       u8 *p, *q, *key;
-       struct crypto_tfm *tfm;
-       struct cast5_tv *c5_tv;
-       struct scatterlist sg[1];
-
-       printk("\ntesting cast5 encryption\n");
+       memcpy(tvmem, template, tsize);
+       cipher_tv = (void *) tvmem;
 
-       tfm = crypto_alloc_tfm("cast5", 0);
+       if (mode) 
+               tfm = crypto_alloc_tfm (algo, 0);
+       else 
+               tfm = crypto_alloc_tfm (algo, CRYPTO_TFM_MODE_CBC);
+       
        if (tfm == NULL) {
-               printk("failed to load transform for cast5 (default ecb)\n");
-               return;
-       }
-
-       tsize = sizeof (cast5_enc_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
+               printk("failed to load transform for %s %s\n", algo, m);
                return;
        }
-
-       memcpy(tvmem, cast5_enc_tv_template, tsize);
-       c5_tv = (void *) tvmem;
-       for (i = 0; i < CAST5_ENC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n", i + 1, c5_tv[i].keylen * 8);
-               key = c5_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, c5_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!c5_tv[i].fail)
+       
+       j = 0;
+       for (i = 0; i < tcount; i++) {
+               if (!(cipher_tv[i].np)) {
+                       j++;    
+                       printk("test %u (%d bit key):\n",
+                       j, cipher_tv[i].klen * 8);
+
+                       tfm->crt_flags = 0;
+                       if (cipher_tv[i].wk) 
+                               tfm->crt_flags |= CRYPTO_TFM_REQ_WEAK_KEY;
+                       key = cipher_tv[i].key;
+       
+                       ret = crypto_cipher_setkey(tfm, key, cipher_tv[i].klen);
+                       if (ret) {
+                               printk("setkey() failed flags=%x\n", tfm->crt_flags);
+       
+                               if (!cipher_tv[i].fail)
+                                       goto out;
+                       }       
+
+                       p = cipher_tv[i].input;
+                       sg[0].page = virt_to_page(p);
+                       sg[0].offset = offset_in_page(p);
+                       sg[0].length = cipher_tv[i].ilen;
+       
+                       if (!mode) {
+                               crypto_cipher_set_iv(tfm, cipher_tv[i].iv,
+                                       crypto_tfm_alg_ivsize (tfm));
+                       }
+               
+                       if (enc)
+                               ret = crypto_cipher_encrypt(tfm, sg, sg, cipher_tv[i].ilen);
+                       else
+                               ret = crypto_cipher_decrypt(tfm, sg, sg, cipher_tv[i].ilen);
+                       
+                               
+                       if (ret) {
+                               printk("%s () failed flags=%x\n", e, tfm->crt_flags);
                                goto out;
+                       }       
+       
+                       q = kmap(sg[0].page) + sg[0].offset;
+                       hexdump(q, cipher_tv[i].rlen);
+       
+                       printk("%s\n", 
+                               memcmp(q, cipher_tv[i].result, cipher_tv[i].rlen) ? "fail" : 
+                       "pass");
                }
-
-               p = c5_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = ((long) p & ~PAGE_MASK);
-               sg[0].length = sizeof(c5_tv[i].plaintext);
-               ret = crypto_cipher_encrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("encrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
-               }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, sizeof(c5_tv[i].ciphertext));
-
-               printk("%s\n", memcmp(q, c5_tv[i].ciphertext,
-                       sizeof(c5_tv[i].ciphertext)) ? "fail" : "pass");
        }
        
-       tsize = sizeof (cast5_dec_tv_template);
-       if (tsize > TVMEMSIZE) {
-               printk("template (%u) too big for tvmem (%u)\n", tsize,
-                      TVMEMSIZE);
-               return;
-       }
-
-       memcpy(tvmem, cast5_dec_tv_template, tsize);
-       c5_tv = (void *) tvmem;
-       for (i = 0; i < CAST5_DEC_TEST_VECTORS; i++) {
-               printk("test %u (%d bit key):\n", i + 1, c5_tv[i].keylen * 8);
-               key = c5_tv[i].key;
-
-               ret = crypto_cipher_setkey(tfm, key, c5_tv[i].keylen);
-               if (ret) {
-                       printk("setkey() failed flags=%x\n", tfm->crt_flags);
-
-                       if (!c5_tv[i].fail)
+       printk("\ntesting %s %s %s across pages (chunking) \n", algo, m, e);
+       memset(xbuf, 0, XBUFSIZE);
+       
+       j = 0;
+       for (i = 0; i < tcount; i++) {
+               if (cipher_tv[i].np) {
+                       j++;                            
+                       printk("test %u (%d bit key):\n",
+                       j, cipher_tv[i].klen * 8);
+
+                       tfm->crt_flags = 0;                     
+                       if (cipher_tv[i].wk) 
+                               tfm->crt_flags |= CRYPTO_TFM_REQ_WEAK_KEY;
+                       key = cipher_tv[i].key;
+                       
+                       ret = crypto_cipher_setkey(tfm, key, cipher_tv[i].klen);                
+                       if (ret) {
+                               printk("setkey() failed flags=%x\n", tfm->crt_flags);
+                               
+                               if (!cipher_tv[i].fail)
+                                       goto out;
+                       }
+
+                       temp = 0;
+                       for (k = 0; k < cipher_tv[i].np; k++) {
+                               memcpy (&xbuf[IDX[k]], cipher_tv[i].input + temp, 
+                                               cipher_tv[i].tap[k]);   
+                               temp += cipher_tv[i].tap[k];
+                               p = &xbuf[IDX[k]];
+                               sg[k].page = virt_to_page (p);
+                               sg[k].offset = offset_in_page (p);
+                               sg[k].length = cipher_tv[i].tap[k];
+                       }
+                       
+                       if (!mode) {
+                               crypto_cipher_set_iv(tfm, cipher_tv[i].iv,
+                                               crypto_tfm_alg_ivsize (tfm));
+                       }
+                       
+                       if (enc)
+                               ret = crypto_cipher_encrypt(tfm, sg, sg, cipher_tv[i].ilen);
+                       else
+                               ret = crypto_cipher_decrypt(tfm, sg, sg, cipher_tv[i].ilen);
+                       
+                       if (ret) {
+                               printk("%s () failed flags=%x\n", e, tfm->crt_flags);
                                goto out;
-               }
+                       }
 
-               p = c5_tv[i].plaintext;
-               sg[0].page = virt_to_page(p);
-               sg[0].offset = ((long) p & ~PAGE_MASK);
-               sg[0].length = sizeof(c5_tv[i].plaintext);
-               ret = crypto_cipher_decrypt(tfm, sg, sg, sg[0].length);
-               if (ret) {
-                       printk("decrypt() failed flags=%x\n", tfm->crt_flags);
-                       goto out;
+                       temp = 0;
+                       for (k = 0; k < cipher_tv[i].np; k++) {
+                               printk("page %u\n", k);
+                               q = kmap(sg[k].page) + sg[k].offset;
+                               hexdump(q, cipher_tv[i].tap[k]);
+                               printk("%s\n", 
+                                       memcmp(q, cipher_tv[i].result + temp, 
+                                               cipher_tv[i].tap[k]) ? "fail" : 
+                                       "pass");
+                               temp += cipher_tv[i].tap[k];
+                       }
                }
-
-               q = kmap(sg[0].page) + sg[0].offset;
-               hexdump(q, sizeof(c5_tv[i].ciphertext));
-
-               printk("%s\n", memcmp(q, c5_tv[i].ciphertext,
-                       sizeof(c5_tv[i].ciphertext)) ? "fail" : "pass");
        }
+
 out:
-       crypto_free_tfm (tfm);
+       crypto_free_tfm(tfm);
 }
 
 static void
@@ -2485,75 +510,118 @@ do_test(void)
        switch (mode) {
 
        case 0:
-               test_md5();
-               test_sha1();
-               test_des();
-               test_des3_ede();
-               test_md4();
-               test_sha256();
-               test_blowfish();
-               test_twofish();
-               test_serpent();
-               test_cast6();
-               test_aes();
-               test_sha384();
-               test_sha512();
-               test_deflate();
-               test_cast5();
-               test_cast6();
+               test_hash("md5", md5_tv_template, MD5_TEST_VECTORS);
+               
+               test_hash("sha1", sha1_tv_template, SHA1_TEST_VECTORS);
+               
+               //DES
+               test_cipher ("des", MODE_ECB, ENCRYPT, des_enc_tv_template, DES_ENC_TEST_VECTORS);
+                test_cipher ("des", MODE_ECB, DECRYPT, des_dec_tv_template, DES_DEC_TEST_VECTORS);
+                test_cipher ("des", MODE_CBC, ENCRYPT, des_cbc_enc_tv_template, DES_CBC_ENC_TEST_VECTORS);
+                test_cipher ("des", MODE_CBC, DECRYPT, des_cbc_dec_tv_template, DES_CBC_DEC_TEST_VECTORS);
+       
+               //DES3_EDE
+               test_cipher ("des3_ede", MODE_ECB, ENCRYPT, des3_ede_enc_tv_template, DES3_EDE_ENC_TEST_VECTORS);
+                test_cipher ("des3_ede", MODE_ECB, DECRYPT, des3_ede_dec_tv_template, DES3_EDE_DEC_TEST_VECTORS);
+               
+               test_hash("md4", md4_tv_template, MD4_TEST_VECTORS);
+               
+               test_hash("sha256", sha256_tv_template, SHA256_TEST_VECTORS);
+               
+               //BLOWFISH
+               test_cipher ("blowfish", MODE_ECB, ENCRYPT, bf_enc_tv_template, BF_ENC_TEST_VECTORS);
+               test_cipher ("blowfish", MODE_ECB, DECRYPT, bf_dec_tv_template, BF_DEC_TEST_VECTORS);
+               test_cipher ("blowfish", MODE_CBC, ENCRYPT, bf_cbc_enc_tv_template, BF_CBC_ENC_TEST_VECTORS);
+               test_cipher ("blowfish", MODE_CBC, DECRYPT, bf_cbc_dec_tv_template, BF_CBC_DEC_TEST_VECTORS);
+               
+               //TWOFISH
+               test_cipher ("twofish", MODE_ECB, ENCRYPT, tf_enc_tv_template, TF_ENC_TEST_VECTORS);
+               test_cipher ("twofish", MODE_ECB, DECRYPT, tf_dec_tv_template, TF_DEC_TEST_VECTORS);
+               test_cipher ("twofish", MODE_CBC, ENCRYPT, tf_cbc_enc_tv_template, TF_CBC_ENC_TEST_VECTORS);
+               test_cipher ("twofish", MODE_CBC, DECRYPT, tf_cbc_dec_tv_template, TF_CBC_DEC_TEST_VECTORS);
+               
+               //SERPENT
+               test_cipher ("serpent", MODE_ECB, ENCRYPT, serpent_enc_tv_template, SERPENT_ENC_TEST_VECTORS);
+               test_cipher ("serpent", MODE_ECB, DECRYPT, serpent_dec_tv_template, SERPENT_DEC_TEST_VECTORS);
+               
+               //AES
+               test_cipher ("aes", MODE_ECB, ENCRYPT, aes_enc_tv_template, AES_ENC_TEST_VECTORS);
+               test_cipher ("aes", MODE_ECB, DECRYPT, aes_dec_tv_template, AES_DEC_TEST_VECTORS);
+
+               //CAST5
+               test_cipher ("cast5", MODE_ECB, ENCRYPT, cast5_enc_tv_template, CAST5_ENC_TEST_VECTORS);
+               test_cipher ("cast5", MODE_ECB, DECRYPT, cast5_dec_tv_template, CAST5_DEC_TEST_VECTORS);
+               
+               //CAST6
+               test_cipher ("cast6", MODE_ECB, ENCRYPT, cast6_enc_tv_template, CAST6_ENC_TEST_VECTORS);
+               test_cipher ("cast6", MODE_ECB, DECRYPT, cast6_dec_tv_template, CAST6_DEC_TEST_VECTORS);
+
+               test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS);
+               test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS);
+               test_deflate();         
 #ifdef CONFIG_CRYPTO_HMAC
-               test_hmac_md5();
-               test_hmac_sha1();
-               test_hmac_sha256();
+               test_hmac("md5", hmac_md5_tv_template, HMAC_MD5_TEST_VECTORS);
+               test_hmac("sha1", hmac_sha1_tv_template, HMAC_SHA1_TEST_VECTORS);               
+               test_hmac("sha256", hmac_sha256_tv_template, HMAC_SHA256_TEST_VECTORS);
 #endif         
                break;
 
        case 1:
-               test_md5();
+               test_hash("md5", md5_tv_template, MD5_TEST_VECTORS);
                break;
 
        case 2:
-               test_sha1();
+               test_hash("sha1", sha1_tv_template, SHA1_TEST_VECTORS);
                break;
 
        case 3:
-               test_des();
+               test_cipher ("des", MODE_ECB, ENCRYPT, des_enc_tv_template, DES_ENC_TEST_VECTORS);
+               test_cipher ("des", MODE_ECB, DECRYPT, des_dec_tv_template, DES_DEC_TEST_VECTORS);
+               test_cipher ("des", MODE_CBC, ENCRYPT, des_cbc_enc_tv_template, DES_CBC_ENC_TEST_VECTORS);
+               test_cipher ("des", MODE_CBC, DECRYPT, des_cbc_dec_tv_template, DES_CBC_DEC_TEST_VECTORS);
                break;
 
        case 4:
-               test_des3_ede();
+               test_cipher ("des3_ede", MODE_ECB, ENCRYPT, des3_ede_enc_tv_template, DES3_EDE_ENC_TEST_VECTORS);
+                test_cipher ("des3_ede", MODE_ECB, DECRYPT, des3_ede_dec_tv_template, DES3_EDE_DEC_TEST_VECTORS);
                break;
 
        case 5:
-               test_md4();
+               test_hash("md4", md4_tv_template, MD4_TEST_VECTORS);
                break;
                
        case 6:
-               test_sha256();
+               test_hash("sha256", sha256_tv_template, SHA256_TEST_VECTORS);
                break;
        
        case 7:
-               test_blowfish();
+               test_cipher ("blowfish", MODE_ECB, ENCRYPT, bf_enc_tv_template, BF_ENC_TEST_VECTORS);
+               test_cipher ("blowfish", MODE_ECB, DECRYPT, bf_dec_tv_template, BF_DEC_TEST_VECTORS);
+               test_cipher ("blowfish", MODE_CBC, ENCRYPT, bf_cbc_enc_tv_template, BF_CBC_ENC_TEST_VECTORS);
+               test_cipher ("blowfish", MODE_CBC, DECRYPT, bf_cbc_dec_tv_template, BF_CBC_DEC_TEST_VECTORS);
                break;
 
        case 8:
-               test_twofish();
+               test_cipher ("twofish", MODE_ECB, ENCRYPT, tf_enc_tv_template, TF_ENC_TEST_VECTORS);
+               test_cipher ("twofish", MODE_ECB, DECRYPT, tf_dec_tv_template, TF_DEC_TEST_VECTORS);
+               test_cipher ("twofish", MODE_CBC, ENCRYPT, tf_cbc_enc_tv_template, TF_CBC_ENC_TEST_VECTORS);
+               test_cipher ("twofish", MODE_CBC, DECRYPT, tf_cbc_dec_tv_template, TF_CBC_DEC_TEST_VECTORS);
                break;
-
+               
        case 9:
-               test_serpent();
                break;
 
        case 10:
-               test_aes();
+               test_cipher ("aes", MODE_ECB, ENCRYPT, aes_enc_tv_template, AES_ENC_TEST_VECTORS);
+               test_cipher ("aes", MODE_ECB, DECRYPT, aes_dec_tv_template, AES_DEC_TEST_VECTORS);      
                break;
 
        case 11:
-               test_sha384();
+               test_hash("sha384", sha384_tv_template, SHA384_TEST_VECTORS);
                break;
                
        case 12:
-               test_sha512();
+               test_hash("sha512", sha512_tv_template, SHA512_TEST_VECTORS);
                break;
 
        case 13:
@@ -2561,24 +629,26 @@ do_test(void)
                break;
 
        case 14:
-               test_cast5();
+               test_cipher ("cast5", MODE_ECB, ENCRYPT, cast5_enc_tv_template, CAST5_ENC_TEST_VECTORS);
+               test_cipher ("cast5", MODE_ECB, DECRYPT, cast5_dec_tv_template, CAST5_DEC_TEST_VECTORS);
                break;
 
        case 15:
-               test_cast6();
+               test_cipher ("cast6", MODE_ECB, ENCRYPT, cast6_enc_tv_template, CAST6_ENC_TEST_VECTORS);
+               test_cipher ("cast6", MODE_ECB, DECRYPT, cast6_dec_tv_template, CAST6_DEC_TEST_VECTORS);
                break;
 
 #ifdef CONFIG_CRYPTO_HMAC
        case 100:
-               test_hmac_md5();
+               test_hmac("md5", hmac_md5_tv_template, HMAC_MD5_TEST_VECTORS);
                break;
                
        case 101:
-               test_hmac_sha1();
+               test_hmac("sha1", hmac_sha1_tv_template, HMAC_SHA1_TEST_VECTORS);               
                break;
        
        case 102:
-               test_hmac_sha256();
+               test_hmac("sha256", hmac_sha256_tv_template, HMAC_SHA256_TEST_VECTORS);
                break;
 
 #endif
@@ -2614,7 +684,14 @@ init(void)
        return 0;
 }
 
+/*
+ * If an init function is provided, an exit function must also be provided
+ * to allow module unload.
+ */
+static void __exit fini(void) { }
+
 module_init(init);
+module_exit(fini);
 
 MODULE_PARM(mode, "i");
 
index d6ef8e7..95b9376 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
  * Quick & dirty crypto testing module.
  *
  * This will only exist until we have a better testing mechanism
  *
  * Copyright (c) 2002 James Morris <jmorris@intercode.com.au>
  * Copyright (c) 2002 Jean-Francois Dive <jef@linuxbe.org>
- * 
+ *
  * This program is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License as published by the Free
  * Software Foundation; either version 2 of the License, or (at your option) 
  * any later version.
  *
+ * 14 - 09 - 2003 Changes by Kartikey Mahendra Bhatt
+ *
  */
 #ifndef _CRYPTO_TCRYPT_H
 #define _CRYPTO_TCRYPT_H
 
-#define MD5_DIGEST_SIZE                16
-#define MD4_DIGEST_SIZE                16
-#define SHA1_DIGEST_SIZE       20
-#define SHA256_DIGEST_SIZE     32
-#define SHA384_DIGEST_SIZE     48
-#define SHA512_DIGEST_SIZE     64
+#define MAX_DIGEST_SIZE                64
+#define MAX_TAP                        8
 
-/*
- * MD4 test vectors from RFC1320
- */
-#define MD4_TEST_VECTORS       7
+#define MAX_KEYLEN             56
+#define MAX_IVLEN              32
 
-struct md4_testvec {
+struct hash_testvec {
        char plaintext[128];
-       char digest[MD4_DIGEST_SIZE];
-} md4_tv_template[] = {
-       { "",
-               { 0x31, 0xd6, 0xcf, 0xe0, 0xd1, 0x6a, 0xe9, 0x31,
-                 0xb7, 0x3c, 0x59, 0xd7, 0xe0, 0xc0, 0x89, 0xc0 }
-       },
-       
-       { "a",
-               { 0xbd, 0xe5, 0x2c, 0xb3, 0x1d, 0xe3, 0x3e, 0x46,
-                 0x24, 0x5e, 0x05, 0xfb, 0xdb, 0xd6, 0xfb, 0x24 }
-       },
-
-       { "abc",
-               { 0xa4, 0x48, 0x01, 0x7a, 0xaf, 0x21, 0xd8, 0x52,
-                 0x5f, 0xc1, 0x0a, 0xe8, 0x7a, 0xa6, 0x72, 0x9d }
-       },
-       
-       { "message digest",
-               { 0xd9, 0x13, 0x0a, 0x81, 0x64, 0x54, 0x9f, 0xe8,
-                 0x18, 0x87, 0x48, 0x06, 0xe1, 0xc7, 0x01, 0x4b }
-       },
-       
-       { "abcdefghijklmnopqrstuvwxyz",
-               { 0xd7, 0x9e, 0x1c, 0x30, 0x8a, 0xa5, 0xbb, 0xcd,
-                 0xee, 0xa8, 0xed, 0x63, 0xdf, 0x41, 0x2d, 0xa9 }
-       },
-               
-       { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
-               { 0x04, 0x3f, 0x85, 0x82, 0xf2, 0x41, 0xdb, 0x35,
-                 0x1c, 0xe6, 0x27, 0xe1, 0x53, 0xe7, 0xf0, 0xe4 }
-       },
-       
-       { "123456789012345678901234567890123456789012345678901234567890123"
-         "45678901234567890",
-               { 0xe3, 0x3b, 0x4d, 0xdc, 0x9c, 0x38, 0xf2, 0x19,
-                 0x9c, 0x3e, 0x7b, 0x16, 0x4f, 0xcc, 0x05, 0x36 }
-       },
+       unsigned char psize;
+       char digest[MAX_DIGEST_SIZE];
+       unsigned char np;
+       unsigned char tap[MAX_TAP];             
 };
 
-/*
- * MD5 test vectors from RFC1321
- */
-#define MD5_TEST_VECTORS       7
-
-struct md5_testvec {
-       char plaintext[128];
-       char digest[MD5_DIGEST_SIZE];
-} md5_tv_template[] = {
-       { "",
-               { 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04,
-                 0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e } },
-                       
-       { "a",
-               { 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8,
-                 0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61 } },
-                 
-       { "abc",
-               { 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0,
-                 0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72 } }, 
-                 
-       { "message digest",
-               { 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d,
-                 0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 } },
-                 
-       { "abcdefghijklmnopqrstuvwxyz",
-               { 0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00,
-                 0x7d, 0xfb, 0x49, 0x6c, 0xca, 0x67, 0xe1, 0x3b } },
-                 
-       { "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
-               { 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5,
-                 0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f } },
-                 
-       { "12345678901234567890123456789012345678901234567890123456789012"
-         "345678901234567890",
-               { 0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55,
-                 0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a } }
-};
-
-#ifdef CONFIG_CRYPTO_HMAC
-/*
- * HMAC-MD5 test vectors from RFC2202
- * (These need to be fixed to not use strlen).
- */
-#define HMAC_MD5_TEST_VECTORS  7
-
-struct hmac_md5_testvec {
+struct hmac_testvec {  
        char key[128];
+       unsigned char ksize;
        char plaintext[128];
-       char digest[MD5_DIGEST_SIZE];
+       unsigned char psize;
+       char digest[MAX_DIGEST_SIZE];
+       unsigned char np;
+       unsigned char tap[MAX_TAP];             
 };
 
-struct hmac_md5_testvec hmac_md5_tv_template[] =
-{
-       
-       {
-               { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
-                 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x00},
-                 
-               "Hi There",
-               
-               { 0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c,
-                 0x13, 0xf4, 0x8e, 0xf8, 0x15, 0x8b, 0xfc, 0x9d }
-       },
-           
-       {
-               { 'J', 'e', 'f', 'e', 0 },
-               
-               "what do ya want for nothing?",
-               
-               { 0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03,
-                 0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38 }
-       },
-       
-       {
-               { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00 },
-                 
-               { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0x00 },
-                 
-               { 0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88,
-                 0xdb, 0xb8, 0xc7, 0x33, 0xf0, 0xe8, 0xb3, 0xf6 }
-       },
-       
-       {
-               { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-                 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 
-                 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x00 },
-                 
-               { 
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0x00 },
-                 
-               { 0x69, 0x7e, 0xaf, 0x0a, 0xca, 0x3a, 0x3a, 0xea,
-                 0x3a, 0x75, 0x16, 0x47, 0x46, 0xff, 0xaa, 0x79 }
-       },
-       
-       {
-               { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
-                 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x00 },
-                 
-               "Test With Truncation",
-               
-               { 0x56, 0x46, 0x1e, 0xf2, 0x34, 0x2e, 0xdc, 0x00,
-                 0xf9, 0xba, 0xb9, 0x95, 0x69, 0x0e, 0xfd, 0x4c }
-       },
-       
-       {
-               { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0x00 },
-                 
-               "Test Using Larger Than Block-Size Key - Hash Key First",
-               
-               { 0x6b, 0x1a, 0xb7, 0xfe, 0x4b, 0xd7, 0xbf, 0x8f,
-                 0x0b, 0x62, 0xe6, 0xce, 0x61, 0xb9, 0xd0, 0xcd }
-       },
-       
-       {
-               { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0x00 },
-               
-               "Test Using Larger Than Block-Size Key and Larger Than One "
-               "Block-Size Data",
-               
-               { 0x6f, 0x63, 0x0f, 0xad, 0x67, 0xcd, 0xa0, 0xee,
-                 0x1f, 0xb1, 0xf5, 0x62, 0xdb, 0x3a, 0xa5, 0x3e }
-       },
-       
-       /* cross page test, need to retain key */
-       
-       {
-               { 'J', 'e', 'f', 'e', 0 },
-               
-               "what do ya want for nothing?",
-               
-               { 0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03,
-                 0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38 }
-       },
-       
+struct cipher_testvec {
+       unsigned char fail;
+       unsigned char wk; /* weak key flag */
+       char key[MAX_KEYLEN];
+       unsigned char klen;
+       char iv[MAX_IVLEN];
+       char input[48];
+       unsigned char ilen;
+       char result[48];
+       unsigned char rlen;
+       int np;
+       unsigned char tap[MAX_TAP];     
 };
 
-       
 /*
- * HMAC-SHA1 test vectors from RFC2202
+ * MD4 test vectors from RFC1320
  */
+#define MD4_TEST_VECTORS       7
 
-#define HMAC_SHA1_TEST_VECTORS 7
-
-struct hmac_sha1_testvec {
-       char key[128];
-       char plaintext[128];
-       char digest[SHA1_DIGEST_SIZE];
-} hmac_sha1_tv_template[] = {
-       
-       {
-               { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
-                 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
-                 0x00},
-                 
-               "Hi There",
-
-               { 0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64,
-                  0xe2, 0x8b, 0xc0, 0xb6, 0xfb ,0x37, 0x8c, 0x8e, 0xf1,
-                  0x46, 0xbe, 0x00 }
-       },
-           
-       {
-               { 'J', 'e', 'f', 'e', 0 },
-               
-               "what do ya want for nothing?",
-
-               { 0xef, 0xfc, 0xdf, 0x6a, 0xe5, 0xeb, 0x2f, 0xa2, 0xd2, 0x74, 
-                 0x16, 0xd5, 0xf1, 0x84, 0xdf, 0x9c, 0x25, 0x9a, 0x7c, 0x79 }
-
-       },
-       
-       {
-               { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0x00},
-
-                 
-               { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0x00 },
-                 
-               { 0x12, 0x5d, 0x73, 0x42, 0xb9, 0xac, 0x11, 0xcd, 0x91, 0xa3, 
-                 0x9a, 0xf4, 0x8a, 0xa1, 0x7b, 0x4f, 0x63, 0xf1, 0x75, 0xd3 }
-
-       },
-       
-       {
-               { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-                 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 
-                 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x00 },
-                 
-               { 
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0x00 },
-                 
-               { 0x4c, 0x90, 0x07, 0xf4, 0x02, 0x62, 0x50, 0xc6, 0xbc, 0x84, 
-                 0x14, 0xf9, 0xbf, 0x50, 0xc8, 0x6c, 0x2d, 0x72, 0x35, 0xda }
-
-       },
-       
-       {
-               { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
-                 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
-                 0x00 },
-                 
-               "Test With Truncation",
-               
-               { 0x4c, 0x1a, 0x03, 0x42, 0x4b, 0x55, 0xe0, 0x7f, 0xe7, 0xf2, 
-                 0x7b, 0xe1, 0xd5, 0x8b, 0xb9, 0x32, 0x4a, 0x9a, 0x5a, 0x04 }
-
-       },
-       
-       {
-               { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0x00 },
-                 
-               "Test Using Larger Than Block-Size Key - Hash Key First",
-               
-               { 0xaa, 0x4a, 0xe5, 0xe1, 0x52, 0x72, 0xd0, 0x0e, 0x95, 0x70, 
-                 0x56, 0x37, 0xce, 0x8a, 0x3b, 0x55, 0xed, 0x40, 0x21, 0x12 }
-
-       },
-       
-       {
-               { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0x00 },
-               
-               "Test Using Larger Than Block-Size Key and Larger Than One "
-               "Block-Size Data",
-               
-               { 0xe8, 0xe9, 0x9d, 0x0f, 0x45, 0x23, 0x7d, 0x78, 0x6d, 0x6b, 
-                 0xba, 0xa7, 0x96, 0x5c, 0x78, 0x08, 0xbb, 0xff, 0x1a, 0x91 }
-       },
-       
-       /* cross page test */
-       {
-               { 'J', 'e', 'f', 'e', 0 },
-               
-               "what do ya want for nothing?",
-
-               { 0xef, 0xfc, 0xdf, 0x6a, 0xe5, 0xeb, 0x2f, 0xa2, 0xd2, 0x74, 
-                 0x16, 0xd5, 0xf1, 0x84, 0xdf, 0x9c, 0x25, 0x9a, 0x7c, 0x79 }
-
+struct hash_testvec md4_tv_template [] = {
+       {
+               .plaintext = "",
+               .digest = { 0x31, 0xd6, 0xcf, 0xe0, 0xd1, 0x6a, 0xe9, 0x31,
+                           0xb7, 0x3c, 0x59, 0xd7, 0xe0, 0xc0, 0x89, 0xc0 },
+       }, {
+               .plaintext = "a",
+               .psize  = 1,
+               .digest = { 0xbd, 0xe5, 0x2c, 0xb3, 0x1d, 0xe3, 0x3e, 0x46,
+                           0x24, 0x5e, 0x05, 0xfb, 0xdb, 0xd6, 0xfb, 0x24 },
+       }, {
+               .plaintext = "abc",
+               .psize  = 3,
+               .digest = { 0xa4, 0x48, 0x01, 0x7a, 0xaf, 0x21, 0xd8, 0x52,
+                           0x5f, 0xc1, 0x0a, 0xe8, 0x7a, 0xa6, 0x72, 0x9d },
+       }, {
+               .plaintext = "message digest",
+               .psize  = 14,
+               .digest = { 0xd9, 0x13, 0x0a, 0x81, 0x64, 0x54, 0x9f, 0xe8,
+                           0x18, 0x87, 0x48, 0x06, 0xe1, 0xc7, 0x01, 0x4b },
+       }, {
+               .plaintext = "abcdefghijklmnopqrstuvwxyz",
+               .psize  = 26,
+               .digest = { 0xd7, 0x9e, 0x1c, 0x30, 0x8a, 0xa5, 0xbb, 0xcd,
+                           0xee, 0xa8, 0xed, 0x63, 0xdf, 0x41, 0x2d, 0xa9 },
+               .np     = 2,
+               .tap    = { 13, 13 },
+       }, {
+               .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
+               .psize  = 62,
+               .digest = { 0x04, 0x3f, 0x85, 0x82, 0xf2, 0x41, 0xdb, 0x35,
+                           0x1c, 0xe6, 0x27, 0xe1, 0x53, 0xe7, 0xf0, 0xe4 },
+       }, {
+               .plaintext = "123456789012345678901234567890123456789012345678901234567890123"
+                            "45678901234567890",
+               .psize  = 80,
+               .digest = { 0xe3, 0x3b, 0x4d, 0xdc, 0x9c, 0x38, 0xf2, 0x19,
+                           0x9c, 0x3e, 0x7b, 0x16, 0x4f, 0xcc, 0x05, 0x36 },
        },
-
 };
 
 /*
- * HMAC-SHA256 test vectors from
- * draft-ietf-ipsec-ciph-sha-256-01.txt
+ * MD5 test vectors from RFC1321
  */
-#define HMAC_SHA256_TEST_VECTORS       10
-
-struct hmac_sha256_testvec {
-       char key[128];
-       char plaintext[128];
-       char digest[SHA256_DIGEST_SIZE];
-} hmac_sha256_tv_template[] = {
-
-       {
-               { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-                 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
-                 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
-                 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x00 },
-                 
-       
-               { "abc" },
-               
-               { 0xa2, 0x1b, 0x1f, 0x5d, 0x4c, 0xf4, 0xf7, 0x3a,
-                 0x4d, 0xd9, 0x39, 0x75, 0x0f, 0x7a, 0x06, 0x6a,
-                 0x7f, 0x98, 0xcc, 0x13, 0x1c, 0xb1, 0x6a, 0x66,
-                 0x92, 0x75, 0x90, 0x21, 0xcf, 0xab, 0x81, 0x81 },
-
-       },
-       
-       {
-               { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-                 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
-                 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
-                  0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x00 },
-               
-               { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" },
-               
-               { 0x10, 0x4f, 0xdc, 0x12, 0x57, 0x32, 0x8f, 0x08,
-                 0x18, 0x4b, 0xa7, 0x31, 0x31, 0xc5, 0x3c, 0xae,
-                 0xe6, 0x98, 0xe3, 0x61, 0x19, 0x42, 0x11, 0x49,
-                 0xea, 0x8c, 0x71, 0x24, 0x56, 0x69, 0x7d, 0x30 }
-       },
-
-       {
-               { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-                 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
-                 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
-                 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20, 0x00 },
-               
-               { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
-                 "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq" },
-               
-               { 0x47, 0x03, 0x05, 0xfc, 0x7e, 0x40, 0xfe, 0x34,
-                 0xd3, 0xee, 0xb3, 0xe7, 0x73, 0xd9, 0x5a, 0xab,
-                 0x73, 0xac, 0xf0, 0xfd, 0x06, 0x04, 0x47, 0xa5,
-                 0xeb, 0x45, 0x95, 0xbf, 0x33, 0xa9, 0xd1, 0xa3 }
-       },
-
-       {
-               { 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
-                 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
-                 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b,
-                 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x0b, 0x00 },
-               
-               { "Hi There" },
-               
-               { 0x19, 0x8a, 0x60, 0x7e, 0xb4, 0x4b, 0xfb, 0xc6,
-                 0x99, 0x03, 0xa0, 0xf1, 0xcf, 0x2b, 0xbd, 0xc5,
-                 0xba, 0x0a, 0xa3, 0xf3, 0xd9, 0xae, 0x3c, 0x1c,
-                 0x7a, 0x3b, 0x16, 0x96, 0xa0, 0xb6, 0x8c, 0xf7 }
-       },
-
-       {
-               { "Jefe" },
-               
-               { "what do ya want for nothing?" },
-               
-               { 0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e,
-                 0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7,
-                 0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83,
-                 0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43 }
-       },
-
-       {
-               { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00 },
-               
-               { 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd, 0xdd,
-                 0xdd, 0xdd, 0x00 },
-               
-               { 0xcd, 0xcb, 0x12, 0x20, 0xd1, 0xec, 0xcc, 0xea,
-                 0x91, 0xe5, 0x3a, 0xba, 0x30, 0x92, 0xf9, 0x62,
-                 0xe5, 0x49, 0xfe, 0x6c, 0xe9, 0xed, 0x7f, 0xdc,
-                 0x43, 0x19, 0x1f, 0xbd, 0xe4, 0x5c, 0x30, 0xb0 }
-       },
-
-       {
-               { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
-                 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
-                 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
-                 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
-                 0x21, 0x22, 0x23, 0x24, 0x25, 0x00 },
-               
-               { 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd, 0xcd,
-                 0xcd, 0xcd, 0x00 },
-               
-               { 0xd4, 0x63, 0x3c, 0x17, 0xf6, 0xfb, 0x8d, 0x74,
-                 0x4c, 0x66, 0xde, 0xe0, 0xf8, 0xf0, 0x74, 0x55,
-                 0x6e, 0xc4, 0xaf, 0x55, 0xef, 0x07, 0x99, 0x85,
-                 0x41, 0x46, 0x8e, 0xb4, 0x9b, 0xd2, 0xe9, 0x17 }
-       },
-
-       {
-               { 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
-                 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
-                 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,
-                 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x00 },
-               
-               { "Test With Truncation" },
-               
-               { 0x75, 0x46, 0xaf, 0x01, 0x84, 0x1f, 0xc0, 0x9b,
-                 0x1a, 0xb9, 0xc3, 0x74, 0x9a, 0x5f, 0x1c, 0x17,
-                 0xd4, 0xf5, 0x89, 0x66, 0x8a, 0x58, 0x7b, 0x27,
-                 0x00, 0xa9, 0xc9, 0x7c, 0x11, 0x93, 0xcf, 0x42 }
-       },
-       
-       {
-               { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00 },
-               
-               { "Test Using Larger Than Block-Size Key - Hash Key First" },
-               
-               { 0x69, 0x53, 0x02, 0x5e, 0xd9, 0x6f, 0x0c, 0x09,
-                 0xf8, 0x0a, 0x96, 0xf7, 0x8e, 0x65, 0x38, 0xdb,
-                 0xe2, 0xe7, 0xb8, 0x20, 0xe3, 0xdd, 0x97, 0x0e,
-                 0x7d, 0xdd, 0x39, 0x09, 0x1b, 0x32, 0x35, 0x2f }
-       },
+#define MD5_TEST_VECTORS       7
 
-       {
-               { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa,
-                 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0x00 },
-               
-               { "Test Using Larger Than Block-Size Key and Larger Than "
-                 "One Block-Size Data" },
-               
-               { 0x63, 0x55, 0xac, 0x22, 0xe8, 0x90, 0xd0, 0xa3,
-                 0xc8, 0x48, 0x1a, 0x5c, 0xa4, 0x82, 0x5b, 0xc8,
-                 0x84, 0xd3, 0xe7, 0xa1, 0xff, 0x98, 0xa2, 0xfc,
-                 0x2a, 0xc7, 0xd8, 0xe0, 0x64, 0xc3, 0xb2, 0xe6 }
-       },
+struct hash_testvec md5_tv_template[] = {
+       {
+               .digest = { 0xd4, 0x1d, 0x8c, 0xd9, 0x8f, 0x00, 0xb2, 0x04,
+                           0xe9, 0x80, 0x09, 0x98, 0xec, 0xf8, 0x42, 0x7e },
+       }, {
+               .plaintext = "a",
+               .psize  = 1,
+               .digest = { 0x0c, 0xc1, 0x75, 0xb9, 0xc0, 0xf1, 0xb6, 0xa8,
+                           0x31, 0xc3, 0x99, 0xe2, 0x69, 0x77, 0x26, 0x61 },
+       }, {
+               .plaintext = "abc",
+               .psize  = 3,
+               .digest = { 0x90, 0x01, 0x50, 0x98, 0x3c, 0xd2, 0x4f, 0xb0,
+                           0xd6, 0x96, 0x3f, 0x7d, 0x28, 0xe1, 0x7f, 0x72 },
+       }, {
+               .plaintext = "message digest",
+               .psize  = 14,
+               .digest = { 0xf9, 0x6b, 0x69, 0x7d, 0x7c, 0xb7, 0x93, 0x8d,
+                           0x52, 0x5a, 0x2f, 0x31, 0xaa, 0xf1, 0x61, 0xd0 },
+       }, {
+               .plaintext = "abcdefghijklmnopqrstuvwxyz",
+               .psize  = 26,
+               .digest = { 0xc3, 0xfc, 0xd3, 0xd7, 0x61, 0x92, 0xe4, 0x00,
+                           0x7d, 0xfb, 0x49, 0x6c, 0xca, 0x67, 0xe1, 0x3b },
+               .np     = 2,
+               .tap    = {13, 13}
+       }, {
+               .plaintext = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
+               .psize  = 62,
+               .digest = { 0xd1, 0x74, 0xab, 0x98, 0xd2, 0x77, 0xd9, 0xf5,
+                           0xa5, 0x61, 0x1c, 0x2c, 0x9f, 0x41, 0x9d, 0x9f },
+       }, {
+               .plaintext = "12345678901234567890123456789012345678901234567890123456789012"
+                            "345678901234567890",
+               .psize  = 80,
+               .digest = { 0x57, 0xed, 0xf4, 0xa2, 0x2b, 0xe3, 0xc9, 0x55,
+                           0xac, 0x49, 0xda, 0x2e, 0x21, 0x07, 0xb6, 0x7a },
+       }
 };
 
-
-#endif /* CONFIG_CRYPTO_HMAC */
-
 /*
  * SHA1 test vectors  from from FIPS PUB 180-1
  */
 #define SHA1_TEST_VECTORS      2
 
-struct sha1_testvec {
-       char plaintext[128];
-       char digest[SHA1_DIGEST_SIZE];
-} sha1_tv_template[] = {
-       { "abc",
-         { 0xA9, 0x99, 0x3E, 0x36, 0x47, 0x06, 0x81, 0x6A, 0xBA, 0x3E, 
-           0x25, 0x71, 0x78, 0x50, 0xC2, 0x6C ,0x9C, 0xD0, 0xD8, 0x9D }
-       },
-                       
-       { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
-
-         { 0x84, 0x98, 0x3E, 0x44, 0x1C, 0x3B, 0xD2, 0x6E ,0xBA, 0xAE,
-           0x4A, 0xA1, 0xF9, 0x51, 0x29, 0xE5, 0xE5, 0x46, 0x70, 0xF1 }
+struct hash_testvec sha1_tv_template[] = {
+       { 
+               .plaintext = "abc",
+               .psize  = 3,
+               .digest = { 0xa9, 0x99, 0x3e, 0x36, 0x47, 0x06, 0x81, 0x6a, 0xba, 0x3e,
+                           0x25, 0x71, 0x78, 0x50, 0xc2, 0x6c, 0x9c, 0xd0, 0xd8, 0x9d },
+       }, {
+               .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+               .psize  = 56,
+               .digest = { 0x84, 0x98, 0x3e, 0x44, 0x1c, 0x3b, 0xd2, 0x6e, 0xba, 0xae,
+                           0x4a, 0xa1, 0xf9, 0x51, 0x29, 0xe5, 0xe5, 0x46, 0x70, 0xf1 },
+               .np     = 2,
+               .tap    = { 28, 28 }
        }
 };
 
@@ -573,22 +173,23 @@ struct sha1_testvec {
  */
 #define SHA256_TEST_VECTORS    2
 
-struct sha256_testvec {
-       char plaintext[128];
-       char digest[SHA256_DIGEST_SIZE];
-} sha256_tv_template[] = {
-       { "abc",
-         { 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea,
-           0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23,
-           0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c,
-           0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad }
-       },
-                       
-       { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
-         { 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8,
-           0xe5, 0xc0, 0x26, 0x93, 0x0c, 0x3e, 0x60, 0x39,
-           0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67,
-           0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1 }
+struct hash_testvec sha256_tv_template[] = {   
+       { 
+               .plaintext = "abc",
+               .psize  = 3,
+               .digest = { 0xba, 0x78, 0x16, 0xbf, 0x8f, 0x01, 0xcf, 0xea,
+                           0x41, 0x41, 0x40, 0xde, 0x5d, 0xae, 0x22, 0x23,
+                           0xb0, 0x03, 0x61, 0xa3, 0x96, 0x17, 0x7a, 0x9c,
+                           0xb4, 0x10, 0xff, 0x61, 0xf2, 0x00, 0x15, 0xad },
+       }, {
+               .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+               .psize  = 56,
+               .digest = { 0x24, 0x8d, 0x6a, 0x61, 0xd2, 0x06, 0x38, 0xb8,
+                           0xe5, 0xc0, 0x26, 0x93, 0x0c, 0x3e, 0x60, 0x39,
+                           0xa3, 0x3c, 0xe4, 0x59, 0x64, 0xff, 0x21, 0x67,
+                           0xf6, 0xec, 0xed, 0xd4, 0x19, 0xdb, 0x06, 0xc1 },
+               .np     = 2,
+               .tap    = { 28, 28 }
        },
 };
 
@@ -597,47 +198,47 @@ struct sha256_testvec {
  */
 #define SHA384_TEST_VECTORS    4
 
-struct sha384_testvec {
-       char plaintext[128];
-       char digest[SHA384_DIGEST_SIZE];
-} sha384_tv_template[] = {
-
-       { "abc",
-         { 0xcb, 0x00, 0x75, 0x3f, 0x45, 0xa3, 0x5e, 0x8b,
-           0xb5, 0xa0, 0x3d, 0x69, 0x9a, 0xc6, 0x50, 0x07,
-           0x27, 0x2c, 0x32, 0xab, 0x0e, 0xde, 0xd1, 0x63,
-           0x1a, 0x8b, 0x60, 0x5a, 0x43, 0xff, 0x5b, 0xed,
-           0x80, 0x86, 0x07, 0x2b, 0xa1, 0xe7, 0xcc, 0x23,
-           0x58, 0xba, 0xec, 0xa1, 0x34, 0xc8, 0x25, 0xa7 }
-       },
-       
-       { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
-         { 0x33, 0x91, 0xfd, 0xdd, 0xfc, 0x8d, 0xc7, 0x39,
-           0x37, 0x07, 0xa6, 0x5b, 0x1b, 0x47, 0x09, 0x39,
-           0x7c, 0xf8, 0xb1, 0xd1, 0x62, 0xaf, 0x05, 0xab,
-           0xfe, 0x8f, 0x45, 0x0d, 0xe5, 0xf3, 0x6b, 0xc6,
-           0xb0, 0x45, 0x5a, 0x85, 0x20, 0xbc, 0x4e, 0x6f,
-           0x5f, 0xe9, 0x5b, 0x1f, 0xe3, 0xc8, 0x45, 0x2b  }
-       },
-       
-       { "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
-         "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
-         { 0x09, 0x33, 0x0c, 0x33, 0xf7, 0x11, 0x47, 0xe8,
-           0x3d, 0x19, 0x2f, 0xc7, 0x82, 0xcd, 0x1b, 0x47,
-           0x53, 0x11, 0x1b, 0x17, 0x3b, 0x3b, 0x05, 0xd2,
-           0x2f, 0xa0, 0x80, 0x86, 0xe3, 0xb0, 0xf7, 0x12,
-           0xfc, 0xc7, 0xc7, 0x1a, 0x55, 0x7e, 0x2d, 0xb9,
-           0x66, 0xc3, 0xe9, 0xfa, 0x91, 0x74, 0x60, 0x39  }
-       },
-       
-       { "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
-         "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
-         { 0x3d, 0x20, 0x89, 0x73, 0xab, 0x35, 0x08, 0xdb,
-           0xbd, 0x7e, 0x2c, 0x28, 0x62, 0xba, 0x29, 0x0a,
-           0xd3, 0x01, 0x0e, 0x49, 0x78, 0xc1, 0x98, 0xdc,
-           0x4d, 0x8f, 0xd0, 0x14, 0xe5, 0x82, 0x82, 0x3a,
-           0x89, 0xe1, 0x6f, 0x9b, 0x2a, 0x7b, 0xbc, 0x1a,
-           0xc9, 0x38, 0xe2, 0xd1, 0x99, 0xe8, 0xbe, 0xa4 }
+struct hash_testvec sha384_tv_template[] = {
+       { 
+               .plaintext= "abc",
+               .psize  = 3,
+               .digest = { 0xcb, 0x00, 0x75, 0x3f, 0x45, 0xa3, 0x5e, 0x8b,
+                           0xb5, 0xa0, 0x3d, 0x69, 0x9a, 0xc6, 0x50, 0x07,
+                           0x27, 0x2c, 0x32, 0xab, 0x0e, 0xde, 0xd1, 0x63,
+                           0x1a, 0x8b, 0x60, 0x5a, 0x43, 0xff, 0x5b, 0xed,
+                           0x80, 0x86, 0x07, 0x2b, 0xa1, 0xe7, 0xcc, 0x23,
+                           0x58, 0xba, 0xec, 0xa1, 0x34, 0xc8, 0x25, 0xa7 },
+       }, {
+               .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+               .psize  = 56,
+               .digest = { 0x33, 0x91, 0xfd, 0xdd, 0xfc, 0x8d, 0xc7, 0x39,
+                           0x37, 0x07, 0xa6, 0x5b, 0x1b, 0x47, 0x09, 0x39,
+                           0x7c, 0xf8, 0xb1, 0xd1, 0x62, 0xaf, 0x05, 0xab,
+                           0xfe, 0x8f, 0x45, 0x0d, 0xe5, 0xf3, 0x6b, 0xc6,
+                           0xb0, 0x45, 0x5a, 0x85, 0x20, 0xbc, 0x4e, 0x6f,
+                           0x5f, 0xe9, 0x5b, 0x1f, 0xe3, 0xc8, 0x45, 0x2b},
+       }, {
+               .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
+                            "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
+               .psize  = 112,
+               .digest = { 0x09, 0x33, 0x0c, 0x33, 0xf7, 0x11, 0x47, 0xe8,
+                           0x3d, 0x19, 0x2f, 0xc7, 0x82, 0xcd, 0x1b, 0x47,
+                           0x53, 0x11, 0x1b, 0x17, 0x3b, 0x3b, 0x05, 0xd2,
+                           0x2f, 0xa0, 0x80, 0x86, 0xe3, 0xb0, 0xf7, 0x12,
+                           0xfc, 0xc7, 0xc7, 0x1a, 0x55, 0x7e, 0x2d, 0xb9,
+                           0x66, 0xc3, 0xe9, 0xfa, 0x91, 0x74, 0x60, 0x39  },
+       }, {
+               .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
+                            "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
+               .psize  = 104,
+               .digest = { 0x3d, 0x20, 0x89, 0x73, 0xab, 0x35, 0x08, 0xdb,
+                           0xbd, 0x7e, 0x2c, 0x28, 0x62, 0xba, 0x29, 0x0a,
+                           0xd3, 0x01, 0x0e, 0x49, 0x78, 0xc1, 0x98, 0xdc,
+                           0x4d, 0x8f, 0xd0, 0x14, 0xe5, 0x82, 0x82, 0x3a,
+                           0x89, 0xe1, 0x6f, 0x9b, 0x2a, 0x7b, 0xbc, 0x1a,
+                           0xc9, 0x38, 0xe2, 0xd1, 0x99, 0xe8, 0xbe, 0xa4 },
+               .np     = 4,
+               .tap    = { 26, 26, 26, 26 }
        },
 };
 
@@ -646,439 +247,616 @@ struct sha384_testvec {
  */
 #define SHA512_TEST_VECTORS    4
 
-struct sha512_testvec {
-       char plaintext[128];
-       char digest[SHA512_DIGEST_SIZE];
-} sha512_tv_template[] = {
-
-       { "abc",
-         { 0xdd, 0xaf, 0x35, 0xa1, 0x93, 0x61, 0x7a, 0xba,
-           0xcc, 0x41, 0x73, 0x49, 0xae, 0x20, 0x41, 0x31,
-           0x12, 0xe6, 0xfa, 0x4e, 0x89, 0xa9, 0x7e, 0xa2,
-           0x0a, 0x9e, 0xee, 0xe6, 0x4b, 0x55, 0xd3, 0x9a,
-           0x21, 0x92, 0x99, 0x2a, 0x27, 0x4f, 0xc1, 0xa8,
-           0x36, 0xba, 0x3c, 0x23, 0xa3, 0xfe, 0xeb, 0xbd,
-           0x45, 0x4d, 0x44, 0x23, 0x64, 0x3c, 0xe8, 0x0e,
-           0x2a, 0x9a, 0xc9, 0x4f, 0xa5, 0x4c, 0xa4, 0x9f }
-       },
-       
-       { "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
-         { 0x20, 0x4a, 0x8f, 0xc6, 0xdd, 0xa8, 0x2f, 0x0a,
-           0x0c, 0xed, 0x7b, 0xeb, 0x8e, 0x08, 0xa4, 0x16,
-           0x57, 0xc1, 0x6e, 0xf4, 0x68, 0xb2, 0x28, 0xa8,
-           0x27, 0x9b, 0xe3, 0x31, 0xa7, 0x03, 0xc3, 0x35,
-           0x96, 0xfd, 0x15, 0xc1, 0x3b, 0x1b, 0x07, 0xf9,
-           0xaa, 0x1d, 0x3b, 0xea, 0x57, 0x78, 0x9c, 0xa0,
-           0x31, 0xad, 0x85, 0xc7, 0xa7, 0x1d, 0xd7, 0x03,
-           0x54, 0xec, 0x63, 0x12, 0x38, 0xca, 0x34, 0x45 }
-       },
-       
-       { "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
-         "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
-         { 0x8e, 0x95, 0x9b, 0x75, 0xda, 0xe3, 0x13, 0xda,
-           0x8c, 0xf4, 0xf7, 0x28, 0x14, 0xfc, 0x14, 0x3f,
-           0x8f, 0x77, 0x79, 0xc6, 0xeb, 0x9f, 0x7f, 0xa1,
-           0x72, 0x99, 0xae, 0xad, 0xb6, 0x88, 0x90, 0x18,
-           0x50, 0x1d, 0x28, 0x9e, 0x49, 0x00, 0xf7, 0xe4,
-           0x33, 0x1b, 0x99, 0xde, 0xc4, 0xb5, 0x43, 0x3a,
-           0xc7, 0xd3, 0x29, 0xee, 0xb6, 0xdd, 0x26, 0x54,
-           0x5e, 0x96, 0xe5, 0x5b, 0x87, 0x4b, 0xe9, 0x09 }
-       },
-       
-       { "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
-         "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
-         { 0x93, 0x0d, 0x0c, 0xef, 0xcb, 0x30, 0xff, 0x11,
-           0x33, 0xb6, 0x89, 0x81, 0x21, 0xf1, 0xcf, 0x3d,
-           0x27, 0x57, 0x8a, 0xfc, 0xaf, 0xe8, 0x67, 0x7c,
-           0x52, 0x57, 0xcf, 0x06, 0x99, 0x11, 0xf7, 0x5d,
-           0x8f, 0x58, 0x31, 0xb5, 0x6e, 0xbf, 0xda, 0x67,
-           0xb2, 0x78, 0xe6, 0x6d, 0xff, 0x8b, 0x84, 0xfe,
-           0x2b, 0x28, 0x70, 0xf7, 0x42, 0xa5, 0x80, 0xd8,
-           0xed, 0xb4, 0x19, 0x87, 0x23, 0x28, 0x50, 0xc9
-         }
+struct hash_testvec sha512_tv_template[] = {
+       { 
+               .plaintext = "abc",
+               .psize  = 3,
+               .digest = { 0xdd, 0xaf, 0x35, 0xa1, 0x93, 0x61, 0x7a, 0xba,
+                           0xcc, 0x41, 0x73, 0x49, 0xae, 0x20, 0x41, 0x31,
+                           0x12, 0xe6, 0xfa, 0x4e, 0x89, 0xa9, 0x7e, 0xa2,
+                           0x0a, 0x9e, 0xee, 0xe6, 0x4b, 0x55, 0xd3, 0x9a,
+                           0x21, 0x92, 0x99, 0x2a, 0x27, 0x4f, 0xc1, 0xa8,
+                           0x36, 0xba, 0x3c, 0x23, 0xa3, 0xfe, 0xeb, 0xbd,
+                           0x45, 0x4d, 0x44, 0x23, 0x64, 0x3c, 0xe8, 0x0e,
+                           0x2a, 0x9a, 0xc9, 0x4f, 0xa5, 0x4c, 0xa4, 0x9f },
+       }, {
+               .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+               .psize  = 56,
+               .digest = { 0x20, 0x4a, 0x8f, 0xc6, 0xdd, 0xa8, 0x2f, 0x0a,
+                           0x0c, 0xed, 0x7b, 0xeb, 0x8e, 0x08, 0xa4, 0x16,
+                           0x57, 0xc1, 0x6e, 0xf4, 0x68, 0xb2, 0x28, 0xa8,
+                           0x27, 0x9b, 0xe3, 0x31, 0xa7, 0x03, 0xc3, 0x35,
+                           0x96, 0xfd, 0x15, 0xc1, 0x3b, 0x1b, 0x07, 0xf9,
+                           0xaa, 0x1d, 0x3b, 0xea, 0x57, 0x78, 0x9c, 0xa0,
+                           0x31, 0xad, 0x85, 0xc7, 0xa7, 0x1d, 0xd7, 0x03,
+                           0x54, 0xec, 0x63, 0x12, 0x38, 0xca, 0x34, 0x45 },
+       }, {
+               .plaintext = "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn"
+                            "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu",
+               .psize  = 112,
+               .digest = { 0x8e, 0x95, 0x9b, 0x75, 0xda, 0xe3, 0x13, 0xda,
+                           0x8c, 0xf4, 0xf7, 0x28, 0x14, 0xfc, 0x14, 0x3f,
+                           0x8f, 0x77, 0x79, 0xc6, 0xeb, 0x9f, 0x7f, 0xa1,
+                           0x72, 0x99, 0xae, 0xad, 0xb6, 0x88, 0x90, 0x18,
+                           0x50, 0x1d, 0x28, 0x9e, 0x49, 0x00, 0xf7, 0xe4,
+                           0x33, 0x1b, 0x99, 0xde, 0xc4, 0xb5, 0x43, 0x3a,
+                           0xc7, 0xd3, 0x29, 0xee, 0xb6, 0xdd, 0x26, 0x54,
+                           0x5e, 0x96, 0xe5, 0x5b, 0x87, 0x4b, 0xe9, 0x09 },
+       }, {
+               .plaintext = "abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd"
+                            "efghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz",
+               .psize  = 104,
+               .digest = { 0x93, 0x0d, 0x0c, 0xef, 0xcb, 0x30, 0xff, 0x11,
+                           0x33, 0xb6, 0x89, 0x81, 0x21, 0xf1, 0xcf, 0x3d,
+                           0x27, 0x57, 0x8a, 0xfc, 0xaf, 0xe8, 0x67, 0x7c,
+                           0x52, 0x57, 0xcf, 0x06, 0x99, 0x11, 0xf7, 0x5d,
+                           0x8f, 0x58, 0x31, 0xb5, 0x6e, 0xbf, 0xda, 0x67,
+                           0xb2, 0x78, 0xe6, 0x6d, 0xff, 0x8b, 0x84, 0xfe,
+                           0x2b, 0x28, 0x70, 0xf7, 0x42, 0xa5, 0x80, 0xd8,
+                           0xed, 0xb4, 0x19, 0x87, 0x23, 0x28, 0x50, 0xc9 },
+               .np     = 4,
+               .tap    = { 26, 26, 26, 26 }
        },
 };
 
+#ifdef CONFIG_CRYPTO_HMAC
 /*
- * DES test vectors.
+ * HMAC-MD5 test vectors from RFC2202
+ * (These need to be fixed to not use strlen).
  */
-#define DES_ENC_TEST_VECTORS           5
-#define DES_DEC_TEST_VECTORS           2
-#define DES_CBC_ENC_TEST_VECTORS       4
-#define DES_CBC_DEC_TEST_VECTORS       3
-#define DES3_EDE_ENC_TEST_VECTORS      3
-#define DES3_EDE_DEC_TEST_VECTORS      3
-
-struct des_tv {
-       unsigned int len;
-       int fail;
-       char key[24];
-       char iv[8];
-       char plaintext[128];
-       char result[128];
-};
-
-struct des_tv des_enc_tv_template[] = {
+#define HMAC_MD5_TEST_VECTORS  7
 
-       /* From Applied Cryptography */
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0 },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 },
-               { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d }
-       },
-       
-       /* Same key, different plaintext block */
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0 },
-               { 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
-               { 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b }
-       },
-       
-       /* Sbox test from NBS */
-       {
-               8, 0,
-               
-               { 0x7C, 0xA1, 0x10, 0x45, 0x4A, 0x1A, 0x6E, 0x57 },
-               { 0 },
-               { 0x01, 0xA1, 0xD6, 0xD0, 0x39, 0x77, 0x67, 0x42 },
-               { 0x69, 0x0F, 0x5B, 0x0D, 0x9A, 0x26, 0x93, 0x9B }
+struct hmac_testvec hmac_md5_tv_template[] =
+{      
+       {
+               .key    = { [0 ... 15] =  0x0b },
+               .ksize  = 16,
+               .plaintext = "Hi There",
+               .psize  = 8,
+               .digest = { 0x92, 0x94, 0x72, 0x7a, 0x36, 0x38, 0xbb, 0x1c,
+                           0x13, 0xf4, 0x8e, 0xf8, 0x15, 0x8b, 0xfc, 0x9d },
+       }, {
+               .key    = { 'J', 'e', 'f', 'e' },
+               .ksize  = 4,
+               .plaintext = "what do ya want for nothing?",
+               .psize  = 28,
+               .digest = { 0x75, 0x0c, 0x78, 0x3e, 0x6a, 0xb0, 0xb5, 0x03,
+                           0xea, 0xa8, 0x6e, 0x31, 0x0a, 0x5d, 0xb7, 0x38 },
+               .np     = 2,
+               .tap    = {14, 14}
+       }, {
+               .key    = { [0 ... 15] = 0xaa },
+               .ksize  = 16,
+               .plaintext = { [0 ... 49] =  0xdd },
+               .psize  = 50,
+               .digest = { 0x56, 0xbe, 0x34, 0x52, 0x1d, 0x14, 0x4c, 0x88,
+                           0xdb, 0xb8, 0xc7, 0x33, 0xf0, 0xe8, 0xb3, 0xf6 },
+       }, {
+               .key    = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+                           0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
+                           0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, },
+               .ksize  = 25,
+               .plaintext = { [0 ... 49] =  0xcd },
+               .psize  = 50,
+               .digest = { 0x69, 0x7e, 0xaf, 0x0a, 0xca, 0x3a, 0x3a, 0xea,
+                           0x3a, 0x75, 0x16, 0x47, 0x46, 0xff, 0xaa, 0x79 },
+       }, {
+               .key    = { [0 ... 15] = 0x0c },
+               .ksize  = 16,
+               .plaintext = "Test With Truncation",
+               .psize  = 20,
+               .digest = { 0x56, 0x46, 0x1e, 0xf2, 0x34, 0x2e, 0xdc, 0x00,
+                           0xf9, 0xba, 0xb9, 0x95, 0x69, 0x0e, 0xfd, 0x4c },
+       }, {
+               .key    = { [0 ... 79] =  0xaa },
+               .ksize  = 80,
+               .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
+               .psize  = 54,
+               .digest = { 0x6b, 0x1a, 0xb7, 0xfe, 0x4b, 0xd7, 0xbf, 0x8f,
+                           0x0b, 0x62, 0xe6, 0xce, 0x61, 0xb9, 0xd0, 0xcd },
+       }, {
+               .key    = { [0 ... 79] =  0xaa },
+               .ksize  = 80,
+               .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
+                            "Block-Size Data",
+               .psize  = 73,
+               .digest = { 0x6f, 0x63, 0x0f, 0xad, 0x67, 0xcd, 0xa0, 0xee,
+                           0x1f, 0xb1, 0xf5, 0x62, 0xdb, 0x3a, 0xa5, 0x3e },
        },
-       
-       /* Three blocks */
-       {
-               24, 0,
-               
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               
-               { 0 },
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
-                 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-                 0xca, 0xfe, 0xba, 0xbe, 0xfe, 0xed, 0xbe, 0xef },
+};
 
-               { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
-                 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b,
-                 0xb4, 0x99, 0x26, 0xf7, 0x1f, 0xe1, 0xd4, 0x90 },               
-       },
-       
-       /* Weak key */
-       {
-               8, 1,
-               
-               { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
-               { 0 },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 },
-               { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d }
-       },
-       
-       /* Two blocks -- for testing encryption across pages */
-       {
-               16, 0,
-               
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               
-               { 0 },
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
-                 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
+/*
+ * HMAC-SHA1 test vectors from RFC2202
+ */
+#define HMAC_SHA1_TEST_VECTORS 7
 
-               { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
-                 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b }
+struct hmac_testvec hmac_sha1_tv_template[] = {        
+       {
+               .key    = { [0 ... 19] = 0x0b },
+               .ksize  = 20,
+               .plaintext = "Hi There",
+               .psize  = 8,
+               .digest = { 0xb6, 0x17, 0x31, 0x86, 0x55, 0x05, 0x72, 0x64,
+                           0xe2, 0x8b, 0xc0, 0xb6, 0xfb, 0x37, 0x8c, 0x8e, 0xf1,
+                           0x46, 0xbe },
+       }, {
+               .key    = { 'J', 'e', 'f', 'e' },               
+               .ksize  = 4,
+               .plaintext = "what do ya want for nothing?",
+               .psize  = 28,
+               .digest = { 0xef, 0xfc, 0xdf, 0x6a, 0xe5, 0xeb, 0x2f, 0xa2, 0xd2, 0x74, 
+                           0x16, 0xd5, 0xf1, 0x84, 0xdf, 0x9c, 0x25, 0x9a, 0x7c, 0x79 },
+               .np     = 2,
+               .tap    = { 14, 14 }
+       }, {
+               .key    = { [0 ... 19] = 0xaa },
+               .ksize  = 20,
+               .plaintext = { [0 ... 49] = 0xdd },
+               .psize  = 50,
+               .digest = { 0x12, 0x5d, 0x73, 0x42, 0xb9, 0xac, 0x11, 0xcd, 0x91, 0xa3, 
+                           0x9a, 0xf4, 0x8a, 0xa1, 0x7b, 0x4f, 0x63, 0xf1, 0x75, 0xd3 },
+       }, {
+               .key    = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+                           0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10, 
+                           0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19 },
+               .ksize  = 25,
+               .plaintext = { [0 ... 49] = 0xcd },
+               .psize  = 50,
+               .digest = { 0x4c, 0x90, 0x07, 0xf4, 0x02, 0x62, 0x50, 0xc6, 0xbc, 0x84, 
+                           0x14, 0xf9, 0xbf, 0x50, 0xc8, 0x6c, 0x2d, 0x72, 0x35, 0xda },
+       }, {
+               .key    = { [0 ... 19] = 0x0c },
+               .ksize  = 20,
+               .plaintext = "Test With Truncation",
+               .psize  = 20,
+               .digest = { 0x4c, 0x1a, 0x03, 0x42, 0x4b, 0x55, 0xe0, 0x7f, 0xe7, 0xf2, 
+                           0x7b, 0xe1, 0xd5, 0x8b, 0xb9, 0x32, 0x4a, 0x9a, 0x5a, 0x04 },
+       }, {
+               .key    = { [0 ... 79] = 0xaa },
+               .ksize  = 80,
+               .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
+               .psize  = 54,
+               .digest = { 0xaa, 0x4a, 0xe5, 0xe1, 0x52, 0x72, 0xd0, 0x0e, 0x95, 0x70, 
+                           0x56, 0x37, 0xce, 0x8a, 0x3b, 0x55, 0xed, 0x40, 0x21, 0x12 },
+       }, {
+               .key    = { [0 ... 79] = 0xaa },
+               .ksize  = 80,
+               .plaintext = "Test Using Larger Than Block-Size Key and Larger Than One "
+                            "Block-Size Data",
+               .psize  = 73,
+               .digest = { 0xe8, 0xe9, 0x9d, 0x0f, 0x45, 0x23, 0x7d, 0x78, 0x6d, 0x6b, 
+                           0xba, 0xa7, 0x96, 0x5c, 0x78, 0x08, 0xbb, 0xff, 0x1a, 0x91 },
        },
+};
 
-       /* Two blocks -- for testing decryption across pages */
-       {
-               16, 0,
-               
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               
-               { 0 },
-               
-               { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
-                 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b },
-                 
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
-                 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
-       },
-       
-       /* Four blocks -- for testing encryption with chunking */
-       {
-               24, 0,
-               
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               
-               { 0 },
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
-                 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
-                 0xca, 0xfe, 0xba, 0xbe, 0xfe, 0xed, 0xbe, 0xef,
-                 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
+/*
+ * HMAC-SHA256 test vectors from
+ * draft-ietf-ipsec-ciph-sha-256-01.txt
+ */
+#define HMAC_SHA256_TEST_VECTORS       10
 
-               { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
-                 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b,
-                 0xb4, 0x99, 0x26, 0xf7, 0x1f, 0xe1, 0xd4, 0x90,
-                 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b },
+struct hmac_testvec hmac_sha256_tv_template[] = {
+       {
+               .key    = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+                           0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
+                           0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
+                           0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20},
+               .ksize  = 32,
+               .plaintext = "abc",
+               .psize  = 3,
+               .digest = { 0xa2, 0x1b, 0x1f, 0x5d, 0x4c, 0xf4, 0xf7, 0x3a,
+                           0x4d, 0xd9, 0x39, 0x75, 0x0f, 0x7a, 0x06, 0x6a,
+                           0x7f, 0x98, 0xcc, 0x13, 0x1c, 0xb1, 0x6a, 0x66,
+                           0x92, 0x75, 0x90, 0x21, 0xcf, 0xab, 0x81, 0x81 },
+       }, {
+               .key    = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+                           0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
+                           0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
+                           0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20 },
+               .ksize  = 32,
+               .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+               .psize  = 56,
+               .digest = { 0x10, 0x4f, 0xdc, 0x12, 0x57, 0x32, 0x8f, 0x08,
+                           0x18, 0x4b, 0xa7, 0x31, 0x31, 0xc5, 0x3c, 0xae,
+                           0xe6, 0x98, 0xe3, 0x61, 0x19, 0x42, 0x11, 0x49,
+                           0xea, 0x8c, 0x71, 0x24, 0x56, 0x69, 0x7d, 0x30 },
+       }, {
+               .key    = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+                           0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
+                           0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
+                           0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20 },
+               .ksize  = 32,
+               .plaintext = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
+                            "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq",
+               .psize  = 112,
+               .digest = { 0x47, 0x03, 0x05, 0xfc, 0x7e, 0x40, 0xfe, 0x34,
+                           0xd3, 0xee, 0xb3, 0xe7, 0x73, 0xd9, 0x5a, 0xab,
+                           0x73, 0xac, 0xf0, 0xfd, 0x06, 0x04, 0x47, 0xa5,
+                           0xeb, 0x45, 0x95, 0xbf, 0x33, 0xa9, 0xd1, 0xa3 },
+       }, {
+               .key    = { [0 ... 31] = 0x0b },
+               .ksize  = 32,
+               .plaintext = "Hi There",
+               .psize  = 8,
+               .digest = { 0x19, 0x8a, 0x60, 0x7e, 0xb4, 0x4b, 0xfb, 0xc6,
+                           0x99, 0x03, 0xa0, 0xf1, 0xcf, 0x2b, 0xbd, 0xc5,
+                           0xba, 0x0a, 0xa3, 0xf3, 0xd9, 0xae, 0x3c, 0x1c,
+                           0x7a, 0x3b, 0x16, 0x96, 0xa0, 0xb6, 0x8c, 0xf7 },
+       }, {
+               .key    = "Jefe",
+               .ksize  = 4,
+               .plaintext = "what do ya want for nothing?",
+               .psize  = 28,
+               .digest = { 0x5b, 0xdc, 0xc1, 0x46, 0xbf, 0x60, 0x75, 0x4e,
+                           0x6a, 0x04, 0x24, 0x26, 0x08, 0x95, 0x75, 0xc7,
+                           0x5a, 0x00, 0x3f, 0x08, 0x9d, 0x27, 0x39, 0x83,
+                           0x9d, 0xec, 0x58, 0xb9, 0x64, 0xec, 0x38, 0x43 },
+               .np     = 2,
+               .tap    = { 14, 14 }
+       }, {
+               .key    = { [0 ... 31] = 0xaa },
+               .ksize  = 32,
+               .plaintext = { [0 ... 49] = 0xdd },
+               .psize  = 50,
+               .digest = { 0xcd, 0xcb, 0x12, 0x20, 0xd1, 0xec, 0xcc, 0xea,
+                           0x91, 0xe5, 0x3a, 0xba, 0x30, 0x92, 0xf9, 0x62,
+                           0xe5, 0x49, 0xfe, 0x6c, 0xe9, 0xed, 0x7f, 0xdc,
+                           0x43, 0x19, 0x1f, 0xbd, 0xe4, 0x5c, 0x30, 0xb0 },
+       }, {
+               .key    = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08,
+                           0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0x10,
+                           0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18,
+                           0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, 0x20,
+                           0x21, 0x22, 0x23, 0x24, 0x25 },
+               .ksize  = 37,
+               .plaintext = { [0 ... 49] = 0xcd },
+               .psize  = 50,
+               .digest = { 0xd4, 0x63, 0x3c, 0x17, 0xf6, 0xfb, 0x8d, 0x74,
+                           0x4c, 0x66, 0xde, 0xe0, 0xf8, 0xf0, 0x74, 0x55,
+                           0x6e, 0xc4, 0xaf, 0x55, 0xef, 0x07, 0x99, 0x85,
+                           0x41, 0x46, 0x8e, 0xb4, 0x9b, 0xd2, 0xe9, 0x17 },
+       }, {
+               .key    = { [0 ... 31] = 0x0c },
+               .ksize  = 32,
+               .plaintext = "Test With Truncation",
+               .psize  = 20,
+               .digest = { 0x75, 0x46, 0xaf, 0x01, 0x84, 0x1f, 0xc0, 0x9b,
+                           0x1a, 0xb9, 0xc3, 0x74, 0x9a, 0x5f, 0x1c, 0x17,
+                           0xd4, 0xf5, 0x89, 0x66, 0x8a, 0x58, 0x7b, 0x27,
+                           0x00, 0xa9, 0xc9, 0x7c, 0x11, 0x93, 0xcf, 0x42 },
+       }, {
+               .key    = { [0 ... 79] = 0xaa },
+               .ksize  = 80,
+               .plaintext = "Test Using Larger Than Block-Size Key - Hash Key First",
+               .psize  = 54,
+               .digest = { 0x69, 0x53, 0x02, 0x5e, 0xd9, 0x6f, 0x0c, 0x09,
+                           0xf8, 0x0a, 0x96, 0xf7, 0x8e, 0x65, 0x38, 0xdb,
+                           0xe2, 0xe7, 0xb8, 0x20, 0xe3, 0xdd, 0x97, 0x0e,
+                           0x7d, 0xdd, 0x39, 0x09, 0x1b, 0x32, 0x35, 0x2f },
+       }, {
+               .key    = { [0 ... 79] = 0xaa },
+               .ksize  = 80,
+               .plaintext = "Test Using Larger Than Block-Size Key and Larger Than "
+                            "One Block-Size Data",
+               .psize  = 73,
+               .digest = { 0x63, 0x55, 0xac, 0x22, 0xe8, 0x90, 0xd0, 0xa3,
+                           0xc8, 0x48, 0x1a, 0x5c, 0xa4, 0x82, 0x5b, 0xc8,
+                           0x84, 0xd3, 0xe7, 0xa1, 0xff, 0x98, 0xa2, 0xfc,
+                           0x2a, 0xc7, 0xd8, 0xe0, 0x64, 0xc3, 0xb2, 0xe6 },
        },
-       
 };
 
-struct des_tv des_dec_tv_template[] = {
+#endif /* CONFIG_CRYPTO_HMAC */
 
-       /* From Applied Cryptography */
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0 },
-               { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 },
-       },
-       
-       /* Sbox test from NBS */
-       {
-               8, 0,
+/*
+ * DES test vectors.
+ */
+#define DES_ENC_TEST_VECTORS           10
+#define DES_DEC_TEST_VECTORS           4
+#define DES_CBC_ENC_TEST_VECTORS       5
+#define DES_CBC_DEC_TEST_VECTORS       4
+#define DES3_EDE_ENC_TEST_VECTORS      3
+#define DES3_EDE_DEC_TEST_VECTORS      3
 
-               { 0x7C, 0xA1, 0x10, 0x45, 0x4A, 0x1A, 0x6E, 0x57 },
-               { 0 },
-               { 0x69, 0x0F, 0x5B, 0x0D, 0x9A, 0x26, 0x93, 0x9B },
-               { 0x01, 0xA1, 0xD6, 0xD0, 0x39, 0x77, 0x67, 0x42 }
+struct cipher_testvec des_enc_tv_template[] = {
+       { /* From Applied Cryptography */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 },
+               .ilen   = 8,
+               .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d },
+               .rlen   = 8,
+       }, { /* Same key, different plaintext block */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
+               .ilen   = 8,
+               .result = { 0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b },
+               .rlen   = 8,
+       }, { /* Sbox test from NBS */
+               .key    = { 0x7c, 0xa1, 0x10, 0x45, 0x4a, 0x1a, 0x6e, 0x57 },
+               .klen   = 8,
+               .input  = { 0x01, 0xa1, 0xd6, 0xd0, 0x39, 0x77, 0x67, 0x42 },
+               .ilen   = 8,
+               .result = { 0x69, 0x0f, 0x5b, 0x0d, 0x9a, 0x26, 0x93, 0x9b },
+               .rlen   = 8,
+       }, { /* Three blocks */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+                           0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
+                           0xca, 0xfe, 0xba, 0xbe, 0xfe, 0xed, 0xbe, 0xef },
+               .ilen   = 24,
+               .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+                           0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b,
+                           0xb4, 0x99, 0x26, 0xf7, 0x1f, 0xe1, 0xd4, 0x90 },
+               .rlen   = 24,
+       }, { /* Weak key */
+               .fail   = 1,
+               .wk     = 1,
+               .key    = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01 },
+               .klen   = 8,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 },
+               .ilen   = 8,
+               .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d },
+               .rlen   = 8,
+       }, { /* Two blocks -- for testing encryption across pages */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+                           0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
+               .ilen   = 16,
+               .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+                           0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b },
+               .rlen   = 16,
+               .np     = 2,
+               .tap    = { 8, 8 }
+       }, { /* Four blocks -- for testing encryption with chunking */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+                           0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
+                           0xca, 0xfe, 0xba, 0xbe, 0xfe, 0xed, 0xbe, 0xef,
+                           0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
+               .ilen   = 32,
+               .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+                           0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b,
+                           0xb4, 0x99, 0x26, 0xf7, 0x1f, 0xe1, 0xd4, 0x90,
+                           0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b },
+               .rlen   = 32,
+               .np     = 3,
+               .tap    = { 14, 10, 8 } 
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+                           0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99,
+                           0xca, 0xfe, 0xba, 0xbe, 0xfe, 0xed, 0xbe, 0xef },
+               .ilen   = 24,
+               .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+                           0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b,
+                           0xb4, 0x99, 0x26, 0xf7, 0x1f, 0xe1, 0xd4, 0x90 },
+               .rlen   = 24,
+               .np     = 4,
+               .tap    = { 2, 1, 3, 18 } 
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+                           0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99 },
+               .ilen   = 16,
+               .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+                           0xf7, 0x9c, 0x89, 0x2a, 0x33, 0x8f, 0x4a, 0x8b },
+               .rlen   = 16,
+               .np     = 5,
+               .tap    = { 2, 2, 2, 2, 8 } 
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 },
+               .ilen   = 8,
+               .result = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d },
+               .rlen   = 8,
+               .np     = 8,
+               .tap    = { 1, 1, 1, 1, 1, 1, 1, 1 } 
        },
-       
-       /* Two blocks, for chunking test */
-       {
-               16, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0 },
-               
-               { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
-                 0x69, 0x0F, 0x5B, 0x0D, 0x9A, 0x26, 0x93, 0x9B },
-                 
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
-                 0xa3, 0x99, 0x7b, 0xca, 0xaf, 0x69, 0xa0, 0xf5 }
-       },
-
 };
 
-struct des_tv des_cbc_enc_tv_template[] = {
-       /* From OpenSSL */
-       {
-               24, 0,
-               
-               {0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef},
-               {0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10},
-               
-               { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, 
-                 0x4E, 0x6F, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, 
-                 0x68, 0x65, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20, 
-                 0x66, 0x6F, 0x72, 0x20, 0x00, 0x31, 0x00, 0x00 },
-                 
-               { 0xcc, 0xd1, 0x73, 0xff, 0xab, 0x20, 0x39, 0xf4, 
-                 0xac, 0xd8, 0xae, 0xfd, 0xdf, 0xd8, 0xa1, 0xeb, 
-                 0x46, 0x8e, 0x91, 0x15, 0x78, 0x88, 0xba, 0x68, 
-                 0x1d, 0x26, 0x93, 0x97, 0xf7, 0xfe, 0x62, 0xb4 }
+struct cipher_testvec des_dec_tv_template[] = {
+       { /* From Applied Cryptography */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d },
+               .ilen   = 8,
+               .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7 },
+               .rlen   = 8,
+       }, { /* Sbox test from NBS */
+               .key    = { 0x7c, 0xa1, 0x10, 0x45, 0x4a, 0x1a, 0x6e, 0x57 },           
+               .klen   = 8,
+               .input  = { 0x69, 0x0f, 0x5b, 0x0d, 0x9a, 0x26, 0x93, 0x9b },
+               .ilen   = 8,
+               .result = { 0x01, 0xa1, 0xd6, 0xd0, 0x39, 0x77, 0x67, 0x42 },
+               .rlen   = 8,
+       }, { /* Two blocks, for chunking test */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+                           0x69, 0x0f, 0x5b, 0x0d, 0x9a, 0x26, 0x93, 0x9b },
+               .ilen   = 16,
+               .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+                           0xa3, 0x99, 0x7b, 0xca, 0xaf, 0x69, 0xa0, 0xf5 },
+               .rlen   = 16,
+               .np     = 2,
+               .tap    = { 8, 8 }
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .input  = { 0xc9, 0x57, 0x44, 0x25, 0x6a, 0x5e, 0xd3, 0x1d,
+                           0x69, 0x0f, 0x5b, 0x0d, 0x9a, 0x26, 0x93, 0x9b },
+               .ilen   = 16,
+               .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xe7,
+                           0xa3, 0x99, 0x7b, 0xca, 0xaf, 0x69, 0xa0, 0xf5 },
+               .rlen   = 16,
+               .np     = 3,
+               .tap    = { 3, 12, 1 }
        },
+};
 
-       /* FIPS Pub 81 */
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef },
-               { 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74 },
-               { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
-               
-       },
-       
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
-               { 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 },
-               { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+struct cipher_testvec des_cbc_enc_tv_template[] = {
+       { /* From OpenSSL */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef},
+               .klen   = 8,
+               .iv     = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10},            
+               .input  = { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, 
+                           0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, 
+                           0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 }, 
+               .ilen   = 24,
+               .result = { 0xcc, 0xd1, 0x73, 0xff, 0xab, 0x20, 0x39, 0xf4, 
+                           0xac, 0xd8, 0xae, 0xfd, 0xdf, 0xd8, 0xa1, 0xeb, 
+                           0x46, 0x8e, 0x91, 0x15, 0x78, 0x88, 0xba, 0x68 }, 
+               .rlen   = 24,
+       }, { /* FIPS Pub 81 */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .iv     = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef },           
+               .input  = { 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74 },
+               .ilen   = 8,
+               .result = { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .iv     = { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
+               .input  = { 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 },
+               .ilen   = 8,
+               .result = { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+               .rlen   = 8,
+       }, {    
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .iv     = { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+               .input  = { 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 },
+               .ilen   = 8,
+               .result = { 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 },
+               .rlen   = 8,
+       }, { /* Copy of openssl vector for chunk testing */     
+            /* From OpenSSL */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef},
+               .klen   = 8,
+               .iv     = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10},            
+               .input  = { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, 
+                           0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, 
+                           0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 }, 
+               .ilen   = 24,
+               .result = { 0xcc, 0xd1, 0x73, 0xff, 0xab, 0x20, 0x39, 0xf4, 
+                           0xac, 0xd8, 0xae, 0xfd, 0xdf, 0xd8, 0xa1, 0xeb, 
+                           0x46, 0x8e, 0x91, 0x15, 0x78, 0x88, 0xba, 0x68 }, 
+               .rlen   = 24,
+               .np     = 2,
+               .tap    = { 13, 11 }
        },
-       
-       {       
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
-               { 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 },
-               { 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 },
-       },
-       
-       /* Copy of openssl vector for chunk testing */
-       
-       /* From OpenSSL */
-       {
-               24, 0,
-               
-               {0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef},
-               {0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10},
-               
-               { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20, 
-                 0x4E, 0x6F, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74, 
-                 0x68, 0x65, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20, 
-                 0x66, 0x6F, 0x72, 0x20, 0x00, 0x31, 0x00, 0x00 },
-                 
-               { 0xcc, 0xd1, 0x73, 0xff, 0xab, 0x20, 0x39, 0xf4, 
-                 0xac, 0xd8, 0xae, 0xfd, 0xdf, 0xd8, 0xa1, 0xeb, 
-                 0x46, 0x8e, 0x91, 0x15, 0x78, 0x88, 0xba, 0x68, 
-                 0x1d, 0x26, 0x93, 0x97, 0xf7, 0xfe, 0x62, 0xb4 }
-       },
-
-       
 };
 
-struct des_tv des_cbc_dec_tv_template[] = {
-
-       /* FIPS Pub 81 */
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef },
-               { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
-               { 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74 },
-       },
-       
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
-               { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
-               { 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 }, 
-       },
-       
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
-               { 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 }, 
-               { 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 },
-       },
-       
-       /* Copy of above, for chunk testing */
-       
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
-               { 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 }, 
-               { 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 },
+struct cipher_testvec des_cbc_dec_tv_template[] = {
+       { /* FIPS Pub 81 */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .iv     = { 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef },
+               .input  = { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },
+               .ilen   = 8,
+               .result = { 0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74 },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .iv     = { 0xe5, 0xc7, 0xcd, 0xde, 0x87, 0x2b, 0xf2, 0x7c },           
+               .input  = { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+               .ilen   = 8,
+               .result = { 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20 }, 
+               .rlen   = 8,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .iv     = { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+               .input  = { 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 }, 
+               .ilen   = 8,
+               .result = { 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 },
+               .rlen   = 8,
+       }, { /* Copy of above, for chunk testing */     
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .klen   = 8,
+               .iv     = { 0x43, 0xe9, 0x34, 0x00, 0x8c, 0x38, 0x9c, 0x0f },
+               .input  = { 0x68, 0x37, 0x88, 0x49, 0x9a, 0x7c, 0x05, 0xf6 }, 
+               .ilen   = 8,
+               .result = { 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20 },
+               .rlen   = 8,
+               .np     = 2,
+               .tap    = { 4, 4 }
        },
 };
 
 /*
  * We really need some more test vectors, especially for DES3 CBC.
  */
-struct des_tv des3_ede_enc_tv_template[] = {
-
-       /* These are from openssl */
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
-                 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
-                 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10},
-                 
-               { 0 },
-               
-               { 0x73, 0x6F, 0x6D, 0x65, 0x64, 0x61, 0x74, 0x61  },
-               
-               { 0x18, 0xd7, 0x48, 0xe5, 0x63, 0x62, 0x05, 0x72 },
-       },
-       
-       {
-               8, 0,
-               
-               { 0x03,0x52,0x02,0x07,0x67,0x20,0x82,0x17,
-                 0x86,0x02,0x87,0x66,0x59,0x08,0x21,0x98,
-                 0x64,0x05,0x6A,0xBD,0xFE,0xA9,0x34,0x57  },
-                
-               { 0 },
-               
-               { 0x73,0x71,0x75,0x69,0x67,0x67,0x6C,0x65  },
-               
-               { 0xc0,0x7d,0x2a,0x0f,0xa5,0x66,0xfa,0x30  }
-       },
-       
-
-       {
-               8, 0,
-               
-               { 0x10,0x46,0x10,0x34,0x89,0x98,0x80,0x20,
-                 0x91,0x07,0xD0,0x15,0x89,0x19,0x01,0x01,
-                 0x19,0x07,0x92,0x10,0x98,0x1A,0x01,0x01  },
-                 
-               { 0 },
-                         
-               { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00  },
-               
-               { 0xe1,0xef,0x62,0xc3,0x32,0xfe,0x82,0x5b  }    
+struct cipher_testvec des3_ede_enc_tv_template[] = {
+       { /* These are from openssl */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+                           0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+                           0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10},
+               .klen   = 24,
+               .input  = { 0x73, 0x6f, 0x6d, 0x65, 0x64, 0x61, 0x74, 0x61 },
+               .ilen   = 8,
+               .result = { 0x18, 0xd7, 0x48, 0xe5, 0x63, 0x62, 0x05, 0x72 },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x03, 0x52, 0x02, 0x07, 0x67, 0x20, 0x82, 0x17,
+                           0x86, 0x02, 0x87, 0x66, 0x59, 0x08, 0x21, 0x98,
+                           0x64, 0x05, 0x6a, 0xbd, 0xfe, 0xa9, 0x34, 0x57 },
+               .klen   = 24,
+               .input  = { 0x73, 0x71, 0x75, 0x69, 0x67, 0x67, 0x6c, 0x65 },
+               .ilen   = 8,
+               .result = { 0xc0, 0x7d, 0x2a, 0x0f, 0xa5, 0x66, 0xfa, 0x30 },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x10, 0x46, 0x10, 0x34, 0x89, 0x98, 0x80, 0x20,
+                           0x91, 0x07, 0xd0, 0x15, 0x89, 0x19, 0x01, 0x01,
+                           0x19, 0x07, 0x92, 0x10, 0x98, 0x1a, 0x01, 0x01 },
+               .klen   = 24,
+               .input  = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+               .ilen   = 8,
+               .result = { 0xe1, 0xef, 0x62, 0xc3, 0x32, 0xfe, 0x82, 0x5b },
+               .rlen   = 8,
        },
 };
 
-struct des_tv des3_ede_dec_tv_template[] = {
-
-       /* These are from openssl */
-       {
-               8, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
-                 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
-                 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10},
-                 
-               { 0 },
-               
-               
-               { 0x18, 0xd7, 0x48, 0xe5, 0x63, 0x62, 0x05, 0x72 },
-               
-               { 0x73, 0x6F, 0x6D, 0x65, 0x64, 0x61, 0x74, 0x61  },
-       },
-       
-       {
-               8, 0,
-               
-               { 0x03,0x52,0x02,0x07,0x67,0x20,0x82,0x17,
-                 0x86,0x02,0x87,0x66,0x59,0x08,0x21,0x98,
-                 0x64,0x05,0x6A,0xBD,0xFE,0xA9,0x34,0x57  },
-                
-               { 0 },
-               
-               { 0xc0,0x7d,0x2a,0x0f,0xa5,0x66,0xfa,0x30  },
-               
-               { 0x73,0x71,0x75,0x69,0x67,0x67,0x6C,0x65  },
-               
-       },
-       
-
-       {
-               8, 0,
-               
-               { 0x10,0x46,0x10,0x34,0x89,0x98,0x80,0x20,
-                 0x91,0x07,0xD0,0x15,0x89,0x19,0x01,0x01,
-                 0x19,0x07,0x92,0x10,0x98,0x1A,0x01,0x01  },
-                 
-               { 0 },
-                         
-               { 0xe1,0xef,0x62,0xc3,0x32,0xfe,0x82,0x5b  },
-               
-               { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00  },
+struct cipher_testvec des3_ede_dec_tv_template[] = {
+       { /* These are from openssl */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+                           0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55,
+                           0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10},
+               .klen   = 24,
+               .input  = { 0x18, 0xd7, 0x48, 0xe5, 0x63, 0x62, 0x05, 0x72 },
+               .ilen   = 8,
+               .result = { 0x73, 0x6f, 0x6d, 0x65, 0x64, 0x61, 0x74, 0x61 },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x03, 0x52, 0x02, 0x07, 0x67, 0x20, 0x82, 0x17,
+                           0x86, 0x02, 0x87, 0x66, 0x59, 0x08, 0x21, 0x98,
+                           0x64, 0x05, 0x6a, 0xbd, 0xfe, 0xa9, 0x34, 0x57 },
+               .klen   = 24,
+               .input  = { 0xc0, 0x7d, 0x2a, 0x0f, 0xa5, 0x66, 0xfa, 0x30 },
+               .ilen   = 8,
+               .result = { 0x73, 0x71, 0x75, 0x69, 0x67, 0x67, 0x6c, 0x65 },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x10, 0x46, 0x10, 0x34, 0x89, 0x98, 0x80, 0x20,
+                           0x91, 0x07, 0xd0, 0x15, 0x89, 0x19, 0x01, 0x01,
+                           0x19, 0x07, 0x92, 0x10, 0x98, 0x1a, 0x01, 0x01 },
+               .klen   = 24,
+               .input  = { 0xe1, 0xef, 0x62, 0xc3, 0x32, 0xfe, 0x82, 0x5b },
+               .ilen   = 8,
+               .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+               .rlen   = 8,
        },
 };
 
@@ -1090,189 +868,151 @@ struct des_tv des3_ede_dec_tv_template[] = {
 #define BF_CBC_ENC_TEST_VECTORS        1
 #define BF_CBC_DEC_TEST_VECTORS        1
 
-struct bf_tv {
-       unsigned int keylen;
-       unsigned int plen;
-       unsigned int rlen;
-       int fail;
-       char key[56];
-       char iv[8];
-       char plaintext[32];
-       char result[32];
-};
-
-struct bf_tv bf_enc_tv_template[] = {
-
-       /* DES test vectors from OpenSSL */
-       {
-               8, 8, 8, 0,
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
-               { 0 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x4E, 0xF9, 0x97, 0x45, 0x61, 0x98, 0xDD, 0x78 },
-       },
-       
-       {
-               8, 8, 8, 0,
-               { 0x1F, 0x1F, 0x1F, 0x1F, 0x0E, 0x0E, 0x0E, 0x0E,  },
-               { 0 },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF },
-               { 0xA7, 0x90, 0x79, 0x51, 0x08, 0xEA, 0x3C, 0xAE },
-       },
-       
-       {
-               8, 8, 8, 0,
-               { 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87, },
-               { 0 },
-               { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 },
-               { 0xE8, 0x7A, 0x24, 0x4E, 0x2C, 0xC8, 0x5E, 0x82 }
-       },
-       
-       /* Vary the keylength... */
-       
-       {
-               16, 8, 8, 0,
-               { 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87,
-                 0x78, 0x69, 0x5A, 0x4B, 0x3C, 0x2D, 0x1E, 0x0F },
-               { 0 },
-               { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 },
-               { 0x93, 0x14, 0x28, 0x87, 0xEE, 0x3B, 0xE1, 0x5C }
-       },
-       
-       {
-               21, 8, 8, 0,
-               { 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87,
-                 0x78, 0x69, 0x5A, 0x4B, 0x3C, 0x2D, 0x1E, 0x0F,
-                 0x00, 0x11, 0x22, 0x33, 0x44 },
-               { 0 },
-               { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 },
-               { 0xE6, 0xF5, 0x1E, 0xD7, 0x9B, 0x9D, 0xB2, 0x1F }
+struct cipher_testvec bf_enc_tv_template[] = {
+       { /* DES test vectors from OpenSSL */
+               .key    = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
+               .klen   = 8,
+               .input  = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+               .ilen   = 8,
+               .result = { 0x4e, 0xf9, 0x97, 0x45, 0x61, 0x98, 0xdd, 0x78 },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x0e, 0x0e, 0x0e },
+               .klen   = 8,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .ilen   = 8,
+               .result = { 0xa7, 0x90, 0x79, 0x51, 0x08, 0xea, 0x3c, 0xae },
+               .rlen   = 8,
+       }, {
+               .key    = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 },
+               .klen   = 8,
+               .input  = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
+               .ilen   = 8,
+               .result = { 0xe8, 0x7a, 0x24, 0x4e, 0x2c, 0xc8, 0x5e, 0x82 },
+               .rlen   = 8,
+       }, { /* Vary the keylength... */        
+               .key    = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87,
+                           0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f },
+               .klen   = 16,
+               .input  = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
+               .ilen   = 8,
+               .result = { 0x93, 0x14, 0x28, 0x87, 0xee, 0x3b, 0xe1, 0x5c },
+               .rlen   = 8,
+       }, {
+               .key    = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87,
+                           0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f,
+                           0x00, 0x11, 0x22, 0x33, 0x44 },
+               .klen   = 21,
+               .input  = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
+               .ilen   = 8,
+               .result = { 0xe6, 0xf5, 0x1e, 0xd7, 0x9b, 0x9d, 0xb2, 0x1f },
+               .rlen   = 8,
+       }, { /* Generated with bf488 */
+               .key    = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87,
+                           0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f,
+                           0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+                           0x04, 0x68, 0x91, 0x04, 0xc2, 0xfd, 0x3b, 0x2f, 
+                           0x58, 0x40, 0x23, 0x64, 0x1a, 0xba, 0x61, 0x76, 
+                           0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x0e, 0x0e, 0x0e, 
+                           0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
+               .klen   = 56,
+               .input  = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
+               .ilen   = 8,
+               .result = { 0xc0, 0x45, 0x04, 0x01, 0x2e, 0x4e, 0x1f, 0x53 },
+               .rlen   = 8,
        },
-       
-       /* Generated with bf488 */
-       {
-               56, 8, 8, 0,
-               { 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87,
-                 0x78, 0x69, 0x5A, 0x4B, 0x3C, 0x2D, 0x1E, 0x0F,
-                 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-                 0x04, 0x68, 0x91, 0x04, 0xC2, 0xFD, 0x3B, 0x2F, 
-                 0x58, 0x40, 0x23, 0x64, 0x1A, 0xBA, 0x61, 0x76, 
-                 0x1F, 0x1F, 0x1F, 0x1F, 0x0E, 0x0E, 0x0E, 0x0E, 
-                 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
-                 { 0 },
-                 { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 },
-                 { 0xc0, 0x45, 0x04, 0x01, 0x2e, 0x4e, 0x1f, 0x53 }
-       }
-       
 };
 
-struct bf_tv bf_dec_tv_template[] = {
-
-       /* DES test vectors from OpenSSL */
-       {
-               8, 8, 8, 0,
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, },
-               { 0 },
-               { 0x4E, 0xF9, 0x97, 0x45, 0x61, 0x98, 0xDD, 0x78 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }
-       },
-       
-       {
-               8, 8, 8, 0,
-               { 0x1F, 0x1F, 0x1F, 0x1F, 0x0E, 0x0E, 0x0E, 0x0E,  },
-               { 0 },
-               { 0xA7, 0x90, 0x79, 0x51, 0x08, 0xEA, 0x3C, 0xAE },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF }
-       },
-       
-       {
-               8, 8, 8, 0,
-               { 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87, },
-               { 0 },
-               { 0xE8, 0x7A, 0x24, 0x4E, 0x2C, 0xC8, 0x5E, 0x82 },
-               { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 }
-       },
-       
-       /* Vary the keylength... */
-       
-       {
-               16, 8, 8, 0,
-               { 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87,
-                 0x78, 0x69, 0x5A, 0x4B, 0x3C, 0x2D, 0x1E, 0x0F },
-               { 0 },
-               { 0x93, 0x14, 0x28, 0x87, 0xEE, 0x3B, 0xE1, 0x5C },
-               { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 }
-       },
-       
-       {
-               21, 8, 8, 0,
-               { 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87,
-                 0x78, 0x69, 0x5A, 0x4B, 0x3C, 0x2D, 0x1E, 0x0F,
-                 0x00, 0x11, 0x22, 0x33, 0x44 },
-               { 0 },
-               { 0xE6, 0xF5, 0x1E, 0xD7, 0x9B, 0x9D, 0xB2, 0x1F },
-               { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 }
+struct cipher_testvec bf_dec_tv_template[] = {
+       { /* DES test vectors from OpenSSL */
+               .key    = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+               .klen   = 8,
+               .input  = { 0x4e, 0xf9, 0x97, 0x45, 0x61, 0x98, 0xdd, 0x78 },
+               .ilen   = 8,
+               .result = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x0e, 0x0e, 0x0e },
+               .klen   = 8,
+               .input  = { 0xa7, 0x90, 0x79, 0x51, 0x08, 0xea, 0x3c, 0xae },
+               .ilen   = 8,
+               .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .rlen   = 8,
+       }, {
+               .key    = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 },
+               .klen   = 8,
+               .input  = { 0xe8, 0x7a, 0x24, 0x4e, 0x2c, 0xc8, 0x5e, 0x82 },
+               .ilen   = 8,
+               .result = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
+               .rlen   = 8,
+       }, { /* Vary the keylength... */        
+               .key    = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87,
+                           0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f },
+               .klen   = 16,
+               .input  = { 0x93, 0x14, 0x28, 0x87, 0xee, 0x3b, 0xe1, 0x5c },
+               .ilen   = 8,
+               .result = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
+               .rlen   = 8,
+       }, {
+               .key    = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87,
+                           0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f,
+                           0x00, 0x11, 0x22, 0x33, 0x44 },
+               .klen   = 21,
+               .input  = { 0xe6, 0xf5, 0x1e, 0xd7, 0x9b, 0x9d, 0xb2, 0x1f },
+               .ilen   = 8,
+               .result = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
+               .rlen   = 8,
+       }, { /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
+               .key    = { 0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87,
+                           0x78, 0x69, 0x5a, 0x4b, 0x3c, 0x2d, 0x1e, 0x0f,
+                           0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+                           0x04, 0x68, 0x91, 0x04, 0xc2, 0xfd, 0x3b, 0x2f, 
+                           0x58, 0x40, 0x23, 0x64, 0x1a, 0xba, 0x61, 0x76, 
+                           0x1f, 0x1f, 0x1f, 0x1f, 0x0e, 0x0e, 0x0e, 0x0e, 
+                           0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff },
+               .klen   = 56,
+               .input  = { 0xc0, 0x45, 0x04, 0x01, 0x2e, 0x4e, 0x1f, 0x53 },
+               .ilen   = 8,
+               .result = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },
+               .rlen   = 8,
        },
-       
-       /* Generated with bf488, using OpenSSL, Libgcrypt and Nettle */
-       {
-               56, 8, 8, 0,
-               { 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87,
-                 0x78, 0x69, 0x5A, 0x4B, 0x3C, 0x2D, 0x1E, 0x0F,
-                 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-                 0x04, 0x68, 0x91, 0x04, 0xC2, 0xFD, 0x3B, 0x2F, 
-                 0x58, 0x40, 0x23, 0x64, 0x1A, 0xBA, 0x61, 0x76, 
-                 0x1F, 0x1F, 0x1F, 0x1F, 0x0E, 0x0E, 0x0E, 0x0E, 
-                 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF },
-               { 0 },
-               { 0xc0, 0x45, 0x04, 0x01, 0x2e, 0x4e, 0x1f, 0x53 },
-               { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 }
-       }
 };
 
-struct bf_tv bf_cbc_enc_tv_template[] = {
-
-       /* From OpenSSL */
-       {
-               16, 32, 32, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
-                 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87 },
-                 
-               { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 },
-               
-               { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20,
-                 0x4E, 0x6F, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74,
-                 0x68, 0x65, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20,
-                 0x66, 0x6F, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00 },
-                 
-               { 0x6B, 0x77, 0xB4, 0xD6, 0x30, 0x06, 0xDE, 0xE6,
-                 0x05, 0xB1, 0x56, 0xE2, 0x74, 0x03, 0x97, 0x93,
-                 0x58, 0xDE, 0xB9, 0xE7, 0x15, 0x46, 0x16, 0xD9,
-                 0x59, 0xF1, 0x65, 0x2B, 0xD5, 0xFF, 0x92, 0xCC }
+struct cipher_testvec bf_cbc_enc_tv_template[] = {
+       { /* From OpenSSL */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+                           0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 },
+               .klen   = 16,
+               .iv     = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },           
+               .input  = { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20,
+                           0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74,
+                           0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20,
+                           0x66, 0x6f, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00 },
+               .ilen   = 32,
+               .result = { 0x6b, 0x77, 0xb4, 0xd6, 0x30, 0x06, 0xde, 0xe6,
+                           0x05, 0xb1, 0x56, 0xe2, 0x74, 0x03, 0x97, 0x93,
+                           0x58, 0xde, 0xb9, 0xe7, 0x15, 0x46, 0x16, 0xd9,
+                           0x59, 0xf1, 0x65, 0x2b, 0xd5, 0xff, 0x92, 0xcc },
+               .rlen   = 32,
        },
 };
 
-struct bf_tv bf_cbc_dec_tv_template[] = {
-
-       /* From OpenSSL */
-       {
-               16, 32, 32, 0,
-               
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
-                 0xF0, 0xE1, 0xD2, 0xC3, 0xB4, 0xA5, 0x96, 0x87 },
-                 
-               { 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10 },
-               
-               { 0x6B, 0x77, 0xB4, 0xD6, 0x30, 0x06, 0xDE, 0xE6,
-                 0x05, 0xB1, 0x56, 0xE2, 0x74, 0x03, 0x97, 0x93,
-                 0x58, 0xDE, 0xB9, 0xE7, 0x15, 0x46, 0x16, 0xD9,
-                 0x59, 0xF1, 0x65, 0x2B, 0xD5, 0xFF, 0x92, 0xCC },
-                 
-               { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20,
-                 0x4E, 0x6F, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74,
-                 0x68, 0x65, 0x20, 0x74, 0x69, 0x6D, 0x65, 0x20,
-                 0x66, 0x6F, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00 }
+struct cipher_testvec bf_cbc_dec_tv_template[] = {
+       { /* From OpenSSL */
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+                           0xf0, 0xe1, 0xd2, 0xc3, 0xb4, 0xa5, 0x96, 0x87 },
+               .klen   = 16,
+               .iv     = { 0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10 },           
+               .input  = { 0x6b, 0x77, 0xb4, 0xd6, 0x30, 0x06, 0xde, 0xe6,
+                           0x05, 0xb1, 0x56, 0xe2, 0x74, 0x03, 0x97, 0x93,
+                           0x58, 0xde, 0xb9, 0xe7, 0x15, 0x46, 0x16, 0xd9,
+                           0x59, 0xf1, 0x65, 0x2b, 0xd5, 0xff, 0x92, 0xcc },
+               .ilen   = 32,
+               .result = { 0x37, 0x36, 0x35, 0x34, 0x33, 0x32, 0x31, 0x20,
+                           0x4e, 0x6f, 0x77, 0x20, 0x69, 0x73, 0x20, 0x74,
+                           0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20,
+                           0x66, 0x6f, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00 },
+               .rlen   = 32,
        },
 };
 
@@ -1284,212 +1024,161 @@ struct bf_tv bf_cbc_dec_tv_template[] = {
 #define TF_CBC_ENC_TEST_VECTORS                4
 #define TF_CBC_DEC_TEST_VECTORS                4
 
-struct tf_tv {
-       unsigned int keylen;
-       unsigned int plen;
-       unsigned int rlen;
-       int fail;
-       char key[32];
-       char iv[16];
-       char plaintext[48];
-       char result[48];
-};
-
-struct tf_tv tf_enc_tv_template[] = {
-       {
-               16, 16, 16, 0,
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x9F, 0x58, 0x9F, 0x5C, 0xF6, 0x12, 0x2C, 0x32,
-                 0xB6, 0xBF, 0xEC, 0x2F, 0x2A, 0xE8, 0xC3, 0x5A }
-       },
-       {
-               24, 16, 16, 0,
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
-                 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10,
-                 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 },
-               { 0 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0xCF, 0xD1, 0xD2, 0xE5, 0xA9, 0xBE, 0x9C, 0xDF,
-                 0x50, 0x1F, 0x13, 0xB8, 0x92, 0xBD, 0x22, 0x48 }
-       },
-       {       
-               32, 16, 16, 0,
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
-                 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10,
-                 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-                 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF },
-               { 0 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x37, 0x52, 0x7B, 0xE0, 0x05, 0x23, 0x34, 0xB8,
-                 0x9F, 0x0C, 0xFC, 0xCA, 0xE8, 0x7C, 0xFA, 0x20 }
+struct cipher_testvec tf_enc_tv_template[] = {
+       {
+               .key    = { [0 ... 15] = 0x00 },
+               .klen   = 16,
+               .input  = { [0 ... 15] = 0x00 },
+               .ilen   = 16,
+               .result = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
+                           0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+                           0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
+                           0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 },
+               .klen   = 24,
+               .input  = { [0 ... 15] = 0x00 },
+               .ilen   = 16,
+               .result = { 0xcf, 0xd1, 0xd2, 0xe5, 0xa9, 0xbe, 0x9c, 0xdf,
+                           0x50, 0x1f, 0x13, 0xb8, 0x92, 0xbd, 0x22, 0x48 },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+                           0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
+                           0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+                           0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+               .klen   = 32,
+               .input  = { [0 ... 15] = 0x00 },
+               .ilen   = 16,
+               .result = { 0x37, 0x52, 0x7b, 0xe0, 0x05, 0x23, 0x34, 0xb8,
+                           0x9f, 0x0c, 0xfc, 0xca, 0xe8, 0x7c, 0xfa, 0x20 },
+               .rlen   = 16,
        },
 };
 
-struct tf_tv tf_dec_tv_template[] = {
-       {
-               16, 16, 16, 0,
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0 },
-               { 0x9F, 0x58, 0x9F, 0x5C, 0xF6, 0x12, 0x2C, 0x32,
-                 0xB6, 0xBF, 0xEC, 0x2F, 0x2A, 0xE8, 0xC3, 0x5A },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },  
-       },
-       {
-               24, 16, 16, 0,
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
-                 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10,
-                 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 },
-               { 0 },
-               { 0xCF, 0xD1, 0xD2, 0xE5, 0xA9, 0xBE, 0x9C, 0xDF,
-                 0x50, 0x1F, 0x13, 0xB8, 0x92, 0xBD, 0x22, 0x48 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-       },
-       {       
-               32, 16, 16, 0,
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF,
-                 0xFE, 0xDC, 0xBA, 0x98, 0x76, 0x54, 0x32, 0x10,
-                 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-                 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE, 0xFF },
-               { 0 },
-               { 0x37, 0x52, 0x7B, 0xE0, 0x05, 0x23, 0x34, 0xB8,
-                 0x9F, 0x0C, 0xFC, 0xCA, 0xE8, 0x7C, 0xFA, 0x20 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+struct cipher_testvec tf_dec_tv_template[] = {
+       {
+               .key    = { [0 ... 15] = 0x00 },
+               .klen   = 16,
+               .input  = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
+                           0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a },
+               .ilen   = 16,
+               .result = { [0 ... 15] = 0x00 },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+                           0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
+                           0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77 },
+               .klen   = 24,
+               .input  = { 0xcf, 0xd1, 0xd2, 0xe5, 0xa9, 0xbe, 0x9c, 0xdf,
+                           0x50, 0x1f, 0x13, 0xb8, 0x92, 0xbd, 0x22, 0x48 },
+               .ilen   = 16,
+               .result = { [0 ... 15] = 0x00 },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
+                           0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
+                           0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+                           0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+               .klen   = 32,
+               .input  = { 0x37, 0x52, 0x7b, 0xe0, 0x05, 0x23, 0x34, 0xb8,
+                           0x9f, 0x0c, 0xfc, 0xca, 0xe8, 0x7c, 0xfa, 0x20 },
+               .ilen   = 16,
+               .result = { [0 ... 15] = 0x00 },
+               .rlen   = 16,
        },
 };
 
-struct tf_tv tf_cbc_enc_tv_template[] = {
-       /* Generated with Nettle */
-       {
-               16, 16, 16, 0,
-               
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
-                 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a },
-       },
-       
-       {
-               16, 16, 16, 0,
-               
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
-                 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
-                 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 },
-       },
-       
-       {
-               16, 16, 16, 0,
-               
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
-                 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26,
-                 0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 },
-       },
-       
-       {
-               16, 48, 48, 0,
-               
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
-                 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a,
-                 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
-                 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19,
-                 0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26,
-                 0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 },
+struct cipher_testvec tf_cbc_enc_tv_template[] = {
+       { /* Generated with Nettle */
+               .key    = { [0 ... 15] = 0x00 },
+               .klen   = 16,
+               .iv     = { [0 ... 15] = 0x00 },
+               .input  = { [0 ... 15] = 0x00 },
+               .ilen   = 16,
+               .result = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
+                           0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a },
+               .rlen   = 16,
+       }, {
+               .key    = { [0 ... 15] = 0x00 },
+               .klen   = 16,
+               .iv     = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
+                           0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a },           
+               .input  = { [0 ... 15] = 0x00 },
+               .ilen   = 16,
+               .result = { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
+                           0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 },
+               .rlen   = 16,
+       }, {
+               .key    = { [0 ... 15] = 0x00 },
+               .klen   = 16,
+               .iv     = { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
+                           0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 },
+               .input  = { [0 ... 15] = 0x00 },
+               .ilen   = 16,
+               .result = { 0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26,
+                           0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 },
+               .rlen   = 16,
+       }, {
+               .key    = { [0 ... 15] = 0x00 },
+               .klen   = 16,
+               .iv     = { [0 ... 15] = 0x00 },
+               .input  = { [0 ... 47] = 0x00 },
+               .ilen   = 48,
+               .result = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
+                           0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a,
+                           0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
+                           0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19,
+                           0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26,
+                           0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 },
+               .rlen   = 48,
        },
 };
 
-struct tf_tv tf_cbc_dec_tv_template[] = {
-       /* Reverse of the first four above */
-       {
-               16, 16, 16, 0,
-               
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
-                 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a },               
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-       },
-       
-       {
-               16, 16, 16, 0,
-               
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
-                 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a },
-               { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
-                 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },  
-       },
-       
-       {
-               16, 16, 16, 0,
-               
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
-                 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 },
-               { 0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26,
-                 0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },  
-       },
-       
-       {
-               16, 48, 48, 0,
-               
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
-                 0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a,
-                 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
-                 0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19,
-                 0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26,
-                 0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+struct cipher_testvec tf_cbc_dec_tv_template[] = {
+       { /* Reverse of the first four above */
+               .key    = { [0 ... 15] = 0x00 },
+               .klen   = 16,
+               .iv     = { [0 ... 15] = 0x00 },
+               .input  = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
+                           0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a },             
+               .ilen   = 16,
+               .result = { [0 ... 15] = 0x00 },
+               .rlen   = 16,
+       }, {
+               .key    = { [0 ... 15] = 0x00 },
+               .klen   = 16,
+               .iv     = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
+                           0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a },
+               .input  = { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
+                           0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 },
+               .ilen   = 16,
+               .result = { [0 ... 15] = 0x00 },
+               .rlen   = 16,
+       }, {
+               .key    = { [0 ... 15] = 0x00 },
+               .klen   = 16,
+               .iv     = { 0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
+                           0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19 },
+               .input  = { 0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26,
+                           0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 },
+               .ilen   = 16,
+               .result = { [0 ... 15] = 0x00 },
+               .rlen   = 16,
+       }, {
+               .key    = { [0 ... 15] = 0x00 },
+               .klen   = 16,
+               .iv     = { [0 ... 15] = 0x00 },
+               .input  = { 0x9f, 0x58, 0x9f, 0x5c, 0xf6, 0x12, 0x2c, 0x32,
+                           0xb6, 0xbf, 0xec, 0x2f, 0x2a, 0xe8, 0xc3, 0x5a,
+                           0xd4, 0x91, 0xdb, 0x16, 0xe7, 0xb1, 0xc3, 0x9e,
+                           0x86, 0xcb, 0x08, 0x6b, 0x78, 0x9f, 0x54, 0x19,
+                           0x05, 0xef, 0x8c, 0x61, 0xa8, 0x11, 0x58, 0x26,
+                           0x34, 0xba, 0x5c, 0xb7, 0x10, 0x6a, 0xa6, 0x41 },
+               .ilen   = 48,
+               .result = { [0 ... 47] = 0x00 },
+               .rlen   = 48,
        },
 };
 
@@ -1500,179 +1189,162 @@ struct tf_tv tf_cbc_dec_tv_template[] = {
 #define SERPENT_ENC_TEST_VECTORS       4
 #define SERPENT_DEC_TEST_VECTORS       4
 
-struct serpent_tv {
-       unsigned int keylen, fail;
-       u8 key[32], plaintext[16], result[16];
-};
-
-struct serpent_tv serpent_enc_tv_template[] = 
+struct cipher_testvec serpent_enc_tv_template[] = 
 {
        {
-               0, 0,
-               { 0 },
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
-               { 0x12, 0x07, 0xfc, 0xce, 0x9b, 0xd0, 0xd6, 0x47,
-                 0x6a, 0xe9, 0x8f, 0xbe, 0xd1, 0x43, 0xa0, 0xe2 }
-       },
-       {
-               16, 0,
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
-               { 0x4c, 0x7d, 0x8a, 0x32, 0x80, 0x72, 0xa2, 0x2c,
-                 0x82, 0x3e, 0x4a, 0x1f, 0x3a, 0xcd, 0xa1, 0x6d }
-       },
-       {
-               32, 0,
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-                 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-                 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
-               { 0xde, 0x26, 0x9f, 0xf8, 0x33, 0xe4, 0x32, 0xb8,
-                 0x5b, 0x2e, 0x88, 0xd2, 0x70, 0x1c, 0xe7, 0x5c }
+               .input  = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .ilen   = 16,
+               .result = { 0x12, 0x07, 0xfc, 0xce, 0x9b, 0xd0, 0xd6, 0x47,
+                           0x6a, 0xe9, 0x8f, 0xbe, 0xd1, 0x43, 0xa0, 0xe2 },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .klen   = 16,
+               .input  = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .ilen   = 16,
+               .result = { 0x4c, 0x7d, 0x8a, 0x32, 0x80, 0x72, 0xa2, 0x2c,
+                           0x82, 0x3e, 0x4a, 0x1f, 0x3a, 0xcd, 0xa1, 0x6d },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+                           0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
+               .klen   = 32,
+               .input  = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .ilen   = 16,
+               .result = { 0xde, 0x26, 0x9f, 0xf8, 0x33, 0xe4, 0x32, 0xb8,
+                           0x5b, 0x2e, 0x88, 0xd2, 0x70, 0x1c, 0xe7, 0x5c },
+               .rlen   = 16,
+       }, {
+               .key    = { [15] = 0x80 },
+               .klen   = 16,
+               .input  = { [0 ... 15] = 0x00 },
+               .ilen   = 16,
+               .result = { 0xdd, 0xd2, 0x6b, 0x98, 0xa5, 0xff, 0xd8, 0x2c,
+                           0x05, 0x34, 0x5a, 0x9d, 0xad, 0xbf, 0xaf, 0x49},
+               .rlen   = 16,
        },
-       {
-               16, 0,
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0xdd, 0xd2, 0x6b, 0x98, 0xa5, 0xff, 0xd8, 0x2c,
-                 0x05, 0x34, 0x5a, 0x9d, 0xad, 0xbf, 0xaf, 0x49}
-       }
 };
 
-struct serpent_tv serpent_dec_tv_template[] = 
+struct cipher_testvec serpent_dec_tv_template[] = 
 {
        {
-               0, 0,
-               { 0 },
-               { 0x12, 0x07, 0xfc, 0xce, 0x9b, 0xd0, 0xd6, 0x47,
-                 0x6a, 0xe9, 0x8f, 0xbe, 0xd1, 0x43, 0xa0, 0xe2 },
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
-
-       },
-       {
-               16, 0,
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
-               { 0x4c, 0x7d, 0x8a, 0x32, 0x80, 0x72, 0xa2, 0x2c,
-                 0x82, 0x3e, 0x4a, 0x1f, 0x3a, 0xcd, 0xa1, 0x6d },
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .input  = { 0x12, 0x07, 0xfc, 0xce, 0x9b, 0xd0, 0xd6, 0x47,
+                           0x6a, 0xe9, 0x8f, 0xbe, 0xd1, 0x43, 0xa0, 0xe2 },
+               .ilen   = 16,
+               .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .klen   = 16,
+               .input  = { 0x4c, 0x7d, 0x8a, 0x32, 0x80, 0x72, 0xa2, 0x2c,
+                           0x82, 0x3e, 0x4a, 0x1f, 0x3a, 0xcd, 0xa1, 0x6d },
+               .ilen   = 16,
+               .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+                           0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
+               .klen   = 32,
+               .input  = { 0xde, 0x26, 0x9f, 0xf8, 0x33, 0xe4, 0x32, 0xb8,
+                           0x5b, 0x2e, 0x88, 0xd2, 0x70, 0x1c, 0xe7, 0x5c },
+               .ilen   = 16,
+               .result = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .rlen   = 16,
+       }, {
+               .key    = { [15] = 0x80 },
+               .klen   = 16,
+               .input  = { 0xdd, 0xd2, 0x6b, 0x98, 0xa5, 0xff, 0xd8, 0x2c,
+                           0x05, 0x34, 0x5a, 0x9d, 0xad, 0xbf, 0xaf, 0x49},
+               .ilen   = 16,
+               .result = { [0 ... 15] = 0x00 },
+               .rlen   = 16,
        },
-       {
-               32, 0,
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-                 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-                 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
-
-               { 0xde, 0x26, 0x9f, 0xf8, 0x33, 0xe4, 0x32, 0xb8,
-                 0x5b, 0x2e, 0x88, 0xd2, 0x70, 0x1c, 0xe7, 0x5c },
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
-       },
-       {
-               16, 0,
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80 },
-               { 0xdd, 0xd2, 0x6b, 0x98, 0xa5, 0xff, 0xd8, 0x2c,
-                 0x05, 0x34, 0x5a, 0x9d, 0xad, 0xbf, 0xaf, 0x49},
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },  
-       }
 };
 
 /* Cast6 test vectors from RFC 2612 */
 #define CAST6_ENC_TEST_VECTORS 3
 #define CAST6_DEC_TEST_VECTORS  3
 
-struct cast6_tv {
-       unsigned keylen;
-       unsigned fail;
-       u8 key[32];
-       u8 plaintext[16];
-       u8 result[16];
-};
-
-struct cast6_tv cast6_enc_tv_template[] = 
+struct cipher_testvec cast6_enc_tv_template[] = 
 {
        {
-               16, 
-               0,
-               { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, 
-                 0x0a, 0xf7, 0x56, 0x47, 0xf2, 0x9f, 0x61, 0x5d },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0xc8, 0x42, 0xa0, 0x89, 0x72, 0xb4, 0x3d, 0x20, 
-                 0x83, 0x6c, 0x91, 0xd1, 0xb7, 0x53, 0x0f, 0x6b },
-       },
-       {
-               24, 
-               0,
-               { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, 
-                 0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98, 
-                 0xba, 0xc7, 0x7a, 0x77, 0x17, 0x94, 0x28, 0x63 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x1b, 0x38, 0x6c, 0x02, 0x10, 0xdc, 0xad, 0xcb, 
-                 0xdd, 0x0e, 0x41, 0xaa, 0x08, 0xa7, 0xa7, 0xe8 },
+               .key    = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, 
+                           0x0a, 0xf7, 0x56, 0x47, 0xf2, 0x9f, 0x61, 0x5d },
+               .klen   = 16,
+               .input  = { [0 ... 15] = 0x00 },
+               .ilen   = 16,
+               .result = { 0xc8, 0x42, 0xa0, 0x89, 0x72, 0xb4, 0x3d, 0x20, 
+                           0x83, 0x6c, 0x91, 0xd1, 0xb7, 0x53, 0x0f, 0x6b },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, 
+                           0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98, 
+                           0xba, 0xc7, 0x7a, 0x77, 0x17, 0x94, 0x28, 0x63 },
+               .klen   = 24,
+               .input  = { [0 ... 15] = 0x00 },
+               .ilen   = 16,
+               .result = { 0x1b, 0x38, 0x6c, 0x02, 0x10, 0xdc, 0xad, 0xcb, 
+                           0xdd, 0x0e, 0x41, 0xaa, 0x08, 0xa7, 0xa7, 0xe8 },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
+                           0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98,
+                           0x8d, 0x7c, 0x47, 0xce, 0x26, 0x49, 0x08, 0x46,
+                           0x1c, 0xc1, 0xb5, 0x13, 0x7a, 0xe6, 0xb6, 0x04 },                             
+               .klen   = 32,
+               .input  = { [0 ... 15] = 0x00 },
+               .ilen   = 16,
+               .result = { 0x4f, 0x6a, 0x20, 0x38, 0x28, 0x68, 0x97, 0xb9, 
+                           0xc9, 0x87, 0x01, 0x36, 0x55, 0x33, 0x17, 0xfa },
+               .rlen   = 16,
        },
-       {
-               32, 
-               0,
-               { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
-                  0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98,
-                 0x8d, 0x7c, 0x47, 0xce, 0x26, 0x49, 0x08, 0x46,
-                 0x1c, 0xc1, 0xb5, 0x13, 0x7a, 0xe6, 0xb6, 0x04 },                               
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-               { 0x4f, 0x6a, 0x20, 0x38, 0x28, 0x68, 0x97, 0xb9, 
-                 0xc9, 0x87, 0x01, 0x36, 0x55, 0x33, 0x17, 0xfa },
-       }
 };
 
-struct cast6_tv cast6_dec_tv_template[] = 
+struct cipher_testvec cast6_dec_tv_template[] = 
 {
        {
-               16, 
-               0,
-               { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, 
-                 0x0a, 0xf7, 0x56, 0x47, 0xf2, 0x9f, 0x61, 0x5d },
-               { 0xc8, 0x42, 0xa0, 0x89, 0x72, 0xb4, 0x3d, 0x20, 
-                 0x83, 0x6c, 0x91, 0xd1, 0xb7, 0x53, 0x0f, 0x6b },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
+               .key    = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, 
+                           0x0a, 0xf7, 0x56, 0x47, 0xf2, 0x9f, 0x61, 0x5d },
+               .klen   = 16,
+               .input  = { 0xc8, 0x42, 0xa0, 0x89, 0x72, 0xb4, 0x3d, 0x20, 
+                           0x83, 0x6c, 0x91, 0xd1, 0xb7, 0x53, 0x0f, 0x6b },
+               .ilen   = 16,
+               .result = { [0 ... 15] = 0x00 },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, 
+                           0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98, 
+                           0xba, 0xc7, 0x7a, 0x77, 0x17, 0x94, 0x28, 0x63 },
+               .klen   = 24,
+               .input  = { 0x1b, 0x38, 0x6c, 0x02, 0x10, 0xdc, 0xad, 0xcb, 
+                           0xdd, 0x0e, 0x41, 0xaa, 0x08, 0xa7, 0xa7, 0xe8 },
+               .ilen   = 16,
+               .result = { [0 ... 15] = 0x00 },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
+                           0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98,
+                           0x8d, 0x7c, 0x47, 0xce, 0x26, 0x49, 0x08, 0x46,
+                           0x1c, 0xc1, 0xb5, 0x13, 0x7a, 0xe6, 0xb6, 0x04 },                             
+               .klen   = 32,
+               .input  = { 0x4f, 0x6a, 0x20, 0x38, 0x28, 0x68, 0x97, 0xb9, 
+                           0xc9, 0x87, 0x01, 0x36, 0x55, 0x33, 0x17, 0xfa },
+               .ilen   = 16,
+               .result = { [0 ... 15] = 0x00 },
+               .rlen   = 16,
        },
-       {
-               24, 
-               0,
-               { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c, 
-                 0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98, 
-                 0xba, 0xc7, 0x7a, 0x77, 0x17, 0x94, 0x28, 0x63 },
-               { 0x1b, 0x38, 0x6c, 0x02, 0x10, 0xdc, 0xad, 0xcb, 
-                 0xdd, 0x0e, 0x41, 0xaa, 0x08, 0xa7, 0xa7, 0xe8 },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-       },
-       {
-               32, 
-               0,
-               { 0x23, 0x42, 0xbb, 0x9e, 0xfa, 0x38, 0x54, 0x2c,
-                  0xbe, 0xd0, 0xac, 0x83, 0x94, 0x0a, 0xc2, 0x98,
-                 0x8d, 0x7c, 0x47, 0xce, 0x26, 0x49, 0x08, 0x46,
-                 0x1c, 0xc1, 0xb5, 0x13, 0x7a, 0xe6, 0xb6, 0x04 },                               
-               { 0x4f, 0x6a, 0x20, 0x38, 0x28, 0x68, 0x97, 0xb9, 
-                 0xc9, 0x87, 0x01, 0x36, 0x55, 0x33, 0x17, 0xfa },
-               { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-                 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 },
-       }
 };
 
 
@@ -1682,90 +1354,77 @@ struct cast6_tv cast6_dec_tv_template[] =
 #define AES_ENC_TEST_VECTORS 3
 #define AES_DEC_TEST_VECTORS 3
 
-struct aes_tv {
-       unsigned int keylen;
-       unsigned int plen;
-       unsigned int rlen;
-       int fail;
-       char key[32];
-       char iv[8];
-       char plaintext[16];
-       char result[16];
-};
-
-struct aes_tv aes_enc_tv_template[] = { 
-       /* From FIPS-197 */
-       {
-               16, 16, 16, 0,
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
-               { 0 },
-               { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-                 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
-               { 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30,
-                 0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a },
-       },
-       {
-               24, 16, 16, 0,
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-                 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 },
-               { 0 },
-               { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
-                 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
-               { 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0,
-                 0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 },
-       },
-       {
-               32, 16, 16, 0,
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-                 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-                 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
-               { 0 },
-               { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
-                 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
-               { 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf,
-                 0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 },
+struct cipher_testvec aes_enc_tv_template[] = { 
+       { /* From FIPS-197 */
+               .key    = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .klen   = 16,
+               .input  = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+                           0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+               .ilen   = 16,
+               .result = { 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30,
+                           0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 },
+               .klen   = 24,
+               .input  = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
+                           0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+               .ilen   = 16,
+               .result = { 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0,
+                           0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+                           0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
+               .klen   = 32,
+               .input  = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
+                           0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+               .ilen   = 16,
+               .result = { 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf,
+                           0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 },
+               .rlen   = 16,
        },
 };
 
-struct aes_tv aes_dec_tv_template[] = { 
-       /* From FIPS-197 */
-       {
-               16, 16, 16, 0,
-               
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
-               { 0 },
-               { 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30,
-                 0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a },
-               { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-                 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
-       },
-       
-       {
-               24, 16, 16, 0,
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-                 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 },
-               { 0 },
-               { 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0,
-                 0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 },
-               { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
-                 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },  
-       },
-       {
-               32, 16, 16, 0,
-               { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
-                 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
-                 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
-                 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
-               { 0 },
-               { 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf,
-                 0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 },
-               { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
-                 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+struct cipher_testvec aes_dec_tv_template[] = { 
+       { /* From FIPS-197 */
+               .key    = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f },
+               .klen   = 16,
+               .input  = { 0x69, 0xc4, 0xe0, 0xd8, 0x6a, 0x7b, 0x04, 0x30,
+                           0xd8, 0xcd, 0xb7, 0x80, 0x70, 0xb4, 0xc5, 0x5a },
+               .ilen   = 16,
+               .result = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
+                           0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+               .rlen   = 16,
+       }, {
+               .key    = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17 },
+               .klen   = 24,
+               .input  = { 0xdd, 0xa9, 0x7c, 0xa4, 0x86, 0x4c, 0xdf, 0xe0,
+                           0x6e, 0xaf, 0x70, 0xa0, 0xec, 0x0d, 0x71, 0x91 },
+               .ilen   = 16,
+               .result = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
+                           0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },  
+               .rlen   = 16,
+       }, {
+               .key    = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+                           0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+                           0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+                           0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f },
+               .klen   = 32,
+               .input  = { 0x8e, 0xa2, 0xb7, 0xca, 0x51, 0x67, 0x45, 0xbf,
+                           0xea, 0xfc, 0x49, 0x90, 0x4b, 0x49, 0x60, 0x89 },
+               .ilen   = 16,
+               .result = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 
+                           0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff },
+               .rlen   = 16,
        },
 };
 
@@ -1773,68 +1432,60 @@ struct aes_tv aes_dec_tv_template[] = {
 #define CAST5_ENC_TEST_VECTORS 3
 #define CAST5_DEC_TEST_VECTORS 3
 
-struct cast5_tv {
-       unsigned keylen;
-       unsigned fail;
-       u8 key[16];
-       u8 plaintext[8];
-       u8 ciphertext[8];
-};
-
-struct cast5_tv cast5_enc_tv_template[] =
+struct cipher_testvec cast5_enc_tv_template[] =
 {
        {
-               16,
-               0,
-               { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
-                 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0x23, 0x8b, 0x4f, 0xe5, 0x84, 0x7e, 0x44, 0xb2 },
-
-       },
-       {
-               10,
-               0,
-               { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
-                 0x23, 0x45 },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0xeb, 0x6a, 0x71, 0x1a, 0x2c, 0x02, 0x27, 0x1b },
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
+                           0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9a },
+               .klen   = 16,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .ilen   = 8,
+               .result = { 0x23, 0x8b, 0x4f, 0xe5, 0x84, 0x7e, 0x44, 0xb2 },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
+                           0x23, 0x45 },
+               .klen   = 10,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .ilen   = 8,
+               .result = { 0xeb, 0x6a, 0x71, 0x1a, 0x2c, 0x02, 0x27, 0x1b },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x12 },
+               .klen   = 5,
+               .input  = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .ilen   = 8,
+               .result = { 0x7a, 0xc8, 0x16, 0xd1, 0x6e, 0x9b, 0x30, 0x2e },
+               .rlen   = 8,
        },
-       {
-               5,
-               0,
-               { 0x01, 0x23, 0x45, 0x67, 0x12 },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-               { 0x7a, 0xc8, 0x16, 0xd1, 0x6e, 0x9b, 0x30, 0x2e },
-       }
 };
 
-struct cast5_tv cast5_dec_tv_template[] =
+struct cipher_testvec cast5_dec_tv_template[] =
 {
        {
-               16,
-               0,
-               { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
-                 0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9A },
-               { 0x23, 0x8b, 0x4f, 0xe5, 0x84, 0x7e, 0x44, 0xb2 },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-
-       },
-       {
-               10,
-               0,
-               { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
-                 0x23, 0x45 },
-               { 0xeb, 0x6a, 0x71, 0x1a, 0x2c, 0x02, 0x27, 0x1b },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
+                           0x23, 0x45, 0x67, 0x89, 0x34, 0x56, 0x78, 0x9a },
+               .klen   = 16,
+               .input  = { 0x23, 0x8b, 0x4f, 0xe5, 0x84, 0x7e, 0x44, 0xb2 },
+               .ilen   = 8,
+               .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x12, 0x34, 0x56, 0x78,
+                           0x23, 0x45 },
+               .klen   = 10,
+               .input  = { 0xeb, 0x6a, 0x71, 0x1a, 0x2c, 0x02, 0x27, 0x1b },
+               .ilen   = 8,
+               .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .rlen   = 8,
+       }, {
+               .key    = { 0x01, 0x23, 0x45, 0x67, 0x12 },
+               .klen   = 5,
+               .input  = { 0x7a, 0xc8, 0x16, 0xd1, 0x6e, 0x9b, 0x30, 0x2e },
+               .ilen   = 8,
+               .result = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
+               .rlen   = 8,
        },
-       {
-               5,
-               0,
-               { 0x01, 0x23, 0x45, 0x67, 0x12 },
-               { 0x7a, 0xc8, 0x16, 0xd1, 0x6e, 0x9b, 0x30, 0x2e },
-               { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef },
-       }
 };
 
 /*
@@ -1857,83 +1508,73 @@ struct comp_testvec {
 
 struct comp_testvec deflate_comp_tv_template[] = {
        {
-         70, 38,
-         
-         "Join us now and share the software "
-         "Join us now and share the software ",
-
-          { 0xf3, 0xca, 0xcf, 0xcc, 0x53, 0x28, 0x2d, 0x56,
-            0xc8, 0xcb, 0x2f, 0x57, 0x48, 0xcc, 0x4b, 0x51,
-            0x28, 0xce, 0x48, 0x2c, 0x4a, 0x55, 0x28, 0xc9,
-            0x48, 0x55, 0x28, 0xce, 0x4f, 0x2b, 0x29, 0x07,
-            0x71, 0xbc, 0x08, 0x2b, 0x01, 0x00 
-          },
-       },
-         
-       {
-         191, 122,
-         
-         "This document describes a compression method based on the DEFLATE"
-         "compression algorithm.  This document defines the application of "
-         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
-         
-         { 0x5d, 0x8d, 0x31, 0x0e, 0xc2, 0x30, 0x10, 0x04,
-           0xbf, 0xb2, 0x2f, 0xc8, 0x1f, 0x10, 0x04, 0x09,
-           0x89, 0xc2, 0x85, 0x3f, 0x70, 0xb1, 0x2f, 0xf8,
-           0x24, 0xdb, 0x67, 0xd9, 0x47, 0xc1, 0xef, 0x49,
-           0x68, 0x12, 0x51, 0xae, 0x76, 0x67, 0xd6, 0x27,
-           0x19, 0x88, 0x1a, 0xde, 0x85, 0xab, 0x21, 0xf2,
-           0x08, 0x5d, 0x16, 0x1e, 0x20, 0x04, 0x2d, 0xad,
-           0xf3, 0x18, 0xa2, 0x15, 0x85, 0x2d, 0x69, 0xc4,
-           0x42, 0x83, 0x23, 0xb6, 0x6c, 0x89, 0x71, 0x9b,
-           0xef, 0xcf, 0x8b, 0x9f, 0xcf, 0x33, 0xca, 0x2f,
-           0xed, 0x62, 0xa9, 0x4c, 0x80, 0xff, 0x13, 0xaf,
-           0x52, 0x37, 0xed, 0x0e, 0x52, 0x6b, 0x59, 0x02,
-           0xd9, 0x4e, 0xe8, 0x7a, 0x76, 0x1d, 0x02, 0x98,
-           0xfe, 0x8a, 0x87, 0x83, 0xa3, 0x4f, 0x56, 0x8a,
-           0xb8, 0x9e, 0x8e, 0x5c, 0x57, 0xd3, 0xa0, 0x79,
-           0xfa, 0x02 },
+               .inlen  = 70,
+               .outlen = 38,
+               .input  = "Join us now and share the software "
+                         "Join us now and share the software ",
+               .output = { 0xf3, 0xca, 0xcf, 0xcc, 0x53, 0x28, 0x2d, 0x56,
+                           0xc8, 0xcb, 0x2f, 0x57, 0x48, 0xcc, 0x4b, 0x51,
+                           0x28, 0xce, 0x48, 0x2c, 0x4a, 0x55, 0x28, 0xc9,
+                           0x48, 0x55, 0x28, 0xce, 0x4f, 0x2b, 0x29, 0x07,
+                           0x71, 0xbc, 0x08, 0x2b, 0x01, 0x00 },
+       }, {
+               .inlen  = 191,
+               .outlen = 122,
+               .input  = "This document describes a compression method based on the DEFLATE"
+                         "compression algorithm.  This document defines the application of "
+                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
+               .output = { 0x5d, 0x8d, 0x31, 0x0e, 0xc2, 0x30, 0x10, 0x04,
+                           0xbf, 0xb2, 0x2f, 0xc8, 0x1f, 0x10, 0x04, 0x09,
+                           0x89, 0xc2, 0x85, 0x3f, 0x70, 0xb1, 0x2f, 0xf8,
+                           0x24, 0xdb, 0x67, 0xd9, 0x47, 0xc1, 0xef, 0x49,
+                           0x68, 0x12, 0x51, 0xae, 0x76, 0x67, 0xd6, 0x27,
+                           0x19, 0x88, 0x1a, 0xde, 0x85, 0xab, 0x21, 0xf2,
+                           0x08, 0x5d, 0x16, 0x1e, 0x20, 0x04, 0x2d, 0xad,
+                           0xf3, 0x18, 0xa2, 0x15, 0x85, 0x2d, 0x69, 0xc4,
+                           0x42, 0x83, 0x23, 0xb6, 0x6c, 0x89, 0x71, 0x9b,
+                           0xef, 0xcf, 0x8b, 0x9f, 0xcf, 0x33, 0xca, 0x2f,
+                           0xed, 0x62, 0xa9, 0x4c, 0x80, 0xff, 0x13, 0xaf,
+                           0x52, 0x37, 0xed, 0x0e, 0x52, 0x6b, 0x59, 0x02,
+                           0xd9, 0x4e, 0xe8, 0x7a, 0x76, 0x1d, 0x02, 0x98,
+                           0xfe, 0x8a, 0x87, 0x83, 0xa3, 0x4f, 0x56, 0x8a,
+                           0xb8, 0x9e, 0x8e, 0x5c, 0x57, 0xd3, 0xa0, 0x79,
+                           0xfa, 0x02 },
        },
 };
 
 struct comp_testvec deflate_decomp_tv_template[] = {
        {
-         122, 191,
-         
-         { 0x5d, 0x8d, 0x31, 0x0e, 0xc2, 0x30, 0x10, 0x04,
-           0xbf, 0xb2, 0x2f, 0xc8, 0x1f, 0x10, 0x04, 0x09,
-           0x89, 0xc2, 0x85, 0x3f, 0x70, 0xb1, 0x2f, 0xf8,
-           0x24, 0xdb, 0x67, 0xd9, 0x47, 0xc1, 0xef, 0x49,
-           0x68, 0x12, 0x51, 0xae, 0x76, 0x67, 0xd6, 0x27,
-           0x19, 0x88, 0x1a, 0xde, 0x85, 0xab, 0x21, 0xf2,
-           0x08, 0x5d, 0x16, 0x1e, 0x20, 0x04, 0x2d, 0xad,
-           0xf3, 0x18, 0xa2, 0x15, 0x85, 0x2d, 0x69, 0xc4,
-           0x42, 0x83, 0x23, 0xb6, 0x6c, 0x89, 0x71, 0x9b,
-           0xef, 0xcf, 0x8b, 0x9f, 0xcf, 0x33, 0xca, 0x2f,
-           0xed, 0x62, 0xa9, 0x4c, 0x80, 0xff, 0x13, 0xaf,
-           0x52, 0x37, 0xed, 0x0e, 0x52, 0x6b, 0x59, 0x02,
-           0xd9, 0x4e, 0xe8, 0x7a, 0x76, 0x1d, 0x02, 0x98,
-           0xfe, 0x8a, 0x87, 0x83, 0xa3, 0x4f, 0x56, 0x8a,
-           0xb8, 0x9e, 0x8e, 0x5c, 0x57, 0xd3, 0xa0, 0x79,
-           0xfa, 0x02 },
-           
-           "This document describes a compression method based on the DEFLATE"
-           "compression algorithm.  This document defines the application of "
-           "the DEFLATE algorithm to the IP Payload Compression Protocol.",
-       },
-       
-       {
-         38, 70,
-         
-          { 0xf3, 0xca, 0xcf, 0xcc, 0x53, 0x28, 0x2d, 0x56,
-            0xc8, 0xcb, 0x2f, 0x57, 0x48, 0xcc, 0x4b, 0x51,
-            0x28, 0xce, 0x48, 0x2c, 0x4a, 0x55, 0x28, 0xc9,
-            0x48, 0x55, 0x28, 0xce, 0x4f, 0x2b, 0x29, 0x07,
-            0x71, 0xbc, 0x08, 0x2b, 0x01, 0x00
-          },
-          
-          "Join us now and share the software "
-         "Join us now and share the software ",
+               .inlen  = 122,
+               .outlen = 191,
+               .input  = { 0x5d, 0x8d, 0x31, 0x0e, 0xc2, 0x30, 0x10, 0x04,
+                           0xbf, 0xb2, 0x2f, 0xc8, 0x1f, 0x10, 0x04, 0x09,
+                           0x89, 0xc2, 0x85, 0x3f, 0x70, 0xb1, 0x2f, 0xf8,
+                           0x24, 0xdb, 0x67, 0xd9, 0x47, 0xc1, 0xef, 0x49,
+                           0x68, 0x12, 0x51, 0xae, 0x76, 0x67, 0xd6, 0x27,
+                           0x19, 0x88, 0x1a, 0xde, 0x85, 0xab, 0x21, 0xf2,
+                           0x08, 0x5d, 0x16, 0x1e, 0x20, 0x04, 0x2d, 0xad,
+                           0xf3, 0x18, 0xa2, 0x15, 0x85, 0x2d, 0x69, 0xc4,
+                           0x42, 0x83, 0x23, 0xb6, 0x6c, 0x89, 0x71, 0x9b,
+                           0xef, 0xcf, 0x8b, 0x9f, 0xcf, 0x33, 0xca, 0x2f,
+                           0xed, 0x62, 0xa9, 0x4c, 0x80, 0xff, 0x13, 0xaf,
+                           0x52, 0x37, 0xed, 0x0e, 0x52, 0x6b, 0x59, 0x02,
+                           0xd9, 0x4e, 0xe8, 0x7a, 0x76, 0x1d, 0x02, 0x98,
+                           0xfe, 0x8a, 0x87, 0x83, 0xa3, 0x4f, 0x56, 0x8a,
+                           0xb8, 0x9e, 0x8e, 0x5c, 0x57, 0xd3, 0xa0, 0x79,
+                           0xfa, 0x02 },
+               .output = "This document describes a compression method based on the DEFLATE"
+                         "compression algorithm.  This document defines the application of "
+                         "the DEFLATE algorithm to the IP Payload Compression Protocol.",
+       }, {
+               .inlen  = 38,
+               .outlen = 70,
+               .input  = { 0xf3, 0xca, 0xcf, 0xcc, 0x53, 0x28, 0x2d, 0x56,
+                           0xc8, 0xcb, 0x2f, 0x57, 0x48, 0xcc, 0x4b, 0x51,
+                           0x28, 0xce, 0x48, 0x2c, 0x4a, 0x55, 0x28, 0xc9,
+                           0x48, 0x55, 0x28, 0xce, 0x4f, 0x2b, 0x29, 0x07,
+                           0x71, 0xbc, 0x08, 0x2b, 0x01, 0x00 },
+               .output = "Join us now and share the software "
+                         "Join us now and share the software ",
        },
 };
 
index 2328f76..b8d9ac6 100644 (file)
@@ -280,13 +280,15 @@ static int ioc_client_reg(struct i2c_client *client)
            client->addr == 0x50) {
                struct rtc_tm rtctm;
                unsigned int year;
+               struct timespec tv;
 
                rtc_client = client;
                get_rtc_time(&rtctm, &year);
 
-               xtime.tv_nsec = rtctm.cs * 10000000;
-               xtime.tv_sec  = mktime(year, rtctm.mon, rtctm.mday,
-                                      rtctm.hours, rtctm.mins, rtctm.secs);
+               tv.tv_nsec = rtctm.cs * 10000000;
+               tv.tv_sec  = mktime(year, rtctm.mon, rtctm.mday,
+                                   rtctm.hours, rtctm.mins, rtctm.secs);
+               do_settimeofday(&tv);
                set_rtc = k_set_rtc_time;
        }
 
index 8b51ff2..f2355a7 100644 (file)
@@ -251,12 +251,6 @@ config ACPI_SYSTEM
          This driver will enable your system to shut down using ACPI, and
          dump your ACPI DSDT table using /proc/acpi/dsdt.
 
-config ACPI_EFI
-       bool
-       depends on ACPI_INTERPRETER
-       depends on IA64
-       default y
-
 config ACPI_RELAXED_AML
        bool "Relaxed AML"
        depends on ACPI_INTERPRETER
index 1b87594..e35fc2b 100644 (file)
 #include <asm/uaccess.h>
 #include <linux/vmalloc.h>
 
-#ifdef CONFIG_ACPI_EFI
 #include <linux/efi.h>
-u64 efi_mem_attributes (u64 phys_addr);
-#endif
 
 
 #define _COMPONENT             ACPI_OS_SERVICES
@@ -142,22 +139,24 @@ acpi_os_free(void *ptr)
 acpi_status
 acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
 {
-#ifdef CONFIG_ACPI_EFI
-       addr->pointer_type = ACPI_PHYSICAL_POINTER;
-       if (efi.acpi20)
-               addr->pointer.physical = (acpi_physical_address) virt_to_phys(efi.acpi20);
-       else if (efi.acpi)
-               addr->pointer.physical = (acpi_physical_address) virt_to_phys(efi.acpi);
-       else {
-               printk(KERN_ERR PREFIX "System description tables not found\n");
-               return AE_NOT_FOUND;
-       }
-#else
-       if (ACPI_FAILURE(acpi_find_root_pointer(flags, addr))) {
-               printk(KERN_ERR PREFIX "System description tables not found\n");
-               return AE_NOT_FOUND;
+       if (efi_enabled) {
+               addr->pointer_type = ACPI_PHYSICAL_POINTER;
+               if (efi.acpi20)
+                       addr->pointer.physical =
+                               (acpi_physical_address) virt_to_phys(efi.acpi20);
+               else if (efi.acpi)
+                       addr->pointer.physical =
+                               (acpi_physical_address) virt_to_phys(efi.acpi);
+               else {
+                       printk(KERN_ERR PREFIX "System description tables not found\n");
+                       return AE_NOT_FOUND;
+               }
+       } else {
+               if (ACPI_FAILURE(acpi_find_root_pointer(flags, addr))) {
+                       printk(KERN_ERR PREFIX "System description tables not found\n");
+                       return AE_NOT_FOUND;
+               }
        }
-#endif /*CONFIG_ACPI_EFI*/
 
        return AE_OK;
 }
@@ -165,22 +164,22 @@ acpi_os_get_root_pointer(u32 flags, struct acpi_pointer *addr)
 acpi_status
 acpi_os_map_memory(acpi_physical_address phys, acpi_size size, void **virt)
 {
-#ifdef CONFIG_ACPI_EFI
-       if (EFI_MEMORY_WB & efi_mem_attributes(phys)) {
-               *virt = phys_to_virt(phys);
+       if (efi_enabled) {
+               if (EFI_MEMORY_WB & efi_mem_attributes(phys)) {
+                       *virt = phys_to_virt(phys);
+               } else {
+                       *virt = ioremap(phys, size);
+               }
        } else {
-               *virt = ioremap(phys, size);
-       }
-#else
-       if (phys > ULONG_MAX) {
-               printk(KERN_ERR PREFIX "Cannot map memory that high\n");
-               return AE_BAD_PARAMETER;
+               if (phys > ULONG_MAX) {
+                       printk(KERN_ERR PREFIX "Cannot map memory that high\n");
+                       return AE_BAD_PARAMETER;
+               }
+               /*
+                * ioremap checks to ensure this is in reserved space
+                */
+               *virt = ioremap((unsigned long) phys, size);
        }
-       /*
-        * ioremap checks to ensure this is in reserved space
-        */
-       *virt = ioremap((unsigned long) phys, size);
-#endif
 
        if (!*virt)
                return AE_NO_MEMORY;
@@ -393,19 +392,17 @@ acpi_os_read_memory(
 {
        u32                     dummy;
        void                    *virt_addr;
-
-#ifdef CONFIG_ACPI_EFI
        int                     iomem = 0;
 
-       if (EFI_MEMORY_WB & efi_mem_attributes(phys_addr)) {
+       if (efi_enabled) {
+               if (EFI_MEMORY_WB & efi_mem_attributes(phys_addr)) {
+                       virt_addr = phys_to_virt(phys_addr);
+               } else {
+                       iomem = 1;
+                       virt_addr = ioremap(phys_addr, width);
+               }
+       } else
                virt_addr = phys_to_virt(phys_addr);
-       } else {
-               iomem = 1;
-               virt_addr = ioremap(phys_addr, width);
-       }
-#else
-       virt_addr = phys_to_virt(phys_addr);
-#endif
        if (!value)
                value = &dummy;
 
@@ -423,10 +420,10 @@ acpi_os_read_memory(
                BUG();
        }
 
-#ifdef CONFIG_ACPI_EFI
-       if (iomem)
-               iounmap(virt_addr);
-#endif
+       if (efi_enabled) {
+               if (iomem)
+                       iounmap(virt_addr);
+       }
 
        return AE_OK;
 }
@@ -438,19 +435,17 @@ acpi_os_write_memory(
        u32                     width)
 {
        void                    *virt_addr;
-
-#ifdef CONFIG_ACPI_EFI
        int                     iomem = 0;
 
-       if (EFI_MEMORY_WB & efi_mem_attributes(phys_addr)) {
+       if (efi_enabled) {
+               if (EFI_MEMORY_WB & efi_mem_attributes(phys_addr)) {
+                       virt_addr = phys_to_virt(phys_addr);
+               } else {
+                       iomem = 1;
+                       virt_addr = ioremap(phys_addr, width);
+               }
+       } else
                virt_addr = phys_to_virt(phys_addr);
-       } else {
-               iomem = 1;
-               virt_addr = ioremap(phys_addr, width);
-       }
-#else
-       virt_addr = phys_to_virt(phys_addr);
-#endif
 
        switch (width) {
        case 8:
@@ -466,10 +461,8 @@ acpi_os_write_memory(
                BUG();
        }
 
-#ifdef CONFIG_ACPI_EFI
        if (iomem)
                iounmap(virt_addr);
-#endif
 
        return AE_OK;
 }
index 6f3dc3f..28ffe37 100644 (file)
@@ -237,7 +237,7 @@ acpi_pci_irq_add_prt (
                           PCI Interrupt Routing Support
    -------------------------------------------------------------------------- */
 
-static int
+int
 acpi_pci_irq_lookup (struct pci_bus *bus, int device, int pin)
 {
        struct acpi_prt_entry   *entry = NULL;
index c4405e7..03d3119 100644 (file)
@@ -262,17 +262,10 @@ acpi_get_table_header_early (
 
        /* Map the DSDT header via the pointer in the FADT */
        if (id == ACPI_DSDT) {
-               struct fadt_descriptor_rev2 *fadt = (struct fadt_descriptor_rev2 *) *header;
-
-               if (fadt->revision == 3 && fadt->Xdsdt) {
-                       *header = (void *) __acpi_map_table(fadt->Xdsdt,
-                                       sizeof(struct acpi_table_header));
-               } else if (fadt->V1_dsdt) {
-                       *header = (void *) __acpi_map_table(fadt->V1_dsdt,
-                                       sizeof(struct acpi_table_header));
-               } else
-                       *header = 0;
+               struct acpi_table_fadt *fadt = (struct acpi_table_fadt *) *header;
 
+               *header = (void *) __acpi_map_table(fadt->dsdt_addr,
+                               sizeof(struct acpi_table_header));
                if (!*header) {
                        printk(KERN_WARNING PREFIX "Unable to map DSDT\n");
                        return -ENODEV;
index 1c40a53..28982a1 100644 (file)
@@ -8,12 +8,7 @@
  *
  */
 
-#include <linux/config.h>
-#ifdef CONFIG_DEBUG_KOBJECT
-#define DEBUG 1
-#else
 #undef DEBUG
-#endif
 
 #include <linux/device.h>
 #include <linux/module.h>
index 9f79bd9..4858ba6 100644 (file)
  *
  */
 
-#include <linux/config.h>
-#ifdef CONFIG_DEBUG_KOBJECT
-#define DEBUG 1
-#else
 #undef DEBUG
-#endif
 
 #include <linux/device.h>
 #include <linux/module.h>
index c1bfc54..5493382 100644 (file)
@@ -8,12 +8,7 @@
  *
  */
 
-#include <linux/config.h>
-#ifdef CONFIG_DEBUG_KOBJECT
-#define DEBUG 1
-#else
 #undef DEBUG
-#endif
 
 #include <linux/device.h>
 #include <linux/err.h>
index 31a4f7f..7fd9d5c 100644 (file)
@@ -8,12 +8,7 @@
  *
  */
 
-#include <linux/config.h>
-#ifdef CONFIG_DEBUG_KOBJECT
-#define DEBUG 1
-#else
 #undef DEBUG
-#endif
 
 #include <linux/device.h>
 #include <linux/module.h>
index b186dba..3fb7876 100644 (file)
@@ -415,18 +415,22 @@ struct firmware_work {
        void (*cont)(const struct firmware *fw, void *context);
 };
 
-static void
+static int
 request_firmware_work_func(void *arg)
 {
        struct firmware_work *fw_work = arg;
        const struct firmware *fw;
-       if (!arg)
-               return;
+       if (!arg) {
+               WARN_ON(1);
+               return 0;
+       }
+       daemonize("%s/%s", "firmware", fw_work->name);
        request_firmware(&fw, fw_work->name, fw_work->device);
        fw_work->cont(fw, fw_work->context);
        release_firmware(fw);
        module_put(fw_work->module);
        kfree(fw_work);
+       return 0;
 }
 
 /**
@@ -451,6 +455,8 @@ request_firmware_nowait(
 {
        struct firmware_work *fw_work = kmalloc(sizeof (struct firmware_work),
                                                GFP_ATOMIC);
+       int ret;
+
        if (!fw_work)
                return -ENOMEM;
        if (!try_module_get(module)) {
@@ -465,9 +471,14 @@ request_firmware_nowait(
                .context = context,
                .cont = cont,
        };
-       INIT_WORK(&fw_work->work, request_firmware_work_func, fw_work);
 
-       schedule_work(&fw_work->work);
+       ret = kernel_thread(request_firmware_work_func, fw_work,
+                           CLONE_FS | CLONE_FILES);
+       
+       if (ret < 0) {
+               fw_work->cont(NULL, fw_work->context);
+               return ret;
+       }
        return 0;
 }
 
index 893bbf9..dac3996 100644 (file)
@@ -18,18 +18,16 @@ static struct sysdev_class node_class = {
 static ssize_t node_read_cpumap(struct sys_device * dev, char * buf)
 {
        struct node *node_dev = to_node(dev);
-       cpumask_t tmp = node_dev->cpumap;
-       int k, len = 0;
+       cpumask_t mask = node_dev->cpumap;
+       int len;
 
-       for (k = 0; k < sizeof(cpumask_t)/sizeof(u16); ++k) {
-               int j = sprintf(buf, "%04hx", (u16)cpus_coerce(tmp));
-               len += j;
-               buf += j;
-               cpus_shift_right(tmp, tmp, 16);
-       }
-        len += sprintf(buf, "\n");
+       /* FIXME - someone should pass us a buffer size (count) or
+        * use seq_file or something to avoid buffer overrun risk. */
+       len = cpumask_snprintf(buf, 99 /* XXX FIXME */, mask);
+       len += sprintf(buf + len, "\n");
        return len;
 }
+
 static SYSDEV_ATTR(cpumap,S_IRUGO,node_read_cpumap,NULL);
 
 #define K(x) ((x) << (PAGE_SHIFT - 10))
index 1fae80c..285d658 100644 (file)
@@ -14,8 +14,8 @@
 #include <linux/module.h>
 #include <linux/init.h>
 
-struct device legacy_bus = {
-       .bus_id         = "legacy",
+struct device platform_bus = {
+       .bus_id         = "platform",
 };
 
 /**
@@ -29,7 +29,7 @@ int platform_device_register(struct platform_device * pdev)
                return -EINVAL;
 
        if (!pdev->dev.parent)
-               pdev->dev.parent = &legacy_bus;
+               pdev->dev.parent = &platform_bus;
 
        pdev->dev.bus = &platform_bus_type;
        
@@ -105,11 +105,11 @@ struct bus_type platform_bus_type = {
 
 int __init platform_bus_init(void)
 {
-       device_register(&legacy_bus);
+       device_register(&platform_bus);
        return bus_register(&platform_bus_type);
 }
 
-EXPORT_SYMBOL(legacy_bus);
+EXPORT_SYMBOL(platform_bus);
 EXPORT_SYMBOL(platform_bus_type);
 EXPORT_SYMBOL(platform_device_register);
 EXPORT_SYMBOL(platform_device_unregister);
index 0fddee5..683dd59 100644 (file)
@@ -36,7 +36,7 @@ static ssize_t state_store(struct device * dev, const char * buf, size_t n)
        int error = 0;
 
        state = simple_strtoul(buf,&rest,10);
-       if (rest)
+       if (*rest)
                return -EINVAL;
        if (state)
                error = dpm_runtime_suspend(dev,state);
index e9a0c19..5aa2391 100644 (file)
  * add themselves as children of the system bus.
  */
 
-#include <linux/config.h>
-#ifdef CONFIG_DEBUG_KOBJECT
-#define DEBUG 1
-#else
 #undef DEBUG
-#endif
 
 #include <linux/sysdev.h>
 #include <linux/err.h>
index a152273..29035dd 100644 (file)
@@ -2474,7 +2474,6 @@ static boolean DAC960_V2_ReportDeviceConfiguration(DAC960_Controller_T
 static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
 {
   int MajorNumber = DAC960_MAJOR + Controller->ControllerNumber;
-  struct request_queue *RequestQueue;
   int n;
 
   /*
@@ -2483,26 +2482,22 @@ static boolean DAC960_RegisterBlockDevice(DAC960_Controller_T *Controller)
   if (register_blkdev(MajorNumber, "dac960") < 0)
       return false;
 
-  /*
-    Initialize the I/O Request Queue.
-  */
-  RequestQueue = blk_init_queue(DAC960_RequestFunction,&Controller->queue_lock);
-  if (!RequestQueue) {
-      unregister_blkdev(MajorNumber, "dac960");
-      return false;
-  }
-  Controller->RequestQueue = RequestQueue;
-  blk_queue_bounce_limit(RequestQueue, Controller->BounceBufferLimit);
-  RequestQueue->queuedata = Controller;
-  blk_queue_max_hw_segments(RequestQueue,
-                           Controller->DriverScatterGatherLimit);
-  blk_queue_max_phys_segments(RequestQueue,
-                           Controller->DriverScatterGatherLimit);
-  blk_queue_max_sectors(RequestQueue, Controller->MaxBlocksPerCommand);
-
   for (n = 0; n < DAC960_MaxLogicalDrives; n++) {
        struct gendisk *disk = Controller->disks[n];
+       struct request_queue *RequestQueue;
 
+       /* for now, let all request queues share controller's lock */
+       RequestQueue = blk_init_queue(DAC960_RequestFunction,&Controller->queue_lock);
+       if (!RequestQueue) {
+               printk("DAC960: failure to allocate request queue\n");
+               continue;
+       }
+       Controller->RequestQueue[n] = RequestQueue;
+       blk_queue_bounce_limit(RequestQueue, Controller->BounceBufferLimit);
+       RequestQueue->queuedata = Controller;
+       blk_queue_max_hw_segments(RequestQueue, Controller->DriverScatterGatherLimit);
+       blk_queue_max_phys_segments(RequestQueue, Controller->DriverScatterGatherLimit);
+       blk_queue_max_sectors(RequestQueue, Controller->MaxBlocksPerCommand);
        disk->queue = RequestQueue;
        sprintf(disk->disk_name, "rd/c%dd%d", Controller->ControllerNumber, n);
        sprintf(disk->devfs_name, "rd/host%d/target%d", Controller->ControllerNumber, n);
@@ -2527,17 +2522,17 @@ static void DAC960_UnregisterBlockDevice(DAC960_Controller_T *Controller)
   int MajorNumber = DAC960_MAJOR + Controller->ControllerNumber;
   int disk;
 
-  for (disk = 0; disk < DAC960_MaxLogicalDrives; disk++)
-         del_gendisk(Controller->disks[disk]);
+  /* does order matter when deleting gendisk and cleanup in request queue? */
+  for (disk = 0; disk < DAC960_MaxLogicalDrives; disk++) {
+       del_gendisk(Controller->disks[disk]);
+       blk_cleanup_queue(Controller->RequestQueue[disk]);
+       Controller->RequestQueue[disk] = NULL;
+  }
 
   /*
     Unregister the Block Device Major Number for this DAC960 Controller.
   */
   unregister_blkdev(MajorNumber, "dac960");
-  /*
-    Remove the I/O Request Queue.
-  */
-  blk_cleanup_queue(Controller->RequestQueue);
 }
 
 /*
@@ -3253,58 +3248,83 @@ static void DAC960_V2_QueueReadWriteCommand(DAC960_Command_T *Command)
 }
 
 
+static int DAC960_process_queue(DAC960_Controller_T *Controller, struct request_queue *req_q)
+{
+       struct request *Request;
+       DAC960_Command_T *Command;
+
+   while(1) {
+       Request = elv_next_request(req_q);
+       if (!Request)
+               return 1;
+
+       Command = DAC960_AllocateCommand(Controller);
+       if (Command == NULL)
+               return 0;
+
+       if (rq_data_dir(Request) == READ) {
+               Command->DmaDirection = PCI_DMA_FROMDEVICE;
+               Command->CommandType = DAC960_ReadCommand;
+       } else {
+               Command->DmaDirection = PCI_DMA_TODEVICE;
+               Command->CommandType = DAC960_WriteCommand;
+       }
+       Command->Completion = Request->waiting;
+       Command->LogicalDriveNumber = (long)Request->rq_disk->private_data;
+       Command->BlockNumber = Request->sector;
+       Command->BlockCount = Request->nr_sectors;
+       Command->Request = Request;
+       blkdev_dequeue_request(Request);
+       Command->SegmentCount = blk_rq_map_sg(req_q,
+                 Command->Request, Command->cmd_sglist);
+       /* pci_map_sg MAY change the value of SegCount */
+       Command->SegmentCount = pci_map_sg(Controller->PCIDevice, Command->cmd_sglist,
+                Command->SegmentCount, Command->DmaDirection);
+
+       DAC960_QueueReadWriteCommand(Command);
+  }
+}
+
 /*
   DAC960_ProcessRequest attempts to remove one I/O Request from Controller's
   I/O Request Queue and queues it to the Controller.  WaitForCommand is true if
   this function should wait for a Command to become available if necessary.
   This function returns true if an I/O Request was queued and false otherwise.
 */
-
-static boolean DAC960_ProcessRequest(DAC960_Controller_T *Controller,
-                                    boolean WaitForCommand)
+static void DAC960_ProcessRequest(DAC960_Controller_T *controller)
 {
-  struct request_queue *RequestQueue = Controller->RequestQueue;
-  struct request *Request;
-  DAC960_Command_T *Command;
+       int i;
 
-  if (!Controller->ControllerInitialized)
-     return false;
+       if (!controller->ControllerInitialized)
+               return;
 
-  while (true) {
-      Request = elv_next_request(RequestQueue);
-      if (!Request)
-             return false;
+       /* Do this better later! */
+       for (i = controller->req_q_index; i < DAC960_MaxLogicalDrives; i++) {
+               struct request_queue *req_q = controller->RequestQueue[i];
 
-      Command = DAC960_AllocateCommand(Controller);
-      if (Command != NULL)
-          break;
+               if (req_q == NULL)
+                       continue;
 
-      if (!WaitForCommand)
-          return false;
+               if (!DAC960_process_queue(controller, req_q)) {
+                       controller->req_q_index = i;
+                       return;
+               }
+       }
 
-      DAC960_WaitForCommand(Controller);
-  }
-  if (rq_data_dir(Request) == READ) {
-    Command->DmaDirection = PCI_DMA_FROMDEVICE;
-    Command->CommandType = DAC960_ReadCommand;
-  } else {
-    Command->DmaDirection = PCI_DMA_TODEVICE;
-    Command->CommandType = DAC960_WriteCommand;
-  }
-  Command->Completion = Request->waiting;
-  Command->LogicalDriveNumber = (long)Request->rq_disk->private_data;
-  Command->BlockNumber = Request->sector;
-  Command->BlockCount = Request->nr_sectors;
-  Command->Request = Request;
-  blkdev_dequeue_request(Request);
-  Command->SegmentCount = blk_rq_map_sg(Controller->RequestQueue,
-                 Command->Request, Command->cmd_sglist);
-  /* pci_map_sg MAY change the value of SegCount */
-  Command->SegmentCount = pci_map_sg(Controller->PCIDevice, Command->cmd_sglist,
-                Command->SegmentCount, Command->DmaDirection);
+       if (controller->req_q_index == 0)
+               return;
 
-  DAC960_QueueReadWriteCommand(Command);
-  return true;
+       for (i = 0; i < controller->req_q_index; i++) {
+               struct request_queue *req_q = controller->RequestQueue[i];
+
+               if (req_q == NULL)
+                       continue;
+
+               if (!DAC960_process_queue(controller, req_q)) {
+                       controller->req_q_index = i;
+                       return;
+               }
+       }
 }
 
 
@@ -3321,6 +3341,7 @@ static void DAC960_queue_partial_rw(DAC960_Command_T *Command)
 {
   DAC960_Controller_T *Controller = Command->Controller;
   struct request *Request = Command->Request;
+  struct request_queue *req_q = Controller->RequestQueue[Command->LogicalDriveNumber];
 
   if (Command->DmaDirection == PCI_DMA_FROMDEVICE)
     Command->CommandType = DAC960_ReadRetryCommand;
@@ -3333,11 +3354,9 @@ static void DAC960_queue_partial_rw(DAC960_Command_T *Command)
    * code should almost never be called, just go with a
    * simple coding.
    */
-  (void)blk_rq_map_sg(Controller->RequestQueue, Command->Request,
-                                        Command->cmd_sglist);
+  (void)blk_rq_map_sg(req_q, Command->Request, Command->cmd_sglist);
 
-  (void)pci_map_sg(Controller->PCIDevice, Command->cmd_sglist, 1,
-                                       Command->DmaDirection);
+  (void)pci_map_sg(Controller->PCIDevice, Command->cmd_sglist, 1, Command->DmaDirection);
   /*
    * Resubmitting the request sector at a time is really tedious.
    * But, this should almost never happen.  So, we're willing to pay
@@ -3357,9 +3376,7 @@ static void DAC960_queue_partial_rw(DAC960_Command_T *Command)
 
 static void DAC960_RequestFunction(struct request_queue *RequestQueue)
 {
-       int i = 0;
-       while (DAC960_ProcessRequest(RequestQueue->queuedata, (i++ == 0)))
-               ;
+       DAC960_ProcessRequest(RequestQueue->queuedata);
 }
 
 /*
@@ -5205,8 +5222,7 @@ static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel,
     Attempt to remove additional I/O Requests from the Controller's
     I/O Request Queue and queue them to the Controller.
   */
-  while (DAC960_ProcessRequest(Controller, false))
-         ;
+  DAC960_ProcessRequest(Controller);
   spin_unlock_irqrestore(&Controller->queue_lock, flags);
   return IRQ_HANDLED;
 }
@@ -5249,8 +5265,7 @@ static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel,
     Attempt to remove additional I/O Requests from the Controller's
     I/O Request Queue and queue them to the Controller.
   */
-  while (DAC960_ProcessRequest(Controller, false))
-         ;
+  DAC960_ProcessRequest(Controller);
   spin_unlock_irqrestore(&Controller->queue_lock, flags);
   return IRQ_HANDLED;
 }
@@ -5289,8 +5304,7 @@ static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel,
     Attempt to remove additional I/O Requests from the Controller's
     I/O Request Queue and queue them to the Controller.
   */
-  while (DAC960_ProcessRequest(Controller, false))
-         ;
+  DAC960_ProcessRequest(Controller);
   spin_unlock_irqrestore(&Controller->queue_lock, flags);
   return IRQ_HANDLED;
 }
@@ -5329,8 +5343,7 @@ static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel,
     Attempt to remove additional I/O Requests from the Controller's
     I/O Request Queue and queue them to the Controller.
   */
-  while (DAC960_ProcessRequest(Controller, false))
-         ;
+  DAC960_ProcessRequest(Controller);
   spin_unlock_irqrestore(&Controller->queue_lock, flags);
   return IRQ_HANDLED;
 }
@@ -5365,8 +5378,7 @@ static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel,
     Attempt to remove additional I/O Requests from the Controller's
     I/O Request Queue and queue them to the Controller.
   */
-  while (DAC960_ProcessRequest(Controller, false))
-         ;
+  DAC960_ProcessRequest(Controller);
   spin_unlock_irqrestore(&Controller->queue_lock, flags);
   return IRQ_HANDLED;
 }
@@ -5440,8 +5452,7 @@ static irqreturn_t DAC960_P_InterruptHandler(int IRQ_Channel,
     Attempt to remove additional I/O Requests from the Controller's
     I/O Request Queue and queue them to the Controller.
   */
-  while (DAC960_ProcessRequest(Controller, false))
-         ;
+  DAC960_ProcessRequest(Controller);
   spin_unlock_irqrestore(&Controller->queue_lock, flags);
   return IRQ_HANDLED;
 }
index 006cbec..676c078 100644 (file)
@@ -2333,7 +2333,8 @@ typedef struct DAC960_Controller
   DAC960_Command_T *FreeCommands;
   unsigned char *CombinedStatusBuffer;
   unsigned char *CurrentStatusBuffer;
-  struct request_queue *RequestQueue;
+  struct request_queue *RequestQueue[DAC960_MaxLogicalDrives];
+  int req_q_index;
   spinlock_t queue_lock;
   wait_queue_head_t CommandWaitQueue;
   wait_queue_head_t HealthStatusWaitQueue;
index 08e1850..bc301c8 100644 (file)
@@ -38,5 +38,3 @@ obj-$(CONFIG_BLK_DEV_DAC960)  += DAC960.o
 obj-$(CONFIG_BLK_DEV_UMEM)     += umem.o
 obj-$(CONFIG_BLK_DEV_NBD)      += nbd.o
 obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryptoloop.o
-
-obj-$(CONFIG_VIODASD)          += viodasd.o
index efc5219..ea00de8 100644 (file)
@@ -2563,7 +2563,7 @@ static void copy_buffer(int ssize, int max_sector, int max_sector_2)
                               current_count_sectors);
                        if (CT(COMMAND) == FD_READ)
                                printk("read\n");
-                       if (CT(COMMAND) == FD_READ)
+                       if (CT(COMMAND) == FD_WRITE)
                                printk("write\n");
                        break;
                }
@@ -2894,7 +2894,7 @@ static int make_raw_rw_request(void)
                               current_count_sectors);
                        if (CT(COMMAND) == FD_READ)
                                printk("read\n");
-                       if (CT(COMMAND) == FD_READ)
+                       if (CT(COMMAND) == FD_WRITE)
                                printk("write\n");
                        return 0;
                }
index 9513de5..2e9c597 100644 (file)
@@ -2594,7 +2594,7 @@ static void copy_buffer(int ssize, int max_sector, int max_sector_2)
                               current_count_sectors);
                        if (CT(COMMAND) == FD_READ)
                                printk("read\n");
-                       if (CT(COMMAND) == FD_READ)
+                       if (CT(COMMAND) == FD_WRITE)
                                printk("write\n");
                        break;
                }
@@ -2925,7 +2925,7 @@ static int make_raw_rw_request(void)
                               current_count_sectors);
                        if (CT(COMMAND) == FD_READ)
                                printk("read\n");
-                       if (CT(COMMAND) == FD_READ)
+                       if (CT(COMMAND) == FD_WRITE)
                                printk("write\n");
                        return 0;
                }
index d50419e..06a7d4e 100644 (file)
@@ -296,7 +296,9 @@ extern int blk_dev_init(void);
 
 static struct kobject *base_probe(dev_t dev, int *part, void *data)
 {
-       request_module("block-major-%d", MAJOR(dev));
+       if (request_module("block-major-%d-%d", MAJOR(dev), MINOR(dev)) > 0)
+               /* Make old-style 2.4 aliases work */
+               request_module("block-major-%d", MAJOR(dev));
        return NULL;
 }
 
index 3dd05e2..264f176 100644 (file)
@@ -2460,7 +2460,7 @@ static int __end_that_request_first(struct request *req, int uptodate,
 
        if (!uptodate) {
                error = -EIO;
-               if (!(req->flags & REQ_QUIET))
+               if (blk_fs_request(req) && !(req->flags & REQ_QUIET))
                        printk("end_request: I/O error, dev %s, sector %llu\n",
                                req->rq_disk ? req->rq_disk->disk_name : "?",
                                (unsigned long long)req->sector);
diff --git a/drivers/block/viodasd.c b/drivers/block/viodasd.c
deleted file mode 100644 (file)
index 64cadf4..0000000
+++ /dev/null
@@ -1,1306 +0,0 @@
-/* -*- linux-c -*-
- * viodasd.c
- *  Authors: Dave Boutcher <boutcher@us.ibm.com>
- *           Ryan Arnold <ryanarn@us.ibm.com>
- *           Colin Devilbiss <devilbis@us.ibm.com>
- *           Stephen Rothwell <sfr@au1.ibm.com>
- *
- * (C) Copyright 2000-2003 IBM Corporation
- * 
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- * 
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
- ***************************************************************************
- * This routine provides access to disk space (termed "DASD" in historical
- * IBM terms) owned and managed by an OS/400 partition running on the
- * same box as this Linux partition.
- *
- * All disk operations are performed by sending messages back and forth to 
- * the OS/400 partition. 
- * 
- * This device driver can either use its own major number, or it can
- * pretend to be an IDE drive (grep 'IDE[0-9]_MAJOR' ../../include/linux/major.h).
- * This is controlled with a CONFIG option.  You can either call this an
- * elegant solution to the fact that a lot of software doesn't recognize
- * a new disk major number...or you can call this a really ugly hack.
- * Your choice.
- *
- * Changelog:
- *     2001-11-27      devilbis        Added first pass at complete
- *                                     IDE emulation
- *     2002-07-07      boutcher        Added randomness
- */
-#include <linux/config.h>
-#include <linux/major.h>
-#include <linux/fs.h>
-#include <linux/blkpg.h>
-#include <linux/sched.h>
-#include <linux/timer.h>
-#include <asm/uaccess.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/blkdev.h>
-#include <linux/genhd.h>
-#include <linux/hdreg.h>
-#include <linux/fd.h>
-#include <linux/proc_fs.h>
-#include <linux/errno.h>
-#include <linux/init.h>
-#include <linux/vmalloc.h>
-#include <linux/string.h>
-#include <linux/pci.h>
-#include <linux/root_dev.h>
-#include <linux/kdev_t.h>
-
-#include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/HvLpEvent.h>
-#include <asm/iSeries/HvLpConfig.h>
-#include <asm/iSeries/vio.h>
-#include <asm/iSeries/iSeries_proc.h>
-
-MODULE_DESCRIPTION("iSeries Virtual DASD");
-MODULE_AUTHOR("Dave Boutcher");
-MODULE_LICENSE("GPL");
-
-/*
- * Decide if we are using our own major or pretending to be an IDE drive
- *
- * If we are using our own major, we only support 7 partitions per physical
- * disk....so with minor numbers 0-255 we get a maximum of 32 disks.  If we
- * are emulating IDE, we get 63 partitions per disk, with a maximum of 4
- * disks per major, but common practice is to place only 2 devices in /dev
- * for each IDE major, for a total of 20 (since there are 10 IDE majors).
- */
-
-#ifdef CONFIG_VIODASD_IDE
-static const int major_table[] = {
-       IDE0_MAJOR,
-       IDE1_MAJOR,
-       IDE2_MAJOR,
-       IDE3_MAJOR,
-       IDE4_MAJOR,
-       IDE5_MAJOR,
-       IDE6_MAJOR,
-       IDE7_MAJOR,
-       IDE8_MAJOR,
-       IDE9_MAJOR,
-};
-
-enum {
-       DEV_PER_MAJOR = 2,
-       PARTITION_SHIFT = 6,
-};
-
-static int major_to_index(int major)
-{
-       switch(major) {
-       case IDE0_MAJOR: return 0;
-       case IDE1_MAJOR: return 1;
-       case IDE2_MAJOR: return 2;
-       case IDE3_MAJOR: return 3;
-       case IDE4_MAJOR: return 4;
-       case IDE5_MAJOR: return 5;
-       case IDE6_MAJOR: return 6;
-       case IDE7_MAJOR: return 7;
-       case IDE8_MAJOR: return 8;
-       case IDE9_MAJOR: return 9;
-       default:
-               return -1;
-       }
-}
-
-#define VIOD_DEVICE_NAME       "ide"
-#define VIOD_GENHD_NAME                "hd"
-
-#else  /* !CONFIG_VIODASD_IDE */
-
-static const int major_table[] = {
-       VIODASD_MAJOR,
-};
-
-enum {
-       DEV_PER_MAJOR = 32,
-       PARTITION_SHIFT = 3,
-};
-
-static inline int major_to_index(int major)
-{
-       if (major != VIODASD_MAJOR)
-               return -1;
-       return 0;
-}
-
-#define VIOD_DEVICE_NAME       "viod"
-#ifdef CONFIG_DEVFS_FS
-#define VIOD_GENHD_NAME                "viod"
-#else
-#define VIOD_GENHD_NAME                "iseries/vd"
-#endif
-
-#endif /* CONFIG_VIODASD_IDE */
-
-#define VIODASD_VERS   "1.60"
-
-#define VIOD_KERN_WARNING      KERN_WARNING_VIO VIOD_DEVICE_NAME ": "
-#define VIOD_KERN_INFO         KERN_INFO_VIO VIOD_DEVICE_NAME ": "
-
-enum {
-       NUM_MAJORS = sizeof(major_table) / sizeof(major_table[0]),
-       MAX_DISKNO = DEV_PER_MAJOR * NUM_MAJORS,
-       MAX_DISK_NAME = 16, /* maximum length of a gendisk->name */
-};
-
-static volatile int    viodasd_max_disk = MAX_DISKNO - 1;
-static spinlock_t      viodasd_spinlock = SPIN_LOCK_UNLOCKED;
-
-static inline int devt_to_diskno(dev_t dev)
-{
-       return major_to_index(MAJOR(dev)) * DEV_PER_MAJOR +
-           (MINOR(dev) >> PARTITION_SHIFT);
-}
-
-#define VIOMAXREQ              16
-#define VIOMAXBLOCKDMA         12
-
-#define DEVICE_NO(cell)        ((struct viodasd_device *)(cell) - &viodasd_devices[0])
-
-extern struct pci_dev *iSeries_vio_dev;
-
-struct openData {
-       u64 mDiskLen;
-       u16 mMaxDisks;
-       u16 mCylinders;
-       u16 mTracks;
-       u16 mSectors;
-       u16 mBytesPerSector;
-};
-
-struct rwData {                        // Used during rw
-       u64 mOffset;
-       struct {
-               u32 mToken;
-               u32 reserved;
-               u64 mLen;
-       } dmaInfo[VIOMAXBLOCKDMA];
-};
-
-struct vioblocklpevent {
-       struct HvLpEvent event;
-       u32 mReserved1;
-       u16 mVersion;
-       u16 mSubTypeRc;
-       u16 mDisk;
-       u16 mFlags;
-       union {
-               struct openData openData;
-               struct rwData rwData;
-               u64 changed;
-       } u;
-};
-
-#define vioblockflags_ro   0x0001
-
-enum vioblocksubtype {
-       vioblockopen = 0x0001,
-       vioblockclose = 0x0002,
-       vioblockread = 0x0003,
-       vioblockwrite = 0x0004,
-       vioblockflush = 0x0005,
-       vioblockcheck = 0x0007
-};
-
-struct viodasd_waitevent {
-       struct semaphore *sem;
-       int rc;
-       union {
-               int changed;    /* Used only for check_change */
-               u16 subRC;
-       } data;
-};
-
-static const struct vio_error_entry viodasd_err_table[] = {
-       { 0x0201, EINVAL, "Invalid Range" },
-       { 0x0202, EINVAL, "Invalid Token" },
-       { 0x0203, EIO, "DMA Error" },
-       { 0x0204, EIO, "Use Error" },
-       { 0x0205, EIO, "Release Error" },
-       { 0x0206, EINVAL, "Invalid Disk" },
-       { 0x0207, EBUSY, "Cant Lock" },
-       { 0x0208, EIO, "Already Locked" },
-       { 0x0209, EIO, "Already Unlocked" },
-       { 0x020A, EIO, "Invalid Arg" },
-       { 0x020B, EIO, "Bad IFS File" },
-       { 0x020C, EROFS, "Read Only Device" },
-       { 0x02FF, EIO, "Internal Error" },
-       { 0x0000, 0, NULL },
-};
-
-/*
- * Figure out the biggest I/O request (in sectors) we can accept
- */
-#define VIODASD_MAXSECTORS (4096 / 512 * VIOMAXBLOCKDMA)
-
-/*
- * Keep some statistics on what's happening for the PROC file system
- */
-static struct {
-       long tot;
-       long nobh;
-       long ntce[VIOMAXBLOCKDMA];
-} viod_stats[MAX_DISKNO][2];
-
-/*
- * Number of disk I/O requests we've sent to OS/400
- */
-static int num_req_outstanding;
-
-/*
- * This is our internal structure for keeping track of disk devices
- */
-struct viodasd_device {
-       int                     useCount;
-       u16                     cylinders;
-       u16                     tracks;
-       u16                     sectors;
-       u16                     bytesPerSector;
-       u64                     size;
-       int                     readOnly;
-       struct request_queue    *queue;
-       spinlock_t              q_lock;
-       struct gendisk          *disk;
-} viodasd_devices[MAX_DISKNO];
-
-static struct hd_struct *devt_to_partition(dev_t dev)
-{
-       return viodasd_devices[devt_to_diskno(dev)].disk->
-               part[MINOR(dev) & ((1 << PARTITION_SHIFT) - 1)];
-}
-
-/*
- * Handle reads from the proc file system
- */
-static int proc_read(char *buf, char **start, off_t offset,
-                    int blen, int *eof, void *data)
-{
-       int len = 0;
-       int i;
-       int j;
-
-#if defined(MODULE)
-       len += sprintf(buf + len,
-                   "viod Module opened %d times.  Major number %d\n",
-                   MOD_IN_USE, major_table[0]);
-#endif
-       len += sprintf(buf + len, "viod %d possible devices\n", MAX_DISKNO);
-
-       for (i = 0; i < 16; i++) {
-               if (viod_stats[i][0].tot || viod_stats[i][1].tot) {
-                       len += sprintf(buf + len,
-                                   "DISK %2.2d: rd %-10.10ld wr %-10.10ld (no buffer list rd %-10.10ld wr %-10.10ld\n",
-                                   i, viod_stats[i][0].tot,
-                                   viod_stats[i][1].tot,
-                                   viod_stats[i][0].nobh,
-                                   viod_stats[i][1].nobh);
-
-                       len += sprintf(buf + len, "rd DMA: ");
-                       for (j = 0; j < VIOMAXBLOCKDMA; j++)
-                               len += sprintf(buf + len, " [%2.2d] %ld", j,
-                                              viod_stats[i][0].ntce[j]);
-
-                       len += sprintf(buf + len, "\nwr DMA: ");
-                       for (j = 0; j < VIOMAXBLOCKDMA; j++)
-                               len += sprintf(buf + len, " [%2.2d] %ld", j,
-                                              viod_stats[i][1].ntce[j]);
-                       len += sprintf(buf + len, "\n");
-               }
-       }
-
-       *eof = 1;
-       return len;
-}
-
-/*
- * Handle writes to our proc file system
- */
-static int proc_write(struct file *file, const char *buffer,
-                     unsigned long count, void *data)
-{
-       return count;
-}
-
-/*
- * setup our proc file system entries
- */
-void viodasd_proc_init(struct proc_dir_entry *iSeries_proc)
-{
-       struct proc_dir_entry *ent;
-
-       ent = create_proc_entry("viodasd", S_IFREG | S_IRUSR, iSeries_proc);
-       if (!ent)
-               return;
-       ent->owner = THIS_MODULE;
-       ent->nlink = 1;
-       ent->data = NULL;
-       ent->read_proc = proc_read;
-       ent->write_proc = proc_write;
-}
-
-/*
- * clean up our proc file system entries
- */
-void viodasd_proc_delete(struct proc_dir_entry *iSeries_proc)
-{
-       remove_proc_entry("viodasd", iSeries_proc);
-}
-
-/*
- * End a request
- */
-static void viodasd_end_request(struct request *req, int uptodate,
-               int num_sectors)
-{
-       if (!uptodate)
-               num_sectors = req->current_nr_sectors;
-       if (end_that_request_first(req, uptodate, num_sectors))
-               return;
-        add_disk_randomness(req->rq_disk);
-       end_that_request_last(req);
-}
-
-/*
- * This rebuilds the partition information for a single disk device
- */
-static int viodasd_revalidate(struct gendisk *gendisk)
-{
-       struct viodasd_device *device =
-               (struct viodasd_device *)gendisk->private_data;
-
-       set_capacity(gendisk, device->size >> 9);
-       return 0;
-}
-
-static inline u16 access_flags(mode_t mode)
-{
-       return (mode & FMODE_WRITE) ? 0 : vioblockflags_ro;
-}
-
-static void internal_register_disk(int diskno)
-{
-       static int registered[MAX_DISKNO];
-       struct gendisk *gendisk = viodasd_devices[diskno].disk;
-       int i;
-
-       if (registered[diskno])
-               return;
-       registered[diskno] = 1;
-
-       printk(VIOD_KERN_INFO
-              "Disk %2.2d size %dM, sectors %d, heads %d, cylinders %d, sectsize %d\n",
-               diskno, (int)viodasd_devices[diskno].size >> 20,
-              (int)viodasd_devices[diskno].sectors,
-              (int)viodasd_devices[diskno].tracks,
-              (int)viodasd_devices[diskno].cylinders,
-              (int)viodasd_devices[diskno].bytesPerSector);
-
-       for (i = 1; i < (1 << PARTITION_SHIFT); ++i) {
-               struct hd_struct *partition = gendisk->part[i - 1];
-               if (partition && partition->nr_sects)
-                       printk(VIOD_KERN_INFO
-                              "Disk %2.2d partition %2.2d start sector %ld, # sector %ld\n",
-                              diskno, i, partition->start_sect,
-                              partition->nr_sects);
-       }
-}
-
-/*
- * This is the actual open code.  It gets called from the external
- * open entry point, as well as from the init code when we're figuring
- * out what disks we have
- */
-static int internal_open(int device_no, u16 flags)
-{
-       struct gendisk *gendisk;
-       HvLpEvent_Rc hvrc;
-       /* This semaphore is raised in the interrupt handler */
-       DECLARE_MUTEX_LOCKED(Semaphore);
-       struct viodasd_waitevent we = { .sem = &Semaphore };
-
-       /* Check that we are dealing with a valid hosting partition */
-       if (viopath_hostLp == HvLpIndexInvalid) {
-               printk(KERN_WARNING_VIO "Invalid hosting partition\n");
-               return -EIO;
-       }
-
-       /* Send the open event to OS/400 */
-       hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
-                       HvLpEvent_Type_VirtualIo,
-                       viomajorsubtype_blockio | vioblockopen,
-                       HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
-                       viopath_sourceinst(viopath_hostLp),
-                       viopath_targetinst(viopath_hostLp),
-                       (u64)(unsigned long)&we, VIOVERSION << 16,
-                       ((u64)device_no << 48) | ((u64)flags << 32), 0, 0, 0);
-       if (hvrc != 0) {
-               printk(KERN_WARNING_VIO "bad rc on signalLpEvent %d\n",
-                               (int)hvrc);
-               return -EIO;
-       }
-
-       /* Wait for the interrupt handler to get the response */
-       down(&Semaphore);
-
-       /* Check the return code */
-       if (we.rc != 0) {
-               const struct vio_error_entry *err =
-                       vio_lookup_rc(viodasd_err_table, we.data.subRC);
-               /*
-                * Temporary patch to quiet down the viodasd when drivers
-                * are probing for drives, especially lvm.  Collin is aware
-                * and is working on this.
-                */
-#if 0
-               printk(KERN_WARNING_VIO "bad rc opening disk: %d:0x%04x (%s)\n",
-                               (int)we.rc, we.data.subRC, err->msg);
-#endif
-               return -err->errno;
-       }
-       
-       /* Bump the use count */
-       viodasd_devices[device_no].useCount++;
-
-       /* When we are probing, we have no gendisk structure yet ... */
-       gendisk = viodasd_devices[device_no].disk;
-       if (gendisk == NULL)
-               return 0;
-
-       /*
-        * If this is the first open of this device, update the device
-        * information.  If this is NOT the first open, assume that it
-        * isn't changing
-        */
-       if (viodasd_devices[device_no].useCount == 1) {
-               if (viodasd_devices[device_no].size > 0)
-                        set_capacity(gendisk,
-                                       viodasd_devices[device_no].size >> 9);
-       } else if (get_capacity(gendisk) !=
-                       viodasd_devices[device_no].size >> 9)
-               /*
-                * If the size of the device changed, weird things
-                * are happening!
-                */
-               printk(KERN_WARNING_VIO
-                      "disk size change (%d to %d sectors) for device %d\n",
-                      (int)get_capacity(gendisk),
-                      (int)viodasd_devices[device_no].size >> 9, device_no);
-
-       internal_register_disk(device_no);
-
-       return 0;
-}
-
-/*
- * This is the actual release code.  It gets called from the external
- * release entry point, as well as from the init code when we're figuring
- * out what disks we have.
- */
-static int internal_release(int device_no, u16 flags)
-{
-       HvLpEvent_Rc hvrc;
-
-       /* Send the event to OS/400.  We DON'T expect a response */
-       hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
-                       HvLpEvent_Type_VirtualIo,
-                       viomajorsubtype_blockio | vioblockclose,
-                       HvLpEvent_AckInd_NoAck, HvLpEvent_AckType_ImmediateAck,
-                       viopath_sourceinst(viopath_hostLp),
-                       viopath_targetinst(viopath_hostLp), 0,
-                       VIOVERSION << 16,
-                       ((u64)device_no << 48) | ((u64)flags << 32), 0, 0, 0);
-       viodasd_devices[device_no].useCount--;
-       if (hvrc != 0) {
-               printk(KERN_WARNING_VIO
-                      "bad rc sending event to OS/400 %d\n", (int)hvrc);
-               return -EIO;
-       }
-       return 0;
-}
-
-
-static int inode_to_device_no(struct inode *ino, const char *func)
-{
-       int device_no;
-
-       /* Do a bunch of sanity checks */
-       if (!ino) {
-               printk(KERN_WARNING_VIO "no inode provided in %s\n", func);
-               return -ENODEV;
-       }
-
-       if (major_to_index(MAJOR(ino->i_rdev)) < 0) {
-               printk(KERN_WARNING_VIO
-                      "Weird error...wrong major number in %s\n", func);
-               return -ENODEV;
-       }
-
-       device_no = devt_to_diskno(ino->i_rdev);
-       if ((device_no > MAX_DISKNO) || (device_no < 0)) {
-               printk(KERN_WARNING_VIO
-                      "Invalid disk number %d in %s\n", device_no, func);
-               return -ENODEV;
-       }
-       return device_no;
-}
-
-/*
- * External open entry point.
- */
-static int viodasd_open(struct inode *ino, struct file *fil)
-{
-       int device_no;
-       int i;
-       int old_max_disk = viodasd_max_disk;
-
-       device_no = inode_to_device_no(ino, "open");
-       if (device_no < 0)
-               return device_no;
-
-       /* Call the actual open code */
-       if (internal_open(device_no, access_flags(fil ? fil->f_mode : 0)) != 0)
-               return -EIO;
-
-       /* For each new disk: */
-       /* update the disk's geometry via internal_open and register it */
-       for (i = old_max_disk + 1; i <= viodasd_max_disk; ++i) {
-               internal_open(i, vioblockflags_ro);
-               internal_release(i, vioblockflags_ro);
-       }
-       return 0;
-}
-
-/*
- * External release entry point.
- */
-static int viodasd_release(struct inode *ino, struct file *fil)
-{
-       int device_no;
-
-       device_no = inode_to_device_no(ino, "open");
-       if (device_no < 0)
-               return device_no;
-
-       /* Call the actual release code */
-       internal_release(device_no, access_flags(fil ? fil->f_mode : 0));
-
-       return 0;
-}
-
-/* External ioctl entry point.
- */
-static int viodasd_ioctl(struct inode *ino, struct file *fil,
-                        unsigned int cmd, unsigned long arg)
-{
-       int device_no;
-       int err;
-       struct hd_struct *partition;
-
-       /* Sanity checks */
-       if (!ino) {
-               printk(KERN_WARNING_VIO "no inode provided in ioctl\n");
-               return -ENODEV;
-       }
-
-       if (major_to_index(MAJOR(ino->i_rdev)) < 0) {
-               printk(KERN_WARNING_VIO
-                      "Weird error...wrong major number on ioctl\n");
-               return -ENODEV;
-       }
-
-       device_no = devt_to_diskno(ino->i_rdev);
-       if (device_no > viodasd_max_disk) {
-               printk(KERN_WARNING_VIO
-                      "Invalid device number %d in ioctl\n", device_no);
-               return -ENODEV;
-       }
-
-       partition = devt_to_partition(ino->i_rdev);
-
-       switch (cmd) {
-       case HDIO_GETGEO:
-       {
-               unsigned char sectors;
-               unsigned char heads;
-               unsigned short cylinders;
-
-               struct hd_geometry *geo = (struct hd_geometry *)arg;
-               if (geo == NULL)
-                       return -EINVAL;
-               err = verify_area(VERIFY_WRITE, geo, sizeof(*geo));
-               if (err)
-                       return err;
-               sectors = viodasd_devices[device_no].sectors;
-               if (sectors == 0)
-                       sectors = 32;
-               heads = viodasd_devices[device_no].tracks;
-               if (heads == 0)
-                       heads = 64;
-               cylinders = viodasd_devices[device_no].cylinders;
-               if ((cylinders == 0) && partition)
-                       cylinders = partition->nr_sects / (sectors * heads);
-               put_user(sectors, &geo->sectors);
-               put_user(heads, &geo->heads);
-               put_user(cylinders, &geo->cylinders);
-
-               if (partition)
-                       put_user(partition->start_sect, &geo->start);
-               else
-                       put_user(0, &geo->start);
-
-               return 0;
-       }
-
-
-#define PRTIOC(x)      \
-       case x: printk(KERN_WARNING_VIO "got unsupported FD ioctl " #x "\n"); \
-                          return -EINVAL;
-       PRTIOC(FDCLRPRM);
-       PRTIOC(FDSETPRM);
-       PRTIOC(FDDEFPRM);
-       PRTIOC(FDGETPRM);
-       PRTIOC(FDMSGON);
-       PRTIOC(FDMSGOFF);
-       PRTIOC(FDFMTBEG);
-       PRTIOC(FDFMTTRK);
-       PRTIOC(FDFMTEND);
-       PRTIOC(FDSETEMSGTRESH);
-       PRTIOC(FDSETMAXERRS);
-       PRTIOC(FDGETMAXERRS);
-       PRTIOC(FDGETDRVTYP);
-       PRTIOC(FDSETDRVPRM);
-       PRTIOC(FDGETDRVPRM);
-       PRTIOC(FDGETDRVSTAT);
-       PRTIOC(FDPOLLDRVSTAT);
-       PRTIOC(FDRESET);
-       PRTIOC(FDGETFDCSTAT);
-       PRTIOC(FDWERRORCLR);
-       PRTIOC(FDWERRORGET);
-       PRTIOC(FDRAWCMD);
-       PRTIOC(FDEJECT);
-       PRTIOC(FDTWADDLE);
-       }
-
-       return -EINVAL;
-}
-
-/*
- * Send an actual I/O request to OS/400
- */
-static int send_request(struct request *req)
-{
-       u64 start;
-       int direction;
-       int nsg;
-       u16 viocmd;
-       HvLpEvent_Rc hvrc;
-       struct vioblocklpevent *bevent;
-       struct scatterlist sg[VIOMAXBLOCKDMA];
-       int sgindex;
-       int statindex;
-        int device_no = DEVICE_NO(req->rq_disk->private_data);
-       unsigned long flags;
-
-       start = (u64)req->sector << 9;
-
-       /* More paranoia checks */
-       if ((req->sector + req->nr_sectors) > get_capacity(req->rq_disk)) {
-               printk(KERN_WARNING_VIO "Invalid request offset & length\n");
-               printk(KERN_WARNING_VIO
-                               "req->sector: %ld, req->nr_sectors: %ld\n",
-                               req->sector, req->nr_sectors);
-               printk(KERN_WARNING_VIO "device: %s\n",
-                               req->rq_disk->disk_name);
-               return -1;
-       }
-
-       if (rq_data_dir(req) == READ) {
-               direction = PCI_DMA_FROMDEVICE;
-               viocmd = viomajorsubtype_blockio | vioblockread;
-               statindex = 0;
-       } else {
-               direction = PCI_DMA_TODEVICE;
-               viocmd = viomajorsubtype_blockio | vioblockwrite;
-               statindex = 1;
-       }
-
-       /* Update totals */
-       viod_stats[device_no][statindex].tot++;
-
-       /* Now build the scatter-gather list */
-       nsg = blk_rq_map_sg(req->q, req, sg);
-       nsg = pci_map_sg(iSeries_vio_dev, sg, nsg, direction);
-       /* Update stats */
-       viod_stats[device_no][statindex].ntce[nsg]++;
-
-       spin_lock_irqsave(&viodasd_spinlock, flags);
-       num_req_outstanding++;
-
-       /* This optimization handles a single DMA block */
-       if (nsg == 1)
-               hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
-                               HvLpEvent_Type_VirtualIo,
-                               viomajorsubtype_blockio | viocmd,
-                               HvLpEvent_AckInd_DoAck,
-                               HvLpEvent_AckType_ImmediateAck,
-                               viopath_sourceinst(viopath_hostLp),
-                               viopath_targetinst(viopath_hostLp),
-                               (u64)(unsigned long)req, VIOVERSION << 16,
-                               ((u64)device_no << 48), start,
-                               ((u64)sg[0].dma_address) << 32,
-                               sg[0].dma_length);
-       else {
-               bevent = (struct vioblocklpevent *)
-                       vio_get_event_buffer(viomajorsubtype_blockio);
-               if (bevent == NULL) {
-                       spin_unlock_irqrestore(&viodasd_spinlock, flags);
-                       printk(KERN_WARNING_VIO
-                              "error allocating disk event buffer\n");
-                       return -1;
-               }
-
-               /*
-                * Now build up the actual request.  Note that we store
-                * the pointer to the request in the correlation
-                * token so we can match the response up later
-                */
-               memset(bevent, 0, sizeof(struct vioblocklpevent));
-               bevent->event.xFlags.xValid = 1;
-               bevent->event.xFlags.xFunction = HvLpEvent_Function_Int;
-               bevent->event.xFlags.xAckInd = HvLpEvent_AckInd_DoAck;
-               bevent->event.xFlags.xAckType = HvLpEvent_AckType_ImmediateAck;
-               bevent->event.xType = HvLpEvent_Type_VirtualIo;
-               bevent->event.xSubtype = viocmd;
-               bevent->event.xSourceLp = HvLpConfig_getLpIndex();
-               bevent->event.xTargetLp = viopath_hostLp;
-               bevent->event.xSizeMinus1 =
-                       offsetof(struct vioblocklpevent, u.rwData.dmaInfo) +
-                       (sizeof(bevent->u.rwData.dmaInfo[0]) * nsg) - 1;
-               bevent->event.xSourceInstanceId =
-                       viopath_sourceinst(viopath_hostLp);
-               bevent->event.xTargetInstanceId =
-                       viopath_targetinst(viopath_hostLp);
-               bevent->event.xCorrelationToken = (u64)req;
-               bevent->mVersion = VIOVERSION;
-               bevent->mDisk = device_no;
-               bevent->u.rwData.mOffset = start;
-
-               /*
-                * Copy just the dma information from the sg list
-                * into the request
-                */
-               for (sgindex = 0; sgindex < nsg; sgindex++) {
-                       bevent->u.rwData.dmaInfo[sgindex].mToken =
-                               sg[sgindex].dma_address;
-                       bevent->u.rwData.dmaInfo[sgindex].mLen =
-                               sg[sgindex].dma_length;
-               }
-
-               /* Send the request */
-               hvrc = HvCallEvent_signalLpEvent(&bevent->event);
-               vio_free_event_buffer(viomajorsubtype_blockio, bevent);
-       }
-
-       if (hvrc != HvLpEvent_Rc_Good) {
-               num_req_outstanding--;
-               spin_unlock_irqrestore(&viodasd_spinlock, flags);
-               printk(KERN_WARNING_VIO
-                      "error sending disk event to OS/400 (rc %d)\n",
-                      (int)hvrc);
-               return -1;
-       }
-       spin_unlock_irqrestore(&viodasd_spinlock, flags);
-       return 0;
-}
-
-/*
- * This is the external request processing routine
- */
-static void do_viodasd_request(request_queue_t *q)
-{
-       for (;;) {
-               struct request *req;
-               struct gendisk *gendisk;
-
-               if ((req = elv_next_request(q)) == NULL)
-                       return;
-               /* check that request contains a valid command */
-               if (!blk_fs_request(req)) {
-                       viodasd_end_request(req, 0, 0);
-                       continue;
-               }
-
-               gendisk = req->rq_disk;
-               if (major_to_index(gendisk->major) < 0)
-                       panic(VIOD_DEVICE_NAME ": request list destroyed");
-
-               if (get_capacity(gendisk) == 0) {
-                       printk(KERN_WARNING_VIO
-                                       "Ouch! get_capacity(gendisk) is 0\n");
-                       viodasd_end_request(req, 0, 0);
-                       continue;
-               }
-
-               /* If the queue is plugged, don't dequeue anything right now */
-               if (blk_queue_plugged(q))
-                       return;
-
-               /*
-                * If we already have the maximum number of requests
-                * outstanding to OS/400 just bail out. We'll come
-                * back later.
-                */
-               if (num_req_outstanding >= VIOMAXREQ)
-                       return;
-
-               /* dequeue the current request from the queue */
-               blkdev_dequeue_request(req);
-
-               spin_unlock_irq(q->queue_lock);
-
-               /* Try sending the request */
-               if (send_request(req) != 0)
-                       viodasd_end_request(req, 0, 0);
-
-               spin_lock_irq(q->queue_lock);
-       }
-}
-
-/*
- * Check for changed disks
- */
-static int viodasd_check_change(struct gendisk *gendisk)
-{
-       struct viodasd_waitevent we;
-       HvLpEvent_Rc hvrc;
-       int device_no = major_to_index(gendisk->major);
-
-       /* This semaphore is raised in the interrupt handler */
-       DECLARE_MUTEX_LOCKED(Semaphore);
-
-       /* Check that we are dealing with a valid hosting partition */
-       if (viopath_hostLp == HvLpIndexInvalid) {
-               printk(KERN_WARNING_VIO "Invalid hosting partition\n");
-               return -EIO;
-       }
-
-       we.sem = &Semaphore;
-
-       /* Send the open event to OS/400 */
-       hvrc = HvCallEvent_signalLpEventFast(viopath_hostLp,
-                       HvLpEvent_Type_VirtualIo,
-                       viomajorsubtype_blockio | vioblockcheck,
-                       HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
-                       viopath_sourceinst(viopath_hostLp),
-                       viopath_targetinst(viopath_hostLp),
-                       (u64)(unsigned long)&we, VIOVERSION << 16,
-                       ((u64)device_no << 48), 0, 0, 0);
-       if (hvrc != 0) {
-               printk(KERN_WARNING_VIO "bad rc on signalLpEvent %d\n",
-                               (int)hvrc);
-               return -EIO;
-       }
-
-       /* Wait for the interrupt handler to get the response */
-       down(&Semaphore);
-
-       /* Check the return code.  If bad, assume no change */
-       if (we.rc != 0) {
-               printk(KERN_WARNING_VIO
-                               "bad rc %d on check_change. Assuming no change\n",
-                               (int)we.rc);
-               return 0;
-       }
-
-       return we.data.changed;
-}
-
-/*
- * Our file operations table
- */
-static struct block_device_operations viodasd_fops = {
-       .owner = THIS_MODULE,
-       .open = viodasd_open,
-       .release = viodasd_release,
-       .ioctl = viodasd_ioctl,
-       .media_changed = viodasd_check_change,
-       .revalidate_disk = viodasd_revalidate
-};
-
-/* returns the total number of scatterlist elements converted */
-static int block_event_to_scatterlist(const struct vioblocklpevent *bevent,
-               struct scatterlist *sg, int *total_len)
-{
-       int i, numsg;
-       const struct rwData *rwData = &bevent->u.rwData;
-       static const int offset =
-               offsetof(struct vioblocklpevent, u.rwData.dmaInfo);
-       static const int element_size = sizeof(rwData->dmaInfo[0]);
-
-       numsg = ((bevent->event.xSizeMinus1 + 1) - offset) / element_size;
-       if (numsg > VIOMAXBLOCKDMA)
-               numsg = VIOMAXBLOCKDMA;
-
-       *total_len = 0;
-       memset(sg, 0, sizeof(sg[0]) * VIOMAXBLOCKDMA);
-
-       for (i = 0; (i < numsg) && (rwData->dmaInfo[i].mLen > 0); ++i) {
-               sg[i].dma_address = rwData->dmaInfo[i].mToken;
-               sg[i].dma_length = rwData->dmaInfo[i].mLen;
-               *total_len += rwData->dmaInfo[i].mLen;
-       }
-       return i;
-}
-
-/*
- * Restart all queues, starting with the one _after_ the disk given,
- * thus reducing the chance of starvation of higher numbered disks.
- */
-static void viodasd_restart_all_queues_starting_from(int first_index)
-{
-       int i;
-       request_queue_t *q;
-
-       for (i = first_index + 1; i < MAX_DISKNO; ++i) {
-               q = viodasd_devices[i].queue;
-               if (q)
-                       blk_run_queue(q);
-       }
-       for (i = 0; i <= first_index; ++i) {
-               q = viodasd_devices[i].queue;
-               if (q)
-                       blk_run_queue(q);
-       }
-}
-
-/*
- * For read and write requests, decrement the number of outstanding requests,
- * Free the DMA buffers we allocated.
- */
-static int viodasd_handleReadWrite(struct vioblocklpevent *bevent)
-{
-       int num_sg, num_sect, pci_direction, total_len;
-       struct request *req;
-       struct scatterlist sg[VIOMAXBLOCKDMA];
-       struct HvLpEvent *event = &bevent->event;
-       unsigned long irq_flags;
-       int device_no;
-
-       num_sg = block_event_to_scatterlist(bevent, sg, &total_len);
-       num_sect = total_len >> 9;
-       if (event->xSubtype == (viomajorsubtype_blockio | vioblockread))
-               pci_direction = PCI_DMA_FROMDEVICE;
-       else
-               pci_direction = PCI_DMA_TODEVICE;
-       pci_unmap_sg(iSeries_vio_dev, sg, num_sg, pci_direction);
-
-       /*
-        * Since this is running in interrupt mode, we need to make sure
-        * we're not stepping on any global I/O operations
-        */
-       spin_lock_irqsave(&viodasd_spinlock, irq_flags);
-       num_req_outstanding--;
-       spin_unlock_irqrestore(&viodasd_spinlock, irq_flags);
-
-       req = (struct request *)bevent->event.xCorrelationToken;
-       device_no = DEVICE_NO(req->rq_disk->private_data);
-
-       if (event->xRc != HvLpEvent_Rc_Good) {
-               const struct vio_error_entry *err;
-               err = vio_lookup_rc(viodasd_err_table, bevent->mSubTypeRc);
-               printk(KERN_WARNING_VIO "read/write error %d:0x%04x (%s)\n",
-                               event->xRc, bevent->mSubTypeRc, err->msg);
-               viodasd_end_request(req, 0, 0);
-       } else
-               viodasd_end_request(req, 1, num_sect);
-
-       /* Finally, try to get more requests off of this device's queue */
-       viodasd_restart_all_queues_starting_from(device_no);
-
-       return 0;
-}
-
-/* This routine handles incoming block LP events */
-static void vioHandleBlockEvent(struct HvLpEvent *event)
-{
-       struct vioblocklpevent *bevent = (struct vioblocklpevent *)event;
-       struct viodasd_waitevent *pwe;
-
-       if (event == NULL)
-               /* Notification that a partition went away! */
-               return;
-       /* First, we should NEVER get an int here...only acks */
-       if (event->xFlags.xFunction == HvLpEvent_Function_Int) {
-               printk(KERN_WARNING_VIO
-                      "Yikes! got an int in viodasd event handler!\n");
-               if (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck) {
-                       event->xRc = HvLpEvent_Rc_InvalidSubtype;
-                       HvCallEvent_ackLpEvent(event);
-               }
-       }
-
-       switch (event->xSubtype & VIOMINOR_SUBTYPE_MASK) {
-       case vioblockopen:
-               /*
-                * Handle a response to an open request.  We get all the
-                * disk information in the response, so update it.  The
-                * correlation token contains a pointer to a waitevent
-                * structure that has a semaphore in it.  update the
-                * return code in the waitevent structure and post the
-                * semaphore to wake up the guy who sent the request
-                */
-               pwe = (struct viodasd_waitevent *)event->xCorrelationToken;
-               pwe->rc = event->xRc;
-               pwe->data.subRC = bevent->mSubTypeRc;
-               if (event->xRc == HvLpEvent_Rc_Good) {
-                       const struct openData *data = &bevent->u.openData;
-                       struct viodasd_device *device =
-                               &viodasd_devices[bevent->mDisk];
-                       device->readOnly =
-                               bevent->mFlags & vioblockflags_ro;
-                       device->size = data->mDiskLen;
-                       device->cylinders = data->mCylinders;
-                       device->tracks = data->mTracks;
-                       device->sectors = data->mSectors;
-                       device->bytesPerSector = data->mBytesPerSector;
-                       viodasd_max_disk = data->mMaxDisks;
-               }
-               up(pwe->sem);
-               break;
-       case vioblockclose:
-               break;
-       case vioblockcheck:
-               pwe = (struct viodasd_waitevent *)event->xCorrelationToken;
-               pwe->rc = event->xRc;
-               pwe->data.changed = bevent->u.changed;
-               up(pwe->sem);
-               break;
-       case vioblockflush:
-               up((void *)event->xCorrelationToken);
-               break;
-       case vioblockread:
-       case vioblockwrite:
-               viodasd_handleReadWrite(bevent);
-               break;
-
-       default:
-               printk(KERN_WARNING_VIO "invalid subtype!");
-               if (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck) {
-                       event->xRc = HvLpEvent_Rc_InvalidSubtype;
-                       HvCallEvent_ackLpEvent(event);
-               }
-       }
-}
-
-static const char *major_name(int major)
-{
-       static char major_names[NUM_MAJORS][MAX_DISK_NAME];
-       int index = major_to_index(major);
-
-       if (index < 0)
-               return NULL;
-       if (major_names[index][0] == '\0') {
-               if (index == 0)
-                       strcpy(major_names[index], VIOD_GENHD_NAME);
-               else
-                       sprintf(major_names[index], VIOD_GENHD_NAME"%d", index);
-       }
-       return major_names[index];
-}
-
-static const char *disk_names(int diskno)
-{
-        static char name[MAX_DISK_NAME];
-        char suffix[MAX_DISK_NAME];
-        int idx = 0;
-        int i, j;
-
-        /* convert the disk number to a letter(s) */
-        /* 0=a 25=z 26=aa 27=a, ....              */
-        do {
-                suffix[idx++] = 'a' + (diskno % 26);
-                diskno /= 26;
-        } while (diskno-- && (idx < MAX_DISK_NAME - 1));
-
-        suffix[idx] = 0;
-        /* reverse the array */
-        for (i = 0, j = idx - 1; i < j; i++, j--) {
-                char c = suffix[i];
-               suffix[i] = suffix[j];
-               suffix[j] = c;
-       }
-
-        /* put the name all together and return it */
-        snprintf(name, MAX_DISK_NAME, "%s%s", VIOD_GENHD_NAME, suffix);
-        return name;
-}
-
-static void viodasd_cleanup_major(int major)
-{
-       int i;
-
-        for (i = 0; i < DEV_PER_MAJOR; i++) {
-               int device_no = DEV_PER_MAJOR * major_to_index(major) + i;
-
-               blk_cleanup_queue(viodasd_devices[device_no].disk->queue);
-               del_gendisk(viodasd_devices[device_no].disk);
-               put_disk(viodasd_devices[device_no].disk);
-               kfree(viodasd_devices[device_no].disk);
-               unregister_blkdev(major, major_name(major));
-               viodasd_devices[device_no].disk = NULL;
-       }
-}
-
-/* in case of bad return code, caller must cleanup2() for this device */
-static int __init viodasd_init_major(int major)
-{
-       struct gendisk *gendisk;
-       struct request_queue *q;
-       int i;
-
-        /* register the block device */
-       if (register_blkdev(major, major_name(major))) {
-               printk(KERN_WARNING "Unable to get major number %d for %s\n",
-                               major, major_name(major));
-               return -1;
-       }
-       for (i = 0; i < DEV_PER_MAJOR; i++) {
-               int deviceno = DEV_PER_MAJOR * major_to_index(major) + i;
-
-               /* create the request queue for the disk */
-               spin_lock_init(&viodasd_devices[deviceno].q_lock);
-               q = blk_init_queue(do_viodasd_request,
-                               &viodasd_devices[deviceno].q_lock);
-               if (q == NULL)
-                       return -ENOMEM;
-               blk_queue_max_hw_segments(q, VIOMAXBLOCKDMA);
-               blk_queue_max_sectors(q, VIODASD_MAXSECTORS);
-               viodasd_devices[deviceno].queue = q;
-
-               /* inialize the struct */
-               gendisk = alloc_disk(1 << PARTITION_SHIFT);
-               if (gendisk == NULL)
-                       return -ENOMEM;
-               viodasd_devices[deviceno].disk = gendisk;
-               gendisk->major = major;
-               gendisk->first_minor = i * (1 << PARTITION_SHIFT);
-               strncpy(gendisk->disk_name, disk_names(deviceno),
-                               MAX_DISK_NAME);
-               strncpy(gendisk->devfs_name, disk_names(deviceno),
-                               MAX_DISK_NAME);
-               gendisk->fops = &viodasd_fops;
-               gendisk->queue = q;
-               gendisk->private_data = (void *)&viodasd_devices[deviceno];
-               set_capacity(gendisk, viodasd_devices[deviceno].size >> 9);
-
-               /* register us in the global list */
-               add_disk(gendisk);
-       }
-
-       return 0;
-}
-
-/*
- * Initialize the whole device driver.  Handle module and non-module
- * versions
- */
-static int __init viodasd_init(void)
-{
-       int i, j;
-
-       /* Try to open to our host lp */
-       if (viopath_hostLp == HvLpIndexInvalid)
-               vio_set_hostlp();
-
-       if (viopath_hostLp == HvLpIndexInvalid) {
-               printk(VIOD_KERN_WARNING "invalid hosting partition\n");
-               return -EIO;
-       }
-
-       printk(VIOD_KERN_INFO "Disk vers " VIODASD_VERS
-                       ", major %d, max disks %d, hosting partition %d\n",
-                       major_table[0], MAX_DISKNO, viopath_hostLp);
-
-       /* Actually open the path to the hosting partition */
-       if (viopath_open(viopath_hostLp, viomajorsubtype_blockio,
-                               VIOMAXREQ + 2)) {
-               printk(KERN_WARNING_VIO
-                      "error opening path to host partition %d\n",
-                      viopath_hostLp);
-               return -EIO;
-       } else
-               printk(VIOD_KERN_INFO "opened path to hosting partition %d\n",
-                               viopath_hostLp);
-
-       /*
-        * Initialize our request handler
-        */
-       vio_setHandler(viomajorsubtype_blockio, vioHandleBlockEvent);
-
-       viodasd_max_disk = MAX_DISKNO - 1;
-       for (i = 0; (i <= viodasd_max_disk) && (i < MAX_DISKNO); i++) {
-               // Note that internal_open has side effects:
-               //  a) it updates the size of the disk
-               //  b) it updates viodasd_max_disk
-               //  c) it registers the disk if it has not done so already
-               if (internal_open(i, vioblockflags_ro) == 0)
-                       internal_release(i, vioblockflags_ro);
-       }
-
-       printk(VIOD_KERN_INFO "Currently %d disks connected\n",
-                       (int)viodasd_max_disk + 1);
-       if (viodasd_max_disk > (MAX_DISKNO - 1))
-               printk(KERN_INFO_VIO "Only examining the first %d\n",
-                      MAX_DISKNO);
-
-       for (i = 0; i < NUM_MAJORS; ++i) {
-               int init_rc = viodasd_init_major(major_table[i]);
-               if (init_rc < 0) {
-                       for (j = 0; j <= i; ++j)
-                               viodasd_cleanup_major(major_table[j]);
-                       return init_rc;
-               }
-       }
-
-       /* 
-        * Create the proc entry
-        */
-       iSeries_proc_callback(&viodasd_proc_init);
-
-       return 0;
-}
-module_init(viodasd_init);
-
-#if 0
-void viodasd_exit(void)
-{
-       int i;
-       for(i = 0; i < NUM_MAJORS; ++i)
-               viodasd_cleanup_major(major_table[i]);
-
-       CLEANIT(viodasd_devices);
-
-       viopath_close(viopath_hostLp, viomajorsubtype_blockio, VIOMAXREQ + 2);
-       iSeries_proc_callback(&viodasd_proc_delete);
-
-}
-
-module_exit(viodasd_exit);
-#endif
index 6c82ecc..2a5fa62 100644 (file)
@@ -963,13 +963,6 @@ config SCx200_GPIO
 
          If compiled as a module, it will be called scx200_gpio.
 
-config FJKEYINFO
-       tristate "Fujitsu Lifebook Application Key Support"
-       help
-         Provide support for Fujitsu Lifebook application keys.
-
-         If compiled as a module, it will be called fjkeyinf.
-
 config RAW_DRIVER
        tristate "RAW driver (/dev/raw/rawN)"
        help
index b72137e..b85c97a 100644 (file)
@@ -43,7 +43,6 @@ obj-$(CONFIG_SH_SCI)          += sh-sci.o generic_serial.o
 obj-$(CONFIG_HVC_CONSOLE)      += hvc_console.o
 obj-$(CONFIG_RAW_DRIVER)       += raw.o
 obj-$(CONFIG_SGI_L1_SERIAL)    += sn_serial.o
-obj-$(CONFIG_VIOCONS) += viocons.o
 
 obj-$(CONFIG_PRINTER) += lp.o
 obj-$(CONFIG_TIPAR) += tipar.o
@@ -72,7 +71,6 @@ obj-$(CONFIG_DZ) += dz.o
 obj-$(CONFIG_NWBUTTON) += nwbutton.o
 obj-$(CONFIG_NWFLASH) += nwflash.o
 obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o
-obj-$(CONFIG_FJKEYINFO) += fjkeyinf.o
 
 obj-$(CONFIG_WATCHDOG) += watchdog/
 obj-$(CONFIG_MWAVE) += mwave/
index 803e1c4..edca77d 100644 (file)
@@ -13,7 +13,7 @@
 
 static struct page *alpha_core_agp_vm_nopage(struct vm_area_struct *vma,
                                             unsigned long address,
-                                            int write_access)
+                                            int *type)
 {
        alpha_agp_info *agp = agp_bridge->dev_private_data;
        dma_addr_t dma_addr;
@@ -30,6 +30,8 @@ static struct page *alpha_core_agp_vm_nopage(struct vm_area_struct *vma,
         */
        page = virt_to_page(__va(pa));
        get_page(page);
+       if (type)
+               *type = VM_FAULT_MINOR;
        return page;
 }
 
index 5735ca4..a254018 100644 (file)
 #include "agp.h"
 
 /* Will need to be increased if AMD64 ever goes >8-way. */
+#ifdef CONFIG_SMP
 #define MAX_HAMMER_GARTS   8
+#else
+#define MAX_HAMMER_GARTS   1
+#endif
 
 /* PTE bits. */
 #define GPTE_VALID     1
 #define INVGART                (1<<0)
 #define GARTPTEERR     (1<<1)
 
-/* NVIDIA K8 registers */
-#define NVIDIA_X86_64_0_APBASE         0x10
-#define NVIDIA_X86_64_1_APBASE1                0x50
-#define NVIDIA_X86_64_1_APLIMIT1       0x54
-#define NVIDIA_X86_64_1_APSIZE         0xa8
-#define NVIDIA_X86_64_1_APBASE2                0xd8
-#define NVIDIA_X86_64_1_APLIMIT2       0xdc
-
 static int nr_garts;
 static struct pci_dev * hammers[MAX_HAMMER_GARTS];
 
@@ -283,7 +279,7 @@ static int __devinit aperture_valid(u64 aper, u32 size)
 
           Maybe better to use pci_assign_resource/pci_enable_device instead trusting
           the bridges? */
-       if (!aperture_resource && 
+       if (!aperture_resource &&
            !(aperture_resource = request_mem_region(aper, size, "aperture"))) {
                printk(KERN_ERR PFX "Aperture conflicts with PCI mapping.\n"); 
                return 0;
@@ -350,124 +346,38 @@ static __devinit int cache_nbs (struct pci_dev *pdev, u32 cap_ptr)
        /* cache pci_devs of northbridges. */
        while ((loop_dev = pci_find_device(PCI_VENDOR_ID_AMD, 0x1103, loop_dev)) 
                        != NULL) {
-               if (i == MAX_HAMMER_GARTS) { 
-                       printk(KERN_ERR PFX "Too many northbridges for AGP\n");
-                       return -1;
-               }
                if (fix_northbridge(loop_dev, pdev, cap_ptr) < 0) { 
-                       printk(KERN_ERR PFX "No usable aperture found.\n");
+                       printk(KERN_INFO PFX "No usable aperture found.\n");
 #ifdef __x86_64__ 
                        /* should port this to i386 */
-                       printk(KERN_ERR PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n");
+                       printk(KERN_INFO PFX "Consider rebooting with iommu=memaper=2 to get a good aperture.\n");
 #endif 
                        return -1;  
                }
                hammers[i++] = loop_dev;
-       }
                nr_garts = i;
-       return i == 0 ? -1 : 0;
-}
-
-/* Handle AMD 8151 quirks */
-static void __devinit amd8151_init(struct pci_dev *pdev, struct agp_bridge_data *bridge)
-
-{              
-       char *revstring;
-       u8 rev_id;
-
-       pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
-       switch (rev_id) {
-       case 0x01: revstring="A0"; break;
-       case 0x02: revstring="A1"; break;
-       case 0x11: revstring="B0"; break;
-       case 0x12: revstring="B1"; break;
-       case 0x13: revstring="B2"; break;
-       default:   revstring="??"; break;
+#ifdef CONFIG_SMP
+               if (i > MAX_HAMMER_GARTS) { 
+                       printk(KERN_INFO PFX "Too many northbridges for AGP\n");
+                       return -1;
                }
-
-       printk (KERN_INFO PFX "Detected AMD 8151 AGP Bridge rev %s\n", revstring);
-
-       /*
-        * Work around errata.
-        * Chips before B2 stepping incorrectly reporting v3.5
-        */
-       if (rev_id < 0x13) {
-               printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n");
-               bridge->major_version = 3;
-               bridge->minor_version = 0;
-       }
-}
-
-static struct aper_size_info_32 nforce3_sizes[5] =
-{
-       {512,  131072, 7, 0x00000000 },
-       {256,  65536,  6, 0x00000008 },
-       {128,  32768,  5, 0x0000000C },
-       {64,   16384,  4, 0x0000000E },
-       {32,   8192,   3, 0x0000000F }
-};
-
-/* Handle shadow device of the Nvidia NForce3 */
-/* CHECK-ME original 2.4 version set up some IORRs. Check if that is needed. */
-static int __devinit nforce3_agp_init(struct pci_dev *pdev) 
-{ 
-       u32 tmp, apbase, apbar, aplimit;
-       struct pci_dev *dev1; 
-       int i;
-       unsigned size = amd64_fetch_size(); 
-
-       printk(KERN_INFO PFX "Setting up Nforce3 AGP.\n");
-
-       dev1 = pci_find_slot((unsigned int)pdev->bus->number, PCI_DEVFN(11, 0));
-       if (dev1 == NULL) {
-               printk(KERN_INFO PFX "agpgart: Detected an NVIDIA "
-                       "nForce3 chipset, but could not find "
-                       "the secondary device.\n");
-               return -ENODEV;
-       }       
-
-       for (i = 0; i < ARRAY_SIZE(nforce3_sizes); i++) 
-               if (nforce3_sizes[i].size == size)
-                       break; 
-
-       if (i == ARRAY_SIZE(nforce3_sizes)) {
-               printk(KERN_INFO PFX "No NForce3 size found for %d\n", size); 
-               return -ENODEV; 
+#else
+               /* Uniprocessor case, return after finding first bridge.
+                  (There may be more, but in UP, we don't care). */
+               return 0;
+#endif
        }
-       
-       pci_read_config_dword(dev1, NVIDIA_X86_64_1_APSIZE, &tmp);
-       tmp &= ~(0xf);
-       tmp |= nforce3_sizes[i].size_value;
-       pci_write_config_dword(dev1, NVIDIA_X86_64_1_APSIZE, tmp);
-
-       /* shadow x86-64 registers into NVIDIA registers */
-       pci_read_config_dword (hammers[0], AMD64_GARTAPERTUREBASE, &apbase);
 
-       /* if x86-64 aperture base is beyond 4G, exit here */
-       if ( (apbase & 0x7fff) >> (32 - 25) )
-                return -ENODEV;
-
-       apbase = (apbase & 0x7fff) << 25;
-
-       pci_read_config_dword(pdev, NVIDIA_X86_64_0_APBASE, &apbar);
-       apbar &= ~PCI_BASE_ADDRESS_MEM_MASK;
-       apbar |= apbase;
-       pci_write_config_dword(pdev, NVIDIA_X86_64_0_APBASE, apbar);
-
-       aplimit = apbase + (size * 1024 * 1024) - 1;
-       pci_write_config_dword(dev1, NVIDIA_X86_64_1_APBASE1, apbase);
-       pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT1, aplimit);
-       pci_write_config_dword(dev1, NVIDIA_X86_64_1_APBASE2, apbase);
-       pci_write_config_dword(dev1, NVIDIA_X86_64_1_APLIMIT2, aplimit);
-
-       return 0;
+       return i == 0 ? -1 : 0;
 }
 
 static int __devinit agp_amd64_probe(struct pci_dev *pdev,
                                     const struct pci_device_id *ent)
 {
        struct agp_bridge_data *bridge;
+       u8 rev_id;
        u8 cap_ptr;
+       char *revstring=NULL;
 
        cap_ptr = pci_find_capability(pdev, PCI_CAP_ID_AGP);
        if (!cap_ptr)
@@ -481,7 +391,32 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev,
 
        if (pdev->vendor == PCI_VENDOR_ID_AMD &&
            pdev->device == PCI_DEVICE_ID_AMD_8151_0) {
-               amd8151_init(pdev, bridge);
+
+               pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
+               switch (rev_id) {
+               case 0x01:      revstring="A0";
+                               break;
+               case 0x02:      revstring="A1";
+                               break;
+               case 0x11:      revstring="B0";
+                               break;
+               case 0x12:      revstring="B1";
+                               break;
+               case 0x13:      revstring="B2";
+                               break;
+               default:        revstring="??";
+                               break;
+               }
+               printk (KERN_INFO PFX "Detected AMD 8151 AGP Bridge rev %s\n", revstring);
+               /*
+                * Work around errata.
+                * Chips before B2 stepping incorrectly reporting v3.5
+                */
+               if (rev_id < 0x13) {
+                       printk (KERN_INFO PFX "Correcting AGP revision (reports 3.5, is really 3.0)\n");
+                       bridge->major_version = 3;
+                       bridge->minor_version = 0;
+               }
        } else {
                printk(KERN_INFO PFX "Detected AGP bridge %x\n",
                        pdev->devfn);
@@ -499,14 +434,6 @@ static int __devinit agp_amd64_probe(struct pci_dev *pdev,
                return -ENODEV;
        }
 
-       if (pdev->vendor == PCI_VENDOR_ID_NVIDIA) { 
-               int ret = nforce3_agp_init(pdev);
-               if (ret) { 
-                       agp_put_bridge(bridge); 
-                       return ret;
-               }
-       }
-
        pci_set_drvdata(pdev, bridge);
        return agp_add_bridge(bridge);
 }
@@ -551,25 +478,8 @@ static struct pci_device_id agp_amd64_pci_table[] = {
        {
        .class          = (PCI_CLASS_BRIDGE_HOST << 8),
        .class_mask     = ~0,
-       .vendor         = PCI_VENDOR_ID_VIA,
-       .device         = PCI_DEVICE_ID_VIA_8380_0,
-       .subvendor      = PCI_ANY_ID,
-       .subdevice      = PCI_ANY_ID,
-       },
-       /* NForce3 */
-       {
-       .class          = (PCI_CLASS_BRIDGE_HOST << 8),
-       .class_mask     = ~0,
-       .vendor         = PCI_VENDOR_ID_NVIDIA,
-       .device         = PCI_DEVICE_ID_NVIDIA_NFORCE3,
-       .subvendor      = PCI_ANY_ID,
-       .subdevice      = PCI_ANY_ID,
-       },
-       {
-       .class          = (PCI_CLASS_BRIDGE_HOST << 8),
-       .class_mask     = ~0,
-       .vendor         = PCI_VENDOR_ID_NVIDIA,
-       .device         = PCI_DEVICE_ID_NVIDIA_NFORCE3S,
+       .vendor         = PCI_VENDOR_ID_SI,
+       .device         = PCI_DEVICE_ID_SI_755,
        .subvendor      = PCI_ANY_ID,
        .subdevice      = PCI_ANY_ID,
        },
@@ -626,7 +536,7 @@ int __init agp_amd64_init(void)
 
 static void __exit agp_amd64_cleanup(void)
 {
-       if (aperture_resource) 
+       if (aperture_resource)
                release_resource(aperture_resource);
        pci_unregister_driver(&agp_amd64_pci_driver);
 }
index 41888c3..44ff29d 100644 (file)
@@ -180,7 +180,8 @@ struct agp_memory *agp_allocate_memory(size_t page_count, u32 type)
                        agp_free_memory(new);
                        return NULL;
                }
-               new->memory[i] = virt_to_phys(addr);
+               new->memory[i] =
+                       agp_bridge->driver->mask_memory(virt_to_phys(addr), type);
                new->page_count++;
        }
 
@@ -561,9 +562,6 @@ void agp_generic_enable(u32 mode)
        command = agp_collect_device_status(mode, command);
        command |= AGPSTAT_AGP_ENABLE;
 
-       pci_write_config_dword(agp_bridge->dev,
-                      agp_bridge->capndx + PCI_AGP_COMMAND, command);
-
        /* Do AGP version specific frobbing. */
        if(agp_bridge->major_version >= 3) {
                pci_read_config_dword(agp_bridge->dev,
index ba8ff10..462ce2f 100644 (file)
@@ -204,7 +204,7 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t pg_count, int type)
        if (new == NULL)
                return NULL;
 
-       new->memory[0] = virt_to_phys(addr);
+       new->memory[0] = agp_bridge->driver->mask_memory(virt_to_phys(addr), type);
        new->page_count = 1;
        new->num_scratch_pages = 1;
        new->type = AGP_PHYS_MEMORY;
index c934e62..679f747 100644 (file)
@@ -46,10 +46,54 @@ static int nvidia_fetch_size(void)
        return 0;
 }
 
+#define SYSCFG          0xC0010010
+#define IORR_BASE0      0xC0010016
+#define IORR_MASK0      0xC0010017
+#define AMD_K7_NUM_IORR 2
+
+static int nvidia_init_iorr(u32 base, u32 size)
+{
+       u32 base_hi, base_lo;
+       u32 mask_hi, mask_lo;
+       u32 sys_hi, sys_lo;
+       u32 iorr_addr, free_iorr_addr;
+
+       /* Find the iorr that is already used for the base */
+       /* If not found, determine the uppermost available iorr */
+       free_iorr_addr = AMD_K7_NUM_IORR;
+       for(iorr_addr = 0; iorr_addr < AMD_K7_NUM_IORR; iorr_addr++) {
+               rdmsr(IORR_BASE0 + 2 * iorr_addr, base_lo, base_hi);
+               rdmsr(IORR_MASK0 + 2 * iorr_addr, mask_lo, mask_hi);
+
+               if ((base_lo & 0xfffff000) == (base & 0xfffff000))
+                       break;
+
+               if ((mask_lo & 0x00000800) == 0)
+                       free_iorr_addr = iorr_addr;
+       }
+       
+       if (iorr_addr >= AMD_K7_NUM_IORR) {
+               iorr_addr = free_iorr_addr;
+               if (iorr_addr >= AMD_K7_NUM_IORR)
+                       return -EINVAL;
+       }
+    base_hi = 0x0;
+    base_lo = (base & ~0xfff) | 0x18;
+    mask_hi = 0xf;
+    mask_lo = ((~(size - 1)) & 0xfffff000) | 0x800;
+    wrmsr(IORR_BASE0 + 2 * iorr_addr, base_lo, base_hi);
+    wrmsr(IORR_MASK0 + 2 * iorr_addr, mask_lo, mask_hi);
+
+    rdmsr(SYSCFG, sys_lo, sys_hi);
+    sys_lo |= 0x00100000;
+    wrmsr(SYSCFG, sys_lo, sys_hi);
+
+       return 0;
+}
 
 static int nvidia_configure(void)
 {
-       int i, num_dirs;
+       int i, rc, num_dirs;
        u32 apbase, aplimit;
        struct aper_size_info_8 *current_size;
        u32 temp;
@@ -69,6 +113,8 @@ static int nvidia_configure(void)
        pci_write_config_dword(nvidia_private.dev_2, NVIDIA_2_APLIMIT, aplimit);
        pci_write_config_dword(nvidia_private.dev_3, NVIDIA_3_APBASE, apbase);
        pci_write_config_dword(nvidia_private.dev_3, NVIDIA_3_APLIMIT, aplimit);
+       if (0 != (rc = nvidia_init_iorr(apbase, current_size->size * 1024 * 1024)))
+               return rc;
 
        /* directory size is 64k */
        num_dirs = current_size->size / 64;
@@ -122,6 +168,10 @@ static void nvidia_cleanup(void)
        previous_size = A_SIZE_8(agp_bridge->previous_size);
        pci_write_config_byte(agp_bridge->dev, NVIDIA_0_APSIZE,
                previous_size->size_value);
+
+       /* restore iorr for previous aperture size */
+       nvidia_init_iorr(agp_bridge->gart_bus_addr,
+               previous_size->size * 1024 * 1024);
 }
 
 
index 087ad5d..c7ec130 100644 (file)
@@ -64,9 +64,10 @@ config DRM_I830
          module will be called i830.  AGP support is required for this driver
          to work.
 
+
 config DRM_MGA
        tristate "Matrox g200/g400"
-       depends on DRM && AGP && (!X86_64 || BROKEN) 
+       depends on DRM && AGP
        help
          Choose this option if you have a Matrox G200, G400 or G450 graphics
          card.  If M is selected, the module will be called mga.  AGP
index 744104f..0de4d09 100644 (file)
@@ -757,16 +757,16 @@ extern int             DRM(fasync)(int fd, struct file *filp, int on);
                                /* Mapping support (drm_vm.h) */
 extern struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
                                   unsigned long address,
-                                  int write_access);
+                                  int *type);
 extern struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
                                       unsigned long address,
-                                      int write_access);
+                                      int *type);
 extern struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
                                       unsigned long address,
-                                      int write_access);
+                                      int *type);
 extern struct page *DRM(vm_sg_nopage)(struct vm_area_struct *vma,
                                      unsigned long address,
-                                     int write_access);
+                                     int *type);
 extern void         DRM(vm_open)(struct vm_area_struct *vma);
 extern void         DRM(vm_close)(struct vm_area_struct *vma);
 extern void         DRM(vm_shm_close)(struct vm_area_struct *vma);
index 1c84dca..cf64166 100644 (file)
@@ -76,7 +76,7 @@ struct vm_operations_struct   DRM(vm_sg_ops) = {
  */
 struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
                            unsigned long address,
-                           int write_access)
+                           int *type)
 {
 #if __REALLY_HAVE_AGP
        drm_file_t *priv  = vma->vm_file->private_data;
@@ -133,6 +133,8 @@ struct page *DRM(vm_nopage)(struct vm_area_struct *vma,
                          baddr, __va(agpmem->memory->memory[offset]), offset,
                          atomic_read(&page->count));
 
+               if (type)
+                       *type = VM_FAULT_MINOR;
                return page;
         }
 vm_nopage_error:
@@ -154,7 +156,7 @@ vm_nopage_error:
  */
 struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
                                unsigned long address,
-                               int write_access)
+                               int *type)
 {
        drm_map_t        *map    = (drm_map_t *)vma->vm_private_data;
        unsigned long    offset;
@@ -170,6 +172,8 @@ struct page *DRM(vm_shm_nopage)(struct vm_area_struct *vma,
        if (!page)
                return NOPAGE_OOM;
        get_page(page);
+       if (type)
+               *type = VM_FAULT_MINOR;
 
        DRM_DEBUG("shm_nopage 0x%lx\n", address);
        return page;
@@ -268,7 +272,7 @@ void DRM(vm_shm_close)(struct vm_area_struct *vma)
  */
 struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
                                unsigned long address,
-                               int write_access)
+                               int *type)
 {
        drm_file_t       *priv   = vma->vm_file->private_data;
        drm_device_t     *dev    = priv->dev;
@@ -287,6 +291,8 @@ struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
                             (offset & (~PAGE_MASK))));
 
        get_page(page);
+       if (type)
+               *type = VM_FAULT_MINOR;
 
        DRM_DEBUG("dma_nopage 0x%lx (page %lu)\n", address, page_nr);
        return page;
@@ -304,7 +310,7 @@ struct page *DRM(vm_dma_nopage)(struct vm_area_struct *vma,
  */
 struct page *DRM(vm_sg_nopage)(struct vm_area_struct *vma,
                               unsigned long address,
-                              int write_access)
+                              int *type)
 {
        drm_map_t        *map    = (drm_map_t *)vma->vm_private_data;
        drm_file_t *priv = vma->vm_file->private_data;
@@ -325,6 +331,8 @@ struct page *DRM(vm_sg_nopage)(struct vm_area_struct *vma,
        page_offset = (offset >> PAGE_SHIFT) + (map_offset >> PAGE_SHIFT);
        page = entry->pagelist[page_offset];
        get_page(page);
+       if (type)
+               *type = VM_FAULT_MINOR;
 
        return page;
 }
diff --git a/drivers/char/fjkeyinf.c b/drivers/char/fjkeyinf.c
deleted file mode 100644 (file)
index efb131a..0000000
+++ /dev/null
@@ -1,590 +0,0 @@
-/*
-    SMBus client for the Fujitsu Siemens Lifebook C-6535 Application Panel
-    
-    Copyright (C) 2001 Jochen Eisinger <jochen.eisinger@gmx.net>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/ctype.h>
-#include <linux/slab.h>
-#include <linux/fs.h>
-#include <linux/ioport.h>
-#include <linux/types.h>
-#include <linux/mm.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
-#include <linux/i2c.h>
-#include <linux/i2c-id.h>
-#include <linux/miscdevice.h>
-
-/* Pulled what was needed from the userspace apanel.h file here */
-/* Make sure they match what the userspace tools were build against */
-
-/* Describes to which subsystem the ioctl applies. 'P' for proprietary? */
-#define APANEL_IOCTL_GROUP      'P'
-
-
-
-/*
- * Use one ioctl for all devices
- * This has the advantage that one interface is defined
- * for all devices. The caps can tell what is possible on
- * a certain device (with some defaults for each device
- * of course which the programmer doesn't have to check
- * explicitly like on/off for led and read for buttons).
- */
-
-struct apanelcmd {
-       int device;           /* Device to operate command on (APANEL_DEV_GEN_*) */
-       int cmd;              /* Command to execute (APANEL_CMD_*) */
-       int data;             /* Data for command */
-};
-
-
-struct fj_device {
-       __u8    type;
-       __u8    access_method;
-       __u8    chip_type;
-       __u8    number;
-} __attribute__((packed));
-
-#define DEVICE_APPLICATION_BUTTONS     1
-#define DEVICE_CD_BUTTONS              2
-#define DEVICE_LCD                     3
-#define DEVICE_LED_1                   4
-#define DEVICE_LED_2                   6
-#define DEVICE_APPLICATION_3_BUTTONS   7
-
-
-#define IOCTL_APANEL_CMD        _IOR(APANEL_IOCTL_GROUP,202,struct apanelcmd)
-
-
-/* Devices */
-#define APANEL_DEV_LED          1
-#define APANEL_DEV_LCD          2
-#define APANEL_DEV_CDBTN        3
-#define APANEL_DEV_APPBTN       4
-
-/*
- * Commands
- */
-
-/* Device capabilities */
-#define APANEL_CAP_ONOFF        1       /* Turn on/off */
-#define APANEL_CAP_GET          2       /* General get command */
-#define APANEL_CAP_SET          4       /* General set command */
-#define APANEL_CAP_BLINK        8       /* Blinking */
-#define APANEL_CAP_DUTY         0x10    /* Duty cycle of blinking */
-#define APANEL_CAP_RESET        0x20    /* Reset device */
-#define APANEL_CAP_MAX          0x40    /* Get highest possible value for */
-                                        /* set/get */
-#define APANEL_CAP_MIN          0x80    /* Get lowest possible value */
-#define APANEL_CMD_ONOFF        2
-#define APANEL_ONOFF_ON         1       /* Or is APANEL_ON nicer? */
-#define APANEL_ONOFF_OFF        0
-
-#define APANEL_CMD_SET          3
-#define APANEL_CMD_GET          4
-
-#define APANEL_CMD_BLINK        5       /* data=Blink frequency *0.01Hz or so */
-#define APANEL_CMD_DUTY         6       /* data=percentage high */
-
-#define APANEL_CMD_RESET        7       /* If this is useful at all */
-
-#define APANEL_CMD_MAX          8
-#define APANEL_CMD_MIN          9
-
-/*
- * Button masks
- */
-/* Masks for application buttons */
-#define APANEL_APPBTN_A         1
-#define APANEL_APPBTN_B         2
-#define APANEL_APPBTN_INTERNET  4
-#define APANEL_APPBTN_EMAIL     8
-
-/* Masks for cd buttons */
-#define APANEL_CDBTN_STOP       1
-#define APANEL_CDBTN_EJECT      2
-#define APANEL_CDBTN_PLAY       4
-#define APANEL_CDBTN_PAUSE      8
-#define APANEL_CDBTN_BACK       0x10
-#define APANEL_CDBTN_FORW       0x20
-
-
-
-/* print lots of useless debug infos */
-#define DEBUG
-
-#define MY_NAME        "fjkeyinf"
-
-#define dbg(format, arg...)                                    \
-       do {                                                    \
-               if (debug)                                      \
-                       printk(KERN_DEBUG "%s: " format,        \
-                               MY_NAME , ## arg);              \
-       } while (0)
-
-static int debug = 1;
-
-/*
- * this is the internal driver version number. There is no direct relationship
- * between the hardware, the apanel protocol, or the driver versions
- * However, this version number should be increased for every change
- */
-/* current driver version */
-#define FJKEYINF_VERSION_MAJOR 0
-#define FJKEYINF_VERSION_MINOR 4
-
-/*
- * This is the apanel version this driver implements. This _must_ be the
- * same as your apanel.h file
- */
-/* protocol version */
-#define FJKEYINF_APANEL_MAJOR  1
-#define FJKEYINF_APANEL_MINOR  0
-
-/*
- * Some real leet m4cr0s
- */
-#define STRINGIFY1(x)  #x
-#define STRINGIFY(x)   STRINGIFY1(x)
-
-#define PASTE1(x,y)    x##y
-#define PASTE(x,y)     PASTE1(x,y)
-
-/*
- * This is the version of the driver as a string
- */
-#define FJKEYINF_VERSION_STRING        PASTE("v",                              \
-                               PASTE(STRINGIFY(FJKEYINF_VERSION_MAJOR),\
-                               PASTE(".",STRINGIFY(FJKEYINF_VERSION_MINOR))))
-
-/*
- * This is the version of the protocol as a string
- */
-#define FJKEYINF_APANEL_VERSION_STRING PASTE("v",                      \
-                                       PASTE(STRINGIFY(FJKEYINF_APANEL_MAJOR),\
-                                       PASTE(".",                      \
-                                       STRINGIFY(FJKEYINF_APANEL_MINOR))))
-
-/* 
- * every i2c device has to register to the i2c sub-system. Therefor it needs
- * a driver id. We should be I2C_DRIVERID_FJKEYINF. However, if this isn't
- * defined in i2c-id.h, we'll use a generic id.
- */
-#ifndef I2C_DRIVERID_FJKEYINF
-#define I2C_DRIVERID_FJKEYINF  0xF000
-#endif
-
-/*
- * Yes, it's unbelievable, but me crappy driver has an official devices
- * entry. It's register as a misc-device (char-major-10) minor 216. The
- * location should be /dev/fujitsu/apanel... after all, it seems to be
- * a quite c00l driver ;>
- */
-#define FJKEYINF_CHAR_MINOR    216
-
-/*
- * Modules can store nice extra infos...
- */
-MODULE_AUTHOR("Jochen Eisinger <jochen.eisinger@gmx.net>");
-MODULE_DESCRIPTION("Application Panel driver for Lifebook C-series");
-MODULE_LICENSE("GPL");
-
-/*
- * So, let's start the hackin'
- *
- * we first define the interface for the i2c driver, cuz the misc device
- * part uses the struct fjkeyinf_client. also note that this struct is
- * static where it would be better to dynamically allocate one... but what
- * fsck, more than one apanel your crappy laptop won't have...
- */
-
-/* definitions for i2c (smbus) interface */
-
-/* forward declaration of the interface procedures */
-
-/* detach removes the smbus driver from the system */
-       static int fjkeyinf_detach(struct i2c_client *client);
-/* attach tries to attach to a given smbus */
-       static int fjkeyinf_attach(struct i2c_adapter *adap);
-
-/* this structur defines the interface to the i2c sub-system */
-static struct i2c_driver fjkeyinf_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "fujitsu_panel" /* FJKEYINF_VERSION_STRING */,
-       .id             = I2C_DRIVERID_FJKEYINF,
-       .flags          = I2C_DF_NOTIFY,
-       .attach_adapter = &fjkeyinf_attach,
-       .detach_client  = &fjkeyinf_detach,
-       .command        = NULL,
-};
-
-
-/* Addresses to scan. afaik the device is at id 0x18. so we only scan this */
-static unsigned short normal_i2c[] = {0x18,I2C_CLIENT_END};
-static unsigned short normal_i2c_range[] = {I2C_CLIENT_END};
-
-/* 
- * generate some stupid additional structures. we don't really care about
- * this
- */
-I2C_CLIENT_INSMOD;
-
-
-/*
- * If we've found the device, we have to provide an i2c_client structure
- * to the i2c subsystem with which this devices can be accessed. as I stated
- * above, there's max. 1 device, so I use _one static_ entry
- */
-static struct i2c_client fjkeyinf_client = 
-{
-       .id =           -1,
-       .flags =        0,
-       .addr =         0,
-       .adapter =      NULL,
-       .driver =       &fjkeyinf_driver,
-       .name =         "fjkeyinf",
-};
-
-
-/*
- * luckily, the c-series laptops have a configuration block in there BIOS.
- * so we can use it to detect the presence of the apanel device. There's
- * also a checksum somewhere, but we don't care about it.
- *
- * Note the first 8 characters. that's where this strange driver name comes
- * from.
- *
- * The configuration block can be found at 0x000FFA30
- *
- * There should also be an access method 3, but I don't know much about it.
- * Basically there should also be an LCD device. but my notebook hasn't one
- * so I don't know what the configuration block looks like
- *
- * type 1 is LED type 4 ist BUTTONS, probably 2 is LCD.
- */
-static const unsigned char fjkeyinf_info[16] = {
-       'F', 'J', 'K', 'E', 'Y', 'I', 'N', 'F',
-       /* device 0 */  /* type         */      1,
-                       /* access method*/      1,
-                       /* enabled      */      1,
-                       /* smbus device */      0x30,
-       /* device 1 */  /* type         */      4,
-                       /* access method*/      1,
-                       /* enabled      */      1,
-                       /* smbus device */      0x30};
-
-#define FJKEYINF_INFO_ADDR     0x000FFA30
-#define FJKEYINF_INFO_ADDR     0x000F6f20      /* Address for the P2120 */
-
-/*
- * the following functions implement the ioctls. Note however, that not
- * much is implemented yet.
- */
-
-/* turn a device on or off */
-
-int fjkeyinf_onoff(int dev, int state)
-{
-
-       switch (dev) {
-
-               case APANEL_DEV_LED:
-
-                       if (state) {
-                               dbg("turning LED on...\n");
-
-                               i2c_smbus_write_word_data(&fjkeyinf_client,
-                                              0x10, 0x8080);
-                               i2c_smbus_write_word_data(&fjkeyinf_client,
-                                              0x0f, 0x100);
-                               i2c_smbus_write_word_data(&fjkeyinf_client,
-                                              0x11, 1);
-
-                       } else {
-                               
-                               dbg("turning LED off...\n");
-
-                               i2c_smbus_write_word_data(&fjkeyinf_client,
-                                              0x10, 0);
-                               i2c_smbus_write_word_data(&fjkeyinf_client,
-                                              0x0f, 0x100);
-                               i2c_smbus_write_word_data(&fjkeyinf_client,
-                                              0x11, 0);
-
-
-                       }
-
-                       return state;
-
-               default:
-
-                       printk(KERN_NOTICE
-                               "fjkeyinf: ONOFF called for invalid device"
-                               " (dev %d, state %d)\n", dev, state);
-
-                       return -EINVAL;
-
-       }
-
-}
-
-/* gets the current value from a device */
-int fjkeyinf_get(int dev)
-{
-       switch (dev) {
-               case APANEL_DEV_LED:
-                       return ((i2c_smbus_read_word_data
-                                       (&fjkeyinf_client, 0x00) >> 7) & 1);
-
-               case APANEL_DEV_APPBTN:
-                       {
-                               int state;
-
-                               state = i2c_smbus_read_word_data
-                                       (&fjkeyinf_client, 0x00);
-
-                               state = (state >> 8) & 0x0f;
-
-                               state ^= 0x0f;
-
-                               return (((state & 1) ? APANEL_APPBTN_EMAIL : 0)
-                                       + ((state & 2) ? APANEL_APPBTN_INTERNET : 0)
-                                       + ((state & 4) ? APANEL_APPBTN_A : 0)
-                                       + ((state & 8) ? APANEL_APPBTN_B : 0));
-                       }
-
-               default:
-                       printk(KERN_NOTICE "fjkeyinf: GET called for invalid"
-                                       " device (dev %d)\n", dev);
-                       return -EINVAL;
-       }
-}
-
-
-
-/* 
- * file operations for /dev/fujitsu/apanel
- * 
- * That what the name says: file operation. pretty basic stuff follows
- */
-                       
-/*
- * if somebody opens us, we just realize and let him pass
- */
-static int fjkeyinf_open (struct inode *inode, struct file *filp)
-{
-       dbg("open called for /dev/fujitsu/apanel\n");
-       return 0;
-}
-
-/* same with close */
-static int fjkeyinf_close (struct inode *inode, struct file *filp)
-{
-       dbg("close called for /dev/fujitsu/apanel\n");
-       return 0;
-}
-
-/* all commands are passed using the ioctl interface. so we have to decide
- * here, what we have to do */
-int fjkeyinf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-               unsigned long args)
-{
-       struct apanelcmd *acmd;
-
-       dbg("ioctl (cmd: %u, args: 0x%08lx)\n", cmd, args);
-
-       /* Let's see, what they want from us... */
-       
-       switch (cmd) {
-               case IOCTL_APANEL_CMD:
-                       /* the actual command is passed in a apanelcmd
-                        * structure */
-
-                       if (!(args)) {
-
-                               printk(KERN_NOTICE "fjkeyinf: invalid apanel command "
-                                               "(NULL pointer)\n");
-                               return -EINVAL;
-
-                       }
-
-                       acmd = (struct apanelcmd *)args;
-
-                       /* although not all commands are implemented, we
-                        * understand all... */
-
-                       dbg("apanel command %d\n", acmd->cmd);
-
-
-                       switch (acmd->cmd) {
-                               case APANEL_CMD_ONOFF:
-                                       return fjkeyinf_onoff(acmd->device,
-                                                       acmd->data);
-
-                               case APANEL_CMD_GET:
-                                       return fjkeyinf_get(acmd->device);
-
-                               default:
-                                       printk(KERN_NOTICE "fjkeyinf: unknown "
-                                               "device/command %d/%d\n",
-                                               acmd->device, acmd->cmd);
-                                       return -EINVAL;
-                       }
-
-               default:
-                       printk(KERN_NOTICE "fjkeyinf: unknown ioctl code %u\n", cmd);
-                       return -EINVAL;
-       }
-}
-
-/* now we tell the misc_device what nice functions we've implemented */
-static struct file_operations fjkeyinf_fops = {
-       .owner =        THIS_MODULE,
-       .ioctl =        fjkeyinf_ioctl,
-       .open =         fjkeyinf_open,
-       .release =      fjkeyinf_close,
-};
-
-/* misc dev entry. We need this to register to the misc dev driver */
-static struct miscdevice fjkeyinf_dev = {
-       FJKEYINF_CHAR_MINOR,
-       "apanel",
-       &fjkeyinf_fops
-};
-
-
-/* Now comes the i2c driver stuff. This is pretty straight forward, just as they
- * described it in their docu.
- */
-
-/* basically this function should probe the i2c client, but we know that it has
- * to be the one we're looking for - and I have no idea how I should probe for
- * it, so we just register... */
-static int fjkeyinf_probe(struct i2c_adapter *adap, int addr, int kind)
-{
-       int result;
-        fjkeyinf_client.adapter = adap;
-        fjkeyinf_client.addr = addr;
-
-       dbg("%s\n", __FUNCTION__);
-       if ((result = misc_register(&fjkeyinf_dev)) < 0) {
-               printk(KERN_NOTICE "fjkeyinf: could not register misc device (%d)\n",
-                               result);
-               return result;
-       }
-
-        i2c_attach_client(&fjkeyinf_client);
-
-       printk(KERN_INFO "fjkeyinf: Application Panel Driver "
-                       /*FJKEYINF_VERSION_STRING*/ "\n");
-       printk(KERN_INFO "fjkeyinf: Copyright (c) 2001 by "
-               "Jochen Eisinger <jochen.eisinger@gmx.net>\n");
-
-       
-       dbg("driver loaded at address 0x%02x...\n", addr);
-       
-       return 0;
-}
-
-
-/* this function is invoked, when we should release our resource... */
-static int fjkeyinf_detach(struct i2c_client *client)
-{
-       dbg("driver detached...\n");
-
-       misc_deregister(&fjkeyinf_dev);
-               
-       i2c_detach_client(client);
-       
-       return 0;
-}
-
-/* this function is invoked for every i2c adapter, that has a device at the
- * address we've specified */
-static int fjkeyinf_attach(struct i2c_adapter *adap)
-{
-       dbg("%s\n", __FUNCTION__);
-       return i2c_probe(adap, &addr_data, fjkeyinf_probe);
-}
-
-
-
-/* startup */
-static int __init fjkeyinf_init(void)
-{
-       unsigned char *fujitsu_bios = __va(FJKEYINF_INFO_ADDR);
-//     int ctr;
-       struct fj_device        *dev;
-       
-       if (__pa(high_memory) < (FJKEYINF_INFO_ADDR - 16)) {
-               dbg("Fujitsu BIOS not found...\n");
-               return -ENODEV;
-       }
-
-       dbg("Configuration block [%c%c%c%c%c%c%c%c] "
-               "(%d, %d, %d, 0x%02x) (%d, %d, %d, 0x%02x)\n",
-               fujitsu_bios[0],
-               fujitsu_bios[1],
-               fujitsu_bios[2],
-               fujitsu_bios[3],
-               fujitsu_bios[4],
-               fujitsu_bios[5],
-               fujitsu_bios[6],
-               fujitsu_bios[7],
-               (int)fujitsu_bios[8],
-               (int)fujitsu_bios[9],
-               (int)fujitsu_bios[10],
-               (int)fujitsu_bios[11],
-               (int)fujitsu_bios[12],
-               (int)fujitsu_bios[13],
-               (int)fujitsu_bios[14],
-               (int)fujitsu_bios[15]);
-
-       dev = (struct fj_device *)&fujitsu_bios[8];
-       while (1) {
-               if (dev->type == 0)
-                       break;
-               dbg("type = %d, access_method = %d, chip_type = %d, number = %d\n",
-                   dev->type, dev->access_method, dev->chip_type, dev->number);
-               ++dev;
-       }
-       
-//     for (ctr=0 ; ctr<16 ; ctr++)
-//             if (fujitsu_bios[ctr] != fjkeyinf_info[ctr]) {
-//                     dbg("device not found...\n");
-//                     return -ENODEV;
-//             }
-
-       dbg("device found...\n");
-       
-       i2c_add_driver(&fjkeyinf_driver);
-       return 0;
-}
-
-static void __exit fjkeyinf_exit(void)
-{
-       i2c_del_driver(&fjkeyinf_driver);
-}
-
-module_init(fjkeyinf_init);
-module_exit(fjkeyinf_exit);
-
index 7fdd8f7..b4c683f 100644 (file)
@@ -941,16 +941,16 @@ static unsigned short x86_keycodes[256] =
         32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
         48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
         64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
-        80, 81, 82, 83, 43, 85, 86, 87, 88,115,119,120,121,375,123, 90,
-       284,285,309,298,312, 91,327,328,329,331,333,335,336,337,338,339,
-       367,288,302,304,350, 92,334,512,116,377,109,111,373,347,348,349,
-       360, 93, 94, 95, 98,376,100,101,321,316,354,286,289,102,351,355,
+        80, 81, 82, 83, 84, 93, 86, 87, 88, 94, 95, 85,259,375,260, 90,
+       284,285,309,311,312, 91,327,328,329,331,333,335,336,337,338,339,
+       367,288,302,304,350, 89,334,326,116,377,109,111,126,347,348,349,
+       360,261,262,263,298,376,100,101,321,316,373,286,289,102,351,355,
        103,104,105,275,287,279,306,106,274,107,294,364,358,363,362,361,
-       291,108,381,281,290,272,292,305,280, 99,112,257,258,359,270,114,
-       118,117,125,374,379,115,112,125,121,123,264,265,266,267,268,269,
-       271,273,276,277,278,282,283,295,296,297,299,300,301,293,303,307,
-       308,310,313,314,315,317,318,319,320,357,322,323,324,325,326,330,
-       332,340,365,342,343,344,345,346,356,113,341,368,369,370,371,372 };
+       291,108,381,281,290,272,292,305,280, 99,112,257,258,359,113,114,
+       264,117,271,374,379,115,125,273,121,123, 92,265,266,267,268,269,
+       120,119,118,277,278,282,283,295,296,297,299,300,301,293,303,307,
+       308,310,313,314,315,317,318,319,320,357,322,323,324,325,276,330,
+       332,340,365,342,343,344,345,346,356,270,341,368,369,370,371,372 };
 
 #ifdef CONFIG_MAC_EMUMOUSEBTN
 extern int mac_hid_mouse_emulate_buttons(int, int, int);
@@ -972,11 +972,18 @@ static int emulate_raw(struct vc_data *vc, unsigned int keycode,
        if (keycode > 255 || !x86_keycodes[keycode])
                return -1; 
 
-       if (keycode == KEY_PAUSE) {
-               put_queue(vc, 0xe1);
-               put_queue(vc, 0x1d | up_flag);
-               put_queue(vc, 0x45 | up_flag);
-               return 0;
+       switch (keycode) {
+               case KEY_PAUSE:
+                       put_queue(vc, 0xe1);
+                       put_queue(vc, 0x1d | up_flag);
+                       put_queue(vc, 0x45 | up_flag);
+                       return 0;
+               case KEY_LANG1:
+                       if (!up_flag) put_queue(vc, 0xf1);
+                       return 0;
+               case KEY_LANG2:
+                       if (!up_flag) put_queue(vc, 0xf2);
+                       return 0;
        } 
 
        if (keycode == KEY_SYSRQ && sysrq_alt) {
@@ -1045,14 +1052,6 @@ void kbd_keycode(unsigned int keycode, int down, struct pt_regs *regs)
                        if (keycode < BTN_MISC)
                                printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode);
 
-#ifdef CONFIG_BOOTSPLASH
-       /* This code has to be redone for some non-x86 platforms */
-       if (down == 1 && (keycode == 0x3c || keycode == 0x01)) {        /* F2 and ESC on PC keyboard */
-               extern int splash_verbose(void);
-               if (splash_verbose())
-                       return;
-       }
-#endif
 #ifdef CONFIG_MAGIC_SYSRQ             /* Handle the SysRq Hack */
        if (keycode == KEY_SYSRQ && (sysrq_down || (down == 1 && sysrq_alt))) {
                sysrq_down = down;
index e64b538..ef9608d 100644 (file)
@@ -24,7 +24,6 @@
 #include <linux/smp_lock.h>
 #include <linux/devfs_fs_kernel.h>
 #include <linux/ptrace.h>
-#include <linux/device.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -658,7 +657,7 @@ static struct file_operations memory_fops = {
        .open           = memory_open,  /* just a selector for the real open */
 };
 
-static const struct mem_dev {
+static const struct {
        unsigned int            minor;
        char                    *name;
        umode_t                 mode;
@@ -677,23 +676,6 @@ static const struct mem_dev {
        {11,"kmsg",    S_IRUGO | S_IWUSR,           &kmsg_fops},
 };
 
-static void release_mem_dev(struct class_device *class_dev)
-{
-       kfree(class_dev);
-}
-
-static struct class mem_class = {
-       .name           = "mem",
-       .release        = &release_mem_dev,
-};
-
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
-       struct mem_dev *mem_dev = class_get_devdata(class_dev);
-       return print_dev_t(buf, MKDEV(MEM_MAJOR, mem_dev->minor));
-}
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-
 static int __init chr_dev_init(void)
 {
        int i;
@@ -701,20 +683,7 @@ static int __init chr_dev_init(void)
        if (register_chrdev(MEM_MAJOR,"mem",&memory_fops))
                printk("unable to get major %d for memory devs\n", MEM_MAJOR);
 
-       class_register(&mem_class);
        for (i = 0; i < ARRAY_SIZE(devlist); i++) {
-               struct class_device *class_dev;
-
-               class_dev = kmalloc(sizeof(*class_dev), GFP_KERNEL);
-               if (class_dev) {
-                       memset(class_dev, 0x00, sizeof(*class_dev));
-                       class_dev->class = &mem_class;
-                       strncpy(class_dev->class_id, devlist[i].name, BUS_ID_SIZE);
-                       class_set_devdata(class_dev, (void *)&devlist[i]);
-                       if (!class_device_register(class_dev));
-                               class_device_create_file(class_dev, &class_device_attr_dev);
-               }
-
                devfs_mk_cdev(MKDEV(MEM_MAJOR, devlist[i].minor),
                                S_IFCHR | devlist[i].mode, devlist[i].name);
        }
index 755483f..a250243 100644 (file)
@@ -47,7 +47,7 @@
 #include <linux/devfs_fs_kernel.h>
 #include <linux/stat.h>
 #include <linux/init.h>
-#include <linux/device.h>
+
 #include <linux/tty.h>
 #include <linux/kmod.h>
 
@@ -180,91 +180,6 @@ fail:
        return err;
 }
 
-/* Misc class implementation */
-
-/* 
- * TODO for 2.7:
- *  - add a struct class_device to struct miscdevice and make all usages of
- *    them dynamic.  This will let us get rid of struct misc_dev below.
- */
-struct misc_dev {
-       struct list_head node;
-       dev_t dev;
-       struct class_device class_dev;
-};
-#define to_misc_dev(d) container_of(d, struct misc_dev, class_dev)
-
-static LIST_HEAD(misc_dev_list);
-static spinlock_t misc_dev_list_lock = SPIN_LOCK_UNLOCKED;
-
-static void release_misc_dev(struct class_device *class_dev)
-{
-       struct misc_dev *misc_dev = to_misc_dev(class_dev);
-       kfree(misc_dev);
-}
-
-static struct class misc_class = {
-       .name           = "misc",
-       .release        = &release_misc_dev,
-};
-
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
-       struct misc_dev *misc_dev = to_misc_dev(class_dev);
-       return print_dev_t(buf, misc_dev->dev);
-}
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-
-static void misc_add_class_device(struct miscdevice *misc)
-{
-       struct misc_dev *misc_dev = NULL;
-       int retval;
-
-       misc_dev = kmalloc(sizeof(*misc_dev), GFP_KERNEL);
-       if (!misc_dev)
-               return;
-       memset(misc_dev, 0x00, sizeof(*misc_dev));
-
-       misc_dev->dev = MKDEV(MISC_MAJOR, misc->minor);
-       misc_dev->class_dev.dev = misc->dev;
-       misc_dev->class_dev.class = &misc_class;
-       snprintf(misc_dev->class_dev.class_id, BUS_ID_SIZE, "%s", misc->name);
-       retval = class_device_register(&misc_dev->class_dev);
-       if (retval)
-               goto error;
-       class_device_create_file(&misc_dev->class_dev, &class_device_attr_dev);
-       spin_lock(&misc_dev_list_lock);
-       list_add(&misc_dev->node, &misc_dev_list);
-       spin_unlock(&misc_dev_list_lock);
-       return;
-error:
-       kfree(misc_dev);
-}
-
-static void misc_remove_class_device(struct miscdevice *misc)
-{
-       struct misc_dev *misc_dev = NULL;
-       struct list_head *tmp;
-       int found = 0;
-
-       spin_lock(&misc_dev_list_lock);
-       list_for_each(tmp, &misc_dev_list) {
-               misc_dev = list_entry(tmp, struct misc_dev, node);
-               if ((MINOR(misc_dev->dev) == misc->minor)) {
-                       found = 1;
-                       break;
-               }
-       }
-       if (found) {
-               list_del(&misc_dev->node);
-               spin_unlock(&misc_dev_list_lock);
-               class_device_unregister(&misc_dev->class_dev);
-       } else {
-               spin_unlock(&misc_dev_list_lock);
-       }
-}
-
-
 static struct file_operations misc_fops = {
        .owner          = THIS_MODULE,
        .open           = misc_open,
@@ -321,7 +236,6 @@ int misc_register(struct miscdevice * misc)
 
        devfs_mk_cdev(MKDEV(MISC_MAJOR, misc->minor),
                        S_IFCHR|S_IRUSR|S_IWUSR|S_IRGRP, misc->devfs_name);
-       misc_add_class_device(misc);
 
        /*
         * Add it to the front, so that later devices can "override"
@@ -351,7 +265,6 @@ int misc_deregister(struct miscdevice * misc)
 
        down(&misc_sem);
        list_del(&misc->list);
-       misc_remove_class_device(misc);
        devfs_remove(misc->devfs_name);
        if (i < DYNAMIC_MINORS && i>0) {
                misc_minors[i>>3] &= ~(1 << (misc->minor & 7));
@@ -372,7 +285,6 @@ static int __init misc_init(void)
        if (ent)
                ent->proc_fops = &misc_proc_fops;
 #endif
-       class_register(&misc_class);
 #ifdef CONFIG_MVME16x
        rtc_MK48T08_init();
 #endif
@@ -407,4 +319,4 @@ static int __init misc_init(void)
        }
        return 0;
 }
-subsys_initcall(misc_init);
+module_init(misc_init);
index 235246f..44d551b 100644 (file)
@@ -969,16 +969,6 @@ do_it_again:
                return -EIO;
        }
 
-#ifdef CONFIG_BOOTSPLASH
-        if (file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,0) ||
-            file->f_dentry->d_inode->i_rdev == MKDEV(TTY_MAJOR,1) ||
-            file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,0) ||
-            file->f_dentry->d_inode->i_rdev == MKDEV(TTYAUX_MAJOR,1)) {
-                extern int splash_verbose(void);
-                (void)splash_verbose();
-        }               
-#endif
-
        /* Job control check -- must be done at start and after
           every sleep (POSIX.1 7.1.1.4). */
        /* NOTE: not yet done after every sleep pending a thorough
index 7428e4d..525905c 100644 (file)
@@ -67,6 +67,7 @@
 #include <asm/uaccess.h>
 #include <linux/ppdev.h>
 #include <linux/smp_lock.h>
+#include <linux/device.h>
 
 #define PP_VERSION "ppdev: user-space parallel port driver"
 #define CHRDEV "ppdev"
@@ -782,4 +783,4 @@ module_init(ppdev_init);
 module_exit(ppdev_cleanup);
 
 MODULE_LICENSE("GPL");
-
+MODULE_ALIAS_CHARDEV_MAJOR(PP_MAJOR);
index 4de4c06..ebe31b9 100644 (file)
@@ -509,13 +509,13 @@ static int sx_busy_wait_eq (struct sx_board *board,
 
        func_enter ();
 
-       for (i=0; i < TIMEOUT_1 > 0;i++) 
+       for (i=0; i < TIMEOUT_1 ;i++)
                if ((read_sx_byte (board, offset) & mask) == correctval) {
                        func_exit ();
                        return 1;
                }
 
-       for (i=0; i < TIMEOUT_2 > 0;i++) {
+       for (i=0; i < TIMEOUT_2 ;i++) {
                if ((read_sx_byte (board, offset) & mask) == correctval) {
                        func_exit ();
                        return 1;
@@ -535,13 +535,13 @@ static int sx_busy_wait_neq (struct sx_board *board,
 
        func_enter ();
 
-       for (i=0; i < TIMEOUT_1 > 0;i++) 
+       for (i=0; i < TIMEOUT_1 ;i++)
                if ((read_sx_byte (board, offset) & mask) != badval) {
                        func_exit ();
                        return 1;
                }
 
-       for (i=0; i < TIMEOUT_2 > 0;i++) {
+       for (i=0; i < TIMEOUT_2 ;i++) {
                if ((read_sx_byte (board, offset) & mask) != badval) {
                        func_exit ();
                        return 1;
index 743346b..bd1e497 100644 (file)
@@ -266,7 +266,7 @@ static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = {
 /* v */        NULL, /* May be assigned at init time by SMP VOYAGER */
 /* w */        NULL,
 /* x */        NULL,
-/* y */        &sysrq_mountro_op,      /* stupid fujitsu laptop, can't hit the U key */
+/* y */        NULL,
 /* z */        NULL
 };
 
index 5f04d17..2d4461b 100644 (file)
@@ -2434,18 +2434,12 @@ static struct cdev ptmx_cdev;
 static struct cdev vc0_cdev;
 #endif
 
-static int tty_initialized;
-
 /*
  * Ok, now we can initialize the rest of the tty devices and can count
  * on memory allocations, interrupts etc..
  */
-int __init tty_init(void)
+static int __init tty_init(void)
 {
-        if (tty_initialized)
-                return 0;
-       tty_initialized = 1;
-
        strcpy(tty_cdev.kobj.name, "dev.tty");
        cdev_init(&tty_cdev, &tty_fops);
        if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
index 17be689..15c28a5 100644 (file)
@@ -36,7 +36,6 @@
 #include <linux/kbd_kern.h>
 #include <linux/console.h>
 #include <linux/smp_lock.h>
-#include <linux/device.h>
 #include <asm/uaccess.h>
 #include <asm/byteorder.h>
 #include <asm/unaligned.h>
@@ -470,85 +469,6 @@ static struct file_operations vcs_fops = {
        .open           = vcs_open,
 };
 
-/* vc class implementation */
-
-struct vc_dev {
-       struct list_head node;
-       dev_t dev;
-       struct class_device class_dev;
-};
-#define to_vc_dev(d) container_of(d, struct vc_dev, class_dev)
-
-static LIST_HEAD(vc_dev_list);
-static spinlock_t vc_dev_list_lock = SPIN_LOCK_UNLOCKED;
-
-static void release_vc_dev(struct class_device *class_dev)
-{
-       struct vc_dev *vc_dev = to_vc_dev(class_dev);
-       kfree(vc_dev);
-}
-
-static struct class vc_class = {
-       .name           = "vc",
-       .release        = &release_vc_dev,
-};
-
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
-       struct vc_dev *vc_dev = to_vc_dev(class_dev);
-       return print_dev_t(buf, vc_dev->dev);
-}
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-
-static int vc_add_class_device(dev_t dev, char *name, int minor)
-{
-       struct vc_dev *vc_dev = NULL;
-       int retval;
-
-       vc_dev = kmalloc(sizeof(*vc_dev), GFP_KERNEL);
-       if (!vc_dev)
-               return -ENOMEM;
-       memset(vc_dev, 0x00, sizeof(*vc_dev));
-
-       vc_dev->dev = dev;
-       vc_dev->class_dev.class = &vc_class;
-       snprintf(vc_dev->class_dev.class_id, BUS_ID_SIZE, name, minor);
-       retval = class_device_register(&vc_dev->class_dev);
-       if (retval)
-               goto error;
-       class_device_create_file(&vc_dev->class_dev, &class_device_attr_dev);
-       spin_lock(&vc_dev_list_lock);
-       list_add(&vc_dev->node, &vc_dev_list);
-       spin_unlock(&vc_dev_list_lock);
-       return 0;
-error:
-       kfree(vc_dev);
-       return retval;
-}
-
-static void vc_remove_class_device(int minor)
-{
-       struct vc_dev *vc_dev = NULL;
-       struct list_head *tmp;
-       int found = 0;
-
-       spin_lock(&vc_dev_list_lock);
-       list_for_each(tmp, &vc_dev_list) {
-               vc_dev = list_entry(tmp, struct vc_dev, node);
-               if (MINOR(vc_dev->dev) == minor) {
-                       found = 1;
-                       break;
-               }
-       }
-       if (found) {
-               list_del(&vc_dev->node);
-               spin_unlock(&vc_dev_list_lock);
-               class_device_unregister(&vc_dev->class_dev);
-       } else {
-               spin_unlock(&vc_dev_list_lock);
-       }
-}
-
 void vcs_make_devfs(struct tty_struct *tty)
 {
        devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 1),
@@ -557,26 +477,19 @@ void vcs_make_devfs(struct tty_struct *tty)
        devfs_mk_cdev(MKDEV(VCS_MAJOR, tty->index + 129),
                        S_IFCHR|S_IRUSR|S_IWUSR,
                        "vcc/a%u", tty->index + 1);
-       vc_add_class_device(MKDEV(VCS_MAJOR, tty->index + 1), "vcs%u", tty->index + 1);
-       vc_add_class_device(MKDEV(VCS_MAJOR, tty->index + 129), "vcsa%u", tty->index + 1);
 }
 void vcs_remove_devfs(struct tty_struct *tty)
 {
        devfs_remove("vcc/%u", tty->index + 1);
        devfs_remove("vcc/a%u", tty->index + 1);
-       vc_remove_class_device(tty->index + 1);
-       vc_remove_class_device(tty->index + 129);
 }
 
 int __init vcs_init(void)
 {
        if (register_chrdev(VCS_MAJOR, "vcs", &vcs_fops))
                panic("unable to get major %d for vcs device", VCS_MAJOR);
-       class_register(&vc_class);
 
        devfs_mk_cdev(MKDEV(VCS_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/0");
        devfs_mk_cdev(MKDEV(VCS_MAJOR, 128), S_IFCHR|S_IRUSR|S_IWUSR, "vcc/a0");
-       vc_add_class_device(MKDEV(VCS_MAJOR, 0), "vcs", 0);
-       vc_add_class_device(MKDEV(VCS_MAJOR, 128), "vcsa", 128);
        return 0;
 }
diff --git a/drivers/char/viocons.c b/drivers/char/viocons.c
deleted file mode 100644 (file)
index b21a9f2..0000000
+++ /dev/null
@@ -1,1416 +0,0 @@
-/* -*- linux-c -*-
- *
- *  drivers/char/viocons.c
- *
- *  iSeries Virtual Terminal
- *
- *  Authors: Dave Boutcher <boutcher@us.ibm.com>
- *           Ryan Arnold <ryanarn@us.ibm.com>
- *           Colin Devilbiss <devilbis@us.ibm.com>
- *
- * (C) Copyright 2000, 2001, 2002, 2003 IBM Corporation
- *
- * This program is free software;  you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) anyu later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-#include <linux/config.h>
-#include <linux/version.h>
-#include <linux/kernel.h>
-#include <linux/proc_fs.h>
-#include <linux/errno.h>
-#include <linux/vmalloc.h>
-#include <linux/mm.h>
-#include <linux/console.h>
-#include <linux/module.h>
-#include <asm/uaccess.h>
-#include <linux/init.h>
-#include <linux/wait.h>
-#include <linux/spinlock.h>
-#include <asm/ioctls.h>
-#include <linux/kd.h>
-#include <linux/tty.h>
-#include <linux/tty_flip.h>
-#include <linux/sysrq.h>
-
-#include <asm/iSeries/vio.h>
-
-#include <asm/iSeries/HvLpEvent.h>
-#include <asm/iSeries/HvCallEvent.h>
-#include <asm/iSeries/HvLpConfig.h>
-#include <asm/iSeries/HvCall.h>
-
-#define VIOTTY_MAGIC (0x0DCB)
-#define VTTY_PORTS 10
-#define VIOTTY_SERIAL_START 65
-
-static spinlock_t consolelock = SPIN_LOCK_UNLOCKED;
-static spinlock_t consoleloglock = SPIN_LOCK_UNLOCKED;
-
-#ifdef CONFIG_MAGIC_SYSRQ
-static int vio_sysrq_pressed;
-extern int sysrq_enabled;
-#endif
-
-/*
- * The structure of the events that flow between us and OS/400.  You can't
- * mess with this unless the OS/400 side changes too
- */
-struct viocharlpevent {
-       struct HvLpEvent event;
-       u32 reserved;
-       u16 version;
-       u16 subtype_result_code;
-       u8 virtual_device;
-       u8 len;
-       u8 data[VIOCHAR_MAX_DATA];
-};
-
-/*
- * This is a place where we handle the distribution of memory
- * for copy_from_user() calls.  The buffer_available array is to
- * help us determine which buffer to use.
- */
-#define VIOCHAR_NUM_CFU_BUFFERS        7
-static struct viocharlpevent viocons_cfu_buffer[VIOCHAR_NUM_CFU_BUFFERS];
-static atomic_t viocons_cfu_buffer_available[VIOCHAR_NUM_CFU_BUFFERS];
-
-#define VIOCHAR_WINDOW         10
-#define VIOCHAR_HIGHWATERMARK  3
-
-enum viocharsubtype {
-       viocharopen = 0x0001,
-       viocharclose = 0x0002,
-       viochardata = 0x0003,
-       viocharack = 0x0004,
-       viocharconfig = 0x0005
-};
-
-enum viochar_rc {
-       viochar_rc_ebusy = 1
-};
-
-#define VIOCHAR_NUM_BUF                8
-
-/*
- * Our port information.  We store a pointer to one entry in the
- * tty_driver_data
- */
-static struct port_info {
-       int magic;
-       struct tty_struct *tty;
-       HvLpIndex lp;
-       u8 vcons;
-       u64 seq;        /* sequence number of last HV send */
-       u64 ack;        /* last ack from HV */
-/*
- * When we get writes faster than we can send it to the partition,
- * buffer the data here. Note that used is a bit map of used buffers.
- * It had better have enough bits to hold VIOCHAR_NUM_BUF the bitops assume
- * it is a multiple of unsigned long
- */
-       unsigned long used;
-       u8 *buffer[VIOCHAR_NUM_BUF];
-       int bufferBytes[VIOCHAR_NUM_BUF];
-       int curbuf;
-       int bufferOverflow;
-       int overflowMessage;
-} port_info[VTTY_PORTS];
-
-static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp);
-
-static struct tty_driver *viotty_driver;
-static struct tty_driver *viottyS_driver;
-
-void hvlog(char *fmt, ...)
-{
-       int i;
-       unsigned long flags;
-       va_list args;
-       static char buf[256];
-
-       spin_lock_irqsave(&consoleloglock, flags);
-       va_start(args, fmt);
-       i = vsnprintf(buf, sizeof(buf) - 1, fmt, args);
-       va_end(args);
-       buf[i++] = '\r';
-       HvCall_writeLogBuffer(buf, i);
-       spin_unlock_irqrestore(&consoleloglock, flags);
-}
-
-void hvlogOutput(const char *buf, int count)
-{
-       unsigned long flags;
-       int begin;
-       int index;
-       char cr;
-
-       cr = '\r';
-       begin = 0;
-       spin_lock_irqsave(&consoleloglock, flags);
-       for (index = 0; index < count; index++) {
-               if (buf[index] == '\n') {
-                       /*
-                        * Start right after the last '\n' or at the zeroth
-                        * array position and output the number of characters
-                        * including the newline.
-                        */
-                       HvCall_writeLogBuffer(&buf[begin], index - begin + 1);
-                       begin = index + 1;
-                       HvCall_writeLogBuffer(&cr, 1);
-               }
-       }
-       if ((index - begin) > 0)
-               HvCall_writeLogBuffer(&buf[begin], index - begin);
-       spin_unlock_irqrestore(&consoleloglock, flags);
-}
-
-/*
- * Make sure we're pointing to a valid port_info structure.  Shamelessly
- * plagerized from serial.c
- */
-static inline int viotty_paranoia_check(struct port_info *pi,
-                                       char *name, const char *routine)
-{
-       static const char *bad_pi_addr = KERN_WARNING_VIO
-               "Warning: bad address for port_info struct (%s) in %s\n";
-       static const char *badmagic = KERN_WARNING_VIO
-               "Warning: bad magic number for port_info struct (%s) in %s\n";
-
-       if ((pi - &port_info[0]) > VTTY_PORTS) {
-               printk(bad_pi_addr, name, routine);
-               return 1;
-       }
-       if (pi->magic != VIOTTY_MAGIC) {
-               printk(badmagic, name, routine);
-               return 1;
-       }
-       return 0;
-}
-
-/*
- * This function should ONLY be called once from viocons_init2
- */
-static void viocons_init_cfu_buffer(void)
-{
-       int i;
-
-       for (i = 1; i < VIOCHAR_NUM_CFU_BUFFERS; i++)
-               atomic_set(&viocons_cfu_buffer_available[i], 1);
-}
-
-static struct viocharlpevent *viocons_get_cfu_buffer(void)
-{
-       int i;
-
-       /*
-        * Grab the first available buffer.  It doesn't matter if we
-        * are interrupted during this array traversal as long as we
-        * get an available space.
-        */
-       for (i = 0; i < VIOCHAR_NUM_CFU_BUFFERS; i++)
-               if (atomic_dec_if_positive(&viocons_cfu_buffer_available[i])
-                               == 0 )
-                       return &viocons_cfu_buffer[i];
-       hvlog("\n\rviocons: viocons_get_cfu_buffer : no free buffers found");
-       return NULL;
-}
-
-static void viocons_free_cfu_buffer(struct viocharlpevent *buffer)
-{
-       int i;
-
-       i = buffer - &viocons_cfu_buffer[0];
-       if (i >= (sizeof(viocons_cfu_buffer) / sizeof(viocons_cfu_buffer[0]))) {
-               hvlog("\n\rviocons: viocons_free_cfu_buffer : buffer pointer not found in list.");
-               return;
-       }
-       if (atomic_read(&viocons_cfu_buffer_available[i]) != 0) {
-               hvlog("\n\rviocons: WARNING : returning unallocated cfu buffer.");
-               return;
-       }
-       atomic_set(&viocons_cfu_buffer_available[i], 1);
-}
-
-/*
- * Add data to our pending-send buffers.  
- *
- * NOTE: Don't use printk in here because it gets nastily recursive.
- * hvlog can be used to log to the hypervisor buffer
- */
-static int buffer_add(u8 port, const char *buf, size_t len)
-{
-       size_t bleft;
-       size_t curlen;
-       const char *curbuf;
-       int nextbuf;
-       struct port_info *pi = &port_info[port];
-
-       curbuf = buf;
-       bleft = len;
-       while (bleft > 0) {
-               /*
-                * If there is no space left in the current buffer, we have
-                * filled everything up, so return.  If we filled the previous
-                * buffer we would already have moved to the next one.
-                */
-               if (pi->bufferBytes[pi->curbuf] == VIOCHAR_MAX_DATA) {
-                       hvlog ("\n\rviocons: No overflow buffer available for memcpy().\n");
-                       pi->bufferOverflow++;
-                       pi->overflowMessage = 1;
-                       break;
-               }
-
-               /*
-                * Turn on the "used" bit for this buffer.  If it's already on,
-                * that's fine.
-                */
-               set_bit(pi->curbuf, &pi->used);
-
-               /*
-                * See if this buffer has been allocated.  If not, allocate it.
-                */
-               if (pi->buffer[pi->curbuf] == NULL) {
-                       pi->buffer[pi->curbuf] =
-                           kmalloc(VIOCHAR_MAX_DATA, GFP_ATOMIC);
-                       if (pi->buffer[pi->curbuf] == NULL) {
-                               hvlog("\n\rviocons: kmalloc failed allocating spaces for buffer %d.",
-                                       pi->curbuf);
-                               break;
-                       }
-               }
-
-               /* Figure out how much we can copy into this buffer. */
-               if (bleft < (VIOCHAR_MAX_DATA - pi->bufferBytes[pi->curbuf]))
-                       curlen = bleft;
-               else
-                       curlen = VIOCHAR_MAX_DATA - pi->bufferBytes[pi->curbuf];
-
-               /* Copy the data into the buffer. */
-               memcpy(pi->buffer[pi->curbuf] + pi->bufferBytes[pi->curbuf],
-                               curbuf, curlen);
-
-               pi->bufferBytes[pi->curbuf] += curlen;
-               curbuf += curlen;
-               bleft -= curlen;
-
-               /*
-                * Now see if we've filled this buffer.  If not then
-                * we'll try to use it again later.  If we've filled it
-                * up then we'll advance the curbuf to the next in the
-                * circular queue.
-                */
-               if (pi->bufferBytes[pi->curbuf] == VIOCHAR_MAX_DATA) {
-                       nextbuf = (pi->curbuf + 1) % VIOCHAR_NUM_BUF;
-                       /*
-                        * Move to the next buffer if it hasn't been used yet
-                        */
-                       if (test_bit(nextbuf, &pi->used) == 0)
-                               pi->curbuf = nextbuf;
-               }
-       }
-       return len - bleft;
-}
-
-/*
- * Send pending data
- *
- * NOTE: Don't use printk in here because it gets nastily recursive.
- * hvlog can be used to log to the hypervisor buffer
- */
-static void send_buffers(u8 port, HvLpIndex lp)
-{
-       HvLpEvent_Rc hvrc;
-       int nextbuf;
-       struct viocharlpevent *viochar;
-       unsigned long flags;
-       struct port_info *pi = &port_info[port];
-
-       spin_lock_irqsave(&consolelock, flags);
-
-       viochar = (struct viocharlpevent *)
-           vio_get_event_buffer(viomajorsubtype_chario);
-
-       /* Make sure we got a buffer */
-       if (viochar == NULL) {
-               hvlog("\n\rviocons: Can't get viochar buffer in sendBuffers().");
-               spin_unlock_irqrestore(&consolelock, flags);
-               return;
-       }
-
-       if (pi->used == 0) {
-               hvlog("\n\rviocons: in sendbuffers(), but no buffers used.\n");
-               vio_free_event_buffer(viomajorsubtype_chario, viochar);
-               spin_unlock_irqrestore(&consolelock, flags);
-               return;
-       }
-
-       /*
-        * curbuf points to the buffer we're filling.  We want to
-        * start sending AFTER this one.  
-        */
-       nextbuf = (pi->curbuf + 1) % VIOCHAR_NUM_BUF;
-
-       /*
-        * Loop until we find a buffer with the used bit on
-        */
-       while (test_bit(nextbuf, &pi->used) == 0)
-               nextbuf = (nextbuf + 1) % VIOCHAR_NUM_BUF;
-
-       initDataEvent(viochar, lp);
-
-       /*
-        * While we have buffers with data, and our send window
-        * is open, send them
-        */
-       while ((test_bit(nextbuf, &pi->used)) &&
-              ((pi->seq - pi->ack) < VIOCHAR_WINDOW)) {
-               viochar->len = pi->bufferBytes[nextbuf];
-               viochar->event.xCorrelationToken = pi->seq++;
-               viochar->event.xSizeMinus1 =
-                       offsetof(struct viocharlpevent, data) + viochar->len;
-
-               memcpy(viochar->data, pi->buffer[nextbuf], viochar->len);
-
-               hvrc = HvCallEvent_signalLpEvent(&viochar->event);
-               if (hvrc) {
-                       /*
-                        * MUST unlock the spinlock before doing a printk
-                        */
-                       vio_free_event_buffer(viomajorsubtype_chario, viochar);
-                       spin_unlock_irqrestore(&consolelock, flags);
-
-                       printk(KERN_WARNING_VIO
-                              "console error sending event! return code %d\n",
-                              (int)hvrc);
-                       return;
-               }
-
-               /*
-                * clear the used bit, zero the number of bytes in
-                * this buffer, and move to the next buffer
-                */
-               clear_bit(nextbuf, &pi->used);
-               pi->bufferBytes[nextbuf] = 0;
-               nextbuf = (nextbuf + 1) % VIOCHAR_NUM_BUF;
-       }
-
-       /*
-        * If we have emptied all the buffers, start at 0 again.
-        * this will re-use any allocated buffers
-        */
-       if (pi->used == 0) {
-               pi->curbuf = 0;
-
-               if (pi->overflowMessage)
-                       pi->overflowMessage = 0;
-
-               if (pi->tty) {
-                       if ((pi->tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
-                           (pi->tty->ldisc.write_wakeup))
-                               (pi->tty->ldisc.write_wakeup)(pi->tty);
-                       wake_up_interruptible(&pi->tty->write_wait);
-               }
-       }
-
-       vio_free_event_buffer(viomajorsubtype_chario, viochar);
-       spin_unlock_irqrestore(&consolelock, flags);
-}
-
-/*
- * Our internal writer.  Gets called both from the console device and
- * the tty device.  the tty pointer will be NULL if called from the console.
- * Return total number of bytes "written".
- *
- * NOTE: Don't use printk in here because it gets nastily recursive.  hvlog
- * can be used to log to the hypervisor buffer
- */
-static int internal_write(HvLpIndex lp, u8 port, const char *buf,
-                         size_t len, struct viocharlpevent *viochar)
-{
-       HvLpEvent_Rc hvrc;
-       size_t bleft;
-       size_t curlen;
-       const char *curbuf;
-       unsigned long flags;
-       int copy_needed = (viochar == NULL);
-       struct port_info *pi = &port_info[port];
-
-       /*
-        * Write to the hvlog of inbound data are now done prior to
-        * calling internal_write() since internal_write() is only called in
-        * the event that an lp event path is active, which isn't the case for
-        * logging attempts prior to console initialization.
-        *
-        * If there is already data queued for this port, send it prior to
-        * attempting to send any new data.
-        */
-       if (pi->used)
-               send_buffers(port, lp);
-
-       spin_lock_irqsave(&consolelock, flags);
-
-       /*
-        * If the internal_write() was passed a pointer to a
-        * viocharlpevent then we don't need to allocate a new one
-        * (this is the case where we are internal_writing user space
-        * data).  If we aren't writing user space data then we need
-        * to get an event from viopath.
-        */
-       if (copy_needed) {
-               /* This one is fetched from the viopath data structure */
-               viochar = (struct viocharlpevent *)
-                       vio_get_event_buffer(viomajorsubtype_chario);
-               /* Make sure we got a buffer */
-               if (viochar == NULL) {
-                       spin_unlock_irqrestore(&consolelock, flags);
-                       hvlog("\n\rviocons: Can't get viochar buffer in internal_write().");
-                       return -EAGAIN;
-               }
-               initDataEvent(viochar, lp);
-       }
-
-       curbuf = buf;
-       bleft = len;
-
-       while ((bleft > 0) && (pi->used == 0) &&
-              ((pi->seq - pi->ack) < VIOCHAR_WINDOW)) {
-               if (bleft > VIOCHAR_MAX_DATA)
-                       curlen = VIOCHAR_MAX_DATA;
-               else
-                       curlen = bleft;
-
-               viochar->event.xCorrelationToken = pi->seq++;
-
-               if (copy_needed) {
-                       memcpy(viochar->data, curbuf, curlen);
-                       viochar->len = curlen;
-               }
-
-               viochar->event.xSizeMinus1 =
-                   offsetof(struct viocharlpevent, data) + curlen;
-
-               hvrc = HvCallEvent_signalLpEvent(&viochar->event);
-               if (hvrc) {
-                       spin_unlock_irqrestore(&consolelock, flags);
-                       if (copy_needed)
-                               vio_free_event_buffer(viomajorsubtype_chario, viochar);
-
-                       hvlog("viocons: error sending event! %d\n", (int)hvrc);
-                       return len - bleft;
-               }
-
-               curbuf += curlen;
-               bleft -= curlen;
-       }
-
-       /* If we didn't send it all, buffer as much of it as we can. */
-       if (bleft > 0)
-               bleft -= buffer_add(port, curbuf, bleft);
-       /*
-        * Since we grabbed it from the viopath data structure, return
-        * it to the data structure.
-        */
-       if (copy_needed)
-               vio_free_event_buffer(viomajorsubtype_chario, viochar);
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       return len - bleft;
-}
-
-static int get_port_data(struct tty_struct *tty, HvLpIndex *lp, u8 *port)
-{
-       unsigned long flags;
-       struct port_info *pi = NULL;
-
-       spin_lock_irqsave(&consolelock, flags);
-       if (tty) {
-               pi = (struct port_info *)tty->driver_data;
-               if (!pi || viotty_paranoia_check(pi, tty->name,
-                                            "get_port_data")) {
-                       spin_unlock_irqrestore(&consolelock, flags);
-                       return -ENODEV;
-               }
-
-               *lp = pi->lp;
-               *port = pi - &port_info[0];
-       } else {
-               /*
-                * If this is the console device, use the lp from
-                * the first port entry
-                */
-               *port = 0;
-               *lp = port_info[0].lp;
-       }
-       spin_unlock_irqrestore(&consolelock, flags);
-       return 0;
-}
-
-/*
- * Initialize the common fields in a charLpEvent
- */
-static void initDataEvent(struct viocharlpevent *viochar, HvLpIndex lp)
-{
-       memset(viochar, 0, sizeof(struct viocharlpevent));
-
-       viochar->event.xFlags.xValid = 1;
-       viochar->event.xFlags.xFunction = HvLpEvent_Function_Int;
-       viochar->event.xFlags.xAckInd = HvLpEvent_AckInd_NoAck;
-       viochar->event.xFlags.xAckType = HvLpEvent_AckType_DeferredAck;
-       viochar->event.xType = HvLpEvent_Type_VirtualIo;
-       viochar->event.xSubtype = viomajorsubtype_chario | viochardata;
-       viochar->event.xSourceLp = HvLpConfig_getLpIndex();
-       viochar->event.xTargetLp = lp;
-       viochar->event.xSizeMinus1 = sizeof(struct viocharlpevent);
-       viochar->event.xSourceInstanceId = viopath_sourceinst(lp);
-       viochar->event.xTargetInstanceId = viopath_targetinst(lp);
-}
-
-/*
- * console device write
- */
-static void viocons_write(struct console *co, const char *s, unsigned count)
-{
-       int index;
-       int begin;
-       HvLpIndex lp;
-       u8 port;
-
-       static const char cr = '\r';
-
-       /* Check port data first because the target LP might be valid but
-        * simply not active, in which case we want to hvlog the output.
-        */
-       if (get_port_data(NULL, &lp, &port)) {
-               hvlog("\n\rviocons_write: unable to get port data.");
-               return;
-       }
-
-       hvlogOutput(s, count);
-
-       if (!viopath_isactive(lp)) {
-               /*
-                * This is a VERY noisy trace message in the case where the
-                * path manager is not active or in the case where this
-                * function is called prior to viocons initialization.  It is
-                * being commented out for the sake of a clear trace buffer.
-                */
-#if 0
-                hvlog("\n\rviocons_write: path not active to lp %d", lp );
-#endif
-               return;
-       }
-
-       /* 
-        * Any newline character found will cause a
-        * carriage return character to be emitted as well. 
-        */
-       begin = 0;
-       for (index = 0; index < count; index++) {
-               if (s[index] == '\n') {
-                       /* 
-                        * Newline found. Print everything up to and 
-                        * including the newline
-                        */
-                       internal_write(lp, port, &s[begin], index - begin + 1,
-                                       NULL);
-                       begin = index + 1;
-                       /* Emit a carriage return as well */
-                       internal_write(lp, port, &cr, 1, NULL);
-               }
-       }
-
-       /* If any characters left to write, write them now */
-       if ((index - begin) > 0)
-               internal_write(lp, port, &s[begin], index - begin, NULL);
-}
-
-/*
- * Work out the device associate with this console
- */
-static struct tty_driver *viocons_device(struct console *c, int *index)
-{
-       *index = c->index;
-       return viotty_driver;
-}
-
-/*
- * console device I/O methods
- */
-static struct console viocons = {
-       .name = "ttyS",
-       .write = viocons_write,
-       .device = viocons_device,
-       .flags = CON_PRINTBUFFER,
-       .index = -1,
-};
-
-/*
- * TTY Open method
- */
-static int viotty_open(struct tty_struct *tty, struct file *filp)
-{
-       int port;
-       unsigned long flags;
-       struct port_info *pi;
-
-       port = tty->index;
-
-       if (port >= VIOTTY_SERIAL_START)
-               port -= VIOTTY_SERIAL_START;
-
-       if ((port < 0) || (port >= VTTY_PORTS))
-               return -ENODEV;
-
-       spin_lock_irqsave(&consolelock, flags);
-
-       pi = &port_info[port];
-       /* If some other TTY is already connected here, reject the open */
-       if ((pi->tty) && (pi->tty != tty)) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               printk(KERN_WARNING_VIO
-                      "console attempt to open device twice from different ttys\n");
-               return -EBUSY;
-       }
-       tty->driver_data = pi;
-       pi->tty = tty;
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       return 0;
-}
-
-/*
- * TTY Close method
- */
-static void viotty_close(struct tty_struct *tty, struct file *filp)
-{
-       unsigned long flags;
-       struct port_info *pi;
-
-       spin_lock_irqsave(&consolelock, flags);
-       pi = (struct port_info *)tty->driver_data;
-
-       if (!pi || viotty_paranoia_check(pi, tty->name, "viotty_close")) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               return;
-       }
-/*     if (atomic_read(&tty->count) == 1) { */
-       if (tty->count == 1)
-               pi->tty = NULL;
-       spin_unlock_irqrestore(&consolelock, flags);
-}
-
-/*
- * TTY Write method
- */
-static int viotty_write(struct tty_struct *tty, int from_user,
-                       const unsigned char *buf, int count)
-{
-       int ret;
-       int total = 0;
-       HvLpIndex lp;
-       u8 port;
-
-       ret = get_port_data(tty, &lp, &port);
-       if (ret) {
-               hvlog("\n\rviotty_write: no port data.");
-               return -ENODEV;
-       }
-
-       if (port == 0)
-               hvlogOutput(buf, count);
-
-       /*
-        * If the path to this LP is closed, don't bother doing anything more.
-        * just dump the data on the floor and return count.  For some reason
-        * some user level programs will attempt to probe available tty's and
-        * they'll attempt a viotty_write on an invalid port which maps to an
-        * invalid target lp.  If this is the case then ignore the
-        * viotty_write call and, since the viopath isn't active to this
-        * partition, return count.
-        */
-       if (!viopath_isactive(lp)) {
-               /* Noisy trace.  Commented unless needed. */
-#if 0
-                hvlog("\n\rviotty_write: viopath NOT active for lp %d.",lp);
-#endif
-               return count;
-       }
-
-       /*
-        * If the viotty_write is invoked from user space we want to do the
-        * copy_from_user() into an event buffer from the cfu buffer before
-        * internal_write() is called because internal_write may need to buffer
-        * data which will need to grab a spin_lock and we shouldn't
-        * copy_from_user() while holding a spin_lock.  Should internal_write()
-        * not need to buffer data then it'll just use the event we created here
-        * rather than checking one out from vio_get_event_buffer().
-        */
-       if (from_user) {
-               struct viocharlpevent *viochar;
-               int curlen;
-               const char *curbuf = buf;
-
-               viochar = viocons_get_cfu_buffer();
-               if (viochar == NULL)
-                       return -EAGAIN;
-               initDataEvent(viochar, lp);
-               while (count > 0) {
-                       if (count > VIOCHAR_MAX_DATA)
-                               curlen = VIOCHAR_MAX_DATA;
-                       else
-                               curlen = count;
-                       viochar->len = curlen;
-                       ret = copy_from_user(viochar->data, curbuf, curlen);
-                       if (ret)
-                               break;
-                       ret = internal_write(lp, port, viochar->data,
-                                       viochar->len, viochar);
-                       total += ret;
-                       if (ret != curlen)
-                               break;
-                       count -= curlen;
-                       curbuf += curlen;
-               }
-               viocons_free_cfu_buffer(viochar);
-       } else
-               total = internal_write(lp, port, buf, count, NULL);
-       return total;
-}
-
-/*
- * TTY put_char method
- */
-static void viotty_put_char(struct tty_struct *tty, unsigned char ch)
-{
-       HvLpIndex lp;
-       u8 port;
-
-       if (get_port_data(tty, &lp, &port))
-               return;
-
-       /* This will append '\r' as well if the char is '\n' */
-       if (port == 0)
-               hvlogOutput(&ch, 1);
-
-       if (viopath_isactive(lp))
-               internal_write(lp, port, &ch, 1, NULL);
-}
-
-/*
- * TTY flush_chars method
- */
-static void viotty_flush_chars(struct tty_struct *tty)
-{
-}
-
-/*
- * TTY write_room method
- */
-static int viotty_write_room(struct tty_struct *tty)
-{
-       int i;
-       int room = 0;
-       struct port_info *pi;
-       unsigned long flags;
-
-       spin_lock_irqsave(&consolelock, flags);
-       pi = (struct port_info *)tty->driver_data;
-       if (!pi || viotty_paranoia_check(pi, tty->name, "viotty_write_room")) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               return 0;
-       }
-
-       /* If no buffers are used, return the max size. */
-       if (pi->used == 0) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               return VIOCHAR_MAX_DATA * VIOCHAR_NUM_BUF;
-       }
-
-       /*
-        * We retain the spinlock because we want to get an accurate
-        * count and it can change on us between each operation if we
-        * don't hold the spinlock.
-        */
-       for (i = 0; ((i < VIOCHAR_NUM_BUF) && (room < VIOCHAR_MAX_DATA)); i++)
-               room += (VIOCHAR_MAX_DATA - pi->bufferBytes[i]);
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       if (room > VIOCHAR_MAX_DATA)
-               room = VIOCHAR_MAX_DATA;
-       return room;
-}
-
-/*
- * TTY chars_in_buffer_room method
- */
-static int viotty_chars_in_buffer(struct tty_struct *tty)
-{
-       return 0;
-}
-
-static void viotty_flush_buffer(struct tty_struct *tty)
-{
-}
-
-static int viotty_ioctl(struct tty_struct *tty, struct file *file,
-                       unsigned int cmd, unsigned long arg)
-{
-       switch (cmd) {
-       /*
-        * the ioctls below read/set the flags usually shown in the leds
-        * don't use them - they will go away without warning
-        */
-       case KDGETLED:
-       case KDGKBLED:
-               return put_user(0, (char *)arg);
-
-       case KDSKBLED:
-               return 0;
-       }
-
-       return n_tty_ioctl(tty, file, cmd, arg);
-}
-
-static void viotty_throttle(struct tty_struct *tty)
-{
-}
-
-static void viotty_unthrottle(struct tty_struct *tty)
-{
-}
-
-static void viotty_set_termios(struct tty_struct *tty,
-               struct termios *old_termios)
-{
-}
-
-static void viotty_stop(struct tty_struct *tty)
-{
-}
-
-static void viotty_start(struct tty_struct *tty)
-{
-}
-
-static void viotty_hangup(struct tty_struct *tty)
-{
-}
-
-static void viotty_break(struct tty_struct *tty, int break_state)
-{
-}
-
-static void viotty_send_xchar(struct tty_struct *tty, char ch)
-{
-}
-
-static void viotty_wait_until_sent(struct tty_struct *tty, int timeout)
-{
-}
-
-/*
- * Handle an open charLpEvent.  Could be either interrupt or ack
- */
-static void vioHandleOpenEvent(struct HvLpEvent *event)
-{
-       unsigned long flags;
-       struct viocharlpevent *cevent = (struct viocharlpevent *)event;
-       u8 port = cevent->virtual_device;
-       struct port_info *pi;
-       int reject = 0;
-
-       if (event->xFlags.xFunction == HvLpEvent_Function_Ack) {
-               if (port >= VTTY_PORTS)
-                       return;
-
-               spin_lock_irqsave(&consolelock, flags);
-               /* Got the lock, don't cause console output */
-
-               pi = &port_info[port];
-               if (event->xRc == HvLpEvent_Rc_Good) {
-                       pi->seq = pi->ack = 0;
-                       /*
-                        * This line allows connections from the primary
-                        * partition but once one is connected from the
-                        * primary partition nothing short of a reboot
-                        * of linux will allow access from the hosting
-                        * partition again without a required iSeries fix.
-                        */
-                       pi->lp = event->xTargetLp;
-               }
-
-               spin_unlock_irqrestore(&consolelock, flags);
-               if (event->xRc != HvLpEvent_Rc_Good)
-                       printk(KERN_WARNING_VIO
-                              "viocons: event->xRc != HvLpEvent_Rc_Good, event->xRc == (%d).\n",
-                              event->xRc);
-
-               if (event->xCorrelationToken != 0) {
-                       unsigned long semptr = event->xCorrelationToken;
-                       up((struct semaphore *) semptr);
-               } else
-                       printk(KERN_WARNING_VIO
-                              "viocons: wierd...got open ack without semaphore\n");
-               return;
-       }
-
-       /* This had better require an ack, otherwise complain */
-       if (event->xFlags.xAckInd != HvLpEvent_AckInd_DoAck) {
-               printk(KERN_WARNING_VIO
-                      "console: viocharopen without ack bit!\n");
-               return;
-       }
-
-       spin_lock_irqsave(&consolelock, flags);
-       /* Got the lock, don't cause console output */
-
-       /* Make sure this is a good virtual tty */
-       if (port >= VTTY_PORTS) {
-               event->xRc = HvLpEvent_Rc_SubtypeError;
-               cevent->subtype_result_code = viorc_openRejected;
-               /*
-                * Flag state here since we can't printk while holding
-                * a spinlock.
-                */
-               reject = 1;
-       } else {
-               pi = &port_info[port];
-               if ((pi->lp != HvLpIndexInvalid) &&
-                               (pi->lp != event->xSourceLp)) {
-                       /*
-                        * If this is tty is already connected to a different
-                        * partition, fail.
-                        */
-                       event->xRc = HvLpEvent_Rc_SubtypeError;
-                       cevent->subtype_result_code = viorc_openRejected;
-                       reject = 2;
-               } else {
-                       pi->lp = event->xSourceLp;
-                       event->xRc = HvLpEvent_Rc_Good;
-                       cevent->subtype_result_code = viorc_good;
-                       pi->seq = pi->ack = 0;
-                       reject = 0;
-               }
-       }
-
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       if (reject == 1)
-               printk(KERN_WARNING_VIO
-                       "viocons: console open rejected : bad virtual tty.\n");
-       else if (reject == 2)
-               printk(KERN_WARNING_VIO
-                       "viocons: console open rejected : console in exclusive use by another partition.\n");
-
-       /* Return the acknowledgement */
-       HvCallEvent_ackLpEvent(event);
-}
-
-/*
- * Handle a close charLpEvent.  This should ONLY be an Interrupt because the
- * virtual console should never actually issue a close event to the hypervisor
- * because the virtual console never goes away.  A close event coming from the
- * hypervisor simply means that there are no client consoles connected to the
- * virtual console.
- *
- * Regardless of the number of connections masqueraded on the other side of
- * the hypervisor ONLY ONE close event should be called to accompany the ONE
- * open event that is called.  The close event should ONLY be called when NO
- * MORE connections (masqueraded or not) exist on the other side of the
- * hypervisor.
- */
-static void vioHandleCloseEvent(struct HvLpEvent *event)
-{
-       unsigned long flags;
-       struct viocharlpevent *cevent = (struct viocharlpevent *)event;
-       u8 port = cevent->virtual_device;
-
-       if (event->xFlags.xFunction == HvLpEvent_Function_Int) {
-               if (port >= VTTY_PORTS) {
-                       printk(KERN_WARNING_VIO "viocons: close message from invalid virtual device.\n");
-                       return;
-               }
-
-               /* For closes, just mark the console partition invalid */
-               spin_lock_irqsave(&consolelock, flags);
-               /* Got the lock, don't cause console output */
-
-               if (port_info[port].lp == event->xSourceLp)
-                       port_info[port].lp = HvLpIndexInvalid;
-
-               spin_unlock_irqrestore(&consolelock, flags);
-               printk(KERN_INFO_VIO
-                      "console close from %d\n", event->xSourceLp);
-       } else
-               printk(KERN_WARNING_VIO
-                      "console got unexpected close acknowlegement\n");
-}
-
-/*
- * Handle a config charLpEvent.  Could be either interrupt or ack
- */
-static void vioHandleConfig(struct HvLpEvent *event)
-{
-       struct viocharlpevent *cevent = (struct viocharlpevent *)event;
-
-       HvCall_writeLogBuffer(cevent->data, cevent->len);
-
-       if (cevent->data[0] == 0x01)
-               printk(KERN_INFO_VIO
-                      "console window resized to %d: %d: %d: %d\n",
-                      cevent->data[1], cevent->data[2],
-                      cevent->data[3], cevent->data[4]);
-       else
-               printk(KERN_WARNING_VIO "console unknown config event\n");
-}
-
-/*
- * Handle a data charLpEvent. 
- */
-static void vioHandleData(struct HvLpEvent *event)
-{
-       struct tty_struct *tty;
-       unsigned long flags;
-       struct viocharlpevent *cevent = (struct viocharlpevent *)event;
-       struct port_info *pi;
-       int index;
-       u8 port = cevent->virtual_device;
-
-       if (port >= VTTY_PORTS) {
-               printk(KERN_WARNING_VIO
-                      "console data on invalid virtual device %d\n", port);
-               return;
-       }
-
-       /*
-        * Hold the spinlock so that we don't take an interrupt that
-        * changes tty between the time we fetch the port_info
-        * pointer and the time we paranoia check.
-        */
-       spin_lock_irqsave(&consolelock, flags);
-       pi = &port_info[port];
-
-       /*
-        * Change 05/01/2003 - Ryan Arnold: If a partition other than
-        * the current exclusive partition tries to send us data
-        * events then just drop them on the floor because we don't
-        * want his stinking data.  He isn't authorized to receive
-        * data because he wasn't the first one to get the console,
-        * therefore he shouldn't be allowed to send data either.
-        * This will work without an iSeries fix.
-        */
-       if (pi->lp != event->xSourceLp) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               return;
-       }
-
-       tty = pi->tty;
-       if (tty == NULL) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               printk(KERN_WARNING_VIO "no tty for virtual device %d\n", port);
-               return;
-       }
-
-       if (tty->magic != TTY_MAGIC) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               printk(KERN_WARNING_VIO "tty bad magic\n");
-               return;
-       }
-
-       /*
-        * Just to be paranoid, make sure the tty points back to this port
-        */
-       pi = (struct port_info *)tty->driver_data;
-       if (!pi || viotty_paranoia_check(pi, tty->name, "vioHandleData")) {
-               spin_unlock_irqrestore(&consolelock, flags);
-               return;
-       }
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       /*
-        * Change 07/21/2003 - Ryan Arnold: functionality added to
-        * support sysrq utilizing ^O as the sysrq key.  The sysrq
-        * functionality will only work if built into the kernel and
-        * then only if sysrq is enabled through the proc filesystem.
-        */
-       for (index = 0; index < cevent->len; index++) {
-#ifdef CONFIG_MAGIC_SYSRQ
-               if (sysrq_enabled) {
-                       /* 0x0f is the ascii character for ^O */
-                       if (cevent->data[index] == '\x0f') {
-                               vio_sysrq_pressed = 1;
-                               /*
-                                * continue because we don't want to add
-                                * the sysrq key into the data string.
-                                */
-                               continue;
-                       } else if (vio_sysrq_pressed) {
-                               handle_sysrq(cevent->data[index], NULL, tty);
-                               vio_sysrq_pressed = 0;
-                               /*
-                                * continue because we don't want to add
-                                * the sysrq sequence into the data string.
-                                */
-                               continue;
-                       }
-               }
-#endif
-               /*
-                * The sysrq sequence isn't included in this check if
-                * sysrq is enabled and compiled into the kernel because
-                * the sequence will never get inserted into the buffer.
-                * Don't attempt to copy more data into the buffer than we
-                * have room for because it would fail without indication.
-                */
-               if ((tty->flip.count + 1) > TTY_FLIPBUF_SIZE) {
-                       printk(KERN_WARNING_VIO
-                                       "console input buffer overflow!\n");
-                       break;
-               }
-               tty_insert_flip_char(tty, cevent->data[index], TTY_NORMAL);
-       }
-
-       /* if cevent->len == 0 then no data was added to the buffer and flip.count == 0 */
-       if (tty->flip.count)
-               /* The next call resets flip.count when the data is flushed. */
-               tty_flip_buffer_push(tty);
-}
-
-/*
- * Handle an ack charLpEvent. 
- */
-static void vioHandleAck(struct HvLpEvent *event)
-{
-       struct viocharlpevent *cevent = (struct viocharlpevent *)event;
-       unsigned long flags;
-       u8 port = cevent->virtual_device;
-
-       if (port >= VTTY_PORTS) {
-               printk(KERN_WARNING_VIO
-                      "viocons: data on invalid virtual device\n");
-               return;
-       }
-
-       spin_lock_irqsave(&consolelock, flags);
-       port_info[port].ack = event->xCorrelationToken;
-       spin_unlock_irqrestore(&consolelock, flags);
-
-       if (port_info[port].used)
-               send_buffers(port, port_info[port].lp);
-}
-
-/*
- * Handle charLpEvents and route to the appropriate routine
- */
-static void vioHandleCharEvent(struct HvLpEvent *event)
-{
-       int charminor;
-
-       if (event == NULL)
-               return;
-
-       charminor = event->xSubtype & VIOMINOR_SUBTYPE_MASK;
-       switch (charminor) {
-       case viocharopen:
-               vioHandleOpenEvent(event);
-               break;
-       case viocharclose:
-               vioHandleCloseEvent(event);
-               break;
-       case viochardata:
-               vioHandleData(event);
-               break;
-       case viocharack:
-               vioHandleAck(event);
-               break;
-       case viocharconfig:
-               vioHandleConfig(event);
-               break;
-       default:
-               if ((event->xFlags.xFunction == HvLpEvent_Function_Int) &&
-                   (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck)) {
-                       event->xRc = HvLpEvent_Rc_InvalidSubtype;
-                       HvCallEvent_ackLpEvent(event);
-               }
-       }
-}
-
-/*
- * Send an open event
- */
-static int send_open(HvLpIndex remoteLp, void *sem)
-{
-       return HvCallEvent_signalLpEventFast(remoteLp,
-                       HvLpEvent_Type_VirtualIo,
-                       viomajorsubtype_chario | viocharopen,
-                       HvLpEvent_AckInd_DoAck, HvLpEvent_AckType_ImmediateAck,
-                       viopath_sourceinst(remoteLp),
-                       viopath_targetinst(remoteLp),
-                       (u64)(unsigned long)sem, VIOVERSION << 16,
-                       0, 0, 0, 0);
-}
-
-static struct tty_operations serial_ops = {
-       .open = viotty_open,
-       .close = viotty_close,
-       .write = viotty_write,
-       .put_char = viotty_put_char,
-       .flush_chars = viotty_flush_chars,
-       .write_room = viotty_write_room,
-       .chars_in_buffer = viotty_chars_in_buffer,
-       .flush_buffer = viotty_flush_buffer,
-       .ioctl = viotty_ioctl,
-       .throttle = viotty_throttle,
-       .unthrottle = viotty_unthrottle,
-       .set_termios = viotty_set_termios,
-       .stop = viotty_stop,
-       .start = viotty_start,
-       .hangup = viotty_hangup,
-       .break_ctl = viotty_break,
-       .send_xchar = viotty_send_xchar,
-       .wait_until_sent = viotty_wait_until_sent,
-};
-
-int __init viocons_init2(void)
-{
-       DECLARE_MUTEX_LOCKED(Semaphore);
-       int rc;
-
-       /* Now open to the primary LP */
-       printk(KERN_INFO_VIO "console open path to primary\n");
-       /* +2 for fudge */
-       rc = viopath_open(HvLpConfig_getPrimaryLpIndex(),
-                       viomajorsubtype_chario, VIOCHAR_WINDOW + 2);
-       if (rc)
-               printk(KERN_WARNING_VIO "console error opening to primary %d\n",
-                               rc);
-
-       if (viopath_hostLp == HvLpIndexInvalid)
-               vio_set_hostlp();
-
-       /*
-        * And if the primary is not the same as the hosting LP, open to the 
-        * hosting lp
-        */
-       if ((viopath_hostLp != HvLpIndexInvalid) &&
-           (viopath_hostLp != HvLpConfig_getPrimaryLpIndex())) {
-               printk(KERN_INFO_VIO "console open path to hosting (%d)\n",
-                               viopath_hostLp);
-               rc = viopath_open(viopath_hostLp, viomajorsubtype_chario,
-                               VIOCHAR_WINDOW + 2);    /* +2 for fudge */
-               if (rc)
-                       printk(KERN_WARNING_VIO
-                               "console error opening to partition %d: %d\n",
-                               viopath_hostLp, rc);
-       }
-
-       if (vio_setHandler(viomajorsubtype_chario, vioHandleCharEvent) < 0)
-               printk(KERN_WARNING_VIO
-                               "Error seting handler for console events!\n");
-
-       printk(KERN_INFO_VIO "console major number is %d\n", TTY_MAJOR);
-
-       /* First, try to open the console to the hosting lp.
-        * Wait on a semaphore for the response.
-        */
-       if ((viopath_isactive(viopath_hostLp)) &&
-           (send_open(viopath_hostLp, (void *)&Semaphore) == 0)) {
-               printk(KERN_INFO_VIO
-                       "opening console to hosting partition %d\n",
-                       viopath_hostLp);
-               //down(&Semaphore);
-               while (atomic_read(&Semaphore.count) == 0)
-                       mb();
-               atomic_set(&Semaphore.count, 0);
-       }
-
-       /*
-        * If we don't have an active console, try the primary
-        */
-       if ((!viopath_isactive(port_info[0].lp)) &&
-           (viopath_isactive(HvLpConfig_getPrimaryLpIndex())) &&
-           (send_open(HvLpConfig_getPrimaryLpIndex(), (void *)&Semaphore)
-            == 0)) {
-               printk(KERN_INFO_VIO "opening console to primary partition\n");
-               //down(&Semaphore);
-               while (atomic_read(&Semaphore.count) == 0)
-                       mb();
-               atomic_set(&Semaphore.count, 0);
-       }
-       return 0;
-}
-
-static int viocons_init3(void)
-{
-#if 1
-       int ret = viocons_init2();
-
-       if (ret)
-               return ret;
-#endif
-
-       /* Initialize the tty_driver structure */
-       viotty_driver = alloc_tty_driver(VTTY_PORTS);
-       viotty_driver->owner = THIS_MODULE;
-       viotty_driver->driver_name = "vioconsole";
-       viotty_driver->devfs_name = "vcs/";
-       viotty_driver->name = "tty";
-       viotty_driver->major = TTY_MAJOR;
-       viotty_driver->minor_start = 1;
-       viotty_driver->type = TTY_DRIVER_TYPE_CONSOLE;
-       viotty_driver->subtype = 1;
-       viotty_driver->init_termios = tty_std_termios;
-       viotty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS;
-       tty_set_operations(viotty_driver, &serial_ops);
-
-       viottyS_driver = alloc_tty_driver(VTTY_PORTS);
-       viottyS_driver->owner = THIS_MODULE;
-       viottyS_driver->driver_name = "vioconsole";
-       viottyS_driver->devfs_name = "tts/";
-       viottyS_driver->name = "ttyS";
-       viottyS_driver->major = TTY_MAJOR;
-       viottyS_driver->minor_start = VIOTTY_SERIAL_START;
-       viottyS_driver->type = TTY_DRIVER_TYPE_SERIAL;
-       viottyS_driver->subtype = 1;
-       viottyS_driver->init_termios = tty_std_termios;
-       viottyS_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_RESET_TERMIOS;
-       tty_set_operations(viottyS_driver, &serial_ops);
-
-       if (tty_register_driver(viotty_driver))
-               printk(KERN_WARNING_VIO "Couldn't register console driver\n");
-
-       if (tty_register_driver(viottyS_driver))
-               printk(KERN_WARNING_VIO "Couldn't register console S driver\n");
-
-       viocons_init_cfu_buffer();
-
-       return 0;
-}
-
-static int __init viocons_init(void)
-{
-       int i;
-
-       printk(KERN_INFO_VIO "registering console\n");
-       for (i = 0; i < VTTY_PORTS; i++) {
-               port_info[i].lp = HvLpIndexInvalid;
-               port_info[i].magic = VIOTTY_MAGIC;
-       }
-       HvCall_setLogBufferFormatAndCodepage(HvCall_LogBuffer_ASCII, 437);
-       register_console(&viocons);
-       return 0;
-}
-
-console_initcall(viocons_init);
-module_init(viocons_init3);
index cbab77b..464c340 100644 (file)
@@ -3038,31 +3038,6 @@ static int pm_con_request(struct pm_dev *dev, pm_request_t rqst, void *data)
        return 0;
 }
 
-#ifdef CONFIG_BOOTSPLASH
-void con_remap_def_color(int currcons, int new_color)
-{
-       unsigned short *sbuf = screenbuf;
-       unsigned c, len = screenbuf_size >> 1;
-       int old_color;
-
-       if (sbuf) {
-              old_color = def_color << 8;
-              new_color <<= 8;
-              while(len--) {
-                      c = *sbuf;
-                      if (((c ^ old_color) & 0xf000) == 0)
-                              *sbuf ^= (old_color ^ new_color) & 0xf000;
-                      if (((c ^ old_color) & 0x0f00) == 0)
-                              *sbuf ^= (old_color ^ new_color) & 0x0f00;
-                      sbuf++;
-              }
-              new_color >>= 8;
-       }
-       def_color = color = new_color;
-       update_attr(currcons);
-}
-#endif
-
 /*
  *     Visible symbols for modules
  */
index d425936..68a1e6a 100644 (file)
@@ -17,7 +17,7 @@ config WATCHDOG
          implementation entirely in software (which can sometimes fail to
          reboot the machine) and a driver for hardware watchdog boards, which
          are more robust and can also keep track of the temperature inside
-         your computer. For details, read <file:Documentation/watchdog.txt>
+         your computer. For details, read <file:Documentation/watchdog/watchdog.txt>
          in the kernel source.
 
          The watchdog is usually used together with the watchdog daemon
@@ -114,7 +114,7 @@ config PCWATCHDOG
          This card simply watches your kernel to make sure it doesn't freeze,
          and if it does, it reboots your computer after a certain amount of
          time. This driver is like the WDT501 driver but for different
-         hardware. Please read <file:Documentation/pcwd-watchdog.txt>. The PC
+         hardware. Please read <file:Documentation/watchdog/pcwd-watchdog.txt>. The PC
          watchdog cards can be ordered from <http://www.berkprod.com/>.
 
          To compile this driver as a module, choose M here: the
@@ -276,6 +276,21 @@ config W83877F_WDT
 
          Most people will say N.
 
+config W83627HF_WDT
+       tristate "W83627HF Watchdog Timer"
+       depends on WATCHDOG
+       ---help---
+         This is the driver for the hardware watchdog on the W83627HF chipset
+         as used in Advantech PC-9578 and Tyan S2721-533 motherboards
+         (and likely others).  This watchdog simply watches your kernel to
+         make sure it doesn't freeze, and if it does, it reboots your computer
+         after a certain amount of time.
+
+         To compile this driver as a module, choose M here: the
+         module will be called w83627hf_wdt.
+
+         Most people will say N.
+
 config MACHZ_WDT
        tristate "ZF MachZ Watchdog"
        depends on WATCHDOG
index 98923d4..02e6021 100644 (file)
@@ -25,6 +25,7 @@ obj-$(CONFIG_SA1100_WATCHDOG) += sa1100_wdt.o
 obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o
 obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o
 obj-$(CONFIG_W83877F_WDT) += w83877f_wdt.o
+obj-$(CONFIG_W83627HF_WDT) += w83627hf_wdt.o
 obj-$(CONFIG_SC520_WDT) += sc520_wdt.o
 obj-$(CONFIG_ALIM7101_WDT) += alim7101_wdt.o
 obj-$(CONFIG_ALIM1535_WDT) += alim1535_wdt.o
index 782584a..f5d1400 100644 (file)
@@ -232,9 +232,8 @@ static ssize_t i810tco_write (struct file *file, const char *data,
 
                /* someone wrote to us, we should reload the timer */
                tco_timer_reload ();
-               return 1;
        }
-       return 0;
+       return len;
 }
 
 static int i810tco_ioctl (struct inode *inode, struct file *file,
index 91ae8dc..6a6289d 100644 (file)
@@ -161,9 +161,8 @@ ibwdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
                        }
                }
                ibwdt_ping();
-               return 1;
        }
-       return 0;
+       return count;
 }
 
 static int
index 8e83980..6f4ec15 100644 (file)
@@ -113,9 +113,8 @@ static ssize_t indydog_write(struct file *file, const char *data, size_t len, lo
                        }
                }
                indydog_ping();
-               return 1;
        }
-       return 0;
+       return len;
 }
 
 static int indydog_ioctl(struct inode *inode, struct file *file,
index f175809..b46cbda 100644 (file)
@@ -343,10 +343,9 @@ static ssize_t zf_write(struct file *file, const char *buf, size_t count,
                next_heartbeat = jiffies + ZF_USER_TIMEO;
                dprintk("user ping at %ld\n", jiffies);
                
-               return 1;
        }
 
-       return 0;
+       return count;
 }
 
 static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
index 7912bc5..91a6bd3 100644 (file)
@@ -156,9 +156,8 @@ static ssize_t mixcomwd_write(struct file *file, const char *data, size_t len, l
                        }
                }
                mixcomwd_ping();
-               return 1;
        }
-       return 0;
+       return len;
 }
 
 static int mixcomwd_ioctl(struct inode *inode, struct file *file,
index 6d3ceae..c84a738 100644 (file)
@@ -419,9 +419,8 @@ static ssize_t pcwd_write(struct file *file, const char *buf, size_t len,
                        }
                }
                pcwd_send_heartbeat();
-               return 1;
        }
-       return 0;
+       return len;
 }
 
 static int pcwd_open(struct inode *ino, struct file *filep)
index ca933d4..8d1bdc5 100644 (file)
@@ -106,7 +106,7 @@ static ssize_t sa1100dog_write(struct file *file, const char *data, size_t len,
                OSMR3 = OSCR + pre_margin;
        }
 
-       return len ? 1 : 0;
+       return len;
 }
 
 static struct watchdog_info ident = {
index 6b79754..9262c4e 100644 (file)
@@ -155,9 +155,8 @@ static ssize_t softdog_write(struct file *file, const char *data, size_t len, lo
                        }
                }
                mod_timer(&watchdog_ticktock, jiffies+(soft_margin*HZ));
-               return 1;
        }
-       return 0;
+       return len;
 }
 
 static int softdog_ioctl(struct inode *inode, struct file *file,
diff --git a/drivers/char/watchdog/w83627hf_wdt.c b/drivers/char/watchdog/w83627hf_wdt.c
new file mode 100644 (file)
index 0000000..4b113a2
--- /dev/null
@@ -0,0 +1,324 @@
+/*
+ *     w83627hf WDT driver
+ *
+ *     (c) Copyright 2003 Pádraig Brady <P@draigBrady.com>
+ *
+ *     Based on advantechwdt.c which is based on wdt.c.
+ *     Original copyright messages:
+ *
+ *     (c) Copyright 2000-2001 Marek Michalkiewicz <marekm@linux.org.pl>
+ *
+ *     (c) Copyright 1996 Alan Cox <alan@redhat.com>, All Rights Reserved.
+ *                             http://www.redhat.com
+ *
+ *     This program is free software; you can redistribute it and/or
+ *     modify it under the terms of the GNU General Public License
+ *     as published by the Free Software Foundation; either version
+ *     2 of the License, or (at your option) any later version.
+ *
+ *     Neither Alan Cox nor CymruNet Ltd. admit liability nor provide
+ *     warranty for any of this software. This material is provided
+ *     "AS-IS" and at no charge.
+ *
+ *     (c) Copyright 1995    Alan Cox <alan@redhat.com>
+ */
+
+#include <linux/module.h>
+#include <linux/moduleparam.h>
+#include <linux/types.h>
+#include <linux/miscdevice.h>
+#include <linux/watchdog.h>
+#include <linux/fs.h>
+#include <linux/ioport.h>
+#include <linux/notifier.h>
+#include <linux/reboot.h>
+#include <linux/init.h>
+
+#include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/system.h>
+
+#define WATCHDOG_NAME "w83627hf WDT"
+#define PFX WATCHDOG_NAME ": "
+#define WATCHDOG_TIMEOUT 60            /* 60 sec default timeout */
+
+static unsigned long wdt_is_open;
+static char expect_close;
+
+/* You must set this - there is no sane way to probe for this board. */
+static int wdt_io = 0x2E;
+module_param(wdt_io, int, 0);
+MODULE_PARM_DESC(wdt_io, "w83627hf WDT io port (default 0x2E)");
+
+static int timeout = WATCHDOG_TIMEOUT; /* in seconds */
+module_param(timeout, int, 0);
+MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds. 1<= timeout <=63, default=" __MODULE_STRING(WATCHDOG_TIMEOUT) ".");
+
+#ifdef CONFIG_WATCHDOG_NOWAYOUT
+static int nowayout = 1;
+#else
+static int nowayout = 0;
+#endif
+
+module_param(nowayout, int, 0);
+MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)");
+
+/*
+ *     Kernel methods.
+ */
+
+#define WDT_EFER (wdt_io+0)   /* Extended Function Enable Registers */
+#define WDT_EFIR (wdt_io+0)   /* Extended Function Index Register (same as EFER) */
+#define WDT_EFDR (WDT_EFIR+1) /* Extended Function Data Register */
+
+static void
+wdt_ctrl(int timeout)
+{
+       outb_p(0x87, WDT_EFER); /* Enter extended function mode */
+       outb_p(0x87, WDT_EFER); /* Again according to manual */
+
+       outb_p(0x07, WDT_EFER); /* point to logical device number reg */
+       outb_p(0x08, WDT_EFDR); /* select logical device 8 (GPIO2) */
+       outb_p(0x30, WDT_EFER); /* select CR30 */
+       outb_p(0x01, WDT_EFDR); /* set bit 0 to activate GPIO2 */
+
+       outb_p(0xF6, WDT_EFER);    /* Select CRF6 */
+       outb_p(timeout, WDT_EFDR); /* Write Timeout counter to CRF6 */
+
+       outb_p(0xAA, WDT_EFER); /* Leave extended function mode */
+}
+
+static void
+wdt_ping(void)
+{
+       wdt_ctrl(timeout);
+}
+
+static void
+wdt_disable(void)
+{
+       wdt_ctrl(0);
+}
+
+static ssize_t
+wdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
+{
+       /*  Can't seek (pwrite) on this device  */
+       if (ppos != &file->f_pos)
+               return -ESPIPE;
+
+       if (count) {
+               if (!nowayout) {
+                       size_t i;
+
+                       expect_close = 0;
+
+                       for (i = 0; i != count; i++) {
+                               char c;
+                               if (get_user(c, buf+i))
+                                       return -EFAULT;
+                               if (c == 'V')
+                                       expect_close = 42;
+                       }
+               }
+               wdt_ping();
+       }
+       return count;
+}
+
+static int
+wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
+         unsigned long arg)
+{
+       int new_timeout;
+       static struct watchdog_info ident = {
+               .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | WDIOF_MAGICCLOSE,
+               .firmware_version = 1,
+               .identity = "Advantech WDT",
+       };
+
+       switch (cmd) {
+       case WDIOC_GETSUPPORT:
+         if (copy_to_user((struct watchdog_info *)arg, &ident, sizeof(ident)))
+           return -EFAULT;
+         break;
+
+       case WDIOC_GETSTATUS:
+       case WDIOC_GETBOOTSTATUS:
+         return put_user(0, (int *)arg);
+
+       case WDIOC_KEEPALIVE:
+         wdt_ping();
+         break;
+
+       case WDIOC_SETTIMEOUT:
+         if (get_user(new_timeout, (int *)arg))
+                 return -EFAULT;
+         if ((new_timeout < 1) || (new_timeout > 63))
+                 return -EINVAL;
+         timeout = new_timeout;
+         wdt_ping();
+         /* Fall */
+
+       case WDIOC_GETTIMEOUT:
+         return put_user(timeout, (int *)arg);
+
+       case WDIOC_SETOPTIONS:
+       {
+         int options, retval = -EINVAL;
+
+         if (get_user(options, (int *)arg))
+           return -EFAULT;
+
+         if (options & WDIOS_DISABLECARD) {
+           wdt_disable();
+           retval = 0;
+         }
+
+         if (options & WDIOS_ENABLECARD) {
+           wdt_ping();
+           retval = 0;
+         }
+
+         return retval;
+       }
+
+       default:
+         return -ENOTTY;
+       }
+       return 0;
+}
+
+static int
+wdt_open(struct inode *inode, struct file *file)
+{
+       if (test_and_set_bit(0, &wdt_is_open))
+               return -EBUSY;
+       /*
+        *      Activate
+        */
+
+       wdt_ping();
+       return 0;
+}
+
+static int
+wdt_close(struct inode *inode, struct file *file)
+{
+       if (expect_close == 42) {
+               wdt_disable();
+       } else {
+               printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n");
+               wdt_ping();
+       }
+       clear_bit(0, &wdt_is_open);
+       expect_close = 0;
+       return 0;
+}
+
+/*
+ *     Notifier for system down
+ */
+
+static int
+wdt_notify_sys(struct notifier_block *this, unsigned long code,
+       void *unused)
+{
+       if (code == SYS_DOWN || code == SYS_HALT) {
+               /* Turn the WDT off */
+               wdt_disable();
+       }
+       return NOTIFY_DONE;
+}
+
+/*
+ *     Kernel Interfaces
+ */
+
+static struct file_operations wdt_fops = {
+       .owner          = THIS_MODULE,
+       .llseek         = no_llseek,
+       .write          = wdt_write,
+       .ioctl          = wdt_ioctl,
+       .open           = wdt_open,
+       .release        = wdt_close,
+};
+
+static struct miscdevice wdt_miscdev = {
+       .minor = WATCHDOG_MINOR,
+       .name = "watchdog",
+       .fops = &wdt_fops,
+};
+
+/*
+ *     The WDT needs to learn about soft shutdowns in order to
+ *     turn the timebomb registers off.
+ */
+
+static struct notifier_block wdt_notifier = {
+       .notifier_call = wdt_notify_sys,
+       .next = NULL,
+       .priority = 0,
+};
+
+static int __init
+wdt_init(void)
+{
+       int ret;
+
+       printk(KERN_INFO "WDT driver for Advantech single board computer initialising.\n");
+
+       if (timeout < 1 || timeout > 63) {
+               timeout = WATCHDOG_TIMEOUT;
+               printk (KERN_INFO PFX "timeout value must be 1<=x<=63, using %d\n",
+                       timeout);
+       }
+
+       if (!request_region(wdt_io, 1, WATCHDOG_NAME)) {
+               printk (KERN_ERR PFX "I/O address 0x%04x already in use\n",
+                       wdt_io);
+               ret = -EIO;
+               goto out;
+       }
+
+       ret = register_reboot_notifier(&wdt_notifier);
+       if (ret != 0) {
+               printk (KERN_ERR PFX "cannot register reboot notifier (err=%d)\n",
+                       ret);
+               goto unreg_regions;
+       }
+
+       ret = misc_register(&wdt_miscdev);
+       if (ret != 0) {
+               printk (KERN_ERR PFX "cannot register miscdev on minor=%d (err=%d)\n",
+                       WATCHDOG_MINOR, ret);
+               goto unreg_reboot;
+       }
+
+       printk (KERN_INFO PFX "initialized. timeout=%d sec (nowayout=%d)\n",
+               timeout, nowayout);
+
+out:
+       return ret;
+unreg_reboot:
+       unregister_reboot_notifier(&wdt_notifier);
+unreg_regions:
+       release_region(wdt_io, 1);
+       goto out;
+}
+
+static void __exit
+wdt_exit(void)
+{
+       misc_deregister(&wdt_miscdev);
+       unregister_reboot_notifier(&wdt_notifier);
+       release_region(wdt_io,1);
+}
+
+module_init(wdt_init);
+module_exit(wdt_exit);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Pádraig Brady <P@draigBrady.com>");
+MODULE_DESCRIPTION("w38627hf WDT driver");
+
index 989a5a8..26df63a 100644 (file)
@@ -265,9 +265,8 @@ static ssize_t wdt_write(struct file *file, const char *buf, size_t count, loff_
                        }
                }
                wdt_ping();
-               return 1;
        }
-       return 0;
+       return count;
 }
 
 /**
index 3c496cf..8fde104 100644 (file)
@@ -74,7 +74,7 @@ config CPU_FREQ_24_API
        help
          This enables the /proc/sys/cpu/ sysctl interface for controlling
          the CPUFreq,"userspace" governor. This is the same interface
-         as known from the.4.-kernel patches for CPUFreq, and offers
+         as known from the 2.4.-kernel patches for CPUFreq, and offers
          the same functionality as long as "userspace" is the
          selected governor for the specified CPU.
        
index a1cafa3..acc7ab6 100644 (file)
        /* debug the protocol by showing transferred bits */
 #define DEF_TIMEOUT 16
 
-/* debugging - slow down transfer to have a look at the data ..        */
-/* I use this with two leds&resistors, each one connected to sda,scl   */
-/* respectively. This makes sure that the algorithm works. Some chips   */
-/* might not like this, as they have an internal timeout of some mils  */
-/*
-#define SLO_IO      jif=jiffies;while(jiffies<=jif+i2c_table[minor].veryslow)\
-                        cond_resched();
-*/
-
 
 /* ----- global variables ---------------------------------------------        */
 
-#ifdef SLO_IO
-       int jif;
-#endif
-
 /* module parameters:
  */
 static int i2c_debug=1;
 static int iic_test=0; /* see if the line-setting functions work       */
-static int iic_scan=0; /* have a look at what's hanging 'round         */
 
 /* --- setting states on the bus with the right timing: ---------------        */
 
@@ -757,8 +743,6 @@ static struct i2c_algorithm iic_algo = {
  */
 int i2c_iic_add_bus(struct i2c_adapter *adap)
 {
-       int i;
-       short status;
        struct i2c_algo_iic_data *iic_adap = adap->algo_data;
 
        if (iic_test) {
@@ -782,24 +766,6 @@ int i2c_iic_add_bus(struct i2c_adapter *adap)
        i2c_add_adapter(adap);
        iic_init(iic_adap);
 
-       /* scan bus */
-       /* By default scanning the bus is turned off. */
-       if (iic_scan) {
-               printk(KERN_INFO " i2c-algo-ite: scanning bus %s.\n",
-                      adap->name);
-               for (i = 0x00; i < 0xff; i+=2) {
-                       iic_outw(iic_adap, ITE_I2CSAR, i);
-                       iic_start(iic_adap);
-                       if ( (wait_for_pin(iic_adap, &status) == 0) && 
-                           ((status & ITE_I2CHSR_DNE) == 0) ) { 
-                               printk(KERN_INFO "\n(%02x)\n",i>>1); 
-                       } else {
-                               printk(KERN_INFO "."); 
-                               iic_reset(iic_adap);
-                       }
-                       udelay(iic_adap->udelay);
-               }
-       }
        return 0;
 }
 
@@ -839,11 +805,9 @@ MODULE_DESCRIPTION("ITE iic algorithm");
 MODULE_LICENSE("GPL");
 
 MODULE_PARM(iic_test, "i");
-MODULE_PARM(iic_scan, "i");
 MODULE_PARM(i2c_debug,"i");
 
 MODULE_PARM_DESC(iic_test, "Test if the I2C bus is available");
-MODULE_PARM_DESC(iic_scan, "Scan for active chips on the bus");
 MODULE_PARM_DESC(i2c_debug,
         "debug level - 0 off; 1 normal; 2,3 more verbose; 9 iic-protocol");
 
index 5037884..acf64dd 100644 (file)
@@ -202,7 +202,7 @@ config I2C_SAVAGE4
 
 config SCx200_I2C
        tristate "NatSemi SCx200 I2C using GPIO pins"
-       depends on SCx200 && I2C_ALGOBIT
+       depends on SCx200_GPIO && I2C_ALGOBIT
        help
          Enable the use of two GPIO pins of a SCx200 processor as an I2C bus.
 
@@ -229,7 +229,7 @@ config SCx200_I2C_SDA
 
 config SCx200_ACB
        tristate "NatSemi SCx200 ACCESS.bus"
-       depends on I2C_ALGOBIT!=n && I2C
+       depends on I2C
        help
          Enable the use of the ACCESS.bus controllers of a SCx200 processor.
 
@@ -276,10 +276,10 @@ config I2C_SIS96X
          will be called i2c-sis96x.
 
 config I2C_VELLEMAN
-       tristate "Velleman K9000 adapter"
+       tristate "Velleman K8000 adapter"
        depends on I2C_ALGOBIT && ISA
        help
-         This supports the Velleman K9000 parallel-port I2C adapter.  Say Y
+         This supports the Velleman K8000 parallel-port I2C adapter.  Say Y
          if you own such an adapter.
 
          This support is also available as a module.  If so, the module 
index c1693a0..2a8b03b 100644 (file)
@@ -119,16 +119,12 @@ static void pcf_isa_waitforpin(void) {
        int timeout = 2;
 
        if (irq > 0) {
-               /* This cli() stuff has to get cleaned up */
-               #if defined(CONFIG_SMP)
-               WARN_ON(1);
-               #endif
-               /* cli(); */
+               cli();
                if (pcf_pending == 0) {
                        interruptible_sleep_on_timeout(&pcf_wait, timeout*HZ );
                } else
                        pcf_pending = 0;
-               /* sti(); */
+               sti();
        } else {
                udelay(100);
        }
index d70c35b..fb4cf41 100644 (file)
 MODULE_DESCRIPTION("IBM IIC driver v" DRIVER_VERSION);
 MODULE_LICENSE("GPL");
 
-static int iic_scan = 0;
-MODULE_PARM(iic_scan, "i");
-MODULE_PARM_DESC(iic_scan, "Scan for active chips on the bus");
-
 static int iic_force_poll = 0;
 MODULE_PARM(iic_force_poll, "i");
 MODULE_PARM_DESC(iic_force_poll, "Force polling mode");
@@ -518,32 +514,6 @@ static struct i2c_algorithm iic_algo = {
 };
 
 /*
- * Scan bus for valid 7-bit addresses (ie things that ACK on 1 byte read)
- * We only scan range [0x08 - 0x77], all other addresses are reserved anyway
- */
-static void __devinit iic_scan_bus(struct ibm_iic_private* dev)
-{
-       int found = 0;
-       char dummy;
-       struct i2c_msg msg = {
-               .buf   = &dummy,
-               .len   = sizeof(dummy),
-               .flags = I2C_M_RD
-       };
-       
-       printk(KERN_INFO "ibm-iic%d: scanning bus...\n" KERN_INFO, dev->idx);
-       
-       for (msg.addr = 8; msg.addr < 0x78; ++msg.addr)
-               if (iic_xfer(&dev->adap, &msg, 1) == 1){
-                       ++found;
-                       printk(" 0x%02x", msg.addr);
-               }
-
-       printk("%sibm-iic%d: %d device(s) detected\n", 
-               found ? "\n" KERN_INFO : "", dev->idx, found);
-}
-
-/*
  * Calculates IICx_CLCKDIV value for a specific OPB clock frequency
  */
 static inline u8 iic_clckdiv(unsigned int opb)
@@ -649,10 +619,6 @@ static int __devinit iic_probe(struct ocp_device *ocp){
        printk(KERN_INFO "ibm-iic%d: using %s mode\n", dev->idx,
                dev->fast_mode ? "fast (400 kHz)" : "standard (100 kHz)");
 
-       /* Scan bus if requested by user */
-       if (iic_scan)
-               iic_scan_bus(dev);
-
        return 0;
 
 fail:  
index a439a51..36fcce3 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/i2c.h>
 #include <linux/i2c-algo-ite.h>
 #include <linux/i2c-adap-ite.h>
+#include "../i2c-ite.h"
 
 #define DEFAULT_BASE  0x14014030
 #define ITE_IIC_IO_SIZE        0x40
index 9efaa18..056b79d 100644 (file)
@@ -99,6 +99,13 @@ MODULE_PARM_DESC(force_addr,
                 "Forcibly enable the PIIX4 at the given address. "
                 "EXTREMELY DANGEROUS!");
 
+/* If fix_hstcfg is set to anything different from 0, we reset one of the
+   registers to be a valid value. */
+static int fix_hstcfg = 0;
+MODULE_PARM(fix_hstcfg, "i");
+MODULE_PARM_DESC(fix_hstcfg,
+               "Fix config register. Needed on some boards (Force CPCI735).");
+
 static int piix4_transaction(void);
 
 
@@ -161,6 +168,22 @@ static int piix4_setup(struct pci_dev *PIIX4_dev, const struct pci_device_id *id
 
        pci_read_config_byte(PIIX4_dev, SMBHSTCFG, &temp);
 
+       /* Some BIOS will set up the chipset incorrectly and leave a register
+          in an undefined state (causing I2C to act very strangely). */
+       if (temp & 0x02) {
+               if (fix_hstcfg) {
+                       dev_info(&PIIX4_dev->dev, "Working around buggy BIOS "
+                                       "(I2C)\n");
+                       temp &= 0xfd;
+                       pci_write_config_byte(PIIX4_dev, SMBHSTCFG, temp);
+               } else {
+                       dev_info(&PIIX4_dev->dev, "Unusual config register "
+                                       "value\n");
+                       dev_info(&PIIX4_dev->dev, "Try using fix_hstcfg=1 if "
+                                       "you experience problems\n");
+               }
+       }
        /* If force_addr is set, we program the new address here. Just to make
           sure, we disable the PIIX4 first. */
        if (force_addr) {
index 8a07bc6..ceae818 100644 (file)
@@ -1,5 +1,5 @@
 /* ------------------------------------------------------------------------- */
-/* i2c-velleman.c i2c-hw access for Velleman K9000 adapters                 */
+/* i2c-velleman.c i2c-hw access for Velleman K8000 adapters                 */
 /* ------------------------------------------------------------------------- */
 /*   Copyright (C) 1995-96, 2000 Simon G. Vogl
 
index 8108afd..8f64084 100644 (file)
@@ -110,12 +110,7 @@ config SENSORS_W83781D
          of sensor chips: the W83781D, W83782D, W83783S and W83682HF,
          and the similar Asus AS99127F.
          
-
-
-config SENSORS_SMBUS_ARP
-       tristate "SMBus ARP 2.0 support"
-       depends on I2C && EXPERIMENTAL
-       select I2C_SENSOR
-         
+         This driver can also be built as a module.  If so, the module
+         will be called w83781d.
 
 endmenu
index d2ab036..787be80 100644 (file)
@@ -13,7 +13,3 @@ obj-$(CONFIG_SENSORS_LM78)    += lm78.o
 obj-$(CONFIG_SENSORS_LM83)     += lm83.o
 obj-$(CONFIG_SENSORS_LM85)     += lm85.o
 obj-$(CONFIG_SENSORS_VIA686A)  += via686a.o
-
-
-
-obj-$(CONFIG_SENSORS_SMBUS_ARP)        += smbus-arp.o
index b54d35a..6259878 100644 (file)
@@ -41,7 +41,7 @@
 
 static unsigned short normal_i2c[] = { I2C_CLIENT_END };
 static unsigned short normal_i2c_range[] = { 0x18, 0x1a, 0x29, 0x2b,
-    0x4c, 0x4e, I2C_CLIENT_END };
+       0x4c, 0x4e, I2C_CLIENT_END };
 static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
 static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END };
 
@@ -78,16 +78,13 @@ SENSORS_INSMOD_1(lm83);
 #define LM83_REG_W_TCRIT               0x5A
 
 /*
- * Conversions, initial values and various macros
+ * Conversions and various macros
  * The LM83 uses signed 8-bit values.
  */
 
 #define TEMP_FROM_REG(val)     ((val > 127 ? val-256 : val) * 1000)
 #define TEMP_TO_REG(val)       ((val < 0 ? val+256 : val) / 1000)
 
-#define LM83_INIT_HIGH         100
-#define LM83_INIT_CRIT         120
-
 static const u8 LM83_REG_R_TEMP[] = {
        LM83_REG_R_LOCAL_TEMP,
        LM83_REG_R_REMOTE1_TEMP,
@@ -114,9 +111,7 @@ static const u8 LM83_REG_W_HIGH[] = {
  */
 
 static int lm83_attach_adapter(struct i2c_adapter *adapter);
-static int lm83_detect(struct i2c_adapter *adapter, int address,
-    int kind);
-static void lm83_init_client(struct i2c_client *client);
+static int lm83_detect(struct i2c_adapter *adapter, int address, int kind);
 static int lm83_detach_client(struct i2c_client *client);
 static void lm83_update_client(struct i2c_client *client);
 
@@ -137,8 +132,7 @@ static struct i2c_driver lm83_driver = {
  * Client data (each client gets its own)
  */
 
-struct lm83_data
-{
+struct lm83_data {
        struct semaphore update_lock;
        char valid; /* zero until following fields are valid */
        unsigned long last_updated; /* in jiffies */
@@ -233,8 +227,7 @@ static int lm83_attach_adapter(struct i2c_adapter *adapter)
  * The following function does more than just detection. If detection
  * succeeds, it also registers the new chip.
  */
-static int lm83_detect(struct i2c_adapter *adapter, int address,
-    int kind)
+static int lm83_detect(struct i2c_adapter *adapter, int address, int kind)
 {
        struct i2c_client *new_client;
        struct lm83_data *data;
@@ -290,6 +283,7 @@ static int lm83_detect(struct i2c_adapter *adapter, int address,
                    LM83_REG_R_MAN_ID);
                chip_id = i2c_smbus_read_byte_data(new_client,
                    LM83_REG_R_CHIP_ID);
+
                if (man_id == 0x01) { /* National Semiconductor */
                        if (chip_id == 0x03) {
                                kind = lm83;
@@ -315,8 +309,10 @@ static int lm83_detect(struct i2c_adapter *adapter, int address,
        if ((err = i2c_attach_client(new_client)))
                goto exit_free;
 
-       /* Initialize the LM83 chip */
-       lm83_init_client(new_client);
+       /*
+        * Initialize the LM83 chip
+        * (Nothing to do for this one.)
+        */
 
        /* Register sysfs hooks */
        device_create_file(&new_client->dev, &dev_attr_temp_input1);
@@ -338,17 +334,6 @@ exit:
        return err;
 }
 
-static void lm83_init_client(struct i2c_client *client)
-{
-       int nr;
-
-       for (nr = 0; nr < 4; nr++)
-               i2c_smbus_write_byte_data(client, LM83_REG_W_HIGH[nr],
-                   TEMP_TO_REG(LM83_INIT_HIGH));
-       i2c_smbus_write_byte_data(client, LM83_REG_W_TCRIT,
-           TEMP_TO_REG(LM83_INIT_CRIT));
-}
-
 static int lm83_detach_client(struct i2c_client *client)
 {
        int err;
@@ -373,6 +358,7 @@ static void lm83_update_client(struct i2c_client *client)
            (jiffies < data->last_updated) ||
            !data->valid) {
                int nr;
+
                dev_dbg(&client->dev, "Updating lm83 data.\n");
                for (nr = 0; nr < 4 ; nr++) {
                        data->temp_input[nr] =
@@ -388,6 +374,7 @@ static void lm83_update_client(struct i2c_client *client)
                    i2c_smbus_read_byte_data(client, LM83_REG_R_STATUS1)
                    + (i2c_smbus_read_byte_data(client, LM83_REG_R_STATUS2)
                    << 8);
+
                data->last_updated = jiffies;
                data->valid = 1;
        }
index 209adf0..8133819 100644 (file)
@@ -433,11 +433,14 @@ static ssize_t set_fan_min(struct device *dev, const char *buf,
                size_t count, int nr)
 {
        struct i2c_client *client = to_i2c_client(dev);
+       struct lm85_data *data = i2c_get_clientdata(client);
        int     val;
 
+       down(&data->update_lock);
        val = simple_strtol(buf, NULL, 10);
-       val = FAN_TO_REG(val);
-       lm85_write_value(client, LM85_REG_FAN_MIN(nr), val);
+       data->fan_min[nr] = FAN_TO_REG(val);
+       lm85_write_value(client, LM85_REG_FAN_MIN(nr), data->fan_min[nr]);
+       up(&data->update_lock);
        return count;
 }
 
@@ -524,11 +527,14 @@ static ssize_t set_pwm(struct device *dev, const char *buf,
                size_t count, int nr)
 {
        struct i2c_client *client = to_i2c_client(dev);
+       struct lm85_data *data = i2c_get_clientdata(client);
        int     val;
 
+       down(&data->update_lock);
        val = simple_strtol(buf, NULL, 10);
-       val = PWM_TO_REG(val);
-       lm85_write_value(client, LM85_REG_PWM(nr), val);
+       data->pwm[nr] = PWM_TO_REG(val);
+       lm85_write_value(client, LM85_REG_PWM(nr), data->pwm[nr]);
+       up(&data->update_lock);
        return count;
 }
 static ssize_t show_pwm_enable(struct device *dev, char *buf, int nr)
@@ -586,11 +592,14 @@ static ssize_t set_in_min(struct device *dev, const char *buf,
                size_t count, int nr)
 {
        struct i2c_client *client = to_i2c_client(dev);
+       struct lm85_data *data = i2c_get_clientdata(client);
        int     val;
 
+       down(&data->update_lock);
        val = simple_strtol(buf, NULL, 10);
-       val = INS_TO_REG(nr, val);
-       lm85_write_value(client, LM85_REG_IN_MIN(nr), val);
+       data->in_min[nr] = INS_TO_REG(nr, val);
+       lm85_write_value(client, LM85_REG_IN_MIN(nr), data->in_min[nr]);
+       up(&data->update_lock);
        return count;
 }
 static ssize_t show_in_max(struct device *dev, char *buf, int nr)
@@ -605,11 +614,14 @@ static ssize_t set_in_max(struct device *dev, const char *buf,
                size_t count, int nr)
 {
        struct i2c_client *client = to_i2c_client(dev);
+       struct lm85_data *data = i2c_get_clientdata(client);
        int     val;
 
+       down(&data->update_lock);
        val = simple_strtol(buf, NULL, 10);
-       val = INS_TO_REG(nr, val);
-       lm85_write_value(client, LM85_REG_IN_MAX(nr), val);
+       data->in_max[nr] = INS_TO_REG(nr, val);
+       lm85_write_value(client, LM85_REG_IN_MAX(nr), data->in_max[nr]);
+       up(&data->update_lock);
        return count;
 }
 #define show_in_reg(offset)                                            \
@@ -669,11 +681,14 @@ static ssize_t set_temp_min(struct device *dev, const char *buf,
                size_t count, int nr)
 {
        struct i2c_client *client = to_i2c_client(dev);
+       struct lm85_data *data = i2c_get_clientdata(client);
        int     val;
 
+       down(&data->update_lock);
        val = simple_strtol(buf, NULL, 10);
-       val = TEMP_TO_REG(val);
-       lm85_write_value(client, LM85_REG_TEMP_MIN(nr), val);
+       data->temp_min[nr] = TEMP_TO_REG(val);
+       lm85_write_value(client, LM85_REG_TEMP_MIN(nr), data->temp_min[nr]);
+       up(&data->update_lock);
        return count;
 }
 static ssize_t show_temp_max(struct device *dev, char *buf, int nr)
@@ -688,11 +703,14 @@ static ssize_t set_temp_max(struct device *dev, const char *buf,
                size_t count, int nr)
 {
        struct i2c_client *client = to_i2c_client(dev);
+       struct lm85_data *data = i2c_get_clientdata(client);
        int     val;
 
+       down(&data->update_lock);
        val = simple_strtol(buf, NULL, 10);
-       val = TEMP_TO_REG(val);
-       lm85_write_value(client, LM85_REG_TEMP_MAX(nr), val);
+       data->temp_max[nr] = TEMP_TO_REG(val);
+       lm85_write_value(client, LM85_REG_TEMP_MAX(nr), data->temp_max[nr]);
+       up(&data->update_lock);
        return count;
 }
 #define show_temp_reg(offset)                                          \
@@ -935,12 +953,8 @@ int lm85_detach_client(struct i2c_client *client)
 
 int lm85_read_value(struct i2c_client *client, u8 reg)
 {
-       struct lm85_data *data = i2c_get_clientdata(client);
        int res;
 
-       /* serialize access to the hardware */
-       down(&data->update_lock);
-
        /* What size location is it? */
        switch( reg ) {
        case LM85_REG_FAN(0) :  /* Read WORD data */
@@ -964,19 +978,14 @@ int lm85_read_value(struct i2c_client *client, u8 reg)
                res = i2c_smbus_read_byte_data(client, reg);
                break ;
        }
-       up(&data->update_lock);
 
        return res ;
 }
 
 int lm85_write_value(struct i2c_client *client, u8 reg, int value)
 {
-       struct lm85_data *data = i2c_get_clientdata(client);
        int res ;
 
-       /* serialize access to the hardware */
-       down(&data->update_lock);
-
        switch( reg ) {
        case LM85_REG_FAN(0) :  /* Write WORD data */
        case LM85_REG_FAN(1) :
@@ -998,7 +1007,6 @@ int lm85_write_value(struct i2c_client *client, u8 reg, int value)
                res = i2c_smbus_write_byte_data(client, reg, value);
                break ;
        }
-       up(&data->update_lock);
 
        return res ;
 }
@@ -1060,6 +1068,8 @@ void lm85_update_client(struct i2c_client *client)
        struct lm85_data *data = i2c_get_clientdata(client);
        int i;
 
+       down(&data->update_lock);
+
        if ( !data->valid ||
             (jiffies - data->last_reading > LM85_DATA_INTERVAL ) ) {
                /* Things that change quickly */
@@ -1197,6 +1207,8 @@ void lm85_update_client(struct i2c_client *client)
        };  /* last_config */
 
        data->valid = 1;
+
+       up(&data->update_lock);
 }
 
 
diff --git a/drivers/i2c/chips/sensors_vid.h b/drivers/i2c/chips/sensors_vid.h
deleted file mode 100644 (file)
index d40e343..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-    vrm.c - Part of lm_sensors, Linux kernel modules for hardware
-               monitoring
-    Copyright (c) 2002 Mark D. Studebaker <mdsxyz123@yahoo.com>
-    With assistance from Trent Piepho <xyzzy@speakeasy.org>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-/*
-    This file contains common code for decoding VID pins.
-    This file is #included in various chip drivers in this directory.
-    As the user is unlikely to load more than one driver which
-    includes this code we don't worry about the wasted space.
-    Reference: VRM x.y DC-DC Converter Design Guidelines,
-    available at http://developer.intel.com
-*/
-
-/*
-    Legal val values 00 - 1F.
-    vrm is the Intel VRM document version.
-    Note: vrm version is scaled by 10 and the return value is scaled by 1000
-    to avoid floating point in the kernel.
-*/
-
-#define DEFAULT_VRM    82
-
-static inline int vid_from_reg(int val, int vrm)
-{
-       switch(vrm) {
-
-       case 91:                /* VRM 9.1 */
-       case 90:                /* VRM 9.0 */
-               return(val == 0x1f ? 0 :
-                                      1850 - val * 25);
-
-       case 85:                /* VRM 8.5 */
-               return((val & 0x10  ? 25 : 0) +
-                      ((val & 0x0f) > 0x04 ? 2050 : 1250) -
-                      ((val & 0x0f) * 50));
-
-       case 84:                /* VRM 8.4 */
-               val &= 0x0f;
-                               /* fall through */
-       default:                /* VRM 8.2 */
-               return(val == 0x1f ? 0 :
-                      val & 0x10  ? 5100 - (val) * 100 :
-                                    2050 - (val) * 50);
-       }
-}
diff --git a/drivers/i2c/chips/smbus-arp.c b/drivers/i2c/chips/smbus-arp.c
deleted file mode 100644 (file)
index db9b25c..0000000
+++ /dev/null
@@ -1,435 +0,0 @@
-/*
-    smbus-arp.c - Part of lm_sensors, Linux kernel modules for hardware
-               monitoring
-    Copyright (c) 2002  Mark D. Studebaker <mdsxyz123@yahoo.com>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include <linux/module.h>
-#include <linux/slab.h>
-#include <linux/i2c.h>
-#include <linux/i2c-sensor.h>
-#include <linux/init.h>
-
-#define DEBUG 1
-
-/* Addresses to scan */
-#define        ARP_ADDRESS     0x61
-static unsigned short normal_i2c[] = { ARP_ADDRESS, I2C_CLIENT_END };
-static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
-static unsigned int normal_isa[] = { I2C_CLIENT_ISA_END };
-static unsigned int normal_isa_range[] = { I2C_CLIENT_ISA_END };
-
-/* Insmod parameters */
-SENSORS_INSMOD_1(arp);
-
-/* ARP Commands */
-#define        ARP_PREPARE             0x01
-#define        ARP_RESET_DEV           0x02
-#define        ARP_GET_UDID_GEN        0x03
-#define        ARP_ASSIGN_ADDR         0x04
-
-/* UDID Fields */
-#define ARP_CAPAB      0
-#define ARP_VER                1
-#define ARP_VEND       2
-#define ARP_DEV                4
-#define ARP_INT                6
-#define ARP_SUBVEND    8
-#define ARP_SUBDEV     10
-#define ARP_SPECID     12
-
-#define UDID_LENGTH    0x11
-
-static u8 reserved[] =
-/* As defined by SMBus Spec. Appendix C */
-                       {0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x28,
-                        0x37, ARP_ADDRESS,
-/* As defined by SMBus Spec. Sect. 5.2 */
-                       0x01, 0x02, 0x03, 0x04, 0x05,
-                       0x06, 0x07, 0x78, 0x79, 0x7a, 0x7b,
-                       0x7c, 0x7d, 0x7e, 0x7f,
-/* Common PC addresses (bad idea) */
-                       0x2d, 0x48, 0x49, /* sensors */
-                       0x50, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x57, /* eeproms */
-                       0x69, /* clock chips */
-/* Must end in 0 which is also reserved */
-                       0x00};
-
-#define SMBUS_ADDRESS_SIZE     0x80
-#define ARP_FREE               0       
-#define ARP_RESERVED           1
-#define ARP_BUSY               2
-
-#define ARP_MAX_DEVICES                8
-struct arp_device {
-       int status;
-       u8 udid[UDID_LENGTH];
-       u8 dev_cap;
-       u8 dev_ver;
-       u16 dev_vid;
-       u16 dev_did;
-       u16 dev_int;
-       u16 dev_svid;
-       u16 dev_sdid;
-       u32 dev_vsid;
-       u8 saddr;
-};
-
-/* Each client has this additional data */
-struct arp_data {
-       struct semaphore update_lock;
-       char valid;                     /* !=0 if following fields are valid */
-       unsigned long last_updated;     /* In jiffies */
-
-       u8 address_pool[SMBUS_ADDRESS_SIZE];
-       struct arp_device dev[ARP_MAX_DEVICES];
-};
-
-
-static int smbusarp_attach_adapter(struct i2c_adapter *adapter);
-static int smbusarp_detect(struct i2c_adapter *adapter, int address, int kind);
-static int smbusarp_detach_client(struct i2c_client *client);
-
-static int smbusarp_init_client(struct i2c_client *client);
-
-static struct i2c_driver smbusarp_driver = {
-       .owner          = THIS_MODULE,
-       .name           = "SMBus_ARP",
-       .id             = I2C_DRIVERID_ARP,
-       .flags          = I2C_DF_NOTIFY,
-       .attach_adapter = smbusarp_attach_adapter,
-       .detach_client  = smbusarp_detach_client,
-};
-
-#if 0
-/* -- SENSORS SYSCTL START -- */
-#define ARP_SYSCTL1    1000
-#define ARP_SYSCTL2    1001
-#define ARP_SYSCTL3    1002
-#define ARP_SYSCTL4    1003
-#define ARP_SYSCTL5    1004
-#define ARP_SYSCTL6    1005
-#define ARP_SYSCTL7    1006
-#define ARP_SYSCTL8    1007
-
-/* -- SENSORS SYSCTL END -- */
-static ctl_table smbusarp_dir_table_template[] = {
-       {ARP_SYSCTL1, "0", NULL, 0, 0644, NULL, &i2c_proc_real,
-        &i2c_sysctl_real, NULL, &smbusarp_contents},
-       {ARP_SYSCTL2, "1", NULL, 0, 0644, NULL, &i2c_proc_real,
-        &i2c_sysctl_real, NULL, &smbusarp_contents},
-       {ARP_SYSCTL3, "2", NULL, 0, 0644, NULL, &i2c_proc_real,
-        &i2c_sysctl_real, NULL, &smbusarp_contents},
-       {ARP_SYSCTL4, "3", NULL, 0, 0644, NULL, &i2c_proc_real,
-        &i2c_sysctl_real, NULL, &smbusarp_contents},
-       {ARP_SYSCTL5, "4", NULL, 0, 0644, NULL, &i2c_proc_real,
-        &i2c_sysctl_real, NULL, &smbusarp_contents},
-       {ARP_SYSCTL6, "5", NULL, 0, 0644, NULL, &i2c_proc_real,
-        &i2c_sysctl_real, NULL, &smbusarp_contents},
-       {ARP_SYSCTL7, "6", NULL, 0, 0644, NULL, &i2c_proc_real,
-        &i2c_sysctl_real, NULL, &smbusarp_contents},
-       {ARP_SYSCTL8, "7", NULL, 0, 0644, NULL, &i2c_proc_real,
-        &i2c_sysctl_real, NULL, &smbusarp_contents},
-       {0}
-};
-#endif
-
-static int smbusarp_id = 0;
-
-static int smbusarp_attach_adapter(struct i2c_adapter *adapter)
-{
-       return i2c_detect(adapter, &addr_data, smbusarp_detect);
-}
-
-/* This function is called by i2c_detect */
-static int smbusarp_detect(struct i2c_adapter *adapter, int address, int kind)
-{
-       struct i2c_client *new_client;
-       struct arp_data *data;
-       int err = 0;
-
-       if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BLOCK_DATA))
-               return(0);
-
-       if (!(new_client = kmalloc(sizeof(struct i2c_client) +
-                                  sizeof(struct arp_data),
-                                  GFP_KERNEL))) {
-               return(-ENOMEM);
-       }
-       memset(new_client, 0x00, sizeof(struct i2c_client) +
-                                sizeof(struct arp_data));
-
-       data = (struct arp_data *) (new_client + 1);
-       new_client->addr = address;
-       i2c_set_clientdata(new_client, data);
-       new_client->adapter = adapter;
-       new_client->driver = &smbusarp_driver;
-       new_client->flags = I2C_CLIENT_PEC;
-
-       strcpy(new_client->name, "arp");
-
-       new_client->id = smbusarp_id++;
-       data->valid = 0;
-       init_MUTEX(&data->update_lock);
-
-       if ((err = i2c_attach_client(new_client)))
-               goto error;
-
-       smbusarp_init_client(new_client);
-       return 0;
-
-error:
-       kfree(new_client);
-       return err;
-}
-
-static int smbusarp_detach_client(struct i2c_client *client)
-{
-       int err;
-
-       err = i2c_detach_client(client);
-       if (err) {
-               dev_err(&client->dev, "Client deregistration failed, client not detached.\n");
-               return err;
-       }
-
-       kfree(client);
-
-       return 0;
-}
-
-
-static u8 choose_addr(u8 * pool)
-{
-       int i;
-
-       for (i = 0; i < 0x7f; i++) {
-               if (pool[i] == ARP_FREE)
-                       return (u8)i;
-       }
-       return 0xff;
-}
-
-static int smbusarp_init_client(struct i2c_client *client)
-{
-       int ret = -1;
-       struct arp_data *data = i2c_get_clientdata(client);
-       struct list_head *item;
-       u8 blk[I2C_SMBUS_BLOCK_MAX];
-       u8 *r;
-       u8 addr;
-       int i;
-       int found = 0;
-       int newdev = 0;
-       
-       for(i = 0; i < ARP_MAX_DEVICES; i++)
-               data->dev[i].status = ARP_FREE;
-
-       for(i = 0; i < SMBUS_ADDRESS_SIZE; i++)
-               data->address_pool[i] = ARP_FREE;
-
-       r = reserved;
-       do {
-               data->address_pool[*r] = ARP_RESERVED;
-       } while(*r++);
-
-       list_for_each(item, &client->adapter->clients) {
-               struct i2c_client *c = list_entry(item, struct i2c_client, list);
-               data->address_pool[c->addr] = ARP_BUSY;
-       }
-
-       ret = i2c_smbus_write_byte(client, ARP_PREPARE);
-       if (ret < 0) {
-               dev_dbg(client->dev, "No ARP response on adapter 0x%X\n", client->adapter->id);
-               return(-1);     /* Packet wasn't acked */
-       }
-       while(1) {
-               ret = i2c_smbus_read_block_data(client, ARP_GET_UDID_GEN, blk);
-               if(ret != UDID_LENGTH) {
-                       dev_dbg(&client->dev, "No/Bad UDID response %d on adapter 0x%X\n", ret, client->adapter->id);
-                       if(found)
-                               return found;
-                       else
-                               return -1;      /* Bad response */
-               }
-               dev_dbg(&client->dev, "Good UDID response on adapter 0x%X\n", client->adapter->id);
-               dev_dbg(&client->dev, "Cap. 0x%02x  Rev. 0x%02x  Vend. 0x%02x%02x  Dev. 0x%02x%02x\n", blk[0], blk[1], blk[2], blk[3], blk[4], blk[5]);
-               dev_dbg(&client->dev, "Int. 0x%02x%02x  Subvend. 0x%02x%02x  Subdev. 0x%02x%02x  Spec. 0x%02x%02x%02x%02x\n", blk[6], blk[7], blk[8], blk[9], blk[10], blk[11], blk[12], blk[13], blk[14], blk[15]);
-
-               /* clean up this... */
-               found++;
-               do {
-                       if (data->dev[newdev].status == ARP_FREE)
-                               break;
-               } while(++newdev < ARP_MAX_DEVICES);
-               if (newdev == ARP_MAX_DEVICES) {
-                       printk(KERN_WARNING "smbus-arp.o: No more slots available\n");
-                       return -1;
-               }
-
-               /* check device slave addr */           
-               addr = blk[16];
-               if(addr != 0xFF) {
-                       addr >>= 1;
-                       if(blk[0] & 0xC0) {
-                               if(data->address_pool[addr] == ARP_FREE) {
-                                       dev_dbg(&client->dev, "Requested free Non-fixed Address 0x%02x\n", addr);
-                               } else {
-                                       dev_dbg(&client->dev, "Requested busy Non-fixed Address 0x%02x\n", addr);
-                                       addr = choose_addr(data->address_pool);
-                                       if (addr == 0xff) {
-                                               dev_warn(&client->dev, "Address pool exhausted\n");
-                                               return -1;
-                                       }
-                               }
-                       } else {
-                               dev_dbg(&client->dev, "Fixed Address 0x%02x\n", addr);
-                       }
-               } else {
-                       dev_dbg(&client->dev, "No Address\n");
-                       addr = choose_addr(data->address_pool);
-                       if (addr == 0xff) {
-                               dev_warn(&client->dev, "Address pool exhausted\n");
-                               return -1;
-                       }
-               }
-               /* store things both ways */
-               for (i = 0; i < UDID_LENGTH; i++)
-                       data->dev[newdev].udid[i] = blk[i];
-               data->dev[newdev].saddr = addr;
-               data->dev[newdev].status = ARP_BUSY;
-               data->dev[newdev].dev_cap = blk[0];
-               data->dev[newdev].dev_ver = blk[1];
-               data->dev[newdev].dev_vid = (blk[2] << 8) | blk[3];
-               data->dev[newdev].dev_did = (blk[4] << 8) | blk[5];
-               data->dev[newdev].dev_int = (blk[6] << 8) | blk[7];
-               data->dev[newdev].dev_svid = (blk[8] << 8) | blk[9];
-               data->dev[newdev].dev_sdid = (blk[10] << 8) | blk[11];
-               data->dev[newdev].dev_vsid = (blk[12] << 24) | (blk[13] << 16) |
-                                            (blk[14] << 8) | blk[15] ;
-
-               blk[16] = addr << 1;
-               ret = i2c_smbus_write_block_data(client, ARP_ASSIGN_ADDR, UDID_LENGTH, blk);
-               if (ret) {
-                       dev_dbg(&client->dev, "Bad response, address 0x%02x not assigned\n", addr);
-               } else {
-                       data->address_pool[addr] = ARP_BUSY;
-                       dev_dbg(&client->dev, "Assigned address 0x%02x\n", addr);
-               }
-                       /* retry? */
-
-       } /* while 1  */
-
-       return ret;
-}
-
-#define show(value)    \
-static ssize_t show_slot_##value(struct device *dev, char *buf, int slot)      \
-{                                                              \
-       struct i2c_client *client = to_i2c_client(dev);         \
-       struct arp_data *data = i2c_get_clientdata(client);     \
-                                                               \
-       return sprintf(buf, "%d\n", data->dev[slot].value);     \
-}
-show(saddr);
-show(dev_cap);
-show(dev_ver);
-show(dev_vid);
-
-#define X(num) \
-static ssize_t show_slot_saddr_##num(struct device *dev, char *buf)    \
-{                                                                      \
-       return show_slot_saddr(dev, buf, num);                          \
-}                                                                      \
-static DEVICE_ATTR(slot_##num, S_IWUSR | S_IRUGO, show_slot_saddr_##num, NULL);
-
-X(0);
-
-#if 0
-/* reassign address on writex */
-static void smbusarp_contents(struct i2c_client *client, int operation,
-                    int ctl_name, int *nrels_mag, long *results)
-{
-       int nr = ctl_name - ARP_SYSCTL1;
-       struct arp_data *data = i2c_get_clientdata(client);
-       int ret;
-       u8 save;
-       u8 a;
-
-       if (operation == SENSORS_PROC_REAL_INFO)
-               *nrels_mag = 0;
-       else if (operation == SENSORS_PROC_REAL_READ) {
-               if(data->dev[nr].status == ARP_BUSY) {
-                       results[0] = data->dev[nr].saddr;
-                       results[1] = data->dev[nr].dev_cap;
-                       results[2] = data->dev[nr].dev_ver;
-                       results[3] = data->dev[nr].dev_vid;
-                       results[4] = data->dev[nr].dev_did;
-                       results[5] = data->dev[nr].dev_int;
-                       results[6] = data->dev[nr].dev_svid;
-                       results[7] = data->dev[nr].dev_sdid;
-                       results[8] = data->dev[nr].dev_vsid;
-                       *nrels_mag = 9;
-               } else {
-                       *nrels_mag = 0;
-               }
-       } else if (operation == SENSORS_PROC_REAL_WRITE) {
-               a = results[0];
-               if ((*nrels_mag >= 1) &&
-                   (a < SMBUS_ADDRESS_SIZE) &&
-                   (data->dev[nr].status == ARP_BUSY) &&
-                   (data->address_pool[a] == ARP_FREE)) {
-                       save = data->dev[nr].udid[16];
-                       data->dev[nr].udid[16] = a << 1;
-                       ret = i2c_smbus_write_block_data(client, ARP_ASSIGN_ADDR, UDID_LENGTH, data->dev[nr].udid);
-                       if (ret) {
-                               data->dev[nr].udid[16] = save;
-                               dev_dbg(&client->dev, "smbus-arp Bad response, address 0x%02x not assigned\n", a);
-                       } else {
-                               data->dev[nr].saddr = a;
-                               data->address_pool[a] = ARP_BUSY;
-                               dev_dbg(&client->dev, "smbus-arp Assigned address 0x%02x\n", a);
-                       }
-               } else {
-                       dev_warn(&client->dev, "smbus-arp Bad address 0x%02x\n", a);
-               }
-       }
-}
-#endif
-
-static int __init sm_smbusarp_init(void)
-{
-       printk(KERN_INFO "smbus-arp\n");
-
-       /* magic force invocation */
-       force_arp[0] = -1;
-       force_arp[1] = ARP_ADDRESS;
-       return i2c_add_driver(&smbusarp_driver);
-}
-
-static void __exit sm_smbusarp_exit(void)
-{
-       i2c_del_driver(&smbusarp_driver);
-}
-
-
-MODULE_AUTHOR("Mark D. Studebaker <mdsxyz123@yahoo.com>");
-MODULE_DESCRIPTION("SMBUS ARP Driver");
-MODULE_LICENSE("GPL");
-
-module_init(sm_smbusarp_init);
-module_exit(sm_smbusarp_exit);
index d314f39..9553fdf 100644 (file)
@@ -136,10 +136,10 @@ int i2c_add_adapter(struct i2c_adapter *adap)
 
        /* Add the adapter to the driver core.
         * If the parent pointer is not set up,
-        * we add this adapter to the legacy bus.
+        * we add this adapter to the host bus.
         */
        if (adap->dev.parent == NULL)
-               adap->dev.parent = &legacy_bus;
+               adap->dev.parent = &platform_bus;
        sprintf(adap->dev.bus_id, "i2c-%d", adap->nr);
        adap->dev.driver = &i2c_adapter_driver;
        adap->dev.release = &i2c_adapter_dev_release;
index 62d157f..9220b46 100644 (file)
@@ -223,7 +223,7 @@ int i2cdev_ioctl (struct inode *inode, struct file *file, unsigned int cmd,
 
                /* Put an arbritrary limit on the number of messages that can
                 * be sent at once */
-               if (rdwr_arg.nmsgs > 42)
+               if (rdwr_arg.nmsgs > I2C_RDRW_IOCTL_MAX_MSGS)
                        return -EINVAL;
                
                rdwr_pa = (struct i2c_msg *)
@@ -447,7 +447,7 @@ static int i2cdev_attach_adapter(struct i2c_adapter *adap)
 
        /* register this i2c device with the driver core */
        i2c_dev->adap = adap;
-       if (adap->dev.parent == &legacy_bus)
+       if (adap->dev.parent == &platform_bus)
                i2c_dev->class_dev.dev = &adap->dev;
        else
                i2c_dev->class_dev.dev = adap->dev.parent;
index 116b750..d210fe9 100644 (file)
@@ -745,6 +745,14 @@ config BLK_DEV_SVWKS
          This driver adds PIO/(U)DMA support for the ServerWorks OSB4/CSB5
          chipsets.
 
+config BLK_DEV_SGIIOC4
+       tristate "Silicon Graphics IOC4 chipset support"
+       depends on IA64_SGI_SN2
+       help
+         This driver adds PIO & MultiMode DMA-2 support for the SGI IOC4
+         chipset, which has one channel and can support two devices.
+         Please say Y here if you have an Altix System from SGI.
+
 config BLK_DEV_SIIMAGE
        tristate "Silicon Image chipset support"
        help
index 0e2f7aa..5bf7dc8 100644 (file)
@@ -214,7 +214,7 @@ static void icside_maskproc(ide_drive_t *drive, int mask)
 #define NR_ENTRIES 256
 #define TABLE_SIZE (NR_ENTRIES * 8)
 
-static void ide_build_sglist(ide_drive_t *drive, struct request *rq)
+static void icside_build_sglist(ide_drive_t *drive, struct request *rq)
 {
        ide_hwif_t *hwif = drive->hwif;
        struct icside_state *state = hwif->hwif_data;
@@ -543,7 +543,7 @@ icside_dma_common(ide_drive_t *drive, struct request *rq,
        BUG_ON(hwif->sg_dma_active);
        BUG_ON(dma_channel_active(hwif->hw.dma));
 
-       ide_build_sglist(drive, rq);
+       icside_build_sglist(drive, rq);
 
        /*
         * Ensure that we have the right interrupt routed.
index c332518..5756c5c 100644 (file)
@@ -3343,7 +3343,8 @@ static int idecd_open(struct inode * inode, struct file * file)
        drive->usage++;
 
        if (!info->buffer)
-               info->buffer = (char *) kmalloc(SECTOR_BUFFER_SIZE, GFP_KERNEL);
+               info->buffer = kmalloc(SECTOR_BUFFER_SIZE,
+                                       GFP_KERNEL|__GFP_REPEAT);
         if (!info->buffer || (rc = cdrom_open(&info->devinfo, inode, file)))
                drive->usage--;
        return rc;
index 10b5b3a..8864718 100644 (file)
@@ -200,8 +200,8 @@ EXPORT_SYMBOL_GPL(ide_dma_intr);
  *     kernel provide the necessary cache management so that we can
  *     operate in a portable fashion
  */
-static int ide_build_sglist (ide_drive_t *drive, struct request *rq)
+
+int ide_build_sglist(ide_drive_t *drive, struct request *rq)
 {
        ide_hwif_t *hwif = HWIF(drive);
        struct scatterlist *sg = hwif->sg_table;
@@ -220,6 +220,8 @@ static int ide_build_sglist (ide_drive_t *drive, struct request *rq)
        return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction);
 }
 
+EXPORT_SYMBOL_GPL(ide_build_sglist);
+
 /**
  *     ide_raw_build_sglist    -       map IDE scatter gather for DMA
  *     @drive: the drive to build the DMA table for
@@ -230,8 +232,8 @@ static int ide_build_sglist (ide_drive_t *drive, struct request *rq)
  *     of the  kernel provide the necessary cache management so that we can
  *     operate in a portable fashion
  */
-static int ide_raw_build_sglist (ide_drive_t *drive, struct request *rq)
+
+int ide_raw_build_sglist(ide_drive_t *drive, struct request *rq)
 {
        ide_hwif_t *hwif = HWIF(drive);
        struct scatterlist *sg = hwif->sg_table;
@@ -270,6 +272,8 @@ static int ide_raw_build_sglist (ide_drive_t *drive, struct request *rq)
        return pci_map_sg(hwif->pci_dev, sg, nents, hwif->sg_dma_direction);
 }
 
+EXPORT_SYMBOL_GPL(ide_raw_build_sglist);
+
 /**
  *     ide_build_dmatable      -       build IDE DMA table
  *
@@ -925,11 +929,13 @@ int ide_release_iomio_dma (ide_hwif_t *hwif)
  */
 int ide_release_dma (ide_hwif_t *hwif)
 {
+       if (hwif->mmio == 2)
+               return 1;
        if (hwif->chipset == ide_etrax100)
                return 1;
 
        ide_release_dma_engine(hwif);
-       if (hwif->mmio)
+       if (hwif->mmio == 1)
                return ide_release_mmio_dma(hwif);
        return ide_release_iomio_dma(hwif);
 }
@@ -986,6 +992,21 @@ fail:
        return 1;
 }
 
+int ide_mapped_mmio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
+{
+       printk(KERN_INFO "    %s: MMIO-DMA ", hwif->name);
+
+       hwif->dma_base = base;
+       if (hwif->cds->extra && hwif->channel == 0)
+               hwif->dma_extra = hwif->cds->extra;
+
+       if(hwif->mate)
+               hwif->dma_master = (hwif->channel) ? hwif->mate->dma_base : base;
+       else
+               hwif->dma_master = base;
+       return 0;
+}
+
 int ide_iomio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
 {
        printk(KERN_INFO "    %s: BM-DMA at 0x%04lx-0x%04lx",
@@ -1020,7 +1041,9 @@ int ide_iomio_dma (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
  */
 int ide_dma_iobase (ide_hwif_t *hwif, unsigned long base, unsigned int ports)
 {
-       if (hwif->mmio)
+       if (hwif->mmio == 2)
+               return ide_mapped_mmio_dma(hwif, base,ports);
+       if (hwif->mmio == 1)
                return ide_mmio_dma(hwif, base, ports);
        return ide_iomio_dma(hwif, base, ports);
 }
index 06d6292..a239bba 100644 (file)
@@ -647,6 +647,15 @@ int ide_wait_stat (ide_startstop_t *startstop, ide_drive_t *drive, u8 good, u8 b
                timeout += jiffies;
                while ((stat = hwif->INB(IDE_STATUS_REG)) & BUSY_STAT) {
                        if (time_after(jiffies, timeout)) {
+                               /*
+                                * One last read after the timeout in case
+                                * heavy interrupt load made us not make any
+                                * progress during the timeout..
+                                */
+                               stat = hwif->INB(IDE_STATUS_REG);
+                               if (!(stat & BUSY_STAT))
+                                       break;
+
                                local_irq_restore(flags);
                                *startstop = DRIVER(drive)->error(drive, "status timeout", stat);
                                return 1;
index a0ed34e..f9215ee 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * linux/drivers/ide/ide-tape.c                Version 1.17b   Oct, 2002
+ * linux/drivers/ide/ide-tape.c                Version 1.18    Nov, 2003
  *
  * Copyright (C) 1995 - 1999 Gadi Oxman <gadio@netvision.net.il>
  *
  *             sharing a (fast) ATA-2 disk with any (slow) new ATAPI device.
  */
 
-#define IDETAPE_VERSION "1.17b-ac1"
+#define IDETAPE_VERSION "1.18"
 
 #include <linux/config.h>
 #include <linux/module.h>
 #include <asm/unaligned.h>
 #include <asm/bitops.h>
 
-
-#define NO_LONGER_REQUIRED     (1)
-
 /*
  *     OnStream support
  */
@@ -652,9 +649,11 @@ typedef struct {
 #define IDETAPE_PC_STACK               (10 + IDETAPE_MAX_PC_RETRIES)
 
 /*
- *     Some tape drives require a long irq timeout
+ * Some drives (for example, Seagate STT3401A Travan) require a very long
+ * timeout, because they don't return an interrupt or clear their busy bit
+ * until after the command completes (even retension commands).
  */
-#define IDETAPE_WAIT_CMD               (60*HZ)
+#define IDETAPE_WAIT_CMD               (900*HZ)
 
 /*
  *     The following parameter is used to select the point in the internal
@@ -1032,6 +1031,10 @@ typedef struct {
 
        /* the door is currently locked */
        int door_locked;
+       /* the tape hardware is write protected */
+       char drv_write_prot;
+       /* the tape is write protected (hardware or opened as read-only) */
+       char write_prot;
 
        /*
         * OnStream flags
@@ -1164,6 +1167,8 @@ typedef struct {
 #define IDETAPE_DRQ_INTERRUPT          6       /* DRQ interrupt device */
 #define IDETAPE_READ_ERROR             7
 #define IDETAPE_PIPELINE_ACTIVE                8       /* pipeline active */
+/* 0 = no tape is loaded, so we don't rewind after ejecting */
+#define IDETAPE_MEDIUM_PRESENT         9
 
 /*
  *     Supported ATAPI tape drives packet commands
@@ -1665,6 +1670,20 @@ static void idetape_analyze_error (ide_drive_t *drive, idetape_request_sense_res
                idetape_update_buffers(pc);
        }
 
+       /*
+        * If error was the result of a zero-length read or write command,
+        * with sense key=5, asc=0x22, ascq=0, let it slide.  Some drives
+        * (i.e. Seagate STT3401A Travan) don't support 0-length read/writes.
+        */
+       if ((pc->c[0] == IDETAPE_READ_CMD || pc->c[0] == IDETAPE_WRITE_CMD)
+           && pc->c[4] == 0 && pc->c[3] == 0 && pc->c[2] == 0) { /* length==0 */
+               if (result->sense_key == 5) {
+                       /* don't report an error, everything's ok */
+                       pc->error = 0;
+                       /* don't retry read/write */
+                       set_bit(PC_ABORT, &pc->flags);
+               }
+       }
        if (pc->c[0] == IDETAPE_READ_CMD && result->filemark) {
                pc->error = IDETAPE_ERROR_FILEMARK;
                set_bit(PC_ABORT, &pc->flags);
@@ -1805,10 +1824,15 @@ static void idetape_remove_stage_head (ide_drive_t *drive)
        }
 }
 
-static void idetape_abort_pipeline (ide_drive_t *drive, idetape_stage_t *last_stage)
+/*
+ * This will free all the pipeline stages starting from new_last_stage->next
+ * to the end of the list, and point tape->last_stage to new_last_stage.
+ */
+static void idetape_abort_pipeline(ide_drive_t *drive,
+                                  idetape_stage_t *new_last_stage)
 {
        idetape_tape_t *tape = drive->driver_data;
-       idetape_stage_t *stage = tape->next_stage;
+       idetape_stage_t *stage = new_last_stage->next;
        idetape_stage_t *nstage;
 
 #if IDETAPE_DEBUG_LOG
@@ -1822,9 +1846,9 @@ static void idetape_abort_pipeline (ide_drive_t *drive, idetape_stage_t *last_st
                --tape->nr_pending_stages;
                stage = nstage;
        }
-       tape->last_stage = last_stage;
-       if (last_stage)
-               last_stage->next = NULL;
+       if (new_last_stage)
+               new_last_stage->next = NULL;
+       tape->last_stage = new_last_stage;
        tape->next_stage = NULL;
 }
 
@@ -2430,7 +2454,14 @@ static void idetape_create_mode_sense_cmd (idetape_pc_t *pc, u8 page_code)
        if (page_code != IDETAPE_BLOCK_DESCRIPTOR)
                pc->c[1] = 8;   /* DBD = 1 - Don't return block descriptors */
        pc->c[2] = page_code;
-       pc->c[3] = 255;         /* Don't limit the returned information */
+       /*
+        * Changed pc->c[3] to 0 (255 will at best return unused info).
+        *
+        * For SCSI this byte is defined as subpage instead of high byte
+        * of length and some IDE drives seem to interpret it this way
+        * and return an error when 255 is used.
+        */
+       pc->c[3] = 0;
        pc->c[4] = 255;         /* (We will just discard data in that case) */
        if (page_code == IDETAPE_BLOCK_DESCRIPTOR)
                pc->request_transfer = 12;
@@ -2544,8 +2575,9 @@ static ide_startstop_t idetape_media_access_finished (ide_drive_t *drive)
        if (status.b.dsc) {
                if (status.b.check) {
                        /* Error detected */
-                       printk(KERN_ERR "ide-tape: %s: I/O error, ",tape->name);
-
+                       if (pc->c[0] != IDETAPE_TEST_UNIT_READY_CMD)
+                               printk(KERN_ERR "ide-tape: %s: I/O error, ",
+                                               tape->name);
                        /* Retry operation */
                        return idetape_retry_pc(drive);
                }
@@ -3295,25 +3327,28 @@ static int idetape_wait_ready(ide_drive_t *drive, unsigned long timeout)
 {
        idetape_tape_t *tape = drive->driver_data;
        idetape_pc_t pc;
+       int load_attempted = 0;
 
        /*
         * Wait for the tape to become ready
         */
+       set_bit(IDETAPE_MEDIUM_PRESENT, &tape->flags);
        timeout += jiffies;
        while (time_before(jiffies, timeout)) {
                idetape_create_test_unit_ready_cmd(&pc);
                if (!__idetape_queue_pc_tail(drive, &pc))
                        return 0;
-               if (tape->sense_key == 2 && tape->asc == 4 && tape->ascq == 2) {
+               if ((tape->sense_key == 2 && tape->asc == 4 && tape->ascq == 2)
+                   || (tape->asc == 0x3A)) {   /* no media */
+                       if (load_attempted)
+                               return -ENOMEDIUM;
                        idetape_create_load_unload_cmd(drive, &pc, IDETAPE_LU_LOAD_MASK);
                        __idetape_queue_pc_tail(drive, &pc);
-                       idetape_create_test_unit_ready_cmd(&pc);
-                       if (!__idetape_queue_pc_tail(drive, &pc))
-                               return 0;
-               }
-               if (!(tape->sense_key == 2 && tape->asc == 4 &&
-                     (tape->ascq == 1 || tape->ascq == 8)))
-                       break;
+                       load_attempted = 1;
+               /* not about to be ready */
+               } else if (!(tape->sense_key == 2 && tape->asc == 4 &&
+                            (tape->ascq == 1 || tape->ascq == 8)))
+                       return -EIO;
                current->state = TASK_INTERRUPTIBLE;
                schedule_timeout(HZ / 10);
        }
@@ -3369,25 +3404,10 @@ static int idetape_read_position (ide_drive_t *drive)
                printk(KERN_INFO "ide-tape: Reached idetape_read_position\n");
 #endif /* IDETAPE_DEBUG_LOG */
 
-#ifdef NO_LONGER_REQUIRED
-       idetape_flush_tape_buffers(drive);
-#endif
        idetape_create_read_position_cmd(&pc);
        if (idetape_queue_pc_tail(drive, &pc))
                return -1;
        position = tape->first_frame_position;
-#ifdef NO_LONGER_REQUIRED
-       if (tape->onstream) {
-               if ((position != tape->last_frame_position - tape->blocks_in_buffer) &&
-                   (position != tape->last_frame_position + tape->blocks_in_buffer)) {
-                       if (tape->blocks_in_buffer == 0) {
-                               printk("ide-tape: %s: correcting read position %d, %d, %d\n", tape->name, position, tape->last_frame_position, tape->blocks_in_buffer);
-                               position = tape->last_frame_position;
-                               tape->first_frame_position = position;
-                       }
-               }
-       }
-#endif
        return position;
 }
 
@@ -3436,6 +3456,8 @@ static int __idetape_discard_read_pipeline (ide_drive_t *drive)
 
        if (tape->chrdev_direction != idetape_direction_read)
                return 0;
+
+       /* Remove merge stage. */
        cnt = tape->merge_stage_size / tape->tape_block_size;
        if (test_and_clear_bit(IDETAPE_FILEMARK, &tape->flags))
                ++cnt;          /* Filemarks count as 1 sector */
@@ -3444,9 +3466,12 @@ static int __idetape_discard_read_pipeline (ide_drive_t *drive)
                __idetape_kfree_stage(tape->merge_stage);
                tape->merge_stage = NULL;
        }
+
+       /* Clear pipeline flags. */
        clear_bit(IDETAPE_PIPELINE_ERROR, &tape->flags);
        tape->chrdev_direction = idetape_direction_none;
-       
+
+       /* Remove pipeline stages. */
        if (tape->first_stage == NULL)
                return 0;
 
@@ -4059,13 +4084,17 @@ static int idetape_initiate_read (ide_drive_t *drive, int max_stages)
                 *      Issue a read 0 command to ensure that DSC handshake
                 *      is switched from completion mode to buffer available
                 *      mode.
+                *      No point in issuing this if DSC overlap isn't supported,
+                *      some drives (Seagate STT3401A) will return an error.
                 */
-               bytes_read = idetape_queue_rw_tail(drive, REQ_IDETAPE_READ, 0, tape->merge_stage->bh);
-               if (bytes_read < 0) {
-                       __idetape_kfree_stage(tape->merge_stage);
-                       tape->merge_stage = NULL;
-                       tape->chrdev_direction = idetape_direction_none;
-                       return bytes_read;
+               if (drive->dsc_overlap) {
+                       bytes_read = idetape_queue_rw_tail(drive, REQ_IDETAPE_READ, 0, tape->merge_stage->bh);
+                       if (bytes_read < 0) {
+                               __idetape_kfree_stage(tape->merge_stage);
+                               tape->merge_stage = NULL;
+                               tape->chrdev_direction = idetape_direction_none;
+                               return bytes_read;
+                       }
                }
        }
        if (tape->restart_speed_control_req)
@@ -4898,6 +4927,10 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf,
                return -ENXIO;
        }
 
+       /* The drive is write protected. */
+       if (tape->write_prot)
+               return -EACCES;
+
 #if IDETAPE_DEBUG_LOG
        if (tape->debug_level >= 3)
                printk(KERN_INFO "ide-tape: Reached idetape_chrdev_write, "
@@ -4979,13 +5012,17 @@ static ssize_t idetape_chrdev_write (struct file *file, const char *buf,
                 *      Issue a write 0 command to ensure that DSC handshake
                 *      is switched from completion mode to buffer available
                 *      mode.
+                *      No point in issuing this if DSC overlap isn't supported,
+                *      some drives (Seagate STT3401A) will return an error.
                 */
-               retval = idetape_queue_rw_tail(drive, REQ_IDETAPE_WRITE, 0, tape->merge_stage->bh);
-               if (retval < 0) {
-                       __idetape_kfree_stage(tape->merge_stage);
-                       tape->merge_stage = NULL;
-                       tape->chrdev_direction = idetape_direction_none;
-                       return retval;
+               if (drive->dsc_overlap) {
+                       retval = idetape_queue_rw_tail(drive, REQ_IDETAPE_WRITE, 0, tape->merge_stage->bh);
+                       if (retval < 0) {
+                               __idetape_kfree_stage(tape->merge_stage);
+                               tape->merge_stage = NULL;
+                               tape->chrdev_direction = idetape_direction_none;
+                               return retval;
+                       }
                }
 #if ONSTREAM_DEBUG
                if (tape->debug_level >= 2)
@@ -5141,7 +5178,7 @@ ok:
  *     Note:
  *
  *             MTBSF and MTBSFM are not supported when the tape doesn't
- *             supports spacing over filemarks in the reverse direction.
+ *             support spacing over filemarks in the reverse direction.
  *             In this case, MTFSFM is also usually not supported (it is
  *             supported in the rare case in which we crossed the filemark
  *             during our read-ahead pipelined operation mode).
@@ -5211,6 +5248,8 @@ static int idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count)
        }
        switch (mt_op) {
                case MTWEOF:
+                       if (tape->write_prot)
+                               return -EACCES;
                        idetape_discard_read_pipeline(drive, 1);
                        for (i = 0; i < mt_count; i++) {
                                retval = idetape_write_filemark(drive);
@@ -5231,9 +5270,21 @@ static int idetape_mtioctop (ide_drive_t *drive,short mt_op,int mt_count)
                        return (idetape_queue_pc_tail(drive, &pc));
                case MTUNLOAD:
                case MTOFFL:
+                       /*
+                        * If door is locked, attempt to unlock before
+                        * attempting to eject.
+                        */
+                       if (tape->door_locked) {
+                               if (idetape_create_prevent_cmd(drive, &pc, 0))
+                                       if (!idetape_queue_pc_tail(drive, &pc))
+                                               tape->door_locked = DOOR_UNLOCKED;
+                       }
                        idetape_discard_read_pipeline(drive, 0);
                        idetape_create_load_unload_cmd(drive, &pc,!IDETAPE_LU_LOAD_MASK);
-                       return (idetape_queue_pc_tail(drive, &pc));
+                       retval = idetape_queue_pc_tail(drive, &pc);
+                       if (!retval)
+                               clear_bit(IDETAPE_MEDIUM_PRESENT, &tape->flags);
+                       return retval;
                case MTNOP:
                        idetape_discard_read_pipeline(drive, 0);
                        return (idetape_flush_tape_buffers(drive));
@@ -5409,6 +5460,8 @@ static int idetape_chrdev_ioctl (struct inode *inode, struct file *file, unsigne
                                        mtget.mt_gstat |= GMT_EOD(0xffffffff);
                                if (position <= OS_DATA_STARTFRAME1)
                                        mtget.mt_gstat |= GMT_BOT(0xffffffff);
+                       } else if (tape->drv_write_prot) {
+                               mtget.mt_gstat |= GMT_WR_PROT(0xffffffff);
                        }
                        if (copy_to_user((char *) arg,(char *) &mtget, sizeof(struct mtget)))
                                return -EFAULT;
@@ -5530,6 +5583,8 @@ ok:
        return 1;
 }
 
+static void idetape_get_blocksize_from_block_descriptor(ide_drive_t *drive);
+
 /*
  *     Our character device open function.
  */
@@ -5539,7 +5594,8 @@ static int idetape_chrdev_open (struct inode *inode, struct file *filp)
        ide_drive_t *drive;
        idetape_tape_t *tape;
        idetape_pc_t pc;
-                       
+       int retval;
+
 #if IDETAPE_DEBUG_LOG
        printk(KERN_INFO "ide-tape: Reached idetape_chrdev_open\n");
 #endif /* IDETAPE_DEBUG_LOG */
@@ -5552,11 +5608,7 @@ static int idetape_chrdev_open (struct inode *inode, struct file *filp)
 
        if (test_and_set_bit(IDETAPE_BUSY, &tape->flags))
                return -EBUSY;
-       if (!tape->onstream) {  
-               idetape_read_position(drive);
-               if (!test_bit(IDETAPE_ADDRESS_VALID, &tape->flags))
-                       (void) idetape_rewind_tape(drive);
-       } else {
+       if (tape->onstream) {
                if (minor & 64) {
                        tape->tape_block_size = tape->stage_size = 32768 + 512;
                        tape->raw = 1;
@@ -5566,16 +5618,42 @@ static int idetape_chrdev_open (struct inode *inode, struct file *filp)
                }
                 idetape_onstream_mode_sense_tape_parameter_page(drive, tape->debug_level);
        }
-       if (idetape_wait_ready(drive, 60 * HZ)) {
+       retval = idetape_wait_ready(drive, 60 * HZ);
+       if (retval) {
                clear_bit(IDETAPE_BUSY, &tape->flags);
                printk(KERN_ERR "ide-tape: %s: drive not ready\n", tape->name);
-               return -EBUSY;
+               return retval;
        }
-       if (tape->onstream)
-               idetape_read_position(drive);
+
+       idetape_read_position(drive);
+       if (!test_bit(IDETAPE_ADDRESS_VALID, &tape->flags))
+               (void)idetape_rewind_tape(drive);
+
        if (tape->chrdev_direction != idetape_direction_read)
                clear_bit(IDETAPE_PIPELINE_ERROR, &tape->flags);
 
+       /* Read block size and write protect status from drive. */
+       idetape_get_blocksize_from_block_descriptor(drive);
+
+       /* Set write protect flag if device is opened as read-only. */
+       if ((filp->f_flags & O_ACCMODE) == O_RDONLY)
+               tape->write_prot = 1;
+       else
+               tape->write_prot = tape->drv_write_prot;
+
+       /* Make sure drive isn't write protected if user wants to write. */
+       if (tape->write_prot) {
+               if ((filp->f_flags & O_ACCMODE) == O_WRONLY ||
+                   (filp->f_flags & O_ACCMODE) == O_RDWR) {
+                       clear_bit(IDETAPE_BUSY, &tape->flags);
+                       return -EROFS;
+               }
+       }
+
+       /*
+        * Lock the tape drive door so user can't eject.
+        * Analyze headers for OnStream drives.
+        */
        if (tape->chrdev_direction == idetape_direction_none) {
                if (idetape_create_prevent_cmd(drive, &pc, 1)) {
                        if (!idetape_queue_pc_tail(drive, &pc)) {
@@ -5638,7 +5716,7 @@ static int idetape_chrdev_release (struct inode *inode, struct file *filp)
                __idetape_kfree_stage(tape->cache_stage);
                tape->cache_stage = NULL;
        }
-       if (minor < 128)
+       if (minor < 128 && test_bit(IDETAPE_MEDIUM_PRESENT, &tape->flags))
                (void) idetape_rewind_tape(drive);
        if (tape->chrdev_direction == idetape_direction_none) {
                if (tape->door_locked == DOOR_LOCKED) {
@@ -6059,6 +6137,8 @@ static void idetape_get_blocksize_from_block_descriptor(ide_drive_t *drive)
        header = (idetape_mode_parameter_header_t *) pc.buffer;
        block_descrp = (idetape_parameter_block_descriptor_t *) (pc.buffer + sizeof(idetape_mode_parameter_header_t));
        tape->tape_block_size =( block_descrp->length[0]<<16) + (block_descrp->length[1]<<8) + block_descrp->length[2];
+       tape->drv_write_prot = (header->dsp & 0x80) >> 7;
+
 #if IDETAPE_DEBUG_INFO
        printk(KERN_INFO "ide-tape: Adjusted block size - %d\n", tape->tape_block_size);
 #endif /* IDETAPE_DEBUG_INFO */
@@ -6139,6 +6219,9 @@ static void idetape_setup (ide_drive_t *drive, idetape_tape_t *tape, int minor)
                }
        }
 #endif /* CONFIG_BLK_DEV_IDEPCI */
+       /* Seagate Travan drives do not support DSC overlap. */
+       if (strstr(drive->id->model, "Seagate STT3401"))
+               drive->dsc_overlap = 0;
        tape->drive = drive;
        tape->minor = minor;
        tape->name[0] = 'h';
index 150eddf..f85b998 100644 (file)
@@ -1632,12 +1632,12 @@ int generic_ide_ioctl(struct block_device *bdev, unsigned int cmd,
 #endif /* CONFIG_IDE_TASK_IOCTL */
 
                case HDIO_DRIVE_CMD:
-                       if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
+                       if (!capable(CAP_SYS_RAWIO))
                                return -EACCES;
                        return ide_cmd_ioctl(drive, cmd, arg);
 
                case HDIO_DRIVE_TASK:
-                       if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
+                       if (!capable(CAP_SYS_RAWIO))
                                return -EACCES;
                        return ide_task_ioctl(drive, cmd, arg);
 
index 0d52ea7..3d2e121 100644 (file)
@@ -21,6 +21,7 @@ obj-$(CONFIG_BLK_DEV_PDC202XX_NEW)    += pdc202xx_new.o
 obj-$(CONFIG_BLK_DEV_PIIX)             += piix.o
 obj-$(CONFIG_BLK_DEV_RZ1000)           += rz1000.o
 obj-$(CONFIG_BLK_DEV_SVWKS)            += serverworks.o
+obj-$(CONFIG_BLK_DEV_SGIIOC4)          += sgiioc4.o
 obj-$(CONFIG_BLK_DEV_SIIMAGE)          += siimage.o
 obj-$(CONFIG_BLK_DEV_SIS5513)          += sis5513.o
 obj-$(CONFIG_BLK_DEV_SL82C105)         += sl82c105.o
index fd9a59c..4d9ebf7 100644 (file)
@@ -768,8 +768,8 @@ static void __init piix_check_450nx(void)
                /* Only on the original revision: IDE DMA can hang */
                if(rev == 0x00)
                        no_piix_dma = 1;
-               /* On all revisions PXB bus lock must be disabled for IDE */
-               else if(cfg & (1<<14))
+               /* On all revisions below 5 PXB bus lock must be disabled for IDE */
+               else if(cfg & (1<<14) && rev < 5)
                        no_piix_dma = 2;
        }
        if(no_piix_dma)
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c
new file mode 100644 (file)
index 0000000..44e8baa
--- /dev/null
@@ -0,0 +1,833 @@
+/*
+ * Copyright (c) 2003 Silicon Graphics, Inc.  All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of version 2 of the GNU General Public License
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it would be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
+ *
+ * Contact information:  Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
+ * Mountain View, CA  94043, or:
+ *
+ * http://www.sgi.com
+ *
+ * For further information regarding this notice, see:
+ *
+ * http://oss.sgi.com/projects/GenInfo/NoticeExplan
+ */
+
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/pci.h>
+#include <linux/delay.h>
+#include <linux/hdreg.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/timer.h>
+#include <linux/mm.h>
+#include <linux/ioport.h>
+#include <linux/blkdev.h>
+#include <asm/io.h>
+
+#include <linux/ide.h>
+
+/* IOC4 Specific Definitions */
+#define IOC4_CMD_OFFSET                0x100
+#define IOC4_CTRL_OFFSET       0x120
+#define IOC4_DMA_OFFSET                0x140
+#define IOC4_INTR_OFFSET       0x0
+
+#define IOC4_TIMING            0x00
+#define IOC4_DMA_PTR_L         0x01
+#define IOC4_DMA_PTR_H         0x02
+#define IOC4_DMA_ADDR_L                0x03
+#define IOC4_DMA_ADDR_H                0x04
+#define IOC4_BC_DEV            0x05
+#define IOC4_BC_MEM            0x06
+#define        IOC4_DMA_CTRL           0x07
+#define        IOC4_DMA_END_ADDR       0x08
+
+/* Bits in the IOC4 Control/Status Register */
+#define        IOC4_S_DMA_START        0x01
+#define        IOC4_S_DMA_STOP         0x02
+#define        IOC4_S_DMA_DIR          0x04
+#define        IOC4_S_DMA_ACTIVE       0x08
+#define        IOC4_S_DMA_ERROR        0x10
+#define        IOC4_ATA_MEMERR         0x02
+
+/* Read/Write Directions */
+#define        IOC4_DMA_WRITE          0x04
+#define        IOC4_DMA_READ           0x00
+
+/* Interrupt Register Offsets */
+#define IOC4_INTR_REG          0x03
+#define        IOC4_INTR_SET           0x05
+#define        IOC4_INTR_CLEAR         0x07
+
+#define IOC4_IDE_CACHELINE_SIZE        128
+#define IOC4_CMD_CTL_BLK_SIZE  0x20
+#define IOC4_SUPPORTED_FIRMWARE_REV 46
+
+typedef struct {
+       u32 timing_reg0;
+       u32 timing_reg1;
+       u32 low_mem_ptr;
+       u32 high_mem_ptr;
+       u32 low_mem_addr;
+       u32 high_mem_addr;
+       u32 dev_byte_count;
+       u32 mem_byte_count;
+       u32 status;
+} ioc4_dma_regs_t;
+
+/* Each Physical Region Descriptor Entry size is 16 bytes (2 * 64 bits) */
+/* IOC4 has only 1 IDE channel */
+#define IOC4_PRD_BYTES       16
+#define IOC4_PRD_ENTRIES     (PAGE_SIZE /(4*IOC4_PRD_BYTES))
+
+
+static void
+sgiioc4_init_hwif_ports(hw_regs_t * hw, unsigned long data_port,
+                       unsigned long ctrl_port, unsigned long irq_port)
+{
+       unsigned long reg = data_port;
+       int i;
+
+       /* Registers are word (32 bit) aligned */
+       for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++)
+               hw->io_ports[i] = reg + i * 4;
+
+       if (ctrl_port)
+               hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
+
+       if (irq_port)
+               hw->io_ports[IDE_IRQ_OFFSET] = irq_port;
+}
+
+static void
+sgiioc4_maskproc(ide_drive_t * drive, int mask)
+{
+       ide_hwif_t *hwif = HWIF(drive);
+       hwif->OUTB(mask ? (drive->ctl | 2) : (drive->ctl & ~2),
+                  IDE_CONTROL_REG);
+}
+
+
+static int
+sgiioc4_checkirq(ide_hwif_t * hwif)
+{
+       u8 intr_reg =
+           hwif->INL(hwif->io_ports[IDE_IRQ_OFFSET] + IOC4_INTR_REG * 4);
+
+       if (intr_reg & 0x03)
+               return 1;
+
+       return 0;
+}
+
+
+static int
+sgiioc4_clearirq(ide_drive_t * drive)
+{
+       u32 intr_reg;
+       ide_hwif_t *hwif = HWIF(drive);
+       unsigned long other_ir =
+           hwif->io_ports[IDE_IRQ_OFFSET] + (IOC4_INTR_REG << 2);
+
+       /* Code to check for PCI error conditions */
+       intr_reg = hwif->INL(other_ir);
+       if (intr_reg & 0x03) { /* Valid IOC4-IDE interrupt */
+               /*
+                * Using hwif->INB to read the IDE_STATUS_REG has a side effect
+                * of clearing the interrupt.  The first read should clear it
+                * if it is set.  The second read should return a "clear" status
+                * if it got cleared.  If not, then spin for a bit trying to
+                * clear it.
+                */
+               u8 stat = hwif->INB(IDE_STATUS_REG);
+               int count = 0;
+               stat = hwif->INB(IDE_STATUS_REG);
+               while ((stat & 0x80) && (count++ < 100)) {
+                       udelay(1);
+                       stat = hwif->INB(IDE_STATUS_REG);
+               }
+
+               if (intr_reg & 0x02) {
+                       /* Error when transferring DMA data on PCI bus */
+                       u32 pci_err_addr_low, pci_err_addr_high,
+                           pci_stat_cmd_reg;
+
+                       pci_err_addr_low =
+                               hwif->INL(hwif->io_ports[IDE_IRQ_OFFSET]);
+                       pci_err_addr_high =
+                               hwif->INL(hwif->io_ports[IDE_IRQ_OFFSET] + 4);
+                       pci_read_config_dword(hwif->pci_dev, PCI_COMMAND,
+                                             &pci_stat_cmd_reg);
+                       printk(KERN_ERR
+                              "%s(%s) : PCI Bus Error when doing DMA:"
+                                  " status-cmd reg is 0x%x\n",
+                              __FUNCTION__, drive->name, pci_stat_cmd_reg);
+                       printk(KERN_ERR
+                              "%s(%s) : PCI Error Address is 0x%x%x\n",
+                              __FUNCTION__, drive->name,
+                              pci_err_addr_high, pci_err_addr_low);
+                       /* Clear the PCI Error indicator */
+                       pci_write_config_dword(hwif->pci_dev, PCI_COMMAND,
+                                              0x00000146);
+               }
+
+               /* Clear the Interrupt, Error bits on the IOC4 */
+               hwif->OUTL(0x03, other_ir);
+
+               intr_reg = hwif->INL(other_ir);
+       }
+
+       return intr_reg & 3;
+}
+
+static int
+sgiioc4_ide_dma_begin(ide_drive_t * drive)
+{
+       ide_hwif_t *hwif = HWIF(drive);
+       unsigned int reg = hwif->INL(hwif->dma_base + IOC4_DMA_CTRL * 4);
+       unsigned int temp_reg = reg | IOC4_S_DMA_START;
+
+       hwif->OUTL(temp_reg, hwif->dma_base + IOC4_DMA_CTRL * 4);
+
+       return 0;
+}
+
+static u32
+sgiioc4_ide_dma_stop(ide_hwif_t *hwif, u64 dma_base)
+{
+       u32     ioc4_dma;
+       int     count;
+
+       count = 0;
+       ioc4_dma = hwif->INL(dma_base + IOC4_DMA_CTRL * 4);
+       while ((ioc4_dma & IOC4_S_DMA_STOP) && (count++ < 200)) {
+               udelay(1);
+               ioc4_dma = hwif->INL(dma_base + IOC4_DMA_CTRL * 4);
+       }
+       return ioc4_dma;
+}
+
+/* Stops the IOC4 DMA Engine */
+static int
+sgiioc4_ide_dma_end(ide_drive_t * drive)
+{
+       u32 ioc4_dma, bc_dev, bc_mem, num, valid = 0, cnt = 0;
+       ide_hwif_t *hwif = HWIF(drive);
+       u64 dma_base = hwif->dma_base;
+       int dma_stat = 0;
+       unsigned long *ending_dma = (unsigned long *) hwif->dma_base2;
+
+       hwif->OUTL(IOC4_S_DMA_STOP, dma_base + IOC4_DMA_CTRL * 4);
+
+       ioc4_dma = sgiioc4_ide_dma_stop(hwif, dma_base);
+
+       if (ioc4_dma & IOC4_S_DMA_STOP) {
+               printk(KERN_ERR
+                      "%s(%s): IOC4 DMA STOP bit is still 1 :"
+                      "ioc4_dma_reg 0x%x\n",
+                      __FUNCTION__, drive->name, ioc4_dma);
+               dma_stat = 1;
+       }
+
+       /*
+        * The IOC4 will DMA 1's to the ending dma area to indicate that
+        * previous data DMA is complete.  This is necessary because of relaxed
+        * ordering between register reads and DMA writes on the Altix.
+        */
+       while ((cnt++ < 200) && (!valid)) {
+               for (num = 0; num < 16; num++) {
+                       if (ending_dma[num]) {
+                               valid = 1;
+                               break;
+                       }
+               }
+               udelay(1);
+       }
+       if (!valid) {
+               printk(KERN_ERR "%s(%s) : DMA incomplete\n", __FUNCTION__,
+                      drive->name);
+               dma_stat = 1;
+       }
+
+       bc_dev = hwif->INL(dma_base + IOC4_BC_DEV * 4);
+       bc_mem = hwif->INL(dma_base + IOC4_BC_MEM * 4);
+
+       if ((bc_dev & 0x01FF) || (bc_mem & 0x1FF)) {
+               if (bc_dev > bc_mem + 8) {
+                       printk(KERN_ERR
+                              "%s(%s): WARNING!! byte_count_dev %d "
+                              "!= byte_count_mem %d\n",
+                              __FUNCTION__, drive->name, bc_dev, bc_mem);
+               }
+       }
+
+       drive->waiting_for_dma = 0;
+       ide_destroy_dmatable(drive);
+
+       return dma_stat;
+}
+
+static int
+sgiioc4_ide_dma_check(ide_drive_t * drive)
+{
+       if (ide_config_drive_speed(drive, XFER_MW_DMA_2) != 0) {
+               printk(KERN_INFO
+                      "Couldnot set %s in Multimode-2 DMA mode | "
+                          "Drive %s using PIO instead\n",
+                      drive->name, drive->name);
+               drive->using_dma = 0;
+       } else
+               drive->using_dma = 1;
+
+       return 0;
+}
+
+static int
+sgiioc4_ide_dma_on(ide_drive_t * drive)
+{
+       drive->using_dma = 1;
+
+       return HWIF(drive)->ide_dma_host_on(drive);
+}
+
+static int
+sgiioc4_ide_dma_off(ide_drive_t * drive)
+{
+       printk(KERN_INFO "%s: DMA disabled\n", drive->name);
+
+       return HWIF(drive)->ide_dma_off_quietly(drive);
+}
+
+static int
+sgiioc4_ide_dma_off_quietly(ide_drive_t * drive)
+{
+       drive->using_dma = 0;
+
+       return HWIF(drive)->ide_dma_host_off(drive);
+}
+
+/* returns 1 if dma irq issued, 0 otherwise */
+static int
+sgiioc4_ide_dma_test_irq(ide_drive_t * drive)
+{
+       return sgiioc4_checkirq(HWIF(drive));
+}
+
+static int
+sgiioc4_ide_dma_host_on(ide_drive_t * drive)
+{
+       if (drive->using_dma)
+               return 0;
+
+       return 1;
+}
+
+static int
+sgiioc4_ide_dma_host_off(ide_drive_t * drive)
+{
+       sgiioc4_clearirq(drive);
+
+       return 0;
+}
+
+static int
+sgiioc4_ide_dma_verbose(ide_drive_t * drive)
+{
+       if (drive->using_dma == 1)
+               printk(", UDMA(16)");
+       else
+               printk(", PIO");
+
+       return 1;
+}
+
+static int
+sgiioc4_ide_dma_lostirq(ide_drive_t * drive)
+{
+       HWIF(drive)->resetproc(drive);
+
+       return __ide_dma_lostirq(drive);
+}
+
+static void
+sgiioc4_resetproc(ide_drive_t * drive)
+{
+       sgiioc4_ide_dma_end(drive);
+       sgiioc4_clearirq(drive);
+}
+
+static u8
+sgiioc4_INB(unsigned long port)
+{
+       u8 reg = (u8) inb(port);
+
+       if ((port & 0xFFF) == 0x11C) {  /* Status register of IOC4 */
+               if (reg & 0x51) {       /* Not busy...check for interrupt */
+                       unsigned long other_ir = port - 0x110;
+                       unsigned int intr_reg = (u32) inl(other_ir);
+
+                       /* Clear the Interrupt, Error bits on the IOC4 */
+                       if (intr_reg & 0x03) {
+                               outl(0x03, other_ir);
+                               intr_reg = (u32) inl(other_ir);
+                       }
+               }
+       }
+
+       return reg;
+}
+
+/* Creates a dma map for the scatter-gather list entries */
+static void __init
+ide_dma_sgiioc4(ide_hwif_t * hwif, unsigned long dma_base)
+{
+       int num_ports = sizeof (ioc4_dma_regs_t);
+
+       printk(KERN_INFO "%s: BM-DMA at 0x%04lx-0x%04lx\n", hwif->name,
+              dma_base, dma_base + num_ports - 1);
+
+       if (!request_region(dma_base, num_ports, hwif->name)) {
+               printk(KERN_ERR
+                      "%s(%s) -- ERROR, Addresses 0x%p to 0x%p "
+                      "ALREADY in use\n",
+                      __FUNCTION__, hwif->name, (void *) dma_base,
+                      (void *) dma_base + num_ports - 1);
+               goto dma_alloc_failure;
+       }
+
+       hwif->dma_base = dma_base;
+       hwif->dmatable_cpu = pci_alloc_consistent(hwif->pci_dev,
+                                         IOC4_PRD_ENTRIES * IOC4_PRD_BYTES,
+                                         &hwif->dmatable_dma);
+
+       if (!hwif->dmatable_cpu)
+               goto dma_alloc_failure;
+
+       hwif->sg_table =
+           kmalloc(sizeof (struct scatterlist) * IOC4_PRD_ENTRIES, GFP_KERNEL);
+
+       if (!hwif->sg_table)
+               goto dma_sgalloc_failure;
+
+       hwif->dma_base2 = (unsigned long)
+               pci_alloc_consistent(hwif->pci_dev,
+                                    IOC4_IDE_CACHELINE_SIZE,
+                                    (dma_addr_t *) &(hwif->dma_status));
+
+       if (!hwif->dma_base2)
+               goto dma_base2alloc_failure;
+
+       return;
+
+dma_base2alloc_failure:
+       kfree(hwif->sg_table);
+
+dma_sgalloc_failure:
+       pci_free_consistent(hwif->pci_dev,
+                           IOC4_PRD_ENTRIES * IOC4_PRD_BYTES,
+                           hwif->dmatable_cpu, hwif->dmatable_dma);
+       printk(KERN_INFO
+              "%s() -- Error! Unable to allocate DMA Maps for drive %s\n",
+              __FUNCTION__, hwif->name);
+       printk(KERN_INFO
+              "Changing from DMA to PIO mode for Drive %s\n", hwif->name);
+
+dma_alloc_failure:
+       /* Disable DMA because we couldnot allocate any DMA maps */
+       hwif->autodma = 0;
+       hwif->atapi_dma = 0;
+}
+
+/* Initializes the IOC4 DMA Engine */
+static void
+sgiioc4_configure_for_dma(int dma_direction, ide_drive_t * drive)
+{
+       u32 ioc4_dma;
+       ide_hwif_t *hwif = HWIF(drive);
+       u64 dma_base = hwif->dma_base;
+       u32 dma_addr, ending_dma_addr;
+
+       ioc4_dma = hwif->INL(dma_base + IOC4_DMA_CTRL * 4);
+
+       if (ioc4_dma & IOC4_S_DMA_ACTIVE) {
+               printk(KERN_WARNING
+                       "%s(%s):Warning!! DMA from previous transfer was still active\n",
+                      __FUNCTION__, drive->name);
+               hwif->OUTL(IOC4_S_DMA_STOP, dma_base + IOC4_DMA_CTRL * 4);
+               ioc4_dma = sgiioc4_ide_dma_stop(hwif, dma_base);
+
+               if (ioc4_dma & IOC4_S_DMA_STOP)
+                       printk(KERN_ERR
+                              "%s(%s) : IOC4 Dma STOP bit is still 1\n",
+                              __FUNCTION__, drive->name);
+       }
+
+       ioc4_dma = hwif->INL(dma_base + IOC4_DMA_CTRL * 4);
+       if (ioc4_dma & IOC4_S_DMA_ERROR) {
+               printk(KERN_WARNING
+                      "%s(%s) : Warning!! - DMA Error during Previous"
+                      " transfer | status 0x%x\n",
+                      __FUNCTION__, drive->name, ioc4_dma);
+               hwif->OUTL(IOC4_S_DMA_STOP, dma_base + IOC4_DMA_CTRL * 4);
+               ioc4_dma = sgiioc4_ide_dma_stop(hwif, dma_base);
+
+               if (ioc4_dma & IOC4_S_DMA_STOP)
+                       printk(KERN_ERR
+                              "%s(%s) : IOC4 DMA STOP bit is still 1\n",
+                              __FUNCTION__, drive->name);
+       }
+
+       /* Address of the Scatter Gather List */
+       dma_addr = cpu_to_le32(hwif->dmatable_dma);
+       hwif->OUTL(dma_addr, dma_base + IOC4_DMA_PTR_L * 4);
+
+       /* Address of the Ending DMA */
+       memset((unsigned int *) hwif->dma_base2, 0, IOC4_IDE_CACHELINE_SIZE);
+       ending_dma_addr = cpu_to_le32(hwif->dma_status);
+       hwif->OUTL(ending_dma_addr, dma_base + IOC4_DMA_END_ADDR * 4);
+
+       hwif->OUTL(dma_direction, dma_base + IOC4_DMA_CTRL * 4);
+       drive->waiting_for_dma = 1;
+}
+
+/* IOC4 Scatter Gather list Format                                      */
+/* 128 Bit entries to support 64 bit addresses in the future            */
+/* The Scatter Gather list Entry should be in the BIG-ENDIAN Format     */
+/* --------------------------------------------------------------------- */
+/* | Upper 32 bits - Zero           |          Lower 32 bits- address | */
+/* --------------------------------------------------------------------- */
+/* | Upper 32 bits - Zero          |EOL| 15 unused     | 16 Bit Length| */
+/* --------------------------------------------------------------------- */
+/* Creates the scatter gather list, DMA Table */
+static unsigned int
+sgiioc4_build_dma_table(ide_drive_t * drive, struct request *rq, int ddir)
+{
+       ide_hwif_t *hwif = HWIF(drive);
+       unsigned int *table = hwif->dmatable_cpu;
+       unsigned int count = 0, i = 1;
+       struct scatterlist *sg;
+
+       if (HWGROUP(drive)->rq->flags & REQ_DRIVE_TASKFILE)
+               hwif->sg_nents = i = ide_raw_build_sglist(drive, rq);
+       else
+               hwif->sg_nents = i = ide_build_sglist(drive, rq);
+
+       if (!i)
+               return 0;       /* sglist of length Zero */
+
+       sg = hwif->sg_table;
+       while (i && sg_dma_len(sg)) {
+               dma_addr_t cur_addr;
+               int cur_len;
+               cur_addr = sg_dma_address(sg);
+               cur_len = sg_dma_len(sg);
+
+               while (cur_len) {
+                       if (count++ >= IOC4_PRD_ENTRIES) {
+                               printk(KERN_WARNING
+                                      "%s: DMA table too small\n",
+                                      drive->name);
+                               goto use_pio_instead;
+                       } else {
+                               u32 xcount, bcount =
+                                   0x10000 - (cur_addr & 0xffff);
+
+                               if (bcount > cur_len)
+                                       bcount = cur_len;
+
+                               /* put the addr, length in
+                                * the IOC4 dma-table format */
+                               *table = 0x0;
+                               table++;
+                               *table = cpu_to_be32(cur_addr);
+                               table++;
+                               *table = 0x0;
+                               table++;
+
+                               xcount = bcount & 0xffff;
+                               *table = cpu_to_be32(xcount);
+                               table++;
+
+                               cur_addr += bcount;
+                               cur_len -= bcount;
+                       }
+               }
+
+               sg++;
+               i--;
+       }
+
+       if (count) {
+               table--;
+               *table |= cpu_to_be32(0x80000000);
+               return count;
+       }
+
+use_pio_instead:
+       pci_unmap_sg(hwif->pci_dev, hwif->sg_table, hwif->sg_nents,
+                    hwif->sg_dma_direction);
+       hwif->sg_dma_active = 0;
+
+       return 0;               /* revert to PIO for this request */
+}
+
+static int
+sgiioc4_ide_dma_read(ide_drive_t * drive)
+{
+       struct request *rq = HWGROUP(drive)->rq;
+       unsigned int count = 0;
+
+       if (!(count = sgiioc4_build_dma_table(drive, rq, PCI_DMA_FROMDEVICE))) {
+               /* try PIO instead of DMA */
+               return 1;
+       }
+       /* Writes FROM the IOC4 TO Main Memory */
+       sgiioc4_configure_for_dma(IOC4_DMA_WRITE, drive);
+
+       return 0;
+}
+
+static int
+sgiioc4_ide_dma_write(ide_drive_t * drive)
+{
+       struct request *rq = HWGROUP(drive)->rq;
+       unsigned int count = 0;
+
+       if (!(count = sgiioc4_build_dma_table(drive, rq, PCI_DMA_TODEVICE))) {
+               /* try PIO instead of DMA */
+               return 1;
+       }
+
+       sgiioc4_configure_for_dma(IOC4_DMA_READ, drive);
+       /* Writes TO the IOC4 FROM Main Memory */
+
+       return 0;
+}
+
+static void __init
+ide_init_sgiioc4(ide_hwif_t * hwif)
+{
+       hwif->mmio = 2;
+       hwif->autodma = 1;
+       hwif->atapi_dma = 1;
+       hwif->ultra_mask = 0x0; /* Disable Ultra DMA */
+       hwif->mwdma_mask = 0x2; /* Multimode-2 DMA  */
+       hwif->swdma_mask = 0x2;
+       hwif->identify = NULL;
+       hwif->tuneproc = NULL;  /* Sets timing for PIO mode */
+       hwif->speedproc = NULL; /* Sets timing for DMA &/or PIO modes */
+       hwif->selectproc = NULL;/* Use the default routine to select drive */
+       hwif->reset_poll = NULL;/* No HBA specific reset_poll needed */
+       hwif->pre_reset = NULL; /* No HBA specific pre_set needed */
+       hwif->resetproc = &sgiioc4_resetproc;/* Reset DMA engine,
+                                               clear interrupts */
+       hwif->intrproc = NULL;  /* Enable or Disable interrupt from drive */
+       hwif->maskproc = &sgiioc4_maskproc;     /* Mask on/off NIEN register */
+       hwif->quirkproc = NULL;
+       hwif->busproc = NULL;
+
+       hwif->ide_dma_read = &sgiioc4_ide_dma_read;
+       hwif->ide_dma_write = &sgiioc4_ide_dma_write;
+       hwif->ide_dma_begin = &sgiioc4_ide_dma_begin;
+       hwif->ide_dma_end = &sgiioc4_ide_dma_end;
+       hwif->ide_dma_check = &sgiioc4_ide_dma_check;
+       hwif->ide_dma_on = &sgiioc4_ide_dma_on;
+       hwif->ide_dma_off = &sgiioc4_ide_dma_off;
+       hwif->ide_dma_off_quietly = &sgiioc4_ide_dma_off_quietly;
+       hwif->ide_dma_test_irq = &sgiioc4_ide_dma_test_irq;
+       hwif->ide_dma_host_on = &sgiioc4_ide_dma_host_on;
+       hwif->ide_dma_host_off = &sgiioc4_ide_dma_host_off;
+       hwif->ide_dma_bad_drive = &__ide_dma_bad_drive;
+       hwif->ide_dma_good_drive = &__ide_dma_good_drive;
+       hwif->ide_dma_count = &__ide_dma_count;
+       hwif->ide_dma_verbose = &sgiioc4_ide_dma_verbose;
+       hwif->ide_dma_retune = &__ide_dma_retune;
+       hwif->ide_dma_lostirq = &sgiioc4_ide_dma_lostirq;
+       hwif->ide_dma_timeout = &__ide_dma_timeout;
+       hwif->INB = &sgiioc4_INB;
+}
+
+static int __init
+sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
+{
+       unsigned long base, ctl, dma_base, irqport;
+       ide_hwif_t *hwif;
+       int h;
+
+       for (h = 0; h < MAX_HWIFS; ++h) {
+               hwif = &ide_hwifs[h];
+               /* Find an empty HWIF */
+               if (hwif->chipset == ide_unknown)
+                       break;
+       }
+
+       /*  Get the CmdBlk and CtrlBlk Base Registers */
+       base = pci_resource_start(dev, 0) + IOC4_CMD_OFFSET;
+       ctl = pci_resource_start(dev, 0) + IOC4_CTRL_OFFSET;
+       irqport = pci_resource_start(dev, 0) + IOC4_INTR_OFFSET;
+       dma_base = pci_resource_start(dev, 0) + IOC4_DMA_OFFSET;
+
+       if (!request_region(base, IOC4_CMD_CTL_BLK_SIZE, hwif->name)) {
+               printk(KERN_ERR
+                       "%s : %s -- ERROR, Port Addresses "
+                       "0x%p to 0x%p ALREADY in use\n",
+                      __FUNCTION__, hwif->name, (void *) base,
+                      (void *) base + IOC4_CMD_CTL_BLK_SIZE);
+               return 1;
+       }
+
+       if (hwif->io_ports[IDE_DATA_OFFSET] != base) {
+               /* Initialize the IO registers */
+               sgiioc4_init_hwif_ports(&hwif->hw, base, ctl, irqport);
+               memcpy(hwif->io_ports, hwif->hw.io_ports,
+                      sizeof (hwif->io_ports));
+               hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
+       }
+
+       hwif->irq = dev->irq;
+       hwif->chipset = ide_pci;
+       hwif->pci_dev = dev;
+       hwif->channel = 0;      /* Single Channel chip */
+       hwif->cds = (struct ide_pci_device_s *) d;
+       hwif->gendev.parent = &dev->dev;/* setup proper ancestral information */
+
+       /* Initializing chipset IRQ Registers */
+       hwif->OUTL(0x03, irqport + IOC4_INTR_SET * 4);
+
+       ide_init_sgiioc4(hwif);
+
+       if (dma_base)
+               ide_dma_sgiioc4(hwif, dma_base);
+       else
+               printk(KERN_INFO "%s: %s Bus-Master DMA disabled\n",
+                      hwif->name, d->name);
+
+       probe_hwif_init(hwif);
+       return 0;
+}
+
+/* This ensures that we can build this for generic kernels without
+ * having all the SN2 code sync'd and merged.
+ */
+typedef enum pciio_endian_e {
+       PCIDMA_ENDIAN_BIG,
+       PCIDMA_ENDIAN_LITTLE
+} pciio_endian_t;
+pciio_endian_t __attribute__ ((weak)) snia_pciio_endian_set(struct pci_dev
+                                           *pci_dev, pciio_endian_t device_end,
+                                           pciio_endian_t desired_end);
+
+static unsigned int __init
+pci_init_sgiioc4(struct pci_dev *dev, ide_pci_device_t * d)
+{
+       unsigned int class_rev;
+
+       if (pci_enable_device(dev)) {
+               printk(KERN_ERR
+                      "Failed to enable device %s at slot %s\n",
+                      d->name, dev->slot_name);
+               return 1;
+       }
+       pci_set_master(dev);
+
+       pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
+       class_rev &= 0xff;
+       printk(KERN_INFO "%s: IDE controller at PCI slot %s, revision %d\n",
+                       d->name, dev->slot_name, class_rev);
+       if (class_rev < IOC4_SUPPORTED_FIRMWARE_REV) {
+               printk(KERN_ERR "Skipping %s IDE controller in slot %s: "
+                       "firmware is obsolete - please upgrade to revision"
+                       "46 or higher\n", d->name, dev->slot_name);
+               return 1;
+       }
+
+       /* Enable Byte Swapping in the PIC... */
+       if (snia_pciio_endian_set) {
+               snia_pciio_endian_set(dev, PCIDMA_ENDIAN_LITTLE,
+                                     PCIDMA_ENDIAN_BIG);
+       } else {
+               printk(KERN_ERR
+                      "Failed to set endianness for device %s at slot %s\n",
+                      d->name, dev->slot_name);
+               return 1;
+       }
+
+       return sgiioc4_ide_setup_pci_device(dev, d);
+}
+
+static ide_pci_device_t sgiioc4_chipsets[] __devinitdata = {
+       {
+        /* Channel 0 */
+        .vendor = PCI_VENDOR_ID_SGI,
+        .device = PCI_DEVICE_ID_SGI_IOC4,
+        .name = "SGIIOC4",
+        .init_hwif = ide_init_sgiioc4,
+        .init_dma = ide_dma_sgiioc4,
+        .channels = 1,
+        .autodma = AUTODMA,
+        /* SGI IOC4 doesn't have enablebits. */
+        .bootable = ON_BOARD,
+       }
+};
+
+static int __devinit
+sgiioc4_init_one(struct pci_dev *dev, const struct pci_device_id *id)
+{
+       ide_pci_device_t *d = &sgiioc4_chipsets[id->driver_data];
+       if (dev->device != d->device) {
+               printk(KERN_ERR "Error in %s(dev 0x%p | id 0x%p )\n",
+                      __FUNCTION__, (void *) dev, (void *) id);
+               BUG();
+       }
+
+       if (pci_init_sgiioc4(dev, d))
+               return 0;
+
+       MOD_INC_USE_COUNT;
+
+       return 0;
+}
+
+static struct pci_device_id sgiioc4_pci_tbl[] = {
+       {PCI_VENDOR_ID_SGI, PCI_DEVICE_ID_SGI_IOC4, PCI_ANY_ID,
+        PCI_ANY_ID, 0x0b4000, 0xFFFFFF, 0},
+       {0}
+};
+
+static struct pci_driver driver = {
+       .name = "SGI-IOC4 IDE",
+       .id_table = sgiioc4_pci_tbl,
+       .probe = sgiioc4_init_one,
+};
+
+static int
+sgiioc4_ide_init(void)
+{
+       return ide_pci_register_driver(&driver);
+}
+
+static void
+sgiioc4_ide_exit(void)
+{
+       ide_pci_unregister_driver(&driver);
+}
+
+module_init(sgiioc4_ide_init);
+module_exit(sgiioc4_ide_exit);
+
+MODULE_AUTHOR("Aniket Malatpure - Silicon Graphics Inc. (SGI)");
+MODULE_DESCRIPTION("PCI driver module for SGI IOC4 Base-IO Card");
+MODULE_LICENSE("GPL");
index a1bf1ae..e0ed9c0 100644 (file)
@@ -474,6 +474,11 @@ fixup_address:
  *     state
  */
  
+#ifndef CONFIG_BLK_DEV_IDEDMA_PCI
+static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif)
+{
+}
+#else
 static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwif_t *hwif)
 {
        u16 pcicmd;
@@ -516,6 +521,7 @@ static void ide_hwif_setup_dma(struct pci_dev *dev, ide_pci_device_t *d, ide_hwi
                }
        }
 }
+#endif /* CONFIG_BLK_DEV_IDEDMA_PCI*/
 
 /**
  *     ide_setup_pci_controller        -       set up IDE PCI
index 40457dd..cb73113 100644 (file)
@@ -1,7 +1,7 @@
 # -*- shell-script -*-
 
 menu "IEEE 1394 (FireWire) support (EXPERIMENTAL)"
-       depends on PCI && EXPERIMENTAL
+       depends on EXPERIMENTAL
 
 config IEEE1394
        tristate "IEEE 1394 (FireWire) support (EXPERIMENTAL)"
@@ -15,7 +15,7 @@ config IEEE1394
          is the core support only, you will also need to select a driver for
          your IEEE 1394 adapter.
 
-         To compile this driver as a module, choose M here: the
+         To compile this driver as a module, say M here: the
          module will be called ieee1394.
 
 comment "Subsystem Options"
@@ -56,13 +56,13 @@ comment "Texas Instruments PCILynx requires I2C bit-banging"
 
 config IEEE1394_PCILYNX
        tristate "Texas Instruments PCILynx support"
-       depends on IEEE1394 && I2C_ALGOBIT
+       depends on PCI && IEEE1394 && I2C_ALGOBIT
        help
          Say Y here if you have an IEEE-1394 controller with the Texas
          Instruments PCILynx chip.  Note: this driver is written for revision
          2 of this chip and may not work with revision 0.
 
-         To compile this driver as a module, choose M here: the
+         To compile this driver as a module, say M here: the
          module will be called pcilynx.
 
 # Non-maintained pcilynx options
@@ -72,7 +72,7 @@ config IEEE1394_PCILYNX
 # fi
 config IEEE1394_OHCI1394
        tristate "OHCI-1394 support"
-       depends on IEEE1394
+       depends on PCI && IEEE1394
        help
          Enable this driver if you have an IEEE 1394 controller based on the
          OHCI-1394 specification. The current driver is only tested with OHCI
@@ -80,7 +80,7 @@ config IEEE1394_OHCI1394
          use one of these chipsets.  It should work with any OHCI-1394
          compliant card, however.
 
-         To compile this driver as a module, choose M here: the
+         To compile this driver as a module, say M here: the
          module will be called ohci1394.
 
 comment "Protocol Drivers"
@@ -122,7 +122,7 @@ config IEEE1394_DV1394
 
          The user-space API for dv1394 is documented in dv1394.h.
 
-         To compile this driver as a module, choose M here: the
+         To compile this driver as a module, say M here: the
          module will be called dv1394.
 
 config IEEE1394_RAWIO
@@ -134,7 +134,7 @@ config IEEE1394_RAWIO
          direct communication of user programs with the IEEE 1394 bus and
          thus with the attached peripherals.
 
-         To compile this driver as a module, choose M here: the
+         To compile this driver as a module, say M here: the
          module will be called raw1394.
 
 config IEEE1394_CMP
@@ -144,7 +144,7 @@ config IEEE1394_CMP
          This option enables the Connection Management Procedures
          (IEC61883-1) driver, which implements input and output plugs.
 
-         To compile this driver as a module, choose M here: the
+         To compile this driver as a module, say M here: the
          module will be called cmp.
 
 config IEEE1394_AMDTP
@@ -157,7 +157,7 @@ config IEEE1394_AMDTP
 
          The userspace interface is documented in amdtp.h.
 
-         To compile this driver as a module, choose M here: the
+         To compile this driver as a module, say M here: the
          module will be called amdtp.
 
 endmenu
index 25db9c4..75c6320 100644 (file)
@@ -187,7 +187,7 @@ void dma_region_sync(struct dma_region *dma, unsigned long offset, unsigned long
 /* nopage() handler for mmap access */
 
 static struct page*
-dma_region_pagefault(struct vm_area_struct *area, unsigned long address, int write_access)
+dma_region_pagefault(struct vm_area_struct *area, unsigned long address, int *type)
 {
        unsigned long offset;
        unsigned long kernel_virt_addr;
@@ -202,6 +202,8 @@ dma_region_pagefault(struct vm_area_struct *area, unsigned long address, int wri
            (address > (unsigned long) area->vm_start + (PAGE_SIZE * dma->n_pages)) )
                goto out;
 
+       if (type)
+               *type = VM_FAULT_MINOR;
        offset = address - area->vm_start;
        kernel_virt_addr = (unsigned long) dma->kvirt + offset;
        ret = vmalloc_to_page((void*) kernel_virt_addr);
index 4371f30..9d2a769 100644 (file)
@@ -89,7 +89,7 @@
 #define TRACE() printk(KERN_ERR "%s:%s[%d] ---- TRACE\n", driver_name, __FUNCTION__, __LINE__)
 
 static char version[] __devinitdata =
-       "$Rev: 1043 $ Ben Collins <bcollins@debian.org>";
+       "$Rev: 1079 $ Ben Collins <bcollins@debian.org>";
 
 struct fragment_info {
        struct list_head list;
@@ -220,7 +220,7 @@ static int ether1394_init_bc(struct net_device *dev)
 
                        priv->iso = hpsb_iso_recv_init(priv->host, 16 * 4096,
                                                       16, priv->broadcast_channel,
-                                                      1, ether1394_iso);
+                                                      HPSB_ISO_DMA_PACKET_PER_BUFFER, 1, ether1394_iso);
                        if (priv->iso == NULL) {
                                ETH1394_PRINT(KERN_ERR, dev->name,
                                              "failed to change broadcast "
@@ -475,7 +475,7 @@ static void ether1394_add_host (struct hpsb_host *host)
        priv->broadcast_channel = host->csr.broadcast_channel & 0x3f;
 
        priv->iso = hpsb_iso_recv_init(host, 16 * 4096, 16, priv->broadcast_channel,
-                                      1, ether1394_iso);
+                                       HPSB_ISO_DMA_PACKET_PER_BUFFER, 1, ether1394_iso);
        if (priv->iso == NULL) {
                priv->bc_state = ETHER1394_BC_CLOSED;
        }
@@ -1258,7 +1258,7 @@ static inline struct hpsb_packet *ether1394_alloc_common_packet(struct hpsb_host
 {
        struct hpsb_packet *p;
 
-       p = alloc_hpsb_packet(0);
+       p = hpsb_alloc_packet(0);
        if (p) {
                p->host = host;
                p->data = NULL;
@@ -1327,7 +1327,7 @@ static inline void ether1394_free_packet(struct hpsb_packet *packet)
        if (packet->tcode != TCODE_STREAM_DATA)
                hpsb_free_tlabel(packet);
        packet->data = NULL;
-       free_hpsb_packet(packet);
+       hpsb_free_packet(packet);
 }
 
 static void ether1394_complete_cb(void *__ptask);
@@ -1349,7 +1349,7 @@ static int ether1394_send_packet(struct packet_task *ptask, unsigned int tx_len)
                                               ptask->dest_node,
                                               ptask->addr, ptask->skb->data,
                                               tx_len)) {
-               free_hpsb_packet(packet);
+               hpsb_free_packet(packet);
                return -1;
        }
 
@@ -1357,7 +1357,7 @@ static int ether1394_send_packet(struct packet_task *ptask, unsigned int tx_len)
        hpsb_set_packet_complete_task(ptask->packet, ether1394_complete_cb,
                                      ptask);
 
-       if (!hpsb_send_packet(packet)) {
+       if (hpsb_send_packet(packet) < 0) {
                ether1394_free_packet(packet);
                return -1;
        }
@@ -1599,7 +1599,7 @@ static int ether1394_ethtool_ioctl(struct net_device *dev, void *useraddr)
                case ETHTOOL_GDRVINFO: {
                        struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
                        strcpy (info.driver, driver_name);
-                       strcpy (info.version, "$Rev: 1043 $");
+                       strcpy (info.version, "$Rev: 1079 $");
                        /* FIXME XXX provide sane businfo */
                        strcpy (info.bus_info, "ieee1394");
                        if (copy_to_user (useraddr, &info, sizeof (info)))
index c74c132..9090896 100644 (file)
@@ -26,6 +26,7 @@
 #include "hosts.h"
 #include "ieee1394_core.h"
 #include "highlevel.h"
+#include "nodemgr.h"
 
 
 struct hl_host_info {
@@ -227,10 +228,17 @@ struct hpsb_host *hpsb_get_host_bykey(struct hpsb_highlevel *hl, unsigned long k
        return host;
 }
 
+static int highlevel_for_each_host_reg(struct hpsb_host *host, void *__data)
+{
+       struct hpsb_highlevel *hl = __data;
+
+       hl->add_host(host);
+
+       return 0;
+}
 
 void hpsb_register_highlevel(struct hpsb_highlevel *hl)
 {
-       struct list_head *lh;
        unsigned long flags;
 
         INIT_LIST_HEAD(&hl->addr_list);
@@ -242,21 +250,25 @@ void hpsb_register_highlevel(struct hpsb_highlevel *hl)
         list_add_tail(&hl->hl_list, &hl_drivers);
        write_unlock_irqrestore(&hl_drivers_lock, flags);
 
-       if (hl->add_host) {
-               down(&hpsb_hosts_lock);
-               list_for_each (lh, &hpsb_hosts) {
-                       struct hpsb_host *host = list_entry(lh, struct hpsb_host, host_list);
-                       hl->add_host(host);
-               }
-               up(&hpsb_hosts_lock);
-       }
+       if (hl->add_host)
+               nodemgr_for_each_host(hl, highlevel_for_each_host_reg);
 
         return;
 }
 
+static int highlevel_for_each_host_unreg(struct hpsb_host *host, void *__data)
+{
+       struct hpsb_highlevel *hl = __data;
+
+       hl->remove_host(host);
+       hpsb_destroy_hostinfo(hl, host);
+
+       return 0;
+}
+
 void hpsb_unregister_highlevel(struct hpsb_highlevel *hl)
 {
-        struct list_head *lh, *next;
+       struct list_head *lh, *next;
         struct hpsb_address_serve *as;
        unsigned long flags;
 
@@ -272,16 +284,8 @@ void hpsb_unregister_highlevel(struct hpsb_highlevel *hl)
         list_del(&hl->hl_list);
        write_unlock_irqrestore(&hl_drivers_lock, flags);
 
-        if (hl->remove_host) {
-               down(&hpsb_hosts_lock);
-               list_for_each(lh, &hpsb_hosts) {
-                       struct hpsb_host *host = list_entry(lh, struct hpsb_host, host_list);
-
-                       hl->remove_host(host);
-                       hpsb_destroy_hostinfo(hl, host);
-               }
-               up(&hpsb_hosts_lock);
-       }
+        if (hl->remove_host)
+               nodemgr_for_each_host(hl, highlevel_for_each_host_unreg);
 }
 
 int hpsb_register_addrspace(struct hpsb_highlevel *hl,
index 2dbfcd1..a0c3f91 100644 (file)
@@ -92,8 +92,6 @@ struct hpsb_address_ops {
 };
 
 
-void init_hpsb_highlevel(void);
-
 void highlevel_add_host(struct hpsb_host *host);
 void highlevel_remove_host(struct hpsb_host *host);
 void highlevel_host_reset(struct hpsb_host *host);
@@ -180,4 +178,7 @@ int hpsb_set_hostinfo(struct hpsb_highlevel *hl, struct hpsb_host *host, void *d
 /* Retrieve hpsb_host using a highlevel handle and a key */
 struct hpsb_host *hpsb_get_host_bykey(struct hpsb_highlevel *hl, unsigned long key);
 
+/* Initialize the highlevel system */
+void init_hpsb_highlevel(void);
+
 #endif /* IEEE1394_HIGHLEVEL_H */
index 3faa215..004abf7 100644 (file)
 #include <linux/list.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/pci.h>
 
 #include "ieee1394_types.h"
 #include "hosts.h"
 #include "ieee1394_core.h"
 #include "highlevel.h"
+#include "nodemgr.h"
 
-LIST_HEAD(hpsb_hosts);
-DECLARE_MUTEX(hpsb_hosts_lock);
 
 static int dummy_transmit_packet(struct hpsb_host *h, struct hpsb_packet *p)
 {
@@ -46,54 +46,14 @@ static struct hpsb_host_driver dummy_driver = {
        .isoctl =          dummy_isoctl
 };
 
-/**
- * hpsb_ref_host - increase reference count for host controller.
- * @host: the host controller
- *
- * Increase the reference count for the specified host controller.
- * When holding a reference to a host, the memory allocated for the
- * host struct will not be freed and the host is guaranteed to be in a
- * consistent state.  The driver may be unloaded or the controller may
- * be removed (PCMCIA), but the host struct will remain valid.
- */
-
-int hpsb_ref_host(struct hpsb_host *host)
+static int alloc_hostnum_cb(struct hpsb_host *host, void *__data)
 {
-        struct list_head *lh;
-        int retval = 0;
-
-       down(&hpsb_hosts_lock);
-        list_for_each(lh, &hpsb_hosts) {
-                if (host == list_entry(lh, struct hpsb_host, host_list)) {
-                       if (try_module_get(host->driver->owner)) {
-                               atomic_inc(&host->refcount);
-                               retval = 1;
-                       }
-                       break;
-               }
-        }
-       up(&hpsb_hosts_lock);
+       int *hostnum = __data;
 
-        return retval;
-}
+       if (host->id == *hostnum)
+               return 1;
 
-/**
- * hpsb_unref_host - decrease reference count for host controller.
- * @host: the host controller
- *
- * Decrease the reference count for the specified host controller.
- * When the reference count reaches zero, the memory allocated for the
- * &hpsb_host will be freed.
- */
-
-void hpsb_unref_host(struct hpsb_host *host)
-{
-       module_put(host->driver->owner);
-
-       down(&hpsb_hosts_lock);
-        if (atomic_dec_and_test(&host->refcount) && host->is_shutdown)
-               device_unregister(&host->device);
-       up(&hpsb_hosts_lock);
+       return 0;
 }
 
 /**
@@ -108,19 +68,16 @@ void hpsb_unref_host(struct hpsb_host *host)
  * driver specific parts, enable the controller and make it available
  * to the general subsystem using hpsb_add_host().
  *
- * The &hpsb_host is allocated with an single initial reference
- * belonging to the driver.  Once the driver is done with the struct,
- * for example, when the driver is unloaded, it should release this
- * reference using hpsb_unref_host().
- *
  * Return Value: a pointer to the &hpsb_host if succesful, %NULL if
  * no memory was available.
  */
 
-struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra)
+struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
+                                 struct device *dev)
 {
         struct hpsb_host *h;
        int i;
+       int hostnum = 0;
 
         h = kmalloc(sizeof(struct hpsb_host) + extra, SLAB_KERNEL);
         if (!h) return NULL;
@@ -128,7 +85,6 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra)
 
        h->hostdata = h + 1;
         h->driver = drv;
-       atomic_set(&h->refcount, 1);
 
         INIT_LIST_HEAD(&h->pending_packets);
         spin_lock_init(&h->pending_pkt_lock);
@@ -146,53 +102,35 @@ struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra)
         h->topology_map = h->csr.topology_map + 3;
         h->speed_map = (u8 *)(h->csr.speed_map + 2);
 
-       return h;
-}
-
-static int alloc_hostnum(void)
-{
-       int hostnum = 0;
-
        while (1) {
-               struct list_head *lh;
-               int found = 0;
-
-               list_for_each(lh, &hpsb_hosts) {
-                       struct hpsb_host *host = list_entry(lh, struct hpsb_host, host_list);
-
-                       if (host->id == hostnum) {
-                               found = 1;
-                               break;
-                       }
+               if (!nodemgr_for_each_host(&hostnum, alloc_hostnum_cb)) {
+                       h->id = hostnum;
+                       break;
                }
 
-               if (!found)
-                       return hostnum;
-
                hostnum++;
        }
 
-       return 0;
+       memcpy(&h->device, &nodemgr_dev_template_host, sizeof(h->device));
+       h->device.parent = dev;
+       snprintf(h->device.bus_id, BUS_ID_SIZE, "fw-host%d", h->id);
+       device_register(&h->device);
+
+       return h;
 }
 
 void hpsb_add_host(struct hpsb_host *host)
 {
-       down(&hpsb_hosts_lock);
-       host->id = alloc_hostnum();
-        list_add_tail(&host->host_list, &hpsb_hosts);
-       up(&hpsb_hosts_lock);
-
         highlevel_add_host(host);
         host->driver->devctl(host, RESET_BUS, LONG_RESET);
 }
 
 void hpsb_remove_host(struct hpsb_host *host)
 {
-       down(&hpsb_hosts_lock);
         host->is_shutdown = 1;
         host->driver = &dummy_driver;
-       list_del(&host->host_list);
-       up(&hpsb_hosts_lock);
 
         highlevel_remove_host(host);
+
+       device_unregister(&host->device);
 }
index 17753f8..0161482 100644 (file)
@@ -29,8 +29,6 @@ struct hpsb_host {
 
         atomic_t generation;
 
-       atomic_t refcount;
-
         struct list_head pending_packets;
         spinlock_t pending_pkt_lock;
        struct timer_list timeout;
@@ -165,7 +163,7 @@ struct hpsb_host_driver {
          * packet->type == raw) and do byte-swapping as necessary or instruct
          * the hardware to do so.  It can return immediately after the packet
          * was queued for sending.  After sending, hpsb_sent_packet() has to be
-         * called.  Return 0 for failure.
+         * called.  Return 0 on success, negative errno on failure.
          * NOTE: The function must be callable in interrupt context.
          */
         int (*transmit_packet) (struct hpsb_host *host, 
@@ -195,22 +193,8 @@ struct hpsb_host_driver {
 };
 
 
-extern struct list_head hpsb_hosts;
-extern struct semaphore hpsb_hosts_lock;
-
-
-/*
- * In order to prevent hosts from unloading, use hpsb_ref_host().  This prevents
- * the host from going away (e.g. makes module unloading of the driver
- * impossible), but still can not guarantee it (e.g. PC-Card being pulled by the
- * user).  hpsb_ref_host() returns false if host could not be locked.  If it is
- * successful, host is valid as a pointer until hpsb_unref_host() (not just
- * until after remove_host).
- */
-int hpsb_ref_host(struct hpsb_host *host);
-void hpsb_unref_host(struct hpsb_host *host);
-
-struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra);
+struct hpsb_host *hpsb_alloc_host(struct hpsb_host_driver *drv, size_t extra,
+                                 struct device *dev);
 void hpsb_add_host(struct hpsb_host *host);
 void hpsb_remove_host(struct hpsb_host *h);
 
index 79604fe..66691dd 100644 (file)
@@ -109,7 +109,7 @@ void hpsb_set_packet_complete_task(struct hpsb_packet *packet,
 }
 
 /**
- * alloc_hpsb_packet - allocate new packet structure
+ * hpsb_alloc_packet - allocate new packet structure
  * @data_size: size of the data block to be allocated
  *
  * This function allocates, initializes and returns a new &struct hpsb_packet.
@@ -128,7 +128,7 @@ void hpsb_set_packet_complete_task(struct hpsb_packet *packet,
  * Return value: A pointer to a &struct hpsb_packet or NULL on allocation
  * failure.
  */
-struct hpsb_packet *alloc_hpsb_packet(size_t data_size)
+struct hpsb_packet *hpsb_alloc_packet(size_t data_size)
 {
         struct hpsb_packet *packet = NULL;
         void *data = NULL;
@@ -152,25 +152,23 @@ struct hpsb_packet *alloc_hpsb_packet(size_t data_size)
         }
 
         INIT_LIST_HEAD(&packet->list);
-        sema_init(&packet->state_change, 0);
        packet->complete_routine = NULL;
        packet->complete_data = NULL;
         packet->state = hpsb_unused;
         packet->generation = -1;
-        packet->data_be = 1;
 
         return packet;
 }
 
 
 /**
- * free_hpsb_packet - free packet and data associated with it
+ * hpsb_free_packet - free packet and data associated with it
  * @packet: packet to free (is NULL safe)
  *
  * This function will free packet->data, packet->header and finally the packet
  * itself.
  */
-void free_hpsb_packet(struct hpsb_packet *packet)
+void hpsb_free_packet(struct hpsb_packet *packet)
 {
         if (!packet) return;
 
@@ -420,14 +418,12 @@ void hpsb_packet_sent(struct hpsb_host *host, struct hpsb_packet *packet,
 
         if (packet->no_waiter) {
                 /* must not have a tlabel allocated */
-                free_hpsb_packet(packet);
+                hpsb_free_packet(packet);
                 return;
         }
 
         if (ackcode != ACK_PENDING || !packet->expect_response) {
                 packet->state = hpsb_complete;
-                up(&packet->state_change);
-                up(&packet->state_change);
                 run_packet_complete(packet);
                 return;
         }
@@ -439,7 +435,6 @@ void hpsb_packet_sent(struct hpsb_host *host, struct hpsb_packet *packet,
         list_add_tail(&packet->list, &host->pending_packets);
         spin_unlock_irqrestore(&host->pending_pkt_lock, flags);
 
-        up(&packet->state_change);
        mod_timer(&host->timeout, jiffies + host->timeout_interval);
 }
 
@@ -465,7 +460,7 @@ int hpsb_send_phy_config(struct hpsb_host *host, int rootid, int gapcnt)
                return -EINVAL;
        }
 
-       packet = alloc_hpsb_packet(0);
+       packet = hpsb_alloc_packet(0);
        if (!packet)
                return -ENOMEM;
 
@@ -485,16 +480,8 @@ int hpsb_send_phy_config(struct hpsb_host *host, int rootid, int gapcnt)
 
        packet->generation = get_hpsb_generation(host);
 
-       if (!hpsb_send_packet(packet)) {
-               retval = -EINVAL;
-               goto fail;
-       }
-
-       down(&packet->state_change);
-       down(&packet->state_change);
-
-fail:
-       free_hpsb_packet(packet);
+       retval = hpsb_send_packet_and_wait(packet);
+       hpsb_free_packet(packet);
 
        return retval;
 }
@@ -504,23 +491,24 @@ fail:
  * @packet: packet to send
  *
  * The packet is sent through the host specified in the packet->host field.
- * Before sending, the packet's transmit speed is automatically determined using
- * the local speed map when it is an async, non-broadcast packet.
+ * Before sending, the packet's transmit speed is automatically determined
+ * using the local speed map when it is an async, non-broadcast packet.
  *
  * Possibilities for failure are that host is either not initialized, in bus
  * reset, the packet's generation number doesn't match the current generation
  * number or the host reports a transmit error.
  *
- * Return value: False (0) on failure, true (1) otherwise.
+ * Return value: 0 on success, negative errno on failure.
  */
 int hpsb_send_packet(struct hpsb_packet *packet)
 {
         struct hpsb_host *host = packet->host;
 
-        if (host->is_shutdown || host->in_bus_reset
-            || (packet->generation != get_hpsb_generation(host))) {
-                return 0;
-        }
+        if (host->is_shutdown)
+               return -EINVAL;
+       if (host->in_bus_reset ||
+           (packet->generation != get_hpsb_generation(host)))
+                return -EAGAIN;
 
         packet->state = hpsb_queued;
 
@@ -532,23 +520,13 @@ int hpsb_send_packet(struct hpsb_packet *packet)
                 data = kmalloc(packet->header_size + packet->data_size, GFP_ATOMIC);
                 if (!data) {
                         HPSB_ERR("unable to allocate memory for concatenating header and data");
-                        return 0;
+                        return -ENOMEM;
                 }
 
                 memcpy(data, packet->header, packet->header_size);
 
                 if (packet->data_size)
-                {
-                        if (packet->data_be) {
-                                memcpy(((u8*)data)+packet->header_size, packet->data, packet->data_size);
-                        } else {
-                                int i;
-                                quadlet_t *my_data=(quadlet_t*) ((u8*) data + packet->data_size);
-                                for (i=0; i < packet->data_size/4; i++) {
-                                        my_data[i] = cpu_to_be32(packet->data[i]);
-                                }
-                        }
-                }
+                       memcpy(((u8*)data)+packet->header_size, packet->data, packet->data_size);
 
                 dump_packet("send packet local:", packet->header,
                             packet->header_size);
@@ -558,7 +536,7 @@ int hpsb_send_packet(struct hpsb_packet *packet)
 
                 kfree(data);
 
-                return 1;
+                return 0;
         }
 
         if (packet->type == hpsb_async && packet->node_id != ALL_NODES) {
@@ -584,10 +562,33 @@ int hpsb_send_packet(struct hpsb_packet *packet)
         return host->driver->transmit_packet(host, packet);
 }
 
+/* We could just use complete() directly as the packet complete
+ * callback, but this is more typesafe, in the sense that we get a
+ * compiler error if the prototype for complete() changes. */
+
+static void complete_packet(void *data)
+{
+       complete((struct completion *) data);
+}
+
+int hpsb_send_packet_and_wait(struct hpsb_packet *packet)
+{
+       struct completion done;
+       int retval;
+
+       init_completion(&done);
+       hpsb_set_packet_complete_task(packet, complete_packet, &done);
+       retval = hpsb_send_packet(packet);
+       if (retval == 0)
+               wait_for_completion(&done);
+
+       return retval;
+}
+
 static void send_packet_nocare(struct hpsb_packet *packet)
 {
-        if (!hpsb_send_packet(packet)) {
-                free_hpsb_packet(packet);
+        if (hpsb_send_packet(packet) < 0) {
+                hpsb_free_packet(packet);
         }
 }
 
@@ -668,7 +669,6 @@ void handle_packet_response(struct hpsb_host *host, int tcode, quadlet_t *data,
         }
 
         packet->state = hpsb_complete;
-        up(&packet->state_change);
        run_packet_complete(packet);
 }
 
@@ -680,7 +680,7 @@ static struct hpsb_packet *create_reply_packet(struct hpsb_host *host,
 
         dsize += (dsize % 4 ? 4 - (dsize % 4) : 0);
 
-        p = alloc_hpsb_packet(dsize);
+        p = hpsb_alloc_packet(dsize);
         if (p == NULL) {
                 /* FIXME - send data_error response */
                 return NULL;
@@ -820,6 +820,8 @@ static void handle_incoming_packet(struct hpsb_host *host, int tcode,
                 if (rcode >= 0) {
                         fill_async_readblock_resp(packet, rcode, length);
                         send_packet_nocare(packet);
+                } else {
+                        hpsb_free_packet(packet);
                 }
                 break;
 
@@ -874,7 +876,7 @@ static void handle_incoming_packet(struct hpsb_host *host, int tcode,
                 if (rcode >= 0) {
                         send_packet_nocare(packet);
                 } else {
-                        free_hpsb_packet(packet);
+                        hpsb_free_packet(packet);
                 }
                 break;
         }
@@ -949,7 +951,6 @@ void abort_requests(struct hpsb_host *host)
                 list_del(&packet->list);
                 packet->state = hpsb_complete;
                 packet->ack_code = ACKX_ABORTED;
-                up(&packet->state_change);
                run_packet_complete(packet);
         }
 }
@@ -987,7 +988,6 @@ void abort_timedouts(unsigned long __opaque)
                 list_del(&packet->list);
                 packet->state = hpsb_complete;
                 packet->ack_code = ACKX_TIMEOUT;
-                up(&packet->state_change);
                run_packet_complete(packet);
         }
 }
@@ -1171,19 +1171,22 @@ static int ieee1394_dispatch_open(struct inode *inode, struct file *file)
 
 static int __init ieee1394_init(void)
 {
-       hpsb_packet_cache = kmem_cache_create("hpsb_packet", sizeof(struct hpsb_packet),
-                                             0, 0, NULL, NULL);
-
        devfs_mk_dir("ieee1394");
-
        if (register_chrdev(IEEE1394_MAJOR, "ieee1394", &ieee1394_chardev_ops)) {
                HPSB_ERR("unable to register character device major %d!\n", IEEE1394_MAJOR);
-               devfs_remove("ieee1394");
                return -ENODEV;
        }
 
+       devfs_mk_dir("ieee1394");
+
+       hpsb_packet_cache = kmem_cache_create("hpsb_packet", sizeof(struct hpsb_packet),
+                                             0, 0, NULL, NULL);
+
+       bus_register(&ieee1394_bus_type);
+
        init_hpsb_highlevel();
        init_csr();
+
        if (!disable_nodemgr)
                init_ieee1394_nodemgr();
        else
@@ -1198,6 +1201,9 @@ static void __exit ieee1394_cleanup(void)
                cleanup_ieee1394_nodemgr();
 
        cleanup_csr();
+
+       bus_unregister(&ieee1394_bus_type);
+
        kmem_cache_destroy(hpsb_packet_cache);
 
        unregister_chrdev(IEEE1394_MAJOR, "ieee1394");
@@ -1213,16 +1219,15 @@ module_exit(ieee1394_cleanup);
 EXPORT_SYMBOL(hpsb_alloc_host);
 EXPORT_SYMBOL(hpsb_add_host);
 EXPORT_SYMBOL(hpsb_remove_host);
-EXPORT_SYMBOL(hpsb_ref_host);
-EXPORT_SYMBOL(hpsb_unref_host);
 
 /** ieee1394_core.c **/
 EXPORT_SYMBOL(hpsb_speedto_str);
 EXPORT_SYMBOL(hpsb_set_packet_complete_task);
-EXPORT_SYMBOL(alloc_hpsb_packet);
-EXPORT_SYMBOL(free_hpsb_packet);
+EXPORT_SYMBOL(hpsb_alloc_packet);
+EXPORT_SYMBOL(hpsb_free_packet);
 EXPORT_SYMBOL(hpsb_send_phy_config);
 EXPORT_SYMBOL(hpsb_send_packet);
+EXPORT_SYMBOL(hpsb_send_packet_and_wait);
 EXPORT_SYMBOL(hpsb_reset_bus);
 EXPORT_SYMBOL(hpsb_bus_reset);
 EXPORT_SYMBOL(hpsb_selfid_received);
@@ -1282,6 +1287,7 @@ EXPORT_SYMBOL(hpsb_node_lock);
 EXPORT_SYMBOL(hpsb_register_protocol);
 EXPORT_SYMBOL(hpsb_unregister_protocol);
 EXPORT_SYMBOL(ieee1394_bus_type);
+EXPORT_SYMBOL(nodemgr_for_each_host);
 
 /** csr.c **/
 EXPORT_SYMBOL(hpsb_update_config_rom);
index e63fc69..f45d7b7 100644 (file)
@@ -40,11 +40,6 @@ struct hpsb_packet {
         unsigned expect_response:1;
         unsigned no_waiter:1;
 
-        /* Data big endianness flag - may vary from request to request.  The
-         * header is always in machine byte order.
-         * Not really used currently.  */
-        unsigned data_be:1;
-
         /* Speed to transmit with: 0 = 100Mbps, 1 = 200Mbps, 2 = 400Mbps */
         unsigned speed_code:2;
 
@@ -64,9 +59,6 @@ struct hpsb_packet {
         struct hpsb_host *host;
         unsigned int generation;
 
-        /* Very core internal, don't care. */
-        struct semaphore state_change;
-
        /* Function (and possible data to pass to it) to call when this
         * packet is completed.  */
        void (*complete_routine)(void *);
@@ -90,8 +82,8 @@ static inline struct hpsb_packet *driver_packet(struct list_head *l)
 void abort_timedouts(unsigned long __opaque);
 void abort_requests(struct hpsb_host *host);
 
-struct hpsb_packet *alloc_hpsb_packet(size_t data_size);
-void free_hpsb_packet(struct hpsb_packet *packet);
+struct hpsb_packet *hpsb_alloc_packet(size_t data_size);
+void hpsb_free_packet(struct hpsb_packet *packet);
 
 
 /*
@@ -108,15 +100,23 @@ static inline unsigned int get_hpsb_generation(struct hpsb_host *host)
 }
 
 /*
- * Send a PHY configuration packet.
+ * Send a PHY configuration packet, return 0 on success, negative
+ * errno on failure.
  */
 int hpsb_send_phy_config(struct hpsb_host *host, int rootid, int gapcnt);
 
 /*
- * Queue packet for transmitting, return 0 for failure.
+ * Queue packet for transmitting, return 0 on success, negative errno
+ * on failure.
  */
 int hpsb_send_packet(struct hpsb_packet *packet);
 
+/*
+ * Queue packet for transmitting, and block until the transaction
+ * completes. Return 0 on success, negative errno on failure.
+ */
+int hpsb_send_packet_and_wait(struct hpsb_packet *packet);
+
 /* Initiate bus reset on the given host.  Returns 1 if bus reset already in
  * progress, 0 otherwise. */
 int hpsb_reset_bus(struct hpsb_host *host, int type);
index 6cdc8c6..4017828 100644 (file)
@@ -263,7 +263,7 @@ struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node,
        if (length == 0)
                return NULL;
 
-       packet = alloc_hpsb_packet(length + (length % 4 ? 4 - (length % 4) : 0));
+       packet = hpsb_alloc_packet(length + (length % 4 ? 4 - (length % 4) : 0));
        if (!packet)
                return NULL;
 
@@ -271,7 +271,7 @@ struct hpsb_packet *hpsb_make_readpacket(struct hpsb_host *host, nodeid_t node,
        packet->node_id = node;
 
        if (hpsb_get_tlabel(packet)) {
-               free_hpsb_packet(packet);
+               hpsb_free_packet(packet);
                return NULL;
        }
 
@@ -291,7 +291,7 @@ struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host, nodeid_t node
        if (length == 0)
                return NULL;
 
-       packet = alloc_hpsb_packet(length + (length % 4 ? 4 - (length % 4) : 0));
+       packet = hpsb_alloc_packet(length + (length % 4 ? 4 - (length % 4) : 0));
        if (!packet)
                return NULL;
 
@@ -302,7 +302,7 @@ struct hpsb_packet *hpsb_make_writepacket (struct hpsb_host *host, nodeid_t node
        packet->node_id = node;
 
        if (hpsb_get_tlabel(packet)) {
-               free_hpsb_packet(packet);
+               hpsb_free_packet(packet);
                return NULL;
        }
 
@@ -325,7 +325,7 @@ struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer, i
        if (length == 0)
                return NULL;
 
-       packet = alloc_hpsb_packet(length + (length % 4 ? 4 - (length % 4) : 0));
+       packet = hpsb_alloc_packet(length + (length % 4 ? 4 - (length % 4) : 0));
        if (!packet)
                return NULL;
 
@@ -335,7 +335,7 @@ struct hpsb_packet *hpsb_make_streampacket(struct hpsb_host *host, u8 *buffer, i
        packet->host = host;
     
        if (hpsb_get_tlabel(packet)) {
-               free_hpsb_packet(packet);
+               hpsb_free_packet(packet);
                return NULL;
        }
 
@@ -353,13 +353,13 @@ struct hpsb_packet *hpsb_make_lockpacket(struct hpsb_host *host, nodeid_t node,
        struct hpsb_packet *p;
        u32 length;
 
-       p = alloc_hpsb_packet(8);
+       p = hpsb_alloc_packet(8);
        if (!p) return NULL;
 
        p->host = host;
        p->node_id = node;
        if (hpsb_get_tlabel(p)) {
-               free_hpsb_packet(p);
+               hpsb_free_packet(p);
                return NULL;
        }
 
@@ -390,13 +390,13 @@ struct hpsb_packet *hpsb_make_lock64packet(struct hpsb_host *host, nodeid_t node
        struct hpsb_packet *p;
        u32 length;
 
-       p = alloc_hpsb_packet(16);
+       p = hpsb_alloc_packet(16);
        if (!p) return NULL;
 
        p->host = host;
        p->node_id = node;
        if (hpsb_get_tlabel(p)) {
-               free_hpsb_packet(p);
+               hpsb_free_packet(p);
                return NULL;
        }
 
@@ -429,7 +429,7 @@ struct hpsb_packet *hpsb_make_phypacket(struct hpsb_host *host,
 {
         struct hpsb_packet *p; 
 
-        p = alloc_hpsb_packet(0); 
+        p = hpsb_alloc_packet(0); 
         if (!p) return NULL; 
 
         p->host = host; 
@@ -444,7 +444,7 @@ struct hpsb_packet *hpsb_make_isopacket(struct hpsb_host *host,
 {
        struct hpsb_packet *p;
 
-       p = alloc_hpsb_packet(length);
+       p = hpsb_alloc_packet(length);
        if (!p) return NULL;
 
        p->host = host;
@@ -478,13 +478,10 @@ int hpsb_read(struct hpsb_host *host, nodeid_t node, unsigned int generation,
         }
 
        packet->generation = generation;
-        if (!hpsb_send_packet(packet)) {
-               retval = -EINVAL;
+        retval = hpsb_send_packet_and_wait(packet);
+       if (retval < 0)
                goto hpsb_read_fail;
-       }
 
-        down(&packet->state_change);
-        down(&packet->state_change);
         retval = hpsb_packet_success(packet);
 
         if (retval == 0) {
@@ -497,7 +494,7 @@ int hpsb_read(struct hpsb_host *host, nodeid_t node, unsigned int generation,
 
 hpsb_read_fail:
         hpsb_free_tlabel(packet);
-        free_hpsb_packet(packet);
+        hpsb_free_packet(packet);
 
         return retval;
 }
@@ -520,18 +517,15 @@ int hpsb_write(struct hpsb_host *host, nodeid_t node, unsigned int generation,
                return -ENOMEM;
 
        packet->generation = generation;
-        if (!hpsb_send_packet(packet)) {
-               retval = -EINVAL;
+        retval = hpsb_send_packet_and_wait(packet);
+       if (retval < 0)
                goto hpsb_write_fail;
-       }
 
-        down(&packet->state_change);
-        down(&packet->state_change);
         retval = hpsb_packet_success(packet);
 
 hpsb_write_fail:
         hpsb_free_tlabel(packet);
-        free_hpsb_packet(packet);
+        hpsb_free_packet(packet);
 
         return retval;
 }
@@ -550,12 +544,10 @@ int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation,
                 return -ENOMEM;
 
        packet->generation = generation;
-        if (!hpsb_send_packet(packet)) {
-               retval = -EINVAL;
+        retval = hpsb_send_packet_and_wait(packet);
+       if (retval < 0)
                goto hpsb_lock_fail;
-       }
-        down(&packet->state_change);
-        down(&packet->state_change);
+
         retval = hpsb_packet_success(packet);
 
         if (retval == 0) {
@@ -564,7 +556,7 @@ int hpsb_lock(struct hpsb_host *host, nodeid_t node, unsigned int generation,
 
 hpsb_lock_fail:
         hpsb_free_tlabel(packet);
-        free_hpsb_packet(packet);
+        hpsb_free_packet(packet);
 
         return retval;
 }
@@ -582,12 +574,10 @@ int hpsb_lock64(struct hpsb_host *host, nodeid_t node, unsigned int generation,
                return -ENOMEM;
 
        packet->generation = generation;
-       if (!hpsb_send_packet(packet)) {
-               retval = -EINVAL;
+       retval = hpsb_send_packet_and_wait(packet);
+       if (retval < 0)
                goto hpsb_lock64_fail;
-       }
-       down(&packet->state_change);
-       down(&packet->state_change);
+
        retval = hpsb_packet_success(packet);
 
        if (retval == 0)
@@ -595,7 +585,7 @@ int hpsb_lock64(struct hpsb_host *host, nodeid_t node, unsigned int generation,
 
 hpsb_lock64_fail:
        hpsb_free_tlabel(packet);
-       free_hpsb_packet(packet);
+       hpsb_free_packet(packet);
 
         return retval;
 }
@@ -626,10 +616,9 @@ int hpsb_send_gasp(struct hpsb_host *host, int channel, unsigned int generation,
 
        packet->no_waiter = 1;
 
-       if (!hpsb_send_packet(packet)) {
-               free_hpsb_packet(packet);
-               retval = -EINVAL;
-       }
+       retval = hpsb_send_packet(packet);
+       if (retval < 0)
+               hpsb_free_packet(packet);
 
        return retval;
 }
index 744204d..1d010d7 100644 (file)
@@ -40,6 +40,7 @@ static struct hpsb_iso* hpsb_iso_common_init(struct hpsb_host *host, enum hpsb_i
                                             unsigned int data_buf_size,
                                             unsigned int buf_packets,
                                             int channel,
+                                            int dma_mode,
                                             int irq_interval,
                                             void (*callback)(struct hpsb_iso*))
 {
@@ -58,8 +59,13 @@ static struct hpsb_iso* hpsb_iso_common_init(struct hpsb_host *host, enum hpsb_i
        if (buf_packets < 2)
                buf_packets = 2;
 
-       if (irq_interval < 1 || irq_interval > buf_packets / 2)
-               irq_interval = buf_packets / 2;
+       if ((dma_mode < HPSB_ISO_DMA_DEFAULT) || (dma_mode > HPSB_ISO_DMA_PACKET_PER_BUFFER))
+               dma_mode=HPSB_ISO_DMA_DEFAULT;
+
+       if (irq_interval == 0)     /* really interrupt for each packet*/
+               irq_interval = 1;
+       else if ((irq_interval < 0) || (irq_interval > buf_packets / 4))
+               irq_interval = buf_packets / 4;
 
        if (channel < -1 || channel >= 64)
                return NULL;
@@ -83,6 +89,7 @@ static struct hpsb_iso* hpsb_iso_common_init(struct hpsb_host *host, enum hpsb_i
        init_waitqueue_head(&iso->waitq);
        iso->channel = channel;
        iso->irq_interval = irq_interval;
+       iso->dma_mode = dma_mode;
        dma_region_init(&iso->data_buf);
        iso->buf_size = round_up_to_page(data_buf_size);
        iso->buf_packets = buf_packets;
@@ -136,7 +143,7 @@ struct hpsb_iso* hpsb_iso_xmit_init(struct hpsb_host *host,
 {
        struct hpsb_iso *iso = hpsb_iso_common_init(host, HPSB_ISO_XMIT,
                                                    data_buf_size, buf_packets,
-                                                   channel, irq_interval, callback);
+                                                   channel, HPSB_ISO_DMA_DEFAULT, irq_interval, callback);
        if (!iso)
                return NULL;
 
@@ -158,12 +165,13 @@ struct hpsb_iso* hpsb_iso_recv_init(struct hpsb_host *host,
                                    unsigned int data_buf_size,
                                    unsigned int buf_packets,
                                    int channel,
+                                   int dma_mode,
                                    int irq_interval,
                                    void (*callback)(struct hpsb_iso*))
 {
        struct hpsb_iso *iso = hpsb_iso_common_init(host, HPSB_ISO_RECV,
                                                    data_buf_size, buf_packets,
-                                                   channel, irq_interval, callback);
+                                                   channel, dma_mode, irq_interval, callback);
        if (!iso)
                return NULL;
 
index c05a357..fb654d9 100644 (file)
@@ -51,6 +51,14 @@ struct hpsb_iso_packet_info {
 
 enum hpsb_iso_type { HPSB_ISO_RECV = 0, HPSB_ISO_XMIT = 1 };
 
+/* The mode of the dma when receiving iso data. Must be supported by chip */
+enum raw1394_iso_dma_recv_mode {
+       HPSB_ISO_DMA_DEFAULT = -1,
+       HPSB_ISO_DMA_OLD_ABI = 0,
+       HPSB_ISO_DMA_BUFFERFILL = 1,
+       HPSB_ISO_DMA_PACKET_PER_BUFFER = 2
+};
+
 struct hpsb_iso {
        enum hpsb_iso_type type;
 
@@ -68,6 +76,8 @@ struct hpsb_iso {
 
        int speed; /* IEEE1394_SPEED_100, 200, or 400 */
        int channel; /* -1 if multichannel */
+       int dma_mode; /* dma receive mode */
+
 
        /* greatest # of packets between interrupts - controls
           the maximum latency of the buffer */
@@ -139,6 +149,7 @@ struct hpsb_iso* hpsb_iso_recv_init(struct hpsb_host *host,
                                    unsigned int data_buf_size,
                                    unsigned int buf_packets,
                                    int channel,
+                                   int dma_mode,
                                    int irq_interval,
                                    void (*callback)(struct hpsb_iso*));
 
index 708450f..ebd0081 100644 (file)
@@ -516,8 +516,7 @@ static struct device nodemgr_dev_template_ne = {
        .driver_data    = &nodemgr_driverdata_ne,
 };
 
-
-static struct device nodemgr_dev_template_host = {
+struct device nodemgr_dev_template_host = {
        .bus            = &ieee1394_bus_type,
        .release        = nodemgr_release_host,
        .driver         = &nodemgr_driver_host,
@@ -1255,36 +1254,6 @@ void hpsb_unregister_protocol(struct hpsb_protocol_driver *driver)
 }
 
 
-/* Searches the list of ud's that match a ne as the parent. If the ud has
- * a driver associated with it, we call that driver's update function
- * with the ud as the argument. */
-static int nodemgr_driver_search_cb(struct device *dev, void *__data)
-{
-       struct node_entry *ne = __data;
-       struct unit_directory *ud;
-
-       if (dev->driver_data == &nodemgr_driverdata_ne ||
-           dev->driver_data == &nodemgr_driverdata_host)
-               return 0;
-
-       ud = container_of(dev, struct unit_directory, device);
-
-       if (&ne->device != ud->device.parent)
-               return 0;
-
-       if (ud->device.driver) {
-               struct hpsb_protocol_driver *pdrv;
-
-               pdrv = container_of(ud->device.driver,
-                               struct hpsb_protocol_driver, driver);
-
-               if (pdrv->update)
-                       pdrv->update(ud);
-       }
-
-       return 0;
-}
-
 /*
  * This function updates nodes that were present on the bus before the
  * reset and still are after the reset.  The nodeid and the config rom
@@ -1480,9 +1449,24 @@ static int nodemgr_probe_ne_cb(struct device *dev, void *__data)
                ne->needs_probe = 0;
                return 1;
        } else {
+               struct list_head *lh;
+
                /* Update unit_dirs with attached drivers */
-               bus_for_each_dev(&ieee1394_bus_type, NULL, ne,
-                                nodemgr_driver_search_cb);
+               list_for_each(lh, &dev->children) {
+                       struct unit_directory *ud;
+                       
+                       ud = container_of(list_to_dev(lh), struct unit_directory, device);
+
+                       if (ud->device.driver) {
+                               struct hpsb_protocol_driver *pdrv;
+
+                               pdrv = container_of(ud->device.driver,
+                                                   struct hpsb_protocol_driver, driver);
+
+                               if (pdrv->update)
+                                       pdrv->update(ud);
+                       }
+               }
        }
        return 0;
 }
@@ -1664,7 +1648,6 @@ static int nodemgr_host_thread(void *__hi)
        allow_signal(SIGTERM);
 
        /* Setup our device-model entries */
-       device_register(&host->device);
        nodemgr_create_host_dev_files(host);
 
        /* Sit and wait for a signal to probe the nodes on the bus. This
@@ -1753,6 +1736,34 @@ struct node_entry *hpsb_nodeid_get_entry(struct hpsb_host *host, nodeid_t nodeid
        return ne;
 }
 
+struct for_each_host_struct {
+       int (*cb)(struct hpsb_host *, void *);
+       void *data;
+};
+
+static int nodemgr_for_each_host_cb(struct device *dev, void *__data)
+{
+       struct for_each_host_struct *host_data = __data;
+       struct hpsb_host *host;
+
+       if (dev->driver_data != &nodemgr_driverdata_host)
+               return 0;
+
+       host = container_of(dev, struct hpsb_host, device);
+
+       return host_data->cb(host, host_data->data);
+}
+
+int nodemgr_for_each_host(void *__data, int (*cb)(struct hpsb_host *, void *))
+{
+       struct for_each_host_struct host_data;
+
+       host_data.cb = cb;
+       host_data.data = __data;
+
+       return bus_for_each_dev(&ieee1394_bus_type, NULL, &host_data, nodemgr_for_each_host_cb);
+}
+
 /* The following four convenience functions use a struct node_entry
  * for addressing a node on the bus.  They are intended for use by any
  * process context, not just the nodemgr thread, so we need to be a
@@ -1821,11 +1832,6 @@ static void nodemgr_add_host(struct hpsb_host *host)
        init_completion(&hi->exited);
         sema_init(&hi->reset_sem, 0);
 
-       memcpy(&host->device, &nodemgr_dev_template_host,
-              sizeof(host->device));
-       host->device.parent = &host->pdev->dev;
-       snprintf(host->device.bus_id, BUS_ID_SIZE, "fw-host%d", host->id);
-
        sprintf(hi->daemon_name, "knodemgrd_%d", host->id);
 
        hi->pid = kernel_thread(nodemgr_host_thread, hi, CLONE_KERNEL);
@@ -1879,7 +1885,6 @@ static struct hpsb_highlevel nodemgr_highlevel = {
 
 void init_ieee1394_nodemgr(void)
 {
-       bus_register(&ieee1394_bus_type);
        driver_register(&nodemgr_driver_host);
        driver_register(&nodemgr_driver_ne);
 
@@ -1892,5 +1897,4 @@ void cleanup_ieee1394_nodemgr(void)
 
        driver_unregister(&nodemgr_driver_ne);
        driver_unregister(&nodemgr_driver_host);
-       bus_unregister(&ieee1394_bus_type);
 }
index 4600b6b..a877f05 100644 (file)
@@ -219,7 +219,16 @@ int hpsb_node_lock(struct node_entry *ne, u64 addr,
                   int extcode, quadlet_t *data, quadlet_t arg);
 
 
+/* Iterate the hosts, calling a given function with supplied data for each
+ * host. */
+int nodemgr_for_each_host(void *__data, int (*cb)(struct hpsb_host *, void *));
+
+
 void init_ieee1394_nodemgr(void);
 void cleanup_ieee1394_nodemgr(void);
 
+
+/* The template for a host device */
+extern struct device nodemgr_dev_template_host;
+
 #endif /* _IEEE1394_NODEMGR_H */
index 10c2acc..5b66fdc 100644 (file)
 
 #ifdef OHCI1394_DEBUG
 #define DBGMSG(card, fmt, args...) \
-printk(KERN_INFO "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
+printk(KERN_INFO "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
 #else
 #define DBGMSG(card, fmt, args...)
 #endif
@@ -158,10 +158,10 @@ printk(level "%s: " fmt "\n" , OHCI1394_DRIVER_NAME , ## args)
 
 /* print card specific information */
 #define PRINT(level, card, fmt, args...) \
-printk(level "%s_%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
+printk(level "%s: fw-host%d: " fmt "\n" , OHCI1394_DRIVER_NAME, card , ## args)
 
 static char version[] __devinitdata =
-       "$Rev: 1045 $ Ben Collins <bcollins@debian.org>";
+       "$Rev: 1087 $ Ben Collins <bcollins@debian.org>";
 
 /* Module Parameters */
 static int phys_dma = 1;
@@ -845,7 +845,7 @@ static int ohci_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
                PRINT(KERN_ERR, ohci->id, 
                      "Transmit packet size %Zd is too big",
                      packet->data_size);
-               return 0;
+               return -EOVERFLOW;
        }
 
        /* Decide whether we have an iso, a request, or a response packet */
@@ -862,7 +862,7 @@ static int ohci_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
                        if (in_interrupt()) {
                                PRINT(KERN_ERR, ohci->id, 
                                      "legacy IT context cannot be initialized during interrupt");
-                               return 0;
+                               return -EINVAL;
                        }
 
                        if (alloc_dma_trm_ctx(ohci, &ohci->it_legacy_context,
@@ -870,7 +870,7 @@ static int ohci_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
                                              OHCI1394_IsoXmitContextBase) < 0) {
                                PRINT(KERN_ERR, ohci->id, 
                                      "error initializing legacy IT context");
-                               return 0;
+                               return -ENOMEM;
                        }
 
                        initialize_dma_trm_ctx(&ohci->it_legacy_context);
@@ -890,7 +890,7 @@ static int ohci_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
 
        spin_unlock_irqrestore(&d->lock,flags);
 
-       return 1;
+       return 0;
 }
 
 static int ohci_devctl(struct hpsb_host *host, enum devctl_cmd cmd, int arg)
@@ -1113,8 +1113,8 @@ struct ohci_iso_recv {
        struct ohci1394_iso_tasklet task;
        int task_active;
 
-       enum { BUFFER_FILL_MODE,
-              PACKET_PER_BUFFER_MODE } dma_mode;
+       enum { BUFFER_FILL_MODE = 0,
+              PACKET_PER_BUFFER_MODE = 1 } dma_mode;
 
        /* memory and PCI mapping for the DMA descriptors */
        struct dma_prog_region prog;
@@ -1175,7 +1175,8 @@ static int ohci_iso_recv_init(struct hpsb_iso *iso)
        /* use buffer-fill mode, unless irq_interval is 1
           (note: multichannel requires buffer-fill) */
 
-       if (iso->irq_interval == 1 && iso->channel != -1) {
+       if (((iso->irq_interval == 1 && iso->dma_mode == HPSB_ISO_DMA_OLD_ABI) ||
+            iso->dma_mode == HPSB_ISO_DMA_PACKET_PER_BUFFER) && iso->channel != -1) {
                recv->dma_mode = PACKET_PER_BUFFER_MODE;
        } else {
                recv->dma_mode = BUFFER_FILL_MODE;
@@ -1194,8 +1195,11 @@ static int ohci_iso_recv_init(struct hpsb_iso *iso)
                }
 
                /* iso->irq_interval is in packets - translate that to blocks */
-               /* (err, sort of... 1 is always the safest value) */
-               recv->block_irq_interval = iso->irq_interval / recv->nblocks;
+               if (iso->irq_interval == 1)
+                       recv->block_irq_interval = 1;                   
+               else
+                       recv->block_irq_interval = iso->irq_interval *
+                                                       ((recv->nblocks+1)/iso->buf_packets);
                if (recv->block_irq_interval*4 > recv->nblocks)
                        recv->block_irq_interval = recv->nblocks/4;
                if (recv->block_irq_interval < 1)
@@ -1205,6 +1209,10 @@ static int ohci_iso_recv_init(struct hpsb_iso *iso)
                int max_packet_size;
 
                recv->nblocks = iso->buf_packets;
+               recv->block_irq_interval = iso->irq_interval;
+               if (recv->block_irq_interval * 4 > iso->buf_packets)
+                       recv->block_irq_interval = iso->buf_packets / 4;
+               if (recv->block_irq_interval < 1)
                recv->block_irq_interval = 1;
 
                /* choose a buffer stride */
@@ -3271,7 +3279,6 @@ do {                                              \
 static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
                                        const struct pci_device_id *ent)
 {
-       static unsigned int card_id_counter = 0;
        static int version_printed = 0;
 
        struct hpsb_host *host;
@@ -3282,15 +3289,14 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
                PRINT_G(KERN_INFO, "%s", version);
 
         if (pci_enable_device(dev))
-               FAIL(-ENXIO, "Failed to enable OHCI hardware %d",
-                       card_id_counter++);
+               FAIL(-ENXIO, "Failed to enable OHCI hardware");
         pci_set_master(dev);
 
-       host = hpsb_alloc_host(&ohci1394_driver, sizeof(struct ti_ohci));
+       host = hpsb_alloc_host(&ohci1394_driver, sizeof(struct ti_ohci), &dev->dev);
        if (!host) FAIL(-ENOMEM, "Failed to allocate host structure");
 
        ohci = host->hostdata;
-       ohci->id = card_id_counter++;
+       ohci->id = host->id;
        ohci->dev = dev;
        ohci->host = host;
        ohci->init_state = OHCI_INIT_ALLOC_HOST;
@@ -3462,11 +3468,14 @@ static int __devinit ohci1394_pci_probe(struct pci_dev *dev,
 static void ohci1394_pci_remove(struct pci_dev *pdev)
 {
        struct ti_ohci *ohci;
+       struct device *dev;
 
        ohci = pci_get_drvdata(pdev);
        if (!ohci)
                return;
 
+       dev = get_device(&ohci->host->device);
+
        switch (ohci->init_state) {
        case OHCI_INIT_DONE:
                hpsb_remove_host(ohci->host);
@@ -3489,7 +3498,7 @@ static void ohci1394_pci_remove(struct pci_dev *pdev)
 
                /* Disable IRM Contender */
                set_phy_reg(ohci, 4, ~0xc0 & get_phy_reg(ohci, 4));
-               
+
                /* Clear link control register */
                reg_write(ohci, OHCI1394_LinkControlClear, 0xffffffff);
 
@@ -3521,7 +3530,7 @@ static void ohci1394_pci_remove(struct pci_dev *pdev)
                                    ohci->selfid_buf_cpu,
                                    ohci->selfid_buf_bus);
                OHCI_DMA_FREE("consistent selfid_buf");
-               
+
        case OHCI_INIT_HAVE_CONFIG_ROM_BUFFER:
                pci_free_consistent(ohci->dev, OHCI_CONFIG_ROM_LEN,
                                    ohci->csr_config_rom_cpu,
@@ -3555,8 +3564,10 @@ static void ohci1394_pci_remove(struct pci_dev *pdev)
 
        case OHCI_INIT_ALLOC_HOST:
                pci_set_drvdata(ohci->dev, NULL);
-               hpsb_unref_host(ohci->host);
        }
+
+       if (dev)
+               put_device(dev);
 }
 
 
index fec894c..056797b 100644 (file)
 000658 Helmut Fischer GmbH & Co. KG
 000659 EAL (Apeldoorn) B.V.
 00065A Strix Systems
-00065B Dell Inc.
+00065B Dell Computer Corp.
 00065C Malachite Technologies, Inc.
 00065D Heidelberg Web Systems
 00065E Photuris, Inc.
 00B0C2 Cisco Systems, Inc.
 00B0C7 Tellabs Operations, Inc.
 00B0CE TECHNOLOGY RESCUE
-00B0D0 Dell Inc.
+00B0D0 Dell Computer Corp.
 00B0DB Nextcell, Inc.
 00B0DF Reliable Data Technology, Inc.
 00B0E7 British Federal Ltd.
 00C04C DEPARTMENT OF FOREIGN AFFAIRS
 00C04D MITEC, INC.
 00C04E COMTROL CORPORATION
-00C04F Dell Inc.
+00C04F DELL COMPUTER CORPORATION
 00C050 TOYO DENKI SEIZO K.K.
 00C051 ADVANCED INTEGRATION RESEARCH
 00C052 BURR-BROWN
index 449f561..728c537 100644 (file)
@@ -521,10 +521,6 @@ static void send_next(struct ti_lynx *lynx, int what)
                 break;
         }                
 
-        if (!packet->data_be) {
-                pcl.buffer[1].control |= PCL_BIGENDIAN;
-        }
-
         put_pcl(lynx, d->pcl, &pcl);
         run_pcl(lynx, d->pcl_start, d->channel);
 }
@@ -540,7 +536,7 @@ static int lynx_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
         if (packet->data_size >= 4096) {
                 PRINT(KERN_ERR, lynx->id, "transmit packet data too big (%Zd)",
                       packet->data_size);
-                return 0;
+                return -EOVERFLOW;
         }
 
         switch (packet->type) {
@@ -554,7 +550,7 @@ static int lynx_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
         default:
                 PRINT(KERN_ERR, lynx->id, "invalid packet type %d",
                       packet->type);
-                return 0;
+                return -EINVAL;
         }
 
         if (packet->tcode == TCODE_WRITEQ
@@ -570,7 +566,7 @@ static int lynx_transmit(struct hpsb_host *host, struct hpsb_packet *packet)
 
         spin_unlock_irqrestore(&d->queue_lock, flags);
 
-        return 1;
+        return 0;
 }
 
 
@@ -1120,7 +1116,7 @@ static ssize_t mem_read(struct file *file, char *buffer, size_t count,
         retval = copy_to_user(buffer, md->lynx->mem_dma_buffer, count);
         up(&md->lynx->mem_dma_mutex);
 
-        if (retval < 0) return retval;
+       if (retval) return -EFAULT;
         *offset += count;
         return count;
 }
@@ -1141,14 +1137,17 @@ static ssize_t mem_write(struct file *file, const char *buffer, size_t count,
         /* FIXME: dereferencing pointers to PCI mem doesn't work everywhere */
         switch (md->type) {
         case aux:
-                copy_from_user(md->lynx->aux_port+(*offset), buffer, count);
+               if (copy_from_user(md->lynx->aux_port+(*offset), buffer, count))
+                       return -EFAULT;
                 break;
         case ram:
-                copy_from_user(md->lynx->local_ram+(*offset), buffer, count);
+               if (copy_from_user(md->lynx->local_ram+(*offset), buffer, count))
+                       return -EFAULT;
                 break;
         case rom:
                 /* the ROM may be writeable */
-                copy_from_user(md->lynx->local_rom+(*offset), buffer, count);
+               if (copy_from_user(md->lynx->local_rom+(*offset), buffer, count))
+                       return -EFAULT;
                 break;
         }
 
@@ -1443,12 +1442,15 @@ static void iso_rcv_bh(struct ti_lynx *lynx)
 static void remove_card(struct pci_dev *dev)
 {
         struct ti_lynx *lynx;
+       struct device *lynx_dev;
         int i;
 
         lynx = pci_get_drvdata(dev);
         if (!lynx) return;
         pci_set_drvdata(dev, NULL);
 
+       lynx_dev = get_device(&lynx->host->device);
+
         switch (lynx->state) {
         case is_host:
                 reg_write(lynx, PCI_INT_ENABLE, 0);
@@ -1498,7 +1500,9 @@ static void remove_card(struct pci_dev *dev)
         }
 
        tasklet_kill(&lynx->iso_rcv.tq);
-       hpsb_unref_host(lynx->host);
+
+       if (lynx_dev)
+               put_device(lynx_dev);
 }
 
 
@@ -1535,7 +1539,7 @@ static int __devinit add_card(struct pci_dev *dev,
 
         error = -ENOMEM;
 
-       host = hpsb_alloc_host(&lynx_driver, sizeof(struct ti_lynx));
+       host = hpsb_alloc_host(&lynx_driver, sizeof(struct ti_lynx), &dev->dev);
         if (!host) FAIL("failed to allocate control structure memory");
 
         lynx = host->hostdata;
index b56e15b..17e6d74 100644 (file)
@@ -128,7 +128,7 @@ static void free_pending_request(struct pending_request *req)
         } else if (req->free_data) {
                 kfree(req->data);
         }
-        free_hpsb_packet(req->packet);
+        hpsb_free_packet(req->packet);
         kfree(req);
 }
 
@@ -558,7 +558,7 @@ static int state_initialized(struct file_info *fi, struct pending_request *req)
                                 lh = lh->next;
                         }
                         hi = list_entry(lh, struct host_info, list);
-                        hpsb_ref_host(hi->host); // XXX Need to handle failure case
+                       get_device(&hi->host->device); // XXX Need to handle failure case
                         list_add_tail(&fi->list, &hi->file_info_list);
                         fi->host = hi->host;
                         fi->state = connected;
@@ -782,7 +782,7 @@ static int handle_async_request(struct file_info *fi,
 
        packet->generation = req->req.generation;
 
-        if (!hpsb_send_packet(packet)) {
+        if (hpsb_send_packet(packet) < 0) {
                 req->req.error = RAW1394_ERROR_SEND_ERROR;
                 req->req.length = 0;
                 hpsb_free_tlabel(packet);
@@ -823,7 +823,7 @@ static int handle_iso_send(struct file_info *fi, struct pending_request *req,
        /* Update the generation of the packet just before sending. */
        packet->generation = req->req.generation;
 
-        if (!hpsb_send_packet(packet)) {
+        if (hpsb_send_packet(packet) < 0) {
                 req->req.error = RAW1394_ERROR_SEND_ERROR;
                 queue_complete_req(req);
         }
@@ -846,7 +846,7 @@ static int handle_async_send(struct file_info *fi, struct pending_request *req)
                 return sizeof(struct raw1394_request);
         } 
 
-        packet = alloc_hpsb_packet(req->req.length-header_length);
+        packet = hpsb_alloc_packet(req->req.length-header_length);
         req->packet = packet;
         if (!packet) return -ENOMEM;
 
@@ -885,7 +885,7 @@ static int handle_async_send(struct file_info *fi, struct pending_request *req)
         /* Update the generation of the packet just before sending. */
         packet->generation = req->req.generation;
 
-        if (!hpsb_send_packet(packet)) {
+        if (hpsb_send_packet(packet) < 0) {
                 req->req.error = RAW1394_ERROR_SEND_ERROR;
                 queue_complete_req(req);
         }
@@ -1797,6 +1797,106 @@ static int arm_unregister(struct file_info *fi, struct pending_request *req)
         return sizeof(struct raw1394_request);
 }
 
+/* Copy data from ARM buffer(s) to user buffer. */
+static int arm_get_buf(struct file_info *fi, struct pending_request *req)
+{
+       struct arm_addr  *arm_addr = NULL;
+       unsigned long flags;
+       unsigned long offset;
+
+       struct list_head *entry;
+
+       DBGMSG("arm_get_buf "
+              "addr(Offset): %04X %08X length: %u",
+              (u32) ((req->req.address >> 32) & 0xFFFF),
+              (u32) (req->req.address & 0xFFFFFFFF),
+              (u32) req->req.length);
+
+       spin_lock_irqsave(&host_info_lock, flags);
+       entry = fi->addr_list.next;
+       while (entry != &(fi->addr_list)) {
+               arm_addr = list_entry(entry, struct arm_addr, addr_list);
+               if ((arm_addr->start <= req->req.address) &&
+                   (arm_addr->end > req->req.address)) {
+                       if (req->req.address + req->req.length <= arm_addr->end) {
+                               offset = req->req.address - arm_addr->start;
+
+                               DBGMSG("arm_get_buf copy_to_user( %08X, %08X, %u )",
+                                      (u32) req->req.recvb,
+                                      (u32) (arm_addr->addr_space_buffer+offset),
+                                      (u32) req->req.length);
+
+                               if (copy_to_user(int2ptr(req->req.recvb), arm_addr->addr_space_buffer+offset, req->req.length)) {
+                                       spin_unlock_irqrestore(&host_info_lock, flags);
+                                       return (-EFAULT);
+                               }
+
+                               spin_unlock_irqrestore(&host_info_lock, flags);
+                               free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */
+                               return sizeof(struct raw1394_request);
+                       } else {
+                               DBGMSG("arm_get_buf request exceeded mapping");
+                               spin_unlock_irqrestore(&host_info_lock, flags);
+                               return (-EINVAL);
+                       }
+               }
+               entry = entry->next;
+       }
+       spin_unlock_irqrestore(&host_info_lock, flags);
+       return (-EINVAL);
+}
+
+
+/* Copy data from user buffer to ARM buffer(s). */
+static int arm_set_buf(struct file_info *fi, struct pending_request *req)
+{
+       struct arm_addr  *arm_addr = NULL;
+       unsigned long flags;
+       unsigned long offset;
+
+       struct list_head *entry;
+
+       DBGMSG("arm_set_buf "
+              "addr(Offset): %04X %08X length: %u",
+              (u32) ((req->req.address >> 32) & 0xFFFF),
+              (u32) (req->req.address & 0xFFFFFFFF),
+              (u32) req->req.length);
+
+
+       spin_lock_irqsave(&host_info_lock, flags);
+       entry = fi->addr_list.next;
+       while (entry != &(fi->addr_list)) {
+               arm_addr = list_entry(entry, struct arm_addr, addr_list);
+               if ((arm_addr->start <= req->req.address) &&
+                   (arm_addr->end > req->req.address)) {
+                       if (req->req.address + req->req.length <= arm_addr->end) {
+                               offset = req->req.address - arm_addr->start;
+
+                               DBGMSG("arm_set_buf copy_from_user( %08X, %08X, %u )",
+                                      (u32) (arm_addr->addr_space_buffer+offset),
+                                      (u32) req->req.sendb,
+                                      (u32) req->req.length);
+
+                               if (copy_from_user(arm_addr->addr_space_buffer+offset, int2ptr(req->req.sendb), req->req.length)) {
+                                       spin_unlock_irqrestore(&host_info_lock, flags);
+                                       return (-EFAULT);
+                               }
+
+                               spin_unlock_irqrestore(&host_info_lock, flags);
+                               free_pending_request(req); /* we have to free the request, because we queue no response, and therefore nobody will free it */
+                               return sizeof(struct raw1394_request);
+                       } else {
+                               DBGMSG("arm_set_buf request exceeded mapping");
+                               spin_unlock_irqrestore(&host_info_lock, flags);
+                               return (-EINVAL);
+                       }
+               }
+               entry = entry->next;
+       }
+       spin_unlock_irqrestore(&host_info_lock, flags);
+       return (-EINVAL);
+}
+
 static int reset_notification(struct file_info *fi, struct pending_request *req)
 {
         DBGMSG("reset_notification called - switch %s ",
@@ -1829,9 +1929,8 @@ static int write_phypacket(struct file_info *fi, struct pending_request *req)
         spin_unlock_irq(&fi->reqlists_lock);
         packet->generation = req->req.generation;
         retval = hpsb_send_packet(packet);
-        DBGMSG("write_phypacket send_packet called => retval: %d ",
-                retval);
-        if (! retval) {
+        DBGMSG("write_phypacket send_packet called => retval: %d ", retval);
+        if (retval < 0) {
                 req->req.error = RAW1394_ERROR_SEND_ERROR;
                 req->req.length = 0;
                 queue_complete_req(req);
@@ -1912,6 +2011,12 @@ static int state_connected(struct file_info *fi, struct pending_request *req)
         case RAW1394_REQ_ARM_UNREGISTER:
                 return arm_unregister(fi, req);
 
+        case RAW1394_REQ_ARM_SET_BUF:
+                return arm_set_buf(fi, req);
+
+        case RAW1394_REQ_ARM_GET_BUF:
+                return arm_get_buf(fi, req);
+
         case RAW1394_REQ_RESET_NOTIFY:
                 return reset_notification(fi, req);
 
@@ -2137,6 +2242,7 @@ static int raw1394_iso_recv_init(struct file_info *fi, void *uaddr)
                                            stat.config.data_buf_size,
                                            stat.config.buf_packets,
                                            stat.config.channel,
+                                           stat.config.dma_mode,
                                            stat.config.irq_interval,
                                            rawiso_activity_cb);
        if (!fi->iso_handle)
@@ -2489,7 +2595,7 @@ static int raw1394_release(struct inode *inode, struct file *file)
                 list_del(&fi->list);
                 spin_unlock_irq(&host_info_lock);
 
-                hpsb_unref_host(fi->host);
+               put_device(&fi->host->device);
         }
 
         kfree(fi);
index e178bda..cd4fc47 100644 (file)
@@ -30,6 +30,8 @@
 
 #define RAW1394_REQ_ARM_REGISTER    300
 #define RAW1394_REQ_ARM_UNREGISTER  301
+#define RAW1394_REQ_ARM_SET_BUF     302
+#define RAW1394_REQ_ARM_GET_BUF     303
 
 #define RAW1394_REQ_RESET_NOTIFY    400
 
@@ -149,6 +151,9 @@ struct raw1394_iso_config {
        /* xmit only - iso transmission speed */
        __u8 speed;
 
+       /* The mode of the dma when receiving iso data. Must be supported by chip */
+       __u8 dma_mode;
+
        /* max. latency of buffer, in packets (-1 if you don't care) */
        __s32 irq_interval;
 };
index 1d809c4..c3d8d22 100644 (file)
@@ -77,7 +77,7 @@
 #include "sbp2.h"
 
 static char version[] __devinitdata =
-       "$Rev: 1034 $ Ben Collins <bcollins@debian.org>";
+       "$Rev: 1082 $ Ben Collins <bcollins@debian.org>";
 
 /*
  * Module load parameter definitions
@@ -361,38 +361,34 @@ static int sbp2util_down_timeout(atomic_t *done, int timeout)
 static void sbp2_free_packet(struct hpsb_packet *packet)
 {
        hpsb_free_tlabel(packet);
-       free_hpsb_packet(packet);
+       hpsb_free_packet(packet);
 }
 
-/*
- * This function is called to retrieve a block write packet from our
- * packet pool. This function is used in place of calling
- * alloc_hpsb_packet (which costs us three kmallocs). Instead we just pull
- * out a free request packet and re-initialize values in it. I'm sure this
- * can still stand some more optimization.
+/* This is much like hpsb_node_write(), except it ignores the response
+ * subaction and returns immediately. Can be used from interrupts.
  */
-static struct hpsb_packet *
-sbp2util_allocate_write_packet(struct sbp2scsi_host_info *hi,
-                              struct node_entry *ne, u64 addr,
-                              size_t data_size,
-                              quadlet_t *data)
+int sbp2util_node_write_no_wait(struct node_entry *ne, u64 addr,
+                               quadlet_t *buffer, size_t length)
 {
        struct hpsb_packet *packet;
 
-       packet = hpsb_make_writepacket(hi->host, ne->nodeid,
-                                      addr, data, data_size);
-
+       packet = hpsb_make_writepacket(ne->host, ne->nodeid,
+                                      addr, buffer, length);
         if (!packet)
-                return NULL;
+                return -ENOMEM;
 
        hpsb_set_packet_complete_task(packet, (void (*)(void*))sbp2_free_packet,
                                      packet);
 
        hpsb_node_fill_packet(ne, packet);
 
-       return packet;
-}
+        if (hpsb_send_packet(packet) < 0) {
+               sbp2_free_packet(packet);
+               return -EIO;
+       }
 
+       return 0;
+}
 
 /*
  * This function is called to create a pool of command orbs used for
@@ -1734,35 +1730,26 @@ static int sbp2_max_speed_and_size(struct scsi_id_instance_data *scsi_id)
  */
 static int sbp2_agent_reset(struct scsi_id_instance_data *scsi_id, int wait) 
 {
-       struct sbp2scsi_host_info *hi = scsi_id->hi;
-       struct hpsb_packet *packet;
        quadlet_t data;
-       
+       u64 addr;
+       int retval;
+
        SBP2_DEBUG("sbp2_agent_reset");
 
        /*
         * Ok, let's write to the target's management agent register
         */
        data = ntohl(SBP2_AGENT_RESET_DATA);
-       packet = sbp2util_allocate_write_packet(hi, scsi_id->ne,
-                                               scsi_id->sbp2_command_block_agent_addr +
-                                               SBP2_AGENT_RESET_OFFSET,
-                                               4, &data);
-
-       if (!packet) {
-               SBP2_ERR("sbp2util_allocate_write_packet failed");
-               return(-ENOMEM);
-       }
+       addr = scsi_id->sbp2_command_block_agent_addr + SBP2_AGENT_RESET_OFFSET;
 
-       if (!hpsb_send_packet(packet)) {
-               SBP2_ERR("hpsb_send_packet failed");
-               sbp2_free_packet(packet); 
-               return(-EIO);
-       }
+       if (wait)
+               retval = hpsb_node_write(scsi_id->ne, addr, &data, 4);
+       else
+               retval = sbp2util_node_write_no_wait(scsi_id->ne, addr, &data, 4);
 
-       if (wait) {
-               down(&packet->state_change);
-               down(&packet->state_change);
+       if (retval < 0) {
+               SBP2_ERR("hpsb_node_write failed.\n");
+               return -EIO;
        }
 
        /*
@@ -2032,8 +2019,9 @@ static int sbp2_link_orb_command(struct scsi_id_instance_data *scsi_id,
                                 struct sbp2_command_info *command)
 {
        struct sbp2scsi_host_info *hi = scsi_id->hi;
-        struct hpsb_packet *packet;
        struct sbp2_command_orb *command_orb = &command->command_orb;
+       struct node_entry *ne = scsi_id->ne;
+       u64 addr;
 
        outstanding_orb_incr;
        SBP2_ORB_DEBUG("sending command orb %p, total orbs = %x",
@@ -2049,40 +2037,30 @@ static int sbp2_link_orb_command(struct scsi_id_instance_data *scsi_id,
         * Check to see if there are any previous orbs to use
         */
        if (scsi_id->last_orb == NULL) {
-       
+               quadlet_t data[2];
+
                /*
                 * Ok, let's write to the target's management agent register
                 */
-               if (hpsb_node_entry_valid(scsi_id->ne)) {
-
-                       packet = sbp2util_allocate_write_packet(hi, scsi_id->ne,
-                                                               scsi_id->sbp2_command_block_agent_addr +
-                                                               SBP2_ORB_POINTER_OFFSET, 8, NULL);
-               
-                       if (!packet) {
-                               SBP2_ERR("sbp2util_allocate_write_packet failed");
-                               return(-ENOMEM);
-                       }
-               
-                       packet->data[0] = ORB_SET_NODE_ID(hi->host->node_id);
-                       packet->data[1] = command->command_orb_dma;
-                       sbp2util_cpu_to_be32_buffer(packet->data, 8);
-               
-                       SBP2_ORB_DEBUG("write command agent, command orb %p", command_orb);
+               addr = scsi_id->sbp2_command_block_agent_addr + SBP2_ORB_POINTER_OFFSET;
+               data[0] = ORB_SET_NODE_ID(hi->host->node_id);
+               data[1] = command->command_orb_dma;
+               sbp2util_cpu_to_be32_buffer(data, 8);
 
-                       if (!hpsb_send_packet(packet)) {
-                               SBP2_ERR("hpsb_send_packet failed");
-                               sbp2_free_packet(packet); 
-                               return(-EIO);
-                       }
+               SBP2_ORB_DEBUG("write command agent, command orb %p", command_orb);
 
-                       SBP2_ORB_DEBUG("write command agent complete");
+               if (sbp2util_node_write_no_wait(ne, addr, data, 8) < 0) {
+                       SBP2_ERR("sbp2util_node_write_no_wait failed.\n");
+                       return -EIO;
                }
 
+               SBP2_ORB_DEBUG("write command agent complete");
+
                scsi_id->last_orb = command_orb;
                scsi_id->last_orb_dma = command->command_orb_dma;
 
        } else {
+               quadlet_t data;
 
                /*
                 * We have an orb already sent (maybe or maybe not
@@ -2102,25 +2080,14 @@ static int sbp2_link_orb_command(struct scsi_id_instance_data *scsi_id,
                /*
                 * Ring the doorbell
                 */
-               if (hpsb_node_entry_valid(scsi_id->ne)) {
-                       quadlet_t data = cpu_to_be32(command->command_orb_dma);
+               data = cpu_to_be32(command->command_orb_dma);
+               addr = scsi_id->sbp2_command_block_agent_addr + SBP2_DOORBELL_OFFSET;
 
-                       packet = sbp2util_allocate_write_packet(hi, scsi_id->ne,
-                                       scsi_id->sbp2_command_block_agent_addr +
-                                       SBP2_DOORBELL_OFFSET, 4, &data);
-       
-                       if (!packet) {
-                               SBP2_ERR("sbp2util_allocate_write_packet failed");
-                               return(-ENOMEM);
-                       }
+               SBP2_ORB_DEBUG("ring doorbell, command orb %p", command_orb);
 
-                       SBP2_ORB_DEBUG("ring doorbell, command orb %p", command_orb);
-
-                       if (!hpsb_send_packet(packet)) {
-                               SBP2_ERR("hpsb_send_packet failed");
-                               sbp2_free_packet(packet);
-                               return(-EIO);
-                       }
+               if (sbp2util_node_write_no_wait(ne, addr, &data, 4) < 0) {
+                       SBP2_ERR("sbp2util_node_write_no_wait failed");
+                       return(-EIO);
                }
 
                scsi_id->last_orb = command_orb;
index f477745..cace604 100644 (file)
@@ -21,6 +21,9 @@
 /* jds -- add private data to file to keep track of iso contexts associated
    with each open -- so release won't kill all iso transfers */
 
+/* Damien Douxchamps: Fix failure when the number of DMA pages per frame is
+   one */
+
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/list.h>
@@ -398,32 +401,42 @@ static void initialize_dma_ir_prg(struct dma_iso_ctx *d, int n, int flags)
        ir_prg[0].branchAddress = cpu_to_le32((dma_prog_region_offset_to_bus(ir_reg,
                                        1 * sizeof(struct dma_cmd)) & 0xfffffff0) | 0x1);
 
-       /* the second descriptor will read PAGE_SIZE-4 bytes */
-       ir_prg[1].control = cpu_to_le32(DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE |
-               DMA_CTL_BRANCH | (PAGE_SIZE-4));
-       ir_prg[1].address = cpu_to_le32(dma_region_offset_to_bus(&d->dma, (buf + 4) -
-                                       (unsigned long)d->dma.kvirt));
-       ir_prg[1].branchAddress = cpu_to_le32((dma_prog_region_offset_to_bus(ir_reg,
-                                       2 * sizeof(struct dma_cmd)) & 0xfffffff0) | 0x1);
+       /* If there is *not* only one DMA page per frame (hence, d->nb_cmd==2) */
+       if (d->nb_cmd > 2) {
+               /* The second descriptor will read PAGE_SIZE-4 bytes */
+               ir_prg[1].control = cpu_to_le32(DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE |
+                                               DMA_CTL_BRANCH | (PAGE_SIZE-4));
+               ir_prg[1].address = cpu_to_le32(dma_region_offset_to_bus(&d->dma, (buf + 4) -
+                                               (unsigned long)d->dma.kvirt));
+               ir_prg[1].branchAddress = cpu_to_le32((dma_prog_region_offset_to_bus(ir_reg,
+                                                     2 * sizeof(struct dma_cmd)) & 0xfffffff0) | 0x1);
        
-       for (i=2;i<d->nb_cmd-1;i++) {
+               for (i = 2; i < d->nb_cmd - 1; i++) {
+                       ir_prg[i].control = cpu_to_le32(DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE | 
+                                                       DMA_CTL_BRANCH | PAGE_SIZE);
+                       ir_prg[i].address = cpu_to_le32(dma_region_offset_to_bus(&d->dma,
+                                                       (buf+(i-1)*PAGE_SIZE) -
+                                                       (unsigned long)d->dma.kvirt));
+
+                       ir_prg[i].branchAddress =
+                               cpu_to_le32((dma_prog_region_offset_to_bus(ir_reg,
+                                           (i + 1) * sizeof(struct dma_cmd)) & 0xfffffff0) | 0x1);
+               }
+
+               /* The last descriptor will generate an interrupt */
                ir_prg[i].control = cpu_to_le32(DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE | 
-                       DMA_CTL_BRANCH | PAGE_SIZE);
+                                               DMA_CTL_IRQ | DMA_CTL_BRANCH | d->left_size);
                ir_prg[i].address = cpu_to_le32(dma_region_offset_to_bus(&d->dma,
-                                               (buf+(i-1)*PAGE_SIZE) -
+                                               (buf+(i-1)*PAGE_SIZE) -
                                                (unsigned long)d->dma.kvirt));
-
-               ir_prg[i].branchAddress =
-                       cpu_to_le32((dma_prog_region_offset_to_bus(ir_reg,
-                               (i + 1) * sizeof(struct dma_cmd)) & 0xfffffff0) | 0x1);
+       } else { 
+               /* Only one DMA page is used. Read d->left_size immediately and */
+               /* generate an interrupt as this is also the last page. */
+               ir_prg[1].control = cpu_to_le32(DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE | 
+                                               DMA_CTL_IRQ | DMA_CTL_BRANCH | (d->left_size-4));
+               ir_prg[1].address = cpu_to_le32(dma_region_offset_to_bus(&d->dma,
+                                               (buf + 4) - (unsigned long)d->dma.kvirt));
        }
-
-       /* the last descriptor will generate an interrupt */
-       ir_prg[i].control = cpu_to_le32(DMA_CTL_INPUT_MORE | DMA_CTL_UPDATE | 
-               DMA_CTL_IRQ | DMA_CTL_BRANCH | d->left_size);
-       ir_prg[i].address = cpu_to_le32(dma_region_offset_to_bus(&d->dma,
-                                       (buf+(i-1)*PAGE_SIZE) -
-                                       (unsigned long)d->dma.kvirt));
 }
        
 static void initialize_dma_ir_ctx(struct dma_iso_ctx *d, int tag, int flags)
index 708aa12..67064b1 100644 (file)
@@ -19,6 +19,22 @@ config GAMEPORT
          To compile this driver as a module, choose M here: the
          module will be called gameport.
 
+
+# Yes, SOUND_GAMEPORT looks a bit odd. Yes, it ends up being turned on
+# in every .config. Please don't touch it. It is here to handle an
+# unusual dependency between GAMEPORT and sound drivers.
+#
+# Some sound drivers call gameport functions. If GAMEPORT is
+# not selected, empty stubs are provided for the functions and all is
+# well.
+# If GAMEPORT is built in, everything is fine.
+# If GAMEPORT is a module, however, it would need to be loaded for the
+# sound driver to be able to link properly. Therefore, the sound
+# driver must be a module as well in that case. Since there's no way
+# to express that directly in Kconfig, we use SOUND_GAMEPORT to
+# express it. SOUND_GAMEPORT boils down to "if GAMEPORT is 'm',
+# anything that depends on SOUND_GAMEPORT must be 'm' as well. if
+# GAMEPORT is 'y' or 'n', it can be anything".
 config SOUND_GAMEPORT
        tristate
        default y if GAMEPORT!=m
index 613f5e5..2955af5 100644 (file)
@@ -447,9 +447,10 @@ void input_register_device(struct input_dev *dev)
        list_add_tail(&dev->node, &input_dev_list);
 
        list_for_each_entry(handler, &input_handler_list, node)
-               if ((id = input_match_device(handler->id_table, dev)))
-                       if ((handle = handler->connect(handler, dev, id)))
-                               input_link_handle(handle);
+               if (!handler->blacklist || !input_match_device(handler->blacklist, dev))
+                       if ((id = input_match_device(handler->id_table, dev)))
+                               if ((handle = handler->connect(handler, dev, id)))
+                                       input_link_handle(handle);
 
 #ifdef CONFIG_HOTPLUG
        input_call_hotplug("add", dev);
@@ -507,9 +508,10 @@ void input_register_handler(struct input_handler *handler)
        list_add_tail(&handler->node, &input_handler_list);
        
        list_for_each_entry(dev, &input_dev_list, node)
-               if ((id = input_match_device(handler->id_table, dev)))
-                       if ((handle = handler->connect(handler, dev, id)))
-                               input_link_handle(handle);
+               if (!handler->blacklist || !input_match_device(handler->blacklist, dev))
+                       if ((id = input_match_device(handler->id_table, dev)))
+                               if ((handle = handler->connect(handler, dev, id)))
+                                       input_link_handle(handle);
 
 #ifdef CONFIG_PROC_FS
        input_devices_state++;
index 5a0bf40..822ae54 100644 (file)
@@ -380,10 +380,6 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
        struct joydev *joydev;
        int i, j, t, minor;
 
-       /* Avoid tablets */
-        if (test_bit(EV_KEY, dev->evbit) && test_bit(BTN_TOUCH, dev->keybit))
-               return NULL;
-
        for (minor = 0; minor < JOYDEV_MINORS && joydev_table[minor]; minor++);
        if (minor == JOYDEV_MINORS) {
                printk(KERN_ERR "joydev: no more free joydev devices\n");
@@ -464,6 +460,15 @@ static void joydev_disconnect(struct input_handle *handle)
                joydev_free(joydev);
 }
 
+static struct input_device_id joydev_blacklist[] = {
+       {
+               .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_KEYBIT,
+               .evbit = { BIT(EV_KEY) },
+               .keybit = { [LONG(BTN_TOUCH)] = BIT(BTN_TOUCH) },
+       },      /* Avoid itouchpads, touchscreens and tablets */
+       { },    /* Terminating entry */
+};
+
 static struct input_device_id joydev_ids[] = {
        {
                .flags = INPUT_DEVICE_ID_MATCH_EVBIT | INPUT_DEVICE_ID_MATCH_ABSBIT,
@@ -493,6 +498,7 @@ static struct input_handler joydev_handler = {
        .minor =        JOYDEV_MINOR_BASE,
        .name =         "joydev",
        .id_table =     joydev_ids,
+       .blacklist =    joydev_blacklist,
 };
 
 static int __init joydev_init(void)
index 9c9dd3e..030d75c 100644 (file)
@@ -48,33 +48,30 @@ static int atkbd_softrepeat;
  */
 
 static unsigned char atkbd_set2_keycode[512] = {
-         0, 67, 65, 63, 61, 59, 60, 88,  0, 68, 66, 64, 62, 15, 41, 85,
-         0, 56, 42,182, 29, 16,  2, 89,  0,  0, 44, 31, 30, 17,  3, 90,
-         0, 46, 45, 32, 18,  5,  4, 91, 90, 57, 47, 33, 20, 19,  6,  0,
-        91, 49, 48, 35, 34, 21,  7,  0,  0,  0, 50, 36, 22,  8,  9,  0,
+
+         0, 67, 65, 63, 61, 59, 60, 88,  0, 68, 66, 64, 62, 15, 41,117,
+         0, 56, 42,182, 29, 16,  2,  0,  0,  0, 44, 31, 30, 17,  3,  0,
+         0, 46, 45, 32, 18,  5,  4,186,  0, 57, 47, 33, 20, 19,  6, 85,
+         0, 49, 48, 35, 34, 21,  7, 89,  0,  0, 50, 36, 22,  8,  9, 90,
          0, 51, 37, 23, 24, 11, 10,  0,  0, 52, 53, 38, 39, 25, 12,  0,
-       122, 89, 40,120, 26, 13,  0,  0, 58, 54, 28, 27,  0, 43,  0,  0,
-        85, 86, 90, 91, 92, 93, 14, 94, 95, 79,183, 75, 71,121,  0,123,
+         0,181, 40,  0, 26, 13,  0,  0, 58, 54, 28, 27,  0, 43,  0,194,
+         0, 86,193,192,184,  0, 14,185,  0, 79,182, 75, 71,124,  0,  0,
         82, 83, 80, 76, 77, 72,  1, 69, 87, 78, 81, 74, 55, 73, 70, 99,
-         0,  0,  0, 65, 99,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
+
          0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,255,
-         0,  0, 92, 90, 85,  0,137,  0,  0,  0,  0, 91, 89,144,115,  0,
-       217,100,255,  0, 97,165,164,  0,156,  0,  0,140,115,  0,  0,125,
-       173,114,  0,113,152,163,151,126,128,166,  0,140,  0,147,  0,127,
-       159,167,115,160,164,  0,  0,116,158,  0,150,166,  0,  0,  0,142,
-       157,  0,114,166,168,  0,  0,213,155,  0, 98,113,  0,163,  0,138,
-       226,  0,  0,  0,  0,  0,153,140,  0,255, 96,  0,  0,  0,143,  0,
-       133,  0,116,  0,143,  0,174,133,  0,107,  0,105,102,  0,  0,112,
-       110,111,108,112,106,103,  0,119,  0,118,109,  0, 99,104,119
+       217,100,255,  0, 97,165,  0,  0,156,  0,  0,  0,  0,  0,  0,125,
+       173,114,  0,113,  0,  0,  0,126,128,  0,  0,140,  0,  0,  0,127,
+       159,  0,115,  0,164,  0,  0,116,158,  0,150,166,  0,  0,  0,142,
+       157,  0,  0,  0,  0,  0,  0,  0,155,  0, 98,  0,  0,163,  0,  0,
+       226,  0,  0,  0,  0,  0,  0,  0,  0,255, 96,  0,  0,  0,143,  0,
+         0,  0,  0,  0,  0,  0,  0,  0,  0,107,  0,105,102,  0,  0,112,
+       110,111,108,112,106,103,  0,119,  0,118,109,  0, 99,104,119,  0,
+
+         0,  0,  0, 65, 99,
 };
 
 static unsigned char atkbd_set3_keycode[512] = {
+
          0,  0,  0,  0,  0,  0,  0, 59,  1,138,128,129,130, 15, 41, 60,
        131, 29, 42, 86, 58, 16,  2, 61,133, 56, 44, 31, 30, 17,  3, 62,
        134, 46, 45, 32, 18,  5,  4, 63,135, 57, 47, 33, 20, 19,  6, 64,
@@ -83,25 +80,21 @@ static unsigned char atkbd_set3_keycode[512] = {
        113,114, 40, 84, 26, 13, 87, 99, 97, 54, 28, 27, 43, 84, 88, 70,
        108,105,119,103,111,107, 14,110,  0, 79,106, 75, 71,109,102,104,
         82, 83, 80, 76, 77, 72, 69, 98,  0, 96, 81,  0, 78, 73, 55, 85,
+
         89, 90, 91, 92, 74,185,184,182,  0,  0,  0,125,126,127,112,  0,
          0,139,150,163,165,115,152,150,166,140,160,154,113,114,167,168,
-       148,149,147,140,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
-         0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,255
+       148,149,147,140
 };
 
 static unsigned char atkbd_unxlate_table[128] = {
-         0,118, 22, 30, 38, 37, 46, 54, 61, 62, 70, 69, 78, 85,102, 13,
-        21, 29, 36, 45, 44, 53, 60, 67, 68, 77, 84, 91, 90, 20, 28, 27,
-        35, 43, 52, 51, 59, 66, 75, 76, 82, 14, 18, 93, 26, 34, 33, 42,
-        50, 49, 58, 65, 73, 74, 89,124, 17, 41, 88,  5,  6,  4, 12,  3,
-        11,  2, 10,  1,  9,119,126,108,117,125,123,107,115,116,121,105,
-       114,122,112,113,127, 96, 97,120,  7, 15, 23, 31, 39, 47, 55, 63,
-        71, 79, 86, 94,  8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 87,111,
-        19, 25, 57, 81, 83, 92, 95, 98, 99,100,101,103,104,106,109,110
+          0,118, 22, 30, 38, 37, 46, 54, 61, 62, 70, 69, 78, 85,102, 13,
+         21, 29, 36, 45, 44, 53, 60, 67, 68, 77, 84, 91, 90, 20, 28, 27,
+         35, 43, 52, 51, 59, 66, 75, 76, 82, 14, 18, 93, 26, 34, 33, 42,
+         50, 49, 58, 65, 73, 74, 89,124, 17, 41, 88,  5,  6,  4, 12,  3,
+         11,  2, 10,  1,  9,119,126,108,117,125,123,107,115,116,121,105,
+        114,122,112,113,127, 96, 97,120,  7, 15, 23, 31, 39, 47, 55, 63,
+         71, 79, 86, 94,  8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 87,111,
+         19, 25, 57, 81, 83, 92, 95, 98, 99,100,101,103,104,106,109,110
 };
 
 #define ATKBD_CMD_SETLEDS      0x10ed
@@ -125,6 +118,9 @@ static unsigned char atkbd_unxlate_table[128] = {
 #define ATKBD_RET_EMULX                0x80
 #define ATKBD_RET_EMUL1                0xe1
 #define ATKBD_RET_RELEASE      0xf0
+#define ATKBD_RET_HANGUEL      0xf1
+#define ATKBD_RET_HANJA                0xf2
+#define ATKBD_RET_ERR          0xff
 
 #define ATKBD_KEY_UNKNOWN        0
 #define ATKBD_KEY_NULL         255
@@ -156,6 +152,17 @@ struct atkbd {
        unsigned long time;
 };
 
+static void atkbd_report_key(struct input_dev *dev, struct pt_regs *regs, int code, int value)
+{
+       input_regs(dev, regs);
+       if (value == 3) {
+               input_report_key(dev, code, 1);
+               input_report_key(dev, code, 0);
+       } else
+               input_event(dev, EV_KEY, code, value);
+       input_sync(dev);
+}
+
 /*
  * atkbd_interrupt(). Here takes place processing of data received from
  * the keyboard into events.
@@ -184,47 +191,37 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
                atkbd->resend = 0;
 #endif
 
-       switch (code) {
-               case ATKBD_RET_ACK:
-                       atkbd->ack = 1;
-                       goto out;
-               case ATKBD_RET_NAK:
-                       atkbd->ack = -1;
-                       goto out;
-       }
-
-       if (atkbd->translated) do {
-
-               if (atkbd->emul != 1) {
-                       if (code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1)
-                               break;
-                       if (code == ATKBD_RET_BAT) {
-                               if (!atkbd->bat_xl)
-                                       break;
-                               atkbd->bat_xl = 0;
-                       }
-                       if (code == (ATKBD_RET_BAT & 0x7f))
-                               atkbd->bat_xl = 1;
+       if (!atkbd->ack)
+               switch (code) {
+                       case ATKBD_RET_ACK:
+                               atkbd->ack = 1;
+                               goto out;
+                       case ATKBD_RET_NAK:
+                               atkbd->ack = -1;
+                               goto out;
                }
 
-               if (code < 0x80) {
-                       code = atkbd_unxlate_table[code];
-                       break;
-               }
-
-               if (atkbd->cmdcnt)
-                       break;
-
-               code = atkbd_unxlate_table[code & 0x7f];
-               atkbd->release = 1;
-
-       } while (0);
-
        if (atkbd->cmdcnt) {
                atkbd->cmdbuf[--atkbd->cmdcnt] = code;
                goto out;
        }
 
+       if (atkbd->translated) {
+
+               if (atkbd->emul ||
+                   !(code == ATKBD_RET_EMUL0 || code == ATKBD_RET_EMUL1 ||
+                     code == ATKBD_RET_HANGUEL || code == ATKBD_RET_HANJA ||
+                     code == ATKBD_RET_ERR ||
+                    (code == ATKBD_RET_BAT && !atkbd->bat_xl))) {
+                       atkbd->release = code >> 7;
+                       code &= 0x7f;
+               }
+
+               if (!atkbd->emul &&
+                    (code & 0x7f) == (ATKBD_RET_BAT & 0x7f))
+                       atkbd->bat_xl = !atkbd->release;
+       }
+
        switch (code) {
                case ATKBD_RET_BAT:
                        serio_rescan(atkbd->serio);
@@ -238,22 +235,33 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
                case ATKBD_RET_RELEASE:
                        atkbd->release = 1;
                        goto out;
+               case ATKBD_RET_HANGUEL:
+                       atkbd_report_key(&atkbd->dev, regs, KEY_LANG1, 3);
+                       goto out;
+               case ATKBD_RET_HANJA:
+                       atkbd_report_key(&atkbd->dev, regs, KEY_LANG2, 3);
+                       goto out;
+               case ATKBD_RET_ERR:
+                       printk(KERN_WARNING "atkbd.c: Keyboard on %s reports too many keys pressed.\n", serio->phys);
+                       goto out;
        }
 
+       if (atkbd->set != 3)
+               code = (code & 0x7f) | ((code & 0x80) << 1);
        if (atkbd->emul) {
                if (--atkbd->emul)
                        goto out;
-               code |= 0x100;
+               code |= (atkbd->set != 3) ? 0x80 : 0x100;
        }
 
        switch (atkbd->keycode[code]) {
                case ATKBD_KEY_NULL:
                        break;
                case ATKBD_KEY_UNKNOWN:
-                       printk(KERN_WARNING "atkbd.c: Unknown key %s (%s set %d, code %#x, data %#x, on %s).\n",
+                       printk(KERN_WARNING "atkbd.c: Unknown key %s (%s set %d, code %#x on %s).\n",
                                atkbd->release ? "released" : "pressed",
                                atkbd->translated ? "translated" : "raw", 
-                               atkbd->set, code, data, serio->phys);
+                               atkbd->set, code, serio->phys);
                        break;
                default:
                        value = atkbd->release ? 0 :
@@ -273,9 +281,7 @@ static irqreturn_t atkbd_interrupt(struct serio *serio, unsigned char data,
                                        break;
                        }
 
-                       input_regs(&atkbd->dev, regs);
-                       input_event(&atkbd->dev, EV_KEY, atkbd->keycode[code], value);
-                       input_sync(&atkbd->dev);
+                       atkbd_report_key(&atkbd->dev, regs, atkbd->keycode[code], value);
        }
 
        atkbd->release = 0;
@@ -369,10 +375,11 @@ static int atkbd_command(struct atkbd *atkbd, unsigned char *param, int command)
 static int atkbd_event(struct input_dev *dev, unsigned int type, unsigned int code, int value)
 {
        struct atkbd *atkbd = dev->private;
-       struct { int p; u8 v; } period[] =      
-               { {30, 0x00}, {25, 0x02}, {20, 0x04}, {15, 0x08}, {10, 0x0c}, {7, 0x10}, {5, 0x14}, {0, 0x14} };
-       struct { int d; u8 v; } delay[] =
-               { {1000, 0x60}, {750, 0x40}, {500, 0x20}, {250, 0x00}, {0, 0x00} };
+       const short period[32] =
+               { 33,  37,  42,  46,  50,  54,  58,  63,  67,  75,  83,  92, 100, 109, 116, 125,
+                133, 149, 167, 182, 200, 217, 232, 250, 270, 303, 333, 370, 400, 435, 470, 500 };
+       const short delay[4] =
+               { 250, 500, 750, 1000 };
        char param[2];
        int i, j;
 
@@ -406,11 +413,11 @@ static int atkbd_event(struct input_dev *dev, unsigned int type, unsigned int co
                        if (atkbd_softrepeat) return 0;
 
                        i = j = 0;
-                       while (period[i].p > dev->rep[REP_PERIOD]) i++;
-                       while (delay[j].d > dev->rep[REP_DELAY]) j++;
-                       dev->rep[REP_PERIOD] = period[i].p;
-                       dev->rep[REP_DELAY] = delay[j].d;
-                       param[0] = period[i].v | delay[j].v;
+                       while (i < 32 && period[i] < dev->rep[REP_PERIOD]) i++;
+                       while (j < 4 && delay[j] < dev->rep[REP_DELAY]) j++;
+                       dev->rep[REP_PERIOD] = period[i];
+                       dev->rep[REP_DELAY] = delay[j];
+                       param[0] = i | (j << 5);
                        atkbd_command(atkbd, param, ATKBD_CMD_SETREP);
 
                        return 0;
@@ -623,6 +630,7 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
                atkbd->dev.rep[REP_PERIOD] = 33;
        }
 
+       atkbd->ack = 1;
        atkbd->serio = serio;
 
        init_input_dev(&atkbd->dev);
@@ -665,16 +673,22 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
 
        sprintf(atkbd->phys, "%s/input0", serio->phys);
 
-       if (atkbd->set == 3)
-               memcpy(atkbd->keycode, atkbd_set3_keycode, sizeof(atkbd->keycode));
-       else
+       if (atkbd->translated) {
+               for (i = 0; i < 128; i++) {
+                       atkbd->keycode[i] = atkbd_set2_keycode[atkbd_unxlate_table[i]];
+                       atkbd->keycode[i | 0x80] = atkbd_set2_keycode[atkbd_unxlate_table[i] | 0x80];
+               }
+       } else if (atkbd->set == 2) {
                memcpy(atkbd->keycode, atkbd_set2_keycode, sizeof(atkbd->keycode));
+       } else {
+               memcpy(atkbd->keycode, atkbd_set3_keycode, sizeof(atkbd->keycode));
+       }
 
        atkbd->dev.name = atkbd->name;
        atkbd->dev.phys = atkbd->phys;
        atkbd->dev.id.bustype = BUS_I8042;
        atkbd->dev.id.vendor = 0x0001;
-       atkbd->dev.id.product = atkbd->set;
+       atkbd->dev.id.product = atkbd->translated ? 1 : atkbd->set;
        atkbd->dev.id.version = atkbd->id;
 
        for (i = 0; i < 512; i++)
@@ -686,10 +700,62 @@ static void atkbd_connect(struct serio *serio, struct serio_dev *dev)
        printk(KERN_INFO "input: %s on %s\n", atkbd->name, serio->phys);
 }
 
+/*
+ * atkbd_reconnect() tries to restore keyboard into a sane state and is
+ * most likely called on resume.
+ */
+
+static int atkbd_reconnect(struct serio *serio)
+{
+       struct atkbd *atkbd = serio->private;
+       struct serio_dev *dev = serio->dev;
+       int i;
+
+        if (!dev) {
+                printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n");
+                return -1;
+        }
+
+       if (atkbd->write) {
+               if (atkbd_probe(atkbd))
+                       return -1;
+
+               atkbd->set = atkbd_set_3(atkbd);
+               atkbd_enable(atkbd);
+       } else {
+               atkbd->set = 2;
+               atkbd->id = 0xab00;
+       }
+
+       /*
+        * Here we probably should check if the keyboard has the same set that
+         * it had before and bail out if it's different. But this will most likely
+         * cause new keyboard device be created... and for the user it will look
+         * like keyboard is lost
+        */
+
+       if (atkbd->translated) {
+               for (i = 0; i < 128; i++) {
+                       atkbd->keycode[i] = atkbd_set2_keycode[atkbd_unxlate_table[i]];
+                       atkbd->keycode[i | 0x80] = atkbd_set2_keycode[atkbd_unxlate_table[i] | 0x80];
+               }
+       } else if (atkbd->set == 2) {
+               memcpy(atkbd->keycode, atkbd_set2_keycode, sizeof(atkbd->keycode));
+       } else {
+               memcpy(atkbd->keycode, atkbd_set3_keycode, sizeof(atkbd->keycode));
+       }
+
+       for (i = 0; i < 512; i++)
+               if (atkbd->keycode[i] && atkbd->keycode[i] < 255)
+                       set_bit(atkbd->keycode[i], atkbd->dev.keybit);
+
+       return 0;
+}
 
 static struct serio_dev atkbd_dev = {
        .interrupt =    atkbd_interrupt,
        .connect =      atkbd_connect,
+       .reconnect =    atkbd_reconnect,
        .disconnect =   atkbd_disconnect,
        .cleanup =      atkbd_cleanup,
 };
@@ -709,9 +775,17 @@ static int __init atkbd_setup_reset(char *str)
         if (ints[0] > 0) atkbd_reset = ints[1];
         return 1;
 }
+static int __init atkbd_setup_softrepeat(char *str)
+{
+        int ints[4];
+        str = get_options(str, ARRAY_SIZE(ints), ints);
+        if (ints[0] > 0) atkbd_softrepeat = ints[1];
+        return 1;
+}
 
 __setup("atkbd_set=", atkbd_setup_set);
 __setup("atkbd_reset", atkbd_setup_reset);
+__setup("atkbd_softrepeat=", atkbd_setup_softrepeat);
 #endif
 
 int __init atkbd_init(void)
index dd4cca4..654bc36 100644 (file)
@@ -23,27 +23,18 @@ config MOUSE_PS2
          mice with wheels and extra buttons, Microsoft, Logitech or Genius
          compatible.
 
+         Synaptics TouchPad users might be interested in a specialized
+         XFree86 driver at:
+               http://w1.894.telia.com/~u89404340/touchpad/index.html
+         and a new verion of GPM at:
+               http://www.geocities.com/dt_or/gpm/gpm.html
+         to take advantage of the advanced features of the touchpad.
+
          If unsure, say Y.
 
          To compile this driver as a module, choose M here: the
          module will be called psmouse.
 
-config MOUSE_PS2_SYNAPTICS
-       bool "Synaptics TouchPad"
-       default n
-       depends on INPUT && INPUT_MOUSE && MOUSE_PS2
-       ---help---
-         Say Y here if you have a Synaptics TouchPad connected to your system.
-         This touchpad is found on many modern laptop computers.
-
-         Note that you also need a user space driver to interpret the data
-         generated by the kernel. A compatible driver for XFree86 is available
-         from http://w1.894.telia.com/~u89404340/touchpad/index.html
-
-         The gpm program is not yet able to interpret the data from this
-         driver, so if you need to use the touchpad in the console, you have to
-         say N for now.
-
 config MOUSE_SERIAL
        tristate "Serial mouse"
        depends on INPUT && INPUT_MOUSE
index ce5d80c..7fd9c2a 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <linux/input.h>
+#include <linux/serio.h>
 #include "psmouse.h"
 #include "logips2pp.h"
 
@@ -142,7 +143,7 @@ void ps2pp_set_800dpi(struct psmouse *psmouse)
  * touchpad.
  */
 
-int ps2pp_detect_model(struct psmouse *psmouse, unsigned char *param)
+static int ps2pp_detect_model(struct psmouse *psmouse, unsigned char *param)
 {
        int i;
        static int logitech_4btn[] = { 12, 40, 41, 42, 43, 52, 73, 80, -1 };
@@ -226,3 +227,22 @@ int ps2pp_detect_model(struct psmouse *psmouse, unsigned char *param)
 
        return 0;
 }
+
+/*
+ * Logitech magic init.
+ */
+int ps2pp_detect(struct psmouse *psmouse)
+{
+       unsigned char param[4];
+
+       param[0] = 0;
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+       param[1] = 0;
+       psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+
+       return param[1] != 0 ? ps2pp_detect_model(psmouse, param) : 0;
+}
+
index 8eb50ab..b09a1ed 100644 (file)
@@ -13,5 +13,5 @@
 struct psmouse;
 void ps2pp_process_packet(struct psmouse *psmouse);
 void ps2pp_set_800dpi(struct psmouse *psmouse);
-int ps2pp_detect_model(struct psmouse *psmouse, unsigned char *param);
+int ps2pp_detect(struct psmouse *psmouse);
 #endif
index b09b42b..89e1c47 100644 (file)
 
 #include <linux/delay.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/input.h>
 #include <linux/serio.h>
 #include <linux/init.h>
-#include <linux/pm.h>
 #include "psmouse.h"
 #include "synaptics.h"
 #include "logips2pp.h"
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
 MODULE_DESCRIPTION("PS/2 mouse driver");
-MODULE_PARM(psmouse_noext, "1i");
-MODULE_PARM_DESC(psmouse_noext, "Disable any protocol extensions. Useful for KVM switches.");
-MODULE_PARM(psmouse_resolution, "i");
-MODULE_PARM_DESC(psmouse_resolution, "Resolution, in dpi.");
-MODULE_PARM(psmouse_rate, "i");
-MODULE_PARM_DESC(psmouse_rate, "Report rate, in reports per second.");
-MODULE_PARM(psmouse_smartscroll, "i");
-MODULE_PARM_DESC(psmouse_smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
-MODULE_PARM(psmouse_resetafter, "i");
-MODULE_PARM_DESC(psmouse_resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
 MODULE_LICENSE("GPL");
 
 static int psmouse_noext;
+module_param(psmouse_noext, int, 0);
+MODULE_PARM_DESC(psmouse_noext, "[DEPRECATED] Disable any protocol extensions. Useful for KVM switches.");
+
+static char *psmouse_proto;
+static unsigned int psmouse_max_proto = -1U;
+module_param(psmouse_proto, charp, 0);
+MODULE_PARM_DESC(psmouse_proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
+
 int psmouse_resolution = 200;
+module_param(psmouse_resolution, uint, 0);
+MODULE_PARM_DESC(psmouse_resolution, "Resolution, in dpi.");
+
 unsigned int psmouse_rate = 100;
+module_param(psmouse_rate, uint, 0);
+MODULE_PARM_DESC(psmouse_rate, "Report rate, in reports per second.");
+
 int psmouse_smartscroll = 1;
+module_param(psmouse_smartscroll, bool, 0);
+MODULE_PARM_DESC(psmouse_smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
+
 unsigned int psmouse_resetafter;
+module_param(psmouse_resetafter, uint, 0);
+MODULE_PARM_DESC(psmouse_resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
 
 static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2"};
 
@@ -139,7 +148,8 @@ static irqreturn_t psmouse_interrupt(struct serio *serio,
                goto out;
        }
 
-       if (psmouse->pktcnt && time_after(jiffies, psmouse->last + HZ/2)) {
+       if (psmouse->state == PSMOUSE_ACTIVATED &&
+           psmouse->pktcnt && time_after(jiffies, psmouse->last + HZ/2)) {
                printk(KERN_WARNING "psmouse.c: %s at %s lost synchronization, throwing %d bytes away.\n",
                       psmouse->name, psmouse->phys, psmouse->pktcnt);
                psmouse->pktcnt = 0;
@@ -257,55 +267,92 @@ int psmouse_command(struct psmouse *psmouse, unsigned char *param, int command)
 }
 
 /*
+ * Genius NetMouse magic init.
+ */
+static int genius_detect(struct psmouse *psmouse)
+{
+       unsigned char param[4];
+
+       param[0] = 3;
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
+       psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+
+       return param[0] == 0x00 && param[1] == 0x33 && param[2] == 0x55;
+}
+
+/*
+ * IntelliMouse magic init.
+ */
+static int intellimouse_detect(struct psmouse *psmouse)
+{
+       unsigned char param[2];
+
+       param[0] = 200;
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
+       param[0] = 100;
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
+       param[0] =  80;
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
+       psmouse_command(psmouse, param, PSMOUSE_CMD_GETID);
+
+       return param[0] == 3;
+}
+
+/*
+ * Try IntelliMouse/Explorer magic init.
+ */
+static int im_explorer_detect(struct psmouse *psmouse)
+{
+       unsigned char param[2];
+
+       param[0] = 200;
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
+       param[0] = 200;
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
+       param[0] =  80;
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
+       psmouse_command(psmouse, param, PSMOUSE_CMD_GETID);
+
+       return param[0] == 4;
+}
+
+/*
  * psmouse_extensions() probes for any extensions to the basic PS/2 protocol
  * the mouse may have.
  */
 
 static int psmouse_extensions(struct psmouse *psmouse)
 {
-       unsigned char param[4];
+       int synaptics_hardware = 0;
 
-       param[0] = 0;
        psmouse->vendor = "Generic";
        psmouse->name = "Mouse";
        psmouse->model = 0;
 
-       if (psmouse_noext)
-               return PSMOUSE_PS2;
-
 /*
- * Try Synaptics TouchPad magic ID
+ * Try Synaptics TouchPad
  */
-
-       param[0] = 0;
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-       psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
-
-       if (param[1] == 0x47) {
+       if (psmouse_max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse)) {
+               synaptics_hardware = 1;
                psmouse->vendor = "Synaptics";
                psmouse->name = "TouchPad";
-               if (!synaptics_init(psmouse))
-                       return PSMOUSE_SYNAPTICS;
-               else
-                       return PSMOUSE_PS2;
-       }
 
+               if (psmouse_max_proto > PSMOUSE_IMEX) {
+                       if (synaptics_init(psmouse) == 0)
+                               return PSMOUSE_SYNAPTICS;
 /*
- * Try Genius NetMouse magic init.
+ * Some Synaptics touchpads can emulate extended protocols (like IMPS/2).
+ * Unfortunately Logitech/Genius probes confuse some firmware versions so
+ * we'll have to skip them.
  */
+                       psmouse_max_proto = PSMOUSE_IMEX;
+               }
+       }
 
-       param[0] = 3;
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-       psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
-
-       if (param[0] == 0x00 && param[1] == 0x33 && param[2] == 0x55) {
-
+       if (psmouse_max_proto > PSMOUSE_IMEX && genius_detect(psmouse)) {
                set_bit(BTN_EXTRA, psmouse->dev.keybit);
                set_bit(BTN_SIDE, psmouse->dev.keybit);
                set_bit(REL_WHEEL, psmouse->dev.relbit);
@@ -315,54 +362,17 @@ static int psmouse_extensions(struct psmouse *psmouse)
                return PSMOUSE_GENPS;
        }
 
-/*
- * Try Logitech magic ID.
- */
-
-       param[0] = 0;
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
-       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
-       param[1] = 0;
-       psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
-
-       if (param[1]) {
-               int type = ps2pp_detect_model(psmouse, param);
+       if (psmouse_max_proto > PSMOUSE_IMEX) {
+               int type = ps2pp_detect(psmouse);
                if (type)
                        return type;
        }
 
-/*
- * Try IntelliMouse magic init.
- */
-
-       param[0] = 200;
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
-       param[0] = 100;
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
-       param[0] =  80;
-       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
-       psmouse_command(psmouse, param, PSMOUSE_CMD_GETID);
-       
-       if (param[0] == 3) {
-
+       if (psmouse_max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse)) {
                set_bit(REL_WHEEL, psmouse->dev.relbit);
 
-/*
- * Try IntelliMouse/Explorer magic init.
- */
-
-               param[0] = 200;
-               psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
-               param[0] = 200;
-               psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
-               param[0] =  80;
-               psmouse_command(psmouse, param, PSMOUSE_CMD_SETRATE);
-               psmouse_command(psmouse, param, PSMOUSE_CMD_GETID);
-
-               if (param[0] == 4) {
-
+               if (psmouse_max_proto >= PSMOUSE_IMEX &&
+                                       im_explorer_detect(psmouse)) {
                        set_bit(BTN_SIDE, psmouse->dev.keybit);
                        set_bit(BTN_EXTRA, psmouse->dev.keybit);
 
@@ -378,6 +388,15 @@ static int psmouse_extensions(struct psmouse *psmouse)
  * Okay, all failed, we have a standard mouse here. The number of the buttons
  * is still a question, though. We assume 3.
  */
+       if (synaptics_hardware) {
+/*
+ * We detected Synaptics hardware but it did not respond to IMPS/2 probes.
+ * We need to reset the touchpad because if there is a track point on the
+ * pass through port it could get disabled while probing for protocol
+ * extensions.
+ */
+               psmouse_command(psmouse, NULL, PSMOUSE_CMD_RESET_DIS);
+       }
 
        return PSMOUSE_PS2;
 }
@@ -468,7 +487,7 @@ static void psmouse_initialize(struct psmouse *psmouse)
  * We set the mouse report rate, resolution and scaling.
  */
 
-       if (!psmouse_noext) {
+       if (psmouse_max_proto != PSMOUSE_PS2) {
                psmouse_set_rate(psmouse);
                psmouse_set_resolution(psmouse);
                psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11);
@@ -513,45 +532,30 @@ static void psmouse_disconnect(struct serio *serio)
        struct psmouse *psmouse = serio->private;
 
        psmouse->state = PSMOUSE_IGNORE;
-       synaptics_disconnect(psmouse);
-       input_unregister_device(&psmouse->dev);
-       serio_close(serio);
-       kfree(psmouse);
-}
-
-/*
- * Reinitialize mouse hardware after software suspend.
- */
-
-static int psmouse_pm_callback(struct pm_dev *dev, pm_request_t request, void *data)
-{
-       struct psmouse *psmouse = dev->data;
-       struct serio_dev *ser_dev = psmouse->serio->dev;
-
-       synaptics_disconnect(psmouse);
 
-       /* We need to reopen the serio port to reinitialize the i8042 controller */
-       serio_close(psmouse->serio);
-       serio_open(psmouse->serio, ser_dev);
+       if (psmouse->ptport) {
+               if (psmouse->ptport->deactivate)
+                       psmouse->ptport->deactivate(psmouse);
+               __serio_unregister_port(&psmouse->ptport->serio); /* we have serio_sem */
+               kfree(psmouse->ptport);
+               psmouse->ptport = NULL;
+       }
 
-       /* Probe and re-initialize the mouse */
-       psmouse_probe(psmouse);
-       psmouse_initialize(psmouse);
-       synaptics_pt_init(psmouse);
-       psmouse_activate(psmouse);
+       if (psmouse->disconnect)
+               psmouse->disconnect(psmouse);
 
-       return 0;
+       input_unregister_device(&psmouse->dev);
+       serio_close(serio);
+       kfree(psmouse);
 }
 
 /*
  * psmouse_connect() is a callback from the serio module when
  * an unhandled serio port is found.
  */
-
 static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
 {
        struct psmouse *psmouse;
-       struct pm_dev *pmdev;
        
        if ((serio->type & SERIO_TYPE) != SERIO_8042 &&
            (serio->type & SERIO_TYPE) != SERIO_PS_PSTHRU)
@@ -572,7 +576,6 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
        psmouse->dev.private = psmouse;
 
        serio->private = psmouse;
-
        if (serio_open(serio, dev)) {
                kfree(psmouse);
                return;
@@ -584,12 +587,6 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
                return;
        }
        
-       pmdev = pm_register(PM_SYS_DEV, PM_SYS_UNKNOWN, psmouse_pm_callback);
-       if (pmdev) {
-               psmouse->dev.pm_dev = pmdev;
-               pmdev->data = psmouse;
-       }
-
        sprintf(psmouse->devname, "%s %s %s",
                psmouse_protocols[psmouse->type], psmouse->vendor, psmouse->name);
        sprintf(psmouse->phys, "%s/input0",
@@ -608,59 +605,87 @@ static void psmouse_connect(struct serio *serio, struct serio_dev *dev)
 
        psmouse_initialize(psmouse);
 
-       synaptics_pt_init(psmouse);
+       if (psmouse->ptport) {
+               printk(KERN_INFO "serio: %s port at %s\n", psmouse->ptport->serio.name, psmouse->phys);
+               __serio_register_port(&psmouse->ptport->serio); /* we have serio_sem */
+               if (psmouse->ptport->activate)
+                       psmouse->ptport->activate(psmouse);
+       }
+
+       psmouse_activate(psmouse);
+}
+
+
+static int psmouse_reconnect(struct serio *serio)
+{
+       struct psmouse *psmouse = serio->private;
+       struct serio_dev *dev = serio->dev;
+       int old_type = psmouse->type;
+
+       if (!dev) {
+               printk(KERN_DEBUG "psmouse: reconnect request, but serio is disconnected, ignoring...\n");
+               return -1;
+       }
+
+       psmouse->state = PSMOUSE_NEW_DEVICE;
+       psmouse->type = psmouse->acking = psmouse->cmdcnt = psmouse->pktcnt = 0;
+       if (psmouse->reconnect) {
+              if (psmouse->reconnect(psmouse))
+                       return -1;
+       } else if (psmouse_probe(psmouse) != old_type)
+               return -1;
+
+       /* ok, the device type (and capabilities) match the old one,
+        * we can continue using it, complete intialization
+        */
+       psmouse->type = old_type;
+       psmouse_initialize(psmouse);
+
+       if (psmouse->ptport) {
+                       if (psmouse_reconnect(&psmouse->ptport->serio)) {
+                       __serio_unregister_port(&psmouse->ptport->serio);
+                       __serio_register_port(&psmouse->ptport->serio);
+                       if (psmouse->ptport->activate)
+                               psmouse->ptport->activate(psmouse);
+               }
+       }
 
        psmouse_activate(psmouse);
+       return 0;
 }
 
+
 static struct serio_dev psmouse_dev = {
        .interrupt =    psmouse_interrupt,
        .connect =      psmouse_connect,
+       .reconnect =    psmouse_reconnect,
        .disconnect =   psmouse_disconnect,
        .cleanup =      psmouse_cleanup,
 };
 
-#ifndef MODULE
-static int __init psmouse_noext_setup(char *str)
-{
-       psmouse_noext = 1;
-       return 1;
-}
-
-static int __init psmouse_resolution_setup(char *str)
-{
-       get_option(&str, &psmouse_resolution);
-       return 1;
-}
-
-static int __init psmouse_smartscroll_setup(char *str)
+static inline void psmouse_parse_proto(void)
 {
-       get_option(&str, &psmouse_smartscroll);
-       return 1;
-}
-
-static int __init psmouse_resetafter_setup(char *str)
-{
-       get_option(&str, &psmouse_resetafter);
-       return 1;
-}
+       if (psmouse_noext) {
+               printk(KERN_WARNING "psmouse: 'psmouse_noext' option is deprecated, please use 'psmouse_proto'\n");
+               psmouse_max_proto = PSMOUSE_PS2;
+       }
 
-static int __init psmouse_rate_setup(char *str)
-{
-       get_option(&str, &psmouse_rate);
-       return 1;
+       /* even is psmouse_noext is present psmouse_proto overrides it */
+       if (psmouse_proto) {
+               if (!strcmp(psmouse_proto, "bare"))
+                       psmouse_max_proto = PSMOUSE_PS2;
+               else if (!strcmp(psmouse_proto, "imps"))
+                       psmouse_max_proto = PSMOUSE_IMPS;
+               else if (!strcmp(psmouse_proto, "exps"))
+                       psmouse_max_proto = PSMOUSE_IMEX;
+               else
+                       printk(KERN_ERR "psmouse: unknown protocol type '%s'\n", psmouse_proto);
+       }
 }
 
-__setup("psmouse_noext", psmouse_noext_setup);
-__setup("psmouse_resolution=", psmouse_resolution_setup);
-__setup("psmouse_smartscroll=", psmouse_smartscroll_setup);
-__setup("psmouse_resetafter=", psmouse_resetafter_setup);
-__setup("psmouse_rate=", psmouse_rate_setup);
-
-#endif
-
 int __init psmouse_init(void)
 {
+       psmouse_parse_proto();
        serio_register_device(&psmouse_dev);
        return 0;
 }
index a69cb72..9f27e93 100644 (file)
 #define PSMOUSE_ACTIVATED      1
 #define PSMOUSE_IGNORE         2
 
+struct psmouse;
+
+struct psmouse_ptport {
+       struct serio serio;
+
+       void (*activate)(struct psmouse *parent);
+       void (*deactivate)(struct psmouse *parent);
+};
+
 struct psmouse {
        void *private;
        struct input_dev dev;
        struct serio *serio;
+       struct psmouse_ptport *ptport;
        char *vendor;
        char *name;
        unsigned char cmdbuf[8];
@@ -41,6 +51,9 @@ struct psmouse {
        char error;
        char devname[64];
        char phys[32];
+
+       int (*reconnect)(struct psmouse *psmouse);
+       void (*disconnect)(struct psmouse *psmouse);
 };
 
 #define PSMOUSE_PS2            1
index 8862638..82f6b00 100644 (file)
@@ -2,7 +2,8 @@
  * Synaptics TouchPad PS/2 mouse driver
  *
  *   2003 Dmitry Torokhov <dtor@mail.ru>
- *     Added support for pass-through port
+ *     Added support for pass-through port. Special thanks to Peter Berg Larsen
+ *     for explaining various Synaptics quirks.
  *
  *   2003 Peter Osterlund <petero2@telia.com>
  *     Ported to 2.5 input device infrastructure.
@@ -194,9 +195,7 @@ static void print_ident(struct synaptics_data *priv)
 
 static int synaptics_query_hardware(struct psmouse *psmouse)
 {
-       struct synaptics_data *priv = psmouse->private;
        int retries = 0;
-       int mode;
 
        while ((retries++ < 3) && synaptics_reset(psmouse))
                printk(KERN_ERR "synaptics reset failed\n");
@@ -208,7 +207,14 @@ static int synaptics_query_hardware(struct psmouse *psmouse)
        if (synaptics_capability(psmouse))
                return -1;
 
-       mode = SYN_BIT_ABSOLUTE_MODE | SYN_BIT_HIGH_RATE;
+       return 0;
+}
+
+static int synaptics_set_mode(struct psmouse *psmouse, int mode)
+{
+       struct synaptics_data *priv = psmouse->private;
+
+       mode |= SYN_BIT_ABSOLUTE_MODE | SYN_BIT_HIGH_RATE;
        if (SYN_ID_MAJOR(priv->identity) >= 4)
                mode |= SYN_BIT_DISABLE_GESTURE;
        if (SYN_CAP_EXTENDED(priv->capabilities))
@@ -265,49 +271,38 @@ static void synaptics_pass_pt_packet(struct serio *ptport, unsigned char *packet
        }
 }
 
-int synaptics_pt_init(struct psmouse *psmouse)
+static void synaptics_pt_activate(struct psmouse *psmouse)
 {
-       struct synaptics_data *priv = psmouse->private;
-       struct serio *port;
-       struct psmouse *child;
+       struct psmouse *child = psmouse->ptport->serio.private;
 
-       if (psmouse->type != PSMOUSE_SYNAPTICS)
-               return -1;
-       if (!SYN_CAP_EXTENDED(priv->capabilities))
-               return -1;
-       if (!SYN_CAP_PASS_THROUGH(priv->capabilities))
-               return -1;
+       /* adjust the touchpad to child's choice of protocol */
+       if (child && child->type >= PSMOUSE_GENPS) {
+               if (synaptics_set_mode(psmouse, SYN_BIT_FOUR_BYTE_CLIENT))
+                       printk(KERN_INFO "synaptics: failed to enable 4-byte guest protocol\n");
+       }
+}
+
+static void synaptics_pt_create(struct psmouse *psmouse)
+{
+       struct psmouse_ptport *port;
 
-       priv->ptport = port = kmalloc(sizeof(struct serio), GFP_KERNEL);
+       psmouse->ptport = port = kmalloc(sizeof(struct psmouse_ptport), GFP_KERNEL);
        if (!port) {
-               printk(KERN_ERR "synaptics: not enough memory to allocate serio port\n");
-               return -1;
+               printk(KERN_ERR "synaptics: not enough memory to allocate pass-through port\n");
+               return;
        }
 
-       memset(port, 0, sizeof(struct serio));
-       port->type = SERIO_PS_PSTHRU;
-       port->name = "Synaptics pass-through";
-       port->phys = "synaptics-pt/serio0";
-       port->write = synaptics_pt_write;
-       port->open = synaptics_pt_open;
-       port->close = synaptics_pt_close;
-       port->driver = psmouse;
+       memset(port, 0, sizeof(struct psmouse_ptport));
 
-       printk(KERN_INFO "serio: %s port at %s\n", port->name, psmouse->phys);
-       serio_register_slave_port(port);
+       port->serio.type = SERIO_PS_PSTHRU;
+       port->serio.name = "Synaptics pass-through";
+       port->serio.phys = "synaptics-pt/serio0";
+       port->serio.write = synaptics_pt_write;
+       port->serio.open = synaptics_pt_open;
+       port->serio.close = synaptics_pt_close;
+       port->serio.driver = psmouse;
 
-       /* adjust the touchpad to child's choice of protocol */
-       child = port->private;
-       if (child && child->type >= PSMOUSE_GENPS) {
-               if (synaptics_mode_cmd(psmouse, (SYN_BIT_ABSOLUTE_MODE |
-                                                SYN_BIT_HIGH_RATE |
-                                                SYN_BIT_DISABLE_GESTURE |
-                                                SYN_BIT_FOUR_BYTE_CLIENT |
-                                                SYN_BIT_W_MODE)))
-                       printk(KERN_INFO "synaptics: failed to enable 4-byte guest protocol\n");
-       }
-
-       return 0;
+       port->activate = synaptics_pt_activate;
 }
 
 /*****************************************************************************
@@ -371,27 +366,82 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
        clear_bit(REL_Y, dev->relbit);
 }
 
+static void synaptics_disconnect(struct psmouse *psmouse)
+{
+       synaptics_mode_cmd(psmouse, 0);
+       kfree(psmouse->private);
+}
+
+static int synaptics_reconnect(struct psmouse *psmouse)
+{
+       struct synaptics_data *priv = psmouse->private;
+       struct synaptics_data old_priv = *priv;
+
+       if (!synaptics_detect(psmouse))
+               return -1;
+
+       if (synaptics_query_hardware(psmouse)) {
+               printk(KERN_ERR "Unable to query Synaptics hardware.\n");
+               return -1;
+       }
+
+       if (old_priv.identity != priv->identity ||
+           old_priv.model_id != priv->model_id ||
+           old_priv.capabilities != priv->capabilities ||
+           old_priv.ext_cap != priv->ext_cap)
+               return -1;
+
+       if (synaptics_set_mode(psmouse, 0)) {
+               printk(KERN_ERR "Unable to initialize Synaptics hardware.\n");
+               return -1;
+       }
+
+       return 0;
+}
+
+int synaptics_detect(struct psmouse *psmouse)
+{
+       unsigned char param[4];
+
+       param[0] = 0;
+
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+       psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES);
+       psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO);
+
+       return param[1] == 0x47;
+}
+
 int synaptics_init(struct psmouse *psmouse)
 {
        struct synaptics_data *priv;
 
-#ifndef CONFIG_MOUSE_PS2_SYNAPTICS
-       return -1;
-#endif
-
        psmouse->private = priv = kmalloc(sizeof(struct synaptics_data), GFP_KERNEL);
        if (!priv)
                return -1;
        memset(priv, 0, sizeof(struct synaptics_data));
 
        if (synaptics_query_hardware(psmouse)) {
-               printk(KERN_ERR "Unable to query/initialize Synaptics hardware.\n");
+               printk(KERN_ERR "Unable to query Synaptics hardware.\n");
+               goto init_fail;
+       }
+
+       if (synaptics_set_mode(psmouse, 0)) {
+               printk(KERN_ERR "Unable to initialize Synaptics hardware.\n");
                goto init_fail;
        }
 
+       if (SYN_CAP_EXTENDED(priv->capabilities) && SYN_CAP_PASS_THROUGH(priv->capabilities))
+                       synaptics_pt_create(psmouse);
+
        print_ident(priv);
        set_input_params(&psmouse->dev, priv);
 
+       psmouse->disconnect = synaptics_disconnect;
+       psmouse->reconnect = synaptics_reconnect;
+
        return 0;
 
  init_fail:
@@ -399,36 +449,13 @@ int synaptics_init(struct psmouse *psmouse)
        return -1;
 }
 
-void synaptics_disconnect(struct psmouse *psmouse)
-{
-       struct synaptics_data *priv = psmouse->private;
-
-       if (psmouse->type == PSMOUSE_SYNAPTICS && priv) {
-               synaptics_mode_cmd(psmouse, 0);
-               if (priv->ptport) {
-                       serio_unregister_slave_port(priv->ptport);
-                       kfree(priv->ptport);
-               }
-               kfree(priv);
-       }
-}
-
 /*****************************************************************************
  *     Functions to interpret the absolute mode packets
  ****************************************************************************/
 
 static void synaptics_parse_hw_state(unsigned char buf[], struct synaptics_data *priv, struct synaptics_hw_state *hw)
 {
-       hw->up    = 0;
-       hw->down  = 0;
-       hw->b0    = 0;
-       hw->b1    = 0;
-       hw->b2    = 0;
-       hw->b3    = 0;
-       hw->b4    = 0;
-       hw->b5    = 0;
-       hw->b6    = 0;
-       hw->b7    = 0;
+       memset(hw, 0, sizeof(struct synaptics_hw_state));
 
        if (SYN_MODEL_NEWABS(priv->model_id)) {
                hw->x = (((buf[3] & 0x10) << 8) |
@@ -570,64 +597,47 @@ static void synaptics_process_packet(struct psmouse *psmouse)
        input_sync(dev);
 }
 
+static int synaptics_validate_byte(struct psmouse *psmouse)
+{
+       static unsigned char newabs_mask[] = { 0xC0, 0x00, 0x00, 0xC0, 0x00 };
+       static unsigned char newabs_rslt[] = { 0x80, 0x00, 0x00, 0xC0, 0x00 };
+       static unsigned char oldabs_mask[] = { 0xC0, 0x60, 0x00, 0xC0, 0x60 };
+       static unsigned char oldabs_rslt[] = { 0xC0, 0x00, 0x00, 0x80, 0x00 };
+       struct synaptics_data *priv = psmouse->private;
+       int idx = psmouse->pktcnt - 1;
+
+       if (SYN_MODEL_NEWABS(priv->model_id))
+               return (psmouse->packet[idx] & newabs_mask[idx]) == newabs_rslt[idx];
+       else
+               return (psmouse->packet[idx] & oldabs_mask[idx]) == oldabs_rslt[idx];
+}
+
 void synaptics_process_byte(struct psmouse *psmouse, struct pt_regs *regs)
 {
        struct input_dev *dev = &psmouse->dev;
        struct synaptics_data *priv = psmouse->private;
-       unsigned char data = psmouse->packet[psmouse->pktcnt - 1];
-       int newabs = SYN_MODEL_NEWABS(priv->model_id);
 
        input_regs(dev, regs);
 
-       switch (psmouse->pktcnt) {
-       case 1:
-               if (newabs ? ((data & 0xC8) != 0x80) : ((data & 0xC0) != 0xC0)) {
-                       printk(KERN_WARNING "Synaptics driver lost sync at 1st byte\n");
-                       goto bad_sync;
-               }
-               break;
-       case 2:
-               if (!newabs && ((data & 0x60) != 0x00)) {
-                       printk(KERN_WARNING "Synaptics driver lost sync at 2nd byte\n");
-                       goto bad_sync;
-               }
-               break;
-       case 4:
-               if (newabs ? ((data & 0xC8) != 0xC0) : ((data & 0xC0) != 0x80)) {
-                       printk(KERN_WARNING "Synaptics driver lost sync at 4th byte\n");
-                       goto bad_sync;
-               }
-               break;
-       case 5:
-               if (!newabs && ((data & 0x60) != 0x00)) {
-                       printk(KERN_WARNING "Synaptics driver lost sync at 5th byte\n");
-                       goto bad_sync;
-               }
-               break;
-       default:
-               if (psmouse->pktcnt < 6)
-                       break;              /* Wait for full packet */
-
+       if (psmouse->pktcnt >= 6) { /* Full packet received */
                if (priv->out_of_sync) {
                        priv->out_of_sync = 0;
                        printk(KERN_NOTICE "Synaptics driver resynced.\n");
                }
 
-               if (priv->ptport && synaptics_is_pt_packet(psmouse->packet))
-                       synaptics_pass_pt_packet(priv->ptport, psmouse->packet);
+               if (psmouse->ptport && psmouse->ptport->serio.dev && synaptics_is_pt_packet(psmouse->packet))
+                       synaptics_pass_pt_packet(&psmouse->ptport->serio, psmouse->packet);
                else
                        synaptics_process_packet(psmouse);
+               psmouse->pktcnt = 0;
 
+       } else if (psmouse->pktcnt && !synaptics_validate_byte(psmouse)) {
+               printk(KERN_WARNING "Synaptics driver lost sync at byte %d\n", psmouse->pktcnt);
                psmouse->pktcnt = 0;
-               break;
-       }
-       return;
-
- bad_sync:
-       priv->out_of_sync++;
-       psmouse->pktcnt = 0;
-       if (psmouse_resetafter > 0 && priv->out_of_sync == psmouse_resetafter) {
-               psmouse->state = PSMOUSE_IGNORE;
-               serio_rescan(psmouse->serio);
+               if (++priv->out_of_sync == psmouse_resetafter) {
+                       psmouse->state = PSMOUSE_IGNORE;
+                       printk(KERN_NOTICE "synaptics: issuing reconnect request\n");
+                       serio_reconnect(psmouse->serio);
+               }
        }
 }
index 4dad98a..dbb1a25 100644 (file)
@@ -9,11 +9,9 @@
 #ifndef _SYNAPTICS_H
 #define _SYNAPTICS_H
 
-
 extern void synaptics_process_byte(struct psmouse *psmouse, struct pt_regs *regs);
+extern int synaptics_detect(struct psmouse *psmouse);
 extern int synaptics_init(struct psmouse *psmouse);
-extern int synaptics_pt_init(struct psmouse *psmouse);
-extern void synaptics_disconnect(struct psmouse *psmouse);
 
 /* synaptics queries */
 #define SYN_QUE_IDENTIFY               0x00
@@ -105,8 +103,6 @@ struct synaptics_data {
        /* Data for normal processing */
        unsigned int out_of_sync;               /* # of packets out of sync */
        int old_w;                              /* Previous w value */
-       
-       struct serio *ptport;                   /* pass-through port */
 };
 
 #endif /* _SYNAPTICS_H */
index 6d9923e..1b0e7a5 100644 (file)
 
 #include <linux/delay.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
 #include <linux/config.h>
 #include <linux/reboot.h>
 #include <linux/init.h>
+#include <linux/sysdev.h>
+#include <linux/pm.h>
 #include <linux/serio.h>
 
 #include <asm/io.h>
@@ -25,19 +28,23 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
 MODULE_DESCRIPTION("i8042 keyboard and mouse controller driver");
 MODULE_LICENSE("GPL");
 
-MODULE_PARM(i8042_noaux, "1i");
-MODULE_PARM(i8042_nomux, "1i");
-MODULE_PARM(i8042_unlock, "1i");
-MODULE_PARM(i8042_reset, "1i");
-MODULE_PARM(i8042_direct, "1i");
-MODULE_PARM(i8042_dumbkbd, "1i");
+static unsigned int i8042_noaux;
+module_param(i8042_noaux, bool, 0);
 
-static int i8042_reset;
-static int i8042_noaux;
-static int i8042_nomux;
-static int i8042_unlock;
-static int i8042_direct;
-static int i8042_dumbkbd;
+static unsigned int i8042_nomux;
+module_param(i8042_nomux, bool, 0);
+
+static unsigned int i8042_unlock;
+module_param(i8042_unlock, bool, 0);
+
+static unsigned int i8042_reset;
+module_param(i8042_reset, bool, 0);
+
+static unsigned int i8042_direct;
+module_param(i8042_direct, bool, 0);
+
+static unsigned int i8042_dumbkbd;
+module_param(i8042_dumbkbd, bool, 0);
 
 #undef DEBUG
 #include "i8042.h"
@@ -59,6 +66,9 @@ static struct serio i8042_aux_port;
 static unsigned char i8042_initial_ctr;
 static unsigned char i8042_ctr;
 static unsigned char i8042_mux_open;
+static unsigned char i8042_mux_present;
+static unsigned char i8042_sysdev_initialized;
+static struct pm_dev *i8042_pm_dev;
 struct timer_list i8042_timer;
 
 /*
@@ -214,16 +224,41 @@ static int i8042_aux_write(struct serio *port, unsigned char c)
 }
 
 /*
- * i8042_open() is called when a port is open by the higher layer.
- * It allocates the interrupt and enables it in the chip.
+ * i8042_activate_port() enables port on a chip.
  */
 
-static int i8042_open(struct serio *port)
+static int i8042_activate_port(struct serio *port)
 {
        struct i8042_values *values = port->driver;
 
        i8042_flush();
 
+       /*
+        * Enable port again here because it is disabled if we are
+        * resuming (normally it is enabled already).
+        */
+       i8042_ctr &= ~values->disable;
+
+       i8042_ctr |= values->irqen;
+
+       if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
+               i8042_ctr &= ~values->irqen;
+               return -1;
+       }
+
+       return 0;
+}
+
+
+/*
+ * i8042_open() is called when a port is open by the higher layer.
+ * It allocates the interrupt and calls i8042_enable_port.
+ */
+
+static int i8042_open(struct serio *port)
+{
+       struct i8042_values *values = port->driver;
+
        if (values->mux != -1)
                if (i8042_mux_open++)
                        return 0;
@@ -231,21 +266,26 @@ static int i8042_open(struct serio *port)
        if (request_irq(values->irq, i8042_interrupt,
                        SA_SHIRQ, "i8042", i8042_request_irq_cookie)) {
                printk(KERN_ERR "i8042.c: Can't get irq %d for %s, unregistering the port.\n", values->irq, values->name);
-               values->exists = 0;
-               serio_unregister_port(port);
-               return -1;
+               goto irq_fail;
        }
 
-       i8042_ctr |= values->irqen;
-
-       if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
-               printk(KERN_ERR "i8042.c: Can't write CTR while opening %s.\n", values->name);
-               return -1;
+       if (i8042_activate_port(port)) {
+               printk(KERN_ERR "i8042.c: Can't activate %s, unregistering the port\n", values->name);
+               goto activate_fail;
        }
 
        i8042_interrupt(0, NULL, NULL);
 
        return 0;
+
+activate_fail:
+       free_irq(values->irq, i8042_request_irq_cookie);
+
+irq_fail:
+       values->exists = 0;
+       serio_unregister_port_delayed(port);
+
+       return -1;
 }
 
 /*
@@ -393,145 +433,78 @@ static irqreturn_t i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 }
 
 /*
- * i8042_controller init initializes the i8042 controller, and,
- * most importantly, sets it into non-xlated mode if that's
- * desired.
+ * i8042_enable_mux_mode checks whether the controller has an active
+ * multiplexor and puts the chip into Multiplexed (as opposed to
+ * Legacy) mode.
  */
-       
-static int __init i8042_controller_init(void)
+
+static int i8042_enable_mux_mode(struct i8042_values *values, unsigned char *mux_version)
 {
 
+       unsigned char param;
 /*
- * Test the i8042. We need to know if it thinks it's working correctly
- * before doing anything else.
+ * Get rid of bytes in the queue.
  */
 
        i8042_flush();
 
-       if (i8042_reset) {
-
-               unsigned char param;
-
-               if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
-                       printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
-                       return -1;
-               }
-
-               if (param != I8042_RET_CTL_TEST) {
-                       printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n",
-                                param, I8042_RET_CTL_TEST);
-                       return -1;
-               }
-       }
-
 /*
- * Save the CTR for restoral on unload / reboot.
+ * Internal loopback test - send three bytes, they should come back from the
+ * mouse interface, the last should be version. Note that we negate mouseport
+ * command responses for the i8042_check_aux() routine.
  */
 
-       if (i8042_command(&i8042_ctr, I8042_CMD_CTL_RCTR)) {
-               printk(KERN_ERR "i8042.c: Can't read CTR while initializing i8042.\n");
+       param = 0xf0;
+       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0x0f)
                return -1;
-       }
-
-       i8042_initial_ctr = i8042_ctr;
-
-/*
- * Disable the keyboard interface and interrupt. 
- */
-
-       i8042_ctr |= I8042_CTR_KBDDIS;
-       i8042_ctr &= ~I8042_CTR_KBDINT;
-
-/*
- * Handle keylock.
- */
-
-       if (~i8042_read_status() & I8042_STR_KEYLOCK) {
-               if (i8042_unlock)
-                       i8042_ctr |= I8042_CTR_IGNKEYLOCK;
-                else
-                       printk(KERN_WARNING "i8042.c: Warning: Keylock active.\n");
-       }
-
-/*
- * If the chip is configured into nontranslated mode by the BIOS, don't
- * bother enabling translating and be happy.
- */
-
-       if (~i8042_ctr & I8042_CTR_XLATE)
-               i8042_direct = 1;
-
-/*
- * Set nontranslated mode for the kbd interface if requested by an option.
- * After this the kbd interface becomes a simple serial in/out, like the aux
- * interface is. We don't do this by default, since it can confuse notebook
- * BIOSes.
- */
-
-       if (i8042_direct) {
-               i8042_ctr &= ~I8042_CTR_XLATE;
-               i8042_kbd_port.type = SERIO_8042;
-       }
-
-/*
- * Write CTR back.
- */
-
-       if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
-               printk(KERN_ERR "i8042.c: Can't write CTR while initializing i8042.\n");
+       param = 0x56;
+       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0xa9)
+               return -1;
+       param = 0xa4;
+       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param == 0x5b)
                return -1;
-       }
+
+       if (mux_version)
+               *mux_version = ~param;
 
        return 0;
 }
 
+
 /*
- * Here we try to reset everything back to a state in which the BIOS will be
- * able to talk to the hardware when rebooting.
+ * i8042_enable_mux_ports enables 4 individual AUX ports after
+ * the controller has been switched into Multiplexed mode
  */
 
-void i8042_controller_cleanup(void)
+static int i8042_enable_mux_ports(struct i8042_values *values)
 {
+       unsigned char param;
        int i;
-
-       i8042_flush();
-
 /*
- * Reset anything that is connected to the ports.
- */
-
-       if (i8042_kbd_values.exists)
-               serio_cleanup(&i8042_kbd_port);
-
-       if (i8042_aux_values.exists)
-               serio_cleanup(&i8042_aux_port);
-
-       for (i = 0; i < 4; i++)
-               if (i8042_mux_values[i].exists)
-                       serio_cleanup(i8042_mux_port + i);
-
-/*
- * Reset the controller.
+ * Disable all muxed ports by disabling AUX.
  */
 
-       if (i8042_reset) {
-               unsigned char param;
+       i8042_ctr |= I8042_CTR_AUXDIS;
+       i8042_ctr &= ~I8042_CTR_AUXINT;
 
-               if (i8042_command(&param, I8042_CMD_CTL_TEST))
-                       printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
+       if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
+               printk(KERN_ERR "i8042.c: Failed to disable AUX port, can't use MUX.\n");
+               return -1;
        }
 
 /*
- * Restore the original control register setting.
+ * Enable all muxed ports.
  */
 
-       i8042_ctr = i8042_initial_ctr;
-
-       if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
-               printk(KERN_WARNING "i8042.c: Can't restore CTR.\n");
+       for (i = 0; i < 4; i++) {
+               i8042_command(&param, I8042_CMD_MUX_PFX + i);
+               i8042_command(&param, I8042_CMD_AUX_ENABLE);
+       }
 
+       return 0;
 }
 
+
 /*
  * i8042_check_mux() checks whether the controller supports the PS/2 Active
  * Multiplexing specification by Synaptics, Phoenix, Insyde and
@@ -540,66 +513,31 @@ void i8042_controller_cleanup(void)
 
 static int __init i8042_check_mux(struct i8042_values *values)
 {
-       unsigned char param;
        static int i8042_check_mux_cookie;
-       int i;
+       unsigned char mux_version;
 
 /*
  * Check if AUX irq is available.
  */
-
        if (request_irq(values->irq, i8042_interrupt, SA_SHIRQ,
                                "i8042", &i8042_check_mux_cookie))
                 return -1;
        free_irq(values->irq, &i8042_check_mux_cookie);
 
-/*
- * Get rid of bytes in the queue.
- */
-
-       i8042_flush();
-
-/*
- * Internal loopback test - send three bytes, they should come back from the
- * mouse interface, the last should be version. Note that we negate mouseport
- * command responses for the i8042_check_aux() routine.
- */
-
-       param = 0xf0;
-       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0x0f)
-               return -1;
-       param = 0x56;
-       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param != 0xa9)
-               return -1;
-       param = 0xa4;
-       if (i8042_command(&param, I8042_CMD_AUX_LOOP) || param == 0x5b)
+       if (i8042_enable_mux_mode(values, &mux_version))
                return -1;
 
        printk(KERN_INFO "i8042.c: Detected active multiplexing controller, rev %d.%d.\n",
-               (~param >> 4) & 0xf, ~param & 0xf);
-
-/*
- * Disable all muxed ports by disabling AUX.
- */
-
-       i8042_ctr |= I8042_CTR_AUXDIS;
-       i8042_ctr &= ~I8042_CTR_AUXINT;
+               (mux_version >> 4) & 0xf, mux_version & 0xf);
 
-       if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
+       if (i8042_enable_mux_ports(values))
                return -1;
 
-/*
- * Enable all muxed ports.
- */
-
-       for (i = 0; i < 4; i++) {
-               i8042_command(&param, I8042_CMD_MUX_PFX + i);
-               i8042_command(&param, I8042_CMD_AUX_ENABLE);
-       }
-
+       i8042_mux_present = 1;
        return 0;
 }
 
+
 /*
  * i8042_check_aux() applies as much paranoia as it can at detecting
  * the presence of an AUX interface.
@@ -675,6 +613,7 @@ static int __init i8042_check_aux(struct i8042_values *values)
        return 0;
 }
 
+
 /*
  * i8042_port_register() marks the device as existing,
  * registers it, and reports to the user.
@@ -691,63 +630,205 @@ static int __init i8042_port_register(struct i8042_values *values, struct serio
                return -1; 
        }
 
-       serio_register_port(port);
-
        printk(KERN_INFO "serio: i8042 %s port at %#lx,%#lx irq %d\n",
               values->name,
               (unsigned long) I8042_DATA_REG,
               (unsigned long) I8042_COMMAND_REG,
               values->irq);
 
+       serio_register_port(port);
+
        return 0;
 }
 
+
 static void i8042_timer_func(unsigned long data)
 {
        i8042_interrupt(0, NULL, NULL);
        mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
 }
 
-#ifndef MODULE
-static int __init i8042_setup_reset(char *str)
-{
-       i8042_reset = 1;
-       return 1;
-}
-static int __init i8042_setup_noaux(char *str)
-{
-       i8042_noaux = 1;
-       i8042_nomux = 1;
-       return 1;
-}
-static int __init i8042_setup_nomux(char *str)
-{
-       i8042_nomux = 1;
-       return 1;
-}
-static int __init i8042_setup_unlock(char *str)
+
+/*
+ * i8042_controller init initializes the i8042 controller, and,
+ * most importantly, sets it into non-xlated mode if that's
+ * desired.
+ */
+
+static int i8042_controller_init(void)
 {
-       i8042_unlock = 1;
-       return 1;
+
+       if (i8042_noaux)
+               i8042_nomux = 1;
+/*
+ * Test the i8042. We need to know if it thinks it's working correctly
+ * before doing anything else.
+ */
+
+       i8042_flush();
+
+       if (i8042_reset) {
+
+               unsigned char param;
+
+               if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
+                       printk(KERN_ERR "i8042.c: i8042 controller self test timeout.\n");
+                       return -1;
+               }
+
+               if (param != I8042_RET_CTL_TEST) {
+                       printk(KERN_ERR "i8042.c: i8042 controller selftest failed. (%#x != %#x)\n",
+                                param, I8042_RET_CTL_TEST);
+                       return -1;
+               }
+       }
+
+/*
+ * Save the CTR for restoral on unload / reboot.
+ */
+
+       if (i8042_command(&i8042_ctr, I8042_CMD_CTL_RCTR)) {
+               printk(KERN_ERR "i8042.c: Can't read CTR while initializing i8042.\n");
+               return -1;
+       }
+
+       i8042_initial_ctr = i8042_ctr;
+
+/*
+ * Disable the keyboard interface and interrupt.
+ */
+
+       i8042_ctr |= I8042_CTR_KBDDIS;
+       i8042_ctr &= ~I8042_CTR_KBDINT;
+
+/*
+ * Handle keylock.
+ */
+
+       if (~i8042_read_status() & I8042_STR_KEYLOCK) {
+               if (i8042_unlock)
+                       i8042_ctr |= I8042_CTR_IGNKEYLOCK;
+                else
+                       printk(KERN_WARNING "i8042.c: Warning: Keylock active.\n");
+       }
+
+/*
+ * If the chip is configured into nontranslated mode by the BIOS, don't
+ * bother enabling translating and be happy.
+ */
+
+       if (~i8042_ctr & I8042_CTR_XLATE)
+               i8042_direct = 1;
+
+/*
+ * Set nontranslated mode for the kbd interface if requested by an option.
+ * After this the kbd interface becomes a simple serial in/out, like the aux
+ * interface is. We don't do this by default, since it can confuse notebook
+ * BIOSes.
+ */
+
+       if (i8042_direct) {
+               i8042_ctr &= ~I8042_CTR_XLATE;
+               i8042_kbd_port.type = SERIO_8042;
+       }
+
+/*
+ * Write CTR back.
+ */
+
+       if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR)) {
+               printk(KERN_ERR "i8042.c: Can't write CTR while initializing i8042.\n");
+               return -1;
+       }
+
+       return 0;
 }
-static int __init i8042_setup_direct(char *str)
+
+
+/*
+ * Here we try to reset everything back to a state in which the BIOS will be
+ * able to talk to the hardware when rebooting.
+ */
+
+void i8042_controller_cleanup(void)
 {
-       i8042_direct = 1;
-       return 1;
+       int i;
+
+       i8042_flush();
+
+/*
+ * Reset anything that is connected to the ports.
+ */
+
+       if (i8042_kbd_values.exists)
+               serio_cleanup(&i8042_kbd_port);
+
+       if (i8042_aux_values.exists)
+               serio_cleanup(&i8042_aux_port);
+
+       for (i = 0; i < 4; i++)
+               if (i8042_mux_values[i].exists)
+                       serio_cleanup(i8042_mux_port + i);
+
+/*
+ * Reset the controller.
+ */
+
+       if (i8042_reset) {
+               unsigned char param;
+
+               if (i8042_command(&param, I8042_CMD_CTL_TEST))
+                       printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
+       }
+
+/*
+ * Restore the original control register setting.
+ */
+
+       i8042_ctr = i8042_initial_ctr;
+
+       if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
+               printk(KERN_WARNING "i8042.c: Can't restore CTR.\n");
+
 }
-static int __init i8042_setup_dumbkbd(char *str)
+
+
+/*
+ * Here we try to reset everything back to a state in which suspended
+ */
+
+static int i8042_controller_resume(void)
 {
-       i8042_dumbkbd = 1;
-       return 1;
+       int i;
+
+       if (i8042_controller_init()) {
+               printk(KERN_ERR "i8042: resume failed\n");
+               return -1;
+       }
+
+       if (i8042_mux_present)
+               if (i8042_enable_mux_mode(&i8042_aux_values, NULL) ||
+                   i8042_enable_mux_ports(&i8042_aux_values)) {
+                       printk(KERN_WARNING "i8042: failed to resume active multiplexor, mouse won't wotk.\n");
+               }
+
+/*
+ * Reconnect anything that was connected to the ports.
+ */
+
+       if (i8042_kbd_values.exists && i8042_activate_port(&i8042_kbd_port) == 0)
+               serio_reconnect(&i8042_kbd_port);
+
+       if (i8042_aux_values.exists && i8042_activate_port(&i8042_aux_port) == 0)
+               serio_reconnect(&i8042_aux_port);
+
+       for (i = 0; i < 4; i++)
+               if (i8042_mux_values[i].exists && i8042_activate_port(i8042_mux_port + i) == 0)
+                       serio_reconnect(i8042_mux_port + i);
+
+       return 0;
 }
 
-__setup("i8042_reset", i8042_setup_reset);
-__setup("i8042_noaux", i8042_setup_noaux);
-__setup("i8042_nomux", i8042_setup_nomux);
-__setup("i8042_unlock", i8042_setup_unlock);
-__setup("i8042_direct", i8042_setup_direct);
-__setup("i8042_dumbkbd", i8042_setup_dumbkbd);
-#endif
 
 /*
  * We need to reset the 8042 back to original mode on system shutdown,
@@ -769,6 +850,35 @@ static struct notifier_block i8042_notifier=
         0
 };
 
+/*
+ * Resume handler for the new PM scheme (driver model)
+ */
+static int i8042_resume(struct sys_device *dev)
+{
+       return i8042_controller_resume();
+}
+
+static struct sysdev_class kbc_sysclass = {
+       set_kset_name("i8042"),
+       .resume = i8042_resume,
+};
+
+static struct sys_device device_i8042 = {
+       .id     = 0,
+       .cls    = &kbc_sysclass,
+};
+
+/*
+ * Resume handler for the old PM scheme (APM)
+ */
+static int i8042_pm_callback(struct pm_dev *dev, pm_request_t request, void *dummy)
+{
+       if (request == PM_RESUME)
+               return i8042_controller_resume();
+
+       return 0;
+}
+
 static void __init i8042_init_mux_values(struct i8042_values *values, struct serio *port, int index)
 {
        memcpy(port, &i8042_aux_port, sizeof(struct serio));
@@ -817,6 +927,15 @@ int __init i8042_init(void)
        i8042_timer.function = i8042_timer_func;
        mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
 
+        if (sysdev_class_register(&kbc_sysclass) == 0) {
+                if (sys_device_register(&device_i8042) == 0)
+                       i8042_sysdev_initialized = 1;
+               else
+                       sysdev_class_unregister(&kbc_sysclass);
+        }
+
+       i8042_pm_dev = pm_register(PM_SYS_DEV, PM_SYS_UNKNOWN, i8042_pm_callback);
+
        register_reboot_notifier(&i8042_notifier);
 
        return 0;
@@ -828,6 +947,14 @@ void __exit i8042_exit(void)
 
        unregister_reboot_notifier(&i8042_notifier);
 
+       if (i8042_pm_dev)
+               pm_unregister(i8042_pm_dev);
+
+       if (i8042_sysdev_initialized) {
+               sys_device_unregister(&device_i8042);
+               sysdev_class_unregister(&kbc_sysclass);
+       }
+
        del_timer(&i8042_timer);
 
        i8042_controller_cleanup();
index 2288eb4..53e77f4 100644 (file)
@@ -49,14 +49,17 @@ MODULE_LICENSE("GPL");
 
 EXPORT_SYMBOL(serio_interrupt);
 EXPORT_SYMBOL(serio_register_port);
-EXPORT_SYMBOL(serio_register_slave_port);
+EXPORT_SYMBOL(serio_register_port_delayed);
+EXPORT_SYMBOL(__serio_register_port);
 EXPORT_SYMBOL(serio_unregister_port);
-EXPORT_SYMBOL(serio_unregister_slave_port);
+EXPORT_SYMBOL(serio_unregister_port_delayed);
+EXPORT_SYMBOL(__serio_unregister_port);
 EXPORT_SYMBOL(serio_register_device);
 EXPORT_SYMBOL(serio_unregister_device);
 EXPORT_SYMBOL(serio_open);
 EXPORT_SYMBOL(serio_close);
 EXPORT_SYMBOL(serio_rescan);
+EXPORT_SYMBOL(serio_reconnect);
 
 struct serio_event {
        int type;
@@ -82,11 +85,23 @@ static void serio_find_dev(struct serio *serio)
        }
 }
 
-#define SERIO_RESCAN   1
+#define SERIO_RESCAN           1
+#define SERIO_RECONNECT                2
+#define SERIO_REGISTER_PORT    3
+#define SERIO_UNREGISTER_PORT  4
 
 static DECLARE_WAIT_QUEUE_HEAD(serio_wait);
 static DECLARE_COMPLETION(serio_exited);
 
+static void serio_invalidate_pending_events(struct serio *serio)
+{
+       struct serio_event *event;
+
+       list_for_each_entry(event, &serio_event_list, node)
+               if (event->serio == serio)
+                       event->serio = NULL;
+}
+
 void serio_handle_events(void)
 {
        struct list_head *node, *next;
@@ -95,17 +110,35 @@ void serio_handle_events(void)
        list_for_each_safe(node, next, &serio_event_list) {
                event = container_of(node, struct serio_event, node);   
 
+               down(&serio_sem);
+               if (event->serio == NULL)
+                       goto event_done;
+
                switch (event->type) {
+                       case SERIO_REGISTER_PORT :
+                               __serio_register_port(event->serio);
+                               break;
+
+                       case SERIO_UNREGISTER_PORT :
+                               __serio_unregister_port(event->serio);
+                               break;
+
+                       case SERIO_RECONNECT :
+                               if (event->serio->dev && event->serio->dev->reconnect)
+                                       if (event->serio->dev->reconnect(event->serio) == 0)
+                                               break;
+                               /* reconnect failed - fall through to rescan */
+
                        case SERIO_RESCAN :
-                               down(&serio_sem);
                                if (event->serio->dev && event->serio->dev->disconnect)
                                        event->serio->dev->disconnect(event->serio);
                                serio_find_dev(event->serio);
-                               up(&serio_sem);
                                break;
                        default:
                                break;
                }
+event_done:
+               up(&serio_sem);
                list_del_init(node);
                kfree(event);
        }
@@ -130,18 +163,27 @@ static int serio_thread(void *nothing)
        complete_and_exit(&serio_exited, 0);
 }
 
-void serio_rescan(struct serio *serio)
+static void serio_queue_event(struct serio *serio, int event_type)
 {
        struct serio_event *event;
 
-       if (!(event = kmalloc(sizeof(struct serio_event), GFP_ATOMIC)))
-               return;
+       if ((event = kmalloc(sizeof(struct serio_event), GFP_ATOMIC))) {
+               event->type = event_type;
+               event->serio = serio;
+
+               list_add_tail(&event->node, &serio_event_list);
+               wake_up(&serio_wait);
+       }
+}
 
-       event->type = SERIO_RESCAN;
-       event->serio = serio;
+void serio_rescan(struct serio *serio)
+{
+       serio_queue_event(serio, SERIO_RESCAN);
+}
 
-       list_add_tail(&event->node, &serio_event_list);
-       wake_up(&serio_wait);
+void serio_reconnect(struct serio *serio)
+{
+       serio_queue_event(serio, SERIO_RECONNECT);
 }
 
 irqreturn_t serio_interrupt(struct serio *serio,
@@ -163,17 +205,26 @@ irqreturn_t serio_interrupt(struct serio *serio,
 void serio_register_port(struct serio *serio)
 {
        down(&serio_sem);
-       list_add_tail(&serio->node, &serio_list);
-       serio_find_dev(serio);
+       __serio_register_port(serio);
        up(&serio_sem);
 }
 
 /*
- * Same as serio_register_port but does not try to acquire serio_sem.
- * Should be used when registering a serio from other input device's
+ * Submits register request to kseriod for subsequent execution.
+ * Can be used when it is not obvious whether the serio_sem is
+ * taken or not and when delayed execution is feasible.
+ */
+void serio_register_port_delayed(struct serio *serio)
+{
+       serio_queue_event(serio, SERIO_REGISTER_PORT);
+}
+
+/*
+ * Should only be called directly if serio_sem has already been taken,
+ * for example when unregistering a serio from other input device's
  * connect() function.
  */
-void serio_register_slave_port(struct serio *serio)
+void __serio_register_port(struct serio *serio)
 {
        list_add_tail(&serio->node, &serio_list);
        serio_find_dev(serio);
@@ -182,19 +233,28 @@ void serio_register_slave_port(struct serio *serio)
 void serio_unregister_port(struct serio *serio)
 {
        down(&serio_sem);
-       list_del_init(&serio->node);
-       if (serio->dev && serio->dev->disconnect)
-               serio->dev->disconnect(serio);
+       __serio_unregister_port(serio);
        up(&serio_sem);
 }
 
 /*
- * Same as serio_unregister_port but does not try to acquire serio_sem.
- * Should be used when unregistering a serio from other input device's
+ * Submits unregister request to kseriod for subsequent execution.
+ * Can be used when it is not obvious whether the serio_sem is
+ * taken or not and when delayed execution is feasible.
+ */
+void serio_unregister_port_delayed(struct serio *serio)
+{
+       serio_queue_event(serio, SERIO_UNREGISTER_PORT);
+}
+
+/*
+ * Should only be called directly if serio_sem has already been taken,
+ * for example when unregistering a serio from other input device's
  * disconnect() function.
  */
-void serio_unregister_slave_port(struct serio *serio)
+void __serio_unregister_port(struct serio *serio)
 {
+       serio_invalidate_pending_events(serio);
        list_del_init(&serio->node);
        if (serio->dev && serio->dev->disconnect)
                serio->dev->disconnect(serio);
index d18aae7..ce30805 100644 (file)
@@ -13,7 +13,7 @@ config ISDN_DRV_EICON
 choice
        prompt "Eicon active card support"
        optional
-       depends on ISDN_DRV_EICON && ISDN
+       depends on ISDN_DRV_EICON && ISDN && m
 
 config ISDN_DRV_EICON_DIVAS
        tristate "Eicon driver"
index 2da6cb8..ceba6d1 100644 (file)
@@ -29,6 +29,7 @@
 #include <linux/init.h>
 #ifdef CONFIG_MCA
 #include <linux/mca.h>
+#include <linux/mca-legacy.h>
 #endif /* CONFIG_MCA */
 
 #include "eicon.h"
index 6e559e8..182ba94 100644 (file)
@@ -557,7 +557,7 @@ ippp_ccp_send_ccp(struct ippp_ccp *ccp, struct sk_buff *skb)
 }
 
 static LIST_HEAD(ipc_head);
-static spinlock_t ipc_head_lock;
+static spinlock_t ipc_head_lock = SPIN_LOCK_UNLOCKED;
 
 int
 ippp_ccp_set_compressor(struct ippp_ccp *ccp, int unit,
index 1a8db01..7e6f404 100644 (file)
@@ -138,6 +138,7 @@ config BLK_DEV_DM
 config DM_IOCTL_V4
        bool "ioctl interface version 4"
        depends on BLK_DEV_DM
+       default y
        ---help---
          Recent tools use a new version of the ioctl interface, only
           select this option if you intend using such tools.
index fed010c..ad78def 100644 (file)
@@ -566,7 +566,7 @@ static int create(struct dm_ioctl *param, struct dm_ioctl *user)
        if (r)
                return r;
 
-       r = dm_table_create(&t, get_mode(param));
+       r = dm_table_create(&t, get_mode(param), param->target_count);
        if (r)
                return r;
 
@@ -894,7 +894,7 @@ static int reload(struct dm_ioctl *param, struct dm_ioctl *user)
        struct mapped_device *md;
        struct dm_table *t;
 
-       r = dm_table_create(&t, get_mode(param));
+       r = dm_table_create(&t, get_mode(param), param->target_count);
        if (r)
                return r;
 
index 64c7598..63658f2 100644 (file)
@@ -872,7 +872,7 @@ static int table_load(struct dm_ioctl *param, size_t param_size)
        struct hash_cell *hc;
        struct dm_table *t;
 
-       r = dm_table_create(&t, get_mode(param));
+       r = dm_table_create(&t, get_mode(param), param->target_count);
        if (r)
                return r;
 
index 46eaee9..d0a3ec0 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/namei.h>
 #include <linux/ctype.h>
 #include <linux/slab.h>
+#include <linux/interrupt.h>
 #include <asm/atomic.h>
 
 #define MAX_DEPTH 16
@@ -202,7 +203,7 @@ static int alloc_targets(struct dm_table *t, unsigned int num)
        return 0;
 }
 
-int dm_table_create(struct dm_table **result, int mode)
+int dm_table_create(struct dm_table **result, int mode, unsigned num_targets)
 {
        struct dm_table *t = kmalloc(sizeof(*t), GFP_NOIO);
 
@@ -213,8 +214,12 @@ int dm_table_create(struct dm_table **result, int mode)
        INIT_LIST_HEAD(&t->devices);
        atomic_set(&t->holders, 1);
 
-       /* allocate a single nodes worth of targets to begin with */
-       if (alloc_targets(t, KEYS_PER_NODE)) {
+       if (!num_targets)
+               num_targets = KEYS_PER_NODE;
+
+       num_targets = dm_round_up(num_targets, KEYS_PER_NODE);
+
+       if (alloc_targets(t, num_targets)) {
                kfree(t);
                t = NULL;
                return -ENOMEM;
@@ -626,6 +631,16 @@ static int split_args(int *argc, char ***argvp, char *input)
        return 0;
 }
 
+static void set_default_limits(struct io_restrictions *rs)
+{
+       rs->max_sectors = MAX_SECTORS;
+       rs->max_phys_segments = MAX_PHYS_SEGMENTS;
+       rs->max_hw_segments = MAX_HW_SEGMENTS;
+       rs->hardsect_size = 1 << SECTOR_SHIFT;
+       rs->max_segment_size = MAX_SEGMENT_SIZE;
+       rs->seg_boundary_mask = -1;
+}
+
 int dm_table_add_target(struct dm_table *t, const char *type,
                        sector_t start, sector_t len, char *params)
 {
@@ -638,6 +653,7 @@ int dm_table_add_target(struct dm_table *t, const char *type,
 
        tgt = t->targets + t->num_targets;
        memset(tgt, 0, sizeof(*tgt));
+       set_default_limits(&tgt->limits);
 
        tgt->type = dm_get_target_type(type);
        if (!tgt->type) {
@@ -731,22 +747,28 @@ int dm_table_complete(struct dm_table *t)
        return r;
 }
 
-static spinlock_t _event_lock = SPIN_LOCK_UNLOCKED;
+static DECLARE_MUTEX(_event_lock);
 void dm_table_event_callback(struct dm_table *t,
                             void (*fn)(void *), void *context)
 {
-       spin_lock_irq(&_event_lock);
+       down(&_event_lock);
        t->event_fn = fn;
        t->event_context = context;
-       spin_unlock_irq(&_event_lock);
+       up(&_event_lock);
 }
 
 void dm_table_event(struct dm_table *t)
 {
-       spin_lock(&_event_lock);
+       /*
+        * You can no longer call dm_table_event() from interrupt
+        * context, use a bottom half instead.
+        */
+       BUG_ON(in_interrupt());
+
+       down(&_event_lock);
        if (t->event_fn)
                t->event_fn(t->event_context);
-       spin_unlock(&_event_lock);
+       up(&_event_lock);
 }
 
 sector_t dm_table_get_size(struct dm_table *t)
index 76cd0ed..c116277 100644 (file)
@@ -666,6 +666,20 @@ static void event_callback(void *context)
        up_write(&md->lock);
 }
 
+static void __set_size(struct gendisk *disk, sector_t size)
+{
+       struct block_device *bdev;
+
+       set_capacity(disk, size);
+       bdev = bdget_disk(disk, 0);
+       if (bdev) {
+               down(&bdev->bd_inode->i_sem);
+               i_size_write(bdev->bd_inode, size << SECTOR_SHIFT);
+               up(&bdev->bd_inode->i_sem);
+               bdput(bdev);
+       }
+}
+
 static int __bind(struct mapped_device *md, struct dm_table *t)
 {
        request_queue_t *q = md->queue;
@@ -673,7 +687,7 @@ static int __bind(struct mapped_device *md, struct dm_table *t)
        md->map = t;
 
        size = dm_table_get_size(t);
-       set_capacity(md->disk, size);
+       __set_size(md->disk, size);
        if (size == 0)
                return 0;
 
@@ -692,7 +706,6 @@ static void __unbind(struct mapped_device *md)
        dm_table_event_callback(md->map, NULL, NULL);
        dm_table_put(md->map);
        md->map = NULL;
-       set_capacity(md->disk, 0);
 }
 
 /*
index d5deaf1..7619155 100644 (file)
@@ -95,7 +95,7 @@ int dm_suspended(struct mapped_device *md);
  * Functions for manipulating a table.  Tables are also reference
  * counted.
  *---------------------------------------------------------------*/
-int dm_table_create(struct dm_table **result, int mode);
+int dm_table_create(struct dm_table **result, int mode, unsigned num_targets);
 
 void dm_table_get(struct dm_table *t);
 void dm_table_put(struct dm_table *t);
index 9dd33a9..b42d6d8 100644 (file)
@@ -113,8 +113,17 @@ static int linear_run (mddev_t *mddev)
                }
 
                disk->rdev = rdev;
+
                blk_queue_stack_limits(mddev->queue,
                                       rdev->bdev->bd_disk->queue);
+               /* as we don't honour merge_bvec_fn, we must never risk
+                * violating it, so limit ->max_sector to one PAGE, as
+                * a one page request is never in violation.
+                */
+               if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
+                   mddev->queue->max_sectors > (PAGE_SIZE>>9))
+                       mddev->queue->max_sectors = (PAGE_SIZE>>9);
+
                disk->size = rdev->size;
                mddev->array_size += rdev->size;
 
index c37cb37..85304b0 100644 (file)
@@ -273,6 +273,17 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
                        p->rdev = rdev;
                        blk_queue_stack_limits(mddev->queue,
                                               rdev->bdev->bd_disk->queue);
+
+               /* as we don't honour merge_bvec_fn, we must never risk
+                * violating it, so limit ->max_sector to one PAGE, as
+                * a one page request is never in violation.
+                * (Note: it is very unlikely that a device with
+                * merge_bvec_fn will be involved in multipath.)
+                */
+                       if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
+                           mddev->queue->max_sectors > (PAGE_SIZE>>9))
+                               mddev->queue->max_sectors = (PAGE_SIZE>>9);
+
                        conf->working_disks++;
                        rdev->raid_disk = path;
                        rdev->in_sync = 1;
@@ -410,8 +421,16 @@ static int multipath_run (mddev_t *mddev)
 
                disk = conf->multipaths + disk_idx;
                disk->rdev = rdev;
+
                blk_queue_stack_limits(mddev->queue,
                                       rdev->bdev->bd_disk->queue);
+               /* as we don't honour merge_bvec_fn, we must never risk
+                * violating it, not that we ever expect a device with
+                * a merge_bvec_fn to be involved in multipath */
+               if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
+                   mddev->queue->max_sectors > (PAGE_SIZE>>9))
+                       mddev->queue->max_sectors = (PAGE_SIZE>>9);
+
                if (!rdev->faulty) 
                        conf->working_disks++;
        }
index d076ef9..1c4600f 100644 (file)
@@ -112,8 +112,18 @@ static int create_strip_zones (mddev_t *mddev)
                        goto abort;
                }
                zone->dev[j] = rdev1;
+
                blk_queue_stack_limits(mddev->queue,
                                       rdev1->bdev->bd_disk->queue);
+               /* as we don't honour merge_bvec_fn, we must never risk
+                * violating it, so limit ->max_sector to one PAGE, as
+                * a one page request is never in violation.
+                */
+
+               if (rdev1->bdev->bd_disk->queue->merge_bvec_fn &&
+                   mddev->queue->max_sectors > (PAGE_SIZE>>9))
+                       mddev->queue->max_sectors = (PAGE_SIZE>>9);
+
                if (!smallest || (rdev1->size <smallest->size))
                        smallest = rdev1;
                cnt++;
@@ -301,6 +311,22 @@ static int raid0_run (mddev_t *mddev)
                conf->hash_spacing++;
        }
 
+       /* calculate the max read-ahead size.
+        * For read-ahead of large files to be effective, we need to
+        * readahead at least a whole stripe. i.e. number of devices
+        * multiplied by chunk size.
+        * If an individual device has an ra_pages greater than the
+        * chunk size, then we will not drive that device as hard as it
+        * wants.  We consider this a configuration error: a larger
+        * chunksize should be used in that case.
+        */
+       {
+               int stripe = mddev->raid_disks * mddev->chunk_size / PAGE_CACHE_SIZE;
+               if (mddev->queue->backing_dev_info.ra_pages < stripe)
+                       mddev->queue->backing_dev_info.ra_pages = stripe;
+       }
+
+
        blk_queue_merge_bvec(mddev->queue, raid0_mergeable_bvec);
        return 0;
 
index 99493d6..280a0ef 100644 (file)
@@ -56,7 +56,8 @@ static void r1bio_pool_free(void *r1_bio, void *data)
        kfree(r1_bio);
 }
 
-#define RESYNC_BLOCK_SIZE (64*1024)
+//#define RESYNC_BLOCK_SIZE (64*1024)
+#define RESYNC_BLOCK_SIZE PAGE_SIZE
 #define RESYNC_SECTORS (RESYNC_BLOCK_SIZE >> 9)
 #define RESYNC_PAGES ((RESYNC_BLOCK_SIZE + PAGE_SIZE-1) / PAGE_SIZE)
 #define RESYNC_WINDOW (2048*1024)
@@ -677,8 +678,17 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
        for (mirror=0; mirror < mddev->raid_disks; mirror++)
                if ( !(p=conf->mirrors+mirror)->rdev) {
                        p->rdev = rdev;
+
                        blk_queue_stack_limits(mddev->queue,
                                               rdev->bdev->bd_disk->queue);
+                       /* as we don't honour merge_bvec_fn, we must never risk
+                        * violating it, so limit ->max_sector to one PAGE, as
+                        * a one page request is never in violation.
+                        */
+                       if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
+                           mddev->queue->max_sectors > (PAGE_SIZE>>9))
+                               mddev->queue->max_sectors = (PAGE_SIZE>>9);
+
                        p->head_position = 0;
                        rdev->raid_disk = mirror;
                        found = 1;
@@ -1077,8 +1087,17 @@ static int run(mddev_t *mddev)
                disk = conf->mirrors + disk_idx;
 
                disk->rdev = rdev;
+
                blk_queue_stack_limits(mddev->queue,
                                       rdev->bdev->bd_disk->queue);
+               /* as we don't honour merge_bvec_fn, we must never risk
+                * violating it, so limit ->max_sector to one PAGE, as
+                * a one page request is never in violation.
+                */
+               if (rdev->bdev->bd_disk->queue->merge_bvec_fn &&
+                   mddev->queue->max_sectors > (PAGE_SIZE>>9))
+                       mddev->queue->max_sectors = (PAGE_SIZE>>9);
+
                disk->head_position = 0;
                if (!rdev->faulty && rdev->in_sync)
                        conf->working_disks++;
index 8ea6bf9..def75ad 100644 (file)
@@ -1587,6 +1587,16 @@ memory = conf->max_nr_stripes * (sizeof(struct stripe_head) +
 
        print_raid5_conf(conf);
 
+       /* read-ahead size must cover a whole stripe, which is
+        * (n-1) * chunksize where 'n' is the number of raid devices
+        */
+       {
+               int stripe = (mddev->raid_disks-1) * mddev->chunk_size
+                       / PAGE_CACHE_SIZE;
+               if (mddev->queue->backing_dev_info.ra_pages < stripe)
+                       mddev->queue->backing_dev_info.ra_pages = stripe;
+       }
+
        /* Ok, everything is just fine now */
        mddev->array_size =  mddev->size * (mddev->raid_disks - 1);
        return 0;
index 3d5d7a7..f345820 100644 (file)
@@ -45,10 +45,65 @@ static void dump_registers(struct saa7146_dev* dev)
 #endif
 
 /****************************************************************************
+ * gpio and debi helper functions
+ ****************************************************************************/
+
+/* write "data" to the gpio-pin "pin" */
+void saa7146_set_gpio(struct saa7146_dev *dev, u8 pin, u8 data)
+{
+       u32 value = 0;
+
+       /* sanity check */
+       if(pin > 3)
+               return;
+
+       /* read old register contents */
+       value = saa7146_read(dev, GPIO_CTRL );
+       
+       value &= ~(0xff << (8*pin));
+       value |= (data << (8*pin));
+
+       saa7146_write(dev, GPIO_CTRL, value);
+}
+
+/* This DEBI code is based on the saa7146 Stradis driver by Nathan Laredo */
+int saa7146_wait_for_debi_done(struct saa7146_dev *dev)
+{
+       int start;
+
+       /* wait for registers to be programmed */
+       start = jiffies;
+       while (1) {
+                if (saa7146_read(dev, MC2) & 2)
+                        break;
+               if (jiffies-start > HZ/20) {
+                       DEB_S(("timed out while waiting for registers getting programmed\n"));
+                       return -ETIMEDOUT;
+               }
+       }
+
+       /* wait for transfer to complete */
+       start = jiffies;
+       while (1) {
+               if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S))
+                       break;
+               saa7146_read(dev, MC2);
+               if (jiffies-start > HZ/4) {
+                       DEB_S(("timed out while waiting for transfer completion\n"));
+                       return -ETIMEDOUT;
+               }
+       }
+
+       return 0;
+}
+
+/****************************************************************************
  * general helper functions
  ****************************************************************************/
 
-/* this is videobuf_vmalloc_to_sg() from video-buf.c */
+/* this is videobuf_vmalloc_to_sg() from video-buf.c 
+   make sure virt has been allocated with vmalloc_32(), otherwise the BUG()
+   may be triggered on highmem machines */
 static struct scatterlist* vmalloc_to_sg(unsigned char *virt, int nr_pages)
 {
        struct scatterlist *sglist;
@@ -84,7 +139,7 @@ char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa
 {
        struct scatterlist *slist = NULL;
        int pages = (length+PAGE_SIZE-1)/PAGE_SIZE;
-       char *mem = vmalloc(length);
+       char *mem = vmalloc_32(length);
        int slen = 0;
 
        if (NULL == mem) {
@@ -103,7 +158,9 @@ char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa
        }
        
        slen = pci_map_sg(pci,slist,pages,PCI_DMA_FROMDEVICE);
-       saa7146_pgtable_build_single(pci, pt, slist, slen);
+       if (0 != saa7146_pgtable_build_single(pci, pt, slist, slen)) {
+               return NULL;
+       }
 
        /* fixme: here's a memory leak: slist never gets freed by any other
           function ...*/
@@ -139,7 +196,7 @@ int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt)
        return 0;
 }
 
-void saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt,
+int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt,
        struct scatterlist *list, int sglen  )
 {
        u32   *ptr, fill;
@@ -148,6 +205,11 @@ void saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *p
 
        BUG_ON( 0 == sglen);
 
+       if (list->offset > PAGE_SIZE) {
+               DEB_D(("offset > PAGE_SIZE. this should not happen."));
+               return -EINVAL;
+       }
+       
        /* if we have a user buffer, the first page may not be
           aligned to a page boundary. */
        pt->offset = list->offset;
@@ -177,6 +239,7 @@ void saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *p
                printk("ptr1 %d: 0x%08x\n",i,ptr[i]);
        }
 */
+       return 0;
 }
 
 /********************************************************************************/
@@ -322,7 +385,7 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
        saa7146_write(dev, MC1, MASK_31);
 */
 
-       /* disable alle irqs */
+       /* disable all irqs */
        saa7146_write(dev, IER, 0);
 
        /* shut down all dma transfers */
@@ -381,8 +444,8 @@ static int saa7146_init_one(struct pci_dev *pci, const struct pci_device_id *ent
        dev->module = THIS_MODULE;
        init_waitqueue_head(&dev->i2c_wq);
 
-       /* set some default values */
-       saa7146_write(dev, BCS_CTRL, 0x80400040);
+       /* set some sane pci arbitrition values */
+       saa7146_write(dev, PCI_BT_V1, 0x1c00101f); 
 
        if( 0 != ext->probe) {
                if( 0 != ext->probe(dev) ) {
@@ -508,6 +571,7 @@ EXPORT_SYMBOL_GPL(saa7146_pgtable_alloc);
 EXPORT_SYMBOL_GPL(saa7146_pgtable_free);
 EXPORT_SYMBOL_GPL(saa7146_pgtable_build_single);
 EXPORT_SYMBOL_GPL(saa7146_vmalloc_build_pgtable);
+EXPORT_SYMBOL_GPL(saa7146_wait_for_debi_done);
 
 EXPORT_SYMBOL_GPL(saa7146_setgpio);
 
index 9c4fcc4..29bd80f 100644 (file)
@@ -86,7 +86,7 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
                return;
        }
 
-       DEB_EE(("dev:%p, dmaq:%p, vbi:%d\n", dev, q, vbi));
+       DEB_INT(("dev:%p, dmaq:%p, vbi:%d\n", dev, q, vbi));
 
 #if DEBUG_SPINLOCKS
        BUG_ON(!spin_is_locked(&dev->slock));
@@ -98,10 +98,10 @@ void saa7146_buffer_next(struct saa7146_dev *dev,
                if (!list_empty(&q->queue))
                        next = list_entry(q->queue.next,struct saa7146_buf, vb.queue);
                q->curr = buf;
-               DEB_D(("next buffer: buf:%p, prev:%p, next:%p\n", buf, q->queue.prev,q->queue.next));
+               DEB_INT(("next buffer: buf:%p, prev:%p, next:%p\n", buf, q->queue.prev,q->queue.next));
                buf->activate(dev,buf,next);
        } else {
-               DEB_D(("no next buffer. stopping.\n"));
+               DEB_INT(("no next buffer. stopping.\n"));
                if( 0 != vbi ) {
                        /* turn off video-dma3 */
                        saa7146_write(dev,MC1, MASK_20);
@@ -229,10 +229,10 @@ static int fops_open(struct inode *inode, struct file *file)
 
        if( fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
                DEB_S(("initializing vbi...\n"));
-               saa7146_vbi_uops.open(dev,fh);
+               saa7146_vbi_uops.open(dev,file);
        } else {
                DEB_S(("initializing video...\n"));
-               saa7146_video_uops.open(dev,fh);
+               saa7146_video_uops.open(dev,file);
        }
 
        result = 0;
@@ -255,9 +255,9 @@ static int fops_release(struct inode *inode, struct file *file)
                return -ERESTARTSYS;
 
        if( fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) {
-               saa7146_vbi_uops.release(dev,fh,file);
+               saa7146_vbi_uops.release(dev,file);
        } else {
-               saa7146_video_uops.release(dev,fh,file);
+               saa7146_video_uops.release(dev,file);
        }
 
        module_put(dev->ext->module);
@@ -372,7 +372,7 @@ void vv_callback(struct saa7146_dev *dev, unsigned long status)
 {
        u32 isr = status;
        
-       DEB_EE(("dev:%p, isr:0x%08x\n",dev,(u32)status));
+       DEB_INT(("dev:%p, isr:0x%08x\n",dev,(u32)status));
 
        if (0 != (isr & (MASK_27))) {
                DEB_INT(("irq: RPS0 (0x%08x).\n",isr));
@@ -410,6 +410,12 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv)
 
        DEB_EE(("dev:%p\n",dev));
        
+       /* set default values for video parts of the saa7146 */
+       saa7146_write(dev, BCS_CTRL, 0x80400040);
+
+       /* enable video-port pins */
+       saa7146_write(dev, MC1, (MASK_10 | MASK_26));
+
        /* save per-device extension data (one extension can
           handle different devices that might need different
           configuration data) */
index 0f41a4d..cface12 100644 (file)
@@ -660,24 +660,6 @@ void saa7146_set_hps_source_and_sync(struct saa7146_dev *dev, int source, int sy
        vv->current_hps_sync = sync;
 } 
 
-/* write "data" to the gpio-pin "pin" */
-void saa7146_set_gpio(struct saa7146_dev *dev, u8 pin, u8 data)
-{
-       u32 value = 0;
-
-       /* sanity check */
-       if(pin > 3)
-               return;
-
-       /* read old register contents */
-       value = saa7146_read(dev, GPIO_CTRL );
-       
-       value &= ~(0xff << (8*pin));
-       value |= (data << (8*pin));
-
-       saa7146_write(dev, GPIO_CTRL, value);
-}
-
 /* reprogram hps, enable(1) / disable(0) video */
 void saa7146_set_overlay(struct saa7146_dev *dev, struct saa7146_fh *fh, int v)
 {
@@ -710,13 +692,15 @@ void saa7146_write_out_dma(struct saa7146_dev* dev, int which, struct saa7146_vi
        /* calculate starting address */
        where  = (which-1)*0x18;
 
+/*
        if( 0 != (dev->ext_vv_data->flags & SAA7146_EXT_SWAP_ODD_EVEN)) {
                saa7146_write(dev, where,       vdma->base_even);
                saa7146_write(dev, where+0x04,  vdma->base_odd);
        } else {
+*/
                saa7146_write(dev, where,       vdma->base_odd);
                saa7146_write(dev, where+0x04,  vdma->base_even);
-       }
+//     }
        saa7146_write(dev, where+0x08,  vdma->prot_addr);
        saa7146_write(dev, where+0x0c,  vdma->pitch);
        saa7146_write(dev, where+0x10,  vdma->base_page);
@@ -971,12 +955,13 @@ static void program_capture_engine(struct saa7146_dev *dev, int planar)
        unsigned long e_wait = vv->current_hps_sync == SAA7146_HPS_SYNC_PORT_A ? CMD_E_FID_A : CMD_E_FID_B;
        unsigned long o_wait = vv->current_hps_sync == SAA7146_HPS_SYNC_PORT_A ? CMD_O_FID_A : CMD_O_FID_B;
 
+/*
        if( 0 != (dev->ext_vv_data->flags & SAA7146_EXT_SWAP_ODD_EVEN)) {
                unsigned long tmp = e_wait;
                e_wait = o_wait;
                o_wait = tmp;
        }
-
+*/
        /* wait for o_fid_a/b / e_fid_a/b toggle only if rps register 0 is not set*/
        WRITE_RPS0(CMD_PAUSE | CMD_OAN | CMD_SIG0 | o_wait);
        WRITE_RPS0(CMD_PAUSE | CMD_OAN | CMD_SIG0 | e_wait);
index a5d35f5..ff94b63 100644 (file)
@@ -186,7 +186,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
 {
        u32 status = 0, mc2 = 0;
        int trial = 0;
-       int timeout;
+       unsigned long timeout;
 
        /* write out i2c-command */
        DEB_I2C(("before: 0x%08x (status: 0x%08x), %d\n",*dword,saa7146_read(dev, I2C_STATUS), dev->i2c_op));
@@ -218,7 +218,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
                        if( 0 != mc2 ) {
                                break;
                        }
-                       if (jiffies > timeout) {
+                       if (time_after(jiffies,timeout)) {
                                printk(KERN_WARNING "saa7146_i2c_writeout: timed out waiting for MC2\n");
                                return -EIO;
                        }
@@ -233,7 +233,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
                        status = saa7146_i2c_status(dev);
                        if ((status & 0x3) != 1)
                                break;
-                       if (jiffies > timeout) {
+                       if (time_after(jiffies,timeout)) {
                                /* this is normal when probing the bus
                                 * (no answer from nonexisistant device...)
                                 */
@@ -301,7 +301,8 @@ int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg msgs[], i
                goto out;
        }
 
-        if (count > 3) short_delay = 1;
+       if ( count > 3 || 0 != (SAA7146_I2C_SHORT_DELAY & dev->ext->flags) )
+               short_delay = 1;
   
        do {
                /* reset the i2c-device if necessary */
@@ -403,19 +404,29 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c
 {
        DEB_EE(("bitrate: 0x%08x\n",bitrate));
        
+       /* enable i2c-port pins */
+       saa7146_write(dev, MC1, (MASK_08 | MASK_24));
+
        dev->i2c_bitrate = bitrate;
        saa7146_i2c_reset(dev);
 
        if( NULL != i2c_adapter ) {
                memset(i2c_adapter,0,sizeof(struct i2c_adapter));
                strcpy(i2c_adapter->name, dev->name);   
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+               i2c_adapter->data = dev;
+#else
                i2c_set_adapdata(i2c_adapter,dev);
-               i2c_adapter->class         = I2C_ADAP_CLASS_TV_ANALOG;
+#endif
                i2c_adapter->algo          = &saa7146_algo;
                i2c_adapter->algo_data     = NULL;
                i2c_adapter->id            = I2C_ALGO_SAA7146;
                i2c_adapter->timeout = SAA7146_I2C_TIMEOUT;
                i2c_adapter->retries = SAA7146_I2C_RETRIES;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
+#else
+               i2c_adapter->class = I2C_ADAP_CLASS_TV_ANALOG;
+#endif
        }
        
        return 0;
index 9ed51e3..862d9ac 100644 (file)
@@ -41,7 +41,11 @@ static int vbi_workaround(struct saa7146_dev *dev)
        /* wait for vbi_a or vbi_b*/
        if ( 0 != (SAA7146_USE_PORT_B_FOR_VBI & dev->ext_vv_data->flags)) {
                DEB_D(("...using port b\n"));
+               WRITE_RPS1(CMD_PAUSE | CMD_OAN | CMD_SIG1 | CMD_E_FID_B);
+               WRITE_RPS1(CMD_PAUSE | CMD_OAN | CMD_SIG1 | CMD_O_FID_B);
+/*
                WRITE_RPS1(CMD_PAUSE | MASK_09);
+*/
        } else {
                DEB_D(("...using port a\n"));
                WRITE_RPS1(CMD_PAUSE | MASK_10);
@@ -137,10 +141,10 @@ void saa7146_set_vbi_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, s
        unsigned long o_wait = vv->current_hps_sync == SAA7146_HPS_SYNC_PORT_A ? CMD_O_FID_A : CMD_O_FID_B;
 
 /*
-       vdma3.base_even = (u32)dev->ov_fb.base+2048*70;
-       vdma3.base_odd  = (u32)dev->ov_fb.base;
-       vdma3.prot_addr = (u32)dev->ov_fb.base+2048*164;
-       vdma3.pitch     = 2048;
+       vdma3.base_even = 0xc8000000+2560*70;
+       vdma3.base_odd  = 0xc8000000;
+       vdma3.prot_addr = 0xc8000000+2560*164;
+       vdma3.pitch     = 2560;
        vdma3.base_page = 0;
        vdma3.num_line_byte = (64<<16)|((vbi_pixel_to_capture)<<0); // set above!
 */
@@ -244,7 +248,9 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb,enum v4l
                err = videobuf_iolock(dev->pci,&buf->vb,NULL);
                if (err)
                        goto oops;
-               saa7146_pgtable_build_single(dev->pci, &buf->pt[2], buf->vb.dma.sglist, buf->vb.dma.sglen);
+               err = saa7146_pgtable_build_single(dev->pci, &buf->pt[2], buf->vb.dma.sglist, buf->vb.dma.sglen);
+               if (0 != err)
+                       return err;
        }
        buf->vb.state = STATE_PREPARED;
        buf->activate = buffer_activate;
@@ -303,7 +309,7 @@ static struct videobuf_queue_ops vbi_qops = {
 
 /* ------------------------------------------------------------------ */
 
-static void vbi_stop(struct saa7146_fh *fh)
+static void vbi_stop(struct saa7146_fh *fh, struct file *file)
 {
        struct saa7146_dev *dev = fh->dev;
        struct saa7146_vv *vv = dev->vv_data;
@@ -321,23 +327,29 @@ static void vbi_stop(struct saa7146_fh *fh)
        /* shut down dma 3 transfers */
        saa7146_write(dev, MC1, MASK_20);
 
+       if (vv->vbi_q.curr) {
+               saa7146_buffer_finish(dev,&vv->vbi_q,STATE_DONE);
+       }
+
+       videobuf_queue_cancel(file,&fh->vbi_q);
+
        vv->vbi_streaming = NULL;
 
        del_timer(&vv->vbi_q.timeout);
        del_timer(&fh->vbi_read_timeout);
 
-       DEB_VBI(("out\n"));
        spin_unlock_irqrestore(&dev->slock, flags);
 }
 
 static void vbi_read_timeout(unsigned long data)
 {
-       struct saa7146_fh *fh = (struct saa7146_fh *)data;
+       struct file *file = (struct file*)data;
+       struct saa7146_fh *fh = file->private_data;
        struct saa7146_dev *dev = fh->dev;
        
        DEB_VBI(("dev:%p, fh:%p\n",dev, fh));
 
-       vbi_stop(fh);
+       vbi_stop(fh, file);
 }
 
 static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
@@ -354,10 +366,21 @@ static void vbi_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
        init_waitqueue_head(&vv->vbi_wq);
 }
 
-static void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
+static void vbi_open(struct saa7146_dev *dev, struct file *file)
 {
+       struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
+       
+       u32 arbtr_ctrl  = saa7146_read(dev, PCI_BT_V1);
+       int ret = 0;
+       
        DEB_VBI(("dev:%p, fh:%p\n",dev,fh));
 
+       /* adjust arbitrition control for video dma 3 */
+       arbtr_ctrl &= ~0x1f0000;
+       arbtr_ctrl |=  0x1d0000;
+       saa7146_write(dev, PCI_BT_V1, arbtr_ctrl);
+       saa7146_write(dev, MC2, (MASK_04|MASK_20));             
+       
        memset(&fh->vbi_fmt,0,sizeof(fh->vbi_fmt));
 
        fh->vbi_fmt.sampling_rate       = 27000000;
@@ -380,21 +403,32 @@ static void vbi_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
 
        init_timer(&fh->vbi_read_timeout);
        fh->vbi_read_timeout.function = vbi_read_timeout;
-       fh->vbi_read_timeout.data = (unsigned long)fh;
+       fh->vbi_read_timeout.data = (unsigned long)file;
 
-       /* fixme: enable this again, if the dvb-c w/ analog module work properly */
-/*
-       vbi_workaround(dev);
-*/
+       /* initialize the brs */
+       if ( 0 != (SAA7146_USE_PORT_B_FOR_VBI & dev->ext_vv_data->flags)) {
+               saa7146_write(dev, BRS_CTRL, MASK_30|MASK_29 | (7 << 19));
+       } else {
+               saa7146_write(dev, BRS_CTRL, 0x00000001);
+
+               if (0 != (ret = vbi_workaround(dev))) {
+                       DEB_VBI(("vbi workaround failed!\n"));
+                       /* return ret;*/
+               }
+       }
+
+       /* upload brs register */
+       saa7146_write(dev, MC2, (MASK_08|MASK_24));             
 }
 
-static void vbi_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
+static void vbi_close(struct saa7146_dev *dev, struct file *file)
 {
+       struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
        struct saa7146_vv *vv = dev->vv_data;
        DEB_VBI(("dev:%p, fh:%p\n",dev,fh));
 
        if( fh == vv->vbi_streaming ) {
-               vbi_stop(fh);
+               vbi_stop(fh, file);
        }
 }
 
index 0a34ede..c1ed935 100644 (file)
@@ -116,7 +116,7 @@ static int try_win(struct saa7146_dev *dev, struct v4l2_window *win)
                DEB_D(("no fb fmt set.\n"));
                return -EINVAL;
        }
-       if (win->w.width < 64 || win->w.height <  64) {
+       if (win->w.width < 48 || win->w.height <  32) {
                DEB_D(("min width/height. (%d,%d)\n",win->w.width,win->w.height));
                return -EINVAL;
        }
@@ -661,7 +661,7 @@ static int saa7146_pgtable_build(struct saa7146_dev *dev, struct saa7146_buf *bu
 */                             
        } else {
                struct saa7146_pgtable *pt = &buf->pt[0];
-               saa7146_pgtable_build_single(pci, pt, list, length);
+               return saa7146_pgtable_build_single(pci, pt, list, length);
        }
 
        return 0;
@@ -704,7 +704,7 @@ static int video_begin(struct saa7146_fh *fh)
        return 0;
 }
 
-static int video_end(struct saa7146_fh *fh)
+static int video_end(struct saa7146_fh *fh, struct file *file)
 {
        struct saa7146_dev *dev = fh->dev;
        struct saa7146_vv *vv = dev->vv_data;
@@ -735,82 +735,9 @@ static int video_end(struct saa7146_fh *fh)
        saa7146_write(dev, MC1, 0x00700000);
 
        vv->streaming = NULL;
-       spin_unlock_irqrestore(&dev->slock, flags);
-       
-       return 0;
-}
-
-/* capturing to framebuffer */
-
-int overlay_reqbufs(struct saa7146_dev *dev, struct v4l2_requestbuffers *req)
-{
-/*     struct saa7146_fh *fh = file->private_data;
-
-       if (req->count > VIDEO_MAX_FRAME)
-               req->count = VIDEO_MAX_FRAME;
-
-       *size = fh->video_fmt.sizeimage;
-
-*/
-       return 0;
-}
-int overlay_querybuf(struct saa7146_dev *dev, struct v4l2_buffer *buf)
-{
-       return 0;
-}
-int overlay_qbuf(struct saa7146_dev *dev, struct v4l2_buffer *b)
-{
-/*     if (b->index < 0 || b->index >= VIDEO_MAX_FRAME) {
-               DEB_D(("index %d out of bounds.\n",b->index));
-               goto -EINVAL;
-       }
-       
-       buf = q->bufs[b->index];
-       if (NULL == buf) {
-               printk("videobuf_qbuf: NULL == buf\n");
-               goto done;
-       }
-       if (0 == buf->baddr) {
-               printk("videobuf_qbuf: 0 == buf->baddr\n");
-               goto done;
-       }
-       if (buf->state == STATE_QUEUED ||
-           buf->state == STATE_ACTIVE) {
-               printk("videobuf_qbuf: already queued or activated.\n");
-               goto done;
-       }
 
-       field = videobuf_next_field(q);
-       retval = q->ops->buf_prepare(file,buf,field);
-       if (0 != retval) {
-               printk("videobuf_qbuf: buf_prepare() failed.\n");
-               goto done;
-       }
-       
-       list_add_tail(&buf->stream,&q->stream);
-       if (q->streaming) {
-               spin_lock_irqsave(q->irqlock,flags);
-               q->ops->buf_queue(file,buf);
-               spin_unlock_irqrestore(q->irqlock,flags);
-       }
-       retval = 0;
+       spin_unlock_irqrestore(&dev->slock, flags);
        
- done:
-       up(&q->lock);
-       return retval;
-*/
-       return 0;
-}
-int overlay_dqbuf(struct saa7146_dev *dev, struct v4l2_buffer *buf)
-{
-       return 0;
-}
-int overlay_streamon(struct saa7146_dev *dev)
-{
-       return 0;
-}
-int overlay_streamoff(struct saa7146_dev *dev)
-{
        return 0;
 }
 
@@ -818,7 +745,7 @@ int overlay_streamoff(struct saa7146_dev *dev)
 /*
  * This function is _not_ called directly, but from
  * video_generic_ioctl (and maybe others).  userspace
- * copying is done already, arg is a kernel fhinter.
+ * copying is done already, arg is a kernel pointer.
  */
 
 int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int cmd, void *arg)
@@ -1141,38 +1068,24 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
        case VIDIOC_REQBUFS: {
                struct v4l2_requestbuffers *req = arg;
                DEB_D(("VIDIOC_REQBUFS, type:%d\n",req->type));
-/*
-               if( req->type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) {
-                       return overlay_reqbufs(dev,req);
-               } 
-*/
                return videobuf_reqbufs(file,q,req);
        }
        case VIDIOC_QUERYBUF: {
                struct v4l2_buffer *buf = arg;
                DEB_D(("VIDIOC_QUERYBUF, type:%d, offset:%d\n",buf->type,buf->m.offset));
-/*             if( buf->type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) {
-                       return overlay_querybuf(dev,buf);
-               } 
- */            return videobuf_querybuf(q,buf);
+               return videobuf_querybuf(q,buf);
        }
        case VIDIOC_QBUF: {
                struct v4l2_buffer *buf = arg;
                int ret = 0;
-/*             if( buf->type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) {
-                       return overlay_qbuf(dev,buf);
-               } 
- */            ret = videobuf_qbuf(file,q,buf);
+               ret = videobuf_qbuf(file,q,buf);
                DEB_D(("VIDIOC_QBUF: ret:%d, index:%d\n",ret,buf->index));
                return ret;
        }
        case VIDIOC_DQBUF: {
                struct v4l2_buffer *buf = arg;
                int ret = 0;
-/*             if( buf->type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) {
-                       return overlay_dqbuf(dev,buf);
-               } 
- */            ret = videobuf_dqbuf(file,q,buf);
+               ret = videobuf_dqbuf(file,q,buf);
                DEB_D(("VIDIOC_DQBUF: ret:%d, index:%d\n",ret,buf->index));
                return ret;
        }
@@ -1180,29 +1093,18 @@ int saa7146_video_do_ioctl(struct inode *inode, struct file *file, unsigned int
                int *type = arg;
                DEB_D(("VIDIOC_STREAMON, type:%d\n",*type));
 
-               if( 0 != ops->capture_begin ) {
-                       if( 0 != (err = ops->capture_begin(fh))) {
+               if( 0 != (err = video_begin(fh))) {
                                return err;
                        }
-               }
-/*             if( *type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) {
-                       err = overlay_streamon(dev);
-               } else { */
                err = videobuf_streamon(file,q);
-/*             } */
                return err;
        }
        case VIDIOC_STREAMOFF: {
                int *type = arg;
 
                DEB_D(("VIDIOC_STREAMOFF, type:%d\n",*type));
-               if( 0 != ops->capture_end ) {
-                       ops->capture_end(fh);
-               }
-/*             if( *type == V4L2_BUF_TYPE_VIDEO_OVERLAY ) {
-                       return overlay_streamoff(dev);
-               } 
- */            err = videobuf_streamoff(file,q);
+               err = videobuf_streamoff(file,q);
+               video_end(fh, file);
                return err;
        }
        case VIDIOCGMBUF:
@@ -1267,8 +1169,8 @@ static int buffer_prepare(struct file *file, struct videobuf_buffer *vb, enum v4
        DEB_CAP(("vbuf:%p\n",vb));
 
        /* sanity checks */
-       if (fh->video_fmt.width  < 64 ||
-           fh->video_fmt.height < 64 ||
+       if (fh->video_fmt.width  < 48 ||
+           fh->video_fmt.height < 32 ||
            fh->video_fmt.width  > vv->standard->h_max_out ||
            fh->video_fmt.height > vv->standard->v_max_out) {
                DEB_D(("w (%d) / h (%d) out of bounds.\n",fh->video_fmt.width,fh->video_fmt.height));
@@ -1407,8 +1309,9 @@ static void video_init(struct saa7146_dev *dev, struct saa7146_vv *vv)
 }
 
 
-static void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
+static void video_open(struct saa7146_dev *dev, struct file *file)
 {
+       struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
        struct saa7146_format *sfmt;
 
        fh->video_fmt.width = 384;
@@ -1429,8 +1332,9 @@ static void video_open(struct saa7146_dev *dev, struct saa7146_fh *fh)
 }
 
 
-static void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct file *file)
+static void video_close(struct saa7146_dev *dev, struct file *file)
 {
+       struct saa7146_fh *fh = (struct saa7146_fh *)file->private_data;
        struct saa7146_vv *vv = dev->vv_data;
        unsigned long flags;
        
@@ -1443,10 +1347,8 @@ static void video_close(struct saa7146_dev *dev, struct saa7146_fh *fh, struct f
        }
        
        if( fh == vv->streaming ) {
-               video_end(fh);          
+               video_end(fh, file);            
        }
-
-       videobuf_queue_cancel(file,&fh->video_q);
 }
 
 
@@ -1489,7 +1391,7 @@ static ssize_t video_read(struct file *file, char *data, size_t count, loff_t *p
                return -EAGAIN;
        }
        ret = videobuf_read_one(file,&fh->video_q , data, count, ppos);
-       video_end(fh);
+       video_end(fh, file);
 
        /* restart overlay if it was active before */
        if( 0 != restart_overlay ) {
@@ -1505,6 +1407,4 @@ struct saa7146_use_ops saa7146_video_uops = {
        .release = video_close,
        .irq_done = video_irq_done,
        .read = video_read,
-       .capture_begin = video_begin,
-       .capture_end = video_end,
 };
index 8d72e87..f0f1520 100644 (file)
@@ -45,5 +45,9 @@ comment "Supported FlexCopII (B2C2) Adapters"
        depends on DVB_CORE && PCI
 source "drivers/media/dvb/b2c2/Kconfig"
 
+comment "Supported BT878 Adapters"
+       depends on DVB_CORE && PCI
+source "drivers/media/dvb/bt8xx/Kconfig"
+
 endmenu
 
index bea2d97..2263ebf 100644 (file)
@@ -2,5 +2,5 @@
 # Makefile for the kernel multimedia device drivers.
 #
 
-obj-y        := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/
+obj-y        := dvb-core/ frontends/ ttpci/ ttusb-dec/ ttusb-budget/ b2c2/ bt8xx/
 
index bbe9fed..0bb04e3 100644 (file)
@@ -2,7 +2,19 @@
  * skystar2.c - driver for the Technisat SkyStar2 PCI DVB card
  *              based on the FlexCopII by B2C2,Inc.
  *
- * Copyright (C) 2003  V.C. , skystar@moldova.cc
+ * Copyright (C) 2003  Vadim Catana, skystar@moldova.cc
+ *
+ * FIX: DISEQC Tone Burst in flexcop_diseqc_ioctl()
+ * FIX: FULL soft DiSEqC for skystar2 (FlexCopII rev 130) VP310 equipped 
+ *     Vincenzo Di Massa, hawk.it at tiscalinet.it
+ *     
+ * Converted to Linux coding style
+ * Misc reorganization, polishing, restyling
+ *     Roberto Ragusa, r.ragusa at libero.it
+ *       
+ * Added hardware filtering support, 
+ *     Niklas Peinecke, peinecke at gdv.uni-hannover.de
+ *
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public License
@@ -27,7 +39,6 @@
 
 #include "dvb_i2c.h"
 #include "dvb_frontend.h"
-#include "dvb_functions.h"
 
 #include <linux/dvb/frontend.h>
 #include <linux/dvb/dmx.h>
 #include "demux.h"
 #include "dvb_net.h"
 
+#include "dvb_functions.h"
+
 static int debug = 0;
-#define dprintk(x...) do { if (debug) printk(x); } while (0)
+#define dprintk(x...)  do { if (debug>=1) printk(x); } while (0)
+#define ddprintk(x...) do { if (debug>=2) printk(x); } while (0)
+static int enable_hw_filters = 2;
 
-#define SizeOfBufDMA1  0x3AC00
-#define SizeOfBufDMA2  0x758
+#define SIZE_OF_BUF_DMA1       0x3ac00
+#define SIZE_OF_BUF_DMA2       0x758
 
-struct dmaq {
+#define MAX_N_HW_FILTERS       (6+32)
+#define N_PID_SLOTS            256
 
+struct dmaq {
        u32 bus_addr;
        u32 head;
        u32 tail;
@@ -53,31 +70,19 @@ struct dmaq {
        u8 *buffer;
 };
 
-struct packet_header {
-
-       u32 sync_byte;
-       u32 transport_error_indicator;
-       u32 payload_unit_start_indicator;
-       u32 transport_priority;
-       u32 pid;
-       u32 transport_scrambling_control;
-       u32 adaptation_field_control;
-       u32 continuity_counter;
-};
 
 struct adapter {
-
        struct pci_dev *pdev;
 
        u8 card_revision;
        u32 b2c2_revision;
-       u32 PidFilterMax;
-       u32 MacFilterMax;
+       u32 pid_filter_max;
+       u32 mac_filter_max;
        u32 irq;
        unsigned long io_mem;
        unsigned long io_port;
        u8 mac_addr[8];
-       u32 dwSramType;
+       u32 dw_sram_type;
 
        struct dvb_adapter *dvb_adapter;
        struct dvb_demux demux;
@@ -95,44 +100,42 @@ struct adapter {
        u32 dma_ctrl;
        u32 dma_status;
 
-       u32 capturing;
+       int capturing;
 
        spinlock_t lock;
 
-       u16 pids[0x27];
+       int useable_hw_filters;
+       u16 hw_pids[MAX_N_HW_FILTERS];
+       u16 pid_list[N_PID_SLOTS];
+       int pid_rc[N_PID_SLOTS];        // ref counters for the pids
+       int pid_count;
+       int whole_bandwidth_count;
        u32 mac_filter;
 };
 
-#define WriteRegDW(adapter,reg,value) writel(value, adapter->io_mem + reg)
-#define ReadRegDW(adapter,reg) readl(adapter->io_mem + reg)
+#define write_reg_dw(adapter,reg,value) writel(value, adapter->io_mem + reg)
+#define read_reg_dw(adapter,reg) readl(adapter->io_mem + reg)
 
-static void WriteRegOp(struct adapter *adapter, u32 reg, u32 operation, u32 andvalue, u32 orvalue)
+static void write_reg_bitfield(struct adapter *adapter, u32 reg, u32 zeromask, u32 orvalue)
 {
        u32 tmp;
 
-       tmp = ReadRegDW(adapter, reg);
-
-       if (operation == 1)
-               tmp = tmp | orvalue;
-       if (operation == 2)
-               tmp = tmp & andvalue;
-       if (operation == 3)
-               tmp = (tmp & andvalue) | orvalue;
-
-       WriteRegDW(adapter, reg, tmp);
+       tmp = read_reg_dw(adapter, reg);
+       tmp = (tmp & ~zeromask) | orvalue;
+       write_reg_dw(adapter, reg, tmp);
 }
 
 /* i2c functions */
-static int i2cMainWriteForFlex2(struct adapter * adapter, u32 command, u8 * buf, u32 retries)
+static int i2c_main_write_for_flex2(struct adapter *adapter, u32 command, u8 *buf, int retries)
 {
-       u32 i;
+       int i;
        u32 value;
 
-       WriteRegDW(adapter, 0x100, 0);
-       WriteRegDW(adapter, 0x100, command);
+       write_reg_dw(adapter, 0x100, 0);
+       write_reg_dw(adapter, 0x100, command);
 
        for (i = 0; i < retries; i++) {
-               value = ReadRegDW(adapter, 0x100);
+               value = read_reg_dw(adapter, 0x100);
 
                if ((value & 0x40000000) == 0) {
                        if ((value & 0x81000000) == 0x80000000) {
@@ -141,11 +144,9 @@ static int i2cMainWriteForFlex2(struct adapter * adapter, u32 command, u8 * buf,
 
                                return 1;
                        }
-
                } else {
-
-                       WriteRegDW(adapter, 0x100, 0);
-                       WriteRegDW(adapter, 0x100, command);
+                       write_reg_dw(adapter, 0x100, 0);
+                       write_reg_dw(adapter, 0x100, command);
                }
        }
 
@@ -153,7 +154,7 @@ static int i2cMainWriteForFlex2(struct adapter * adapter, u32 command, u8 * buf,
 }
 
 /* device = 0x10000000 for tuner, 0x20000000 for eeprom */
-static void i2cMainSetup(u32 device, u32 chip_addr, u8 op, u8 addr, u32 value, u32 len, u32 *command)
+static void i2c_main_setup(u32 device, u32 chip_addr, u8 op, u8 addr, u32 value, u32 len, u32 *command)
 {
        *command = device | ((len - 1) << 26) | (value << 16) | (addr << 8) | chip_addr;
 
@@ -163,20 +164,20 @@ static void i2cMainSetup(u32 device, u32 chip_addr, u8 op, u8 addr, u32 value, u
                *command = *command | 0x01000000;
 }
 
-static int FlexI2cRead4(struct adapter * adapter, u32 device, u32 chip_addr, u16 addr, u8 * buf, u8 len)
+static int flex_i2c_read4(struct adapter *adapter, u32 device, u32 chip_addr, u16 addr, u8 *buf, u8 len)
 {
        u32 command;
        u32 value;
 
        int result, i;
 
-       i2cMainSetup(device, chip_addr, 1, addr, 0, len, &command);
+       i2c_main_setup(device, chip_addr, 1, addr, 0, len, &command);
 
-       result = i2cMainWriteForFlex2(adapter, command, buf, 100000);
+       result = i2c_main_write_for_flex2(adapter, command, buf, 100000);
 
        if ((result & 0xff) != 0) {
                if (len > 1) {
-                       value = ReadRegDW(adapter, 0x104);
+                       value = read_reg_dw(adapter, 0x104);
 
                        for (i = 1; i < len; i++) {
                                buf[i] = value & 0xff;
@@ -188,7 +189,7 @@ static int FlexI2cRead4(struct adapter * adapter, u32 device, u32 chip_addr, u16
        return result;
 }
 
-static int FlexI2cWrite4(struct adapter * adapter, u32 device, u32 chip_addr, u32 addr, u8 * buf, u8 len)
+static int flex_i2c_write4(struct adapter *adapter, u32 device, u32 chip_addr, u32 addr, u8 *buf, u8 len)
 {
        u32 command;
        u32 value;
@@ -202,12 +203,12 @@ static int FlexI2cWrite4(struct adapter * adapter, u32 device, u32 chip_addr, u3
                        value = value | buf[i - 1];
                }
 
-               WriteRegDW(adapter, 0x104, value);
+               write_reg_dw(adapter, 0x104, value);
        }
 
-       i2cMainSetup(device, chip_addr, 0, addr, buf[0], len, &command);
+       i2c_main_setup(device, chip_addr, 0, addr, buf[0], len, &command);
 
-       return i2cMainWriteForFlex2(adapter, command, 0, 100000);
+       return i2c_main_write_for_flex2(adapter, command, 0, 100000);
 }
 
 static void fixchipaddr(u32 device, u32 bus, u32 addr, u32 *ret)
@@ -218,13 +219,13 @@ static void fixchipaddr(u32 device, u32 bus, u32 addr, u32 *ret)
        *ret = bus;
 }
 
-static u32 FLEXI2C_read(struct adapter * adapter, u32 device, u32 bus, u32 addr, u8 * buf, u32 len)
+static u32 flex_i2c_read(struct adapter *adapter, u32 device, u32 bus, u32 addr, u8 *buf, u32 len)
 {
        u32 chipaddr;
        u32 bytes_to_transfer;
        u8 *start;
 
-//  dprintk("%s:\n", __FUNCTION__);
+       ddprintk("%s:\n", __FUNCTION__);
 
        start = buf;
 
@@ -236,7 +237,7 @@ static u32 FLEXI2C_read(struct adapter * adapter, u32 device, u32 bus, u32 addr,
 
                fixchipaddr(device, bus, addr, &chipaddr);
 
-               if (FlexI2cRead4(adapter, device, chipaddr, addr, buf, bytes_to_transfer) == 0)
+               if (flex_i2c_read4(adapter, device, chipaddr, addr, buf, bytes_to_transfer) == 0)
                        return buf - start;
 
                buf = buf + bytes_to_transfer;
@@ -247,13 +248,13 @@ static u32 FLEXI2C_read(struct adapter * adapter, u32 device, u32 bus, u32 addr,
        return buf - start;
 }
 
-static u32 FLEXI2C_write(struct adapter * adapter, u32 device, u32 bus, u32 addr, u8 * buf, u32 len)
+static u32 flex_i2c_write(struct adapter *adapter, u32 device, u32 bus, u32 addr, u8 *buf, u32 len)
 {
        u32 chipaddr;
        u32 bytes_to_transfer;
        u8 *start;
 
-//  dprintk("%s:\n", __FUNCTION__);
+       ddprintk("%s:\n", __FUNCTION__);
 
        start = buf;
 
@@ -265,7 +266,7 @@ static u32 FLEXI2C_write(struct adapter * adapter, u32 device, u32 bus, u32 addr
 
                fixchipaddr(device, bus, addr, &chipaddr);
 
-               if (FlexI2cWrite4(adapter, device, chipaddr, addr, buf, bytes_to_transfer) == 0)
+               if (flex_i2c_write4(adapter, device, chipaddr, addr, buf, bytes_to_transfer) == 0)
                        return buf - start;
 
                buf = buf + bytes_to_transfer;
@@ -284,75 +285,81 @@ static int master_xfer(struct dvb_i2c_bus *i2c, const struct i2c_msg *msgs, int
        if (down_interruptible(&tmp->i2c_sem))
                return -ERESTARTSYS;
 
-       if (0) {
-               dprintk("%s:\n", __FUNCTION__);
+       ddprintk("%s: %d messages to transfer\n", __FUNCTION__, num);
 
                for (i = 0; i < num; i++) {
-                       printk("message %d: flags=%x, addr=0x%04x, buf=%p, len=%d \n", i, msgs[i].flags, msgs[i].addr, msgs[i].buf, msgs[i].len);
-               }
-       }
+               ddprintk("message %d: flags=0x%x, addr=0x%x, buf=0x%x, len=%d \n", i,
+                        msgs[i].flags, msgs[i].addr, msgs[i].buf[0], msgs[i].len);
        
-       /* allow only the vp310 frontend to access the bus */
-       if ((msgs[0].addr != 0x0E) && (msgs[0].addr != 0x61)) {
+               /* allow only the mt312 and stv0299 frontends to access the bus */
+               if ((msgs[i].addr != 0x0e) && (msgs[i].addr != 0x68) && (msgs[i].addr != 0x61)) {
                up(&tmp->i2c_sem);
 
                return -EREMOTEIO;
        }
+       }
 
-       if ((num == 1) && (msgs[0].buf != NULL)) {
-               if (msgs[0].flags == I2C_M_RD) {
-                       ret = -EINVAL;
+       // read command
+       if ((num == 2) && (msgs[0].flags == 0) && (msgs[1].flags == I2C_M_RD) && (msgs[0].buf != NULL) && (msgs[1].buf != NULL)) {
 
-               } else {
+               ret = flex_i2c_read(tmp, 0x10000000, msgs[0].addr, msgs[0].buf[0], msgs[1].buf, msgs[1].len);
 
-                       // single writes do have the reg addr in buf[0] and data in buf[1] to buf[n]
-                       ret = FLEXI2C_write(tmp, 0x10000000, msgs[0].addr, msgs[0].buf[0], &msgs[0].buf[1], msgs[0].len - 1);
+               up(&tmp->i2c_sem);
+
+               if (ret != msgs[1].len) {
+                       printk("%s: read error !\n", __FUNCTION__);
+
+                       for (i = 0; i < 2; i++) {
+                               printk("message %d: flags=0x%x, addr=0x%x, buf=0x%x, len=%d \n", i,
+                                      msgs[i].flags, msgs[i].addr, msgs[i].buf[0], msgs[i].len);
+               }
 
-                       if (ret != msgs[0].len - 1)
-                               ret = -EREMOTEIO;
-                       else
-                               ret = num;
+                       return -EREMOTEIO;
                }
 
-       } else if ((num == 2) && (msgs[1].buf != NULL)) {
+               return num;
+       }
+       // write command
+       for (i = 0; i < num; i++) {
 
-               // i2c reads consist of a reg addr _write_ followed by a data read, so msg[1].flags has to be examined
-               if (msgs[1].flags == I2C_M_RD) {
-                       ret = FLEXI2C_read(tmp, 0x10000000, msgs[0].addr, msgs[0].buf[0], msgs[1].buf, msgs[1].len);
+               if ((msgs[i].flags != 0) || (msgs[i].buf == NULL) || (msgs[i].len < 2))
+                       return -EINVAL;
 
-               } else {
+               ret = flex_i2c_write(tmp, 0x10000000, msgs[i].addr, msgs[i].buf[0], &msgs[i].buf[1], msgs[i].len - 1);
 
-                       ret = FLEXI2C_write(tmp, 0x10000000, msgs[0].addr, msgs[0].buf[0], msgs[1].buf, msgs[1].len);
+               up(&tmp->i2c_sem);
+
+               if (ret != msgs[0].len - 1) {
+                       printk("%s: write error %i !\n", __FUNCTION__, ret);
+
+                       printk("message %d: flags=0x%x, addr=0x%x, buf[0]=0x%x, len=%d \n", i,
+                              msgs[i].flags, msgs[i].addr, msgs[i].buf[0], msgs[i].len);
+
+                       return -EREMOTEIO;
                }
 
-               if (ret != msgs[1].len)
-                       ret = -EREMOTEIO;
-               else
-                       ret = num;
+               return num;
        }
 
-       up(&tmp->i2c_sem);
+       printk("%s: unknown command format !\n", __FUNCTION__);
 
-       /* master xfer functions always return the number of successfully
-          transmitted messages, not the number of transmitted bytes.
-          return -EREMOTEIO in case of failure. */
-       return ret;
+       return -EINVAL;
 }
 
 /* SRAM (Skystar2 rev2.3 has one "ISSI IS61LV256" chip on board,
    but it seems that FlexCopII can work with more than one chip) */
-static void SRAMSetNetDest(struct adapter * adapter, u8 dest)
+static void sram_set_net_dest(struct adapter *adapter, u8 dest)
 {
        u32 tmp;
 
        udelay(1000);
 
-       tmp = (ReadRegDW(adapter, 0x714) & 0xFFFFFFFC) | (dest & 3);
+       tmp = (read_reg_dw(adapter, 0x714) & 0xfffffffc) | (dest & 3);
 
        udelay(1000);
 
-       WriteRegDW(adapter, 0x714, tmp);
-       WriteRegDW(adapter, 0x714, tmp);
+       write_reg_dw(adapter, 0x714, tmp);
+       write_reg_dw(adapter, 0x714, tmp);
 
        udelay(1000);
 
@@ -360,19 +367,19 @@ static void SRAMSetNetDest(struct adapter * adapter, u8 dest)
 /*     return tmp; */
 }
 
-static void SRAMSetCaiDest(struct adapter * adapter, u8 dest)
+static void sram_set_cai_dest(struct adapter *adapter, u8 dest)
 {
        u32 tmp;
 
        udelay(1000);
 
-       tmp = (ReadRegDW(adapter, 0x714) & 0xFFFFFFF3) | ((dest & 3) << 2);
+       tmp = (read_reg_dw(adapter, 0x714) & 0xfffffff3) | ((dest & 3) << 2);
 
        udelay(1000);
        udelay(1000);
 
-       WriteRegDW(adapter, 0x714, tmp);
-       WriteRegDW(adapter, 0x714, tmp);
+       write_reg_dw(adapter, 0x714, tmp);
+       write_reg_dw(adapter, 0x714, tmp);
 
        udelay(1000);
 
@@ -380,19 +387,19 @@ static void SRAMSetCaiDest(struct adapter * adapter, u8 dest)
 /*     return tmp; */
 }
 
-static void SRAMSetCaoDest(struct adapter * adapter, u8 dest)
+static void sram_set_cao_dest(struct adapter *adapter, u8 dest)
 {
        u32 tmp;
 
        udelay(1000);
 
-       tmp = (ReadRegDW(adapter, 0x714) & 0xFFFFFFCF) | ((dest & 3) << 4);
+       tmp = (read_reg_dw(adapter, 0x714) & 0xffffffcf) | ((dest & 3) << 4);
 
        udelay(1000);
        udelay(1000);
 
-       WriteRegDW(adapter, 0x714, tmp);
-       WriteRegDW(adapter, 0x714, tmp);
+       write_reg_dw(adapter, 0x714, tmp);
+       write_reg_dw(adapter, 0x714, tmp);
 
        udelay(1000);
 
@@ -400,19 +407,19 @@ static void SRAMSetCaoDest(struct adapter * adapter, u8 dest)
 /*     return tmp; */
 }
 
-static void SRAMSetMediaDest(struct adapter * adapter, u8 dest)
+static void sram_set_media_dest(struct adapter *adapter, u8 dest)
 {
        u32 tmp;
 
        udelay(1000);
 
-       tmp = (ReadRegDW(adapter, 0x714) & 0xFFFFFF3F) | ((dest & 3) << 6);
+       tmp = (read_reg_dw(adapter, 0x714) & 0xffffff3f) | ((dest & 3) << 6);
 
        udelay(1000);
        udelay(1000);
 
-       WriteRegDW(adapter, 0x714, tmp);
-       WriteRegDW(adapter, 0x714, tmp);
+       write_reg_dw(adapter, 0x714, tmp);
+       write_reg_dw(adapter, 0x714, tmp);
 
        udelay(1000);
 
@@ -429,16 +436,17 @@ static void SRAMSetMediaDest(struct adapter * adapter, u8 dest)
     bits 28-29 : memory bank selector
     bit  31    : busy flag
 */
-static void FlexSramWrite(struct adapter *adapter, u32 bank, u32 addr, u8 * buf, u32 len)
+static void flex_sram_write(struct adapter *adapter, u32 bank, u32 addr, u8 *buf, u32 len)
 {
-       u32 i, command, retries;
+       int i, retries;
+       u32 command;
 
        for (i = 0; i < len; i++) {
                command = bank | addr | 0x04000000 | (*buf << 0x10);
 
                retries = 2;
 
-               while (((ReadRegDW(adapter, 0x700) & 0x80000000) != 0) && (retries > 0)) {
+               while (((read_reg_dw(adapter, 0x700) & 0x80000000) != 0) && (retries > 0)) {
                        mdelay(1);
                        retries--;
                };
@@ -446,23 +454,24 @@ static void FlexSramWrite(struct adapter *adapter, u32 bank, u32 addr, u8 * buf,
                if (retries == 0)
                        printk("%s: SRAM timeout\n", __FUNCTION__);
 
-               WriteRegDW(adapter, 0x700, command);
+               write_reg_dw(adapter, 0x700, command);
 
                buf++;
                addr++;
        }
 }
 
-static void FlexSramRead(struct adapter *adapter, u32 bank, u32 addr, u8 * buf, u32 len)
+static void flex_sram_read(struct adapter *adapter, u32 bank, u32 addr, u8 *buf, u32 len)
 {
-       u32 i, command, value, retries;
+       int i, retries;
+       u32 command, value;
 
        for (i = 0; i < len; i++) {
                command = bank | addr | 0x04008000;
 
                retries = 10000;
 
-               while (((ReadRegDW(adapter, 0x700) & 0x80000000) != 0) && (retries > 0)) {
+               while (((read_reg_dw(adapter, 0x700) & 0x80000000) != 0) && (retries > 0)) {
                        mdelay(1);
                        retries--;
                };
@@ -470,11 +479,11 @@ static void FlexSramRead(struct adapter *adapter, u32 bank, u32 addr, u8 * buf,
                if (retries == 0)
                        printk("%s: SRAM timeout\n", __FUNCTION__);
 
-               WriteRegDW(adapter, 0x700, command);
+               write_reg_dw(adapter, 0x700, command);
 
                retries = 10000;
 
-               while (((ReadRegDW(adapter, 0x700) & 0x80000000) != 0) && (retries > 0)) {
+               while (((read_reg_dw(adapter, 0x700) & 0x80000000) != 0) && (retries > 0)) {
                        mdelay(1);
                        retries--;
                };
@@ -482,7 +491,7 @@ static void FlexSramRead(struct adapter *adapter, u32 bank, u32 addr, u8 * buf,
                if (retries == 0)
                        printk("%s: SRAM timeout\n", __FUNCTION__);
 
-               value = ReadRegDW(adapter, 0x700) >> 0x10;
+               value = read_reg_dw(adapter, 0x700) >> 0x10;
 
                *buf = (value & 0xff);
 
@@ -491,47 +500,47 @@ static void FlexSramRead(struct adapter *adapter, u32 bank, u32 addr, u8 * buf,
        }
 }
 
-static void SRAM_writeChunk(struct adapter *adapter, u32 addr, u8 * buf, u16 len)
+static void sram_writeChunk(struct adapter *adapter, u32 addr, u8 *buf, u16 len)
 {
        u32 bank;
 
        bank = 0;
 
-       if (adapter->dwSramType == 0x20000) {
-               bank = (addr & 0x18000) << 0x0D;
+       if (adapter->dw_sram_type == 0x20000) {
+               bank = (addr & 0x18000) << 0x0d;
        }
 
-       if (adapter->dwSramType == 0x00000) {
-               if ((addr >> 0x0F) == 0)
+       if (adapter->dw_sram_type == 0x00000) {
+               if ((addr >> 0x0f) == 0)
                        bank = 0x20000000;
                else
                        bank = 0x10000000;
        }
 
-       FlexSramWrite(adapter, bank, addr & 0x7FFF, buf, len);
+       flex_sram_write(adapter, bank, addr & 0x7fff, buf, len);
 }
 
-static void SRAM_readChunk(struct adapter *adapter, u32 addr, u8 * buf, u16 len)
+static void sram_readChunk(struct adapter *adapter, u32 addr, u8 *buf, u16 len)
 {
        u32 bank;
 
        bank = 0;
 
-       if (adapter->dwSramType == 0x20000) {
-               bank = (addr & 0x18000) << 0x0D;
+       if (adapter->dw_sram_type == 0x20000) {
+               bank = (addr & 0x18000) << 0x0d;
        }
 
-       if (adapter->dwSramType == 0x00000) {
-               if ((addr >> 0x0F) == 0)
+       if (adapter->dw_sram_type == 0x00000) {
+               if ((addr >> 0x0f) == 0)
                        bank = 0x20000000;
                else
                        bank = 0x10000000;
        }
 
-       FlexSramRead(adapter, bank, addr & 0x7FFF, buf, len);
+       flex_sram_read(adapter, bank, addr & 0x7fff, buf, len);
 }
 
-static void SRAM_read(struct adapter *adapter, u32 addr, u8 * buf, u32 len)
+static void sram_read(struct adapter *adapter, u32 addr, u8 *buf, u32 len)
 {
        u32 length;
 
@@ -541,11 +550,11 @@ static void SRAM_read(struct adapter *adapter, u32 addr, u8 * buf, u32 len)
                // check if the address range belongs to the same 
                // 32K memory chip. If not, the data is read from 
                // one chip at a time.
-               if ((addr >> 0x0F) != ((addr + len - 1) >> 0x0F)) {
-                       length = (((addr >> 0x0F) + 1) << 0x0F) - addr;
+               if ((addr >> 0x0f) != ((addr + len - 1) >> 0x0f)) {
+                       length = (((addr >> 0x0f) + 1) << 0x0f) - addr;
                }
 
-               SRAM_readChunk(adapter, addr, buf, length);
+               sram_readChunk(adapter, addr, buf, length);
 
                addr = addr + length;
                buf = buf + length;
@@ -553,7 +562,7 @@ static void SRAM_read(struct adapter *adapter, u32 addr, u8 * buf, u32 len)
        }
 }
 
-static void SRAM_write(struct adapter *adapter, u32 addr, u8 * buf, u32 len)
+static void sram_write(struct adapter *adapter, u32 addr, u8 *buf, u32 len)
 {
        u32 length;
 
@@ -563,11 +572,11 @@ static void SRAM_write(struct adapter *adapter, u32 addr, u8 * buf, u32 len)
                // check if the address range belongs to the same 
                // 32K memory chip. If not, the data is written to
                // one chip at a time.
-               if ((addr >> 0x0F) != ((addr + len - 1) >> 0x0F)) {
-                       length = (((addr >> 0x0F) + 1) << 0x0F) - addr;
+               if ((addr >> 0x0f) != ((addr + len - 1) >> 0x0f)) {
+                       length = (((addr >> 0x0f) + 1) << 0x0f) - addr;
                }
 
-               SRAM_writeChunk(adapter, addr, buf, length);
+               sram_writeChunk(adapter, addr, buf, length);
 
                addr = addr + length;
                buf = buf + length;
@@ -575,92 +584,92 @@ static void SRAM_write(struct adapter *adapter, u32 addr, u8 * buf, u32 len)
        }
 }
 
-static void SRAM_setSize(struct adapter *adapter, u32 mask)
+static void sram_set_size(struct adapter *adapter, u32 mask)
 {
-       WriteRegDW(adapter, 0x71C, (mask | (~0x30000 & ReadRegDW(adapter, 0x71C))));
+       write_reg_dw(adapter, 0x71c, (mask | (~0x30000 & read_reg_dw(adapter, 0x71c))));
 }
 
-static void SRAM_init(struct adapter *adapter)
+static void sram_init(struct adapter *adapter)
 {
        u32 tmp;
 
-       tmp = ReadRegDW(adapter, 0x71C);
+       tmp = read_reg_dw(adapter, 0x71c);
 
-       WriteRegDW(adapter, 0x71C, 1);
+       write_reg_dw(adapter, 0x71c, 1);
 
-       if (ReadRegDW(adapter, 0x71C) != 0) {
-               WriteRegDW(adapter, 0x71C, tmp);
+       if (read_reg_dw(adapter, 0x71c) != 0) {
+               write_reg_dw(adapter, 0x71c, tmp);
 
-               adapter->dwSramType = tmp & 0x30000;
+               adapter->dw_sram_type = tmp & 0x30000;
 
-               dprintk("%s: dwSramType = %x\n", __FUNCTION__, adapter->dwSramType);
+               ddprintk("%s: dw_sram_type = %x\n", __FUNCTION__, adapter->dw_sram_type);
 
        } else {
 
-               adapter->dwSramType = 0x10000;
+               adapter->dw_sram_type = 0x10000;
 
-               dprintk("%s: dwSramType = %x\n", __FUNCTION__, adapter->dwSramType);
+               ddprintk("%s: dw_sram_type = %x\n", __FUNCTION__, adapter->dw_sram_type);
        }
 
        /* return value is never used? */
-/*     return adapter->dwSramType; */
+/*     return adapter->dw_sram_type; */
 }
 
-static int SRAM_testLocation(struct adapter *adapter, u32 mask, u32 addr)
+static int sram_test_location(struct adapter *adapter, u32 mask, u32 addr)
 {
        u8 tmp1, tmp2;
 
        dprintk("%s: mask = %x, addr = %x\n", __FUNCTION__, mask, addr);
 
-       SRAM_setSize(adapter, mask);
-       SRAM_init(adapter);
+       sram_set_size(adapter, mask);
+       sram_init(adapter);
 
-       tmp2 = 0xA5;
-       tmp1 = 0x4F;
+       tmp2 = 0xa5;
+       tmp1 = 0x4f;
 
-       SRAM_write(adapter, addr, &tmp2, 1);
-       SRAM_write(adapter, addr + 4, &tmp1, 1);
+       sram_write(adapter, addr, &tmp2, 1);
+       sram_write(adapter, addr + 4, &tmp1, 1);
 
        tmp2 = 0;
 
        mdelay(20);
 
-       SRAM_read(adapter, addr, &tmp2, 1);
-       SRAM_read(adapter, addr, &tmp2, 1);
+       sram_read(adapter, addr, &tmp2, 1);
+       sram_read(adapter, addr, &tmp2, 1);
 
-       dprintk("%s: wrote 0xA5, read 0x%2x\n", __FUNCTION__, tmp2);
+       dprintk("%s: wrote 0xa5, read 0x%2x\n", __FUNCTION__, tmp2);
 
-       if (tmp2 != 0xA5)
+       if (tmp2 != 0xa5)
                return 0;
 
-       tmp2 = 0x5A;
-       tmp1 = 0xF4;
+       tmp2 = 0x5a;
+       tmp1 = 0xf4;
 
-       SRAM_write(adapter, addr, &tmp2, 1);
-       SRAM_write(adapter, addr + 4, &tmp1, 1);
+       sram_write(adapter, addr, &tmp2, 1);
+       sram_write(adapter, addr + 4, &tmp1, 1);
 
        tmp2 = 0;
 
        mdelay(20);
 
-       SRAM_read(adapter, addr, &tmp2, 1);
-       SRAM_read(adapter, addr, &tmp2, 1);
+       sram_read(adapter, addr, &tmp2, 1);
+       sram_read(adapter, addr, &tmp2, 1);
 
-       dprintk("%s: wrote 0x5A, read 0x%2x\n", __FUNCTION__, tmp2);
+       dprintk("%s: wrote 0x5a, read 0x%2x\n", __FUNCTION__, tmp2);
 
-       if (tmp2 != 0x5A)
+       if (tmp2 != 0x5a)
                return 0;
 
        return 1;
 }
 
-static u32 SRAM_length(struct adapter * adapter)
+static u32 sram_length(struct adapter *adapter)
 {
-       if (adapter->dwSramType == 0x10000)
+       if (adapter->dw_sram_type == 0x10000)
                return 32768;   //  32K
-       if (adapter->dwSramType == 0x00000)
+       if (adapter->dw_sram_type == 0x00000)
                return 65536;   //  64K        
-       if (adapter->dwSramType == 0x20000)
+       if (adapter->dw_sram_type == 0x20000)
                return 131072;  // 128K
 
        return 32768;           // 32K
@@ -674,103 +683,104 @@ static u32 SRAM_length(struct adapter * adapter)
    FlexCop works only with one bank at a time. The bank is selected
    by bits 28-29 of the 0x700 register.
   
-   bank 0 covers addresses 0x00000-0x07FFF
-   bank 1 covers addresses 0x08000-0x0FFFF
-   bank 2 covers addresses 0x10000-0x17FFF
-   bank 3 covers addresses 0x18000-0x1FFFF
+   bank 0 covers addresses 0x00000-0x07fff
+   bank 1 covers addresses 0x08000-0x0ffff
+   bank 2 covers addresses 0x10000-0x17fff
+   bank 3 covers addresses 0x18000-0x1ffff
 */
-static int SramDetectForFlex2(struct adapter *adapter)
+static int sram_detect_for_flex2(struct adapter *adapter)
 {
        u32 tmp, tmp2, tmp3;
 
        dprintk("%s:\n", __FUNCTION__);
 
-       tmp = ReadRegDW(adapter, 0x208);
-       WriteRegDW(adapter, 0x208, 0);
+       tmp = read_reg_dw(adapter, 0x208);
+       write_reg_dw(adapter, 0x208, 0);
 
-       tmp2 = ReadRegDW(adapter, 0x71C);
+       tmp2 = read_reg_dw(adapter, 0x71c);
 
        dprintk("%s: tmp2 = %x\n", __FUNCTION__, tmp2);
 
-       WriteRegDW(adapter, 0x71C, 1);
+       write_reg_dw(adapter, 0x71c, 1);
 
-       tmp3 = ReadRegDW(adapter, 0x71C);
+       tmp3 = read_reg_dw(adapter, 0x71c);
 
        dprintk("%s: tmp3 = %x\n", __FUNCTION__, tmp3);
 
-       WriteRegDW(adapter, 0x71C, tmp2);
+       write_reg_dw(adapter, 0x71c, tmp2);
 
        // check for internal SRAM ???
        tmp3--;
        if (tmp3 != 0) {
-               SRAM_setSize(adapter, 0x10000);
-               SRAM_init(adapter);
-               WriteRegDW(adapter, 0x208, tmp);
+               sram_set_size(adapter, 0x10000);
+               sram_init(adapter);
+               write_reg_dw(adapter, 0x208, tmp);
 
                dprintk("%s: sram size = 32K\n", __FUNCTION__);
 
                return 32;
        }
 
-       if (SRAM_testLocation(adapter, 0x20000, 0x18000) != 0) {
-               SRAM_setSize(adapter, 0x20000);
-               SRAM_init(adapter);
-               WriteRegDW(adapter, 0x208, tmp);
+       if (sram_test_location(adapter, 0x20000, 0x18000) != 0) {
+               sram_set_size(adapter, 0x20000);
+               sram_init(adapter);
+               write_reg_dw(adapter, 0x208, tmp);
 
                dprintk("%s: sram size = 128K\n", __FUNCTION__);
 
                return 128;
        }
 
-       if (SRAM_testLocation(adapter, 0x00000, 0x10000) != 0) {
-               SRAM_setSize(adapter, 0x00000);
-               SRAM_init(adapter);
-               WriteRegDW(adapter, 0x208, tmp);
+       if (sram_test_location(adapter, 0x00000, 0x10000) != 0) {
+               sram_set_size(adapter, 0x00000);
+               sram_init(adapter);
+               write_reg_dw(adapter, 0x208, tmp);
 
                dprintk("%s: sram size = 64K\n", __FUNCTION__);
 
                return 64;
        }
 
-       if (SRAM_testLocation(adapter, 0x10000, 0x00000) != 0) {
-               SRAM_setSize(adapter, 0x10000);
-               SRAM_init(adapter);
-               WriteRegDW(adapter, 0x208, tmp);
+       if (sram_test_location(adapter, 0x10000, 0x00000) != 0) {
+               sram_set_size(adapter, 0x10000);
+               sram_init(adapter);
+               write_reg_dw(adapter, 0x208, tmp);
 
                dprintk("%s: sram size = 32K\n", __FUNCTION__);
 
                return 32;
        }
 
-       SRAM_setSize(adapter, 0x10000);
-       SRAM_init(adapter);
-       WriteRegDW(adapter, 0x208, tmp);
+       sram_set_size(adapter, 0x10000);
+       sram_init(adapter);
+       write_reg_dw(adapter, 0x208, tmp);
 
        dprintk("%s: SRAM detection failed. Set to 32K \n", __FUNCTION__);
 
        return 0;
 }
 
-static void SLL_detectSramSize(struct adapter *adapter)
+static void sll_detect_sram_size(struct adapter *adapter)
 {
-       SramDetectForFlex2(adapter);
+       sram_detect_for_flex2(adapter);
 }
+
 /* EEPROM (Skystar2 has one "24LC08B" chip on board) */
 /*
-static int EEPROM_write(struct adapter *adapter, u16 addr, u8 * buf, u16 len)
+static int eeprom_write(struct adapter *adapter, u16 addr, u8 *buf, u16 len)
 {
-       return FLEXI2C_write(adapter, 0x20000000, 0x50, addr, buf, len);
+       return flex_i2c_write(adapter, 0x20000000, 0x50, addr, buf, len);
 }
 */
 
-static int EEPROM_read(struct adapter *adapter, u16 addr, u8 * buf, u16 len)
+static int eeprom_read(struct adapter *adapter, u16 addr, u8 *buf, u16 len)
 {
-       return FLEXI2C_read(adapter, 0x20000000, 0x50, addr, buf, len);
+       return flex_i2c_read(adapter, 0x20000000, 0x50, addr, buf, len);
 }
 
-u8 calc_LRC(u8 * buf, u32 len)
+u8 calc_lrc(u8 *buf, int len)
 {
-       u32 i;
+       int i;
        u8 sum;
 
        sum = 0;
@@ -781,13 +791,13 @@ u8 calc_LRC(u8 * buf, u32 len)
        return sum;
 }
 
-static int EEPROM_LRC_read(struct adapter *adapter, u32 addr, u32 len, u8 * buf, u32 retries)
+static int eeprom_lrc_read(struct adapter *adapter, u32 addr, u32 len, u8 *buf, int retries)
 {
        int i;
 
        for (i = 0; i < retries; i++) {
-               if (EEPROM_read(adapter, addr, buf, len) == len) {
-                       if (calc_LRC(buf, len - 1) == buf[len - 1])
+               if (eeprom_read(adapter, addr, buf, len) == len) {
+                       if (calc_lrc(buf, len - 1) == buf[len - 1])
                                return 1;
                }
        }
@@ -796,13 +806,13 @@ static int EEPROM_LRC_read(struct adapter *adapter, u32 addr, u32 len, u8 * buf,
 }
 
 /*
-static int EEPROM_LRC_write(struct adapter *adapter, u32 addr, u32 len, u8 * wbuf, u8 * rbuf, u32 retries)
+static int eeprom_lrc_write(struct adapter *adapter, u32 addr, u32 len, u8 *wbuf, u8 *rbuf, int retries)
 {
        int i;
 
        for (i = 0; i < retries; i++) {
-               if (EEPROM_write(adapter, addr, wbuf, len) == len) {
-                       if (EEPROM_LRC_read(adapter, addr, len, rbuf, retries) == 1)
+               if (eeprom_write(adapter, addr, wbuf, len) == len) {
+                       if (eeprom_lrc_read(adapter, addr, len, rbuf, retries) == 1)
                                return 1;
                }
        }
@@ -811,33 +821,11 @@ static int EEPROM_LRC_write(struct adapter *adapter, u32 addr, u32 len, u8 * wbu
 }
 */
 
-/* These functions could be called from the initialization routine 
-   to unlock SkyStar2 cards, locked by "Europe On Line".
-        
-   in cards from "Europe On Line" the key is:
-
-       u8 key[20] = {
-           0xB2, 0x01, 0x00, 0x00,
-           0x00, 0x00, 0x00, 0x00,
-           0x00, 0x00, 0x00, 0x00,
-           0x00, 0x00, 0x00, 0x00,
-       };
-
-       LRC = 0xB3;
 
-  in unlocked cards the key is:
+/* These functions could be used to unlock SkyStar2 cards. */
 
-       u8 key[20] = {
-           0xB2, 0x00, 0x00, 0x00,
-           0x00, 0x00, 0x00, 0x00,
-           0x00, 0x00, 0x00, 0x00,
-           0x00, 0x00, 0x00, 0x00,
-       };
-
-      LRC = 0xB2;
-*/
 /*
-static int EEPROM_writeKey(struct adapter *adapter, u8 * key, u32 len)
+static int eeprom_writeKey(struct adapter *adapter, u8 *key, u32 len)
 {
        u8 rbuf[20];
        u8 wbuf[20];
@@ -850,37 +838,38 @@ static int EEPROM_writeKey(struct adapter *adapter, u8 * key, u32 len)
        wbuf[16] = 0;
        wbuf[17] = 0;
        wbuf[18] = 0;
-       wbuf[19] = calc_LRC(wbuf, 19);
+       wbuf[19] = calc_lrc(wbuf, 19);
 
-       return EEPROM_LRC_write(adapter, 0x3E4, 20, wbuf, rbuf, 4);
+       return eeprom_lrc_write(adapter, 0x3e4, 20, wbuf, rbuf, 4);
 }
-*/
-static int EEPROM_readKey(struct adapter *adapter, u8 * key, u32 len)
+
+static int eeprom_readKey(struct adapter *adapter, u8 *key, u32 len)
 {
        u8 buf[20];
 
        if (len != 16)
                return 0;
 
-       if (EEPROM_LRC_read(adapter, 0x3E4, 20, buf, 4) == 0)
+       if (eeprom_lrc_read(adapter, 0x3e4, 20, buf, 4) == 0)
                return 0;
 
        memcpy(key, buf, len);
 
        return 1;
 }
+*/
 
-static int EEPROM_getMacAddr(struct adapter *adapter, char type, u8 * mac)
+static int eeprom_get_mac_addr(struct adapter *adapter, char type, u8 *mac)
 {
        u8 tmp[8];
 
-       if (EEPROM_LRC_read(adapter, 0x3F8, 8, tmp, 4) != 0) {
+       if (eeprom_lrc_read(adapter, 0x3f8, 8, tmp, 4) != 0) {
                if (type != 0) {
                        mac[0] = tmp[0];
                        mac[1] = tmp[1];
                        mac[2] = tmp[2];
-                       mac[3] = 0xFE;
-                       mac[4] = 0xFF;
+                       mac[3] = 0xfe;
+                       mac[4] = 0xff;
                        mac[5] = tmp[3];
                        mac[6] = tmp[4];
                        mac[7] = tmp[5];
@@ -912,7 +901,7 @@ static int EEPROM_getMacAddr(struct adapter *adapter, char type, u8 * mac)
 }
 
 /*
-static char EEPROM_setMacAddr(struct adapter *adapter, char type, u8 * mac)
+static char eeprom_set_mac_addr(struct adapter *adapter, char type, u8 *mac)
 {
        u8 tmp[8];
 
@@ -935,9 +924,9 @@ static char EEPROM_setMacAddr(struct adapter *adapter, char type, u8 * mac)
        }
 
        tmp[6] = 0;
-       tmp[7] = calc_LRC(tmp, 7);
+       tmp[7] = calc_lrc(tmp, 7);
 
-       if (EEPROM_write(adapter, 0x3F8, tmp, 8) == 8)
+       if (eeprom_write(adapter, 0x3f8, tmp, 8) == 8)
                return 1;
 
        return 0;
@@ -945,529 +934,319 @@ static char EEPROM_setMacAddr(struct adapter *adapter, char type, u8 * mac)
 */
 
 /* PID filter */
-static void FilterEnableStream1Filter(struct adapter *adapter, u32 op)
-{
-       dprintk("%s: op=%x\n", __FUNCTION__, op);
-
-       if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00000001, 0);
-
-       } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00000001);
-       }
-}
-
-static void FilterEnableStream2Filter(struct adapter *adapter, u32 op)
-{
-       dprintk("%s: op=%x\n", __FUNCTION__, op);
-
-       if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00000002, 0);
 
+/* every flexcop has 6 "lower" hw PID filters     */
+/* these are enabled by setting bits 0-5 of 0x208 */
+/* for the 32 additional filters we have to select one */
+/* of them through 0x310 and modify through 0x314 */
+/* op: 0=disable, 1=enable */
+static void filter_enable_hw_filter(struct adapter *adapter, int id, u8 op)
+{
+       dprintk("%s: id=%d op=%d\n", __FUNCTION__, id, op);
+       if (id <= 5) {
+               u32 mask = (0x00000001 << id);
+               write_reg_bitfield(adapter, 0x208, mask, op ? mask : 0);
        } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00000002);
-       }
-}
-
-static void FilterEnablePcrFilter(struct adapter *adapter, u32 op)
-{
-       dprintk("%s: op=%x\n", __FUNCTION__, op);
-
-       if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00000004, 0);
-
-       } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00000004);
-       }
-}
-
-static void FilterEnablePmtFilter(struct adapter *adapter, u32 op)
-{
-       dprintk("%s: op=%x\n", __FUNCTION__, op);
-
-       if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00000008, 0);
-
-       } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00000008);
+               /* select */
+               write_reg_bitfield(adapter, 0x310, 0x1f, (id - 6) & 0x1f);
+               /* modify */
+               write_reg_bitfield(adapter, 0x314, 0x00006000, op ? 0x00004000 : 0);
        }
 }
 
-static void FilterEnableEmmFilter(struct adapter *adapter, u32 op)
+/* this sets the PID that should pass the specified filter */
+static void pid_set_hw_pid(struct adapter *adapter, int id, u16 pid)
 {
-       dprintk("%s: op=%x\n", __FUNCTION__, op);
-
-       if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00000010, 0);
-
+       dprintk("%s: id=%d  pid=%d\n", __FUNCTION__, id, pid);
+       if (id <= 5) {
+               u32 adr = 0x300 + ((id & 6) << 1);
+               int shift = (id & 1) ? 16 : 0;
+               dprintk("%s: id=%d  addr=%x %c  pid=%d\n", __FUNCTION__, id, adr, (id & 1) ? 'h' : 'l', pid);
+               write_reg_bitfield(adapter, adr, (0x7fff) << shift, (pid & 0x1fff) << shift);
        } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00000010);
+               /* select */
+               write_reg_bitfield(adapter, 0x310, 0x1f, (id - 6) & 0x1f);
+               /* modify */
+               write_reg_bitfield(adapter, 0x314, 0x1fff, pid & 0x1fff);
        }
 }
 
-static void FilterEnableEcmFilter(struct adapter *adapter, u32 op)
-{
-       dprintk("%s: op=%x\n", __FUNCTION__, op);
-
-       if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00000020, 0);
-
-       } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00000020);
-       }
-}
 
 /*
-static void FilterEnableNullFilter(struct adapter *adapter, u32 op)
+static void filter_enable_null_filter(struct adapter *adapter, u32 op)
 {
        dprintk("%s: op=%x\n", __FUNCTION__, op);
 
-       if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00000040, 0);
-
-       } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00000040);
-       }
+       write_reg_bitfield(adapter, 0x208, 0x00000040, op?0x00000040:0);
 }
 */
 
-static void FilterEnableMaskFilter(struct adapter *adapter, u32 op)
+static void filter_enable_mask_filter(struct adapter *adapter, u32 op)
 {
        dprintk("%s: op=%x\n", __FUNCTION__, op);
 
-       if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00000080, 0);
-
-       } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00000080);
-       }
+       write_reg_bitfield(adapter, 0x208, 0x00000080, op ? 0x00000080 : 0);
 }
 
 
-static void CtrlEnableMAC(struct adapter *adapter, u32 op)
+static void ctrl_enable_mac(struct adapter *adapter, u32 op)
 {
-       if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00004000, 0);
-
-       } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00004000);
-       }
+       write_reg_bitfield(adapter, 0x208, 0x00004000, op ? 0x00004000 : 0);
 }
 
-static int CASetMacDstAddrFilter(struct adapter *adapter, u8 * mac)
+static int ca_set_mac_dst_addr_filter(struct adapter *adapter, u8 *mac)
 {
        u32 tmp1, tmp2;
 
        tmp1 = (mac[3] << 0x18) | (mac[2] << 0x10) | (mac[1] << 0x08) | mac[0];
        tmp2 = (mac[5] << 0x08) | mac[4];
 
-       WriteRegDW(adapter, 0x418, tmp1);
-       WriteRegDW(adapter, 0x41C, tmp2);
+       write_reg_dw(adapter, 0x418, tmp1);
+       write_reg_dw(adapter, 0x41c, tmp2);
 
        return 0;
 }
 
 /*
-static void SetIgnoreMACFilter(struct adapter *adapter, u8 op)
+static void set_ignore_mac_filter(struct adapter *adapter, u8 op)
 {
        if (op != 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00004000, 0);
-
+               write_reg_bitfield(adapter, 0x208, 0x00004000, 0);
                adapter->mac_filter = 1;
-
        } else {
-
                if (adapter->mac_filter != 0) {
                        adapter->mac_filter = 0;
-
-                       WriteRegOp(adapter, 0x208, 1, 0, 0x00004000);
+                       write_reg_bitfield(adapter, 0x208, 0x00004000, 0x00004000);
                }
        }
 }
 */
 
 /*
-static void CheckNullFilterEnable(struct adapter *adapter)
+static void check_null_filter_enable(struct adapter *adapter)
 {
-       FilterEnableNullFilter(adapter, 1);
-       FilterEnableMaskFilter(adapter, 1);
+       filter_enable_null_filter(adapter, 1);
+       filter_enable_mask_filter(adapter, 1);
 }
 */
 
-static void InitPIDsInfo(struct adapter *adapter)
-{
-       int i;
-
-       for (i = 0; i < 0x27; i++)
-               adapter->pids[i] = 0x1FFF;
-}
-
-static int CheckPID(struct adapter *adapter, u16 pid)
-{
-       u32 i;
-
-       if (pid == 0x1FFF)
-               return 0;
-
-       for (i = 0; i < 0x27; i++) {
-               if (adapter->pids[i] == pid)
-                       return 1;
-       }
-
-       return 0;
-}
-
-static void PidSetGroupPID(struct adapter * adapter, u32 pid)
-{
-       u32 value;
-
-       dprintk("%s: pid=%x\n", __FUNCTION__, pid);
-
-       value = (pid & 0x3FFF) | (ReadRegDW(adapter, 0x30C) & 0xFFFF0000);
-
-       WriteRegDW(adapter, 0x30C, value);
-
-       /* return value is never used? */
-/*     return value; */
-}
-
-static void PidSetGroupMASK(struct adapter * adapter, u32 pid)
+static void pid_set_group_pid(struct adapter *adapter, u16 pid)
 {
        u32 value;
 
        dprintk("%s: pid=%x\n", __FUNCTION__, pid);
-
-       value = ((pid & 0x3FFF) << 0x10) | (ReadRegDW(adapter, 0x30C) & 0xFFFF);
-
-       WriteRegDW(adapter, 0x30C, value);
-
-       /* return value is never used? */
-/*     return value; */
+       value = (pid & 0x3fff) | (read_reg_dw(adapter, 0x30c) & 0xffff0000);
+       write_reg_dw(adapter, 0x30c, value);
 }
 
-static void PidSetStream1PID(struct adapter * adapter, u32 pid)
+static void pid_set_group_mask(struct adapter *adapter, u16 pid)
 {
        u32 value;
 
        dprintk("%s: pid=%x\n", __FUNCTION__, pid);
-
-       value = (pid & 0x3FFF) | (ReadRegDW(adapter, 0x300) & 0xFFFFC000);
-
-       WriteRegDW(adapter, 0x300, value);
-
-       /* return value is never used? */
-/*     return value; */
+       value = ((pid & 0x3fff) << 0x10) | (read_reg_dw(adapter, 0x30c) & 0xffff);
+       write_reg_dw(adapter, 0x30c, value);
 }
 
-static void PidSetStream2PID(struct adapter * adapter, u32 pid)
-{
-       u32 value;
-
-       dprintk("%s: pid=%x\n", __FUNCTION__, pid);
-
-       value = ((pid & 0x3FFF) << 0x10) | (ReadRegDW(adapter, 0x300) & 0xFFFF);
-
-       WriteRegDW(adapter, 0x300, value);
-
-       /* return value is never used? */
-/*     return value; */
-}
-
-static void PidSetPcrPID(struct adapter * adapter, u32 pid)
+/*
+static int pid_get_group_pid(struct adapter *adapter)
 {
-       u32 value;
-
-       dprintk("%s: pid=%x\n", __FUNCTION__, pid);
-
-       value = (pid & 0x3FFF) | (ReadRegDW(adapter, 0x304) & 0xFFFFC000);
-
-       WriteRegDW(adapter, 0x304, value);
-
-       /* return value is never used? */
-/*     return value; */
+       return read_reg_dw(adapter, 0x30c) & 0x00001fff;
 }
 
-static void PidSetPmtPID(struct adapter * adapter, u32 pid)
+static int pid_get_group_mask(struct adapter *adapter)
 {
-       u32 value;
-
-       dprintk("%s: pid=%x\n", __FUNCTION__, pid);
-
-       value = ((pid & 0x3FFF) << 0x10) | (ReadRegDW(adapter, 0x304) & 0x3FFF);
-
-       WriteRegDW(adapter, 0x304, value);
-
-       /* return value is never used? */
-/*     return value; */
-}
-
-static void PidSetEmmPID(struct adapter * adapter, u32 pid)
-{
-       u32 value;
-
-       dprintk("%s: pid=%x\n", __FUNCTION__, pid);
-
-       value = (pid & 0xFFFF) | (ReadRegDW(adapter, 0x308) & 0xFFFF0000);
-
-       WriteRegDW(adapter, 0x308, value);
-
-       /* return value is never used? */
-/*     return value; */
+       return (read_reg_dw(adapter, 0x30c) >> 0x10)& 0x00001fff;
 }
+*/
 
-static void PidSetEcmPID(struct adapter * adapter, u32 pid)
+/*
+static void reset_hardware_pid_filter(struct adapter *adapter)
 {
-       u32 value;
-
-       dprintk("%s: pid=%x\n", __FUNCTION__, pid);
+       pid_set_stream1_pid(adapter, 0x1fff);
 
-       value = (pid << 0x10) | (ReadRegDW(adapter, 0x308) & 0xFFFF);
+       pid_set_stream2_pid(adapter, 0x1fff);
+       filter_enable_stream2_filter(adapter, 0);
 
-       WriteRegDW(adapter, 0x308, value);
+       pid_set_pcr_pid(adapter, 0x1fff);
+       filter_enable_pcr_filter(adapter, 0);
 
-       /* return value is never used? */
-/*     return value; */
-}
+       pid_set_pmt_pid(adapter, 0x1fff);
+       filter_enable_pmt_filter(adapter, 0);
 
-static int PidGetStream1PID(struct adapter * adapter)
-{
-       return ReadRegDW(adapter, 0x300) & 0x00001FFF;
-}
+       pid_set_ecm_pid(adapter, 0x1fff);
+       filter_enable_ecm_filter(adapter, 0);
 
-static int PidGetStream2PID(struct adapter * adapter)
-{
-       return (ReadRegDW(adapter, 0x300) >> 0x10)& 0x00001FFF;
+       pid_set_emm_pid(adapter, 0x1fff);
+       filter_enable_emm_filter(adapter, 0);
 }
+*/
 
-static int PidGetPcrPID(struct adapter * adapter)
+static void init_pids(struct adapter *adapter)
 {
-       return ReadRegDW(adapter, 0x304) & 0x00001FFF;
-}
+       int i;
 
-static int PidGetPmtPID(struct adapter * adapter)
-{
-       return (ReadRegDW(adapter, 0x304) >> 0x10)& 0x00001FFF;
+       adapter->pid_count = 0;
+       adapter->whole_bandwidth_count = 0;
+       for (i = 0; i < adapter->useable_hw_filters; i++) {
+               dprintk("%s: setting filter %d to 0x1fff\n", __FUNCTION__, i);
+               adapter->hw_pids[i] = 0x1fff;
+               pid_set_hw_pid(adapter, i, 0x1fff);
 }
 
-static int PidGetEmmPID(struct adapter * adapter)
-{
-       return ReadRegDW(adapter, 0x308) & 0x00001FFF;
+       pid_set_group_pid(adapter, 0);
+       pid_set_group_mask(adapter, 0x1fe0);
 }
 
-static int PidGetEcmPID(struct adapter * adapter)
+static void open_whole_bandwidth(struct adapter *adapter)
 {
-       return (ReadRegDW(adapter, 0x308) >> 0x10)& 0x00001FFF;
+       dprintk("%s:\n", __FUNCTION__);
+       pid_set_group_pid(adapter, 0);
+       pid_set_group_mask(adapter, 0);
+/*
+       filter_enable_mask_filter(adapter, 1);
+*/
 }
 
-static int PidGetGroupPID(struct adapter * adapter)
+static void close_whole_bandwidth(struct adapter *adapter)
 {
-       return ReadRegDW(adapter, 0x30C) & 0x00001FFF;
+       dprintk("%s:\n", __FUNCTION__);
+       pid_set_group_pid(adapter, 0);
+       pid_set_group_mask(adapter, 0x1fe0);
+/*
+       filter_enable_mask_filter(adapter, 1);
+*/
 }
 
-static int PidGetGroupMASK(struct adapter * adapter)
+static void whole_bandwidth_inc(struct adapter *adapter)
 {
-       return (ReadRegDW(adapter, 0x30C) >> 0x10)& 0x00001FFF;
+       if (adapter->whole_bandwidth_count++ == 0)
+               open_whole_bandwidth(adapter);
 }
 
-/*
-static void ResetHardwarePIDFilter(struct adapter *adapter)
+static void whole_bandwidth_dec(struct adapter *adapter)
 {
-       PidSetStream1PID(adapter, 0x1FFF);
-
-       PidSetStream2PID(adapter, 0x1FFF);
-       FilterEnableStream2Filter(adapter, 0);
-
-       PidSetPcrPID(adapter, 0x1FFF);
-       FilterEnablePcrFilter(adapter, 0);
-
-       PidSetPmtPID(adapter, 0x1FFF);
-       FilterEnablePmtFilter(adapter, 0);
-
-       PidSetEcmPID(adapter, 0x1FFF);
-       FilterEnableEcmFilter(adapter, 0);
-
-       PidSetEmmPID(adapter, 0x1FFF);
-       FilterEnableEmmFilter(adapter, 0);
+       if (--adapter->whole_bandwidth_count <= 0)
+               close_whole_bandwidth(adapter);
 }
-*/
 
-static void OpenWholeBandwidth(struct adapter *adapter)
+/* The specified PID has to be let through the
+   hw filters.
+   We try to allocate an hardware filter and open whole
+   bandwidth when allocation is impossible.
+   All pids<=0x1f pass through the group filter.
+   Returns 1 on success, -1 on error */
+static int add_hw_pid(struct adapter *adapter, u16 pid)
 {
-       PidSetGroupPID(adapter, 0);
-
-       PidSetGroupMASK(adapter, 0);
-
-       FilterEnableMaskFilter(adapter, 1);
-}
+       int i;
 
-static int AddHwPID(struct adapter *adapter, u32 pid)
-{
        dprintk("%s: pid=%d\n", __FUNCTION__, pid);
 
-       if (pid <= 0x1F)
+       if (pid <= 0x1f)
                return 1;
 
-       if ((PidGetGroupMASK(adapter) == 0) && (PidGetGroupPID(adapter) == 0))
-               return 0;
-
-       if (PidGetStream1PID(adapter) == 0x1FFF) {
-               PidSetStream1PID(adapter, pid & 0xFFFF);
-
-               FilterEnableStream1Filter(adapter, 1);
-
-               return 1;
-       }
-
-       if (PidGetStream2PID(adapter) == 0x1FFF) {
-               PidSetStream2PID(adapter, (pid & 0xFFFF));
-
-               FilterEnableStream2Filter(adapter, 1);
-
+       /* we can't use a filter for 0x2000, so no search */
+       if (pid != 0x2000) {
+               /* find an unused hardware filter */
+               for (i = 0; i < adapter->useable_hw_filters; i++) {
+                       dprintk("%s: pid=%d searching slot=%d\n", __FUNCTION__, pid, i);
+                       if (adapter->hw_pids[i] == 0x1fff) {
+                               dprintk("%s: pid=%d slot=%d\n", __FUNCTION__, pid, i);
+                               adapter->hw_pids[i] = pid;
+                               pid_set_hw_pid(adapter, i, pid);
+                               filter_enable_hw_filter(adapter, i, 1);
                return 1;
        }
-
-       if (PidGetPcrPID(adapter) == 0x1FFF) {
-               PidSetPcrPID(adapter, (pid & 0xFFFF));
-
-               FilterEnablePcrFilter(adapter, 1);
-
-               return 1;
-       }
-
-       if ((PidGetPmtPID(adapter) & 0x1FFF) == 0x1FFF) {
-               PidSetPmtPID(adapter, (pid & 0xFFFF));
-
-               FilterEnablePmtFilter(adapter, 1);
-
-               return 1;
        }
-
-       if ((PidGetEmmPID(adapter) & 0x1FFF) == 0x1FFF) {
-               PidSetEmmPID(adapter, (pid & 0xFFFF));
-
-               FilterEnableEmmFilter(adapter, 1);
-
-               return 1;
        }
-
-       if ((PidGetEcmPID(adapter) & 0x1FFF) == 0x1FFF) {
-               PidSetEcmPID(adapter, (pid & 0xFFFF));
-
-               FilterEnableEcmFilter(adapter, 1);
-
+       /* if we have not used a filter, this pid depends on whole bandwidth */
+       dprintk("%s: pid=%d whole_bandwidth\n", __FUNCTION__, pid);
+       whole_bandwidth_inc(adapter);
                return 1;
        }
 
-       return -1;
-}
-
-static int RemoveHwPID(struct adapter *adapter, u32 pid)
+/* returns -1 if the pid was not present in the filters */
+static int remove_hw_pid(struct adapter *adapter, u16 pid)
 {
-       dprintk("%s: pid=%d\n", __FUNCTION__, pid);
-
-       if (pid <= 0x1F)
-               return 1;
-
-       if (PidGetStream1PID(adapter) == pid) {
-               PidSetStream1PID(adapter, 0x1FFF);
-
-               return 1;
-       }
-
-       if (PidGetStream2PID(adapter) == pid) {
-               PidSetStream2PID(adapter, 0x1FFF);
+       int i;
 
-               FilterEnableStream2Filter(adapter, 0);
+       dprintk("%s: pid=%d\n", __FUNCTION__, pid);
 
+       if (pid <= 0x1f)
                return 1;
-       }
-
-       if (PidGetPcrPID(adapter) == pid) {
-               PidSetPcrPID(adapter, 0x1FFF);
-
-               FilterEnablePcrFilter(adapter, 0);
 
+       /* we can't use a filter for 0x2000, so no search */
+       if (pid != 0x2000) {
+               for (i = 0; i < adapter->useable_hw_filters; i++) {
+                       dprintk("%s: pid=%d searching slot=%d\n", __FUNCTION__, pid, i);
+                       if (adapter->hw_pids[i] == pid) {       // find the pid slot
+                               dprintk("%s: pid=%d slot=%d\n", __FUNCTION__, pid, i);
+                               adapter->hw_pids[i] = 0x1fff;
+                               pid_set_hw_pid(adapter, i, 0x1fff);
+                               filter_enable_hw_filter(adapter, i, 0);
                return 1;
        }
-
-       if (PidGetPmtPID(adapter) == pid) {
-               PidSetPmtPID(adapter, 0x1FFF);
-
-               FilterEnablePmtFilter(adapter, 0);
-
-               return 1;
        }
-
-       if (PidGetEmmPID(adapter) == pid) {
-               PidSetEmmPID(adapter, 0x1FFF);
-
-               FilterEnableEmmFilter(adapter, 0);
-
-               return 1;
        }
-
-       if (PidGetEcmPID(adapter) == pid) {
-               PidSetEcmPID(adapter, 0x1FFF);
-
-               FilterEnableEcmFilter(adapter, 0);
-
+       /* if we have not used a filter, this pid depended on whole bandwith */
+       dprintk("%s: pid=%d whole_bandwidth\n", __FUNCTION__, pid);
+       whole_bandwidth_dec(adapter);
                return 1;
        }
 
-       return -1;
-}
-
-static int AddPID(struct adapter *adapter, u32 pid)
+/* Adds a PID to the filters.
+   Adding a pid more than once is possible, we keep reference counts.
+   Whole stream available through pid==0x2000.
+   Returns 1 on success, -1 on error */
+static int add_pid(struct adapter *adapter, u16 pid)
 {
        int i;
 
        dprintk("%s: pid=%d\n", __FUNCTION__, pid);
 
-       if (pid > 0x1FFE)
+       if (pid > 0x1ffe && pid != 0x2000)
                return -1;
 
-       if (CheckPID(adapter, pid) == 1)
+       // check if the pid is already present
+       for (i = 0; i < adapter->pid_count; i++)
+               if (adapter->pid_list[i] == pid) {
+                       adapter->pid_rc[i]++;   // increment ref counter
                return 1;
+               }
 
-       for (i = 0; i < 0x27; i++) {
-               if (adapter->pids[i] == 0x1FFF) // find free pid filter
-               {
-                       adapter->pids[i] = pid;
-
-                       if (AddHwPID(adapter, pid) < 0)
-                               OpenWholeBandwidth(adapter);
+       if (adapter->pid_count == N_PID_SLOTS)
+               return -1;      // no more pids can be added
+       adapter->pid_list[adapter->pid_count] = pid;    // register pid
+       adapter->pid_rc[adapter->pid_count] = 1;
+       adapter->pid_count++;
+       // hardware setting
+       add_hw_pid(adapter, pid);
 
                        return 1;
                }
-       }
 
-       return -1;
-}
-
-static int RemovePID(struct adapter *adapter, u32 pid)
+/* Removes a PID from the filters. */
+static int remove_pid(struct adapter *adapter, u16 pid)
 {
-       u32 i;
+       int i;
 
        dprintk("%s: pid=%d\n", __FUNCTION__, pid);
 
-       if (pid > 0x1FFE)
+       if (pid > 0x1ffe && pid != 0x2000)
                return -1;
 
-       for (i = 0; i < 0x27; i++) {
-               if (adapter->pids[i] == pid) {
-                       adapter->pids[i] = 0x1FFF;
-
-                       RemoveHwPID(adapter, pid);
-
+       // check if the pid is present (it must be!)
+       for (i = 0; i < adapter->pid_count; i++) {
+               if (adapter->pid_list[i] == pid) {
+                       adapter->pid_rc[i]--;
+                       if (adapter->pid_rc[i] <= 0) {
+                               // remove from the list
+                               adapter->pid_count--;
+                               adapter->pid_list[i]=adapter->pid_list[adapter->pid_count];
+                               adapter->pid_rc[i] = adapter->pid_rc[adapter->pid_count];
+                               // hardware setting
+                               remove_hw_pid(adapter, pid);
+                       }
                        return 1;
                }
        }
@@ -1475,21 +1254,16 @@ static int RemovePID(struct adapter *adapter, u32 pid)
        return -1;
 }
 
+
 /* dma & irq */
-static void CtrlEnableSmc(struct adapter *adapter, u32 op)
+static void ctrl_enable_smc(struct adapter *adapter, u32 op)
 {
-       if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00000800, 0);
-
-       } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00000800);
-       }
+       write_reg_bitfield(adapter, 0x208, 0x00000800, op ? 0x00000800 : 0);
 }
 
-static void DmaEnableDisableIrq(struct adapter *adapter, u32 flag1, u32 flag2, u32 flag3)
+static void dma_enable_disable_irq(struct adapter *adapter, u32 flag1, u32 flag2, u32 flag3)
 {
-       adapter->dma_ctrl = adapter->dma_ctrl & 0x000F0000;
+       adapter->dma_ctrl = adapter->dma_ctrl & 0x000f0000;
 
        if (flag1 == 0) {
                if (flag2 == 0)
@@ -1516,16 +1290,16 @@ static void DmaEnableDisableIrq(struct adapter *adapter, u32 flag1, u32 flag2, u
        }
 }
 
-static void IrqDmaEnableDisableIrq(struct adapter * adapter, u32 op)
+static void irq_dma_enable_disable_irq(struct adapter *adapter, u32 op)
 {
        u32 value;
 
-       value = ReadRegDW(adapter, 0x208) & 0xFFF0FFFF;
+       value = read_reg_dw(adapter, 0x208) & 0xfff0ffff;
 
        if (op != 0)
-               value = value | (adapter->dma_ctrl & 0x000F0000);
+               value = value | (adapter->dma_ctrl & 0x000f0000);
 
-       WriteRegDW(adapter, 0x208, value);
+       write_reg_dw(adapter, 0x208, value);
 }
 
 /* FlexCopII has 2 dma channels. DMA1 is used to transfer TS data to
@@ -1544,7 +1318,7 @@ static void IrqDmaEnableDisableIrq(struct adapter * adapter, u32 op)
        subbuffer. The last 2 bits contain 0, when dma1 is disabled and 1,
        when dma1 is enabled.
 
-       the first 30 bits of register 0x00C contain the address of the second
+       the first 30 bits of register 0x00c contain the address of the second
        subbuffer. the last 2 bits contain 1.
 
        register 0x008 will contain the address of the subbuffer that was filled
@@ -1559,13 +1333,13 @@ static void IrqDmaEnableDisableIrq(struct adapter * adapter, u32 op)
        subbuffer.  The last 2 bits contain 0, when dma1 is disabled and 1,
        when dma1 is enabled.
 
-       the first 30 bits of register 0x01C contain the address of the second
+       the first 30 bits of register 0x01c contain the address of the second
        subbuffer. the last 2 bits contain 1.
 
        register 0x018 contains the address of the subbuffer that was filled
        with TS data, when FlexCopII generates an interrupt.
 */
-static int DmaInitDMA(struct adapter *adapter, u32 dma_channel)
+static int dma_init_dma(struct adapter *adapter, u32 dma_channel)
 {
        u32 subbuffers, subbufsize, subbuf0, subbuf1;
 
@@ -1576,37 +1350,37 @@ static int DmaInitDMA(struct adapter *adapter, u32 dma_channel)
 
                subbufsize = (((adapter->dmaq1.buffer_size / 2) / 4) << 8) | subbuffers;
 
-               subbuf0 = adapter->dmaq1.bus_addr & 0xFFFFFFFC;
+               subbuf0 = adapter->dmaq1.bus_addr & 0xfffffffc;
 
-               subbuf1 = ((adapter->dmaq1.bus_addr + adapter->dmaq1.buffer_size / 2) & 0xFFFFFFFC) | 1;
+               subbuf1 = ((adapter->dmaq1.bus_addr + adapter->dmaq1.buffer_size / 2) & 0xfffffffc) | 1;
 
                dprintk("%s: first subbuffer address = 0x%x\n", __FUNCTION__, subbuf0);
                udelay(1000);
-               WriteRegDW(adapter, 0x000, subbuf0);
+               write_reg_dw(adapter, 0x000, subbuf0);
 
                dprintk("%s: subbuffer size = 0x%x\n", __FUNCTION__, (subbufsize >> 8) * 4);
                udelay(1000);
-               WriteRegDW(adapter, 0x004, subbufsize);
+               write_reg_dw(adapter, 0x004, subbufsize);
 
                dprintk("%s: second subbuffer address = 0x%x\n", __FUNCTION__, subbuf1);
                udelay(1000);
-               WriteRegDW(adapter, 0x00C, subbuf1);
+               write_reg_dw(adapter, 0x00c, subbuf1);
 
-               dprintk("%s: counter = 0x%x\n", __FUNCTION__, adapter->dmaq1.bus_addr & 0xFFFFFFFC);
-               WriteRegDW(adapter, 0x008, adapter->dmaq1.bus_addr & 0xFFFFFFFC);
+               dprintk("%s: counter = 0x%x\n", __FUNCTION__, adapter->dmaq1.bus_addr & 0xfffffffc);
+               write_reg_dw(adapter, 0x008, adapter->dmaq1.bus_addr & 0xfffffffc);
                udelay(1000);
 
                if (subbuffers == 0)
-                       DmaEnableDisableIrq(adapter, 0, 1, 0);
+                       dma_enable_disable_irq(adapter, 0, 1, 0);
                else
-                       DmaEnableDisableIrq(adapter, 0, 1, 1);
+                       dma_enable_disable_irq(adapter, 0, 1, 1);
 
-               IrqDmaEnableDisableIrq(adapter, 1);
+               irq_dma_enable_disable_irq(adapter, 1);
 
-               SRAMSetMediaDest(adapter, 1);
-               SRAMSetNetDest(adapter, 1);
-               SRAMSetCaiDest(adapter, 2);
-               SRAMSetCaoDest(adapter, 2);
+               sram_set_media_dest(adapter, 1);
+               sram_set_net_dest(adapter, 1);
+               sram_set_cai_dest(adapter, 2);
+               sram_set_cao_dest(adapter, 2);
        }
 
        if (dma_channel == 1) {
@@ -1616,39 +1390,35 @@ static int DmaInitDMA(struct adapter *adapter, u32 dma_channel)
 
                subbufsize = (((adapter->dmaq2.buffer_size / 2) / 4) << 8) | subbuffers;
 
-               subbuf0 = adapter->dmaq2.bus_addr & 0xFFFFFFFC;
+               subbuf0 = adapter->dmaq2.bus_addr & 0xfffffffc;
 
-               subbuf1 = ((adapter->dmaq2.bus_addr + adapter->dmaq2.buffer_size / 2) & 0xFFFFFFFC) | 1;
+               subbuf1 = ((adapter->dmaq2.bus_addr + adapter->dmaq2.buffer_size / 2) & 0xfffffffc) | 1;
 
                dprintk("%s: first subbuffer address = 0x%x\n", __FUNCTION__, subbuf0);
                udelay(1000);
-               WriteRegDW(adapter, 0x010, subbuf0);
+               write_reg_dw(adapter, 0x010, subbuf0);
 
                dprintk("%s: subbuffer size = 0x%x\n", __FUNCTION__, (subbufsize >> 8) * 4);
                udelay(1000);
-               WriteRegDW(adapter, 0x014, subbufsize);
+               write_reg_dw(adapter, 0x014, subbufsize);
 
                dprintk("%s: second buffer address = 0x%x\n", __FUNCTION__, subbuf1);
                udelay(1000);
-               WriteRegDW(adapter, 0x01C, subbuf1);
+               write_reg_dw(adapter, 0x01c, subbuf1);
 
-               SRAMSetCaiDest(adapter, 2);
+               sram_set_cai_dest(adapter, 2);
        }
 
        return 0;
 }
 
-static void CtrlEnableReceiveData(struct adapter *adapter, u32 op)
+static void ctrl_enable_receive_data(struct adapter *adapter, u32 op)
 {
        if (op == 0) {
-               WriteRegOp(adapter, 0x208, 2, ~0x00008000, 0);
-
+               write_reg_bitfield(adapter, 0x208, 0x00008000, 0);
                adapter->dma_status = adapter->dma_status & ~0x00000004;
-
        } else {
-
-               WriteRegOp(adapter, 0x208, 1, 0, 0x00008000);
-
+               write_reg_bitfield(adapter, 0x208, 0x00008000, 0x00008000);
                adapter->dma_status = adapter->dma_status | 0x00000004;
        }
 }
@@ -1656,7 +1426,7 @@ static void CtrlEnableReceiveData(struct adapter *adapter, u32 op)
 /* bit 0 of dma_mask is set to 1 if dma1 channel has to be enabled/disabled
    bit 1 of dma_mask is set to 1 if dma2 channel has to be enabled/disabled
 */
-static void DmaStartStop0x2102(struct adapter *adapter, u32 dma_mask, u32 start_stop)
+static void dma_start_stop(struct adapter *adapter, u32 dma_mask, int start_stop)
 {
        u32 dma_enable, dma1_enable, dma2_enable;
 
@@ -1679,83 +1449,82 @@ static void DmaStartStop0x2102(struct adapter *adapter, u32 dma_mask, u32 start_
                }
                // enable dma1 and dma2
                if ((dma1_enable == 1) && (dma2_enable == 1)) {
-                       WriteRegDW(adapter, 0x000, adapter->dmaq1.bus_addr | 1);
-                       WriteRegDW(adapter, 0x00C, (adapter->dmaq1.bus_addr + adapter->dmaq1.buffer_size / 2) | 1);
-                       WriteRegDW(adapter, 0x010, adapter->dmaq2.bus_addr | 1);
+                       write_reg_dw(adapter, 0x000, adapter->dmaq1.bus_addr | 1);
+                       write_reg_dw(adapter, 0x00c, (adapter->dmaq1.bus_addr + adapter->dmaq1.buffer_size / 2) | 1);
+                       write_reg_dw(adapter, 0x010, adapter->dmaq2.bus_addr | 1);
 
-                       CtrlEnableReceiveData(adapter, 1);
+                       ctrl_enable_receive_data(adapter, 1);
 
                        return;
                }
                // enable dma1
                if ((dma1_enable == 1) && (dma2_enable == 0)) {
-                       WriteRegDW(adapter, 0x000, adapter->dmaq1.bus_addr | 1);
-                       WriteRegDW(adapter, 0x00C, (adapter->dmaq1.bus_addr + adapter->dmaq1.buffer_size / 2) | 1);
+                       write_reg_dw(adapter, 0x000, adapter->dmaq1.bus_addr | 1);
+                       write_reg_dw(adapter, 0x00c, (adapter->dmaq1.bus_addr + adapter->dmaq1.buffer_size / 2) | 1);
 
-                       CtrlEnableReceiveData(adapter, 1);
+                       ctrl_enable_receive_data(adapter, 1);
 
                        return;
                }
                // enable dma2
                if ((dma1_enable == 0) && (dma2_enable == 1)) {
-                       WriteRegDW(adapter, 0x010, adapter->dmaq2.bus_addr | 1);
+                       write_reg_dw(adapter, 0x010, adapter->dmaq2.bus_addr | 1);
 
-                       CtrlEnableReceiveData(adapter, 1);
+                       ctrl_enable_receive_data(adapter, 1);
 
                        return;
                }
                // start dma
                if ((dma1_enable == 0) && (dma2_enable == 0)) {
-                       CtrlEnableReceiveData(adapter, 1);
+                       ctrl_enable_receive_data(adapter, 1);
 
                        return;
                }
 
        } else {
 
-               dprintk("%s: stoping dma\n", __FUNCTION__);
+               dprintk("%s: stopping dma\n", __FUNCTION__);
 
                dma_enable = adapter->dma_status & 0x00000003;
 
                if (((dma_mask & 1) != 0) && ((adapter->dma_status & 1) != 0)) {
-                       dma_enable = dma_enable & 0xFFFFFFFE;
+                       dma_enable = dma_enable & 0xfffffffe;
                }
 
                if (((dma_mask & 2) != 0) && ((adapter->dma_status & 2) != 0)) {
-                       dma_enable = dma_enable & 0xFFFFFFFD;
+                       dma_enable = dma_enable & 0xfffffffd;
                }
                //stop dma
                if ((dma_enable == 0) && ((adapter->dma_status & 4) != 0)) {
-                       CtrlEnableReceiveData(adapter, 0);
+                       ctrl_enable_receive_data(adapter, 0);
 
                        udelay(3000);
                }
                //disable dma1
                if (((dma_mask & 1) != 0) && ((adapter->dma_status & 1) != 0) && (adapter->dmaq1.bus_addr != 0)) {
-                       WriteRegDW(adapter, 0x000, adapter->dmaq1.bus_addr);
-                       WriteRegDW(adapter, 0x00C, (adapter->dmaq1.bus_addr + adapter->dmaq1.buffer_size / 2) | 1);
+                       write_reg_dw(adapter, 0x000, adapter->dmaq1.bus_addr);
+                       write_reg_dw(adapter, 0x00c, (adapter->dmaq1.bus_addr + adapter->dmaq1.buffer_size / 2) | 1);
 
                        adapter->dma_status = adapter->dma_status & ~0x00000001;
                }
                //disable dma2
                if (((dma_mask & 2) != 0) && ((adapter->dma_status & 2) != 0) && (adapter->dmaq2.bus_addr != 0)) {
-                       WriteRegDW(adapter, 0x010, adapter->dmaq2.bus_addr);
+                       write_reg_dw(adapter, 0x010, adapter->dmaq2.bus_addr);
 
                        adapter->dma_status = adapter->dma_status & ~0x00000002;
                }
        }
 }
 
-static void OpenStream(struct adapter *adapter, u32 pid)
+static void open_stream(struct adapter *adapter, u16 pid)
 {
        u32 dma_mask;
 
-       if (adapter->capturing == 0)
-               adapter->capturing = 1;
+       ++adapter->capturing;
 
-       FilterEnableMaskFilter(adapter, 1);
+       filter_enable_mask_filter(adapter, 1);
 
-       AddPID(adapter, pid);
+       add_pid(adapter, pid);
 
        dprintk("%s: adapter->dma_status=%x\n", __FUNCTION__, adapter->dma_status);
 
@@ -1779,23 +1548,22 @@ static void OpenStream(struct adapter *adapter, u32 pid)
                }
 
                if (dma_mask != 0) {
-                       IrqDmaEnableDisableIrq(adapter, 1);
+                       irq_dma_enable_disable_irq(adapter, 1);
 
-                       DmaStartStop0x2102(adapter, dma_mask, 1);
+                       dma_start_stop(adapter, dma_mask, 1);
                }
        }
 }
 
-static void CloseStream(struct adapter *adapter, u32 pid)
+static void close_stream(struct adapter *adapter, u16 pid)
 {
-       u32 dma_mask;
-
-       if (adapter->capturing != 0)
-               adapter->capturing = 0;
+       if (adapter->capturing > 0)
+               --adapter->capturing;
 
        dprintk("%s: dma_status=%x\n", __FUNCTION__, adapter->dma_status);
 
-       dma_mask = 0;
+       if (adapter->capturing == 0) {
+               u32 dma_mask = 0;
 
        if ((adapter->dma_status & 1) != 0)
                dma_mask = dma_mask | 0x00000001;
@@ -1803,94 +1571,76 @@ static void CloseStream(struct adapter *adapter, u32 pid)
                dma_mask = dma_mask | 0x00000002;
 
        if (dma_mask != 0) {
-               DmaStartStop0x2102(adapter, dma_mask, 0);
+                       dma_start_stop(adapter, dma_mask, 0);
        }
-
-       RemovePID(adapter, pid);
+       }
+       remove_pid(adapter, pid);
 }
 
-static void InterruptServiceDMA1(struct adapter *adapter)
+static void interrupt_service_dma1(struct adapter *adapter)
 {
        struct dvb_demux *dvbdmx = &adapter->demux;
-       struct packet_header packet_header;
 
-       int nCurDmaCounter;
-       u32 nNumBytesParsed;
-       u32 nNumNewBytesTransferred;
-       u32 dwDefaultPacketSize = 188;
-       u8 gbTmpBuffer[188];
-       u8 *pbDMABufCurPos;
+       int n_cur_dma_counter;
+       u32 n_num_bytes_parsed;
+       u32 n_num_new_bytes_transferred;
+       u32 dw_default_packet_size = 188;
+       u8 gb_tmp_buffer[188];
+       u8 *pb_dma_buf_cur_pos;
 
-       nCurDmaCounter = readl(adapter->io_mem + 0x008) - adapter->dmaq1.bus_addr;
-       nCurDmaCounter = (nCurDmaCounter / dwDefaultPacketSize) * dwDefaultPacketSize;
+       n_cur_dma_counter = readl(adapter->io_mem + 0x008) - adapter->dmaq1.bus_addr;
+       n_cur_dma_counter = (n_cur_dma_counter / dw_default_packet_size) * dw_default_packet_size;
 
-       if ((nCurDmaCounter < 0) || (nCurDmaCounter > adapter->dmaq1.buffer_size)) {
+       if ((n_cur_dma_counter < 0) || (n_cur_dma_counter > adapter->dmaq1.buffer_size)) {
                dprintk("%s: dma counter outside dma buffer\n", __FUNCTION__);
                return;
        }
 
-       adapter->dmaq1.head = nCurDmaCounter;
+       adapter->dmaq1.head = n_cur_dma_counter;
 
-       if (adapter->dmaq1.tail <= nCurDmaCounter) {
-               nNumNewBytesTransferred = nCurDmaCounter - adapter->dmaq1.tail;
+       if (adapter->dmaq1.tail <= n_cur_dma_counter) {
+               n_num_new_bytes_transferred = n_cur_dma_counter - adapter->dmaq1.tail;
 
        } else {
 
-               nNumNewBytesTransferred = (adapter->dmaq1.buffer_size - adapter->dmaq1.tail) + nCurDmaCounter;
+               n_num_new_bytes_transferred = (adapter->dmaq1.buffer_size - adapter->dmaq1.tail) + n_cur_dma_counter;
        }
 
-//  dprintk("%s: nCurDmaCounter   = %d\n" , __FUNCTION__, nCurDmaCounter);
-//     dprintk("%s: dmaq1.tail       = %d\n" , __FUNCTION__, adapter->dmaq1.tail):
-//  dprintk("%s: BytesTransferred = %d\n" , __FUNCTION__, nNumNewBytesTransferred);
+       ddprintk("%s: n_cur_dma_counter = %d\n", __FUNCTION__, n_cur_dma_counter);
+       ddprintk("%s: dmaq1.tail        = %d\n", __FUNCTION__, adapter->dmaq1.tail);
+       ddprintk("%s: bytes_transferred = %d\n", __FUNCTION__, n_num_new_bytes_transferred);
 
-       if (nNumNewBytesTransferred < dwDefaultPacketSize)
+       if (n_num_new_bytes_transferred < dw_default_packet_size)
                return;
 
-       nNumBytesParsed = 0;
+       n_num_bytes_parsed = 0;
 
-       while (nNumBytesParsed < nNumNewBytesTransferred) {
-               pbDMABufCurPos = adapter->dmaq1.buffer + adapter->dmaq1.tail;
+       while (n_num_bytes_parsed < n_num_new_bytes_transferred) {
+               pb_dma_buf_cur_pos = adapter->dmaq1.buffer + adapter->dmaq1.tail;
 
                if (adapter->dmaq1.buffer + adapter->dmaq1.buffer_size < adapter->dmaq1.buffer + adapter->dmaq1.tail + 188) {
-                       memcpy(gbTmpBuffer, adapter->dmaq1.buffer + adapter->dmaq1.tail, adapter->dmaq1.buffer_size - adapter->dmaq1.tail);
-                       memcpy(gbTmpBuffer + (adapter->dmaq1.buffer_size - adapter->dmaq1.tail), adapter->dmaq1.buffer, (188 - (adapter->dmaq1.buffer_size - adapter->dmaq1.tail)));
+                       memcpy(gb_tmp_buffer, adapter->dmaq1.buffer + adapter->dmaq1.tail,
+                              adapter->dmaq1.buffer_size - adapter->dmaq1.tail);
+                       memcpy(gb_tmp_buffer + (adapter->dmaq1.buffer_size - adapter->dmaq1.tail), adapter->dmaq1.buffer,
+                              (188 - (adapter->dmaq1.buffer_size - adapter->dmaq1.tail)));
 
-                       pbDMABufCurPos = gbTmpBuffer;
+                       pb_dma_buf_cur_pos = gb_tmp_buffer;
                }
 
                if (adapter->capturing != 0) {
-                       u32 *dq = (u32 *) pbDMABufCurPos;
-
-                       packet_header.sync_byte = *dq & 0x000000FF;
-                       packet_header.transport_error_indicator = *dq & 0x00008000;
-                       packet_header.payload_unit_start_indicator = *dq & 0x00004000;
-                       packet_header.transport_priority = *dq & 0x00002000;
-                       packet_header.pid = ((*dq & 0x00FF0000) >> 0x10) | (*dq & 0x00001F00);
-                       packet_header.transport_scrambling_control = *dq >> 0x1E;
-                       packet_header.adaptation_field_control = (*dq & 0x30000000) >> 0x1C;
-                       packet_header.continuity_counter = (*dq & 0x0F000000) >> 0x18;
-
-                       if ((packet_header.sync_byte == 0x47) && (packet_header.transport_error_indicator == 0) && (packet_header.pid != 0x1FFF)) {
-                               if (CheckPID(adapter, packet_header.pid & 0x0000FFFF) != 0) {
-                                       dvb_dmx_swfilter_packets(dvbdmx, pbDMABufCurPos, dwDefaultPacketSize / 188);
-
-                               } else {
-
-//                  dprintk("%s: pid=%x\n", __FUNCTION__, packet_header.pid);
-                               }
-                       }
+                       dvb_dmx_swfilter_packets(dvbdmx, pb_dma_buf_cur_pos, dw_default_packet_size / 188);
                }
 
-               nNumBytesParsed = nNumBytesParsed + dwDefaultPacketSize;
+               n_num_bytes_parsed = n_num_bytes_parsed + dw_default_packet_size;
 
-               adapter->dmaq1.tail = adapter->dmaq1.tail + dwDefaultPacketSize;
+               adapter->dmaq1.tail = adapter->dmaq1.tail + dw_default_packet_size;
 
                if (adapter->dmaq1.tail >= adapter->dmaq1.buffer_size)
                        adapter->dmaq1.tail = adapter->dmaq1.tail - adapter->dmaq1.buffer_size;
        };
 }
 
-static void InterruptServiceDMA2(struct adapter *adapter)
+static void interrupt_service_dma2(struct adapter *adapter)
 {
        printk("%s:\n", __FUNCTION__);
 }
@@ -1901,28 +1651,28 @@ static irqreturn_t isr(int irq, void *dev_id, struct pt_regs *regs)
 
        u32 value;
 
-//  dprintk("%s:\n", __FUNCTION__);
+       ddprintk("%s:\n", __FUNCTION__);
 
        spin_lock_irq(&tmp->lock);
 
-       if (0 == ((value = ReadRegDW(tmp, 0x20C)) & 0x0F)) {
+       if (0 == ((value = read_reg_dw(tmp, 0x20c)) & 0x0f)) {
                spin_unlock_irq(&tmp->lock);
                return IRQ_NONE;
        }
        
        while (value != 0) {
                if ((value & 0x03) != 0)
-                       InterruptServiceDMA1(tmp);
-               if ((value & 0x0C) != 0)
-                       InterruptServiceDMA2(tmp);
-               value = ReadRegDW(tmp, 0x20C) & 0x0F;
+                       interrupt_service_dma1(tmp);
+               if ((value & 0x0c) != 0)
+                       interrupt_service_dma2(tmp);
+               value = read_reg_dw(tmp, 0x20c) & 0x0f;
        }
 
        spin_unlock_irq(&tmp->lock);
        return IRQ_HANDLED;
 }
 
-static void Initdmaqueue(struct adapter *adapter)
+static void init_dma_queue(struct adapter *adapter)
 {
        dma_addr_t dma_addr;
 
@@ -1933,19 +1683,19 @@ static void Initdmaqueue(struct adapter *adapter)
        adapter->dmaq1.tail = 0;
        adapter->dmaq1.buffer = 0;
 
-       adapter->dmaq1.buffer = pci_alloc_consistent(adapter->pdev, SizeOfBufDMA1 + 0x80, &dma_addr);
+       adapter->dmaq1.buffer = pci_alloc_consistent(adapter->pdev, SIZE_OF_BUF_DMA1 + 0x80, &dma_addr);
 
        if (adapter->dmaq1.buffer != 0) {
-               memset(adapter->dmaq1.buffer, 0, SizeOfBufDMA1);
+               memset(adapter->dmaq1.buffer, 0, SIZE_OF_BUF_DMA1);
 
                adapter->dmaq1.bus_addr = dma_addr;
-               adapter->dmaq1.buffer_size = SizeOfBufDMA1;
+               adapter->dmaq1.buffer_size = SIZE_OF_BUF_DMA1;
 
-               DmaInitDMA(adapter, 0);
+               dma_init_dma(adapter, 0);
 
                adapter->dma_status = adapter->dma_status | 0x10000000;
 
-               dprintk("%s: allocated dma buffer at 0x%p, length=%d\n", __FUNCTION__, adapter->dmaq1.buffer, SizeOfBufDMA1);
+               ddprintk("%s: allocated dma buffer at 0x%p, length=%d\n", __FUNCTION__, adapter->dmaq1.buffer, SIZE_OF_BUF_DMA1);
 
        } else {
 
@@ -1959,19 +1709,19 @@ static void Initdmaqueue(struct adapter *adapter)
        adapter->dmaq2.tail = 0;
        adapter->dmaq2.buffer = 0;
 
-       adapter->dmaq2.buffer = pci_alloc_consistent(adapter->pdev, SizeOfBufDMA2 + 0x80, &dma_addr);
+       adapter->dmaq2.buffer = pci_alloc_consistent(adapter->pdev, SIZE_OF_BUF_DMA2 + 0x80, &dma_addr);
 
        if (adapter->dmaq2.buffer != 0) {
-               memset(adapter->dmaq2.buffer, 0, SizeOfBufDMA2);
+               memset(adapter->dmaq2.buffer, 0, SIZE_OF_BUF_DMA2);
 
                adapter->dmaq2.bus_addr = dma_addr;
-               adapter->dmaq2.buffer_size = SizeOfBufDMA2;
+               adapter->dmaq2.buffer_size = SIZE_OF_BUF_DMA2;
 
-               DmaInitDMA(adapter, 1);
+               dma_init_dma(adapter, 1);
 
                adapter->dma_status = adapter->dma_status | 0x20000000;
 
-               dprintk("%s: allocated dma buffer at 0x%p, length=%d\n", __FUNCTION__, adapter->dmaq2.buffer, (int) SizeOfBufDMA2);
+               ddprintk("%s: allocated dma buffer at 0x%p, length=%d\n", __FUNCTION__, adapter->dmaq2.buffer, (int) SIZE_OF_BUF_DMA2);
 
        } else {
 
@@ -1979,10 +1729,10 @@ static void Initdmaqueue(struct adapter *adapter)
        }
 }
 
-static void Freedmaqueue(struct adapter *adapter)
+static void free_dma_queue(struct adapter *adapter)
 {
        if (adapter->dmaq1.buffer != 0) {
-               pci_free_consistent(adapter->pdev, SizeOfBufDMA1 + 0x80, adapter->dmaq1.buffer, adapter->dmaq1.bus_addr);
+               pci_free_consistent(adapter->pdev, SIZE_OF_BUF_DMA1 + 0x80, adapter->dmaq1.buffer, adapter->dmaq1.bus_addr);
 
                adapter->dmaq1.bus_addr = 0;
                adapter->dmaq1.head = 0;
@@ -1992,7 +1742,7 @@ static void Freedmaqueue(struct adapter *adapter)
        }
 
        if (adapter->dmaq2.buffer != 0) {
-               pci_free_consistent(adapter->pdev, SizeOfBufDMA2 + 0x80, adapter->dmaq2.buffer, adapter->dmaq2.bus_addr);
+               pci_free_consistent(adapter->pdev, SIZE_OF_BUF_DMA2 + 0x80, adapter->dmaq2.buffer, adapter->dmaq2.bus_addr);
 
                adapter->dmaq2.bus_addr = 0;
                adapter->dmaq2.head = 0;
@@ -2002,16 +1752,16 @@ static void Freedmaqueue(struct adapter *adapter)
        }
 }
 
-static void FreeAdapterObject(struct adapter *adapter)
+static void free_adapter_object(struct adapter *adapter)
 {
        dprintk("%s:\n", __FUNCTION__);
 
-       CloseStream(adapter, 0);
+       close_stream(adapter, 0);
 
        if (adapter->irq != 0)
                free_irq(adapter->irq, adapter);
 
-       Freedmaqueue(adapter);
+       free_dma_queue(adapter);
 
        if (adapter->io_mem != 0)
                iounmap((void *) adapter->io_mem);
@@ -2022,7 +1772,7 @@ static void FreeAdapterObject(struct adapter *adapter)
 
 static struct pci_driver skystar2_pci_driver;
 
-static int ClaimAdapter(struct adapter *adapter)
+static int claim_adapter(struct adapter *adapter)
 {
        struct pci_dev *pdev = adapter->pdev;
 
@@ -2062,20 +1812,58 @@ static int ClaimAdapter(struct adapter *adapter)
 }
 
 /*
-static int SLL_reset_FlexCOP(struct adapter *adapter)
+static int sll_reset_flexcop(struct adapter *adapter)
 {
-       WriteRegDW(adapter, 0x208, 0);
-       WriteRegDW(adapter, 0x210, 0xB2FF);
+       write_reg_dw(adapter, 0x208, 0);
+       write_reg_dw(adapter, 0x210, 0xb2ff);
 
        return 0;
 }
 */
 
-static int DriverInitialize(struct pci_dev * pdev)
+static void decide_how_many_hw_filters(struct adapter *adapter)
+{
+       int hw_filters;
+       int mod_option_hw_filters;
+
+       // FlexCop IIb & III have 6+32 hw filters    
+       // FlexCop II has 6 hw filters, every other should have at least 6
+       switch (adapter->b2c2_revision) {
+       case 0x82:              /* II */
+               hw_filters = 6;
+               break;
+       case 0xc3:              /* IIB */
+               hw_filters = 6 + 32;
+               break;
+       case 0xc0:              /* III */
+               hw_filters = 6 + 32;
+               break;
+       default:
+               hw_filters = 6;
+               break;
+       }
+       printk("%s: the chip has %i hardware filters", __FILE__, hw_filters);
+
+       mod_option_hw_filters = 0;
+       if (enable_hw_filters >= 1)
+               mod_option_hw_filters += 6;
+       if (enable_hw_filters >= 2)
+               mod_option_hw_filters += 32;
+
+       if (mod_option_hw_filters >= hw_filters) {
+               adapter->useable_hw_filters = hw_filters;
+       } else {
+               adapter->useable_hw_filters = mod_option_hw_filters;
+               printk(", but only %d will be used because of module option", mod_option_hw_filters);
+       }
+       printk("\n");
+       dprintk("%s: useable_hardware_filters set to %i\n", __FILE__, adapter->useable_hw_filters);
+}
+
+static int driver_initialize(struct pci_dev *pdev)
 {
        struct adapter *adapter;
        u32 tmp;
-       u8 key[16];
 
        if (!(adapter = kmalloc(sizeof(struct adapter), GFP_KERNEL))) {
                dprintk("%s: out of memory!\n", __FUNCTION__);
@@ -2090,113 +1878,114 @@ static int DriverInitialize(struct pci_dev * pdev)
        adapter->pdev = pdev;
        adapter->irq = pdev->irq;
 
-       if ((ClaimAdapter(adapter)) != 1) {
-               FreeAdapterObject(adapter);
+       if ((claim_adapter(adapter)) != 1) {
+               free_adapter_object(adapter);
 
                return -ENODEV;
        }
 
-       IrqDmaEnableDisableIrq(adapter, 0);
+       irq_dma_enable_disable_irq(adapter, 0);
 
        if (request_irq(pdev->irq, isr, 0x4000000, "Skystar2", adapter) != 0) {
                dprintk("%s: unable to allocate irq=%d !\n", __FUNCTION__, pdev->irq);
 
-               FreeAdapterObject(adapter);
+               free_adapter_object(adapter);
 
                return -ENODEV;
        }
 
-       ReadRegDW(adapter, 0x208);
-       WriteRegDW(adapter, 0x208, 0);
-       WriteRegDW(adapter, 0x210, 0xB2FF);
-       WriteRegDW(adapter, 0x208, 0x40);
-
-       InitPIDsInfo(adapter);
+       read_reg_dw(adapter, 0x208);
+       write_reg_dw(adapter, 0x208, 0);
+       write_reg_dw(adapter, 0x210, 0xb2ff);
+       write_reg_dw(adapter, 0x208, 0x40);
 
-       PidSetGroupPID(adapter, 0);
-       PidSetGroupMASK(adapter, 0x1FE0);
-       PidSetStream1PID(adapter, 0x1FFF);
-       PidSetStream2PID(adapter, 0x1FFF);
-       PidSetPmtPID(adapter, 0x1FFF);
-       PidSetPcrPID(adapter, 0x1FFF);
-       PidSetEcmPID(adapter, 0x1FFF);
-       PidSetEmmPID(adapter, 0x1FFF);
-
-       Initdmaqueue(adapter);
+       init_dma_queue(adapter);
 
        if ((adapter->dma_status & 0x30000000) == 0) {
-               FreeAdapterObject(adapter);
+               free_adapter_object(adapter);
 
                return -ENODEV;
        }
 
-       adapter->b2c2_revision = (ReadRegDW(adapter, 0x204) >> 0x18);
-
-       if ((adapter->b2c2_revision != 0x82) && (adapter->b2c2_revision != 0xC3))
-               if (adapter->b2c2_revision != 0x82) {
-                       dprintk("%s: The revision of the FlexCopII chip on your card is - %d\n", __FUNCTION__, adapter->b2c2_revision);
-                       dprintk("%s: This driver works now only with FlexCopII(rev.130) and FlexCopIIB(rev.195).\n", __FUNCTION__);
-
-                       FreeAdapterObject(adapter);
+       adapter->b2c2_revision = (read_reg_dw(adapter, 0x204) >> 0x18);
 
+       switch (adapter->b2c2_revision) {
+       case 0x82:
+               printk("%s: FlexCopII(rev.130) chip found\n", __FILE__);
+               break;
+       case 0xc3:
+               printk("%s: FlexCopIIB(rev.195) chip found\n", __FILE__);
+               break;
+       case 0xc0:
+               printk("%s: FlexCopIII(rev.192) chip found\n", __FILE__);
+               break;
+       default:
+               printk("%s: The revision of the FlexCop chip on your card is %d\n", __FILE__, adapter->b2c2_revision);
+               printk("%s: This driver works only with FlexCopII(rev.130), FlexCopIIB(rev.195) and FlexCopIII(rev.192).\n", __FILE__);
+               free_adapter_object(adapter);
+               pci_set_drvdata(pdev, NULL);
+               release_region(pci_resource_start(pdev, 1), pci_resource_len(pdev, 1));
+               release_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0));
                        return -ENODEV;
                }
 
-       tmp = ReadRegDW(adapter, 0x204);
+       decide_how_many_hw_filters(adapter);
+
+       init_pids(adapter);
+
+       tmp = read_reg_dw(adapter, 0x204);
 
-       WriteRegDW(adapter, 0x204, 0);
+       write_reg_dw(adapter, 0x204, 0);
        mdelay(20);
 
-       WriteRegDW(adapter, 0x204, tmp);
+       write_reg_dw(adapter, 0x204, tmp);
        mdelay(10);
 
-       tmp = ReadRegDW(adapter, 0x308);
-       WriteRegDW(adapter, 0x308, 0x4000 | tmp);
+       tmp = read_reg_dw(adapter, 0x308);
+       write_reg_dw(adapter, 0x308, 0x4000 | tmp);
 
-       adapter->dwSramType = 0x10000;
+       adapter->dw_sram_type = 0x10000;
 
-       SLL_detectSramSize(adapter);
+       sll_detect_sram_size(adapter);
 
-       dprintk("%s sram length = %d, sram type= %x\n", __FUNCTION__, SRAM_length(adapter), adapter->dwSramType);
+       dprintk("%s sram length = %d, sram type= %x\n", __FUNCTION__, sram_length(adapter), adapter->dw_sram_type);
 
-       SRAMSetMediaDest(adapter, 1);
-       SRAMSetNetDest(adapter, 1);
+       sram_set_media_dest(adapter, 1);
+       sram_set_net_dest(adapter, 1);
 
-       CtrlEnableSmc(adapter, 0);
+       ctrl_enable_smc(adapter, 0);
 
-       SRAMSetCaiDest(adapter, 2);
-       SRAMSetCaoDest(adapter, 2);
+       sram_set_cai_dest(adapter, 2);
+       sram_set_cao_dest(adapter, 2);
 
-       DmaEnableDisableIrq(adapter, 1, 0, 0);
+       dma_enable_disable_irq(adapter, 1, 0, 0);
 
-       if (EEPROM_getMacAddr(adapter, 0, adapter->mac_addr) != 0) {
-               printk("%s MAC address = %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x \n", __FUNCTION__, adapter->mac_addr[0], adapter->mac_addr[1], adapter->mac_addr[2], adapter->mac_addr[3], adapter->mac_addr[4], adapter->mac_addr[5], adapter->mac_addr[6], adapter->mac_addr[7]
+       if (eeprom_get_mac_addr(adapter, 0, adapter->mac_addr) != 0) {
+               printk("%s MAC address = %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x \n", __FUNCTION__, adapter->mac_addr[0],
+                      adapter->mac_addr[1], adapter->mac_addr[2], adapter->mac_addr[3], adapter->mac_addr[4], adapter->mac_addr[5],
+                      adapter->mac_addr[6], adapter->mac_addr[7]
                    );
 
-               CASetMacDstAddrFilter(adapter, adapter->mac_addr);
-               CtrlEnableMAC(adapter, 1);
+               ca_set_mac_dst_addr_filter(adapter, adapter->mac_addr);
+               ctrl_enable_mac(adapter, 1);
        }
 
-       EEPROM_readKey(adapter, key, 16);
-
-       printk("%s key = \n %02x %02x %02x %02x \n %02x %02x %02x %02x \n %02x %02x %02x %02x \n %02x %02x %02x %02x \n", __FUNCTION__, key[0], key[1], key[2], key[3], key[4], key[5], key[6], key[7], key[8], key[9], key[10], key[11], key[12], key[13], key[14], key[15]);
-
        adapter->lock = SPIN_LOCK_UNLOCKED;
 
        return 0;
 }
 
-static void DriverHalt(struct pci_dev *pdev)
+static void driver_halt(struct pci_dev *pdev)
 {
        struct adapter *adapter;
 
        adapter = pci_get_drvdata(pdev);
 
-       IrqDmaEnableDisableIrq(adapter, 0);
+       irq_dma_enable_disable_irq(adapter, 0);
 
-       CtrlEnableReceiveData(adapter, 0);
+       ctrl_enable_receive_data(adapter, 0);
 
-       FreeAdapterObject(adapter);
+       free_adapter_object(adapter);
 
        pci_set_drvdata(pdev, NULL);
 
@@ -2212,7 +2001,7 @@ static int dvb_start_feed(struct dvb_demux_feed *dvbdmxfeed)
 
        dprintk("%s: PID=%d, type=%d\n", __FUNCTION__, dvbdmxfeed->pid, dvbdmxfeed->type);
 
-       OpenStream(adapter, dvbdmxfeed->pid);
+       open_stream(adapter, dvbdmxfeed->pid);
 
        return 0;
 }
@@ -2224,7 +2013,7 @@ static int dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
 
        dprintk("%s: PID=%d, type=%d\n", __FUNCTION__, dvbdmxfeed->pid, dvbdmxfeed->type);
 
-       CloseStream(adapter, dvbdmxfeed->pid);
+       close_stream(adapter, dvbdmxfeed->pid);
 
        return 0;
 }
@@ -2232,23 +2021,23 @@ static int dvb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
 /* lnb control */
 static void set_tuner_tone(struct adapter *adapter, u8 tone)
 {
-       u16 wzHalfPeriodFor45MHz[] = { 0x01FF, 0x0154, 0x00FF, 0x00CC };
+       u16 wz_half_period_for_45_mhz[] = { 0x01ff, 0x0154, 0x00ff, 0x00cc };
        u16 ax;
 
        dprintk("%s: %u\n", __FUNCTION__, tone);
 
        switch (tone) {
        case 1:
-               ax = wzHalfPeriodFor45MHz[0];
+               ax = wz_half_period_for_45_mhz[0];
                break;
        case 2:
-               ax = wzHalfPeriodFor45MHz[1];
+               ax = wz_half_period_for_45_mhz[1];
                break;
        case 3:
-               ax = wzHalfPeriodFor45MHz[2];
+               ax = wz_half_period_for_45_mhz[2];
                break;
        case 4:
-               ax = wzHalfPeriodFor45MHz[3];
+               ax = wz_half_period_for_45_mhz[3];
                break;
 
        default:
@@ -2256,11 +2045,11 @@ static void set_tuner_tone(struct adapter *adapter, u8 tone)
        }
 
        if (ax != 0) {
-               WriteRegDW(adapter, 0x200, ((ax << 0x0F) + (ax & 0x7FFF)) | 0x40000000);
+               write_reg_dw(adapter, 0x200, ((ax << 0x0f) + (ax & 0x7fff)) | 0x40000000);
 
        } else {
 
-               WriteRegDW(adapter, 0x200, 0x40FF8000);
+               write_reg_dw(adapter, 0x200, 0x40ff8000);
        }
 }
 
@@ -2270,7 +2059,7 @@ static void set_tuner_polarity(struct adapter *adapter, u8 polarity)
 
        dprintk("%s : polarity = %u \n", __FUNCTION__, polarity);
 
-       var = ReadRegDW(adapter, 0x204);
+       var = read_reg_dw(adapter, 0x204);
 
        if (polarity == 0) {
                dprintk("%s: LNB power off\n", __FUNCTION__);
@@ -2287,82 +2076,150 @@ static void set_tuner_polarity(struct adapter *adapter, u8 polarity)
                var = var | 4;
        }
 
-       WriteRegDW(adapter, 0x204, var);
+       write_reg_dw(adapter, 0x204, var);
 }
 
-static int flexcop_diseqc_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg)
+static void diseqc_send_bit(struct adapter *adapter, int data)
 {
-       struct adapter *adapter = fe->before_after_data;
+       set_tuner_tone(adapter, 1);
+       udelay(data ? 500 : 1000);
+       set_tuner_tone(adapter, 0);
+       udelay(data ? 1000 : 500);
+}
 
-       switch (cmd) {
-       case FE_SLEEP:
+
+static void diseqc_send_byte(struct adapter *adapter, int data)
                {
-                       printk("%s: FE_SLEEP\n", __FUNCTION__);
+       int i, par = 1, d;
 
-                       set_tuner_polarity(adapter, 0);
+       for (i = 7; i >= 0; i--) {
+               d = (data >> i) & 1;
+               par ^= d;
+               diseqc_send_bit(adapter, d);
+       }
 
-                       // return -EOPNOTSUPP, to make DVB core also send "FE_SLEEP" command to frontend.
-                       return -EOPNOTSUPP;
+       diseqc_send_bit(adapter, par);
                }
 
-       case FE_SET_VOLTAGE:
-               {
-                       dprintk("%s: FE_SET_VOLTAGE\n", __FUNCTION__);
 
-                       switch ((fe_sec_voltage_t) arg) {
-                       case SEC_VOLTAGE_13:
+static int send_diseqc_msg(struct adapter *adapter, int len, u8 *msg, unsigned long burst)
+{
+       int i;
 
-                               printk("%s: SEC_VOLTAGE_13, %x\n", __FUNCTION__, SEC_VOLTAGE_13);
+       set_tuner_tone(adapter, 0);
+       mdelay(16);
 
-                               set_tuner_polarity(adapter, 1);
+       for (i = 0; i < len; i++)
+               diseqc_send_byte(adapter, msg[i]);
 
-                               break;
+       mdelay(16);
 
-                       case SEC_VOLTAGE_18:
+       if (burst != -1) {
+               if (burst)
+                       diseqc_send_byte(adapter, 0xff);
+               else {
+                       set_tuner_tone(adapter, 1);
+                       udelay(12500);
+                       set_tuner_tone(adapter, 0);
+               }
+               dvb_delay(20);
+       }
 
-                               printk("%s: SEC_VOLTAGE_18, %x\n", __FUNCTION__, SEC_VOLTAGE_18);
+       return 0;
+}
 
-                               set_tuner_polarity(adapter, 2);
 
+int soft_diseqc(struct adapter *adapter, unsigned int cmd, void *arg)
+{
+       switch (cmd) {
+       case FE_SET_TONE:
+               switch ((fe_sec_tone_mode_t) arg) {
+               case SEC_TONE_ON:
+                       set_tuner_tone(adapter, 1);
+                       break;
+               case SEC_TONE_OFF:
+                       set_tuner_tone(adapter, 0);
                                break;
-
                        default:
-
                                return -EINVAL;
                        };
+               break;
 
+       case FE_DISEQC_SEND_MASTER_CMD:
+               {
+                       struct dvb_diseqc_master_cmd *cmd = arg;
+
+                       send_diseqc_msg(adapter, cmd->msg_len, cmd->msg, 0);
                        break;
                }
 
-       case FE_SET_TONE:
+       case FE_DISEQC_SEND_BURST:
+               send_diseqc_msg(adapter, 0, NULL, (unsigned long) arg);
+               break;
+
+       default:
+               return -EOPNOTSUPP;
+       };
+
+       return 0;
+}
+
+static int flexcop_diseqc_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg)
                {
-                       dprintk("%s: FE_SET_TONE\n", __FUNCTION__);
+       struct adapter *adapter = fe->before_after_data;
 
-                       switch ((fe_sec_tone_mode_t) arg) {
-                       case SEC_TONE_ON:
+       struct dvb_frontend_info info;
 
-                               printk("%s: SEC_TONE_ON, %x\n", __FUNCTION__, SEC_TONE_ON);
+       fe->ioctl(fe, FE_GET_INFO, &info);
 
-                               set_tuner_tone(adapter, 1);
+       // we must use different DiSEqC hw
 
-                               break;
+       if (strcmp(info.name, "Zarlink MT312") == 0) {
+               //VP310 using mt312 driver for tuning only: diseqc not wired
+               //use FCII instead
+               if (!soft_diseqc(adapter, cmd, arg))
+                       return 0;
+       }
 
-                       case SEC_TONE_OFF:
+       switch (cmd) {
+       case FE_SLEEP:
+               {
+                       dprintk("%s: FE_SLEEP\n", __FUNCTION__);
 
-                               printk("%s: SEC_TONE_OFF, %x\n", __FUNCTION__, SEC_TONE_OFF);
+                       set_tuner_polarity(adapter, 0);
 
-                               set_tuner_tone(adapter, 0);
+                       // return -EOPNOTSUPP, to make DVB core also send "FE_SLEEP" command to frontend.
+                       return -EOPNOTSUPP;
+               }
 
-                               break;
+       case FE_SET_VOLTAGE:
+               {
+                       dprintk("%s: FE_SET_VOLTAGE\n", __FUNCTION__);
+
+                       switch ((fe_sec_voltage_t) arg) {
+                       case SEC_VOLTAGE_13:
+
+                               dprintk("%s: SEC_VOLTAGE_13, %x\n", __FUNCTION__, SEC_VOLTAGE_13);
+
+                               set_tuner_polarity(adapter, 1);
+
+                               return 0;
+
+                       case SEC_VOLTAGE_18:
+
+                               dprintk("%s: SEC_VOLTAGE_18, %x\n", __FUNCTION__, SEC_VOLTAGE_18);
+
+                               set_tuner_polarity(adapter, 2);
+
+                               return 0;
 
                        default:
 
                                return -EINVAL;
                        };
-
-                       break;
                }
 
+
        default:
 
                return -EOPNOTSUPP;
@@ -2382,7 +2239,7 @@ static int skystar2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (pdev == NULL)
                return -ENODEV;
 
-       if (DriverInitialize(pdev) != 0)
+       if (driver_initialize(pdev) != 0)
                return -ENODEV;
 
        dvb_register_adapter(&dvb_adapter, skystar2_pci_driver.name);
@@ -2390,7 +2247,7 @@ static int skystar2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (dvb_adapter == NULL) {
                printk("%s: Error registering DVB adapter\n", __FUNCTION__);
 
-               DriverHalt(pdev);
+               driver_halt(pdev);
 
                return -ENODEV;
        }
@@ -2411,8 +2268,8 @@ static int skystar2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        dvbdemux = &adapter->demux;
 
        dvbdemux->priv = (void *) adapter;
-       dvbdemux->filternum = 32;
-       dvbdemux->feednum = 32;
+       dvbdemux->filternum = N_PID_SLOTS;
+       dvbdemux->feednum = N_PID_SLOTS;
        dvbdemux->start_feed = dvb_start_feed;
        dvbdemux->stop_feed = dvb_stop_feed;
        dvbdemux->write_to_decoder = 0;
@@ -2422,7 +2279,7 @@ static int skystar2_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        adapter->hw_frontend.source = DMX_FRONTEND_0;
 
-       adapter->dmxdev.filternum = 32;
+       adapter->dmxdev.filternum = N_PID_SLOTS;
        adapter->dmxdev.demux = &dvbdemux->dmx;
        adapter->dmxdev.capabilities = 0;
 
@@ -2475,13 +2332,13 @@ static void skystar2_remove(struct pci_dev *pdev)
 
                        dvb_unregister_adapter(adapter->dvb_adapter);
                }
-
-               DriverHalt(pdev);
+               driver_halt(pdev);
        }
 }
 
 static struct pci_device_id skystar2_pci_tbl[] = {
-       {0x000013D0, 0x00002103, 0xFFFFFFFF, 0xFFFFFFFF, 0x00000000, 0x00000000, 0x00000000},
+       {0x000013d0, 0x00002103, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000},
+       {0x000013d0, 0x00002200, 0xffffffff, 0xffffffff, 0x00000000, 0x00000000, 0x00000000},   //FCIII
        {0,},
 };
 
@@ -2505,5 +2362,10 @@ static void skystar2_cleanup(void)
 module_init(skystar2_init);
 module_exit(skystar2_cleanup);
 
+MODULE_PARM(debug, "i");
+MODULE_PARM_DESC(debug, "enable verbose debug messages: supported values: 1 and 2");
+MODULE_PARM(enable_hw_filters, "i");
+MODULE_PARM_DESC(enable_hw_filters, "enable hardware filters: supported values: 0 (none), 1, 2");
+
 MODULE_DESCRIPTION("Technisat SkyStar2 DVB PCI Driver");
 MODULE_LICENSE("GPL");
diff --git a/drivers/media/dvb/bt8xx/Kconfig b/drivers/media/dvb/bt8xx/Kconfig
new file mode 100644 (file)
index 0000000..572bd49
--- /dev/null
@@ -0,0 +1,13 @@
+config DVB_BT8XX
+       tristate "Nebula/Pinnacle PCTV PCI cards"
+       depends on DVB_CORE && PCI && VIDEO_BT848
+       help
+         Support for PCI cards based on the Bt8xx PCI bridge. Examples are
+         the Nebula cards, the Pinnacle PCTV cards, and Twinhan DST cards.
+
+          Since these cards have no MPEG decoder onboard, they transmit
+         only compressed MPEG data over the PCI bus, so you need
+         an external software decoder to watch TV on your computer.
+
+         Say Y if you own such a device and want to use it.
+
diff --git a/drivers/media/dvb/bt8xx/Makefile b/drivers/media/dvb/bt8xx/Makefile
new file mode 100644 (file)
index 0000000..6db2890
--- /dev/null
@@ -0,0 +1,5 @@
+
+obj-$(CONFIG_DVB_BT8XX) += bt878.o dvb-bt8xx.o
+
+EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/ -Idrivers/media/video -Idrivers/media/dvb/frontends
+
diff --git a/drivers/media/dvb/bt8xx/bt878.c b/drivers/media/dvb/bt8xx/bt878.c
new file mode 100644 (file)
index 0000000..1619f4c
--- /dev/null
@@ -0,0 +1,614 @@
+/*
+ * bt878.c: part of the driver for the Pinnacle PCTV Sat DVB PCI card
+ *
+ * Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@t-online.de>
+ *
+ * large parts based on the bttv driver
+ * Copyright (C) 1996,97,98 Ralph  Metzler (rjkm@thp.uni-koeln.de)
+ *                        & Marcus Metzler (mocm@thp.uni-koeln.de)
+ * (c) 1999,2000 Gerd Knorr <kraxel@goldbach.in-berlin.de>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ * 
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
+ * 
+ */
+
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <asm/io.h>
+#include <linux/ioport.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/kmod.h>
+#include <linux/vmalloc.h>
+#include <linux/init.h>
+
+#include "dmxdev.h"
+#include "dvbdev.h"
+#include "bt878.h"
+#include "dst-bt878.h"
+
+#include "dvb_functions.h"
+
+/**************************************/
+/* Miscellaneous utility  definitions */
+/**************************************/
+
+unsigned int bt878_verbose = 1;
+unsigned int bt878_debug = 0;
+MODULE_PARM(bt878_verbose, "i");
+MODULE_PARM_DESC(bt878_verbose,
+                "verbose startup messages, default is 1 (yes)");
+MODULE_PARM(bt878_debug, "i");
+MODULE_PARM_DESC(bt878_debug, "debug messages, default is 0 (no)");
+MODULE_LICENSE("GPL");
+
+int bt878_num;
+struct bt878 bt878[BT878_MAX];
+
+EXPORT_SYMBOL(bt878_debug);
+EXPORT_SYMBOL(bt878_verbose);
+EXPORT_SYMBOL(bt878_num);
+EXPORT_SYMBOL(bt878);
+
+#define btwrite(dat,adr)    bmtwrite((dat), (bt->bt878_mem+(adr)))
+#define btread(adr)         bmtread(bt->bt878_mem+(adr))
+
+#define btand(dat,adr)      btwrite((dat) & btread(adr), adr)
+#define btor(dat,adr)       btwrite((dat) | btread(adr), adr)
+#define btaor(dat,mask,adr) btwrite((dat) | ((mask) & btread(adr)), adr)
+
+#if defined(dprintk)
+#undef dprintk
+#endif
+#define dprintk if(bt878_debug) printk
+
+static void bt878_mem_free(struct bt878 *bt)
+{
+       if (bt->buf_cpu) {
+               pci_free_consistent(bt->dev, bt->buf_size, bt->buf_cpu,
+                                   bt->buf_dma);
+               bt->buf_cpu = NULL;
+       }
+
+       if (bt->risc_cpu) {
+               pci_free_consistent(bt->dev, bt->risc_size, bt->risc_cpu,
+                                   bt->risc_dma);
+               bt->risc_cpu = NULL;
+       }
+}
+
+static int bt878_mem_alloc(struct bt878 *bt)
+{
+       if (!bt->buf_cpu) {
+               bt->buf_size = 128 * 1024;
+
+               bt->buf_cpu =
+                   pci_alloc_consistent(bt->dev, bt->buf_size,
+                                        &bt->buf_dma);
+
+               if (!bt->buf_cpu)
+                       return -ENOMEM;
+
+               memset(bt->buf_cpu, 0, bt->buf_size);
+       }
+
+       if (!bt->risc_cpu) {
+               bt->risc_size = PAGE_SIZE;
+               bt->risc_cpu =
+                   pci_alloc_consistent(bt->dev, bt->risc_size,
+                                        &bt->risc_dma);
+
+               if (!bt->risc_cpu) {
+                       bt878_mem_free(bt);
+                       return -ENOMEM;
+               }
+
+               memset(bt->risc_cpu, 0, bt->risc_size);
+       }
+
+       return 0;
+}
+
+/* RISC instructions */
+#define RISC_WRITE             (0x01 << 28)
+#define RISC_JUMP              (0x07 << 28)
+#define RISC_SYNC              (0x08 << 28)
+
+/* RISC bits */
+#define RISC_WR_SOL            (1 << 27)
+#define RISC_WR_EOL            (1 << 26)
+#define RISC_IRQ               (1 << 24)
+#define RISC_STATUS(status)    ((((~status) & 0x0F) << 20) | ((status & 0x0F) << 16))
+#define RISC_SYNC_RESYNC       (1 << 15)
+#define RISC_SYNC_FM1          0x06
+#define RISC_SYNC_VRO          0x0C
+
+#define RISC_FLUSH()           bt->risc_pos = 0
+#define RISC_INSTR(instr)      bt->risc_cpu[bt->risc_pos++] = cpu_to_le32(instr)
+
+static int bt878_make_risc(struct bt878 *bt)
+{
+       bt->block_bytes = bt->buf_size >> 4;
+       bt->block_count = 1 << 4;
+       bt->line_bytes = bt->block_bytes;
+       bt->line_count = bt->block_count;
+
+       while (bt->line_bytes > 4095) {
+               bt->line_bytes >>= 1;
+               bt->line_count <<= 1;
+       }
+
+       if (bt->line_count > 255) {
+               printk("bt878: buffer size error!\n");
+               return -EINVAL;
+       }
+       return 0;
+}
+
+
+static void bt878_risc_program(struct bt878 *bt, u32 op_sync_orin)
+{
+       u32 buf_pos = 0;
+       u32 line;
+
+       RISC_FLUSH();
+       RISC_INSTR(RISC_SYNC | RISC_SYNC_FM1 | op_sync_orin);
+       RISC_INSTR(0);
+
+       dprintk("bt878: risc len lines %u, bytes per line %u\n", 
+                       bt->line_count, bt->line_bytes);
+       for (line = 0; line < bt->line_count; line++) {
+               // At the beginning of every block we issue an IRQ with previous (finished) block number set
+               if (!(buf_pos % bt->block_bytes))
+                       RISC_INSTR(RISC_WRITE | RISC_WR_SOL | RISC_WR_EOL |
+                                  RISC_IRQ |
+                                  RISC_STATUS(((buf_pos /
+                                                bt->block_bytes) +
+                                               (bt->block_count -
+                                                1)) %
+                                              bt->block_count) | bt->
+                                  line_bytes);
+               else
+                       RISC_INSTR(RISC_WRITE | RISC_WR_SOL | RISC_WR_EOL |
+                                  bt->line_bytes);
+               RISC_INSTR(bt->buf_dma + buf_pos);
+               buf_pos += bt->line_bytes;
+       }
+
+       RISC_INSTR(RISC_SYNC | op_sync_orin | RISC_SYNC_VRO);
+       RISC_INSTR(0);
+
+       RISC_INSTR(RISC_JUMP);
+       RISC_INSTR(bt->risc_dma);
+
+       btwrite((bt->line_count << 16) | bt->line_bytes, BT878_APACK_LEN);
+}
+
+/*****************************/
+/* Start/Stop grabbing funcs */
+/*****************************/
+
+void bt878_start(struct bt878 *bt, u32 controlreg, u32 op_sync_orin,
+               u32 irq_err_ignore)
+{
+       u32 int_mask;
+
+       dprintk("bt878 debug: bt878_start (ctl=%8.8x)\n", controlreg);
+       /* complete the writing of the risc dma program now we have
+        * the card specifics
+        */
+       bt878_risc_program(bt, op_sync_orin);
+       controlreg &= ~0x1f;
+       controlreg |= 0x1b;
+
+       btwrite(cpu_to_le32(bt->risc_dma), BT878_ARISC_START);
+
+       /* original int mask had :
+        *    6    2    8    4    0
+        * 1111 1111 1000 0000 0000
+        * SCERR|OCERR|PABORT|RIPERR|FDSR|FTRGT|FBUS|RISCI
+        * Hacked for DST to:
+        * SCERR | OCERR | FDSR | FTRGT | FBUS | RISCI
+        */
+       int_mask = BT878_ASCERR | BT878_AOCERR | BT878_APABORT | 
+               BT878_ARIPERR | BT878_APPERR | BT878_AFDSR | BT878_AFTRGT | 
+               BT878_AFBUS | BT878_ARISCI;
+
+
+       /* ignore pesky bits */
+       int_mask &= ~irq_err_ignore;
+       
+       btwrite(int_mask, BT878_AINT_MASK);
+       btwrite(controlreg, BT878_AGPIO_DMA_CTL);
+}
+
+void bt878_stop(struct bt878 *bt)
+{
+       u32 stat;
+       int i = 0;
+
+       dprintk("bt878 debug: bt878_stop\n");
+
+       btwrite(0, BT878_AINT_MASK);
+       btand(~0x13, BT878_AGPIO_DMA_CTL);
+
+       do {
+               stat = btread(BT878_AINT_STAT);
+               if (!(stat & BT878_ARISC_EN))
+                       break;
+               i++;
+       } while (i < 500);
+
+       dprintk("bt878(%d) debug: bt878_stop, i=%d, stat=0x%8.8x\n",
+               bt->nr, i, stat);
+}
+
+EXPORT_SYMBOL(bt878_start);
+EXPORT_SYMBOL(bt878_stop);
+
+/*****************************/
+/* Interrupt service routine */
+/*****************************/
+
+static irqreturn_t bt878_irq(int irq, void *dev_id, struct pt_regs *regs)
+{
+       u32 stat, astat, mask;
+       int count;
+       struct bt878 *bt;
+
+       bt = (struct bt878 *) dev_id;
+
+       count = 0;
+       while (1) {
+               stat = btread(BT878_AINT_STAT);
+               mask = btread(BT878_AINT_MASK);
+               if (!(astat = (stat & mask)))
+                       return IRQ_NONE;        /* this interrupt is not for me */
+/*             dprintk("bt878(%d) debug: irq count %d, stat 0x%8.8x, mask 0x%8.8x\n",bt->nr,count,stat,mask); */
+               btwrite(astat, BT878_AINT_STAT);        /* try to clear interupt condition */
+
+
+               if (astat & (BT878_ASCERR | BT878_AOCERR)) {
+                       if (bt878_verbose) {
+                               printk("bt878(%d): irq%s%s risc_pc=%08x\n",
+                                      bt->nr,
+                                      (astat & BT878_ASCERR) ? " SCERR" :
+                                      "",
+                                      (astat & BT878_AOCERR) ? " OCERR" :
+                                      "", btread(BT878_ARISC_PC));
+                       }
+               }
+               if (astat & (BT878_APABORT | BT878_ARIPERR | BT878_APPERR)) {
+                       if (bt878_verbose) {
+                               printk
+                                   ("bt878(%d): irq%s%s%s risc_pc=%08x\n",
+                                    bt->nr,
+                                    (astat & BT878_APABORT) ? " PABORT" :
+                                    "",
+                                    (astat & BT878_ARIPERR) ? " RIPERR" :
+                                    "",
+                                    (astat & BT878_APPERR) ? " PPERR" :
+                                    "", btread(BT878_ARISC_PC));
+                       }
+               }
+               if (astat & (BT878_AFDSR | BT878_AFTRGT | BT878_AFBUS)) {
+                       if (bt878_verbose) {
+                               printk
+                                   ("bt878(%d): irq%s%s%s risc_pc=%08x\n",
+                                    bt->nr,
+                                    (astat & BT878_AFDSR) ? " FDSR" : "",
+                                    (astat & BT878_AFTRGT) ? " FTRGT" :
+                                    "",
+                                    (astat & BT878_AFBUS) ? " FBUS" : "",
+                                    btread(BT878_ARISC_PC));
+                       }
+               }
+               if (astat & BT878_ARISCI) {
+                       bt->finished_block = (stat & BT878_ARISCS) >> 28;
+                       tasklet_schedule(&bt->tasklet);
+                       break;
+               }
+               count++;
+               if (count > 20) {
+                       btwrite(0, BT878_AINT_MASK);
+                       printk(KERN_ERR
+                              "bt878(%d): IRQ lockup, cleared int mask\n",
+                              bt->nr);
+                       break;
+               }
+       }
+       return IRQ_HANDLED;
+}
+
+extern int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data);
+extern int bttv_read_gpio(unsigned int card, unsigned long *data);
+extern int bttv_write_gpio(unsigned int card, unsigned long mask, unsigned long data);
+
+int
+bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet *mp)
+{
+       int retval;
+
+       retval = 0;
+       if (down_interruptible (&bt->gpio_lock))
+               return -ERESTARTSYS;
+       /* special gpio signal */
+       switch (cmd) {
+           case DST_IG_ENABLE:
+               // dprintk("dvb_bt8xx: dst enable mask 0x%02x enb 0x%02x \n", mp->dstg.enb.mask, mp->dstg.enb.enable);
+               retval = bttv_gpio_enable(bt->bttv_nr,
+                               mp->enb.mask,
+                               mp->enb.enable);
+               break;
+           case DST_IG_WRITE:
+               // dprintk("dvb_bt8xx: dst write gpio mask 0x%02x out 0x%02x\n", mp->dstg.outp.mask, mp->dstg.outp.highvals);
+               retval = bttv_write_gpio(bt->bttv_nr,
+                               mp->outp.mask,
+                               mp->outp.highvals);
+
+               break;
+           case DST_IG_READ:
+               /* read */
+               retval =  bttv_read_gpio(bt->bttv_nr, &mp->rd.value);
+               // dprintk("dvb_bt8xx: dst read gpio 0x%02x\n", (unsigned)mp->dstg.rd.value);
+               break;
+           case DST_IG_TS:
+               /* Set packet size */
+               bt->TS_Size = mp->psize;
+               break;
+
+           default:
+               retval = -EINVAL;
+               break;
+       }
+       up(&bt->gpio_lock);
+       return retval;
+}
+
+EXPORT_SYMBOL(bt878_device_control);
+
+struct bt878 *bt878_find_by_dvb_adap(struct dvb_adapter *adap)
+{
+       unsigned int card_nr;
+       
+       printk("bt878 find by dvb adap: checking \"%s\"\n",adap->name);
+       for (card_nr = 0; card_nr < bt878_num; card_nr++) {
+               if (bt878[card_nr].adap_ptr == adap)
+                       return &bt878[card_nr];
+       }
+       printk("bt878 find by dvb adap: NOT found \"%s\"\n",adap->name);
+       return NULL;
+}
+
+EXPORT_SYMBOL(bt878_find_by_dvb_adap);
+
+/***********************/
+/* PCI device handling */
+/***********************/
+
+static int __devinit bt878_probe(struct pci_dev *dev,
+                                const struct pci_device_id *pci_id)
+{
+       int result;
+       unsigned char lat;
+       struct bt878 *bt;
+#if defined(__powerpc__)
+       unsigned int cmd;
+#endif
+
+       printk(KERN_INFO "bt878: Bt878 AUDIO function found (%d).\n",
+              bt878_num);
+
+       bt = &bt878[bt878_num];
+       bt->dev = dev;
+       bt->nr = bt878_num;
+       bt->shutdown = 0;
+
+       bt->id = dev->device;
+       bt->irq = dev->irq;
+       bt->bt878_adr = pci_resource_start(dev, 0);
+       if (pci_enable_device(dev))
+               return -EIO;
+       if (!request_mem_region(pci_resource_start(dev, 0),
+                               pci_resource_len(dev, 0), "bt878")) {
+               return -EBUSY;
+       }
+
+       pci_read_config_byte(dev, PCI_CLASS_REVISION, &bt->revision);
+       pci_read_config_byte(dev, PCI_LATENCY_TIMER, &lat);
+       printk(KERN_INFO "bt878(%d): Bt%x (rev %d) at %02x:%02x.%x, ",
+              bt878_num, bt->id, bt->revision, dev->bus->number,
+              PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn));
+       printk("irq: %d, latency: %d, memory: 0x%lx\n",
+              bt->irq, lat, bt->bt878_adr);
+
+
+#if defined(__powerpc__)
+       /* on OpenFirmware machines (PowerMac at least), PCI memory cycle */
+       /* response on cards with no firmware is not enabled by OF */
+       pci_read_config_dword(dev, PCI_COMMAND, &cmd);
+       cmd = (cmd | PCI_COMMAND_MEMORY);
+       pci_write_config_dword(dev, PCI_COMMAND, cmd);
+#endif
+
+#ifdef __sparc__
+       bt->bt878_mem = (unsigned char *) bt->bt878_adr;
+#else
+       bt->bt878_mem = ioremap(bt->bt878_adr, 0x1000);
+#endif
+
+       /* clear interrupt mask */
+       btwrite(0, BT848_INT_MASK);
+
+       result = request_irq(bt->irq, bt878_irq,
+                            SA_SHIRQ | SA_INTERRUPT, "bt878",
+                            (void *) bt);
+       if (result == -EINVAL) {
+               printk(KERN_ERR "bt878(%d): Bad irq number or handler\n",
+                      bt878_num);
+               goto fail1;
+       }
+       if (result == -EBUSY) {
+               printk(KERN_ERR
+                      "bt878(%d): IRQ %d busy, change your PnP config in BIOS\n",
+                      bt878_num, bt->irq);
+               goto fail1;
+       }
+       if (result < 0)
+               goto fail1;
+
+       pci_set_master(dev);
+       pci_set_drvdata(dev, bt);
+
+/*        if(init_bt878(btv) < 0) {
+                bt878_remove(dev);
+                return -EIO;
+        }
+*/
+
+       if ((result = bt878_mem_alloc(bt))) {
+               printk("bt878: failed to allocate memory!\n");
+               goto fail2;
+       }
+
+       bt878_make_risc(bt);
+       btwrite(0, BT878_AINT_MASK);
+       bt878_num++;
+
+       return 0;
+
+      fail2:
+       free_irq(bt->irq, bt);
+      fail1:
+       release_mem_region(pci_resource_start(bt->dev, 0),
+                          pci_resource_len(bt->dev, 0));
+       return result;
+}
+
+static void __devexit bt878_remove(struct pci_dev *pci_dev)
+{
+       u8 command;
+       struct bt878 *bt = pci_get_drvdata(pci_dev);
+
+       if (bt878_verbose)
+               printk("bt878(%d): unloading\n", bt->nr);
+
+       /* turn off all capturing, DMA and IRQs */
+       btand(~13, BT878_AGPIO_DMA_CTL);
+
+       /* first disable interrupts before unmapping the memory! */
+       btwrite(0, BT878_AINT_MASK);
+       btwrite(~0x0UL, BT878_AINT_STAT);
+
+       /* disable PCI bus-mastering */
+       pci_read_config_byte(bt->dev, PCI_COMMAND, &command);
+       /* Should this be &=~ ?? */
+       command &= ~PCI_COMMAND_MASTER;
+       pci_write_config_byte(bt->dev, PCI_COMMAND, command);
+
+       free_irq(bt->irq, bt);
+       printk(KERN_DEBUG "bt878_mem: 0x%p.\n", bt->bt878_mem);
+       if (bt->bt878_mem)
+               iounmap(bt->bt878_mem);
+
+       release_mem_region(pci_resource_start(bt->dev, 0),
+                          pci_resource_len(bt->dev, 0));
+       /* wake up any waiting processes
+          because shutdown flag is set, no new processes (in this queue)
+          are expected
+        */
+       bt->shutdown = 1;
+       bt878_mem_free(bt);
+
+       pci_set_drvdata(pci_dev, NULL);
+       return;
+}
+
+static struct pci_device_id bt878_pci_tbl[] __devinitdata = {
+       {PCI_VENDOR_ID_BROOKTREE, PCI_DEVICE_ID_BROOKTREE_878,
+        PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {0,}
+};
+
+MODULE_DEVICE_TABLE(pci, bt878_pci_tbl);
+
+static struct pci_driver bt878_pci_driver = {
+      .name    = "bt878",
+      .id_table = bt878_pci_tbl,
+      .probe   = bt878_probe,
+      .remove  = bt878_remove,
+};
+
+static int bt878_pci_driver_registered = 0;
+
+/* This will be used later by dvb-bt8xx to only use the audio
+ * dma of certain cards */
+int bt878_find_audio_dma(void)
+{
+       // pci_register_driver(&bt878_pci_driver);
+       bt878_pci_driver_registered = 1;
+       return 0;
+}
+
+EXPORT_SYMBOL(bt878_find_audio_dma);
+
+/*******************************/
+/* Module management functions */
+/*******************************/
+
+int bt878_init_module(void)
+{
+       bt878_num = 0;
+       bt878_pci_driver_registered = 0;
+
+       printk(KERN_INFO "bt878: AUDIO driver version %d.%d.%d loaded\n",
+              (BT878_VERSION_CODE >> 16) & 0xff,
+              (BT878_VERSION_CODE >> 8) & 0xff,
+              BT878_VERSION_CODE & 0xff);
+/*
+        bt878_check_chipset();
+*/
+       /* later we register inside of bt878_find_audio_dma
+        * because we may want to ignore certain cards */
+       bt878_pci_driver_registered = 1;
+       return pci_module_init(&bt878_pci_driver);
+}
+
+void bt878_cleanup_module(void)
+{
+       if (bt878_pci_driver_registered) {
+               bt878_pci_driver_registered = 0;
+               pci_unregister_driver(&bt878_pci_driver);
+       }
+       return;
+}
+
+EXPORT_SYMBOL(bt878_init_module);
+EXPORT_SYMBOL(bt878_cleanup_module);
+module_init(bt878_init_module);
+module_exit(bt878_cleanup_module);
+
+/*
+ * Local variables:
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/drivers/media/dvb/bt8xx/bt878.h b/drivers/media/dvb/bt8xx/bt878.h
new file mode 100644 (file)
index 0000000..ebffd12
--- /dev/null
@@ -0,0 +1,145 @@
+/* 
+    bt878.h - Bt878 audio module (register offsets)
+
+    Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@t-online.de>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+*/
+
+#ifndef _BT878_H_
+#define _BT878_H_
+
+#include <linux/interrupt.h>
+#include <linux/pci.h>
+#include <linux/sched.h>
+#include <linux/spinlock.h>
+#include "bt848.h"
+
+#define BT878_VERSION_CODE 0x000000
+
+#define BT878_AINT_STAT                0x100
+#define BT878_ARISCS           (0xf<<28)
+#define BT878_ARISC_EN         (1<<27)
+#define BT878_ASCERR           (1<<19)
+#define BT878_AOCERR           (1<<18)
+#define BT878_APABORT          (1<<17)
+#define BT878_ARIPERR          (1<<16)
+#define BT878_APPERR           (1<<15)
+#define BT878_AFDSR            (1<<14)
+#define BT878_AFTRGT           (1<<13)
+#define BT878_AFBUS            (1<<12)
+#define BT878_ARISCI           (1<<11)
+#define BT878_AOFLOW           (1<<3)
+
+#define BT878_AINT_MASK                0x104
+
+#define BT878_AGPIO_DMA_CTL    0x10c
+#define BT878_A_GAIN           (0xf<<28)
+#define BT878_A_G2X            (1<<27)
+#define BT878_A_PWRDN          (1<<26)
+#define BT878_A_SEL            (3<<24)
+#define BT878_DA_SCE           (1<<23)
+#define BT878_DA_LRI           (1<<22)
+#define BT878_DA_MLB           (1<<21)
+#define BT878_DA_LRD           (0x1f<<16)
+#define BT878_DA_DPM           (1<<15)
+#define BT878_DA_SBR           (1<<14)
+#define BT878_DA_ES2           (1<<13)
+#define BT878_DA_LMT           (1<<12)
+#define BT878_DA_SDR           (0xf<<8)
+#define BT878_DA_IOM           (3<<6)
+#define BT878_DA_APP           (1<<5)
+#define BT878_ACAP_EN          (1<<4)
+#define BT878_PKTP             (3<<2)
+#define BT878_RISC_EN          (1<<1)
+#define BT878_FIFO_EN          1
+
+#define BT878_APACK_LEN                0x110
+#define BT878_AFP_LEN          (0xff<<16)
+#define BT878_ALP_LEN          0xfff
+
+#define BT878_ARISC_START      0x114
+
+#define BT878_ARISC_PC         0x120
+
+/* BT878 FUNCTION 0 REGISTERS */
+#define BT878_GPIO_DMA_CTL     0x10c
+
+/* Interrupt register */
+#define BT878_INT_STAT         0x100
+#define BT878_INT_MASK         0x104
+#define BT878_I2CRACK          (1<<25)
+#define BT878_I2CDONE          (1<<8)
+
+#define BT878_MAX 4
+
+#define BT878_RISC_SYNC_MASK   (1 << 15)
+
+extern int bt878_num;
+extern struct bt878 bt878[BT878_MAX];
+
+struct bt878 {
+       struct semaphore  gpio_lock;
+       unsigned int nr;
+       unsigned int bttv_nr;
+       struct dvb_adapter *adap_ptr;
+       struct pci_dev *dev;
+       unsigned int id;
+       unsigned int TS_Size;
+       unsigned char revision;
+       unsigned int irq;
+       unsigned long bt878_adr;
+       unsigned char *bt878_mem; /* function 1 */
+
+       volatile u32 finished_block;
+       volatile u32 last_block;
+       u32 block_count;
+       u32 block_bytes;
+       u32 line_bytes;
+       u32 line_count;
+
+       u32 buf_size;
+       u8 *buf_cpu;
+       dma_addr_t buf_dma;
+
+       u32 risc_size;
+       u32 *risc_cpu;
+       dma_addr_t risc_dma;
+       u32 risc_pos;
+
+       struct tasklet_struct tasklet;
+       int shutdown;   
+};
+
+void bt878_start(struct bt878 *bt, u32 controlreg, u32 op_sync_orin,
+               u32 irq_err_ignore);
+void bt878_stop(struct bt878 *bt);          
+
+#if defined(__powerpc__)       /* big-endian */
+extern __inline__ void io_st_le32(volatile unsigned *addr, unsigned val)
+{
+       __asm__ __volatile__("stwbrx %1,0,%2":"=m"(*addr):"r"(val),
+                            "r"(addr));
+       __asm__ __volatile__("eieio":::"memory");
+}
+
+#define bmtwrite(dat,adr)  io_st_le32((unsigned *)(adr),(dat))
+#define bmtread(adr)       ld_le32((unsigned *)(adr))
+#else
+#define bmtwrite(dat,adr)  writel((dat), (char *) (adr))
+#define bmtread(adr)       readl(adr)
+#endif
+
+#endif
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
new file mode 100644 (file)
index 0000000..b5006ec
--- /dev/null
@@ -0,0 +1,530 @@
+/*
+ * Bt8xx based DVB adapter driver 
+ *
+ * Copyright (C) 2002,2003 Florian Schirmer <jolt@tuxbox.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <asm/bitops.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/slab.h>
+#include <linux/i2c.h>
+
+#include "dmxdev.h"
+#include "dvbdev.h"
+#include "dvb_demux.h"
+#include "dvb_frontend.h"
+
+#include "dvb-bt8xx.h"
+
+#include "dvb_functions.h"
+
+#include "bt878.h"
+
+/* ID THAT MUST GO INTO i2c ids */
+#ifndef  I2C_DRIVERID_DVB_BT878A
+# define I2C_DRIVERID_DVB_BT878A I2C_DRIVERID_EXP0+10
+#endif
+
+
+#define dprintk if (debug) printk
+
+extern int bttv_get_cardinfo(unsigned int card, int *type, int *cardid);
+extern struct pci_dev* bttv_get_pcidev(unsigned int card);
+
+static LIST_HEAD(card_list);
+static int debug = 0;
+
+static void dvb_bt8xx_task(unsigned long data)
+{
+       struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *)data;
+
+       //printk("%d ", finished_block);
+
+       while (card->bt->last_block != card->bt->finished_block) {
+               (card->bt->TS_Size ? dvb_dmx_swfilter_204 : dvb_dmx_swfilter)(&card->demux, &card->bt->buf_cpu[card->bt->last_block * card->bt->block_bytes], card->bt->block_bytes);
+               card->bt->last_block = (card->bt->last_block + 1) % card->bt->block_count;
+       }
+}
+
+static int dvb_bt8xx_start_feed(struct dvb_demux_feed *dvbdmxfeed)
+{
+       struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
+       struct dvb_bt8xx_card *card = dvbdmx->priv;
+
+       dprintk("dvb_bt8xx: start_feed\n");
+       
+       if (!dvbdmx->dmx.frontend)
+               return -EINVAL;
+
+       if (card->active)
+               return 0;
+               
+       card->active = 1;
+       
+//     bt878_start(card->bt, card->gpio_mode);
+
+       return 0;
+}
+
+static int dvb_bt8xx_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
+{
+       struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
+       struct dvb_bt8xx_card *card = dvbdmx->priv;
+
+       dprintk("dvb_bt8xx: stop_feed\n");
+       
+       if (!dvbdmx->dmx.frontend)
+               return -EINVAL;
+               
+       if (!card->active)
+               return 0;
+
+//     bt878_stop(card->bt);
+
+       card->active = 0;
+
+       return 0;
+}
+
+static int master_xfer (struct dvb_i2c_bus *i2c, const struct i2c_msg msgs[], int num)
+{
+       struct dvb_bt8xx_card *card = i2c->data;
+       int retval;
+
+       if (down_interruptible (&card->bt->gpio_lock))
+               return -ERESTARTSYS;
+
+       retval = i2c_transfer(card->i2c_adapter,
+                             (struct i2c_msg*) msgs,
+                             num);
+
+       up(&card->bt->gpio_lock);
+
+       return retval;
+}
+
+static int is_pci_slot_eq(struct pci_dev* adev, struct pci_dev* bdev)
+{
+       if ((adev->subsystem_vendor == bdev->subsystem_vendor) &&
+               (adev->subsystem_device == bdev->subsystem_device) &&
+               (adev->bus->number == bdev->bus->number) &&
+               (PCI_SLOT(adev->devfn) == PCI_SLOT(bdev->devfn)))
+               return 1;
+       return 0;
+}
+
+static struct bt878 __init *dvb_bt8xx_878_match(unsigned int bttv_nr, struct pci_dev* bttv_pci_dev)
+{
+       unsigned int card_nr;
+       
+       /* Hmm, n squared. Hope n is small */
+       for (card_nr = 0; card_nr < bt878_num; card_nr++) {
+               if (is_pci_slot_eq(bt878[card_nr].dev, bttv_pci_dev))
+                       return &bt878[card_nr];
+       }
+       return NULL;
+}
+
+static int __init dvb_bt8xx_card_match(unsigned int bttv_nr, char *card_name, u32 gpio_mode, u32 op_sync_orin, u32 irq_err_ignore)
+{
+       struct dvb_bt8xx_card *card;
+       struct pci_dev* bttv_pci_dev;
+
+       dprintk("dvb_bt8xx: identified card%d as %s\n", bttv_nr, card_name);
+                       
+       if (!(card = kmalloc(sizeof(struct dvb_bt8xx_card), GFP_KERNEL)))
+               return -ENOMEM;
+
+       memset(card, 0, sizeof(*card));
+       card->bttv_nr = bttv_nr;
+       strncpy(card->card_name, card_name, sizeof(card_name) - 1);
+       
+       if (!(bttv_pci_dev = bttv_get_pcidev(bttv_nr))) {
+               printk("dvb_bt8xx: no pci device for card %d\n", card->bttv_nr);
+               kfree(card);
+               return -EFAULT;
+       }
+
+       if (!(card->bt = dvb_bt8xx_878_match(card->bttv_nr, bttv_pci_dev))) {
+               printk("dvb_bt8xx: unable to determine DMA core of card %d\n", card->bttv_nr);
+       
+               kfree(card);
+               return -EFAULT;
+               
+       }
+       init_MUTEX(&card->bt->gpio_lock);
+       card->bt->bttv_nr = bttv_nr;
+       card->gpio_mode = gpio_mode;
+       card->op_sync_orin = op_sync_orin;
+       card->irq_err_ignore = irq_err_ignore;
+       list_add_tail(&card->list, &card_list);
+
+       return 0;
+}
+
+static struct dvb_bt8xx_card *dvb_bt8xx_find_by_i2c_adap(struct i2c_adapter *adap)
+{
+       struct dvb_bt8xx_card *card;
+       struct list_head *item;
+       
+       printk("find by i2c adap: checking \"%s\"\n",adap->name);
+       list_for_each(item, &card_list) {
+               card = list_entry(item, struct dvb_bt8xx_card, list);
+               if (card->i2c_adapter == adap)
+                       return card;
+       }
+       return NULL;
+}
+
+static struct dvb_bt8xx_card *dvb_bt8xx_find_by_pci(struct i2c_adapter *adap)
+{
+       struct dvb_bt8xx_card *card;
+       struct list_head *item;
+       struct device  *dev;
+       struct pci_dev *pci;
+       
+       printk("find by pci: checking \"%s\"\n",adap->name);
+       dev = adap->dev.parent;
+       if (NULL == dev) {
+               /* shoudn't happen with 2.6.0-test7 + newer */
+               printk("attach: Huh? i2c adapter not in sysfs tree?\n");
+               return 0;
+       }
+       pci = to_pci_dev(dev);
+       list_for_each(item, &card_list) {
+               card = list_entry(item, struct dvb_bt8xx_card, list);
+               if (is_pci_slot_eq(pci, card->bt->dev)) {
+                       return card;
+               }
+       }
+       return NULL;
+}
+
+static int dvb_bt8xx_attach(struct i2c_adapter *adap)
+{
+       struct dvb_bt8xx_card *card;
+       
+       printk("attach: checking \"%s\"\n",adap->name);
+
+       /* looking for bt878 cards ... */
+       if (adap->id != (I2C_ALGO_BIT | I2C_HW_B_BT848))
+               return 0;
+       card = dvb_bt8xx_find_by_pci(adap);
+       if (!card)
+               return 0;
+       card->i2c_adapter = adap;
+       printk("attach: \"%s\", to card %d\n",
+              adap->name, card->bttv_nr);
+       try_module_get(adap->owner);
+
+       return 0;
+}
+
+static void dvb_bt8xx_i2c_adap_free(struct i2c_adapter *adap)
+{
+       module_put(adap->owner);
+}
+
+static int dvb_bt8xx_detach(struct i2c_adapter *adap)
+{
+       struct dvb_bt8xx_card *card;
+
+       card = dvb_bt8xx_find_by_i2c_adap(adap);
+       if (!card)
+               return 0;
+
+       /* This should not happen. We have locked the module! */
+       printk("detach: \"%s\", for card %d removed\n",
+              adap->name, card->bttv_nr);
+       return 0;
+}
+
+static struct i2c_driver dvb_bt8xx_driver = {
+       .owner           = THIS_MODULE,
+       .name            = "dvb_bt8xx",
+        .id              = I2C_DRIVERID_DVB_BT878A,
+       .flags           = I2C_DF_NOTIFY,
+        .attach_adapter  = dvb_bt8xx_attach,
+        .detach_adapter  = dvb_bt8xx_detach,
+};
+
+static void __init dvb_bt8xx_get_adaps(void)
+{
+       i2c_add_driver(&dvb_bt8xx_driver);
+}
+
+static void __exit dvb_bt8xx_exit_adaps(void)
+{
+       i2c_del_driver(&dvb_bt8xx_driver);
+}
+
+static int __init dvb_bt8xx_load_card( struct dvb_bt8xx_card *card)
+{
+       int result;
+
+       if (!card->i2c_adapter) {
+               printk("dvb_bt8xx: unable to determine i2c adaptor of card %d, deleting\n", card->bttv_nr);
+
+               return -EFAULT;
+       
+       }
+
+       if ((result = dvb_register_adapter(&card->dvb_adapter, card->card_name)) < 0) {
+       
+               printk("dvb_bt8xx: dvb_register_adapter failed (errno = %d)\n", result);
+               
+               dvb_bt8xx_i2c_adap_free(card->i2c_adapter);
+               return result;
+               
+       }
+       card->bt->adap_ptr = card->dvb_adapter;
+
+       if (!(dvb_register_i2c_bus(master_xfer, card, card->dvb_adapter, 0))) {
+               printk("dvb_bt8xx: dvb_register_i2c_bus of card%d failed\n", card->bttv_nr);
+
+               dvb_unregister_adapter(card->dvb_adapter);
+               dvb_bt8xx_i2c_adap_free(card->i2c_adapter);
+
+               return -EFAULT;
+       }
+
+       memset(&card->demux, 0, sizeof(struct dvb_demux));
+
+       card->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING | DMX_MEMORY_BASED_FILTERING;
+
+       card->demux.priv = card;
+       card->demux.filternum = 256;
+       card->demux.feednum = 256;
+       card->demux.start_feed = dvb_bt8xx_start_feed;
+       card->demux.stop_feed = dvb_bt8xx_stop_feed;
+       card->demux.write_to_decoder = NULL;
+       
+       if ((result = dvb_dmx_init(&card->demux)) < 0) {
+               printk("dvb_bt8xx: dvb_dmx_init failed (errno = %d)\n", result);
+
+               dvb_unregister_i2c_bus(master_xfer, card->dvb_adapter, 0);
+               dvb_unregister_adapter(card->dvb_adapter);
+               dvb_bt8xx_i2c_adap_free(card->i2c_adapter);
+               
+               return result;
+       }
+
+       card->dmxdev.filternum = 256;
+       card->dmxdev.demux = &card->demux.dmx;
+       card->dmxdev.capabilities = 0;
+       
+       if ((result = dvb_dmxdev_init(&card->dmxdev, card->dvb_adapter)) < 0) {
+               printk("dvb_bt8xx: dvb_dmxdev_init failed (errno = %d)\n", result);
+
+               dvb_dmx_release(&card->demux);
+               dvb_unregister_i2c_bus(master_xfer, card->dvb_adapter, 0);
+               dvb_unregister_adapter(card->dvb_adapter);
+               dvb_bt8xx_i2c_adap_free(card->i2c_adapter);
+               
+               return result;
+       }
+
+       card->fe_hw.source = DMX_FRONTEND_0;
+
+       if ((result = card->demux.dmx.add_frontend(&card->demux.dmx, &card->fe_hw)) < 0) {
+               printk("dvb_bt8xx: dvb_dmx_init failed (errno = %d)\n", result);
+
+               dvb_dmxdev_release(&card->dmxdev);
+               dvb_dmx_release(&card->demux);
+               dvb_unregister_i2c_bus(master_xfer, card->dvb_adapter, 0);
+               dvb_unregister_adapter(card->dvb_adapter);
+               dvb_bt8xx_i2c_adap_free(card->i2c_adapter);
+               
+               return result;
+       }
+       
+       card->fe_mem.source = DMX_MEMORY_FE;
+
+       if ((result = card->demux.dmx.add_frontend(&card->demux.dmx, &card->fe_mem)) < 0) {
+               printk("dvb_bt8xx: dvb_dmx_init failed (errno = %d)\n", result);
+
+               card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw);
+               dvb_dmxdev_release(&card->dmxdev);
+               dvb_dmx_release(&card->demux);
+               dvb_unregister_i2c_bus(master_xfer, card->dvb_adapter, 0);
+               dvb_unregister_adapter(card->dvb_adapter);
+               dvb_bt8xx_i2c_adap_free(card->i2c_adapter);
+               
+               return result;
+       }
+
+       if ((result = card->demux.dmx.connect_frontend(&card->demux.dmx, &card->fe_hw)) < 0) {
+               printk("dvb_bt8xx: dvb_dmx_init failed (errno = %d)\n", result);
+
+               card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_mem);
+               card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw);
+               dvb_dmxdev_release(&card->dmxdev);
+               dvb_dmx_release(&card->demux);
+               dvb_unregister_i2c_bus(master_xfer, card->dvb_adapter, 0);
+               dvb_unregister_adapter(card->dvb_adapter);
+               dvb_bt8xx_i2c_adap_free(card->i2c_adapter);
+               
+               return result;
+       }
+
+       dvb_net_init(card->dvb_adapter, &card->dvbnet, &card->demux.dmx);
+
+       tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card);
+       
+       bt878_start(card->bt, card->gpio_mode, card->op_sync_orin, card->irq_err_ignore);
+
+       return 0;
+}
+
+static int __init dvb_bt8xx_load_all(void)
+{
+       struct dvb_bt8xx_card *card;
+       struct list_head *entry, *entry_safe;
+
+       list_for_each_safe(entry, entry_safe, &card_list) {
+               card = list_entry(entry, struct dvb_bt8xx_card, list);
+               if (dvb_bt8xx_load_card(card) < 0) {
+                       list_del(&card->list);
+                       kfree(card);
+                       continue;
+               }
+       }
+       return 0;
+
+}
+
+#define BT878_NEBULA   0x68
+#define BT878_TWINHAN_DST 0x71
+
+static int __init dvb_bt8xx_init(void)
+{
+       unsigned int card_nr = 0;
+       int card_id;
+       int card_type;
+
+       dprintk("dvb_bt8xx: enumerating available bttv cards...\n");
+       
+       while (bttv_get_cardinfo(card_nr, &card_type, &card_id) == 0) {
+               switch(card_id) {
+                       case 0x001C11BD:
+                               dvb_bt8xx_card_match(card_nr, "Pinnacle PCTV DVB-S",
+                                              0x0400C060, 0, 0);
+                               /* 26, 15, 14, 6, 5 
+                                * A_G2X  DA_DPM DA_SBR DA_IOM_DA 
+                                * DA_APP(parallel) */
+                               break;
+                       case 0x01010071:
+nebula:
+                               dvb_bt8xx_card_match(card_nr, "Nebula DigiTV DVB-T",
+                                            (1 << 26) | (1 << 14) | (1 << 5),
+                                            0, 0);
+                               /* A_PWRDN DA_SBR DA_APP (high speed serial) */
+                               break;
+                       case 0x07611461:
+                               dvb_bt8xx_card_match(card_nr, "Avermedia DVB-T",
+                                            (1 << 26) | (1 << 14) | (1 << 5),
+                                            0, 0);
+                               /* A_PWRDN DA_SBR DA_APP (high speed serial) */
+                               break;
+                       case 0x0:
+                               if (card_type == BT878_NEBULA ||
+                                       card_type == BT878_TWINHAN_DST)
+                                       goto dst;
+                               goto unknown_card;
+                       case 0x2611BD:
+                       case 0x11822:
+dst:
+                               dvb_bt8xx_card_match(card_nr, "DST DVB-S", 0x2204f2c,
+                                               BT878_RISC_SYNC_MASK,
+                                               BT878_APABORT | BT878_ARIPERR | BT878_APPERR | BT878_AFBUS);
+                               /* 25,21,14,11,10,9,8,3,2 then
+                                * 0x33 = 5,4,1,0
+                                * A_SEL=SML, DA_MLB, DA_SBR, 
+                                * DA_SDR=f, fifo trigger = 32 DWORDS
+                                * IOM = 0 == audio A/D
+                                * DPM = 0 == digital audio mode
+                                * == async data parallel port
+                                * then 0x33 (13 is set by start_capture)
+                                * DA_APP = async data parallel port, 
+                                * ACAP_EN = 1,
+                                * RISC+FIFO ENABLE */
+                               break;
+                       default:
+unknown_card:
+                               printk("%s: unknown card_id found %0X\n",
+                                       __FUNCTION__, card_id);
+                               if (card_type == BT878_NEBULA) {
+                                       printk("%s: bttv type set to nebula\n",
+                                               __FUNCTION__);
+                                       goto nebula;
+                               }
+                               if (card_type == BT878_TWINHAN_DST) {
+                                       printk("%s: bttv type set to Twinhan DST\n",
+                                               __FUNCTION__);
+                                       goto dst;
+                               }
+                               printk("%s: unknown card_type found %0X, NOT LOADED\n",
+                                       __FUNCTION__, card_type);
+                               printk("%s: unknown card_nr found %0X\n",
+                                       __FUNCTION__, card_nr);
+               }
+               card_nr++;
+       }
+       dvb_bt8xx_get_adaps();
+       dvb_bt8xx_load_all();
+
+       return 0;
+
+}
+
+static void __exit dvb_bt8xx_exit(void)
+{
+       struct dvb_bt8xx_card *card;
+       struct list_head *entry, *entry_safe;
+
+       dvb_bt8xx_exit_adaps();
+       list_for_each_safe(entry, entry_safe, &card_list) {
+               card = list_entry(entry, struct dvb_bt8xx_card, list);
+               
+               dprintk("dvb_bt8xx: unloading card%d\n", card->bttv_nr);
+
+               bt878_stop(card->bt);
+               tasklet_kill(&card->bt->tasklet);
+               dvb_net_release(&card->dvbnet);
+               card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_mem);
+               card->demux.dmx.remove_frontend(&card->demux.dmx, &card->fe_hw);
+               dvb_dmxdev_release(&card->dmxdev);
+               dvb_dmx_release(&card->demux);
+               dvb_unregister_i2c_bus(master_xfer, card->dvb_adapter, 0);
+               dvb_bt8xx_i2c_adap_free(card->i2c_adapter);
+               dvb_unregister_adapter(card->dvb_adapter);
+               
+               list_del(&card->list);
+               kfree(card);
+       }
+
+}
+
+module_init(dvb_bt8xx_init);
+module_exit(dvb_bt8xx_exit);
+MODULE_DESCRIPTION("Bt8xx based DVB adapter driver");
+MODULE_AUTHOR("Florian Schirmer <jolt@tuxbox.org>");
+MODULE_LICENSE("GPL");
+MODULE_PARM(debug, "i");
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.h b/drivers/media/dvb/bt8xx/dvb-bt8xx.h
new file mode 100644 (file)
index 0000000..969606e
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Bt8xx based DVB adapter driver 
+ *
+ * Copyright (C) 2002,2003 Florian Schirmer <jolt@tuxbox.org>
+ * Copyright (C) 2002 Peter Hettkamp <peter.hettkamp@t-online.de>
+ * Copyright (C) 1999-2001 Ralph  Metzler & Marcus Metzler for convergence integrated media GmbH
+ * Copyright (C) 1998,1999 Christian Theiss <mistert@rz.fh-augsburg.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ */
+
+#include <linux/i2c.h>
+#include "dvbdev.h"
+#include "dvb_net.h"
+
+struct dvb_bt8xx_card {
+
+       struct list_head list;
+       u8 active;
+       char card_name[32];
+       struct dvb_adapter *dvb_adapter;
+       struct bt878 *bt;
+       unsigned int bttv_nr;
+       struct dvb_demux demux;
+       struct dmxdev dmxdev;
+       struct dmx_frontend fe_hw;
+       struct dmx_frontend fe_mem;
+       u32 gpio_mode;
+       u32 op_sync_orin;
+       u32 irq_err_ignore;
+       struct i2c_adapter *i2c_adapter;
+       struct dvb_net dvbnet;
+                               
+};
index 19f4fe2..8ff49c0 100644 (file)
 #endif 
 
 /*
+ * DMX_MAX_SECFEED_SIZE: Maximum length (in bytes) of a private section feed filter.
+ */ 
+
+#ifndef DMX_MAX_SECFEED_SIZE 
+#define DMX_MAX_SECFEED_SIZE 4096
+#endif 
+
+
+/*
  * enum dmx_success: Success codes for the Demux Callback API. 
  */ 
 
@@ -143,9 +152,9 @@ struct dmx_section_feed {
         int check_crc;
        u32 crc_val;
 
-        u8 secbuf[4096];
-        int secbufp;
-        int seclen;
+        u8 *secbuf;
+        u8 secbuf_base[DMX_MAX_SECFEED_SIZE];
+        u16 secbufp, seclen, tsfeedp;
 
         int (*set) (struct dmx_section_feed* feed, 
                    u16 pid, 
index e0181c0..ffb01c0 100644 (file)
 #include "dvb_functions.h"
 
 #define NOBUFS  
+/* 
+** #define DVB_DEMUX_SECTION_LOSS_LOG to monitor payload loss in the syslog
+*/
+// #define DVB_DEMUX_SECTION_LOSS_LOG
+
 
 LIST_HEAD(dmx_muxs);
 
@@ -87,7 +92,7 @@ static inline u16 ts_pid(const u8 *buf)
 }
 
 
-static inline int payload(const u8 *tsp)
+static inline u8 payload(const u8 *tsp)
 {
        if (!(tsp[3]&0x10)) // no payload?
                return 0;
@@ -188,9 +193,7 @@ static inline int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed)
        struct dvb_demux_filter *f = feed->filter;
        struct dmx_section_feed *sec = &feed->feed.sec;
        u8 *buf = sec->secbuf;
-
-       if (sec->secbufp != sec->seclen)
-               return -1;
+       int section_syntax_indicator;
 
        if (!sec->is_filtering)
                return 0;
@@ -198,15 +201,19 @@ static inline int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed)
        if (!f)
                return 0;
 
-       if (sec->check_crc && demux->check_crc32(feed, sec->secbuf, sec->seclen))
+       if (sec->check_crc) {
+               section_syntax_indicator = ((sec->secbuf[1] & 0x80) != 0);
+               if (section_syntax_indicator &&
+                   demux->check_crc32(feed, sec->secbuf, sec->seclen))
                return -1;
+       }
 
        do {
                if (dvb_dmx_swfilter_sectionfilter(feed, f) < 0)
                        return -1;
        } while ((f = f->next) && sec->is_filtering);
 
-       sec->secbufp = sec->seclen = 0;
+       sec->seclen = 0;
 
        memset(buf, 0, DVB_DEMUX_MASK_MAX);
  
@@ -214,128 +221,147 @@ static inline int dvb_dmx_swfilter_section_feed (struct dvb_demux_feed *feed)
 }
 
 
-static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, const u8 *buf) 
+static void dvb_dmx_swfilter_section_new(struct dvb_demux_feed *feed)
 {
-       struct dvb_demux *demux = feed->demux;
        struct dmx_section_feed *sec = &feed->feed.sec;
-       int p, count;
-       int ccok, rest;
-       u8 cc;
 
-       if (!(count = payload(buf)))
-               return -1;
-
-       p = 188-count;
-
-       cc = buf[3] & 0x0f;
-       ccok = ((feed->cc+1) & 0x0f) == cc ? 1 : 0;
-       feed->cc = cc;
-
-       if (buf[1] & 0x40) { // PUSI set
-               // offset to start of first section is in buf[p] 
-               if (p+buf[p]>187) // trash if it points beyond packet
-                       return -1;
-
-               if (buf[p] && ccok) { // rest of previous section?
-                       // did we have enough data in last packet to calc length?
-                       int tmp = 3 - sec->secbufp;
-
-                       if (tmp > 0 && tmp != 3) {
-                               if (p + tmp >= 187)
-                                       return -1;
-
-                               demux->memcopy (feed, sec->secbuf+sec->secbufp,
-                                              buf+p+1, tmp);
-
-                               sec->seclen = section_length(sec->secbuf);
-
-                               if (sec->seclen > 4096) 
-                                       return -1;
+#ifdef DVB_DEMUX_SECTION_LOSS_LOG
+       if(sec->secbufp < sec->tsfeedp)
+       {
+               int i, n = sec->tsfeedp - sec->secbufp;
+
+               /* section padding is done with 0xff bytes entirely.
+               ** due to speed reasons, we won't check all of them
+               ** but just first and last
+               */
+               if(sec->secbuf[0] != 0xff || sec->secbuf[n-1] != 0xff)
+               {
+                       printk("dvb_demux.c section ts padding loss: %d/%d\n", 
+                              n, sec->tsfeedp);
+                       printk("dvb_demux.c pad data:");
+                       for(i = 0; i < n; i++)
+                               printk(" %02x", sec->secbuf[i]);
+                       printk("\n");
                        }
-
-                       rest = sec->seclen - sec->secbufp;
-
-                       if (rest == buf[p] && sec->seclen) {
-                               demux->memcopy (feed, sec->secbuf + sec->secbufp,
-                                              buf+p+1, buf[p]);
-                               sec->secbufp += buf[p];
-                               dvb_dmx_swfilter_section_feed(feed);
                        }
+#endif
+
+       sec->tsfeedp = sec->secbufp = sec->seclen = 0;
+       sec->secbuf = sec->secbuf_base;
                }
 
-               p += buf[p] + 1;                // skip rest of last section
-               count = 188 - p;
+/* 
+** Losless Section Demux 1.4 by Emard
+*/
+static int dvb_dmx_swfilter_section_copy_dump(struct dvb_demux_feed *feed, const u8 *buf, u8 len)
+{
+       struct dvb_demux *demux = feed->demux;
+       struct dmx_section_feed *sec = &feed->feed.sec;
+       u16 limit, seclen, n;
 
-               while (count) {
+       if(sec->tsfeedp >= DMX_MAX_SECFEED_SIZE)
+               return 0;
 
-                       sec->crc_val = ~0;
+       if(sec->tsfeedp + len > DMX_MAX_SECFEED_SIZE)
+       {
+#ifdef DVB_DEMUX_SECTION_LOSS_LOG
+               printk("dvb_demux.c section buffer full loss: %d/%d\n", 
+                      sec->tsfeedp + len - DMX_MAX_SECFEED_SIZE, DMX_MAX_SECFEED_SIZE);
+#endif
+               len = DMX_MAX_SECFEED_SIZE - sec->tsfeedp;
+       }
 
-                       if ((count>2) && // enough data to determine sec length?
-                           ((sec->seclen = section_length(buf+p)) <= count)) {
-                               if (sec->seclen>4096) 
-                                       return -1;
+       if(len <= 0)
+               return 0;
 
-                               demux->memcopy (feed, sec->secbuf, buf+p,
-                                              sec->seclen);
+       demux->memcopy(feed, sec->secbuf_base + sec->tsfeedp, buf, len);
+       sec->tsfeedp += len;
 
-                               sec->secbufp = sec->seclen;
-                               p += sec->seclen;
-                               count = 188 - p;
+       /* -----------------------------------------------------
+       ** Dump all the sections we can find in the data (Emard)
+       */
 
-                               dvb_dmx_swfilter_section_feed(feed);
+       limit = sec->tsfeedp;
+       if(limit > DMX_MAX_SECFEED_SIZE)
+               return -1; /* internal error should never happen */
 
-                               // filling bytes until packet end?
-                               if (count && buf[p]==0xff) 
-                                       count=0;
+       /* to be sure always set secbuf */
+       sec->secbuf = sec->secbuf_base + sec->secbufp;
 
-                       } else { // section continues to following TS packet
-                               demux->memcopy(feed, sec->secbuf, buf+p, count);
-                               sec->secbufp+=count;
-                               count=0;
-                       }
+       for(n = 0; sec->secbufp + 2 < limit; n++)
+       {
+               seclen = section_length(sec->secbuf);
+               if(seclen <= 0 || seclen > DMX_MAX_SECFEED_SIZE 
+                  || seclen + sec->secbufp > limit)
+                       return 0;
+               sec->seclen = seclen;
+               sec->crc_val = ~0;
+               /* dump [secbuf .. secbuf+seclen) */
+               dvb_dmx_swfilter_section_feed(feed);
+               sec->secbufp += seclen; /* secbufp and secbuf moving together is */
+               sec->secbuf += seclen; /* redundand but saves pointer arithmetic */
                }
 
                return 0;
        }
 
-       // section continued below
-       if (!ccok)
-               return -1;
 
-       if (!sec->secbufp) // any data in last ts packet?
-               return -1;
+static int dvb_dmx_swfilter_section_packet(struct dvb_demux_feed *feed, const u8 *buf) 
+{
+       u8 p, count;
+       int ccok;
+       u8 cc;
 
-       // did we have enough data in last packet to calc section length?
-       if (sec->secbufp < 3) {
-               int tmp = 3 - sec->secbufp;
+       count = payload(buf);
                
-               if (tmp>count)
+       if (count == 0)  /* count == 0 if no payload or out of range */
                        return -1;
 
-               sec->crc_val = ~0;
-
-               demux->memcopy (feed, sec->secbuf + sec->secbufp, buf+p, tmp);
+       p = 188-count; /* payload start */
 
-               sec->seclen = section_length(sec->secbuf);
-
-               if (sec->seclen > 4096) 
-                       return -1;
+       cc = buf[3] & 0x0f;
+       ccok = ((feed->cc+1) & 0x0f) == cc ? 1 : 0;
+       feed->cc = cc;
+       if(ccok == 0)
+       {
+#ifdef DVB_DEMUX_SECTION_LOSS_LOG
+               printk("dvb_demux.c discontinuity detected %d bytes lost\n", count);
+               /* those bytes under sume circumstances will again be reported
+               ** in the following dvb_dmx_swfilter_section_new
+               */
+#endif
+               dvb_dmx_swfilter_section_new(feed);
+               return 0;
        }
 
-       rest = sec->seclen - sec->secbufp;
-
-       if (rest < 0)
-               return -1;
-
-       if (rest <= count) {    // section completed in this TS packet
-               demux->memcopy (feed, sec->secbuf + sec->secbufp, buf+p, rest);
-               sec->secbufp += rest;
-               dvb_dmx_swfilter_section_feed(feed);
-       } else  {       // section continues in following ts packet
-               demux->memcopy (feed, sec->secbuf + sec->secbufp, buf+p, count);
-               sec->secbufp += count;
+       if(buf[1] & 0x40)
+       {
+               // PUSI=1 (is set), section boundary is here
+               if(count > 1 && buf[p] < count)
+               {
+                       const u8 *before = buf+p+1;
+                       u8 before_len = buf[p];
+                       const u8 *after = before+before_len;
+                       u8 after_len = count-1-before_len;
+
+                       dvb_dmx_swfilter_section_copy_dump(feed, before, before_len);
+                       dvb_dmx_swfilter_section_new(feed);
+                       dvb_dmx_swfilter_section_copy_dump(feed, after, after_len);
+               }
+#ifdef DVB_DEMUX_SECTION_LOSS_LOG
+               else
+                       if(count > 0)
+                               printk("dvb_demux.c PUSI=1 but %d bytes lost\n", count);
+#endif
        }
+       else
+       {
+               // PUSI=0 (is not set), no section boundary
+               const u8 *entire = buf+p;
+               u8 entire_len = count;
 
+               dvb_dmx_swfilter_section_copy_dump(feed, entire, entire_len);
+       }
        return 0;
 }
 
@@ -439,6 +465,50 @@ bailout:
        spin_unlock(&demux->lock);
 }
 
+void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count)
+{
+       int p = 0,i, j;
+       u8 tmppack[188];
+       spin_lock(&demux->lock);
+
+       if ((i = demux->tsbufp)) {
+               if (count < (j=204-i)) {
+                       memcpy(&demux->tsbuf[i], buf, count);
+                       demux->tsbufp += count;
+                       goto bailout;
+               }
+               memcpy(&demux->tsbuf[i], buf, j);
+               if ((demux->tsbuf[0] == 0x47)|(demux->tsbuf[0]==0xB8))  {
+                       memcpy(tmppack, demux->tsbuf, 188);
+                       if (tmppack[0] == 0xB8) tmppack[0] = 0x47;
+                       dvb_dmx_swfilter_packet(demux, tmppack);
+               }
+               demux->tsbufp = 0;
+               p += j;
+       }
+
+       while (p < count) {
+               if ((buf[p] == 0x47)|(buf[p] == 0xB8)) {
+                       if (count-p >= 204) {
+                               memcpy(tmppack, buf+p, 188);
+                               if (tmppack[0] == 0xB8) tmppack[0] = 0x47;
+                               dvb_dmx_swfilter_packet(demux, tmppack);
+                               p += 204;
+                       } else {
+                               i = count-p;
+                               memcpy(demux->tsbuf, buf+p, i);
+                               demux->tsbufp=i;
+                               goto bailout;
+                       }
+               } else { 
+                       p++;
+               }
+       }
+
+bailout:
+       spin_unlock(&demux->lock);
+}
+
 
 static struct dvb_demux_filter * dvb_dmx_filter_alloc(struct dvb_demux *demux)
 {
@@ -472,33 +542,38 @@ static struct dvb_demux_feed * dvb_dmx_feed_alloc(struct dvb_demux *demux)
        return &demux->feed[i];
 }
 
-
-static int dmx_pid_set (u16 pid, struct dvb_demux_feed *feed)
+static int dvb_demux_feed_find(struct dvb_demux_feed *feed)
 {
-       struct dvb_demux *demux = feed->demux;
-       struct list_head *pos, *n, *head=&demux->feed_list;
+       struct dvb_demux_feed *entry;
 
-       if (pid > DMX_MAX_PID)
-               return -EINVAL;
+       list_for_each_entry(entry, &feed->demux->feed_list, list_head)
+               if (entry == feed)
+                       return 1;
 
-       if (pid == feed->pid)
                return 0;
-
-       if (feed->pid <= DMX_MAX_PID) {
-               list_for_each_safe(pos, n, head) {
-                       if (DMX_FEED_ENTRY(pos)->pid == feed->pid) {
-                               list_del(pos);
-                               break;
-                       }
                }
+
+static void dvb_demux_feed_add(struct dvb_demux_feed *feed)
+{
+       if (dvb_demux_feed_find(feed)) {
+               printk(KERN_ERR "%s: feed already in list (type=%x state=%x pid=%x)\n",
+                               __FUNCTION__, feed->type, feed->state, feed->pid);
+               return;
        }
 
-       list_add(&feed->list_head, head);
-       feed->pid = pid;
+       list_add(&feed->list_head, &feed->demux->feed_list);
+}
 
-       return 0;
+static void dvb_demux_feed_del(struct dvb_demux_feed *feed)
+{
+       if (!(dvb_demux_feed_find(feed))) {
+               printk(KERN_ERR "%s: feed not in list (type=%x state=%x pid=%x)\n",
+                               __FUNCTION__, feed->type, feed->state, feed->pid);
+               return;
 }
 
+       list_del(&feed->list_head);
+}
 
 static int dmx_ts_feed_set (struct dmx_ts_feed* ts_feed, u16 pid, int ts_type, 
                     enum dmx_ts_pes pes_type, size_t callback_length, 
@@ -507,7 +582,9 @@ static int dmx_ts_feed_set (struct dmx_ts_feed* ts_feed, u16 pid, int ts_type,
 {
        struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed;
        struct dvb_demux *demux = feed->demux;
-       int ret;
+
+       if (pid > DMX_MAX_PID)
+               return -EINVAL;
        
        if (down_interruptible (&demux->mutex))
                return -ERESTARTSYS;
@@ -524,26 +601,13 @@ static int dmx_ts_feed_set (struct dmx_ts_feed* ts_feed, u16 pid, int ts_type,
                        return -EINVAL;
                }
 
-               if ((pes_type != DMX_TS_PES_PCR0) && 
-                   (pes_type != DMX_TS_PES_PCR1) && 
-                   (pes_type != DMX_TS_PES_PCR2) && 
-                   (pes_type != DMX_TS_PES_PCR3)) {
-                       if ((ret = dmx_pid_set(pid, feed))<0) {
-                               up(&demux->mutex);
-                               return ret;
-                       }
-               } else
-                       feed->pid = pid;
-                               
                demux->pesfilter[pes_type] = feed;
-               demux->pids[pes_type] = feed->pid;
-       } else {
-               if ((ret = dmx_pid_set(pid, feed))<0) {
-                       up(&demux->mutex);
-                       return ret;
-               }
+               demux->pids[pes_type] = pid;
        }
 
+       dvb_demux_feed_add(feed);
+
+       feed->pid = pid;
        feed->buffer_size = circular_buffer_size;
        feed->descramble = descramble;
        feed->timeout = timeout;
@@ -687,7 +751,6 @@ static int dvbdmx_release_ts_feed(struct dmx_demux *dmx, struct dmx_ts_feed *ts_
 {
        struct dvb_demux *demux = (struct dvb_demux *) dmx;
        struct dvb_demux_feed *feed = (struct dvb_demux_feed *) ts_feed;
-       struct list_head *pos, *n, *head=&demux->feed_list;
 
        if (down_interruptible (&demux->mutex))
                return -ERESTARTSYS;
@@ -707,14 +770,9 @@ static int dvbdmx_release_ts_feed(struct dmx_demux *dmx, struct dmx_ts_feed *ts_
        feed->state = DMX_STATE_FREE;
        feed->filter->state = DMX_STATE_FREE;
 
-       if (feed->pid <= DMX_MAX_PID) {
-               list_for_each_safe(pos, n, head)
-                       if (DMX_FEED_ENTRY(pos)->pid == feed->pid) {
-                               list_del(pos);
-                               break;
-                       }
+       dvb_demux_feed_del(feed);
+
                feed->pid = 0xffff;
-       }
        
        if (feed->ts_type & TS_DECODER)
                demux->pesfilter[feed->pes_type] = NULL;
@@ -766,7 +824,6 @@ static int dmx_section_feed_set(struct dmx_section_feed* feed,
 {
        struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) feed;
        struct dvb_demux *dvbdmx=dvbdmxfeed->demux;
-       struct list_head *pos, *n, *head=&dvbdmx->feed_list;
 
        if (pid>0x1fff)
                return -EINVAL;
@@ -774,16 +831,7 @@ static int dmx_section_feed_set(struct dmx_section_feed* feed,
        if (down_interruptible (&dvbdmx->mutex))
                return -ERESTARTSYS;
        
-       if (dvbdmxfeed->pid <= DMX_MAX_PID) {
-               list_for_each_safe(pos, n, head) {
-                       if (DMX_FEED_ENTRY(pos)->pid == dvbdmxfeed->pid) {
-                               list_del(pos);
-                               break;
-                       }
-               }
-       }
-
-       list_add(&dvbdmxfeed->list_head, head);
+       dvb_demux_feed_add(dvbdmxfeed);
 
        dvbdmxfeed->pid = pid;
        dvbdmxfeed->buffer_size=circular_buffer_size;
@@ -848,6 +896,9 @@ static int dmx_section_feed_start_filtering(struct dmx_section_feed *feed)
                up(&dvbdmx->mutex);
                return -EINVAL;
        }
+
+       dvbdmxfeed->feed.sec.tsfeedp = 0;
+       dvbdmxfeed->feed.sec.secbuf = dvbdmxfeed->feed.sec.secbuf_base;
        dvbdmxfeed->feed.sec.secbufp=0;
        dvbdmxfeed->feed.sec.seclen=0;
        
@@ -946,7 +997,9 @@ static int dvbdmx_allocate_section_feed(struct dmx_demux *demux,
        dvbdmxfeed->cb.sec=callback;
        dvbdmxfeed->demux=dvbdmx;
        dvbdmxfeed->pid=0xffff;
-       dvbdmxfeed->feed.sec.secbufp=0;
+       dvbdmxfeed->feed.sec.secbuf = dvbdmxfeed->feed.sec.secbuf_base;
+       dvbdmxfeed->feed.sec.secbufp = dvbdmxfeed->feed.sec.seclen = 0;
+       dvbdmxfeed->feed.sec.tsfeedp = 0;
        dvbdmxfeed->filter=0;
        dvbdmxfeed->buffer=0;
 
@@ -970,7 +1023,6 @@ static int dvbdmx_release_section_feed(struct dmx_demux *demux,
 {
        struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) feed;
        struct dvb_demux *dvbdmx=(struct dvb_demux *) demux;
-       struct list_head *pos, *n, *head=&dvbdmx->feed_list;
 
        if (down_interruptible (&dvbdmx->mutex))
                return -ERESTARTSYS;
@@ -987,15 +1039,9 @@ static int dvbdmx_release_section_feed(struct dmx_demux *demux,
 #endif
        dvbdmxfeed->state=DMX_STATE_FREE;
 
-       if (dvbdmxfeed->pid <= DMX_MAX_PID) {
-               list_for_each_safe(pos, n, head) {
-                       if (DMX_FEED_ENTRY(pos)->pid == dvbdmxfeed->pid) {
-                               list_del(pos);
-                               break;
-                       }
-               }
+       dvb_demux_feed_del(dvbdmxfeed);
+
                dvbdmxfeed->pid = 0xffff;
-       }
 
        up(&dvbdmx->mutex);
        return 0;
index 742f53e..98acadb 100644 (file)
@@ -127,7 +127,7 @@ struct dvb_demux {
 
 #define DMX_MAX_PID 0x2000
        struct list_head feed_list;
-        u8 tsbuf[188];
+        u8 tsbuf[204];
         int tsbufp;
 
        struct semaphore mutex;
@@ -140,6 +140,7 @@ int dvb_dmx_release(struct dvb_demux *dvbdemux);
 void dvb_dmx_swfilter_packet(struct dvb_demux *dvbdmx, const u8 *buf);
 void dvb_dmx_swfilter_packets(struct dvb_demux *dvbdmx, const u8 *buf, size_t count);
 void dvb_dmx_swfilter(struct dvb_demux *demux, const u8 *buf, size_t count);
+void dvb_dmx_swfilter_204(struct dvb_demux *demux, const u8 *buf, size_t count);
 
 int dvbdmx_connect_frontend(struct dmx_demux *demux, struct dmx_frontend *frontend);
 int dvbdmx_disconnect_frontend(struct dmx_demux *demux);
index a9e8125..829c438 100644 (file)
@@ -564,14 +564,18 @@ void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, unsigned short pid,
        p2ts->priv=priv;
 }
 
-int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes, int len)
+int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
+                     int len, int payload_start)
 {
        unsigned char *buf=p2ts->buf;
        int ret=0, rest;
        
        //len=6+((pes[4]<<8)|pes[5]);
 
+       if (payload_start)
        buf[1]|=0x40;
+       else
+               buf[1]&=~0x40;
        while (len>=184) {
                buf[3]=0x10|((p2ts->cc++)&0x0f);
                memcpy(buf+4, pes, 184);
index 109c691..e55f80c 100644 (file)
@@ -37,7 +37,8 @@ struct dvb_filter_pes2ts {
 void dvb_filter_pes2ts_init(struct dvb_filter_pes2ts *p2ts, unsigned short pid, 
                            dvb_filter_pes2ts_cb_t *cb, void *priv);
 
-int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes, int len);
+int dvb_filter_pes2ts(struct dvb_filter_pes2ts *p2ts, unsigned char *pes,
+                     int len, int payload_start);
 
 
 #define PROG_STREAM_MAP  0xBC
index 7be068a..fd4989f 100644 (file)
@@ -51,6 +51,7 @@ static int register_i2c_client (struct dvb_i2c_bus *i2c, struct dvb_i2c_device *
 
        client->detach = dev->detach;
        client->owner = dev->owner;
+       client->data = dev->data;
 
        INIT_LIST_HEAD(&client->list_head);
 
index ccc0de7..6b471c4 100644 (file)
@@ -18,6 +18,7 @@ EXPORT_SYMBOL(dvb_dmx_release);
 EXPORT_SYMBOL(dvb_dmx_swfilter_packet);
 EXPORT_SYMBOL(dvb_dmx_swfilter_packets);
 EXPORT_SYMBOL(dvb_dmx_swfilter);
+EXPORT_SYMBOL(dvb_dmx_swfilter_204);
 EXPORT_SYMBOL(dvbdmx_connect_frontend);
 EXPORT_SYMBOL(dvbdmx_disconnect_frontend);
 
index 8667421..c2fa6e0 100644 (file)
@@ -9,24 +9,18 @@
  *                       & Marcus Metzler for convergence integrated media GmbH
  *
  * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
  * of the License, or (at your option) any later version.
  * 
- *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- * 
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
+ * You should have received a copy of the GNU Lesser General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
- * 
- *
- * the project's page is at http://www.linuxtv.org/dvb/
  */
 
 
@@ -167,11 +161,11 @@ ssize_t dvb_ringbuffer_write(struct dvb_ringbuffer *rbuf, const u8 *buf,
 }
 
 
-EXPORT_SYMBOL_GPL(dvb_ringbuffer_init);
-EXPORT_SYMBOL_GPL(dvb_ringbuffer_empty);
-EXPORT_SYMBOL_GPL(dvb_ringbuffer_free);
-EXPORT_SYMBOL_GPL(dvb_ringbuffer_avail);
-EXPORT_SYMBOL_GPL(dvb_ringbuffer_flush);
-EXPORT_SYMBOL_GPL(dvb_ringbuffer_flush_spinlock_wakeup);
-EXPORT_SYMBOL_GPL(dvb_ringbuffer_read);
-EXPORT_SYMBOL_GPL(dvb_ringbuffer_write);
+EXPORT_SYMBOL(dvb_ringbuffer_init);
+EXPORT_SYMBOL(dvb_ringbuffer_empty);
+EXPORT_SYMBOL(dvb_ringbuffer_free);
+EXPORT_SYMBOL(dvb_ringbuffer_avail);
+EXPORT_SYMBOL(dvb_ringbuffer_flush);
+EXPORT_SYMBOL(dvb_ringbuffer_flush_spinlock_wakeup);
+EXPORT_SYMBOL(dvb_ringbuffer_read);
+EXPORT_SYMBOL(dvb_ringbuffer_write);
index d0f7916..9e6feeb 100644 (file)
@@ -16,7 +16,7 @@
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * GNU Lesser General Public License for more details.
  * 
  * You should have received a copy of the GNU Lesser General Public License
  * along with this program; if not, write to the Free Software
index 685cc58..5c335a8 100644 (file)
@@ -1,6 +1,17 @@
 comment "Supported Frontend Modules"
        depends on DVB
 
+config DVB_TWINHAN_DST
+       tristate "TWINHAN DST based DVB-S frontend (QPSK)"
+       depends on DVB_CORE
+       help
+         Used in such cards as the VP-1020/1030, Twinhan DST,
+         VVmer TV@SAT. Say Y when you want to support frontends 
+         using this asic.
+
+         This module requires the dvb-bt8xx driver and dvb bt878
+         module.
+
 config DVB_STV0299
        tristate "STV0299 based DVB-S frontend (QPSK)"
        depends on DVB_CORE
@@ -145,3 +156,19 @@ config DVB_TDA1004X_FIRMWARE_FILE
             wget http://www.technotrend.de/new/215/TTweb_215a_budget_20_05_2003.zip
             unzip -j TTweb_215a_budget_20_05_2003.zip Software/Oem/PCI/App/ttlcdacc.dll
             mv ttlcdacc.dll /etc/dvb/tda1004x.bin
+
+config DVB_SP887X_FIRMWARE_FILE
+        string "Full pathname of sp887x firmware file"
+        depends on DVB_SP887X
+        default "/etc/dvb/sc_main.mc"
+        help
+          This driver needs a copy of the Avermedia firmware. The version tested
+         is part of the Avermedia DVB-T 1.3.26.3 Application. This can be downloaded
+         from the Avermedia web site.
+         If the software is installed in Windows the file will be in the
+         /Program Files/AVerTV DVB-T/ directory and is called sc_main.mc.
+         Alternatively it can "extracted" from the install cab files but this will have
+         to be done in windows as I don't know of a linux version of extract.exe.
+         Copy this file to /etc/dvb/sc_main.mc. With this version of the file the first
+         10 bytes are discarded and the next 0x4000 loaded. This may change in future
+         versions.
index fb93c2a..7dc5905 100644 (file)
@@ -4,6 +4,7 @@
 
 EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/
 
+obj-$(CONFIG_DVB_TWINHAN_DST) += dst.o
 obj-$(CONFIG_DVB_STV0299) += stv0299.o
 obj-$(CONFIG_DVB_ALPS_TDLB7) += alps_tdlb7.o
 obj-$(CONFIG_DVB_ALPS_TDMB7) += alps_tdmb7.o
index 749de1a..b5ba207 100644 (file)
@@ -159,7 +159,7 @@ static int cx22700_init (struct dvb_i2c_bus *i2c)
        cx22700_writereg (i2c, 0x00, 0x02);   /*  soft reset */
        cx22700_writereg (i2c, 0x00, 0x00);
 
-       dvb_delay (HZ/100);
+       dvb_delay(10);
        
        for (i=0; i<sizeof(init_tab); i+=2)
                cx22700_writereg (i2c, init_tab[i], init_tab[i+1]);
@@ -281,15 +281,15 @@ static int cx22700_get_tps (struct dvb_i2c_bus *i2c, struct dvb_ofdm_parameters
 
        val = cx22700_readreg (i2c, 0x02);
 
-       if ((val >> 3) > 4)
+       if (((val >> 3) & 0x07) > 4)
                p->code_rate_HP = FEC_AUTO;
        else
-               p->code_rate_HP = fec_tab[val >> 3];
+               p->code_rate_HP = fec_tab[(val >> 3) & 0x07];
 
-       if ((val & 0x7) > 4)
+       if ((val & 0x07) > 4)
                p->code_rate_LP = FEC_AUTO;
        else
-               p->code_rate_LP = fec_tab[val >> 3];
+               p->code_rate_LP = fec_tab[val & 0x07];
 
 
        val = cx22700_readreg (i2c, 0x03);
@@ -333,7 +333,7 @@ static int tdmb7_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
                if (sync & 0x10)
                        *status |= FE_HAS_SYNC;
 
-               if (sync & 0x10)
+               if (*status == 0x0f)
                        *status |= FE_HAS_LOCK;
 
                break;
index b523c58..16629ef 100644 (file)
@@ -4,7 +4,8 @@
  * Atmel DVB-C Frontend Driver (at76c651/dat7021)
  *
  * Copyright (C) 2001 fnbrd <fnbrd@gmx.de>
- *             & 2002 Andreas Oberritter <andreas@oberritter.de>
+ *             & 2002 Andreas Oberritter <obi@linuxtv.org>
+ *             & 2003 Wolfram Joost <dbox2@frokaschwei.de>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -524,6 +525,6 @@ module_init(at76c651_init);
 module_exit(at76c651_exit);
 
 MODULE_DESCRIPTION("at76c651/dat7021 dvb-c frontend driver");
-MODULE_AUTHOR("Andreas Oberritter <andreas@oberritter.de>");
+MODULE_AUTHOR("Andreas Oberritter <obi@linuxtv.org>");
 MODULE_LICENSE("GPL");
 MODULE_PARM(debug, "i");
index 303ada3..d429bd3 100644 (file)
@@ -248,7 +248,7 @@ static int cx24108_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq)
         cx24108_write(i2c,pll);
         cx24110_writereg(i2c,0x56,0x7f);
 
-       dvb_delay(HZ/10); /* wait a moment for the tuner pll to lock */
+       dvb_delay(10); /* wait a moment for the tuner pll to lock */
 
        /* tuner pll lock can be monitored on GPIO pin 4 of cx24110 */
         while (!(cx24110_readreg(i2c,0x66)&0x20)&&i<1000)
diff --git a/drivers/media/dvb/frontends/dst-bt878.h b/drivers/media/dvb/frontends/dst-bt878.h
new file mode 100644 (file)
index 0000000..5c63d29
--- /dev/null
@@ -0,0 +1,38 @@
+/*
+ * dst-bt878.h: part of the DST driver for the TwinHan DST Frontend
+ *
+ * Copyright (C) 2003 Jamie Honan
+ */
+
+struct dst_gpio_enable {
+       u32     mask;
+       u32     enable;
+};
+
+struct dst_gpio_output {
+       u32     mask;
+       u32     highvals;
+};
+
+struct dst_gpio_read {
+       unsigned long value;
+};
+
+union dst_gpio_packet {
+       struct dst_gpio_enable enb;
+       struct dst_gpio_output outp;
+       struct dst_gpio_read rd;
+       int    psize;
+};
+
+#define DST_IG_ENABLE  0
+#define DST_IG_WRITE   1
+#define DST_IG_READ    2
+#define DST_IG_TS       3
+
+struct bt878 ;
+
+int
+bt878_device_control(struct bt878 *bt, unsigned int cmd, union dst_gpio_packet *mp);
+
+struct bt878 *bt878_find_by_dvb_adap(struct dvb_adapter *adap);
diff --git a/drivers/media/dvb/frontends/dst.c b/drivers/media/dvb/frontends/dst.c
new file mode 100644 (file)
index 0000000..8bafa8a
--- /dev/null
@@ -0,0 +1,1191 @@
+/* 
+    Frontend-driver for TwinHan DST Frontend
+
+    Copyright (C) 2003 Jamie Honan
+
+
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/    
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <asm/div64.h>
+#include <asm/delay.h>
+
+#include "dvb_frontend.h"
+#include "dvb_functions.h"
+#include "dst-bt878.h"
+
+unsigned int dst_debug = 0;
+unsigned int dst_verbose = 0;
+
+MODULE_PARM(dst_verbose, "i");
+MODULE_PARM_DESC(dst_verbose,
+                "verbose startup messages, default is 1 (yes)");
+MODULE_PARM(dst_debug, "i");
+MODULE_PARM_DESC(dst_debug, "debug messages, default is 0 (no)");
+
+#define DST_MAX_CARDS  6
+unsigned int dst_cur_no = 0;
+
+unsigned int dst_type[DST_MAX_CARDS] = { [0 ... (DST_MAX_CARDS-1)] = (-1U)};
+unsigned int dst_type_flags[DST_MAX_CARDS] = { [0 ... (DST_MAX_CARDS-1)] = (-1U)};
+MODULE_PARM(dst_type, "1-" __stringify(DST_MAX_CARDS) "i");
+MODULE_PARM_DESC(dst_type,
+               "Type of DST card, 0 Satellite, 1 terrestial TV, 2 Cable, default driver determined");
+MODULE_PARM(dst_type_flags, "1-" __stringify(DST_MAX_CARDS) "i");
+MODULE_PARM_DESC(dst_type_flags,
+               "Type flags of DST card, bitfield 1=10 byte tuner, 2=TS is 204, 4=symdiv");
+
+#define dprintk        if (dst_debug) printk
+
+#define DST_TYPE_IS_SAT                0
+#define DST_TYPE_IS_TERR       1
+#define DST_TYPE_IS_CABLE      2
+
+#define DST_TYPE_HAS_NEWTUNE   1
+#define DST_TYPE_HAS_TS204     2
+#define DST_TYPE_HAS_SYMDIV    4
+
+#define HAS_LOCK       1
+#define ATTEMPT_TUNE   2
+#define HAS_POWER      4
+
+struct dst_data {
+       u8      tx_tuna[10];
+       u8      rx_tuna[10];
+       u8      rxbuffer[10];
+       u8      diseq_flags;
+       u8      dst_type;
+       u32     type_flags;
+       u32 frequency;     /* intermediate frequency in kHz for QPSK */
+        fe_spectral_inversion_t inversion;
+        u32   symbol_rate;  /* symbol rate in Symbols per second */
+       fe_code_rate_t  fec;
+       fe_sec_voltage_t voltage;
+       fe_sec_tone_mode_t tone;
+       u32 decode_freq;
+       u8  decode_lock;
+       u16 decode_strength;
+       u16 decode_snr;
+       unsigned long cur_jiff;
+       u8  k22;
+       fe_bandwidth_t bandwidth;
+       struct bt878 *bt;
+       struct dvb_i2c_bus *i2c;
+} ;
+
+static struct dvb_frontend_info dst_info_sat = {
+       .name                   = "DST SAT",
+       .type                   = FE_QPSK,
+       .frequency_min          = 950000,
+       .frequency_max          = 2150000,
+       .frequency_stepsize     = 1000,           /* kHz for QPSK frontends */
+       .frequency_tolerance    = 29500,
+       .symbol_rate_min        = 1000000,
+       .symbol_rate_max        = 45000000,
+/*     . symbol_rate_tolerance =       ???,*/
+       .notifier_delay         = 50,                /* 1/20 s */
+       .caps = FE_CAN_FEC_AUTO |
+               FE_CAN_QPSK
+};
+
+static struct dvb_frontend_info dst_info_cable = {
+       .name                   = "DST CABLE",
+       .type                   = FE_QAM,
+        .frequency_stepsize    = 62500,
+       .frequency_min          = 51000000,
+       .frequency_max          = 858000000,
+       .symbol_rate_min        = 1000000,
+       .symbol_rate_max        = 45000000,
+/*     . symbol_rate_tolerance =       ???,*/
+       .notifier_delay         = 50,                /* 1/20 s */
+       .caps = FE_CAN_FEC_AUTO |
+               FE_CAN_QAM_AUTO
+};
+
+static struct dvb_frontend_info dst_info_tv = {
+       .name                   = "DST TERR",
+       .type                   = FE_OFDM,
+       .frequency_min          = 137000000,
+       .frequency_max          = 858000000,
+       .frequency_stepsize     = 166667,
+       .caps = FE_CAN_FEC_AUTO |
+           FE_CAN_QAM_AUTO |
+           FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO
+};
+
+static void dst_packsize(struct dst_data *dst, int psize)
+{
+       union dst_gpio_packet bits;
+
+       bits.psize = psize;
+       bt878_device_control(dst->bt, DST_IG_TS, &bits);
+}
+
+static int dst_gpio_outb(struct dst_data *dst, u32 mask, u32 enbb, u32 outhigh)
+{
+       union dst_gpio_packet enb;
+       union dst_gpio_packet bits;
+       int err;
+
+       enb.enb.mask = mask;
+       enb.enb.enable = enbb;
+        if ((err = bt878_device_control(dst->bt, DST_IG_ENABLE, &enb)) < 0) {
+               dprintk ("%s: dst_gpio_enb error (err == %i, mask == 0x%02x, enb == 0x%02x)\n", __FUNCTION__, err, mask, enbb);
+               return -EREMOTEIO;
+       }
+
+       /* because complete disabling means no output, no need to do
+        * output packet */
+       if (enbb == 0)
+               return 0;
+
+       bits.outp.mask = enbb;
+       bits.outp.highvals = outhigh;
+
+        if ((err = bt878_device_control(dst->bt, DST_IG_WRITE, &bits)) < 0) {
+               dprintk ("%s: dst_gpio_outb error (err == %i, enbb == 0x%02x, outhigh == 0x%02x)\n", __FUNCTION__, err, enbb, outhigh);
+               return -EREMOTEIO;
+       }
+        return 0;
+}
+
+static int dst_gpio_inb(struct dst_data *dst, u8 *result)
+{
+       union dst_gpio_packet rd_packet;
+       int err;
+
+       *result = 0;
+
+        if ((err = bt878_device_control(dst->bt, DST_IG_READ, &rd_packet)) < 0) {
+               dprintk ("%s: dst_gpio_inb error (err == %i)\n", __FUNCTION__, err);
+               return -EREMOTEIO;
+       }
+       *result = (u8)rd_packet.rd.value;
+        return 0;
+}
+
+#define DST_I2C_ENABLE 1
+#define DST_8820       2
+
+static int
+dst_reset8820(struct dst_data *dst)
+{
+int retval;
+       /* pull 8820 gpio pin low, wait, high, wait, then low */
+       // dprintk ("%s: reset 8820\n", __FUNCTION__);
+       retval = dst_gpio_outb(dst, DST_8820, DST_8820, 0);
+       if (retval < 0)
+               return retval;
+       dvb_delay(10);
+       retval = dst_gpio_outb(dst, DST_8820, DST_8820, DST_8820);
+       if (retval < 0)
+               return retval;
+       /* wait for more feedback on what works here *
+       dvb_delay(10);
+       retval = dst_gpio_outb(dst, DST_8820, DST_8820, 0);
+       if (retval < 0)
+               return retval;
+       */
+       return 0;
+}
+
+static int
+dst_i2c_enable(struct dst_data *dst)
+{
+int retval;
+       /* pull I2C enable gpio pin low, wait */
+       // dprintk ("%s: i2c enable\n", __FUNCTION__);
+       retval = dst_gpio_outb(dst, ~0, DST_I2C_ENABLE, 0);
+       if (retval < 0)
+               return retval;
+       // dprintk ("%s: i2c enable delay\n", __FUNCTION__);
+       dvb_delay(33);
+       return 0;
+}
+
+static int
+dst_i2c_disable(struct dst_data *dst)
+{
+int retval;
+       /* release I2C enable gpio pin, wait */
+       // dprintk ("%s: i2c disable\n", __FUNCTION__);
+       retval = dst_gpio_outb(dst, ~0, 0, 0);
+       if (retval < 0)
+               return retval;
+       // dprintk ("%s: i2c disable delay\n", __FUNCTION__);
+       dvb_delay(33);
+       return 0;
+}
+
+static int
+dst_wait_dst_ready(struct dst_data *dst)
+{
+u8 reply;
+int retval;
+int i;
+       for (i = 0; i < 200; i++) {
+               retval = dst_gpio_inb(dst, &reply);
+               if (retval < 0)
+                       return retval;
+               if ((reply & DST_I2C_ENABLE) == 0) {
+                       dprintk ("%s: dst wait ready after %d\n", __FUNCTION__, i);
+                       return 1;
+               }
+               dvb_delay(5);
+       }
+       dprintk ("%s: dst wait NOT ready after %d\n", __FUNCTION__, i);
+       return 0;
+}
+
+#define DST_I2C_ADDR 0x55
+
+static int write_dst (struct dst_data *dst, u8 *data, u8 len)
+{
+       struct i2c_msg msg = {
+               .addr = DST_I2C_ADDR, .flags = 0, .buf = data, .len = len };
+       int err;
+       int cnt;
+
+       if (dst_debug && dst_verbose) {
+               u8 i;
+               dprintk("%s writing",__FUNCTION__);
+               for (i = 0 ; i < len ; i++) {
+                       dprintk(" 0x%02x", data[i]);
+               }
+               dprintk("\n");
+       }
+       dvb_delay(30);
+       for (cnt = 0; cnt < 4; cnt++) {
+               if ((err = dst->i2c->xfer (dst->i2c, &msg, 1)) < 0) {
+                       dprintk ("%s: write_dst error (err == %i, len == 0x%02x, b0 == 0x%02x)\n", __FUNCTION__, err, len, data[0]);
+                       dst_i2c_disable(dst);
+                       dvb_delay(500);
+                       dst_i2c_enable(dst);
+                       dvb_delay(500);
+                       continue;
+               } else
+                       break;
+       }
+       if (cnt >= 4)
+               return -EREMOTEIO;
+        return 0;
+}
+
+static int read_dst (struct dst_data *dst, u8 *ret, u8 len)
+{
+       struct i2c_msg msg = 
+               { .addr = DST_I2C_ADDR, .flags = I2C_M_RD, .buf = ret, .len = len };
+       int err;
+       int cnt;
+
+       for (cnt = 0; cnt < 4; cnt++) {
+               if ((err = dst->i2c->xfer (dst->i2c, &msg, 1)) < 0) {
+                       dprintk ("%s: read_dst error (err == %i, len == 0x%02x, b0 == 0x%02x)\n", __FUNCTION__, err, len, ret[0]);
+                       dst_i2c_disable(dst);
+                       dst_i2c_enable(dst);
+                       continue;
+               } else
+                       break;
+       }
+       if (cnt >= 4)
+               return -EREMOTEIO;
+       dprintk("%s reply is 0x%x\n", __FUNCTION__, ret[0]);
+       if (dst_debug && dst_verbose) {
+               for (err = 1; err < len; err++)
+                       dprintk(" 0x%x", ret[err]);
+               if (err > 1)
+                       dprintk("\n");
+       }
+       return 0;
+}
+
+static int dst_set_freq(struct dst_data *dst, u32 freq)
+{
+       u8 *val;
+
+       dst->frequency = freq;
+
+       // dprintk("%s: set frequency %u\n", __FUNCTION__, freq);
+       if (dst->dst_type == DST_TYPE_IS_SAT) {
+               freq = freq / 1000;
+               if (freq < 950 || freq > 2150)
+                       return -EINVAL;
+               val = &dst->tx_tuna[0];
+               val[2] = (freq >> 8) & 0x7f;
+               val[3] = (u8)freq;
+               val[4] = 1;
+               val[8] &= ~4;
+               if (freq < 1531)
+                       val[8] |= 4;
+       } else if (dst->dst_type == DST_TYPE_IS_TERR) {
+               freq = freq / 1000;
+               if (freq < 137000 || freq > 858000)
+                       return -EINVAL;
+               val = &dst->tx_tuna[0];
+               val[2] = (freq >> 16) & 0xff;
+               val[3] = (freq >> 8) & 0xff;
+               val[4] = (u8)freq;
+               val[5] = 0;
+               switch (dst->bandwidth) {
+               case BANDWIDTH_6_MHZ:
+                       val[6] = 6;
+                       break;
+
+               case BANDWIDTH_7_MHZ:
+               case BANDWIDTH_AUTO:
+                       val[6] = 7;
+                       break;
+
+               case BANDWIDTH_8_MHZ:
+                       val[6] = 8;
+                       break;
+               }
+
+               val[7] = 0;
+               val[8] = 0;
+       } else if (dst->dst_type == DST_TYPE_IS_CABLE) {
+               /* guess till will get one */
+               freq = freq / 1000;
+               val = &dst->tx_tuna[0];
+               val[2] = (freq >> 16) & 0xff;
+               val[3] = (freq >> 8) & 0xff;
+               val[4] = (u8)freq;
+       } else
+               return -EINVAL;
+       return 0;
+}
+
+static int dst_set_bandwidth(struct dst_data *dst, fe_bandwidth_t bandwidth)
+{
+       u8 *val;
+
+       dst->bandwidth = bandwidth;
+
+       if (dst->dst_type != DST_TYPE_IS_TERR)
+               return 0;
+
+       val = &dst->tx_tuna[0];
+        switch (bandwidth) {
+       case BANDWIDTH_6_MHZ:
+               val[6] = 6;
+               break;
+
+       case BANDWIDTH_7_MHZ:
+               val[6] = 7;
+               break;
+
+       case BANDWIDTH_8_MHZ:
+               val[6] = 8;
+               break;
+
+       default:
+               return -EINVAL;
+       }
+       return 0;
+}
+
+static int dst_set_inversion (struct dst_data *dst, fe_spectral_inversion_t inversion)
+{
+       u8 *val;
+
+       dst->inversion = inversion;
+
+       val = &dst->tx_tuna[0];
+
+       val[8] &= ~0x80;
+
+       switch (inversion) {
+       case INVERSION_OFF:
+               break;
+       case INVERSION_ON:
+               val[8] |= 0x80;
+               break;
+       default:
+               return -EINVAL;
+       }
+       return 0;
+}
+
+
+static int dst_set_fec (struct dst_data *dst, fe_code_rate_t fec)
+{
+       dst->fec = fec;
+       return 0;
+}
+
+static fe_code_rate_t dst_get_fec (struct dst_data *dst)
+{
+       return dst->fec;
+}
+
+static int dst_set_symbolrate (struct dst_data *dst, u32 srate)
+{
+       u8 *val;
+       u32 symcalc;
+       u64 sval;
+
+       dst->symbol_rate = srate;
+
+       if (dst->dst_type == DST_TYPE_IS_TERR) {
+               return 0;
+       }
+
+       // dprintk("%s: set srate %u\n", __FUNCTION__, srate);
+       srate /= 1000;
+       val = &dst->tx_tuna[0];
+
+       if (dst->type_flags & DST_TYPE_HAS_SYMDIV) {
+               sval = srate;
+               sval <<= 20;
+               do_div(sval, 88000);
+               symcalc = (u32)sval;
+               // dprintk("%s: set symcalc %u\n", __FUNCTION__, symcalc);
+               val[5] = (u8)(symcalc >> 12);
+               val[6] = (u8)(symcalc >> 4);
+               val[7] = (u8)(symcalc << 4);
+       } else {
+               val[5] = (u8)(srate >> 16) & 0x7f;
+               val[6] = (u8)(srate >> 8);
+               val[7] = (u8)srate;
+       }
+       val[8] &= ~0x20;
+       if (srate > 8000)
+               val[8] |= 0x20;
+       return 0;
+}
+
+
+static u8 dst_check_sum(u8 *buf, u32 len)
+{
+       u32 i;
+       u8  val = 0;
+       if (!len)
+               return 0;
+       for (i = 0; i < len; i++) {
+               val += buf[i];
+       }
+       return ((~val) + 1);
+}
+
+typedef struct dst_types {
+       char    *mstr;
+       int     offs;
+       u8      dst_type;
+       u32     type_flags;
+} DST_TYPES;
+
+struct dst_types dst_tlist[] = {
+       { "DST-020", 0,  DST_TYPE_IS_SAT,    DST_TYPE_HAS_SYMDIV },
+       { "DST-030", 0,  DST_TYPE_IS_SAT,    DST_TYPE_HAS_TS204|DST_TYPE_HAS_NEWTUNE },
+       { "DST-03T", 0,  DST_TYPE_IS_SAT,    DST_TYPE_HAS_SYMDIV|DST_TYPE_HAS_TS204},
+       { "DST-MOT", 0,  DST_TYPE_IS_SAT,    DST_TYPE_HAS_SYMDIV },
+       { "DST-CI",  1,  DST_TYPE_IS_SAT,    DST_TYPE_HAS_TS204|DST_TYPE_HAS_NEWTUNE },
+       { "DSTMCI",  1,  DST_TYPE_IS_SAT,    DST_TYPE_HAS_NEWTUNE },
+       { "DSTFCI",  1,  DST_TYPE_IS_SAT,    DST_TYPE_HAS_NEWTUNE },
+       { "DCTNEW",  1,  DST_TYPE_IS_CABLE,  DST_TYPE_HAS_NEWTUNE },
+       { "DCT_CI",  1,  DST_TYPE_IS_CABLE,  DST_TYPE_HAS_NEWTUNE|DST_TYPE_HAS_TS204 },
+       { "DTTDIG" , 1,  DST_TYPE_IS_TERR,   0} };
+/* DCTNEW and DCT-CI are guesses */
+
+static void dst_type_flags_print(u32 type_flags)
+{
+       printk("DST type flags :");
+       if (type_flags & DST_TYPE_HAS_NEWTUNE)
+               printk(" 0x%x newtuner", DST_TYPE_HAS_NEWTUNE);
+       if (type_flags & DST_TYPE_HAS_TS204)
+               printk(" 0x%x ts204", DST_TYPE_HAS_TS204);
+       if (type_flags & DST_TYPE_HAS_SYMDIV)
+               printk(" 0x%x symdiv", DST_TYPE_HAS_SYMDIV);
+       printk("\n");
+}
+
+static int dst_type_print(u8 type)
+{
+       char *otype;
+       switch (type) {
+               case DST_TYPE_IS_SAT:
+                       otype = "satellite";
+                       break;
+               case DST_TYPE_IS_TERR:
+                       otype = "terrestial TV";
+                       break;
+               case DST_TYPE_IS_CABLE:
+                       otype = "terrestial TV";
+                       break;
+               default:
+                       printk("%s: invalid dst type %d\n",
+                               __FUNCTION__, type);
+                       return -EINVAL;
+       }
+       printk("DST type : %s\n", otype);
+       return 0;
+}
+
+static int dst_check_ci (struct dst_data *dst)
+{
+       u8 txbuf[8];
+       u8 rxbuf[8];
+       int retval;
+       int i;
+       struct dst_types *dsp;
+       u8 use_dst_type;
+       u32 use_type_flags;
+
+       memset(txbuf, 0, sizeof(txbuf));
+       txbuf[1] = 6;
+       txbuf[7] = dst_check_sum (txbuf, 7);
+       dst_i2c_enable(dst);
+       dst_reset8820(dst);
+       retval = write_dst (dst, txbuf, 8);
+       if (retval < 0) {
+               dst_i2c_disable(dst);
+               dprintk("%s: write not successful, maybe no card?\n", __FUNCTION__);
+               return retval;
+       }
+       dvb_delay(3);
+       retval = read_dst (dst, rxbuf, 1);
+       dst_i2c_disable(dst);
+       if (retval < 0) {
+               dprintk("%s: read not successful, maybe no card?\n", __FUNCTION__);
+               return retval;
+       }
+       if (rxbuf[0] != 0xff) {
+               dprintk("%s: write reply not 0xff, not ci (%02x)\n", __FUNCTION__, rxbuf[0]);
+               return retval;
+       }
+       if (!dst_wait_dst_ready(dst))
+               return 0;
+       // dst_i2c_enable(i2c); Dimitri
+       retval = read_dst (dst, rxbuf, 8);
+       dst_i2c_disable(dst);
+       if (retval < 0) {
+               dprintk("%s: read not successful\n", __FUNCTION__);
+               return retval;
+       }
+       if (rxbuf[7] != dst_check_sum (rxbuf, 7)) {
+               dprintk("%s: checksum failure\n", __FUNCTION__);
+               return retval;
+       }
+       rxbuf[7] = '\0';
+       for (i = 0, dsp = &dst_tlist[0]; i < sizeof(dst_tlist) / sizeof(dst_tlist[0]); i++, dsp++) {
+               if (!strncmp(&rxbuf[dsp->offs],
+                               dsp->mstr,
+                               strlen(dsp->mstr))) {
+                       use_type_flags = dsp->type_flags;
+                       use_dst_type = dsp->dst_type;
+                       printk("%s: recognize %s\n", __FUNCTION__, dsp->mstr);
+                       break;
+               }
+       }
+       if (i >= sizeof(dst_tlist) / sizeof(dst_tlist[0])) {
+               printk("%s: unable to recognize %s or %s\n", __FUNCTION__, &rxbuf[0], &rxbuf[1]);
+               printk("%s please email linux-dvb@linuxtv.org with this type in\n", __FUNCTION__);
+               use_dst_type = DST_TYPE_IS_SAT;
+               use_type_flags = DST_TYPE_HAS_SYMDIV;
+       }
+       switch (dst_type[dst_cur_no]) {
+               case (-1U):
+                       /* not used */
+                       break;
+               case DST_TYPE_IS_SAT:
+               case DST_TYPE_IS_TERR:
+               case DST_TYPE_IS_CABLE:
+                       use_dst_type = (u8)(dst_type[dst_cur_no]);
+                       break;
+               default:
+                       printk("%s: invalid user override dst type %d, not used\n",
+                               __FUNCTION__, dst_type[dst_cur_no]);
+                       break;
+       }
+       dst_type_print(use_dst_type);
+       if (dst_type_flags[dst_cur_no] != (-1U)) {
+               printk("%s: user override dst type flags 0x%x\n",
+                               __FUNCTION__, dst_type_flags[dst_cur_no]);
+               use_type_flags = dst_type_flags[dst_cur_no];
+       }
+       dst->type_flags = use_type_flags;
+       dst->dst_type= use_dst_type;
+       dst_type_flags_print(dst->type_flags);
+
+       if (dst->type_flags & DST_TYPE_HAS_TS204) {
+               dst_packsize(dst, 204);
+       }
+       return 0;
+}
+
+static int dst_command (struct dst_data *dst, u8 *data, u8 len)
+{
+       int retval;
+       u8 reply;
+
+       dst_i2c_enable(dst);
+       dst_reset8820(dst);
+       retval = write_dst (dst, data, len);
+       if (retval < 0) {
+               dst_i2c_disable(dst);
+               dprintk("%s: write not successful\n", __FUNCTION__);
+               return retval;
+       }
+       dvb_delay(33);
+       retval = read_dst (dst, &reply, 1);
+       dst_i2c_disable(dst);
+       if (retval < 0) {
+               dprintk("%s: read verify  not successful\n", __FUNCTION__);
+               return retval;
+       }
+       if (reply != 0xff) {
+               dprintk("%s: write reply not 0xff 0x%02x \n", __FUNCTION__, reply);
+               return 0;
+       }
+       if (len >= 2 && data[0] == 0 && (data[1] == 1 || data[1] == 3))
+               return 0;
+       if (!dst_wait_dst_ready(dst))
+               return 0;
+       // dst_i2c_enable(i2c); Per dimitri
+       retval = read_dst (dst, dst->rxbuffer, 8);
+       dst_i2c_disable(dst);
+       if (retval < 0) {
+               dprintk("%s: read not successful\n", __FUNCTION__);
+               return 0;
+       }
+       if (dst->rxbuffer[7] != dst_check_sum (dst->rxbuffer, 7)) {
+               dprintk("%s: checksum failure\n", __FUNCTION__);
+               return 0;
+       }
+       return 0;
+}
+
+static int dst_get_signal(struct dst_data *dst)
+{
+       int retval;
+       u8 get_signal[] = {0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfb};
+
+       if ((dst->diseq_flags & ATTEMPT_TUNE) == 0) {
+               dst->decode_lock = dst->decode_strength = dst->decode_snr = 0;
+               return 0;
+       }
+       if (0 == (dst->diseq_flags & HAS_LOCK)) {
+               dst->decode_lock = dst->decode_strength = dst->decode_snr = 0;
+               return 0;
+       }
+       if (time_after_eq(jiffies, dst->cur_jiff + (HZ/5))) {
+               retval =  dst_command(dst, get_signal, 8);
+               if (retval < 0)
+                       return retval;
+               if (dst->dst_type == DST_TYPE_IS_SAT) {
+                       dst->decode_lock = ((dst->rxbuffer[6] & 0x10) == 0) ?
+                                       1 : 0;
+                       dst->decode_strength = dst->rxbuffer[5] << 8;
+                       dst->decode_snr = dst->rxbuffer[2] << 8 |
+                               dst->rxbuffer[3];
+               } else if ((dst->dst_type == DST_TYPE_IS_TERR) ||
+                               (dst->dst_type == DST_TYPE_IS_CABLE)) {
+                       dst->decode_lock = (dst->rxbuffer[1]) ?
+                                       1 : 0;
+                       dst->decode_strength = dst->rxbuffer[4] << 8;
+                       dst->decode_snr = dst->rxbuffer[3] << 8;
+               }
+               dst->cur_jiff = jiffies;
+       }
+       return 0;
+}
+
+/*
+ * line22k0    0x00, 0x09, 0x00, 0xff, 0x01, 0x00, 0x00, 0x00
+ * line22k1    0x00, 0x09, 0x01, 0xff, 0x01, 0x00, 0x00, 0x00
+ * line22k2    0x00, 0x09, 0x02, 0xff, 0x01, 0x00, 0x00, 0x00
+ * tone        0x00, 0x09, 0xff, 0x00, 0x01, 0x00, 0x00, 0x00
+ * data        0x00, 0x09, 0xff, 0x01, 0x01, 0x00, 0x00, 0x00
+ * power_off   0x00, 0x09, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00
+ * power_on    0x00, 0x09, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00
+ * Diseqc 1    0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf0, 0xec
+ * Diseqc 2    0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf4, 0xe8 
+ * Diseqc 3    0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf8, 0xe4 
+ * Diseqc 4    0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xfc, 0xe0 
+ */
+
+static int dst_set_diseqc (struct dst_data *dst, u8 *cmd, u8 len)
+{
+       u8 paket[8] =  {0x00, 0x08, 0x04, 0xe0, 0x10, 0x38, 0xf0, 0xec };
+
+       if (dst->dst_type == DST_TYPE_IS_TERR)
+               return 0;
+
+       if (len == 0 || len > 4)
+               return -EINVAL;
+       memcpy(&paket[3], cmd, len);
+       paket[7] = dst_check_sum (&paket[0], 7);
+       dst_command(dst, paket, 8);
+       return 0;
+}
+
+static int dst_tone_power_cmd (struct dst_data *dst)
+{
+       u8 paket[8] =  {0x00, 0x09, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00};
+
+       if (dst->dst_type == DST_TYPE_IS_TERR)
+               return 0;
+
+       if (dst->voltage == SEC_VOLTAGE_OFF) 
+               paket[4] = 0;
+       else
+               paket[4] = 1;
+       if (dst->tone == SEC_TONE_ON)
+               paket[2] = dst->k22;
+       else
+               paket[2] = 0;
+       paket[7] = dst_check_sum (&paket[0], 7);
+       dst_command(dst, paket, 8);
+       return 0;
+}
+
+static int dst_set_voltage (struct dst_data *dst, fe_sec_voltage_t voltage)
+{
+       u8 *val;
+       int need_cmd;
+
+       dst->voltage = voltage;
+
+       if (dst->dst_type == DST_TYPE_IS_TERR)
+               return 0;
+
+       need_cmd = 0;
+       val = &dst->tx_tuna[0];
+       val[8] &= ~0x40;
+       switch (voltage) {
+       case SEC_VOLTAGE_13:
+               if ((dst->diseq_flags & HAS_POWER) == 0)
+                       need_cmd = 1;
+               dst->diseq_flags |= HAS_POWER;
+               break;
+       case SEC_VOLTAGE_18:
+               if ((dst->diseq_flags & HAS_POWER) == 0)
+                       need_cmd = 1;
+               dst->diseq_flags |= HAS_POWER;
+               val[8] |= 0x40;
+               break;
+       case SEC_VOLTAGE_OFF:
+               need_cmd = 1;
+               dst->diseq_flags &= ~(HAS_POWER|HAS_LOCK|ATTEMPT_TUNE);
+               break;
+       default:
+               return -EINVAL;
+       }
+       if (need_cmd) {
+               dst_tone_power_cmd(dst);
+       }
+       return 0;
+}
+
+
+static int dst_set_tone (struct dst_data *dst, fe_sec_tone_mode_t tone)
+{
+       u8 *val;
+
+       dst->tone = tone;
+
+       if (dst->dst_type == DST_TYPE_IS_TERR)
+               return 0;
+
+       val = &dst->tx_tuna[0];
+
+       val[8] &= ~0x1;
+
+       switch (tone) {
+       case SEC_TONE_OFF:
+               break;
+       case SEC_TONE_ON:
+               val[8] |= 1;
+               break;
+       default:
+               return -EINVAL;
+       }
+       dst_tone_power_cmd(dst);
+       return 0;
+}
+
+static int dst_get_tuna (struct dst_data *dst)
+{
+int retval;
+       if ((dst->diseq_flags & ATTEMPT_TUNE) == 0)
+               return 0;
+       dst->diseq_flags &= ~(HAS_LOCK);
+       if (!dst_wait_dst_ready(dst))
+               return 0;
+       if (dst->type_flags & DST_TYPE_HAS_NEWTUNE) {
+               /* how to get variable length reply ???? */
+               retval = read_dst (dst, dst->rx_tuna, 10);
+       } else {
+               retval = read_dst (dst, &dst->rx_tuna[2], 8);
+       }
+       if (retval < 0) {
+               dprintk("%s: read not successful\n", __FUNCTION__);
+               return 0;
+       }
+       if (dst->type_flags & DST_TYPE_HAS_NEWTUNE) {
+               if (dst->rx_tuna[9] != dst_check_sum (&dst->rx_tuna[0], 9)) {
+                       dprintk("%s: checksum failure?\n", __FUNCTION__);
+                       return 0;
+               }
+       } else {
+               if (dst->rx_tuna[9] != dst_check_sum (&dst->rx_tuna[2], 7)) {
+                       dprintk("%s: checksum failure?\n", __FUNCTION__);
+                       return 0;
+               }
+       }
+       if (dst->rx_tuna[2] == 0 && dst->rx_tuna[3] == 0)
+               return 0;
+       dst->decode_freq = ((dst->rx_tuna[2] & 0x7f) << 8) +  dst->rx_tuna[3];
+
+       dst->decode_lock = 1;
+       /*
+       dst->decode_n1 = (dst->rx_tuna[4] << 8) +  
+                       (dst->rx_tuna[5]);
+
+       dst->decode_n2 = (dst->rx_tuna[8] << 8) +  
+                       (dst->rx_tuna[7]);
+       */
+       dst->diseq_flags |= HAS_LOCK;
+       /* dst->cur_jiff = jiffies; */
+       return 1;
+}
+
+static int dst_write_tuna (struct dst_data *dst)
+{
+       int retval;
+       u8 reply;
+
+       dprintk("%s: type_flags 0x%x \n", __FUNCTION__, dst->type_flags);
+       dst->decode_freq = 0;
+       dst->decode_lock = dst->decode_strength = dst->decode_snr = 0;
+       if (dst->dst_type == DST_TYPE_IS_SAT) {
+               if (!(dst->diseq_flags & HAS_POWER))
+                       dst_set_voltage (dst, SEC_VOLTAGE_13);
+       }
+       dst->diseq_flags &= ~(HAS_LOCK|ATTEMPT_TUNE);
+       dst_i2c_enable(dst);
+       if (dst->type_flags & DST_TYPE_HAS_NEWTUNE) {
+               dst_reset8820(dst);
+               dst->tx_tuna[9] = dst_check_sum (&dst->tx_tuna[0], 9);
+               retval = write_dst (dst, &dst->tx_tuna[0], 10);
+       } else {
+               dst->tx_tuna[9] = dst_check_sum (&dst->tx_tuna[2], 7);
+               retval = write_dst (dst, &dst->tx_tuna[2], 8);
+       }
+       if (retval < 0) {
+               dst_i2c_disable(dst);
+               dprintk("%s: write not successful\n", __FUNCTION__);
+               return retval;
+       }
+       dvb_delay(3);
+       retval = read_dst (dst, &reply, 1);
+       dst_i2c_disable(dst);
+       if (retval < 0) {
+               dprintk("%s: read verify  not successful\n", __FUNCTION__);
+               return retval;
+       }
+       if (reply != 0xff) {
+               dprintk("%s: write reply not 0xff 0x%02x \n", __FUNCTION__, reply);
+               return 0;
+       }
+       dst->diseq_flags |= ATTEMPT_TUNE;
+       return dst_get_tuna(dst);
+}
+
+static void dst_init (struct dst_data *dst)
+{
+static u8 ini_satci_tuna[] = {  9, 0, 3, 0xb6, 1, 0,    0x73, 0x21, 0, 0 };
+static u8 ini_satfta_tuna[] = { 0, 0, 3, 0xb6, 1, 0x55, 0xbd, 0x50, 0, 0 };
+static u8 ini_tvfta_tuna[] = { 0, 0,  3, 0xb6, 1, 7,    0x0,   0x0, 0, 0 };
+static u8 ini_tvci_tuna[] = { 9, 0,  3, 0xb6, 1, 7,    0x0,   0x0, 0, 0 };
+static u8 ini_cabfta_tuna[] = { 0, 0,  3, 0xb6, 1, 7,    0x0,   0x0, 0, 0 };
+static u8 ini_cabci_tuna[] = { 9, 0,  3, 0xb6, 1, 7,    0x0,   0x0, 0, 0 };
+       dst->inversion = INVERSION_ON;
+       dst->voltage = SEC_VOLTAGE_13;
+       dst->tone = SEC_TONE_OFF;
+       dst->symbol_rate = 29473000;
+       dst->fec = FEC_AUTO;
+       dst->diseq_flags = 0;
+       dst->k22 = 0x02;
+       dst->bandwidth = BANDWIDTH_7_MHZ;
+       dst->cur_jiff = jiffies;
+       if (dst->dst_type == DST_TYPE_IS_SAT) {
+               dst->frequency = 950000;
+               memcpy(dst->tx_tuna, ((dst->type_flags &  DST_TYPE_HAS_NEWTUNE )? 
+                                       ini_satci_tuna : ini_satfta_tuna),
+                               sizeof(ini_satfta_tuna));
+       } else if (dst->dst_type == DST_TYPE_IS_TERR) {
+               dst->frequency = 137000000;
+               memcpy(dst->tx_tuna, ((dst->type_flags &  DST_TYPE_HAS_NEWTUNE )? 
+                                       ini_tvci_tuna : ini_tvfta_tuna),
+                               sizeof(ini_tvfta_tuna));
+       } else if (dst->dst_type == DST_TYPE_IS_CABLE) {
+               dst->frequency = 51000000;
+               memcpy(dst->tx_tuna, ((dst->type_flags &  DST_TYPE_HAS_NEWTUNE )? 
+                                       ini_cabci_tuna : ini_cabfta_tuna),
+                               sizeof(ini_cabfta_tuna));
+       }
+}
+
+struct lkup {
+       unsigned int cmd;
+       char *desc;
+} looker[] = {
+       {FE_GET_INFO,                "FE_GET_INFO:"},
+       {FE_READ_STATUS,             "FE_READ_STATUS:" },
+       {FE_READ_BER,                "FE_READ_BER:" },
+       {FE_READ_SIGNAL_STRENGTH,    "FE_READ_SIGNAL_STRENGTH:" },
+       {FE_READ_SNR,                "FE_READ_SNR:" },
+       {FE_READ_UNCORRECTED_BLOCKS, "FE_READ_UNCORRECTED_BLOCKS:" },
+       {FE_SET_FRONTEND,            "FE_SET_FRONTEND:" },
+       {FE_GET_FRONTEND,            "FE_GET_FRONTEND:" },
+       {FE_SLEEP,                   "FE_SLEEP:" },
+       {FE_INIT,                    "FE_INIT:" },
+       {FE_RESET,                   "FE_RESET:" },
+       {FE_SET_TONE,                "FE_SET_TONE:" },
+       {FE_SET_VOLTAGE,             "FE_SET_VOLTAGE:" },
+       };
+
+static int dst_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
+{
+       struct dst_data *dst = fe->data;
+       int retval;
+       /*
+       char  *cc;
+                
+       cc = "FE_UNSUPP:";
+       for(retval = 0; retval < sizeof(looker) / sizeof(looker[0]); retval++) {
+               if (looker[retval].cmd == cmd) {
+                       cc = looker[retval].desc;
+                       break;
+               }
+       }
+       dprintk("%s cmd %s (0x%x)\n",__FUNCTION__, cc, cmd);
+       */
+       // printk("%s: dst %8.8x bt %8.8x i2c %8.8x\n", __FUNCTION__, dst, dst->bt, dst->i2c);
+       /* should be set by attach, but just in case */
+       dst->i2c = fe->i2c;
+        switch (cmd) {
+        case FE_GET_INFO: 
+       {
+            struct dvb_frontend_info *info;
+               info = &dst_info_sat;
+               if (dst->dst_type == DST_TYPE_IS_TERR)
+                       info = &dst_info_tv;
+               else if (dst->dst_type == DST_TYPE_IS_CABLE)
+                       info = &dst_info_cable;
+               memcpy (arg, info, sizeof(struct dvb_frontend_info));
+               break;
+       }
+        case FE_READ_STATUS:
+       {
+               fe_status_t *status = arg;
+
+               *status = 0;
+               if (dst->diseq_flags & HAS_LOCK) {
+                       dst_get_signal(dst);
+                       if (dst->decode_lock)
+                               *status |= FE_HAS_LOCK 
+                                       | FE_HAS_SIGNAL 
+                                       | FE_HAS_CARRIER
+                                       | FE_HAS_SYNC
+                                       | FE_HAS_VITERBI;
+               }
+               break;
+       }
+
+        case FE_READ_BER:
+       {
+               /* guess */
+               // *(u32*) arg = dst->decode_n1;
+               *(u32*) arg = 0;
+               return -EOPNOTSUPP; 
+       }
+
+        case FE_READ_SIGNAL_STRENGTH:
+       {
+               dst_get_signal(dst);
+               *((u16*) arg) = dst->decode_strength;
+               break;
+       }
+
+        case FE_READ_SNR:
+       {
+               dst_get_signal(dst);
+               *((u16*) arg) = dst->decode_snr;
+               break;
+       }
+
+       case FE_READ_UNCORRECTED_BLOCKS: 
+       {
+               *((u32*) arg) = 0;    /* the stv0299 can't measure BER and */
+               return -EOPNOTSUPP;   /* errors at the same time.... */
+       }
+
+        case FE_SET_FRONTEND:
+        {
+               struct dvb_frontend_parameters *p = arg;
+
+               dst_set_freq (dst, p->frequency);
+               dst_set_inversion (dst, p->inversion);
+               if (dst->dst_type == DST_TYPE_IS_SAT) {
+                       dst_set_fec (dst, p->u.qpsk.fec_inner);
+                       dst_set_symbolrate (dst, p->u.qpsk.symbol_rate);
+               } else if (dst->dst_type == DST_TYPE_IS_TERR) {
+                       dst_set_bandwidth(dst, p->u.ofdm.bandwidth);
+               } else if (dst->dst_type == DST_TYPE_IS_CABLE) {
+                       dst_set_fec (dst, p->u.qam.fec_inner);
+                       dst_set_symbolrate (dst, p->u.qam.symbol_rate);
+               }
+               dst_write_tuna (dst);
+
+                break;
+        }
+
+       case FE_GET_FRONTEND:
+       {
+               struct dvb_frontend_parameters *p = arg;
+
+
+               p->frequency = dst->decode_freq;
+               p->inversion = dst->inversion;
+               if (dst->dst_type == DST_TYPE_IS_SAT) {
+                       p->u.qpsk.symbol_rate = dst->symbol_rate;
+                       p->u.qpsk.fec_inner = dst_get_fec (dst);
+               } else if (dst->dst_type == DST_TYPE_IS_TERR) {
+                       p->u.ofdm.bandwidth = dst->bandwidth;
+               } else if (dst->dst_type == DST_TYPE_IS_CABLE) {
+                       p->u.qam.symbol_rate = dst->symbol_rate;
+                       p->u.qam.fec_inner = dst_get_fec (dst);
+                       p->u.qam.modulation = QAM_AUTO;
+               }
+               break;
+       }
+
+        case FE_SLEEP:
+               return 0;
+
+        case FE_INIT:
+               dst_init(dst);
+               break;
+
+       case FE_RESET:
+               break;
+
+       case FE_DISEQC_SEND_MASTER_CMD:
+       {
+               struct dvb_diseqc_master_cmd *cmd = (struct dvb_diseqc_master_cmd *)arg;
+               retval = dst_set_diseqc (dst, cmd->msg, cmd->msg_len);
+               if (retval < 0)
+                       return retval;
+               break;
+       }
+       case FE_SET_TONE:
+               retval = dst_set_tone (dst, (fe_sec_tone_mode_t) arg);
+               if (retval < 0)
+                       return retval;
+               break;
+       case FE_SET_VOLTAGE:
+               retval = dst_set_voltage (dst, (fe_sec_voltage_t) arg);
+               if (retval < 0)
+                       return retval;
+               break;
+       default:
+               return -EOPNOTSUPP;
+        };
+        
+        return 0;
+} 
+
+
+static int dst_attach (struct dvb_i2c_bus *i2c, void **data)
+{
+       struct dst_data *dst;
+       struct bt878 *bt;
+       struct dvb_frontend_info *info;
+
+       dprintk("%s: check ci\n", __FUNCTION__);
+       if (dst_cur_no >= DST_MAX_CARDS) {
+               dprintk("%s: can't have more than %d cards\n", __FUNCTION__, DST_MAX_CARDS);
+               return -ENODEV;
+       }
+       bt = bt878_find_by_dvb_adap(i2c->adapter);
+       if (!bt)
+               return -ENODEV;
+       dst = kmalloc(sizeof(struct dst_data), GFP_KERNEL);
+       if (dst == NULL) {
+               printk(KERN_INFO "%s: Out of memory.\n", __FUNCTION__);
+               return -ENOMEM;
+       }
+       memset(dst, 0, sizeof(*dst));
+       *data = dst;
+       dst->bt = bt;
+       dst->i2c = i2c;
+       if (dst_check_ci(dst) < 0) {
+               kfree(dst);
+               return -ENODEV;
+       }
+
+       dst_init (dst);
+       dprintk("%s: register dst %8.8x bt %8.8x i2c %8.8x\n", __FUNCTION__, 
+                       (u32)dst, (u32)(dst->bt), (u32)(dst->i2c));
+
+       info = &dst_info_sat;
+       if (dst->dst_type == DST_TYPE_IS_TERR)
+               info = &dst_info_tv;
+       else if (dst->dst_type == DST_TYPE_IS_CABLE)
+               info = &dst_info_cable;
+
+       dvb_register_frontend (dst_ioctl, i2c, dst, info);
+       dst_cur_no++;
+       return 0;
+}
+
+static void dst_detach (struct dvb_i2c_bus *i2c, void *data)
+{
+       dvb_unregister_frontend (dst_ioctl, i2c);
+       dprintk("%s: unregister dst %8.8x\n", __FUNCTION__, (u32)(data));
+       if (data)
+               kfree(data);
+}
+
+static int __init init_dst (void)
+{
+       return dvb_register_i2c_device (THIS_MODULE, dst_attach, dst_detach);
+}
+
+static void __exit exit_dst (void)
+{
+       dvb_unregister_i2c_device (dst_attach);
+}
+
+
+module_init(init_dst);
+module_exit(exit_dst);
+
+MODULE_DESCRIPTION("DST DVB-S Frontend");
+MODULE_AUTHOR("Jamie Honan");
+MODULE_LICENSE("GPL");
+
index e2d2faf..4043784 100644 (file)
@@ -1,7 +1,7 @@
 /* 
     Driver for Zarlink MT312 Satellite Channel Decoder
 
-    Copyright (C) 2003 Andreas Oberritter <obi@saftware.de>
+    Copyright (C) 2003 Andreas Oberritter <obi@linuxtv.org>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
 #define MT312_DEBUG            0
 
 #define MT312_SYS_CLK          90000000UL      /* 90 MHz */
+#define MT312_LPOWER_SYS_CLK   60000000UL      /* 60 MHz */
 #define MT312_PLL_CLK          10000000UL      /* 10 MHz */
 
 /* number of active frontends */
 static int mt312_count = 0;
 
+#if MT312_DEBUG == 0
+#define dprintk(x...)
+#else
+static int debug = 0;
+#define dprintk if(debug == 1) printk
+#endif
+
 static struct dvb_frontend_info mt312_info = {
        .name = "Zarlink MT312",
        .type = FE_QPSK,
@@ -86,7 +94,7 @@ static int mt312_read(struct dvb_i2c_bus *i2c,
                return -EREMOTEIO;
        }
 #if MT312_DEBUG
-       {
+       if(debug) {
                int i;
                printk(KERN_INFO "R(%d):", reg & 0x7f);
                for (i = 0; i < count; i++)
@@ -107,7 +115,7 @@ static int mt312_write(struct dvb_i2c_bus *i2c,
        struct i2c_msg msg;
 
 #if MT312_DEBUG
-       {
+       if(debug) {
                int i;
                printk(KERN_INFO "W(%d):", reg & 0x7f);
                for (i = 0; i < count; i++)
@@ -205,7 +213,7 @@ static int sl1935_set_tv_freq(struct dvb_i2c_bus *i2c, u32 freq, u32 sr)
        if (freq < 1550000)
                buf[3] |= 0x10;
 
-       printk(KERN_INFO "synth dword = %02x%02x%02x%02x\n", buf[0],
+       dprintk(KERN_INFO "synth dword = %02x%02x%02x%02x\n", buf[0],
               buf[1], buf[2], buf[3]);
 
        return mt312_pll_write(i2c, I2C_ADDR_SL1935, buf, sizeof(buf));
@@ -225,7 +233,7 @@ static int tsa5059_set_tv_freq(struct dvb_i2c_bus *i2c, u32 freq, u32 sr)
        if (freq < 1550000)
                buf[3] |= 0x02;
 
-       printk(KERN_INFO "synth dword = %02x%02x%02x%02x\n", buf[0],
+       dprintk(KERN_INFO "synth dword = %02x%02x%02x%02x\n", buf[0],
               buf[1], buf[2], buf[3]);
 
        return mt312_pll_write(i2c, I2C_ADDR_TSA5059, buf, sizeof(buf));
@@ -236,13 +244,13 @@ static int mt312_reset(struct dvb_i2c_bus *i2c, const u8 full)
        return mt312_writereg(i2c, RESET, full ? 0x80 : 0x40);
 }
 
-static int mt312_init(struct dvb_i2c_bus *i2c, const long id)
+static int mt312_init(struct dvb_i2c_bus *i2c, const long id, u8 pll)
 {
        int ret;
        u8 buf[2];
 
        /* wake up */
-       if ((ret = mt312_writereg(i2c, CONFIG, 0x8c)) < 0)
+       if ((ret = mt312_writereg(i2c, CONFIG, (pll == 60 ? 0x88 : 0x8c))) < 0)
                return ret;
 
        /* wait at least 150 usec */
@@ -252,8 +260,17 @@ static int mt312_init(struct dvb_i2c_bus *i2c, const long id)
        if ((ret = mt312_reset(i2c, 1)) < 0)
                return ret;
 
+// Per datasheet, write correct values. 09/28/03 ACCJr.
+// If we don't do this, we won't get FE_HAS_VITERBI in the VP310.
+       {
+               u8 buf_def[8]={0x14, 0x12, 0x03, 0x02, 0x01, 0x00, 0x00, 0x00};
+
+               if ((ret = mt312_write(i2c, VIT_SETUP, buf_def, sizeof(buf_def))) < 0)
+                       return ret;
+       }
+
        /* SYS_CLK */
-       buf[0] = mt312_div(MT312_SYS_CLK * 2, 1000000);
+       buf[0] = mt312_div((pll == 60 ? MT312_LPOWER_SYS_CLK : MT312_SYS_CLK) * 2, 1000000);
 
        /* DISEQC_RATIO */
        buf[1] = mt312_div(MT312_PLL_CLK, 15000 * 4);
@@ -370,16 +387,18 @@ static int mt312_set_voltage(struct dvb_i2c_bus *i2c, const fe_sec_voltage_t v)
        return mt312_writereg(i2c, DISEQC_MODE, volt_tab[v]);
 }
 
-static int mt312_read_status(struct dvb_i2c_bus *i2c, fe_status_t * s)
+static int mt312_read_status(struct dvb_i2c_bus *i2c, fe_status_t *s, const long id)
 {
        int ret;
-       u8 status[3];
+       u8 status[3], vit_mode;
 
        *s = 0;
 
        if ((ret = mt312_read(i2c, QPSK_STAT_H, status, sizeof(status))) < 0)
                return ret;
 
+       dprintk(KERN_DEBUG "QPSK_STAT_H: 0x%02x, QPSK_STAT_L: 0x%02x, FEC_STATUS: 0x%02x\n", status[0], status[1], status[2]);
+
        if (status[0] & 0xc0)
                *s |= FE_HAS_SIGNAL;    /* signal noise ratio */
        if (status[0] & 0x04)
@@ -390,6 +409,16 @@ static int mt312_read_status(struct dvb_i2c_bus *i2c, fe_status_t * s)
                *s |= FE_HAS_SYNC;      /* byte align lock */
        if (status[0] & 0x01)
                *s |= FE_HAS_LOCK;      /* qpsk lock */
+       // VP310 doesn't have AUTO, so we "implement it here" ACCJr
+       if ((id == ID_VP310) && !(status[0] & 0x01)) {
+               if ((ret = mt312_readreg(i2c, VIT_MODE, &vit_mode)) < 0)
+                       return ret;
+               vit_mode ^= 0x40;
+               if ((ret = mt312_writereg(i2c, VIT_MODE, vit_mode)) < 0)
+                       return ret;
+               if ((ret = mt312_writereg(i2c, GO, 0x01)) < 0)
+                       return ret;
+       }
 
        return 0;
 }
@@ -422,7 +451,7 @@ static int mt312_read_agc(struct dvb_i2c_bus *i2c, u16 * signal_strength)
 
        *signal_strength = agc;
 
-       printk(KERN_DEBUG "agc=%08x err_db=%hd\n", agc, err_db);
+       dprintk(KERN_DEBUG "agc=%08x err_db=%hd\n", agc, err_db);
 
        return 0;
 }
@@ -458,7 +487,7 @@ static int mt312_set_frontend(struct dvb_i2c_bus *i2c,
                              const long id)
 {
        int ret;
-       u8 buf[5];
+       u8 buf[5], config_val;
        u16 sr;
 
        const u8 fec_tab[10] =
@@ -467,6 +496,8 @@ static int mt312_set_frontend(struct dvb_i2c_bus *i2c,
 
        int (*set_tv_freq)(struct dvb_i2c_bus *i2c, u32 freq, u32 sr);
 
+       dprintk("%s: Freq %d\n", __FUNCTION__, p->frequency);
+
        if ((p->frequency < mt312_info.frequency_min)
            || (p->frequency > mt312_info.frequency_max))
                return -EINVAL;
@@ -489,6 +520,22 @@ static int mt312_set_frontend(struct dvb_i2c_bus *i2c,
 
        switch (id) {
        case ID_VP310:
+       // For now we will do this only for the VP310.
+       // It should be better for the mt312 as well, but tunning will be slower. ACCJr 09/29/03
+               if ((ret = mt312_readreg(i2c, CONFIG, &config_val) < 0))
+                       return ret;
+               if (p->u.qpsk.symbol_rate >= 30000000) //Note that 30MS/s should use 90MHz
+               {
+                       if ((config_val & 0x0c) == 0x08) //We are running 60MHz
+                               if ((ret = mt312_init(i2c, id, (u8) 90)) < 0)
+                                       return ret;
+               }
+               else
+               {
+                       if ((config_val & 0x0c) == 0x0C) //We are running 90MHz
+                               if ((ret = mt312_init(i2c, id, (u8) 60)) < 0)
+                                       return ret;
+               }
                set_tv_freq = tsa5059_set_tv_freq;
                break;
        case ID_MT312:
@@ -562,7 +609,7 @@ static int mt312_get_symbol_rate(struct dvb_i2c_bus *i2c, u32 * sr)
 
                monitor = (buf[0] << 8) | buf[1];
 
-               printk(KERN_DEBUG "sr(auto) = %u\n",
+               dprintk(KERN_DEBUG "sr(auto) = %u\n",
                       mt312_div(monitor * 15625, 4));
        } else {
                if ((ret = mt312_writereg(i2c, MON_CTRL, 0x05)) < 0)
@@ -578,9 +625,9 @@ static int mt312_get_symbol_rate(struct dvb_i2c_bus *i2c, u32 * sr)
 
                sym_rat_op = (buf[0] << 8) | buf[1];
 
-               printk(KERN_DEBUG "sym_rat_op=%d dec_ratio=%d\n",
+               dprintk(KERN_DEBUG "sym_rat_op=%d dec_ratio=%d\n",
                       sym_rat_op, dec_ratio);
-               printk(KERN_DEBUG "*sr(manual) = %lu\n",
+               dprintk(KERN_DEBUG "*sr(manual) = %lu\n",
                       (((MT312_PLL_CLK * 8192) / (sym_rat_op + 8192)) *
                        2) - dec_ratio);
        }
@@ -675,7 +722,7 @@ static int mt312_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg)
                return -EOPNOTSUPP;
 
        case FE_READ_STATUS:
-               return mt312_read_status(i2c, arg);
+               return mt312_read_status(i2c, arg, (long) fe->data);
 
        case FE_READ_BER:
                return mt312_read_bercnt(i2c, arg);
@@ -702,7 +749,12 @@ static int mt312_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg)
                return mt312_sleep(i2c);
 
        case FE_INIT:
-               return mt312_init(i2c, (long) fe->data);
+       //For the VP310 we should run at 60MHz when ever possible.
+       //It should be better to run the mt312 ar lower speed when ever possible, but tunning will be slower. ACCJr 09/29/03
+               if ((long)fe->data == ID_MT312)
+                       return mt312_init(i2c, (long) fe->data, (u8) 90);
+               else
+                       return mt312_init(i2c, (long) fe->data, (u8) 60);
 
        case FE_RESET:
                return mt312_reset(i2c, 0);
@@ -755,6 +807,11 @@ static void __exit mt312_module_exit(void)
 module_init(mt312_module_init);
 module_exit(mt312_module_exit);
 
+#if MT312_DEBUG != 0
+MODULE_PARM(debug,"i");
+MODULE_PARM_DESC(debug, "enable verbose debug messages");
+#endif
+
 MODULE_DESCRIPTION("MT312 Satellite Channel Decoder Driver");
-MODULE_AUTHOR("Andreas Oberritter <obi@saftware.de>");
+MODULE_AUTHOR("Andreas Oberritter <obi@linuxtv.org>");
 MODULE_LICENSE("GPL");
index dd24b18..222c6ec 100644 (file)
@@ -1,7 +1,7 @@
 /* 
     Driver for Zarlink MT312 QPSK Frontend
 
-    Copyright (C) 2003 Andreas Oberritter <obi@saftware.de>
+    Copyright (C) 2003 Andreas Oberritter <obi@linuxtv.org>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
index 7fcae8f..1e29fce 100644 (file)
@@ -8,7 +8,7 @@
        Alps TDED4 (Tuner: TI ALP510, external Nxt6000)
        Comtech DVBT-6k07 (PLL IC: SP5730)
 
-    Copyright (C) 2002-2003 Florian Schirmer <schirmer@taytron.net>
+    Copyright (C) 2002-2003 Florian Schirmer <jolt@tuxbox.org>
     Copyright (C) 2003 Paul Andreassen <paul@andreassen.com.au>
 
     This program is free software; you can redistribute it and/or modify
@@ -55,34 +55,21 @@ static struct dvb_frontend_info nxt6000_info = {
        .symbol_rate_max = 9360000,     /* FIXME */
        .symbol_rate_tolerance = 4000,
        .notifier_delay = 0,
-       .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
-                       FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 |
-                       FE_CAN_FEC_7_8 | FE_CAN_FEC_8_9 | FE_CAN_FEC_AUTO |
-                       FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
-                       FE_CAN_TRANSMISSION_MODE_AUTO |
-                       FE_CAN_GUARD_INTERVAL_AUTO |
-                       FE_CAN_HIERARCHY_AUTO,
-
+       .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 | FE_CAN_FEC_4_5 | FE_CAN_FEC_5_6 | FE_CAN_FEC_6_7 | FE_CAN_FEC_7_8 | FE_CAN_FEC_8_9 | FE_CAN_FEC_AUTO | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO | FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO | FE_CAN_HIERARCHY_AUTO,
 };
 
-#pragma pack(1)
-
 struct nxt6000_config {
-
        u8 demod_addr;
        u8 tuner_addr;
        u8 tuner_type;
        u8 clock_inversion;
-
 };
 
-#pragma pack()
-
 #define TUNER_TYPE_ALP510      0
 #define TUNER_TYPE_SP5659      1
 #define TUNER_TYPE_SP5730      2
 
-#define FE2NXT(fe) ((struct nxt6000_config *)&(fe->data))
+#define FE2NXT(fe) ((struct nxt6000_config *)((fe)->data))
 #define FREQ2DIV(freq) ((freq + 36166667) / 166667)
 
 #define dprintk if (debug) printk
@@ -116,8 +103,10 @@ static u8 nxt6000_read(struct dvb_i2c_bus *i2c, u8 addr, u8 reg)
        int ret;
        u8 b0[] = {reg};
        u8 b1[] = {0};
-       struct i2c_msg msgs[] = {{.addr = addr >> 1, .flags = 0, .buf = b0, .len = 1},
-                                                       {.addr = addr >> 1, .flags = I2C_M_RD, .buf = b1, .len = 1}};
+       struct i2c_msg msgs[] = {
+               {.addr = addr >> 1,.flags = 0,.buf = b0,.len = 1},
+               {.addr = addr >> 1,.flags = I2C_M_RD,.buf = b1,.len = 1}
+       };
 
        ret = i2c->xfer(i2c, msgs, 2);
        
@@ -394,7 +383,7 @@ static void nxt6000_setup(struct dvb_frontend *fe)
        nxt6000_writereg(fe, OFDM_ITB_FREQ_1, 0x06);
        nxt6000_writereg(fe, OFDM_ITB_FREQ_2, 0x31);
        nxt6000_writereg(fe, OFDM_CAS_CTL, (0x01 << 7) | (0x02 << 3) | 0x04);
-       nxt6000_writereg(fe, CAS_FREQ, 0xBB);   // CHECKME
+       nxt6000_writereg(fe, CAS_FREQ, 0xBB);   /* CHECKME */
        nxt6000_writereg(fe, OFDM_SYR_CTL, 1 << 2);
        nxt6000_writereg(fe, OFDM_PPM_CTL_1, PPM256);
        nxt6000_writereg(fe, OFDM_TRL_NOMINALRATE_1, 0x49);
@@ -414,20 +403,20 @@ static void nxt6000_setup(struct dvb_frontend *fe)
 
 static void nxt6000_dump_status(struct dvb_frontend *fe)
 {
-
        u8 val;
 
-//     printk("RS_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, RS_COR_STAT));
-//     printk("VIT_SYNC_STATUS: 0x%02X\n", nxt6000_readreg(fe, VIT_SYNC_STATUS));
-//     printk("OFDM_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_COR_STAT));
-//     printk("OFDM_SYR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_SYR_STAT));
-//     printk("OFDM_TPS_RCVD_1: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_1));
-//     printk("OFDM_TPS_RCVD_2: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_2));
-//     printk("OFDM_TPS_RCVD_3: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_3));
-//     printk("OFDM_TPS_RCVD_4: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_4));
-//     printk("OFDM_TPS_RESERVED_1: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RESERVED_1));
-//     printk("OFDM_TPS_RESERVED_2: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RESERVED_2));
-
+/*
+       printk("RS_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, RS_COR_STAT));
+       printk("VIT_SYNC_STATUS: 0x%02X\n", nxt6000_readreg(fe, VIT_SYNC_STATUS));
+       printk("OFDM_COR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_COR_STAT));
+       printk("OFDM_SYR_STAT: 0x%02X\n", nxt6000_readreg(fe, OFDM_SYR_STAT));
+       printk("OFDM_TPS_RCVD_1: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_1));
+       printk("OFDM_TPS_RCVD_2: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_2));
+       printk("OFDM_TPS_RCVD_3: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_3));
+       printk("OFDM_TPS_RCVD_4: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RCVD_4));
+       printk("OFDM_TPS_RESERVED_1: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RESERVED_1));
+       printk("OFDM_TPS_RESERVED_2: 0x%02X\n", nxt6000_readreg(fe, OFDM_TPS_RESERVED_2));
+*/
        printk("NXT6000 status:");
 
        val = nxt6000_readreg(fe, RS_COR_STAT);
@@ -460,13 +449,11 @@ static void nxt6000_dump_status(struct dvb_frontend *fe)
                        break;
        
                case 0x03: 
-               
                        printk(" VITERBI CODERATE: 5/6,");
+               break;
 
                case 0x04: 
-               
                        printk(" VITERBI CODERATE: 7/8,");
-                       
                        break;
 
                default: 
@@ -503,13 +490,11 @@ static void nxt6000_dump_status(struct dvb_frontend *fe)
                        break;
        
                case 0x04:
-               
                        printk(" CoreState: WAIT_PPM,");
+               break;
 
                case 0x01:
-               
                        printk(" CoreState: WAIT_TRL,");
-                       
                        break;
 
                case 0x05:
@@ -586,13 +571,11 @@ static void nxt6000_dump_status(struct dvb_frontend *fe)
                        break;
        
                case 0x03: 
-               
                        printk(" TPSLP: 5/6,");
+               break;
 
                case 0x04: 
-               
                        printk(" TPSLP: 7/8,");
-                       
                        break;
 
                default: 
@@ -622,13 +605,11 @@ static void nxt6000_dump_status(struct dvb_frontend *fe)
                        break;
        
                case 0x03: 
-               
                        printk(" TPSHP: 5/6,");
+               break;
 
                case 0x04: 
-               
                        printk(" TPSHP: 7/8,");
-                       
                        break;
 
                default: 
@@ -669,7 +650,7 @@ static void nxt6000_dump_status(struct dvb_frontend *fe)
                        
        }
        
-       // Strange magic required to gain access to RF_AGC_STATUS
+       /* Strange magic required to gain access to RF_AGC_STATUS */
        nxt6000_readreg(fe, RF_AGC_VAL_1);
        val = nxt6000_readreg(fe, RF_AGC_STATUS);
        val = nxt6000_readreg(fe, RF_AGC_STATUS);
@@ -735,21 +716,23 @@ static int nxt6000_ioctl(struct dvb_frontend *fe, unsigned int cmd, void *arg)
        
                case FE_READ_SIGNAL_STRENGTH:
                {
-//                     s16 *signal = (s16 *)arg;
-
-//             *signal=(((signed char)readreg(client, 0x16))+128)<<8;
-
+                       s16 *signal = (s16 *) arg;
+/*
+                       *signal=(((signed char)readreg(client, 0x16))+128)<<8;
+*/
+                       *signal = 0;
                        return 0;
                        
                }
        
                case FE_READ_SNR:
                {
-//                     s16 *snr = (s16 *)arg;
-
-//             *snr=readreg(client, 0x24)<<8;
-//             *snr|=readreg(client, 0x25);
-
+                       s16 *snr = (s16 *) arg;
+/*
+                       *snr=readreg(client, 0x24)<<8;
+                       *snr|=readreg(client, 0x25);
+*/
+                       *snr = 0;
                        break;
                }
        
@@ -831,70 +814,74 @@ static u8 demod_addr_tbl[] = {0x14, 0x18, 0x24, 0x28};
 
 static int nxt6000_attach(struct dvb_i2c_bus *i2c, void **data)
 {
-
        u8 addr_nr;
        u8 fe_count = 0;
-       struct nxt6000_config nxt;
+       struct nxt6000_config *pnxt;
 
        dprintk("nxt6000: attach\n");
        
+       pnxt = kmalloc(sizeof(demod_addr_tbl)*sizeof(struct nxt6000_config), GFP_KERNEL);
+       if (NULL == pnxt) {
+               dprintk("nxt6000: no memory for private data.\n");
+               return -ENOMEM;
+       }
+       *data = pnxt;
+
        for (addr_nr = 0; addr_nr < sizeof(demod_addr_tbl); addr_nr++) {
+               struct nxt6000_config *nxt = &pnxt[addr_nr];
        
                if (nxt6000_read(i2c, demod_addr_tbl[addr_nr], OFDM_MSC_REV) != NXT6000ASICDEVICE)
                        continue;
 
                if (pll_write(i2c, demod_addr_tbl[addr_nr], 0xC0, NULL, 0) == 0) {
+                       nxt->tuner_addr = 0xC0;
+                       nxt->tuner_type = TUNER_TYPE_ALP510;
+                       nxt->clock_inversion = 1;
        
-                       nxt.tuner_addr = 0xC0;
-                       nxt.tuner_type = TUNER_TYPE_ALP510;
-                       nxt.clock_inversion = 1;
-                       
-                       dprintk("nxt6000: detected TI ALP510 tuner at 0x%02X\n", nxt.tuner_addr);
+                       dprintk("nxt6000: detected TI ALP510 tuner at 0x%02X\n", nxt->tuner_addr);
                
                } else if (pll_write(i2c, demod_addr_tbl[addr_nr], 0xC2, NULL, 0) == 0) {
+                       nxt->tuner_addr = 0xC2;
+                       nxt->tuner_type = TUNER_TYPE_SP5659;
+                       nxt->clock_inversion = 0;
 
-                       nxt.tuner_addr = 0xC2;
-                       nxt.tuner_type = TUNER_TYPE_SP5659;
-                       nxt.clock_inversion = 0;
-       
-                       dprintk("nxt6000: detected MITEL SP5659 tuner at 0x%02X\n", nxt.tuner_addr);
+                       dprintk("nxt6000: detected MITEL SP5659 tuner at 0x%02X\n", nxt->tuner_addr);
                
                } else if (pll_write(i2c, demod_addr_tbl[addr_nr], 0xC0, NULL, 0) == 0) {
+                       nxt->tuner_addr = 0xC0;
+                       nxt->tuner_type = TUNER_TYPE_SP5730;
+                       nxt->clock_inversion = 0;
 
-                       nxt.tuner_addr = 0xC0;
-                       nxt.tuner_type = TUNER_TYPE_SP5730;
-                       nxt.clock_inversion = 0;
-       
-                       dprintk("nxt6000: detected SP5730 tuner at 0x%02X\n", nxt.tuner_addr);
+                       dprintk("nxt6000: detected SP5730 tuner at 0x%02X\n", nxt->tuner_addr);
                
                } else {
-
                        printk("nxt6000: unable to detect tuner\n");
-
                        continue;       
-               
                }
                
-               nxt.demod_addr = demod_addr_tbl[addr_nr];
+               nxt->demod_addr = demod_addr_tbl[addr_nr];
          
                dprintk("nxt6000: attached at %d:%d\n", i2c->adapter->num, i2c->id);
        
-               dvb_register_frontend(nxt6000_ioctl, i2c, (void *)(*((u32 *)&nxt)), &nxt6000_info);
+               dvb_register_frontend(nxt6000_ioctl, i2c, (void *)nxt, &nxt6000_info);
                
                fe_count++;
        }
        
-       return (fe_count > 0) ? 0 : -ENODEV;
+       if (fe_count == 0) {
+               kfree(pnxt);
+               return -ENODEV;
+       }
        
+       return 0;
 }
 
 static void nxt6000_detach(struct dvb_i2c_bus *i2c, void *data)
 {
-
+       struct nxt6000_config *pnxt = (struct nxt6000_config *)data;
        dprintk("nxt6000: detach\n");
-
        dvb_unregister_frontend(nxt6000_ioctl, i2c);
-       
+       kfree(pnxt);
 }
 
 static __init int nxt6000_init(void)
index 10721dd..b47d25f 100644 (file)
@@ -1,45 +1,10 @@
-/**********************************************************************/
- * DRV6000reg.H
+/*
  * Public Include File for DRV6000 users
+ * (ie. NxtWave Communications - NXT6000 demodulator driver)
  *
  * Copyright (C) 2001 NxtWave Communications, Inc.
  *
- * $Log: nxt6000.h,v $
- * Revision 1.2  2003/01/27 12:32:42  fschirmer
- * Lots of bugfixes and new features
- *
- * Revision 1.1  2003/01/21 18:43:09  fschirmer
- * Nxt6000 based frontend driver
- *
- * Revision 1.1  2003/01/03 02:25:45  obi
- * alps tdme7 driver
- *
- * 
- *    Rev 1.10   Jun 12 2002 11:28:02   dkoeger
- * Updated for SA in GUi work
- * 
- *    Rev 1.9   Apr 01 2002 10:38:46   dkoeger
- * Updated for 1.0.31 GUI
- * 
- *    Rev 1.8   Mar 11 2002 10:04:56   dkoeger
- * Updated for 1.0.31 GUI version
- * 
- *    Rev 1.5   Dec 07 2001 14:40:40   dkoeger
- * Updated for 1.0.28 GUI
- * 
- *    Rev 1.4   Nov 13 2001 11:09:00   dkoeger
- * No change.
- * 
- *    Rev 1.3   Aug 23 2001 14:21:02   dkoeger
- * Updated for driver version 2.1.9
- * 
- *    Rev 1.2   Jul 09 2001 09:20:04   dkoeger
- * Updated for 1.0.18
- * 
- *    Rev 1.1   Jun 13 2001 16:14:24   dkoeger
- * Updated to reflect NXT6000 GUI BETA 1.0.11 6/13/2001
- **********************************************************************/
-
+ */
 
 /*  Nxt6000 Register Addresses and Bit Masks */
 
index 57b24eb..745154b 100644 (file)
@@ -1,11 +1,39 @@
+/*
+   Driver for the Microtune 7202D Frontend
+*/
+
+/*
+   This driver needs a copy of the Avermedia firmware. The version tested
+   is part of the Avermedia DVB-T 1.3.26.3 Application. If the software is
+   installed in Windows the file will be in the /Program Files/AVerTV DVB-T/
+   directory and is called sc_main.mc. Alternatively it can "extracted" from
+   the install cab files. Copy this file to /etc/dvb/sc_main.mc.
+   With this version of the file the first 10 bytes are discarded and the
+   next 0x4000 loaded. This may change in future versions.
+ */
 
+#define __KERNEL_SYSCALLS__
+#include <linux/kernel.h>
+#include <linux/vmalloc.h>
 #include <linux/module.h>
 #include <linux/init.h>
+#include <linux/string.h>
+#include <linux/slab.h>
+#include <linux/fs.h>
+#include <linux/unistd.h>
+#include <linux/fcntl.h>
+#include <linux/errno.h>
 #include <linux/i2c.h>
 
+
 #include "dvb_frontend.h"
 #include "dvb_functions.h"
 
+#ifndef DVB_SP887X_FIRMWARE_FILE
+#define DVB_SP887X_FIRMWARE_FILE "/etc/dvb/sc_main.mc"
+#endif
+
+static char *sp887x_firmware = DVB_SP887X_FIRMWARE_FILE;
 
 #if 0
 #define dprintk(x...) printk(x)
@@ -39,7 +67,7 @@ struct dvb_frontend_info sp887x_info = {
                FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_RECOVER
 };
 
-
+static int errno;
 
 static
 int i2c_writebytes (struct dvb_frontend *fe, u8 addr, u8 *buf, u8 len)
@@ -112,6 +140,7 @@ u16 sp887x_readreg (struct dvb_frontend *fe, u16 reg)
 static
 void sp887x_microcontroller_stop (struct dvb_frontend *fe)
 {
+       dprintk("%s\n", __FUNCTION__);
        sp887x_writereg(fe, 0xf08, 0x000);
        sp887x_writereg(fe, 0xf09, 0x000);              
 
@@ -123,6 +152,7 @@ void sp887x_microcontroller_stop (struct dvb_frontend *fe)
 static
 void sp887x_microcontroller_start (struct dvb_frontend *fe)
 {
+       dprintk("%s\n", __FUNCTION__);
        sp887x_writereg(fe, 0xf08, 0x000);
        sp887x_writereg(fe, 0xf09, 0x000);              
 
@@ -135,6 +165,7 @@ static
 void sp887x_setup_agc (struct dvb_frontend *fe)
 {
        /* setup AGC parameters */
+       dprintk("%s\n", __FUNCTION__);
        sp887x_writereg(fe, 0x33c, 0x054);
        sp887x_writereg(fe, 0x33b, 0x04c);
        sp887x_writereg(fe, 0x328, 0x000);
@@ -152,8 +183,6 @@ void sp887x_setup_agc (struct dvb_frontend *fe)
 }
 
 
-#include "sp887x_firm.h"
-
 #define BLOCKSIZE 30
 
 /**
@@ -162,14 +191,63 @@ void sp887x_setup_agc (struct dvb_frontend *fe)
 static
 int sp887x_initial_setup (struct dvb_frontend *fe)
 {
-       u8 buf [BLOCKSIZE];
+       u8 buf [BLOCKSIZE+2];
+       unsigned char *firmware = NULL;
        int i;
+       int fd;
+       int filesize;
+       int fw_size;
+       mm_segment_t fs;
+
+       dprintk("%s\n", __FUNCTION__);
 
        /* soft reset */
        sp887x_writereg(fe, 0xf1a, 0x000);
 
        sp887x_microcontroller_stop (fe);
 
+       fs = get_fs();
+
+       // Load the firmware
+       set_fs(get_ds());
+       fd = open(sp887x_firmware, 0, 0);
+       if (fd < 0) {
+               printk(KERN_WARNING "%s: Unable to open firmware %s\n", __FUNCTION__,
+                      sp887x_firmware);
+               return -EIO;
+       }
+       filesize = lseek(fd, 0L, 2);
+       if (filesize <= 0) {
+               printk(KERN_WARNING "%s: Firmware %s is empty\n", __FUNCTION__,
+                      sp887x_firmware);
+               sys_close(fd);
+               return -EIO;
+       }
+
+       fw_size = 0x4000;
+
+       // allocate buffer for it
+       firmware = vmalloc(fw_size);
+       if (firmware == NULL) {
+               printk(KERN_WARNING "%s: Out of memory loading firmware\n",
+                      __FUNCTION__);
+               sys_close(fd);
+               return -EIO;
+       }
+
+       // read it!
+       // read the first 16384 bytes from the file
+       // ignore the first 10 bytes
+       lseek(fd, 10, 0);
+       if (read(fd, firmware, fw_size) != fw_size) {
+               printk(KERN_WARNING "%s: Failed to read firmware\n", __FUNCTION__);
+               vfree(firmware);
+               sys_close(fd);
+               return -EIO;
+       }
+       sys_close(fd);
+       set_fs(fs);
+
        printk ("%s: firmware upload... ", __FUNCTION__);
 
        /* setup write pointer to -1 (end of memory) */
@@ -179,12 +257,12 @@ int sp887x_initial_setup (struct dvb_frontend *fe)
        /* dummy write (wrap around to start of memory) */
        sp887x_writereg(fe, 0x8f0a, 0x0000);
 
-       for (i=0; i<sizeof(sp887x_firm); i+=BLOCKSIZE) {
+       for (i=0; i<fw_size; i+=BLOCKSIZE) {
                int c = BLOCKSIZE;
                int err;
 
-               if (i+c > sizeof(sp887x_firm))
-                       c = sizeof(sp887x_firm) - i;
+               if (i+c > fw_size)
+                       c = fw_size - i;
 
                /* bit 0x8000 in address is set to enable 13bit mode */
                /* bit 0x4000 enables multibyte read/write transfers */
@@ -192,15 +270,18 @@ int sp887x_initial_setup (struct dvb_frontend *fe)
                buf[0] = 0xcf;
                buf[1] = 0x0a;
 
-               memcpy(&buf[2], &sp887x_firm[i], c);
+               memcpy(&buf[2], firmware + i, c);
 
                if ((err = i2c_writebytes (fe, 0x70, buf, c+2)) < 0) {
                        printk ("failed.\n");
                        printk ("%s: i2c error (err == %i)\n", __FUNCTION__, err);
+                       vfree(firmware);
                        return err;
                }
        }
 
+       vfree(firmware);
+
        /* don't write RS bytes between packets */
        sp887x_writereg(fe, 0xc13, 0x001);
 
index a07eaf8..7051323 100644 (file)
@@ -9,15 +9,22 @@
        <holger@convergence.de>,
        <js@convergence.de>
     
+
     Philips SU1278/SH
 
-    Copyright (C) 2002 by Peter Schildmann
-        <peter.schildmann@web.de>
+    Copyright (C) 2002 by Peter Schildmann <peter.schildmann@web.de>
+
 
     LG TDQF-S001F
 
     Copyright (C) 2002 Felix Domke <tmbinc@elitedvb.net>
-                     & Andreas Oberritter <andreas@oberritter.de>
+                     & Andreas Oberritter <obi@linuxtv.org>
+
+
+    Support for Samsung TBMU24112IMB used on Technisat SkyStar2 rev. 2.6B
+
+    Copyright (C) 2003 Vadim Catana <skystar@moldova.cc>:
+
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -39,6 +46,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/string.h>
+#include <asm/div64.h>
 
 #include "dvb_frontend.h"
 #include "dvb_functions.h"
 #define dprintk(x...)
 #endif
 
+static int stv0299_status = 0;
+
+#define STATUS_BER 0
+#define STATUS_UCBLOCKS 1
+
 
 /* frontend types */
 #define UNKNOWN_FRONTEND  -1
@@ -56,6 +69,7 @@
 #define ALPS_BSRU6         1
 #define LG_TDQF_S001F      2
 #define PHILIPS_SU1278     3
+#define SAMSUNG_TBMU24112IMB    4
 
 /* Master Clock = 88 MHz */
 #define M_CLK (88000000UL) 
@@ -142,6 +156,51 @@ static u8 init_tab [] = {
 };
 
 
+static u8 init_tab_samsung [] = {
+       0x01, 0x15,
+       0x02, 0x00,
+       0x03, 0x00,
+       0x04, 0x7D,
+       0x05, 0x35,
+       0x06, 0x02,
+       0x07, 0x00,
+       0x08, 0xC3,
+       0x0C, 0x00,
+       0x0D, 0x81,
+       0x0E, 0x23,
+       0x0F, 0x12,
+       0x10, 0x7E,
+       0x11, 0x84,
+       0x12, 0xB9,
+       0x13, 0x88,
+       0x14, 0x89,
+       0x15, 0xC9,
+       0x16, 0x00,
+       0x17, 0x5C,
+       0x18, 0x00,
+       0x19, 0x00,
+       0x1A, 0x00,
+       0x1C, 0x00,
+       0x1D, 0x00,
+       0x1E, 0x00,
+       0x1F, 0x3A,
+       0x20, 0x2E,
+       0x21, 0x80,
+       0x22, 0xFF,
+       0x23, 0xC1,
+       0x28, 0x00,
+       0x29, 0x1E,
+       0x2A, 0x14,
+       0x2B, 0x0F,
+       0x2C, 0x09,
+       0x2D, 0x05,
+       0x31, 0x1F,
+       0x32, 0x19,
+       0x33, 0xFE,
+       0x34, 0x93
+};
+
+
 static int stv0299_writereg (struct dvb_i2c_bus *i2c, u8 reg, u8 data)
 {
        int ret;
@@ -169,7 +228,8 @@ static u8 stv0299_readreg (struct dvb_i2c_bus *i2c, u8 reg)
        ret = i2c->xfer (i2c, msg, 2);
         
        if (ret != 2) 
-               dprintk("%s: readreg error (ret == %i)\n", __FUNCTION__, ret);
+               dprintk("%s: readreg error (reg == 0x%02x, ret == %i)\n",
+                               __FUNCTION__, reg, ret);
 
        return b1[0];
 }
@@ -193,18 +253,19 @@ static int stv0299_readregs (struct dvb_i2c_bus *i2c, u8 reg1, u8 *b, u8 len)
 static int pll_write (struct dvb_i2c_bus *i2c, u8 addr, u8 *data, int len)
 {
        int ret;
-       u8 rpt1 [] = { 0x05, 0xb5 };  /*  enable i2c repeater on stv0299  */
-       u8 rpt2 [] = { 0x05, 0x35 };  /*  disable i2c repeater on stv0299  */
-       struct i2c_msg msg [] = {{ .addr = 0x68, .flags = 0, .buf = rpt1, .len = 2 },
-                                { addr: addr, .flags = 0, .buf = data, .len = len },
-                                { .addr = 0x68, .flags = 0, .buf = rpt2, .len = 2 }};
+       struct i2c_msg msg = { addr: addr, .flags = 0, .buf = data, .len = len };
 
-       ret = i2c->xfer (i2c, msg, 3);
 
-       if (ret != 3)
-               printk("%s: i/o error (ret == %i)\n", __FUNCTION__, ret);
+       stv0299_writereg(i2c, 0x05, 0xb5);      /*  enable i2c repeater on stv0299  */
 
-       return (ret != 3) ? ret : 0;
+       ret =  i2c->xfer (i2c, &msg, 1);
+
+       stv0299_writereg(i2c, 0x05, 0x35);      /*  disable i2c repeater on stv0299  */
+
+       if (ret != 1)
+               dprintk("%s: i/o error (ret == %i)\n", __FUNCTION__, ret);
+
+       return (ret != 1) ? -1 : 0;
 }
 
 
@@ -213,23 +274,16 @@ static int sl1935_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype)
        u8 buf[4];
        u32 div;
 
-       u32 ratios[] = { 2000, 1000, 500, 250, 125 };
-       u8 ratio;
-
-       for (ratio = 4; ratio > 0; ratio--)
-               if ((freq / ratios[ratio]) <= 0x3fff)
-                       break;
+       div = freq / 125;
 
-       div = freq / ratios[ratio];
+       dprintk("%s : freq = %i, div = %i\n", __FUNCTION__, freq, div);
 
-       buf[0] = (freq >> 8) & 0x7f;
-       buf[1] = freq & 0xff;
-       buf[2] = 0x80 | ratio;
+       buf[0] = (div >> 8) & 0x7f;
+       buf[1] = div & 0xff;
+       buf[2] = 0x84;  // 0xC4
+       buf[3] = 0x08;
 
-       if (freq < 1531000)
-               buf[3] = 0x10;
-       else
-               buf[3] = 0x00;
+       if (freq < 1500000) buf[3] |= 0x10;
 
        return pll_write (i2c, 0x61, buf, sizeof(buf));
 }
@@ -238,21 +292,47 @@ static int sl1935_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype)
  *   set up the downconverter frequency divisor for a 
  *   reference clock comparision frequency of 125 kHz.
  */
-static int tsa5059_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype)
+static int tsa5059_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype, int srate)
 {
-       u8 addr = (ftype == PHILIPS_SU1278SH) ? 0x60 : 0x61;
-        u32 div = freq / 125;
-       u8 buf[4] = { (div >> 8) & 0x7f, div & 0xff, 0x84 };
+       u8 addr;
+       u32 div;
+       u8 buf[4];
 
        dprintk ("%s: freq %i, ftype %i\n", __FUNCTION__, freq, ftype);
 
-       if (ftype == PHILIPS_SU1278SH)
-               /* activate f_xtal/f_comp signal output */
-               /* charge pump current C0/C1 = 00 */
-               buf[3] = 0x20;
-       else
-               buf[3] = freq > 1530000 ? 0xc0 : 0xc4;
+       if ((freq < 950000) || (freq > 2150000)) return -EINVAL;
+
+       // setup frequency divisor
+       div = freq / 1000;
+       buf[0] = (div >> 8) & 0x7f;
+       buf[1] = div & 0xff;
+       buf[2] = 0x81 | ((div & 0x18000) >> 10);
+       buf[3] = 0;
+
+       // tuner-specific settings
+       switch(ftype) {
+       case PHILIPS_SU1278SH:
+               addr = 0x60;
+               buf[3] |= 0x20;
+
+               if (srate < 4000000) buf[3] |= 1;
+          
+               if (freq <= 1250000) buf[3] |= 0;
+               else if (freq <= 1550000) buf[3] |= 0x40;
+               else if (freq <= 2050000) buf[3] |= 0x80;
+               else if (freq <= 2150000) buf[3] |= 0xC0;
+               break;
+
+       case ALPS_BSRU6:
+               addr = 0x61;
+               buf[3] |= 0xC0;
+               break;
+
+       default:
+               return -EINVAL;
+       }
 
+       // charge pump
        return pll_write (i2c, addr, buf, sizeof(buf));
 }
 
@@ -385,12 +465,14 @@ static int tua6100_set_tv_freq    (struct dvb_i2c_bus *i2c, u32 freq,
 
 static int pll_set_tv_freq (struct dvb_i2c_bus *i2c, u32 freq, int ftype, int srate)
 {
-       if (ftype == LG_TDQF_S001F)
+       if (ftype == SAMSUNG_TBMU24112IMB)
+               return sl1935_set_tv_freq(i2c, freq, ftype);
+       else if (ftype == LG_TDQF_S001F)
                return sl1935_set_tv_freq(i2c, freq, ftype);
        else if (ftype == PHILIPS_SU1278)
                return tua6100_set_tv_freq(i2c, freq, ftype, srate);
        else
-               return tsa5059_set_tv_freq(i2c, freq, ftype);
+               return tsa5059_set_tv_freq(i2c, freq, ftype, srate);
 }
 
 #if 0
@@ -421,6 +503,19 @@ static int stv0299_init (struct dvb_i2c_bus *i2c, int ftype)
 
        dprintk("stv0299: init chip\n");
 
+       switch(ftype) {
+       case SAMSUNG_TBMU24112IMB:
+               dprintk("%s: init stv0299 chip for Samsung TBMU24112IMB\n", __FUNCTION__);
+
+               for (i=0; i<sizeof(init_tab_samsung); i+=2)
+               {
+                       dprintk("%s: reg == 0x%02x, val == 0x%02x\n", __FUNCTION__, init_tab_samsung[i], init_tab_samsung[i+1]);
+
+                       stv0299_writereg (i2c, init_tab_samsung[i], init_tab_samsung[i+1]);
+               }
+               break;
+
+       default:
        stv0299_writereg (i2c, 0x01, 0x15);
        stv0299_writereg (i2c, 0x02, ftype == PHILIPS_SU1278 ? 0x00 : 0x30);
        stv0299_writereg (i2c, 0x03, 0x00);
@@ -430,11 +525,23 @@ static int stv0299_init (struct dvb_i2c_bus *i2c, int ftype)
 
         /* AGC1 reference register setup */
        if (ftype == PHILIPS_SU1278SH)
-         stv0299_writereg (i2c, 0x0f, 0xd2);  /* Iagc = Inverse, m1 = 18 */
+                 stv0299_writereg (i2c, 0x0f, 0x92);  /* Iagc = Inverse, m1 = 18 */
        else if (ftype == PHILIPS_SU1278)
-         stv0299_writereg (i2c, 0x0f, 0x94);  /* Iagc = Inverse, m1 = 18 */
+                 stv0299_writereg (i2c, 0x0f, 0x94);  /* Iagc = Inverse, m1 = 20 */
        else
          stv0299_writereg (i2c, 0x0f, 0x52);  /* Iagc = Normal,  m1 = 18 */
+               break;
+       }
+       
+       switch(stv0299_status) {
+       case STATUS_BER:
+               stv0299_writereg(i2c, 0x34, 0x93);
+               break;
+       
+       case STATUS_UCBLOCKS:
+               stv0299_writereg(i2c, 0x34, 0xB3);
+               break;
+       }
 
        return 0;
 }
@@ -448,6 +555,7 @@ static int stv0299_check_inversion (struct dvb_i2c_bus *i2c)
                dvb_delay(30);
                if ((stv0299_readreg (i2c, 0x1b) & 0x98) != 0x98) {
                u8 val = stv0299_readreg (i2c, 0x0c);
+                       dprintk ("%s : changing inversion\n", __FUNCTION__);
                return stv0299_writereg (i2c, 0x0c, val ^ 0x01);
        }
        }
@@ -462,21 +570,42 @@ static int stv0299_set_FEC (struct dvb_i2c_bus *i2c, fe_code_rate_t fec)
 
        switch (fec) {
        case FEC_AUTO:
+       {
+               dprintk ("%s : FEC_AUTO\n", __FUNCTION__);
                return stv0299_writereg (i2c, 0x31, 0x1f);
+       }
        case FEC_1_2:
+       {
+               dprintk ("%s : FEC_1_2\n", __FUNCTION__);
                return stv0299_writereg (i2c, 0x31, 0x01);
+       }
        case FEC_2_3:
+       {
+               dprintk ("%s : FEC_2_3\n", __FUNCTION__);
                return stv0299_writereg (i2c, 0x31, 0x02);
+       }
        case FEC_3_4:
+       {
+               dprintk ("%s : FEC_3_4\n", __FUNCTION__);
                return stv0299_writereg (i2c, 0x31, 0x04);
+       }
        case FEC_5_6:
+       {
+               dprintk ("%s : FEC_5_6\n", __FUNCTION__);
                return stv0299_writereg (i2c, 0x31, 0x08);
+       }
        case FEC_7_8:
+       {
+               dprintk ("%s : FEC_7_8\n", __FUNCTION__);
                return stv0299_writereg (i2c, 0x31, 0x10);
+       }
        default:
+       {
+               dprintk ("%s : FEC invalid\n", __FUNCTION__);
                return -EINVAL;
        }
 }
+}
 
 
 static fe_code_rate_t stv0299_get_fec (struct dvb_i2c_bus *i2c)
@@ -606,11 +735,20 @@ static int stv0299_set_tone (struct dvb_i2c_bus *i2c, fe_sec_tone_mode_t tone)
 
        switch (tone) {
        case SEC_TONE_ON:
+       {
+               dprintk("%s: TONE_ON\n", __FUNCTION__);
                return stv0299_writereg (i2c, 0x08, val | 0x3);
+       }       
        case SEC_TONE_OFF:
+       {
+               dprintk("%s: TONE_OFF\n", __FUNCTION__);
                return stv0299_writereg (i2c, 0x08, (val & ~0x3) | 0x02);
+       }
        default:
+       {
+               dprintk("%s: TONE INVALID\n", __FUNCTION__);
                return -EINVAL;
+       }
        };
 }
 
@@ -651,39 +789,60 @@ static int stv0299_set_voltage (struct dvb_i2c_bus *i2c, fe_sec_voltage_t voltag
 }
 
 
-static int stv0299_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate)
+static int stv0299_set_symbolrate (struct dvb_i2c_bus *i2c, u32 srate, int tuner_type)
 {
+       u64 big = srate;
        u32 ratio;
-       u32 tmp;
-       u8 aclk = 0xb4, bclk = 0x51;
+       u8 aclk = 0;
+       u8 bclk = 0;
+       u8 m1;
+
+       if ((srate < 1000000) || (srate > 45000000)) return -EINVAL;
+       switch(tuner_type) {
+       case PHILIPS_SU1278SH:
+               aclk = 0xb5;
+               if (srate < 2000000) bclk = 0x86;
+               else if (srate < 5000000) bclk = 0x89;
+               else if (srate < 15000000) bclk = 0x8f;
+               else if (srate < 45000000) bclk = 0x95;
+
+               m1 = 0x14;
+               if (srate < 4000000) m1 = 0x10;
+               break;
+
+       case ALPS_BSRU6:
+       default:
+               if (srate <= 1500000) { aclk = 0xb7; bclk = 0x87; }
+               else if (srate <= 3000000) { aclk = 0xb7; bclk = 0x8b; }
+               else if (srate <= 7000000) { aclk = 0xb7; bclk = 0x8f; }
+               else if (srate <= 14000000) { aclk = 0xb7; bclk = 0x93; }
+               else if (srate <= 30000000) { aclk = 0xb6; bclk = 0x93; }
+               else if (srate <= 45000000) { aclk = 0xb4; bclk = 0x91; }
+
+               m1 = 0x12;
+               break;   
+       }
+        
+       dprintk("%s : big = 0x%08x%08x\n", __FUNCTION__, (int) ((big>>32) & 0xffffffff),  (int) (big & 0xffffffff) );
+        
+       big = big << 20;
 
-       if (srate > M_CLK)
-               srate = M_CLK;
-        if (srate < 500000)
-               srate = 500000;
+       dprintk("%s : big = 0x%08x%08x\n", __FUNCTION__, (int) ((big>>32) & 0xffffffff),  (int) (big & 0xffffffff) );
 
-       if (srate < 30000000) { aclk = 0xb6; bclk = 0x53; }
-       if (srate < 14000000) { aclk = 0xb7; bclk = 0x53; }
-       if (srate < 7000000) { aclk = 0xb7; bclk = 0x4f; }
-       if (srate < 3000000) { aclk = 0xb7; bclk = 0x4b; }
-       if (srate < 1500000) { aclk = 0xb7; bclk = 0x47; }
+       do_div(big, M_CLK);
 
-#define FIN (M_CLK >> 4)
+       dprintk("%s : big = 0x%08x%08x\n", __FUNCTION__, (int) ((big>>32) & 0xffffffff),  (int) (big & 0xffffffff) );
 
-       tmp = srate << 4;
-       ratio = tmp / FIN;
-        
-       tmp = (tmp % FIN) << 8;
-       ratio = (ratio << 8) + tmp / FIN;
-        
-       tmp = (tmp % FIN) << 8;
-       ratio = (ratio << 8) + tmp / FIN;
+       ratio = big << 4;
+
+       dprintk("%s : ratio = %i\n", __FUNCTION__, ratio);
   
        stv0299_writereg (i2c, 0x13, aclk);
        stv0299_writereg (i2c, 0x14, bclk);
        stv0299_writereg (i2c, 0x1f, (ratio >> 16) & 0xff);
        stv0299_writereg (i2c, 0x20, (ratio >>  8) & 0xff);
        stv0299_writereg (i2c, 0x21, (ratio      ) & 0xf0);
+       stv0299_writereg (i2c, 0x0f, (stv0299_readreg(i2c, 0x0f) & 0xc0) | m1);
 
        return 0;
 }
@@ -710,6 +869,9 @@ static int stv0299_get_symbolrate (struct dvb_i2c_bus *i2c)
        offset = (s32) rtf * (srate / 4096L);
        offset /= 128;
 
+       dprintk ("%s : srate = %i\n", __FUNCTION__, srate);
+       dprintk ("%s : ofset = %i\n", __FUNCTION__, offset);
+
        srate += offset;
 
        srate += 1000;
@@ -725,6 +887,8 @@ static int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
         int tuner_type = (long) fe->data;
        struct dvb_i2c_bus *i2c = fe->i2c;
 
+       dprintk ("%s\n", __FUNCTION__);
+
        switch (cmd) {
        case FE_GET_INFO:
                memcpy (arg, &uni0299_info, sizeof(struct dvb_frontend_info));
@@ -736,7 +900,7 @@ static int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
                u8 signal = 0xff - stv0299_readreg (i2c, 0x18);
                u8 sync = stv0299_readreg (i2c, 0x1b);
 
-               dprintk ("VSTATUS: 0x%02x\n", sync);
+               dprintk ("%s : FE_READ_STATUS : VSTATUS: 0x%02x\n", __FUNCTION__, sync);
 
                *status = 0;
 
@@ -759,8 +923,12 @@ static int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
        }
 
         case FE_READ_BER:
+               if (stv0299_status == STATUS_BER) {
                *((u32*) arg) = (stv0299_readreg (i2c, 0x1d) << 8)
                               | stv0299_readreg (i2c, 0x1e);
+               } else {
+                       *((u32*) arg) = 0;
+               }
                break;
 
        case FE_READ_SIGNAL_STRENGTH:
@@ -768,7 +936,7 @@ static int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
                s32 signal =  0xffff - ((stv0299_readreg (i2c, 0x18) << 8)
                                       | stv0299_readreg (i2c, 0x19));
 
-               dprintk ("AGC2I: 0x%02x%02x, signal=0x%04x\n",
+               dprintk ("%s : FE_READ_SIGNAL_STRENGTH : AGC2I: 0x%02x%02x, signal=0x%04x\n", __FUNCTION__,
                         stv0299_readreg (i2c, 0x18),
                         stv0299_readreg (i2c, 0x19), (int) signal);
 
@@ -787,18 +955,25 @@ static int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
                break;
        }
        case FE_READ_UNCORRECTED_BLOCKS: 
-               *((u32*) arg) = 0;    /* the stv0299 can't measure BER and */
-               return -EOPNOTSUPP;   /* errors at the same time.... */
+               if (stv0299_status == STATUS_UCBLOCKS) {
+                       *((u32*) arg) = (stv0299_readreg (i2c, 0x1d) << 8)
+                                      | stv0299_readreg (i2c, 0x1e);
+               } else {
+                       *((u32*) arg) = 0;
+               }
+               break;
 
         case FE_SET_FRONTEND:
         {
                struct dvb_frontend_parameters *p = arg;
 
+               dprintk ("%s : FE_SET_FRONTEND\n", __FUNCTION__);
+
                pll_set_tv_freq (i2c, p->frequency, tuner_type,
                                 p->u.qpsk.symbol_rate);
 
                 stv0299_set_FEC (i2c, p->u.qpsk.fec_inner);
-                stv0299_set_symbolrate (i2c, p->u.qpsk.symbol_rate);
+                stv0299_set_symbolrate (i2c, p->u.qpsk.symbol_rate, tuner_type);
                stv0299_writereg (i2c, 0x22, 0x00);
                stv0299_writereg (i2c, 0x23, 0x00);
                stv0299_readreg (i2c, 0x23);
@@ -859,6 +1034,8 @@ static int uni0299_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
 
 static long probe_tuner (struct dvb_i2c_bus *i2c)
 {
+       struct dvb_adapter * adapter = (struct dvb_adapter *) i2c->adapter;
+
         /* read the status register of TSA5059 */
        u8 rpt[] = { 0x05, 0xb5 };
         u8 stat [] = { 0 };
@@ -875,6 +1052,17 @@ static long probe_tuner (struct dvb_i2c_bus *i2c)
        stv0299_writereg (i2c, 0x02, 0x30);
        stv0299_writereg (i2c, 0x03, 0x00);
 
+
+       printk ("%s: try to attach to %s\n", __FUNCTION__, adapter->name);
+
+       if ( strcmp(adapter->name, "Technisat SkyStar2 driver") == 0 )
+       {
+           printk ("%s: setup for tuner Samsung TBMU24112IMB\n", __FILE__);
+
+           return SAMSUNG_TBMU24112IMB;
+       }
+
+
        if ((ret = i2c->xfer(i2c, msg1, 2)) == 2) {
                printk ("%s: setup for tuner SU1278/SH\n", __FILE__);
                return PHILIPS_SU1278SH;
@@ -961,3 +1149,5 @@ MODULE_DESCRIPTION("Universal STV0299/TSA5059/SL1935 DVB Frontend driver");
 MODULE_AUTHOR("Ralph Metzler, Holger Waechtler, Peter Schildmann, Felix Domke, Andreas Oberritter");
 MODULE_LICENSE("GPL");
 
+MODULE_PARM(stv0299_status, "i");
+MODULE_PARM_DESC(stv0299_status, "Which status value to support (0: BER, 1: UCBLOCKS)");
index b16ceaf..90139d5 100644 (file)
@@ -108,7 +108,7 @@ static struct dvb_frontend_info tda10045h_info = {
        .frequency_min = 51000000,
        .frequency_max = 858000000,
        .frequency_stepsize = 166667,
-       .caps = FE_CAN_INVERSION_AUTO |
+       .caps =
            FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
            FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
            FE_CAN_QPSK | FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
index 0cf17c1..ce2f459 100644 (file)
@@ -19,6 +19,8 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */    
 
+#include <linux/config.h>
+#include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/kernel.h>
@@ -70,7 +72,18 @@ static int verbose;
 #define GET_TUNER(data) ((u8) (((long) data >> 16) & 0xff))
 #define GET_DEMOD_ADDR(data) ((u8) (((long) data >> 24) & 0xff))
 
+#if defined(CONFIG_DBOX2)
+#define XIN 69600000UL
+#define DISABLE_INVERSION(reg0)                do { reg0 &= ~0x20; } while (0)
+#define ENABLE_INVERSION(reg0)         do { reg0 |= 0x20; } while (0)
+#define HAS_INVERSION(reg0)            (reg0 & 0x20)
+#else  /* PCI cards */
 #define XIN 57840000UL
+#define DISABLE_INVERSION(reg0)                do { reg0 |= 0x20; } while (0)
+#define ENABLE_INVERSION(reg0)         do { reg0 &= ~0x20; } while (0)
+#define HAS_INVERSION(reg0)            (!(reg0 & 0x20))
+#endif
+
 #define FIN (XIN >> 4)
 
 
@@ -209,9 +222,9 @@ static int ves1820_setup_reg0 (struct dvb_frontend *fe, u8 reg0,
        reg0 |= GET_REG0(fe->data) & 0x62;
        
        if (INVERSION_ON == inversion)
-               reg0 &= ~0x20;
+               ENABLE_INVERSION(reg0);
        else if (INVERSION_OFF == inversion)
-               reg0 |= 0x20;
+               DISABLE_INVERSION(reg0);
        
        ves1820_writereg (fe, 0x00, reg0 & 0xfe);
         ves1820_writereg (fe, 0x00, reg0 | 0x01);
@@ -220,7 +233,7 @@ static int ves1820_setup_reg0 (struct dvb_frontend *fe, u8 reg0,
         *  check lock and toggle inversion bit if required...
         */
        if (INVERSION_AUTO == inversion && !(ves1820_readreg (fe, 0x11) & 0x08)) {
-               dvb_delay(10);
+               mdelay(50);
                if (!(ves1820_readreg (fe, 0x11) & 0x08)) {
                        reg0 ^= 0x20;
                        ves1820_writereg (fe, 0x00, reg0 & 0xfe);
@@ -242,6 +255,10 @@ static int ves1820_init (struct dvb_frontend *fe)
 
         ves1820_writereg (fe, 0, 0);
 
+#if defined(CONFIG_DBOX2)
+       ves1820_inittab[2] &= ~0x08;
+#endif
+
        for (i=0; i<53; i++)
                 ves1820_writereg (fe, i, ves1820_inittab[i]);
 
@@ -330,6 +347,10 @@ static int ves1820_set_parameters (struct dvb_frontend *fe,
 
        ves1820_setup_reg0 (fe, reg0x00[real_qam], p->inversion);
 
+       /* yes, this speeds things up: userspace reports lock in about 8 ms
+          instead of 500 to 1200 ms after calling FE_SET_FRONTEND. */
+       mdelay(50);
+
        return 0;
 }
 
@@ -419,14 +440,14 @@ static int ves1820_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg)
                                        fe->i2c->adapter->num, afc,
                                -((s32)(p->u.qam.symbol_rate >> 3) * afc >> 7));
 
-               p->inversion = reg0 & 0x20 ? INVERSION_OFF : INVERSION_ON;
+               p->inversion = HAS_INVERSION(reg0) ? INVERSION_ON : INVERSION_OFF;
                p->u.qam.modulation = ((reg0 >> 2) & 7) + QAM_16;
 
                p->u.qam.fec_inner = FEC_NONE;
 
                p->frequency = ((p->frequency + 31250) / 62500) * 62500;
-               // To prevent overflow, shift symbol rate first a
-               // couple of bits.
+               /* To prevent overflow, shift symbol rate first a
+                  couple of bits. */
                p->frequency -= (s32)(p->u.qam.symbol_rate >> 3) * afc >> 7;
                break;
        }
@@ -462,8 +483,6 @@ static long probe_tuner (struct dvb_i2c_bus *i2c)
                printk ("DVB: VES1820(%d): setup for tuner sp5659c\n", i2c->adapter->num);
        } else {
                type = -1;
-               printk ("DVB: VES1820(%d): unknown PLL, "
-                       "please report to <linuxdvb@linuxtv.org>!!\n", i2c->adapter->num);
        }
 
        return type;
@@ -477,13 +496,11 @@ static u8 read_pwm (struct dvb_i2c_bus *i2c)
        struct i2c_msg msg [] = { { .addr = 0x50, .flags = 0, .buf = &b, .len = 1 },
                         { .addr = 0x50, .flags = I2C_M_RD, .buf = &pwm, .len = 1 } };
 
-       i2c->xfer (i2c, msg, 2);
+       if ((i2c->xfer(i2c, msg, 2) != 2) || (pwm == 0xff))
+               pwm = 0x48;
 
        printk("DVB: VES1820(%d): pwm=0x%02x\n", i2c->adapter->num, pwm);
 
-       if (pwm == 0xff)
-               pwm = 0x48;
-
        return pwm;
 }
 
@@ -516,8 +533,7 @@ static int ves1820_attach (struct dvb_i2c_bus *i2c, void **data)
        if ((demod_addr = probe_demod_addr(i2c)) < 0)
                return -ENODEV;
 
-       if ((tuner_type = probe_tuner(i2c)) < 0)
-               return -ENODEV;
+       tuner_type = probe_tuner(i2c);
 
        if ((i2c->adapter->num < MAX_UNITS) && pwm[i2c->adapter->num] != -1) {
                printk("DVB: VES1820(%d): pwm=0x%02x (user specified)\n",
index 4d1f940..12410b1 100644 (file)
@@ -2,9 +2,9 @@
     Driver for VES1893 and VES1993 QPSK Frontends
 
     Copyright (C) 1999 Convergence Integrated Media GmbH <ralph@convergence.de>
-    Copyright (C) 2001 Ronny Strutz <3des@tuxbox.org>
+    Copyright (C) 2001 Ronny Strutz <3des@elitedvb.de>
     Copyright (C) 2002 Dennis Noermann <dennis.noermann@noernet.de>
-    Copyright (C) 2002-2003 Andreas Oberritter <obi@tuxbox.org>
+    Copyright (C) 2002-2003 Andreas Oberritter <obi@linuxtv.org>
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
index 707e749..ff4e963 100644 (file)
@@ -1,6 +1,7 @@
 config DVB_AV7110
        tristate "AV7110 cards"
        depends on DVB_CORE
+       select FW_LOADER
        select VIDEO_DEV
        select VIDEO_SAA7146_VV
        help
@@ -12,6 +13,23 @@ config DVB_AV7110
 
          Say Y if you own such a card and want to use it.
 
+config DVB_AV7110_FIRMWARE
+       bool "Compile AV7110 firmware into the driver"
+       depends on DVB_AV7110
+       help
+         The AV7110 firmware is normally loaded by the firmware hotplug manager.
+         If you want to compile the firmware into the driver you need to say
+         Y here and provide the correct path of the firmware. You need this
+         option if you want to compile the whole driver statically into the
+         kernel. 
+
+         All other people say N.
+
+config DVB_AV7110_FIRMWARE_FILE
+       string "Full pathname of av7110 firmware file"
+       depends on DVB_AV7110_FIRMWARE
+       default "/usr/lib/hotplug/firmware/dvb-ttpci-01.fw"
+
 config DVB_AV7110_OSD
        bool "AV7110 OSD support"
        depends on DVB_AV7110
index 317e401..2c97d55 100644 (file)
@@ -12,3 +12,12 @@ obj-$(CONFIG_DVB_BUDGET_PATCH) += budget-core.o budget-patch.o ttpci-eeprom.o
 obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o ttpci-eeprom.o
 
 EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/
+
+host-progs     := fdump
+
+ifdef CONFIG_DVB_AV7110_FIRMWARE
+$(obj)/av7110.o: $(obj)/fdump $(obj)/av7110_firm.h 
+
+$(obj)/av7110_firm.h:
+       $(obj)/fdump $(CONFIG_DVB_AV7110_FIRMWARE_FILE) dvb_ttpci_fw $@
+endif
index fce4501..ea26eac 100644 (file)
@@ -35,7 +35,6 @@
 
 #define __KERNEL_SYSCALLS__
 #include <linux/module.h>
-#include <linux/init.h>
 #include <linux/kmod.h>
 #include <linux/delay.h>
 #include <linux/fs.h>
@@ -43,7 +42,6 @@
 #include <linux/poll.h>
 #include <linux/unistd.h>
 #include <linux/byteorder/swabb.h>
-#include <linux/slab.h>
 #include <linux/smp_lock.h>
 #include <stdarg.h>
 
 #include <linux/ptrace.h>
 #include <linux/ioport.h>
 #include <linux/in.h>
-#include <linux/slab.h>
 #include <linux/string.h>
 #include <linux/pci.h>
-#include <linux/init.h>
 #include <linux/vmalloc.h>
 #include <linux/netdevice.h>
 #include <linux/inetdevice.h>
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
+#include <linux/firmware.h>
+#include <linux/crc32.h>
 
 #include <asm/system.h>
 #include <asm/bitops.h>
@@ -108,6 +106,7 @@ static int vidmode=CVBS_RGB_OUT;
 static int pids_off;
 static int adac=DVB_ADAC_TI;
 static int hw_sections = 1;
+static int rgb_on = 0;
 
 int av7110_num = 0;
 
@@ -118,42 +117,12 @@ int av7110_num = 0;
  * DEBI functions
  ****************************************************************************/
 
+#define wait_for_debi_done(x) \
+       saa7146_wait_for_debi_done(x->dev) \
+
 /* This DEBI code is based on the Stradis driver 
    by Nathan Laredo <laredo@gnu.org> */
 
-static int wait_for_debi_done(struct av7110 *av7110)
-{
-       struct saa7146_dev *dev = av7110->dev;
-       int start;
-
-       /* wait for registers to be programmed */
-       start = jiffies;
-       while (1) {
-                if (saa7146_read(dev, MC2) & 2)
-                        break;
-               if (jiffies-start > HZ/20) {
-                       printk ("%s: timed out while waiting for registers "
-                               "getting programmed\n", __FUNCTION__);
-                       return -ETIMEDOUT;
-               }
-       }
-
-       /* wait for transfer to complete */
-       start = jiffies;
-       while (1) {
-               if (!(saa7146_read(dev, PSR) & SPCI_DEBI_S))
-                       break;
-               saa7146_read(dev, MC2);
-               if (jiffies-start > HZ/4) {
-                       printk ("%s: timed out while waiting for transfer "
-                               "completion\n", __FUNCTION__);
-                       return -ETIMEDOUT;
-               }
-       }
-
-       return 0;
-}
-
 static int debiwrite(struct av7110 *av7110, u32 config, 
                      int addr, u32 val, int count)
 {
@@ -375,7 +344,7 @@ static int record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len)
 {
         struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) p2t->priv;
 
-       DEB_EE(("struct dvb_filter_pes2ts:%p\n",p2t));
+//     DEB_EE(("struct dvb_filter_pes2ts:%p\n",p2t));
 
         if (!(dvbdmxfeed->ts_type & TS_PACKET)) 
                 return 0;
@@ -385,14 +354,14 @@ static int record_cb(struct dvb_filter_pes2ts *p2t, u8 *buf, size_t len)
                 return dvbdmxfeed->cb.ts(buf, len, 0, 0, 
                                          &dvbdmxfeed->feed.ts, DMX_OK); 
         else
-                return dvb_filter_pes2ts(p2t, buf, len);
+                return dvb_filter_pes2ts(p2t, buf, len, 1);
 }
 
 static int dvb_filter_pes2ts_cb(void *priv, unsigned char *data)
 {
         struct dvb_demux_feed *dvbdmxfeed=(struct dvb_demux_feed *) priv;
 
-       DEB_EE(("dvb_demux_feed:%p\n",dvbdmxfeed));
+//     DEB_EE(("dvb_demux_feed:%p\n",dvbdmxfeed));
         
         dvbdmxfeed->cb.ts(data, 188, 0, 0,
                           &dvbdmxfeed->feed.ts,
@@ -886,10 +855,10 @@ static void gpioirq (unsigned long data)
         txbuf=irdebi(av7110, DEBINOSWAP, TX_BUFF, 0, 2);
         len=(av7110->debilen+3)&(~3);
 
-        DEB_D(("GPIO0 irq %d %d\n", av7110->debitype, av7110->debilen));
+//        DEB_D(("GPIO0 irq %d %d\n", av7110->debitype, av7110->debilen));
         print_time("gpio");
 
-        DEB_D(("GPIO0 irq %02x\n", av7110->debitype&0xff));        
+//       DEB_D(("GPIO0 irq %02x\n", av7110->debitype&0xff));        
         switch (av7110->debitype&0xff) {
 
         case DATA_TS_PLAY:
@@ -2002,8 +1971,6 @@ static u8 bootcode[] = {
         0x2c, 0x00, 0x03, 0xf8, 0x2c, 0x00, 0x04, 0x00,
 };
 
-#include "av7110_firm.h"
-
 static int bootarm(struct av7110 *av7110)
 {
        struct saa7146_dev *dev= av7110->dev;
@@ -2056,7 +2023,7 @@ static int bootarm(struct av7110 *av7110)
         
         DEB_D(("bootarm: load dram code\n"));
 
-       if (load_dram(av7110, (u32 *)Root, sizeof(Root))<0)
+       if (load_dram(av7110, (u32 *)av7110->bin_root, av7110->size_root)<0)
                return -1;
 
        saa7146_setgpio(dev, RESET_LINE, SAA7146_GPIO_OUTLO);
@@ -2064,7 +2031,7 @@ static int bootarm(struct av7110 *av7110)
         
         DEB_D(("bootarm: load dpram code\n"));
 
-       mwdebi(av7110, DEBISWAB, DPRAM_BASE, Dpram, sizeof(Dpram));
+       mwdebi(av7110, DEBISWAB, DPRAM_BASE, av7110->bin_dpram, av7110->size_dpram);
 
        wait_for_debi_done(av7110);
 
@@ -2706,9 +2673,9 @@ static int tuner_set_tv_freq (struct saa7146_dev *dev, u32 freq)
        buf[1] = div & 0xff;
        buf[2] = 0x8e;
 
-       if (freq < (u32) (16*168.25) ) 
+       if (freq < (u32) 16*168.25 )
                config = 0xa0;
-       else if (freq < (u32) (16*447.25)) 
+       else if (freq < (u32) 16*447.25)
                config = 0x90;
        else
                config = 0x30;
@@ -4294,8 +4261,10 @@ static void av7110_before_after_tune (fe_status_t s, void *data)
                         av7110->pids[DMX_PES_TELETEXT], 0, 
                         av7110->pids[DMX_PES_PCR]);
                outcom(av7110, COMTYPE_PIDFILTER, Scan, 0);
-       } else 
+       } else {
                SetPIDs(av7110, 0, 0, 0, 0, 0);
+               outcom(av7110, COMTYPE_PIDFILTER, FlushTSQueue, 0);
+       }
 
         up(&av7110->pid_mutex);
 }
@@ -4529,31 +4498,117 @@ static u8 saa7113_init_regs[] = {
 static struct saa7146_ext_vv av7110_vv_data_st;
 static struct saa7146_ext_vv av7110_vv_data_c;
 
+
+
+
+
+#ifdef CONFIG_DVB_AV7110_FIRMWARE_FILE
+#include "av7110_firm.h"
+#endif
+
 static int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *pci_ext)
 {
+#ifndef CONFIG_DVB_AV7110_FIRMWARE_FILE
+       const struct firmware *fw;
+#endif
        struct av7110 *av7110 = NULL;
        int ret = 0;
-       
+       u32 crc = 0, len = 0;
+       unsigned char *ptr;
+               
+       DEB_EE(("dev: %p, av7110: %p\n",dev,av7110));
+
+#ifndef CONFIG_DVB_AV7110_FIRMWARE_FILE 
+       /* request the av7110 firmware, this will block until someone uploads it */
+       ret = request_firmware(&fw, "dvb-ttpci-01.fw", &dev->pci->dev);
+       if ( 0 != ret ) {
+               printk("dvb-ttpci: cannot request firmware!\n");
+               return -EINVAL;
+       }
+
+       if (fw->size <= 200000) {
+               printk("dvb-ttpci: this firmware is way too small.\n");
+               return -EINVAL;
+       }
+#endif
+
+       /* prepare the av7110 device struct */
        if (!(av7110 = kmalloc (sizeof (struct av7110), GFP_KERNEL))) {
                printk ("%s: out of memory!\n", __FUNCTION__);
                return -ENOMEM;
        }
-
        memset(av7110, 0, sizeof(struct av7110));
+       
+#ifndef CONFIG_DVB_AV7110_FIRMWARE_FILE 
+       /* check if the firmware is available */
+       av7110->bin_fw = (unsigned char*)vmalloc(fw->size);
+       if (NULL == av7110->bin_fw) {
+               DEB_D(("out of memory\n"));
+               kfree(av7110);
+               return -ENOMEM;
+       }
+       memcpy(av7110->bin_fw, fw->data, fw->size);
+       av7110->size_fw = fw->size;
+#else
+       av7110->bin_fw = dvb_ttpci_fw;
+       av7110->size_fw = sizeof dvb_ttpci_fw;
+#endif
 
+       /* check for firmware magic */
+       ptr = av7110->bin_fw;
+       if (ptr[0] != 'A' || ptr[1] != 'V' || 
+           ptr[2] != 'F' || ptr[3] != 'W') {
+               printk("dvb-ttpci: this is not an av7110 firmware\n");
+               goto fw_error;
+       }
+       ptr += 4;
+
+       /* check dpram file */
+       crc = ntohl(*(u32*)ptr);
+       ptr += 4;
+       len = ntohl(*(u32*)ptr);
+       ptr += 4;
+       if (len >= 512) {
+               printk("dvb-ttpci: dpram file is way to big.\n");
+               goto fw_error;
+       }
+       if( crc != crc32_le(0,ptr,len)) {
+               printk("dvb-ttpci: crc32 of dpram file does not match.\n");
+               goto fw_error;
+       }
+       av7110->bin_dpram = ptr;
+       av7110->size_dpram = len;
+       ptr += len;
+       
+       /* check root file */
+       crc = ntohl(*(u32*)ptr);
+       ptr += 4;
+       len = ntohl(*(u32*)ptr);
+       ptr += 4;
+       
+       if (len <= 200000 || len >= 300000 || len > ((av7110->bin_fw+av7110->size_fw)-ptr) ) {
+               printk("dvb-ttpci: root file has strange size (%d). aborting.\n",len);
+               goto fw_error;
+       }
+       if( crc != crc32_le(0,ptr,len)) {
+               printk("dvb-ttpci: crc32 of dpram file does not match.\n");
+               goto fw_error;
+       }
+       av7110->bin_root = ptr;
+       av7110->size_root = len;
+       
+       /* go on with regular device initialization */
        av7110->card_name = (char*)pci_ext->ext_priv;
+       av7110->dev=(struct saa7146_dev *)dev;
        (struct av7110*)dev->ext_priv = av7110;
 
-       DEB_EE(("dev: %p, av7110: %p\n",dev,av7110));
-
-       av7110->dev=(struct saa7146_dev *)dev;
        dvb_register_adapter(&av7110->dvb_adapter, av7110->card_name);
 
        /* the Siemens DVB needs this if you want to have the i2c chips
           get recognized before the main driver is fully loaded */
        saa7146_write(dev, GPIO_CTRL, 0x500000);
 
-       saa7146_i2c_adapter_prepare(dev, NULL, SAA7146_I2C_BUS_BIT_RATE_3200);
+       saa7146_i2c_adapter_prepare(dev, NULL, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */
 
        av7110->i2c_bus = dvb_register_i2c_bus (master_xfer, dev,
                                                av7110->dvb_adapter, 0);
@@ -4571,7 +4626,7 @@ static int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_
 
        /* set dd1 stream a & b */
        saa7146_write(dev, DD1_STREAM_B, 0x00000000);
-       saa7146_write(dev, DD1_INIT, 0x02000000);
+       saa7146_write(dev, DD1_INIT, 0x03000000);
        saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
 
        /* upload all */
@@ -4729,7 +4784,7 @@ static int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_
                memcpy(standard,dvb_standard,sizeof(struct saa7146_standard)*2);
                /* set dd1 stream a & b */
                saa7146_write(dev, DD1_STREAM_B, 0x00000000);
-               saa7146_write(dev, DD1_INIT, 0x02000700);
+               saa7146_write(dev, DD1_INIT, 0x03000700);
                saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26));
        }
        else if (dev->pci->subsystem_vendor == 0x110a) {
@@ -4747,7 +4802,8 @@ static int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_
                // switch DVB SCART on
                outcom(av7110, COMTYPE_AUDIODAC, MainSwitch, 1, 0);
                outcom(av7110, COMTYPE_AUDIODAC, ADSwitch, 1, 1);
-               //saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // RGB on, SCART pin 16
+               if (rgb_on)
+                       saa7146_setgpio(dev, 1, SAA7146_GPIO_OUTHI); // RGB on, SCART pin 16
                //saa7146_setgpio(dev, 3, SAA7146_GPIO_OUTLO); // SCARTpin 8
        }
        
@@ -4786,6 +4842,7 @@ static int av7110_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_
        }       
 
        printk(KERN_INFO "av7110: found av7110-%d.\n",av7110_num);
+       av7110->device_initialized = 1;
        av7110_num++;
         return 0;
 
@@ -4809,12 +4866,22 @@ err:
        dvb_unregister_adapter (av7110->dvb_adapter);
 
        return ret;
+fw_error:
+#ifndef CONFIG_DVB_AV7110_FIRMWARE_FILE 
+       vfree(av7110->bin_fw);
+#endif
+       kfree(av7110);
+       return -EINVAL;
 }
 
 static int av7110_detach (struct saa7146_dev* saa)
 {
        struct av7110 *av7110 = (struct av7110*)saa->ext_priv;
        DEB_EE(("av7110: %p\n",av7110));
+       
+       if( 0 == av7110->device_initialized ) {
+               return 0;
+       }
 
        saa7146_unregister_device(&av7110->v4l_dev, saa);
        if (2 == av7110->has_analog_tuner) {
@@ -4845,11 +4912,15 @@ static int av7110_detach (struct saa7146_dev* saa)
        dvb_unregister_i2c_bus (master_xfer,av7110->i2c_bus->adapter, av7110->i2c_bus->id);
        dvb_unregister_adapter (av7110->dvb_adapter);
 
+       av7110_num--;
+#ifndef CONFIG_DVB_AV7110_FIRMWARE_FILE 
+       if (NULL != av7110->bin_fw ) {
+               vfree(av7110->bin_fw);
+       }
+#endif
        kfree (av7110);
-
        saa->ext_priv = NULL;
-       av7110_num--;
-       
+
        return 0;
 }
 
@@ -4858,7 +4929,7 @@ static void av7110_irq(struct saa7146_dev* dev, u32 *isr)
 {
        struct av7110 *av7110 = (struct av7110*)dev->ext_priv;
 
-       DEB_INT(("dev: %p, av7110: %p\n",dev,av7110));
+//     DEB_INT(("dev: %p, av7110: %p\n",dev,av7110));
 
        if (*isr & MASK_19)
                tasklet_schedule (&av7110->debi_tasklet);
@@ -4887,7 +4958,7 @@ static struct saa7146_standard standard[] = {
 static struct saa7146_standard analog_standard[] = {
        {
                .name   = "PAL",        .id             = V4L2_STD_PAL_BG,
-               .v_offset       = 0x18, .v_field        = 288,          .v_calc = 576,
+               .v_offset       = 0x18 /* 0 */ ,        .v_field        = 288,          .v_calc = 576,
                .h_offset       = 0x08, .h_pixels       = 708,          .h_calc = 709,
                .v_max_out      = 576,  .h_max_out      = 768,
        }, {
@@ -4975,7 +5046,7 @@ static struct saa7146_ext_vv av7110_vv_data_st = {
        .inputs         = 1,
        .audios         = 1,
        .capabilities   = 0,
-       .flags          = SAA7146_EXT_SWAP_ODD_EVEN,
+       .flags          = 0, 
 
        .stds           = &standard[0],
        .num_stds       = sizeof(standard)/sizeof(struct saa7146_standard),
@@ -5002,6 +5073,7 @@ static struct saa7146_ext_vv av7110_vv_data_c = {
 
 static struct saa7146_extension av7110_extension = {
        .name           = "dvb\0",
+       .flags          = SAA7146_I2C_SHORT_DELAY,
 
        .module         = THIS_MODULE,
        .pci_tbl        = &pci_tbl[0],
@@ -5054,4 +5126,6 @@ MODULE_PARM(adac,"i");
 MODULE_PARM_DESC(adac,"audio DAC type: 0 TI, 1 CRYSTAL, 2 MSP (use if autodetection fails)");
 MODULE_PARM(hw_sections, "i");
 MODULE_PARM_DESC(hw_sections, "0 use software section filter, 1 use hardware");
-
+MODULE_PARM(rgb_on, "i");
+MODULE_PARM_DESC(rgb_on, "For Siemens DVB-C cards only: Enable RGB control"
+               " signal on SCART pin 16 to switch SCART video mode from CVBS to RGB");
index 3d55427..0448a88 100644 (file)
@@ -1,8 +1,6 @@
 #ifndef _AV7110_H_
 #define _AV7110_H_
 
-#define DVB_FIRM_PATH "/lib/DVB/"
-
 #include <linux/interrupt.h>
 #include <linux/socket.h>
 #include <linux/netdevice.h>
@@ -169,7 +167,8 @@ enum av7110_pid_command {
        DelPIDFilter,
        Scan,
        SetDescr,
-        SetIR
+        SetIR,
+        FlushTSQueue
 };
                        
 enum av7110_mpeg_command {
@@ -544,6 +543,18 @@ struct av7110 {
         int                 dsp_dev;
 
         u32                 ir_config;
+       
+       /* firmware stuff */
+       unsigned int device_initialized;
+
+       unsigned char *bin_fw;
+       unsigned long size_fw;
+
+       unsigned char *bin_dpram;
+       unsigned long size_dpram;
+
+       unsigned char *bin_root;
+       unsigned long size_root;
 };
 
 
diff --git a/drivers/media/dvb/ttpci/av7110_firm.h b/drivers/media/dvb/ttpci/av7110_firm.h
deleted file mode 100644 (file)
index de96ccd..0000000
+++ /dev/null
@@ -1,28315 +0,0 @@
-
-#include <asm/types.h>
-
-static u8 Dpram [] = {
-       0xe5, 0x9f, 0xf0, 0x1c, 0xe1, 0xb0, 0xf0, 0x0e, 
-       0xe5, 0x9f, 0xf0, 0x18, 0xe2, 0x5e, 0xf0, 0x04, 
-       0xe2, 0x5e, 0xf0, 0x08, 0xe1, 0xa0, 0x00, 0x00, 
-       0xea, 0x00, 0x00, 0x06, 0xe2, 0x5e, 0xf0, 0x04, 
-       0x2c, 0x00, 0x00, 0xe8, 0x2e, 0x02, 0x5c, 0xcc, 
-       0x2e, 0x01, 0xcb, 0x40, 0xa5, 0xa5, 0x5a, 0x5a, 
-       0x00, 0x1f, 0x15, 0x55, 0x00, 0x00, 0x00, 0x09, 
-       0xe9, 0x2d, 0x5f, 0xff, 0xe1, 0x4f, 0x00, 0x00, 
-       0xe9, 0x2d, 0x00, 0x01, 0xe2, 0x8f, 0x00, 0x01, 
-       0xe1, 0x2f, 0xff, 0x10, 0x21, 0xff, 0x48, 0x25, 
-       0x68, 0x00, 0x40, 0x52, 0x42, 0x08, 0xd1, 0x0b, 
-       0x32, 0x20, 0x0a, 0x00, 0x42, 0x08, 0xd1, 0x07, 
-       0x32, 0x20, 0x0a, 0x00, 0x42, 0x08, 0xd1, 0x03, 
-       0x0a, 0x00, 0x42, 0x08, 0xd0, 0x29, 0x32, 0x20, 
-       0x21, 0x0f, 0x42, 0x08, 0xd1, 0x01, 0x32, 0x10, 
-       0x09, 0x00, 0x21, 0x01, 0x42, 0x08, 0xd1, 0x08, 
-       0x1d, 0x12, 0x21, 0x02, 0x42, 0x08, 0xd1, 0x04, 
-       0x1d, 0x12, 0x21, 0x04, 0x42, 0x08, 0xd1, 0x00, 
-       0x1d, 0x12, 0x48, 0x13, 0x68, 0x00, 0xb4, 0x01, 
-       0x08, 0x90, 0x21, 0x01, 0x40, 0x81, 0x48, 0x0f, 
-       0x60, 0x01, 0x48, 0x0d, 0x58, 0x82, 0x48, 0x01, 
-       0x46, 0x86, 0x47, 0x10, 0x2c, 0x00, 0x00, 0xb1, 
-       0xbc, 0x02, 0x48, 0x0b, 0x68, 0x02, 0x23, 0x20, 
-       0x05, 0x1b, 0x40, 0x1a, 0x43, 0x99, 0x43, 0x11, 
-       0x60, 0x01, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
-       0xe8, 0xbd, 0x00, 0x01, 0xe1, 0x69, 0xf0, 0x00, 
-       0xe8, 0xbd, 0x5f, 0xff, 0xe2, 0x5e, 0xf0, 0x04, 
-       0x2e, 0x08, 0x3a, 0xf4, 0x66, 0x00, 0x00, 0x14, 
-       0x66, 0x00, 0x00, 0x18, 0x66, 0x00, 0x00, 0x1c, 
-       0x00, 0x00, 0x00, 0x0c, 0x2e, 0x02, 0x5d, 0xd4, 
-       0x2c, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-};
-
-
-static u8 Root [] = {
-       0xb4, 0x90, 0x49, 0x18, 0x1c, 0x0b, 0x4a, 0x18, 
-       0x1a, 0x50, 0x4f, 0x18, 0x1a, 0x79, 0x10, 0x8f, 
-       0x21, 0x00, 0x2f, 0x00, 0xdd, 0x04, 0xcb, 0x10, 
-       0xc2, 0x10, 0x31, 0x01, 0x42, 0xb9, 0xdb, 0xfa, 
-       0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
-       0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
-       0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
-       0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
-       0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
-       0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
-       0x49, 0x13, 0x18, 0x09, 0x4a, 0x13, 0x60, 0x11, 
-       0x49, 0x13, 0x18, 0x08, 0x49, 0x13, 0x60, 0x08, 
-       0xbc, 0x90, 0x47, 0x70, 0x2e, 0x01, 0xc8, 0x08, 
-       0x9e, 0x00, 0x0a, 0x00, 0x2e, 0x01, 0xc9, 0x08, 
-       0x2e, 0x01, 0xc8, 0x58, 0x2e, 0x01, 0xca, 0x28, 
-       0x2e, 0x01, 0xc8, 0x90, 0x2e, 0x01, 0xca, 0x2c, 
-       0x2e, 0x01, 0xc8, 0xac, 0x2e, 0x01, 0xca, 0x30, 
-       0x2e, 0x01, 0xc8, 0x58, 0x2e, 0x01, 0xca, 0x34, 
-       0x2e, 0x01, 0xc8, 0x74, 0x2e, 0x01, 0xca, 0x38, 
-       0x2e, 0x01, 0xc8, 0xac, 0x2e, 0x01, 0xca, 0x3c, 
-       0x2e, 0x01, 0xc8, 0x90, 0x2e, 0x01, 0xca, 0x40, 
-       0x2e, 0x01, 0xc8, 0x08, 0x2e, 0x01, 0xca, 0x44, 
-       0xb5, 0xf0, 0x1c, 0x0c, 0x1c, 0x15, 0x1c, 0x07, 
-       0xb0, 0x82, 0x2a, 0x00, 0xd1, 0x03, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x0e, 0x38, 
-       0x06, 0x00, 0x21, 0x0b, 0x06, 0x89, 0x4b, 0x43, 
-       0x93, 0x01, 0x42, 0x88, 0xd1, 0x32, 0x08, 0x78, 
-       0xd3, 0x05, 0x1e, 0x78, 0x88, 0x00, 0x70, 0x20, 
-       0x34, 0x01, 0x3d, 0x01, 0x37, 0x01, 0x08, 0xb8, 
-       0xd3, 0x0f, 0x2d, 0x02, 0xdb, 0x0d, 0x08, 0x60, 
-       0xd3, 0x06, 0x88, 0x39, 0x0a, 0x09, 0x70, 0x21, 
-       0x88, 0x38, 0x70, 0x60, 0x34, 0x02, 0xe0, 0x02, 
-       0x88, 0x38, 0x80, 0x20, 0x34, 0x02, 0x3d, 0x02, 
-       0x37, 0x02, 0x07, 0xae, 0x0f, 0xb6, 0x1b, 0xad, 
-       0xd0, 0x08, 0x9b, 0x01, 0x68, 0x1b, 0x1c, 0x38, 
-       0x1c, 0x21, 0x1c, 0x2a, 0xf0, 0x18, 0xfb, 0x6a, 
-       0x19, 0x7f, 0x19, 0x64, 0x2e, 0x00, 0xd0, 0x54, 
-       0x68, 0x38, 0x90, 0x00, 0x46, 0x6f, 0x78, 0x38, 
-       0x70, 0x20, 0x34, 0x01, 0x37, 0x01, 0x3e, 0x01, 
-       0xd1, 0xf9, 0xe0, 0x4a, 0x0e, 0x20, 0x06, 0x00, 
-       0x42, 0x88, 0xd1, 0x3f, 0xe0, 0x14, 0x08, 0x60, 
-       0xd3, 0x08, 0x1e, 0x60, 0x88, 0x01, 0x23, 0xff, 
-       0x02, 0x1b, 0x40, 0x19, 0x78, 0x3a, 0x43, 0x11, 
-       0x80, 0x01, 0xe0, 0x06, 0x88, 0x21, 0x06, 0x09, 
-       0x0e, 0x09, 0x78, 0x3a, 0x02, 0x12, 0x43, 0x11, 
-       0x80, 0x21, 0x34, 0x01, 0x3d, 0x01, 0x37, 0x01, 
-       0x07, 0xb8, 0xd0, 0x01, 0x2d, 0x00, 0xdc, 0xe6, 
-       0x07, 0xae, 0x0f, 0xb6, 0x1b, 0xad, 0xd0, 0x06, 
-       0x9b, 0x01, 0x68, 0x1b, 0x1c, 0x38, 0x1c, 0x21, 
-       0x1c, 0x2a, 0xf0, 0x18, 0xfb, 0x33, 0x19, 0x7f, 
-       0x19, 0x64, 0x2e, 0x00, 0xd0, 0x1d, 0x08, 0x60, 
-       0xd3, 0x08, 0x1e, 0x60, 0x88, 0x01, 0x23, 0xff, 
-       0x02, 0x1b, 0x40, 0x19, 0x78, 0x3a, 0x43, 0x11, 
-       0x80, 0x01, 0xe0, 0x06, 0x88, 0x21, 0x06, 0x09, 
-       0x0e, 0x09, 0x78, 0x3a, 0x02, 0x12, 0x43, 0x11, 
-       0x80, 0x21, 0x34, 0x01, 0x37, 0x01, 0x3e, 0x01, 
-       0xd1, 0xe9, 0xe0, 0x06, 0x9b, 0x01, 0x68, 0x1b, 
-       0x1c, 0x38, 0x1c, 0x21, 0x1c, 0x2a, 0xf0, 0x18, 
-       0xfb, 0x11, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x00, 0x48, 
-       0xb5, 0x00, 0x20, 0x03, 0xf0, 0x03, 0xfc, 0x50, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x4f, 0x10, 
-       0x89, 0x3c, 0x89, 0xbe, 0x8a, 0x3d, 0x23, 0x04, 
-       0x43, 0xdb, 0x68, 0x78, 0x40, 0x18, 0x0c, 0x1a, 
-       0x60, 0x78, 0xb4, 0x04, 0x1c, 0x13, 0x22, 0x00, 
-       0x21, 0x00, 0x20, 0x00, 0xf0, 0x00, 0xf8, 0x54, 
-       0x20, 0x01, 0x60, 0x78, 0xb0, 0x01, 0x4a, 0x07, 
-       0xb4, 0x04, 0x1c, 0x20, 0x1c, 0x31, 0x1c, 0x2a, 
-       0x4b, 0x04, 0xf0, 0x00, 0xf8, 0x49, 0xb0, 0x01, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
-       0xb5, 0xb0, 0x06, 0x00, 0x0e, 0x00, 0x4f, 0x1d, 
-       0x24, 0x10, 0x68, 0x3b, 0x2b, 0x00, 0xd1, 0x1a, 
-       0x28, 0x00, 0xd0, 0x18, 0x20, 0xa5, 0x01, 0xc0, 
-       0xf0, 0x05, 0xfb, 0x64, 0x60, 0x38, 0x8a, 0xbf, 
-       0x1c, 0x03, 0x2f, 0x00, 0xd0, 0x0c, 0x2b, 0x00, 
-       0xd0, 0x0a, 0x22, 0x01, 0x21, 0x00, 0x20, 0x1c, 
-       0xb4, 0x07, 0x1c, 0x18, 0x22, 0x1d, 0x1c, 0x39, 
-       0x1c, 0x23, 0xf0, 0x0a, 0xfb, 0xc7, 0xb0, 0x03, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x2b, 0x00, 
-       0xd0, 0xfa, 0x28, 0x00, 0xd1, 0xf8, 0x8a, 0xbd, 
-       0x2d, 0x00, 0xd0, 0x0a, 0x22, 0x00, 0x21, 0x00, 
-       0x20, 0x1c, 0xb4, 0x07, 0x1c, 0x18, 0x22, 0x1d, 
-       0x1c, 0x29, 0x1c, 0x23, 0xf0, 0x0a, 0xfb, 0xb2, 
-       0xb0, 0x03, 0x68, 0x38, 0xf0, 0x05, 0xfb, 0x44, 
-       0x20, 0x00, 0x60, 0x38, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x00, 0x00, 
-       0xb5, 0xf0, 0x9f, 0x05, 0x04, 0x04, 0x0c, 0x24, 
-       0x04, 0x0d, 0x0c, 0x2d, 0x04, 0x16, 0x0c, 0x36, 
-       0x04, 0x19, 0x0c, 0x09, 0xb0, 0x82, 0x91, 0x00, 
-       0x04, 0x38, 0x0c, 0x00, 0xb0, 0x81, 0x49, 0x89, 
-       0x4f, 0x89, 0x42, 0x8d, 0xd1, 0x00, 0x89, 0xbd, 
-       0x42, 0x8e, 0xd1, 0x00, 0x8a, 0x3e, 0x4a, 0x87, 
-       0x42, 0x95, 0xd1, 0x02, 0x89, 0xbd, 0x08, 0xd3, 
-       0x81, 0xbb, 0x4b, 0x84, 0x42, 0x9e, 0xd1, 0x02, 
-       0x8a, 0x3e, 0x08, 0xdb, 0x82, 0x3b, 0x9a, 0x01, 
-       0x42, 0x8a, 0xd1, 0x01, 0x8a, 0xba, 0x92, 0x01, 
-       0x8a, 0xbb, 0x99, 0x01, 0x42, 0x99, 0xd0, 0x20, 
-       0x68, 0x38, 0x90, 0x02, 0x28, 0x00, 0xd0, 0x1a, 
-       0x2b, 0x00, 0xd0, 0x0a, 0x22, 0x00, 0x21, 0x00, 
-       0x20, 0x1c, 0xb4, 0x07, 0x1c, 0x19, 0x23, 0x10, 
-       0x22, 0x1d, 0x98, 0x05, 0xf0, 0x0a, 0xfb, 0x6a, 
-       0xb0, 0x03, 0x99, 0x01, 0x29, 0x00, 0xd0, 0x0a, 
-       0x22, 0x01, 0x21, 0x00, 0x20, 0x1c, 0xb4, 0x07, 
-       0x99, 0x04, 0x23, 0x10, 0x22, 0x1d, 0x68, 0x38, 
-       0xf0, 0x0a, 0xfb, 0x5c, 0xb0, 0x03, 0x99, 0x01, 
-       0x82, 0xb9, 0x4b, 0x6d, 0x42, 0x9c, 0xd0, 0x37, 
-       0xdc, 0x28, 0x2c, 0x00, 0xd0, 0x2e, 0x3b, 0x02, 
-       0x42, 0x9c, 0xd0, 0x29, 0x4b, 0x69, 0x42, 0x9c, 
-       0xd1, 0x00, 0x1c, 0x34, 0x22, 0x00, 0xb4, 0x04, 
-       0x23, 0x00, 0x49, 0x62, 0x20, 0x1c, 0xf0, 0x0a, 
-       0xfc, 0xe3, 0x89, 0xb8, 0xb0, 0x01, 0x42, 0x85, 
-       0xd1, 0x02, 0x89, 0x38, 0x42, 0x84, 0xd0, 0x44, 
-       0x81, 0xbd, 0x20, 0x1f, 0xf0, 0x0b, 0xf8, 0x1c, 
-       0x23, 0x03, 0x02, 0x5b, 0x22, 0x01, 0x02, 0xd2, 
-       0x21, 0x02, 0x20, 0x1f, 0xf0, 0x0a, 0xfe, 0x94, 
-       0x2d, 0x00, 0xd0, 0x33, 0x2d, 0x01, 0xd1, 0x11, 
-       0x25, 0x00, 0xe0, 0x32, 0x4b, 0x55, 0x42, 0x9c, 
-       0xd0, 0x04, 0x33, 0x01, 0x42, 0x9c, 0xd1, 0xd9, 
-       0x89, 0x3c, 0xe7, 0xd7, 0x2d, 0x00, 0xd0, 0x01, 
-       0x1c, 0x2c, 0xe7, 0xd3, 0x1c, 0x34, 0xe7, 0xd1, 
-       0x1c, 0x2c, 0xe7, 0xcf, 0x42, 0xac, 0xd1, 0x01, 
-       0x20, 0x80, 0xe0, 0x00, 0x20, 0x00, 0x22, 0x00, 
-       0xb4, 0x04, 0x06, 0x00, 0x0e, 0x00, 0x22, 0x02, 
-       0x43, 0x02, 0x23, 0x01, 0x20, 0x1f, 0x1c, 0x29, 
-       0xf0, 0x0a, 0xfc, 0xaa, 0x23, 0x01, 0x02, 0x9b, 
-       0x00, 0x5a, 0x21, 0x01, 0x20, 0x1f, 0xb0, 0x01, 
-       0xf0, 0x0a, 0xfe, 0x66, 0x21, 0x00, 0x20, 0x1f, 
-       0xf0, 0x0b, 0xfb, 0x58, 0x20, 0x01, 0xf0, 0x0d, 
-       0xff, 0x47, 0xe0, 0x02, 0x20, 0x00, 0xf0, 0x0d, 
-       0xff, 0x43, 0x8a, 0x38, 0x42, 0x86, 0xd1, 0x02, 
-       0x89, 0x39, 0x42, 0x8c, 0xd0, 0x52, 0x28, 0x00, 
-       0xd0, 0x0d, 0x20, 0x03, 0xf0, 0x0e, 0xf8, 0x9a, 
-       0x20, 0x1e, 0xf0, 0x0b, 0xf8, 0x97, 0x23, 0x03, 
-       0x02, 0x5b, 0x22, 0x01, 0x02, 0xd2, 0x21, 0x02, 
-       0x20, 0x1e, 0xf0, 0x0a, 0xfe, 0x45, 0x82, 0x3e, 
-       0x2e, 0x00, 0xd0, 0x3f, 0x42, 0xb4, 0xd1, 0x02, 
-       0x20, 0x80, 0x90, 0x00, 0xe0, 0x01, 0x20, 0x00, 
-       0x90, 0x00, 0xf0, 0x1c, 0xf9, 0x57, 0x23, 0x01, 
-       0x04, 0x1b, 0x43, 0x18, 0xf0, 0x1c, 0xf9, 0x56, 
-       0x21, 0x00, 0x20, 0x00, 0xf0, 0x0e, 0xfd, 0x78, 
-       0x20, 0xff, 0x49, 0x29, 0x68, 0x09, 0x70, 0x08, 
-       0x49, 0x28, 0x48, 0x29, 0x23, 0x1e, 0x22, 0x10, 
-       0xf0, 0x0e, 0xfe, 0xac, 0x48, 0x27, 0x68, 0x00, 
-       0x78, 0x01, 0x23, 0x06, 0x43, 0x19, 0x70, 0x01, 
-       0xf0, 0x1c, 0xf9, 0x3c, 0x4b, 0x24, 0x40, 0x18, 
-       0xf0, 0x1c, 0xf9, 0x3c, 0x22, 0x00, 0xb4, 0x04, 
-       0x98, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x22, 0x02, 
-       0x43, 0x02, 0x23, 0x02, 0x20, 0x1e, 0x1c, 0x31, 
-       0xf0, 0x0a, 0xfc, 0x4a, 0x23, 0x01, 0x02, 0x9b, 
-       0x00, 0x5a, 0x21, 0x01, 0x20, 0x1e, 0xb0, 0x01, 
-       0xf0, 0x0a, 0xfe, 0x06, 0x21, 0x00, 0x20, 0x1e, 
-       0xf0, 0x0b, 0xfa, 0xf8, 0x42, 0xac, 0xd0, 0x13, 
-       0x42, 0xb4, 0xd0, 0x11, 0x2c, 0x00, 0xd0, 0x0f, 
-       0x23, 0x01, 0x02, 0x9b, 0x00, 0x5a, 0x21, 0x01, 
-       0x20, 0x1c, 0xf0, 0x0a, 0xfd, 0xf5, 0x22, 0x00, 
-       0xb4, 0x04, 0x23, 0x00, 0x22, 0x82, 0x20, 0x1c, 
-       0x1c, 0x21, 0xf0, 0x0a, 0xfc, 0x29, 0xb0, 0x01, 
-       0x81, 0x3c, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 
-       0x00, 0x00, 0xff, 0xfd, 0x00, 0x00, 0xff, 0xfc, 
-       0x2e, 0x08, 0x5e, 0x2c, 0x2e, 0x08, 0x47, 0x60, 
-       0x2e, 0x08, 0x05, 0xa8, 0x2e, 0x08, 0x5e, 0x58, 
-       0xff, 0xfe, 0xff, 0xff, 0xb5, 0x00, 0x22, 0x00, 
-       0xb4, 0x04, 0x04, 0x01, 0x0c, 0x09, 0x23, 0x00, 
-       0x4a, 0x03, 0x1e, 0x50, 0xf7, 0xff, 0xfe, 0xc0, 
-       0xb0, 0x01, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x00, 0x00, 0xff, 0xff, 0xb5, 0x00, 0x22, 0x00, 
-       0xb4, 0x04, 0x04, 0x02, 0x0c, 0x12, 0x23, 0x00, 
-       0x49, 0x03, 0x1e, 0x48, 0xf7, 0xff, 0xfe, 0xb0, 
-       0xb0, 0x01, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x00, 0x00, 0xff, 0xff, 0xb5, 0x00, 0x04, 0x00, 
-       0x0c, 0x00, 0xd0, 0x08, 0x28, 0x01, 0xd0, 0x0b, 
-       0x28, 0x02, 0xd1, 0x02, 0x02, 0x00, 0xf0, 0x0d, 
-       0xff, 0xf1, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x80, 
-       0xf0, 0x0d, 0xff, 0xec, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0xff, 0x30, 0x01, 0xf0, 0x0d, 0xff, 0xe6, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xb0, 0x27, 0x00, 
-       0x4c, 0x1b, 0x20, 0x01, 0x04, 0x80, 0x21, 0x00, 
-       0x22, 0x00, 0xc4, 0x86, 0xc4, 0x84, 0x3c, 0x14, 
-       0xf0, 0x05, 0xf9, 0x70, 0x61, 0x60, 0x28, 0x00, 
-       0xd0, 0x06, 0x21, 0x01, 0x04, 0x89, 0x61, 0xe1, 
-       0x18, 0x41, 0x62, 0x20, 0x61, 0xa1, 0xe0, 0x02, 
-       0x61, 0xe7, 0x61, 0xa7, 0x62, 0x27, 0x68, 0x21, 
-       0x00, 0xc9, 0x4a, 0x10, 0x18, 0x89, 0x60, 0x48, 
-       0x20, 0x00, 0x49, 0x0f, 0x4d, 0x0f, 0x00, 0x42, 
-       0x52, 0x8d, 0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 
-       0x28, 0x1d, 0xdb, 0xf8, 0x20, 0x00, 0x1c, 0x39, 
-       0x4c, 0x0b, 0x4f, 0x0c, 0x4b, 0x0c, 0x00, 0x42, 
-       0x52, 0xa5, 0x00, 0x82, 0x50, 0xb9, 0x50, 0x99, 
-       0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x28, 0x20, 
-       0xdb, 0xf5, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x00, 0x1c, 0x2e, 0x08, 0x3b, 0x70, 
-       0x2e, 0x08, 0x48, 0xf8, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x49, 0x30, 0x2e, 0x08, 0x49, 0xe8, 
-       0x2e, 0x08, 0x4a, 0x68, 0xb4, 0xf0, 0xb0, 0x81, 
-       0x49, 0x25, 0xc9, 0x0c, 0x39, 0x08, 0x1a, 0xd2, 
-       0x60, 0x8a, 0xd5, 0x02, 0x32, 0xff, 0x32, 0x01, 
-       0x60, 0x8a, 0x6a, 0x0a, 0x62, 0x8a, 0x68, 0x8f, 
-       0x2f, 0xfe, 0xdb, 0x03, 0x20, 0x00, 0xb0, 0x01, 
-       0xbc, 0xf0, 0x47, 0x70, 0x30, 0x03, 0x08, 0x80, 
-       0x00, 0x80, 0x4c, 0x1b, 0x69, 0xa6, 0x69, 0x64, 
-       0x2f, 0x3e, 0xdb, 0x24, 0x00, 0xdb, 0x4f, 0x19, 
-       0x19, 0xdb, 0x68, 0x5b, 0x62, 0x4b, 0x93, 0x00, 
-       0x1a, 0x9f, 0x4b, 0x15, 0x69, 0xdd, 0x2f, 0x00, 
-       0xdc, 0x00, 0x19, 0x7f, 0x23, 0x01, 0x03, 0x1b, 
-       0x18, 0xc3, 0x42, 0xbb, 0xdd, 0x0f, 0x18, 0x17, 
-       0x42, 0xb7, 0xdb, 0x09, 0x9a, 0x00, 0x1b, 0x12, 
-       0x2a, 0x00, 0xdc, 0x00, 0x19, 0x52, 0x42, 0x93, 
-       0xdd, 0x11, 0x18, 0x20, 0x62, 0x08, 0xe0, 0x0e, 
-       0x62, 0x0f, 0x1c, 0x14, 0xe0, 0x0b, 0x18, 0x10, 
-       0x62, 0x08, 0x1c, 0x14, 0xe0, 0x07, 0x18, 0x12, 
-       0x42, 0xb2, 0xdb, 0x00, 0x62, 0x0c, 0x6a, 0x0a, 
-       0x18, 0x10, 0x62, 0x08, 0x1c, 0x14, 0x1c, 0x20, 
-       0xb0, 0x01, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x00, 0x1c, 0x2e, 0x08, 0x3b, 0x70, 
-       0x48, 0x03, 0x6a, 0x81, 0x62, 0x01, 0x69, 0x01, 
-       0x31, 0x01, 0x61, 0x01, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x00, 0x1c, 0xb5, 0xf7, 0x04, 0x05, 
-       0x0c, 0x2d, 0x04, 0x0e, 0x0c, 0x36, 0xb0, 0x81, 
-       0x23, 0x01, 0x03, 0x1b, 0x98, 0x03, 0x42, 0x9e, 
-       0xdd, 0x05, 0x20, 0xff, 0xb0, 0x01, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x4f, 0x24, 
-       0x68, 0xb9, 0x29, 0xff, 0xdb, 0x02, 0x20, 0xff, 
-       0xb0, 0x01, 0xe7, 0xf4, 0x00, 0x69, 0x19, 0x49, 
-       0x00, 0x89, 0x4a, 0x20, 0x18, 0x8c, 0x89, 0x21, 
-       0x29, 0x01, 0xd0, 0x02, 0x20, 0xff, 0xb0, 0x01, 
-       0xe7, 0xe9, 0x79, 0x81, 0x91, 0x00, 0x88, 0xa0, 
-       0x08, 0x40, 0x07, 0x80, 0xd1, 0x02, 0x1c, 0x28, 
-       0xf0, 0x05, 0xfb, 0xca, 0x88, 0xa0, 0x23, 0x06, 
-       0x40, 0x18, 0x28, 0x02, 0xd1, 0x09, 0x88, 0xe0, 
-       0x99, 0x00, 0x42, 0x88, 0xd1, 0x05, 0x1c, 0x28, 
-       0xf0, 0x05, 0xfb, 0xbe, 0x20, 0xff, 0xb0, 0x01, 
-       0xe7, 0xd1, 0x88, 0xe0, 0x4b, 0x10, 0x42, 0x98, 
-       0xd1, 0x01, 0x99, 0x00, 0x80, 0xe1, 0x68, 0x39, 
-       0x00, 0xc8, 0x4a, 0x0e, 0x52, 0x15, 0x18, 0x80, 
-       0x80, 0x46, 0x9a, 0x03, 0x31, 0x01, 0x60, 0x42, 
-       0x20, 0x00, 0x23, 0xff, 0x60, 0x39, 0x33, 0x01, 
-       0x42, 0x99, 0xd1, 0x00, 0x60, 0x38, 0x68, 0xb9, 
-       0x31, 0x01, 0x60, 0xb9, 0x68, 0xfb, 0x42, 0x99, 
-       0xdd, 0x00, 0x60, 0xf9, 0xb0, 0x01, 0xe7, 0xb2, 
-       0x2e, 0x08, 0x00, 0x1c, 0x2e, 0x08, 0x47, 0x78, 
-       0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x3b, 0x70, 
-       0xb5, 0xf0, 0x20, 0xff, 0xb0, 0x82, 0x49, 0x33, 
-       0x91, 0x01, 0x49, 0x33, 0x8e, 0x89, 0x29, 0x00, 
-       0xd0, 0x03, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x4f, 0x30, 0xcf, 0x0a, 0x3f, 0x08, 
-       0x1a, 0xc9, 0x60, 0xb9, 0x1c, 0x0a, 0xd5, 0x02, 
-       0x1d, 0xd1, 0x31, 0xf9, 0x60, 0xb9, 0x68, 0xb9, 
-       0x29, 0x00, 0xd1, 0x03, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0xda, 0x49, 0x28, 
-       0x5a, 0x8d, 0x18, 0x51, 0x88, 0x4c, 0x68, 0x49, 
-       0x91, 0x00, 0x00, 0xa9, 0x4a, 0x25, 0x58, 0x56, 
-       0x2e, 0x00, 0xd0, 0x07, 0x48, 0x24, 0x58, 0x43, 
-       0x99, 0x00, 0x1c, 0x28, 0x1c, 0x22, 0xf0, 0x17, 
-       0xff, 0xff, 0x20, 0x00, 0x28, 0x00, 0xd0, 0x29, 
-       0x06, 0xed, 0x0e, 0xed, 0x1c, 0xe0, 0x08, 0x82, 
-       0x00, 0x92, 0x98, 0x00, 0x99, 0x01, 0x6a, 0xfb, 
-       0xf0, 0x17, 0xff, 0xec, 0x00, 0x68, 0x19, 0x40, 
-       0x00, 0x80, 0x49, 0x1a, 0x18, 0x40, 0x88, 0x80, 
-       0x21, 0x0c, 0x40, 0x01, 0x29, 0x0c, 0xd1, 0x04, 
-       0x02, 0x29, 0x31, 0x02, 0x04, 0x09, 0x0c, 0x09, 
-       0xe0, 0x03, 0x02, 0x29, 0x31, 0x01, 0x04, 0x09, 
-       0x0c, 0x09, 0x08, 0x40, 0xd3, 0x04, 0x04, 0x08, 
-       0x0c, 0x00, 0x21, 0x01, 0x03, 0xc9, 0x43, 0x01, 
-       0x48, 0x09, 0x85, 0x01, 0x85, 0x44, 0x21, 0x01, 
-       0x02, 0x49, 0x86, 0x81, 0x68, 0x78, 0x28, 0xff, 
-       0xd1, 0x02, 0x20, 0x00, 0x60, 0x78, 0xe0, 0x01, 
-       0x30, 0x01, 0x60, 0x78, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2c, 0x00, 0x02, 0x00, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2e, 0x08, 0x00, 0x1c, 
-       0x2e, 0x08, 0x3b, 0x70, 0x2e, 0x08, 0x49, 0xe8, 
-       0x2e, 0x08, 0x4a, 0x68, 0x2e, 0x08, 0x47, 0x78, 
-       0xb4, 0xf0, 0x06, 0x09, 0x0e, 0x09, 0x4f, 0x14, 
-       0x8e, 0xba, 0x2a, 0x00, 0xd0, 0x03, 0x20, 0x00, 
-       0x43, 0xc0, 0xbc, 0xf0, 0x47, 0x70, 0x1c, 0x05, 
-       0x4c, 0x10, 0x1d, 0x48, 0xd5, 0x00, 0x30, 0x01, 
-       0x10, 0x40, 0x04, 0x01, 0x0c, 0x09, 0x20, 0x00, 
-       0x29, 0x02, 0xdb, 0xf2, 0x29, 0xe0, 0xdc, 0xf0, 
-       0x22, 0x00, 0x29, 0x00, 0xdd, 0x07, 0x00, 0x53, 
-       0x5a, 0xee, 0x52, 0xe6, 0x32, 0x01, 0x04, 0x12, 
-       0x0c, 0x12, 0x42, 0x8a, 0xdb, 0xf7, 0x22, 0x04, 
-       0x85, 0x3a, 0x00, 0x49, 0x85, 0x79, 0x21, 0x0f, 
-       0x02, 0x49, 0x86, 0xb9, 0xbc, 0xf0, 0x47, 0x70, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2c, 0x00, 0x1e, 0x00, 
-       0xb5, 0xb0, 0x27, 0x00, 0x4d, 0x13, 0x8e, 0xa9, 
-       0x29, 0x00, 0xd0, 0x03, 0x43, 0xf8, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x1c, 0x79, 0x04, 0x09, 
-       0x0c, 0x09, 0x1c, 0x3a, 0x1c, 0x0f, 0x56, 0x81, 
-       0x29, 0x00, 0xd1, 0xf7, 0x24, 0x00, 0x2f, 0xfe, 
-       0xdd, 0x03, 0x27, 0xfe, 0x1d, 0xc1, 0x31, 0xd9, 
-       0x77, 0xcc, 0x1c, 0x7a, 0x49, 0x08, 0xf7, 0xff, 
-       0xfb, 0xc3, 0x20, 0x04, 0x85, 0x28, 0x1c, 0xf8, 
-       0x08, 0x80, 0x00, 0x80, 0x85, 0x68, 0x20, 0x0f, 
-       0x02, 0x40, 0x86, 0xa8, 0x1c, 0x20, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2c, 0x00, 0x1f, 0xc0, 
-       0x2c, 0x00, 0x1e, 0x00, 0xb4, 0xf0, 0x4b, 0x1b, 
-       0x8e, 0x9b, 0x2b, 0x00, 0xd0, 0x03, 0x20, 0x00, 
-       0x43, 0xc0, 0xbc, 0xf0, 0x47, 0x70, 0x1c, 0xd4, 
-       0xd5, 0x00, 0x34, 0x01, 0x10, 0x64, 0x1c, 0x0d, 
-       0x4f, 0x15, 0x02, 0x00, 0x04, 0x00, 0x0c, 0x00, 
-       0x78, 0x4e, 0x0a, 0x33, 0xd3, 0x07, 0x06, 0x73, 
-       0x0e, 0x5b, 0x18, 0x59, 0x78, 0x89, 0x43, 0x08, 
-       0x04, 0x00, 0x0c, 0x00, 0xe0, 0x03, 0x78, 0x89, 
-       0x43, 0x08, 0x04, 0x00, 0x0c, 0x00, 0x80, 0x38, 
-       0x20, 0x00, 0x2c, 0x00, 0xdd, 0x06, 0x00, 0x41, 
-       0x5a, 0x6b, 0x19, 0xc9, 0x80, 0x4b, 0x30, 0x01, 
-       0x42, 0xa0, 0xdb, 0xf8, 0x20, 0x0b, 0x49, 0x05, 
-       0x85, 0x08, 0x1c, 0x90, 0x85, 0x48, 0x20, 0x01, 
-       0x02, 0x40, 0x86, 0x88, 0x20, 0x00, 0xbc, 0xf0, 
-       0x47, 0x70, 0x00, 0x00, 0x2c, 0x00, 0x1f, 0xc0, 
-       0x2c, 0x00, 0x02, 0x00, 0x04, 0x02, 0x0c, 0x12, 
-       0x48, 0x0c, 0x6f, 0xc1, 0x20, 0x00, 0x43, 0xc0, 
-       0x29, 0x00, 0xd1, 0x12, 0x49, 0x0a, 0x8e, 0xcb, 
-       0x2b, 0x00, 0xd1, 0x0e, 0x8d, 0x8b, 0x2b, 0x00, 
-       0xd1, 0x0b, 0x48, 0x08, 0x86, 0xc2, 0x23, 0x07, 
-       0x86, 0x83, 0x85, 0x8b, 0x85, 0xca, 0x20, 0x09, 
-       0x02, 0x40, 0x86, 0xc8, 0x20, 0x01, 0x87, 0x88, 
-       0x20, 0x00, 0x47, 0x70, 0x2c, 0x00, 0x1f, 0x80, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2c, 0x00, 0x00, 0xc0, 
-       0xb5, 0x80, 0x1c, 0x01, 0x4a, 0x0d, 0x8e, 0xd3, 
-       0x20, 0x00, 0x43, 0xc0, 0x2b, 0x00, 0xd1, 0x12, 
-       0x8d, 0x93, 0x2b, 0x07, 0xd1, 0x0f, 0x8d, 0xd7, 
-       0x20, 0x00, 0x85, 0x90, 0x2f, 0x00, 0xd0, 0x0a, 
-       0x23, 0x01, 0x02, 0xdb, 0x42, 0x9f, 0xdc, 0x06, 
-       0x1c, 0x3a, 0x48, 0x05, 0x4b, 0x05, 0x6a, 0xdb, 
-       0xf0, 0x17, 0xfe, 0xdc, 0x1c, 0x38, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2c, 0x00, 0x1f, 0xc0, 
-       0x2c, 0x00, 0x12, 0x00, 0x2e, 0x08, 0x00, 0x1c, 
-       0xb5, 0xf0, 0xb0, 0x83, 0x49, 0x62, 0x8e, 0x88, 
-       0x28, 0x00, 0xd0, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x4e, 0x5f, 0x78, 0x30, 
-       0x49, 0x5f, 0x91, 0x02, 0x78, 0x09, 0x42, 0x88, 
-       0xd1, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x20, 0x00, 0x4d, 0x5b, 0x4b, 0x5c, 
-       0x93, 0x01, 0x1d, 0xd9, 0x31, 0x19, 0x7d, 0x0a, 
-       0x00, 0x53, 0x18, 0x9b, 0x01, 0x1b, 0x19, 0x5b, 
-       0x78, 0xdc, 0x1c, 0x1f, 0x79, 0x1b, 0x42, 0x9c, 
-       0xd1, 0x04, 0x79, 0x7b, 0x07, 0xdb, 0x0f, 0xdb, 
-       0x2b, 0x01, 0xd1, 0x06, 0x7d, 0x0b, 0x93, 0x00, 
-       0x32, 0x01, 0x07, 0x52, 0x0f, 0x52, 0x75, 0x0a, 
-       0xe0, 0x08, 0x32, 0x01, 0x07, 0x52, 0x0f, 0x52, 
-       0x75, 0x0a, 0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 
-       0x28, 0x08, 0xdb, 0xe0, 0x28, 0x08, 0xd1, 0x03, 
-       0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x98, 0x00, 0x00, 0x43, 0x18, 0x18, 0x01, 0x00, 
-       0x19, 0x47, 0x78, 0xf8, 0x00, 0xc0, 0x19, 0xc0, 
-       0x89, 0x84, 0x23, 0x01, 0x03, 0x1b, 0x42, 0x9c, 
-       0xdd, 0x00, 0x1c, 0x1c, 0x68, 0x81, 0x89, 0xc0, 
-       0x18, 0x08, 0x1c, 0xe1, 0x08, 0x8a, 0x00, 0x92, 
-       0x49, 0x3e, 0x9b, 0x01, 0x6a, 0xdb, 0xf0, 0x17, 
-       0xfe, 0x79, 0x88, 0x38, 0x02, 0x00, 0x30, 0x09, 
-       0x49, 0x35, 0x85, 0x08, 0x85, 0x4c, 0x20, 0x01, 
-       0x02, 0x40, 0x86, 0x88, 0x78, 0xf8, 0x00, 0xc0, 
-       0x19, 0xc0, 0x89, 0xc1, 0x19, 0x09, 0x81, 0xc1, 
-       0x78, 0xf8, 0x00, 0xc0, 0x19, 0xc0, 0x89, 0x81, 
-       0x1b, 0x09, 0x81, 0x81, 0x78, 0xf8, 0x00, 0xc0, 
-       0x19, 0xc0, 0x89, 0x81, 0x29, 0x00, 0xd1, 0x4f, 
-       0x24, 0x00, 0x81, 0xc4, 0x78, 0xf9, 0x6a, 0xb8, 
-       0x18, 0x40, 0x73, 0x04, 0x78, 0xf8, 0x30, 0x01, 
-       0x07, 0x80, 0x0f, 0x80, 0x70, 0xf8, 0x78, 0x30, 
-       0x30, 0x01, 0x70, 0x30, 0x78, 0xf8, 0x79, 0x39, 
-       0x42, 0x88, 0xd1, 0x3d, 0x79, 0x78, 0x21, 0x02, 
-       0x40, 0x01, 0x29, 0x02, 0xd1, 0x1e, 0x70, 0xfc, 
-       0x71, 0x3c, 0x71, 0x7c, 0x49, 0x22, 0x80, 0x39, 
-       0x6a, 0xb8, 0x68, 0x00, 0xf0, 0x04, 0xfe, 0xac, 
-       0x6a, 0xb8, 0xf0, 0x04, 0xfe, 0xa9, 0x20, 0x00, 
-       0x49, 0x1d, 0x00, 0x42, 0x18, 0x12, 0x01, 0x12, 
-       0x5a, 0xaa, 0x42, 0x8a, 0xd1, 0x04, 0x30, 0x01, 
-       0x06, 0x00, 0x0e, 0x00, 0x28, 0x08, 0xdb, 0xf4, 
-       0x28, 0x08, 0xd1, 0x1d, 0x70, 0x34, 0x99, 0x02, 
-       0x70, 0x0c, 0xe0, 0x19, 0x07, 0xc0, 0x0f, 0xc0, 
-       0x28, 0x01, 0xd1, 0x15, 0x70, 0xfc, 0x71, 0x3c, 
-       0x21, 0x06, 0x1d, 0xf8, 0x30, 0x19, 0x73, 0x41, 
-       0x6a, 0xb9, 0x72, 0x0c, 0x79, 0x79, 0x08, 0x49, 
-       0x00, 0x49, 0x71, 0x79, 0x22, 0x04, 0x7b, 0x01, 
-       0xb4, 0x06, 0x78, 0xb9, 0x22, 0x0a, 0x20, 0x85, 
-       0x6a, 0xbb, 0xf0, 0x0a, 0xfb, 0x07, 0xb0, 0x02, 
-       0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2e, 0x08, 0x03, 0xbc, 
-       0x2e, 0x08, 0x03, 0xb8, 0x2e, 0x08, 0x44, 0x68, 
-       0x2e, 0x08, 0x00, 0x1c, 0x2c, 0x00, 0x02, 0x00, 
-       0x00, 0x00, 0xff, 0xff, 0xb5, 0x80, 0x4f, 0x0b, 
-       0x68, 0x38, 0x28, 0x00, 0xd1, 0x0f, 0x20, 0x2f, 
-       0x02, 0x80, 0xf0, 0x04, 0xfe, 0x87, 0x60, 0x38, 
-       0x20, 0x00, 0x49, 0x07, 0x60, 0x08, 0x49, 0x07, 
-       0x60, 0x08, 0x49, 0x07, 0x60, 0x08, 0x20, 0x2f, 
-       0x02, 0x80, 0x49, 0x06, 0x60, 0x08, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x02, 0x5c, 0x90, 
-       0x2e, 0x02, 0x5c, 0x98, 0x2e, 0x02, 0x5c, 0x94, 
-       0x2e, 0x02, 0x5c, 0x9c, 0x2e, 0x02, 0x5c, 0xa0, 
-       0xb5, 0x80, 0x4f, 0x04, 0x68, 0x38, 0xf0, 0x04, 
-       0xfe, 0x73, 0x20, 0x00, 0x60, 0x38, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x02, 0x5c, 0x90, 
-       0xb5, 0xf0, 0xb0, 0x82, 0x4a, 0x36, 0x8e, 0x90, 
-       0x28, 0x00, 0xd0, 0x03, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x48, 0x33, 0x68, 0x01, 
-       0x4e, 0x33, 0x68, 0x30, 0x1a, 0x0f, 0xd1, 0x03, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2f, 0x00, 0xda, 0x02, 0x23, 0x2f, 0x02, 0x9b, 
-       0x18, 0xff, 0x4c, 0x2e, 0x6b, 0xa1, 0x1c, 0x4a, 
-       0x49, 0x2d, 0x68, 0x09, 0x42, 0x8a, 0xd9, 0x13, 
-       0x23, 0x2f, 0x01, 0x1b, 0x42, 0x9f, 0xda, 0x03, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x4a, 0x23, 0x8e, 0xd2, 0x2a, 0x00, 0xd0, 0x07, 
-       0x23, 0xeb, 0x01, 0x1b, 0x42, 0x9f, 0xda, 0x03, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x63, 0xa1, 0x4b, 0x22, 0x42, 0x9f, 0xdd, 0x00, 
-       0x1c, 0x1f, 0x21, 0x2f, 0x02, 0x89, 0x1a, 0x0d, 
-       0x49, 0x1f, 0x91, 0x01, 0x42, 0xaf, 0xdd, 0x14, 
-       0x1b, 0x7a, 0x92, 0x00, 0x99, 0x01, 0x68, 0x09, 
-       0x18, 0x08, 0x1c, 0x2a, 0x49, 0x1b, 0x6b, 0x23, 
-       0xf0, 0x17, 0xfd, 0x84, 0x4b, 0x19, 0x18, 0xe9, 
-       0x98, 0x01, 0x9a, 0x00, 0x68, 0x00, 0x6b, 0x23, 
-       0xf0, 0x17, 0xfd, 0x7c, 0x9a, 0x00, 0x60, 0x32, 
-       0xe0, 0x0e, 0x99, 0x01, 0x68, 0x09, 0x18, 0x08, 
-       0x1c, 0x3a, 0x49, 0x12, 0x6b, 0x23, 0xf0, 0x17, 
-       0xfd, 0x71, 0x68, 0x30, 0x19, 0xc1, 0x20, 0x2f, 
-       0x02, 0x80, 0xf0, 0x17, 0xfd, 0x75, 0x60, 0x31, 
-       0x20, 0x12, 0x4a, 0x05, 0x85, 0x10, 0x85, 0x57, 
-       0x20, 0x01, 0x02, 0x40, 0x86, 0x90, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2e, 0x02, 0x5c, 0x98, 
-       0x2e, 0x02, 0x5c, 0x94, 0x2e, 0x08, 0x00, 0x1c, 
-       0x2e, 0x08, 0x05, 0xb0, 0x00, 0x00, 0x0f, 0x6c, 
-       0x2e, 0x02, 0x5c, 0x90, 0x2c, 0x00, 0x02, 0x00, 
-       0x20, 0x00, 0x49, 0x03, 0x60, 0x08, 0x49, 0x03, 
-       0x60, 0x08, 0x49, 0x03, 0x60, 0x08, 0x47, 0x70, 
-       0x2e, 0x02, 0x5c, 0x98, 0x2e, 0x02, 0x5c, 0x94, 
-       0x2e, 0x02, 0x5c, 0x9c, 0x2a, 0x00, 0xd0, 0x05, 
-       0x78, 0x03, 0x70, 0x0b, 0x30, 0x01, 0x31, 0x01, 
-       0x3a, 0x01, 0xd1, 0xf9, 0x47, 0x70, 0xb5, 0xf3, 
-       0xb0, 0x83, 0x98, 0x03, 0x78, 0x40, 0x00, 0x80, 
-       0x1c, 0x0f, 0x49, 0x3d, 0x58, 0x08, 0x28, 0x00, 
-       0xd1, 0x05, 0x20, 0xb0, 0xb0, 0x03, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x98, 0x03, 
-       0x88, 0x45, 0x30, 0x04, 0xc8, 0x41, 0x1d, 0xf2, 
-       0x32, 0xb9, 0x1a, 0x14, 0x23, 0x01, 0x03, 0x1b, 
-       0x42, 0x9d, 0xdd, 0x03, 0x20, 0x00, 0x43, 0xc0, 
-       0xb0, 0x03, 0xe7, 0xec, 0x19, 0x79, 0x91, 0x00, 
-       0x4b, 0x30, 0x93, 0x02, 0x2c, 0xbc, 0xdc, 0x01, 
-       0x2c, 0x00, 0xda, 0x07, 0x9b, 0x02, 0x68, 0x18, 
-       0x30, 0x01, 0x60, 0x18, 0x20, 0x00, 0x43, 0xc0, 
-       0xb0, 0x03, 0xe7, 0xdc, 0x42, 0xac, 0xdb, 0x06, 
-       0x9b, 0x02, 0x68, 0x5b, 0x1c, 0x39, 0x1c, 0x2a, 
-       0xf0, 0x17, 0xfd, 0x00, 0xe0, 0x44, 0x2d, 0x00, 
-       0xdd, 0x42, 0x4b, 0x25, 0x93, 0x01, 0x99, 0x00, 
-       0x42, 0x8f, 0xd9, 0x07, 0x9b, 0x02, 0x68, 0x18, 
-       0x30, 0x01, 0x60, 0x18, 0x20, 0x00, 0x43, 0xc0, 
-       0xb0, 0x03, 0xe7, 0xc4, 0x42, 0xa5, 0xdd, 0x07, 
-       0x9b, 0x02, 0x68, 0x5b, 0x1c, 0x39, 0x1c, 0x22, 
-       0xf0, 0x17, 0xfc, 0xe8, 0x68, 0x36, 0xe0, 0x05, 
-       0x9b, 0x02, 0x68, 0x5b, 0x1c, 0x39, 0x1c, 0x2a, 
-       0xf0, 0x17, 0xfc, 0xe0, 0x19, 0x3f, 0x1b, 0x2d, 
-       0x79, 0xb0, 0x19, 0x80, 0x9a, 0x03, 0x78, 0x52, 
-       0x00, 0xd3, 0x1a, 0x9a, 0x00, 0x92, 0x9b, 0x01, 
-       0x68, 0x1b, 0x18, 0xd2, 0x78, 0x92, 0x06, 0xd2, 
-       0x0e, 0xd2, 0x1d, 0x31, 0x2a, 0x12, 0xd1, 0x06, 
-       0x78, 0xca, 0x0a, 0x12, 0xd2, 0x03, 0x78, 0x89, 
-       0x29, 0x09, 0xd1, 0x00, 0x38, 0x01, 0x1d, 0xf1, 
-       0x31, 0xb9, 0x1a, 0x0c, 0x2c, 0xbc, 0xdc, 0x01, 
-       0x2c, 0x00, 0xda, 0x03, 0x20, 0x00, 0x43, 0xc0, 
-       0xb0, 0x03, 0xe7, 0x90, 0x2d, 0x00, 0xdc, 0xbe, 
-       0x20, 0x00, 0xb0, 0x03, 0xe7, 0x8b, 0x00, 0x00, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x00, 0x58, 
-       0x2e, 0x08, 0x5d, 0xc4, 0xb4, 0xf0, 0x68, 0x42, 
-       0x68, 0x84, 0x1d, 0xe1, 0x31, 0xb7, 0x1c, 0x16, 
-       0xb0, 0x81, 0x42, 0x91, 0xd9, 0x09, 0x78, 0x51, 
-       0x07, 0x09, 0x0f, 0x09, 0x02, 0x09, 0x78, 0x92, 
-       0x43, 0x11, 0x31, 0x03, 0x04, 0x09, 0x0c, 0x09, 
-       0xe0, 0x5b, 0x68, 0x21, 0x79, 0x8b, 0x93, 0x00, 
-       0x1d, 0x0f, 0x18, 0x59, 0x78, 0x45, 0x00, 0xeb, 
-       0x1b, 0x5b, 0x00, 0x9b, 0x4d, 0x2b, 0x68, 0x2d, 
-       0x19, 0x5b, 0x78, 0x9b, 0x06, 0xdb, 0x0e, 0xdb, 
-       0x2b, 0x12, 0xd1, 0x31, 0x1d, 0xe3, 0x33, 0xb9, 
-       0x1b, 0x9b, 0x06, 0x1d, 0x0e, 0x2d, 0x78, 0xfe, 
-       0x0a, 0x33, 0xd2, 0x29, 0x2d, 0x0e, 0xda, 0x27, 
-       0x9b, 0x00, 0x2b, 0x09, 0xdd, 0x06, 0x79, 0x3b, 
-       0x18, 0xfb, 0x33, 0x05, 0x42, 0x8b, 0xd0, 0x1f, 
-       0x39, 0x01, 0xe0, 0x1d, 0x9b, 0x00, 0x2b, 0x09, 
-       0xd1, 0x1a, 0x79, 0x3b, 0x2b, 0x00, 0xd0, 0x01, 
-       0x39, 0x01, 0xe0, 0x15, 0x39, 0x01, 0x1d, 0xe3, 
-       0x33, 0xb8, 0x42, 0x93, 0xd9, 0x09, 0x78, 0x53, 
-       0x07, 0x1b, 0x0f, 0x1b, 0x02, 0x1b, 0x04, 0x1b, 
-       0x0c, 0x1b, 0x33, 0x03, 0x04, 0x1b, 0x0c, 0x1b, 
-       0xe0, 0x03, 0x78, 0x4b, 0x33, 0x03, 0x04, 0x1b, 
-       0x0c, 0x1b, 0x42, 0x9d, 0xda, 0x00, 0x31, 0x01, 
-       0x1d, 0xe3, 0x33, 0xb8, 0x42, 0x93, 0xd9, 0x0b, 
-       0x78, 0x52, 0x07, 0x12, 0x0f, 0x12, 0x02, 0x12, 
-       0x04, 0x12, 0x0c, 0x12, 0x78, 0x09, 0x18, 0x51, 
-       0x31, 0x03, 0x04, 0x09, 0x0c, 0x09, 0xe0, 0x08, 
-       0x78, 0x0a, 0x07, 0x12, 0x0f, 0x12, 0x02, 0x12, 
-       0x78, 0x49, 0x43, 0x11, 0x31, 0x03, 0x04, 0x09, 
-       0x0c, 0x09, 0x80, 0x41, 0xb0, 0x01, 0xbc, 0xf0, 
-       0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x5d, 0xc4, 
-       0x4a, 0x02, 0xc2, 0x03, 0x3a, 0x08, 0x20, 0x00, 
-       0x60, 0x90, 0x47, 0x70, 0x2e, 0x08, 0x43, 0x70, 
-       0x48, 0x01, 0x68, 0x80, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x43, 0x70, 0x48, 0x01, 0x68, 0x80, 
-       0x08, 0xc0, 0x47, 0x70, 0x2e, 0x08, 0x43, 0x70, 
-       0x48, 0x02, 0x68, 0x81, 0x08, 0xc9, 0x68, 0x00, 
-       0x18, 0x08, 0x47, 0x70, 0x2e, 0x08, 0x43, 0x70, 
-       0xb4, 0xf0, 0x1c, 0x03, 0x20, 0x00, 0xb0, 0x82, 
-       0x49, 0x53, 0x91, 0x01, 0x68, 0x89, 0x18, 0xcf, 
-       0x97, 0x00, 0x08, 0xca, 0x07, 0x4c, 0x0f, 0x64, 
-       0x49, 0x4f, 0x68, 0x09, 0xd1, 0x32, 0x1c, 0x1f, 
-       0xd5, 0x04, 0x42, 0x7f, 0x07, 0x7f, 0x0f, 0x7f, 
-       0x42, 0x7f, 0xe0, 0x01, 0x07, 0x7f, 0x0f, 0x7f, 
-       0x2f, 0x00, 0xd1, 0x27, 0x2b, 0x10, 0xd0, 0x16, 
-       0xdc, 0x05, 0x2b, 0x00, 0xd0, 0x5a, 0x2b, 0x08, 
-       0xd1, 0x59, 0x5c, 0x88, 0xe0, 0x81, 0x2b, 0x18, 
-       0xd0, 0x13, 0x2b, 0x20, 0xd1, 0x53, 0x5c, 0x88, 
-       0x06, 0x00, 0x18, 0x89, 0x78, 0x4a, 0x04, 0x12, 
-       0x18, 0x80, 0x78, 0x8a, 0x02, 0x12, 0x18, 0x80, 
-       0x78, 0xc9, 0x18, 0x40, 0xe0, 0x71, 0x5c, 0x88, 
-       0x02, 0x00, 0x18, 0x89, 0x78, 0x49, 0x18, 0x40, 
-       0xe0, 0x6b, 0x5c, 0x88, 0x04, 0x00, 0x18, 0x89, 
-       0x78, 0x4a, 0x02, 0x12, 0x18, 0x80, 0x78, 0x89, 
-       0x18, 0x40, 0xe0, 0x62, 0x2b, 0x00, 0xd1, 0x03, 
-       0x20, 0x00, 0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
-       0x9f, 0x00, 0x08, 0xfd, 0x07, 0x7f, 0x0f, 0x7f, 
-       0x2b, 0x20, 0xdc, 0x56, 0x1a, 0xae, 0x4d, 0x2f, 
-       0x2e, 0x05, 0xd2, 0x52, 0xa3, 0x01, 0x5d, 0x9b, 
-       0x00, 0x5b, 0x44, 0x9f, 0x02, 0x09, 0x14, 0x25, 
-       0x38, 0x00, 0x5c, 0x88, 0x5d, 0x29, 0x40, 0x08, 
-       0x21, 0x08, 0x1b, 0xc9, 0x40, 0xc8, 0xe0, 0x44, 
-       0x1c, 0x50, 0x5c, 0x8a, 0x5d, 0x2b, 0x40, 0x1a, 
-       0x02, 0x12, 0x5c, 0x08, 0x18, 0x80, 0x21, 0x08, 
-       0x1b, 0xc9, 0x40, 0xc8, 0xe0, 0x39, 0x1c, 0x50, 
-       0x5c, 0x8a, 0x5d, 0x2b, 0x40, 0x1a, 0x02, 0x12, 
-       0x1c, 0x43, 0x5c, 0x08, 0x18, 0x80, 0x02, 0x00, 
-       0x5c, 0xc9, 0x18, 0x08, 0x21, 0x08, 0x1b, 0xc9, 
-       0x40, 0xc8, 0xe0, 0x2a, 0xe0, 0x29, 0xe0, 0x28, 
-       0x1c, 0x50, 0x5c, 0x8a, 0x5d, 0x2b, 0x40, 0x1a, 
-       0x02, 0x12, 0x1c, 0x43, 0x5c, 0x08, 0x18, 0x80, 
-       0x02, 0x00, 0x1c, 0x5a, 0x5c, 0xcb, 0x18, 0x18, 
-       0x02, 0x00, 0x5c, 0x89, 0x18, 0x08, 0x21, 0x08, 
-       0x1b, 0xc9, 0x40, 0xc8, 0xe0, 0x15, 0x1c, 0x50, 
-       0x5c, 0x8a, 0x5d, 0x2b, 0x40, 0x1a, 0x02, 0x12, 
-       0x1c, 0x43, 0x5c, 0x08, 0x18, 0x80, 0x02, 0x00, 
-       0x1c, 0x5a, 0x5c, 0xcb, 0x18, 0x18, 0x02, 0x03, 
-       0x1c, 0x50, 0x5c, 0x8a, 0x18, 0xd2, 0x40, 0xba, 
-       0x5c, 0x08, 0x21, 0x08, 0x1b, 0xc9, 0x40, 0xc8, 
-       0x18, 0x80, 0x99, 0x01, 0x9f, 0x00, 0x60, 0x8f, 
-       0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x43, 0x70, 0x2e, 0x08, 0x00, 0x60, 
-       0xb5, 0xb0, 0x1c, 0x07, 0x20, 0x00, 0x24, 0x00, 
-       0x2f, 0x00, 0xdd, 0x09, 0x00, 0x85, 0x18, 0x2d, 
-       0x00, 0x6d, 0x20, 0x04, 0xf7, 0xff, 0xff, 0x44, 
-       0x19, 0x40, 0x34, 0x01, 0x42, 0xbc, 0xdb, 0xf5, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x47, 0x70, 0xb5, 0xb0, 0x1c, 0x0c, 0x1c, 0x05, 
-       0x1c, 0x17, 0xb0, 0x90, 0xf0, 0x1b, 0xfb, 0x16, 
-       0x49, 0x25, 0x20, 0x0c, 0xf0, 0x1b, 0xfa, 0xde, 
-       0xf0, 0x1b, 0xfa, 0xd4, 0x4b, 0x23, 0x40, 0x18, 
-       0xf0, 0x1b, 0xfa, 0xd4, 0xf0, 0x1b, 0xfb, 0x40, 
-       0x20, 0x10, 0x90, 0x0a, 0x20, 0xff, 0x90, 0x0b, 
-       0xa8, 0x0f, 0x90, 0x0c, 0x20, 0x0c, 0x90, 0x0d, 
-       0x48, 0x1d, 0x90, 0x0e, 0xa8, 0x0a, 0xf0, 0x0f, 
-       0xf8, 0xd5, 0xab, 0x07, 0x70, 0x1d, 0x94, 0x08, 
-       0x72, 0x1f, 0x24, 0x00, 0xab, 0x09, 0x70, 0x5c, 
-       0x27, 0x00, 0x4d, 0x18, 0xf0, 0x0f, 0xf9, 0x36, 
-       0x28, 0x00, 0xd0, 0x02, 0x37, 0x01, 0x42, 0xaf, 
-       0xdb, 0xf8, 0x20, 0x01, 0xa9, 0x07, 0xf0, 0x0f, 
-       0xf9, 0x37, 0xf0, 0x0f, 0xf9, 0x2b, 0x28, 0x00, 
-       0xd1, 0xfb, 0x94, 0x0b, 0xa8, 0x0a, 0xf0, 0x0f, 
-       0xf8, 0xb9, 0xf0, 0x1b, 0xfa, 0xdf, 0x21, 0x00, 
-       0x20, 0x0c, 0xf0, 0x1b, 0xfa, 0xa7, 0xf0, 0x1b, 
-       0xfa, 0x9d, 0x23, 0x01, 0x02, 0xdb, 0x43, 0x18, 
-       0xf0, 0x1b, 0xfa, 0x9c, 0xf0, 0x1b, 0xfb, 0x08, 
-       0x46, 0x68, 0xf0, 0x0f, 0xf8, 0xf3, 0x98, 0x04, 
-       0xb0, 0x10, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x00, 0x15, 0x45, 0xff, 0xff, 0xf7, 0xff, 
-       0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x27, 0x10, 
-       0xb5, 0xff, 0x9e, 0x09, 0x1c, 0x04, 0x1c, 0x0d, 
-       0x1c, 0x17, 0xb0, 0x93, 0xf0, 0x1b, 0xfa, 0xba, 
-       0x49, 0x31, 0x20, 0x0c, 0xf0, 0x1b, 0xfa, 0x82, 
-       0xf0, 0x1b, 0xfa, 0x78, 0x4b, 0x2f, 0x40, 0x18, 
-       0xf0, 0x1b, 0xfa, 0x78, 0xf0, 0x1b, 0xfa, 0xe4, 
-       0x20, 0x10, 0x90, 0x0d, 0x20, 0xff, 0x90, 0x0e, 
-       0xa8, 0x12, 0x90, 0x0f, 0x20, 0x0c, 0x90, 0x10, 
-       0x48, 0x29, 0x90, 0x11, 0xa8, 0x0d, 0xf0, 0x0f, 
-       0xf8, 0x79, 0xab, 0x07, 0x70, 0x1c, 0x95, 0x08, 
-       0x72, 0x1f, 0x20, 0xff, 0xab, 0x09, 0x70, 0x58, 
-       0x1c, 0x60, 0x71, 0x18, 0x9b, 0x16, 0x93, 0x0b, 
-       0xab, 0x0c, 0x70, 0x1e, 0x20, 0xff, 0x70, 0x58, 
-       0x24, 0x00, 0x4d, 0x20, 0xf0, 0x0f, 0xf8, 0xd2, 
-       0x28, 0x00, 0xd0, 0x02, 0x34, 0x01, 0x42, 0xac, 
-       0xdb, 0xf8, 0x2f, 0x00, 0xd1, 0x04, 0x20, 0x01, 
-       0xa9, 0x0a, 0xf0, 0x0f, 0xf8, 0xd1, 0xe0, 0x03, 
-       0x20, 0x02, 0xa9, 0x07, 0xf0, 0x0f, 0xf8, 0xcc, 
-       0xf0, 0x0f, 0xf8, 0xc0, 0x28, 0x00, 0xd1, 0xfb, 
-       0x27, 0x00, 0x97, 0x0e, 0xa8, 0x0d, 0xf0, 0x0f, 
-       0xf8, 0x4d, 0xf0, 0x1b, 0xfa, 0x73, 0x21, 0x00, 
-       0x20, 0x0c, 0xf0, 0x1b, 0xfa, 0x3b, 0xf0, 0x1b, 
-       0xfa, 0x31, 0x23, 0x01, 0x02, 0xdb, 0x43, 0x18, 
-       0xf0, 0x1b, 0xfa, 0x30, 0xf0, 0x1b, 0xfa, 0x9c, 
-       0x46, 0x68, 0xf0, 0x0f, 0xf8, 0x87, 0x98, 0x01, 
-       0x0a, 0x80, 0xd2, 0x05, 0x20, 0x01, 0xb0, 0x13, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x1c, 0x38, 0xb0, 0x13, 0xe7, 0xf8, 0x00, 0x00, 
-       0x2e, 0x00, 0x15, 0x45, 0xff, 0xff, 0xf7, 0xff, 
-       0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x27, 0x10, 
-       0x1c, 0x01, 0x48, 0x04, 0x61, 0xc1, 0x68, 0x00, 
-       0x28, 0x00, 0xd1, 0x01, 0x48, 0x02, 0x60, 0x01, 
-       0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x01, 0x68, 
-       0x6e, 0x00, 0x17, 0x00, 0xb5, 0xb0, 0x4f, 0x41, 
-       0x69, 0x38, 0x4c, 0x41, 0x28, 0x00, 0xd0, 0x07, 
-       0x20, 0x03, 0x60, 0x20, 0x69, 0x38, 0x38, 0x01, 
-       0x61, 0x38, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x21, 0x02, 0x69, 0x78, 0x28, 0x00, 0xd0, 0x04, 
-       0x60, 0x21, 0x69, 0x78, 0x38, 0x01, 0x61, 0x78, 
-       0xd1, 0xf3, 0x68, 0xf8, 0x28, 0x00, 0xd0, 0x20, 
-       0x38, 0x01, 0x60, 0xf8, 0x4a, 0x35, 0xd0, 0x08, 
-       0x68, 0xbb, 0x18, 0xd2, 0x3a, 0x20, 0x7f, 0xd2, 
-       0x1e, 0x45, 0x40, 0xea, 0x07, 0xd2, 0x0f, 0xd2, 
-       0xe0, 0x09, 0x68, 0xbb, 0x18, 0xd2, 0x3a, 0x20, 
-       0x7f, 0xd2, 0x4b, 0x2f, 0x5c, 0x9a, 0x23, 0x01, 
-       0x40, 0x5a, 0x06, 0x12, 0x0e, 0x12, 0x23, 0x01, 
-       0x2a, 0x00, 0xd0, 0x02, 0x61, 0x79, 0x61, 0x3b, 
-       0xe0, 0x01, 0x61, 0x39, 0x61, 0x7b, 0x28, 0x00, 
-       0xd1, 0xcf, 0x68, 0xb8, 0x30, 0x01, 0x60, 0xb8, 
-       0x23, 0x09, 0x68, 0x7a, 0x1c, 0x01, 0x42, 0x90, 
-       0xdc, 0x03, 0x60, 0xfb, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x20, 0x20, 0x1c, 0x55, 0x42, 0x8d, 
-       0xd1, 0x03, 0x61, 0x78, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x1c, 0x95, 0x42, 0x8d, 0xd1, 0x0d, 
-       0x7e, 0x3d, 0x2d, 0xff, 0xd0, 0x0a, 0x2d, 0x00, 
-       0xd0, 0x03, 0x60, 0xfb, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x20, 0x19, 0x61, 0x38, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x32, 0x03, 0x42, 0x8a, 
-       0xd1, 0x04, 0x20, 0x22, 0x61, 0x78, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x69, 0xf9, 0x60, 0x21, 
-       0x68, 0x79, 0x68, 0xba, 0x31, 0x04, 0x42, 0x91, 
-       0xd1, 0x0a, 0x69, 0xf9, 0x29, 0x00, 0xd0, 0x03, 
-       0x61, 0x38, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x61, 0x78, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0xf0, 0x04, 0xf8, 0xac, 0x20, 0x00, 0x60, 0x38, 
-       0x69, 0xf8, 0x60, 0x20, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x01, 0x68, 
-       0x6e, 0x00, 0x17, 0x00, 0x2e, 0x08, 0x43, 0x7c, 
-       0x2e, 0x08, 0x00, 0x68, 0xb5, 0xb0, 0x04, 0x0b, 
-       0x0c, 0x1b, 0x04, 0x14, 0x0c, 0x24, 0x49, 0x14, 
-       0x68, 0x0a, 0x2a, 0x00, 0xd0, 0x02, 0x68, 0x0a, 
-       0x2a, 0x00, 0xd1, 0xfc, 0x22, 0x01, 0x60, 0x0a, 
-       0x2b, 0x0a, 0xdd, 0x00, 0x23, 0x0a, 0x22, 0x00, 
-       0x4f, 0x0e, 0x2b, 0x00, 0xdd, 0x05, 0x00, 0x55, 
-       0x5b, 0x45, 0x54, 0xbd, 0x32, 0x01, 0x42, 0x9a, 
-       0xdb, 0xf9, 0x76, 0x0c, 0x20, 0xff, 0x18, 0xfa, 
-       0x70, 0x50, 0x20, 0x00, 0x60, 0x4b, 0x22, 0x20, 
-       0x61, 0x08, 0x61, 0x4a, 0x60, 0x88, 0x60, 0xc8, 
-       0x49, 0x05, 0x20, 0x32, 0xf0, 0x04, 0xf8, 0x48, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x01, 0x68, 0x2e, 0x08, 0x43, 0x7c, 
-       0x2e, 0x00, 0x17, 0x01, 0xb5, 0x80, 0x04, 0x01, 
-       0x0c, 0x09, 0x20, 0x00, 0x22, 0x00, 0xb0, 0x88, 
-       0x00, 0x47, 0x46, 0x6b, 0x53, 0xda, 0x30, 0x01, 
-       0x04, 0x00, 0x14, 0x00, 0x28, 0x10, 0xdb, 0xf7, 
-       0x22, 0x80, 0x00, 0x43, 0x46, 0x68, 0x52, 0xc2, 
-       0x46, 0x6a, 0x1c, 0x08, 0x21, 0x05, 0xf0, 0x04, 
-       0xfb, 0x17, 0x49, 0x06, 0x80, 0x88, 0x00, 0x42, 
-       0x18, 0x12, 0x00, 0x92, 0x4b, 0x04, 0x5a, 0x9a, 
-       0x81, 0x0a, 0xb0, 0x08, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x01, 0x88, 
-       0x2e, 0x08, 0x47, 0x78, 0xb5, 0xf0, 0xb0, 0xb3, 
-       0xa8, 0x01, 0xf0, 0x0f, 0xfd, 0xc9, 0x49, 0x61, 
-       0x68, 0x0f, 0x68, 0x4d, 0x68, 0x8c, 0x03, 0x20, 
-       0x05, 0x2a, 0x0d, 0x12, 0x43, 0x10, 0x04, 0x00, 
-       0x0c, 0x00, 0x4b, 0x5d, 0x8e, 0x9a, 0x2a, 0x00, 
-       0xd1, 0x16, 0x89, 0xda, 0x42, 0x90, 0xd0, 0x01, 
-       0x22, 0x01, 0xe0, 0x00, 0x22, 0x00, 0x89, 0x9e, 
-       0x42, 0xb7, 0xd0, 0x01, 0x26, 0x01, 0xe0, 0x00, 
-       0x26, 0x00, 0x43, 0x32, 0xd0, 0x08, 0x81, 0x9f, 
-       0x81, 0xd8, 0x20, 0x00, 0x85, 0x58, 0x20, 0x0d, 
-       0x85, 0x18, 0x20, 0x01, 0x02, 0x40, 0x86, 0x98, 
-       0x68, 0xce, 0x69, 0x08, 0x90, 0x00, 0x1c, 0x38, 
-       0x1c, 0x29, 0x1c, 0x32, 0xf0, 0x00, 0xfa, 0x72, 
-       0x1c, 0x20, 0xf0, 0x00, 0xfb, 0x8d, 0xa0, 0x4b, 
-       0x22, 0x00, 0x21, 0x11, 0xf0, 0x04, 0xff, 0xc2, 
-       0x22, 0x0a, 0x21, 0x11, 0x98, 0x1b, 0xf0, 0x05, 
-       0xf8, 0x1f, 0x22, 0x14, 0x21, 0x11, 0x1c, 0x38, 
-       0xf0, 0x05, 0xf8, 0x1a, 0x22, 0x1e, 0x21, 0x11, 
-       0x1c, 0x28, 0xf0, 0x05, 0xf8, 0x15, 0x22, 0x28, 
-       0x21, 0x11, 0x1c, 0x20, 0xf0, 0x05, 0xf8, 0x10, 
-       0x22, 0x32, 0x21, 0x11, 0x1c, 0x30, 0xf0, 0x05, 
-       0xf8, 0x0b, 0x22, 0x3c, 0x21, 0x11, 0x98, 0x00, 
-       0xf0, 0x05, 0xf8, 0x06, 0xa0, 0x3b, 0x22, 0x00, 
-       0x21, 0x13, 0xf0, 0x04, 0xff, 0x9f, 0x22, 0x0a, 
-       0x21, 0x13, 0x4f, 0x35, 0x8d, 0x78, 0xf0, 0x04, 
-       0xff, 0xfb, 0xa0, 0x38, 0x22, 0x14, 0x21, 0x13, 
-       0xf0, 0x04, 0xff, 0x94, 0x22, 0x1e, 0x21, 0x13, 
-       0x8d, 0xf8, 0xf0, 0x04, 0xff, 0xf1, 0xa0, 0x35, 
-       0x22, 0x00, 0x21, 0x14, 0xf0, 0x04, 0xff, 0x8a, 
-       0x22, 0x0a, 0x21, 0x14, 0x8e, 0xb8, 0xf0, 0x04, 
-       0xff, 0xe7, 0xa0, 0x32, 0x22, 0x14, 0x21, 0x14, 
-       0xf0, 0x04, 0xff, 0x80, 0x22, 0x1e, 0x21, 0x14, 
-       0x8e, 0xf8, 0xf0, 0x04, 0xff, 0xdd, 0xa0, 0x2f, 
-       0x22, 0x28, 0x21, 0x14, 0xf0, 0x04, 0xff, 0x76, 
-       0x22, 0x32, 0x21, 0x14, 0x48, 0x2e, 0x6f, 0xc0, 
-       0xf0, 0x04, 0xff, 0xd2, 0xa0, 0x2d, 0x22, 0x00, 
-       0x21, 0x15, 0xf0, 0x04, 0xff, 0x6b, 0x22, 0x0a, 
-       0x21, 0x15, 0x8d, 0x38, 0xf0, 0x04, 0xff, 0xc8, 
-       0xa0, 0x2b, 0x22, 0x14, 0x21, 0x15, 0xf0, 0x04, 
-       0xff, 0x61, 0x22, 0x1e, 0x21, 0x15, 0x8d, 0xb8, 
-       0xf0, 0x04, 0xff, 0xbe, 0xa0, 0x29, 0x22, 0x00, 
-       0x21, 0x10, 0xf0, 0x04, 0xff, 0x57, 0xf0, 0x0f, 
-       0xfe, 0xf1, 0x22, 0x0a, 0x21, 0x10, 0xf0, 0x04, 
-       0xff, 0xb3, 0xa0, 0x26, 0x22, 0x14, 0x21, 0x10, 
-       0xf0, 0x04, 0xff, 0x4c, 0x22, 0x1e, 0x21, 0x10, 
-       0x27, 0x33, 0x06, 0x7f, 0x6d, 0x78, 0xf0, 0x04, 
-       0xff, 0xa7, 0xa0, 0x22, 0x22, 0x28, 0x21, 0x10, 
-       0xf0, 0x04, 0xff, 0x40, 0xf0, 0x0f, 0xfe, 0xda, 
-       0x6d, 0x79, 0x1a, 0x08, 0x22, 0x32, 0x21, 0x10, 
-       0xf0, 0x04, 0xff, 0x9a, 0xb0, 0x33, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xcc, 0x00, 0x0c, 0x00, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x73, 0x74, 0x61, 0x74, 
-       0x73, 0x3a, 0x00, 0x00, 0x72, 0x78, 0x6c, 0x65, 
-       0x6e, 0x3a, 0x00, 0x00, 0x74, 0x78, 0x6c, 0x65, 
-       0x6e, 0x3a, 0x00, 0x00, 0x72, 0x78, 0x62, 0x75, 
-       0x66, 0x66, 0x3a, 0x00, 0x74, 0x78, 0x62, 0x75, 
-       0x66, 0x66, 0x3a, 0x00, 0x69, 0x66, 0x5f, 0x75, 
-       0x73, 0x65, 0x64, 0x3a, 0x00, 0x00, 0x00, 0x00, 
-       0x2c, 0x00, 0x1f, 0x80, 0x72, 0x78, 0x73, 0x74, 
-       0x61, 0x74, 0x65, 0x3a, 0x00, 0x00, 0x00, 0x00, 
-       0x74, 0x78, 0x73, 0x74, 0x61, 0x74, 0x65, 0x3a, 
-       0x00, 0x00, 0x00, 0x00, 0x65, 0x6e, 0x64, 0x63, 
-       0x75, 0x72, 0x3a, 0x00, 0x76, 0x69, 0x64, 0x62, 
-       0x75, 0x66, 0x3a, 0x00, 0x6f, 0x73, 0x64, 0x3a, 
-       0x00, 0x00, 0x00, 0x00, 0xb5, 0xf0, 0x25, 0x00, 
-       0x20, 0x00, 0x49, 0x19, 0x81, 0xc8, 0x81, 0x88, 
-       0x4e, 0x18, 0x4c, 0x19, 0x4f, 0x19, 0x68, 0x30, 
-       0x68, 0x00, 0x00, 0x40, 0x0a, 0x40, 0x02, 0x40, 
-       0x21, 0x19, 0x06, 0x89, 0x6a, 0x89, 0x4b, 0x16, 
-       0x40, 0x19, 0x0a, 0x49, 0x43, 0x08, 0x49, 0x15, 
-       0x64, 0x08, 0xf0, 0x01, 0xfc, 0x57, 0xf0, 0x02, 
-       0xf9, 0x6b, 0x68, 0x38, 0x30, 0x01, 0x60, 0x38, 
-       0x48, 0x11, 0x88, 0x01, 0x31, 0x01, 0x80, 0x01, 
-       0x20, 0x0c, 0x68, 0x21, 0xf0, 0x17, 0xf8, 0x9a, 
-       0x29, 0x00, 0xd1, 0x01, 0xf7, 0xff, 0xfe, 0xd6, 
-       0x20, 0x32, 0x68, 0x21, 0xf0, 0x17, 0xf8, 0x92, 
-       0x42, 0x85, 0xd0, 0xd8, 0x1c, 0x05, 0xf0, 0x00, 
-       0xfe, 0x39, 0x20, 0x00, 0x60, 0x38, 0xe7, 0xd2, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2e, 0x08, 0x5e, 0x38, 
-       0x2e, 0x08, 0x05, 0xb0, 0x2e, 0x08, 0x01, 0x88, 
-       0x00, 0x03, 0xfe, 0x00, 0x2c, 0x00, 0x1f, 0x80, 
-       0x2c, 0x00, 0x1f, 0xc8, 0xb5, 0xf0, 0x27, 0x00, 
-       0xb0, 0x94, 0x46, 0x68, 0x4c, 0x2f, 0xcc, 0x6e, 
-       0xc0, 0x6e, 0xcc, 0x6e, 0xc0, 0x6e, 0x23, 0x28, 
-       0x22, 0x41, 0x00, 0xd2, 0x21, 0x00, 0x20, 0x01, 
-       0xf0, 0x08, 0xfa, 0x30, 0x22, 0xff, 0x21, 0x64, 
-       0x20, 0x01, 0x32, 0xf5, 0xf0, 0x08, 0xfa, 0xf2, 
-       0x20, 0x00, 0x46, 0x69, 0x5c, 0x09, 0x40, 0x41, 
-       0x23, 0x35, 0x40, 0x59, 0xaa, 0x0a, 0x54, 0x11, 
-       0x30, 0x01, 0x28, 0x25, 0xdb, 0xf5, 0x24, 0x00, 
-       0xa9, 0x0a, 0x54, 0x0c, 0x22, 0x00, 0x20, 0x01, 
-       0x1c, 0x23, 0xf0, 0x08, 0xfd, 0x50, 0x4e, 0x1e, 
-       0x4d, 0x1e, 0x4c, 0x1f, 0xf0, 0x03, 0xff, 0x80, 
-       0xf0, 0x03, 0xff, 0x7e, 0x28, 0x28, 0xd9, 0x10, 
-       0x42, 0xb0, 0xd3, 0x0e, 0x69, 0xe9, 0x08, 0xc9, 
-       0xd3, 0x0b, 0x4b, 0x1a, 0x18, 0xc1, 0x20, 0x1e, 
-       0xf0, 0x17, 0xf8, 0x40, 0x21, 0x64, 0x1d, 0xc2, 
-       0x32, 0xff, 0x32, 0xee, 0x20, 0x01, 0xf0, 0x08, 
-       0xfa, 0xc5, 0xf0, 0x01, 0xfb, 0xe7, 0xf0, 0x02, 
-       0xf8, 0xfb, 0xf0, 0x03, 0xff, 0x65, 0x1c, 0x01, 
-       0x20, 0x7d, 0x00, 0xc0, 0xf0, 0x17, 0xf8, 0x2e, 
-       0x1c, 0x01, 0x48, 0x0f, 0x88, 0x02, 0x32, 0x01, 
-       0x80, 0x02, 0x42, 0xb9, 0xd0, 0xd6, 0x2f, 0x04, 
-       0xd3, 0x06, 0x20, 0x01, 0xf0, 0x08, 0xf9, 0xce, 
-       0xb0, 0x14, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x1c, 0x0f, 0xf0, 0x00, 0xfd, 0xc7, 0x20, 0x00, 
-       0x60, 0x20, 0xe7, 0xc7, 0x2e, 0x02, 0x5e, 0x00, 
-       0x00, 0x00, 0x0b, 0xb8, 0x72, 0x00, 0x01, 0x00, 
-       0x2e, 0x08, 0x01, 0x88, 0xff, 0xff, 0xf4, 0x48, 
-       0x2c, 0x00, 0x1f, 0xc8, 0xb5, 0x80, 0x27, 0x00, 
-       0x48, 0x07, 0x81, 0x07, 0xf0, 0x03, 0xfd, 0x5e, 
-       0xf7, 0xff, 0xff, 0x88, 0xf0, 0x00, 0xf8, 0xce, 
-       0xf0, 0x05, 0xfe, 0xfe, 0xf7, 0xff, 0xff, 0x3e, 
-       0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x2c, 0x00, 0x1f, 0xc0, 0xb5, 0xf0, 0x4d, 0x29, 
-       0x68, 0x01, 0x31, 0x03, 0x10, 0x89, 0x1e, 0xcb, 
-       0x68, 0x41, 0x10, 0x89, 0x68, 0x82, 0x10, 0x92, 
-       0x00, 0x89, 0x30, 0x0c, 0x18, 0x0c, 0x21, 0x03, 
-       0x05, 0x89, 0x27, 0x35, 0x06, 0x7f, 0x60, 0x39, 
-       0x49, 0x21, 0x68, 0x0e, 0x08, 0xb6, 0x00, 0xb6, 
-       0x60, 0x0e, 0x21, 0x00, 0x2b, 0x00, 0xd9, 0x04, 
-       0xc8, 0x40, 0xc5, 0x40, 0x31, 0x01, 0x42, 0x99, 
-       0xd3, 0xfa, 0x23, 0x00, 0x49, 0x1b, 0x65, 0x8b, 
-       0x20, 0x00, 0x2a, 0x00, 0xd9, 0x04, 0xcc, 0x20, 
-       0x64, 0x8d, 0x30, 0x01, 0x42, 0x90, 0xd3, 0xfa, 
-       0x48, 0x17, 0x60, 0x03, 0x60, 0x3b, 0x66, 0x8b, 
-       0x60, 0x3b, 0x22, 0x01, 0x64, 0xca, 0x21, 0x00, 
-       0x4a, 0x14, 0x68, 0x03, 0x2b, 0x00, 0xd1, 0x05, 
-       0x33, 0x01, 0x2b, 0x64, 0xdb, 0xfc, 0x31, 0x01, 
-       0x42, 0x91, 0xdb, 0xf6, 0x48, 0x10, 0x68, 0x01, 
-       0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 0x49, 0x0f, 
-       0x20, 0x33, 0x06, 0x40, 0x65, 0x41, 0x49, 0x0e, 
-       0x65, 0x81, 0x49, 0x0e, 0x66, 0x81, 0x39, 0x04, 
-       0x66, 0x41, 0x21, 0x03, 0x67, 0x01, 0x21, 0x00, 
-       0x20, 0x0d, 0xf0, 0x0f, 0xf9, 0xc9, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xcc, 0x00, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x70, 0x6a, 0x00, 0x00, 0x80, 
-       0xcc, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x27, 0x10, 
-       0x6a, 0x00, 0x00, 0x10, 0xcc, 0x00, 0x0f, 0x84, 
-       0xcc, 0x00, 0x0f, 0x88, 0x98, 0x00, 0x0f, 0x88, 
-       0xb5, 0x00, 0x22, 0x00, 0x21, 0x00, 0x20, 0x08, 
-       0xf0, 0x0f, 0xfe, 0x04, 0x48, 0x08, 0x21, 0x40, 
-       0xf0, 0x0f, 0xfa, 0xd4, 0x20, 0x01, 0x21, 0x35, 
-       0x06, 0x49, 0x61, 0x08, 0x20, 0x02, 0x43, 0xc0, 
-       0x49, 0x04, 0x63, 0x08, 0x20, 0x00, 0x21, 0x39, 
-       0x06, 0x49, 0x62, 0xc8, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x01, 0xcc, 0x90, 0x72, 0x00, 0x01, 0x00, 
-       0xb5, 0x00, 0x1c, 0x01, 0x48, 0x0f, 0xd0, 0x10, 
-       0x29, 0x01, 0xd0, 0x12, 0x29, 0x02, 0xd0, 0x14, 
-       0x29, 0x03, 0xd1, 0x01, 0x49, 0x0c, 0x60, 0x01, 
-       0x68, 0x01, 0x68, 0x40, 0x43, 0x08, 0x22, 0x00, 
-       0x21, 0x1e, 0xf0, 0x0f, 0xfe, 0x43, 0xbc, 0x08, 
-       0x47, 0x18, 0x21, 0x01, 0x04, 0x49, 0x60, 0x01, 
-       0xe7, 0xf2, 0x21, 0x21, 0x03, 0x09, 0x60, 0x01, 
-       0xe7, 0xee, 0x21, 0x41, 0x03, 0x09, 0x60, 0x01, 
-       0xe7, 0xea, 0x00, 0x00, 0x2e, 0x08, 0x01, 0x94, 
-       0x00, 0x08, 0x10, 0x08, 0xb5, 0x00, 0x1c, 0x01, 
-       0x48, 0x0b, 0xd0, 0x0e, 0x29, 0x01, 0xd0, 0x0f, 
-       0x29, 0x02, 0xd1, 0x01, 0x21, 0x04, 0x60, 0x41, 
-       0x68, 0x01, 0x68, 0x40, 0x43, 0x08, 0x22, 0x00, 
-       0x21, 0x1e, 0xf0, 0x0f, 0xfe, 0x1f, 0xbc, 0x08, 
-       0x47, 0x18, 0x21, 0x01, 0x60, 0x41, 0xe7, 0xf3, 
-       0x21, 0x02, 0x60, 0x41, 0xe7, 0xf0, 0x00, 0x00, 
-       0x2e, 0x08, 0x01, 0x94, 0xb5, 0x80, 0x4b, 0x09, 
-       0x22, 0x0a, 0x21, 0x0a, 0x20, 0x0b, 0xf0, 0x10, 
-       0xf8, 0x53, 0x20, 0x0b, 0xf0, 0x10, 0xf9, 0x75, 
-       0x4f, 0x05, 0x60, 0x38, 0x00, 0x80, 0xf0, 0x03, 
-       0xff, 0x45, 0x60, 0x78, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x01, 0xc0, 
-       0x2e, 0x08, 0x01, 0xd0, 0xb5, 0xb0, 0x25, 0x00, 
-       0x1c, 0x0c, 0x1c, 0x07, 0x2a, 0x08, 0xd2, 0x30, 
-       0xa3, 0x01, 0x5c, 0x9b, 0x00, 0x5b, 0x44, 0x9f, 
-       0x2c, 0x29, 0x29, 0x03, 0x29, 0x29, 0x03, 0x29, 
-       0x20, 0x00, 0xf0, 0x00, 0xf8, 0x4d, 0x23, 0x2d, 
-       0x01, 0x1b, 0x42, 0x9f, 0xd0, 0x13, 0x23, 0x0b, 
-       0x01, 0x9b, 0x42, 0x9f, 0xd0, 0x0f, 0x23, 0xff, 
-       0x33, 0xe1, 0x42, 0x9f, 0xd0, 0x0b, 0x23, 0xff, 
-       0x33, 0x61, 0x42, 0x9f, 0xd0, 0x07, 0x23, 0x21, 
-       0x01, 0x1b, 0x42, 0x9f, 0xd0, 0x03, 0x23, 0x11, 
-       0x01, 0x5b, 0x42, 0x9f, 0xd1, 0x08, 0x23, 0x09, 
-       0x01, 0x9b, 0x42, 0x9c, 0xd0, 0x09, 0x08, 0x5b, 
-       0x42, 0x9c, 0xd0, 0x06, 0x2c, 0xf0, 0xd0, 0x04, 
-       0x25, 0x01, 0xe0, 0x02, 0x20, 0x01, 0xf0, 0x00, 
-       0xf8, 0x27, 0x4f, 0x12, 0x6c, 0x78, 0x42, 0x85, 
-       0xd0, 0x1c, 0x1d, 0xfb, 0x33, 0x35, 0x2d, 0x00, 
-       0xd0, 0x12, 0x1f, 0xda, 0x3a, 0x0d, 0x21, 0x03, 
-       0x1d, 0x10, 0xb4, 0x07, 0x22, 0x0b, 0xb4, 0x04, 
-       0x1c, 0x19, 0x23, 0x00, 0x22, 0x00, 0x20, 0x00, 
-       0xf0, 0x0a, 0xfc, 0x4c, 0x6a, 0xb8, 0x1c, 0x29, 
-       0xb0, 0x04, 0xf0, 0x0b, 0xfd, 0x9b, 0xe0, 0x04, 
-       0x21, 0x00, 0x6a, 0xb8, 0x1c, 0x1a, 0xf0, 0x0a, 
-       0xff, 0x51, 0x64, 0x7d, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x01, 0x94, 
-       0xb5, 0xf0, 0x1c, 0x07, 0xb0, 0x81, 0x4d, 0x56, 
-       0x1d, 0xee, 0x36, 0x19, 0x79, 0x30, 0x42, 0x87, 
-       0xd1, 0x03, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x24, 0x00, 0x6c, 0x68, 0x28, 0x00, 
-       0xd0, 0x05, 0x64, 0x6c, 0x4a, 0x4f, 0x21, 0x00, 
-       0x6a, 0xa8, 0xf0, 0x0a, 0xff, 0x33, 0x71, 0x37, 
-       0x21, 0x00, 0x20, 0x0e, 0xf0, 0x0f, 0xf8, 0xc4, 
-       0x20, 0x00, 0xf0, 0x0c, 0xfb, 0xc5, 0x20, 0x1f, 
-       0xf0, 0x09, 0xfc, 0x5a, 0x26, 0x03, 0x02, 0x76, 
-       0x22, 0x01, 0x02, 0xd2, 0x21, 0x02, 0x20, 0x1f, 
-       0x1c, 0x33, 0xf0, 0x09, 0xfa, 0xd1, 0x20, 0x1e, 
-       0xf0, 0x09, 0xfd, 0x18, 0x22, 0x01, 0x02, 0xd2, 
-       0x21, 0x02, 0x20, 0x1e, 0x1c, 0x33, 0xf0, 0x09, 
-       0xfa, 0xc7, 0x1c, 0x39, 0x27, 0x1c, 0x48, 0x3e, 
-       0x26, 0x0c, 0x29, 0x06, 0xd2, 0x07, 0xa3, 0x02, 
-       0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x03, 0x12, 0x03, 0x21, 0x12, 0x30, 0x48, 0x39, 
-       0x21, 0x40, 0xf0, 0x0f, 0xf9, 0xc3, 0xab, 0x00, 
-       0x70, 0x1c, 0x20, 0x08, 0x70, 0x58, 0x70, 0x9f, 
-       0x70, 0xdc, 0x22, 0x00, 0x21, 0x00, 0xf0, 0x0f, 
-       0xfc, 0xe5, 0xe0, 0x2b, 0x21, 0x1f, 0x43, 0xc9, 
-       0xf0, 0x0f, 0xf9, 0xb4, 0xab, 0x00, 0x70, 0x1c, 
-       0x70, 0x5c, 0x70, 0x9e, 0x70, 0xdc, 0x22, 0x00, 
-       0x21, 0x00, 0x20, 0x00, 0xf0, 0x0f, 0xfc, 0xd6, 
-       0xe0, 0x1c, 0x21, 0x40, 0xf0, 0x0f, 0xf9, 0xa6, 
-       0xab, 0x00, 0x70, 0x1c, 0x20, 0x10, 0x70, 0x58, 
-       0x70, 0x9f, 0x70, 0xdc, 0x22, 0x00, 0x21, 0x00, 
-       0x20, 0x08, 0xf0, 0x0f, 0xfc, 0xc7, 0xe0, 0x0d, 
-       0x21, 0x1f, 0x43, 0xc9, 0xf0, 0x0f, 0xf9, 0x96, 
-       0xab, 0x00, 0x70, 0x1c, 0x70, 0x5c, 0x70, 0x9e, 
-       0x70, 0xdc, 0x22, 0x00, 0x21, 0x00, 0x20, 0x08, 
-       0xf0, 0x0f, 0xfc, 0xb8, 0x20, 0x01, 0x21, 0x35, 
-       0x06, 0x49, 0x61, 0x08, 0x20, 0x02, 0x43, 0xc0, 
-       0x49, 0x19, 0x63, 0x08, 0x20, 0x39, 0x06, 0x40, 
-       0x62, 0xc4, 0xcd, 0x03, 0x43, 0x08, 0x22, 0x00, 
-       0x21, 0x1e, 0xf0, 0x0f, 0xfd, 0x0f, 0x48, 0x15, 
-       0xf0, 0x0c, 0xfa, 0xd0, 0x20, 0x00, 0xf0, 0x0c, 
-       0xfb, 0x41, 0x20, 0x00, 0xf0, 0x00, 0xf8, 0x68, 
-       0x20, 0x00, 0xf0, 0x03, 0xfb, 0x3f, 0x20, 0x01, 
-       0xf0, 0x0c, 0xfb, 0x46, 0x4a, 0x0e, 0xb4, 0x04, 
-       0x1c, 0x13, 0x3a, 0x01, 0x49, 0x0d, 0x1e, 0xc8, 
-       0xf7, 0xfe, 0xfb, 0x4e, 0x21, 0x00, 0x20, 0x0d, 
-       0xb0, 0x01, 0xf0, 0x0f, 0xf8, 0x35, 0xb0, 0x01, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x01, 0x94, 0x2e, 0x08, 0x01, 0xd0, 
-       0x2e, 0x02, 0x12, 0xfc, 0x2e, 0x01, 0xcc, 0x90, 
-       0x72, 0x00, 0x01, 0x00, 0x00, 0x80, 0x10, 0x80, 
-       0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xfe, 
-       0xb5, 0xb0, 0x1c, 0x07, 0x4c, 0x10, 0x6a, 0x20, 
-       0x42, 0x87, 0xd0, 0x19, 0x20, 0x00, 0x2f, 0x03, 
-       0xd1, 0x02, 0x21, 0x01, 0x61, 0x61, 0xe0, 0x00, 
-       0x61, 0x60, 0x21, 0x02, 0x4d, 0x0b, 0x60, 0x29, 
-       0x71, 0x28, 0x71, 0x68, 0x22, 0x01, 0xb4, 0x04, 
-       0x7a, 0x23, 0x7c, 0x22, 0x7b, 0x21, 0x20, 0x00, 
-       0xf0, 0x0f, 0xfb, 0x02, 0x69, 0x61, 0x1c, 0x28, 
-       0xb0, 0x01, 0xf0, 0x10, 0xfb, 0xa9, 0x62, 0x27, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x01, 0x94, 0x2e, 0x08, 0x01, 0xac, 
-       0xb5, 0x00, 0x22, 0x02, 0x49, 0x09, 0x60, 0x0a, 
-       0x22, 0x00, 0x71, 0x0a, 0x71, 0x4a, 0x39, 0x48, 
-       0x28, 0x00, 0xd0, 0x08, 0x28, 0x01, 0xd1, 0x00, 
-       0x72, 0x08, 0x6a, 0x08, 0x62, 0x0a, 0xf7, 0xff, 
-       0xff, 0xc7, 0xbc, 0x08, 0x47, 0x18, 0x72, 0x0a, 
-       0xe7, 0xf7, 0x00, 0x00, 0x2e, 0x08, 0x01, 0xdc, 
-       0xb5, 0x80, 0x06, 0x00, 0x0e, 0x00, 0x4f, 0x0b, 
-       0xd0, 0x02, 0x20, 0x00, 0x73, 0x38, 0xe0, 0x01, 
-       0x20, 0x01, 0x73, 0x38, 0x22, 0x01, 0xb4, 0x04, 
-       0x7a, 0x3b, 0x7c, 0x3a, 0x7b, 0x39, 0x20, 0x00, 
-       0xf0, 0x0f, 0xfa, 0xca, 0x69, 0x79, 0xb0, 0x01, 
-       0x48, 0x03, 0xf0, 0x10, 0xfb, 0x71, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x01, 0x94, 
-       0x2e, 0x08, 0x01, 0xac, 0xb5, 0x80, 0x06, 0x00, 
-       0x0e, 0x00, 0x1c, 0x01, 0x4f, 0x08, 0x74, 0x39, 
-       0x22, 0x01, 0xb4, 0x04, 0x7a, 0x3b, 0x7b, 0x39, 
-       0x1c, 0x02, 0x20, 0x00, 0xf0, 0x0f, 0xfa, 0xb0, 
-       0x69, 0x79, 0xb0, 0x01, 0x48, 0x03, 0xf0, 0x10, 
-       0xfb, 0x57, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x01, 0x94, 0x2e, 0x08, 0x01, 0xac, 
-       0xb4, 0xb0, 0x21, 0x00, 0x48, 0x08, 0x60, 0x01, 
-       0x20, 0x00, 0x4c, 0x08, 0x4f, 0x08, 0x4b, 0x09, 
-       0x4a, 0x09, 0x00, 0x85, 0x51, 0x61, 0x54, 0x39, 
-       0x54, 0x19, 0x54, 0x11, 0x30, 0x01, 0x28, 0x20, 
-       0xdb, 0xf7, 0xbc, 0xb0, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x01, 0xe4, 0x2e, 0x08, 0x43, 0x88, 
-       0x2e, 0x08, 0x44, 0x08, 0x2e, 0x08, 0x44, 0x48, 
-       0x2e, 0x08, 0x44, 0x28, 0x06, 0x00, 0x0e, 0x00, 
-       0x21, 0x01, 0x40, 0x81, 0x43, 0xca, 0x49, 0x05, 
-       0x68, 0x0b, 0x40, 0x1a, 0x60, 0x0a, 0x21, 0x00, 
-       0x00, 0x82, 0x4b, 0x03, 0x50, 0x99, 0x4a, 0x03, 
-       0x54, 0x11, 0x47, 0x70, 0x2e, 0x08, 0x01, 0xe4, 
-       0x2e, 0x08, 0x43, 0x88, 0x2e, 0x08, 0x44, 0x08, 
-       0xb5, 0xf0, 0xb0, 0x84, 0x4f, 0x36, 0x68, 0x38, 
-       0x1d, 0xc1, 0x31, 0x0d, 0x20, 0x00, 0xf0, 0x23, 
-       0xfb, 0xc1, 0x1c, 0x04, 0x68, 0x38, 0x1d, 0xc1, 
-       0x31, 0x05, 0x20, 0x00, 0xf0, 0x23, 0xfb, 0xba, 
-       0x1c, 0x05, 0x68, 0x38, 0x1d, 0xc1, 0x31, 0x09, 
-       0x20, 0x00, 0xf0, 0x23, 0xfb, 0xb3, 0x43, 0x2c, 
-       0x1c, 0x20, 0x4c, 0x2c, 0x68, 0x21, 0x43, 0x08, 
-       0x27, 0x00, 0x60, 0x20, 0x1c, 0x05, 0xd0, 0x4a, 
-       0x48, 0x29, 0x90, 0x03, 0x48, 0x29, 0x90, 0x02, 
-       0x4a, 0x29, 0x92, 0x01, 0x4e, 0x29, 0x08, 0x68, 
-       0xd3, 0x3c, 0x98, 0x03, 0x5d, 0xc0, 0x28, 0x00, 
-       0xd0, 0x32, 0x98, 0x02, 0x5d, 0xc0, 0x28, 0x00, 
-       0xd0, 0x2a, 0x46, 0x68, 0x1c, 0x39, 0xf0, 0x10, 
-       0xff, 0x69, 0xa8, 0x00, 0x78, 0x00, 0x28, 0x01, 
-       0xd1, 0x1b, 0x68, 0x60, 0x30, 0x01, 0x60, 0x60, 
-       0x5d, 0xf0, 0x28, 0x00, 0xd1, 0x06, 0x20, 0xff, 
-       0x55, 0xf0, 0x21, 0x00, 0x00, 0xb8, 0x9a, 0x01, 
-       0x50, 0x11, 0xe0, 0x1f, 0x20, 0x02, 0x1c, 0x39, 
-       0xf0, 0x00, 0xf8, 0x8e, 0x28, 0x00, 0xd1, 0x19, 
-       0x21, 0x00, 0x55, 0xf1, 0x20, 0x01, 0x40, 0xb8, 
-       0x43, 0xc0, 0x68, 0x21, 0x40, 0x08, 0x60, 0x20, 
-       0xe0, 0x10, 0x20, 0x01, 0x40, 0xb8, 0x43, 0xc0, 
-       0x68, 0x21, 0x40, 0x08, 0x60, 0x20, 0xe0, 0x09, 
-       0x68, 0x60, 0x30, 0x01, 0x60, 0x60, 0xe0, 0x05, 
-       0x20, 0x01, 0x40, 0xb8, 0x43, 0xc0, 0x68, 0x21, 
-       0x40, 0x08, 0x60, 0x20, 0x1c, 0x78, 0x06, 0x07, 
-       0x0e, 0x3f, 0x08, 0x6d, 0xd1, 0xbb, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x5e, 0x0c, 0x2e, 0x08, 0x01, 0xe4, 
-       0x2e, 0x08, 0x44, 0x28, 0x2e, 0x08, 0x44, 0x48, 
-       0x2e, 0x08, 0x43, 0x88, 0x2e, 0x08, 0x44, 0x08, 
-       0xb5, 0xf0, 0x27, 0x00, 0xb0, 0x85, 0x4c, 0x26, 
-       0x68, 0x25, 0x2d, 0x00, 0xd0, 0x44, 0x4e, 0x25, 
-       0x48, 0x25, 0x90, 0x04, 0x49, 0x25, 0x91, 0x03, 
-       0x4a, 0x25, 0x92, 0x02, 0x48, 0x25, 0x90, 0x01, 
-       0x08, 0x68, 0xd3, 0x34, 0x5d, 0xf0, 0x28, 0x00, 
-       0xd0, 0x2b, 0x98, 0x04, 0x5d, 0xc0, 0x28, 0x00, 
-       0xd0, 0x2d, 0x46, 0x68, 0x1c, 0x39, 0xf0, 0x10, 
-       0xff, 0x05, 0xa8, 0x00, 0x78, 0x00, 0x28, 0x01, 
-       0xd1, 0x18, 0x68, 0x60, 0x30, 0x01, 0x60, 0x60, 
-       0x00, 0xb8, 0x99, 0x03, 0x58, 0x09, 0x69, 0x09, 
-       0x9a, 0x02, 0x50, 0x11, 0x20, 0x02, 0x1c, 0x39, 
-       0xf0, 0x00, 0xf8, 0x2e, 0x28, 0x00, 0xd1, 0x16, 
-       0x21, 0x00, 0x98, 0x01, 0x55, 0xc1, 0x20, 0x01, 
-       0x40, 0xb8, 0x43, 0xc0, 0x68, 0x21, 0x40, 0x08, 
-       0x60, 0x20, 0xe0, 0x0c, 0x20, 0x01, 0x40, 0xb8, 
-       0x43, 0xc0, 0x68, 0x21, 0x40, 0x08, 0x60, 0x20, 
-       0xe0, 0x05, 0x20, 0x01, 0x40, 0xb8, 0x43, 0xc0, 
-       0x68, 0x21, 0x40, 0x08, 0x60, 0x20, 0x1c, 0x78, 
-       0x06, 0x07, 0x0e, 0x3f, 0x08, 0x6d, 0xd1, 0xc3, 
-       0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x01, 0xe4, 0x2e, 0x08, 0x44, 0x28, 
-       0x2e, 0x08, 0x44, 0x48, 0x2e, 0x08, 0x5e, 0x5c, 
-       0x2e, 0x08, 0x43, 0x88, 0x2e, 0x08, 0x44, 0x08, 
-       0xb4, 0xf0, 0x06, 0x03, 0x0e, 0x1b, 0xb0, 0x82, 
-       0x93, 0x00, 0x06, 0x0c, 0x0e, 0x24, 0x00, 0xa2, 
-       0xb0, 0x81, 0x48, 0x33, 0x58, 0x80, 0x90, 0x00, 
-       0x28, 0x00, 0xd1, 0x03, 0x20, 0xb0, 0xb0, 0x03, 
-       0xbc, 0xf0, 0x47, 0x70, 0x48, 0x2f, 0x68, 0x00, 
-       0x18, 0x17, 0x00, 0xe0, 0x1b, 0x00, 0x00, 0x80, 
-       0x49, 0x2d, 0x68, 0x09, 0x18, 0x41, 0x9b, 0x01, 
-       0x48, 0x2c, 0x4d, 0x2d, 0x95, 0x02, 0x2b, 0x01, 
-       0xd0, 0x2a, 0x2b, 0x02, 0xd1, 0x47, 0x4d, 0x2b, 
-       0x58, 0xab, 0x2b, 0x00, 0xd1, 0x03, 0x20, 0xff, 
-       0xb0, 0x03, 0xbc, 0xf0, 0x47, 0x70, 0x60, 0x4b, 
-       0x23, 0x00, 0x50, 0xab, 0x22, 0x00, 0x5c, 0x83, 
-       0x42, 0xa3, 0xd1, 0x07, 0x00, 0x93, 0x9d, 0x02, 
-       0x58, 0xeb, 0x78, 0x5e, 0x1c, 0x5d, 0x23, 0x80, 
-       0x43, 0x9e, 0x70, 0x2e, 0x32, 0x01, 0x06, 0x12, 
-       0x0e, 0x12, 0x2a, 0x20, 0xdb, 0xef, 0x88, 0x08, 
-       0x4b, 0x1d, 0x40, 0x18, 0x80, 0x08, 0x98, 0x00, 
-       0x9b, 0x01, 0x70, 0xc3, 0x68, 0x38, 0x23, 0x01, 
-       0x03, 0x5b, 0x43, 0x18, 0x60, 0x38, 0xe0, 0x1a, 
-       0x68, 0x3a, 0x4b, 0x18, 0x40, 0x1a, 0x60, 0x3a, 
-       0x9a, 0x00, 0x9b, 0x01, 0x70, 0xd3, 0x23, 0x00, 
-       0x60, 0x8b, 0x70, 0xcb, 0x60, 0xcb, 0x21, 0x00, 
-       0x5c, 0x42, 0x42, 0xa2, 0xd1, 0x06, 0x00, 0x8a, 
-       0x9d, 0x02, 0x58, 0xaa, 0x78, 0x57, 0x23, 0x80, 
-       0x43, 0x3b, 0x70, 0x53, 0x31, 0x01, 0x06, 0x09, 
-       0x0e, 0x09, 0x29, 0x20, 0xdb, 0xf0, 0x20, 0x00, 
-       0xb0, 0x03, 0xbc, 0xf0, 0x47, 0x70, 0x20, 0xbc, 
-       0xb0, 0x03, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x5d, 0xcc, 
-       0x2e, 0x08, 0x5d, 0xc4, 0x2e, 0x08, 0x5f, 0xa4, 
-       0x2e, 0x08, 0x5e, 0xe4, 0x2e, 0x08, 0x43, 0x88, 
-       0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, 0xdf, 0xff, 
-       0xb4, 0xf0, 0x78, 0x43, 0x00, 0x9e, 0x49, 0x32, 
-       0x59, 0x8c, 0x88, 0x42, 0x68, 0x87, 0x68, 0x40, 
-       0x1d, 0xf9, 0x31, 0xb9, 0x1a, 0x09, 0x42, 0x91, 
-       0xda, 0x3d, 0x25, 0x00, 0x1c, 0x18, 0x00, 0xdb, 
-       0x1a, 0x18, 0x00, 0x80, 0x4b, 0x2b, 0x68, 0x1b, 
-       0x18, 0xc0, 0x78, 0x80, 0x06, 0xc0, 0x0e, 0xc0, 
-       0x28, 0x12, 0xd1, 0x02, 0x29, 0x0e, 0xda, 0x00, 
-       0x25, 0x01, 0x2a, 0x00, 0xdd, 0x2b, 0x42, 0x8a, 
-       0xdd, 0x05, 0x68, 0x3f, 0x2f, 0x00, 0xd1, 0x02, 
-       0x20, 0xba, 0xbc, 0xf0, 0x47, 0x70, 0x1a, 0x52, 
-       0x79, 0xb9, 0x23, 0xc0, 0x1a, 0x59, 0x79, 0xfb, 
-       0x1d, 0x38, 0x08, 0x5b, 0xd3, 0x01, 0x22, 0x00, 
-       0xe0, 0x16, 0x2d, 0x00, 0xd0, 0x14, 0x42, 0x91, 
-       0xdb, 0x01, 0x31, 0x01, 0xe0, 0x10, 0x1c, 0x4b, 
-       0x42, 0x93, 0xd1, 0x0d, 0x78, 0x85, 0x2d, 0x09, 
-       0xdd, 0x06, 0x79, 0x05, 0x78, 0x80, 0x35, 0x09, 
-       0x42, 0x85, 0xd0, 0x05, 0x1c, 0x19, 0xe0, 0x03, 
-       0x78, 0x80, 0x28, 0x09, 0xd1, 0x00, 0x1c, 0x19, 
-       0x25, 0x00, 0x2a, 0x00, 0xdc, 0xd3, 0x69, 0x21, 
-       0x20, 0x00, 0x1c, 0x0a, 0x42, 0xb9, 0xd0, 0xd4, 
-       0x68, 0x0b, 0x42, 0xbb, 0xd0, 0x08, 0x68, 0x09, 
-       0x29, 0x00, 0xd1, 0x02, 0x20, 0xba, 0xbc, 0xf0, 
-       0x47, 0x70, 0x68, 0x0b, 0x42, 0xbb, 0xd1, 0xf6, 
-       0x4b, 0x07, 0x51, 0x9a, 0x60, 0x08, 0x69, 0xa2, 
-       0x69, 0x23, 0x60, 0x13, 0x61, 0xa1, 0x61, 0x27, 
-       0x61, 0x67, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x5d, 0xc4, 
-       0x2e, 0x08, 0x43, 0x88, 0xb5, 0xf0, 0x06, 0x07, 
-       0x0e, 0x3f, 0x04, 0x0c, 0x0c, 0x24, 0x06, 0x15, 
-       0x0e, 0x2d, 0x00, 0xf8, 0x49, 0x2c, 0x68, 0x09, 
-       0x18, 0x40, 0x00, 0xb9, 0x4a, 0x2b, 0x68, 0x12, 
-       0x18, 0x8a, 0x00, 0xf9, 0x1b, 0xc9, 0x00, 0x89, 
-       0x4b, 0x29, 0x68, 0x1b, 0x18, 0xc9, 0x68, 0x16, 
-       0x23, 0x01, 0x03, 0x5b, 0x43, 0x9e, 0x60, 0x16, 
-       0x68, 0x06, 0x23, 0x03, 0x03, 0x9b, 0x43, 0x9e, 
-       0x60, 0x06, 0x4b, 0x24, 0x42, 0x9c, 0xd0, 0x36, 
-       0x68, 0x06, 0x23, 0x21, 0x43, 0x9e, 0x60, 0x06, 
-       0x68, 0x16, 0x23, 0x07, 0x03, 0x5b, 0x40, 0x33, 
-       0x60, 0x13, 0x23, 0x07, 0x03, 0x5b, 0x43, 0x9c, 
-       0x1c, 0x23, 0x68, 0x14, 0x43, 0x23, 0x60, 0x13, 
-       0x22, 0x00, 0x75, 0x0a, 0x88, 0x0c, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x9c, 0x80, 0x0c, 0x07, 0xab, 
-       0x0f, 0x9b, 0x2b, 0x01, 0xd1, 0x04, 0x88, 0x0c, 
-       0x23, 0x10, 0x43, 0x23, 0x80, 0x0b, 0xe0, 0x03, 
-       0x88, 0x0c, 0x23, 0x10, 0x43, 0x9c, 0x80, 0x0c, 
-       0x68, 0x01, 0x23, 0x40, 0x43, 0xdb, 0x40, 0x19, 
-       0x60, 0x01, 0x00, 0xf9, 0x4b, 0x0e, 0x68, 0x1b, 
-       0x18, 0xc9, 0x60, 0x4a, 0x68, 0x01, 0x4b, 0x0d, 
-       0x43, 0x19, 0x60, 0x01, 0x68, 0x01, 0x60, 0x01, 
-       0x21, 0x0f, 0x60, 0x41, 0xe0, 0x04, 0x1c, 0x38, 
-       0xf0, 0x0d, 0xff, 0x1a, 0x28, 0x00, 0xd1, 0x00, 
-       0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x5d, 0xd0, 0x2e, 0x08, 0x5d, 0xcc, 
-       0x2e, 0x08, 0x5d, 0xc4, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x5d, 0xd4, 0x00, 0x00, 0x20, 0xa0, 
-       0xb5, 0xf0, 0x06, 0x09, 0x0e, 0x09, 0x1c, 0x07, 
-       0xb0, 0x8a, 0x48, 0x58, 0x29, 0x00, 0xd1, 0x0a, 
-       0x4d, 0x57, 0x69, 0x01, 0x91, 0x04, 0x49, 0x57, 
-       0x91, 0x03, 0x69, 0x41, 0x91, 0x02, 0x6a, 0x00, 
-       0x1e, 0x43, 0x93, 0x01, 0xe0, 0x0b, 0x29, 0x20, 
-       0xd1, 0x15, 0x4d, 0x53, 0x69, 0x81, 0x91, 0x04, 
-       0x49, 0x52, 0x91, 0x03, 0x69, 0xc1, 0x91, 0x02, 
-       0x6a, 0x40, 0x1e, 0x43, 0x93, 0x01, 0x24, 0x00, 
-       0x4b, 0x4f, 0x93, 0x09, 0x4a, 0x4f, 0x92, 0x08, 
-       0x4b, 0x4f, 0x93, 0x07, 0x4e, 0x4f, 0x96, 0x06, 
-       0x4a, 0x4f, 0x92, 0x05, 0xe0, 0x7a, 0x20, 0xb3, 
-       0xb0, 0x0a, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x98, 0x04, 0x00, 0x80, 0x19, 0x40, 0x23, 0x01, 
-       0x02, 0x9b, 0x18, 0xc0, 0x68, 0x01, 0x98, 0x04, 
-       0x00, 0x80, 0x58, 0x28, 0x9a, 0x04, 0x18, 0xaa, 
-       0x00, 0x5b, 0x18, 0xd2, 0x78, 0x12, 0x92, 0x00, 
-       0x22, 0x00, 0x9b, 0x04, 0x18, 0xee, 0x23, 0x01, 
-       0x02, 0xdb, 0x18, 0xf3, 0x70, 0x1a, 0x9a, 0x04, 
-       0x32, 0x01, 0x92, 0x04, 0x9b, 0x01, 0x40, 0x1a, 
-       0x92, 0x04, 0x29, 0x00, 0xd0, 0x56, 0xb0, 0x82, 
-       0x91, 0x01, 0x21, 0x01, 0x9a, 0x02, 0x2a, 0x80, 
-       0xd1, 0x19, 0x22, 0x00, 0x9b, 0x01, 0x40, 0x0b, 
-       0xd0, 0x10, 0x9b, 0x0b, 0x5c, 0x9b, 0x2b, 0xff, 
-       0xd0, 0x0c, 0x9b, 0x0b, 0x5c, 0x9b, 0x93, 0x00, 
-       0x00, 0x91, 0x9a, 0x0a, 0x58, 0x52, 0x00, 0xa1, 
-       0x19, 0xc9, 0x61, 0x0a, 0x1c, 0x61, 0x06, 0x0c, 
-       0x0e, 0x24, 0xe0, 0x1c, 0x00, 0x49, 0x32, 0x01, 
-       0x2a, 0x10, 0xd3, 0xe7, 0xe0, 0x17, 0x22, 0x00, 
-       0x9b, 0x01, 0x40, 0x0b, 0xd0, 0x0f, 0x9b, 0x09, 
-       0x5c, 0x9b, 0x2b, 0xff, 0xd0, 0x0b, 0x93, 0x00, 
-       0x00, 0x93, 0x9e, 0x08, 0x58, 0xf6, 0x00, 0xa3, 
-       0x19, 0xdb, 0x61, 0x1e, 0x28, 0x00, 0xd0, 0x02, 
-       0x1c, 0x63, 0x06, 0x1c, 0x0e, 0x24, 0x00, 0x49, 
-       0x32, 0x01, 0x2a, 0x20, 0xd3, 0xe8, 0x2c, 0x00, 
-       0xd0, 0x1b, 0x9b, 0x00, 0x70, 0x7b, 0x60, 0x78, 
-       0x9b, 0x00, 0x00, 0x99, 0x9a, 0x07, 0x58, 0x52, 
-       0x69, 0x51, 0xe0, 0x07, 0x68, 0x09, 0x29, 0x00, 
-       0xd1, 0x04, 0x20, 0xba, 0xb0, 0x0c, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x42, 0x88, 0xd3, 0xf5, 
-       0x1d, 0xcb, 0x33, 0xb9, 0x42, 0x83, 0xd3, 0xf1, 
-       0x60, 0xb9, 0x61, 0x51, 0x1c, 0x38, 0xf0, 0x0d, 
-       0xff, 0x24, 0xb0, 0x02, 0x98, 0x04, 0x99, 0x02, 
-       0x42, 0x88, 0xd0, 0x01, 0x2c, 0x00, 0xd0, 0x83, 
-       0x70, 0x3c, 0x98, 0x04, 0x99, 0x03, 0x60, 0x08, 
-       0x20, 0x00, 0xb0, 0x0a, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x9e, 0x00, 0x04, 0x80, 
-       0x2e, 0x08, 0x60, 0x90, 0x9e, 0x00, 0x04, 0x90, 
-       0x2e, 0x08, 0x69, 0x90, 0x9e, 0x00, 0x04, 0x98, 
-       0x2e, 0x08, 0x5f, 0xc4, 0x2e, 0x08, 0x5f, 0x64, 
-       0x2e, 0x08, 0x5f, 0xa4, 0x2e, 0x08, 0x5e, 0xe4, 
-       0x2e, 0x08, 0x5e, 0x5c, 0xb5, 0x00, 0x20, 0xff, 
-       0x49, 0x03, 0x60, 0x08, 0x20, 0x01, 0x05, 0x00, 
-       0xf0, 0x1a, 0xf9, 0x9e, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x01, 0xe4, 0xb5, 0xf0, 0x06, 0x07, 
-       0x0e, 0x3f, 0x06, 0x0c, 0x0e, 0x24, 0x20, 0x10, 
-       0x2f, 0x1f, 0xdc, 0x2c, 0x2c, 0x1f, 0xdc, 0x2a, 
-       0x1c, 0x39, 0x43, 0x21, 0x08, 0x49, 0xd2, 0x26, 
-       0x49, 0x14, 0x1c, 0x38, 0xf0, 0x1a, 0xf9, 0x9a, 
-       0x26, 0x01, 0x1c, 0x35, 0x40, 0xbd, 0x1c, 0x30, 
-       0x40, 0xa0, 0x1c, 0x04, 0x43, 0x28, 0xf0, 0x1a, 
-       0xf9, 0x84, 0xf0, 0x1a, 0xf9, 0x87, 0x43, 0xa8, 
-       0xf0, 0x1a, 0xf9, 0x88, 0xf0, 0x1a, 0xf9, 0x82, 
-       0x43, 0xa0, 0xf0, 0x1a, 0xf9, 0x83, 0x1c, 0x38, 
-       0xf0, 0x10, 0xf8, 0x66, 0x1c, 0x04, 0xd1, 0x07, 
-       0x21, 0x03, 0x05, 0x09, 0x20, 0x00, 0x1c, 0x3a, 
-       0x1c, 0x33, 0xf0, 0x10, 0xff, 0x17, 0x1c, 0x04, 
-       0xf7, 0xff, 0xfc, 0x8e, 0x1c, 0x20, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x00, 0x2d, 0x43, 
-       0xb5, 0xf0, 0x06, 0x04, 0x0e, 0x24, 0x04, 0x0d, 
-       0x0c, 0x2d, 0x06, 0x16, 0x0e, 0x36, 0x9f, 0x05, 
-       0x06, 0x38, 0x0e, 0x00, 0x22, 0x00, 0x21, 0x00, 
-       0xb4, 0x07, 0x21, 0x10, 0x1c, 0x1a, 0xb4, 0x06, 
-       0x23, 0x10, 0x1c, 0x20, 0x1c, 0x29, 0x1c, 0x32, 
-       0xf0, 0x00, 0xf8, 0x54, 0xb0, 0x05, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x06, 0x04, 
-       0x0e, 0x24, 0x04, 0x0d, 0x0c, 0x2d, 0x06, 0x16, 
-       0x0e, 0x36, 0x9f, 0x05, 0x06, 0x38, 0x0e, 0x00, 
-       0x22, 0x00, 0x21, 0x00, 0xb4, 0x07, 0x21, 0x18, 
-       0x1c, 0x1a, 0xb4, 0x06, 0x23, 0x11, 0x1c, 0x20, 
-       0x1c, 0x29, 0x1c, 0x32, 0xf0, 0x00, 0xf8, 0x3a, 
-       0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0xf0, 0x06, 0x04, 0x0e, 0x24, 0x04, 0x0d, 
-       0x0c, 0x2d, 0x06, 0x16, 0x0e, 0x36, 0x9f, 0x05, 
-       0x06, 0x38, 0x0e, 0x00, 0x22, 0x00, 0x21, 0x00, 
-       0xb4, 0x07, 0x21, 0x20, 0x1c, 0x1a, 0xb4, 0x06, 
-       0x23, 0x51, 0x1c, 0x20, 0x1c, 0x29, 0x1c, 0x32, 
-       0xf0, 0x00, 0xf8, 0x20, 0xb0, 0x05, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x06, 0x03, 
-       0x0e, 0x1b, 0x04, 0x0d, 0x0c, 0x2d, 0x06, 0x16, 
-       0x0e, 0x36, 0x9c, 0x09, 0x9f, 0x0a, 0x06, 0x20, 
-       0x0e, 0x00, 0x22, 0x00, 0x1c, 0x39, 0xb4, 0x07, 
-       0x21, 0x10, 0x9a, 0x06, 0xb4, 0x06, 0x1c, 0x18, 
-       0x23, 0x62, 0x1c, 0x29, 0x1c, 0x32, 0xf0, 0x00, 
-       0xf8, 0x05, 0xb0, 0x05, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x9e, 0x09, 
-       0x9f, 0x0b, 0x06, 0x04, 0x0e, 0x24, 0x04, 0x09, 
-       0x0c, 0x09, 0xb0, 0x88, 0x91, 0x00, 0x06, 0x15, 
-       0x0e, 0x2d, 0x06, 0x18, 0x0e, 0x00, 0x90, 0x01, 
-       0x06, 0x32, 0x0e, 0x12, 0x92, 0x02, 0x06, 0x38, 
-       0x0e, 0x00, 0x90, 0x03, 0xb0, 0x82, 0xf0, 0x1a, 
-       0xf8, 0xe9, 0x0d, 0x40, 0xd2, 0x09, 0x20, 0xff, 
-       0x90, 0x00, 0xf0, 0x1a, 0xf8, 0xe3, 0x23, 0x01, 
-       0x05, 0x1b, 0x43, 0x18, 0xf0, 0x1a, 0xf8, 0xe2, 
-       0xe0, 0x01, 0x20, 0x00, 0x90, 0x00, 0x98, 0x03, 
-       0x08, 0x40, 0xd3, 0x02, 0x22, 0x12, 0x92, 0x01, 
-       0xe0, 0x01, 0x22, 0x11, 0x92, 0x01, 0x22, 0x01, 
-       0x1c, 0x11, 0x40, 0xa9, 0x4b, 0x5f, 0x1c, 0x0f, 
-       0x68, 0x18, 0x40, 0x07, 0xd0, 0x01, 0x27, 0x11, 
-       0xe0, 0xa2, 0x27, 0x00, 0x43, 0x08, 0x60, 0x18, 
-       0x23, 0x1c, 0x98, 0x05, 0x40, 0x18, 0x28, 0x1c, 
-       0xd1, 0x06, 0x21, 0x01, 0x20, 0x7d, 0x01, 0x00, 
-       0xf0, 0x10, 0xfb, 0xc4, 0x1c, 0x06, 0xe0, 0x0d, 
-       0x98, 0x05, 0x08, 0x40, 0xd3, 0x05, 0x21, 0x01, 
-       0x20, 0xc8, 0xf0, 0x10, 0xfb, 0xbb, 0x1c, 0x06, 
-       0xe0, 0x04, 0x21, 0x01, 0x20, 0x3c, 0xf0, 0x10, 
-       0xfb, 0xb5, 0x1c, 0x06, 0x20, 0x34, 0xf0, 0x03, 
-       0xf9, 0x6d, 0x00, 0xaa, 0x92, 0x09, 0x49, 0x4c, 
-       0x91, 0x08, 0x50, 0x88, 0x00, 0xa1, 0x91, 0x07, 
-       0x48, 0x4a, 0x90, 0x06, 0x58, 0x40, 0x28, 0x00, 
-       0xd1, 0x05, 0x00, 0xb0, 0xf0, 0x03, 0xf9, 0x5e, 
-       0x99, 0x07, 0x9a, 0x06, 0x50, 0x50, 0x98, 0x09, 
-       0x99, 0x08, 0x58, 0x08, 0x28, 0x00, 0xd0, 0x04, 
-       0x98, 0x06, 0x99, 0x07, 0x58, 0x40, 0x28, 0x00, 
-       0xd1, 0x01, 0x27, 0x13, 0xe0, 0x64, 0x99, 0x07, 
-       0x4a, 0x3f, 0x58, 0x51, 0x29, 0x00, 0xd1, 0x3a, 
-       0x9a, 0x01, 0xb4, 0x04, 0x23, 0x40, 0x1c, 0x31, 
-       0x1c, 0x22, 0xf0, 0x10, 0xfc, 0x13, 0xb0, 0x01, 
-       0x1c, 0x07, 0xd1, 0x17, 0x23, 0x03, 0x02, 0x5b, 
-       0x22, 0x01, 0x02, 0xd2, 0x21, 0x01, 0x1c, 0x20, 
-       0xf0, 0x08, 0xfd, 0x56, 0x22, 0x00, 0xb4, 0x04, 
-       0x22, 0x02, 0x99, 0x03, 0x9b, 0x02, 0x1c, 0x20, 
-       0xf0, 0x08, 0xfb, 0x8a, 0xb0, 0x01, 0x1c, 0x07, 
-       0xd1, 0x04, 0x22, 0x01, 0x48, 0x2f, 0x55, 0x02, 
-       0x48, 0x2f, 0x55, 0x02, 0x2f, 0x00, 0xd1, 0x16, 
-       0x98, 0x16, 0x28, 0x00, 0xd0, 0x13, 0x21, 0x02, 
-       0x98, 0x16, 0xf0, 0x10, 0xfb, 0x63, 0x1c, 0x07, 
-       0x00, 0x80, 0xf0, 0x03, 0xf9, 0x1b, 0x99, 0x07, 
-       0x4a, 0x28, 0x50, 0x50, 0x28, 0x00, 0xd0, 0x05, 
-       0x1c, 0x39, 0x1c, 0x22, 0xf0, 0x10, 0xfb, 0x77, 
-       0x1c, 0x07, 0xe0, 0x00, 0x27, 0x13, 0x2f, 0x00, 
-       0xd1, 0x22, 0x98, 0x03, 0x09, 0x80, 0xd3, 0x06, 
-       0x20, 0x5c, 0xf0, 0x03, 0xf9, 0x07, 0x28, 0x00, 
-       0xd1, 0x02, 0x27, 0x13, 0xe0, 0x00, 0x20, 0x00, 
-       0x1c, 0x02, 0x98, 0x05, 0x99, 0x17, 0xb4, 0x07, 
-       0x1c, 0x2a, 0xb4, 0x04, 0x98, 0x0d, 0x99, 0x0c, 
-       0x58, 0x08, 0x99, 0x18, 0x9a, 0x08, 0x9b, 0x07, 
-       0xf0, 0x00, 0xf9, 0x1c, 0xb0, 0x04, 0x2f, 0x00, 
-       0xd1, 0x06, 0x98, 0x09, 0x99, 0x08, 0x58, 0x08, 
-       0x1c, 0x21, 0xf0, 0x0c, 0xfd, 0xf7, 0x1c, 0x07, 
-       0x2f, 0x00, 0xd0, 0x03, 0x1c, 0x20, 0x1c, 0x29, 
-       0xf0, 0x00, 0xf8, 0x20, 0x98, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0xf0, 0x1a, 0xf8, 0x1b, 0x4b, 0x0c, 
-       0x40, 0x18, 0xf0, 0x1a, 0xf8, 0x1b, 0x1c, 0x38, 
-       0xb0, 0x0a, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x01, 0xec, 
-       0x2e, 0x08, 0x01, 0xf0, 0x2e, 0x08, 0x02, 0x70, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x44, 0x48, 
-       0x2e, 0x08, 0x44, 0x28, 0x2e, 0x08, 0x02, 0xf0, 
-       0xff, 0xef, 0xff, 0xff, 0xb5, 0xf0, 0x06, 0x07, 
-       0x0e, 0x3f, 0x06, 0x0d, 0x0e, 0x2d, 0xb0, 0x83, 
-       0xf0, 0x19, 0xff, 0xf8, 0x0d, 0x40, 0xd2, 0x09, 
-       0x20, 0xff, 0x90, 0x00, 0xf0, 0x19, 0xff, 0xf2, 
-       0x23, 0x01, 0x05, 0x1b, 0x43, 0x18, 0xf0, 0x19, 
-       0xff, 0xf1, 0xe0, 0x01, 0x20, 0x00, 0x90, 0x00, 
-       0x24, 0x00, 0x20, 0x01, 0x40, 0xa8, 0x1c, 0x02, 
-       0x49, 0x3f, 0x1c, 0x13, 0x68, 0x08, 0x40, 0x03, 
-       0xd0, 0x69, 0x43, 0xd2, 0x40, 0x10, 0x00, 0xae, 
-       0x60, 0x08, 0x4d, 0x3c, 0x59, 0xa8, 0x28, 0x00, 
-       0xd0, 0x62, 0x78, 0x81, 0x91, 0x02, 0x08, 0x49, 
-       0xd3, 0x02, 0x23, 0x12, 0x93, 0x01, 0xe0, 0x01, 
-       0x23, 0x11, 0x93, 0x01, 0x1c, 0x39, 0xf0, 0x0c, 
-       0xfe, 0x11, 0x1c, 0x04, 0x59, 0xa8, 0x6b, 0x00, 
-       0x28, 0x00, 0xd0, 0x01, 0xf0, 0x03, 0xf8, 0xac, 
-       0x59, 0xa8, 0x6a, 0xc0, 0x28, 0x00, 0xd0, 0x01, 
-       0xf0, 0x03, 0xf8, 0xa6, 0x59, 0xa8, 0xf0, 0x03, 
-       0xf8, 0xa3, 0x20, 0x00, 0x51, 0xa8, 0x00, 0xbd, 
-       0x48, 0x2b, 0x59, 0x40, 0x78, 0x80, 0x28, 0x00, 
-       0xd1, 0x40, 0x1c, 0x39, 0xf0, 0x10, 0xf9, 0x36, 
-       0x2c, 0x00, 0xd1, 0x2a, 0x98, 0x02, 0x09, 0x80, 
-       0xd3, 0x0a, 0x21, 0x00, 0x1c, 0x3a, 0x48, 0x25, 
-       0xf0, 0x10, 0xfa, 0xd1, 0x28, 0x00, 0xd0, 0x03, 
-       0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x22, 0x00, 0xb4, 0x04, 0x22, 0x02, 0x9b, 0x02, 
-       0x1c, 0x38, 0x49, 0x1e, 0xf0, 0x08, 0xfa, 0xb8, 
-       0xb0, 0x01, 0x1c, 0x04, 0xd1, 0x11, 0x9a, 0x01, 
-       0xb4, 0x04, 0x26, 0x00, 0x21, 0x00, 0x1c, 0x3a, 
-       0x1c, 0x33, 0x48, 0x18, 0xf0, 0x10, 0xfb, 0x22, 
-       0x1c, 0x04, 0xb0, 0x01, 0x48, 0x16, 0x55, 0xc6, 
-       0x48, 0x16, 0x55, 0xc6, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfa, 0xc1, 0x4f, 0x15, 0x59, 0x78, 0xf0, 0x03, 
-       0xf8, 0x67, 0x26, 0x00, 0x51, 0x7e, 0x37, 0x80, 
-       0x59, 0x78, 0x28, 0x00, 0xd0, 0x04, 0xf0, 0x03, 
-       0xf8, 0x5f, 0x51, 0x7e, 0xe0, 0x02, 0xe0, 0x00, 
-       0xe0, 0x00, 0x24, 0x12, 0x98, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0xf0, 0x19, 0xff, 0x6f, 0x4b, 0x0b, 
-       0x40, 0x18, 0xf0, 0x19, 0xff, 0x6f, 0x1c, 0x20, 
-       0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x01, 0xec, 0x2e, 0x08, 0x01, 0xf0, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x44, 0x48, 0x2e, 0x08, 0x44, 0x28, 
-       0x2e, 0x08, 0x02, 0x70, 0xff, 0xef, 0xff, 0xff, 
-       0xb5, 0xb0, 0x06, 0x00, 0x0e, 0x00, 0x00, 0x80, 
-       0x1c, 0x0c, 0x1c, 0x17, 0xb0, 0xad, 0x49, 0x1c, 
-       0x58, 0x08, 0x90, 0x04, 0x78, 0x81, 0x23, 0x04, 
-       0x40, 0x19, 0x25, 0x00, 0x29, 0x00, 0xd0, 0x0b, 
-       0xa9, 0x25, 0xf0, 0x0d, 0xf9, 0xd3, 0xab, 0x00, 
-       0x80, 0x5d, 0xa8, 0x25, 0x90, 0x24, 0x46, 0x68, 
-       0x21, 0x00, 0xf0, 0x0d, 0xf9, 0xf2, 0xe0, 0x0c, 
-       0x78, 0x00, 0x0a, 0x00, 0xd3, 0x04, 0x20, 0x01, 
-       0x03, 0x00, 0xab, 0x00, 0x80, 0x58, 0xe0, 0x03, 
-       0x20, 0x01, 0x02, 0x80, 0xab, 0x00, 0x80, 0x58, 
-       0x20, 0x00, 0x28, 0x00, 0xd1, 0x0e, 0xa8, 0x00, 
-       0x88, 0x40, 0x60, 0x38, 0xf0, 0x02, 0xff, 0xea, 
-       0x60, 0x20, 0x28, 0x00, 0xd1, 0x01, 0x20, 0x13, 
-       0xe0, 0x06, 0x1c, 0x01, 0x46, 0x68, 0xf0, 0x0d, 
-       0xf9, 0xd4, 0xe0, 0x01, 0x60, 0x25, 0x60, 0x3d, 
-       0xb0, 0x2d, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x01, 0xf0, 0xb4, 0xf0, 0x06, 0x12, 
-       0x0e, 0x12, 0x06, 0x1b, 0x0e, 0x1b, 0x9c, 0x06, 
-       0x9f, 0x07, 0x9d, 0x05, 0x9e, 0x04, 0x06, 0x36, 
-       0x0e, 0x36, 0x06, 0x2d, 0xd0, 0x02, 0x25, 0x80, 
-       0x70, 0x05, 0xe0, 0x01, 0x25, 0x00, 0x70, 0x05, 
-       0x25, 0x00, 0x70, 0x45, 0x80, 0x85, 0x72, 0x05, 
-       0x70, 0xc6, 0x70, 0x83, 0x62, 0xc4, 0x63, 0x07, 
-       0x27, 0x00, 0x23, 0x00, 0x2a, 0x00, 0xdd, 0x10, 
-       0x5c, 0xcc, 0x19, 0xc5, 0x73, 0x2c, 0x18, 0xcc, 
-       0x78, 0x66, 0x1c, 0x7c, 0x06, 0x25, 0x0e, 0x2d, 
-       0x1c, 0x3c, 0x18, 0x24, 0x77, 0x26, 0x33, 0x02, 
-       0x06, 0x1b, 0x0e, 0x1b, 0x1c, 0x2f, 0x42, 0x93, 
-       0xdb, 0xee, 0xbc, 0xf0, 0x47, 0x70, 0xb5, 0xf0, 
-       0xb0, 0xac, 0x21, 0x00, 0xa8, 0x07, 0xf0, 0x0d, 
-       0xf8, 0x59, 0xa8, 0x07, 0x78, 0x00, 0x90, 0x06, 
-       0x28, 0x00, 0xd0, 0x4b, 0x24, 0x00, 0x98, 0x06, 
-       0x28, 0x00, 0xdd, 0x43, 0xa8, 0x07, 0xf0, 0x0d, 
-       0xfc, 0x20, 0x00, 0xa1, 0xa8, 0x07, 0x18, 0x08, 
-       0x69, 0x07, 0x78, 0xfe, 0xad, 0x07, 0x88, 0x6d, 
-       0x78, 0xb8, 0x09, 0xc0, 0xd3, 0x12, 0xa8, 0x07, 
-       0xa9, 0x01, 0xf0, 0x10, 0xfe, 0x6f, 0x78, 0xb8, 
-       0x08, 0x40, 0xd3, 0x05, 0x46, 0x6a, 0x1c, 0x38, 
-       0xa9, 0x01, 0xf0, 0x10, 0xfe, 0x9c, 0xe0, 0x08, 
-       0x46, 0x6a, 0x1c, 0x38, 0xa9, 0x01, 0xf0, 0x10, 
-       0xfe, 0xd9, 0xe0, 0x02, 0x20, 0x40, 0xab, 0x00, 
-       0x70, 0x18, 0xa8, 0x00, 0x78, 0x00, 0x09, 0xc0, 
-       0xd3, 0x16, 0x1c, 0x28, 0xf7, 0xfd, 0xfe, 0x3a, 
-       0x1c, 0x07, 0xd0, 0x11, 0xa8, 0x07, 0x1c, 0x39, 
-       0xf0, 0x0d, 0xfa, 0x92, 0x28, 0x00, 0xd1, 0x09, 
-       0x1c, 0x30, 0x1c, 0x29, 0x1c, 0x3a, 0xf7, 0xfd, 
-       0xfe, 0x89, 0x28, 0x00, 0xd0, 0x04, 0xf7, 0xfd, 
-       0xfe, 0x7b, 0xe0, 0x01, 0xf7, 0xfd, 0xfe, 0x78, 
-       0x1c, 0x60, 0x06, 0x04, 0x0e, 0x24, 0x98, 0x06, 
-       0x42, 0x84, 0xdb, 0xbb, 0xa8, 0x07, 0xf0, 0x0d, 
-       0xf8, 0xfb, 0xe7, 0xaa, 0xf7, 0xff, 0xfa, 0x58, 
-       0xb0, 0x2c, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0xf0, 0xb0, 0xad, 0x21, 0x00, 0xa8, 0x08, 
-       0xf0, 0x0c, 0xff, 0xfc, 0x22, 0x05, 0x21, 0x16, 
-       0x1c, 0x04, 0xf0, 0x03, 0xfd, 0x76, 0x2c, 0xb2, 
-       0xd1, 0x03, 0x21, 0x00, 0xa8, 0x08, 0xf0, 0x0c, 
-       0xff, 0xab, 0xa8, 0x08, 0x78, 0x00, 0x90, 0x06, 
-       0x28, 0x00, 0xd0, 0x73, 0x25, 0x00, 0x98, 0x06, 
-       0x28, 0x00, 0xdd, 0x57, 0xa8, 0x08, 0xf0, 0x0d, 
-       0xfb, 0xb8, 0x00, 0xa9, 0xa8, 0x08, 0x18, 0x08, 
-       0x69, 0x07, 0x78, 0xf8, 0x90, 0x07, 0xae, 0x08, 
-       0x88, 0x76, 0x78, 0xb8, 0x09, 0xc0, 0xd3, 0x12, 
-       0xa8, 0x08, 0xa9, 0x01, 0xf0, 0x10, 0xfe, 0x06, 
-       0x78, 0xb8, 0x08, 0x40, 0xd3, 0x05, 0x46, 0x6a, 
-       0x1c, 0x38, 0xa9, 0x01, 0xf0, 0x10, 0xfe, 0x33, 
-       0xe0, 0x08, 0x46, 0x6a, 0x1c, 0x38, 0xa9, 0x01, 
-       0xf0, 0x10, 0xfe, 0x70, 0xe0, 0x02, 0x20, 0x40, 
-       0xab, 0x00, 0x70, 0x18, 0xa8, 0x00, 0x78, 0x00, 
-       0x09, 0xc0, 0xd3, 0x29, 0x78, 0xb8, 0x09, 0x80, 
-       0xd3, 0x0f, 0xa8, 0x08, 0xa9, 0x01, 0xf0, 0x10, 
-       0xff, 0xcd, 0x1c, 0x04, 0xa8, 0x00, 0x78, 0x00, 
-       0x08, 0x80, 0xd2, 0x02, 0x78, 0xb8, 0x08, 0x80, 
-       0xd3, 0x1a, 0x1c, 0x38, 0xf0, 0x11, 0xf8, 0xd4, 
-       0xe0, 0x16, 0x1c, 0x30, 0xf7, 0xfd, 0xfd, 0xbe, 
-       0x1c, 0x07, 0xd0, 0x11, 0xa8, 0x08, 0x1c, 0x39, 
-       0xf0, 0x0d, 0xfa, 0x16, 0x28, 0x00, 0xd1, 0x09, 
-       0x98, 0x07, 0x1c, 0x31, 0x1c, 0x3a, 0xf7, 0xfd, 
-       0xfe, 0x0d, 0x28, 0x00, 0xd0, 0x04, 0xf7, 0xfd, 
-       0xfd, 0xff, 0xe0, 0x01, 0xf7, 0xfd, 0xfd, 0xfc, 
-       0x1c, 0x68, 0x06, 0x05, 0x0e, 0x2d, 0x98, 0x06, 
-       0x42, 0x85, 0xdb, 0xa7, 0x98, 0x06, 0x28, 0x00, 
-       0xd0, 0x08, 0xa8, 0x08, 0xf0, 0x0d, 0xf8, 0x7c, 
-       0x2c, 0xb2, 0xd1, 0x03, 0x21, 0x00, 0xa8, 0x08, 
-       0xf0, 0x0c, 0xff, 0x3e, 0xf7, 0xff, 0xf9, 0x58, 
-       0x21, 0x00, 0xa8, 0x08, 0xf7, 0xff, 0xfb, 0x88, 
-       0x1c, 0x04, 0xa8, 0x08, 0x78, 0x00, 0x90, 0x06, 
-       0x28, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xd1, 0x89, 
-       0xf7, 0xff, 0xf9, 0xc6, 0xb0, 0x2d, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x26, 0x00, 
-       0x48, 0x28, 0x71, 0x06, 0x70, 0x06, 0x20, 0x00, 
-       0x4f, 0x27, 0x4a, 0x28, 0x49, 0x28, 0x00, 0x43, 
-       0x52, 0xd6, 0x52, 0xfe, 0x00, 0x83, 0x50, 0xce, 
-       0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x28, 0x1d, 
-       0xdb, 0xf5, 0x28, 0x20, 0xda, 0x08, 0x00, 0x43, 
-       0x52, 0xd6, 0x00, 0x83, 0x50, 0xce, 0x30, 0x01, 
-       0x06, 0x00, 0x0e, 0x00, 0x28, 0x20, 0xdb, 0xf6, 
-       0x20, 0x01, 0x02, 0x80, 0xf0, 0x19, 0xfd, 0xcd, 
-       0xf0, 0x19, 0xfd, 0xd0, 0x4b, 0x1b, 0x40, 0x18, 
-       0xf0, 0x19, 0xfd, 0xd0, 0x49, 0x1a, 0x20, 0x0a, 
-       0xf0, 0x19, 0xfd, 0xd0, 0x21, 0x00, 0x4f, 0x19, 
-       0x20, 0xff, 0x4a, 0x19, 0x00, 0x4b, 0x18, 0x5b, 
-       0x01, 0x1b, 0x52, 0xd7, 0x18, 0x9b, 0x70, 0x98, 
-       0x70, 0xde, 0x71, 0x1e, 0x1d, 0xdc, 0x34, 0x19, 
-       0x73, 0x26, 0x71, 0x5e, 0x1c, 0x1d, 0x23, 0x06, 
-       0x73, 0x63, 0x23, 0x00, 0x00, 0xdc, 0x19, 0x2c, 
-       0x81, 0xa6, 0x81, 0xe6, 0x33, 0x01, 0x06, 0x1b, 
-       0x0e, 0x1b, 0x60, 0xa6, 0x2b, 0x04, 0xdb, 0xf5, 
-       0x31, 0x01, 0x06, 0x09, 0x0e, 0x09, 0x29, 0x08, 
-       0xdb, 0xe0, 0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x03, 0xb8, 
-       0x2e, 0x08, 0x49, 0xb0, 0x2e, 0x08, 0x49, 0x70, 
-       0x2e, 0x08, 0x45, 0xe8, 0xff, 0xff, 0xfb, 0xff, 
-       0x2e, 0x00, 0x31, 0x7d, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x44, 0x68, 0xb5, 0xf0, 0x06, 0x00, 
-       0x0e, 0x00, 0xb0, 0x83, 0x90, 0x00, 0x04, 0x09, 
-       0x0c, 0x09, 0x91, 0x01, 0x06, 0x10, 0x0e, 0x00, 
-       0x04, 0x1c, 0x0c, 0x24, 0x27, 0x00, 0x49, 0x5a, 
-       0x00, 0x7b, 0x19, 0xdb, 0x01, 0x1b, 0x5a, 0xcd, 
-       0x4b, 0x58, 0x42, 0x9d, 0xd1, 0x01, 0x1c, 0x3a, 
-       0xe0, 0x04, 0x1c, 0x7b, 0x06, 0x1f, 0x0e, 0x3f, 
-       0x2f, 0x08, 0xdb, 0xf1, 0x2f, 0x08, 0xd1, 0x05, 
-       0x20, 0x00, 0x43, 0xc0, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0x46, 0x4f, 0x50, 
-       0x97, 0x02, 0x5b, 0xbb, 0x2b, 0x00, 0xd0, 0x05, 
-       0x20, 0x00, 0x43, 0xc0, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x23, 0x01, 0x9f, 0x02, 
-       0x53, 0xbb, 0x00, 0x53, 0x18, 0x9a, 0x01, 0x12, 
-       0x18, 0x57, 0x80, 0x38, 0x20, 0x14, 0xf0, 0x02, 
-       0xfe, 0x19, 0x1c, 0x01, 0x62, 0xb8, 0x20, 0x00, 
-       0x29, 0x00, 0xd1, 0x08, 0x49, 0x41, 0x80, 0x39, 
-       0x9f, 0x02, 0x53, 0xb8, 0x43, 0xc0, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x1c, 0x0d, 
-       0x21, 0xff, 0x02, 0x09, 0x40, 0x21, 0x12, 0x08, 
-       0x28, 0x09, 0xd2, 0x1f, 0xa3, 0x01, 0x5c, 0x1b, 
-       0x00, 0x5b, 0x44, 0x9f, 0x1b, 0x04, 0x06, 0x09, 
-       0x0c, 0x0f, 0x12, 0x15, 0x18, 0x00, 0x24, 0xb8, 
-       0xe0, 0x16, 0x24, 0xff, 0x34, 0x71, 0xe0, 0x13, 
-       0x24, 0x01, 0x02, 0xa4, 0xe0, 0x10, 0x24, 0x01, 
-       0x02, 0xe4, 0xe0, 0x0d, 0x24, 0x01, 0x03, 0x24, 
-       0xe0, 0x0a, 0x24, 0x01, 0x03, 0x64, 0xe0, 0x07, 
-       0x24, 0x01, 0x03, 0xa4, 0xe0, 0x04, 0x24, 0x01, 
-       0x03, 0xe4, 0xe0, 0x01, 0x24, 0x01, 0x02, 0xa4, 
-       0x80, 0xac, 0x88, 0xa8, 0x00, 0x80, 0xf0, 0x02, 
-       0xfd, 0xdd, 0x60, 0x28, 0x28, 0x00, 0xd1, 0x0d, 
-       0x48, 0x24, 0x80, 0x38, 0x20, 0x00, 0x9f, 0x02, 
-       0x53, 0xb8, 0x1c, 0x28, 0xf0, 0x02, 0xfd, 0xf4, 
-       0x20, 0x00, 0x43, 0xc0, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x98, 0x00, 0x70, 0xb8, 
-       0x26, 0x00, 0x88, 0x38, 0x00, 0x80, 0x49, 0x1d, 
-       0x50, 0x0e, 0x20, 0x00, 0x1c, 0x01, 0x43, 0x61, 
-       0x68, 0x2a, 0x18, 0x8a, 0x00, 0xc1, 0x19, 0xc9, 
-       0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x60, 0x8a, 
-       0x28, 0x04, 0xdb, 0xf3, 0x20, 0xb8, 0x1c, 0x21, 
-       0xf0, 0x15, 0xfd, 0x94, 0x1d, 0xfc, 0x34, 0x19, 
-       0x73, 0x20, 0x72, 0x2e, 0x78, 0xb8, 0x23, 0x01, 
-       0x02, 0x9b, 0x00, 0x5a, 0x21, 0x01, 0xf0, 0x08, 
-       0xf9, 0xc7, 0x22, 0x00, 0xb4, 0x04, 0x78, 0xb8, 
-       0x23, 0x05, 0x22, 0x02, 0x99, 0x02, 0xf0, 0x07, 
-       0xff, 0xfb, 0x22, 0x04, 0x7b, 0x21, 0xb0, 0x01, 
-       0xb4, 0x06, 0x78, 0xb9, 0x22, 0x0a, 0x20, 0x85, 
-       0x6a, 0xbb, 0xf0, 0x08, 0xfa, 0x43, 0x1c, 0x30, 
-       0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x44, 0x68, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x49, 0x70, 0x2e, 0x08, 0x45, 0xe8, 
-       0xb5, 0xf0, 0xb0, 0x82, 0x46, 0x68, 0xf0, 0x08, 
-       0xff, 0xd7, 0x21, 0x00, 0x4f, 0x24, 0x4b, 0x25, 
-       0x93, 0x01, 0x4a, 0x25, 0x00, 0x48, 0x18, 0x40, 
-       0x01, 0x00, 0x19, 0xc0, 0x78, 0x84, 0x9d, 0x00, 
-       0x40, 0xe5, 0x07, 0xeb, 0x0f, 0xdb, 0x2b, 0x01, 
-       0xd1, 0x31, 0x6a, 0x83, 0x7a, 0x1c, 0x2c, 0xa4, 
-       0xd0, 0x01, 0x2c, 0xa5, 0xd1, 0x2b, 0x1d, 0xc4, 
-       0x34, 0x19, 0xe0, 0x0e, 0x79, 0x05, 0x73, 0x65, 
-       0x88, 0xde, 0x79, 0x05, 0x00, 0xed, 0x18, 0x2d, 
-       0x81, 0xae, 0x79, 0x05, 0x35, 0x01, 0x07, 0xad, 
-       0x0f, 0xad, 0x71, 0x05, 0x78, 0x15, 0x35, 0x01, 
-       0x70, 0x15, 0x7a, 0x9d, 0x7b, 0x66, 0x42, 0xb5, 
-       0xd0, 0x02, 0x79, 0x45, 0x2d, 0x00, 0xd0, 0xe9, 
-       0x7a, 0x1b, 0x2b, 0xa5, 0xd1, 0x0f, 0x79, 0x43, 
-       0x07, 0xdc, 0x0f, 0xe4, 0x2c, 0x01, 0xd0, 0x0a, 
-       0x1c, 0x1c, 0x23, 0x01, 0x43, 0x23, 0x71, 0x43, 
-       0x88, 0x00, 0x00, 0x80, 0x9b, 0x01, 0x18, 0xc0, 
-       0x68, 0x03, 0x33, 0x01, 0x60, 0x03, 0x1c, 0x48, 
-       0x06, 0x01, 0x0e, 0x09, 0x29, 0x08, 0xdb, 0xbd, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x44, 0x68, 0x2e, 0x08, 0x45, 0xe8, 
-       0x2e, 0x08, 0x03, 0xb8, 0xb5, 0xf0, 0x04, 0x05, 
-       0x0c, 0x2d, 0x20, 0x00, 0x4c, 0x31, 0x00, 0x42, 
-       0x18, 0x12, 0x01, 0x12, 0x5a, 0xa2, 0x42, 0xaa, 
-       0xd1, 0x01, 0x1c, 0x01, 0xe0, 0x04, 0x30, 0x01, 
-       0x06, 0x00, 0x0e, 0x00, 0x28, 0x08, 0xdb, 0xf2, 
-       0x28, 0x08, 0xd1, 0x04, 0x20, 0x00, 0x43, 0xc0, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x48, 
-       0x18, 0x40, 0x01, 0x00, 0x19, 0x07, 0x78, 0xb8, 
-       0x49, 0x25, 0xf0, 0x08, 0xfa, 0x0f, 0x79, 0x78, 
-       0x23, 0x02, 0x43, 0x18, 0x71, 0x78, 0x78, 0xbe, 
-       0x20, 0xff, 0x70, 0xb8, 0x21, 0x00, 0x1d, 0xf8, 
-       0x30, 0x19, 0x73, 0x01, 0x21, 0x06, 0x73, 0x41, 
-       0x78, 0xf8, 0x79, 0x39, 0x42, 0x88, 0xd1, 0x11, 
-       0x79, 0x78, 0x07, 0xc0, 0x0f, 0xc0, 0x28, 0x01, 
-       0xd0, 0x0c, 0x20, 0x00, 0x70, 0xf8, 0x71, 0x38, 
-       0x71, 0x78, 0x48, 0x17, 0x80, 0x38, 0x6a, 0xb8, 
-       0x68, 0x00, 0xf0, 0x02, 0xfd, 0x15, 0x6a, 0xb8, 
-       0xf0, 0x02, 0xfd, 0x12, 0x4f, 0x12, 0x00, 0x68, 
-       0x49, 0x12, 0x52, 0x0f, 0x00, 0x71, 0x4a, 0x12, 
-       0x52, 0x57, 0x21, 0x00, 0x4a, 0x11, 0x52, 0x11, 
-       0x1c, 0x30, 0x1c, 0x29, 0xf0, 0x03, 0xf8, 0x12, 
-       0x20, 0x00, 0x00, 0x41, 0x18, 0x09, 0x01, 0x09, 
-       0x5a, 0x61, 0x42, 0xb9, 0xd1, 0x04, 0x30, 0x01, 
-       0x06, 0x00, 0x0e, 0x00, 0x28, 0x08, 0xdb, 0xf4, 
-       0x28, 0x08, 0xd1, 0x03, 0x21, 0x00, 0x48, 0x08, 
-       0x71, 0x01, 0x70, 0x01, 0x20, 0x00, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x44, 0x68, 
-       0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x49, 0x30, 
-       0x2e, 0x08, 0x48, 0xf8, 0x2e, 0x08, 0x49, 0x70, 
-       0x2e, 0x08, 0x03, 0xb8, 0xb5, 0x80, 0x1c, 0x07, 
-       0x30, 0x28, 0xf0, 0x02, 0xfc, 0xbb, 0x49, 0x07, 
-       0x64, 0x88, 0x65, 0x08, 0x65, 0x48, 0x19, 0xc0, 
-       0x64, 0xc8, 0x20, 0x00, 0x64, 0x08, 0x64, 0x4f, 
-       0x49, 0x03, 0x84, 0x08, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x03, 0xc0, 
-       0x2c, 0x00, 0x01, 0x00, 0xb5, 0x80, 0x1c, 0x07, 
-       0x30, 0x28, 0xf0, 0x02, 0xfc, 0xa3, 0x49, 0x06, 
-       0x66, 0x08, 0x66, 0x88, 0x66, 0xc8, 0x19, 0xc0, 
-       0x66, 0x48, 0x20, 0x00, 0x65, 0x88, 0x65, 0xcf, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x03, 0xc0, 0xb4, 0x80, 0x04, 0x09, 
-       0x0c, 0x09, 0x88, 0x02, 0x42, 0x8a, 0xd0, 0x18, 
-       0x4a, 0x0d, 0x8f, 0x13, 0x2b, 0x01, 0xd0, 0x04, 
-       0x23, 0x01, 0x87, 0x13, 0x8f, 0x17, 0x2f, 0x01, 
-       0xd1, 0xfb, 0x88, 0x03, 0x42, 0x8b, 0xd0, 0x03, 
-       0x80, 0x01, 0x88, 0x03, 0x42, 0x8b, 0xd1, 0xfb, 
-       0x8f, 0x11, 0x1c, 0x10, 0x29, 0x00, 0xd0, 0x04, 
-       0x21, 0x00, 0x87, 0x01, 0x8f, 0x02, 0x2a, 0x00, 
-       0xd1, 0xfb, 0xbc, 0x80, 0x47, 0x70, 0x00, 0x00, 
-       0x2c, 0x00, 0x1f, 0xc0, 0xb5, 0x80, 0x48, 0x1f, 
-       0x8f, 0x40, 0x28, 0x00, 0xd1, 0x37, 0x4f, 0x1e, 
-       0x88, 0x38, 0x12, 0x00, 0x4a, 0x1d, 0x28, 0x06, 
-       0xd0, 0x1e, 0xdc, 0x08, 0x28, 0x06, 0xd2, 0x26, 
-       0xa3, 0x01, 0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 
-       0x2a, 0x12, 0x12, 0x0d, 0x22, 0x12, 0x28, 0x07, 
-       0xd0, 0x15, 0x28, 0x09, 0xd0, 0x0b, 0x28, 0x0b, 
-       0xd0, 0x14, 0x28, 0x80, 0xd1, 0x17, 0xf0, 0x00, 
-       0xf9, 0x1f, 0xe0, 0x18, 0x88, 0x79, 0x88, 0x38, 
-       0xf0, 0x00, 0xf8, 0x24, 0xe0, 0x13, 0x88, 0x79, 
-       0x88, 0x38, 0xf0, 0x00, 0xf8, 0xbd, 0xe0, 0x0e, 
-       0xf0, 0x00, 0xf9, 0x6a, 0xe0, 0x0b, 0xf0, 0x00, 
-       0xf9, 0xd5, 0xe0, 0x08, 0x88, 0x79, 0x88, 0x38, 
-       0xf0, 0x00, 0xfc, 0x9c, 0xe0, 0x03, 0x48, 0x08, 
-       0x8e, 0x81, 0x31, 0x01, 0x86, 0x81, 0x21, 0x00, 
-       0x1c, 0x38, 0xf7, 0xff, 0xff, 0x9f, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2c, 0x00, 0x1f, 0xc0, 
-       0x2c, 0x00, 0x00, 0xfc, 0x2c, 0x00, 0x01, 0x00, 
-       0x2e, 0x08, 0x04, 0x00, 0xb5, 0xf0, 0x04, 0x04, 
-       0x0c, 0x24, 0x04, 0x0d, 0x0c, 0x2d, 0x1c, 0x17, 
-       0x2d, 0x10, 0xdd, 0x03, 0x20, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xf0, 0x19, 0xfb, 0x92, 
-       0x1c, 0x68, 0x10, 0x40, 0x00, 0x40, 0x04, 0x01, 
-       0x0c, 0x09, 0x1c, 0x88, 0x00, 0x40, 0x1d, 0x02, 
-       0x48, 0x1c, 0x6c, 0x03, 0x18, 0x9d, 0x6c, 0x46, 
-       0x4b, 0x1b, 0x42, 0xb5, 0xdd, 0x0a, 0x88, 0x19, 
-       0x1c, 0x18, 0x23, 0x20, 0x43, 0x19, 0x80, 0x01, 
-       0xf0, 0x19, 0xfb, 0xb2, 0x20, 0x01, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x64, 0x05, 0x35, 0x28, 
-       0x42, 0xb5, 0xdd, 0x04, 0x88, 0x1e, 0x1c, 0x1d, 
-       0x23, 0x10, 0x43, 0x33, 0x80, 0x2b, 0x6d, 0x03, 
-       0x80, 0x9c, 0x6d, 0x04, 0x80, 0xe2, 0x23, 0x00, 
-       0x29, 0x00, 0xdd, 0x08, 0x88, 0x3d, 0x00, 0x5c, 
-       0x6d, 0x06, 0x19, 0xa4, 0x81, 0x25, 0x33, 0x01, 
-       0x37, 0x02, 0x42, 0x8b, 0xdb, 0xf6, 0x6d, 0x01, 
-       0x18, 0x8a, 0x6c, 0xc3, 0x42, 0x9a, 0xd9, 0x00, 
-       0x6c, 0x82, 0x60, 0x0a, 0x65, 0x02, 0xf0, 0x19, 
-       0xfb, 0x8b, 0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x03, 0xc0, 
-       0x2c, 0x00, 0x00, 0xf8, 0xb4, 0xf0, 0x04, 0x04, 
-       0x0c, 0x24, 0x04, 0x08, 0x0c, 0x00, 0x28, 0x10, 
-       0xdd, 0x02, 0x20, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
-       0x30, 0x01, 0x4f, 0x1c, 0x40, 0x07, 0x1c, 0xb8, 
-       0x00, 0x40, 0x1d, 0x01, 0x48, 0x1a, 0x6d, 0x83, 
-       0x18, 0x5d, 0x6d, 0xc6, 0x4b, 0x19, 0x42, 0xb5, 
-       0xdd, 0x07, 0x88, 0x19, 0x1c, 0x18, 0x23, 0x02, 
-       0x43, 0x19, 0x80, 0x01, 0x20, 0x01, 0xbc, 0xf0, 
-       0x47, 0x70, 0x65, 0x85, 0x35, 0x28, 0x42, 0xb5, 
-       0xdd, 0x04, 0x88, 0x1e, 0x1c, 0x1d, 0x23, 0x01, 
-       0x43, 0x33, 0x80, 0x2b, 0x6e, 0x83, 0x80, 0x9c, 
-       0x6e, 0x84, 0x80, 0xe1, 0x23, 0x00, 0x2f, 0x00, 
-       0xdd, 0x08, 0x88, 0x15, 0x00, 0x5c, 0x6e, 0x86, 
-       0x19, 0xa4, 0x81, 0x25, 0x32, 0x02, 0x33, 0x01, 
-       0x42, 0xbb, 0xdb, 0xf6, 0x6e, 0x82, 0x18, 0x51, 
-       0x6e, 0x43, 0x42, 0x99, 0xd3, 0x00, 0x6e, 0x01, 
-       0x60, 0x11, 0x66, 0x81, 0x20, 0x00, 0xbc, 0xf0, 
-       0x47, 0x70, 0x00, 0x00, 0x00, 0x00, 0xff, 0xfe, 
-       0x2e, 0x08, 0x03, 0xc0, 0x2c, 0x00, 0x00, 0xf8, 
-       0xb5, 0xb0, 0x04, 0x04, 0x0c, 0x24, 0x04, 0x0d, 
-       0x0c, 0x2d, 0x1c, 0x17, 0xf0, 0x19, 0xfa, 0xfa, 
-       0x1c, 0x20, 0x1c, 0x29, 0x1c, 0x3a, 0xf7, 0xff, 
-       0xff, 0xa9, 0x1c, 0x07, 0xf0, 0x19, 0xfb, 0x28, 
-       0x1c, 0x38, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0xb4, 0xf0, 0x04, 0x04, 0x0c, 0x24, 0x04, 0x09, 
-       0x0c, 0x09, 0x29, 0x08, 0xdd, 0x02, 0x20, 0x02, 
-       0xbc, 0xf0, 0x47, 0x70, 0x00, 0x88, 0x1d, 0xc7, 
-       0x37, 0x01, 0x48, 0x19, 0x6d, 0x83, 0x19, 0xdd, 
-       0x6d, 0xc6, 0x4b, 0x18, 0x42, 0xb5, 0xdd, 0x07, 
-       0x88, 0x19, 0x1c, 0x18, 0x23, 0x02, 0x43, 0x19, 
-       0x80, 0x01, 0x20, 0x01, 0xbc, 0xf0, 0x47, 0x70, 
-       0x65, 0x85, 0x35, 0x28, 0x42, 0xb5, 0xdd, 0x04, 
-       0x88, 0x1e, 0x1c, 0x1d, 0x23, 0x01, 0x43, 0x33, 
-       0x80, 0x2b, 0x6e, 0x83, 0x80, 0x9c, 0x6e, 0x84, 
-       0x80, 0xe7, 0x23, 0x00, 0x6e, 0x84, 0x29, 0x00, 
-       0xdd, 0x06, 0xca, 0x40, 0x00, 0x9d, 0x19, 0x2d, 
-       0x60, 0xae, 0x33, 0x01, 0x42, 0x8b, 0xdb, 0xf8, 
-       0x6e, 0x81, 0x19, 0xca, 0x6e, 0x43, 0x42, 0x9a, 
-       0xd3, 0x00, 0x6e, 0x02, 0x60, 0x0a, 0x66, 0x82, 
-       0x20, 0x00, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x03, 0xc0, 0x2c, 0x00, 0x00, 0xf8, 
-       0xb5, 0x80, 0x48, 0x28, 0x88, 0x00, 0x06, 0x00, 
-       0x0e, 0x00, 0x4f, 0x27, 0x28, 0x01, 0xd0, 0x13, 
-       0x28, 0x02, 0xd0, 0x1a, 0x28, 0x03, 0xd1, 0x0c, 
-       0x68, 0x38, 0x88, 0x41, 0x29, 0x0e, 0xdb, 0x02, 
-       0x88, 0x41, 0x29, 0x0f, 0xdd, 0x2f, 0x88, 0x01, 
-       0x04, 0x09, 0x88, 0x40, 0x43, 0x08, 0xf0, 0x0b, 
-       0xf9, 0x81, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x68, 0x38, 0x88, 0x82, 0x88, 0x41, 0x88, 0x00, 
-       0xf0, 0x0e, 0xf8, 0x60, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x68, 0x38, 0x88, 0x81, 0x04, 0x09, 
-       0x88, 0xc2, 0x43, 0x11, 0x88, 0x02, 0x04, 0x12, 
-       0x88, 0x40, 0x43, 0x10, 0xf0, 0x0d, 0xfd, 0x04, 
-       0x68, 0x38, 0x88, 0x41, 0x29, 0x0e, 0xd1, 0x08, 
-       0x88, 0x81, 0x04, 0x09, 0x88, 0xc0, 0x43, 0x08, 
-       0xf0, 0x0a, 0xff, 0xfe, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x20, 0x01, 0xf0, 0x0a, 0xff, 0xf8, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x88, 0x41, 
-       0x48, 0x08, 0x29, 0x0e, 0xd1, 0x02, 0x21, 0x00, 
-       0x60, 0x01, 0xe0, 0x01, 0x21, 0x01, 0x60, 0x01, 
-       0x68, 0x00, 0xf0, 0x00, 0xfb, 0xe1, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2c, 0x00, 0x00, 0xfc, 
-       0x2e, 0x08, 0x03, 0xc0, 0x2e, 0x08, 0x04, 0xf4, 
-       0xb5, 0x90, 0x48, 0x31, 0x88, 0x00, 0x06, 0x04, 
-       0x0e, 0x24, 0x48, 0x30, 0x22, 0x03, 0x21, 0x02, 
-       0x4f, 0x2f, 0x2c, 0x08, 0xd2, 0x4f, 0xa3, 0x02, 
-       0x5d, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x04, 0x4b, 0x10, 0x16, 0x1c, 0x28, 0x34, 0x3f, 
-       0x68, 0x39, 0x88, 0x49, 0x06, 0x09, 0x0e, 0x09, 
-       0x88, 0x00, 0x06, 0x00, 0x0e, 0x00, 0xf0, 0x03, 
-       0xfa, 0xa7, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0x03, 0xf7, 0xfd, 0xff, 0xe1, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x20, 0x02, 0xf7, 0xfd, 
-       0xff, 0xdb, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x88, 0x00, 0x4b, 0x1e, 0x28, 0x00, 0xd0, 0x03, 
-       0x60, 0x1a, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x60, 0x19, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x88, 0x00, 0x4b, 0x19, 0x28, 0x00, 0xd0, 0x03, 
-       0x60, 0x1a, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x60, 0x19, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0xf0, 0x02, 0xfe, 0x72, 0x68, 0x39, 0x88, 0x4a, 
-       0x1d, 0x08, 0x88, 0x09, 0xf7, 0xfe, 0xf8, 0x52, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x68, 0x38, 
-       0x88, 0x81, 0x04, 0x09, 0x88, 0xc2, 0x18, 0x8a, 
-       0x88, 0x01, 0x04, 0x09, 0x88, 0x40, 0x50, 0x0a, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x1d, 0xf8, 
-       0x30, 0x39, 0x8e, 0x81, 0x31, 0x01, 0x86, 0x81, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2c, 0x00, 0x00, 0xfc, 0x2c, 0x00, 0x01, 0x00, 
-       0x2e, 0x08, 0x03, 0xc0, 0x6e, 0x00, 0x13, 0x00, 
-       0x6e, 0x00, 0x12, 0x00, 0xb5, 0x90, 0xb0, 0x86, 
-       0x48, 0x80, 0x88, 0x00, 0x06, 0x00, 0x0e, 0x00, 
-       0x4c, 0x7f, 0x4f, 0x80, 0x28, 0x0b, 0xd2, 0x61, 
-       0xa3, 0x01, 0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 
-       0x05, 0x0f, 0x17, 0x3a, 0x5e, 0x86, 0x90, 0xbd, 
-       0xc5, 0xd3, 0xd8, 0x00, 0xf0, 0x0b, 0xfb, 0x38, 
-       0x90, 0x05, 0x14, 0x00, 0x68, 0x39, 0x80, 0x08, 
-       0x98, 0x05, 0x68, 0x39, 0x80, 0x48, 0xe0, 0xe0, 
-       0x20, 0x1e, 0xa9, 0x05, 0xf0, 0x0b, 0xfa, 0x3a, 
-       0x98, 0x05, 0x68, 0x39, 0x80, 0x08, 0xe0, 0xd8, 
-       0x1c, 0x20, 0xf0, 0x0d, 0xfe, 0x31, 0x20, 0x00, 
-       0x00, 0x81, 0x58, 0x61, 0x00, 0x42, 0x68, 0x3b, 
-       0x52, 0x99, 0x30, 0x01, 0x28, 0x04, 0xdd, 0xf7, 
-       0x20, 0x07, 0x00, 0x81, 0x58, 0x61, 0x00, 0x42, 
-       0x68, 0x3b, 0x18, 0xd2, 0x3a, 0x40, 0x87, 0x91, 
-       0x30, 0x01, 0x28, 0x0b, 0xdd, 0xf5, 0x20, 0x0d, 
-       0x00, 0x81, 0x58, 0x61, 0x00, 0x42, 0x68, 0x3b, 
-       0x18, 0xd2, 0x3a, 0x40, 0x87, 0x51, 0x30, 0x01, 
-       0x28, 0x12, 0xdd, 0xf5, 0xe0, 0xb5, 0x20, 0x13, 
-       0x00, 0x81, 0x58, 0x61, 0x00, 0x42, 0x68, 0x3b, 
-       0x18, 0xd2, 0x3a, 0x40, 0x83, 0x51, 0x30, 0x01, 
-       0x28, 0x15, 0xdd, 0xf5, 0x20, 0x00, 0x00, 0x81, 
-       0x19, 0x09, 0x6d, 0x89, 0x00, 0x42, 0x68, 0x3b, 
-       0x18, 0xd2, 0x80, 0xd1, 0x30, 0x01, 0x28, 0x0a, 
-       0xdd, 0xf5, 0x20, 0x00, 0x00, 0x81, 0x19, 0x09, 
-       0x31, 0x80, 0x68, 0x49, 0x00, 0x42, 0x68, 0x3b, 
-       0x18, 0xd2, 0x83, 0x91, 0x30, 0x01, 0x28, 0x01, 
-       0xdd, 0xf4, 0xe0, 0x92, 0xe0, 0x8c, 0x20, 0x02, 
-       0x00, 0x81, 0x19, 0x09, 0x31, 0x80, 0x68, 0x49, 
-       0x00, 0x42, 0x68, 0x3b, 0x18, 0xd2, 0x3a, 0x40, 
-       0x87, 0x91, 0x30, 0x01, 0x28, 0x05, 0xdd, 0xf3, 
-       0x20, 0x09, 0x00, 0x81, 0x19, 0x09, 0x31, 0x80, 
-       0x68, 0x49, 0x00, 0x42, 0x68, 0x3b, 0x18, 0xd2, 
-       0x3a, 0x40, 0x86, 0xd1, 0x30, 0x01, 0x28, 0x0f, 
-       0xdd, 0xf3, 0x20, 0x11, 0x00, 0x81, 0x19, 0x09, 
-       0x31, 0x80, 0x68, 0x49, 0x00, 0x42, 0x68, 0x3b, 
-       0x18, 0xd2, 0x3a, 0x40, 0x86, 0x91, 0x30, 0x01, 
-       0x28, 0x13, 0xdd, 0xf3, 0xe0, 0x69, 0x22, 0x00, 
-       0x21, 0x00, 0x20, 0x01, 0x02, 0xc0, 0xf7, 0xff, 
-       0xfe, 0x47, 0x6f, 0xb8, 0x49, 0x36, 0x80, 0x08, 
-       0xe0, 0x5f, 0xa8, 0x02, 0xf0, 0x10, 0xfc, 0x18, 
-       0x98, 0x02, 0x0c, 0x00, 0x68, 0x39, 0x80, 0x08, 
-       0x98, 0x02, 0x68, 0x39, 0x80, 0x48, 0x98, 0x03, 
-       0x0c, 0x00, 0x68, 0x39, 0x80, 0x88, 0x98, 0x03, 
-       0x68, 0x39, 0x80, 0xc8, 0x98, 0x04, 0x0c, 0x00, 
-       0x68, 0x39, 0x81, 0x08, 0x98, 0x04, 0x68, 0x39, 
-       0x81, 0x48, 0x20, 0x00, 0x68, 0x39, 0x81, 0x88, 
-       0x68, 0x38, 0x89, 0x81, 0x23, 0x01, 0x03, 0xdb, 
-       0x43, 0x19, 0x81, 0x81, 0x48, 0x25, 0x68, 0x39, 
-       0x81, 0xc8, 0x48, 0x25, 0x68, 0x01, 0x14, 0x09, 
-       0x68, 0x3a, 0x82, 0x11, 0x68, 0x00, 0x68, 0x39, 
-       0x82, 0x48, 0xe0, 0x32, 0x20, 0x19, 0x06, 0x80, 
-       0x6b, 0x80, 0x06, 0x00, 0x0e, 0x00, 0x68, 0x39, 
-       0x80, 0x08, 0xe0, 0x2a, 0x68, 0x38, 0x88, 0x01, 
-       0x04, 0x09, 0x88, 0x40, 0x18, 0x08, 0x68, 0x00, 
-       0x90, 0x05, 0x14, 0x00, 0x68, 0x39, 0x80, 0x08, 
-       0x98, 0x05, 0x68, 0x39, 0x80, 0x48, 0xe0, 0x1c, 
-       0x48, 0x16, 0x68, 0x00, 0x68, 0x39, 0x80, 0x08, 
-       0xe0, 0x17, 0x46, 0x69, 0xa8, 0x01, 0xf0, 0x08, 
-       0xfb, 0xb9, 0x98, 0x01, 0x68, 0x39, 0x80, 0x08, 
-       0x98, 0x01, 0x0c, 0x00, 0x68, 0x39, 0x80, 0x48, 
-       0x98, 0x00, 0x68, 0x39, 0x80, 0x88, 0x98, 0x00, 
-       0x0c, 0x00, 0x68, 0x39, 0x80, 0xc8, 0xe0, 0x04, 
-       0x1d, 0xf8, 0x30, 0x39, 0x8e, 0x81, 0x31, 0x01, 
-       0x86, 0x81, 0xb0, 0x06, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2c, 0x00, 0x00, 0xfc, 
-       0x2e, 0x08, 0x46, 0x68, 0x2e, 0x08, 0x03, 0xc0, 
-       0x2c, 0x00, 0x01, 0x00, 0x00, 0x00, 0x26, 0x1a, 
-       0x2e, 0x08, 0x05, 0x68, 0x2e, 0x08, 0x00, 0x58, 
-       0xb5, 0xf0, 0x4f, 0x6e, 0x25, 0x00, 0x6f, 0xf8, 
-       0x28, 0x00, 0xd0, 0x08, 0xf0, 0x06, 0xff, 0x4a, 
-       0x28, 0x00, 0xd0, 0x00, 0x67, 0xfd, 0x20, 0x01, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x6c, 0x38, 
-       0x28, 0x00, 0xd1, 0x03, 0x1c, 0x28, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x6d, 0x38, 0x6d, 0x7c, 
-       0x42, 0xa0, 0xd1, 0x03, 0x1c, 0x28, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x88, 0xa0, 0x06, 0x00, 
-       0x0e, 0x00, 0x28, 0x15, 0xd2, 0x56, 0xa3, 0x02, 
-       0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x0b, 0x12, 0x1c, 0x16, 0x22, 0x53, 0x26, 0x31, 
-       0x3c, 0x47, 0x57, 0x61, 0x68, 0x6d, 0x71, 0x75, 
-       0x7d, 0x84, 0x83, 0x83, 0x87, 0x00, 0x89, 0xe3, 
-       0x89, 0xa2, 0x89, 0x61, 0x89, 0x20, 0xf0, 0x06, 
-       0xfa, 0xc5, 0xe0, 0x70, 0x89, 0x20, 0xf0, 0x06, 
-       0xfa, 0xa9, 0xe0, 0x6c, 0x89, 0xa2, 0x89, 0x61, 
-       0x89, 0x20, 0xf0, 0x06, 0xfb, 0x83, 0xe0, 0x66, 
-       0x89, 0xa2, 0x89, 0x61, 0x89, 0x20, 0xf0, 0x06, 
-       0xfb, 0x2b, 0xe0, 0x60, 0x89, 0x20, 0xf0, 0x06, 
-       0xfb, 0xc1, 0xe0, 0x5c, 0x8a, 0x62, 0x8a, 0x21, 
-       0xb4, 0x06, 0x89, 0xe3, 0x89, 0xa2, 0x89, 0x61, 
-       0x89, 0x20, 0xf0, 0x06, 0xfc, 0x45, 0xb0, 0x02, 
-       0xe0, 0x51, 0x8a, 0x62, 0x8a, 0x21, 0xb4, 0x06, 
-       0x89, 0xe3, 0x89, 0xa2, 0x89, 0x61, 0x89, 0x20, 
-       0xf0, 0x06, 0xfc, 0x8c, 0xb0, 0x02, 0xe0, 0x46, 
-       0x89, 0xa3, 0x89, 0x62, 0x89, 0x20, 0x49, 0x3c, 
-       0xf0, 0x06, 0xfd, 0xcd, 0x21, 0x00, 0x48, 0x3a, 
-       0xf7, 0xff, 0xfc, 0x58, 0xe0, 0x3b, 0x89, 0xe0, 
-       0x04, 0x03, 0x14, 0x1b, 0x89, 0xa0, 0x04, 0x02, 
-       0x14, 0x12, 0x89, 0x61, 0x89, 0x20, 0xf0, 0x06, 
-       0xfd, 0xed, 0xe0, 0x30, 0xe0, 0x4c, 0x89, 0x20, 
-       0xf0, 0x06, 0xfb, 0xa0, 0xe0, 0x2b, 0x89, 0xe0, 
-       0x04, 0x00, 0x8a, 0x21, 0x18, 0x43, 0x89, 0xa2, 
-       0x89, 0x61, 0x89, 0x20, 0xf0, 0x06, 0xfe, 0x40, 
-       0xe0, 0x21, 0x89, 0xe3, 0x89, 0xa2, 0x89, 0x61, 
-       0x89, 0x20, 0xf0, 0x06, 0xfe, 0x71, 0xe0, 0x1a, 
-       0x89, 0x61, 0x89, 0x20, 0xf0, 0x06, 0xfb, 0xc2, 
-       0xe0, 0x15, 0x89, 0x20, 0xf0, 0x06, 0xfb, 0xdc, 
-       0xe0, 0x11, 0x89, 0x20, 0xf0, 0x06, 0xfb, 0xec, 
-       0xe0, 0x0d, 0x20, 0x01, 0x67, 0xf8, 0x89, 0xa2, 
-       0x89, 0x61, 0x89, 0x20, 0xf0, 0x06, 0xff, 0x04, 
-       0xe0, 0x05, 0x89, 0xe3, 0x89, 0xa2, 0x89, 0x61, 
-       0x89, 0x20, 0xf0, 0x06, 0xff, 0x67, 0xe0, 0x1b, 
-       0xf0, 0x06, 0xff, 0xfe, 0xe0, 0x18, 0x89, 0x20, 
-       0xb0, 0x82, 0x90, 0x01, 0x89, 0x61, 0x91, 0x00, 
-       0x89, 0xa5, 0x89, 0xe0, 0x1b, 0x40, 0x24, 0x00, 
-       0x1c, 0x46, 0x2e, 0x00, 0xdd, 0x0b, 0x00, 0xa0, 
-       0x4b, 0x12, 0x18, 0xc0, 0x19, 0x2a, 0x68, 0x03, 
-       0x98, 0x01, 0x99, 0x00, 0xf0, 0x06, 0xfe, 0x04, 
-       0x34, 0x01, 0x42, 0xb4, 0xdb, 0xf3, 0xb0, 0x02, 
-       0x6d, 0x78, 0x88, 0xc0, 0x6c, 0x39, 0x1a, 0x08, 
-       0x64, 0x38, 0x6c, 0x79, 0x1a, 0x08, 0x28, 0x28, 
-       0xdb, 0x05, 0x48, 0x09, 0x88, 0x01, 0x23, 0x10, 
-       0x43, 0xdb, 0x40, 0x19, 0x80, 0x01, 0x6d, 0x78, 
-       0x68, 0x00, 0x65, 0x78, 0x20, 0x01, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x03, 0xc0, 
-       0x2c, 0x00, 0x01, 0x20, 0x2c, 0x00, 0x1a, 0x00, 
-       0x2c, 0x00, 0x00, 0xf8, 0xb5, 0x90, 0x4f, 0x66, 
-       0x6e, 0xf8, 0x6e, 0xb9, 0x42, 0x81, 0xd0, 0x57, 
-       0x88, 0x81, 0x0a, 0x0a, 0x2a, 0x0a, 0xd2, 0x5a, 
-       0xa3, 0x01, 0x5c, 0x9b, 0x00, 0x5b, 0x44, 0x9f, 
-       0x93, 0x04, 0x50, 0x93, 0x93, 0x57, 0x93, 0x93, 
-       0x7c, 0x82, 0x06, 0x09, 0x0e, 0x09, 0x24, 0x00, 
-       0x29, 0x0c, 0xd2, 0x4c, 0xa3, 0x01, 0x5c, 0x5b, 
-       0x00, 0x5b, 0x44, 0x9f, 0x1d, 0x09, 0x13, 0x3c, 
-       0x85, 0x85, 0x85, 0x85, 0x85, 0x39, 0x85, 0x05, 
-       0x89, 0x00, 0xf0, 0x03, 0xf8, 0xc1, 0xe0, 0x7b, 
-       0x22, 0x00, 0xb4, 0x04, 0x89, 0x01, 0x1c, 0x23, 
-       0x4a, 0x52, 0x1e, 0x50, 0xf7, 0xfc, 0xfd, 0x5c, 
-       0xb0, 0x01, 0xe0, 0x71, 0x22, 0x00, 0xb4, 0x04, 
-       0x89, 0x02, 0x1c, 0x23, 0x49, 0x4d, 0x1e, 0x48, 
-       0xf7, 0xfc, 0xfd, 0x52, 0xb0, 0x01, 0xe0, 0x67, 
-       0x8a, 0x02, 0xb4, 0x04, 0x89, 0xc3, 0x89, 0x82, 
-       0x89, 0x41, 0x89, 0x00, 0xf7, 0xfc, 0xfd, 0x48, 
-       0x6e, 0xf8, 0x89, 0x01, 0xb0, 0x01, 0x29, 0x00, 
-       0xd1, 0x5a, 0x89, 0x41, 0x29, 0x00, 0xd1, 0x57, 
-       0x89, 0x81, 0x29, 0x00, 0xd1, 0x54, 0x89, 0xc1, 
-       0x29, 0x00, 0xd1, 0x51, 0x8a, 0x00, 0x28, 0x00, 
-       0xd1, 0x4e, 0xf7, 0xfd, 0xfa, 0x85, 0xe0, 0x62, 
-       0xf7, 0xfc, 0xfc, 0xc6, 0xe0, 0x5f, 0x21, 0x18, 
-       0x20, 0x14, 0xf7, 0xfe, 0xfd, 0xaf, 0xe0, 0x5a, 
-       0xe0, 0x6a, 0x06, 0x09, 0xd1, 0x40, 0x89, 0x00, 
-       0xf7, 0xfc, 0xfe, 0x7c, 0xe0, 0x53, 0xe0, 0x52, 
-       0x06, 0x09, 0x0e, 0x09, 0x29, 0x06, 0xd2, 0x4e, 
-       0xa3, 0x01, 0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 
-       0x02, 0x06, 0x0a, 0x0e, 0x12, 0x16, 0x89, 0x00, 
-       0xf7, 0xfe, 0xf8, 0x6a, 0xe0, 0x43, 0x89, 0x00, 
-       0xf7, 0xfe, 0xf8, 0x8c, 0xe0, 0x3f, 0x89, 0x00, 
-       0xf7, 0xfe, 0xf9, 0x1a, 0xe0, 0x3b, 0x89, 0x00, 
-       0xf7, 0xfe, 0xf9, 0xfe, 0xe0, 0x37, 0x89, 0x00, 
-       0xf7, 0xfe, 0xfa, 0x30, 0xe0, 0x33, 0x89, 0x00, 
-       0x06, 0x00, 0x0e, 0x00, 0xf7, 0xfe, 0xfa, 0x0c, 
-       0xe0, 0x2d, 0x06, 0x08, 0xd1, 0x14, 0x6f, 0xb8, 
-       0x30, 0x01, 0x67, 0xb8, 0xe0, 0x27, 0x06, 0x09, 
-       0x0e, 0x09, 0x29, 0x08, 0xd2, 0x23, 0xa3, 0x02, 
-       0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x04, 0x0d, 0x09, 0x10, 0x13, 0x17, 0x1a, 0x1d, 
-       0x89, 0x00, 0xf0, 0x01, 0xf9, 0x7f, 0xe0, 0x16, 
-       0xe0, 0x15, 0x89, 0x00, 0xf0, 0x01, 0xf9, 0xa6, 
-       0xe0, 0x11, 0xf0, 0x01, 0xf9, 0xf1, 0xe0, 0x0e, 
-       0xf0, 0x01, 0xfa, 0x48, 0xe0, 0x0b, 0x89, 0x00, 
-       0xf0, 0x01, 0xfa, 0xcc, 0xe0, 0x07, 0xf0, 0x01, 
-       0xfb, 0x05, 0xe0, 0x04, 0xf0, 0x01, 0xfb, 0x1e, 
-       0xe0, 0x01, 0xf0, 0x01, 0xfa, 0x7b, 0x6e, 0xf8, 
-       0x88, 0xc0, 0x6d, 0xb9, 0x1a, 0x08, 0x65, 0xb8, 
-       0x6d, 0xf9, 0x1a, 0x08, 0x28, 0x28, 0xdb, 0x04, 
-       0x48, 0x07, 0x88, 0x01, 0x08, 0x49, 0x00, 0x49, 
-       0x80, 0x01, 0x6e, 0xf8, 0x68, 0x00, 0x66, 0xf8, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x03, 0xc0, 0x00, 0x00, 0xff, 0xff, 
-       0x2c, 0x00, 0x00, 0xf8, 0xb5, 0x80, 0x06, 0x00, 
-       0x0e, 0x00, 0x1c, 0x17, 0x28, 0x03, 0xd0, 0x0b, 
-       0x28, 0x07, 0xd0, 0x0e, 0x28, 0x08, 0xd1, 0x03, 
-       0x88, 0x38, 0xf0, 0x02, 0xfa, 0x39, 0x80, 0x78, 
-       0x20, 0x00, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x21, 0x18, 0x20, 0x14, 0xf7, 0xfe, 0xfd, 0x22, 
-       0xe7, 0xf6, 0x88, 0x79, 0x88, 0x38, 0x1d, 0x3a, 
-       0xf0, 0x02, 0xf8, 0xaa, 0x49, 0x01, 0x68, 0x09, 
-       0x80, 0x08, 0xe7, 0xed, 0x2e, 0x08, 0x03, 0xc0, 
-       0x48, 0x0d, 0x6f, 0xc0, 0x28, 0x00, 0xd1, 0x0c, 
-       0x49, 0x0c, 0x60, 0x08, 0x48, 0x0c, 0x8e, 0x83, 
-       0x49, 0x0c, 0x22, 0x01, 0x2b, 0x00, 0xd0, 0x05, 
-       0x8d, 0x03, 0x86, 0x8b, 0x8d, 0x43, 0x86, 0xcb, 
-       0x87, 0x82, 0x47, 0x70, 0x8e, 0xc3, 0x2b, 0x00, 
-       0xd0, 0xfb, 0x8d, 0x83, 0x86, 0x8b, 0x8d, 0xc3, 
-       0x86, 0xcb, 0x87, 0x82, 0x47, 0x70, 0x00, 0x00, 
-       0x2c, 0x00, 0x1f, 0x80, 0x2e, 0x08, 0x04, 0x40, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2c, 0x00, 0x00, 0xc0, 
-       0xb5, 0x00, 0xf0, 0x00, 0xfa, 0x71, 0xf7, 0xfd, 
-       0xf8, 0x37, 0xf7, 0xfc, 0xfe, 0xdd, 0xf7, 0xfd, 
-       0xf9, 0x37, 0xf0, 0x03, 0xf8, 0x71, 0xf7, 0xff, 
-       0xff, 0xcf, 0x48, 0x09, 0x8e, 0x80, 0x28, 0x00, 
-       0xd1, 0x0b, 0x48, 0x08, 0x6f, 0xc0, 0x28, 0x00, 
-       0xd1, 0x01, 0xf0, 0x03, 0xfd, 0xe3, 0xf7, 0xff, 
-       0xfd, 0xe7, 0x28, 0x00, 0xd1, 0x01, 0xf7, 0xff, 
-       0xfe, 0xc9, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2c, 0x00, 0x1f, 0x80, 
-       0xb4, 0x80, 0x02, 0x4f, 0x4b, 0x07, 0x40, 0x3b, 
-       0x43, 0x1a, 0x23, 0x19, 0x06, 0x9b, 0x62, 0x9a, 
-       0x0a, 0x49, 0x02, 0x49, 0x08, 0x49, 0x07, 0xc0, 
-       0x43, 0x08, 0x49, 0x03, 0x68, 0x09, 0x60, 0x08, 
-       0xbc, 0x80, 0x47, 0x70, 0x00, 0x03, 0xfe, 0x00, 
-       0x2e, 0x08, 0x5e, 0x38, 0xb4, 0x90, 0x4b, 0x0c, 
-       0x68, 0x1f, 0x68, 0x3f, 0x0f, 0xff, 0x60, 0x07, 
-       0x68, 0x18, 0x68, 0x00, 0x00, 0x40, 0x0a, 0x47, 
-       0x02, 0x7f, 0x20, 0x19, 0x06, 0x80, 0x6a, 0x84, 
-       0x4b, 0x06, 0x40, 0x23, 0x0a, 0x5b, 0x43, 0x3b, 
-       0x60, 0x0b, 0x6a, 0x80, 0x05, 0xc0, 0x0d, 0xc0, 
-       0x60, 0x10, 0xbc, 0x90, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x5e, 0x38, 0x00, 0x03, 0xfe, 0x00, 
-       0xb5, 0x00, 0x49, 0x1d, 0x62, 0xc8, 0x28, 0x00, 
-       0xd0, 0x11, 0x28, 0x01, 0xd0, 0x1b, 0x28, 0x02, 
-       0xd0, 0x25, 0x28, 0x03, 0xd1, 0x09, 0x48, 0x19, 
-       0x68, 0x01, 0x08, 0x49, 0x00, 0x49, 0x60, 0x01, 
-       0x22, 0x01, 0x21, 0x01, 0x20, 0x00, 0xf0, 0x0b, 
-       0xf9, 0x8f, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x13, 
-       0x68, 0x01, 0x08, 0x49, 0x00, 0x49, 0x60, 0x01, 
-       0x48, 0x11, 0x68, 0x01, 0x04, 0x03, 0x43, 0x19, 
-       0x60, 0x01, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x0d, 
-       0x68, 0x01, 0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 
-       0x48, 0x0b, 0x68, 0x01, 0x4b, 0x0b, 0x40, 0x19, 
-       0x60, 0x01, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x07, 
-       0x68, 0x01, 0x08, 0x49, 0x00, 0x49, 0x60, 0x01, 
-       0x22, 0x00, 0x21, 0x00, 0x20, 0x00, 0xf0, 0x0b, 
-       0xf9, 0x6b, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x04, 0xc4, 0x6a, 0x00, 0x00, 0x18, 
-       0x6c, 0x00, 0x00, 0x20, 0xff, 0xdf, 0xff, 0xff, 
-       0xb5, 0x90, 0x48, 0x11, 0x6c, 0xc1, 0x6c, 0x80, 
-       0x1a, 0x0f, 0x48, 0x10, 0xd5, 0x01, 0x69, 0x01, 
-       0x18, 0x7f, 0x69, 0x00, 0x10, 0x80, 0x4c, 0x0e, 
-       0x42, 0xb8, 0xda, 0x0b, 0x68, 0xe0, 0x28, 0x00, 
-       0xd1, 0x08, 0x48, 0x0c, 0x68, 0x01, 0x23, 0x02, 
-       0x43, 0xdb, 0x40, 0x19, 0x60, 0x01, 0x20, 0x02, 
-       0xf0, 0x0a, 0xfd, 0x0c, 0x2f, 0x00, 0xd1, 0x04, 
-       0x20, 0x01, 0x61, 0xe0, 0x6b, 0xa0, 0x30, 0x01, 
-       0x63, 0xa0, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x66, 0x00, 0x00, 0x80, 0x2e, 0x08, 0x04, 0x44, 
-       0x2e, 0x08, 0x04, 0xc4, 0x6c, 0x00, 0x00, 0x20, 
-       0xb5, 0x00, 0x20, 0x03, 0xf0, 0x0a, 0xfc, 0xf6, 
-       0x20, 0x1e, 0xf0, 0x07, 0xfc, 0xf3, 0x23, 0x03, 
-       0x02, 0x5b, 0x22, 0x01, 0x02, 0xd2, 0x21, 0x02, 
-       0x20, 0x1e, 0xf0, 0x07, 0xfa, 0xa1, 0x22, 0x00, 
-       0xb4, 0x04, 0x23, 0x02, 0x22, 0x02, 0x49, 0x07, 
-       0x20, 0x1e, 0xf0, 0x07, 0xf8, 0xd5, 0x23, 0x01, 
-       0x02, 0x9b, 0x00, 0x5a, 0x21, 0x01, 0x20, 0x1e, 
-       0xb0, 0x01, 0xf0, 0x07, 0xfa, 0x91, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 
-       0xb5, 0x00, 0x21, 0x00, 0x20, 0x0e, 0xf0, 0x0d, 
-       0xf8, 0x6b, 0x20, 0x1f, 0xf0, 0x07, 0xfc, 0x04, 
-       0x23, 0x03, 0x02, 0x5b, 0x22, 0x01, 0x02, 0xd2, 
-       0x21, 0x02, 0x20, 0x1f, 0xf0, 0x07, 0xfa, 0x7c, 
-       0x20, 0x00, 0xf0, 0x0a, 0xfb, 0x61, 0x22, 0x00, 
-       0xb4, 0x04, 0x23, 0x01, 0x22, 0x02, 0x49, 0x07, 
-       0x20, 0x1f, 0xf0, 0x07, 0xf8, 0xad, 0x23, 0x01, 
-       0x02, 0x9b, 0x00, 0x5a, 0x21, 0x01, 0x20, 0x1f, 
-       0xb0, 0x01, 0xf0, 0x07, 0xfa, 0x69, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 
-       0xb5, 0x80, 0x20, 0x0f, 0x02, 0x40, 0x4f, 0x0a, 
-       0x61, 0x38, 0x49, 0x0a, 0x6c, 0x89, 0x61, 0x79, 
-       0xf0, 0x01, 0xfe, 0x3c, 0x1d, 0xf9, 0x31, 0x79, 
-       0x61, 0x08, 0x28, 0x00, 0xd0, 0x05, 0x20, 0x00, 
-       0x61, 0xf8, 0x62, 0x38, 0x64, 0xf8, 0x20, 0xff, 
-       0x72, 0x08, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x04, 0x44, 0x66, 0x00, 0x00, 0x80, 
-       0xb5, 0x80, 0x4f, 0x05, 0x69, 0x38, 0x28, 0x00, 
-       0xd0, 0x03, 0xf0, 0x01, 0xfe, 0x45, 0x20, 0x00, 
-       0x61, 0x38, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x04, 0xc4, 0xb5, 0x00, 0x4a, 0x0d, 
-       0xb4, 0x04, 0x1f, 0x10, 0x1e, 0x51, 0x1c, 0x13, 
-       0xf7, 0xfc, 0xfb, 0x2a, 0x21, 0x33, 0x06, 0x49, 
-       0x6d, 0x88, 0x6d, 0x4a, 0x1a, 0x82, 0xb0, 0x01, 
-       0x48, 0x07, 0x62, 0x42, 0x6d, 0x49, 0x62, 0xc1, 
-       0x21, 0x00, 0x65, 0x81, 0x21, 0x01, 0x02, 0xc9, 
-       0x64, 0x41, 0x21, 0x01, 0x30, 0x60, 0x76, 0x01, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x04, 0x44, 0xb5, 0x00, 0x4a, 0x10, 
-       0xb4, 0x04, 0x1c, 0x13, 0x3a, 0x01, 0x49, 0x0f, 
-       0x1e, 0xc8, 0xf7, 0xfc, 0xfb, 0x09, 0x21, 0x33, 
-       0x06, 0x49, 0x6d, 0x88, 0x6d, 0x4a, 0x1a, 0x82, 
-       0xb0, 0x01, 0x48, 0x0b, 0x62, 0x42, 0x6d, 0x49, 
-       0x62, 0xc1, 0x21, 0x00, 0x65, 0x81, 0x21, 0x01, 
-       0x02, 0xc9, 0x64, 0x41, 0x21, 0x01, 0x30, 0x60, 
-       0x76, 0x01, 0x48, 0x06, 0x23, 0x02, 0x68, 0x01, 
-       0x43, 0x19, 0x60, 0x01, 0xbc, 0x08, 0x47, 0x18, 
-       0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0xfe, 
-       0x2e, 0x08, 0x04, 0x44, 0x2e, 0x08, 0x00, 0x04, 
-       0x48, 0x03, 0x23, 0x02, 0x43, 0xdb, 0x68, 0x01, 
-       0x40, 0x19, 0x60, 0x01, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x00, 0x04, 0xb5, 0xf0, 0x20, 0x0f, 
-       0x02, 0x40, 0x4c, 0x11, 0x61, 0x20, 0x20, 0x00, 
-       0xf7, 0xfc, 0xfc, 0x1c, 0x48, 0x0f, 0xf7, 0xfc, 
-       0xfc, 0x19, 0x26, 0x00, 0x1d, 0xe0, 0x30, 0x59, 
-       0x77, 0x06, 0x25, 0xff, 0x1d, 0xe7, 0x37, 0x79, 
-       0x70, 0x3d, 0x20, 0x01, 0x63, 0x78, 0x60, 0xe6, 
-       0x69, 0x78, 0x28, 0x00, 0xd1, 0x04, 0x20, 0x41, 
-       0x01, 0x40, 0xf0, 0x01, 0xfd, 0xab, 0x61, 0x78, 
-       0x69, 0x78, 0x28, 0x00, 0xd0, 0x01, 0x76, 0x3e, 
-       0x70, 0x3d, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x04, 0x44, 0x00, 0x00, 0x1f, 0xff, 
-       0xb5, 0x00, 0x20, 0x00, 0xf7, 0xfd, 0xff, 0xbc, 
-       0x22, 0x00, 0xb4, 0x04, 0x23, 0x00, 0x4a, 0x06, 
-       0x21, 0x00, 0x20, 0x00, 0xf7, 0xfc, 0xfa, 0xa8, 
-       0x21, 0x00, 0x20, 0x0d, 0xb0, 0x01, 0xf0, 0x0c, 
-       0xff, 0x8f, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x00, 0x00, 0xff, 0xff, 0xb5, 0x80, 0x22, 0x00, 
-       0xb4, 0x04, 0x27, 0x00, 0x1c, 0x3b, 0x4a, 0x17, 
-       0x21, 0x00, 0x20, 0x00, 0xf7, 0xfc, 0xfa, 0x94, 
-       0x22, 0x00, 0xb0, 0x01, 0xb4, 0x04, 0x1c, 0x3b, 
-       0x4a, 0x12, 0x49, 0x13, 0x20, 0x00, 0xf7, 0xfc, 
-       0xfa, 0x8b, 0x21, 0x33, 0x06, 0x49, 0x6d, 0x88, 
-       0x6d, 0x4a, 0x1a, 0x82, 0xb0, 0x01, 0x48, 0x0f, 
-       0x62, 0x42, 0x6d, 0x49, 0x63, 0x01, 0x21, 0x01, 
-       0x02, 0xc9, 0x64, 0x81, 0x21, 0x01, 0x65, 0x87, 
-       0x30, 0x60, 0x76, 0x01, 0x77, 0x07, 0x22, 0x00, 
-       0x21, 0x00, 0x20, 0x00, 0xf7, 0xff, 0xfe, 0x28, 
-       0x20, 0x00, 0xf7, 0xff, 0xfe, 0x59, 0x21, 0x00, 
-       0x20, 0x0d, 0xf0, 0x0c, 0xff, 0x59, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xff, 0xff, 
-       0x00, 0x00, 0x1f, 0xfe, 0x2e, 0x08, 0x04, 0x44, 
-       0xb5, 0xf0, 0x06, 0x05, 0x0e, 0x2d, 0x20, 0x0f, 
-       0x02, 0x40, 0x4f, 0x2f, 0x26, 0x33, 0x06, 0x76, 
-       0x61, 0x38, 0x6d, 0xb0, 0x6d, 0x71, 0x1a, 0x40, 
-       0x62, 0x78, 0x62, 0xb8, 0x20, 0x00, 0x1d, 0xfc, 
-       0x34, 0x79, 0x60, 0xe0, 0x2d, 0x00, 0xd0, 0x02, 
-       0x20, 0xff, 0xf7, 0xfd, 0xff, 0x59, 0x22, 0x00, 
-       0xb4, 0x04, 0x23, 0x00, 0x21, 0x00, 0x20, 0x00, 
-       0xf7, 0xfc, 0xfa, 0x46, 0x22, 0x01, 0x21, 0x01, 
-       0x20, 0x00, 0xb0, 0x01, 0xf0, 0x0a, 0xff, 0xcc, 
-       0x21, 0x00, 0x20, 0x00, 0xf0, 0x0b, 0xf8, 0x8c, 
-       0x22, 0x00, 0xb4, 0x04, 0x23, 0x00, 0x4a, 0x1d, 
-       0x20, 0x00, 0x1e, 0x51, 0xf7, 0xfc, 0xfa, 0x34, 
-       0x20, 0x01, 0x63, 0x60, 0x69, 0x60, 0xb0, 0x01, 
-       0x28, 0x00, 0xd1, 0x04, 0x20, 0x41, 0x01, 0x40, 
-       0xf0, 0x01, 0xfd, 0x14, 0x61, 0x60, 0x69, 0x60, 
-       0x28, 0x00, 0xd0, 0x03, 0x20, 0x00, 0x76, 0x20, 
-       0x20, 0xff, 0x70, 0x20, 0x6d, 0x70, 0x63, 0x38, 
-       0x20, 0x01, 0x02, 0xc0, 0x64, 0xb8, 0x20, 0x00, 
-       0x26, 0x01, 0x65, 0xb8, 0x1d, 0xf9, 0x31, 0x59, 
-       0x76, 0x0e, 0x22, 0x00, 0x21, 0x00, 0x20, 0x00, 
-       0xf7, 0xff, 0xfd, 0xc6, 0x21, 0x00, 0x20, 0x0d, 
-       0xf0, 0x0c, 0xfe, 0xfa, 0x20, 0x00, 0x60, 0xf8, 
-       0x2d, 0x00, 0xd1, 0x02, 0xf7, 0xff, 0xfd, 0xf0, 
-       0x61, 0xe6, 0x20, 0x00, 0x60, 0xb8, 0x66, 0x38, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x04, 0x44, 0x00, 0x00, 0x1f, 0xff, 
-       0xb5, 0xb0, 0x4f, 0x45, 0x25, 0x00, 0x6d, 0x38, 
-       0x4c, 0x44, 0x28, 0x05, 0xd2, 0x14, 0xa3, 0x02, 
-       0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x10, 0x03, 0x2e, 0x65, 0x73, 0x00, 0x4d, 0x40, 
-       0x68, 0x28, 0x08, 0x41, 0xd2, 0x08, 0x08, 0xc0, 
-       0xd3, 0x09, 0xf7, 0xff, 0xfe, 0xb3, 0x23, 0x04, 
-       0x43, 0xdb, 0x68, 0x28, 0x40, 0x18, 0x60, 0x28, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x6d, 0x78, 
-       0x28, 0x00, 0xd0, 0xf9, 0x28, 0x01, 0xd0, 0x01, 
-       0x28, 0x05, 0xd1, 0x06, 0xf0, 0x00, 0xf8, 0x6c, 
-       0x8e, 0xa0, 0x28, 0x00, 0xd1, 0xf0, 0xf0, 0x00, 
-       0xf9, 0x29, 0x6d, 0x78, 0x28, 0x04, 0xd0, 0x01, 
-       0x28, 0x05, 0xd1, 0xe9, 0x8e, 0xa0, 0x28, 0x00, 
-       0xd1, 0xe6, 0xf0, 0x00, 0xfa, 0x4b, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x8e, 0xe0, 0x28, 0x00, 
-       0xd1, 0xde, 0x8d, 0xa0, 0x06, 0x00, 0x0e, 0x00, 
-       0x28, 0x06, 0xd1, 0x15, 0x48, 0x27, 0x78, 0x00, 
-       0x28, 0x00, 0xd0, 0x06, 0x6d, 0x78, 0x28, 0x01, 
-       0xd0, 0x01, 0x28, 0x05, 0xd1, 0x01, 0xf0, 0x00, 
-       0xfc, 0xcd, 0x6d, 0x78, 0x28, 0x04, 0xd0, 0x01, 
-       0x28, 0x05, 0xd1, 0x01, 0xf0, 0x00, 0xfc, 0x2e, 
-       0x85, 0xa5, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x8d, 0xa0, 0x28, 0x00, 0xd1, 0xc0, 0x6d, 0x78, 
-       0x28, 0x01, 0xd0, 0x08, 0x28, 0x04, 0xd0, 0x0b, 
-       0x28, 0x05, 0xd1, 0xb9, 0xf0, 0x00, 0xfd, 0xe4, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0xf0, 0x00, 
-       0xfd, 0xb9, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0xf0, 0x00, 0xfd, 0x88, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x8e, 0xe0, 0x28, 0x00, 0xd1, 0xa7, 
-       0x20, 0x06, 0x85, 0xa0, 0x85, 0xe5, 0x20, 0x09, 
-       0x02, 0x40, 0x86, 0xe0, 0x20, 0x04, 0x65, 0x38, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x8e, 0xe0, 
-       0x28, 0x00, 0xd1, 0x99, 0x8d, 0xa0, 0x06, 0x00, 
-       0x0e, 0x00, 0x28, 0x06, 0xd1, 0x94, 0x85, 0xa5, 
-       0x65, 0x3d, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x04, 0x44, 0x2c, 0x00, 0x1f, 0xc0, 
-       0x2e, 0x08, 0x00, 0x04, 0x2e, 0x08, 0x04, 0xc4, 
-       0xb5, 0xb0, 0x48, 0x46, 0x6c, 0xc1, 0x4c, 0x46, 
-       0x64, 0x21, 0x69, 0x60, 0x1a, 0x09, 0x1d, 0xe7, 
-       0x37, 0x79, 0x63, 0xf9, 0x29, 0x00, 0xda, 0x02, 
-       0x69, 0x22, 0x18, 0x89, 0x63, 0xf9, 0x23, 0xff, 
-       0x6b, 0xf9, 0x33, 0x01, 0x42, 0x99, 0xdb, 0x73, 
-       0x22, 0x01, 0x03, 0x12, 0x42, 0x91, 0xdd, 0x00, 
-       0x63, 0xfa, 0x6b, 0xf9, 0x08, 0x89, 0x00, 0x89, 
-       0x63, 0xf9, 0x7a, 0x3a, 0x2a, 0x00, 0xd0, 0x05, 
-       0x23, 0xff, 0x03, 0x5b, 0x1a, 0xc2, 0x61, 0xe2, 
-       0x22, 0x00, 0x72, 0x3a, 0x18, 0x42, 0x49, 0x35, 
-       0x25, 0x12, 0x42, 0x8a, 0xdd, 0x2c, 0x1a, 0x08, 
-       0x64, 0x38, 0xf0, 0x18, 0xfb, 0x5f, 0x4b, 0x32, 
-       0x40, 0x18, 0xf0, 0x18, 0xfb, 0x5f, 0x22, 0x00, 
-       0x49, 0x30, 0xb4, 0x06, 0x69, 0x60, 0x69, 0x39, 
-       0x18, 0x41, 0x23, 0xff, 0x03, 0x5b, 0x1a, 0xc9, 
-       0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc0, 0x6c, 0x3a, 
-       0x1c, 0x2b, 0xf0, 0x0f, 0xf8, 0x67, 0x22, 0x00, 
-       0xb0, 0x02, 0x49, 0x28, 0xb4, 0x06, 0x6b, 0xf8, 
-       0x6c, 0x39, 0x1a, 0x42, 0x69, 0x39, 0x1c, 0x2b, 
-       0x48, 0x25, 0xf0, 0x0f, 0xf8, 0x5b, 0xb0, 0x02, 
-       0xf0, 0x18, 0xfb, 0x3c, 0x23, 0x01, 0x04, 0x9b, 
-       0x43, 0x18, 0xf0, 0x18, 0xfb, 0x3b, 0xe0, 0x1d, 
-       0xf0, 0x18, 0xfb, 0x34, 0x4b, 0x1c, 0x40, 0x18, 
-       0xf0, 0x18, 0xfb, 0x34, 0x22, 0x00, 0x49, 0x1b, 
-       0xb4, 0x06, 0x69, 0x60, 0x69, 0x39, 0x18, 0x41, 
-       0x23, 0xff, 0x03, 0x5b, 0x1a, 0xc9, 0x23, 0x0d, 
-       0x06, 0x9b, 0x1a, 0xc0, 0x6b, 0xfa, 0x1c, 0x2b, 
-       0xf0, 0x0f, 0xf8, 0x3c, 0xb0, 0x02, 0xf0, 0x18, 
-       0xfb, 0x1d, 0x23, 0x01, 0x04, 0x9b, 0x43, 0x18, 
-       0xf0, 0x18, 0xfb, 0x1c, 0x69, 0x60, 0x6b, 0xf9, 
-       0x18, 0x40, 0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc1, 
-       0x61, 0x60, 0x4b, 0x0e, 0x42, 0x99, 0xd3, 0x02, 
-       0x69, 0x21, 0x1a, 0x40, 0x61, 0x60, 0x23, 0xff, 
-       0x03, 0x5b, 0x69, 0x60, 0x1a, 0xc0, 0xe0, 0x00, 
-       0xe0, 0x00, 0x62, 0x20, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x66, 0x00, 0x00, 0x80, 
-       0x2e, 0x08, 0x04, 0x44, 0x00, 0x1f, 0xfe, 0x00, 
-       0xff, 0xfb, 0xff, 0xff, 0x9e, 0x00, 0x08, 0x00, 
-       0xcc, 0x1f, 0xe0, 0x00, 0xcc, 0x1f, 0xfe, 0x00, 
-       0x21, 0x00, 0x23, 0xff, 0x68, 0x02, 0x33, 0xc1, 
-       0x42, 0x9a, 0xd0, 0x01, 0x1c, 0x08, 0x47, 0x70, 
-       0x79, 0xc2, 0x0a, 0x12, 0xd2, 0x01, 0x1c, 0x08, 
-       0x47, 0x70, 0x7a, 0x41, 0x23, 0x0e, 0x40, 0x19, 
-       0x07, 0x49, 0x7a, 0x82, 0x05, 0x92, 0x43, 0x11, 
-       0x7a, 0xc2, 0x23, 0xfe, 0x40, 0x1a, 0x03, 0x92, 
-       0x43, 0x11, 0x7b, 0x02, 0x01, 0xd2, 0x43, 0x11, 
-       0x7b, 0x40, 0x40, 0x18, 0x08, 0x40, 0x43, 0x08, 
-       0x49, 0x01, 0x67, 0x08, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x04, 0x44, 0xb5, 0xf0, 0xb0, 0x86, 
-       0x4c, 0x8c, 0x6c, 0xe0, 0x1d, 0xe7, 0x37, 0x79, 
-       0x1d, 0xfd, 0x35, 0x39, 0x28, 0x00, 0xd0, 0x04, 
-       0x28, 0x01, 0xd0, 0x3a, 0x28, 0x02, 0xd1, 0x73, 
-       0xe0, 0x74, 0x69, 0xe0, 0x6a, 0x21, 0x1a, 0x09, 
-       0x63, 0xf9, 0x1c, 0x0a, 0xd5, 0x02, 0x69, 0x21, 
-       0x18, 0x51, 0x63, 0xf9, 0x6b, 0xf9, 0x29, 0x04, 
-       0xdb, 0x67, 0x69, 0x3e, 0x5c, 0x31, 0x06, 0x0a, 
-       0x65, 0x7a, 0x92, 0x05, 0x1c, 0x41, 0x69, 0x20, 
-       0x90, 0x04, 0xf0, 0x14, 0xfb, 0x29, 0x61, 0xe1, 
-       0x5c, 0x70, 0x04, 0x00, 0x9a, 0x05, 0x18, 0x82, 
-       0x65, 0x7a, 0x92, 0x03, 0x98, 0x04, 0x31, 0x01, 
-       0xf0, 0x14, 0xfb, 0x1e, 0x61, 0xe1, 0x5c, 0x70, 
-       0x02, 0x00, 0x9a, 0x03, 0x18, 0x80, 0x65, 0x78, 
-       0x90, 0x02, 0x98, 0x04, 0x31, 0x01, 0xf0, 0x14, 
-       0xfb, 0x13, 0x61, 0xe1, 0x5c, 0x70, 0x9a, 0x02, 
-       0x18, 0x80, 0x65, 0x78, 0x98, 0x04, 0x31, 0x01, 
-       0xf0, 0x14, 0xfb, 0x0a, 0x20, 0x01, 0x64, 0xe0, 
-       0x61, 0xe1, 0x6a, 0x20, 0x69, 0xe1, 0x1a, 0x40, 
-       0x63, 0xf8, 0x1c, 0x01, 0xd4, 0x05, 0x48, 0x67, 
-       0x69, 0x06, 0x30, 0x80, 0x69, 0x02, 0x92, 0x01, 
-       0xe0, 0x03, 0x69, 0x20, 0x18, 0x08, 0x63, 0xf8, 
-       0xe7, 0xf5, 0x6b, 0xf8, 0x90, 0x00, 0x28, 0x02, 
-       0xdb, 0x22, 0x6d, 0x78, 0x09, 0x01, 0x01, 0x09, 
-       0x23, 0xff, 0x33, 0xc1, 0x42, 0x99, 0xd1, 0x31, 
-       0x9a, 0x01, 0x69, 0xe0, 0x5c, 0x11, 0x02, 0x09, 
-       0x83, 0x29, 0x1c, 0x41, 0x1c, 0x30, 0xf0, 0x14, 
-       0xfa, 0xe3, 0x61, 0xe1, 0x69, 0x38, 0x5c, 0x40, 
-       0x8b, 0x2a, 0x18, 0x80, 0x83, 0x28, 0x8b, 0x28, 
-       0x30, 0x06, 0x83, 0x28, 0x19, 0x88, 0x1f, 0x41, 
-       0x1c, 0x30, 0xf0, 0x14, 0xfa, 0xd5, 0x61, 0xe1, 
-       0x21, 0xff, 0x71, 0x39, 0x20, 0x02, 0x64, 0xe0, 
-       0x6c, 0xe0, 0x28, 0x02, 0xd1, 0x00, 0xe0, 0x01, 
-       0xe0, 0x94, 0xe0, 0x93, 0x6a, 0x20, 0x69, 0xe1, 
-       0x1a, 0x40, 0x63, 0xf8, 0x1c, 0x01, 0xd5, 0x02, 
-       0x69, 0x20, 0x18, 0x08, 0x63, 0xf8, 0x79, 0x38, 
-       0x28, 0x00, 0xd0, 0x13, 0x20, 0x01, 0x02, 0xc0, 
-       0x83, 0xa8, 0xe0, 0x11, 0x02, 0x01, 0x65, 0x79, 
-       0x9a, 0x01, 0x69, 0xe0, 0x5c, 0x12, 0x18, 0x51, 
-       0x65, 0x79, 0x1c, 0x41, 0x1c, 0x30, 0xf0, 0x14, 
-       0xfa, 0xaf, 0x61, 0xe1, 0x98, 0x00, 0x38, 0x01, 
-       0x63, 0xf8, 0xe7, 0xb2, 0x48, 0x3c, 0x83, 0xa8, 
-       0x8b, 0x28, 0x6b, 0xf9, 0x42, 0x88, 0xda, 0x01, 
-       0x63, 0xf8, 0xe0, 0x02, 0x8b, 0xa8, 0x42, 0x81, 
-       0xdb, 0x68, 0x8b, 0xa8, 0x6b, 0xf9, 0x42, 0x81, 
-       0xdd, 0x00, 0x63, 0xf8, 0x48, 0x35, 0x21, 0x00, 
-       0x66, 0x78, 0x80, 0x01, 0x30, 0x02, 0x21, 0xff, 
-       0x31, 0xc1, 0x66, 0x78, 0x80, 0x01, 0x48, 0x32, 
-       0x66, 0x78, 0x79, 0x39, 0x29, 0x00, 0xd0, 0x21, 
-       0x21, 0x00, 0x71, 0x39, 0x69, 0x3b, 0x69, 0x20, 
-       0x18, 0x1a, 0xb4, 0x04, 0x69, 0xe0, 0x18, 0x18, 
-       0x6b, 0xfa, 0x49, 0x2a, 0xf0, 0x00, 0xfe, 0xf4, 
-       0x6b, 0xf8, 0x38, 0x06, 0x6e, 0x79, 0x80, 0x08, 
-       0x31, 0x02, 0x66, 0x79, 0xb0, 0x01, 0x48, 0x25, 
-       0xf7, 0xff, 0xff, 0x02, 0x8b, 0x28, 0x6b, 0xf9, 
-       0x1a, 0x40, 0x83, 0x28, 0x69, 0xe0, 0x6b, 0xf9, 
-       0x18, 0x41, 0x69, 0x20, 0xf0, 0x14, 0xfa, 0x6c, 
-       0x61, 0xe1, 0xe0, 0x26, 0x6b, 0xf9, 0x31, 0x03, 
-       0x80, 0x01, 0x48, 0x1e, 0x21, 0x01, 0x03, 0xc9, 
-       0x66, 0x78, 0x80, 0x01, 0x30, 0x02, 0x21, 0xff, 
-       0x66, 0x78, 0x80, 0x01, 0x48, 0x1a, 0x66, 0x78, 
-       0x69, 0x3b, 0x69, 0x20, 0x18, 0x1a, 0xb4, 0x04, 
-       0x69, 0xe0, 0x18, 0x18, 0x6b, 0xfa, 0x49, 0x17, 
-       0xf0, 0x00, 0xfe, 0xc6, 0x8b, 0x28, 0x6b, 0xf9, 
-       0x1a, 0x40, 0x83, 0x28, 0x69, 0xe0, 0x6b, 0xfe, 
-       0x19, 0x81, 0x69, 0x20, 0xb0, 0x01, 0xf0, 0x14, 
-       0xfa, 0x47, 0x1d, 0xf0, 0x30, 0x02, 0x61, 0xe1, 
-       0x63, 0xf8, 0x8b, 0x28, 0x28, 0x00, 0xd1, 0x01, 
-       0x21, 0x00, 0x64, 0xe0, 0x21, 0x10, 0x48, 0x0c, 
-       0x85, 0x01, 0x6b, 0xf9, 0x85, 0x41, 0x21, 0x01, 
-       0x02, 0x49, 0x86, 0x81, 0xb0, 0x06, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x04, 0x44, 
-       0x00, 0x00, 0x07, 0xf7, 0x2c, 0x00, 0x02, 0x00, 
-       0x2c, 0x00, 0x02, 0x04, 0x2c, 0x00, 0x02, 0x06, 
-       0x2c, 0x00, 0x02, 0x0a, 0x2c, 0x00, 0x02, 0x09, 
-       0x2c, 0x00, 0x1f, 0xc0, 0xb5, 0xf0, 0x20, 0x33, 
-       0x06, 0x40, 0x6e, 0x40, 0xb0, 0x81, 0x4f, 0x77, 
-       0x63, 0xb8, 0x6a, 0xf9, 0x1a, 0x40, 0x1d, 0xfc, 
-       0x34, 0x79, 0x63, 0xe0, 0x28, 0x00, 0xda, 0x02, 
-       0x6a, 0x79, 0x18, 0x40, 0x63, 0xe0, 0x6b, 0xe0, 
-       0x4b, 0x71, 0x42, 0x98, 0xdc, 0x03, 0xb0, 0x01, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x6d, 0xb9, 
-       0x48, 0x6e, 0x1d, 0xc5, 0x35, 0x59, 0x29, 0x00, 
-       0xd1, 0x16, 0x7e, 0x01, 0x29, 0x00, 0xd1, 0x13, 
-       0x21, 0x01, 0x75, 0x01, 0x21, 0x05, 0x84, 0x29, 
-       0x23, 0x0d, 0x06, 0x9b, 0x6c, 0x79, 0x1a, 0xca, 
-       0x68, 0x52, 0x31, 0x08, 0x23, 0x05, 0x02, 0x5b, 
-       0x64, 0x79, 0x66, 0xba, 0x42, 0x99, 0xdb, 0x06, 
-       0x21, 0x01, 0x02, 0xc9, 0x64, 0x79, 0xe0, 0x02, 
-       0x21, 0x00, 0x75, 0x01, 0x84, 0x29, 0x8c, 0x29, 
-       0x1c, 0x4a, 0x6a, 0xfb, 0x1a, 0x9a, 0x07, 0x92, 
-       0x0f, 0x92, 0x18, 0x51, 0x84, 0x29, 0x7e, 0x01, 
-       0x29, 0x00, 0xd0, 0x03, 0x21, 0x00, 0x66, 0x39, 
-       0x66, 0x79, 0x76, 0x01, 0x6c, 0x79, 0x4a, 0x58, 
-       0x69, 0x52, 0x42, 0x91, 0xd0, 0x26, 0x6e, 0x7a, 
-       0x2a, 0x00, 0xd1, 0x10, 0x23, 0x0d, 0x06, 0x9b, 
-       0x1a, 0xc9, 0x68, 0x09, 0x66, 0x79, 0x1c, 0x0a, 
-       0x6e, 0x3b, 0x18, 0x59, 0x66, 0x39, 0x4b, 0x51, 
-       0x42, 0x99, 0xdb, 0x04, 0x32, 0x01, 0x31, 0x01, 
-       0x40, 0x19, 0x66, 0x39, 0x66, 0x7a, 0x6e, 0x79, 
-       0x6d, 0xba, 0x1a, 0x89, 0x65, 0x21, 0x91, 0x00, 
-       0x8c, 0x2b, 0x4e, 0x4b, 0x1a, 0xf3, 0x42, 0x8b, 
-       0xd3, 0x04, 0x63, 0xe1, 0x21, 0x00, 0x65, 0xb9, 
-       0x66, 0x79, 0xe0, 0x0a, 0x18, 0xd1, 0x63, 0xe3, 
-       0x65, 0xb9, 0xe0, 0x06, 0x8c, 0x29, 0x4a, 0x44, 
-       0x1a, 0x51, 0x63, 0xe1, 0x6d, 0xba, 0x18, 0x51, 
-       0x65, 0xb9, 0x49, 0x42, 0x66, 0x61, 0x8c, 0x2a, 
-       0x6b, 0xe1, 0x18, 0x89, 0x31, 0x03, 0x83, 0xa9, 
-       0x22, 0x00, 0x6e, 0x61, 0x80, 0x0a, 0x31, 0x02, 
-       0x22, 0xff, 0x32, 0xe1, 0x66, 0x61, 0x80, 0x0a, 
-       0x31, 0x02, 0x66, 0x61, 0x8b, 0xaa, 0x80, 0x0a, 
-       0x31, 0x02, 0x66, 0x61, 0x7d, 0x00, 0x28, 0x00, 
-       0xd0, 0x1d, 0x4a, 0x37, 0x80, 0x0a, 0x1c, 0x88, 
-       0x66, 0x60, 0x8c, 0x29, 0x02, 0x09, 0x6e, 0xba, 
-       0x0f, 0x52, 0x23, 0x06, 0x40, 0x1a, 0x43, 0x11, 
-       0x23, 0x21, 0x43, 0x19, 0x80, 0x01, 0x30, 0x02, 
-       0x66, 0x60, 0x6e, 0xb9, 0x0b, 0x89, 0x23, 0x01, 
-       0x43, 0x19, 0x80, 0x01, 0x30, 0x02, 0x66, 0x60, 
-       0x6e, 0xb9, 0x00, 0x49, 0x43, 0x19, 0x80, 0x01, 
-       0x30, 0x02, 0x66, 0x60, 0xe0, 0x0b, 0x20, 0x01, 
-       0x03, 0xc0, 0x80, 0x08, 0x31, 0x02, 0x66, 0x61, 
-       0x8c, 0x28, 0x02, 0x00, 0x23, 0xff, 0x43, 0x18, 
-       0x80, 0x08, 0x31, 0x02, 0x66, 0x61, 0x48, 0x23, 
-       0x6e, 0x61, 0x80, 0x08, 0x31, 0x02, 0x66, 0x61, 
-       0x80, 0x08, 0x31, 0x02, 0x22, 0x33, 0x06, 0x52, 
-       0x66, 0x61, 0x00, 0x53, 0x6d, 0x90, 0x18, 0xc2, 
-       0xb4, 0x04, 0x08, 0x5a, 0x6d, 0x50, 0x18, 0xc6, 
-       0x8c, 0x28, 0x4b, 0x1b, 0x18, 0xc1, 0x00, 0x53, 
-       0x6a, 0xf8, 0x18, 0xc0, 0x6b, 0xe2, 0x1c, 0x33, 
-       0xf0, 0x00, 0xfd, 0xbe, 0x6a, 0xf8, 0x6b, 0xe1, 
-       0x18, 0x40, 0x22, 0x33, 0x06, 0x52, 0x62, 0xf8, 
-       0x6d, 0x92, 0xb0, 0x01, 0x42, 0x90, 0xdb, 0x02, 
-       0x6a, 0x79, 0x1a, 0x40, 0x62, 0xf8, 0x21, 0xff, 
-       0x31, 0x11, 0x48, 0x10, 0x85, 0x01, 0x8b, 0xa9, 
-       0x31, 0x06, 0x85, 0x41, 0x21, 0x01, 0x02, 0x49, 
-       0x86, 0x81, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x04, 0x44, 
-       0x00, 0x00, 0x0f, 0xee, 0x2e, 0x08, 0x04, 0xa4, 
-       0xcc, 0x00, 0x0f, 0x00, 0x00, 0xff, 0xff, 0xff, 
-       0x00, 0x00, 0x07, 0xf7, 0x2c, 0x00, 0x02, 0x00, 
-       0x00, 0x00, 0x80, 0x80, 0x00, 0x00, 0xff, 0xff, 
-       0x2c, 0x00, 0x02, 0x09, 0x2c, 0x00, 0x1f, 0xc0, 
-       0xb5, 0xb0, 0x1c, 0x07, 0xb0, 0x83, 0x4d, 0x20, 
-       0x6b, 0x28, 0xf7, 0xff, 0xfa, 0x51, 0x48, 0x1f, 
-       0x6c, 0xc1, 0x6c, 0x80, 0x1a, 0x08, 0xd5, 0x03, 
-       0x1f, 0xe9, 0x39, 0x79, 0x69, 0x09, 0x18, 0x40, 
-       0x6e, 0xa9, 0x29, 0x00, 0xd0, 0x22, 0x29, 0x10, 
-       0xd0, 0x20, 0x29, 0x20, 0xd0, 0x24, 0x29, 0x30, 
-       0xd1, 0x04, 0x24, 0x2d, 0x43, 0x44, 0xd5, 0x00, 
-       0x34, 0x3f, 0x11, 0xa4, 0x46, 0x6a, 0xa8, 0x01, 
-       0xa9, 0x02, 0xf7, 0xff, 0xfa, 0x17, 0x1b, 0x38, 
-       0x99, 0x02, 0x1a, 0x08, 0x22, 0x7d, 0x01, 0x52, 
-       0x42, 0x90, 0xdc, 0x01, 0x42, 0x90, 0xda, 0x05, 
-       0x1a, 0x09, 0x91, 0x02, 0x22, 0x00, 0x20, 0x00, 
-       0xf7, 0xff, 0xf9, 0xf2, 0xb0, 0x03, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x01, 0x04, 0x1a, 0x24, 
-       0xd5, 0x00, 0x34, 0x1f, 0x11, 0x64, 0xe7, 0xe1, 
-       0x21, 0x4b, 0x43, 0x41, 0x20, 0x93, 0xf0, 0x14, 
-       0xf8, 0xd7, 0x1c, 0x04, 0xe7, 0xda, 0x00, 0x00, 
-       0x2e, 0x08, 0x04, 0xc4, 0x66, 0x00, 0x00, 0x80, 
-       0xb5, 0x90, 0x1c, 0x07, 0xb0, 0x83, 0x4c, 0x18, 
-       0x6f, 0x60, 0x30, 0x01, 0x46, 0x6a, 0x67, 0x60, 
-       0xa8, 0x01, 0xa9, 0x02, 0xf7, 0xff, 0xf9, 0xe6, 
-       0x4b, 0x14, 0x18, 0xf9, 0x98, 0x02, 0x1a, 0x40, 
-       0x4b, 0x13, 0x42, 0x98, 0xdc, 0x04, 0x42, 0xd8, 
-       0xdb, 0x02, 0x69, 0xe0, 0x28, 0x01, 0xd1, 0x07, 
-       0x91, 0x02, 0x20, 0x00, 0x90, 0x01, 0x22, 0x00, 
-       0xf7, 0xff, 0xf9, 0xbe, 0x20, 0x01, 0x61, 0xe0, 
-       0x69, 0xe0, 0x28, 0x00, 0xd0, 0x0b, 0x6b, 0x20, 
-       0xf7, 0xff, 0xf9, 0xea, 0x6f, 0x60, 0x67, 0xa0, 
-       0x48, 0x08, 0x60, 0x07, 0x6f, 0xe0, 0x30, 0x01, 
-       0x67, 0xe0, 0x20, 0x00, 0x61, 0xe0, 0xb0, 0x03, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x04, 0xc4, 0xff, 0xff, 0xec, 0x78, 
-       0x00, 0x02, 0xbf, 0x20, 0x2e, 0x08, 0x05, 0x44, 
-       0xb4, 0xf0, 0x1c, 0x1c, 0x23, 0x00, 0x9f, 0x04, 
-       0x60, 0x3b, 0x79, 0x85, 0x23, 0xc0, 0x40, 0x1d, 
-       0x4b, 0x33, 0x2d, 0x80, 0xd1, 0x16, 0x25, 0x02, 
-       0x60, 0x9d, 0x79, 0xc5, 0x0a, 0x2b, 0xd3, 0x06, 
-       0x7a, 0x45, 0x23, 0xe0, 0x40, 0x2b, 0x2b, 0x20, 
-       0xd1, 0x01, 0x23, 0x09, 0x60, 0x3b, 0x7a, 0x03, 
-       0x33, 0x09, 0x60, 0x13, 0x79, 0x02, 0x02, 0x12, 
-       0x79, 0x45, 0x43, 0x2a, 0x32, 0x06, 0x1a, 0xd2, 
-       0x60, 0x22, 0xe0, 0x25, 0x25, 0x06, 0x26, 0x01, 
-       0x60, 0x9e, 0x79, 0x83, 0x2b, 0xff, 0xd1, 0x03, 
-       0x35, 0x01, 0x5d, 0x43, 0x2b, 0xff, 0xd0, 0xfb, 
-       0x5d, 0x46, 0x23, 0xc0, 0x40, 0x33, 0x2b, 0x40, 
-       0xd1, 0x00, 0x35, 0x02, 0x5d, 0x46, 0x09, 0x33, 
-       0x07, 0x9b, 0xd0, 0x08, 0x60, 0x3d, 0x5d, 0x46, 
-       0x09, 0x73, 0xd3, 0x02, 0x1d, 0xeb, 0x33, 0x03, 
-       0xe0, 0x02, 0x1d, 0x6b, 0xe0, 0x00, 0x1c, 0x6b, 
-       0x60, 0x13, 0x79, 0x02, 0x02, 0x12, 0x79, 0x45, 
-       0x43, 0x2a, 0x32, 0x06, 0x1a, 0xd2, 0x60, 0x22, 
-       0x68, 0x3a, 0x2a, 0x00, 0xd0, 0x20, 0x5c, 0x82, 
-       0x23, 0x0e, 0x40, 0x1a, 0x07, 0x52, 0x60, 0x0a, 
-       0x68, 0x3b, 0x18, 0xc3, 0x78, 0x5b, 0x05, 0x9b, 
-       0x43, 0x1a, 0x60, 0x0a, 0x68, 0x3b, 0x18, 0xc3, 
-       0x78, 0x9c, 0x23, 0xfe, 0x40, 0x23, 0x03, 0x9b, 
-       0x43, 0x1a, 0x60, 0x0a, 0x68, 0x3b, 0x18, 0xc3, 
-       0x78, 0xdb, 0x01, 0xdb, 0x43, 0x1a, 0x60, 0x0a, 
-       0x68, 0x3b, 0x18, 0xc0, 0x79, 0x00, 0x23, 0xfe, 
-       0x40, 0x18, 0x08, 0x40, 0x43, 0x10, 0x60, 0x08, 
-       0x20, 0x00, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x04, 0x44, 0xb5, 0xb0, 0xb0, 0x83, 
-       0x48, 0x43, 0x49, 0x44, 0x8d, 0xc9, 0x4c, 0x44, 
-       0x63, 0xe1, 0x29, 0x06, 0xda, 0x03, 0xb0, 0x03, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x68, 0x01, 
-       0x09, 0x09, 0x01, 0x09, 0x23, 0xff, 0x33, 0xe1, 
-       0x42, 0x99, 0xd0, 0x03, 0xb0, 0x03, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x46, 0x6a, 0xb4, 0x04, 
-       0xaa, 0x03, 0xab, 0x02, 0x49, 0x39, 0xf7, 0xff, 
-       0xff, 0x6f, 0xb0, 0x01, 0x28, 0x00, 0xd0, 0x03, 
-       0xb0, 0x03, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x98, 0x02, 0x99, 0x01, 0x18, 0x40, 0x6b, 0xe1, 
-       0x42, 0x88, 0xd0, 0x03, 0xb0, 0x03, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x98, 0x00, 0x4f, 0x30, 
-       0x28, 0x00, 0xd0, 0x2e, 0x6e, 0x38, 0x6d, 0xb9, 
-       0x18, 0x40, 0x23, 0x01, 0x06, 0x1b, 0x66, 0x38, 
-       0x42, 0x98, 0xdb, 0x04, 0x43, 0xdb, 0x18, 0xc0, 
-       0x66, 0x38, 0x1e, 0x48, 0x65, 0xb8, 0x23, 0x0d, 
-       0x06, 0x9b, 0x6d, 0xb8, 0x6c, 0xb9, 0x1a, 0xc9, 
-       0x60, 0x08, 0x6e, 0xe0, 0x6c, 0xb9, 0x1a, 0xc9, 
-       0x60, 0x48, 0x20, 0x00, 0x65, 0xb8, 0x6c, 0xb8, 
-       0x30, 0x08, 0x23, 0x05, 0x02, 0x5b, 0x64, 0xb8, 
-       0x42, 0x98, 0xd1, 0x02, 0x20, 0x01, 0x02, 0xc0, 
-       0x64, 0xb8, 0x6c, 0xb8, 0x49, 0x1d, 0x61, 0x48, 
-       0x6d, 0x78, 0x28, 0x04, 0xd1, 0x05, 0x68, 0xe0, 
-       0x28, 0x00, 0xd1, 0x02, 0x6e, 0xe0, 0xf7, 0xff, 
-       0xfe, 0xef, 0x24, 0x33, 0x06, 0x64, 0x00, 0x63, 
-       0x6d, 0xa0, 0x18, 0xc2, 0xb4, 0x04, 0x6d, 0x60, 
-       0x18, 0xc5, 0x6e, 0x60, 0x18, 0xc1, 0x98, 0x03, 
-       0x4b, 0x0d, 0x18, 0xc0, 0x9a, 0x02, 0x1c, 0x2b, 
-       0xf0, 0x00, 0xfc, 0x52, 0xb0, 0x01, 0x6d, 0xb8, 
-       0x99, 0x01, 0x18, 0x40, 0x65, 0xb8, 0x48, 0x0e, 
-       0x68, 0x02, 0x18, 0x51, 0x60, 0x01, 0x6e, 0x60, 
-       0x6d, 0xa1, 0x42, 0x88, 0xdb, 0x04, 0x48, 0x0a, 
-       0x68, 0x01, 0x6a, 0x7a, 0x1a, 0x89, 0x60, 0x01, 
-       0xb0, 0x03, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2c, 0x00, 0x12, 0x00, 0x2c, 0x00, 0x1f, 0xc0, 
-       0x2e, 0x08, 0x04, 0xc4, 0x2e, 0x08, 0x05, 0x30, 
-       0x2e, 0x08, 0x04, 0x44, 0xcc, 0x00, 0x0f, 0x00, 
-       0x66, 0x00, 0x00, 0x64, 0xb5, 0xf0, 0xb0, 0x83, 
-       0x4e, 0x65, 0x25, 0x00, 0x4f, 0x65, 0x6a, 0xf8, 
-       0xf7, 0xff, 0xf8, 0xc2, 0x48, 0x64, 0x8d, 0xc0, 
-       0x63, 0xf8, 0x28, 0x0a, 0xda, 0x03, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x68, 0x34, 
-       0x09, 0x60, 0x01, 0x40, 0x23, 0xff, 0x33, 0xc1, 
-       0x42, 0x98, 0xd0, 0x07, 0x23, 0xff, 0x33, 0xbe, 
-       0x42, 0x9c, 0xd0, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x46, 0x6a, 0xb4, 0x04, 
-       0xaa, 0x03, 0xab, 0x02, 0x49, 0x57, 0x1c, 0x30, 
-       0xf7, 0xff, 0xfe, 0xce, 0xb0, 0x01, 0x28, 0x00, 
-       0xd0, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x98, 0x02, 0x99, 0x01, 0x18, 0x41, 
-       0x6b, 0xfa, 0x42, 0x91, 0xd0, 0x03, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x21, 0x01, 
-       0x1c, 0x22, 0x4c, 0x4d, 0x23, 0xff, 0x33, 0xbe, 
-       0x42, 0x9a, 0xd1, 0x3c, 0x5c, 0x30, 0x28, 0xa0, 
-       0xd0, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x68, 0xe0, 0x28, 0x00, 0xd1, 0x1b, 
-       0x20, 0x02, 0x63, 0x78, 0x60, 0xe1, 0x21, 0x00, 
-       0x20, 0x00, 0xf0, 0x09, 0xfd, 0x8d, 0x20, 0x00, 
-       0xf7, 0xfb, 0xfd, 0xd4, 0x98, 0x02, 0x4b, 0x3c, 
-       0x18, 0xc0, 0x79, 0x40, 0x23, 0x30, 0x40, 0x18, 
-       0x66, 0xb8, 0xd0, 0x16, 0x28, 0x10, 0xd0, 0x14, 
-       0x28, 0x20, 0xd0, 0x17, 0x28, 0x30, 0xd1, 0x03, 
-       0x21, 0x20, 0x20, 0x1e, 0xf0, 0x0a, 0xf8, 0xa7, 
-       0x98, 0x00, 0x28, 0x00, 0xd0, 0x2b, 0x6d, 0x60, 
-       0x28, 0x05, 0xd1, 0x28, 0x68, 0xf8, 0x28, 0x00, 
-       0xd1, 0x25, 0x6f, 0x38, 0xf7, 0xff, 0xfe, 0x00, 
-       0xe0, 0x21, 0x21, 0x02, 0x20, 0x1e, 0xf0, 0x0a, 
-       0xf8, 0x96, 0xe7, 0xed, 0x21, 0x08, 0x20, 0x1e, 
-       0xf0, 0x0a, 0xf8, 0x91, 0xe7, 0xe8, 0x68, 0xe0, 
-       0x28, 0x00, 0xd0, 0x08, 0x20, 0x00, 0x63, 0x79, 
-       0x21, 0x00, 0x60, 0xe0, 0xf0, 0x09, 0xfd, 0x58, 
-       0x20, 0x02, 0xf0, 0x09, 0xfd, 0xab, 0x98, 0x00, 
-       0x28, 0x00, 0xd0, 0x08, 0x6d, 0x60, 0x28, 0x05, 
-       0xd1, 0x05, 0x68, 0xf8, 0x28, 0x00, 0xd1, 0x02, 
-       0x6f, 0x38, 0xf7, 0xff, 0xfe, 0x25, 0x68, 0xe0, 
-       0x28, 0x00, 0xd0, 0x01, 0x98, 0x02, 0x1d, 0xc5, 
-       0x6b, 0xf8, 0x1b, 0x42, 0x63, 0xfa, 0x7e, 0x39, 
-       0x69, 0x78, 0x18, 0x41, 0x4b, 0x16, 0x18, 0xe8, 
-       0xf7, 0xfb, 0xfb, 0x3a, 0x7e, 0x38, 0x6b, 0xf9, 
-       0x18, 0x40, 0x07, 0x81, 0x0f, 0x89, 0x76, 0x39, 
-       0x1a, 0x44, 0x20, 0x01, 0x06, 0x00, 0x49, 0x15, 
-       0x60, 0x08, 0xf0, 0x17, 0xfe, 0x57, 0x4b, 0x14, 
-       0x40, 0x18, 0xf0, 0x17, 0xfe, 0x57, 0x22, 0x04, 
-       0x49, 0x10, 0xb4, 0x06, 0x23, 0x12, 0x21, 0x1e, 
-       0x69, 0x78, 0x1c, 0x22, 0xf0, 0x0e, 0xfb, 0x66, 
-       0xb0, 0x02, 0xf0, 0x17, 0xfe, 0x47, 0x23, 0x01, 
-       0x04, 0x9b, 0x43, 0x18, 0xf0, 0x17, 0xfe, 0x46, 
-       0x69, 0x78, 0x59, 0x01, 0x60, 0x01, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2c, 0x00, 0x12, 0x00, 0x2e, 0x08, 0x04, 0xc4, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2e, 0x08, 0x05, 0x34, 
-       0x2e, 0x08, 0x04, 0x44, 0x9e, 0x00, 0x08, 0x00, 
-       0xff, 0xfb, 0xff, 0xff, 0x20, 0x33, 0x06, 0x40, 
-       0x6e, 0x81, 0x6e, 0x40, 0x1a, 0x09, 0x48, 0x0f, 
-       0x63, 0xc1, 0x29, 0x00, 0xdc, 0x04, 0x1f, 0xc2, 
-       0x3a, 0x79, 0x6a, 0x52, 0x18, 0x89, 0x63, 0xc1, 
-       0x6b, 0xc1, 0x08, 0x89, 0x00, 0x89, 0x23, 0x01, 
-       0x02, 0xdb, 0x63, 0xc1, 0x42, 0x99, 0xdd, 0x0b, 
-       0x4a, 0x07, 0x42, 0x91, 0xdd, 0x00, 0x63, 0xc2, 
-       0x4a, 0x06, 0x49, 0x07, 0x85, 0x8a, 0x6b, 0xc0, 
-       0x85, 0xc8, 0x20, 0x09, 0x02, 0x40, 0x86, 0xc8, 
-       0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x04, 0xc4, 
-       0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x02, 0x06, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x48, 0x0f, 0x78, 0x01, 
-       0x29, 0x00, 0xd0, 0x1a, 0x49, 0x0e, 0x6c, 0x8a, 
-       0x6c, 0xc9, 0x1a, 0x51, 0x63, 0xc1, 0x1c, 0x0a, 
-       0x29, 0x00, 0xdc, 0x04, 0x1f, 0xc1, 0x39, 0x79, 
-       0x69, 0x09, 0x18, 0x51, 0x63, 0xc1, 0x23, 0x01, 
-       0x03, 0x1b, 0x6b, 0xc1, 0x42, 0x99, 0xdb, 0x08, 
-       0x22, 0xff, 0x32, 0x07, 0x49, 0x05, 0x85, 0x8a, 
-       0x6b, 0xc0, 0x85, 0xc8, 0x20, 0x09, 0x02, 0x40, 
-       0x86, 0xc8, 0x47, 0x70, 0x2e, 0x08, 0x04, 0xc4, 
-       0x66, 0x00, 0x00, 0x80, 0x2c, 0x00, 0x1f, 0xc0, 
-       0xb4, 0x80, 0x20, 0x00, 0x49, 0x1e, 0x6c, 0x8a, 
-       0x6c, 0xc9, 0x1a, 0x52, 0x49, 0x1d, 0x2a, 0x00, 
-       0xdc, 0x01, 0x69, 0x0b, 0x18, 0xd2, 0x23, 0x01, 
-       0x02, 0xdb, 0x42, 0x9a, 0xdd, 0x00, 0x08, 0xd8, 
-       0x22, 0x33, 0x06, 0x52, 0x6e, 0x93, 0x6e, 0x52, 
-       0x1a, 0x9a, 0x2a, 0x00, 0xdc, 0x01, 0x6a, 0x4b, 
-       0x18, 0xd2, 0x08, 0x92, 0x00, 0x92, 0x4b, 0x14, 
-       0x68, 0xdb, 0x2b, 0x00, 0xd0, 0x06, 0x23, 0x01, 
-       0x03, 0x1b, 0x6a, 0x4f, 0x18, 0xfb, 0x6a, 0x89, 
-       0x1a, 0x59, 0xe0, 0x01, 0x21, 0x01, 0x03, 0x09, 
-       0x42, 0x8a, 0xdd, 0x04, 0x04, 0x00, 0x0c, 0x00, 
-       0x23, 0x01, 0x02, 0x5b, 0x43, 0x18, 0x28, 0x00, 
-       0xd0, 0x0b, 0x4b, 0x0a, 0x42, 0x9a, 0xdd, 0x00, 
-       0x1c, 0x1a, 0x21, 0x06, 0x43, 0x01, 0x48, 0x08, 
-       0x85, 0x81, 0x85, 0xc2, 0x21, 0x09, 0x02, 0x49, 
-       0x86, 0xc1, 0xbc, 0x80, 0x47, 0x70, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x80, 0x2e, 0x08, 0x04, 0x44, 
-       0x2e, 0x08, 0x04, 0xc4, 0x00, 0x00, 0xff, 0xff, 
-       0x2c, 0x00, 0x1f, 0xc0, 0xb5, 0x90, 0x04, 0x00, 
-       0x0c, 0x00, 0x4f, 0x13, 0x6d, 0x39, 0x29, 0x00, 
-       0xd1, 0x10, 0x24, 0x01, 0x28, 0x01, 0xd0, 0x10, 
-       0x28, 0x04, 0xd0, 0x15, 0x28, 0x05, 0xd1, 0x09, 
-       0xf7, 0xff, 0xf8, 0x48, 0xf7, 0xfe, 0xff, 0xfc, 
-       0x20, 0x00, 0x66, 0xf8, 0x67, 0x38, 0x20, 0x05, 
-       0x65, 0x78, 0x65, 0x3c, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0xf7, 0xfe, 0xff, 0xf1, 0x65, 0x3c, 
-       0x65, 0x7c, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0xf7, 0xff, 0xf8, 0x34, 0x20, 0x04, 0x65, 0x78, 
-       0x65, 0x3c, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x04, 0x44, 0xb5, 0x90, 0x04, 0x00, 
-       0x0c, 0x00, 0x4f, 0x23, 0x6d, 0x39, 0x29, 0x00, 
-       0xd0, 0x0e, 0x29, 0x02, 0xd1, 0x09, 0x6d, 0x78, 
-       0x28, 0x01, 0xd0, 0x34, 0x28, 0x04, 0xd0, 0x27, 
-       0x28, 0x05, 0xd1, 0x02, 0x20, 0xff, 0xf7, 0xff, 
-       0xf8, 0xc7, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x24, 0x02, 0x28, 0x01, 0xd0, 0x0c, 0x28, 0x04, 
-       0xd0, 0x12, 0x28, 0x05, 0xd1, 0xf5, 0x20, 0x00, 
-       0xf7, 0xff, 0xf8, 0xba, 0x20, 0x05, 0x65, 0x78, 
-       0x65, 0x3c, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0xf7, 0xff, 0xf8, 0x38, 0x20, 0x01, 0x65, 0x78, 
-       0x65, 0x3c, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0xf7, 0xff, 0xf8, 0x70, 0x20, 0x04, 0x65, 0x78, 
-       0x65, 0x3c, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x21, 0x00, 0x20, 0x0e, 0xf0, 0x0b, 0xff, 0xf0, 
-       0x21, 0x00, 0x20, 0x0d, 0xf0, 0x0b, 0xff, 0xec, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x02, 
-       0xf0, 0x09, 0xfc, 0x4c, 0x20, 0xff, 0x49, 0x03, 
-       0x70, 0x08, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x04, 0x44, 0x2e, 0x08, 0x04, 0xc4, 
-       0xb5, 0xf0, 0x4f, 0x2b, 0x24, 0x00, 0x6d, 0x38, 
-       0x28, 0x01, 0xd0, 0x1e, 0x28, 0x02, 0xd1, 0x19, 
-       0x26, 0x03, 0x6d, 0x78, 0x1d, 0xfd, 0x35, 0x79, 
-       0x28, 0x01, 0xd0, 0x34, 0x28, 0x04, 0xd0, 0x3f, 
-       0x28, 0x05, 0xd1, 0x0f, 0x20, 0x02, 0x63, 0x6c, 
-       0xf0, 0x09, 0xfc, 0x2c, 0x20, 0x00, 0xf7, 0xfb, 
-       0xfc, 0x1d, 0xf7, 0xff, 0xf8, 0x21, 0x65, 0x3e, 
-       0x20, 0x00, 0x65, 0x78, 0xf7, 0xfe, 0xfe, 0xb8, 
-       0x20, 0x01, 0x61, 0xe8, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x6d, 0x78, 0x28, 0x01, 0xd0, 0x0c, 
-       0x28, 0x04, 0xd0, 0x11, 0x28, 0x05, 0xd1, 0xf5, 
-       0xf7, 0xfe, 0xff, 0x82, 0xf7, 0xfe, 0xff, 0xd8, 
-       0x65, 0x3c, 0x65, 0x7c, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0xf7, 0xfe, 0xff, 0x79, 0x65, 0x3c, 
-       0x65, 0x7c, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0xf7, 0xfe, 0xff, 0xca, 0x65, 0x3c, 0x65, 0x7c, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x63, 0x6c, 
-       0x20, 0x02, 0x60, 0xfc, 0xf0, 0x09, 0xfb, 0xfa, 
-       0x20, 0x00, 0xf7, 0xfb, 0xfb, 0xeb, 0x65, 0x7c, 
-       0x65, 0x3e, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0xf7, 0xfe, 0xff, 0xea, 0x65, 0x7c, 0x65, 0x3e, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x04, 0x44, 0xb5, 0x90, 0x4c, 0x1b, 
-       0x68, 0xe0, 0x28, 0x03, 0xd0, 0x1f, 0x1f, 0xe7, 
-       0x3f, 0x79, 0x6d, 0x38, 0x28, 0x02, 0xd1, 0x1a, 
-       0x6d, 0x78, 0x28, 0x01, 0xd0, 0x1a, 0x28, 0x04, 
-       0xd0, 0x20, 0x28, 0x05, 0xd1, 0x13, 0x4a, 0x14, 
-       0x49, 0x14, 0x48, 0x15, 0xf7, 0xfe, 0xfe, 0x4a, 
-       0x21, 0x00, 0x20, 0x0e, 0xf0, 0x0b, 0xff, 0x68, 
-       0x20, 0x01, 0xf0, 0x09, 0xfb, 0xcb, 0x20, 0x03, 
-       0x60, 0xe0, 0x68, 0xf8, 0x28, 0x00, 0xd0, 0x02, 
-       0x20, 0x01, 0xf0, 0x09, 0xfb, 0xc3, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x20, 0x01, 0xf0, 0x09, 
-       0xfb, 0xbd, 0x20, 0x00, 0x70, 0x20, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x21, 0x00, 0x20, 0x0b, 
-       0xf0, 0x0b, 0xff, 0x4e, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x04, 0xc4, 
-       0x2e, 0x08, 0x05, 0x50, 0x2e, 0x08, 0x05, 0x48, 
-       0x2e, 0x08, 0x05, 0x4c, 0xb5, 0xf0, 0x4c, 0x21, 
-       0x6d, 0x20, 0x28, 0x02, 0xd1, 0x24, 0x26, 0xff, 
-       0x6d, 0x60, 0x1d, 0xe7, 0x37, 0x79, 0x28, 0x01, 
-       0xd0, 0x1d, 0x28, 0x04, 0xd0, 0x1f, 0x28, 0x05, 
-       0xd1, 0x1a, 0x20, 0x01, 0xf0, 0x09, 0xfb, 0x96, 
-       0x25, 0x00, 0x68, 0xe0, 0x28, 0x00, 0xd0, 0x04, 
-       0x21, 0x00, 0x20, 0x00, 0xf0, 0x09, 0xfb, 0x38, 
-       0x60, 0xe5, 0x70, 0x3e, 0x68, 0xf8, 0x28, 0x03, 
-       0xd1, 0x14, 0x48, 0x13, 0x22, 0x00, 0x68, 0x41, 
-       0x20, 0x00, 0xf7, 0xfe, 0xfd, 0xe5, 0x6b, 0x38, 
-       0xf7, 0xfe, 0xfe, 0x16, 0xe0, 0x0f, 0x70, 0x3e, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x21, 0x00, 
-       0x20, 0x0d, 0xf0, 0x0b, 0xff, 0x11, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x20, 0x01, 0x61, 0xf8, 
-       0x6b, 0x38, 0xf7, 0xfe, 0xfe, 0x05, 0x20, 0x02, 
-       0x60, 0xfd, 0xf0, 0x09, 0xfb, 0x6b, 0x21, 0x00, 
-       0x20, 0x0d, 0xf0, 0x0b, 0xff, 0x01, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x04, 0x44, 
-       0x2e, 0x08, 0x05, 0x44, 0xb5, 0xb0, 0x04, 0x07, 
-       0x0c, 0x3f, 0x2f, 0x01, 0xda, 0x00, 0x27, 0x01, 
-       0x2f, 0x3f, 0xdd, 0x00, 0x27, 0x3f, 0x48, 0x17, 
-       0x6d, 0x01, 0x29, 0x02, 0xd1, 0x13, 0x6d, 0x40, 
-       0x25, 0x02, 0x4c, 0x15, 0x28, 0x04, 0xd0, 0x11, 
-       0x28, 0x05, 0xd1, 0x0c, 0x21, 0x00, 0x20, 0x0e, 
-       0xf0, 0x0b, 0xfe, 0xe2, 0x21, 0x00, 0x20, 0x0d, 
-       0xf0, 0x0b, 0xfe, 0xde, 0x20, 0x22, 0x1c, 0x39, 
-       0xf0, 0x0b, 0xfe, 0xda, 0x60, 0xe5, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x21, 0x00, 0x20, 0x0e, 
-       0xf0, 0x0b, 0xfe, 0xd2, 0x21, 0x00, 0x20, 0x0d, 
-       0xf0, 0x0b, 0xfe, 0xce, 0x20, 0x22, 0x1c, 0x39, 
-       0xf0, 0x0b, 0xfe, 0xca, 0x20, 0x00, 0xf7, 0xfe, 
-       0xfd, 0xc3, 0x60, 0xe5, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x04, 0x44, 
-       0x2e, 0x08, 0x04, 0xc4, 0xb5, 0x00, 0x48, 0x0b, 
-       0x6d, 0x01, 0x29, 0x02, 0xd1, 0x10, 0x6d, 0x40, 
-       0x28, 0x04, 0xd0, 0x01, 0x28, 0x05, 0xd1, 0x0b, 
-       0x21, 0x00, 0x20, 0x16, 0xf0, 0x0b, 0xfe, 0xb0, 
-       0x20, 0x00, 0xf7, 0xfe, 0xfd, 0xa9, 0x21, 0x00, 
-       0x48, 0x03, 0x70, 0x01, 0x21, 0x01, 0x60, 0xc1, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x04, 0x44, 
-       0x2e, 0x08, 0x04, 0xc4, 0xb5, 0x00, 0x48, 0x0b, 
-       0x6d, 0x01, 0x29, 0x02, 0xd1, 0x10, 0x6d, 0x40, 
-       0x28, 0x04, 0xd0, 0x01, 0x28, 0x05, 0xd1, 0x0b, 
-       0x21, 0x00, 0x20, 0x1a, 0xf0, 0x0b, 0xfe, 0x94, 
-       0x20, 0x00, 0xf7, 0xfe, 0xfd, 0x8d, 0x21, 0x00, 
-       0x48, 0x03, 0x70, 0x01, 0x21, 0x01, 0x60, 0xc1, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x04, 0x44, 
-       0x2e, 0x08, 0x04, 0xc4, 0x48, 0x03, 0x6d, 0x00, 
-       0x28, 0x00, 0xd1, 0x00, 0x47, 0x70, 0x20, 0xff, 
-       0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x04, 0x44, 
-       0xb5, 0xf0, 0x1c, 0x04, 0x1c, 0x0f, 0x4d, 0x52, 
-       0x6d, 0x29, 0x48, 0x52, 0x26, 0x00, 0x29, 0x01, 
-       0xd0, 0x4c, 0x29, 0x02, 0xd1, 0x6e, 0x6d, 0x69, 
-       0x29, 0x01, 0xd0, 0x20, 0x29, 0x04, 0xd0, 0x2e, 
-       0x29, 0x05, 0xd1, 0x3e, 0x6c, 0xc1, 0x6c, 0x80, 
-       0x1a, 0x08, 0xd5, 0x01, 0x69, 0x29, 0x18, 0x40, 
-       0x21, 0x64, 0x43, 0x41, 0x69, 0x28, 0xf0, 0x13, 
-       0xfc, 0x1b, 0x70, 0x20, 0x20, 0x33, 0x06, 0x40, 
-       0x6e, 0x41, 0x6e, 0x80, 0x1a, 0x08, 0xd5, 0x01, 
-       0x6a, 0x69, 0x18, 0x40, 0x21, 0x64, 0x43, 0x41, 
-       0x6a, 0x68, 0xf0, 0x13, 0xfc, 0x0d, 0x70, 0x38, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x6c, 0xc1, 
-       0x6c, 0x80, 0x1a, 0x08, 0xd5, 0x01, 0x69, 0x29, 
-       0x18, 0x40, 0x21, 0x64, 0x43, 0x41, 0x69, 0x28, 
-       0xf0, 0x13, 0xfb, 0xfe, 0x70, 0x20, 0x70, 0x3e, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x33, 
-       0x06, 0x40, 0x6e, 0x41, 0x6e, 0x80, 0x1a, 0x08, 
-       0xd5, 0x01, 0x6a, 0x69, 0x18, 0x40, 0x21, 0x64, 
-       0x43, 0x41, 0x6a, 0x68, 0xf0, 0x13, 0xfb, 0xec, 
-       0x70, 0x38, 0x70, 0x26, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x70, 0x26, 0x70, 0x3e, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x6d, 0x69, 0x29, 0x01, 
-       0xd0, 0x21, 0x29, 0x04, 0xd0, 0x2f, 0x29, 0x05, 
-       0xd1, 0x3f, 0x69, 0x69, 0x6c, 0xc0, 0x1a, 0x40, 
-       0xd5, 0x01, 0x69, 0x29, 0x18, 0x40, 0x21, 0x64, 
-       0x43, 0x41, 0x69, 0x28, 0xf0, 0x13, 0xfb, 0xd0, 
-       0x70, 0x20, 0x21, 0x33, 0x06, 0x49, 0x6a, 0xe8, 
-       0x6e, 0x49, 0x1a, 0x08, 0xd5, 0x01, 0x6a, 0x69, 
-       0x18, 0x40, 0x21, 0x64, 0x43, 0x41, 0x6a, 0x68, 
-       0xf0, 0x13, 0xfb, 0xc2, 0x70, 0x38, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xe0, 0x26, 0x69, 0x69, 
-       0x6c, 0xc0, 0x1a, 0x40, 0xd5, 0x01, 0x69, 0x29, 
-       0x18, 0x40, 0x21, 0x64, 0x43, 0x41, 0x69, 0x28, 
-       0xf0, 0x13, 0xfb, 0xb2, 0x70, 0x20, 0x70, 0x3e, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x21, 0x33, 
-       0x06, 0x49, 0x6a, 0xe8, 0x6e, 0x49, 0x1a, 0x08, 
-       0xd5, 0x01, 0x6a, 0x69, 0x18, 0x40, 0x21, 0x64, 
-       0x43, 0x41, 0x6a, 0x68, 0xf0, 0x13, 0xfb, 0xa0, 
-       0x70, 0x38, 0x70, 0x26, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x70, 0x26, 0x70, 0x3e, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x70, 0x26, 0x70, 0x3e, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x04, 0x44, 0x66, 0x00, 0x00, 0x80, 
-       0xb5, 0xf0, 0x1c, 0x17, 0x9e, 0x05, 0x1a, 0xf2, 
-       0x1c, 0x0d, 0x21, 0x00, 0x1c, 0x1c, 0x42, 0xba, 
-       0xda, 0x03, 0x1c, 0x08, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x42, 0xa0, 0xd3, 0x01, 0x42, 0xb0, 
-       0xd9, 0x03, 0x1c, 0x08, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x19, 0xc1, 0x42, 0xb1, 0xd9, 0x0c, 
-       0x1a, 0x32, 0x4e, 0x0a, 0x64, 0x32, 0x1c, 0x29, 
-       0xf7, 0xfa, 0xff, 0xc2, 0x6c, 0x30, 0x1a, 0x3a, 
-       0x18, 0x29, 0x1c, 0x20, 0xf7, 0xfa, 0xff, 0xbc, 
-       0xe0, 0x03, 0x1c, 0x29, 0x1c, 0x3a, 0xf7, 0xfa, 
-       0xff, 0xb7, 0x1c, 0x38, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x04, 0xc4, 
-       0xb5, 0xf0, 0x1c, 0x17, 0x9e, 0x05, 0x1a, 0xf2, 
-       0x1c, 0x05, 0x20, 0x00, 0x1c, 0x1c, 0x42, 0xba, 
-       0xdb, 0x18, 0x42, 0xa1, 0xd3, 0x16, 0x42, 0xb1, 
-       0xd2, 0x14, 0x19, 0xc8, 0x42, 0xb0, 0xd9, 0x0c, 
-       0x1a, 0x72, 0x4e, 0x0a, 0x64, 0x32, 0x1c, 0x28, 
-       0xf7, 0xfa, 0xff, 0x9a, 0x6c, 0x30, 0x1a, 0x3a, 
-       0x18, 0x28, 0x1c, 0x21, 0xf7, 0xfa, 0xff, 0x94, 
-       0xe0, 0x03, 0x1c, 0x28, 0x1c, 0x3a, 0xf7, 0xfa, 
-       0xff, 0x8f, 0x1c, 0x38, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x04, 0xc4, 
-       0x47, 0x70, 0xb5, 0x00, 0xb0, 0x82, 0x46, 0x6a, 
-       0x49, 0x06, 0xa8, 0x01, 0xf7, 0xfe, 0xfc, 0x4e, 
-       0x21, 0x00, 0x20, 0x0b, 0xf0, 0x0b, 0xfd, 0x6c, 
-       0x20, 0x03, 0x49, 0x03, 0x61, 0x08, 0xb0, 0x02, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x05, 0x58, 
-       0x2e, 0x08, 0x05, 0x44, 0xb5, 0x80, 0x4f, 0x0b, 
-       0x22, 0x00, 0x20, 0x00, 0x69, 0x79, 0xf7, 0xfe, 
-       0xfc, 0x23, 0x21, 0x00, 0x20, 0x0d, 0xf0, 0x0b, 
-       0xfd, 0x57, 0x21, 0x01, 0x1f, 0xf8, 0x38, 0x79, 
-       0x61, 0xc1, 0x6b, 0x00, 0xf7, 0xfe, 0xfc, 0x4c, 
-       0x20, 0x00, 0x61, 0x38, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x05, 0x44, 
-       0xb5, 0x80, 0x4f, 0x06, 0x68, 0x38, 0x1d, 0xc1, 
-       0x31, 0xb5, 0x20, 0x2f, 0x02, 0x80, 0xf0, 0x13, 
-       0xfa, 0xfb, 0x60, 0x39, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x02, 0x5c, 0x9c, 
-       0x48, 0x05, 0x8f, 0xc1, 0x29, 0x00, 0xd0, 0x05, 
-       0x21, 0x00, 0x87, 0xc1, 0x48, 0x03, 0x69, 0x01, 
-       0x31, 0x01, 0x61, 0x01, 0x47, 0x70, 0x00, 0x00, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2e, 0x08, 0x05, 0x5c, 
-       0x20, 0x00, 0x49, 0x03, 0x60, 0x08, 0x48, 0x03, 
-       0x69, 0x41, 0x31, 0x01, 0x61, 0x41, 0x47, 0x70, 
-       0x2e, 0x08, 0x47, 0x50, 0x2e, 0x08, 0x05, 0x5c, 
-       0xb5, 0x00, 0xb0, 0x88, 0x46, 0x68, 0xf0, 0x0e, 
-       0xf8, 0xfd, 0x48, 0x07, 0x69, 0x81, 0x31, 0x01, 
-       0x23, 0x01, 0x22, 0x06, 0x61, 0x81, 0x21, 0x47, 
-       0x02, 0x49, 0x05, 0x48, 0xf0, 0x0d, 0xff, 0xea, 
-       0xb0, 0x08, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x05, 0x5c, 0xb5, 0x80, 0x1c, 0x07, 
-       0x20, 0xff, 0x30, 0xcd, 0xb0, 0x85, 0x90, 0x00, 
-       0x20, 0x01, 0x02, 0x40, 0x90, 0x02, 0x48, 0x0e, 
-       0x90, 0x04, 0x20, 0x0e, 0xab, 0x03, 0x80, 0x18, 
-       0x46, 0x68, 0xf0, 0x0e, 0xf9, 0x0f, 0x2f, 0x00, 
-       0xd0, 0x0d, 0x20, 0x33, 0x06, 0x40, 0x6d, 0x40, 
-       0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc7, 0x98, 0x02, 
-       0x1e, 0x79, 0xf0, 0x00, 0xfb, 0x21, 0x98, 0x02, 
-       0x1a, 0x38, 0x49, 0x04, 0x60, 0x88, 0xb0, 0x05, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x1c, 0x00, 0x00, 0x2e, 0x08, 0x05, 0x5c, 
-       0xb5, 0x00, 0x22, 0x01, 0x21, 0x01, 0x20, 0x00, 
-       0xf0, 0x09, 0xfd, 0x76, 0x48, 0x04, 0x68, 0x00, 
-       0x78, 0x01, 0x23, 0x06, 0x43, 0x19, 0x70, 0x01, 
-       0xf0, 0x00, 0xf9, 0xe4, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x5e, 0x58, 0xb5, 0xf0, 0x48, 0x53, 
-       0x4e, 0x53, 0x80, 0x30, 0x27, 0x00, 0x4c, 0x53, 
-       0x86, 0xe7, 0x86, 0xa7, 0x48, 0x52, 0x60, 0x07, 
-       0xf0, 0x05, 0xfc, 0x76, 0x48, 0x51, 0xf0, 0x0e, 
-       0xfd, 0x23, 0xf7, 0xfa, 0xfe, 0x71, 0x21, 0xff, 
-       0x48, 0x4f, 0x60, 0x01, 0x68, 0x01, 0x29, 0x00, 
-       0xd0, 0x01, 0x21, 0x00, 0xe0, 0x00, 0x21, 0x01, 
-       0x4a, 0x4c, 0x60, 0xd1, 0x60, 0x07, 0xf7, 0xfc, 
-       0xfa, 0xf7, 0x20, 0x01, 0xf7, 0xff, 0xff, 0xa2, 
-       0x21, 0x00, 0x20, 0x00, 0xf0, 0x09, 0xf8, 0xb4, 
-       0xf0, 0x01, 0xfa, 0xac, 0x48, 0x46, 0x60, 0x07, 
-       0x25, 0x02, 0x48, 0x46, 0x60, 0x05, 0x20, 0x03, 
-       0x49, 0x45, 0x60, 0x08, 0x49, 0x45, 0x60, 0x08, 
-       0x49, 0x45, 0x60, 0x0d, 0x49, 0x45, 0x60, 0x08, 
-       0x48, 0x45, 0x60, 0x07, 0x48, 0x45, 0x65, 0x87, 
-       0xf0, 0x00, 0xf9, 0x84, 0xf0, 0x0e, 0xfd, 0x90, 
-       0x20, 0x00, 0xf0, 0x0c, 0xfa, 0xcd, 0x28, 0x00, 
-       0xd1, 0x60, 0x48, 0x41, 0xf0, 0x08, 0xff, 0x06, 
-       0x20, 0x00, 0xf0, 0x08, 0xff, 0x77, 0x87, 0xe7, 
-       0x87, 0xa7, 0x22, 0x01, 0xb4, 0x04, 0x22, 0x03, 
-       0x21, 0x01, 0x20, 0x00, 0x1c, 0x2b, 0xf0, 0x0b, 
-       0xff, 0x73, 0x20, 0x02, 0xb0, 0x01, 0xf7, 0xfc, 
-       0xfc, 0x53, 0xf7, 0xff, 0xff, 0x95, 0x20, 0x7d, 
-       0x00, 0xc0, 0xf7, 0xfd, 0xfd, 0xab, 0x20, 0x7d, 
-       0x00, 0xc0, 0xf7, 0xfd, 0xfd, 0xbf, 0xf0, 0x04, 
-       0xfb, 0x8d, 0xf0, 0x04, 0xfb, 0xcb, 0xf7, 0xfb, 
-       0xf8, 0xe5, 0x21, 0x18, 0x20, 0x14, 0xf7, 0xfc, 
-       0xff, 0xf5, 0xf7, 0xfd, 0xfb, 0xa3, 0xf7, 0xfb, 
-       0xfc, 0x11, 0x20, 0xff, 0xf7, 0xfa, 0xff, 0x2c, 
-       0x05, 0xa8, 0xf0, 0x17, 0xf9, 0x8a, 0x49, 0x29, 
-       0x20, 0x17, 0xf0, 0x17, 0xf9, 0x93, 0x49, 0x28, 
-       0x20, 0x08, 0xf0, 0x17, 0xf9, 0x8f, 0xf0, 0x17, 
-       0xf9, 0x85, 0x4b, 0x26, 0x40, 0x18, 0xf0, 0x17, 
-       0xf9, 0x85, 0x01, 0xe8, 0xf0, 0x17, 0xf9, 0x79, 
-       0x48, 0x23, 0x23, 0x01, 0x22, 0x08, 0x21, 0x81, 
-       0x01, 0x09, 0x60, 0x07, 0xf0, 0x0b, 0xfe, 0x84, 
-       0xf0, 0x01, 0xfa, 0xd2, 0x49, 0x1f, 0x20, 0x04, 
-       0xf0, 0x17, 0xf9, 0x78, 0xf0, 0x17, 0xf9, 0x6e, 
-       0x23, 0x10, 0x43, 0xdb, 0x40, 0x18, 0xf0, 0x17, 
-       0xf9, 0x6d, 0x20, 0x10, 0xf0, 0x17, 0xf9, 0x61, 
-       0x87, 0x67, 0x21, 0x00, 0x1c, 0x30, 0xf7, 0xfd, 
-       0xfd, 0x91, 0x1c, 0x38, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
-       0x2c, 0x00, 0x00, 0xfc, 0x2c, 0x00, 0x1f, 0xc0, 
-       0x2e, 0x08, 0x04, 0x94, 0x07, 0x77, 0x77, 0x20, 
-       0x72, 0x00, 0x02, 0x00, 0x2e, 0x08, 0x05, 0x5c, 
-       0x6e, 0x00, 0x10, 0x00, 0x6e, 0x00, 0x11, 0x00, 
-       0x6e, 0x00, 0x14, 0x00, 0x6e, 0x00, 0x15, 0x00, 
-       0x6e, 0x00, 0x16, 0x00, 0x6e, 0x00, 0x17, 0x00, 
-       0x6e, 0x00, 0x18, 0x00, 0xcc, 0x00, 0x0f, 0x80, 
-       0x00, 0x80, 0x10, 0x80, 0x2e, 0x00, 0x56, 0x25, 
-       0x2e, 0x00, 0x56, 0x45, 0xff, 0xff, 0xfe, 0xff, 
-       0x2e, 0x08, 0x47, 0x50, 0x2e, 0x00, 0x56, 0x05, 
-       0xb5, 0x90, 0x1c, 0x0c, 0x1c, 0x07, 0xf0, 0x17, 
-       0xf9, 0x69, 0x2f, 0x01, 0xda, 0x00, 0x27, 0x01, 
-       0x4b, 0x0e, 0x42, 0x9f, 0xdd, 0x00, 0x1c, 0x1f, 
-       0x3f, 0x01, 0x04, 0x3f, 0x4b, 0x0c, 0x18, 0xff, 
-       0x21, 0x03, 0x48, 0x0c, 0x60, 0x01, 0x60, 0x47, 
-       0x21, 0x01, 0x60, 0x01, 0x20, 0x01, 0x1c, 0x21, 
-       0xf0, 0x17, 0xf9, 0x20, 0xf0, 0x17, 0xf9, 0x16, 
-       0x23, 0x02, 0x43, 0xdb, 0x40, 0x18, 0xf0, 0x17, 
-       0xf9, 0x15, 0xf0, 0x17, 0xf9, 0x81, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xfd, 0xe8, 
-       0x00, 0x00, 0x9e, 0x34, 0x6e, 0x00, 0x03, 0x00, 
-       0xb5, 0x90, 0x1c, 0x0c, 0x1c, 0x07, 0xf0, 0x17, 
-       0xf9, 0x3d, 0x2f, 0x01, 0xda, 0x00, 0x27, 0x01, 
-       0x4b, 0x0e, 0x42, 0x9f, 0xdd, 0x00, 0x1c, 0x1f, 
-       0x3f, 0x01, 0x04, 0x3f, 0x21, 0x03, 0x37, 0xff, 
-       0x37, 0x96, 0x48, 0x0b, 0x60, 0x01, 0x60, 0x47, 
-       0x21, 0x01, 0x60, 0x01, 0x20, 0x01, 0x1c, 0x21, 
-       0xf0, 0x17, 0xf8, 0xf4, 0xf0, 0x17, 0xf8, 0xea, 
-       0x23, 0x02, 0x43, 0xdb, 0x40, 0x18, 0xf0, 0x17, 
-       0xf8, 0xe9, 0xf0, 0x17, 0xf9, 0x55, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xfd, 0xe8, 
-       0x6e, 0x00, 0x03, 0x00, 0xb5, 0x00, 0xf0, 0x17, 
-       0xf9, 0x15, 0x20, 0x03, 0x49, 0x05, 0x60, 0x08, 
-       0xf0, 0x17, 0xf8, 0xd4, 0x23, 0x02, 0x43, 0x18, 
-       0xf0, 0x17, 0xf8, 0xd4, 0xf0, 0x17, 0xf9, 0x40, 
-       0xbc, 0x08, 0x47, 0x18, 0x6e, 0x00, 0x03, 0x00, 
-       0xb5, 0x90, 0x1c, 0x0c, 0x1c, 0x07, 0xf0, 0x17, 
-       0xf9, 0x01, 0x2f, 0x01, 0xda, 0x00, 0x27, 0x01, 
-       0x4b, 0x0e, 0x42, 0x9f, 0xdd, 0x00, 0x1c, 0x1f, 
-       0x3f, 0x01, 0x04, 0x3f, 0x4b, 0x0c, 0x18, 0xff, 
-       0x21, 0x03, 0x48, 0x0c, 0x60, 0x01, 0x60, 0x47, 
-       0x21, 0x01, 0x60, 0x01, 0x20, 0x05, 0x1c, 0x21, 
-       0xf0, 0x17, 0xf8, 0xb8, 0xf0, 0x17, 0xf8, 0xae, 
-       0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 0xf0, 0x17, 
-       0xf8, 0xad, 0xf0, 0x17, 0xf9, 0x19, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xfd, 0xe8, 
-       0x00, 0x00, 0x9e, 0x34, 0x6e, 0x00, 0x04, 0x00, 
-       0xb5, 0x90, 0x1c, 0x0c, 0x1c, 0x07, 0xf0, 0x17, 
-       0xf8, 0xd5, 0x2f, 0x01, 0xda, 0x00, 0x27, 0x01, 
-       0x4b, 0x0e, 0x42, 0x9f, 0xdd, 0x00, 0x1c, 0x1f, 
-       0x3f, 0x01, 0x04, 0x3f, 0x21, 0x03, 0x37, 0xff, 
-       0x37, 0x96, 0x48, 0x0b, 0x60, 0x01, 0x60, 0x47, 
-       0x21, 0x01, 0x60, 0x01, 0x20, 0x05, 0x1c, 0x21, 
-       0xf0, 0x17, 0xf8, 0x8c, 0xf0, 0x17, 0xf8, 0x82, 
-       0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 0xf0, 0x17, 
-       0xf8, 0x81, 0xf0, 0x17, 0xf8, 0xed, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xfd, 0xe8, 
-       0x6e, 0x00, 0x04, 0x00, 0xb5, 0x00, 0xf0, 0x17, 
-       0xf8, 0xad, 0x20, 0x03, 0x49, 0x05, 0x60, 0x08, 
-       0xf0, 0x17, 0xf8, 0x6c, 0x23, 0x20, 0x43, 0x18, 
-       0xf0, 0x17, 0xf8, 0x6c, 0xf0, 0x17, 0xf8, 0xd8, 
-       0xbc, 0x08, 0x47, 0x18, 0x6e, 0x00, 0x04, 0x00, 
-       0xb5, 0x00, 0x48, 0x0b, 0x68, 0x41, 0x31, 0x14, 
-       0x60, 0x41, 0x68, 0x81, 0x31, 0x01, 0x60, 0x81, 
-       0x48, 0x08, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 
-       0x28, 0x01, 0xd1, 0x01, 0xf7, 0xfe, 0xfa, 0x58, 
-       0xbc, 0x08, 0x47, 0x18, 0x48, 0x04, 0x21, 0x10, 
-       0xf0, 0x09, 0xfc, 0x82, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x05, 0xa8, 0x2e, 0x08, 0x04, 0xf8, 
-       0x2e, 0x08, 0x05, 0xa8, 0xb5, 0x00, 0xf0, 0x17, 
-       0xf8, 0x7d, 0x21, 0x00, 0x48, 0x08, 0x60, 0x41, 
-       0x60, 0x81, 0x49, 0x08, 0x20, 0x07, 0xf0, 0x17, 
-       0xf8, 0x41, 0xf0, 0x17, 0xf8, 0x37, 0x23, 0x80, 
-       0x43, 0xdb, 0x40, 0x18, 0xf0, 0x17, 0xf8, 0x36, 
-       0xf0, 0x17, 0xf8, 0xa2, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x05, 0xa8, 0x2e, 0x00, 0x5a, 0x45, 
-       0x48, 0x01, 0x68, 0x40, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x05, 0xa8, 0xb5, 0x90, 0x49, 0x0d, 
-       0x1c, 0x0f, 0x48, 0x0d, 0x24, 0x1e, 0x22, 0x10, 
-       0x1c, 0x23, 0xf0, 0x09, 0xfd, 0x83, 0x22, 0x02, 
-       0x21, 0x10, 0x1c, 0x38, 0x1c, 0x23, 0xf0, 0x05, 
-       0xff, 0xeb, 0x49, 0x08, 0x20, 0x10, 0xf0, 0x17, 
-       0xf8, 0x19, 0xf0, 0x17, 0xf8, 0x0f, 0x4b, 0x06, 
-       0x40, 0x18, 0xf0, 0x17, 0xf8, 0x0f, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x47, 0x60, 
-       0x2e, 0x08, 0x05, 0xa8, 0x2e, 0x00, 0x5b, 0x09, 
-       0xff, 0xfe, 0xff, 0xff, 0xb5, 0x00, 0xb0, 0x86, 
-       0x46, 0x68, 0x49, 0x0c, 0xc9, 0x0c, 0xc0, 0x0c, 
-       0xc9, 0x0c, 0xc0, 0x0c, 0xc9, 0x0c, 0xc0, 0x0c, 
-       0x48, 0x09, 0xab, 0x00, 0xcb, 0x0e, 0xb0, 0x03, 
-       0xf0, 0x09, 0xfd, 0x88, 0xb0, 0x03, 0x48, 0x07, 
-       0x68, 0x01, 0x08, 0x4a, 0xd3, 0x04, 0x08, 0x49, 
-       0x00, 0x49, 0x23, 0x04, 0x43, 0x19, 0x60, 0x01, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x47, 0x60, 
-       0x2e, 0x08, 0x05, 0xa8, 0x2e, 0x08, 0x00, 0x04, 
-       0xb5, 0x80, 0x29, 0x0c, 0xd2, 0x00, 0x21, 0x0c, 
-       0x31, 0x07, 0x08, 0xc9, 0x00, 0xc9, 0x27, 0x00, 
-       0x68, 0x02, 0x42, 0x82, 0xd0, 0x03, 0x68, 0x93, 
-       0x42, 0x8b, 0xd3, 0x0d, 0x1c, 0x17, 0x2f, 0x00, 
-       0xd0, 0x1e, 0x68, 0xb8, 0x1a, 0x42, 0x2a, 0x0c, 
-       0xd2, 0x00, 0x1c, 0x01, 0x1a, 0x42, 0xd1, 0x05, 
-       0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x76, 0xe0, 0x0c, 
-       0x68, 0x12, 0xe7, 0xea, 0x1d, 0xca, 0x32, 0x01, 
-       0x1a, 0x80, 0x60, 0xb8, 0x19, 0xc0, 0x1d, 0xc7, 
-       0x37, 0x01, 0x20, 0x00, 0x60, 0x38, 0x60, 0x78, 
-       0x60, 0xb9, 0x68, 0xb8, 0x60, 0x38, 0x1d, 0xf8, 
-       0x30, 0x01, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0x00, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0xb0, 0x1f, 0xcc, 0x3c, 0x01, 0x68, 0x21, 
-       0x19, 0x0a, 0x60, 0xa1, 0x68, 0x07, 0x32, 0x08, 
-       0x42, 0x87, 0xd1, 0x06, 0x68, 0x41, 0x1c, 0x20, 
-       0xf0, 0x00, 0xf8, 0x48, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x42, 0x97, 0xd1, 0x0f, 0x68, 0x7d, 
-       0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x46, 0x68, 0xa0, 
-       0x68, 0xb9, 0x18, 0x40, 0x30, 0x08, 0x60, 0xa0, 
-       0x1c, 0x20, 0x1c, 0x29, 0xf0, 0x00, 0xf8, 0x36, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x68, 0xbb, 
-       0x19, 0xdb, 0x33, 0x08, 0x42, 0xa3, 0xd1, 0x13, 
-       0x68, 0xb8, 0x18, 0x40, 0x30, 0x08, 0x60, 0xb8, 
-       0x19, 0xc0, 0x68, 0x3c, 0x30, 0x08, 0x42, 0xa0, 
-       0xd1, 0xdc, 0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x29, 
-       0x68, 0xb8, 0x68, 0xa1, 0x18, 0x40, 0x30, 0x08, 
-       0x60, 0xb8, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x42, 0xbc, 0xd2, 0x06, 0x68, 0x79, 0x1c, 0x20, 
-       0xf0, 0x00, 0xf8, 0x14, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x68, 0x3f, 0xe7, 0xc0, 0xb5, 0x00, 
-       0x31, 0x10, 0x32, 0x01, 0x1c, 0x0b, 0x1a, 0x51, 
-       0x39, 0x08, 0x60, 0x99, 0x60, 0x00, 0x1c, 0x01, 
-       0x60, 0x40, 0x1c, 0x18, 0xf0, 0x00, 0xf8, 0x02, 
-       0xbc, 0x08, 0x47, 0x18, 0x68, 0x0a, 0x60, 0x02, 
-       0x60, 0x08, 0x68, 0x02, 0x60, 0x50, 0x60, 0x41, 
-       0x47, 0x70, 0xc8, 0x06, 0x38, 0x08, 0x60, 0x11, 
-       0xc8, 0x03, 0x60, 0x41, 0x47, 0x70, 0xb5, 0x00, 
-       0x1c, 0x0a, 0x1c, 0x01, 0x48, 0x02, 0xf7, 0xff, 
-       0xff, 0xde, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x05, 0xcc, 0xb5, 0x90, 0x1c, 0x07, 
-       0xf0, 0x16, 0xff, 0x38, 0x23, 0x11, 0x05, 0x1b, 
-       0x1c, 0x04, 0x43, 0x18, 0xf0, 0x16, 0xff, 0x36, 
-       0x1c, 0x39, 0x48, 0x05, 0xf7, 0xff, 0xff, 0x50, 
-       0x1c, 0x07, 0x1c, 0x20, 0xf0, 0x16, 0xff, 0x2e, 
-       0x1c, 0x38, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x05, 0xcc, 0xb5, 0x00, 0x1c, 0x01, 
-       0x48, 0x02, 0xf7, 0xff, 0xff, 0x41, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xcc, 
-       0xb5, 0x90, 0x1c, 0x07, 0xd0, 0x0e, 0xf0, 0x16, 
-       0xff, 0x15, 0x23, 0x11, 0x05, 0x1b, 0x1c, 0x04, 
-       0x43, 0x18, 0xf0, 0x16, 0xff, 0x13, 0x1c, 0x39, 
-       0x48, 0x04, 0xf7, 0xff, 0xff, 0x61, 0x1c, 0x20, 
-       0xf0, 0x16, 0xff, 0x0c, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xcc, 
-       0xb5, 0x00, 0x4a, 0x04, 0xc2, 0x03, 0x1c, 0x0a, 
-       0x1c, 0x01, 0x48, 0x03, 0xf7, 0xff, 0xff, 0x97, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x05, 0xb4, 
-       0x2e, 0x08, 0x05, 0xc4, 0xb5, 0x00, 0x1c, 0x01, 
-       0x48, 0x02, 0xf7, 0xff, 0xff, 0x11, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xc4, 
-       0xb5, 0x00, 0x49, 0x08, 0x68, 0x0a, 0x42, 0x90, 
-       0xd3, 0x02, 0x68, 0x49, 0x42, 0x88, 0xd9, 0x03, 
-       0xf7, 0xff, 0xff, 0xc6, 0xbc, 0x08, 0x47, 0x18, 
-       0x1c, 0x01, 0x48, 0x03, 0xf7, 0xff, 0xff, 0x30, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x05, 0xb4, 
-       0x2e, 0x08, 0x05, 0xc4, 0xb5, 0x00, 0x4a, 0x05, 
-       0x60, 0x90, 0x60, 0xd1, 0x1c, 0x0a, 0x1c, 0x01, 
-       0x48, 0x03, 0xf7, 0xff, 0xff, 0x68, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xb4, 
-       0x2e, 0x08, 0x05, 0xd4, 0xb5, 0x00, 0x1c, 0x01, 
-       0x48, 0x02, 0xf7, 0xff, 0xfe, 0xe1, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xd4, 
-       0xb5, 0x00, 0x49, 0x08, 0x68, 0x8a, 0x42, 0x90, 
-       0xd3, 0x02, 0x68, 0xc9, 0x42, 0x88, 0xd9, 0x03, 
-       0xf7, 0xff, 0xff, 0x96, 0xbc, 0x08, 0x47, 0x18, 
-       0x1c, 0x01, 0x48, 0x03, 0xf7, 0xff, 0xff, 0x00, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x05, 0xb4, 
-       0x2e, 0x08, 0x05, 0xd4, 0xb5, 0xf0, 0x06, 0x07, 
-       0x0e, 0x3f, 0x04, 0x09, 0x0c, 0x09, 0xb0, 0x81, 
-       0x91, 0x00, 0x06, 0x16, 0x0e, 0x36, 0x00, 0xbd, 
-       0x4c, 0x15, 0x59, 0x60, 0x28, 0x00, 0xd1, 0x15, 
-       0xf7, 0xfb, 0xf9, 0x10, 0x22, 0x00, 0xb4, 0x04, 
-       0x23, 0x00, 0x22, 0x02, 0x99, 0x01, 0x1c, 0x38, 
-       0xf0, 0x05, 0xf9, 0xaa, 0x23, 0x01, 0x02, 0x9b, 
-       0x00, 0x5a, 0x21, 0x01, 0x1c, 0x38, 0xb0, 0x01, 
-       0xf0, 0x05, 0xfb, 0x66, 0x20, 0x03, 0x00, 0x71, 
-       0x4a, 0x0a, 0x52, 0x50, 0x59, 0x60, 0x30, 0x01, 
-       0x51, 0x60, 0x48, 0x09, 0x23, 0x14, 0x5e, 0xc1, 
-       0x29, 0x00, 0xd1, 0x02, 0x49, 0x07, 0x4a, 0x08, 
-       0x65, 0xd1, 0x8a, 0x81, 0x31, 0x01, 0x82, 0x81, 
-       0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x02, 0x5c, 0x10, 0x2e, 0x08, 0x49, 0x70, 
-       0x2e, 0x08, 0x07, 0x5c, 0x2e, 0x02, 0x5a, 0x20, 
-       0xa0, 0x00, 0x0d, 0x00, 0xb5, 0xb0, 0x06, 0x07, 
-       0x0e, 0x3f, 0x06, 0x0d, 0x0e, 0x2d, 0x00, 0xb9, 
-       0x48, 0x1b, 0x58, 0x42, 0x3a, 0x01, 0x50, 0x42, 
-       0x24, 0x00, 0x2a, 0x00, 0xd1, 0x1f, 0x23, 0x01, 
-       0x02, 0x9b, 0x00, 0x5a, 0x21, 0x02, 0x1c, 0x38, 
-       0xf0, 0x05, 0xfb, 0x32, 0x22, 0x00, 0xb4, 0x04, 
-       0x1c, 0x38, 0x1c, 0x23, 0x49, 0x13, 0xf0, 0x05, 
-       0xf9, 0x67, 0x00, 0x69, 0xb0, 0x01, 0x48, 0x12, 
-       0x52, 0x44, 0x48, 0x10, 0x4a, 0x11, 0x52, 0x50, 
-       0x00, 0x79, 0x4a, 0x11, 0x52, 0x50, 0x00, 0x6a, 
-       0x19, 0x52, 0x00, 0x92, 0x4b, 0x0f, 0x18, 0xd1, 
-       0x81, 0x0c, 0x52, 0x98, 0x80, 0x48, 0x48, 0x0e, 
-       0x8a, 0x81, 0x39, 0x01, 0x82, 0x81, 0x23, 0x14, 
-       0x5e, 0xc0, 0x28, 0x00, 0xd1, 0x03, 0x20, 0xd7, 
-       0x00, 0xc0, 0x49, 0x0a, 0x65, 0xc8, 0x1c, 0x20, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x02, 0x5c, 0x10, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x49, 0x70, 0x2e, 0x08, 0x49, 0x30, 
-       0x2e, 0x08, 0x48, 0xf8, 0x2e, 0x08, 0x47, 0x78, 
-       0x2e, 0x08, 0x07, 0x5c, 0xa0, 0x00, 0x0d, 0x00, 
-       0xb5, 0xf0, 0x04, 0x06, 0x0c, 0x36, 0x04, 0x0c, 
-       0x0c, 0x24, 0x1c, 0x17, 0xb0, 0x8a, 0x46, 0x69, 
-       0x1c, 0x30, 0x1c, 0x22, 0xf0, 0x00, 0xf8, 0xb0, 
-       0x23, 0x01, 0x1c, 0x05, 0x42, 0xd8, 0xd1, 0x03, 
-       0xb0, 0x0a, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x4b, 0x4e, 0x42, 0x9c, 0xd1, 0x06, 0xa8, 0x00, 
-       0x88, 0x00, 0x1c, 0x31, 0x1c, 0x2a, 0xf7, 0xff, 
-       0xff, 0x55, 0xe0, 0x7f, 0x20, 0x20, 0x40, 0x20, 
-       0x28, 0x20, 0xd1, 0x1f, 0x06, 0x2a, 0x0e, 0x12, 
-       0xa8, 0x00, 0x88, 0x00, 0x06, 0x00, 0x0e, 0x00, 
-       0x1c, 0x31, 0x1c, 0x23, 0xf7, 0xfd, 0xf8, 0x5a, 
-       0x28, 0x00, 0xd0, 0x6f, 0x48, 0x42, 0x00, 0x69, 
-       0x4a, 0x42, 0x52, 0x50, 0xa9, 0x00, 0x88, 0x09, 
-       0x00, 0x49, 0x4a, 0x41, 0x52, 0x50, 0xa8, 0x00, 
-       0x88, 0x00, 0x1c, 0x29, 0xf0, 0x00, 0xf9, 0xce, 
-       0x20, 0x00, 0x43, 0xc0, 0xb0, 0x0a, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0x21, 0x00, 
-       0xaa, 0x01, 0x88, 0x3b, 0x0a, 0x1b, 0x70, 0x13, 
-       0x88, 0x3b, 0x93, 0x09, 0x32, 0x01, 0x06, 0x1b, 
-       0xd0, 0x02, 0x1c, 0x48, 0x06, 0x00, 0x0e, 0x00, 
-       0x9b, 0x09, 0x70, 0x13, 0x31, 0x01, 0x32, 0x01, 
-       0x37, 0x02, 0x29, 0x0e, 0xdb, 0xed, 0x21, 0x00, 
-       0x23, 0x00, 0x70, 0x13, 0x31, 0x01, 0x32, 0x01, 
-       0x29, 0x04, 0xdb, 0xfa, 0x21, 0x0c, 0x40, 0x21, 
-       0x29, 0x0c, 0xd1, 0x03, 0x04, 0x21, 0x0c, 0x09, 
-       0x24, 0x01, 0x43, 0x0c, 0x28, 0x06, 0xdc, 0x0e, 
-       0x06, 0x22, 0x0e, 0x12, 0xb4, 0x04, 0x06, 0x2a, 
-       0x0e, 0x12, 0xa8, 0x01, 0x88, 0x00, 0x06, 0x00, 
-       0x0e, 0x00, 0x1c, 0x31, 0xab, 0x02, 0xf7, 0xfc, 
-       0xfc, 0x37, 0xb0, 0x01, 0xe0, 0x1e, 0x28, 0x0a, 
-       0xdc, 0x0e, 0x06, 0x22, 0x0e, 0x12, 0xb4, 0x04, 
-       0x06, 0x2a, 0x0e, 0x12, 0xa8, 0x01, 0x88, 0x00, 
-       0x06, 0x00, 0x0e, 0x00, 0x1c, 0x31, 0xab, 0x02, 
-       0xf7, 0xfc, 0xfc, 0x40, 0xb0, 0x01, 0xe0, 0x0d, 
-       0x06, 0x22, 0x0e, 0x12, 0xb4, 0x04, 0x06, 0x2a, 
-       0x0e, 0x12, 0xa8, 0x01, 0x88, 0x00, 0x06, 0x00, 
-       0x0e, 0x00, 0x1c, 0x31, 0xab, 0x02, 0xf7, 0xfc, 
-       0xfc, 0x4b, 0xb0, 0x01, 0x28, 0x00, 0xd0, 0x05, 
-       0x20, 0x00, 0x43, 0xc0, 0xb0, 0x0a, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xe7, 0xff, 0xa8, 0x00, 
-       0x88, 0x00, 0x00, 0x6a, 0x19, 0x52, 0x00, 0x92, 
-       0x49, 0x0a, 0x52, 0x88, 0x18, 0x50, 0x80, 0x46, 
-       0x80, 0x84, 0x49, 0x05, 0x80, 0xc1, 0x21, 0x01, 
-       0x81, 0x01, 0x1c, 0x28, 0xb0, 0x0a, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 0xb9, 0x6a, 
-       0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x49, 0x30, 
-       0x2e, 0x08, 0x48, 0xf8, 0x2e, 0x08, 0x47, 0x78, 
-       0xb4, 0xf0, 0x04, 0x04, 0x0c, 0x24, 0x04, 0x17, 
-       0x0c, 0x3f, 0xb0, 0x82, 0x48, 0x58, 0x22, 0x00, 
-       0x4d, 0x58, 0x95, 0x01, 0x1c, 0x06, 0x00, 0x53, 
-       0x9d, 0x01, 0x5a, 0xed, 0x42, 0xb5, 0xd1, 0x02, 
-       0x04, 0x10, 0x0c, 0x00, 0xe0, 0x02, 0x32, 0x01, 
-       0x2a, 0x20, 0xdb, 0xf4, 0x42, 0xb0, 0xd1, 0x04, 
-       0x20, 0x00, 0x43, 0xc0, 0xb0, 0x02, 0xbc, 0xf0, 
-       0x47, 0x70, 0x80, 0x0e, 0x4a, 0x4e, 0x92, 0x00, 
-       0x4d, 0x4e, 0x4a, 0x4f, 0x4b, 0x4f, 0x42, 0x9f, 
-       0xd1, 0x32, 0x23, 0x00, 0x00, 0x5f, 0x5b, 0xd7, 
-       0x42, 0xa7, 0xd1, 0x0a, 0x00, 0x5f, 0x5b, 0xef, 
-       0x2f, 0x03, 0xd1, 0x01, 0x80, 0x0b, 0xe0, 0x07, 
-       0x20, 0x00, 0x43, 0xc0, 0xb0, 0x02, 0xbc, 0xf0, 
-       0x47, 0x70, 0x33, 0x01, 0x2b, 0x1c, 0xdb, 0xed, 
-       0x88, 0x0f, 0x4b, 0x3f, 0x42, 0x9f, 0xd1, 0x0a, 
-       0x27, 0x00, 0x00, 0x7b, 0x5a, 0xd6, 0x4b, 0x3c, 
-       0x42, 0x9e, 0xd1, 0x01, 0x80, 0x0f, 0xe0, 0x02, 
-       0x37, 0x01, 0x2f, 0x1c, 0xdb, 0xf5, 0x88, 0x0f, 
-       0x4b, 0x37, 0x42, 0x9f, 0xd1, 0x04, 0x20, 0x00, 
-       0x43, 0xc0, 0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
-       0x23, 0x03, 0x00, 0x47, 0x9e, 0x00, 0x53, 0xf3, 
-       0x88, 0x0f, 0x00, 0x7f, 0x53, 0xeb, 0xe0, 0x54, 
-       0x23, 0x20, 0x40, 0x3b, 0x2b, 0x20, 0xd1, 0x1e, 
-       0x23, 0x00, 0x00, 0x5f, 0x5b, 0xd7, 0x42, 0xa7, 
-       0xd1, 0x04, 0x20, 0x00, 0x43, 0xc0, 0xb0, 0x02, 
-       0xbc, 0xf0, 0x47, 0x70, 0x33, 0x01, 0x2b, 0x1c, 
-       0xdb, 0xf3, 0x27, 0x00, 0x00, 0x7b, 0x5a, 0xd5, 
-       0x42, 0xb5, 0xd1, 0x01, 0x80, 0x0f, 0xe0, 0x02, 
-       0x37, 0x01, 0x2f, 0x1c, 0xdb, 0xf6, 0x88, 0x0f, 
-       0x42, 0xb7, 0xd1, 0x36, 0x20, 0x00, 0x43, 0xc0, 
-       0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 0x23, 0x00, 
-       0x00, 0x5f, 0x5b, 0xd7, 0x42, 0xa7, 0xd1, 0x0a, 
-       0x00, 0x5f, 0x5b, 0xef, 0x2f, 0x02, 0xd1, 0x01, 
-       0x80, 0x0b, 0xe0, 0x07, 0x20, 0x00, 0x43, 0xc0, 
-       0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 0x33, 0x01, 
-       0x2b, 0x1c, 0xdb, 0xed, 0x88, 0x0f, 0x4b, 0x14, 
-       0x42, 0x9f, 0xd1, 0x0a, 0x27, 0x00, 0x00, 0x7b, 
-       0x5a, 0xd6, 0x4b, 0x11, 0x42, 0x9e, 0xd1, 0x01, 
-       0x80, 0x0f, 0xe0, 0x02, 0x37, 0x01, 0x2f, 0x1c, 
-       0xdb, 0xf5, 0x88, 0x0f, 0x4b, 0x0c, 0x42, 0x9f, 
-       0xd1, 0x04, 0x20, 0x00, 0x43, 0xc0, 0xb0, 0x02, 
-       0xbc, 0xf0, 0x47, 0x70, 0x23, 0x02, 0x00, 0x47, 
-       0x9e, 0x00, 0x53, 0xf3, 0x88, 0x0f, 0x00, 0x7f, 
-       0x53, 0xeb, 0x00, 0x43, 0x9d, 0x01, 0x52, 0xec, 
-       0x88, 0x09, 0x00, 0x49, 0x52, 0x54, 0x04, 0x00, 
-       0x14, 0x00, 0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
-       0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x49, 0x30, 
-       0x2e, 0x08, 0x49, 0x70, 0x2e, 0x08, 0x49, 0xb0, 
-       0x2e, 0x08, 0x48, 0xf8, 0x00, 0x00, 0xb9, 0x6a, 
-       0xb5, 0xf0, 0x04, 0x07, 0x0c, 0x3f, 0xb0, 0x81, 
-       0x4a, 0x34, 0x92, 0x00, 0x1c, 0x11, 0x42, 0x97, 
-       0xd0, 0x01, 0x2f, 0x20, 0xdb, 0x05, 0x20, 0x00, 
-       0x43, 0xc0, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x7c, 0x4a, 0x2e, 0x5b, 0x10, 
-       0x42, 0x88, 0xd1, 0x05, 0x20, 0x00, 0x43, 0xc0, 
-       0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x49, 0x28, 0x53, 0x11, 0x23, 0x00, 0x49, 0x29, 
-       0x00, 0x5e, 0x5b, 0x8e, 0x42, 0x86, 0xd1, 0x02, 
-       0x04, 0x1d, 0x0c, 0x2d, 0xe0, 0x02, 0x33, 0x01, 
-       0x2b, 0x1c, 0xdb, 0xf5, 0x23, 0x00, 0x00, 0x5e, 
-       0x5b, 0x96, 0x42, 0x86, 0xd1, 0x03, 0x04, 0x1a, 
-       0x0c, 0x12, 0x92, 0x00, 0xe0, 0x02, 0x33, 0x01, 
-       0x2b, 0x20, 0xdb, 0xf4, 0x9a, 0x00, 0x4e, 0x1b, 
-       0x42, 0xb2, 0xd1, 0x0d, 0x22, 0x00, 0x00, 0x53, 
-       0x5a, 0xcb, 0x42, 0x83, 0xd1, 0x05, 0x23, 0x00, 
-       0x00, 0x50, 0x4a, 0x19, 0x52, 0x13, 0x52, 0x0e, 
-       0xe0, 0x02, 0x32, 0x01, 0x2a, 0x1c, 0xdb, 0xf2, 
-       0x4e, 0x16, 0x5b, 0x30, 0x28, 0x02, 0xd1, 0x05, 
-       0x23, 0x00, 0x53, 0x33, 0x1c, 0x28, 0x1c, 0x39, 
-       0xf0, 0x00, 0xf8, 0x38, 0x5b, 0x30, 0x28, 0x01, 
-       0xd1, 0x0a, 0x1c, 0x38, 0xf7, 0xfc, 0xff, 0xce, 
-       0x28, 0x00, 0xd0, 0x05, 0x20, 0x00, 0x43, 0xc0, 
-       0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x5b, 0x30, 0x28, 0x03, 0xd1, 0x03, 0x1c, 0x28, 
-       0x1c, 0x39, 0xf7, 0xff, 0xfd, 0xcb, 0x04, 0x38, 
-       0x14, 0x00, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x49, 0x30, 0x2e, 0x08, 0x48, 0xf8, 
-       0x2e, 0x08, 0x49, 0xb0, 0x2e, 0x08, 0x49, 0x70, 
-       0x04, 0x01, 0x0c, 0x09, 0x20, 0x02, 0x00, 0x4b, 
-       0x18, 0x5b, 0x00, 0x9b, 0x4a, 0x03, 0x18, 0x99, 
-       0x81, 0x08, 0x48, 0x03, 0x52, 0xd0, 0x80, 0x48, 
-       0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x47, 0x78, 
-       0x00, 0x00, 0xff, 0xff, 0xb5, 0x80, 0x04, 0x0f, 
-       0x0c, 0x3f, 0x06, 0x39, 0x0e, 0x09, 0x06, 0x00, 
-       0x0e, 0x00, 0xf7, 0xfc, 0xfc, 0x03, 0x20, 0x00, 
-       0x00, 0x7b, 0x19, 0xdb, 0x00, 0x9b, 0x4a, 0x04, 
-       0x18, 0x99, 0x81, 0x08, 0x48, 0x03, 0x52, 0xd0, 
-       0x80, 0x48, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x47, 0x78, 0x00, 0x00, 0xff, 0xff, 
-       0xb5, 0x80, 0x04, 0x09, 0x0c, 0x09, 0x78, 0x42, 
-       0x02, 0x12, 0x78, 0x83, 0x43, 0x1a, 0x05, 0x12, 
-       0x0d, 0x12, 0x27, 0x00, 0x43, 0xff, 0x32, 0x03, 
-       0x42, 0x8a, 0xd0, 0x03, 0x1c, 0x38, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0xf0, 0x05, 0xfd, 0xec, 
-       0x28, 0x00, 0xd0, 0x03, 0x1c, 0x38, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x9c, 0x09, 
-       0x04, 0x00, 0x0c, 0x00, 0xb0, 0x81, 0x90, 0x00, 
-       0x06, 0x09, 0x0e, 0x09, 0x06, 0x12, 0x0e, 0x12, 
-       0xb0, 0x88, 0x4f, 0x16, 0x68, 0xb8, 0x28, 0x0c, 
-       0xdb, 0x06, 0x20, 0x00, 0x43, 0xc0, 0xb0, 0x09, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0x00, 0x23, 0x00, 0x00, 0x45, 0x46, 0x6e, 
-       0x53, 0x73, 0x30, 0x01, 0x04, 0x00, 0x14, 0x00, 
-       0x28, 0x10, 0xdb, 0xf7, 0x02, 0x08, 0x43, 0x10, 
-       0xab, 0x00, 0x80, 0x18, 0x46, 0x6a, 0x21, 0x04, 
-       0x98, 0x08, 0xf7, 0xff, 0xfd, 0x95, 0x28, 0x00, 
-       0xda, 0x01, 0xb0, 0x09, 0xe7, 0xe4, 0x00, 0x81, 
-       0x4a, 0x05, 0x50, 0x54, 0x9b, 0x0c, 0x4a, 0x05, 
-       0x50, 0x53, 0x68, 0xb9, 0x31, 0x01, 0x60, 0xb9, 
-       0xb0, 0x09, 0xe7, 0xd9, 0x2e, 0x08, 0x07, 0x74, 
-       0x2e, 0x08, 0x4a, 0x68, 0x2e, 0x08, 0x49, 0xe8, 
-       0xb5, 0x80, 0x04, 0x07, 0x14, 0x3f, 0xd5, 0x04, 
-       0x20, 0x00, 0x43, 0xc0, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x1c, 0x38, 0xf7, 0xff, 0xfe, 0xf4, 
-       0x20, 0x00, 0x00, 0xb9, 0x4a, 0x05, 0x50, 0x50, 
-       0x4a, 0x05, 0x50, 0x50, 0x49, 0x05, 0x68, 0x8a, 
-       0x3a, 0x01, 0x60, 0x8a, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x49, 0xe8, 
-       0x2e, 0x08, 0x4a, 0x68, 0x2e, 0x08, 0x07, 0x74, 
-       0xb5, 0x90, 0x27, 0x00, 0x4c, 0x08, 0x00, 0xb8, 
-       0x58, 0x20, 0x28, 0x00, 0xd0, 0x02, 0x1c, 0x38, 
-       0xf7, 0xff, 0xff, 0xd6, 0x37, 0x01, 0x2f, 0x20, 
-       0xdb, 0xf5, 0x20, 0x00, 0x49, 0x03, 0x60, 0xc8, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x49, 0xe8, 0x2e, 0x08, 0x07, 0x74, 
-       0xb5, 0x00, 0xf7, 0xff, 0xff, 0xe5, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0xf0, 0x04, 0x00, 0x14, 0x00, 
-       0xb0, 0x83, 0x90, 0x00, 0x1c, 0x0f, 0x04, 0x11, 
-       0x0c, 0x09, 0x24, 0x00, 0x1c, 0x38, 0x1c, 0x1d, 
-       0x1c, 0x0e, 0xb0, 0x81, 0xf7, 0xff, 0xff, 0x58, 
-       0x1c, 0x01, 0x20, 0x00, 0x29, 0x00, 0xd0, 0x03, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x78, 0xf9, 0x02, 0x09, 0x79, 0x3a, 0x43, 0x11, 
-       0x04, 0x09, 0x0c, 0x09, 0x88, 0x2a, 0x42, 0x91, 
-       0xd0, 0x03, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x7a, 0x39, 0x02, 0x09, 0x7a, 0x7a, 
-       0x43, 0x11, 0x04, 0xc9, 0x0c, 0xc9, 0x91, 0x00, 
-       0x7a, 0xb9, 0x02, 0x09, 0x7a, 0xfa, 0x43, 0x11, 
-       0x05, 0x0b, 0x0d, 0x1b, 0x1d, 0xf9, 0x31, 0x05, 
-       0x27, 0x00, 0x1d, 0xd8, 0x30, 0x09, 0x1a, 0x32, 
-       0x2b, 0x00, 0xdd, 0x0a, 0x78, 0x08, 0x28, 0x09, 
-       0xd1, 0x00, 0x37, 0x01, 0x78, 0x48, 0x1c, 0x85, 
-       0x1b, 0x5b, 0x18, 0x40, 0x1c, 0x81, 0x2b, 0x00, 
-       0xdc, 0xf4, 0x2a, 0x00, 0xdd, 0x36, 0x48, 0x26, 
-       0x88, 0x06, 0x96, 0x03, 0x88, 0x85, 0x95, 0x02, 
-       0x78, 0xc8, 0x02, 0x00, 0x79, 0x0b, 0x43, 0x18, 
-       0x05, 0x00, 0x0d, 0x00, 0x78, 0x0b, 0x2b, 0x01, 
-       0xd0, 0x01, 0x2b, 0x02, 0xd1, 0x06, 0x78, 0x4d, 
-       0x02, 0x2d, 0x78, 0x8e, 0x43, 0x35, 0x04, 0xed, 
-       0x0c, 0xed, 0x9e, 0x03, 0x2b, 0x04, 0xd0, 0x01, 
-       0x2b, 0x03, 0xd1, 0x09, 0x78, 0x4b, 0x02, 0x1b, 
-       0x78, 0x8d, 0x43, 0x2b, 0x04, 0xdb, 0x0c, 0xdb, 
-       0x9d, 0x02, 0x42, 0xab, 0xd1, 0x00, 0x24, 0x01, 
-       0x1d, 0x43, 0x1a, 0xd2, 0x31, 0x05, 0x28, 0x00, 
-       0xdd, 0x0a, 0x78, 0x0b, 0x2b, 0x09, 0xd1, 0x00, 
-       0x37, 0x01, 0x78, 0x4b, 0x1c, 0x9d, 0x1b, 0x40, 
-       0x18, 0x59, 0x31, 0x02, 0x28, 0x00, 0xdc, 0xf4, 
-       0x2a, 0x00, 0xdc, 0xcd, 0x2c, 0x00, 0xd0, 0x09, 
-       0xf7, 0xff, 0xff, 0x62, 0x99, 0x00, 0x48, 0x09, 
-       0x80, 0x01, 0x2f, 0x00, 0xd1, 0x07, 0xf7, 0xfa, 
-       0xf8, 0x45, 0xe0, 0x04, 0x98, 0x01, 0xf7, 0xff, 
-       0xff, 0x37, 0xf0, 0x00, 0xf8, 0x23, 0x20, 0x00, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x07, 0x74, 0x2e, 0x08, 0x00, 0x08, 
-       0xb4, 0x90, 0x04, 0x02, 0x0c, 0x12, 0x04, 0x0f, 
-       0x0c, 0x3f, 0x4b, 0x07, 0x68, 0xd8, 0x28, 0x80, 
-       0xda, 0x08, 0x2a, 0x00, 0xd0, 0x06, 0x00, 0x41, 
-       0x4c, 0x04, 0x52, 0x67, 0x4f, 0x04, 0x52, 0x7a, 
-       0x30, 0x01, 0x60, 0xd8, 0xbc, 0x90, 0x47, 0x70, 
-       0x2e, 0x08, 0x07, 0x74, 0x2e, 0x08, 0x4a, 0xe8, 
-       0x2e, 0x08, 0x4b, 0xe8, 0xb5, 0x90, 0x4f, 0x13, 
-       0x24, 0x00, 0x43, 0xe4, 0x68, 0xf8, 0x28, 0x00, 
-       0xd1, 0x03, 0x1c, 0x20, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x40, 0x49, 0x0e, 0x18, 0x41, 
-       0x1e, 0x8a, 0xb4, 0x04, 0x49, 0x0d, 0x18, 0x40, 
-       0x38, 0x40, 0x8f, 0xc0, 0x4b, 0x0c, 0x22, 0xff, 
-       0x21, 0x02, 0xf7, 0xff, 0xfe, 0xbb, 0xb0, 0x01, 
-       0x28, 0x00, 0xda, 0x03, 0x1c, 0x20, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x68, 0xf8, 0x38, 0x01, 
-       0x60, 0xf8, 0x20, 0x00, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x07, 0x74, 
-       0x2e, 0x08, 0x4b, 0xe8, 0x2e, 0x08, 0x4a, 0xe8, 
-       0x2e, 0x00, 0x64, 0x57, 0xb5, 0xf0, 0x04, 0x05, 
-       0x14, 0x2d, 0x1c, 0x0f, 0x04, 0x11, 0x0c, 0x09, 
-       0x1c, 0x0e, 0x4c, 0x28, 0x23, 0x02, 0x69, 0x20, 
-       0x42, 0xd8, 0xd0, 0x04, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfe, 0x77, 0x28, 0x00, 0xd0, 0x06, 0x1c, 0x28, 
-       0xf7, 0xff, 0xfe, 0xce, 0x20, 0x00, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x79, 0xb8, 0x69, 0x21, 
-       0x42, 0x88, 0xd1, 0x09, 0x20, 0x01, 0x43, 0xc0, 
-       0x61, 0x20, 0x1c, 0x28, 0xf7, 0xff, 0xfe, 0xc0, 
-       0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x23, 0x01, 0x42, 0xd9, 0xd1, 0x02, 0x61, 0x20, 
-       0x20, 0x00, 0x60, 0xe0, 0x37, 0x08, 0x1f, 0xf4, 
-       0x3c, 0x05, 0x2c, 0x00, 0xdd, 0x11, 0x78, 0x38, 
-       0x02, 0x00, 0x78, 0x79, 0x43, 0x08, 0x04, 0x00, 
-       0x0c, 0x00, 0x78, 0xb9, 0x02, 0x09, 0x78, 0xfa, 
-       0x43, 0x11, 0x04, 0xc9, 0x0c, 0xc9, 0xf7, 0xff, 
-       0xff, 0x77, 0x37, 0x04, 0x3c, 0x04, 0x2c, 0x00, 
-       0xdc, 0xed, 0xf7, 0xff, 0xff, 0x8b, 0xf7, 0xff, 
-       0xff, 0x89, 0xf7, 0xff, 0xff, 0x87, 0xf7, 0xff, 
-       0xff, 0x85, 0xf7, 0xff, 0xff, 0x83, 0xf7, 0xff, 
-       0xff, 0x81, 0xf7, 0xff, 0xff, 0x7f, 0xf7, 0xff, 
-       0xff, 0x7d, 0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x07, 0x74, 
-       0xb5, 0xf0, 0x04, 0x04, 0x0c, 0x24, 0x04, 0x0d, 
-       0x0c, 0x2d, 0x26, 0x00, 0x43, 0xf6, 0x4f, 0x0f, 
-       0x62, 0x3e, 0x61, 0xfe, 0x61, 0xbe, 0xf7, 0xff, 
-       0xfe, 0x9b, 0x2d, 0x00, 0xd0, 0x13, 0x2c, 0x00, 
-       0xd0, 0x11, 0x0c, 0xf0, 0x42, 0x85, 0xd0, 0x0e, 
-       0x42, 0x84, 0xd0, 0x0c, 0x80, 0x3c, 0x80, 0xbd, 
-       0x20, 0x00, 0x61, 0x3e, 0x22, 0x00, 0x61, 0x78, 
-       0xb4, 0x04, 0x4b, 0x05, 0x22, 0xff, 0x21, 0x00, 
-       0xf7, 0xff, 0xfe, 0x28, 0xb0, 0x01, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x07, 0x74, 
-       0x2e, 0x00, 0x66, 0x19, 0x56, 0x47, 0x41, 0x38, 
-       0x78, 0x31, 0x36, 0x00, 0xb5, 0x00, 0xb0, 0x81, 
-       0x48, 0x05, 0x69, 0xc0, 0x68, 0x80, 0x46, 0x6b, 
-       0x22, 0x00, 0x21, 0x00, 0xf0, 0x0d, 0xfe, 0x7a, 
-       0xb0, 0x01, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x55, 0x10, 0xb5, 0xf0, 0x27, 0x00, 
-       0xb0, 0x85, 0x97, 0x00, 0x26, 0x10, 0x96, 0x01, 
-       0x25, 0x05, 0x01, 0xed, 0x95, 0x02, 0x20, 0xff, 
-       0x30, 0xd1, 0x90, 0x03, 0x97, 0x04, 0x22, 0x00, 
-       0x21, 0x00, 0xb4, 0x06, 0x4c, 0x0d, 0x69, 0xe0, 
-       0x68, 0x81, 0x1c, 0x08, 0xaa, 0x02, 0x1c, 0x3b, 
-       0xf0, 0x0e, 0xf8, 0xe2, 0xb0, 0x02, 0x97, 0x00, 
-       0x20, 0xff, 0x30, 0xd1, 0x90, 0x01, 0x95, 0x02, 
-       0x96, 0x03, 0x97, 0x04, 0x69, 0xe0, 0x68, 0x80, 
-       0x46, 0x69, 0xf0, 0x0e, 0xf8, 0x13, 0xf7, 0xff, 
-       0xff, 0xc9, 0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x55, 0x10, 
-       0xb5, 0x90, 0x20, 0x07, 0xb0, 0x85, 0xf0, 0x03, 
-       0xfb, 0xfd, 0x24, 0xff, 0x34, 0xe1, 0x22, 0x05, 
-       0x01, 0xd2, 0x21, 0x00, 0x20, 0x07, 0x1c, 0x23, 
-       0xf0, 0x03, 0xfc, 0x0c, 0x27, 0x00, 0x22, 0x00, 
-       0x21, 0x02, 0x20, 0x07, 0x1c, 0x3b, 0xf0, 0x03, 
-       0xff, 0xcf, 0x22, 0x01, 0x21, 0x01, 0x20, 0x07, 
-       0x1c, 0x3b, 0xf0, 0x03, 0xff, 0x67, 0x22, 0x32, 
-       0x21, 0x32, 0x20, 0x07, 0xf0, 0x03, 0xfc, 0xc2, 
-       0x97, 0x00, 0x97, 0x01, 0x20, 0x05, 0x01, 0xc0, 
-       0x90, 0x02, 0x94, 0x03, 0x97, 0x04, 0x48, 0x06, 
-       0x69, 0xc0, 0x68, 0x80, 0x46, 0x69, 0xf0, 0x0d, 
-       0xff, 0xdd, 0xf7, 0xff, 0xff, 0x93, 0xb0, 0x05, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x55, 0x10, 0xb4, 0x80, 0x01, 0x00, 
-       0x4b, 0x2a, 0x18, 0xc0, 0x4b, 0x2a, 0x69, 0xdb, 
-       0x69, 0x9f, 0x00, 0x8b, 0x18, 0x59, 0x02, 0x09, 
-       0x18, 0x89, 0x18, 0x79, 0x78, 0x02, 0x70, 0x0a, 
-       0x78, 0x42, 0x1d, 0xcb, 0x33, 0x39, 0x74, 0x1a, 
-       0x78, 0x82, 0x1d, 0xcb, 0x33, 0x99, 0x70, 0x1a, 
-       0x78, 0xc2, 0x1d, 0xcb, 0x33, 0xd9, 0x74, 0x1a, 
-       0x79, 0x02, 0x1d, 0xcb, 0x33, 0xff, 0x33, 0x3a, 
-       0x70, 0x1a, 0x79, 0x42, 0x1d, 0xcb, 0x33, 0xff, 
-       0x33, 0x7a, 0x74, 0x1a, 0x79, 0x82, 0x1d, 0xcb, 
-       0x33, 0xff, 0x33, 0xda, 0x70, 0x1a, 0x79, 0xc2, 
-       0x23, 0x11, 0x01, 0x5b, 0x18, 0xcb, 0x74, 0x1a, 
-       0x7a, 0x02, 0x23, 0x05, 0x01, 0xdb, 0x18, 0xcb, 
-       0x70, 0x1a, 0x7a, 0x42, 0x23, 0x0b, 0x01, 0x9b, 
-       0x18, 0xcb, 0x74, 0x1a, 0x7a, 0x82, 0x23, 0x19, 
-       0x01, 0x5b, 0x18, 0xcb, 0x70, 0x1a, 0x7a, 0xc2, 
-       0x23, 0x1b, 0x01, 0x5b, 0x18, 0xcb, 0x74, 0x1a, 
-       0x7b, 0x02, 0x23, 0x0f, 0x01, 0x9b, 0x18, 0xcb, 
-       0x70, 0x1a, 0x7b, 0x42, 0x23, 0x01, 0x02, 0x9b, 
-       0x18, 0xcb, 0x74, 0x1a, 0x7b, 0x82, 0x23, 0x23, 
-       0x01, 0x5b, 0x18, 0xcb, 0x70, 0x1a, 0x7b, 0xc0, 
-       0x23, 0x25, 0x01, 0x5b, 0x18, 0xc9, 0x74, 0x08, 
-       0xbc, 0x80, 0x47, 0x70, 0x2e, 0x08, 0x07, 0x98, 
-       0x2e, 0x08, 0x55, 0x10, 0xb5, 0xb0, 0x23, 0x00, 
-       0x1c, 0x07, 0x56, 0xc0, 0x1c, 0x14, 0x1c, 0x0d, 
-       0x28, 0x00, 0xd0, 0x0f, 0x20, 0x50, 0x1c, 0x21, 
-       0xf0, 0x12, 0xf9, 0x96, 0x19, 0x41, 0x23, 0x00, 
-       0x56, 0xf8, 0x1c, 0x22, 0xf7, 0xff, 0xff, 0x92, 
-       0x23, 0x00, 0x37, 0x01, 0x56, 0xf8, 0x34, 0x01, 
-       0x28, 0x00, 0xd1, 0xef, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0x90, 0x06, 0x00, 0x0e, 0x00, 
-       0x04, 0x09, 0x14, 0x09, 0x04, 0x17, 0x14, 0x3f, 
-       0x09, 0x03, 0xb0, 0x81, 0x4a, 0x08, 0x5c, 0xd4, 
-       0xab, 0x00, 0x70, 0x1c, 0x07, 0x00, 0x0f, 0x00, 
-       0x5c, 0x10, 0x70, 0x58, 0x20, 0x00, 0x70, 0x98, 
-       0x46, 0x68, 0x1c, 0x3a, 0xf7, 0xff, 0xff, 0xce, 
-       0xb0, 0x01, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x17, 0xb0, 0xb5, 0x90, 0x04, 0x00, 
-       0x0c, 0x00, 0x04, 0x09, 0x14, 0x09, 0x04, 0x17, 
-       0x14, 0x3f, 0x0b, 0x03, 0xb0, 0x82, 0x4a, 0x0f, 
-       0x5c, 0xd4, 0xab, 0x00, 0x70, 0x1c, 0x0a, 0x03, 
-       0x07, 0x1b, 0x0f, 0x1b, 0x5c, 0xd4, 0xab, 0x00, 
-       0x70, 0x5c, 0x09, 0x03, 0x07, 0x1b, 0x0f, 0x1b, 
-       0x5c, 0xd4, 0xab, 0x00, 0x70, 0x9c, 0x07, 0x00, 
-       0x0f, 0x00, 0x5c, 0x10, 0x70, 0xd8, 0x20, 0x00, 
-       0x71, 0x18, 0x46, 0x68, 0x1c, 0x3a, 0xf7, 0xff, 
-       0xff, 0xa5, 0xb0, 0x02, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x17, 0xb0, 
-       0xb5, 0x90, 0x04, 0x0f, 0x14, 0x3f, 0x04, 0x12, 
-       0x14, 0x12, 0x0f, 0x03, 0xb0, 0x83, 0x49, 0x1b, 
-       0x5c, 0xcc, 0xab, 0x00, 0x70, 0x1c, 0x0e, 0x03, 
-       0x07, 0x1b, 0x0f, 0x1b, 0x5c, 0xcc, 0xab, 0x00, 
-       0x70, 0x5c, 0x0d, 0x03, 0x07, 0x1b, 0x0f, 0x1b, 
-       0x5c, 0xcc, 0xab, 0x00, 0x70, 0x9c, 0x0c, 0x03, 
-       0x07, 0x1b, 0x0f, 0x1b, 0x5c, 0xcc, 0xab, 0x00, 
-       0x70, 0xdc, 0x0b, 0x03, 0x07, 0x1b, 0x0f, 0x1b, 
-       0x5c, 0xcc, 0xab, 0x01, 0x70, 0x1c, 0x0a, 0x03, 
-       0x07, 0x1b, 0x0f, 0x1b, 0x5c, 0xcc, 0xab, 0x01, 
-       0x70, 0x5c, 0x09, 0x03, 0x07, 0x1b, 0x0f, 0x1b, 
-       0x5c, 0xcc, 0xab, 0x01, 0x70, 0x9c, 0x07, 0x00, 
-       0x0f, 0x00, 0x5c, 0x08, 0x70, 0xd8, 0x20, 0x00, 
-       0x71, 0x18, 0x46, 0x68, 0x1c, 0x39, 0xf7, 0xff, 
-       0xff, 0x65, 0xb0, 0x03, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x17, 0xb0, 
-       0xb5, 0xf0, 0x1c, 0x04, 0x04, 0x10, 0x14, 0x00, 
-       0xb0, 0x81, 0x90, 0x00, 0x04, 0x1e, 0x14, 0x36, 
-       0x22, 0x3c, 0x1c, 0x20, 0x1c, 0x0f, 0xb0, 0x85, 
-       0xf0, 0x12, 0xf9, 0x2a, 0xa3, 0x72, 0xcb, 0x0c, 
-       0xf0, 0x12, 0xf9, 0x36, 0xf0, 0x12, 0xf9, 0x38, 
-       0x4d, 0x71, 0x5c, 0x28, 0xab, 0x02, 0x70, 0x18, 
-       0x22, 0x38, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x12, 
-       0xf9, 0x1b, 0xa3, 0x6b, 0xcb, 0x0c, 0xf0, 0x12, 
-       0xf9, 0x27, 0xf0, 0x12, 0xf9, 0x29, 0x5c, 0x28, 
-       0xab, 0x02, 0x70, 0x58, 0x22, 0x34, 0x1c, 0x20, 
-       0x1c, 0x39, 0xf0, 0x12, 0xf9, 0x0d, 0xa3, 0x64, 
-       0xcb, 0x0c, 0xf0, 0x12, 0xf9, 0x19, 0xf0, 0x12, 
-       0xf9, 0x1b, 0x5c, 0x28, 0xab, 0x02, 0x70, 0x98, 
-       0x22, 0x30, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x12, 
-       0xf8, 0xff, 0xa3, 0x5d, 0xcb, 0x0c, 0xf0, 0x12, 
-       0xf9, 0x0b, 0xf0, 0x12, 0xf9, 0x0d, 0x5c, 0x28, 
-       0xab, 0x02, 0x70, 0xd8, 0x22, 0x2c, 0x1c, 0x20, 
-       0x1c, 0x39, 0xf0, 0x12, 0xf8, 0xf1, 0xa3, 0x56, 
-       0xcb, 0x0c, 0xf0, 0x12, 0xf8, 0xfd, 0xf0, 0x12, 
-       0xf8, 0xff, 0x5c, 0x28, 0xab, 0x03, 0x70, 0x18, 
-       0x22, 0x28, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x12, 
-       0xf8, 0xe3, 0xa3, 0x4f, 0xcb, 0x0c, 0xf0, 0x12, 
-       0xf8, 0xef, 0xf0, 0x12, 0xf8, 0xf1, 0x5c, 0x28, 
-       0xab, 0x03, 0x70, 0x58, 0x22, 0x24, 0x1c, 0x20, 
-       0x1c, 0x39, 0xf0, 0x12, 0xf8, 0xd5, 0xa3, 0x48, 
-       0xcb, 0x0c, 0xf0, 0x12, 0xf8, 0xe1, 0xf0, 0x12, 
-       0xf8, 0xe3, 0x5c, 0x28, 0xab, 0x03, 0x70, 0x98, 
-       0x22, 0x20, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x12, 
-       0xf8, 0xc7, 0xa3, 0x41, 0xcb, 0x0c, 0xf0, 0x12, 
-       0xf8, 0xd3, 0xf0, 0x12, 0xf8, 0xd5, 0x5c, 0x28, 
-       0xab, 0x03, 0x70, 0xd8, 0x22, 0x1c, 0x1c, 0x20, 
-       0x1c, 0x39, 0xf0, 0x12, 0xf8, 0xb9, 0xa3, 0x3a, 
-       0xcb, 0x0c, 0xf0, 0x12, 0xf8, 0xc5, 0xf0, 0x12, 
-       0xf8, 0xc7, 0x5c, 0x28, 0xab, 0x00, 0x70, 0x18, 
-       0x22, 0x18, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x12, 
-       0xf8, 0xab, 0xa3, 0x33, 0xcb, 0x0c, 0xf0, 0x12, 
-       0xf8, 0xb7, 0xf0, 0x12, 0xf8, 0xb9, 0x5c, 0x28, 
-       0xab, 0x00, 0x70, 0x58, 0x22, 0x14, 0x1c, 0x20, 
-       0x1c, 0x39, 0xf0, 0x12, 0xf8, 0x9d, 0xa3, 0x2c, 
-       0xcb, 0x0c, 0xf0, 0x12, 0xf8, 0xa9, 0xf0, 0x12, 
-       0xf8, 0xab, 0x5c, 0x28, 0xab, 0x00, 0x70, 0x98, 
-       0x22, 0x10, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x12, 
-       0xf8, 0x8f, 0xa3, 0x25, 0xcb, 0x0c, 0xf0, 0x12, 
-       0xf8, 0x9b, 0xf0, 0x12, 0xf8, 0x9d, 0x5c, 0x28, 
-       0xab, 0x00, 0x70, 0xd8, 0x22, 0x0c, 0x1c, 0x20, 
-       0x1c, 0x39, 0xf0, 0x12, 0xf8, 0x81, 0xa3, 0x1e, 
-       0xcb, 0x0c, 0xf0, 0x12, 0xf8, 0x8d, 0xf0, 0x12, 
-       0xf8, 0x8f, 0x5c, 0x28, 0xab, 0x01, 0x70, 0x18, 
-       0x22, 0x08, 0x1c, 0x20, 0x1c, 0x39, 0xf0, 0x12, 
-       0xf8, 0x73, 0xa3, 0x17, 0xcb, 0x0c, 0xf0, 0x12, 
-       0xf8, 0x7f, 0xf0, 0x12, 0xf8, 0x81, 0x5c, 0x28, 
-       0xab, 0x01, 0x70, 0x58, 0x22, 0x04, 0x1c, 0x20, 
-       0x1c, 0x39, 0xf0, 0x12, 0xf8, 0x65, 0xa3, 0x10, 
-       0xcb, 0x0c, 0xf0, 0x12, 0xf8, 0x71, 0xf0, 0x12, 
-       0xf8, 0x73, 0x5c, 0x28, 0xab, 0x01, 0x70, 0x98, 
-       0xa3, 0x0b, 0xcb, 0x0c, 0x1c, 0x20, 0x1c, 0x39, 
-       0xf0, 0x12, 0xf8, 0x66, 0xf0, 0x12, 0xf8, 0x68, 
-       0x5c, 0x28, 0xab, 0x01, 0x70, 0xd8, 0x20, 0x00, 
-       0x73, 0x18, 0x46, 0x68, 0x99, 0x05, 0x1c, 0x32, 
-       0x33, 0x0c, 0xf7, 0xff, 0xfe, 0x6f, 0xb0, 0x06, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 
-       0x2e, 0x08, 0x17, 0xb0, 0x21, 0x00, 0xb0, 0x81, 
-       0x91, 0x00, 0xe0, 0x02, 0x99, 0x00, 0x31, 0x01, 
-       0x91, 0x00, 0x99, 0x00, 0x42, 0x81, 0xdb, 0xf9, 
-       0xb0, 0x01, 0x47, 0x70, 0xb5, 0xf0, 0x06, 0x06, 
-       0x0e, 0x36, 0x25, 0x02, 0x48, 0x0d, 0x60, 0x05, 
-       0x27, 0x07, 0x4c, 0x0d, 0x60, 0x25, 0x20, 0x01, 
-       0x40, 0xb8, 0x40, 0x30, 0xd0, 0x01, 0x20, 0x03, 
-       0xe0, 0x00, 0x20, 0x02, 0x49, 0x09, 0x60, 0x08, 
-       0x20, 0x0a, 0xf7, 0xff, 0xff, 0xdf, 0x20, 0x03, 
-       0x60, 0x20, 0x20, 0x0c, 0xf7, 0xff, 0xff, 0xda, 
-       0x3f, 0x01, 0xd5, 0xeb, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x6e, 0x00, 0x14, 0x00, 
-       0x6e, 0x00, 0x13, 0x00, 0x6e, 0x00, 0x12, 0x00, 
-       0xb5, 0x80, 0x06, 0x00, 0x0e, 0x00, 0x06, 0x0f, 
-       0x0e, 0x3f, 0x06, 0x00, 0x0e, 0x00, 0x23, 0x80, 
-       0x43, 0x18, 0xf7, 0xff, 0xff, 0xcf, 0x20, 0x14, 
-       0xf7, 0xff, 0xff, 0xc0, 0x1c, 0x38, 0xf7, 0xff, 
-       0xff, 0xc9, 0x20, 0x03, 0x49, 0x04, 0x60, 0x08, 
-       0x20, 0x00, 0x49, 0x04, 0x60, 0x08, 0x49, 0x04, 
-       0x60, 0x08, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x6e, 0x00, 0x14, 0x00, 0x6e, 0x00, 0x12, 0x00, 
-       0x6e, 0x00, 0x13, 0x00, 0xb5, 0x00, 0x21, 0x01, 
-       0x20, 0x02, 0xf7, 0xff, 0xff, 0xd9, 0x48, 0x10, 
-       0xf7, 0xff, 0xff, 0xa4, 0x21, 0x00, 0x20, 0x02, 
-       0xf7, 0xff, 0xff, 0xd2, 0x48, 0x0d, 0xf7, 0xff, 
-       0xff, 0x9d, 0x21, 0x44, 0x20, 0x00, 0xf7, 0xff, 
-       0xff, 0xcb, 0x21, 0x81, 0x20, 0x01, 0xf7, 0xff, 
-       0xff, 0xc7, 0x21, 0xf0, 0x20, 0x02, 0xf7, 0xff, 
-       0xff, 0xc3, 0x21, 0x45, 0x20, 0x03, 0xf7, 0xff, 
-       0xff, 0xbf, 0x21, 0x45, 0x20, 0x04, 0xf7, 0xff, 
-       0xff, 0xbb, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x00, 0x00, 0x4e, 0x20, 0x00, 0x00, 0xc3, 0x50, 
-       0xb5, 0x80, 0x06, 0x07, 0x0e, 0x3f, 0x06, 0x08, 
-       0x0e, 0x00, 0x28, 0x45, 0xdd, 0x00, 0x20, 0x45, 
-       0x1d, 0xc1, 0x31, 0x79, 0x20, 0x03, 0xf7, 0xff, 
-       0xff, 0xa7, 0x2f, 0x45, 0xdd, 0x00, 0x27, 0x45, 
-       0x20, 0x04, 0x1d, 0xf9, 0x31, 0x79, 0xf7, 0xff, 
-       0xff, 0x9f, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0x00, 0xf0, 0x15, 0xfe, 0xeb, 0x23, 0x01, 
-       0x03, 0x5b, 0x43, 0x18, 0xf0, 0x15, 0xfe, 0xea, 
-       0xf0, 0x15, 0xfe, 0xe4, 0x23, 0x01, 0x03, 0x9b, 
-       0x43, 0x18, 0xf0, 0x15, 0xfe, 0xe3, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0x00, 0xf0, 0x15, 0xfe, 0xda, 
-       0x4b, 0x05, 0x40, 0x18, 0xf0, 0x15, 0xfe, 0xda, 
-       0xf0, 0x15, 0xfe, 0xd4, 0x4b, 0x03, 0x40, 0x18, 
-       0xf0, 0x15, 0xfe, 0xd4, 0xbc, 0x08, 0x47, 0x18, 
-       0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xdf, 0xff, 
-       0xb5, 0x80, 0x07, 0x01, 0x0f, 0x09, 0x29, 0x02, 
-       0xd2, 0x19, 0x00, 0x89, 0x4a, 0x0d, 0x58, 0x51, 
-       0x4f, 0x0d, 0x0c, 0x00, 0x60, 0x39, 0xd3, 0x05, 
-       0x23, 0x01, 0x02, 0x5b, 0x68, 0x08, 0x43, 0x18, 
-       0x60, 0x08, 0xe0, 0x03, 0x68, 0x08, 0x4b, 0x09, 
-       0x40, 0x18, 0x60, 0x08, 0xf7, 0xff, 0xff, 0xc4, 
-       0x68, 0x38, 0xf0, 0x0e, 0xfb, 0xb1, 0x20, 0x00, 
-       0x61, 0xb8, 0xf7, 0xff, 0xff, 0xce, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x3c, 
-       0x2e, 0x08, 0x17, 0xc0, 0xff, 0xff, 0xfd, 0xff, 
-       0xb5, 0x00, 0x4a, 0x09, 0x1f, 0x11, 0x20, 0x0e, 
-       0xf0, 0x0e, 0xfb, 0x58, 0x28, 0x00, 0xd1, 0x09, 
-       0x48, 0x06, 0xf0, 0x0e, 0xfb, 0x99, 0x49, 0x06, 
-       0x20, 0x0e, 0xf0, 0x15, 0xfe, 0x9b, 0xf7, 0xff, 
-       0xff, 0xb4, 0x20, 0x00, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x17, 0xd8, 0x2e, 0x08, 0x19, 0x00, 
-       0x2e, 0x00, 0x6e, 0x0b, 0xb5, 0x00, 0xf7, 0xff, 
-       0xff, 0x97, 0x21, 0x00, 0x20, 0x0e, 0xf0, 0x15, 
-       0xfe, 0x89, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x00, 
-       0x48, 0x04, 0x7d, 0x01, 0x29, 0x01, 0xd1, 0x02, 
-       0x69, 0x80, 0xf0, 0x00, 0xf8, 0x05, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x17, 0xc0, 
-       0xb5, 0x90, 0x1c, 0x07, 0x4c, 0x12, 0x68, 0x20, 
-       0x49, 0x12, 0x42, 0x88, 0xd1, 0x01, 0x0b, 0x38, 
-       0xd1, 0x1a, 0xf7, 0xff, 0xff, 0x79, 0x60, 0x67, 
-       0x69, 0x21, 0x1c, 0x38, 0x29, 0x00, 0xd1, 0x11, 
-       0x68, 0xe1, 0x1c, 0x4a, 0x68, 0xe1, 0x60, 0xe2, 
-       0x00, 0x89, 0x4a, 0x0b, 0x50, 0x50, 0x68, 0xe0, 
-       0x28, 0x64, 0xd1, 0x01, 0x20, 0x00, 0x60, 0xe0, 
-       0x68, 0xe0, 0x68, 0xa1, 0x42, 0x88, 0xd1, 0x01, 
-       0x20, 0x01, 0x61, 0x20, 0xf7, 0xff, 0xff, 0x71, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x17, 0xc0, 0x2e, 0x08, 0x19, 0x00, 
-       0x2e, 0x08, 0x4c, 0xe8, 0xb5, 0x90, 0x1c, 0x07, 
-       0xf7, 0xff, 0xff, 0x52, 0x48, 0x10, 0x69, 0x01, 
-       0x24, 0x00, 0x29, 0x00, 0xd1, 0x03, 0x68, 0x81, 
-       0x68, 0xc2, 0x42, 0x91, 0xd0, 0x12, 0x68, 0x81, 
-       0x1c, 0x4a, 0x68, 0x81, 0x60, 0x82, 0x00, 0x89, 
-       0x4a, 0x0a, 0x58, 0x51, 0x60, 0x39, 0x68, 0x81, 
-       0x29, 0x64, 0xd1, 0x00, 0x60, 0x84, 0x61, 0x04, 
-       0xf7, 0xff, 0xff, 0x4b, 0x20, 0x01, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0xf7, 0xff, 0xff, 0x45, 
-       0x1c, 0x20, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x17, 0xc0, 0x2e, 0x08, 0x4c, 0xe8, 
-       0xb5, 0x80, 0xb0, 0x81, 0x4f, 0x0e, 0x8e, 0xb8, 
-       0x28, 0x00, 0xd1, 0x04, 0x46, 0x68, 0xf7, 0xff, 
-       0xff, 0xcd, 0x28, 0x00, 0xd1, 0x05, 0x20, 0x00, 
-       0x43, 0xc0, 0xb0, 0x01, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x98, 0x00, 0x49, 0x07, 0x60, 0x08, 
-       0x20, 0x08, 0x85, 0x38, 0x20, 0x04, 0x85, 0x78, 
-       0x20, 0x0f, 0x02, 0x40, 0x86, 0xb8, 0x20, 0x01, 
-       0xb0, 0x01, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x2c, 0x00, 0x1f, 0xc0, 0x2c, 0x00, 0x1e, 0x00, 
-       0x06, 0x00, 0x16, 0x00, 0x28, 0x30, 0xdb, 0x03, 
-       0x28, 0x39, 0xdc, 0x01, 0x20, 0x01, 0x47, 0x70, 
-       0x20, 0x00, 0x47, 0x70, 0xb5, 0xff, 0x26, 0x00, 
-       0x1c, 0x07, 0x20, 0x00, 0x1c, 0x14, 0x22, 0x30, 
-       0x9d, 0x09, 0x54, 0x3a, 0x30, 0x01, 0x28, 0x1f, 
-       0xdb, 0xfb, 0x20, 0x00, 0x77, 0xf8, 0x29, 0x00, 
-       0xda, 0x02, 0x2d, 0x00, 0xd1, 0x00, 0x42, 0x49, 
-       0x25, 0x1e, 0x29, 0x00, 0xd0, 0x14, 0x1c, 0x20, 
-       0xf0, 0x11, 0xfe, 0x78, 0x31, 0x30, 0x55, 0x79, 
-       0x57, 0x79, 0x29, 0x39, 0xdd, 0x07, 0x31, 0x07, 
-       0x55, 0x79, 0x9b, 0x03, 0x2b, 0x00, 0xd0, 0x02, 
-       0x5d, 0x79, 0x31, 0x20, 0x55, 0x79, 0x1c, 0x01, 
-       0x3d, 0x01, 0x36, 0x01, 0x28, 0x00, 0xd1, 0xea, 
-       0x2e, 0x00, 0xd1, 0x00, 0x26, 0x01, 0x1c, 0x30, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0xff, 0x9e, 0x09, 0x20, 0x01, 0x1c, 0x0f, 
-       0x21, 0x00, 0xb0, 0x94, 0x91, 0x12, 0x91, 0x11, 
-       0x91, 0x10, 0x91, 0x0f, 0x91, 0x0e, 0x25, 0x00, 
-       0x42, 0x41, 0x91, 0x0d, 0x21, 0x00, 0x91, 0x0c, 
-       0x1c, 0x14, 0x92, 0x00, 0x23, 0x00, 0x56, 0xe1, 
-       0x29, 0x2b, 0xd0, 0x10, 0xdc, 0x07, 0x29, 0x20, 
-       0xd0, 0x15, 0x29, 0x23, 0xd1, 0x17, 0x21, 0x01, 
-       0x91, 0x0f, 0x18, 0x64, 0xe0, 0x14, 0x29, 0x2d, 
-       0xd0, 0x09, 0x29, 0x30, 0xd1, 0x0f, 0x21, 0x01, 
-       0x91, 0x0e, 0x18, 0x64, 0xe0, 0x0c, 0x21, 0x01, 
-       0x91, 0x12, 0x18, 0x64, 0xe0, 0x08, 0x21, 0x01, 
-       0x91, 0x11, 0x18, 0x64, 0xe0, 0x04, 0x21, 0x01, 
-       0x91, 0x10, 0x18, 0x64, 0xe0, 0x00, 0x20, 0x00, 
-       0x28, 0x00, 0xd1, 0xdb, 0x23, 0x00, 0x56, 0xe0, 
-       0xf7, 0xff, 0xff, 0x8a, 0x28, 0x00, 0xd0, 0x15, 
-       0x25, 0x00, 0x23, 0x00, 0x56, 0xe0, 0xf7, 0xff, 
-       0xff, 0x83, 0x28, 0x00, 0xd0, 0x19, 0x00, 0xa8, 
-       0x19, 0x40, 0x00, 0x40, 0x23, 0x00, 0x56, 0xe1, 
-       0x18, 0x08, 0x34, 0x01, 0x1f, 0xc5, 0x3d, 0x29, 
-       0x56, 0xe0, 0xf7, 0xff, 0xff, 0x75, 0x28, 0x00, 
-       0xd1, 0xf1, 0xe0, 0x0a, 0x23, 0x00, 0x56, 0xe0, 
-       0x28, 0x2a, 0xd1, 0x06, 0x9b, 0x17, 0xcb, 0x20, 
-       0x93, 0x17, 0x68, 0x30, 0x30, 0x01, 0x60, 0x30, 
-       0x34, 0x01, 0x23, 0x00, 0x56, 0xe0, 0x28, 0x2e, 
-       0xd1, 0x16, 0x20, 0x00, 0x90, 0x0d, 0x34, 0x01, 
-       0x56, 0xe0, 0xf7, 0xff, 0xff, 0x5d, 0x28, 0x00, 
-       0xd0, 0x0e, 0x98, 0x0d, 0x00, 0x83, 0x18, 0x18, 
-       0x00, 0x40, 0x23, 0x00, 0x56, 0xe1, 0x18, 0x08, 
-       0x38, 0x30, 0x90, 0x0d, 0x34, 0x01, 0x56, 0xe0, 
-       0xf7, 0xff, 0xff, 0x4e, 0x28, 0x00, 0xd1, 0xf0, 
-       0x23, 0x00, 0x56, 0xe0, 0x28, 0x68, 0xd0, 0x01, 
-       0x28, 0x6c, 0xd1, 0x02, 0x90, 0x0c, 0x34, 0x01, 
-       0xe0, 0x04, 0x28, 0x46, 0xd0, 0x01, 0x28, 0x4e, 
-       0xd1, 0x00, 0x34, 0x01, 0x23, 0x00, 0x56, 0xe0, 
-       0x21, 0x25, 0x34, 0x01, 0x28, 0x67, 0xd0, 0x12, 
-       0xdc, 0x1d, 0x28, 0x63, 0xd0, 0x54, 0xdc, 0x08, 
-       0x28, 0x25, 0xd0, 0x73, 0x28, 0x45, 0xd0, 0x0a, 
-       0x28, 0x47, 0xd0, 0x08, 0x28, 0x58, 0xd1, 0x6e, 
-       0xe0, 0x53, 0x28, 0x64, 0xd0, 0x6c, 0x28, 0x65, 
-       0xd0, 0x01, 0x28, 0x66, 0xd1, 0x67, 0x98, 0x0c, 
-       0x28, 0x6c, 0xd1, 0x66, 0x68, 0x30, 0x30, 0x03, 
-       0x60, 0x30, 0x22, 0x08, 0x99, 0x17, 0xa8, 0x09, 
-       0xf0, 0x11, 0xfd, 0xe0, 0xe0, 0xe5, 0x28, 0x70, 
-       0xd0, 0x3d, 0xdc, 0x36, 0x28, 0x69, 0xd0, 0x57, 
-       0x28, 0x6e, 0xd0, 0x57, 0x28, 0x6f, 0xd1, 0x52, 
-       0x68, 0x30, 0x30, 0x01, 0x60, 0x30, 0x9b, 0x17, 
-       0x68, 0x19, 0x91, 0x13, 0x98, 0x0c, 0x28, 0x68, 
-       0xd1, 0x09, 0x99, 0x13, 0x04, 0x09, 0x0c, 0x09, 
-       0x91, 0x13, 0x0c, 0x08, 0xd3, 0x03, 0x99, 0x13, 
-       0x4b, 0xeb, 0x43, 0x19, 0x91, 0x13, 0x22, 0x01, 
-       0xb4, 0x04, 0x23, 0x00, 0x22, 0x08, 0x99, 0x14, 
-       0xa8, 0x02, 0xf7, 0xff, 0xfe, 0xff, 0xb0, 0x01, 
-       0x99, 0x0f, 0x1c, 0x06, 0x29, 0x00, 0xd0, 0x03, 
-       0x99, 0x13, 0x29, 0x00, 0xd0, 0x00, 0x3e, 0x01, 
-       0x99, 0x12, 0x29, 0x00, 0xd0, 0x55, 0x20, 0x2b, 
-       0x68, 0x39, 0x70, 0x08, 0x31, 0x01, 0x60, 0x39, 
-       0x2d, 0x00, 0xd0, 0x73, 0x3d, 0x01, 0xe0, 0xe7, 
-       0xe0, 0x3f, 0x28, 0x73, 0xd0, 0x6f, 0x28, 0x75, 
-       0xd0, 0x6e, 0x28, 0x78, 0xd1, 0x1b, 0x23, 0x01, 
-       0x93, 0x0b, 0x68, 0x30, 0x30, 0x01, 0x60, 0x30, 
-       0x23, 0x1f, 0x1f, 0xe0, 0x38, 0x19, 0x56, 0xc0, 
-       0x28, 0x58, 0xd1, 0x01, 0x23, 0x00, 0x93, 0x0b, 
-       0x9b, 0x17, 0x68, 0x19, 0x98, 0x0c, 0x28, 0x68, 
-       0xd1, 0x05, 0x04, 0x09, 0x0c, 0x09, 0x0c, 0x08, 
-       0xd3, 0x01, 0x4b, 0xcd, 0x43, 0x19, 0x22, 0x01, 
-       0xb4, 0x04, 0xe0, 0x04, 0xe0, 0x16, 0xe1, 0x88, 
-       0xe0, 0x28, 0xe0, 0x7e, 0xe0, 0x91, 0x22, 0x10, 
-       0x9b, 0x0c, 0xa8, 0x02, 0xf7, 0xff, 0xfe, 0xbe, 
-       0xb0, 0x01, 0x99, 0x12, 0x1c, 0x06, 0x29, 0x00, 
-       0xd0, 0x52, 0x20, 0x2b, 0x68, 0x39, 0x70, 0x08, 
-       0x31, 0x01, 0x60, 0x39, 0x2d, 0x00, 0xd0, 0x57, 
-       0x3d, 0x01, 0xe1, 0x0a, 0x68, 0x38, 0x70, 0x01, 
-       0x30, 0x01, 0x23, 0x00, 0x60, 0x38, 0x70, 0x03, 
-       0xe1, 0x70, 0x68, 0x30, 0x30, 0x01, 0x60, 0x30, 
-       0x98, 0x17, 0x68, 0x01, 0x68, 0x38, 0x70, 0x01, 
-       0x30, 0x01, 0x23, 0x00, 0x60, 0x38, 0x70, 0x03, 
-       0xe1, 0x64, 0xe0, 0x74, 0x68, 0x30, 0x30, 0x01, 
-       0x60, 0x30, 0x98, 0x17, 0x68, 0x01, 0x91, 0x13, 
-       0x98, 0x0c, 0x28, 0x68, 0xd1, 0x09, 0x99, 0x13, 
-       0x04, 0x09, 0x0c, 0x09, 0x91, 0x13, 0x0c, 0x08, 
-       0xd3, 0x03, 0x99, 0x13, 0x4b, 0xac, 0x43, 0x19, 
-       0x91, 0x13, 0x22, 0x00, 0xb4, 0x04, 0x23, 0x00, 
-       0x22, 0x0a, 0x99, 0x14, 0xa8, 0x02, 0xf7, 0xff, 
-       0xfe, 0x81, 0xb0, 0x01, 0x1c, 0x06, 0x20, 0x2d, 
-       0x99, 0x12, 0x29, 0x00, 0xd0, 0x15, 0x99, 0x13, 
-       0x29, 0x00, 0xe0, 0x02, 0xe0, 0x87, 0xe0, 0x5a, 
-       0xe0, 0x97, 0xda, 0x04, 0x68, 0x39, 0x70, 0x08, 
-       0x31, 0x01, 0x60, 0x39, 0xe0, 0x04, 0x20, 0x2b, 
-       0x68, 0x39, 0x70, 0x08, 0x31, 0x01, 0x60, 0x39, 
-       0x2d, 0x00, 0xd0, 0x65, 0x3d, 0x01, 0xe0, 0x76, 
-       0xe0, 0xb4, 0x99, 0x10, 0x29, 0x00, 0xd0, 0x11, 
-       0x99, 0x13, 0x29, 0x00, 0xda, 0x05, 0x68, 0x39, 
-       0x70, 0x08, 0x31, 0x01, 0x60, 0x39, 0xe0, 0x05, 
-       0xe0, 0xb3, 0x21, 0x20, 0x68, 0x38, 0x70, 0x01, 
-       0x30, 0x01, 0x60, 0x38, 0x2d, 0x00, 0xd0, 0x4f, 
-       0x3d, 0x01, 0xe0, 0x60, 0x99, 0x13, 0x29, 0x00, 
-       0xda, 0x5d, 0x68, 0x39, 0x70, 0x08, 0x31, 0x01, 
-       0x60, 0x39, 0x2d, 0x00, 0xd0, 0x44, 0x3d, 0x01, 
-       0xe0, 0xab, 0x68, 0x30, 0x30, 0x02, 0x60, 0x30, 
-       0x22, 0x08, 0x99, 0x17, 0xa8, 0x09, 0xf0, 0x11, 
-       0xfc, 0xf9, 0x68, 0x38, 0xa1, 0x85, 0x22, 0x10, 
-       0xf0, 0x11, 0xfc, 0xf4, 0x68, 0x38, 0xf0, 0x11, 
-       0xfd, 0x35, 0x68, 0x39, 0x18, 0x40, 0x60, 0x38, 
-       0xe0, 0xf8, 0x68, 0x30, 0x30, 0x01, 0x60, 0x30, 
-       0x98, 0x17, 0x68, 0x00, 0x68, 0x39, 0x9a, 0x14, 
-       0x1a, 0x89, 0x60, 0x01, 0xe0, 0xee, 0x99, 0x10, 
-       0x29, 0x00, 0xd0, 0x21, 0x21, 0x20, 0x68, 0x38, 
-       0x70, 0x01, 0x30, 0x01, 0x60, 0x38, 0x2d, 0x00, 
-       0xd0, 0x1a, 0x3d, 0x01, 0xe0, 0x81, 0x68, 0x30, 
-       0x30, 0x01, 0x60, 0x30, 0x98, 0x17, 0xf0, 0x11, 
-       0xfd, 0x15, 0x1c, 0x06, 0x98, 0x0d, 0x28, 0x00, 
-       0xdd, 0x03, 0x98, 0x0d, 0x42, 0xb0, 0xda, 0x00, 
-       0x9e, 0x0d, 0x2d, 0x00, 0xd0, 0x09, 0x21, 0x20, 
-       0x68, 0x38, 0x1c, 0x2a, 0xf0, 0x11, 0xfd, 0x28, 
-       0x23, 0x00, 0x68, 0x38, 0x55, 0x43, 0xe0, 0x03, 
-       0xe0, 0x67, 0x23, 0x00, 0x68, 0x38, 0x55, 0x83, 
-       0x2d, 0x00, 0xd0, 0x0d, 0x42, 0xae, 0xda, 0x0b, 
-       0x99, 0x11, 0x29, 0x00, 0xd1, 0x08, 0x68, 0x38, 
-       0x19, 0x40, 0x1b, 0x80, 0x99, 0x17, 0x1c, 0x32, 
-       0xf0, 0x11, 0xfd, 0x2c, 0xe0, 0x0a, 0xe0, 0x54, 
-       0x2d, 0x00, 0xd0, 0x02, 0x42, 0xae, 0xdb, 0x00, 
-       0x36, 0x01, 0x99, 0x17, 0x68, 0x38, 0x1c, 0x32, 
-       0xf0, 0x11, 0xfd, 0x20, 0x68, 0x38, 0xf0, 0x11, 
-       0xfc, 0xe1, 0x68, 0x39, 0x18, 0x40, 0x60, 0x38, 
-       0xe0, 0xa4, 0x68, 0x30, 0x30, 0x01, 0x60, 0x30, 
-       0x98, 0x17, 0x99, 0x0c, 0x29, 0x68, 0xd1, 0x02, 
-       0x23, 0x01, 0x03, 0xdb, 0x40, 0x18, 0x22, 0x01, 
-       0xb4, 0x04, 0x98, 0x18, 0x68, 0x01, 0x23, 0x00, 
-       0x22, 0x0a, 0xa8, 0x02, 0xf7, 0xff, 0xfd, 0xca, 
-       0xb0, 0x01, 0x99, 0x12, 0x1c, 0x06, 0x29, 0x00, 
-       0xd0, 0x08, 0x20, 0x2b, 0x68, 0x39, 0x70, 0x08, 
-       0x31, 0x01, 0x60, 0x39, 0x2d, 0x00, 0xd0, 0x24, 
-       0x3d, 0x01, 0xe0, 0x22, 0x99, 0x10, 0x29, 0x00, 
-       0xd0, 0x1f, 0x21, 0x20, 0x68, 0x38, 0x70, 0x01, 
-       0x30, 0x01, 0x60, 0x38, 0x2d, 0x00, 0xd0, 0x18, 
-       0x3d, 0x01, 0xe0, 0x16, 0x99, 0x10, 0x29, 0x00, 
-       0xd0, 0x07, 0x21, 0x20, 0x68, 0x38, 0x70, 0x01, 
-       0x30, 0x01, 0x60, 0x38, 0x2d, 0x00, 0xd0, 0x00, 
-       0x3d, 0x01, 0x99, 0x0f, 0x29, 0x00, 0xd0, 0x08, 
-       0x21, 0x30, 0x68, 0x38, 0x70, 0x01, 0x30, 0x01, 
-       0x21, 0x78, 0x60, 0x38, 0x70, 0x01, 0x30, 0x01, 
-       0x60, 0x38, 0x2d, 0x00, 0xd0, 0x48, 0x42, 0xb5, 
-       0xdd, 0x46, 0x99, 0x11, 0x29, 0x00, 0xd0, 0x02, 
-       0x99, 0x0e, 0x29, 0x00, 0xd0, 0x2a, 0x99, 0x0e, 
-       0x29, 0x00, 0xd0, 0x0c, 0x20, 0x00, 0x1b, 0xa9, 
-       0x29, 0x00, 0xdd, 0x14, 0x22, 0x30, 0x68, 0x3b, 
-       0x70, 0x1a, 0x33, 0x01, 0x60, 0x3b, 0x30, 0x01, 
-       0x42, 0x81, 0xdc, 0xf8, 0xe0, 0x0b, 0x20, 0x00, 
-       0x1b, 0xa9, 0x29, 0x00, 0xdd, 0x07, 0x23, 0x20, 
-       0x68, 0x3a, 0x70, 0x13, 0x32, 0x01, 0x60, 0x3a, 
-       0x30, 0x01, 0x42, 0x81, 0xdc, 0xf8, 0x21, 0x20, 
-       0x1b, 0x89, 0xa8, 0x01, 0x18, 0x08, 0x1e, 0x41, 
-       0x68, 0x38, 0xf0, 0x11, 0xfc, 0xd3, 0x68, 0x38, 
-       0xf0, 0x11, 0xfc, 0x68, 0x68, 0x39, 0x18, 0x40, 
-       0x60, 0x38, 0xe0, 0x2b, 0x68, 0x38, 0xf0, 0x11, 
-       0xfc, 0x61, 0x68, 0x39, 0x18, 0x40, 0x60, 0x38, 
-       0x20, 0x00, 0x1b, 0xa9, 0x29, 0x00, 0xdd, 0x07, 
-       0x23, 0x20, 0x68, 0x3a, 0x70, 0x13, 0x32, 0x01, 
-       0x60, 0x3a, 0x30, 0x01, 0x42, 0x81, 0xdc, 0xf8, 
-       0x23, 0x00, 0x68, 0x38, 0x70, 0x03, 0xe0, 0x15, 
-       0x21, 0x20, 0x1b, 0x89, 0xa8, 0x01, 0x18, 0x08, 
-       0x1e, 0x41, 0x68, 0x38, 0xf0, 0x11, 0xfc, 0xae, 
-       0x68, 0x38, 0xf0, 0x11, 0xfc, 0x43, 0x68, 0x39, 
-       0x18, 0x40, 0x23, 0x00, 0x60, 0x38, 0x70, 0x03, 
-       0xe0, 0x04, 0x68, 0x38, 0x70, 0x01, 0x30, 0x01, 
-       0x60, 0x38, 0x9c, 0x00, 0x1c, 0x20, 0xb0, 0x14, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0xff, 0xff, 0x00, 0x00, 0x28, 0x46, 0x50, 0x20, 
-       0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x6b, 
-       0x65, 0x64, 0x29, 0x00, 0xb5, 0x87, 0x23, 0x00, 
-       0x98, 0x01, 0x9f, 0x00, 0x56, 0xc0, 0x28, 0x00, 
-       0xd0, 0x2f, 0xe0, 0x05, 0x30, 0x01, 0x90, 0x01, 
-       0x98, 0x00, 0x70, 0x01, 0x30, 0x01, 0x90, 0x00, 
-       0x23, 0x00, 0x98, 0x01, 0x56, 0xc1, 0x29, 0x25, 
-       0xd0, 0x01, 0x29, 0x00, 0xd1, 0xf2, 0x23, 0x00, 
-       0x99, 0x01, 0x56, 0xc9, 0x29, 0x00, 0xd0, 0x17, 
-       0x23, 0x01, 0x56, 0xc0, 0x28, 0x00, 0xd0, 0x13, 
-       0x20, 0x00, 0xb0, 0x81, 0x90, 0x00, 0x46, 0x6a, 
-       0xb4, 0x04, 0x98, 0x03, 0x1c, 0x42, 0x9b, 0x04, 
-       0x1c, 0x38, 0xa9, 0x02, 0xf7, 0xff, 0xfd, 0x30, 
-       0xb0, 0x01, 0x90, 0x02, 0x98, 0x00, 0x00, 0x80, 
-       0x99, 0x03, 0x18, 0x40, 0x90, 0x03, 0xb0, 0x01, 
-       0x23, 0x00, 0x98, 0x01, 0x56, 0xc0, 0x28, 0x00, 
-       0xd1, 0xd6, 0x20, 0x00, 0x99, 0x00, 0x70, 0x08, 
-       0x31, 0x01, 0x91, 0x00, 0x1c, 0x38, 0xf0, 0x11, 
-       0xfb, 0xe9, 0xb0, 0x03, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0xb4, 0x0f, 0xb5, 0x00, 0x98, 0x01, 
-       0x99, 0x02, 0xaa, 0x03, 0xf7, 0xff, 0xff, 0xb6, 
-       0xbc, 0x08, 0xb0, 0x04, 0x47, 0x18, 0xb4, 0x0f, 
-       0xb5, 0x00, 0xb0, 0xb8, 0x46, 0x68, 0x99, 0x39, 
-       0xaa, 0x3a, 0xf7, 0xff, 0xff, 0xab, 0x46, 0x68, 
-       0xf0, 0x11, 0xfb, 0xd0, 0x1c, 0x01, 0x46, 0x68, 
-       0xf7, 0xf9, 0xfb, 0x7e, 0xb0, 0x38, 0xbc, 0x08, 
-       0xb0, 0x04, 0x47, 0x18, 0x21, 0x00, 0xb0, 0x81, 
-       0x91, 0x00, 0xe0, 0x02, 0x99, 0x00, 0x31, 0x01, 
-       0x91, 0x00, 0x99, 0x00, 0x42, 0x81, 0xd3, 0xf9, 
-       0xb0, 0x01, 0x47, 0x70, 0xb5, 0xf0, 0x06, 0x0d, 
-       0x0e, 0x2d, 0xb0, 0x83, 0x49, 0x23, 0x68, 0x09, 
-       0x91, 0x01, 0x26, 0x09, 0x1d, 0xc4, 0x34, 0x19, 
-       0xab, 0x02, 0x70, 0x1d, 0x20, 0xff, 0x3b, 0x04, 
-       0x70, 0x18, 0x22, 0x01, 0xb4, 0x04, 0x7b, 0x20, 
-       0xa9, 0x03, 0xab, 0x02, 0xf7, 0xfa, 0xf8, 0x0c, 
-       0xb0, 0x01, 0xaf, 0x01, 0x78, 0x3f, 0xab, 0x02, 
-       0x70, 0x1d, 0x20, 0xff, 0x3b, 0x04, 0x70, 0x18, 
-       0x22, 0x01, 0xb4, 0x04, 0x7b, 0x20, 0xa9, 0x03, 
-       0xab, 0x02, 0xf7, 0xf9, 0xff, 0xfd, 0xb0, 0x01, 
-       0xa9, 0x01, 0x78, 0x09, 0x91, 0x00, 0xab, 0x02, 
-       0x70, 0x1d, 0x20, 0xff, 0x3b, 0x04, 0x70, 0x18, 
-       0x22, 0x01, 0xb4, 0x04, 0x7b, 0x20, 0xa9, 0x03, 
-       0xab, 0x02, 0xf7, 0xf9, 0xff, 0xed, 0xb0, 0x01, 
-       0xa8, 0x01, 0x78, 0x00, 0x99, 0x00, 0x42, 0x8f, 
-       0xd1, 0x06, 0x42, 0x87, 0xd1, 0x04, 0x1c, 0x38, 
-       0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x1e, 0x70, 0x06, 0x06, 0x0e, 0x36, 0xd1, 0xc3, 
-       0x20, 0xff, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x02, 0x5e, 0x28, 
-       0xb5, 0xf0, 0x06, 0x0c, 0x0e, 0x24, 0x06, 0x16, 
-       0x0e, 0x36, 0x25, 0x0a, 0xb0, 0x82, 0xab, 0x00, 
-       0x70, 0x1c, 0x70, 0x5e, 0x1c, 0x07, 0x30, 0x20, 
-       0x90, 0x01, 0x98, 0x01, 0x7b, 0x00, 0x46, 0x69, 
-       0x22, 0x02, 0xf7, 0xf9, 0xff, 0x66, 0x1c, 0x38, 
-       0x1c, 0x21, 0xf7, 0xff, 0xff, 0x9b, 0x1c, 0x01, 
-       0x2c, 0x00, 0xd0, 0x05, 0x2c, 0x09, 0xd0, 0x03, 
-       0x2c, 0x1f, 0xd1, 0x03, 0x20, 0x7f, 0xe0, 0x02, 
-       0x20, 0x5e, 0xe0, 0x00, 0x20, 0xff, 0x40, 0x71, 
-       0x40, 0x08, 0xd1, 0x03, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x1e, 0x68, 0x06, 0x05, 
-       0x0e, 0x2d, 0xd1, 0xde, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 0x1c, 0x07, 
-       0x2a, 0x00, 0xd0, 0x01, 0x24, 0x09, 0xe0, 0x00, 
-       0x24, 0x00, 0x00, 0x90, 0x19, 0xc0, 0x6c, 0x02, 
-       0x42, 0x8a, 0xd0, 0x15, 0x64, 0x01, 0x20, 0x03, 
-       0x4a, 0x19, 0x29, 0x01, 0xd0, 0x13, 0x29, 0x02, 
-       0xd0, 0x1f, 0x29, 0x03, 0xd1, 0x0c, 0x60, 0x10, 
-       0x1c, 0x38, 0x1c, 0x21, 0xf7, 0xff, 0xff, 0x66, 
-       0x23, 0xf3, 0x40, 0x18, 0x22, 0x08, 0x43, 0x02, 
-       0x1c, 0x38, 0x1c, 0x21, 0xf7, 0xff, 0xff, 0xac, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x60, 0x10, 
-       0x1c, 0x38, 0x1c, 0x21, 0xf7, 0xff, 0xff, 0x56, 
-       0x22, 0xf3, 0x40, 0x02, 0x1c, 0x38, 0x1c, 0x21, 
-       0xf7, 0xff, 0xff, 0x9e, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x1c, 0x38, 0x1c, 0x21, 0xf7, 0xff, 
-       0xff, 0x49, 0x23, 0xf3, 0x40, 0x18, 0x22, 0x04, 
-       0x43, 0x02, 0x1c, 0x38, 0x1c, 0x21, 0xf7, 0xff, 
-       0xff, 0x8f, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x6e, 0x00, 0x11, 0x00, 0xb5, 0xf0, 0x1c, 0x0c, 
-       0x68, 0x41, 0x68, 0x09, 0x68, 0x80, 0x1c, 0x1f, 
-       0x28, 0x00, 0xd0, 0x01, 0x6b, 0x8b, 0xe0, 0x00, 
-       0x23, 0x00, 0x6b, 0x0e, 0x43, 0x32, 0x6b, 0xcd, 
-       0x43, 0x2a, 0x43, 0x1a, 0x43, 0x1e, 0x1c, 0x15, 
-       0x1c, 0x02, 0x1c, 0x08, 0x21, 0x01, 0xf7, 0xff, 
-       0xff, 0xa5, 0x20, 0x00, 0x2f, 0x00, 0xdd, 0x07, 
-       0x88, 0x29, 0x54, 0x21, 0x88, 0x31, 0x54, 0x21, 
-       0x30, 0x01, 0x35, 0x02, 0x42, 0xb8, 0xdb, 0xf7, 
-       0x1c, 0x38, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0xff, 0x68, 0x41, 0x68, 0x0c, 0x68, 0x80, 
-       0x1c, 0x1f, 0x28, 0x00, 0xd0, 0x01, 0x6b, 0xa6, 
-       0xe0, 0x00, 0x26, 0x00, 0x6b, 0x21, 0x43, 0x11, 
-       0x6b, 0xe2, 0x43, 0x11, 0x43, 0x31, 0x1c, 0x02, 
-       0x1c, 0x0d, 0x21, 0x01, 0x1c, 0x20, 0xf7, 0xff, 
-       0xff, 0x81, 0x20, 0x00, 0x2f, 0x00, 0xdd, 0x09, 
-       0x99, 0x01, 0x5c, 0x09, 0x80, 0x29, 0x6b, 0x21, 
-       0x19, 0x89, 0x88, 0x09, 0x30, 0x01, 0x35, 0x02, 
-       0x42, 0xb8, 0xdb, 0xf5, 0x1c, 0x38, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xb0, 
-       0x68, 0x42, 0x68, 0x17, 0x68, 0x82, 0x2a, 0x00, 
-       0xd0, 0x01, 0x6b, 0xbc, 0xe0, 0x00, 0x24, 0x00, 
-       0x08, 0x48, 0xd3, 0x0a, 0x23, 0xfe, 0x40, 0x19, 
-       0x6b, 0x38, 0x43, 0x08, 0x6b, 0x79, 0x43, 0x08, 
-       0x6b, 0xf9, 0x43, 0x08, 0x43, 0x20, 0x1c, 0x05, 
-       0xe0, 0x05, 0x6b, 0x38, 0x43, 0x08, 0x6b, 0xf9, 
-       0x43, 0x08, 0x43, 0x20, 0x1c, 0x05, 0x21, 0x02, 
-       0x1c, 0x38, 0xf7, 0xff, 0xff, 0x4f, 0x6b, 0x38, 
-       0x43, 0x20, 0x88, 0x29, 0x88, 0x01, 0x88, 0x00, 
-       0x06, 0x00, 0x0e, 0x00, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0xb0, 0x06, 0x15, 0x0e, 0x2d, 
-       0x68, 0x42, 0x68, 0x13, 0x68, 0x82, 0x2a, 0x00, 
-       0xd0, 0x01, 0x6b, 0x98, 0xe0, 0x00, 0x20, 0x00, 
-       0x07, 0xcc, 0x0f, 0xe4, 0xd0, 0x08, 0x6b, 0x1f, 
-       0x43, 0x39, 0x6b, 0x5f, 0x43, 0x39, 0x6b, 0xdf, 
-       0x43, 0x39, 0x43, 0x01, 0x1c, 0x0f, 0xe0, 0x05, 
-       0x6b, 0x1f, 0x43, 0x39, 0x6b, 0xdf, 0x43, 0x39, 
-       0x43, 0x01, 0x1c, 0x0f, 0x21, 0x02, 0x1c, 0x18, 
-       0xf7, 0xff, 0xff, 0x24, 0x80, 0x3d, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x47, 0x70, 0xb5, 0x80, 
-       0x68, 0x41, 0x68, 0x0a, 0x68, 0x81, 0x29, 0x00, 
-       0xd0, 0x01, 0x21, 0x09, 0xe0, 0x00, 0x21, 0x00, 
-       0x27, 0x00, 0x69, 0x80, 0x28, 0x06, 0xd1, 0x03, 
-       0x20, 0x01, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x1c, 0x10, 0x6c, 0xd2, 0xf0, 0x11, 0xf9, 0xa8, 
-       0x08, 0x40, 0xd3, 0x00, 0x27, 0x01, 0x1c, 0x38, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 
-       0x68, 0x42, 0x68, 0x17, 0x68, 0x80, 0x28, 0x00, 
-       0xd0, 0x01, 0x24, 0x09, 0xe0, 0x00, 0x24, 0x00, 
-       0x29, 0x00, 0xd0, 0x16, 0x29, 0x01, 0xd0, 0x21, 
-       0x29, 0x02, 0xd1, 0x0e, 0x22, 0x80, 0x6c, 0xbb, 
-       0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x11, 0xf9, 0x8e, 
-       0x48, 0x1e, 0xf7, 0xff, 0xfe, 0x5f, 0x22, 0x00, 
-       0x6c, 0xbb, 0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x11, 
-       0xf9, 0x85, 0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x6c, 0xfa, 0x1c, 0x38, 0x1c, 0x21, 
-       0xf0, 0x11, 0xf9, 0x7a, 0x22, 0x9f, 0x40, 0x02, 
-       0x6c, 0xbb, 0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x11, 
-       0xf9, 0x75, 0xe7, 0xee, 0x6c, 0xfa, 0x1c, 0x38, 
-       0x1c, 0x21, 0xf0, 0x11, 0xf9, 0x6d, 0x22, 0x20, 
-       0x43, 0x02, 0x6c, 0xbb, 0x1c, 0x38, 0x1c, 0x21, 
-       0xf0, 0x11, 0xf9, 0x68, 0x25, 0x00, 0x6c, 0xfa, 
-       0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x11, 0xf9, 0x60, 
-       0x1c, 0x06, 0x09, 0x80, 0xd2, 0x05, 0x20, 0x14, 
-       0xf7, 0xff, 0xfe, 0x30, 0x35, 0x01, 0x2d, 0x0a, 
-       0xdb, 0xf1, 0x22, 0x40, 0x43, 0x32, 0x6c, 0xbb, 
-       0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x11, 0xf9, 0x52, 
-       0xe7, 0xcb, 0x00, 0x00, 0x00, 0x01, 0x86, 0xa0, 
-       0xb5, 0x80, 0x49, 0x0f, 0x4f, 0x0f, 0x8e, 0xfa, 
-       0x20, 0x00, 0x43, 0xc0, 0x2a, 0x00, 0xd1, 0x13, 
-       0x8d, 0xba, 0x06, 0x12, 0x0e, 0x12, 0x2a, 0x0c, 
-       0xd1, 0x0e, 0x8d, 0xf8, 0x28, 0x00, 0xd0, 0x09, 
-       0x8d, 0xf8, 0x1e, 0x82, 0xb4, 0x04, 0x78, 0x4a, 
-       0x1c, 0x8b, 0x78, 0x09, 0x48, 0x06, 0xf0, 0x00, 
-       0xfd, 0x5f, 0xb0, 0x01, 0x20, 0x00, 0x85, 0xb8, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2c, 0x00, 0x12, 0x00, 0x2c, 0x00, 0x1f, 0xc0, 
-       0x2e, 0x08, 0x4e, 0x78, 0x48, 0x08, 0x8d, 0x81, 
-       0x29, 0x00, 0xd0, 0x02, 0x20, 0x00, 0x43, 0xc0, 
-       0x47, 0x70, 0x21, 0x0c, 0x85, 0x81, 0x21, 0x01, 
-       0x02, 0xc9, 0x85, 0xc1, 0x21, 0x09, 0x02, 0x49, 
-       0x86, 0xc1, 0x20, 0x00, 0x47, 0x70, 0x00, 0x00, 
-       0x2c, 0x00, 0x1f, 0xc0, 0xb5, 0x90, 0x4f, 0x15, 
-       0x68, 0x38, 0x28, 0x00, 0xd0, 0x23, 0xf7, 0xff, 
-       0xff, 0xbf, 0x48, 0x13, 0x68, 0x00, 0x68, 0x79, 
-       0x1a, 0x41, 0x29, 0x02, 0xd3, 0x1b, 0x60, 0x78, 
-       0x4c, 0x10, 0x8e, 0xa0, 0x4f, 0x10, 0x28, 0x00, 
-       0xd1, 0x02, 0x1c, 0x38, 0xf0, 0x00, 0xfc, 0xd0, 
-       0x8e, 0xa0, 0x28, 0x00, 0xd1, 0x04, 0x23, 0xc9, 
-       0x00, 0x9b, 0x18, 0xf8, 0xf0, 0x00, 0xfc, 0xc8, 
-       0x69, 0xb8, 0x28, 0x06, 0xd0, 0x05, 0x23, 0x03, 
-       0x02, 0x1b, 0x18, 0xf8, 0x6b, 0xc0, 0x28, 0x06, 
-       0xd1, 0x01, 0xf7, 0xff, 0xff, 0xc3, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x44, 
-       0x2e, 0x08, 0x05, 0xb0, 0x2c, 0x00, 0x1f, 0xc0, 
-       0x2e, 0x08, 0x4e, 0xc8, 0xb5, 0x00, 0x1c, 0x10, 
-       0x1c, 0x1a, 0x1c, 0x03, 0x1c, 0x08, 0x1c, 0x19, 
-       0xf7, 0xf9, 0xf9, 0x84, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0x90, 0x4f, 0x23, 0x24, 0x02, 0x48, 0x23, 
-       0x60, 0x04, 0x22, 0x50, 0x21, 0x00, 0x1c, 0x38, 
-       0xf0, 0x11, 0xf9, 0x8a, 0x20, 0x80, 0x1d, 0xf9, 
-       0x31, 0x19, 0x73, 0x08, 0x20, 0x03, 0x07, 0x00, 
-       0x63, 0x38, 0x02, 0xe0, 0x63, 0x78, 0x03, 0x20, 
-       0x63, 0xb8, 0x03, 0x60, 0x63, 0xf8, 0x48, 0x1a, 
-       0x64, 0xb8, 0x48, 0x1a, 0x64, 0xf8, 0x60, 0x3f, 
-       0x48, 0x19, 0x60, 0xf8, 0x60, 0x7c, 0x24, 0x00, 
-       0x60, 0xbc, 0x48, 0x18, 0x61, 0x78, 0x48, 0x18, 
-       0x61, 0xb8, 0x48, 0x18, 0x61, 0xf8, 0x48, 0x18, 
-       0x62, 0x38, 0x48, 0x18, 0x61, 0x38, 0x48, 0x18, 
-       0x62, 0x78, 0x48, 0x18, 0x62, 0xb8, 0x1c, 0x38, 
-       0xf0, 0x00, 0xf8, 0xbc, 0x4f, 0x16, 0x28, 0x00, 
-       0xd0, 0x03, 0x60, 0x3c, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x20, 0x01, 0x06, 0x40, 0xf0, 0x15, 
-       0xf8, 0x1c, 0x48, 0x12, 0xf7, 0xff, 0xfd, 0x6a, 
-       0x20, 0x01, 0x60, 0x38, 0x48, 0x10, 0x68, 0x00, 
-       0x60, 0x78, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x4e, 0x78, 0x6e, 0x00, 0x11, 0x00, 
-       0x2e, 0x00, 0x76, 0x55, 0x2e, 0x00, 0x75, 0xb9, 
-       0x2e, 0x08, 0x4e, 0xc8, 0x2e, 0x00, 0x77, 0x41, 
-       0x2e, 0x00, 0x77, 0x8d, 0x2e, 0x00, 0x77, 0xdb, 
-       0x2e, 0x00, 0x78, 0x2f, 0x2e, 0x00, 0x7a, 0x39, 
-       0x2e, 0x00, 0x78, 0x7b, 0x2e, 0x00, 0x78, 0xb3, 
-       0x2e, 0x08, 0x1a, 0x44, 0x00, 0x06, 0x1a, 0x80, 
-       0x2e, 0x08, 0x05, 0xb0, 0xb5, 0x80, 0x22, 0x80, 
-       0x21, 0x1f, 0x6c, 0x83, 0x1c, 0x07, 0xf0, 0x11, 
-       0xf8, 0x69, 0x48, 0x3f, 0xf7, 0xff, 0xfd, 0x3a, 
-       0x22, 0x55, 0x21, 0x02, 0x6c, 0xbb, 0x1c, 0x38, 
-       0xf0, 0x11, 0xf8, 0x60, 0x21, 0x02, 0x6c, 0xfa, 
-       0x1c, 0x38, 0xf0, 0x11, 0xf8, 0x59, 0x28, 0x55, 
-       0xd0, 0x04, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x22, 0x33, 0x21, 0x05, 
-       0x6c, 0xbb, 0x1c, 0x38, 0xf0, 0x11, 0xf8, 0x4e, 
-       0x22, 0x33, 0x21, 0x0e, 0x6c, 0xbb, 0x1c, 0x38, 
-       0xf0, 0x11, 0xf8, 0x48, 0x22, 0x21, 0x21, 0x17, 
-       0x6c, 0xbb, 0x1c, 0x38, 0xf0, 0x11, 0xf8, 0x42, 
-       0x22, 0x00, 0x21, 0x01, 0x6c, 0xbb, 0x1c, 0x38, 
-       0xf0, 0x11, 0xf8, 0x3c, 0x22, 0x00, 0x21, 0x0a, 
-       0x6c, 0xbb, 0x1c, 0x38, 0xf0, 0x11, 0xf8, 0x36, 
-       0x22, 0x01, 0x21, 0x02, 0x6c, 0xbb, 0x1c, 0x38, 
-       0xf0, 0x11, 0xf8, 0x30, 0x22, 0x01, 0x21, 0x0b, 
-       0x6c, 0xbb, 0x1c, 0x38, 0xf0, 0x11, 0xf8, 0x2a, 
-       0x22, 0x00, 0x21, 0x03, 0x6c, 0xbb, 0x1c, 0x38, 
-       0xf0, 0x11, 0xf8, 0x24, 0x22, 0x00, 0x21, 0x0c, 
-       0x6c, 0xbb, 0x1c, 0x38, 0xf0, 0x11, 0xf8, 0x1e, 
-       0x22, 0x00, 0x21, 0x04, 0x6c, 0xbb, 0x1c, 0x38, 
-       0xf0, 0x11, 0xf8, 0x18, 0x22, 0x01, 0x21, 0x0d, 
-       0x6c, 0xbb, 0x1c, 0x38, 0xf0, 0x11, 0xf8, 0x12, 
-       0x22, 0x02, 0x21, 0x1e, 0x6c, 0xbb, 0x1c, 0x38, 
-       0xf0, 0x11, 0xf8, 0x0c, 0x22, 0x04, 0x21, 0x1c, 
-       0x6c, 0xbb, 0x1c, 0x38, 0xf0, 0x11, 0xf8, 0x06, 
-       0x22, 0x03, 0x21, 0x1b, 0x6c, 0xbb, 0x1c, 0x38, 
-       0xf0, 0x11, 0xf8, 0x00, 0x22, 0x01, 0x21, 0x1f, 
-       0x6c, 0xbb, 0x1c, 0x38, 0xf0, 0x10, 0xff, 0xfa, 
-       0x22, 0x01, 0x21, 0x18, 0x6c, 0xbb, 0x1c, 0x38, 
-       0xf0, 0x10, 0xff, 0xf4, 0x21, 0x1a, 0x6c, 0xfa, 
-       0x1c, 0x38, 0xf0, 0x10, 0xff, 0xed, 0x20, 0x00, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x00, 0x00, 0xc3, 0x50, 0xb5, 0x90, 0x1c, 0x07, 
-       0xf7, 0xff, 0xff, 0x74, 0x28, 0x00, 0xda, 0x04, 
-       0x20, 0x00, 0x43, 0xc0, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x24, 0x00, 0x64, 0x3c, 0x64, 0x7c, 
-       0x1c, 0x38, 0xf0, 0x00, 0xfc, 0x2f, 0x1c, 0x20, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0xb5, 0x00, 0x1c, 0x13, 0x1c, 0x0a, 0x1c, 0x01, 
-       0x1c, 0x18, 0xf0, 0x00, 0xf8, 0xeb, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0x90, 0x1c, 0x0b, 0x68, 0x54, 
-       0x69, 0x27, 0x1c, 0x11, 0x2f, 0x00, 0xd0, 0x07, 
-       0x68, 0x89, 0x1c, 0x02, 0x1c, 0x20, 0xf0, 0x10, 
-       0xff, 0xc5, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0x00, 0x43, 0xc0, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0x90, 0x69, 0x82, 0x68, 0x44, 
-       0xb0, 0x81, 0x42, 0x8a, 0xd1, 0x03, 0xb0, 0x01, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x22, 0xff, 
-       0xab, 0x00, 0x61, 0x81, 0x70, 0x1a, 0x22, 0x02, 
-       0x70, 0x5a, 0x22, 0x00, 0x70, 0x9a, 0x70, 0xd9, 
-       0x69, 0x27, 0x2f, 0x00, 0xd0, 0x05, 0x46, 0x6a, 
-       0x68, 0x81, 0x23, 0x04, 0x1c, 0x20, 0xf0, 0x10, 
-       0xff, 0xa1, 0xb0, 0x01, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0x00, 0x49, 0x04, 0x68, 0x09, 
-       0x31, 0x19, 0x61, 0x01, 0x21, 0x00, 0xf7, 0xff, 
-       0xff, 0xd8, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x05, 0xb0, 0xb5, 0xf0, 0x1c, 0x07, 
-       0x68, 0x40, 0x69, 0x40, 0x25, 0x00, 0xb0, 0x9e, 
-       0x28, 0x00, 0xd1, 0x08, 0x21, 0x02, 0x1c, 0x38, 
-       0xf7, 0xff, 0xff, 0xc7, 0x1c, 0x28, 0xb0, 0x1e, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x23, 0x11, 
-       0x01, 0x5b, 0x18, 0xfc, 0x70, 0x25, 0x23, 0xff, 
-       0x22, 0x00, 0x68, 0x7e, 0x69, 0x76, 0x1c, 0x38, 
-       0x1c, 0x21, 0x33, 0x01, 0xf0, 0x10, 0xff, 0x70, 
-       0x46, 0x68, 0x22, 0xff, 0x1c, 0x21, 0x32, 0x01, 
-       0xf0, 0x01, 0xfa, 0xea, 0x28, 0x00, 0xda, 0x11, 
-       0x23, 0x03, 0x02, 0x1b, 0x18, 0xf8, 0x6a, 0x01, 
-       0x31, 0x01, 0x62, 0x01, 0x29, 0x64, 0xdd, 0x03, 
-       0x21, 0x00, 0x1c, 0x38, 0xf7, 0xff, 0xff, 0xa1, 
-       0x20, 0x00, 0x43, 0xc0, 0xb0, 0x1e, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x46, 0x68, 0x1d, 0xc1, 
-       0x31, 0x6b, 0x23, 0x01, 0x9a, 0x16, 0x68, 0x7c, 
-       0x69, 0xa4, 0x1c, 0x38, 0xf0, 0x10, 0xff, 0x48, 
-       0x21, 0x02, 0x1c, 0x38, 0xf7, 0xff, 0xff, 0x8d, 
-       0x21, 0x01, 0x68, 0x7a, 0x6a, 0x92, 0x1c, 0x38, 
-       0xf0, 0x10, 0xff, 0x3a, 0x1c, 0x28, 0xb0, 0x1e, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x00, 
-       0x21, 0x01, 0x68, 0x42, 0x69, 0xd2, 0xf0, 0x10, 
-       0xff, 0x2f, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 
-       0x1d, 0xc6, 0x36, 0x19, 0x1c, 0x07, 0xf7, 0xff, 
-       0xff, 0xf2, 0x0a, 0x00, 0xd2, 0x03, 0x20, 0x00, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x21, 0x02, 
-       0x68, 0x7a, 0x69, 0xd2, 0x1c, 0x38, 0xf0, 0x10, 
-       0xff, 0x1b, 0x1c, 0x04, 0x21, 0x03, 0x68, 0x7a, 
-       0x69, 0xd2, 0x1c, 0x38, 0xf0, 0x10, 0xff, 0x14, 
-       0x02, 0x00, 0x43, 0x20, 0x04, 0x04, 0x0c, 0x24, 
-       0x69, 0xf8, 0x42, 0xa0, 0xda, 0x01, 0x04, 0x04, 
-       0x0c, 0x24, 0x25, 0x00, 0x2c, 0x00, 0xdd, 0x09, 
-       0x21, 0x00, 0x68, 0x7a, 0x69, 0xd2, 0x1c, 0x38, 
-       0xf0, 0x10, 0xff, 0x02, 0x55, 0x70, 0x35, 0x01, 
-       0x42, 0xa5, 0xdb, 0xf5, 0x1c, 0x21, 0xa0, 0x07, 
-       0xf0, 0x11, 0xf8, 0x22, 0x69, 0xb8, 0x28, 0x06, 
-       0xd1, 0x04, 0x68, 0xf8, 0x1c, 0x31, 0x1c, 0x22, 
-       0xf0, 0x00, 0xff, 0x40, 0x1c, 0x20, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x63, 0x69, 0x5f, 0x73, 
-       0x6c, 0x6f, 0x74, 0x3a, 0x20, 0x72, 0x65, 0x63, 
-       0x65, 0x69, 0x76, 0x65, 0x64, 0x20, 0x64, 0x61, 
-       0x74, 0x61, 0x20, 0x6c, 0x65, 0x6e, 0x3d, 0x25, 
-       0x64, 0x0a, 0x00, 0x00, 0xb5, 0xf0, 0x1c, 0x14, 
-       0x1c, 0x0d, 0x1c, 0x07, 0xf7, 0xff, 0xff, 0xab, 
-       0x22, 0x01, 0x21, 0x01, 0x68, 0x7b, 0x6a, 0x1b, 
-       0x1c, 0x38, 0xf0, 0x10, 0xfe, 0xd3, 0x1c, 0x38, 
-       0xf7, 0xff, 0xff, 0x99, 0x09, 0xc0, 0xd3, 0x23, 
-       0x06, 0x22, 0x0e, 0x12, 0x21, 0x02, 0x68, 0x7b, 
-       0x6a, 0x1b, 0x1c, 0x38, 0xf0, 0x10, 0xfe, 0xc6, 
-       0x12, 0x22, 0x21, 0x03, 0x68, 0x7b, 0x6a, 0x1b, 
-       0x1c, 0x38, 0xf0, 0x10, 0xfe, 0xbf, 0x26, 0x00, 
-       0x2c, 0x00, 0xdd, 0x09, 0x5d, 0xaa, 0x21, 0x00, 
-       0x68, 0x7b, 0x6a, 0x1b, 0x1c, 0x38, 0xf0, 0x10, 
-       0xfe, 0xb5, 0x36, 0x01, 0x42, 0xa6, 0xdb, 0xf5, 
-       0x1c, 0x38, 0xf7, 0xff, 0xff, 0x78, 0x08, 0x80, 
-       0xd3, 0x02, 0xa0, 0x0b, 0xf0, 0x10, 0xff, 0xd0, 
-       0x22, 0x00, 0x21, 0x01, 0x68, 0x7b, 0x6a, 0x1b, 
-       0x1c, 0x38, 0xf0, 0x10, 0xfe, 0xa3, 0x1c, 0x38, 
-       0xf7, 0xff, 0xff, 0x69, 0x08, 0x80, 0xd3, 0x02, 
-       0xa0, 0x0b, 0xf0, 0x10, 0xff, 0xc1, 0x20, 0x00, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x63, 0x69, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 
-       0x77, 0x72, 0x69, 0x74, 0x65, 0x3a, 0x20, 0x77, 
-       0x72, 0x69, 0x74, 0x65, 0x20, 0x65, 0x72, 0x72, 
-       0x6f, 0x72, 0x20, 0x31, 0x0a, 0x00, 0x00, 0x00, 
-       0x63, 0x69, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x5f, 
-       0x77, 0x72, 0x69, 0x74, 0x65, 0x3a, 0x20, 0x77, 
-       0x72, 0x69, 0x74, 0x65, 0x20, 0x65, 0x72, 0x72, 
-       0x6f, 0x72, 0x20, 0x32, 0x0a, 0x00, 0x00, 0x00, 
-       0xb5, 0x00, 0x1c, 0x0a, 0x1d, 0xc1, 0x31, 0xff, 
-       0x31, 0x1a, 0xf7, 0xff, 0xff, 0x8f, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0x80, 0x1c, 0x07, 0xa0, 0x0d, 
-       0xf0, 0x10, 0xff, 0x8e, 0x22, 0x08, 0x21, 0x01, 
-       0x68, 0x7b, 0x6a, 0x1b, 0x1c, 0x38, 0xf0, 0x10, 
-       0xfe, 0x61, 0x21, 0x03, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfe, 0xa8, 0x48, 0x0a, 0x68, 0x00, 0x30, 0x05, 
-       0x61, 0x38, 0x20, 0x00, 0x23, 0x03, 0x02, 0x1b, 
-       0x18, 0xf9, 0x62, 0x08, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x63, 0x69, 0x5f, 0x73, 
-       0x6c, 0x6f, 0x74, 0x3a, 0x20, 0x72, 0x65, 0x73, 
-       0x65, 0x74, 0x0a, 0x00, 0x2e, 0x08, 0x05, 0xb0, 
-       0xb5, 0x90, 0x22, 0x00, 0x21, 0x01, 0x68, 0x43, 
-       0x6a, 0x1b, 0x1c, 0x07, 0xf0, 0x10, 0xfe, 0x3e, 
-       0x1c, 0x38, 0xf7, 0xff, 0xff, 0x04, 0x23, 0x40, 
-       0x40, 0x18, 0x4c, 0x14, 0xd1, 0x13, 0x68, 0x20, 
-       0x30, 0x05, 0x23, 0x03, 0x02, 0x1b, 0x61, 0x38, 
-       0x18, 0xf8, 0x6a, 0x01, 0x31, 0x01, 0x62, 0x01, 
-       0x29, 0x0a, 0xdd, 0x03, 0x21, 0x00, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfe, 0x73, 0x20, 0x00, 0x43, 0xc0, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x22, 0x04, 
-       0x21, 0x01, 0x68, 0x7b, 0x6a, 0x1b, 0x1c, 0x38, 
-       0xf0, 0x10, 0xfe, 0x1c, 0x21, 0x04, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfe, 0x63, 0x68, 0x20, 0x30, 0x05, 
-       0x61, 0x38, 0x20, 0x00, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xb0, 
-       0xb5, 0xf0, 0x26, 0xff, 0x36, 0x01, 0x61, 0xc6, 
-       0x1d, 0xc5, 0x35, 0x19, 0x1c, 0x07, 0xf7, 0xff, 
-       0xfe, 0xd6, 0x4c, 0x17, 0x28, 0x00, 0xd1, 0x0d, 
-       0xa0, 0x16, 0xf0, 0x10, 0xff, 0x25, 0x21, 0xfe, 
-       0x1c, 0x38, 0xf7, 0xff, 0xfe, 0x46, 0x68, 0x20, 
-       0x61, 0x78, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x78, 0x28, 0x02, 0x00, 
-       0x78, 0x69, 0x43, 0x01, 0x61, 0xf9, 0xa0, 0x19, 
-       0xf0, 0x10, 0xff, 0x12, 0x69, 0xf8, 0x42, 0xb0, 
-       0xdd, 0x00, 0x61, 0xfe, 0x22, 0x02, 0x21, 0x01, 
-       0x68, 0x7b, 0x6a, 0x1b, 0x1c, 0x38, 0xf0, 0x10, 
-       0xfd, 0xe1, 0x68, 0x20, 0x30, 0x05, 0x61, 0x38, 
-       0x21, 0x05, 0x1c, 0x38, 0xf7, 0xff, 0xfe, 0x25, 
-       0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x05, 0xb0, 0x63, 0x69, 0x5f, 0x73, 
-       0x6c, 0x6f, 0x74, 0x3a, 0x20, 0x6d, 0x6f, 0x64, 
-       0x75, 0x6c, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 
-       0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x74, 0x6f, 
-       0x20, 0x73, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x75, 
-       0x66, 0x66, 0x65, 0x72, 0x20, 0x73, 0x69, 0x7a, 
-       0x65, 0x0a, 0x00, 0x00, 0x63, 0x69, 0x5f, 0x73, 
-       0x6c, 0x6f, 0x74, 0x3a, 0x20, 0x6d, 0x6f, 0x64, 
-       0x75, 0x6c, 0x65, 0x20, 0x62, 0x75, 0x66, 0x66, 
-       0x65, 0x72, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x20, 
-       0x3d, 0x20, 0x25, 0x30, 0x34, 0x78, 0x0a, 0x00, 
-       0xb5, 0xb0, 0x1c, 0x07, 0xf7, 0xff, 0xfe, 0x6f, 
-       0x23, 0x40, 0x40, 0x18, 0x25, 0x00, 0x43, 0xed, 
-       0x4c, 0x3d, 0x28, 0x00, 0xd1, 0x0c, 0xa0, 0x3d, 
-       0xf0, 0x10, 0xfe, 0xc2, 0x21, 0xff, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfd, 0xe3, 0x68, 0x20, 0x61, 0x78, 
-       0x1c, 0x28, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x22, 0x03, 0x21, 0x01, 0x68, 0x7b, 0x6a, 0x1b, 
-       0x1c, 0x38, 0xf0, 0x10, 0xfd, 0x8b, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfe, 0x51, 0x09, 0xc0, 0xd2, 0x0c, 
-       0xa0, 0x3d, 0xf0, 0x10, 0xfe, 0xa9, 0x21, 0xff, 
-       0x1c, 0x38, 0xf7, 0xff, 0xfd, 0xca, 0x68, 0x20, 
-       0x61, 0x78, 0x1c, 0x28, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x22, 0x02, 0x21, 0x02, 0x68, 0x7b, 
-       0x6a, 0x1b, 0x1c, 0x38, 0xf0, 0x10, 0xfd, 0x72, 
-       0x22, 0x00, 0x21, 0x03, 0x68, 0x7b, 0x6a, 0x1b, 
-       0x1c, 0x38, 0xf0, 0x10, 0xfd, 0x6b, 0x69, 0xf8, 
-       0x12, 0x02, 0x21, 0x00, 0x68, 0x7b, 0x6a, 0x1b, 
-       0x1c, 0x38, 0xf0, 0x10, 0xfd, 0x63, 0x69, 0xf8, 
-       0x06, 0x02, 0x0e, 0x12, 0x21, 0x00, 0x68, 0x7b, 
-       0x6a, 0x1b, 0x1c, 0x38, 0xf0, 0x10, 0xfd, 0x5a, 
-       0xa0, 0x34, 0xf0, 0x10, 0xfe, 0x7d, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfe, 0x1d, 0x08, 0x80, 0xd3, 0x02, 
-       0xa0, 0x3e, 0xf0, 0x10, 0xfe, 0x75, 0x22, 0x00, 
-       0x21, 0x01, 0x68, 0x7b, 0x6a, 0x1b, 0x1c, 0x38, 
-       0xf0, 0x10, 0xfd, 0x48, 0x68, 0xf8, 0x69, 0xf9, 
-       0xf0, 0x00, 0xfa, 0x3e, 0x48, 0x42, 0x68, 0xf9, 
-       0x4b, 0x42, 0x18, 0xc9, 0x61, 0x48, 0x68, 0xf8, 
-       0x18, 0xc0, 0x61, 0x07, 0x48, 0x40, 0x68, 0xf9, 
-       0x18, 0xc9, 0x61, 0x88, 0x68, 0xf8, 0x18, 0xc0, 
-       0x60, 0xc7, 0x69, 0xf9, 0xa0, 0x3d, 0xf0, 0x10, 
-       0xfe, 0x57, 0x68, 0x20, 0x61, 0x38, 0x21, 0x06, 
-       0x1c, 0x38, 0xf7, 0xff, 0xfd, 0x76, 0x20, 0x00, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x05, 0xb0, 0x63, 0x69, 0x5f, 0x73, 
-       0x6c, 0x6f, 0x74, 0x3a, 0x20, 0x6d, 0x6f, 0x64, 
-       0x75, 0x6c, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 
-       0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x74, 0x6f, 
-       0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 
-       0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 
-       0x73, 0x69, 0x7a, 0x65, 0x0a, 0x00, 0x00, 0x00, 
-       0x63, 0x69, 0x5f, 0x73, 0x6c, 0x6f, 0x74, 0x3a, 
-       0x20, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 
-       0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x61, 0x64, 
-       0x79, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x63, 
-       0x65, 0x69, 0x76, 0x65, 0x20, 0x62, 0x75, 0x66, 
-       0x66, 0x65, 0x72, 0x20, 0x73, 0x69, 0x7a, 0x65, 
-       0x20, 0x32, 0x0a, 0x00, 0x63, 0x69, 0x5f, 0x73, 
-       0x6c, 0x6f, 0x74, 0x3a, 0x20, 0x73, 0x65, 0x6e, 
-       0x64, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x65, 0x67, 
-       0x6f, 0x74, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 
-       0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x73, 
-       0x69, 0x7a, 0x65, 0x20, 0x62, 0x61, 0x63, 0x6b, 
-       0x20, 0x74, 0x6f, 0x20, 0x6d, 0x6f, 0x64, 0x75, 
-       0x6c, 0x65, 0x0a, 0x00, 0x63, 0x69, 0x5f, 0x73, 
-       0x6c, 0x6f, 0x74, 0x5f, 0x6e, 0x65, 0x67, 0x6f, 
-       0x74, 0x69, 0x61, 0x74, 0x65, 0x3a, 0x20, 0x62, 
-       0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x73, 0x69, 
-       0x7a, 0x65, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 
-       0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x0a, 0x00, 
-       0x2e, 0x00, 0x7c, 0x55, 0x00, 0x01, 0x3b, 0x80, 
-       0x2e, 0x00, 0x7c, 0x67, 0x63, 0x69, 0x5f, 0x73, 
-       0x6c, 0x6f, 0x74, 0x3a, 0x20, 0x62, 0x75, 0x66, 
-       0x66, 0x65, 0x72, 0x20, 0x73, 0x69, 0x7a, 0x65, 
-       0x20, 0x3d, 0x20, 0x25, 0x30, 0x34, 0x78, 0x0a, 
-       0x00, 0x00, 0x00, 0x00, 0xb5, 0x80, 0x1c, 0x07, 
-       0x20, 0xff, 0x30, 0x01, 0x61, 0xf8, 0x21, 0x00, 
-       0x1c, 0x38, 0xf7, 0xff, 0xfc, 0xea, 0x48, 0x05, 
-       0x68, 0x00, 0x61, 0x38, 0x48, 0x04, 0xf7, 0xfd, 
-       0xfc, 0xe5, 0x60, 0xf8, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xb0, 
-       0x00, 0x01, 0x3b, 0x9c, 0xb5, 0x00, 0x68, 0xc0, 
-       0xf7, 0xfd, 0xfc, 0xfa, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0x80, 0x1c, 0x1f, 0x06, 0x0b, 0x0e, 0x1b, 
-       0x69, 0x81, 0x29, 0x06, 0xd0, 0x04, 0x20, 0x00, 
-       0x43, 0xc0, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x78, 0x11, 0x29, 0xff, 0xd1, 0x05, 0xf7, 0xff, 
-       0xfc, 0xe4, 0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x68, 0xc0, 0x1c, 0x11, 0x1c, 0x3a, 
-       0xf0, 0x00, 0xfb, 0x9a, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x69, 0x00, 0x49, 0x04, 0x68, 0x09, 
-       0x1a, 0x40, 0x4b, 0x04, 0x42, 0x98, 0xd2, 0x01, 
-       0x20, 0x00, 0x47, 0x70, 0x20, 0x01, 0x47, 0x70, 
-       0x2e, 0x08, 0x05, 0xb0, 0x80, 0x00, 0x00, 0x00, 
-       0xb5, 0x90, 0x68, 0x44, 0x6a, 0x61, 0x1c, 0x07, 
-       0x29, 0x00, 0xd0, 0x03, 0x1c, 0x38, 0xf0, 0x10, 
-       0xfc, 0x51, 0xe0, 0x00, 0x20, 0x01, 0x08, 0x40, 
-       0xd2, 0x06, 0x21, 0x00, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfc, 0x98, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x69, 0xb8, 0x28, 0x00, 0xd1, 0xf9, 0x6a, 0xa2, 
-       0x2a, 0x00, 0xd0, 0x03, 0x21, 0x02, 0x1c, 0x38, 
-       0xf0, 0x10, 0xfc, 0x3e, 0x21, 0x01, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfc, 0x87, 0x20, 0x00, 0x23, 0x03, 
-       0x02, 0x1b, 0x18, 0xf9, 0x62, 0x08, 0x48, 0x03, 
-       0x68, 0x00, 0x30, 0x19, 0x61, 0x38, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x05, 0xb0, 
-       0xb5, 0x90, 0x1c, 0x07, 0xf7, 0xff, 0xff, 0xcc, 
-       0x1c, 0x38, 0xf7, 0xff, 0xff, 0xba, 0x28, 0x00, 
-       0xd1, 0x03, 0x43, 0xc0, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x69, 0xb8, 0x4c, 0x23, 0x28, 0x05, 
-       0xd0, 0x30, 0xdc, 0x0b, 0x28, 0x01, 0xd0, 0x1e, 
-       0x28, 0x02, 0xd0, 0x23, 0x28, 0x03, 0xd0, 0x25, 
-       0x28, 0x04, 0xd1, 0x14, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfe, 0x03, 0xe0, 0x10, 0x28, 0x06, 0xd0, 0x25, 
-       0x28, 0xfe, 0xd0, 0x01, 0x28, 0xff, 0xd1, 0x0a, 
-       0x69, 0x78, 0x68, 0x21, 0x1a, 0x08, 0x23, 0xff, 
-       0x33, 0xf5, 0x42, 0x98, 0xd9, 0x03, 0x21, 0x00, 
-       0x1c, 0x38, 0xf7, 0xff, 0xfc, 0x4a, 0x20, 0x00, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x68, 0x20, 
-       0x30, 0x05, 0x61, 0x38, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfc, 0x6d, 0xe7, 0xf4, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfd, 0x84, 0xe7, 0xf0, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfd, 0xa7, 0xe7, 0xec, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfe, 0x3f, 0xe7, 0xe8, 0x68, 0xf8, 0xf0, 0x00, 
-       0xfc, 0x53, 0x28, 0x00, 0xd1, 0x02, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfc, 0xb1, 0x68, 0xf8, 0xf0, 0x00, 
-       0xfb, 0xd9, 0x68, 0x20, 0x30, 0x02, 0x61, 0x38, 
-       0xe7, 0xd9, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xb0, 
-       0xb5, 0xb0, 0x06, 0x15, 0x0e, 0x2d, 0x9f, 0x04, 
-       0x68, 0x42, 0x1c, 0x1c, 0x42, 0x8a, 0xdc, 0x04, 
-       0x20, 0x00, 0x43, 0xc0, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x68, 0xc0, 0x23, 0xc9, 0x00, 0x9b, 
-       0x43, 0x59, 0x18, 0x40, 0x1c, 0x29, 0x1c, 0x22, 
-       0x1c, 0x3b, 0xf7, 0xff, 0xff, 0x35, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 0x24, 0x00, 
-       0x1c, 0x07, 0x68, 0x40, 0x28, 0x00, 0xdd, 0x0a, 
-       0x21, 0xc9, 0x00, 0x89, 0x43, 0x61, 0x68, 0xf8, 
-       0x18, 0x40, 0xf7, 0xff, 0xff, 0x81, 0x68, 0x78, 
-       0x34, 0x01, 0x42, 0xa0, 0xdc, 0xf4, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 0x24, 0x00, 
-       0x1c, 0x07, 0x68, 0x40, 0x28, 0x00, 0xdd, 0x0f, 
-       0x21, 0xc9, 0x00, 0x89, 0x43, 0x61, 0x68, 0xf8, 
-       0x18, 0x40, 0x60, 0x84, 0x68, 0x3a, 0xc0, 0x84, 
-       0x68, 0xf8, 0x18, 0x40, 0xf7, 0xff, 0xfe, 0xee, 
-       0x68, 0x78, 0x34, 0x01, 0x42, 0xa0, 0xdc, 0xef, 
-       0x20, 0x00, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0xf0, 0x25, 0x00, 0x1c, 0x07, 0x68, 0x40, 
-       0x1c, 0x0c, 0x28, 0x00, 0xdd, 0x0f, 0x26, 0x01, 
-       0x1c, 0x30, 0x40, 0xa8, 0x40, 0x20, 0xd0, 0x06, 
-       0x21, 0xc9, 0x00, 0x89, 0x43, 0x69, 0x68, 0xf8, 
-       0x18, 0x40, 0xf7, 0xff, 0xfb, 0xe6, 0x68, 0x78, 
-       0x35, 0x01, 0x42, 0xa8, 0xdc, 0xf0, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb4, 0xf0, 0x21, 0x00, 
-       0x78, 0x07, 0x22, 0x80, 0x43, 0xd2, 0x40, 0x3a, 
-       0x1c, 0x04, 0x0a, 0x3b, 0xd3, 0x0f, 0x27, 0x00, 
-       0x30, 0x01, 0x2a, 0x00, 0xdd, 0x0d, 0x1b, 0xd3, 
-       0x00, 0xdb, 0x78, 0x06, 0x1f, 0xdd, 0x3d, 0x01, 
-       0x40, 0xae, 0x43, 0x31, 0x30, 0x01, 0x37, 0x01, 
-       0x42, 0x97, 0xdb, 0xf4, 0xe0, 0x01, 0x30, 0x01, 
-       0x1c, 0x11, 0x1b, 0x00, 0x18, 0x40, 0xbc, 0xf0, 
-       0x47, 0x70, 0xb4, 0xb0, 0x22, 0x01, 0x28, 0x80, 
-       0xda, 0x02, 0x70, 0x08, 0xbc, 0xb0, 0x47, 0x70, 
-       0x27, 0x03, 0x25, 0xff, 0x00, 0xfc, 0x1c, 0x2b, 
-       0x40, 0xa3, 0x40, 0x03, 0xd0, 0x03, 0x1c, 0x03, 
-       0x41, 0x23, 0x54, 0x8b, 0x32, 0x01, 0x37, 0x01, 
-       0xd5, 0xf4, 0x20, 0x80, 0x43, 0x10, 0x70, 0x08, 
-       0xbc, 0xb0, 0x47, 0x70, 0xb5, 0xb0, 0x22, 0x00, 
-       0x78, 0x41, 0x1c, 0x47, 0x20, 0x80, 0x43, 0xc0, 
-       0x40, 0x08, 0x0a, 0x09, 0xd3, 0x0f, 0x21, 0x00, 
-       0x37, 0x01, 0x28, 0x00, 0xdd, 0x0d, 0x1a, 0x43, 
-       0x00, 0xdb, 0x78, 0x3d, 0x1f, 0xdc, 0x3c, 0x01, 
-       0x40, 0xa5, 0x43, 0x2a, 0x31, 0x01, 0x37, 0x01, 
-       0x42, 0x81, 0xdb, 0xf4, 0xe0, 0x01, 0x1c, 0x02, 
-       0x37, 0x01, 0x78, 0x3b, 0xa1, 0x03, 0xa0, 0x04, 
-       0xf0, 0x10, 0xfc, 0x42, 0x78, 0x38, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x63, 0x69, 0x3a, 0x00, 
-       0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 
-       0x3a, 0x20, 0x25, 0x73, 0x2c, 0x20, 0x6c, 0x65, 
-       0x6e, 0x3d, 0x25, 0x64, 0x2c, 0x20, 0x69, 0x64, 
-       0x3d, 0x25, 0x30, 0x32, 0x78, 0x0a, 0x00, 0x00, 
-       0xb5, 0xb0, 0x25, 0x00, 0x60, 0x01, 0x1c, 0x07, 
-       0x4b, 0x2f, 0x18, 0xc4, 0x72, 0x25, 0x72, 0x65, 
-       0x72, 0xa5, 0x72, 0xe5, 0x1c, 0x08, 0x21, 0x01, 
-       0x04, 0x09, 0xf0, 0x10, 0xfb, 0x01, 0x21, 0x01, 
-       0x02, 0x49, 0x42, 0x88, 0xdd, 0x01, 0x60, 0x79, 
-       0xe0, 0x00, 0x60, 0x78, 0x22, 0x01, 0x04, 0x12, 
-       0x21, 0x00, 0x1d, 0xf8, 0x30, 0x01, 0xf0, 0x10, 
-       0xfb, 0xa7, 0x20, 0x00, 0x43, 0xc1, 0x00, 0x82, 
-       0x19, 0xd2, 0x4b, 0x22, 0x18, 0xd3, 0x60, 0x9d, 
-       0x4b, 0x21, 0x18, 0xd3, 0x60, 0x9d, 0x23, 0x9d, 
-       0x02, 0x5b, 0x18, 0xd3, 0x60, 0x9d, 0x4b, 0x1f, 
-       0x18, 0xd2, 0x60, 0x95, 0x00, 0x42, 0x19, 0xd2, 
-       0x4b, 0x1d, 0x18, 0xd3, 0x81, 0x19, 0x4b, 0x1d, 
-       0x18, 0xd2, 0x81, 0x11, 0x30, 0x01, 0x28, 0x20, 
-       0xdb, 0xe5, 0x20, 0x00, 0x68, 0x79, 0x29, 0x00, 
-       0xdd, 0x11, 0x00, 0x41, 0x18, 0x09, 0x00, 0xc9, 
-       0x19, 0xc9, 0x23, 0x01, 0x04, 0x1b, 0x18, 0xc9, 
-       0x72, 0x0d, 0x60, 0xcd, 0x61, 0x0d, 0x61, 0x4d, 
-       0x76, 0x0d, 0x76, 0x4d, 0x61, 0xc8, 0x68, 0x79, 
-       0x30, 0x01, 0x42, 0x81, 0xdc, 0xed, 0x4b, 0x10, 
-       0x18, 0xf8, 0x22, 0x01, 0x02, 0xd2, 0x21, 0x00, 
-       0xf0, 0x10, 0xfb, 0x6e, 0x4b, 0x0d, 0x18, 0xf8, 
-       0x22, 0xff, 0x21, 0x00, 0x32, 0x01, 0xf0, 0x10, 
-       0xfb, 0x67, 0x60, 0xe5, 0x61, 0x25, 0x61, 0x65, 
-       0x61, 0xa5, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x00, 0x01, 0x3b, 0x80, 0x00, 0x01, 0x39, 0x00, 
-       0x00, 0x01, 0x39, 0x80, 0x00, 0x01, 0x3a, 0x80, 
-       0x00, 0x01, 0x3b, 0x00, 0x00, 0x01, 0x3b, 0x40, 
-       0x00, 0x01, 0x30, 0x08, 0x00, 0x01, 0x38, 0x08, 
-       0x21, 0x00, 0x70, 0x01, 0x60, 0x41, 0x60, 0x81, 
-       0x60, 0xc1, 0x74, 0x01, 0x74, 0x41, 0x47, 0x70, 
-       0xb4, 0x80, 0x21, 0x00, 0x68, 0x42, 0x2a, 0x00, 
-       0xdd, 0x18, 0x00, 0x4b, 0x18, 0x5b, 0x00, 0xdb, 
-       0x18, 0x1f, 0x23, 0x01, 0x04, 0x1b, 0x18, 0xfb, 
-       0x7a, 0x1b, 0x2b, 0x00, 0xd1, 0x0b, 0x22, 0x01, 
-       0x00, 0x4b, 0x18, 0x59, 0x00, 0xc9, 0x18, 0x08, 
-       0x04, 0x13, 0x18, 0xc1, 0x72, 0x0a, 0x4b, 0x05, 
-       0x18, 0xc0, 0xbc, 0x80, 0x47, 0x70, 0x31, 0x01, 
-       0x42, 0x8a, 0xdc, 0xe6, 0x20, 0x00, 0xbc, 0x80, 
-       0x47, 0x70, 0x00, 0x00, 0x00, 0x01, 0x00, 0x08, 
-       0xb5, 0xb0, 0x06, 0x1d, 0x0e, 0x2d, 0x1c, 0x14, 
-       0x68, 0x0a, 0x21, 0x00, 0x1c, 0x07, 0xf0, 0x10, 
-       0xfb, 0x1b, 0x70, 0x3d, 0x2c, 0x00, 0xd0, 0x04, 
-       0x20, 0x80, 0x70, 0x78, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x20, 0x00, 0x70, 0x78, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x99, 0x01, 
-       0x1c, 0x1c, 0x1c, 0x15, 0x1c, 0x07, 0x29, 0x00, 
-       0xd1, 0x04, 0x20, 0x00, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x1c, 0x28, 0xf7, 0xff, 
-       0xff, 0xb7, 0x1c, 0x06, 0xd1, 0x01, 0x20, 0x00, 
-       0xe7, 0xf4, 0x69, 0x70, 0x68, 0x29, 0x43, 0x48, 
-       0x19, 0x01, 0x23, 0x01, 0x04, 0x1b, 0x42, 0x99, 
-       0xdd, 0x01, 0x20, 0x00, 0xe7, 0xea, 0x18, 0x2d, 
-       0x99, 0x01, 0x1d, 0xe8, 0x30, 0x01, 0x1c, 0x22, 
-       0xf0, 0x10, 0xfa, 0x84, 0x74, 0x34, 0x7a, 0x68, 
-       0x74, 0x70, 0x2f, 0x00, 0xd0, 0x04, 0x68, 0xb8, 
-       0x60, 0xb0, 0x60, 0xf7, 0x60, 0xbe, 0xe0, 0x02, 
-       0x20, 0x00, 0x60, 0xb0, 0x60, 0xf0, 0x1c, 0x30, 
-       0xe7, 0xd4, 0xb5, 0xff, 0x9c, 0x09, 0x06, 0x25, 
-       0x0e, 0x2d, 0x24, 0x00, 0x43, 0xe4, 0x1c, 0x07, 
-       0x98, 0x02, 0x1c, 0x21, 0x4b, 0x4c, 0x18, 0xfa, 
-       0x28, 0x00, 0xd0, 0x03, 0x28, 0x01, 0xd1, 0x6a, 
-       0x20, 0x00, 0xe0, 0x2d, 0x20, 0x00, 0x00, 0x43, 
-       0x19, 0xde, 0x4b, 0x48, 0x18, 0xf6, 0x23, 0x08, 
-       0x5e, 0xf3, 0x42, 0xab, 0xd1, 0x00, 0x1c, 0x04, 
-       0x29, 0x00, 0xda, 0x04, 0x1c, 0x1e, 0x23, 0x01, 
-       0x42, 0xde, 0xd1, 0x00, 0x1c, 0x01, 0x30, 0x01, 
-       0x28, 0x20, 0xdb, 0xec, 0x20, 0x00, 0x43, 0xc0, 
-       0x42, 0x84, 0xd1, 0x05, 0x42, 0x81, 0xd0, 0x03, 
-       0x7a, 0x13, 0x33, 0x01, 0x72, 0x13, 0x1c, 0x0c, 
-       0x2c, 0x00, 0xdb, 0x44, 0x00, 0x60, 0x19, 0xc0, 
-       0x4b, 0x38, 0x18, 0xc0, 0x81, 0x05, 0x00, 0xa0, 
-       0x19, 0xc1, 0x4b, 0x37, 0x18, 0xc8, 0x68, 0x80, 
-       0x4b, 0x36, 0x18, 0xc9, 0x68, 0x8d, 0xe0, 0x2c, 
-       0x00, 0x43, 0x19, 0xde, 0x4b, 0x34, 0x18, 0xf6, 
-       0x23, 0x08, 0x5e, 0xf3, 0x42, 0xab, 0xd1, 0x00, 
-       0x1c, 0x04, 0x29, 0x00, 0xda, 0x04, 0x1c, 0x1e, 
-       0x23, 0x01, 0x42, 0xde, 0xd1, 0x00, 0x1c, 0x01, 
-       0x30, 0x01, 0x28, 0x20, 0xdb, 0xec, 0x20, 0x00, 
-       0x43, 0xc0, 0x42, 0x84, 0xd1, 0x05, 0x42, 0x81, 
-       0xd0, 0x03, 0x7a, 0x93, 0x33, 0x01, 0x72, 0x93, 
-       0x1c, 0x0c, 0x2c, 0x00, 0xdb, 0x17, 0x00, 0x60, 
-       0x19, 0xc0, 0x4b, 0x25, 0x18, 0xc0, 0x81, 0x05, 
-       0x00, 0xa0, 0x19, 0xc1, 0x23, 0x9d, 0x02, 0x5b, 
-       0x18, 0xc8, 0x68, 0x80, 0x4b, 0x21, 0x18, 0xc9, 
-       0x68, 0x8d, 0x28, 0x00, 0xd0, 0x0f, 0x99, 0x01, 
-       0x9b, 0x03, 0x1c, 0x3a, 0xf7, 0xff, 0xff, 0x5a, 
-       0x28, 0x00, 0xd1, 0x12, 0x43, 0xc0, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xe7, 0xff, 
-       0x20, 0x00, 0x43, 0xc0, 0xe7, 0xf7, 0x99, 0x01, 
-       0x9b, 0x03, 0x1c, 0x3a, 0xf7, 0xff, 0xff, 0x4a, 
-       0x1c, 0x05, 0xd1, 0x01, 0x43, 0xe8, 0xe7, 0xee, 
-       0x1c, 0x28, 0x60, 0x44, 0x9a, 0x02, 0x2a, 0x00, 
-       0xd0, 0x0c, 0x2a, 0x01, 0xd1, 0x08, 0x00, 0xa1, 
-       0x19, 0xc9, 0x23, 0x9d, 0x02, 0x5b, 0x18, 0xca, 
-       0x60, 0x90, 0x4b, 0x0c, 0x18, 0xc8, 0x60, 0x85, 
-       0x1c, 0x20, 0xe7, 0xdc, 0x00, 0xa1, 0x19, 0xc9, 
-       0x4b, 0x05, 0x18, 0xca, 0x60, 0x90, 0x4b, 0x05, 
-       0x18, 0xc8, 0x60, 0x85, 0xe7, 0xf4, 0x00, 0x00, 
-       0x00, 0x01, 0x3b, 0x80, 0x00, 0x01, 0x3b, 0x00, 
-       0x00, 0x01, 0x39, 0x00, 0x00, 0x01, 0x39, 0x80, 
-       0x00, 0x01, 0x3b, 0x40, 0x00, 0x01, 0x3a, 0x80, 
-       0xb5, 0x80, 0x27, 0x00, 0x28, 0x00, 0xd1, 0x03, 
-       0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x22, 0x00, 0x68, 0x81, 0x29, 0x00, 0xd0, 0x0b, 
-       0x68, 0xc3, 0x2b, 0x00, 0xd0, 0x05, 0x60, 0x99, 
-       0x68, 0xc1, 0x68, 0x82, 0x60, 0xd1, 0x68, 0xc7, 
-       0xe0, 0x07, 0x60, 0xca, 0x68, 0x87, 0xe0, 0x04, 
-       0x68, 0xc1, 0x29, 0x00, 0xd0, 0x01, 0x60, 0x8a, 
-       0x68, 0xc7, 0xf7, 0xff, 0xfe, 0xbd, 0x1c, 0x38, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf7, 
-       0x1c, 0x07, 0x98, 0x01, 0x68, 0x46, 0x99, 0x02, 
-       0x29, 0x00, 0xd0, 0x0b, 0x29, 0x01, 0xd1, 0x12, 
-       0x00, 0xb0, 0x19, 0xc0, 0x23, 0x9d, 0x02, 0x5b, 
-       0x18, 0xc1, 0x68, 0x8d, 0x4b, 0x2c, 0x18, 0xc0, 
-       0x68, 0x84, 0xe0, 0x0a, 0x00, 0xb0, 0x19, 0xc0, 
-       0x4b, 0x2a, 0x18, 0xc1, 0x68, 0x8d, 0x4b, 0x2a, 
-       0x18, 0xc0, 0x68, 0x84, 0xe0, 0x01, 0x25, 0x00, 
-       0x24, 0x00, 0x99, 0x01, 0x42, 0xa9, 0xd1, 0x08, 
-       0x98, 0x01, 0xf7, 0xff, 0xff, 0xb9, 0x99, 0x01, 
-       0x1c, 0x05, 0x42, 0xa1, 0xd1, 0x08, 0x24, 0x00, 
-       0xe0, 0x06, 0x99, 0x01, 0x42, 0xa1, 0xd1, 0x03, 
-       0x98, 0x01, 0xf7, 0xff, 0xff, 0xad, 0x1c, 0x04, 
-       0x22, 0x00, 0x43, 0xd2, 0x99, 0x02, 0x4b, 0x1d, 
-       0x18, 0xf8, 0x29, 0x00, 0xd0, 0x1a, 0x29, 0x01, 
-       0xd1, 0x14, 0x00, 0xb1, 0x19, 0xc9, 0x23, 0x9d, 
-       0x02, 0x5b, 0x18, 0xcb, 0x60, 0x9d, 0x4b, 0x14, 
-       0x18, 0xc9, 0x60, 0x8c, 0x2d, 0x00, 0xd1, 0x09, 
-       0x2c, 0x00, 0xd1, 0x07, 0x7a, 0x81, 0x39, 0x01, 
-       0x72, 0x81, 0x00, 0x70, 0x19, 0xc0, 0x4b, 0x12, 
-       0x18, 0xc0, 0x81, 0x02, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0xb1, 0x19, 0xc9, 
-       0x4b, 0x0a, 0x18, 0xcb, 0x60, 0x9d, 0x4b, 0x0a, 
-       0x18, 0xc9, 0x60, 0x8c, 0x2d, 0x00, 0xd1, 0xf1, 
-       0x2c, 0x00, 0xd1, 0xef, 0x7a, 0x01, 0x39, 0x01, 
-       0x72, 0x01, 0x00, 0x70, 0x19, 0xc0, 0x4b, 0x07, 
-       0x18, 0xc0, 0x81, 0x02, 0xe7, 0xe6, 0x00, 0x00, 
-       0x00, 0x01, 0x3a, 0x80, 0x00, 0x01, 0x39, 0x00, 
-       0x00, 0x01, 0x39, 0x80, 0x00, 0x01, 0x3b, 0x80, 
-       0x00, 0x01, 0x3b, 0x40, 0x00, 0x01, 0x3b, 0x00, 
-       0xb5, 0xf0, 0x1c, 0x17, 0x06, 0x1a, 0x0e, 0x12, 
-       0xb0, 0x82, 0x92, 0x00, 0x1c, 0x04, 0x1c, 0x08, 
-       0x1c, 0x0d, 0xb0, 0x81, 0xf7, 0xff, 0xfd, 0x8e, 
-       0x90, 0x00, 0x1c, 0x3a, 0x1c, 0x03, 0xa1, 0x27, 
-       0x48, 0x27, 0xf0, 0x10, 0xf9, 0xe9, 0x2f, 0x00, 
-       0xdd, 0x42, 0x4b, 0x26, 0x18, 0xe0, 0x90, 0x02, 
-       0x68, 0x20, 0x38, 0x02, 0x42, 0xb8, 0xda, 0x01, 
-       0x1c, 0x06, 0xe0, 0x00, 0x1c, 0x3e, 0x42, 0xbe, 
-       0xda, 0x01, 0x22, 0x01, 0xe0, 0x00, 0x22, 0x00, 
-       0x98, 0x02, 0x9b, 0x00, 0x1c, 0x21, 0xf7, 0xff, 
-       0xfe, 0x47, 0x9a, 0x01, 0xb4, 0x04, 0x22, 0x00, 
-       0x99, 0x03, 0x1c, 0x20, 0x1c, 0xb3, 0xf7, 0xff, 
-       0xfe, 0x88, 0xb0, 0x01, 0x28, 0x00, 0xda, 0x05, 
-       0x20, 0x00, 0x43, 0xc0, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0x80, 0x19, 0x00, 
-       0x4b, 0x13, 0x18, 0xc0, 0x68, 0x80, 0x69, 0x40, 
-       0x68, 0x21, 0x43, 0x48, 0x30, 0x02, 0x19, 0x81, 
-       0x23, 0x01, 0x04, 0x1b, 0x42, 0x99, 0xdd, 0x05, 
-       0x20, 0x00, 0x43, 0xc0, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x18, 0x20, 0x30, 0x08, 
-       0x1c, 0x29, 0x1c, 0x32, 0xf0, 0x10, 0xf8, 0xda, 
-       0x1b, 0xbf, 0x19, 0xad, 0x2f, 0x00, 0xdc, 0xbf, 
-       0x20, 0x00, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x63, 0x69, 0x3a, 0x00, 
-       0x2e, 0x00, 0x85, 0xcc, 0x00, 0x01, 0x38, 0x08, 
-       0x00, 0x01, 0x39, 0x00, 0xb5, 0xf3, 0xb0, 0x83, 
-       0x1c, 0x07, 0x99, 0x04, 0x00, 0x88, 0x19, 0xc0, 
-       0x4b, 0x2f, 0x18, 0xc0, 0x90, 0x02, 0x68, 0x84, 
-       0x4b, 0x2e, 0x18, 0xfb, 0x93, 0x01, 0x2c, 0x00, 
-       0xd0, 0x46, 0x25, 0x00, 0x7c, 0x26, 0x69, 0x60, 
-       0x68, 0x39, 0x43, 0x48, 0x7c, 0x61, 0x23, 0x80, 
-       0x40, 0x19, 0x91, 0x00, 0x30, 0x02, 0x19, 0x81, 
-       0x02, 0x5b, 0x39, 0x02, 0x42, 0x99, 0xdd, 0x04, 
-       0xb0, 0x03, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x18, 0x38, 0x1d, 0xc1, 0x31, 0x01, 
-       0x19, 0x78, 0x1e, 0xb2, 0x4b, 0x20, 0x18, 0xc0, 
-       0xf0, 0x10, 0xf8, 0x9c, 0x19, 0xa8, 0x1e, 0x85, 
-       0x68, 0xa0, 0x42, 0xa0, 0xd0, 0x04, 0x1c, 0x04, 
-       0xd0, 0x02, 0x99, 0x00, 0x29, 0x00, 0xd1, 0xd9, 
-       0x23, 0x01, 0x02, 0xdb, 0x42, 0x9d, 0xda, 0x1b, 
-       0x9b, 0x01, 0x68, 0xda, 0x4b, 0x16, 0x18, 0xf8, 
-       0x9b, 0x01, 0x69, 0x9b, 0x1c, 0x29, 0xf0, 0x10, 
-       0xf8, 0x2d, 0x28, 0x00, 0xd1, 0x18, 0x98, 0x02, 
-       0x68, 0x81, 0x29, 0x00, 0xd0, 0x0c, 0x7c, 0x48, 
-       0x24, 0x80, 0x40, 0x04, 0x22, 0x01, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfe, 0xd5, 0x98, 0x02, 0x68, 0x81, 
-       0x29, 0x00, 0xd0, 0x01, 0x2c, 0x00, 0xd1, 0xf2, 
-       0x99, 0x04, 0x1c, 0x48, 0xd5, 0x06, 0x42, 0x40, 
-       0x06, 0xc0, 0x0e, 0xc0, 0x42, 0x40, 0xe0, 0x03, 
-       0xb0, 0x03, 0xe7, 0xbe, 0x06, 0xc0, 0x0e, 0xc0, 
-       0x9b, 0x01, 0x72, 0x58, 0xb0, 0x03, 0xe7, 0xb8, 
-       0x00, 0x01, 0x3a, 0x80, 0x00, 0x01, 0x3b, 0x80, 
-       0x00, 0x01, 0x30, 0x08, 0xb5, 0xf0, 0x21, 0x00, 
-       0x4b, 0x24, 0x18, 0xc4, 0x7a, 0xe7, 0x7a, 0xa2, 
-       0x25, 0x00, 0x2a, 0x00, 0xd1, 0x03, 0x1c, 0x28, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x22, 0x00, 
-       0xe0, 0x1e, 0x00, 0x7b, 0x18, 0x1e, 0x4b, 0x1e, 
-       0x18, 0xf6, 0x23, 0x08, 0x5e, 0xf3, 0x2b, 0x00, 
-       0xdb, 0x0c, 0x00, 0xbb, 0x18, 0x1e, 0x23, 0x9d, 
-       0x02, 0x5b, 0x18, 0xf3, 0x68, 0x9b, 0x2b, 0x00, 
-       0xd0, 0x04, 0x7c, 0x5e, 0x0a, 0x33, 0xd2, 0x01, 
-       0x21, 0x01, 0xe0, 0x09, 0x37, 0x01, 0xd5, 0x04, 
-       0x42, 0x7f, 0x06, 0xff, 0x0e, 0xff, 0x42, 0x7f, 
-       0xe0, 0x01, 0x06, 0xff, 0x0e, 0xff, 0x32, 0x01, 
-       0x2a, 0x20, 0xda, 0x01, 0x29, 0x00, 0xd0, 0xdc, 
-       0x29, 0x00, 0xd1, 0x04, 0x72, 0xe5, 0x1c, 0x28, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x72, 0xe7, 
-       0x1c, 0x39, 0xf7, 0xff, 0xff, 0x57, 0x1c, 0x78, 
-       0xd5, 0x04, 0x42, 0x40, 0x06, 0xc0, 0x0e, 0xc0, 
-       0x42, 0x40, 0xe0, 0x01, 0x06, 0xc0, 0x0e, 0xc0, 
-       0x72, 0xe0, 0x20, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x00, 0x01, 0x3b, 0x80, 
-       0x00, 0x01, 0x3b, 0x40, 0xb5, 0xb0, 0x78, 0x0b, 
-       0x1c, 0x14, 0x1c, 0x05, 0x1c, 0x0f, 0xa1, 0x0c, 
-       0x48, 0x0c, 0xf0, 0x10, 0xf8, 0xd1, 0x78, 0x3a, 
-       0xb4, 0x04, 0x22, 0x01, 0x1c, 0x28, 0x1c, 0x39, 
-       0x1c, 0x23, 0xf7, 0xff, 0xfd, 0x86, 0xb0, 0x01, 
-       0x28, 0x00, 0xda, 0x04, 0x20, 0x00, 0x43, 0xc0, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x63, 0x69, 0x3a, 0x00, 0x2e, 0x00, 0x85, 0xcc, 
-       0xb5, 0xf0, 0x1c, 0x07, 0x4b, 0x2a, 0x18, 0xc4, 
-       0x7a, 0x65, 0x7a, 0x20, 0x28, 0x00, 0xd1, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 
-       0x43, 0xc1, 0xe0, 0x09, 0x35, 0x01, 0xd5, 0x04, 
-       0x42, 0x6d, 0x06, 0xed, 0x0e, 0xed, 0x42, 0x6d, 
-       0xe0, 0x01, 0x06, 0xed, 0x0e, 0xed, 0x30, 0x01, 
-       0x28, 0x20, 0xda, 0x07, 0x00, 0x6a, 0x19, 0xd2, 
-       0x4b, 0x1e, 0x18, 0xd2, 0x23, 0x08, 0x5e, 0xd2, 
-       0x42, 0x8a, 0xd0, 0xeb, 0x00, 0xa8, 0x19, 0xc0, 
-       0x4b, 0x1b, 0x18, 0xc1, 0x68, 0x89, 0x29, 0x00, 
-       0xd0, 0x10, 0x72, 0x65, 0x4b, 0x19, 0x18, 0xc6, 
-       0x68, 0xb1, 0x69, 0x48, 0x68, 0x3a, 0x43, 0x50, 
-       0x7c, 0x09, 0x18, 0x0a, 0x23, 0x01, 0x04, 0x1b, 
-       0x42, 0x9a, 0xdd, 0x08, 0x20, 0x00, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0x72, 0x60, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x18, 0x38, 
-       0x69, 0x22, 0x69, 0x63, 0x30, 0x08, 0xf0, 0x0f, 
-       0xff, 0x4d, 0x22, 0x00, 0x68, 0xb1, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfd, 0xfd, 0x1c, 0x68, 0xd5, 0x04, 
-       0x42, 0x40, 0x06, 0xc0, 0x0e, 0xc0, 0x42, 0x40, 
-       0xe0, 0x01, 0x06, 0xc0, 0x0e, 0xc0, 0x72, 0x60, 
-       0x20, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x00, 0x01, 0x3b, 0x80, 0x00, 0x01, 0x3b, 0x00, 
-       0x00, 0x01, 0x39, 0x00, 0x00, 0x01, 0x39, 0x80, 
-       0xb5, 0xff, 0xb0, 0x8b, 0x9a, 0x0d, 0x1c, 0x1c, 
-       0x1c, 0x0f, 0x2a, 0x02, 0xda, 0x06, 0x20, 0x00, 
-       0x43, 0xc0, 0xb0, 0x0b, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x78, 0x79, 0x91, 0x04, 
-       0x31, 0x02, 0x78, 0x3b, 0x1c, 0x0d, 0x42, 0x83, 
-       0xd0, 0x07, 0x1c, 0x19, 0x1c, 0x02, 0xa0, 0xf9, 
-       0xf0, 0x10, 0xf8, 0x3e, 0x42, 0x68, 0xb0, 0x0b, 
-       0xe7, 0xec, 0x9a, 0x0d, 0x42, 0x91, 0xdd, 0x02, 
-       0x42, 0x68, 0xb0, 0x0b, 0xe7, 0xe6, 0x1d, 0x39, 
-       0x91, 0x0a, 0x1d, 0xe2, 0x32, 0x59, 0x92, 0x09, 
-       0x1d, 0xe6, 0x36, 0x39, 0x28, 0x1d, 0xd0, 0x63, 
-       0xdc, 0x08, 0x28, 0x15, 0xd0, 0x13, 0x28, 0x1a, 
-       0xd0, 0x5f, 0x28, 0x1b, 0xd0, 0x5e, 0x28, 0x1c, 
-       0xd0, 0x5a, 0xe0, 0x7a, 0x28, 0x20, 0xd0, 0x41, 
-       0x1c, 0xbe, 0x28, 0xc0, 0xd0, 0x74, 0x28, 0xc1, 
-       0xd1, 0x73, 0x98, 0x14, 0x28, 0x1b, 0xd0, 0x71, 
-       0x42, 0x68, 0xb0, 0x0b, 0xe7, 0xc6, 0x78, 0xb8, 
-       0x28, 0x05, 0xd0, 0x02, 0x42, 0x68, 0xb0, 0x0b, 
-       0xe7, 0xc0, 0x78, 0xf8, 0x28, 0x00, 0xd0, 0x02, 
-       0x42, 0x68, 0xb0, 0x0b, 0xe7, 0xba, 0x98, 0x04, 
-       0x1e, 0x82, 0x2a, 0x4f, 0xda, 0x04, 0x99, 0x0a, 
-       0x1c, 0x20, 0xf0, 0x0f, 0xff, 0x33, 0xe0, 0x04, 
-       0x22, 0x4f, 0x99, 0x0a, 0x1c, 0x20, 0xf0, 0x0f, 
-       0xff, 0x2d, 0x78, 0xfa, 0x78, 0xb9, 0x9c, 0x0a, 
-       0xa0, 0xe0, 0x1c, 0x23, 0xf0, 0x0f, 0xff, 0xf4, 
-       0x98, 0x04, 0x18, 0x38, 0x1c, 0x47, 0x42, 0xa7, 
-       0xd9, 0x0c, 0x1c, 0x20, 0xf0, 0x0f, 0xff, 0x62, 
-       0x19, 0x00, 0x1c, 0x44, 0x42, 0xa7, 0xd9, 0x03, 
-       0x1c, 0x21, 0xa0, 0xdd, 0xf0, 0x0f, 0xff, 0xe4, 
-       0x42, 0xa7, 0xd8, 0xf2, 0xa0, 0xd4, 0xf0, 0x0f, 
-       0xff, 0xdf, 0xe0, 0xe3, 0x98, 0x04, 0x28, 0x04, 
-       0xd0, 0x02, 0x42, 0x68, 0xb0, 0x0b, 0xe7, 0x89, 
-       0x78, 0xf8, 0x02, 0x00, 0x78, 0xb9, 0x43, 0x08, 
-       0x82, 0x30, 0x79, 0x78, 0x02, 0x00, 0x79, 0x39, 
-       0x43, 0x08, 0x82, 0x70, 0x8a, 0x72, 0x8a, 0x31, 
-       0xa0, 0xd1, 0xf0, 0x0f, 0xff, 0xc9, 0xe0, 0xcd, 
-       0xe2, 0x17, 0xe0, 0x00, 0xe0, 0x62, 0x78, 0xb8, 
-       0x07, 0x80, 0x0f, 0x80, 0x30, 0x01, 0x75, 0x30, 
-       0x78, 0xb8, 0x08, 0x80, 0x07, 0x00, 0x0f, 0x00, 
-       0x30, 0x01, 0x75, 0x70, 0x78, 0xf8, 0x9a, 0x09, 
-       0x73, 0x10, 0x20, 0x00, 0x65, 0xa0, 0x7d, 0x31, 
-       0x29, 0x00, 0xdd, 0x0e, 0x18, 0x39, 0x79, 0x09, 
-       0x00, 0xc2, 0x40, 0x91, 0x6d, 0xa2, 0x43, 0x11, 
-       0x65, 0xa1, 0x7d, 0x31, 0x30, 0x01, 0xe0, 0x02, 
-       0xe1, 0x02, 0xe1, 0xf9, 0xe1, 0x4b, 0x42, 0x81, 
-       0xdc, 0xf0, 0x7d, 0x30, 0x30, 0x04, 0x90, 0x03, 
-       0x7d, 0x72, 0x18, 0x39, 0x1d, 0xe0, 0x30, 0x55, 
-       0xf0, 0x0f, 0xfe, 0xcc, 0x7d, 0x70, 0x99, 0x03, 
-       0x18, 0x40, 0x90, 0x03, 0x6d, 0xa1, 0xa0, 0xbc, 
-       0xf0, 0x0f, 0xff, 0x92, 0x7d, 0x70, 0x28, 0x00, 
-       0xd0, 0x17, 0xa0, 0xbf, 0xf0, 0x0f, 0xff, 0x8c, 
-       0x21, 0x00, 0x91, 0x02, 0x7d, 0x70, 0x28, 0x00, 
-       0xdd, 0x0c, 0x99, 0x02, 0x18, 0x60, 0x30, 0x40, 
-       0x7f, 0x01, 0xa0, 0xbc, 0xf0, 0x0f, 0xff, 0x80, 
-       0x99, 0x02, 0x31, 0x01, 0x91, 0x02, 0x7d, 0x70, 
-       0x42, 0x88, 0xdc, 0xf2, 0xa0, 0xb9, 0xf0, 0x0f, 
-       0xff, 0x77, 0x9a, 0x09, 0x7b, 0x11, 0xa0, 0xb8, 
-       0xf0, 0x0f, 0xff, 0x72, 0x22, 0x1a, 0xb4, 0x04, 
-       0x98, 0x04, 0x9a, 0x0e, 0x1a, 0x12, 0x18, 0x39, 
-       0x20, 0xc0, 0x1c, 0x23, 0xf7, 0xff, 0xff, 0x10, 
-       0xb0, 0x01, 0x28, 0x00, 0xda, 0x6a, 0x42, 0x68, 
-       0xb0, 0x0b, 0xe7, 0x13, 0x78, 0xb8, 0x06, 0x86, 
-       0x0e, 0xb6, 0x1c, 0x31, 0xa0, 0xb1, 0xf0, 0x0f, 
-       0xff, 0x5b, 0x9a, 0x09, 0x7b, 0x10, 0x42, 0xb0, 
-       0xd1, 0x01, 0x22, 0x01, 0x67, 0x62, 0x78, 0xb8, 
-       0x23, 0xc0, 0x40, 0x18, 0x28, 0xc0, 0xd0, 0x02, 
-       0x1c, 0x28, 0xb0, 0x0b, 0xe6, 0xfe, 0x2e, 0x00, 
-       0xd1, 0x02, 0x1c, 0x28, 0xb0, 0x0b, 0xe6, 0xf9, 
-       0x78, 0xf8, 0x28, 0x04, 0xd0, 0x02, 0x1c, 0x28, 
-       0xb0, 0x0b, 0xe6, 0xf3, 0x79, 0x38, 0x90, 0x08, 
-       0x23, 0x0b, 0x40, 0x18, 0x28, 0x09, 0xda, 0x02, 
-       0x1c, 0x28, 0xb0, 0x0b, 0xe6, 0xea, 0x20, 0x00, 
-       0x21, 0x00, 0x79, 0x7a, 0x92, 0x07, 0x9a, 0x07, 
-       0x40, 0xca, 0x08, 0x52, 0xd3, 0x05, 0x30, 0x01, 
-       0x18, 0x3a, 0x79, 0x52, 0x0a, 0x12, 0xd3, 0x00, 
-       0x30, 0x01, 0x31, 0x01, 0x29, 0x08, 0xdb, 0xf2, 
-       0x1c, 0x41, 0x98, 0x08, 0x08, 0xc0, 0xd3, 0x22, 
-       0x20, 0x00, 0x18, 0x7a, 0x79, 0x52, 0x92, 0x06, 
-       0x07, 0x92, 0xd0, 0x0a, 0x19, 0xca, 0x79, 0x92, 
-       0x0a, 0x12, 0xd3, 0x05, 0x30, 0x01, 0x18, 0x0a, 
-       0x19, 0xd2, 0x79, 0x92, 0x0a, 0x12, 0xd2, 0xf9, 
-       0x30, 0x01, 0x9a, 0x06, 0x08, 0x92, 0x07, 0x52, 
-       0xd0, 0x0b, 0x18, 0x0a, 0x19, 0xd2, 0x79, 0x92, 
-       0x0a, 0x12, 0xd3, 0x05, 0x30, 0x01, 0x18, 0x0a, 
-       0x19, 0xd2, 0x79, 0x92, 0x0a, 0x12, 0xd2, 0xf9, 
-       0x30, 0x01, 0x18, 0x08, 0x1c, 0x41, 0x18, 0x78, 
-       0x79, 0x40, 0x28, 0x22, 0xd0, 0x03, 0x1c, 0x28, 
-       0xb0, 0x0b, 0xe6, 0xab, 0xe1, 0x49, 0x1c, 0x48, 
-       0x99, 0x08, 0x09, 0x49, 0xd3, 0x05, 0x18, 0x39, 
-       0x79, 0x49, 0x09, 0x49, 0xd3, 0x00, 0x30, 0x02, 
-       0x30, 0x01, 0x99, 0x08, 0x09, 0x49, 0x07, 0x49, 
-       0xd0, 0x1b, 0x22, 0x00, 0x92, 0x01, 0x92, 0x00, 
-       0x18, 0x39, 0x79, 0x49, 0x91, 0x05, 0x08, 0xc9, 
-       0x07, 0x89, 0x0f, 0x89, 0xd0, 0x03, 0x22, 0x01, 
-       0x39, 0x01, 0x40, 0x8a, 0x92, 0x01, 0x99, 0x05, 
-       0x09, 0x49, 0x07, 0x89, 0x0f, 0x89, 0xd0, 0x03, 
-       0x22, 0x01, 0x39, 0x01, 0x40, 0x8a, 0x92, 0x00, 
-       0x99, 0x00, 0x9a, 0x01, 0x18, 0x51, 0x18, 0x08, 
-       0x30, 0x01, 0x1d, 0x41, 0x91, 0x03, 0x22, 0x1b, 
-       0xb4, 0x04, 0x99, 0x04, 0x9a, 0x0e, 0x1a, 0x52, 
-       0x18, 0x79, 0x20, 0xc0, 0x1c, 0x23, 0xf7, 0xff, 
-       0xfe, 0x6b, 0xb0, 0x01, 0x28, 0x00, 0xda, 0x02, 
-       0x42, 0x68, 0xb0, 0x0b, 0xe6, 0x6e, 0x99, 0x03, 
-       0x18, 0x08, 0x22, 0x1b, 0xb4, 0x04, 0x9a, 0x0e, 
-       0x1a, 0x12, 0x18, 0x39, 0x20, 0xc1, 0x1c, 0x23, 
-       0xf7, 0xff, 0xfe, 0x5a, 0xb0, 0x01, 0x28, 0x00, 
-       0xda, 0x02, 0x42, 0x68, 0xb0, 0x0b, 0xe6, 0x5d, 
-       0x9a, 0x09, 0x74, 0x96, 0x9a, 0x09, 0x7c, 0x91, 
-       0xa0, 0x5d, 0xf0, 0x0f, 0xfe, 0xa5, 0xe0, 0xf4, 
-       0x98, 0x14, 0x28, 0x1a, 0xd1, 0x2f, 0x98, 0x04, 
-       0x28, 0x0e, 0xd0, 0x02, 0x42, 0x68, 0xb0, 0x0b, 
-       0xe6, 0x4c, 0x78, 0xb8, 0x28, 0x41, 0xd1, 0x02, 
-       0x78, 0xf8, 0x28, 0x02, 0xd0, 0x02, 0x42, 0x68, 
-       0xb0, 0x0b, 0xe6, 0x43, 0xa0, 0x5a, 0xf0, 0x0f, 
-       0xfe, 0x05, 0x99, 0x0a, 0x1c, 0x02, 0xa0, 0x58, 
-       0xf0, 0x0f, 0xfe, 0xba, 0x28, 0x00, 0xd0, 0x02, 
-       0x42, 0x68, 0xb0, 0x0b, 0xe6, 0x36, 0xa0, 0x54, 
-       0xf0, 0x0f, 0xfd, 0xf8, 0x19, 0xc0, 0x1d, 0x01, 
-       0x1d, 0xe0, 0x30, 0x66, 0x22, 0x04, 0x1c, 0x07, 
-       0xf0, 0x0f, 0xfe, 0x2c, 0x20, 0x00, 0x9a, 0x09, 
-       0x74, 0x50, 0x1c, 0x3a, 0xa1, 0x4c, 0xa0, 0x4f, 
-       0xf0, 0x0f, 0xfe, 0x72, 0xe0, 0xc1, 0x98, 0x14, 
-       0x28, 0x1b, 0xd1, 0x11, 0xa0, 0x4f, 0xf0, 0x0f, 
-       0xfd, 0xe1, 0x1c, 0x31, 0x1c, 0x02, 0xa0, 0x4d, 
-       0xf0, 0x0f, 0xfe, 0x96, 0x28, 0x00, 0xd0, 0x02, 
-       0x42, 0x68, 0xb0, 0x0b, 0xe6, 0x12, 0xa1, 0x49, 
-       0xa0, 0x4b, 0xf0, 0x0f, 0xfe, 0x5d, 0xe0, 0xac, 
-       0x42, 0x68, 0xb0, 0x0b, 0xe6, 0x0a, 0xa0, 0x4c, 
-       0xf0, 0x0f, 0xfd, 0xcc, 0x1c, 0x31, 0x1c, 0x02, 
-       0xa0, 0x49, 0xf0, 0x0f, 0xfe, 0x81, 0x28, 0x00, 
-       0xe0, 0x96, 0x00, 0x00, 0x74, 0x75, 0x70, 0x6c, 
-       0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x20, 
-       0x65, 0x72, 0x72, 0x6f, 0x72, 0x3a, 0x20, 0x74, 
-       0x75, 0x70, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x30, 
-       0x78, 0x25, 0x30, 0x32, 0x78, 0x20, 0x6e, 0x6f, 
-       0x74, 0x20, 0x30, 0x78, 0x25, 0x30, 0x32, 0x78, 
-       0x0a, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73, 
-       0x5f, 0x31, 0x3a, 0x20, 0x25, 0x64, 0x2e, 0x25, 
-       0x64, 0x2c, 0x20, 0x25, 0x73, 0x00, 0x00, 0x00, 
-       0x2c, 0x20, 0x25, 0x73, 0x00, 0x00, 0x00, 0x00, 
-       0x6d, 0x61, 0x6e, 0x66, 0x69, 0x64, 0x3a, 0x20, 
-       0x30, 0x78, 0x25, 0x30, 0x34, 0x78, 0x20, 0x20, 
-       0x30, 0x78, 0x25, 0x30, 0x34, 0x78, 0x0a, 0x00, 
-       0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x20, 0x62, 
-       0x61, 0x73, 0x65, 0x3a, 0x20, 0x30, 0x78, 0x25, 
-       0x30, 0x34, 0x78, 0x20, 0x00, 0x00, 0x00, 0x00, 
-       0x6d, 0x61, 0x73, 0x6b, 0x3a, 0x20, 0x30, 0x78, 
-       0x00, 0x00, 0x00, 0x00, 0x25, 0x30, 0x32, 0x78, 
-       0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 
-       0x6c, 0x61, 0x73, 0x74, 0x5f, 0x69, 0x6e, 0x64, 
-       0x65, 0x78, 0x3a, 0x20, 0x30, 0x78, 0x25, 0x30, 
-       0x32, 0x78, 0x0a, 0x00, 0x63, 0x6f, 0x6e, 0x66, 
-       0x69, 0x67, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 
-       0x20, 0x6e, 0x62, 0x3a, 0x20, 0x30, 0x78, 0x25, 
-       0x30, 0x32, 0x78, 0x0a, 0x00, 0x00, 0x00, 0x00, 
-       0x63, 0x66, 0x67, 0x20, 0x74, 0x61, 0x62, 0x6c, 
-       0x65, 0x20, 0x63, 0x6f, 0x72, 0x20, 0x76, 0x61, 
-       0x6c, 0x75, 0x65, 0x3a, 0x20, 0x30, 0x78, 0x25, 
-       0x30, 0x32, 0x78, 0x20, 0x0a, 0x00, 0x00, 0x00, 
-       0x44, 0x56, 0x42, 0x5f, 0x43, 0x49, 0x5f, 0x56, 
-       0x00, 0x00, 0x00, 0x00, 0x76, 0x65, 0x72, 0x73, 
-       0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x25, 0x73, 0x25, 
-       0x73, 0x0a, 0x00, 0x00, 0x44, 0x56, 0x42, 0x5f, 
-       0x48, 0x4f, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 
-       0x73, 0x74, 0x63, 0x65, 0x5f, 0x65, 0x76, 0x3a, 
-       0x20, 0x25, 0x73, 0x0a, 0x00, 0x00, 0x00, 0x00, 
-       0x44, 0x56, 0x42, 0x5f, 0x43, 0x49, 0x5f, 0x4d, 
-       0x4f, 0x44, 0x55, 0x4c, 0x45, 0x00, 0x00, 0x00, 
-       0xd0, 0x02, 0x42, 0x68, 0xb0, 0x0b, 0xe5, 0x65, 
-       0x46, 0x79, 0x39, 0x1c, 0xa0, 0x04, 0xf0, 0x0f, 
-       0xfd, 0xaf, 0x1c, 0x28, 0xb0, 0x0b, 0xe5, 0x5d, 
-       0x1c, 0x28, 0xb0, 0x0b, 0xe5, 0x5a, 0x00, 0x00, 
-       0x73, 0x74, 0x63, 0x65, 0x5f, 0x70, 0x64, 0x3a, 
-       0x20, 0x25, 0x73, 0x0a, 0x00, 0x00, 0x00, 0x00, 
-       0xb5, 0xf0, 0x26, 0x00, 0x1c, 0x04, 0x20, 0x00, 
-       0x67, 0x60, 0x1c, 0x0d, 0x1c, 0x17, 0xe0, 0x00, 
-       0x36, 0x01, 0x42, 0xbe, 0xda, 0x02, 0x5d, 0xa8, 
-       0x28, 0x1d, 0xd1, 0xf9, 0x22, 0x00, 0xb4, 0x04, 
-       0x1b, 0xba, 0x19, 0xa9, 0x20, 0x1d, 0x1c, 0x23, 
-       0xf7, 0xff, 0xfd, 0x32, 0xb0, 0x01, 0x28, 0x00, 
-       0xda, 0x04, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x18, 0x36, 0x22, 0x00, 
-       0xb4, 0x04, 0x1b, 0xba, 0x19, 0xa9, 0x20, 0x1c, 
-       0x1c, 0x23, 0xf7, 0xff, 0xfd, 0x21, 0xb0, 0x01, 
-       0x28, 0x00, 0xda, 0x04, 0x20, 0x00, 0x43, 0xc0, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x18, 0x36, 
-       0x22, 0x00, 0xb4, 0x04, 0x1b, 0xba, 0x19, 0xa9, 
-       0x20, 0x15, 0x1c, 0x23, 0xf7, 0xff, 0xfd, 0x10, 
-       0xb0, 0x01, 0x28, 0x00, 0xda, 0x04, 0x20, 0x00, 
-       0x43, 0xc0, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x18, 0x36, 0x22, 0x00, 0xb4, 0x04, 0x1b, 0xba, 
-       0x19, 0xa9, 0x20, 0x20, 0x1c, 0x23, 0xf7, 0xff, 
-       0xfc, 0xff, 0xb0, 0x01, 0x28, 0x00, 0xda, 0x04, 
-       0x20, 0x00, 0x43, 0xc0, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x18, 0x36, 0x22, 0x00, 0xb4, 0x04, 
-       0x1b, 0xba, 0x19, 0xa9, 0x20, 0x1a, 0x1c, 0x23, 
-       0xf7, 0xff, 0xfc, 0xee, 0xb0, 0x01, 0x28, 0x00, 
-       0xda, 0x04, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x18, 0x36, 0xe0, 0x10, 
-       0x22, 0x00, 0xb4, 0x04, 0x1b, 0xba, 0x19, 0xa9, 
-       0x20, 0x1b, 0x1c, 0x23, 0xf7, 0xff, 0xfc, 0xdc, 
-       0xb0, 0x01, 0x28, 0x00, 0xda, 0x04, 0x20, 0x00, 
-       0x43, 0xc0, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x18, 0x36, 0x42, 0xbe, 0xda, 0x02, 0x6f, 0x60, 
-       0x28, 0x00, 0xd0, 0xe9, 0x22, 0x00, 0xb4, 0x04, 
-       0x1b, 0xba, 0x19, 0xa9, 0x20, 0x14, 0x1c, 0x23, 
-       0xf7, 0xff, 0xfc, 0xc6, 0xb0, 0x01, 0x28, 0x00, 
-       0xda, 0x04, 0x20, 0x00, 0x43, 0xc0, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf7, 0x06, 0x0e, 
-       0x0e, 0x36, 0xb0, 0x83, 0xf0, 0x0c, 0xfc, 0x40, 
-       0x1c, 0x05, 0xd0, 0x05, 0x00, 0xa8, 0x30, 0x0c, 
-       0xf7, 0xfc, 0xfc, 0x2c, 0x1c, 0x04, 0xd1, 0x01, 
-       0x20, 0x00, 0xe0, 0x22, 0x95, 0x01, 0x1d, 0xe0, 
-       0x30, 0x05, 0x90, 0x02, 0x46, 0x6a, 0xb4, 0x04, 
-       0x25, 0x00, 0x98, 0x04, 0x1c, 0x31, 0xaa, 0x02, 
-       0x1c, 0x2b, 0x1c, 0x27, 0xf0, 0x0c, 0xf9, 0xe6, 
-       0xb0, 0x01, 0x98, 0x00, 0x60, 0x38, 0x28, 0x00, 
-       0xd0, 0x0b, 0x99, 0x05, 0xf0, 0x0c, 0xfb, 0xbc, 
-       0x28, 0x00, 0xd1, 0x02, 0x60, 0x7d, 0x1c, 0x38, 
-       0xe0, 0x07, 0x68, 0x38, 0xa9, 0x01, 0xf0, 0x0c, 
-       0xfa, 0x05, 0x1c, 0x20, 0xf7, 0xfc, 0xfc, 0x28, 
-       0x1c, 0x28, 0xb0, 0x03, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x9c, 0x0b, 
-       0x9e, 0x09, 0xb0, 0x8b, 0x4a, 0x7c, 0x92, 0x0a, 
-       0x4d, 0x7c, 0x2c, 0x00, 0xd1, 0x0b, 0x20, 0x00, 
-       0x00, 0x81, 0x9a, 0x0a, 0x58, 0x51, 0x29, 0x00, 
-       0xd1, 0x01, 0x1c, 0x04, 0xe0, 0x16, 0x30, 0x01, 
-       0x28, 0x08, 0xdb, 0xf5, 0xe0, 0x12, 0x2c, 0x08, 
-       0xd8, 0x07, 0x3c, 0x01, 0x00, 0xa0, 0x9a, 0x0a, 
-       0x58, 0x10, 0x28, 0x00, 0xd0, 0x0a, 0x20, 0x00, 
-       0xe0, 0xd8, 0x23, 0x20, 0x5e, 0xec, 0x1c, 0x60, 
-       0x84, 0x28, 0x5e, 0xe8, 0x28, 0x00, 0xd1, 0x01, 
-       0x20, 0x64, 0x84, 0x28, 0x98, 0x15, 0x28, 0x00, 
-       0xd0, 0x03, 0x28, 0x01, 0xd1, 0x03, 0x22, 0x01, 
-       0xe0, 0x02, 0x22, 0x00, 0xe0, 0x00, 0x22, 0x03, 
-       0x92, 0x01, 0x1c, 0x30, 0xf0, 0x08, 0xfd, 0xf5, 
-       0x90, 0x00, 0x00, 0x80, 0x30, 0x80, 0xf7, 0xfc, 
-       0xfb, 0xc5, 0x1c, 0x07, 0xd0, 0xdf, 0x98, 0x00, 
-       0x1d, 0xc2, 0x32, 0x79, 0x21, 0x00, 0x1c, 0x38, 
-       0xf0, 0x0f, 0xfc, 0x2e, 0x98, 0x00, 0x60, 0xf8, 
-       0x1d, 0xf8, 0x30, 0x79, 0x61, 0x38, 0x98, 0x0d, 
-       0x86, 0x78, 0x98, 0x0e, 0x86, 0xb8, 0x98, 0x0b, 
-       0x90, 0x02, 0x99, 0x0c, 0x91, 0x03, 0x9a, 0x0d, 
-       0x18, 0x80, 0x38, 0x01, 0x90, 0x04, 0x98, 0x0e, 
-       0x18, 0x08, 0x38, 0x01, 0x90, 0x05, 0xa8, 0x02, 
-       0x1c, 0x31, 0xf0, 0x08, 0xfd, 0xd5, 0x61, 0x78, 
-       0x9a, 0x01, 0x2a, 0x00, 0xd0, 0x0e, 0x2a, 0x01, 
-       0xd1, 0x27, 0x00, 0x80, 0xf7, 0xfc, 0xfb, 0x9a, 
-       0x61, 0xb8, 0x28, 0x00, 0xd0, 0x04, 0x69, 0x79, 
-       0x00, 0x8a, 0x21, 0x00, 0xf0, 0x0f, 0xfc, 0x04, 
-       0x20, 0x01, 0xe0, 0x14, 0x23, 0x28, 0x5e, 0xe8, 
-       0x1c, 0x41, 0x85, 0x29, 0x28, 0x00, 0xd1, 0x01, 
-       0xf7, 0xf7, 0xf8, 0x5e, 0x69, 0x78, 0x00, 0x80, 
-       0xf7, 0xfc, 0xfb, 0xcc, 0x61, 0xb8, 0x28, 0x00, 
-       0xd0, 0x04, 0x69, 0x79, 0x00, 0x8a, 0x21, 0x00, 
-       0xf0, 0x0f, 0xfb, 0xee, 0x20, 0x00, 0x86, 0x38, 
-       0x23, 0x01, 0x03, 0xdb, 0x69, 0xf8, 0x43, 0x18, 
-       0xe0, 0x10, 0x98, 0x15, 0x61, 0xb8, 0x98, 0x15, 
-       0x0e, 0x00, 0x06, 0x00, 0x90, 0x15, 0x23, 0x0d, 
-       0x06, 0x9b, 0x42, 0xd8, 0xd1, 0x01, 0x20, 0x00, 
-       0xe0, 0x00, 0x20, 0x01, 0x86, 0x38, 0x69, 0xf8, 
-       0x4b, 0x33, 0x40, 0x18, 0x61, 0xf8, 0x69, 0xb8, 
-       0x28, 0x00, 0xd1, 0x06, 0x69, 0x78, 0x28, 0x00, 
-       0xd0, 0x03, 0x1c, 0x38, 0xf7, 0xfc, 0xfb, 0x7c, 
-       0xe7, 0x75, 0x68, 0xf8, 0x90, 0x06, 0x69, 0x38, 
-       0x90, 0x07, 0x69, 0x78, 0x90, 0x08, 0x69, 0xb8, 
-       0x90, 0x09, 0xa8, 0x02, 0x1c, 0x21, 0x1d, 0xfa, 
-       0x32, 0x01, 0xb4, 0x07, 0x1c, 0x32, 0xb4, 0x04, 
-       0x20, 0x00, 0x9a, 0x05, 0xa9, 0x0a, 0xab, 0x0c, 
-       0xf0, 0x03, 0xf8, 0xa0, 0xb0, 0x04, 0x28, 0x00, 
-       0xd0, 0x03, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x5f, 
-       0xe7, 0x59, 0x2e, 0x00, 0xd0, 0x09, 0x2e, 0x01, 
-       0xd0, 0x07, 0x2e, 0x02, 0xd0, 0x05, 0x2e, 0x03, 
-       0xd0, 0x03, 0x23, 0x02, 0x69, 0xf8, 0x43, 0x18, 
-       0x61, 0xf8, 0x85, 0xfc, 0x2c, 0x08, 0xd2, 0x02, 
-       0x00, 0xa0, 0x9a, 0x0a, 0x50, 0x17, 0x20, 0x01, 
-       0x24, 0x00, 0x63, 0xf8, 0x63, 0xbc, 0x85, 0xbe, 
-       0x21, 0x01, 0x1c, 0x38, 0xf0, 0x00, 0xf9, 0x18, 
-       0x8c, 0xa8, 0x06, 0x01, 0x0e, 0x09, 0x1c, 0x38, 
-       0xf0, 0x00, 0xf8, 0xcb, 0x22, 0x00, 0x21, 0x00, 
-       0x1c, 0x38, 0xf0, 0x00, 0xf8, 0xa0, 0x98, 0x17, 
-       0x60, 0x38, 0x98, 0x17, 0x28, 0x00, 0xd0, 0x06, 
-       0x22, 0x00, 0x21, 0x03, 0x1c, 0x23, 0x9c, 0x17, 
-       0x1c, 0x38, 0xf0, 0x0f, 0xfa, 0xc1, 0x68, 0xb8, 
-       0x60, 0x78, 0x1c, 0x38, 0xb0, 0x0b, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x1a, 0x4c, 0x2e, 0x08, 0x1a, 0x4c, 
-       0xff, 0xff, 0x7f, 0xff, 0xb5, 0x80, 0x1c, 0x07, 
-       0xb0, 0x82, 0x28, 0x00, 0xd0, 0x13, 0x68, 0x78, 
-       0x28, 0x00, 0xd1, 0x10, 0x68, 0xb8, 0x90, 0x00, 
-       0x1d, 0xf8, 0x30, 0x05, 0x90, 0x01, 0x46, 0x69, 
-       0x68, 0x38, 0xf0, 0x0c, 0xf8, 0xe7, 0x22, 0x0c, 
-       0x21, 0x00, 0x1c, 0x38, 0xf0, 0x0f, 0xfb, 0x58, 
-       0x1c, 0x38, 0xf7, 0xfc, 0xfb, 0x05, 0xb0, 0x02, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 
-       0x1c, 0x07, 0xb0, 0x84, 0x28, 0x00, 0xd1, 0x03, 
-       0xb0, 0x04, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0x00, 0x23, 0x00, 0x49, 0x22, 0x00, 0x82, 
-       0x58, 0x8c, 0x42, 0xbc, 0xd1, 0x00, 0x50, 0x8b, 
-       0x30, 0x01, 0x28, 0x08, 0xdb, 0xf7, 0x21, 0x00, 
-       0x1c, 0x38, 0xf0, 0x00, 0xf8, 0xc8, 0x68, 0xf8, 
-       0x90, 0x00, 0x69, 0x38, 0x90, 0x01, 0x69, 0x78, 
-       0x90, 0x02, 0x69, 0xb8, 0x90, 0x03, 0x46, 0x68, 
-       0x1d, 0xc2, 0x32, 0x01, 0x46, 0x69, 0x68, 0xb8, 
-       0xf0, 0x03, 0xfb, 0x24, 0x6a, 0x38, 0x28, 0x00, 
-       0xd0, 0x03, 0x68, 0x41, 0x39, 0x01, 0x60, 0x41, 
-       0x30, 0x04, 0x69, 0xf8, 0x0c, 0x00, 0xd3, 0x16, 
-       0x23, 0x30, 0x5e, 0xf8, 0x28, 0x00, 0xd1, 0x0d, 
-       0x69, 0xb8, 0xf7, 0xfc, 0xfa, 0xf9, 0x48, 0x0d, 
-       0x8d, 0x01, 0x39, 0x01, 0x04, 0x09, 0x14, 0x09, 
-       0x85, 0x01, 0xd1, 0x08, 0x20, 0xff, 0xf7, 0xf6, 
-       0xff, 0x73, 0xe0, 0x04, 0x28, 0x01, 0xd1, 0x02, 
-       0x69, 0xb8, 0xf7, 0xfc, 0xfa, 0xb9, 0x22, 0x80, 
-       0x21, 0x00, 0x1c, 0x38, 0xf0, 0x0f, 0xfb, 0x04, 
-       0x1c, 0x38, 0xf7, 0xfc, 0xfa, 0xb1, 0xe7, 0xb3, 
-       0x2e, 0x08, 0x1a, 0x4c, 0x2e, 0x08, 0x1a, 0x4c, 
-       0x28, 0x00, 0xd0, 0x08, 0x28, 0x01, 0xd0, 0x08, 
-       0x28, 0x02, 0xd0, 0x08, 0x28, 0x03, 0xd1, 0x08, 
-       0x20, 0xff, 0x30, 0x01, 0x47, 0x70, 0x20, 0x02, 
-       0x47, 0x70, 0x20, 0x04, 0x47, 0x70, 0x20, 0x10, 
-       0x47, 0x70, 0x20, 0x00, 0x47, 0x70, 0xb5, 0x90, 
-       0x1c, 0x07, 0x06, 0x08, 0x0e, 0x00, 0x06, 0x14, 
-       0x0e, 0x24, 0x28, 0x00, 0xd0, 0x0a, 0x21, 0x03, 
-       0x68, 0xb8, 0xf0, 0x04, 0xfc, 0x1f, 0x68, 0xb8, 
-       0x1c, 0x21, 0xf0, 0x04, 0xfc, 0xc7, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x21, 0x00, 0x68, 0xb8, 
-       0xf0, 0x04, 0xfc, 0x14, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0x00, 0x06, 0x09, 0xd0, 0x02, 
-       0x68, 0x80, 0x21, 0x02, 0xe0, 0x01, 0x68, 0x80, 
-       0x21, 0x00, 0xf0, 0x04, 0xfc, 0x07, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0x00, 0x06, 0x09, 0x0e, 0x09, 
-       0x28, 0x00, 0xd0, 0x02, 0x68, 0x80, 0xf0, 0x04, 
-       0xfe, 0x0d, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xb0, 
-       0x23, 0x05, 0x43, 0x18, 0x4d, 0x08, 0x84, 0xa8, 
-       0x27, 0x00, 0x4c, 0x08, 0x00, 0xb8, 0x58, 0x20, 
-       0x8c, 0xa9, 0x06, 0x09, 0x0e, 0x09, 0xf7, 0xff, 
-       0xff, 0xe8, 0x37, 0x01, 0x2f, 0x08, 0xdb, 0xf5, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x1a, 0x4c, 0x2e, 0x08, 0x1a, 0x4c, 
-       0x48, 0x01, 0x23, 0x24, 0x5e, 0xc0, 0x47, 0x70, 
-       0x2e, 0x08, 0x1a, 0x4c, 0xb5, 0x90, 0x1c, 0x04, 
-       0x1c, 0x0f, 0x28, 0x00, 0xd0, 0x15, 0x6a, 0x20, 
-       0x28, 0x00, 0xd0, 0x06, 0x42, 0xb8, 0xd0, 0x10, 
-       0x68, 0x41, 0x39, 0x01, 0x60, 0x41, 0x20, 0x00, 
-       0x62, 0x20, 0x2f, 0x00, 0xd0, 0x09, 0x68, 0xa0, 
-       0x68, 0x39, 0xf0, 0x0c, 0xf8, 0x19, 0x28, 0x00, 
-       0xd1, 0x03, 0x62, 0x27, 0x68, 0x78, 0x30, 0x01, 
-       0x60, 0x78, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0x00, 0x06, 0x09, 0xd0, 0x01, 0x21, 0x01, 
-       0xe0, 0x00, 0x21, 0x00, 0x68, 0x80, 0xf0, 0x04, 
-       0xfd, 0x0d, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 
-       0x1c, 0x07, 0x1c, 0x0c, 0xd0, 0x01, 0x21, 0x01, 
-       0xe0, 0x00, 0x21, 0x00, 0x68, 0xb8, 0xf0, 0x04, 
-       0xf8, 0xa5, 0x2c, 0x00, 0xd0, 0x03, 0x23, 0x01, 
-       0x69, 0xf8, 0x43, 0x18, 0xe0, 0x02, 0x69, 0xf8, 
-       0x08, 0x40, 0x00, 0x40, 0x61, 0xf8, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x20, 0x01, 0x21, 0x07, 
-       0x07, 0x09, 0x63, 0x88, 0x47, 0x70, 0x00, 0x00, 
-       0xb5, 0x90, 0x9c, 0x03, 0x9f, 0x04, 0xb0, 0x85, 
-       0x91, 0x00, 0x92, 0x01, 0x93, 0x02, 0x94, 0x03, 
-       0x97, 0x04, 0x68, 0x80, 0x46, 0x69, 0xf0, 0x0a, 
-       0xff, 0x69, 0xb0, 0x05, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0xff, 0xb0, 0x86, 0x98, 0x06, 
-       0x6a, 0x40, 0x68, 0xc3, 0x93, 0x05, 0x98, 0x06, 
-       0x6b, 0xc0, 0x01, 0x80, 0x06, 0x05, 0x0e, 0x2d, 
-       0x95, 0x00, 0x68, 0x18, 0x01, 0x00, 0x30, 0x1f, 
-       0x09, 0x40, 0x01, 0x40, 0x08, 0xc0, 0x90, 0x04, 
-       0x99, 0x07, 0x68, 0x48, 0x99, 0x04, 0x43, 0x48, 
-       0x99, 0x07, 0x68, 0x09, 0x08, 0xc9, 0x18, 0x0f, 
-       0x97, 0x03, 0x21, 0x00, 0x91, 0x02, 0x9b, 0x05, 
-       0x68, 0x58, 0x28, 0x00, 0xdd, 0x5e, 0x23, 0x32, 
-       0x98, 0x06, 0x5e, 0xc0, 0x9b, 0x09, 0x43, 0x58, 
-       0x9a, 0x08, 0x18, 0x81, 0x1c, 0x08, 0xd5, 0x00, 
-       0x30, 0x03, 0x10, 0x80, 0x29, 0x00, 0xda, 0x04, 
-       0x42, 0x49, 0x07, 0x89, 0x0f, 0x89, 0x42, 0x49, 
-       0xe0, 0x01, 0x07, 0x89, 0x0f, 0x89, 0x00, 0x4a, 
-       0x9d, 0x00, 0x41, 0x15, 0x1c, 0x2b, 0x06, 0x2d, 
-       0x0e, 0x2d, 0x27, 0xc0, 0x40, 0xd7, 0x06, 0x3a, 
-       0x0e, 0x12, 0x9b, 0x06, 0x69, 0x9b, 0x18, 0x18, 
-       0x9b, 0x05, 0x9f, 0x03, 0x19, 0xdb, 0x33, 0x88, 
-       0x78, 0x1f, 0x33, 0x01, 0x93, 0x01, 0x24, 0x00, 
-       0x9b, 0x07, 0x68, 0x9b, 0x2b, 0x00, 0xd9, 0x23, 
-       0x0a, 0x3b, 0xd3, 0x05, 0x78, 0x03, 0x43, 0x93, 
-       0x70, 0x03, 0x78, 0x03, 0x43, 0x2b, 0x70, 0x03, 
-       0x31, 0x01, 0x29, 0x03, 0xdd, 0x04, 0x22, 0xc0, 
-       0x21, 0x00, 0x9d, 0x00, 0x30, 0x01, 0xe0, 0x05, 
-       0x10, 0x92, 0x06, 0x12, 0x0e, 0x12, 0x10, 0xab, 
-       0x06, 0x1d, 0x0e, 0x2d, 0x00, 0x7b, 0x06, 0x1f, 
-       0x0e, 0x3f, 0x34, 0x01, 0x07, 0x63, 0xd1, 0x03, 
-       0x9b, 0x01, 0x78, 0x1f, 0x33, 0x01, 0x93, 0x01, 
-       0x9b, 0x07, 0x68, 0x9b, 0x42, 0xa3, 0xd8, 0xdb, 
-       0x98, 0x04, 0x9f, 0x03, 0x18, 0x3f, 0x97, 0x03, 
-       0x9b, 0x09, 0x33, 0x01, 0x93, 0x09, 0x99, 0x02, 
-       0x31, 0x01, 0x91, 0x02, 0x9b, 0x05, 0x68, 0x58, 
-       0x42, 0x88, 0xdc, 0xa0, 0xb0, 0x06, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 
-       0xb0, 0x86, 0x98, 0x06, 0x6a, 0x40, 0x68, 0xc3, 
-       0x93, 0x05, 0x98, 0x06, 0x6b, 0xc0, 0x07, 0x06, 
-       0x0f, 0x36, 0x96, 0x00, 0x01, 0x30, 0x06, 0x06, 
-       0x0e, 0x36, 0x96, 0x01, 0x68, 0x18, 0x01, 0x00, 
-       0x30, 0x1f, 0x09, 0x40, 0x01, 0x40, 0x08, 0xc0, 
-       0x90, 0x04, 0x68, 0x48, 0x9a, 0x04, 0x43, 0x50, 
-       0x68, 0x0a, 0x08, 0xd2, 0x18, 0x17, 0x97, 0x03, 
-       0x22, 0x00, 0x92, 0x02, 0x9b, 0x05, 0x68, 0x58, 
-       0x28, 0x00, 0xdd, 0x48, 0x23, 0x32, 0x98, 0x06, 
-       0x5e, 0xc0, 0x9b, 0x09, 0x43, 0x58, 0x9a, 0x08, 
-       0x18, 0x82, 0x1c, 0x10, 0xd5, 0x00, 0x30, 0x01, 
-       0x10, 0x40, 0x9b, 0x06, 0x69, 0x9b, 0x18, 0x18, 
-       0x9b, 0x05, 0x9f, 0x03, 0x19, 0xdb, 0x1d, 0xdd, 
-       0x35, 0x81, 0x78, 0x2f, 0x24, 0x00, 0x68, 0x8b, 
-       0x35, 0x01, 0x2b, 0x00, 0xd9, 0x21, 0x0a, 0x3b, 
-       0xd3, 0x10, 0x08, 0x53, 0xd3, 0x06, 0x78, 0x06, 
-       0x23, 0xf0, 0x40, 0x33, 0x70, 0x03, 0x78, 0x03, 
-       0x9e, 0x00, 0xe0, 0x05, 0x78, 0x03, 0x07, 0x1b, 
-       0x0f, 0x1b, 0x70, 0x03, 0x78, 0x03, 0x9e, 0x01, 
-       0x43, 0x33, 0x70, 0x03, 0x32, 0x01, 0x08, 0x53, 
-       0xd2, 0x00, 0x30, 0x01, 0x00, 0x7b, 0x06, 0x1f, 
-       0x0e, 0x3f, 0x34, 0x01, 0x07, 0x63, 0xd1, 0x01, 
-       0x78, 0x2f, 0x35, 0x01, 0x68, 0x8b, 0x42, 0xa3, 
-       0xd8, 0xdd, 0x98, 0x04, 0x9f, 0x03, 0x18, 0x3f, 
-       0x97, 0x03, 0x9b, 0x09, 0x33, 0x01, 0x93, 0x09, 
-       0x9a, 0x02, 0x32, 0x01, 0x92, 0x02, 0x9b, 0x05, 
-       0x68, 0x58, 0x42, 0x90, 0xdc, 0xb6, 0xb0, 0x06, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0xff, 0xb0, 0x83, 0x98, 0x03, 0x6a, 0x40, 
-       0x68, 0xc4, 0x98, 0x03, 0x6b, 0xc0, 0x06, 0x03, 
-       0x0e, 0x1b, 0x93, 0x00, 0x68, 0x20, 0x01, 0x00, 
-       0x30, 0x1f, 0x09, 0x40, 0x01, 0x40, 0x08, 0xc2, 
-       0x92, 0x02, 0x68, 0x48, 0x43, 0x50, 0x68, 0x0a, 
-       0x08, 0xd2, 0x18, 0x10, 0x90, 0x01, 0x25, 0x00, 
-       0x68, 0x60, 0x28, 0x00, 0xdd, 0x35, 0x23, 0x32, 
-       0x98, 0x03, 0x5e, 0xc0, 0x9b, 0x06, 0x43, 0x58, 
-       0x9a, 0x05, 0x18, 0x80, 0x9a, 0x03, 0x69, 0x92, 
-       0x18, 0x17, 0x98, 0x01, 0x18, 0x20, 0x1d, 0xc6, 
-       0x36, 0x81, 0x78, 0x32, 0x20, 0x00, 0x68, 0x8b, 
-       0x36, 0x01, 0x2b, 0x00, 0xd9, 0x16, 0x0a, 0x13, 
-       0xd3, 0x01, 0x9b, 0x00, 0x70, 0x3b, 0x00, 0x52, 
-       0x06, 0x12, 0x0e, 0x12, 0xd1, 0x09, 0x1d, 0xc2, 
-       0x32, 0x01, 0x08, 0xd2, 0x00, 0xd2, 0x1a, 0x10, 
-       0x19, 0xc7, 0x1c, 0x10, 0x78, 0x32, 0x36, 0x01, 
-       0xe0, 0x01, 0x30, 0x01, 0x37, 0x01, 0x68, 0x8b, 
-       0x42, 0x83, 0xd8, 0xe8, 0x98, 0x01, 0x9a, 0x02, 
-       0x18, 0x80, 0x90, 0x01, 0x9b, 0x06, 0x33, 0x01, 
-       0x93, 0x06, 0x68, 0x60, 0x35, 0x01, 0x42, 0xa8, 
-       0xdc, 0xc9, 0xb0, 0x03, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x23, 0x2c, 
-       0x1c, 0x07, 0x5e, 0xc0, 0xb0, 0x85, 0x28, 0x01, 
-       0xd0, 0x0f, 0x28, 0x02, 0xd0, 0x07, 0x28, 0x03, 
-       0xd1, 0x11, 0xab, 0x06, 0xcb, 0x0e, 0x1c, 0x38, 
-       0xf7, 0xff, 0xff, 0x9a, 0xe0, 0x5d, 0xab, 0x06, 
-       0xcb, 0x0e, 0x1c, 0x38, 0xf7, 0xff, 0xff, 0x23, 
-       0xe0, 0x57, 0xab, 0x06, 0xcb, 0x0e, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfe, 0x97, 0xe0, 0x51, 0x6a, 0x78, 
-       0x68, 0xc0, 0x90, 0x04, 0x68, 0x00, 0x01, 0x00, 
-       0x30, 0x1f, 0x09, 0x40, 0x01, 0x40, 0x08, 0xc0, 
-       0x90, 0x03, 0x99, 0x06, 0x68, 0x48, 0x99, 0x03, 
-       0x43, 0x48, 0x99, 0x06, 0x68, 0x09, 0x08, 0xc9, 
-       0x18, 0x09, 0x91, 0x02, 0x21, 0x00, 0x91, 0x01, 
-       0x98, 0x04, 0x68, 0x40, 0x28, 0x00, 0xdd, 0x38, 
-       0x98, 0x04, 0x99, 0x02, 0x9e, 0x07, 0x18, 0x40, 
-       0x30, 0x88, 0x78, 0x05, 0x30, 0x01, 0x90, 0x00, 
-       0x24, 0x00, 0x99, 0x06, 0x68, 0x88, 0x28, 0x00, 
-       0xd9, 0x1d, 0x0a, 0x28, 0xd3, 0x05, 0x68, 0xb8, 
-       0x6b, 0xfb, 0x9a, 0x08, 0x1c, 0x31, 0xf0, 0x0a, 
-       0xfb, 0x87, 0x00, 0x68, 0x06, 0x05, 0x0e, 0x2d, 
-       0xd1, 0x0b, 0x1d, 0xe0, 0x30, 0x01, 0x08, 0xc0, 
-       0x00, 0xc0, 0x1b, 0x01, 0x19, 0x8e, 0x1c, 0x04, 
-       0x98, 0x00, 0x78, 0x05, 0x30, 0x01, 0x90, 0x00, 
-       0xe0, 0x01, 0x34, 0x01, 0x36, 0x01, 0x99, 0x06, 
-       0x68, 0x88, 0x42, 0xa0, 0xd8, 0xe1, 0x98, 0x03, 
-       0x99, 0x02, 0x18, 0x09, 0x91, 0x02, 0x9a, 0x08, 
-       0x32, 0x01, 0x92, 0x08, 0x99, 0x01, 0x31, 0x01, 
-       0x91, 0x01, 0x98, 0x04, 0x68, 0x40, 0x42, 0x88, 
-       0xdc, 0xc6, 0xb0, 0x05, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 0x1c, 0x07, 
-       0x20, 0x00, 0xb0, 0x88, 0xf0, 0x08, 0xfa, 0x35, 
-       0x90, 0x06, 0x00, 0x80, 0x30, 0x10, 0x00, 0x80, 
-       0xf7, 0xfc, 0xf8, 0x04, 0x1c, 0x04, 0x20, 0x00, 
-       0x2c, 0x00, 0xd1, 0x03, 0xb0, 0x08, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x1d, 0xe1, 0x31, 0x09, 
-       0x91, 0x07, 0x49, 0x19, 0x68, 0x4b, 0x1c, 0x5a, 
-       0x60, 0x4a, 0x60, 0x63, 0x60, 0xe7, 0x68, 0x39, 
-       0x01, 0x09, 0x31, 0x1f, 0x09, 0x49, 0x01, 0x49, 
-       0x90, 0x00, 0x90, 0x01, 0x1e, 0x48, 0x90, 0x02, 
-       0x68, 0xe0, 0x68, 0x40, 0x00, 0xc0, 0x38, 0x01, 
-       0x90, 0x03, 0x46, 0x68, 0x21, 0x00, 0xf0, 0x08, 
-       0xfa, 0x13, 0x60, 0xa0, 0x68, 0xe0, 0x30, 0x88, 
-       0x90, 0x05, 0x68, 0xa0, 0x90, 0x04, 0x46, 0x68, 
-       0x1c, 0x22, 0x68, 0x61, 0xb4, 0x07, 0x22, 0x00, 
-       0xb4, 0x04, 0x22, 0x01, 0x20, 0x00, 0xa9, 0x0a, 
-       0xab, 0x08, 0xf0, 0x02, 0xfd, 0x2b, 0xb0, 0x04, 
-       0x28, 0x00, 0xd0, 0x03, 0x1c, 0x20, 0xf7, 0xfb, 
-       0xff, 0xeb, 0x24, 0x00, 0x1c, 0x20, 0xe7, 0xc5, 
-       0x2e, 0x08, 0x1a, 0x78, 0xb5, 0x80, 0x1c, 0x07, 
-       0xb0, 0x84, 0x28, 0x00, 0xd0, 0x1a, 0x20, 0x00, 
-       0xf0, 0x08, 0xf9, 0xe7, 0x90, 0x00, 0x1d, 0xf8, 
-       0x30, 0x09, 0x90, 0x01, 0x68, 0xb8, 0x90, 0x02, 
-       0x68, 0xf8, 0x30, 0x88, 0x90, 0x03, 0x46, 0x68, 
-       0x46, 0x69, 0x1d, 0xc2, 0x32, 0x01, 0x68, 0x38, 
-       0xf0, 0x03, 0xf8, 0x18, 0x22, 0x10, 0x21, 0x00, 
-       0x1c, 0x38, 0xf0, 0x0f, 0xf8, 0x19, 0x1c, 0x38, 
-       0xf7, 0xfb, 0xff, 0xc6, 0xb0, 0x04, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xff, 0x23, 0x32, 
-       0x1c, 0x07, 0x5e, 0xc0, 0x1c, 0x0c, 0x1c, 0x15, 
-       0xb0, 0x8a, 0x42, 0x90, 0xdd, 0x63, 0x6a, 0x78, 
-       0x28, 0x00, 0xd1, 0x0b, 0x4e, 0x38, 0x68, 0x30, 
-       0x28, 0x00, 0xd1, 0x05, 0x48, 0x37, 0xf7, 0xff, 
-       0xff, 0x7d, 0x60, 0x30, 0x28, 0x00, 0xd0, 0x61, 
-       0x68, 0x30, 0x62, 0x78, 0x23, 0x01, 0x6b, 0xb8, 
-       0x6a, 0x79, 0x42, 0xd8, 0xd1, 0x01, 0x22, 0x01, 
-       0xe0, 0x00, 0x22, 0x00, 0x92, 0x01, 0x68, 0xc8, 
-       0x90, 0x00, 0x68, 0x00, 0x90, 0x04, 0x98, 0x00, 
-       0x68, 0x40, 0x90, 0x03, 0x6b, 0xf8, 0x28, 0x01, 
-       0xd1, 0x01, 0x90, 0x02, 0xe0, 0x11, 0x20, 0x00, 
-       0x90, 0x02, 0x9a, 0x01, 0x2a, 0x00, 0xd1, 0x0c, 
-       0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x57, 0x6b, 0xba, 
-       0x99, 0x03, 0xb4, 0x06, 0x1c, 0x03, 0x9a, 0x0f, 
-       0x1c, 0x38, 0x1c, 0x29, 0xf7, 0xff, 0xfd, 0x80, 
-       0xb0, 0x02, 0x99, 0x03, 0x91, 0x08, 0x20, 0x01, 
-       0x90, 0x09, 0x78, 0x20, 0x28, 0x00, 0xd0, 0x31, 
-       0x23, 0x32, 0x5e, 0xf8, 0x42, 0xa8, 0xdd, 0x22, 
-       0x78, 0x20, 0x99, 0x00, 0xf0, 0x00, 0xf8, 0x34, 
-       0x90, 0x07, 0x1c, 0x06, 0x78, 0x20, 0x07, 0x00, 
-       0x0f, 0x00, 0x99, 0x04, 0x43, 0x48, 0x90, 0x05, 
-       0x78, 0x20, 0x09, 0x00, 0x07, 0x40, 0x0f, 0x40, 
-       0x99, 0x03, 0x43, 0x48, 0x90, 0x06, 0x98, 0x02, 
-       0x34, 0x01, 0x28, 0x00, 0xd0, 0x0c, 0x99, 0x0d, 
-       0x9a, 0x01, 0xb4, 0x06, 0x6a, 0x78, 0x68, 0xb9, 
-       0x68, 0x00, 0xaa, 0x07, 0x1c, 0x2b, 0xf0, 0x0a, 
-       0xfd, 0x8b, 0xb0, 0x02, 0xe0, 0x06, 0xe0, 0x09, 
-       0x9b, 0x0d, 0x1c, 0x38, 0xa9, 0x05, 0x1c, 0x2a, 
-       0xf7, 0xff, 0xfe, 0xa8, 0x19, 0xad, 0x78, 0x20, 
-       0x28, 0x00, 0xd1, 0xcd, 0xb0, 0x0a, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x1a, 0x78, 0x2e, 0x02, 0xd7, 0x44, 
-       0x29, 0x00, 0xd1, 0x00, 0x49, 0x02, 0x06, 0x40, 
-       0x0e, 0x40, 0x18, 0x40, 0x7a, 0x00, 0x47, 0x70, 
-       0x2e, 0x02, 0xd7, 0x44, 0xb5, 0xb0, 0x1c, 0x04, 
-       0x1c, 0x0f, 0xd1, 0x08, 0x4f, 0x0c, 0x68, 0x38, 
-       0x28, 0x00, 0xd1, 0x03, 0x48, 0x0b, 0xf7, 0xff, 
-       0xfe, 0xf9, 0x60, 0x38, 0x68, 0x3f, 0x25, 0x00, 
-       0x78, 0x20, 0x28, 0x00, 0xd0, 0x08, 0x78, 0x20, 
-       0x68, 0xf9, 0x34, 0x01, 0xf7, 0xff, 0xff, 0xe0, 
-       0x19, 0x45, 0x78, 0x20, 0x28, 0x00, 0xd1, 0xf6, 
-       0x1c, 0x28, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x1a, 0x78, 0x2e, 0x02, 0xd7, 0x44, 
-       0xb5, 0x80, 0x28, 0x00, 0xd1, 0x08, 0x4f, 0x09, 
-       0x68, 0x38, 0x28, 0x00, 0xd1, 0x03, 0x48, 0x08, 
-       0xf7, 0xff, 0xfe, 0xd8, 0x60, 0x38, 0x68, 0x38, 
-       0x28, 0x00, 0xd1, 0x02, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x68, 0xc0, 0x68, 0x40, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x1a, 0x78, 
-       0x2e, 0x02, 0xd7, 0x44, 0xb5, 0xf0, 0xb0, 0x83, 
-       0x4a, 0x18, 0x21, 0x00, 0x20, 0xff, 0x30, 0x01, 
-       0xf7, 0xff, 0xfa, 0x98, 0x49, 0x16, 0x27, 0x00, 
-       0x64, 0x08, 0x49, 0x16, 0x91, 0x02, 0x49, 0x16, 
-       0x91, 0x01, 0x49, 0x16, 0x91, 0x00, 0x4c, 0x16, 
-       0x01, 0x38, 0x06, 0x01, 0x0e, 0x09, 0x20, 0x10, 
-       0x1c, 0x22, 0x1c, 0x0d, 0xf7, 0xff, 0xfa, 0x86, 
-       0x00, 0xbe, 0x99, 0x02, 0x51, 0x88, 0x20, 0x04, 
-       0x1c, 0x29, 0x1c, 0x22, 0xf7, 0xff, 0xfa, 0x7e, 
-       0x99, 0x01, 0x51, 0x88, 0x20, 0x02, 0x1c, 0x29, 
-       0x1c, 0x22, 0xf7, 0xff, 0xfa, 0x77, 0x99, 0x00, 
-       0x51, 0x88, 0x37, 0x01, 0x2f, 0x08, 0xdb, 0xe3, 
-       0x20, 0x00, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1a, 0xc0, 
-       0x2e, 0x08, 0x1c, 0x80, 0x2e, 0x08, 0x55, 0x50, 
-       0x2e, 0x08, 0x55, 0x70, 0x2e, 0x08, 0x55, 0x90, 
-       0x2e, 0x08, 0x1a, 0x80, 0xb5, 0x80, 0x48, 0x0c, 
-       0xf7, 0xff, 0xfe, 0x84, 0x4f, 0x0b, 0x64, 0x78, 
-       0x48, 0x0b, 0xf7, 0xff, 0xfe, 0x7f, 0x64, 0xb8, 
-       0x48, 0x0a, 0xf7, 0xff, 0xfe, 0x7b, 0x64, 0xf8, 
-       0x20, 0x00, 0x22, 0x00, 0x49, 0x08, 0x00, 0x83, 
-       0x50, 0xca, 0x30, 0x01, 0x28, 0x10, 0xdb, 0xfa, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x02, 0x5e, 0x2c, 0x2e, 0x08, 0x1c, 0x80, 
-       0x2e, 0x02, 0x94, 0xb8, 0x2e, 0x02, 0xd7, 0x44, 
-       0x2e, 0x08, 0x55, 0x10, 0xb5, 0x90, 0x04, 0x01, 
-       0x0c, 0x09, 0x20, 0xff, 0x29, 0x00, 0xd0, 0x0b, 
-       0x29, 0x0f, 0xdc, 0x09, 0x00, 0x8c, 0x4f, 0x06, 
-       0x59, 0x39, 0x29, 0x00, 0xd0, 0x04, 0x1c, 0x08, 
-       0xf7, 0xff, 0xfb, 0x85, 0x20, 0x00, 0x51, 0x38, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x55, 0x10, 0xb5, 0xff, 0x04, 0x05, 
-       0x0c, 0x2d, 0x04, 0x10, 0x0c, 0x00, 0xb0, 0x82, 
-       0x90, 0x00, 0x04, 0x18, 0x0c, 0x00, 0x90, 0x01, 
-       0x2d, 0x00, 0xd0, 0x01, 0x2d, 0x0f, 0xdd, 0x01, 
-       0x20, 0xff, 0xe0, 0x53, 0x00, 0xaf, 0x4c, 0x2c, 
-       0x59, 0xe0, 0x28, 0x00, 0xd0, 0x02, 0x1c, 0x28, 
-       0xf7, 0xff, 0xff, 0xd0, 0x98, 0x00, 0x4a, 0x29, 
-       0x40, 0x02, 0x92, 0x00, 0x23, 0x2d, 0x01, 0x1b, 
-       0x42, 0x9a, 0xdd, 0x01, 0x1c, 0x1a, 0x93, 0x00, 
-       0x23, 0x09, 0x01, 0x9b, 0x98, 0x01, 0x42, 0x98, 
-       0xdd, 0x01, 0x1c, 0x1a, 0x93, 0x00, 0x2d, 0x08, 
-       0xda, 0x01, 0x20, 0x00, 0xe0, 0x00, 0x20, 0x01, 
-       0x22, 0x00, 0x21, 0x00, 0xb4, 0x07, 0x9a, 0x06, 
-       0xb4, 0x04, 0x20, 0x00, 0x9a, 0x04, 0x9b, 0x05, 
-       0xf7, 0xff, 0xfa, 0x24, 0x51, 0xe0, 0xb0, 0x04, 
-       0x1c, 0x01, 0xd0, 0xd1, 0x48, 0x18, 0x6c, 0x82, 
-       0x62, 0x4a, 0x21, 0x01, 0x59, 0xe2, 0x63, 0xd1, 
-       0x21, 0x00, 0x43, 0xc9, 0x59, 0xe2, 0x63, 0x91, 
-       0x99, 0x03, 0x29, 0x08, 0xd2, 0x10, 0xa3, 0x02, 
-       0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x04, 0x06, 0x08, 0x0b, 0x04, 0x06, 0x08, 0x0b, 
-       0x48, 0x0e, 0xe0, 0x02, 0x48, 0x0e, 0xe0, 0x00, 
-       0x48, 0x0e, 0x59, 0xc6, 0xe0, 0x00, 0x6c, 0x06, 
-       0x59, 0xe0, 0x1c, 0x31, 0xf7, 0xff, 0xfb, 0xd6, 
-       0x59, 0xe0, 0x68, 0x80, 0x21, 0x07, 0xf0, 0x04, 
-       0xf9, 0xbd, 0x20, 0x00, 0xb0, 0x02, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x55, 0x10, 0x00, 0x00, 0xff, 0xfe, 
-       0x2e, 0x08, 0x1c, 0x80, 0x2e, 0x08, 0x55, 0x90, 
-       0x2e, 0x08, 0x55, 0x70, 0x2e, 0x08, 0x55, 0x50, 
-       0xb5, 0xf0, 0x04, 0x00, 0x0c, 0x00, 0x04, 0x09, 
-       0x14, 0x09, 0x04, 0x16, 0x14, 0x36, 0xb0, 0x85, 
-       0x28, 0x07, 0xdc, 0x29, 0x00, 0x84, 0x4f, 0x21, 
-       0x59, 0x38, 0x28, 0x00, 0xd0, 0x24, 0x08, 0x49, 
-       0x00, 0x49, 0x04, 0x0d, 0x14, 0x2d, 0x68, 0x80, 
-       0xa9, 0x01, 0xf0, 0x04, 0xfa, 0x6b, 0x98, 0x01, 
-       0x19, 0x40, 0x90, 0x01, 0x98, 0x03, 0x19, 0x40, 
-       0x90, 0x03, 0x98, 0x02, 0x19, 0x80, 0x90, 0x02, 
-       0x98, 0x04, 0x19, 0x80, 0x90, 0x04, 0x98, 0x01, 
-       0x49, 0x15, 0x42, 0x88, 0xd8, 0x0c, 0x98, 0x02, 
-       0x42, 0x88, 0xd8, 0x09, 0x23, 0x2d, 0x01, 0x1b, 
-       0x98, 0x01, 0x42, 0x98, 0xda, 0x04, 0x23, 0x09, 
-       0x01, 0x9b, 0x98, 0x02, 0x42, 0x98, 0xdb, 0x01, 
-       0x20, 0xff, 0xe0, 0x12, 0x59, 0x38, 0x68, 0x80, 
-       0xa9, 0x01, 0xf0, 0x02, 0xf8, 0x3b, 0x59, 0x38, 
-       0x68, 0x80, 0x46, 0x69, 0xf0, 0x03, 0xff, 0x0a, 
-       0x98, 0x00, 0x28, 0x00, 0xd1, 0x04, 0x59, 0x38, 
-       0x68, 0x80, 0x21, 0x01, 0xf0, 0x03, 0xfc, 0x4e, 
-       0x20, 0x00, 0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x55, 0x10, 
-       0x80, 0x00, 0x00, 0x00, 0xb5, 0xf0, 0x04, 0x07, 
-       0x0c, 0x3f, 0x04, 0x0b, 0x0c, 0x1b, 0x04, 0x16, 
-       0x0c, 0x36, 0x20, 0xff, 0xb0, 0x85, 0x2f, 0x07, 
-       0xdc, 0x10, 0x00, 0xbc, 0x4f, 0x1c, 0x59, 0x39, 
-       0x29, 0x00, 0xd0, 0x0b, 0x08, 0x5a, 0x00, 0x52, 
-       0x04, 0x15, 0x0c, 0x2d, 0x23, 0x2d, 0x01, 0x1b, 
-       0x42, 0x9d, 0xda, 0x03, 0x23, 0x09, 0x01, 0x9b, 
-       0x42, 0x9e, 0xdb, 0x03, 0xb0, 0x05, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x68, 0x88, 0xa9, 0x01, 
-       0xf0, 0x04, 0xfa, 0x0c, 0x98, 0x03, 0x99, 0x01, 
-       0x1a, 0x40, 0x90, 0x03, 0x19, 0x40, 0x90, 0x03, 
-       0x98, 0x04, 0x99, 0x02, 0x1a, 0x40, 0x90, 0x04, 
-       0x19, 0x80, 0x90, 0x04, 0x95, 0x01, 0x96, 0x02, 
-       0x59, 0x38, 0x68, 0x80, 0xa9, 0x01, 0xf0, 0x01, 
-       0xff, 0xed, 0x59, 0x38, 0x68, 0x80, 0x46, 0x69, 
-       0xf0, 0x03, 0xfe, 0xbc, 0x98, 0x00, 0x28, 0x00, 
-       0xd1, 0x04, 0x59, 0x38, 0x68, 0x80, 0x21, 0x01, 
-       0xf0, 0x03, 0xfc, 0x00, 0x20, 0x00, 0xe7, 0xd5, 
-       0x2e, 0x08, 0x55, 0x10, 0xb5, 0x00, 0x04, 0x00, 
-       0x0c, 0x00, 0x00, 0x80, 0x49, 0x04, 0x58, 0x08, 
-       0x28, 0x00, 0xd0, 0x03, 0x68, 0x80, 0x21, 0x00, 
-       0xf0, 0x03, 0xfb, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x55, 0x10, 0xb5, 0x80, 0x04, 0x01, 
-       0x0c, 0x09, 0x20, 0xff, 0x29, 0x07, 0xdc, 0x0c, 
-       0x29, 0x01, 0xdb, 0x0a, 0x00, 0x88, 0x49, 0x06, 
-       0x58, 0x08, 0x27, 0x00, 0x28, 0x00, 0xd0, 0x03, 
-       0x68, 0x80, 0x21, 0x01, 0xf0, 0x03, 0xfa, 0x36, 
-       0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x55, 0x10, 0x04, 0x01, 0x0c, 0x09, 
-       0x20, 0x00, 0x29, 0x0f, 0xdc, 0x06, 0x00, 0x89, 
-       0x4a, 0x03, 0x58, 0x51, 0x29, 0x00, 0xd0, 0x01, 
-       0x23, 0x32, 0x5e, 0xc8, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x55, 0x10, 0x04, 0x01, 0x0c, 0x09, 
-       0x20, 0x00, 0x29, 0x0f, 0xdc, 0x06, 0x00, 0x89, 
-       0x4a, 0x03, 0x58, 0x51, 0x29, 0x00, 0xd0, 0x01, 
-       0x23, 0x34, 0x5e, 0xc8, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x55, 0x10, 0xb5, 0xb0, 0x04, 0x03, 
-       0x0c, 0x1b, 0x04, 0x0a, 0x0c, 0x12, 0x20, 0xff, 
-       0x2b, 0x07, 0xdc, 0x10, 0x00, 0x9d, 0x4f, 0x09, 
-       0x59, 0x79, 0x29, 0x00, 0xd0, 0x0b, 0x07, 0x14, 
-       0x0f, 0x24, 0x68, 0x88, 0x21, 0x03, 0xf0, 0x03, 
-       0xfe, 0xa5, 0x59, 0x78, 0x68, 0x80, 0x1c, 0x21, 
-       0xf0, 0x03, 0xff, 0x4c, 0x20, 0x00, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x55, 0x10, 
-       0xb5, 0x00, 0x04, 0x01, 0x0c, 0x09, 0x20, 0xff, 
-       0x29, 0x07, 0xdc, 0x09, 0x00, 0x89, 0x4a, 0x05, 
-       0x58, 0x51, 0x29, 0x00, 0xd0, 0x04, 0x68, 0x88, 
-       0x21, 0x02, 0xf0, 0x03, 0xfe, 0x8b, 0x20, 0x00, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x55, 0x10, 
-       0xb5, 0x00, 0x04, 0x01, 0x0c, 0x09, 0x20, 0xff, 
-       0x29, 0x07, 0xdc, 0x09, 0x00, 0x89, 0x4a, 0x05, 
-       0x58, 0x51, 0x29, 0x00, 0xd0, 0x04, 0x68, 0x88, 
-       0x21, 0x00, 0xf0, 0x03, 0xfe, 0x77, 0x20, 0x00, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x55, 0x10, 
-       0xb5, 0xf0, 0x04, 0x05, 0x0c, 0x2d, 0x04, 0x09, 
-       0x0c, 0x09, 0x04, 0x12, 0x0c, 0x12, 0x04, 0x1e, 
-       0x0c, 0x36, 0x9c, 0x05, 0x9f, 0x06, 0x04, 0x24, 
-       0x0c, 0x24, 0x04, 0x3f, 0x0c, 0x3f, 0x20, 0xff, 
-       0xb0, 0x85, 0x2d, 0x0f, 0xdc, 0x04, 0x00, 0xab, 
-       0x4d, 0x10, 0x58, 0xed, 0x2d, 0x00, 0xd1, 0x03, 
-       0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x19, 0x88, 0x23, 0x32, 0x5e, 0xeb, 0x42, 0x98, 
-       0xdd, 0x02, 0x1a, 0x58, 0x04, 0x06, 0x0c, 0x36, 
-       0x19, 0x10, 0x23, 0x34, 0x5e, 0xeb, 0x42, 0x98, 
-       0xdd, 0x02, 0x1a, 0x98, 0x04, 0x04, 0x0c, 0x24, 
-       0x91, 0x00, 0x92, 0x01, 0x96, 0x02, 0x94, 0x03, 
-       0x97, 0x04, 0x46, 0x69, 0x68, 0xa8, 0xf0, 0x0a, 
-       0xfa, 0x1d, 0xe7, 0xe1, 0x2e, 0x08, 0x55, 0x10, 
-       0xb4, 0x80, 0x04, 0x03, 0x0c, 0x1b, 0x20, 0x00, 
-       0x29, 0x00, 0xdb, 0x0f, 0x2a, 0x00, 0xdb, 0x0d, 
-       0x00, 0x9b, 0x4f, 0x07, 0x58, 0xff, 0x2f, 0x00, 
-       0xd0, 0x08, 0x23, 0x32, 0x5e, 0xfb, 0x42, 0x8b, 
-       0xdd, 0x04, 0x23, 0x34, 0x5e, 0xf9, 0x42, 0x91, 
-       0xdd, 0x00, 0x20, 0x01, 0xbc, 0x80, 0x47, 0x70, 
-       0x2e, 0x08, 0x55, 0x10, 0xb5, 0xf0, 0x9c, 0x06, 
-       0x9e, 0x05, 0x04, 0x00, 0x0c, 0x00, 0xb0, 0x85, 
-       0x90, 0x00, 0x04, 0x08, 0x14, 0x00, 0x04, 0x17, 
-       0x14, 0x3f, 0x04, 0x1d, 0x14, 0x2d, 0x04, 0x31, 
-       0x14, 0x09, 0x91, 0x01, 0x04, 0x23, 0x0c, 0x1b, 
-       0x93, 0x02, 0xb0, 0x82, 0x99, 0x02, 0x00, 0x89, 
-       0x91, 0x06, 0x4a, 0x71, 0x92, 0x05, 0x58, 0x51, 
-       0x29, 0x00, 0xd1, 0x01, 0x20, 0xff, 0xe0, 0xd6, 
-       0x2d, 0x00, 0xda, 0x0e, 0x19, 0x40, 0x04, 0x00, 
-       0x14, 0x00, 0x42, 0x69, 0x04, 0x0d, 0x14, 0x2d, 
-       0x99, 0x03, 0x18, 0x79, 0x04, 0x0f, 0x14, 0x3f, 
-       0x99, 0x03, 0x42, 0x49, 0x04, 0x09, 0x14, 0x09, 
-       0x91, 0x03, 0x1c, 0x01, 0x1c, 0x04, 0x98, 0x02, 
-       0x1c, 0x3a, 0xf7, 0xff, 0xff, 0xb1, 0x28, 0x00, 
-       0xd0, 0x08, 0x98, 0x06, 0x99, 0x05, 0x58, 0x08, 
-       0x68, 0x80, 0x9b, 0x04, 0x1c, 0x21, 0x1c, 0x3a, 
-       0xf0, 0x09, 0xff, 0x7a, 0x98, 0x03, 0x10, 0x40, 
-       0x90, 0x00, 0x10, 0x6e, 0x1c, 0x28, 0xb0, 0x82, 
-       0xf0, 0x0e, 0xfd, 0x58, 0xf0, 0x0e, 0xfd, 0x94, 
-       0x90, 0x00, 0x91, 0x01, 0x98, 0x05, 0xf0, 0x0e, 
-       0xfd, 0x51, 0xf0, 0x0e, 0xfd, 0x8d, 0x9a, 0x00, 
-       0x9b, 0x01, 0xb0, 0x02, 0xf0, 0x0e, 0xfd, 0x8c, 
-       0x28, 0x00, 0xd0, 0x4c, 0x98, 0x03, 0x28, 0x00, 
-       0xdd, 0x21, 0x26, 0x00, 0x2d, 0x00, 0xdd, 0x6d, 
-       0x98, 0x00, 0x99, 0x03, 0x18, 0x40, 0x90, 0x00, 
-       0x34, 0x01, 0x42, 0xa8, 0xdb, 0x03, 0x98, 0x00, 
-       0x1b, 0x40, 0x90, 0x00, 0x37, 0x01, 0x98, 0x02, 
-       0x1c, 0x21, 0x1c, 0x3a, 0xf7, 0xff, 0xff, 0x78, 
-       0x28, 0x00, 0xd0, 0x08, 0x98, 0x06, 0x99, 0x05, 
-       0x58, 0x08, 0x68, 0x80, 0x9b, 0x04, 0x1c, 0x21, 
-       0x1c, 0x3a, 0xf0, 0x09, 0xff, 0x41, 0x36, 0x01, 
-       0x42, 0xae, 0xdb, 0xe1, 0xe0, 0x76, 0x98, 0x03, 
-       0x42, 0x40, 0x04, 0x00, 0x14, 0x00, 0x90, 0x03, 
-       0x98, 0x00, 0x42, 0x46, 0x20, 0x00, 0x90, 0x01, 
-       0x2d, 0x00, 0xdd, 0x43, 0x98, 0x03, 0x18, 0x36, 
-       0x34, 0x01, 0x42, 0xae, 0xdb, 0x01, 0x1b, 0x76, 
-       0x3f, 0x01, 0x98, 0x02, 0x1c, 0x21, 0x1c, 0x3a, 
-       0xf7, 0xff, 0xff, 0x52, 0x28, 0x00, 0xd0, 0x08, 
-       0x98, 0x06, 0x99, 0x05, 0x58, 0x08, 0x68, 0x80, 
-       0x9b, 0x04, 0x1c, 0x21, 0x1c, 0x3a, 0xf0, 0x09, 
-       0xff, 0x1b, 0x98, 0x01, 0x30, 0x01, 0x90, 0x01, 
-       0x42, 0xa8, 0xdb, 0xe3, 0xe0, 0x4e, 0x98, 0x03, 
-       0x28, 0x00, 0xdd, 0x24, 0x20, 0x00, 0x90, 0x01, 
-       0x98, 0x03, 0x28, 0x00, 0xdd, 0x1e, 0x19, 0x76, 
-       0x99, 0x03, 0x37, 0x01, 0x42, 0x8e, 0xdb, 0x02, 
-       0x98, 0x03, 0x1a, 0x36, 0x34, 0x01, 0x98, 0x02, 
-       0x1c, 0x21, 0x1c, 0x3a, 0xf7, 0xff, 0xff, 0x2c, 
-       0x28, 0x00, 0xd0, 0x08, 0x98, 0x06, 0x99, 0x05, 
-       0x58, 0x08, 0x68, 0x80, 0x9b, 0x04, 0x1c, 0x21, 
-       0x1c, 0x3a, 0xf0, 0x09, 0xfe, 0xf5, 0x98, 0x01, 
-       0x30, 0x01, 0x90, 0x01, 0x99, 0x03, 0x42, 0x88, 
-       0xdb, 0xe1, 0xe0, 0x27, 0xe0, 0x26, 0x98, 0x03, 
-       0x42, 0x40, 0x04, 0x01, 0x14, 0x09, 0x91, 0x03, 
-       0x20, 0x00, 0x90, 0x01, 0x29, 0x00, 0xdd, 0x1d, 
-       0x19, 0x76, 0x99, 0x03, 0x3f, 0x01, 0x42, 0x8e, 
-       0xdb, 0x02, 0x99, 0x03, 0x1a, 0x76, 0x34, 0x01, 
-       0x98, 0x02, 0x1c, 0x21, 0x1c, 0x3a, 0xf7, 0xff, 
-       0xff, 0x03, 0x28, 0x00, 0xd0, 0x08, 0x98, 0x06, 
-       0x99, 0x05, 0x58, 0x08, 0x68, 0x80, 0x9b, 0x04, 
-       0x1c, 0x21, 0x1c, 0x3a, 0xf0, 0x09, 0xfe, 0xcc, 
-       0x98, 0x01, 0x30, 0x01, 0x90, 0x01, 0x99, 0x03, 
-       0x42, 0x88, 0xdb, 0xe1, 0x20, 0x00, 0xb0, 0x07, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x55, 0x10, 0xb4, 0x80, 0x23, 0x00, 
-       0x88, 0x01, 0x0a, 0x0a, 0x06, 0x12, 0x0e, 0x12, 
-       0x06, 0x09, 0x0e, 0x09, 0x2a, 0xdf, 0xd0, 0x1a, 
-       0xdc, 0x07, 0x2a, 0xc4, 0xd0, 0x19, 0x2a, 0xd6, 
-       0xd0, 0x1b, 0x2a, 0xdc, 0xd1, 0x08, 0x22, 0x1e, 
-       0xe0, 0x06, 0x2a, 0xe4, 0xd0, 0x13, 0x2a, 0xf6, 
-       0xd0, 0x15, 0x2a, 0xfc, 0xd1, 0x00, 0x22, 0x1f, 
-       0x29, 0xdf, 0xd0, 0x26, 0xdc, 0x11, 0x29, 0xc4, 
-       0xd0, 0x25, 0x29, 0xd6, 0xd0, 0x27, 0x29, 0xdc, 
-       0xd1, 0x12, 0x21, 0x1e, 0xe0, 0x10, 0x22, 0x19, 
-       0xe7, 0xf2, 0x22, 0x1a, 0xe7, 0xf0, 0x22, 0x1b, 
-       0xe7, 0xee, 0x22, 0x1c, 0xe7, 0xec, 0x22, 0x1d, 
-       0xe7, 0xea, 0x29, 0xe4, 0xd0, 0x15, 0x29, 0xf6, 
-       0xd0, 0x17, 0x29, 0xfc, 0xd1, 0x00, 0x21, 0x1f, 
-       0x02, 0x17, 0x18, 0x7f, 0x80, 0x07, 0x30, 0x02, 
-       0x2a, 0x00, 0xd0, 0x04, 0x29, 0x00, 0xd0, 0x02, 
-       0x33, 0x01, 0x2b, 0x70, 0xdb, 0xc0, 0xbc, 0x80, 
-       0x47, 0x70, 0x21, 0x19, 0xe7, 0xf0, 0x21, 0x1a, 
-       0xe7, 0xee, 0x21, 0x1b, 0xe7, 0xec, 0x21, 0x1c, 
-       0xe7, 0xea, 0x21, 0x1d, 0xe7, 0xe8, 0xb5, 0xf0, 
-       0x1c, 0x0f, 0x1c, 0x11, 0x04, 0x02, 0x0c, 0x12, 
-       0x04, 0x0c, 0x0c, 0x24, 0x04, 0x1d, 0x0c, 0x2d, 
-       0x00, 0x96, 0xb0, 0x81, 0x48, 0x10, 0x90, 0x00, 
-       0x59, 0x81, 0x20, 0xff, 0x29, 0x00, 0xd0, 0x16, 
-       0x2a, 0x00, 0xd0, 0x14, 0x2a, 0x0f, 0xdc, 0x12, 
-       0x23, 0x32, 0x5e, 0xca, 0x42, 0xa2, 0xdb, 0x0e, 
-       0x23, 0x34, 0x5e, 0xc9, 0x42, 0xa9, 0xdb, 0x0a, 
-       0x1c, 0x38, 0xf7, 0xff, 0xff, 0x93, 0x98, 0x00, 
-       0x59, 0x80, 0x1c, 0x39, 0x1c, 0x22, 0x1c, 0x2b, 
-       0xf7, 0xff, 0xfb, 0x5c, 0x20, 0x00, 0xb0, 0x01, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x55, 0x10, 0xb4, 0xb0, 0x04, 0x07, 
-       0x0c, 0x3f, 0x04, 0x09, 0x0c, 0x09, 0x04, 0x14, 
-       0x14, 0x24, 0x04, 0x1a, 0x14, 0x12, 0x20, 0xff, 
-       0x2f, 0x0f, 0xdc, 0x1d, 0x00, 0xbd, 0x4f, 0x0f, 
-       0x59, 0x7b, 0x2b, 0x00, 0xd0, 0x18, 0x48, 0x0e, 
-       0x29, 0x01, 0xd0, 0x05, 0x29, 0x02, 0xd0, 0x01, 
-       0x29, 0x03, 0xd0, 0x03, 0x6c, 0x80, 0xe0, 0x02, 
-       0x6c, 0x40, 0xe0, 0x00, 0x6c, 0xc0, 0x62, 0x58, 
-       0x59, 0x78, 0x63, 0xc4, 0x20, 0x00, 0x43, 0xc0, 
-       0x42, 0x82, 0xd1, 0x02, 0x59, 0x79, 0x63, 0x88, 
-       0xe0, 0x01, 0x59, 0x78, 0x63, 0x82, 0x20, 0x00, 
-       0xbc, 0xb0, 0x47, 0x70, 0x2e, 0x08, 0x55, 0x10, 
-       0x2e, 0x08, 0x1c, 0x80, 0xb5, 0x00, 0x04, 0x00, 
-       0x0c, 0x00, 0x04, 0x09, 0x0c, 0x09, 0x00, 0x80, 
-       0x4a, 0x07, 0x58, 0x10, 0x28, 0x00, 0xd1, 0x02, 
-       0x20, 0xff, 0xbc, 0x08, 0x47, 0x18, 0x07, 0x89, 
-       0x0f, 0x89, 0x68, 0x80, 0xf0, 0x03, 0xfe, 0x76, 
-       0x20, 0x00, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x55, 0x10, 0x04, 0x09, 0x0c, 0x09, 
-       0x4b, 0x0a, 0x40, 0x18, 0x08, 0x4a, 0xd3, 0x01, 
-       0x23, 0x02, 0x43, 0x18, 0x08, 0x8a, 0xd3, 0x02, 
-       0x23, 0x01, 0x04, 0x5b, 0x43, 0x18, 0x08, 0xca, 
-       0xd3, 0x01, 0x23, 0x01, 0x43, 0x18, 0x09, 0x09, 
-       0xd3, 0x02, 0x23, 0x01, 0x04, 0x1b, 0x43, 0x18, 
-       0x47, 0x70, 0x00, 0x00, 0xff, 0xfc, 0xff, 0xfc, 
-       0xb5, 0xf0, 0x04, 0x00, 0x0c, 0x00, 0x04, 0x14, 
-       0x0c, 0x24, 0x1c, 0x1e, 0x1c, 0x0f, 0x28, 0x07, 
-       0xdc, 0x25, 0x28, 0x01, 0xdb, 0x23, 0x00, 0x85, 
-       0x48, 0x12, 0x59, 0x40, 0x28, 0x00, 0xd0, 0x1e, 
-       0x0e, 0x31, 0x02, 0x30, 0x0a, 0x00, 0xf7, 0xff, 
-       0xff, 0xd1, 0x1c, 0x06, 0x2f, 0x02, 0xd0, 0x0e, 
-       0x2f, 0x04, 0xd0, 0x0c, 0x2f, 0x10, 0xd0, 0x0a, 
-       0x23, 0xff, 0x33, 0x01, 0x42, 0x9f, 0xd1, 0x0e, 
-       0x06, 0x22, 0x0e, 0x12, 0x1c, 0x31, 0x48, 0x08, 
-       0x6c, 0x00, 0x68, 0x00, 0xe0, 0x05, 0x07, 0x22, 
-       0x0f, 0x12, 0x48, 0x06, 0x59, 0x40, 0x68, 0x00, 
-       0x1c, 0x31, 0xf0, 0x0b, 0xfa, 0xdb, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x55, 0x10, 
-       0x2e, 0x08, 0x1c, 0x80, 0x2e, 0x08, 0x55, 0x50, 
-       0xb5, 0xf0, 0x04, 0x04, 0x0c, 0x24, 0x04, 0x10, 
-       0x0c, 0x00, 0x04, 0x1f, 0x0c, 0x3f, 0x22, 0x00, 
-       0xb0, 0x81, 0x92, 0x00, 0x2c, 0x07, 0xdc, 0x3a, 
-       0x2c, 0x01, 0xdb, 0x38, 0x00, 0xa4, 0x4a, 0x1e, 
-       0x59, 0x12, 0x2a, 0x00, 0xd0, 0x33, 0x29, 0x02, 
-       0xd0, 0x1b, 0x29, 0x04, 0xd0, 0x19, 0x29, 0x10, 
-       0xd0, 0x17, 0x23, 0xff, 0x33, 0x01, 0x42, 0x99, 
-       0xd1, 0x29, 0x06, 0x02, 0x0e, 0x12, 0x46, 0x69, 
-       0x1c, 0x15, 0x4c, 0x16, 0x6c, 0x20, 0x68, 0x00, 
-       0xf0, 0x0b, 0xfa, 0xdc, 0x98, 0x00, 0x02, 0x00, 
-       0x0a, 0x00, 0x1c, 0x39, 0xf7, 0xff, 0xff, 0x82, 
-       0x90, 0x00, 0x1c, 0x01, 0x6c, 0x20, 0x1c, 0x2a, 
-       0xe0, 0x12, 0x07, 0x02, 0x0f, 0x12, 0x1c, 0x15, 
-       0x4e, 0x0d, 0x59, 0x30, 0x68, 0x00, 0x46, 0x69, 
-       0xf0, 0x0b, 0xfa, 0xc8, 0x98, 0x00, 0x02, 0x00, 
-       0x0a, 0x00, 0x1c, 0x39, 0xf7, 0xff, 0xff, 0x6e, 
-       0x90, 0x00, 0x1c, 0x01, 0x59, 0x30, 0x1c, 0x2a, 
-       0x68, 0x00, 0xf0, 0x0b, 0xfa, 0x8b, 0xb0, 0x01, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x55, 0x10, 0x2e, 0x08, 0x1c, 0x80, 
-       0x2e, 0x08, 0x55, 0x50, 0xb5, 0xf0, 0x4f, 0x28, 
-       0x25, 0x00, 0x24, 0xff, 0x69, 0x38, 0x28, 0x00, 
-       0xd1, 0x01, 0x60, 0xbd, 0xe0, 0x0c, 0x26, 0x05, 
-       0x68, 0xb9, 0x29, 0x07, 0xd2, 0xf9, 0xa3, 0x02, 
-       0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x04, 0x08, 0x10, 0x1a, 0x21, 0x30, 0x38, 0x00, 
-       0x1c, 0x20, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0x01, 0x02, 0x80, 0xf7, 0xf6, 0xfa, 0x86, 
-       0x28, 0x00, 0xdb, 0x2d, 0x20, 0x02, 0xe0, 0x25, 
-       0x48, 0x18, 0xf7, 0xf6, 0xfa, 0xa1, 0x28, 0x00, 
-       0xdb, 0x26, 0x89, 0xb8, 0x28, 0x00, 0xdd, 0x15, 
-       0x20, 0x03, 0xe0, 0x1b, 0x89, 0xb8, 0xf7, 0xf6, 
-       0xfa, 0x75, 0x28, 0x00, 0xdb, 0x1c, 0x20, 0x04, 
-       0xe0, 0x14, 0xf7, 0xf6, 0xfa, 0x91, 0x28, 0x00, 
-       0xdb, 0x16, 0x69, 0x39, 0x18, 0x09, 0x61, 0x39, 
-       0x89, 0xb9, 0x1a, 0x08, 0x81, 0xb8, 0x89, 0xb8, 
-       0x28, 0x00, 0xdc, 0xe9, 0x60, 0xbe, 0xe0, 0x0b, 
-       0x20, 0x00, 0xf7, 0xf6, 0xfa, 0x5f, 0x28, 0x00, 
-       0xd1, 0x06, 0x20, 0x06, 0x60, 0xb8, 0xe0, 0x03, 
-       0xf7, 0xf6, 0xfa, 0x7a, 0x28, 0x00, 0xda, 0xb8, 
-       0x1c, 0x28, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x1d, 0x00, 0x2e, 0x08, 0x55, 0xb0, 
-       0xb5, 0xf0, 0x04, 0x04, 0x0c, 0x24, 0x04, 0x0d, 
-       0x0c, 0x2d, 0x04, 0x16, 0x0c, 0x36, 0xb0, 0x85, 
-       0xa8, 0x01, 0x49, 0x2e, 0xc9, 0x8e, 0xc0, 0x8e, 
-       0x2c, 0x00, 0xd0, 0x07, 0x2c, 0x01, 0xd0, 0x07, 
-       0x2c, 0x02, 0xd0, 0x07, 0x2c, 0x03, 0xd1, 0x3f, 
-       0x21, 0x08, 0xe0, 0x04, 0x21, 0x01, 0xe0, 0x02, 
-       0x21, 0x02, 0xe0, 0x00, 0x21, 0x04, 0x91, 0x00, 
-       0x23, 0x2d, 0x01, 0x1b, 0x42, 0x9d, 0xdc, 0x33, 
-       0x23, 0x09, 0x01, 0x9b, 0x42, 0x9e, 0xdc, 0x2f, 
-       0x1e, 0x68, 0x90, 0x03, 0x1e, 0x70, 0x90, 0x04, 
-       0xa8, 0x01, 0x1c, 0x21, 0xf0, 0x07, 0xfb, 0xb8, 
-       0x4f, 0x1d, 0x60, 0x78, 0x00, 0x80, 0x23, 0x01, 
-       0x04, 0x1b, 0x42, 0x98, 0xdc, 0x20, 0x1f, 0xf8, 
-       0x38, 0x79, 0x67, 0xc4, 0x68, 0x38, 0x28, 0x00, 
-       0xd0, 0x0a, 0x68, 0x80, 0xb0, 0x81, 0x46, 0x6b, 
-       0x22, 0x00, 0x21, 0x00, 0xf0, 0x09, 0xfd, 0x42, 
-       0x68, 0x38, 0xf7, 0xfe, 0xfe, 0x90, 0xb0, 0x01, 
-       0x22, 0x00, 0x21, 0x0a, 0x20, 0x01, 0xb4, 0x07, 
-       0x1c, 0x22, 0xb4, 0x04, 0x21, 0x00, 0x20, 0x00, 
-       0x1c, 0x2a, 0x1c, 0x33, 0xf7, 0xfe, 0xfd, 0x62, 
-       0xb0, 0x04, 0x60, 0x38, 0x1c, 0x01, 0xd1, 0x03, 
-       0xb0, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x69, 0x88, 0x99, 0x00, 0x43, 0x4d, 0x1d, 0xe9, 
-       0xd5, 0x00, 0x31, 0x07, 0x10, 0xc9, 0x43, 0x71, 
-       0x61, 0x38, 0x60, 0x79, 0x81, 0xb9, 0x20, 0x01, 
-       0x60, 0xb8, 0xe7, 0xed, 0x2e, 0x03, 0x39, 0x50, 
-       0x2e, 0x08, 0x1d, 0x00, 0xb5, 0xf0, 0x04, 0x00, 
-       0x0c, 0x00, 0x04, 0x09, 0x0c, 0x09, 0xb0, 0x87, 
-       0x91, 0x00, 0x04, 0x11, 0x0c, 0x09, 0x91, 0x01, 
-       0x04, 0x19, 0x0c, 0x09, 0x91, 0x02, 0xb0, 0x85, 
-       0x28, 0x07, 0xdc, 0x43, 0x28, 0x01, 0xdb, 0x41, 
-       0x00, 0x85, 0x48, 0x3e, 0x90, 0x0b, 0x59, 0x41, 
-       0x29, 0x00, 0xd0, 0x3b, 0x48, 0x3c, 0x90, 0x0a, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x36, 0x23, 0x2c, 
-       0x5e, 0xca, 0x2a, 0x0b, 0xd2, 0x32, 0xa3, 0x02, 
-       0x5c, 0x9b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 
-       0x06, 0x06, 0x06, 0x00, 0x22, 0x00, 0x92, 0x00, 
-       0x92, 0x01, 0x23, 0x32, 0x5e, 0xc3, 0x93, 0x02, 
-       0x23, 0x34, 0x5e, 0xc0, 0x90, 0x03, 0x92, 0x04, 
-       0x98, 0x07, 0x08, 0x80, 0xd3, 0x40, 0x23, 0x2c, 
-       0x5e, 0xc8, 0x28, 0x00, 0xd0, 0x08, 0x28, 0x01, 
-       0xd0, 0x08, 0x28, 0x02, 0xd0, 0x08, 0x28, 0x03, 
-       0xd1, 0x10, 0x27, 0xff, 0x37, 0x01, 0xe0, 0x04, 
-       0x27, 0x02, 0xe0, 0x02, 0x27, 0x04, 0xe0, 0x00, 
-       0x27, 0x10, 0x4e, 0x24, 0x23, 0xff, 0x33, 0x01, 
-       0x42, 0x9f, 0xd1, 0x16, 0x24, 0x00, 0x48, 0x22, 
-       0x90, 0x09, 0xe0, 0x03, 0xb0, 0x0c, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0xa0, 0x58, 0x31, 
-       0x29, 0x00, 0xd0, 0x06, 0x06, 0x22, 0x0e, 0x12, 
-       0x98, 0x09, 0x6c, 0x00, 0x68, 0x00, 0xf0, 0x0b, 
-       0xf9, 0x5d, 0x34, 0x01, 0x42, 0xbc, 0xdb, 0xf1, 
-       0xe0, 0x12, 0x24, 0x00, 0x2f, 0x00, 0xdd, 0x0f, 
-       0x48, 0x16, 0x90, 0x08, 0x00, 0xa0, 0x58, 0x31, 
-       0x29, 0x00, 0xd0, 0x06, 0x07, 0x22, 0x0f, 0x12, 
-       0x98, 0x08, 0x59, 0x40, 0x68, 0x00, 0xf0, 0x0b, 
-       0xf9, 0x49, 0x34, 0x01, 0x42, 0xbc, 0xdb, 0xf1, 
-       0x98, 0x07, 0x08, 0x40, 0xd3, 0x01, 0x22, 0xff, 
-       0xe0, 0x00, 0x22, 0x00, 0x99, 0x06, 0xb4, 0x06, 
-       0x98, 0x0d, 0x59, 0x40, 0x68, 0x81, 0x98, 0x0c, 
-       0x68, 0x00, 0x68, 0x80, 0x9b, 0x07, 0xaa, 0x02, 
-       0xf0, 0x09, 0xff, 0x12, 0xb0, 0x0e, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x55, 0x10, 
-       0x2e, 0x08, 0x1d, 0x00, 0x2e, 0x08, 0x55, 0xb0, 
-       0x2e, 0x08, 0x1c, 0x80, 0x2e, 0x08, 0x55, 0x50, 
-       0xb5, 0x80, 0x4f, 0x0a, 0x68, 0x38, 0x28, 0x00, 
-       0xd0, 0x0c, 0x68, 0x80, 0xb0, 0x81, 0x46, 0x6b, 
-       0x22, 0x00, 0x21, 0x00, 0xf0, 0x09, 0xfc, 0x72, 
-       0x68, 0x38, 0xf7, 0xfe, 0xfd, 0xc0, 0x20, 0x00, 
-       0x60, 0x38, 0xb0, 0x01, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x1d, 0x00, 
-       0xb5, 0x00, 0x04, 0x01, 0x0c, 0x09, 0x20, 0xff, 
-       0x29, 0x07, 0xdc, 0x09, 0x00, 0x89, 0x4a, 0x05, 
-       0x58, 0x51, 0x29, 0x00, 0xd0, 0x04, 0x68, 0x88, 
-       0x21, 0x01, 0xf0, 0x03, 0xfb, 0x93, 0x20, 0x00, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x55, 0x10, 
-       0xb5, 0x00, 0x04, 0x01, 0x0c, 0x09, 0x20, 0xff, 
-       0x29, 0x07, 0xdc, 0x09, 0x00, 0x89, 0x4a, 0x05, 
-       0x58, 0x51, 0x29, 0x00, 0xd0, 0x04, 0x68, 0x88, 
-       0x21, 0x00, 0xf0, 0x03, 0xfb, 0x7f, 0x20, 0x00, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x55, 0x10, 
-       0xb5, 0xf7, 0xb0, 0x86, 0x9c, 0x07, 0x20, 0x00, 
-       0x6e, 0x40, 0x90, 0x05, 0x98, 0x05, 0x30, 0x0c, 
-       0x90, 0x05, 0x48, 0x7f, 0x90, 0x04, 0x98, 0x04, 
-       0x30, 0x0c, 0x90, 0x04, 0xf0, 0x11, 0xff, 0xf0, 
-       0x90, 0x01, 0xf0, 0x11, 0xff, 0xd3, 0x90, 0x00, 
-       0x20, 0x00, 0x43, 0xc0, 0x49, 0x79, 0x60, 0x08, 
-       0x20, 0x00, 0x43, 0xc0, 0x49, 0x77, 0x60, 0x88, 
-       0x20, 0x00, 0x43, 0xc0, 0x49, 0x75, 0x61, 0x08, 
-       0x98, 0x06, 0x28, 0x00, 0xd0, 0x73, 0x20, 0x00, 
-       0x6a, 0x40, 0x90, 0x03, 0x68, 0x20, 0x30, 0x05, 
-       0x99, 0x06, 0x1a, 0x08, 0x90, 0x06, 0x68, 0xe0, 
-       0x28, 0x00, 0xd0, 0x08, 0x68, 0x60, 0x99, 0x03, 
-       0x68, 0x09, 0x42, 0x88, 0xd1, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0xe0, 0x06, 0x68, 0x60, 
-       0x9a, 0x08, 0x42, 0x90, 0xd1, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 0xd0, 0x73, 
-       0x68, 0x27, 0x68, 0xe0, 0x28, 0x00, 0xd0, 0x01, 
-       0x98, 0x05, 0xe0, 0x00, 0x98, 0x04, 0x1c, 0x06, 
-       0x68, 0xe0, 0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 
-       0x6e, 0x40, 0xe0, 0x00, 0x48, 0x5c, 0x90, 0x02, 
-       0x1d, 0xe5, 0x35, 0x0d, 0x68, 0xa0, 0x28, 0x08, 
-       0xd2, 0x5f, 0xa3, 0x02, 0x5c, 0x1b, 0x00, 0x5b, 
-       0x44, 0x9f, 0x1c, 0x00, 0x04, 0x16, 0x28, 0x3a, 
-       0x49, 0x55, 0x65, 0x71, 0x69, 0x20, 0x49, 0x55, 
-       0x60, 0x08, 0xcd, 0x02, 0x48, 0x53, 0x60, 0x41, 
-       0xcd, 0x02, 0x98, 0x02, 0x60, 0x01, 0x3f, 0x01, 
-       0x1c, 0x38, 0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 
-       0xcd, 0x02, 0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x67, 
-       0x69, 0x20, 0x49, 0x4c, 0x60, 0x88, 0xcd, 0x02, 
-       0x48, 0x4a, 0x60, 0xc1, 0xcd, 0x02, 0x98, 0x02, 
-       0x60, 0x41, 0x3f, 0x01, 0x1c, 0x38, 0x3f, 0x01, 
-       0x28, 0x00, 0xd0, 0x02, 0xcd, 0x02, 0xc6, 0x02, 
-       0xe7, 0xf8, 0xe0, 0x55, 0x69, 0x20, 0x49, 0x43, 
-       0x61, 0x08, 0xcd, 0x02, 0x48, 0x41, 0x61, 0x41, 
-       0xcd, 0x02, 0x98, 0x02, 0x60, 0x81, 0x3f, 0x01, 
-       0x1c, 0x38, 0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 
-       0xcd, 0x02, 0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x43, 
-       0x69, 0x20, 0x00, 0x80, 0xe0, 0x00, 0xe0, 0x4b, 
-       0x21, 0x00, 0x6a, 0x89, 0x50, 0x0e, 0x1c, 0x38, 
-       0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 0xcd, 0x02, 
-       0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x34, 0x69, 0x20, 
-       0x00, 0x80, 0x49, 0x33, 0x50, 0x0e, 0x1c, 0x38, 
-       0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 0xcd, 0x02, 
-       0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x28, 0x69, 0x20, 
-       0x00, 0x80, 0x21, 0x00, 0x6e, 0x09, 0xe0, 0x01, 
-       0xe0, 0x28, 0xe0, 0x20, 0x50, 0x0e, 0x1c, 0x38, 
-       0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 0xcd, 0x02, 
-       0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x18, 0x69, 0x20, 
-       0x00, 0x80, 0x49, 0x26, 0x50, 0x0e, 0x1c, 0x38, 
-       0x3f, 0x01, 0x28, 0x00, 0xd0, 0x02, 0xcd, 0x02, 
-       0xc6, 0x02, 0xe7, 0xf8, 0xe0, 0x0c, 0x69, 0x20, 
-       0x90, 0x03, 0x1c, 0x38, 0x3f, 0x01, 0x28, 0x00, 
-       0xd0, 0x04, 0xcd, 0x02, 0x98, 0x03, 0xc0, 0x02, 
-       0x90, 0x03, 0xe7, 0xf6, 0xe0, 0x00, 0xe7, 0xff, 
-       0x68, 0xe0, 0x28, 0xff, 0xd1, 0x01, 0x96, 0x05, 
-       0xe0, 0x00, 0x96, 0x04, 0x68, 0x20, 0x00, 0x80, 
-       0x19, 0x00, 0x1d, 0xc4, 0x34, 0x0d, 0xe7, 0x3b, 
-       0x98, 0x01, 0x28, 0x00, 0xd1, 0x01, 0xf0, 0x11, 
-       0xff, 0x4f, 0x98, 0x00, 0x28, 0x00, 0xd1, 0x01, 
-       0xf0, 0x11, 0xff, 0x2e, 0x20, 0x00, 0x6e, 0x80, 
-       0x68, 0x00, 0x4b, 0x0f, 0x42, 0x98, 0xd0, 0x06, 
-       0x48, 0x0d, 0x21, 0x00, 0x6e, 0x89, 0x60, 0x08, 
-       0x20, 0x01, 0x49, 0x08, 0x62, 0x08, 0x20, 0x00, 
-       0x21, 0x00, 0x6e, 0x89, 0x60, 0x08, 0x20, 0x00, 
-       0xb0, 0x06, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0xb0, 0x06, 0xe7, 0xf9, 0x00, 0x00, 
-       0x2e, 0x08, 0x59, 0xb0, 0x66, 0x00, 0x00, 0x80, 
-       0x2e, 0x08, 0x3a, 0xf4, 0x2e, 0x08, 0x1d, 0x14, 
-       0xda, 0xa5, 0xaa, 0x57, 0xb5, 0x80, 0xb0, 0xa7, 
-       0x46, 0x68, 0x4f, 0x08, 0x23, 0x13, 0xcf, 0x06, 
-       0xc0, 0x06, 0x3b, 0x01, 0xd1, 0xfb, 0xcf, 0x04, 
-       0xc0, 0x04, 0x46, 0x69, 0x4a, 0x04, 0x20, 0x27, 
-       0xf7, 0xff, 0xfe, 0xde, 0xb0, 0x27, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x03, 0x39, 0x60, 
-       0xf0, 0x24, 0x00, 0x09, 0xb5, 0xff, 0xb0, 0x83, 
-       0x99, 0x04, 0x04, 0x09, 0x0c, 0x09, 0x91, 0x00, 
-       0x9a, 0x05, 0x06, 0x16, 0x0e, 0x36, 0x9b, 0x06, 
-       0x06, 0x18, 0x0e, 0x00, 0x90, 0x01, 0x98, 0x0c, 
-       0x06, 0x00, 0x0e, 0x00, 0x90, 0x02, 0xb0, 0x84, 
-       0x25, 0x00, 0x98, 0x07, 0x1d, 0xc2, 0x32, 0x21, 
-       0x92, 0x00, 0x20, 0xff, 0x30, 0x01, 0x68, 0x00, 
-       0x49, 0x6b, 0x60, 0x08, 0x98, 0x12, 0x28, 0x01, 
-       0xd1, 0x73, 0x98, 0x07, 0x28, 0x00, 0xd1, 0x05, 
-       0x20, 0x63, 0xb0, 0x07, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x21, 0x00, 0x91, 0x01, 
-       0x99, 0x01, 0x23, 0xff, 0x33, 0xe1, 0x42, 0x99, 
-       0xd3, 0x04, 0xe0, 0x0a, 0x99, 0x01, 0x31, 0x01, 
-       0x91, 0x01, 0xe7, 0xf5, 0x20, 0x00, 0x99, 0x01, 
-       0x23, 0x2c, 0x43, 0x59, 0x9a, 0x00, 0x50, 0x50, 
-       0xe7, 0xf4, 0x98, 0x07, 0x49, 0x5b, 0x68, 0x09, 
-       0x60, 0x08, 0x98, 0x05, 0x28, 0x10, 0xdb, 0x01, 
-       0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0x99, 0x05, 
-       0x29, 0x1f, 0xdc, 0x01, 0x21, 0x01, 0xe0, 0x00, 
-       0x21, 0x00, 0x40, 0x08, 0xd0, 0x04, 0x98, 0x05, 
-       0x49, 0x53, 0x68, 0x09, 0x60, 0x08, 0xe0, 0x02, 
-       0x20, 0x62, 0xb0, 0x07, 0xe7, 0xce, 0x20, 0x00, 
-       0x49, 0x4d, 0x68, 0x09, 0x70, 0x08, 0x1c, 0x30, 
-       0x23, 0x03, 0x02, 0x5b, 0x22, 0x01, 0x02, 0xd2, 
-       0x21, 0x01, 0xf0, 0x00, 0xfb, 0x01, 0x1c, 0x07, 
-       0x2f, 0x00, 0xd0, 0x02, 0x20, 0xa2, 0xb0, 0x07, 
-       0xe7, 0xbc, 0x22, 0x00, 0xb4, 0x04, 0x99, 0x05, 
-       0x1c, 0x30, 0x23, 0x04, 0x22, 0x00, 0xf0, 0x00, 
-       0xf9, 0x2f, 0xb0, 0x01, 0x1c, 0x07, 0x2f, 0x00, 
-       0xd0, 0x02, 0x20, 0xa2, 0xb0, 0x07, 0xe7, 0xad, 
-       0x98, 0x06, 0x28, 0x00, 0xdb, 0x04, 0x98, 0x06, 
-       0x28, 0x3f, 0xdc, 0x01, 0x9d, 0x06, 0xe0, 0x00, 
-       0x25, 0x1b, 0x98, 0x11, 0x01, 0x80, 0x43, 0x05, 
-       0x23, 0x80, 0x43, 0x1d, 0x48, 0x39, 0x68, 0x01, 
-       0x0a, 0x09, 0x02, 0x09, 0x60, 0x01, 0x48, 0x37, 
-       0x68, 0x01, 0x43, 0x29, 0x60, 0x01, 0xf0, 0x11, 
-       0xfe, 0x2d, 0x90, 0x03, 0xf0, 0x11, 0xfe, 0x44, 
-       0xe0, 0x00, 0xe0, 0x13, 0x90, 0x02, 0xf0, 0x11, 
-       0xfe, 0xa3, 0x1c, 0x04, 0x4b, 0x30, 0x40, 0x1c, 
-       0x1c, 0x20, 0xf0, 0x11, 0xfe, 0xa1, 0x98, 0x02, 
-       0x28, 0x40, 0xd0, 0x01, 0xf0, 0x11, 0xfe, 0x6c, 
-       0x98, 0x03, 0x28, 0x80, 0xd0, 0x01, 0xf0, 0x11, 
-       0xfe, 0x4b, 0xe0, 0x43, 0x22, 0x00, 0xb4, 0x04, 
-       0x1c, 0x30, 0x23, 0x04, 0x22, 0x00, 0x49, 0x27, 
-       0xf0, 0x00, 0xf8, 0xee, 0xb0, 0x01, 0x1c, 0x07, 
-       0x2f, 0x00, 0xd0, 0x02, 0x20, 0xa2, 0xb0, 0x07, 
-       0xe7, 0x6c, 0x1c, 0x30, 0x23, 0x03, 0x02, 0x5b, 
-       0x22, 0x01, 0x02, 0xd2, 0x21, 0x02, 0xf0, 0x00, 
-       0xfa, 0xa3, 0x1c, 0x07, 0x2f, 0x00, 0xd0, 0x02, 
-       0x20, 0xa2, 0xb0, 0x07, 0xe7, 0x5e, 0x48, 0x19, 
-       0x68, 0x01, 0x0a, 0x09, 0x02, 0x09, 0x60, 0x01, 
-       0x48, 0x16, 0x68, 0x01, 0x23, 0x1b, 0x43, 0x19, 
-       0x60, 0x01, 0x48, 0x12, 0x68, 0x00, 0x68, 0x00, 
-       0x90, 0x07, 0xf0, 0x11, 0xfd, 0xe7, 0x90, 0x03, 
-       0xf0, 0x11, 0xfd, 0xfe, 0x90, 0x02, 0xf0, 0x11, 
-       0xfe, 0x5f, 0x1c, 0x04, 0x23, 0x01, 0x04, 0x5b, 
-       0x43, 0x1c, 0x1c, 0x20, 0xf0, 0x11, 0xfe, 0x5c, 
-       0x98, 0x02, 0x28, 0x40, 0xd0, 0x01, 0xf0, 0x11, 
-       0xfe, 0x27, 0x98, 0x03, 0x28, 0x80, 0xd0, 0x01, 
-       0xf0, 0x11, 0xfe, 0x06, 0x1c, 0x38, 0xb0, 0x07, 
-       0xe7, 0x34, 0xb0, 0x04, 0xb0, 0x03, 0xe7, 0x31, 
-       0x2e, 0x08, 0x5d, 0xb8, 0x2e, 0x08, 0x5d, 0xb0, 
-       0x2e, 0x08, 0x5d, 0xb4, 0x68, 0x00, 0x00, 0x38, 
-       0xff, 0xfd, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 
-       0xb5, 0x00, 0xf7, 0xff, 0xfe, 0xe7, 0xf0, 0x00, 
-       0xf8, 0x02, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 
-       0xf0, 0x0b, 0xf9, 0x48, 0x26, 0x00, 0x2e, 0x04, 
-       0xd3, 0x02, 0xe0, 0x12, 0x36, 0x01, 0xe7, 0xfa, 
-       0x01, 0x30, 0x4b, 0x3c, 0x18, 0xc7, 0x25, 0x00, 
-       0x2d, 0x04, 0xd3, 0x02, 0xe0, 0x08, 0x35, 0x01, 
-       0xe7, 0xfa, 0x20, 0x00, 0x60, 0xb8, 0x20, 0x00, 
-       0x60, 0xf8, 0x37, 0xff, 0x37, 0x01, 0xe7, 0xf6, 
-       0xe7, 0xec, 0x4f, 0x35, 0x25, 0x00, 0x2d, 0x04, 
-       0xd3, 0x02, 0xe0, 0x07, 0x35, 0x01, 0xe7, 0xfa, 
-       0x20, 0x00, 0x60, 0xb8, 0x20, 0x00, 0x60, 0xf8, 
-       0x37, 0x10, 0xe7, 0xf7, 0x20, 0x00, 0x49, 0x2f, 
-       0x68, 0x09, 0x70, 0x08, 0x24, 0x00, 0x2c, 0x20, 
-       0xd3, 0x02, 0xe0, 0x1f, 0x34, 0x01, 0xe7, 0xfa, 
-       0x21, 0x00, 0x00, 0xe0, 0x4a, 0x2a, 0x68, 0x12, 
-       0x50, 0x11, 0x20, 0x00, 0x00, 0xe1, 0x4a, 0x28, 
-       0x68, 0x12, 0x18, 0x89, 0x60, 0x48, 0x21, 0x00, 
-       0x00, 0xe0, 0x4a, 0x26, 0x68, 0x12, 0x18, 0x80, 
-       0x60, 0x41, 0x20, 0x00, 0x00, 0xa1, 0x4a, 0x24, 
-       0x68, 0x12, 0x50, 0x50, 0x20, 0x00, 0x00, 0xe1, 
-       0x1b, 0x09, 0x00, 0x89, 0x4a, 0x21, 0x68, 0x12, 
-       0x52, 0x50, 0xe7, 0xdf, 0x20, 0x00, 0x21, 0x19, 
-       0x06, 0x89, 0x62, 0x48, 0x48, 0x1e, 0x21, 0x19, 
-       0x06, 0x89, 0x62, 0x48, 0x20, 0x00, 0x49, 0x1d, 
-       0x68, 0x09, 0x60, 0x08, 0x20, 0x00, 0x49, 0x1b, 
-       0x68, 0x09, 0x60, 0x48, 0x20, 0x00, 0x49, 0x19, 
-       0x68, 0x09, 0x60, 0xc8, 0x20, 0x00, 0x49, 0x17, 
-       0x68, 0x09, 0x61, 0x08, 0x20, 0x00, 0x49, 0x15, 
-       0x68, 0x09, 0x61, 0x48, 0x20, 0x00, 0x49, 0x13, 
-       0x68, 0x09, 0x61, 0x88, 0x20, 0x00, 0x49, 0x12, 
-       0x68, 0x09, 0x60, 0x08, 0x20, 0x00, 0x49, 0x10, 
-       0x68, 0x09, 0x60, 0x48, 0x20, 0x00, 0x49, 0x0e, 
-       0x68, 0x09, 0x60, 0x88, 0x48, 0x0d, 0x68, 0x01, 
-       0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x9e, 0x00, 0x00, 0xc0, 
-       0x9e, 0x00, 0x09, 0x80, 0x2e, 0x08, 0x5d, 0xbc, 
-       0x2e, 0x08, 0x5d, 0xd0, 0x2e, 0x08, 0x5d, 0xd4, 
-       0x2e, 0x08, 0x5d, 0xcc, 0x2e, 0x08, 0x5d, 0xc4, 
-       0x00, 0x40, 0x00, 0x03, 0x2e, 0x08, 0x5e, 0x0c, 
-       0x2e, 0x08, 0x5e, 0x10, 0x6a, 0x00, 0x00, 0x10, 
-       0xb5, 0xff, 0xb0, 0x83, 0x98, 0x03, 0x06, 0x04, 
-       0x0e, 0x24, 0x99, 0x04, 0x04, 0x08, 0x0c, 0x00, 
-       0x90, 0x00, 0x9a, 0x05, 0x06, 0x10, 0x0e, 0x00, 
-       0x90, 0x01, 0x9b, 0x06, 0x06, 0x18, 0x0e, 0x00, 
-       0x90, 0x02, 0xb0, 0x81, 0x00, 0xe0, 0x49, 0xc1, 
-       0x68, 0x09, 0x18, 0x47, 0x00, 0xa0, 0x49, 0xc0, 
-       0x68, 0x09, 0x18, 0x45, 0x00, 0xe0, 0x1b, 0x00, 
-       0x00, 0x80, 0x49, 0xbe, 0x68, 0x09, 0x18, 0x46, 
-       0x2c, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x04, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x68, 0x28, 0x4b, 0xb9, 0x40, 0x18, 0x60, 0x28, 
-       0x68, 0x38, 0x4b, 0xb8, 0x40, 0x18, 0x60, 0x38, 
-       0x68, 0x38, 0x23, 0x40, 0x40, 0x18, 0xd0, 0x17, 
-       0x68, 0x38, 0x23, 0x40, 0x43, 0xdb, 0x40, 0x18, 
-       0x60, 0x38, 0x48, 0xb3, 0x68, 0x01, 0x08, 0x49, 
-       0x00, 0x49, 0x60, 0x01, 0x48, 0xb1, 0x68, 0x01, 
-       0x23, 0x01, 0x05, 0x5b, 0x43, 0x19, 0x60, 0x01, 
-       0x98, 0x01, 0x4b, 0xaf, 0x42, 0x98, 0xd1, 0x03, 
-       0x20, 0x00, 0x49, 0xae, 0x68, 0x09, 0x60, 0x08, 
-       0x98, 0x01, 0x4b, 0xab, 0x42, 0x98, 0xd0, 0x73, 
-       0x68, 0x38, 0x23, 0x21, 0x43, 0xdb, 0x40, 0x18, 
-       0x60, 0x38, 0x68, 0x28, 0x23, 0x07, 0x03, 0x5b, 
-       0x40, 0x18, 0x60, 0x28, 0x98, 0x01, 0x4b, 0xa6, 
-       0x40, 0x18, 0x68, 0x29, 0x43, 0x08, 0x60, 0x28, 
-       0x20, 0x00, 0x75, 0x30, 0x98, 0x02, 0x07, 0x80, 
-       0x0f, 0x80, 0x28, 0x01, 0xd1, 0x04, 0x88, 0x30, 
-       0x23, 0x10, 0x43, 0x18, 0x80, 0x30, 0xe0, 0x04, 
-       0x88, 0x30, 0x23, 0x10, 0x43, 0xdb, 0x40, 0x18, 
-       0x80, 0x30, 0x98, 0x02, 0x23, 0x80, 0x40, 0x18, 
-       0x28, 0x80, 0xd1, 0x08, 0x68, 0x38, 0x23, 0x40, 
-       0x43, 0x18, 0x60, 0x38, 0x20, 0xff, 0x49, 0x97, 
-       0x68, 0x09, 0x70, 0x08, 0xe0, 0x04, 0x68, 0x38, 
-       0x23, 0x40, 0x43, 0xdb, 0x40, 0x18, 0x60, 0x38, 
-       0x98, 0x03, 0x28, 0x01, 0xd1, 0x36, 0x88, 0x30, 
-       0x23, 0x10, 0x43, 0xdb, 0x40, 0x18, 0x80, 0x30, 
-       0x20, 0x33, 0x06, 0x40, 0x6d, 0x40, 0x23, 0x0d, 
-       0x06, 0x9b, 0x1a, 0xc1, 0x00, 0xe0, 0x4a, 0x8c, 
-       0x68, 0x12, 0x18, 0x80, 0x60, 0x41, 0x20, 0x01, 
-       0x70, 0xb0, 0x68, 0x38, 0x23, 0x01, 0x03, 0x9b, 
-       0x43, 0x18, 0x60, 0x38, 0x68, 0x38, 0x4b, 0x87, 
-       0x43, 0x18, 0x60, 0x38, 0x48, 0x86, 0x70, 0x44, 
-       0x20, 0x00, 0x49, 0x86, 0x68, 0x09, 0x60, 0x08, 
-       0x20, 0x01, 0x02, 0xc0, 0x49, 0x84, 0x61, 0x48, 
-       0x49, 0x83, 0x61, 0x08, 0x20, 0x01, 0x49, 0x83, 
-       0x64, 0x48, 0x20, 0x00, 0x49, 0x81, 0x64, 0x48, 
-       0x68, 0x28, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
-       0x60, 0x28, 0x20, 0x00, 0x49, 0x7e, 0x68, 0x09, 
-       0x60, 0x08, 0xe0, 0x9a, 0x98, 0x03, 0x28, 0x02, 
-       0xd1, 0x30, 0x20, 0x33, 0x06, 0x40, 0xe0, 0x00, 
-       0xe0, 0x94, 0x6d, 0xc0, 0x23, 0x0d, 0x06, 0x9b, 
-       0x1a, 0xc0, 0x00, 0xe1, 0x4a, 0x70, 0x68, 0x12, 
-       0x18, 0x89, 0x60, 0x48, 0x20, 0x02, 0x70, 0xb0, 
-       0x68, 0x38, 0x23, 0x01, 0x03, 0xdb, 0x43, 0x18, 
-       0x60, 0x38, 0x68, 0x38, 0x4b, 0x6b, 0x43, 0x18, 
-       0x60, 0x38, 0x48, 0x6b, 0x70, 0x84, 0x20, 0x00, 
-       0x49, 0x6e, 0x60, 0x08, 0x00, 0xe0, 0x49, 0x5b, 
-       0x68, 0x09, 0x58, 0x08, 0x23, 0xff, 0x33, 0x01, 
-       0x43, 0x18, 0x00, 0xe1, 0x4a, 0x57, 0x68, 0x12, 
-       0x50, 0x50, 0x20, 0x4b, 0x49, 0x67, 0x60, 0x08, 
-       0x68, 0x28, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
-       0x60, 0x28, 0xe0, 0x66, 0x98, 0x03, 0x28, 0x04, 
-       0xd1, 0x15, 0x20, 0x00, 0x00, 0xe1, 0x4a, 0x5a, 
-       0x68, 0x12, 0x18, 0x89, 0x60, 0x48, 0x98, 0x03, 
-       0x70, 0xb0, 0x68, 0x38, 0x23, 0x20, 0x43, 0x18, 
-       0x60, 0x38, 0x68, 0x38, 0x60, 0x38, 0x48, 0x56, 
-       0x70, 0x04, 0x68, 0x28, 0x23, 0x01, 0x03, 0x5b, 
-       0x43, 0x18, 0x60, 0x28, 0xe0, 0x4d, 0x98, 0x03, 
-       0x23, 0x10, 0x40, 0x18, 0xd0, 0x0f, 0x21, 0x00, 
-       0x00, 0xe0, 0x4a, 0x4d, 0x68, 0x12, 0x18, 0x80, 
-       0x60, 0x41, 0x68, 0x38, 0x4b, 0x52, 0x43, 0x18, 
-       0x60, 0x38, 0x68, 0x38, 0x60, 0x38, 0x37, 0x04, 
-       0x20, 0x0e, 0x60, 0x38, 0xe0, 0x39, 0x98, 0x03, 
-       0x28, 0x08, 0xd1, 0x23, 0x48, 0x4d, 0x68, 0x00, 
-       0x30, 0x60, 0x7e, 0x80, 0x28, 0x00, 0xd0, 0x03, 
-       0x20, 0x4f, 0xb0, 0x04, 0xe6, 0xf8, 0xe0, 0x67, 
-       0x20, 0x01, 0x49, 0x48, 0x68, 0x09, 0x31, 0x60, 
-       0x76, 0x88, 0x48, 0x46, 0x68, 0x00, 0x30, 0x60, 
-       0x76, 0x04, 0x20, 0x01, 0x49, 0x43, 0x68, 0x09, 
-       0x31, 0x80, 0x70, 0xc8, 0x49, 0x42, 0x00, 0xe0, 
-       0x4a, 0x37, 0x68, 0x12, 0x18, 0x80, 0x60, 0x41, 
-       0x68, 0x28, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
-       0x60, 0x28, 0xe0, 0x12, 0x21, 0x00, 0x00, 0xe0, 
-       0x4a, 0x31, 0x68, 0x12, 0x18, 0x80, 0x60, 0x41, 
-       0x98, 0x03, 0x70, 0xb0, 0x68, 0x38, 0x23, 0x20, 
-       0x43, 0x18, 0x60, 0x38, 0x68, 0x38, 0x60, 0x38, 
-       0x68, 0x28, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
-       0x60, 0x28, 0xe0, 0x33, 0x98, 0x03, 0x23, 0x10, 
-       0x40, 0x18, 0xd0, 0x09, 0x1c, 0x20, 0xf0, 0x05, 
-       0xf8, 0x0f, 0x90, 0x00, 0x28, 0x00, 0xd0, 0x02, 
-       0x98, 0x00, 0xb0, 0x04, 0xe6, 0xbc, 0xe0, 0x1a, 
-       0x98, 0x03, 0x28, 0x01, 0xd1, 0x03, 0x20, 0xff, 
-       0x49, 0x21, 0x70, 0x48, 0xe0, 0x13, 0x98, 0x03, 
-       0x28, 0x02, 0xd1, 0x03, 0x20, 0xff, 0x49, 0x1e, 
-       0x70, 0x88, 0xe0, 0x0c, 0x98, 0x03, 0x28, 0x08, 
-       0xd1, 0x09, 0x20, 0x00, 0x49, 0x21, 0x68, 0x09, 
-       0x31, 0x80, 0x70, 0xc8, 0x20, 0x00, 0x49, 0x1f, 
-       0x68, 0x09, 0x31, 0x60, 0x76, 0x88, 0x7d, 0x30, 
-       0x07, 0xc0, 0x0f, 0xc0, 0x28, 0x01, 0xd1, 0x03, 
-       0x1c, 0x20, 0x49, 0x1c, 0xf0, 0x00, 0xf9, 0x16, 
-       0x20, 0x00, 0x70, 0xb0, 0x20, 0x00, 0xb0, 0x04, 
-       0xe6, 0x92, 0xb0, 0x01, 0xb0, 0x03, 0xe6, 0x8f, 
-       0xe6, 0x8e, 0x00, 0x00, 0x2e, 0x08, 0x5d, 0xd0, 
-       0x2e, 0x08, 0x5d, 0xcc, 0x2e, 0x08, 0x5d, 0xc4, 
-       0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0x3f, 0xff, 
-       0x6a, 0x00, 0x00, 0x18, 0x6c, 0x00, 0x00, 0x20, 
-       0x00, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x5d, 0xd8, 
-       0xff, 0xff, 0x1f, 0xff, 0x2e, 0x08, 0x5e, 0x2c, 
-       0x2e, 0x08, 0x5d, 0xd4, 0x00, 0x00, 0x20, 0x01, 
-       0x2e, 0x08, 0x5e, 0x30, 0x2e, 0x08, 0x5d, 0xfc, 
-       0xcc, 0x00, 0x0f, 0x00, 0x66, 0x00, 0x00, 0x80, 
-       0x2e, 0x08, 0x5e, 0x40, 0x2e, 0x08, 0x5e, 0x44, 
-       0x00, 0x00, 0x20, 0xa0, 0x2e, 0x08, 0x7c, 0x44, 
-       0x66, 0x00, 0x01, 0xf0, 0xff, 0xff, 0x00, 0x00, 
-       0xb5, 0xff, 0x98, 0x00, 0x06, 0x01, 0x0e, 0x09, 
-       0x98, 0x01, 0x06, 0x02, 0x0e, 0x12, 0x98, 0x02, 
-       0x04, 0x07, 0x0c, 0x3f, 0x9b, 0x03, 0x04, 0x1c, 
-       0x0c, 0x24, 0x29, 0x20, 0xdb, 0x04, 0x20, 0xa2, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2a, 0x02, 0xd1, 0x0a, 0x00, 0xc8, 0x4b, 0x1f, 
-       0x68, 0x1b, 0x58, 0x18, 0x4b, 0x1e, 0x40, 0x18, 
-       0x00, 0xcb, 0x4d, 0x1c, 0x68, 0x2d, 0x50, 0xe8, 
-       0xe0, 0x30, 0x2a, 0x01, 0xd1, 0x0b, 0x00, 0xc8, 
-       0x4b, 0x18, 0x68, 0x1b, 0x58, 0x18, 0x43, 0x27, 
-       0x1c, 0x3b, 0x43, 0x18, 0x00, 0xcb, 0x4d, 0x15, 
-       0x68, 0x2d, 0x50, 0xe8, 0xe0, 0x22, 0x20, 0x00, 
-       0x28, 0x20, 0xdb, 0x04, 0xe0, 0x1e, 0x1c, 0x43, 
-       0x06, 0x1b, 0x16, 0x18, 0xe7, 0xf8, 0x2a, 0x03, 
-       0xd1, 0x0b, 0x00, 0xc3, 0x4d, 0x0d, 0x68, 0x2d, 
-       0x58, 0xeb, 0x1c, 0x3d, 0x43, 0x25, 0x43, 0x1d, 
-       0x00, 0xc3, 0x4e, 0x0a, 0x68, 0x36, 0x50, 0xf5, 
-       0xe0, 0x0b, 0x2a, 0x04, 0xd1, 0x09, 0x00, 0xc3, 
-       0x4d, 0x06, 0x68, 0x2d, 0x58, 0xed, 0x4b, 0x06, 
-       0x40, 0x2b, 0x00, 0xc5, 0x4e, 0x03, 0x68, 0x36, 
-       0x51, 0x73, 0xe7, 0xe0, 0x20, 0x00, 0xe7, 0xbb, 
-       0xe7, 0xba, 0x00, 0x00, 0x2e, 0x08, 0x5d, 0xd0, 
-       0xff, 0xff, 0xe1, 0xff, 0xb4, 0xb0, 0x1c, 0x07, 
-       0x1c, 0x0a, 0x06, 0x38, 0x0e, 0x00, 0x06, 0x11, 
-       0x0e, 0x09, 0x4c, 0x14, 0x68, 0x25, 0x4b, 0x14, 
-       0x40, 0x2b, 0x60, 0x23, 0x28, 0x01, 0xd1, 0x06, 
-       0x4c, 0x10, 0x68, 0x25, 0x23, 0x01, 0x04, 0x1b, 
-       0x43, 0x2b, 0x60, 0x23, 0xe0, 0x07, 0x28, 0x00, 
-       0xd1, 0x05, 0x4c, 0x0c, 0x68, 0x25, 0x23, 0x01, 
-       0x05, 0x9b, 0x43, 0x2b, 0x60, 0x23, 0x29, 0x01, 
-       0xd1, 0x06, 0x4c, 0x08, 0x68, 0x25, 0x23, 0x01, 
-       0x03, 0x9b, 0x43, 0x2b, 0x60, 0x23, 0xe0, 0x07, 
-       0x29, 0x02, 0xd1, 0x05, 0x4c, 0x03, 0x68, 0x25, 
-       0x23, 0x01, 0x03, 0xdb, 0x43, 0x2b, 0x60, 0x23, 
-       0xbc, 0xb0, 0x47, 0x70, 0x64, 0x00, 0x00, 0x24, 
-       0xff, 0xbe, 0x3f, 0xff, 0xb5, 0xff, 0x1c, 0x1f, 
-       0x9c, 0x09, 0xb0, 0x82, 0x98, 0x02, 0x04, 0x00, 
-       0x0c, 0x00, 0x90, 0x00, 0x99, 0x03, 0x06, 0x0a, 
-       0x0e, 0x12, 0x98, 0x04, 0x06, 0x05, 0x0e, 0x2d, 
-       0x98, 0x0c, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x01, 
-       0x00, 0xd0, 0x1a, 0x80, 0x00, 0x80, 0x4b, 0x1b, 
-       0x68, 0x1b, 0x18, 0xc1, 0x2a, 0x20, 0xdb, 0x05, 
-       0x20, 0xa2, 0xb0, 0x02, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2d, 0x1f, 0xdb, 0x02, 
-       0x20, 0xaf, 0xb0, 0x02, 0xe7, 0xf6, 0x71, 0x8d, 
-       0x68, 0x3b, 0x00, 0xd0, 0x4e, 0x12, 0x68, 0x36, 
-       0x19, 0x80, 0x60, 0x43, 0x1c, 0x20, 0x71, 0xc8, 
-       0x20, 0x00, 0x80, 0x88, 0x20, 0x00, 0x60, 0xc8, 
-       0x98, 0x00, 0x23, 0x01, 0x43, 0x18, 0x75, 0x08, 
-       0x98, 0x01, 0x74, 0x88, 0x60, 0x8f, 0x88, 0xb8, 
-       0x82, 0x08, 0x20, 0x00, 0x74, 0xc8, 0x88, 0xb8, 
-       0x61, 0x38, 0x20, 0x00, 0x73, 0x38, 0x20, 0x00, 
-       0x73, 0x78, 0x20, 0x00, 0x73, 0xb8, 0x20, 0x00, 
-       0x73, 0xf8, 0x20, 0x00, 0xb0, 0x02, 0xe7, 0xd1, 
-       0xb0, 0x02, 0xe7, 0xcf, 0x2e, 0x08, 0x5d, 0xc4, 
-       0x2e, 0x08, 0x5d, 0xd4, 0xb5, 0xf3, 0x98, 0x00, 
-       0x06, 0x04, 0x0e, 0x24, 0x99, 0x01, 0x04, 0x0d, 
-       0x0c, 0x2d, 0x00, 0xe0, 0x1b, 0x00, 0x00, 0x80, 
-       0x49, 0x25, 0x68, 0x09, 0x18, 0x47, 0x2c, 0x20, 
-       0xdb, 0x04, 0x20, 0xa2, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x4b, 0x21, 0x42, 0x9d, 
-       0xd1, 0x27, 0x00, 0xe1, 0x4b, 0x20, 0x68, 0x1b, 
-       0x18, 0xc8, 0x00, 0xa1, 0x4b, 0x1f, 0x68, 0x1b, 
-       0x18, 0xca, 0x68, 0x11, 0x4b, 0x1e, 0x40, 0x19, 
-       0x60, 0x11, 0x68, 0x01, 0x23, 0x40, 0x40, 0x19, 
-       0xd0, 0x13, 0x68, 0x01, 0x23, 0x40, 0x43, 0xdb, 
-       0x40, 0x19, 0x60, 0x01, 0x21, 0x00, 0x4b, 0x19, 
-       0x68, 0x1b, 0x70, 0x19, 0x49, 0x18, 0x68, 0x0b, 
-       0x08, 0x5b, 0x00, 0x5b, 0x60, 0x0b, 0x49, 0x17, 
-       0x68, 0x0e, 0x23, 0x01, 0x05, 0x5b, 0x43, 0x33, 
-       0x60, 0x0b, 0x68, 0x01, 0x4b, 0x14, 0x40, 0x19, 
-       0x60, 0x01, 0x20, 0x00, 0x75, 0x38, 0x20, 0x00, 
-       0x80, 0x38, 0x20, 0x00, 0x80, 0xb8, 0x68, 0xb8, 
-       0x72, 0x44, 0x20, 0xa0, 0x68, 0xb9, 0x72, 0x08, 
-       0x20, 0x00, 0x60, 0xb8, 0x79, 0xb9, 0x20, 0x01, 
-       0x40, 0x88, 0xf0, 0x11, 0xf9, 0xe5, 0x20, 0x00, 
-       0x71, 0xb8, 0x20, 0x00, 0xe7, 0xba, 0xe7, 0xb9, 
-       0x2e, 0x08, 0x5d, 0xc4, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x5d, 0xd0, 0x2e, 0x08, 0x5d, 0xcc, 
-       0xff, 0xff, 0xdf, 0xff, 0x2e, 0x08, 0x5d, 0xc0, 
-       0x6a, 0x00, 0x00, 0x18, 0x6c, 0x00, 0x00, 0x20, 
-       0xff, 0xff, 0x3f, 0xde, 0xb5, 0xff, 0x1c, 0x05, 
-       0x1c, 0x0c, 0x1c, 0x17, 0x06, 0x28, 0x0e, 0x00, 
-       0x06, 0x23, 0x0e, 0x1b, 0x06, 0x39, 0x0e, 0x09, 
-       0x9e, 0x03, 0x06, 0x36, 0x16, 0x32, 0x28, 0x20, 
-       0xda, 0x02, 0x4e, 0x08, 0x68, 0x36, 0x60, 0x30, 
-       0x4e, 0x07, 0x68, 0x36, 0x60, 0x33, 0x4e, 0x07, 
-       0x68, 0x36, 0x60, 0x31, 0x4e, 0x06, 0x68, 0x36, 
-       0x60, 0x32, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x5d, 0xec, 
-       0x2e, 0x08, 0x5d, 0xf0, 0x2e, 0x08, 0x5d, 0xf4, 
-       0x2e, 0x08, 0x5d, 0xf8, 0x1c, 0x01, 0x06, 0x08, 
-       0x0e, 0x00, 0x28, 0x01, 0xd1, 0x04, 0x22, 0x01, 
-       0x4b, 0x04, 0x68, 0x1b, 0x60, 0x1a, 0xe0, 0x03, 
-       0x22, 0x02, 0x4b, 0x02, 0x68, 0x1b, 0x60, 0x1a, 
-       0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x5e, 0x34, 
-       0xb5, 0xf1, 0x98, 0x00, 0x06, 0x04, 0x0e, 0x24, 
-       0xb0, 0x81, 0x27, 0x00, 0x26, 0x00, 0x4a, 0x55, 
-       0x92, 0x00, 0x00, 0xe0, 0x49, 0x54, 0x68, 0x09, 
-       0x58, 0x08, 0x23, 0x03, 0x03, 0x9b, 0x40, 0x18, 
-       0x23, 0x01, 0x03, 0x9b, 0x42, 0x98, 0xd0, 0x05, 
-       0x20, 0xa0, 0xb0, 0x01, 0xb0, 0x01, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0xe0, 0x49, 0x4c, 
-       0x68, 0x09, 0x58, 0x08, 0x21, 0x20, 0x43, 0x01, 
-       0x00, 0xe0, 0x4a, 0x49, 0x68, 0x12, 0x50, 0x11, 
-       0x21, 0x00, 0x48, 0x48, 0xf0, 0x05, 0xfc, 0x3c, 
-       0x48, 0x47, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x01, 
-       0xe0, 0x08, 0xe0, 0x82, 0x20, 0x02, 0xf0, 0x0c, 
-       0xf8, 0x75, 0x1c, 0x38, 0x37, 0x01, 0x4b, 0x43, 
-       0x42, 0x98, 0xd3, 0xf1, 0x4b, 0x41, 0x42, 0x9f, 
-       0xd3, 0x00, 0x26, 0xa1, 0x48, 0x40, 0x68, 0x01, 
-       0x4b, 0x40, 0x40, 0x19, 0x60, 0x01, 0x20, 0x00, 
-       0x00, 0xe1, 0x1b, 0x09, 0x00, 0x89, 0x4a, 0x3e, 
-       0x68, 0x12, 0x18, 0x89, 0x70, 0x88, 0x20, 0x00, 
-       0x43, 0xc0, 0x49, 0x3c, 0x67, 0x48, 0x22, 0x00, 
-       0xb4, 0x04, 0x1c, 0x20, 0x23, 0x00, 0x22, 0x00, 
-       0x49, 0x39, 0xf7, 0xff, 0xfc, 0x69, 0xb0, 0x01, 
-       0x27, 0x00, 0x25, 0x00, 0x2d, 0x04, 0xdb, 0x02, 
-       0xe0, 0x1e, 0x35, 0x01, 0xe7, 0xfa, 0x00, 0xa9, 
-       0x22, 0x0f, 0x1c, 0x10, 0x40, 0x88, 0x01, 0x29, 
-       0x9a, 0x00, 0x18, 0x89, 0x68, 0x49, 0x42, 0xa1, 
-       0xd1, 0x11, 0x21, 0x33, 0x06, 0x49, 0x6b, 0xc9, 
-       0x40, 0x01, 0xd0, 0x01, 0x37, 0x01, 0xe0, 0x00, 
-       0xe0, 0x02, 0x4b, 0x26, 0x42, 0x9f, 0xd3, 0xf4, 
-       0x4b, 0x24, 0x42, 0x9f, 0xd3, 0x02, 0x26, 0xa1, 
-       0xe0, 0x02, 0xe0, 0x3a, 0x27, 0x00, 0xe7, 0xe0, 
-       0x48, 0x26, 0x68, 0x01, 0x23, 0xff, 0x33, 0x01, 
-       0x43, 0x19, 0x60, 0x01, 0x48, 0x21, 0x6d, 0x80, 
-       0x49, 0x20, 0x65, 0x88, 0x48, 0x1f, 0x6b, 0xc0, 
-       0x23, 0x01, 0x07, 0x9b, 0x40, 0x18, 0xd0, 0x00, 
-       0xe7, 0xf8, 0x20, 0x33, 0x06, 0x40, 0x6d, 0x40, 
-       0x21, 0x33, 0x06, 0x49, 0x66, 0x48, 0x20, 0x33, 
-       0x06, 0x40, 0x6d, 0x80, 0x21, 0x33, 0x06, 0x49, 
-       0x66, 0x88, 0x20, 0x03, 0x02, 0x00, 0x49, 0x15, 
-       0x67, 0x48, 0x48, 0x11, 0x68, 0x01, 0x23, 0x01, 
-       0x02, 0x5b, 0x43, 0x19, 0x60, 0x01, 0x20, 0x00, 
-       0x49, 0x13, 0x65, 0x88, 0x20, 0x00, 0x49, 0x12, 
-       0x65, 0xc8, 0x20, 0x00, 0x49, 0x10, 0x66, 0x08, 
-       0x21, 0x00, 0x20, 0xff, 0xf0, 0x05, 0xfb, 0xb8, 
-       0x1c, 0x30, 0xb0, 0x01, 0xe7, 0x66, 0xb0, 0x01, 
-       0xe7, 0x64, 0xe7, 0x63, 0x9e, 0x00, 0x00, 0xc0, 
-       0x2e, 0x08, 0x5d, 0xd0, 0x00, 0x00, 0x80, 0x0f, 
-       0xcc, 0x00, 0x05, 0x00, 0x00, 0x1e, 0x84, 0x80, 
-       0x66, 0x00, 0x00, 0x4c, 0xff, 0xff, 0xfd, 0xff, 
-       0x2e, 0x08, 0x5d, 0xc4, 0x66, 0x00, 0x00, 0x80, 
-       0x00, 0x00, 0xff, 0xff, 0x66, 0x00, 0x00, 0xe0, 
-       0xcc, 0x00, 0x00, 0x00, 0xb5, 0xf1, 0x98, 0x00, 
-       0x06, 0x07, 0x0e, 0x3f, 0xb0, 0x81, 0x25, 0x00, 
-       0x26, 0x00, 0x4a, 0x2e, 0x92, 0x00, 0x00, 0xf8, 
-       0x49, 0x2d, 0x68, 0x09, 0x58, 0x08, 0x23, 0x03, 
-       0x03, 0x9b, 0x40, 0x18, 0x23, 0x01, 0x03, 0xdb, 
-       0x42, 0x98, 0xd0, 0x05, 0x20, 0xa0, 0xb0, 0x01, 
-       0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x22, 0x00, 0xb4, 0x04, 0x1c, 0x38, 0x23, 0x00, 
-       0x22, 0x00, 0x49, 0x24, 0xf7, 0xff, 0xfb, 0xd0, 
-       0xb0, 0x01, 0x24, 0x00, 0x2c, 0x04, 0xdb, 0x02, 
-       0xe0, 0x1e, 0x34, 0x01, 0xe7, 0xfa, 0x00, 0xa1, 
-       0x22, 0x0f, 0x1c, 0x10, 0x40, 0x88, 0x01, 0x21, 
-       0x9a, 0x00, 0x18, 0x89, 0x68, 0x49, 0x42, 0xb9, 
-       0xd1, 0x11, 0x21, 0x33, 0x06, 0x49, 0x6b, 0xc9, 
-       0x40, 0x01, 0xd0, 0x01, 0x35, 0x01, 0xe0, 0x00, 
-       0xe0, 0x02, 0x4b, 0x17, 0x42, 0x9d, 0xd3, 0xf4, 
-       0x4b, 0x15, 0x42, 0x9d, 0xd9, 0x02, 0x26, 0xa1, 
-       0xe0, 0x02, 0xe0, 0x1d, 0x25, 0x00, 0xe7, 0xe0, 
-       0x20, 0x04, 0xf0, 0x02, 0xff, 0xb7, 0x20, 0x01, 
-       0x21, 0x33, 0x06, 0x49, 0x66, 0xc8, 0x21, 0x00, 
-       0x00, 0xf8, 0x4a, 0x0b, 0x68, 0x12, 0x50, 0x11, 
-       0x21, 0x00, 0x00, 0xf8, 0x4a, 0x08, 0x68, 0x12, 
-       0x18, 0x80, 0x60, 0x41, 0x21, 0x00, 0x00, 0xb8, 
-       0x4a, 0x08, 0x68, 0x12, 0x50, 0x11, 0x1c, 0x30, 
-       0xb0, 0x01, 0xe7, 0xb5, 0xb0, 0x01, 0xe7, 0xb3, 
-       0xe7, 0xb2, 0x00, 0x00, 0x9e, 0x00, 0x00, 0xc0, 
-       0x2e, 0x08, 0x5d, 0xd0, 0x00, 0x00, 0xff, 0xff, 
-       0x00, 0x01, 0xd4, 0xc0, 0x2e, 0x08, 0x5d, 0xcc, 
-       0xb5, 0xff, 0x99, 0x01, 0x06, 0x0f, 0x0e, 0x3f, 
-       0x9a, 0x02, 0x06, 0x15, 0x0e, 0x2d, 0x9b, 0x03, 
-       0x06, 0x1e, 0x0e, 0x36, 0x2d, 0x1f, 0xdb, 0x04, 
-       0x20, 0xaf, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x2f, 0x20, 0xdb, 0x01, 0x20, 0xa2, 
-       0xe7, 0xf7, 0x2e, 0x80, 0xd0, 0x13, 0xf0, 0x11, 
-       0xf8, 0x89, 0x1c, 0x04, 0x1c, 0x39, 0x22, 0x80, 
-       0x20, 0x01, 0xf0, 0x00, 0xfb, 0x6d, 0x2c, 0x80, 
-       0xd0, 0x01, 0xf0, 0x11, 0xf8, 0xb5, 0x98, 0x00, 
-       0x21, 0x80, 0x68, 0x49, 0x60, 0x08, 0x48, 0x09, 
-       0x68, 0x00, 0x70, 0x05, 0xe0, 0x0b, 0xf0, 0x11, 
-       0xf8, 0x75, 0x1c, 0x04, 0x1c, 0x39, 0x22, 0x80, 
-       0x20, 0x02, 0xf0, 0x00, 0xfb, 0x59, 0x2c, 0x80, 
-       0xd0, 0x01, 0xf0, 0x11, 0xf8, 0xa1, 0x20, 0x00, 
-       0xe7, 0xd3, 0xe7, 0xd2, 0x2e, 0x08, 0x5e, 0x1c, 
-       0xb5, 0xff, 0x99, 0x01, 0x06, 0x0e, 0x0e, 0x36, 
-       0x9a, 0x02, 0x06, 0x17, 0x0e, 0x3f, 0x9b, 0x03, 
-       0x06, 0x1c, 0x0e, 0x24, 0xb0, 0x82, 0x20, 0x80, 
-       0x40, 0x38, 0x90, 0x00, 0x06, 0x7f, 0x0e, 0x7f, 
-       0x2e, 0x1f, 0xdb, 0x05, 0x20, 0xaf, 0xb0, 0x02, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2c, 0x20, 0xdb, 0x02, 0x20, 0xa2, 0xb0, 0x02, 
-       0xe7, 0xf6, 0x2f, 0x04, 0xd1, 0x00, 0x27, 0x00, 
-       0x00, 0xe0, 0x1b, 0x00, 0x00, 0x80, 0x49, 0x17, 
-       0x68, 0x09, 0x18, 0x40, 0x90, 0x01, 0x98, 0x00, 
-       0x28, 0x00, 0xd0, 0x0d, 0xf0, 0x11, 0xf8, 0x3a, 
-       0x1c, 0x05, 0x1c, 0x21, 0x22, 0x01, 0x02, 0x92, 
-       0x20, 0x02, 0xf0, 0x00, 0xfb, 0x1d, 0x2d, 0x80, 
-       0xd0, 0x01, 0xf0, 0x11, 0xf8, 0x65, 0xe0, 0x13, 
-       0xf0, 0x11, 0xf8, 0x2c, 0x1c, 0x05, 0x1c, 0x21, 
-       0x22, 0x01, 0x02, 0x92, 0x20, 0x01, 0xf0, 0x00, 
-       0xfb, 0x0f, 0x2d, 0x80, 0xd0, 0x01, 0xf0, 0x11, 
-       0xf8, 0x57, 0x98, 0x02, 0x21, 0x80, 0x68, 0x89, 
-       0x60, 0x08, 0x20, 0x80, 0x6a, 0x00, 0x55, 0xc6, 
-       0x20, 0x00, 0xb0, 0x02, 0xe7, 0xc4, 0xb0, 0x02, 
-       0xe7, 0xc2, 0x00, 0x00, 0x2e, 0x08, 0x5d, 0xc4, 
-       0xb5, 0xff, 0xb0, 0x82, 0x99, 0x03, 0x04, 0x0d, 
-       0x0c, 0x2d, 0x9a, 0x04, 0x06, 0x10, 0x0e, 0x00, 
-       0x90, 0x00, 0x9b, 0x05, 0x06, 0x18, 0x0e, 0x00, 
-       0x90, 0x01, 0x98, 0x00, 0x28, 0x1f, 0xdb, 0x05, 
-       0x20, 0xaf, 0xb0, 0x02, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x98, 0x01, 0x23, 0x80, 
-       0x40, 0x18, 0xd1, 0x2f, 0x98, 0x00, 0x49, 0x2c, 
-       0x68, 0x09, 0x73, 0x08, 0x27, 0x00, 0x2f, 0x20, 
-       0xdb, 0x04, 0xe0, 0x26, 0x1c, 0x78, 0x06, 0x07, 
-       0x0e, 0x3f, 0xe7, 0xf8, 0x20, 0x01, 0x40, 0xb8, 
-       0x99, 0x02, 0x40, 0x08, 0xd0, 0x1c, 0x24, 0x00, 
-       0x20, 0x40, 0x40, 0x28, 0xd0, 0x04, 0x04, 0x20, 
-       0x0c, 0x00, 0x24, 0x01, 0x03, 0xa4, 0x43, 0x04, 
-       0x20, 0x80, 0x40, 0x28, 0xd0, 0x04, 0x04, 0x20, 
-       0x0c, 0x00, 0x24, 0x01, 0x03, 0xe4, 0x43, 0x04, 
-       0xf0, 0x10, 0xff, 0xd4, 0x1c, 0x06, 0x1c, 0x22, 
-       0x1c, 0x39, 0x20, 0x01, 0xf0, 0x00, 0xfa, 0xb8, 
-       0x2e, 0x80, 0xd0, 0x01, 0xf0, 0x11, 0xf8, 0x00, 
-       0xe7, 0xd8, 0xe0, 0x24, 0x27, 0x00, 0x2f, 0x20, 
-       0xdb, 0x04, 0xe0, 0x20, 0x1c, 0x78, 0x06, 0x07, 
-       0x0e, 0x3f, 0xe7, 0xf8, 0x20, 0x01, 0x40, 0xb8, 
-       0x99, 0x02, 0x40, 0x08, 0xd0, 0x16, 0x24, 0x00, 
-       0x20, 0x40, 0x40, 0x28, 0xd0, 0x01, 0x4b, 0x0d, 
-       0x40, 0x1c, 0x20, 0x80, 0x40, 0x28, 0xd0, 0x01, 
-       0x04, 0x64, 0x0c, 0x64, 0xf0, 0x10, 0xff, 0xae, 
-       0x1c, 0x06, 0x1c, 0x22, 0x1c, 0x39, 0x20, 0x02, 
-       0xf0, 0x00, 0xfa, 0x92, 0x2e, 0x80, 0xd0, 0x01, 
-       0xf0, 0x10, 0xff, 0xda, 0xe7, 0xde, 0x20, 0x00, 
-       0xb0, 0x02, 0xe7, 0x9f, 0xb0, 0x02, 0xe7, 0x9d, 
-       0x2e, 0x08, 0x5e, 0x10, 0x00, 0x00, 0xbf, 0xff, 
-       0xb5, 0x80, 0x1c, 0x07, 0x48, 0x07, 0x68, 0x01, 
-       0x20, 0x00, 0xf0, 0x19, 0xfe, 0x73, 0x60, 0x38, 
-       0x48, 0x04, 0x68, 0x00, 0x1d, 0x01, 0x20, 0x00, 
-       0xf0, 0x19, 0xfe, 0x6c, 0x60, 0x78, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x5e, 0x10, 
-       0xb5, 0xf7, 0x1c, 0x07, 0x99, 0x01, 0x06, 0x0e, 
-       0x0e, 0x36, 0x9a, 0x02, 0x06, 0x14, 0x0e, 0x24, 
-       0x2e, 0x1f, 0xdb, 0x04, 0x20, 0xaf, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x2c, 0x20, 
-       0xdb, 0x01, 0x20, 0xa2, 0xe7, 0xf7, 0x20, 0x80, 
-       0x40, 0x20, 0xd0, 0x0d, 0xf0, 0x10, 0xff, 0x6e, 
-       0x1c, 0x05, 0x1c, 0x21, 0x22, 0x01, 0x02, 0xd2, 
-       0x20, 0x02, 0xf0, 0x00, 0xfa, 0x51, 0x2d, 0x80, 
-       0xd0, 0x01, 0xf0, 0x10, 0xff, 0x99, 0xe0, 0x16, 
-       0x48, 0x0c, 0x68, 0x00, 0x60, 0x07, 0x48, 0x0b, 
-       0x68, 0x00, 0x71, 0x46, 0x20, 0xff, 0x49, 0x09, 
-       0x68, 0x09, 0x71, 0x08, 0xf0, 0x10, 0xff, 0x56, 
-       0x1c, 0x05, 0x1c, 0x21, 0x22, 0x01, 0x02, 0xd2, 
-       0x20, 0x01, 0xf0, 0x00, 0xfa, 0x39, 0x2d, 0x80, 
-       0xd0, 0x01, 0xf0, 0x10, 0xff, 0x81, 0x20, 0x00, 
-       0xe7, 0xcd, 0xe7, 0xcc, 0x2e, 0x08, 0x5e, 0x14, 
-       0xb5, 0xf7, 0x1c, 0x07, 0x99, 0x01, 0x06, 0x0e, 
-       0x0e, 0x36, 0x9a, 0x02, 0x06, 0x14, 0x0e, 0x24, 
-       0x2e, 0x1f, 0xdb, 0x04, 0x20, 0xaf, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x2c, 0x20, 
-       0xdb, 0x01, 0x20, 0xa2, 0xe7, 0xf7, 0x20, 0x80, 
-       0x40, 0x20, 0xd0, 0x0d, 0xf0, 0x10, 0xff, 0x2e, 
-       0x1c, 0x05, 0x1c, 0x21, 0x22, 0x01, 0x03, 0x12, 
-       0x20, 0x02, 0xf0, 0x00, 0xfa, 0x11, 0x2d, 0x80, 
-       0xd0, 0x01, 0xf0, 0x10, 0xff, 0x59, 0xe0, 0x16, 
-       0x48, 0x0c, 0x68, 0x00, 0x60, 0x07, 0x48, 0x0b, 
-       0x68, 0x00, 0x71, 0x46, 0x20, 0xff, 0x49, 0x09, 
-       0x68, 0x09, 0x71, 0x08, 0xf0, 0x10, 0xff, 0x16, 
-       0x1c, 0x05, 0x1c, 0x21, 0x22, 0x01, 0x03, 0x12, 
-       0x20, 0x01, 0xf0, 0x00, 0xf9, 0xf9, 0x2d, 0x80, 
-       0xd0, 0x01, 0xf0, 0x10, 0xff, 0x41, 0x20, 0x00, 
-       0xe7, 0xcd, 0xe7, 0xcc, 0x2e, 0x08, 0x5e, 0x18, 
-       0xb5, 0xff, 0xb0, 0x81, 0x98, 0x01, 0x06, 0x00, 
-       0x0e, 0x00, 0x90, 0x00, 0x99, 0x02, 0x06, 0x0d, 
-       0x0e, 0x2d, 0x9a, 0x03, 0x06, 0x16, 0x0e, 0x36, 
-       0x9f, 0x04, 0x1c, 0x29, 0x98, 0x00, 0xf0, 0x00, 
-       0xf8, 0x91, 0x28, 0x00, 0xd0, 0x05, 0x20, 0xa2, 
-       0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x79, 0x38, 0x79, 0x79, 0x18, 0x40, 
-       0x79, 0xb9, 0x18, 0x40, 0x06, 0x04, 0x0e, 0x24, 
-       0x79, 0xb8, 0x02, 0x00, 0x43, 0x04, 0x00, 0x68, 
-       0x19, 0x80, 0x01, 0x00, 0x49, 0x15, 0x68, 0x09, 
-       0x50, 0x0c, 0x9b, 0x04, 0x88, 0x99, 0x00, 0x68, 
-       0x19, 0x80, 0x01, 0x00, 0x4a, 0x11, 0x68, 0x12, 
-       0x18, 0x80, 0x60, 0x41, 0x78, 0x78, 0x78, 0x39, 
-       0x18, 0x40, 0x78, 0xb9, 0x18, 0x40, 0x06, 0x04, 
-       0x0e, 0x24, 0x78, 0xb8, 0x02, 0x00, 0x43, 0x04, 
-       0x00, 0x68, 0x19, 0x80, 0x01, 0x00, 0x49, 0x09, 
-       0x68, 0x09, 0x18, 0x40, 0x60, 0x84, 0x9b, 0x04, 
-       0x88, 0x19, 0x00, 0x68, 0x19, 0x80, 0x01, 0x00, 
-       0x4a, 0x04, 0x68, 0x12, 0x18, 0x80, 0x60, 0xc1, 
-       0x20, 0x00, 0xb0, 0x01, 0xe7, 0xc5, 0xb0, 0x01, 
-       0xe7, 0xc3, 0x00, 0x00, 0x2e, 0x08, 0x5d, 0xc8, 
-       0xb5, 0xff, 0x1c, 0x07, 0x06, 0x3d, 0x0e, 0x2d, 
-       0x99, 0x01, 0x06, 0x0c, 0x0e, 0x24, 0x9a, 0x02, 
-       0x06, 0x16, 0x0e, 0x36, 0x1c, 0x21, 0x1c, 0x28, 
-       0xf0, 0x00, 0xf8, 0x40, 0x28, 0x00, 0xd0, 0x04, 
-       0x20, 0xa2, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x9a, 0x03, 0x1c, 0x31, 0x1c, 0x20, 
-       0xf0, 0x00, 0xf8, 0x02, 0xe7, 0xf5, 0xe7, 0xf4, 
-       0xb4, 0xf0, 0x1c, 0x04, 0x1c, 0x0f, 0x1c, 0x13, 
-       0x06, 0x21, 0x0e, 0x09, 0x06, 0x3a, 0x0e, 0x12, 
-       0x29, 0x10, 0xdb, 0x02, 0x20, 0xa2, 0xbc, 0xf0, 
-       0x47, 0x70, 0x88, 0xdd, 0x00, 0x48, 0x18, 0x80, 
-       0x01, 0x00, 0x4e, 0x0f, 0x68, 0x36, 0x50, 0x35, 
-       0x88, 0x98, 0x00, 0x4d, 0x18, 0xad, 0x01, 0x2d, 
-       0x4e, 0x0b, 0x68, 0x36, 0x19, 0xad, 0x60, 0x68, 
-       0x88, 0x58, 0x00, 0x4d, 0x18, 0xad, 0x01, 0x2d, 
-       0x4e, 0x07, 0x68, 0x36, 0x19, 0xad, 0x60, 0xa8, 
-       0x88, 0x18, 0x00, 0x4d, 0x18, 0xad, 0x01, 0x2d, 
-       0x4e, 0x03, 0x68, 0x36, 0x19, 0xad, 0x60, 0xe8, 
-       0x20, 0x00, 0xe7, 0xdc, 0xe7, 0xdb, 0x00, 0x00, 
-       0x2e, 0x08, 0x5d, 0xc8, 0xb4, 0xb0, 0x1c, 0x07, 
-       0x1c, 0x0a, 0x06, 0x39, 0x0e, 0x09, 0x06, 0x15, 
-       0x0e, 0x2d, 0xb0, 0x81, 0x29, 0x20, 0xdb, 0x03, 
-       0x20, 0xa2, 0xb0, 0x01, 0xbc, 0xb0, 0x47, 0x70, 
-       0x2d, 0x10, 0xdb, 0x02, 0x20, 0xa2, 0xb0, 0x01, 
-       0xe7, 0xf8, 0x00, 0xc8, 0x4b, 0x0a, 0x68, 0x1b, 
-       0x18, 0xc4, 0x68, 0x20, 0x90, 0x00, 0x98, 0x00, 
-       0x4b, 0x08, 0x40, 0x18, 0x90, 0x00, 0x00, 0x68, 
-       0x23, 0x1e, 0x40, 0x18, 0x9b, 0x00, 0x43, 0x18, 
-       0x90, 0x00, 0x98, 0x00, 0x60, 0x20, 0x20, 0x00, 
-       0xb0, 0x01, 0xe7, 0xe3, 0xb0, 0x01, 0xe7, 0xe1, 
-       0x2e, 0x08, 0x5d, 0xd0, 0xff, 0xff, 0xdf, 0xe1, 
-       0x20, 0xff, 0x49, 0x02, 0x68, 0x09, 0x70, 0x08, 
-       0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x5e, 0x2c, 
-       0xb4, 0xb0, 0x1c, 0x07, 0x1c, 0x0a, 0xb0, 0x83, 
-       0x20, 0x00, 0x43, 0xc0, 0x23, 0x19, 0x06, 0x9b, 
-       0x67, 0x58, 0x08, 0xb9, 0x00, 0x89, 0x1a, 0x78, 
-       0x90, 0x02, 0x98, 0x02, 0x18, 0x10, 0x07, 0x80, 
-       0x0f, 0x80, 0x90, 0x01, 0x98, 0x02, 0x18, 0x10, 
-       0x08, 0x80, 0x90, 0x00, 0x9b, 0x02, 0x20, 0x03, 
-       0x1a, 0xc0, 0x23, 0x19, 0x06, 0x9b, 0x67, 0xd8, 
-       0x24, 0x00, 0x98, 0x00, 0x42, 0x84, 0xd3, 0x02, 
-       0xe0, 0x06, 0x34, 0x01, 0xe7, 0xf9, 0xc9, 0x08, 
-       0x20, 0x19, 0x06, 0x80, 0x67, 0x03, 0xe7, 0xf8, 
-       0x98, 0x01, 0x28, 0x00, 0xd0, 0x0b, 0x9b, 0x01, 
-       0x00, 0xd8, 0x25, 0x00, 0x43, 0xed, 0x40, 0xc5, 
-       0x1c, 0x2b, 0x43, 0xdb, 0x68, 0x0d, 0x40, 0x2b, 
-       0x25, 0x19, 0x06, 0xad, 0x67, 0x2b, 0x20, 0x19, 
-       0x06, 0x80, 0x6f, 0x40, 0xb0, 0x03, 0xbc, 0xb0, 
-       0x47, 0x70, 0xb0, 0x03, 0xe7, 0xfb, 0x1c, 0x01, 
-       0x06, 0x08, 0x0e, 0x00, 0x22, 0x19, 0x06, 0x92, 
-       0x63, 0x90, 0x47, 0x70, 0xb4, 0xf0, 0x48, 0x4d, 
-       0x6a, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x74, 
-       0x22, 0x00, 0x27, 0x00, 0x49, 0x4a, 0x20, 0x00, 
-       0x28, 0x20, 0xdb, 0x04, 0xe0, 0x16, 0x1c, 0x43, 
-       0x06, 0x18, 0x0e, 0x00, 0xe7, 0xf8, 0x00, 0x83, 
-       0x58, 0xcc, 0x23, 0x01, 0x03, 0x5b, 0x40, 0x23, 
-       0xd0, 0x0b, 0x24, 0x01, 0x40, 0x84, 0x1c, 0x23, 
-       0x43, 0x1f, 0x00, 0x83, 0x58, 0xcc, 0x23, 0x01, 
-       0x03, 0x5b, 0x43, 0x9c, 0x1c, 0x23, 0x00, 0x84, 
-       0x51, 0x0b, 0xe7, 0xe8, 0x20, 0x00, 0x28, 0x04, 
-       0xdb, 0x04, 0xe0, 0x1a, 0x1c, 0x43, 0x06, 0x18, 
-       0x0e, 0x00, 0xe7, 0xf8, 0x01, 0x05, 0x4b, 0x39, 
-       0x18, 0xec, 0x22, 0x00, 0x2a, 0x04, 0xdb, 0x04, 
-       0xe0, 0x0e, 0x1c, 0x53, 0x06, 0x1a, 0x0e, 0x12, 
-       0xe7, 0xf8, 0x4b, 0x35, 0x60, 0x23, 0x4b, 0x35, 
-       0x60, 0x63, 0x23, 0x00, 0x60, 0xa3, 0x23, 0x00, 
-       0x60, 0xe3, 0x34, 0xff, 0x34, 0x01, 0xe7, 0xf0, 
-       0xe7, 0xe4, 0xb0, 0x82, 0x4b, 0x2b, 0x69, 0xdc, 
-       0x23, 0x0c, 0x40, 0x23, 0x08, 0x9c, 0xab, 0x01, 
-       0x70, 0x1c, 0x4b, 0x28, 0x69, 0xdc, 0x23, 0x30, 
-       0x40, 0x23, 0x09, 0x1c, 0xab, 0x00, 0x70, 0x1c, 
-       0xab, 0x01, 0x78, 0x1b, 0xac, 0x00, 0x78, 0x24, 
-       0x42, 0xa3, 0xd1, 0x09, 0x23, 0x33, 0x06, 0x5b, 
-       0x6b, 0xdb, 0x2b, 0x00, 0xd1, 0x04, 0x4b, 0x1f, 
-       0x6a, 0x9b, 0x07, 0xdb, 0x0f, 0xdb, 0xd0, 0x21, 
-       0x4b, 0x1c, 0x69, 0xdd, 0x23, 0x0c, 0x40, 0x2b, 
-       0x08, 0x9c, 0x00, 0xa5, 0x26, 0x01, 0x40, 0xae, 
-       0x1c, 0x33, 0x25, 0x33, 0x06, 0x6d, 0x64, 0x2b, 
-       0x25, 0x01, 0x40, 0xa5, 0x1c, 0x2b, 0x4d, 0x1a, 
-       0x63, 0xab, 0x4b, 0x14, 0x69, 0xdd, 0x23, 0x0c, 
-       0x40, 0x2b, 0x08, 0x9d, 0xab, 0x01, 0x70, 0x1d, 
-       0xe0, 0x00, 0xe0, 0x1d, 0x4b, 0x0f, 0x69, 0xdd, 
-       0x23, 0x30, 0x40, 0x2b, 0x09, 0x1d, 0xab, 0x00, 
-       0x70, 0x1d, 0xe7, 0xcd, 0xb0, 0x02, 0x20, 0x00, 
-       0x28, 0x20, 0xdb, 0x04, 0xe0, 0x10, 0x1c, 0x43, 
-       0x06, 0x18, 0x0e, 0x00, 0xe7, 0xf8, 0x24, 0x01, 
-       0x40, 0x84, 0x1c, 0x23, 0x40, 0x3b, 0xd0, 0x06, 
-       0x00, 0x83, 0x58, 0xcc, 0x23, 0x01, 0x03, 0x5b, 
-       0x43, 0x23, 0x00, 0x84, 0x51, 0x0b, 0xe7, 0xee, 
-       0xbc, 0xf0, 0x47, 0x70, 0x66, 0x00, 0x01, 0x00, 
-       0x64, 0x00, 0x00, 0x80, 0x9e, 0x00, 0x00, 0xc0, 
-       0x9e, 0x00, 0x00, 0x00, 0x2e, 0x0f, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x80, 0xb4, 0x80, 0x1c, 0x03, 
-       0x1c, 0x0a, 0x48, 0x0a, 0x68, 0x00, 0x68, 0x01, 
-       0x20, 0x19, 0x06, 0x80, 0x6a, 0x80, 0x0a, 0x40, 
-       0x00, 0x4f, 0x43, 0x38, 0x60, 0x18, 0x0f, 0xc8, 
-       0x07, 0xc0, 0x60, 0x10, 0x68, 0x10, 0x0f, 0xc0, 
-       0x60, 0x10, 0x20, 0x00, 0xbc, 0x80, 0x47, 0x70, 
-       0xe7, 0xfc, 0x00, 0x00, 0x2e, 0x08, 0x5e, 0x38, 
-       0xb5, 0x80, 0x1c, 0x07, 0x48, 0x05, 0x68, 0x00, 
-       0x1d, 0xc1, 0x31, 0x01, 0x20, 0x00, 0xf0, 0x19, 
-       0xfb, 0xfd, 0x60, 0x38, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x5e, 0x10, 
-       0xb4, 0xf0, 0x1c, 0x04, 0x1c, 0x0f, 0x1c, 0x13, 
-       0x06, 0x20, 0x0e, 0x00, 0x06, 0x39, 0x0e, 0x09, 
-       0x04, 0x1a, 0x0c, 0x12, 0x4d, 0x07, 0x68, 0x2d, 
-       0x70, 0xe8, 0x4d, 0x06, 0x68, 0x2d, 0x70, 0xa9, 
-       0x4d, 0x04, 0x68, 0x2d, 0x80, 0x2a, 0x25, 0x01, 
-       0x04, 0x2d, 0x26, 0x33, 0x06, 0x76, 0x60, 0x35, 
-       0xbc, 0xf0, 0x47, 0x70, 0x2e, 0x08, 0x5e, 0x3c, 
-       0x20, 0x0d, 0x06, 0xc0, 0x69, 0xc0, 0x47, 0x70, 
-       0xe7, 0xfd, 0x1c, 0x01, 0x31, 0x01, 0x23, 0x2d, 
-       0x01, 0x1b, 0x42, 0x99, 0xd9, 0x03, 0x20, 0x2d, 
-       0x01, 0x00, 0x47, 0x70, 0xe0, 0x01, 0x1c, 0x08, 
-       0xe7, 0xfb, 0xe7, 0xfa, 0xb5, 0xf3, 0xb0, 0x85, 
-       0x20, 0x00, 0x90, 0x03, 0x20, 0x00, 0x90, 0x02, 
-       0x9f, 0x05, 0x69, 0x3d, 0x69, 0x38, 0x28, 0x13, 
-       0xd1, 0x05, 0x20, 0x75, 0xb0, 0x05, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x99, 0x06, 
-       0x68, 0x88, 0x68, 0x09, 0x1a, 0x40, 0x1c, 0x41, 
-       0x91, 0x04, 0x69, 0x78, 0x23, 0x04, 0x40, 0x18, 
-       0xd0, 0x02, 0x99, 0x04, 0x08, 0x49, 0x91, 0x04, 
-       0x00, 0xa8, 0x49, 0xf8, 0x58, 0x08, 0x99, 0x04, 
-       0x43, 0x48, 0x61, 0xf8, 0x99, 0x06, 0x68, 0x88, 
-       0x68, 0x09, 0x1a, 0x40, 0x30, 0x01, 0x63, 0xb8, 
-       0x68, 0xf8, 0x90, 0x01, 0x48, 0xf2, 0x68, 0x00, 
-       0x28, 0x00, 0xd0, 0x06, 0x98, 0x01, 0x28, 0x19, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0xe0, 0x05, 0x98, 0x01, 0x28, 0x08, 0xd3, 0x01, 
-       0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 
-       0xd0, 0x07, 0x1d, 0xf8, 0x30, 0x21, 0x99, 0x06, 
-       0xf0, 0x02, 0xf9, 0xea, 0x20, 0x00, 0xb0, 0x05, 
-       0xe7, 0xc5, 0x49, 0xe6, 0x20, 0x91, 0xf0, 0x19, 
-       0xfb, 0x7d, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
-       0xf0, 0x0b, 0xfb, 0x64, 0xe7, 0xf5, 0x98, 0x01, 
-       0x00, 0x80, 0x49, 0xe1, 0x58, 0x08, 0x99, 0x05, 
-       0x42, 0x88, 0xd0, 0x05, 0x20, 0x92, 0x49, 0xdd, 
-       0x60, 0x08, 0x20, 0xff, 0xb0, 0x05, 0xe7, 0xae, 
-       0x48, 0xd9, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x03, 
-       0x2d, 0x0b, 0xdb, 0x26, 0x2d, 0x12, 0xdc, 0x24, 
-       0x2d, 0x0b, 0xdb, 0x0b, 0x2d, 0x12, 0xdc, 0x09, 
-       0x48, 0xd6, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 
-       0x1d, 0xf8, 0x30, 0x21, 0x99, 0x06, 0xf0, 0x02, 
-       0xf9, 0xbb, 0xe0, 0x16, 0x6b, 0x38, 0xf7, 0xff, 
-       0xff, 0x7c, 0x90, 0x00, 0x6a, 0xb9, 0x9a, 0x00, 
-       0x48, 0xcf, 0xf0, 0x0c, 0xfb, 0x4b, 0x1d, 0xf8, 
-       0x30, 0x21, 0x99, 0x06, 0xf0, 0x02, 0xf9, 0xac, 
-       0x6b, 0x38, 0xf7, 0xff, 0xff, 0x6e, 0x90, 0x00, 
-       0x6a, 0xb9, 0x9a, 0x00, 0x48, 0xc8, 0xf0, 0x0c, 
-       0xfb, 0x6b, 0x48, 0xc8, 0x68, 0x00, 0x99, 0x05, 
-       0x42, 0x88, 0xd1, 0x30, 0x48, 0xc0, 0x68, 0x00, 
-       0x28, 0x00, 0xd1, 0x2c, 0x48, 0xc1, 0x68, 0x00, 
-       0x28, 0x00, 0xd1, 0x0a, 0x20, 0x0d, 0x06, 0xc0, 
-       0x68, 0xc0, 0x90, 0x02, 0x98, 0x02, 0x28, 0x01, 
-       0xd1, 0x03, 0x20, 0x00, 0x21, 0x0d, 0x06, 0xc9, 
-       0x60, 0xc8, 0x48, 0xba, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x0d, 0x6a, 0xb8, 0x30, 0x01, 0x05, 0x00, 
-       0x6a, 0xf9, 0x31, 0x01, 0x02, 0x89, 0x43, 0x08, 
-       0x6b, 0x79, 0x31, 0x02, 0x43, 0x08, 0x21, 0x0d, 
-       0x06, 0xc9, 0x61, 0x88, 0xe0, 0x0b, 0x6a, 0xb8, 
-       0x30, 0x01, 0x05, 0x00, 0x6a, 0xf9, 0x31, 0x01, 
-       0x02, 0x89, 0x43, 0x08, 0x6b, 0x79, 0x31, 0x02, 
-       0x43, 0x08, 0x49, 0xaf, 0x60, 0x08, 0x2d, 0x0b, 
-       0xdb, 0x15, 0x2d, 0x12, 0xdc, 0x13, 0x48, 0xa9, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x0f, 0x48, 0xa4, 
-       0x68, 0x00, 0x28, 0x00, 0xd1, 0x0b, 0x20, 0x00, 
-       0x62, 0xb8, 0x20, 0x00, 0x62, 0xf8, 0x48, 0xa7, 
-       0x63, 0x38, 0x48, 0xa7, 0x63, 0x78, 0x6b, 0x38, 
-       0xf7, 0xff, 0xff, 0x1b, 0x90, 0x00, 0x48, 0x9c, 
-       0x68, 0x00, 0x28, 0x00, 0xd1, 0x16, 0x20, 0x0d, 
-       0x06, 0xc0, 0x68, 0x80, 0x90, 0x03, 0x20, 0x00, 
-       0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 0xf0, 0x01, 
-       0xfb, 0x07, 0x6b, 0x38, 0xf7, 0xff, 0xff, 0x09, 
-       0x90, 0x00, 0x9a, 0x00, 0x99, 0x01, 0x1c, 0x38, 
-       0xf0, 0x01, 0xfa, 0x8c, 0x98, 0x03, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0x88, 0x48, 0x93, 0x68, 0x00, 
-       0x99, 0x05, 0x42, 0x88, 0xd1, 0x0b, 0x48, 0x8c, 
-       0x68, 0x00, 0x28, 0x00, 0xd1, 0x07, 0x48, 0x8d, 
-       0x68, 0x00, 0x28, 0x00, 0xd1, 0x03, 0x98, 0x02, 
-       0x21, 0x0d, 0x06, 0xc9, 0x60, 0xc8, 0x48, 0x86, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x73, 0x48, 0x87, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x6f, 0xb0, 0x84, 
-       0x98, 0x05, 0xf0, 0x0c, 0xf9, 0xe1, 0x28, 0x00, 
-       0xd1, 0x0e, 0x2d, 0x0b, 0xdb, 0x01, 0x2d, 0x12, 
-       0xdd, 0x0a, 0x1d, 0xf8, 0x30, 0x21, 0x99, 0x0a, 
-       0xf0, 0x02, 0xf9, 0x12, 0x20, 0x92, 0x49, 0x7b, 
-       0x60, 0x08, 0x20, 0x00, 0xb0, 0x09, 0xe6, 0xea, 
-       0x49, 0x80, 0x20, 0x91, 0xf0, 0x19, 0xfa, 0xa2, 
-       0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0c, 
-       0xfa, 0x22, 0x20, 0x92, 0x49, 0x7b, 0x60, 0x08, 
-       0x20, 0x01, 0x49, 0x7b, 0x68, 0x09, 0x60, 0x08, 
-       0x2d, 0x0b, 0xdb, 0x39, 0x2d, 0x12, 0xdc, 0x37, 
-       0xb0, 0x81, 0x24, 0x00, 0x20, 0x00, 0x90, 0x03, 
-       0x20, 0x01, 0x49, 0x75, 0x68, 0x09, 0x23, 0x07, 
-       0x02, 0x1b, 0x18, 0xc9, 0x66, 0x88, 0x6a, 0xb8, 
-       0x30, 0x01, 0x05, 0x00, 0x6a, 0xf9, 0x31, 0x01, 
-       0x02, 0x89, 0x43, 0x08, 0x6b, 0x79, 0x31, 0x02, 
-       0x43, 0x08, 0x90, 0x00, 0x20, 0x00, 0x62, 0xb8, 
-       0x20, 0x00, 0x62, 0xf8, 0x48, 0x67, 0x63, 0x38, 
-       0x48, 0x67, 0x63, 0x78, 0x6b, 0x38, 0xf7, 0xff, 
-       0xfe, 0x9c, 0x90, 0x02, 0x48, 0x66, 0x68, 0x00, 
-       0x23, 0x77, 0x01, 0x1b, 0x18, 0xc0, 0x9a, 0x02, 
-       0x1c, 0x39, 0xf0, 0x0b, 0xfe, 0x05, 0x98, 0x00, 
-       0x49, 0x61, 0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xc9, 0x66, 0xc8, 0x48, 0x5e, 0x68, 0x00, 
-       0xf0, 0x0c, 0xf9, 0xf8, 0xb0, 0x01, 0xe1, 0x2b, 
-       0x24, 0x00, 0x26, 0x00, 0x2e, 0x00, 0xd1, 0x16, 
-       0x2c, 0x07, 0xd2, 0x14, 0x6a, 0xf8, 0x05, 0x81, 
-       0x0d, 0x89, 0x1c, 0x20, 0x34, 0x01, 0x00, 0x83, 
-       0x18, 0x18, 0x00, 0xc0, 0xe0, 0x00, 0xe1, 0x3c, 
-       0x4a, 0x53, 0x68, 0x12, 0x18, 0x80, 0x23, 0x05, 
-       0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 0x42, 0x81, 
-       0xd1, 0x00, 0x26, 0x01, 0xe7, 0xe6, 0x2e, 0x00, 
-       0xd1, 0x13, 0x2c, 0x18, 0xd2, 0x11, 0x6a, 0xf8, 
-       0x05, 0x81, 0x0d, 0x89, 0x1c, 0x20, 0x34, 0x01, 
-       0x23, 0x4c, 0x43, 0x58, 0x4a, 0x48, 0x68, 0x12, 
-       0x18, 0x80, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
-       0x69, 0x40, 0x42, 0x81, 0xd1, 0x00, 0x26, 0x01, 
-       0xe7, 0xe9, 0x3c, 0x01, 0x6b, 0x38, 0xf7, 0xff, 
-       0xfe, 0x50, 0x90, 0x01, 0x2c, 0x07, 0xd2, 0x05, 
-       0x48, 0x3f, 0x68, 0x01, 0x1c, 0x20, 0xf0, 0x0b, 
-       0xfc, 0xcb, 0xe0, 0x06, 0x2c, 0x18, 0xd2, 0x04, 
-       0x1f, 0xe0, 0x49, 0x3b, 0x68, 0x09, 0xf0, 0x0b, 
-       0xfd, 0x01, 0x48, 0x3a, 0x49, 0x38, 0x68, 0x09, 
-       0x23, 0x09, 0x01, 0xdb, 0x18, 0xc9, 0x66, 0xc8, 
-       0x48, 0x36, 0x49, 0x35, 0x68, 0x09, 0x23, 0x09, 
-       0x01, 0xdb, 0x18, 0xc9, 0x67, 0x08, 0x48, 0x33, 
-       0x49, 0x31, 0x68, 0x09, 0x23, 0x09, 0x01, 0xdb, 
-       0x18, 0xc9, 0x66, 0x88, 0x48, 0x2f, 0x49, 0x2e, 
-       0x68, 0x09, 0x23, 0x09, 0x01, 0xdb, 0x18, 0xc9, 
-       0x66, 0x48, 0x20, 0x00, 0x49, 0x2a, 0x68, 0x09, 
-       0x23, 0x09, 0x01, 0xdb, 0x18, 0xc9, 0x64, 0x88, 
-       0x6b, 0x79, 0x48, 0x27, 0x68, 0x00, 0xf0, 0x0b, 
-       0xfd, 0x4b, 0x94, 0x02, 0x1d, 0xf8, 0x30, 0x21, 
-       0x99, 0x0a, 0xf0, 0x02, 0xf8, 0x4d, 0x24, 0x00, 
-       0x26, 0x00, 0x2e, 0x00, 0xd1, 0x14, 0x2c, 0x07, 
-       0xd2, 0x12, 0x6a, 0xf8, 0x05, 0x81, 0x0d, 0x89, 
-       0x1c, 0x20, 0x34, 0x01, 0x00, 0x83, 0x18, 0x18, 
-       0x00, 0xc0, 0x4a, 0x1b, 0x68, 0x12, 0x18, 0x80, 
-       0x23, 0x05, 0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 
-       0x42, 0x81, 0xda, 0x00, 0x26, 0x01, 0xe7, 0xe8, 
-       0x2e, 0x00, 0xd1, 0x2f, 0x2c, 0x18, 0xd2, 0x2d, 
-       0x6a, 0xf8, 0x05, 0x81, 0x0d, 0x89, 0x1c, 0x20, 
-       0x34, 0x01, 0x23, 0x4c, 0x43, 0x58, 0x4a, 0x10, 
-       0x68, 0x12, 0x18, 0x80, 0x38, 0xff, 0x38, 0xff, 
-       0x38, 0x02, 0x69, 0x40, 0x42, 0x81, 0xda, 0x1c, 
-       0xe0, 0x1a, 0x00, 0x00, 0x2e, 0x03, 0x3a, 0x54, 
-       0x2e, 0x08, 0x94, 0x84, 0x2e, 0x08, 0x7c, 0xc0, 
-       0x2e, 0x08, 0x7c, 0x58, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x7d, 0x94, 0x2e, 0x08, 0x7c, 0xbc, 
-       0x2e, 0x08, 0x5e, 0x4c, 0x00, 0x00, 0x02, 0xcf, 
-       0x00, 0x00, 0x02, 0x3f, 0x2e, 0x08, 0x94, 0x88, 
-       0x2e, 0x08, 0x7d, 0xb4, 0x00, 0x00, 0xff, 0xff, 
-       0x26, 0x01, 0xe7, 0xcd, 0x3c, 0x01, 0x6b, 0x38, 
-       0xf7, 0xff, 0xfd, 0xc3, 0x90, 0x01, 0x2c, 0x07, 
-       0xd2, 0x12, 0x48, 0x48, 0x68, 0x01, 0x1c, 0x20, 
-       0xf0, 0x0b, 0xfb, 0xcc, 0x00, 0xa0, 0x19, 0x00, 
-       0x00, 0xc0, 0x49, 0x44, 0x68, 0x09, 0x18, 0x40, 
-       0x23, 0x2b, 0x01, 0x5b, 0x18, 0xc0, 0x9a, 0x01, 
-       0x1c, 0x39, 0xf0, 0x0b, 0xfd, 0x21, 0xe0, 0x4a, 
-       0x2c, 0x18, 0xd2, 0x48, 0x1f, 0xe0, 0x49, 0x3d, 
-       0x68, 0x09, 0xf0, 0x0b, 0xfc, 0x0b, 0x20, 0x4c, 
-       0x43, 0x60, 0x49, 0x3a, 0x68, 0x09, 0x18, 0x40, 
-       0x38, 0xff, 0x38, 0xff, 0x38, 0x0a, 0x9a, 0x01, 
-       0x1c, 0x39, 0xf0, 0x0b, 0xfd, 0x0d, 0x20, 0x4c, 
-       0x43, 0x60, 0x49, 0x34, 0x68, 0x09, 0x18, 0x40, 
-       0x38, 0xff, 0x38, 0xff, 0x38, 0x82, 0x6f, 0xc0, 
-       0x28, 0x00, 0xd0, 0x17, 0x20, 0x4c, 0x43, 0x60, 
-       0x49, 0x2e, 0x68, 0x09, 0x18, 0x40, 0x38, 0xff, 
-       0x38, 0xff, 0x38, 0x02, 0x68, 0x00, 0x04, 0x00, 
-       0x0c, 0x00, 0xd0, 0x0b, 0x20, 0x4c, 0x43, 0x60, 
-       0x49, 0x28, 0x68, 0x09, 0x18, 0x40, 0x38, 0xff, 
-       0x38, 0xff, 0x38, 0x02, 0x68, 0x00, 0x0c, 0x00, 
-       0x04, 0x00, 0xd1, 0x0a, 0x20, 0x02, 0x21, 0x4c, 
-       0x43, 0x61, 0x4a, 0x22, 0x68, 0x12, 0x18, 0x89, 
-       0x39, 0xff, 0x39, 0xff, 0x39, 0x82, 0x67, 0x48, 
-       0xe0, 0x09, 0x20, 0x03, 0x21, 0x4c, 0x43, 0x61, 
-       0x4a, 0x1c, 0x68, 0x12, 0x18, 0x89, 0x39, 0xff, 
-       0x39, 0xff, 0x39, 0x82, 0x67, 0x48, 0x48, 0x19, 
-       0x68, 0x00, 0xf0, 0x0c, 0xf8, 0xcf, 0x6b, 0x79, 
-       0x48, 0x16, 0x68, 0x00, 0xf0, 0x0b, 0xfc, 0x36, 
-       0x98, 0x02, 0x42, 0x84, 0xda, 0x01, 0x1c, 0x21, 
-       0xe0, 0x00, 0x99, 0x02, 0x91, 0x00, 0x99, 0x00, 
-       0x48, 0x10, 0x68, 0x00, 0xf0, 0x0b, 0xfd, 0x46, 
-       0x49, 0x0f, 0x20, 0x91, 0xf0, 0x19, 0xf9, 0x1e, 
-       0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0x48, 0x0b, 
-       0x68, 0x00, 0x90, 0x03, 0x48, 0x0b, 0x68, 0x00, 
-       0x49, 0x08, 0x60, 0x08, 0x98, 0x03, 0x49, 0x09, 
-       0x60, 0x08, 0x20, 0x92, 0x49, 0x06, 0x60, 0x08, 
-       0xb0, 0x04, 0x20, 0x92, 0x49, 0x06, 0x60, 0x08, 
-       0x20, 0x00, 0xb0, 0x05, 0xe5, 0x4b, 0xb0, 0x05, 
-       0xe5, 0x49, 0x00, 0x00, 0x2e, 0x08, 0x7d, 0xb4, 
-       0x2e, 0x08, 0x94, 0x88, 0x2e, 0x08, 0x7d, 0xb8, 
-       0x2e, 0x08, 0x7c, 0xc0, 0xb5, 0xff, 0x1c, 0x07, 
-       0x9d, 0x09, 0xb0, 0x89, 0x26, 0x00, 0x20, 0x00, 
-       0x90, 0x03, 0x99, 0x0a, 0x68, 0x4c, 0x2d, 0x13, 
-       0xd1, 0x05, 0x20, 0x75, 0xb0, 0x09, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x98, 0x15, 
-       0x60, 0x04, 0x20, 0x00, 0x60, 0xe0, 0x20, 0x00, 
-       0x61, 0x20, 0x69, 0x60, 0x4b, 0xf9, 0x40, 0x18, 
-       0x61, 0x60, 0x02, 0x00, 0x69, 0x60, 0x4b, 0xf8, 
-       0x40, 0x18, 0x61, 0x60, 0x04, 0x80, 0x69, 0x60, 
-       0x4b, 0xf6, 0x40, 0x18, 0x61, 0x60, 0x05, 0x80, 
-       0x69, 0x60, 0x23, 0xc0, 0x43, 0xdb, 0x40, 0x18, 
-       0x61, 0x60, 0x06, 0x00, 0x69, 0x60, 0x4b, 0xf2, 
-       0x40, 0x18, 0x61, 0x60, 0x04, 0x40, 0x69, 0x60, 
-       0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 0x61, 0x60, 
-       0x06, 0x80, 0x69, 0x60, 0x09, 0x40, 0x01, 0x40, 
-       0x61, 0x60, 0x06, 0xc0, 0x20, 0x00, 0x61, 0xa0, 
-       0x20, 0x00, 0x61, 0xe0, 0x20, 0x00, 0x62, 0x20, 
-       0x20, 0x00, 0x62, 0x60, 0x20, 0x00, 0x63, 0xa0, 
-       0x20, 0x00, 0x63, 0xe0, 0x20, 0x00, 0x64, 0x60, 
-       0x20, 0x00, 0x64, 0x20, 0x20, 0x00, 0x60, 0x20, 
-       0x20, 0x00, 0x71, 0x20, 0x99, 0x0a, 0x68, 0x48, 
-       0x64, 0xe0, 0x99, 0x0a, 0x68, 0x08, 0x64, 0xa0, 
-       0x1d, 0xe0, 0x30, 0x21, 0x99, 0x13, 0xf0, 0x01, 
-       0xff, 0x07, 0x2d, 0x0b, 0xdb, 0x06, 0x2d, 0x12, 
-       0xdc, 0x04, 0x1d, 0xe0, 0x30, 0x49, 0x99, 0x13, 
-       0xf0, 0x01, 0xfe, 0xfe, 0x6b, 0x20, 0x6a, 0xa1, 
-       0x1a, 0x40, 0x30, 0x01, 0x63, 0xa0, 0x00, 0xa8, 
-       0x49, 0xd4, 0x58, 0x08, 0x69, 0x61, 0x09, 0x49, 
-       0x01, 0x49, 0x06, 0xc0, 0x0e, 0xc0, 0x43, 0x08, 
-       0x61, 0x60, 0x06, 0xc0, 0x0e, 0xc0, 0x6b, 0x20, 
-       0x6a, 0xa1, 0x1a, 0x40, 0x1c, 0x41, 0x91, 0x04, 
-       0x69, 0x60, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x02, 
-       0x99, 0x04, 0x08, 0x49, 0x91, 0x04, 0x00, 0xa8, 
-       0x49, 0xc9, 0x58, 0x08, 0x99, 0x04, 0x43, 0x48, 
-       0x61, 0xe0, 0x2d, 0x13, 0xd1, 0x04, 0x20, 0x00, 
-       0x90, 0x14, 0x20, 0x00, 0x61, 0xa0, 0xe0, 0x13, 
-       0x9b, 0x0c, 0x68, 0x58, 0x90, 0x01, 0x98, 0x01, 
-       0x08, 0x80, 0x61, 0xa0, 0x98, 0x01, 0x64, 0x60, 
-       0x9b, 0x0c, 0x68, 0x18, 0x64, 0x20, 0x20, 0x00, 
-       0x62, 0x60, 0x9a, 0x0b, 0x63, 0xe2, 0x69, 0x60, 
-       0x4b, 0xb6, 0x40, 0x18, 0x61, 0x60, 0x02, 0x00, 
-       0x69, 0x60, 0x4b, 0xb6, 0x40, 0x18, 0x61, 0x60, 
-       0x05, 0x80, 0x69, 0x60, 0x23, 0x0f, 0x02, 0x9b, 
-       0x43, 0x18, 0x61, 0x60, 0x04, 0x80, 0x69, 0x60, 
-       0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 0x61, 0x60, 
-       0x06, 0x80, 0x69, 0x60, 0x23, 0xc0, 0x43, 0x18, 
-       0x61, 0x60, 0x06, 0x00, 0x69, 0x60, 0x23, 0x01, 
-       0x03, 0x9b, 0x43, 0x18, 0x61, 0x60, 0x04, 0x40, 
-       0x98, 0x14, 0x60, 0xe0, 0x61, 0x25, 0x48, 0xab, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x06, 0x98, 0x14, 
-       0x28, 0x19, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
-       0x20, 0x00, 0xe0, 0x05, 0x98, 0x14, 0x28, 0x08, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 0xb0, 0x09, 
-       0xe7, 0x35, 0x49, 0xa1, 0x20, 0x91, 0xf0, 0x19, 
-       0xf8, 0x21, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
-       0xf0, 0x0b, 0xf8, 0x08, 0xe7, 0xf5, 0x48, 0x9d, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x53, 0x68, 0x38, 
-       0x01, 0x80, 0x0f, 0xc0, 0x68, 0xa1, 0x4b, 0x9a, 
-       0x40, 0x19, 0x07, 0xc0, 0x09, 0x80, 0x43, 0x08, 
-       0x60, 0xa0, 0x01, 0x80, 0x0f, 0xc0, 0x68, 0x38, 
-       0x01, 0xc0, 0x0f, 0xc0, 0x68, 0xa1, 0x4b, 0x95, 
-       0x40, 0x19, 0x07, 0xc0, 0x09, 0xc0, 0x43, 0x08, 
-       0x60, 0xa0, 0x01, 0xc0, 0x0f, 0xc0, 0x68, 0x38, 
-       0x02, 0x00, 0x0e, 0x00, 0x68, 0xa1, 0x4b, 0x85, 
-       0x40, 0x19, 0x06, 0x00, 0x0e, 0x00, 0x04, 0x00, 
-       0x43, 0x08, 0x60, 0xa0, 0x02, 0x00, 0x0e, 0x00, 
-       0x48, 0x86, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x2a, 
-       0x2f, 0x00, 0xd0, 0x28, 0x20, 0x0d, 0x06, 0xc0, 
-       0x6a, 0x00, 0x1c, 0x06, 0x68, 0x38, 0x4b, 0x85, 
-       0x43, 0x98, 0xd0, 0x06, 0x68, 0x38, 0x02, 0x00, 
-       0x0e, 0x01, 0x20, 0x01, 0x40, 0x88, 0x43, 0x06, 
-       0xe0, 0x05, 0x68, 0x38, 0x02, 0x00, 0x0e, 0x00, 
-       0x21, 0x01, 0x40, 0x81, 0x43, 0x8e, 0x68, 0x38, 
-       0x4b, 0x7b, 0x43, 0x98, 0xd0, 0x08, 0x68, 0x38, 
-       0x02, 0x00, 0x0e, 0x00, 0x1d, 0xc1, 0x31, 0x01, 
-       0x20, 0x01, 0x40, 0x88, 0x43, 0x06, 0xe0, 0x06, 
-       0x68, 0x38, 0x02, 0x00, 0x0e, 0x00, 0x30, 0x08, 
-       0x21, 0x01, 0x40, 0x81, 0x43, 0x8e, 0x2d, 0x0b, 
-       0xdb, 0x0a, 0x2d, 0x12, 0xdc, 0x08, 0x48, 0x6f, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x04, 0x20, 0x51, 
-       0x01, 0x00, 0x21, 0x0d, 0x06, 0xc9, 0x60, 0x08, 
-       0x98, 0x14, 0x00, 0x80, 0x49, 0x6c, 0x58, 0x08, 
-       0x28, 0x00, 0xd0, 0x01, 0x20, 0x83, 0x90, 0x03, 
-       0x2d, 0x0b, 0xdb, 0x08, 0x2d, 0x12, 0xdc, 0x06, 
-       0x48, 0x68, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x01, 
-       0x20, 0x84, 0x90, 0x03, 0xe0, 0x06, 0x9a, 0x0b, 
-       0x2a, 0x01, 0xd1, 0x03, 0x2d, 0x13, 0xd0, 0x01, 
-       0x20, 0x82, 0x90, 0x03, 0x98, 0x03, 0x28, 0x00, 
-       0xd0, 0x07, 0x20, 0x92, 0x49, 0x5a, 0x60, 0x08, 
-       0x20, 0x08, 0x60, 0xe0, 0x98, 0x03, 0xb0, 0x09, 
-       0xe6, 0xa1, 0x98, 0x15, 0x68, 0x01, 0x98, 0x14, 
-       0x00, 0x80, 0x4a, 0x59, 0x50, 0x11, 0x6a, 0xa0, 
-       0x28, 0x00, 0xda, 0x01, 0x20, 0x00, 0x62, 0xa0, 
-       0x6b, 0x20, 0x28, 0x00, 0xdc, 0x01, 0x20, 0x01, 
-       0x63, 0x20, 0x6a, 0xe0, 0x28, 0x00, 0xda, 0x01, 
-       0x20, 0x00, 0x62, 0xe0, 0x6b, 0x60, 0x4b, 0x52, 
-       0x42, 0x98, 0xdd, 0x01, 0x48, 0x50, 0x63, 0x60, 
-       0x6b, 0x20, 0xf7, 0xff, 0xfb, 0x9e, 0x90, 0x00, 
-       0x2d, 0x13, 0xd1, 0x05, 0x6a, 0xa1, 0x9a, 0x00, 
-       0x48, 0x4c, 0xf0, 0x0b, 0xff, 0x99, 0xe0, 0x15, 
-       0x2d, 0x0b, 0xdb, 0x01, 0x2d, 0x12, 0xdd, 0x03, 
-       0x48, 0x40, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x0d, 
-       0x2d, 0x0b, 0xdb, 0x06, 0x2d, 0x12, 0xdc, 0x04, 
-       0x48, 0x3e, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x00, 
-       0xe0, 0x04, 0x6a, 0xa1, 0x9a, 0x00, 0x48, 0x41, 
-       0xf0, 0x0b, 0xff, 0x82, 0x2d, 0x0b, 0xdb, 0x5f, 
-       0x2d, 0x12, 0xdc, 0x5e, 0x98, 0x15, 0x68, 0x00, 
-       0x49, 0x3a, 0x60, 0x08, 0x99, 0x13, 0xa8, 0x05, 
-       0xf0, 0x01, 0xfd, 0xae, 0xa9, 0x05, 0x98, 0x15, 
-       0x68, 0x00, 0xf0, 0x05, 0xfc, 0x5f, 0x1d, 0xe0, 
-       0x30, 0x21, 0xa9, 0x05, 0xf0, 0x01, 0xfd, 0xa4, 
-       0x20, 0x01, 0x49, 0x35, 0x65, 0x08, 0x20, 0x02, 
-       0x21, 0x0d, 0x06, 0xc9, 0x60, 0xc8, 0x21, 0x00, 
-       0x20, 0x02, 0xf0, 0x04, 0xfa, 0xdd, 0x2d, 0x0b, 
-       0xd0, 0x05, 0x2d, 0x0f, 0xd0, 0x03, 0x2d, 0x10, 
-       0xd0, 0x01, 0x2d, 0x11, 0xd1, 0x03, 0x21, 0x00, 
-       0x20, 0x12, 0xf0, 0x04, 0xfa, 0xd1, 0x2d, 0x0c, 
-       0xd0, 0x01, 0x2d, 0x0f, 0xd1, 0x03, 0x21, 0x00, 
-       0x20, 0x04, 0xf0, 0x04, 0xfa, 0xc9, 0x2d, 0x0d, 
-       0xd0, 0x01, 0x2d, 0x10, 0xd1, 0x03, 0x21, 0x00, 
-       0x20, 0x08, 0xf0, 0x04, 0xfa, 0xc1, 0x2d, 0x0e, 
-       0xd0, 0x01, 0x2d, 0x11, 0xd1, 0x03, 0x21, 0x00, 
-       0x20, 0x01, 0xf0, 0x04, 0xfa, 0xb9, 0x48, 0x15, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x73, 0xb0, 0x82, 
-       0x49, 0x1c, 0x20, 0x91, 0xf0, 0x18, 0xff, 0x06, 
-       0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0b, 
-       0xfe, 0x86, 0x20, 0x92, 0x49, 0x17, 0x60, 0x08, 
-       0x20, 0x01, 0x49, 0x17, 0x68, 0x09, 0x60, 0x08, 
-       0x20, 0x01, 0x49, 0x15, 0x68, 0x09, 0x23, 0x07, 
-       0x02, 0x1b, 0x18, 0xc9, 0x66, 0x88, 0xe0, 0x25, 
-       0xe0, 0xae, 0xe0, 0xad, 0xff, 0x00, 0xff, 0xff, 
-       0xff, 0xff, 0xc3, 0xff, 0xff, 0xff, 0xfc, 0xff, 
-       0xff, 0xff, 0xbf, 0xff, 0x2e, 0x03, 0x3a, 0x04, 
-       0x2e, 0x03, 0x3a, 0x54, 0x2e, 0x08, 0x94, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc0, 0x2e, 0x08, 0x60, 0x84, 
-       0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 
-       0x2e, 0x08, 0x7c, 0x58, 0x2e, 0x08, 0x7c, 0xbc, 
-       0x00, 0x00, 0x02, 0x3f, 0x2e, 0x08, 0x7d, 0x94, 
-       0xcc, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x94, 0x88, 
-       0x2e, 0x08, 0x7d, 0xb4, 0x6a, 0xa0, 0x30, 0x01, 
-       0x05, 0x00, 0x6a, 0xe1, 0x31, 0x01, 0x02, 0x89, 
-       0x43, 0x08, 0x6b, 0x61, 0x31, 0x02, 0x43, 0x08, 
-       0x90, 0x00, 0x20, 0x00, 0x62, 0xa0, 0x20, 0x00, 
-       0x62, 0xe0, 0x48, 0x5f, 0x63, 0x20, 0x48, 0x5f, 
-       0x63, 0x60, 0x6b, 0x20, 0xf7, 0xff, 0xfa, 0xe1, 
-       0x90, 0x02, 0x48, 0x5d, 0x68, 0x00, 0x23, 0x77, 
-       0x01, 0x1b, 0x18, 0xc0, 0x9a, 0x02, 0x1c, 0x21, 
-       0xf0, 0x0b, 0xfa, 0x4a, 0x98, 0x00, 0x49, 0x58, 
-       0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 
-       0x66, 0xc8, 0x48, 0x55, 0x68, 0x00, 0x21, 0x00, 
-       0xf0, 0x0b, 0xfa, 0xc4, 0x48, 0x52, 0x68, 0x00, 
-       0xf0, 0x0b, 0xfe, 0x38, 0x49, 0x51, 0x20, 0x91, 
-       0xf0, 0x18, 0xfe, 0x98, 0xe0, 0x00, 0xe0, 0x11, 
-       0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf6, 0x48, 0x4c, 
-       0x68, 0x00, 0x90, 0x01, 0x48, 0x4c, 0x68, 0x00, 
-       0x49, 0x49, 0x60, 0x08, 0x98, 0x01, 0x49, 0x4a, 
-       0x60, 0x08, 0x20, 0x92, 0x49, 0x47, 0x60, 0x08, 
-       0xb0, 0x02, 0xe0, 0x40, 0x48, 0x47, 0x68, 0x00, 
-       0x28, 0x00, 0xd0, 0x0c, 0x6a, 0xa0, 0x30, 0x01, 
-       0x05, 0x00, 0x6a, 0xe1, 0x31, 0x01, 0x02, 0x89, 
-       0x43, 0x08, 0x6b, 0x61, 0x31, 0x02, 0x43, 0x08, 
-       0x49, 0x41, 0x60, 0x08, 0xe0, 0x0c, 0x6a, 0xa0, 
-       0x30, 0x01, 0x05, 0x00, 0x6a, 0xe1, 0x31, 0x01, 
-       0x02, 0x89, 0x43, 0x08, 0x6b, 0x61, 0x31, 0x02, 
-       0x43, 0x08, 0x21, 0x0d, 0x06, 0xc9, 0x61, 0x88, 
-       0x20, 0x0d, 0x06, 0xc0, 0x68, 0x80, 0x90, 0x02, 
-       0x20, 0x00, 0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 
-       0xf0, 0x00, 0xfe, 0x82, 0x48, 0x33, 0x68, 0x00, 
-       0x28, 0x00, 0xd0, 0x07, 0x20, 0x00, 0x62, 0xa0, 
-       0x20, 0x00, 0x62, 0xe0, 0x48, 0x2a, 0x63, 0x20, 
-       0x48, 0x2a, 0x63, 0x60, 0x6b, 0x20, 0xf7, 0xff, 
-       0xfa, 0x78, 0x90, 0x00, 0x9a, 0x00, 0x99, 0x14, 
-       0x1c, 0x20, 0xf0, 0x00, 0xfd, 0xfb, 0x98, 0x02, 
-       0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 0xe0, 0x05, 
-       0x2d, 0x13, 0xd1, 0x03, 0x20, 0x1f, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0x08, 0x2d, 0x0b, 0xdb, 0x01, 
-       0x2d, 0x12, 0xdd, 0x1a, 0x48, 0x23, 0x68, 0x00, 
-       0x28, 0x00, 0xd1, 0x16, 0x20, 0x0d, 0x06, 0xc0, 
-       0x68, 0x80, 0x90, 0x02, 0x20, 0x00, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0x88, 0xf0, 0x00, 0xfe, 0x50, 
-       0x6b, 0x20, 0xf7, 0xff, 0xfa, 0x52, 0x90, 0x00, 
-       0x9a, 0x00, 0x99, 0x14, 0x1c, 0x20, 0xf0, 0x00, 
-       0xfd, 0xd5, 0x98, 0x02, 0x21, 0x0d, 0x06, 0xc9, 
-       0x60, 0x88, 0x48, 0x14, 0x68, 0x00, 0x28, 0x01, 
-       0xd1, 0x06, 0x48, 0x14, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x02, 0x20, 0x0d, 0x06, 0xc0, 0x62, 0x06, 
-       0x48, 0x0e, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x07, 
-       0x48, 0x0e, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x03, 
-       0x98, 0x14, 0x21, 0x00, 0xf0, 0x0b, 0xfd, 0x0a, 
-       0x20, 0x92, 0x49, 0x0b, 0x60, 0x08, 0x20, 0x00, 
-       0xb0, 0x09, 0xe5, 0x10, 0xb0, 0x09, 0xe5, 0x0e, 
-       0x00, 0x00, 0x02, 0xcf, 0x00, 0x00, 0x02, 0x3f, 
-       0x2e, 0x08, 0x7d, 0xb4, 0x2e, 0x08, 0x94, 0x88, 
-       0x2e, 0x08, 0x7d, 0xb8, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x5e, 0x4c, 0x2e, 0x08, 0x94, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc0, 0xb5, 0xf7, 0xb0, 0x83, 
-       0x9f, 0x03, 0x69, 0x38, 0x90, 0x00, 0x98, 0x00, 
-       0x28, 0x13, 0xd1, 0x05, 0x20, 0x75, 0xb0, 0x03, 
-       0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x6c, 0x78, 0x99, 0x04, 0x60, 0x48, 0x6c, 0x38, 
-       0x99, 0x04, 0x60, 0x08, 0x6c, 0xf8, 0x9a, 0x05, 
-       0x60, 0x50, 0x6c, 0xb8, 0x9a, 0x05, 0x60, 0x10, 
-       0x68, 0xfd, 0x48, 0xf9, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 0xb0, 0x03, 
-       0xe7, 0xda, 0x49, 0xf0, 0x20, 0x91, 0xf0, 0x18, 
-       0xfd, 0xb9, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
-       0xf0, 0x0a, 0xfd, 0xa0, 0xe7, 0xf5, 0x00, 0xa8, 
-       0x49, 0xeb, 0x58, 0x08, 0x99, 0x03, 0x42, 0x88, 
-       0xd0, 0x05, 0x20, 0x92, 0x49, 0xe7, 0x60, 0x08, 
-       0x20, 0xff, 0xb0, 0x03, 0xe7, 0xc4, 0x21, 0x00, 
-       0x00, 0xa8, 0x4a, 0xe5, 0x50, 0x11, 0x48, 0xe2, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 0x69, 0x38, 
-       0x28, 0x0b, 0xdb, 0x16, 0x69, 0x38, 0x28, 0x12, 
-       0xdc, 0x13, 0x48, 0xe0, 0x68, 0x00, 0x28, 0x01, 
-       0xd1, 0x06, 0x69, 0x38, 0x28, 0x0b, 0xdb, 0x03, 
-       0x69, 0x38, 0x28, 0x12, 0xdc, 0x00, 0xe0, 0x08, 
-       0x6b, 0x38, 0xf7, 0xff, 0xf9, 0xb6, 0x90, 0x01, 
-       0x6a, 0xb9, 0x9a, 0x01, 0x48, 0xd8, 0xf0, 0x0b, 
-       0xfd, 0x85, 0x69, 0x38, 0x28, 0x0b, 0xdb, 0x2e, 
-       0x69, 0x38, 0x28, 0x12, 0xdc, 0x2b, 0x48, 0xd0, 
-       0x68, 0x00, 0x28, 0x00, 0xd1, 0x27, 0x20, 0x00, 
-       0x49, 0xd2, 0x65, 0x08, 0x20, 0x01, 0x03, 0x00, 
-       0x49, 0xd0, 0x65, 0x48, 0x20, 0x00, 0x49, 0xcf, 
-       0x65, 0x88, 0x20, 0x00, 0x49, 0xcd, 0x65, 0xc8, 
-       0x20, 0x00, 0x49, 0xcc, 0x66, 0x08, 0x20, 0x00, 
-       0x49, 0xcb, 0x60, 0x08, 0x20, 0x02, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0xc8, 0x21, 0x00, 0x20, 0x02, 
-       0xf0, 0x04, 0xf9, 0x0a, 0x48, 0xc3, 0x68, 0x00, 
-       0x28, 0x00, 0xd1, 0x04, 0x48, 0xc5, 0x21, 0x0d, 
-       0x06, 0xc9, 0x61, 0x88, 0xe0, 0x02, 0x48, 0xc3, 
-       0x49, 0xc3, 0x60, 0x08, 0xe0, 0x06, 0x69, 0x38, 
-       0x28, 0x13, 0xd1, 0x03, 0x20, 0x00, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0x08, 0x48, 0xb6, 0x68, 0x00, 
-       0x28, 0x00, 0xd1, 0x2c, 0x20, 0x0d, 0x06, 0xc0, 
-       0x68, 0x80, 0x90, 0x02, 0x20, 0x00, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0x88, 0xf0, 0x00, 0xfd, 0x64, 
-       0x20, 0x00, 0x43, 0xc0, 0x00, 0xe9, 0x4b, 0xb7, 
-       0x18, 0xc9, 0x60, 0x08, 0x20, 0x00, 0x43, 0xc0, 
-       0x00, 0xe9, 0x4b, 0xb4, 0x18, 0xc9, 0x60, 0x48, 
-       0x20, 0x00, 0x43, 0xc0, 0x00, 0xe9, 0x4b, 0xb1, 
-       0x18, 0xc9, 0x64, 0x08, 0x20, 0x00, 0x43, 0xc0, 
-       0x00, 0xe9, 0x4b, 0xae, 0x18, 0xc9, 0x64, 0x48, 
-       0x20, 0x01, 0x40, 0xa8, 0x43, 0xc0, 0x99, 0x02, 
-       0x40, 0x08, 0x90, 0x02, 0x98, 0x02, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0x88, 0xe0, 0x9c, 0x69, 0x38, 
-       0x28, 0x0b, 0xdb, 0x74, 0x69, 0x38, 0x28, 0x12, 
-       0xdc, 0x72, 0x48, 0x9b, 0x68, 0x00, 0x28, 0x01, 
-       0xd1, 0x6f, 0x20, 0x00, 0x49, 0x9d, 0x65, 0x08, 
-       0x20, 0x01, 0x03, 0x00, 0x49, 0x9b, 0x65, 0x48, 
-       0x20, 0x00, 0x49, 0x9a, 0x65, 0x88, 0x20, 0x00, 
-       0x49, 0x98, 0x65, 0xc8, 0x20, 0x00, 0x49, 0x97, 
-       0x66, 0x08, 0x20, 0x00, 0x49, 0x96, 0x60, 0x08, 
-       0x20, 0x02, 0x21, 0x0d, 0x06, 0xc9, 0x60, 0xc8, 
-       0x21, 0x00, 0x20, 0x02, 0xf0, 0x04, 0xf8, 0xa0, 
-       0x49, 0x95, 0x20, 0x91, 0xf0, 0x18, 0xfc, 0xf2, 
-       0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0b, 
-       0xfc, 0x72, 0x20, 0x92, 0x49, 0x90, 0x60, 0x08, 
-       0x48, 0x90, 0x68, 0x00, 0x23, 0x0d, 0x01, 0xdb, 
-       0x18, 0xc0, 0x69, 0x80, 0x08, 0x40, 0x00, 0x40, 
-       0x49, 0x8c, 0x68, 0x09, 0x23, 0x0d, 0x01, 0xdb, 
-       0x18, 0xc9, 0x61, 0x88, 0x20, 0x01, 0x49, 0x89, 
-       0x68, 0x09, 0x60, 0x08, 0x20, 0x01, 0x49, 0x87, 
-       0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 
-       0x66, 0x88, 0x20, 0x00, 0x43, 0xc0, 0x49, 0x83, 
-       0x68, 0x09, 0x23, 0x0f, 0x01, 0xdb, 0x18, 0xc9, 
-       0x61, 0x08, 0x20, 0x00, 0x43, 0xc0, 0x49, 0x7f, 
-       0x68, 0x09, 0x23, 0x0f, 0x01, 0xdb, 0x18, 0xc9, 
-       0x61, 0x48, 0x20, 0x00, 0x43, 0xc0, 0x49, 0x7b, 
-       0x68, 0x09, 0x23, 0x0f, 0x01, 0xdb, 0x18, 0xc9, 
-       0x60, 0xc8, 0x20, 0x00, 0x43, 0xc0, 0x49, 0x77, 
-       0x68, 0x09, 0x23, 0x0f, 0x01, 0xdb, 0x18, 0xc9, 
-       0x60, 0x88, 0x6b, 0x38, 0xf7, 0xff, 0xf8, 0xd9, 
-       0x90, 0x01, 0x48, 0x72, 0x68, 0x00, 0x23, 0x77, 
-       0x01, 0x1b, 0x18, 0xc0, 0x9a, 0x01, 0x1c, 0x39, 
-       0xf0, 0x0b, 0xf8, 0x42, 0xe0, 0x02, 0xe0, 0x23, 
-       0xe0, 0x22, 0xe0, 0x21, 0x48, 0x67, 0x49, 0x6b, 
-       0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 
-       0x66, 0xc8, 0x48, 0x68, 0x68, 0x00, 0x21, 0x00, 
-       0xf0, 0x0b, 0xf8, 0xb8, 0x48, 0x65, 0x68, 0x00, 
-       0xf0, 0x0b, 0xfc, 0x2c, 0x49, 0x62, 0x20, 0x91, 
-       0xf0, 0x18, 0xfc, 0x8c, 0x28, 0x92, 0xd0, 0x00, 
-       0xe7, 0xf8, 0x48, 0x60, 0x68, 0x04, 0x48, 0x60, 
-       0x68, 0x00, 0x49, 0x5e, 0x60, 0x08, 0x48, 0x5e, 
-       0x60, 0x04, 0x20, 0x92, 0x49, 0x5a, 0x60, 0x08, 
-       0x48, 0x52, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x73, 
-       0x48, 0x4d, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x6f, 
-       0x1c, 0x28, 0xf0, 0x0b, 0xfb, 0x9d, 0x28, 0x01, 
-       0xd1, 0x6a, 0x98, 0x00, 0x28, 0x0b, 0xdb, 0x02, 
-       0x98, 0x00, 0x28, 0x12, 0xdd, 0x65, 0xb0, 0x84, 
-       0x49, 0x4f, 0x20, 0x91, 0xf0, 0x18, 0xfc, 0x66, 
-       0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0b, 
-       0xfb, 0xe6, 0x48, 0x4c, 0x68, 0x00, 0x68, 0x40, 
-       0x28, 0x00, 0xd0, 0x06, 0x48, 0x49, 0x68, 0x00, 
-       0x68, 0x40, 0x38, 0x01, 0x49, 0x47, 0x68, 0x09, 
-       0x60, 0x48, 0x20, 0x92, 0x49, 0x44, 0x60, 0x08, 
-       0x20, 0x01, 0x49, 0x44, 0x68, 0x09, 0x60, 0x08, 
-       0x24, 0x00, 0x20, 0x00, 0x90, 0x02, 0x98, 0x02, 
-       0x28, 0x00, 0xd1, 0x15, 0x2c, 0x07, 0xd2, 0x13, 
-       0x6a, 0xf8, 0x05, 0x81, 0x0d, 0x89, 0x1c, 0x20, 
-       0x34, 0x01, 0x00, 0x83, 0x18, 0x18, 0x00, 0xc0, 
-       0x4a, 0x3a, 0x68, 0x12, 0x18, 0x80, 0x23, 0x05, 
-       0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 0x42, 0x81, 
-       0xd1, 0x01, 0x20, 0x01, 0x90, 0x02, 0xe7, 0xe6, 
-       0x98, 0x02, 0x28, 0x00, 0xd1, 0x14, 0x2c, 0x18, 
-       0xd2, 0x12, 0x6a, 0xf8, 0x05, 0x81, 0x0d, 0x89, 
-       0x1c, 0x20, 0x34, 0x01, 0x23, 0x4c, 0x43, 0x58, 
-       0x4a, 0x2e, 0x68, 0x12, 0x18, 0x80, 0x38, 0xff, 
-       0x38, 0xff, 0x38, 0x02, 0x69, 0x40, 0x42, 0x81, 
-       0xd1, 0x01, 0x20, 0x01, 0x90, 0x02, 0xe7, 0xe7, 
-       0x3c, 0x01, 0x6b, 0x38, 0xf7, 0xff, 0xf8, 0x41, 
-       0x90, 0x01, 0x2c, 0x07, 0xd2, 0x09, 0x48, 0x25, 
-       0x68, 0x01, 0x1c, 0x20, 0xf0, 0x0a, 0xfe, 0xbc, 
-       0x48, 0x22, 0x68, 0x00, 0xf0, 0x0b, 0xfb, 0xa6, 
-       0xe0, 0x09, 0x2c, 0x18, 0xd2, 0x07, 0xe0, 0x01, 
-       0xe0, 0x95, 0xe0, 0x94, 0x1f, 0xe0, 0x49, 0x1d, 
-       0x68, 0x09, 0xf0, 0x0a, 0xfe, 0xeb, 0x48, 0x1b, 
-       0x68, 0x00, 0x4b, 0x1c, 0x18, 0xc0, 0xf0, 0x0b, 
-       0xf8, 0x0b, 0x20, 0x00, 0x49, 0x17, 0x68, 0x09, 
-       0x23, 0x09, 0x01, 0xdb, 0x18, 0xc9, 0x64, 0x88, 
-       0x48, 0x14, 0x68, 0x00, 0x68, 0x40, 0x28, 0x07, 
-       0xd3, 0x2c, 0x48, 0x12, 0x68, 0x00, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x23, 0xfe, 
-       0x43, 0x18, 0x49, 0x0e, 0x68, 0x09, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc9, 0xe0, 0x1c, 0x00, 0x00, 
-       0x2e, 0x08, 0x94, 0x84, 0x2e, 0x08, 0x7c, 0xc0, 
-       0x2e, 0x08, 0x7c, 0x58, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x7d, 0x94, 0xcc, 0x00, 0x00, 0x00, 
-       0x2e, 0x08, 0x7c, 0xbc, 0x3f, 0xff, 0xff, 0xff, 
-       0x2e, 0x08, 0x5e, 0x4c, 0x68, 0x00, 0x04, 0x00, 
-       0x2e, 0x08, 0x94, 0x88, 0x2e, 0x08, 0x7d, 0xb4, 
-       0x2e, 0x08, 0x7d, 0xb8, 0x00, 0x00, 0x04, 0xcc, 
-       0x61, 0x88, 0xe0, 0x2d, 0x26, 0x01, 0x21, 0x00, 
-       0x91, 0x00, 0x48, 0x2b, 0x68, 0x00, 0x68, 0x40, 
-       0x99, 0x00, 0x42, 0x88, 0xd8, 0x04, 0xe0, 0x06, 
-       0x99, 0x00, 0x31, 0x01, 0x91, 0x00, 0xe7, 0xf4, 
-       0x00, 0x70, 0x1c, 0x46, 0xe7, 0xf8, 0x08, 0x76, 
-       0x00, 0x76, 0x48, 0x23, 0x68, 0x00, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x07, 0xc0, 
-       0x0f, 0xc0, 0x49, 0x1f, 0x68, 0x09, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0x48, 0x1c, 
-       0x68, 0x00, 0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc0, 
-       0x69, 0x80, 0x43, 0x30, 0x49, 0x18, 0x68, 0x09, 
-       0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 
-       0x1c, 0x21, 0x48, 0x15, 0x68, 0x00, 0xf0, 0x0a, 
-       0xff, 0xb1, 0x6b, 0x79, 0x48, 0x12, 0x68, 0x00, 
-       0xf0, 0x0a, 0xfe, 0xe6, 0x1c, 0x28, 0x21, 0x00, 
-       0xf0, 0x0b, 0xfa, 0x88, 0x49, 0x0f, 0x20, 0x91, 
-       0xf0, 0x18, 0xfb, 0x80, 0x28, 0x92, 0xd0, 0x00, 
-       0xe7, 0xf8, 0x48, 0x0b, 0x68, 0x00, 0x90, 0x03, 
-       0x48, 0x0b, 0x68, 0x00, 0x49, 0x08, 0x60, 0x08, 
-       0x98, 0x03, 0x49, 0x09, 0x60, 0x08, 0x20, 0x92, 
-       0x49, 0x06, 0x60, 0x08, 0xb0, 0x04, 0x20, 0x92, 
-       0x49, 0x06, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x03, 
-       0xe5, 0x86, 0xb0, 0x03, 0xe5, 0x84, 0x00, 0x00, 
-       0x2e, 0x08, 0x7d, 0xb4, 0x2e, 0x08, 0x94, 0x88, 
-       0x2e, 0x08, 0x7d, 0xb8, 0x2e, 0x08, 0x7c, 0xc0, 
-       0xb5, 0xf3, 0xb0, 0x85, 0x20, 0x00, 0x90, 0x01, 
-       0x9d, 0x05, 0x9f, 0x06, 0x69, 0x28, 0x90, 0x04, 
-       0x69, 0x3c, 0x98, 0x04, 0x28, 0x13, 0xd0, 0x01, 
-       0x2c, 0x13, 0xd1, 0x05, 0x20, 0xff, 0xb0, 0x05, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x68, 0xee, 0x68, 0xf9, 0x91, 0x03, 0x48, 0xdf, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 0x2e, 0x19, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0xe0, 0x04, 0x2e, 0x08, 0xd3, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 0xd0, 0x20, 
-       0x48, 0xd6, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x06, 
-       0x99, 0x03, 0x29, 0x19, 0xd3, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0xe0, 0x05, 0x99, 0x03, 
-       0x29, 0x08, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
-       0x20, 0x00, 0x28, 0x00, 0xd0, 0x06, 0x99, 0x03, 
-       0x60, 0xe9, 0x60, 0xfe, 0x20, 0x00, 0xb0, 0x05, 
-       0xe7, 0xce, 0xe1, 0x92, 0x1c, 0x3d, 0x9f, 0x05, 
-       0x9e, 0x03, 0x68, 0xf9, 0x91, 0x03, 0x9c, 0x04, 
-       0xe0, 0xaa, 0x48, 0xc6, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x06, 0x99, 0x03, 0x29, 0x19, 0xd3, 0x01, 
-       0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0xe0, 0x05, 
-       0x99, 0x03, 0x29, 0x08, 0xd3, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 0xd1, 0x73, 
-       0x49, 0xbd, 0x20, 0x91, 0xf0, 0x18, 0xfa, 0xfe, 
-       0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x0a, 
-       0xfa, 0xe5, 0xe7, 0xf5, 0x00, 0xb0, 0x49, 0xb9, 
-       0x58, 0x08, 0x42, 0xa8, 0xd1, 0x05, 0x99, 0x03, 
-       0x00, 0x88, 0x49, 0xb6, 0x58, 0x08, 0x42, 0xb8, 
-       0xd0, 0x05, 0x20, 0x92, 0x49, 0xb2, 0x60, 0x08, 
-       0x20, 0xff, 0xb0, 0x05, 0xe7, 0x98, 0x48, 0xb2, 
-       0x68, 0x00, 0x42, 0xa8, 0xd0, 0x03, 0x48, 0xb0, 
-       0x68, 0x00, 0x42, 0xb8, 0xd1, 0x0a, 0x20, 0x0d, 
-       0x06, 0xc0, 0x68, 0xc0, 0x90, 0x01, 0x98, 0x01, 
-       0x28, 0x01, 0xd1, 0x03, 0x20, 0x00, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0xc8, 0x99, 0x03, 0x60, 0xe9, 
-       0x60, 0xfe, 0x00, 0xb0, 0x49, 0xa5, 0x50, 0x0f, 
-       0x99, 0x03, 0x00, 0x88, 0x49, 0xa3, 0x50, 0x0d, 
-       0x48, 0xa0, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x55, 
-       0x20, 0x0d, 0x06, 0xc0, 0x68, 0x80, 0x90, 0x02, 
-       0x20, 0x00, 0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 
-       0x20, 0x01, 0x40, 0xb0, 0x99, 0x02, 0x40, 0x08, 
-       0xd1, 0x12, 0x99, 0x03, 0x20, 0x01, 0x40, 0x88, 
-       0x99, 0x02, 0x40, 0x08, 0xd0, 0x0b, 0x99, 0x03, 
-       0x20, 0x01, 0x40, 0x88, 0x43, 0xc0, 0x99, 0x02, 
-       0x40, 0x08, 0x90, 0x02, 0x20, 0x01, 0x40, 0xb0, 
-       0x99, 0x02, 0x43, 0x08, 0x90, 0x02, 0xe0, 0x11, 
-       0x99, 0x03, 0x20, 0x01, 0x40, 0x88, 0x99, 0x02, 
-       0x40, 0x08, 0xd1, 0x0b, 0x20, 0x01, 0x40, 0xb0, 
-       0x43, 0xc0, 0x99, 0x02, 0x40, 0x08, 0x90, 0x02, 
-       0x99, 0x03, 0x20, 0x01, 0x40, 0x88, 0x99, 0x02, 
-       0x43, 0x08, 0x90, 0x02, 0x6b, 0x28, 0xf7, 0xfe, 
-       0xfe, 0xbc, 0x90, 0x00, 0x9a, 0x00, 0xe0, 0x00, 
-       0xe0, 0x22, 0x99, 0x03, 0x1c, 0x28, 0xf0, 0x00, 
-       0xfa, 0x3d, 0x6b, 0x38, 0xf7, 0xfe, 0xfe, 0xb1, 
-       0x90, 0x00, 0x9a, 0x00, 0x1c, 0x31, 0x1c, 0x38, 
-       0xf0, 0x00, 0xfa, 0x34, 0x98, 0x02, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0x88, 0x48, 0x7c, 0x68, 0x00, 
-       0x42, 0xa8, 0xd0, 0x03, 0x48, 0x7a, 0x68, 0x00, 
-       0x42, 0xb8, 0xd1, 0x03, 0x98, 0x01, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0xc8, 0x20, 0x92, 0x49, 0x74, 
-       0x60, 0x08, 0x20, 0x00, 0xb0, 0x05, 0xe7, 0x1b, 
-       0x49, 0x71, 0x20, 0x91, 0xf0, 0x18, 0xfa, 0x66, 
-       0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x0a, 
-       0xfa, 0x4d, 0xe7, 0xf5, 0x00, 0xb0, 0x49, 0x6d, 
-       0x58, 0x08, 0x42, 0xa8, 0xd0, 0x05, 0x20, 0x92, 
-       0x49, 0x69, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x05, 
-       0xe7, 0x06, 0x2c, 0x0b, 0xdb, 0x12, 0x2c, 0x12, 
-       0xdc, 0x10, 0x48, 0x67, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x09, 0x48, 0x65, 0x68, 0x00, 0x42, 0xa8, 
-       0xd0, 0x05, 0x20, 0x92, 0x49, 0x60, 0x60, 0x08, 
-       0x20, 0xff, 0xb0, 0x05, 0xe6, 0xf4, 0x48, 0x60, 
-       0x60, 0x07, 0xe0, 0x08, 0x6b, 0xf8, 0x28, 0x01, 
-       0xd1, 0x05, 0x20, 0x92, 0x49, 0x5a, 0x60, 0x08, 
-       0x20, 0xff, 0xb0, 0x05, 0xe6, 0xe8, 0x48, 0x5a, 
-       0x68, 0x00, 0x42, 0xa8, 0xd1, 0x02, 0x20, 0x00, 
-       0x49, 0x57, 0x60, 0x08, 0x00, 0xb0, 0x49, 0x55, 
-       0x50, 0x0f, 0x99, 0x03, 0x60, 0xe9, 0x60, 0xfe, 
-       0x48, 0x50, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x73, 
-       0x6b, 0x28, 0xf7, 0xfe, 0xfe, 0x4e, 0x90, 0x00, 
-       0x6a, 0xa9, 0x9a, 0x00, 0x48, 0x4f, 0xf0, 0x0b, 
-       0xfa, 0x1d, 0x6b, 0x38, 0xf7, 0xfe, 0xfe, 0x45, 
-       0x90, 0x00, 0x6a, 0xb9, 0x9a, 0x00, 0x48, 0x4b, 
-       0xf0, 0x0b, 0xfa, 0x42, 0x48, 0x48, 0x68, 0x00, 
-       0x42, 0xa8, 0xd1, 0x0f, 0x20, 0x02, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0xc8, 0x2c, 0x0b, 0xdb, 0x01, 
-       0x2c, 0x12, 0xdd, 0x07, 0x21, 0x00, 0x20, 0x02, 
-       0xf0, 0x03, 0xfd, 0xae, 0x48, 0x42, 0x21, 0x0d, 
-       0x06, 0xc9, 0x61, 0x88, 0x2c, 0x0b, 0xdb, 0x42, 
-       0x2c, 0x12, 0xdc, 0x40, 0x98, 0x04, 0x42, 0xa0, 
-       0xd0, 0x2c, 0x20, 0x02, 0x21, 0x0d, 0x06, 0xc9, 
-       0x60, 0xc8, 0x21, 0x00, 0x20, 0x02, 0xf0, 0x03, 
-       0xfd, 0x9b, 0x2c, 0x0f, 0xd0, 0x05, 0x2c, 0x10, 
-       0xd0, 0x03, 0x2c, 0x11, 0xd0, 0x01, 0x2c, 0x0b, 
-       0xd1, 0x03, 0x21, 0x00, 0x20, 0x12, 0xf0, 0x03, 
-       0xfd, 0x8f, 0x2c, 0x0c, 0xd0, 0x01, 0x2c, 0x0f, 
-       0xd1, 0x03, 0x21, 0x00, 0x20, 0x04, 0xf0, 0x03, 
-       0xfd, 0x87, 0x2c, 0x0d, 0xd0, 0x01, 0x2c, 0x10, 
-       0xd1, 0x03, 0x21, 0x00, 0x20, 0x08, 0xf0, 0x03, 
-       0xfd, 0x7f, 0x2c, 0x0e, 0xd0, 0x01, 0x2c, 0x11, 
-       0xd1, 0x03, 0x21, 0x00, 0x20, 0x01, 0xf0, 0x03, 
-       0xfd, 0x77, 0xe0, 0x03, 0x20, 0x00, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0xc8, 0x6a, 0xb8, 0x30, 0x01, 
-       0x05, 0x00, 0x6a, 0xf9, 0x31, 0x01, 0x02, 0x89, 
-       0x43, 0x08, 0x6b, 0x79, 0x31, 0x02, 0x43, 0x08, 
-       0x21, 0x0d, 0x06, 0xc9, 0x61, 0x88, 0x20, 0x0d, 
-       0x06, 0xc0, 0x68, 0x80, 0x90, 0x02, 0x20, 0x00, 
-       0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 0xe0, 0x00, 
-       0xe0, 0x1f, 0x20, 0x01, 0x40, 0xb0, 0x43, 0xc0, 
-       0x99, 0x02, 0x40, 0x08, 0x90, 0x02, 0xf0, 0x00, 
-       0xf9, 0xcf, 0x6b, 0x38, 0xf7, 0xfe, 0xfd, 0xd1, 
-       0x90, 0x00, 0x9a, 0x00, 0x1c, 0x31, 0x1c, 0x38, 
-       0xf0, 0x00, 0xf9, 0x54, 0x98, 0x02, 0x21, 0x0d, 
-       0x06, 0xc9, 0x60, 0x88, 0x2c, 0x0b, 0xdb, 0x08, 
-       0x2c, 0x12, 0xdc, 0x06, 0x98, 0x04, 0x42, 0xa0, 
-       0xd1, 0x03, 0x20, 0x01, 0x21, 0x0d, 0x06, 0xc9, 
-       0x60, 0xc8, 0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 
-       0x20, 0x00, 0xb0, 0x05, 0xe6, 0x3c, 0xb0, 0x05, 
-       0xe6, 0x3a, 0xe6, 0x39, 0x2e, 0x08, 0x94, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc0, 0x2e, 0x08, 0x7c, 0x58, 
-       0x2e, 0x08, 0x7c, 0xbc, 0x2e, 0x08, 0x7d, 0x94, 
-       0x3f, 0xff, 0xff, 0xff, 0xb5, 0xf0, 0x1c, 0x07, 
-       0x00, 0xb8, 0x49, 0x09, 0x58, 0x0c, 0x1c, 0x7d, 
-       0x60, 0xe5, 0x00, 0xa8, 0x49, 0x06, 0x50, 0x0c, 
-       0x6b, 0x20, 0xf7, 0xfe, 0xfd, 0x9a, 0x1c, 0x06, 
-       0x1c, 0x32, 0x1c, 0x29, 0x1c, 0x20, 0xf0, 0x00, 
-       0xf9, 0x1d, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x7c, 0x58, 0xb5, 0xf0, 0x1c, 0x07, 
-       0x00, 0xb8, 0x49, 0x09, 0x58, 0x0c, 0x1e, 0x7d, 
-       0x60, 0xe5, 0x00, 0xa8, 0x49, 0x06, 0x50, 0x0c, 
-       0x6b, 0x20, 0xf7, 0xfe, 0xfd, 0x82, 0x1c, 0x06, 
-       0x1c, 0x32, 0x1c, 0x29, 0x1c, 0x20, 0xf0, 0x00, 
-       0xf9, 0x05, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x7c, 0x58, 0xb5, 0xf3, 0x1c, 0x0f, 
-       0xb0, 0x86, 0x98, 0x06, 0x90, 0x05, 0x98, 0x05, 
-       0x68, 0xc5, 0x48, 0x77, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0x28, 0x00, 0xd0, 0x05, 0x20, 0xff, 0xb0, 0x06, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x98, 0x05, 0x69, 0x00, 0x28, 0x13, 0xd1, 0x02, 
-       0x20, 0xff, 0xb0, 0x06, 0xe7, 0xf4, 0x49, 0x69, 
-       0x20, 0x91, 0xf0, 0x18, 0xf9, 0x23, 0x28, 0x92, 
-       0xd0, 0x03, 0x20, 0x01, 0xf0, 0x0a, 0xf9, 0x0a, 
-       0xe7, 0xf5, 0x00, 0xa8, 0x49, 0x64, 0x58, 0x08, 
-       0x99, 0x05, 0x42, 0x88, 0xd0, 0x05, 0x20, 0x92, 
-       0x49, 0x60, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x06, 
-       0xe7, 0xde, 0x42, 0xbd, 0xd1, 0x05, 0x20, 0x92, 
-       0x49, 0x5c, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x06, 
-       0xe7, 0xd6, 0x20, 0x00, 0x00, 0xa9, 0x4a, 0x5a, 
-       0x50, 0x50, 0x98, 0x05, 0x60, 0xc7, 0x48, 0x59, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x0d, 0x48, 0x54, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x09, 0x99, 0x05, 
-       0x00, 0xb8, 0x4a, 0x53, 0x50, 0x11, 0x20, 0x92, 
-       0x49, 0x50, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x06, 
-       0xe7, 0xbe, 0x20, 0x0d, 0x06, 0xc0, 0x68, 0x80, 
-       0x1c, 0x04, 0x20, 0x00, 0x21, 0x0d, 0x06, 0xc9, 
-       0x60, 0x88, 0x20, 0x00, 0x43, 0xc0, 0x00, 0xe9, 
-       0x4b, 0x4b, 0x18, 0xc9, 0x60, 0x08, 0x20, 0x00, 
-       0x43, 0xc0, 0x00, 0xe9, 0x4b, 0x48, 0x18, 0xc9, 
-       0x60, 0x48, 0x20, 0x00, 0x43, 0xc0, 0x00, 0xe9, 
-       0x4b, 0x45, 0x18, 0xc9, 0x64, 0x08, 0x20, 0x00, 
-       0x43, 0xc0, 0x00, 0xe9, 0x4b, 0x42, 0x18, 0xc9, 
-       0x64, 0x48, 0x20, 0x01, 0x90, 0x01, 0x20, 0x01, 
-       0x40, 0xa8, 0x40, 0x20, 0xd1, 0x01, 0x20, 0x00, 
-       0x90, 0x01, 0x20, 0x01, 0x40, 0xa8, 0x43, 0xc0, 
-       0x40, 0x04, 0x1c, 0x3e, 0x42, 0xbd, 0xd9, 0x23, 
-       0x00, 0xb0, 0x49, 0x37, 0x58, 0x08, 0x28, 0x00, 
-       0xd0, 0x01, 0x36, 0x01, 0xe7, 0xf8, 0x1e, 0x70, 
-       0x90, 0x04, 0x98, 0x04, 0x42, 0xb8, 0xda, 0x04, 
-       0xe0, 0x07, 0x98, 0x04, 0x38, 0x01, 0x90, 0x04, 
-       0xe7, 0xf7, 0x98, 0x04, 0xf7, 0xff, 0xff, 0x32, 
-       0xe7, 0xf7, 0x20, 0xff, 0x40, 0xb8, 0x90, 0x03, 
-       0x20, 0xff, 0x40, 0xb0, 0x43, 0xc0, 0x99, 0x03, 
-       0x40, 0x08, 0x90, 0x03, 0x98, 0x03, 0x00, 0x40, 
-       0x90, 0x03, 0x00, 0x60, 0x90, 0x00, 0xe0, 0x1f, 
-       0x00, 0xb0, 0x49, 0x25, 0x58, 0x08, 0x28, 0x00, 
-       0xd0, 0x01, 0x3e, 0x01, 0xe7, 0xf8, 0x1c, 0x70, 
-       0x90, 0x04, 0x98, 0x04, 0x42, 0xb8, 0xd9, 0x04, 
-       0xe0, 0x07, 0x98, 0x04, 0x30, 0x01, 0x90, 0x04, 
-       0xe7, 0xf7, 0x98, 0x04, 0xf7, 0xff, 0xff, 0x26, 
-       0xe7, 0xf7, 0x20, 0xff, 0x40, 0xb0, 0x90, 0x03, 
-       0x20, 0xff, 0x40, 0xb8, 0x43, 0xc0, 0x99, 0x03, 
-       0x40, 0x08, 0x90, 0x03, 0x08, 0x60, 0x90, 0x00, 
-       0x98, 0x00, 0x99, 0x03, 0x40, 0x08, 0x90, 0x00, 
-       0x98, 0x03, 0x43, 0x84, 0x98, 0x00, 0x43, 0x04, 
-       0x20, 0x01, 0x40, 0xb8, 0x43, 0xc0, 0x40, 0x04, 
-       0x98, 0x01, 0x40, 0xb8, 0x43, 0x04, 0x99, 0x05, 
-       0x00, 0xb8, 0x4a, 0x0d, 0x50, 0x11, 0x98, 0x05, 
-       0x6b, 0x00, 0xf7, 0xfe, 0xfc, 0x92, 0x90, 0x02, 
-       0x9a, 0x02, 0x1c, 0x39, 0x98, 0x05, 0xf0, 0x00, 
-       0xf8, 0x15, 0x20, 0x0d, 0x06, 0xc0, 0x60, 0x84, 
-       0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 0x20, 0x00, 
-       0xb0, 0x06, 0xe7, 0x25, 0xb0, 0x06, 0xe7, 0x23, 
-       0x2e, 0x08, 0x94, 0x84, 0x2e, 0x08, 0x7c, 0xc0, 
-       0x2e, 0x08, 0x7c, 0x58, 0x2e, 0x08, 0x60, 0x84, 
-       0x68, 0x00, 0x04, 0x00, 0xb5, 0xf7, 0x1c, 0x04, 
-       0x1c, 0x0f, 0x01, 0x3d, 0x4b, 0x2f, 0x18, 0xe9, 
-       0x1d, 0xe2, 0x32, 0x0d, 0x20, 0x00, 0x28, 0x03, 
-       0xd3, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
-       0xca, 0x20, 0xc1, 0x20, 0xe7, 0xfa, 0x6a, 0xe3, 
-       0x05, 0x9d, 0x0d, 0xad, 0x00, 0xfe, 0x4b, 0x28, 
-       0x18, 0xf3, 0x60, 0x1d, 0x6b, 0x63, 0x33, 0x01, 
-       0x05, 0x9d, 0x0d, 0xad, 0x00, 0xfe, 0x4b, 0x24, 
-       0x18, 0xf3, 0x60, 0x5d, 0x6a, 0xa5, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x1d, 0x00, 0xfe, 0x4b, 0x20, 
-       0x18, 0xf3, 0x64, 0x1d, 0x9d, 0x02, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x1d, 0x00, 0xfe, 0x4b, 0x1c, 
-       0x18, 0xf3, 0x64, 0x5d, 0x4b, 0x1b, 0x68, 0x1b, 
-       0x2b, 0x01, 0xd1, 0x2a, 0x2f, 0x00, 0xd1, 0x28, 
-       0x4b, 0x17, 0x68, 0x5d, 0x23, 0x8f, 0x00, 0x9b, 
-       0x42, 0x9d, 0xd3, 0x03, 0x23, 0x8f, 0x00, 0x9b, 
-       0x4d, 0x13, 0x60, 0x6b, 0x4b, 0x12, 0x68, 0x1d, 
-       0x4b, 0x13, 0x42, 0x9d, 0xd3, 0x02, 0x4b, 0x12, 
-       0x4d, 0x0f, 0x60, 0x2b, 0x4b, 0x0e, 0x6c, 0x5d, 
-       0x23, 0x01, 0x02, 0x9b, 0x1a, 0xed, 0x23, 0xb3, 
-       0x00, 0x9b, 0x42, 0x9d, 0xd3, 0x02, 0x4b, 0x0d, 
-       0x4d, 0x09, 0x64, 0x6b, 0x4b, 0x08, 0x6c, 0x1d, 
-       0x23, 0x01, 0x02, 0x9b, 0x1a, 0xed, 0x4b, 0x0a, 
-       0x42, 0x9d, 0xd3, 0x02, 0x4b, 0x09, 0x4d, 0x04, 
-       0x64, 0x2b, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x68, 0x00, 0x0c, 0x00, 
-       0x68, 0x00, 0x04, 0x00, 0x2e, 0x08, 0x60, 0x84, 
-       0x00, 0x00, 0x02, 0x3a, 0x00, 0x00, 0x06, 0xcc, 
-       0x00, 0x00, 0x02, 0xca, 0x00, 0x00, 0x06, 0xca, 
-       0xb4, 0xf0, 0x4f, 0x15, 0x4c, 0x15, 0x20, 0x00, 
-       0x21, 0x00, 0x22, 0x00, 0x43, 0xd2, 0x4d, 0x14, 
-       0x68, 0x6d, 0x42, 0x85, 0xdd, 0x1b, 0x1c, 0x05, 
-       0x30, 0x01, 0x00, 0xad, 0x59, 0x7b, 0x42, 0x93, 
-       0xd0, 0xf9, 0x4d, 0x0f, 0x68, 0x6d, 0x42, 0x85, 
-       0xda, 0x00, 0xe0, 0x10, 0x31, 0x01, 0x1c, 0x05, 
-       0x30, 0x01, 0x00, 0xad, 0x59, 0x7a, 0x42, 0x93, 
-       0xd0, 0xf9, 0x02, 0x95, 0x43, 0x1d, 0x1c, 0x2e, 
-       0xc4, 0x40, 0x4d, 0x07, 0x68, 0x6d, 0x42, 0x85, 
-       0xdb, 0x00, 0x31, 0x01, 0xe7, 0xdf, 0x25, 0x0d, 
-       0x06, 0xed, 0x61, 0x29, 0xbc, 0xf0, 0x47, 0x70, 
-       0x2e, 0x08, 0x7c, 0xcc, 0x68, 0x00, 0x0d, 0x40, 
-       0x2e, 0x08, 0x7d, 0x94, 0xb5, 0xf3, 0xb0, 0x82, 
-       0x9d, 0x02, 0x69, 0x2c, 0x2c, 0x13, 0xd1, 0x05, 
-       0x20, 0x75, 0xb0, 0x02, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x68, 0xee, 0x48, 0xf8, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 0x2e, 0x19, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0xe0, 0x04, 0x2e, 0x08, 0xd3, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 0xd0, 0x02, 
-       0x20, 0xff, 0xb0, 0x02, 0xe7, 0xe6, 0x49, 0xef, 
-       0x20, 0x91, 0xf0, 0x17, 0xff, 0x83, 0x28, 0x92, 
-       0xd0, 0x03, 0x20, 0x01, 0xf0, 0x09, 0xff, 0x6a, 
-       0xe7, 0xf5, 0x00, 0xb0, 0x49, 0xea, 0x58, 0x08, 
-       0x99, 0x02, 0x42, 0x88, 0xd0, 0x05, 0x20, 0x92, 
-       0x49, 0xe6, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x02, 
-       0xe7, 0xd0, 0x48, 0xe3, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x16, 0x20, 0x0d, 0x06, 0xc0, 0x68, 0x80, 
-       0x90, 0x01, 0x99, 0x03, 0x29, 0x01, 0xd1, 0x05, 
-       0x20, 0x01, 0x40, 0xb0, 0x99, 0x01, 0x43, 0x08, 
-       0x90, 0x01, 0xe0, 0x05, 0x20, 0x01, 0x40, 0xb0, 
-       0x43, 0xc0, 0x99, 0x01, 0x40, 0x08, 0x90, 0x01, 
-       0x98, 0x01, 0x21, 0x0d, 0x06, 0xc9, 0x60, 0x88, 
-       0x48, 0xd8, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x73, 
-       0x48, 0xd3, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x6f, 
-       0x99, 0x03, 0x29, 0x01, 0xd1, 0x6c, 0xb0, 0x83, 
-       0x1c, 0x30, 0xf0, 0x0a, 0xfe, 0x71, 0x28, 0x01, 
-       0xd1, 0x05, 0x20, 0x92, 0x49, 0xcd, 0x60, 0x08, 
-       0x20, 0x00, 0xb0, 0x05, 0xe7, 0x9e, 0x49, 0xce, 
-       0x20, 0x91, 0xf0, 0x17, 0xff, 0x3b, 0x28, 0x92, 
-       0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0a, 0xfe, 0xbb, 
-       0x2c, 0x0b, 0xdb, 0x01, 0x2c, 0x12, 0xdd, 0x06, 
-       0x48, 0xc8, 0x68, 0x00, 0x68, 0x40, 0x30, 0x01, 
-       0x49, 0xc6, 0x68, 0x09, 0x60, 0x48, 0x20, 0x92, 
-       0x49, 0xc3, 0x60, 0x08, 0x20, 0x01, 0x49, 0xc3, 
-       0x68, 0x09, 0x60, 0x08, 0x2c, 0x0b, 0xdb, 0x11, 
-       0x2c, 0x12, 0xdc, 0x0f, 0x48, 0xbf, 0x68, 0x00, 
-       0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 
-       0x23, 0x01, 0x43, 0x18, 0x49, 0xbb, 0x68, 0x09, 
-       0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 
-       0x27, 0x00, 0xe0, 0xbc, 0x27, 0x00, 0x20, 0x00, 
-       0x90, 0x01, 0x98, 0x01, 0x28, 0x00, 0xd1, 0x15, 
-       0x2f, 0x07, 0xd2, 0x13, 0x6a, 0xe8, 0x05, 0x81, 
-       0x0d, 0x89, 0x1c, 0x38, 0x37, 0x01, 0x00, 0x83, 
-       0x18, 0x18, 0x00, 0xc0, 0x4a, 0xaf, 0x68, 0x12, 
-       0x18, 0x80, 0x23, 0x05, 0x02, 0x1b, 0x18, 0xc0, 
-       0x6f, 0xc0, 0x42, 0x81, 0xda, 0x01, 0x20, 0x01, 
-       0x90, 0x01, 0xe7, 0xe6, 0x98, 0x01, 0x28, 0x00, 
-       0xd1, 0x16, 0x2f, 0x18, 0xd2, 0x14, 0x6a, 0xe8, 
-       0x05, 0x81, 0x0d, 0x89, 0x1c, 0x38, 0x37, 0x01, 
-       0x23, 0x4c, 0x43, 0x58, 0x4a, 0xa3, 0x68, 0x12, 
-       0x18, 0x80, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
-       0x69, 0x40, 0x42, 0x81, 0xda, 0x03, 0xe0, 0x00, 
-       0xe0, 0xb0, 0x20, 0x01, 0x90, 0x01, 0xe7, 0xe5, 
-       0x3f, 0x01, 0x6b, 0x28, 0xf7, 0xfe, 0xfb, 0x01, 
-       0x90, 0x00, 0x2f, 0x07, 0xd2, 0x16, 0x48, 0x99, 
-       0x68, 0x01, 0x1c, 0x38, 0xf0, 0x0a, 0xf9, 0x0a, 
-       0x00, 0xb8, 0x19, 0xc0, 0x00, 0xc0, 0x49, 0x95, 
-       0x68, 0x09, 0x18, 0x40, 0x23, 0x2b, 0x01, 0x5b, 
-       0x18, 0xc0, 0x9a, 0x00, 0x1c, 0x29, 0xf0, 0x0a, 
-       0xfa, 0x5f, 0x48, 0x90, 0x68, 0x00, 0xf0, 0x0a, 
-       0xfe, 0x59, 0xe0, 0x4a, 0x2f, 0x18, 0xd2, 0x48, 
-       0x1f, 0xf8, 0x49, 0x8c, 0x68, 0x09, 0xf0, 0x0a, 
-       0xf9, 0x45, 0x20, 0x4c, 0x43, 0x78, 0x49, 0x89, 
-       0x68, 0x09, 0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 
-       0x38, 0x0a, 0x9a, 0x00, 0x1c, 0x29, 0xf0, 0x0a, 
-       0xfa, 0x47, 0x20, 0x4c, 0x43, 0x78, 0x49, 0x83, 
-       0x68, 0x09, 0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 
-       0x38, 0x82, 0x6f, 0xc0, 0x28, 0x00, 0xd0, 0x17, 
-       0x20, 0x4c, 0x43, 0x78, 0x49, 0x7d, 0x68, 0x09, 
-       0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
-       0x68, 0x00, 0x04, 0x00, 0x0c, 0x00, 0xd0, 0x0b, 
-       0x20, 0x4c, 0x43, 0x78, 0x49, 0x77, 0x68, 0x09, 
-       0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
-       0x68, 0x00, 0x0c, 0x00, 0x04, 0x00, 0xd1, 0x0a, 
-       0x20, 0x02, 0x21, 0x4c, 0x43, 0x79, 0x4a, 0x71, 
-       0x68, 0x12, 0x18, 0x89, 0x39, 0xff, 0x39, 0xff, 
-       0x39, 0x82, 0x67, 0x48, 0xe0, 0x09, 0x20, 0x03, 
-       0x21, 0x4c, 0x43, 0x79, 0x4a, 0x6b, 0x68, 0x12, 
-       0x18, 0x89, 0x39, 0xff, 0x39, 0xff, 0x39, 0x82, 
-       0x67, 0x48, 0x48, 0x68, 0x68, 0x00, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x00, 0x40, 
-       0x90, 0x03, 0x98, 0x03, 0x23, 0x02, 0x43, 0x18, 
-       0x90, 0x03, 0x48, 0x62, 0x68, 0x00, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x07, 0xc0, 
-       0x0f, 0xc0, 0x99, 0x03, 0x18, 0x40, 0x90, 0x03, 
-       0x98, 0x03, 0x49, 0x5c, 0x68, 0x09, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0x1c, 0x39, 
-       0x48, 0x58, 0x68, 0x00, 0xf0, 0x0a, 0xfa, 0x72, 
-       0x2c, 0x0b, 0xdb, 0x01, 0x2c, 0x12, 0xdd, 0x04, 
-       0x6b, 0x69, 0x48, 0x54, 0x68, 0x00, 0xf0, 0x0a, 
-       0xf9, 0x4d, 0x1c, 0x30, 0x21, 0x01, 0xf0, 0x0a, 
-       0xfd, 0x45, 0x49, 0x4f, 0x20, 0x91, 0xf0, 0x17, 
-       0xfe, 0x3d, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
-       0x48, 0x4c, 0x68, 0x00, 0x90, 0x02, 0x48, 0x4c, 
-       0x68, 0x00, 0x49, 0x4a, 0x60, 0x08, 0x98, 0x02, 
-       0x49, 0x49, 0x60, 0x08, 0x20, 0x92, 0x49, 0x46, 
-       0x60, 0x08, 0xb0, 0x03, 0x48, 0x43, 0x68, 0x00, 
-       0x28, 0x01, 0xd1, 0x75, 0x48, 0x3e, 0x68, 0x00, 
-       0x28, 0x01, 0xd1, 0x71, 0x99, 0x03, 0x29, 0x00, 
-       0xd1, 0x6e, 0xb0, 0x85, 0x1c, 0x30, 0xf0, 0x0a, 
-       0xfd, 0x47, 0x28, 0x00, 0xd1, 0x05, 0x20, 0x92, 
-       0x49, 0x38, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x07, 
-       0xe6, 0x74, 0x49, 0x39, 0x20, 0x91, 0xf0, 0x17, 
-       0xfe, 0x11, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
-       0xf0, 0x0a, 0xfd, 0x91, 0x2c, 0x0b, 0xdb, 0x01, 
-       0x2c, 0x12, 0xdd, 0x0b, 0x48, 0x33, 0x68, 0x00, 
-       0x68, 0x40, 0x28, 0x00, 0xd0, 0x06, 0x48, 0x31, 
-       0x68, 0x00, 0x68, 0x40, 0x38, 0x01, 0x49, 0x2f, 
-       0x68, 0x09, 0x60, 0x48, 0x20, 0x92, 0x49, 0x2c, 
-       0x60, 0x08, 0x20, 0x01, 0x49, 0x2b, 0x68, 0x09, 
-       0x60, 0x08, 0x2c, 0x0b, 0xdb, 0x11, 0x2c, 0x12, 
-       0xdc, 0x0f, 0x48, 0x28, 0x68, 0x00, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x08, 0x40, 
-       0x00, 0x40, 0x49, 0x24, 0x68, 0x09, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0x27, 0x00, 
-       0xe0, 0xb2, 0x27, 0x00, 0x20, 0x00, 0x90, 0x03, 
-       0x98, 0x03, 0x28, 0x00, 0xd1, 0x15, 0x2f, 0x07, 
-       0xd2, 0x13, 0x6a, 0xe8, 0x05, 0x81, 0x0d, 0x89, 
-       0x1c, 0x38, 0x37, 0x01, 0x00, 0x83, 0x18, 0x18, 
-       0x00, 0xc0, 0x4a, 0x18, 0x68, 0x12, 0x18, 0x80, 
-       0x23, 0x05, 0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 
-       0x42, 0x81, 0xd1, 0x01, 0x20, 0x01, 0x90, 0x03, 
-       0xe7, 0xe6, 0x98, 0x03, 0x28, 0x00, 0xd1, 0x26, 
-       0x2f, 0x18, 0xd2, 0x24, 0x6a, 0xe8, 0x05, 0x81, 
-       0x0d, 0x89, 0x1c, 0x38, 0x37, 0x01, 0x23, 0x4c, 
-       0x43, 0x58, 0x4a, 0x0c, 0x68, 0x12, 0x18, 0x80, 
-       0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 0xe0, 0x00, 
-       0xe0, 0xa9, 0x69, 0x40, 0x42, 0x81, 0xd1, 0x11, 
-       0x20, 0x01, 0x90, 0x03, 0xe0, 0x0e, 0x00, 0x00, 
-       0x2e, 0x08, 0x94, 0x84, 0x2e, 0x08, 0x7c, 0xc0, 
-       0x2e, 0x08, 0x7c, 0x58, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x94, 0x88, 0x2e, 0x08, 0x7d, 0xb4, 
-       0x2e, 0x08, 0x7d, 0xb8, 0xe7, 0xd5, 0x3f, 0x01, 
-       0x6b, 0x28, 0xf7, 0xfe, 0xf9, 0xc2, 0x90, 0x01, 
-       0x2f, 0x07, 0xd2, 0x09, 0x48, 0x4a, 0x68, 0x01, 
-       0x1c, 0x38, 0xf0, 0x0a, 0xf8, 0x3d, 0x48, 0x48, 
-       0x68, 0x00, 0xf0, 0x0a, 0xfd, 0x27, 0xe0, 0x06, 
-       0x2f, 0x18, 0xd2, 0x04, 0x1f, 0xf8, 0x49, 0x44, 
-       0x68, 0x09, 0xf0, 0x0a, 0xf8, 0x6f, 0x48, 0x42, 
-       0x68, 0x00, 0x4b, 0x42, 0x18, 0xc0, 0xf0, 0x0a, 
-       0xf9, 0x8f, 0x20, 0x00, 0x49, 0x3e, 0x68, 0x09, 
-       0x23, 0x09, 0x01, 0xdb, 0x18, 0xc9, 0x64, 0x88, 
-       0x48, 0x3b, 0x68, 0x00, 0x68, 0x40, 0x28, 0x07, 
-       0xd3, 0x0e, 0x48, 0x39, 0x68, 0x00, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 0x23, 0xfe, 
-       0x43, 0x18, 0x49, 0x35, 0x68, 0x09, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0xe0, 0x33, 
-       0x20, 0x01, 0x90, 0x00, 0x21, 0x00, 0x91, 0x02, 
-       0x48, 0x2f, 0x68, 0x00, 0x68, 0x40, 0x99, 0x02, 
-       0x42, 0x88, 0xd8, 0x04, 0xe0, 0x08, 0x99, 0x02, 
-       0x31, 0x01, 0x91, 0x02, 0xe7, 0xf4, 0x98, 0x00, 
-       0x00, 0x40, 0x30, 0x01, 0x90, 0x00, 0xe7, 0xf6, 
-       0x98, 0x00, 0x08, 0x40, 0x00, 0x40, 0x90, 0x00, 
-       0x48, 0x25, 0x68, 0x00, 0x23, 0x0d, 0x01, 0xdb, 
-       0x18, 0xc0, 0x69, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 
-       0x49, 0x21, 0x68, 0x09, 0x23, 0x0d, 0x01, 0xdb, 
-       0x18, 0xc9, 0x61, 0x88, 0x48, 0x1e, 0x68, 0x00, 
-       0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc0, 0x69, 0x80, 
-       0x99, 0x00, 0x43, 0x08, 0x49, 0x1a, 0x68, 0x09, 
-       0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 
-       0x1c, 0x39, 0x48, 0x17, 0x68, 0x00, 0xf0, 0x0a, 
-       0xf9, 0x4d, 0x2c, 0x0b, 0xdb, 0x01, 0x2c, 0x12, 
-       0xdd, 0x04, 0x6b, 0x69, 0x48, 0x12, 0x68, 0x00, 
-       0xf0, 0x0a, 0xf8, 0x7e, 0x1c, 0x30, 0x21, 0x00, 
-       0xf0, 0x0a, 0xfc, 0x20, 0x49, 0x10, 0x20, 0x91, 
-       0xf0, 0x17, 0xfd, 0x18, 0x28, 0x92, 0xd0, 0x00, 
-       0xe7, 0xf8, 0x48, 0x0b, 0x68, 0x00, 0x90, 0x04, 
-       0x48, 0x0c, 0x68, 0x00, 0x49, 0x08, 0x60, 0x08, 
-       0x98, 0x04, 0x49, 0x0a, 0x60, 0x08, 0x20, 0x92, 
-       0x49, 0x07, 0x60, 0x08, 0xb0, 0x05, 0x20, 0x92, 
-       0x49, 0x07, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x02, 
-       0xe5, 0x60, 0xb0, 0x02, 0xe5, 0x5e, 0x00, 0x00, 
-       0x2e, 0x08, 0x7d, 0xb4, 0x00, 0x00, 0x04, 0xcc, 
-       0x2e, 0x08, 0x94, 0x88, 0x2e, 0x08, 0x7d, 0xb8, 
-       0x2e, 0x08, 0x7c, 0xc0, 0xb5, 0xf3, 0x1c, 0x07, 
-       0x1c, 0x3e, 0x69, 0x30, 0x28, 0x13, 0xd1, 0x04, 
-       0x20, 0x75, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x68, 0xf4, 0x48, 0x1e, 0x68, 0x00, 
-       0x28, 0x00, 0xd0, 0x05, 0x2c, 0x19, 0xd3, 0x01, 
-       0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 
-       0x2c, 0x08, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
-       0x20, 0x00, 0x28, 0x00, 0xd0, 0x01, 0x20, 0xff, 
-       0xe7, 0xe7, 0x49, 0x16, 0x20, 0x91, 0xf0, 0x17, 
-       0xfc, 0xd1, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
-       0xf0, 0x09, 0xfc, 0xb8, 0xe7, 0xf5, 0x00, 0xa0, 
-       0x49, 0x11, 0x58, 0x08, 0x42, 0xb8, 0xd0, 0x04, 
-       0x20, 0x92, 0x49, 0x0e, 0x60, 0x08, 0x20, 0xff, 
-       0xe7, 0xd3, 0x20, 0x0d, 0x06, 0xc0, 0x68, 0x80, 
-       0x1c, 0x05, 0x20, 0x01, 0x40, 0xa0, 0x40, 0x05, 
-       0x2d, 0x00, 0xd1, 0x03, 0x20, 0x00, 0x99, 0x01, 
-       0x60, 0x08, 0xe0, 0x02, 0x20, 0x01, 0x99, 0x01, 
-       0x60, 0x08, 0x20, 0x92, 0x49, 0x03, 0x60, 0x08, 
-       0x20, 0x00, 0xe7, 0xbe, 0xe7, 0xbd, 0x00, 0x00, 
-       0x2e, 0x08, 0x94, 0x84, 0x2e, 0x08, 0x7c, 0xc0, 
-       0x2e, 0x08, 0x7c, 0x58, 0xb5, 0xf3, 0x1c, 0x07, 
-       0xb0, 0x81, 0x1c, 0x3c, 0x68, 0xe5, 0x69, 0x60, 
-       0x4b, 0x49, 0x40, 0x18, 0x99, 0x02, 0x07, 0x89, 
-       0x0f, 0x89, 0x02, 0x09, 0x43, 0x08, 0x61, 0x60, 
-       0x05, 0x80, 0x48, 0x46, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0x28, 0x00, 0xd0, 0x05, 0x20, 0x00, 0xb0, 0x01, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x49, 0x3b, 0x20, 0x91, 0xf0, 0x17, 0xfc, 0x7a, 
-       0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x09, 
-       0xfc, 0x61, 0xe7, 0xf5, 0x00, 0xa8, 0x49, 0x37, 
-       0x58, 0x08, 0x42, 0xb8, 0xd0, 0x05, 0x20, 0x92, 
-       0x49, 0x33, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x01, 
-       0xe7, 0xe6, 0x48, 0x30, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0x69, 0x20, 0x28, 0x0b, 0xdb, 0x0c, 
-       0x69, 0x20, 0x28, 0x12, 0xdc, 0x09, 0x01, 0x28, 
-       0x4b, 0x2d, 0x18, 0xc1, 0x91, 0x00, 0x1d, 0xe6, 
-       0x36, 0x0d, 0x68, 0x30, 0x99, 0x00, 0x60, 0x08, 
-       0xe0, 0x41, 0x48, 0x26, 0x68, 0x00, 0x28, 0x01, 
-       0xd1, 0x3d, 0x48, 0x28, 0x68, 0x00, 0x28, 0x01, 
-       0xd1, 0x39, 0xb0, 0x82, 0x1c, 0x28, 0xf0, 0x0a, 
-       0xfb, 0x73, 0x28, 0x00, 0xd1, 0x05, 0x20, 0x92, 
-       0x49, 0x1f, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x03, 
-       0xe7, 0xbe, 0x49, 0x21, 0x20, 0x91, 0xf0, 0x17, 
-       0xfc, 0x3d, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
-       0xf0, 0x0a, 0xfb, 0xbd, 0x20, 0x92, 0x49, 0x1c, 
-       0x60, 0x08, 0x20, 0x01, 0x49, 0x1b, 0x68, 0x09, 
-       0x60, 0x08, 0x48, 0x1a, 0x68, 0x01, 0x1c, 0x20, 
-       0xf0, 0x0a, 0xfb, 0x6e, 0x90, 0x00, 0x69, 0x60, 
-       0x99, 0x00, 0x60, 0xc8, 0x49, 0x14, 0x20, 0x91, 
-       0xf0, 0x17, 0xfc, 0x24, 0x28, 0x92, 0xd0, 0x00, 
-       0xe7, 0xf8, 0x48, 0x12, 0x68, 0x00, 0x90, 0x01, 
-       0x48, 0x11, 0x68, 0x00, 0x49, 0x0f, 0x60, 0x08, 
-       0x98, 0x01, 0x49, 0x0f, 0x60, 0x08, 0x20, 0x92, 
-       0x49, 0x0b, 0x60, 0x08, 0xb0, 0x02, 0x20, 0x92, 
-       0x49, 0x05, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x01, 
-       0xe7, 0x8a, 0xb0, 0x01, 0xe7, 0x88, 0x00, 0x00, 
-       0xff, 0xff, 0xfc, 0xff, 0x2e, 0x08, 0x94, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc0, 0x2e, 0x08, 0x7c, 0x58, 
-       0x68, 0x00, 0x0c, 0x00, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x94, 0x88, 0x2e, 0x08, 0x7d, 0xb4, 
-       0x2e, 0x08, 0x7d, 0xb8, 0xb5, 0xf3, 0x1c, 0x07, 
-       0xb0, 0x81, 0x1c, 0x3c, 0x68, 0xe5, 0x69, 0x60, 
-       0x4b, 0x49, 0x40, 0x18, 0x99, 0x02, 0x07, 0x09, 
-       0x0f, 0x09, 0x02, 0x89, 0x43, 0x08, 0x61, 0x60, 
-       0x04, 0x80, 0x48, 0x46, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0x28, 0x00, 0xd0, 0x05, 0x20, 0x00, 0xb0, 0x01, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x49, 0x3b, 0x20, 0x91, 0xf0, 0x17, 0xfb, 0xce, 
-       0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x09, 
-       0xfb, 0xb5, 0xe7, 0xf5, 0x00, 0xa8, 0x49, 0x37, 
-       0x58, 0x08, 0x42, 0xb8, 0xd0, 0x05, 0x20, 0x92, 
-       0x49, 0x33, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x01, 
-       0xe7, 0xe6, 0x48, 0x30, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0x69, 0x20, 0x28, 0x0b, 0xdb, 0x0c, 
-       0x69, 0x20, 0x28, 0x12, 0xdc, 0x09, 0x01, 0x28, 
-       0x4b, 0x2d, 0x18, 0xc6, 0x1d, 0xe0, 0x30, 0x0d, 
-       0x90, 0x00, 0x98, 0x00, 0x68, 0x00, 0x60, 0x30, 
-       0xe0, 0x41, 0x48, 0x26, 0x68, 0x00, 0x28, 0x01, 
-       0xd1, 0x3d, 0x48, 0x28, 0x68, 0x00, 0x28, 0x01, 
-       0xd1, 0x39, 0xb0, 0x82, 0x1c, 0x28, 0xf0, 0x0a, 
-       0xfa, 0xc7, 0x28, 0x00, 0xd1, 0x05, 0x20, 0x92, 
-       0x49, 0x1f, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x03, 
-       0xe7, 0xbe, 0x49, 0x21, 0x20, 0x91, 0xf0, 0x17, 
-       0xfb, 0x91, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
-       0xf0, 0x0a, 0xfb, 0x11, 0x20, 0x92, 0x49, 0x1c, 
-       0x60, 0x08, 0x20, 0x01, 0x49, 0x1b, 0x68, 0x09, 
-       0x60, 0x08, 0x48, 0x1a, 0x68, 0x01, 0x1c, 0x20, 
-       0xf0, 0x0a, 0xfa, 0xc2, 0x90, 0x00, 0x69, 0x60, 
-       0x99, 0x00, 0x60, 0xc8, 0x49, 0x14, 0x20, 0x91, 
-       0xf0, 0x17, 0xfb, 0x78, 0x28, 0x92, 0xd0, 0x00, 
-       0xe7, 0xf8, 0x48, 0x12, 0x68, 0x00, 0x90, 0x01, 
-       0x48, 0x11, 0x68, 0x00, 0x49, 0x0f, 0x60, 0x08, 
-       0x98, 0x01, 0x49, 0x0f, 0x60, 0x08, 0x20, 0x92, 
-       0x49, 0x0b, 0x60, 0x08, 0xb0, 0x02, 0x20, 0x92, 
-       0x49, 0x05, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x01, 
-       0xe7, 0x8a, 0xb0, 0x01, 0xe7, 0x88, 0x00, 0x00, 
-       0xff, 0xff, 0xc3, 0xff, 0x2e, 0x08, 0x94, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc0, 0x2e, 0x08, 0x7c, 0x58, 
-       0x68, 0x00, 0x0c, 0x00, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x94, 0x88, 0x2e, 0x08, 0x7d, 0xb4, 
-       0x2e, 0x08, 0x7d, 0xb8, 0xb5, 0xf3, 0x1c, 0x07, 
-       0xb0, 0x82, 0x1c, 0x3c, 0x68, 0xe5, 0x26, 0x00, 
-       0x99, 0x03, 0x29, 0x01, 0xd1, 0x00, 0x26, 0x01, 
-       0x69, 0x60, 0x06, 0x80, 0x0f, 0xc0, 0x42, 0xb0, 
-       0xd1, 0x05, 0x20, 0x00, 0xb0, 0x02, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x69, 0x60, 
-       0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 0x07, 0xf1, 
-       0x0e, 0x89, 0x43, 0x08, 0x61, 0x60, 0x06, 0x80, 
-       0x48, 0x44, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 
-       0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
-       0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 0xd3, 0x01, 
-       0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 
-       0xd0, 0x02, 0x20, 0x00, 0xb0, 0x02, 0xe7, 0xde, 
-       0x49, 0x3b, 0x20, 0x91, 0xf0, 0x17, 0xfb, 0x16, 
-       0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x09, 
-       0xfa, 0xfd, 0xe7, 0xf5, 0x00, 0xa8, 0x49, 0x37, 
-       0x58, 0x08, 0x42, 0xb8, 0xd0, 0x05, 0x20, 0x92, 
-       0x49, 0x33, 0x60, 0x08, 0x20, 0xff, 0xb0, 0x02, 
-       0xe7, 0xc9, 0x48, 0x30, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0x69, 0x20, 0x28, 0x0b, 0xdb, 0x0e, 
-       0x69, 0x20, 0x28, 0x12, 0xdc, 0x0b, 0x01, 0x28, 
-       0x4b, 0x2d, 0x18, 0xc1, 0x91, 0x01, 0x1d, 0xe0, 
-       0x30, 0x0d, 0x90, 0x00, 0x98, 0x00, 0x68, 0x00, 
-       0x99, 0x01, 0x60, 0x08, 0xe0, 0x41, 0x48, 0x25, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x3d, 0x48, 0x27, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x39, 0xb0, 0x82, 
-       0x1c, 0x28, 0xf0, 0x0a, 0xfa, 0x0d, 0x28, 0x00, 
-       0xd1, 0x05, 0x20, 0x92, 0x49, 0x1e, 0x60, 0x08, 
-       0x20, 0x00, 0xb0, 0x04, 0xe7, 0x9f, 0x49, 0x20, 
-       0x20, 0x91, 0xf0, 0x17, 0xfa, 0xd7, 0x28, 0x92, 
-       0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0a, 0xfa, 0x57, 
-       0x20, 0x92, 0x49, 0x1b, 0x60, 0x08, 0x20, 0x01, 
-       0x49, 0x1a, 0x68, 0x09, 0x60, 0x08, 0x48, 0x19, 
-       0x68, 0x01, 0x1c, 0x20, 0xf0, 0x0a, 0xfa, 0x08, 
-       0x90, 0x00, 0x69, 0x60, 0x99, 0x00, 0x60, 0xc8, 
-       0x49, 0x13, 0x20, 0x91, 0xf0, 0x17, 0xfa, 0xbe, 
-       0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0x48, 0x11, 
-       0x68, 0x00, 0x90, 0x01, 0x48, 0x10, 0x68, 0x00, 
-       0x49, 0x0e, 0x60, 0x08, 0x98, 0x01, 0x49, 0x0e, 
-       0x60, 0x08, 0x20, 0x92, 0x49, 0x0a, 0x60, 0x08, 
-       0xb0, 0x02, 0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 
-       0x20, 0x00, 0xb0, 0x02, 0xe7, 0x6b, 0xb0, 0x02, 
-       0xe7, 0x69, 0x00, 0x00, 0x2e, 0x08, 0x94, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc0, 0x2e, 0x08, 0x7c, 0x58, 
-       0x68, 0x00, 0x0c, 0x00, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x94, 0x88, 0x2e, 0x08, 0x7d, 0xb4, 
-       0x2e, 0x08, 0x7d, 0xb8, 0xb5, 0xf0, 0x1c, 0x04, 
-       0x1c, 0x0f, 0xb0, 0x83, 0x1c, 0x25, 0x69, 0x28, 
-       0x28, 0x13, 0xd1, 0x04, 0x20, 0x75, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x68, 0xee, 
-       0x20, 0x04, 0x40, 0x38, 0x08, 0x81, 0x91, 0x02, 
-       0x69, 0x68, 0x23, 0xc0, 0x43, 0xdb, 0x40, 0x18, 
-       0x07, 0xb9, 0x0f, 0x89, 0x01, 0x89, 0x43, 0x08, 
-       0x61, 0x68, 0x06, 0x00, 0x69, 0x68, 0x4b, 0x48, 
-       0x40, 0x18, 0x99, 0x02, 0x07, 0xc9, 0x0c, 0x49, 
-       0x43, 0x08, 0x61, 0x68, 0x04, 0x40, 0x48, 0x45, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 0x2e, 0x19, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0xe0, 0x04, 0x2e, 0x08, 0xd3, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0x28, 0x00, 0xd0, 0x02, 
-       0x20, 0x00, 0xb0, 0x03, 0xe7, 0xd0, 0x49, 0x3c, 
-       0x20, 0x91, 0xf0, 0x17, 0xfa, 0x57, 0x28, 0x92, 
-       0xd0, 0x03, 0x20, 0x01, 0xf0, 0x09, 0xfa, 0x3e, 
-       0xe7, 0xf5, 0x00, 0xb0, 0x49, 0x37, 0x58, 0x08, 
-       0x42, 0xa0, 0xd0, 0x05, 0x20, 0x92, 0x49, 0x34, 
-       0x60, 0x08, 0x20, 0xff, 0xb0, 0x03, 0xe7, 0xbb, 
-       0x48, 0x30, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 
-       0x69, 0x28, 0x28, 0x0b, 0xdb, 0x0e, 0x69, 0x28, 
-       0x28, 0x12, 0xdc, 0x0b, 0x01, 0x30, 0x4b, 0x2e, 
-       0x18, 0xc0, 0x90, 0x01, 0x1d, 0xe8, 0x30, 0x0d, 
-       0x90, 0x00, 0x98, 0x00, 0x68, 0x00, 0x99, 0x01, 
-       0x60, 0x08, 0xe0, 0x41, 0x48, 0x25, 0x68, 0x00, 
-       0x28, 0x01, 0xd1, 0x3d, 0x48, 0x27, 0x68, 0x00, 
-       0x28, 0x01, 0xd1, 0x39, 0xb0, 0x82, 0x1c, 0x30, 
-       0xf0, 0x0a, 0xf9, 0x4e, 0x28, 0x00, 0xd1, 0x05, 
-       0x20, 0x92, 0x49, 0x1f, 0x60, 0x08, 0x20, 0x00, 
-       0xb0, 0x05, 0xe7, 0x91, 0x49, 0x20, 0x20, 0x91, 
-       0xf0, 0x17, 0xfa, 0x18, 0x28, 0x92, 0xd0, 0x00, 
-       0xe7, 0xf8, 0xf0, 0x0a, 0xf9, 0x98, 0x20, 0x92, 
-       0x49, 0x1b, 0x60, 0x08, 0x20, 0x01, 0x49, 0x1b, 
-       0x68, 0x09, 0x60, 0x08, 0x48, 0x19, 0x68, 0x01, 
-       0x1c, 0x28, 0xf0, 0x0a, 0xf9, 0x49, 0x90, 0x00, 
-       0x69, 0x68, 0x99, 0x00, 0x60, 0xc8, 0x49, 0x14, 
-       0x20, 0x91, 0xf0, 0x17, 0xf9, 0xff, 0x28, 0x92, 
-       0xd0, 0x00, 0xe7, 0xf8, 0x48, 0x11, 0x68, 0x00, 
-       0x90, 0x01, 0x48, 0x11, 0x68, 0x00, 0x49, 0x0f, 
-       0x60, 0x08, 0x98, 0x01, 0x49, 0x0e, 0x60, 0x08, 
-       0x20, 0x92, 0x49, 0x0b, 0x60, 0x08, 0xb0, 0x02, 
-       0x20, 0x92, 0x49, 0x05, 0x60, 0x08, 0x20, 0x00, 
-       0xb0, 0x03, 0xe7, 0x5d, 0xb0, 0x03, 0xe7, 0x5b, 
-       0xff, 0xff, 0xbf, 0xff, 0x2e, 0x08, 0x94, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc0, 0x2e, 0x08, 0x7c, 0x58, 
-       0x68, 0x00, 0x0c, 0x00, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x94, 0x88, 0x2e, 0x08, 0x7d, 0xb4, 
-       0x2e, 0x08, 0x7d, 0xb8, 0x1c, 0x01, 0x20, 0x0d, 
-       0x06, 0xc0, 0x60, 0x41, 0x48, 0x02, 0x63, 0x81, 
-       0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0x00, 0x00, 
-       0x68, 0x00, 0x0d, 0x00, 0x20, 0x0d, 0x06, 0xc0, 
-       0x68, 0x40, 0x02, 0x00, 0x0a, 0x00, 0x47, 0x70, 
-       0xe7, 0xfd, 0x1c, 0x01, 0x1c, 0x0a, 0x68, 0xd0, 
-       0x47, 0x70, 0xe7, 0xfd, 0x1c, 0x03, 0x1c, 0x0a, 
-       0x1c, 0x19, 0x69, 0x08, 0x28, 0x13, 0xd1, 0x01, 
-       0x20, 0x75, 0x47, 0x70, 0x69, 0x08, 0x28, 0x0b, 
-       0xdb, 0x0b, 0x69, 0x08, 0x28, 0x12, 0xdc, 0x08, 
-       0x6d, 0x08, 0x60, 0x10, 0x6d, 0x88, 0x60, 0x90, 
-       0x6d, 0x48, 0x60, 0x50, 0x6d, 0xc8, 0x60, 0xd0, 
-       0xe0, 0x07, 0x6a, 0x88, 0x60, 0x10, 0x6b, 0x08, 
-       0x60, 0x90, 0x6a, 0xc8, 0x60, 0x50, 0x6b, 0x48, 
-       0x60, 0xd0, 0x20, 0x00, 0xe7, 0xe5, 0xe7, 0xe4, 
-       0x1c, 0x03, 0x1c, 0x0a, 0x68, 0x10, 0x60, 0x18, 
-       0x68, 0x90, 0x60, 0x98, 0x68, 0x50, 0x60, 0x58, 
-       0x68, 0xd0, 0x60, 0xd8, 0x47, 0x70, 0xe7, 0xfd, 
-       0x1c, 0x01, 0x1c, 0x0a, 0x69, 0x50, 0x05, 0x80, 
-       0x0f, 0x80, 0x47, 0x70, 0xe7, 0xfd, 0x1c, 0x01, 
-       0x1c, 0x0a, 0x69, 0x50, 0x12, 0x80, 0x07, 0x00, 
-       0x0f, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0xb4, 0x80, 
-       0x1c, 0x01, 0x1c, 0x0f, 0x22, 0x01, 0x69, 0x78, 
-       0x23, 0x20, 0x40, 0x18, 0xd1, 0x00, 0x22, 0x00, 
-       0x1c, 0x10, 0xbc, 0x80, 0x47, 0x70, 0xe7, 0xfc, 
-       0x1c, 0x01, 0x1c, 0x0b, 0x69, 0x18, 0x28, 0x13, 
-       0xd1, 0x01, 0x20, 0x75, 0x47, 0x70, 0x69, 0x58, 
-       0x06, 0x00, 0x0f, 0x82, 0x69, 0x58, 0x04, 0x40, 
-       0x0f, 0xc0, 0x00, 0x80, 0x43, 0x02, 0x1c, 0x10, 
-       0xe7, 0xf4, 0xe7, 0xf3, 0x1c, 0x01, 0x20, 0x0d, 
-       0x06, 0xc0, 0x61, 0x41, 0x20, 0x00, 0x47, 0x70, 
-       0xe7, 0xfd, 0x20, 0x0d, 0x06, 0xc0, 0x69, 0x40, 
-       0x1c, 0x01, 0x1c, 0x08, 0x47, 0x70, 0xe7, 0xfd, 
-       0x1c, 0x01, 0x22, 0x00, 0x29, 0x01, 0xd1, 0x00, 
-       0x22, 0x01, 0x20, 0x0d, 0x06, 0xc0, 0x68, 0xc0, 
-       0x1c, 0x03, 0x2b, 0x02, 0xd1, 0x01, 0x29, 0x00, 
-       0xd1, 0x02, 0x20, 0x0d, 0x06, 0xc0, 0x60, 0xc2, 
-       0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0x21, 0x01, 
-       0x20, 0x0d, 0x06, 0xc0, 0x68, 0xc0, 0x1c, 0x02, 
-       0x2a, 0x00, 0xd1, 0x00, 0x21, 0x00, 0x1c, 0x08, 
-       0x47, 0x70, 0xe7, 0xfd, 0x1c, 0x01, 0x1c, 0x0a, 
-       0x69, 0x10, 0x47, 0x70, 0xe7, 0xfd, 0xb4, 0x90, 
-       0x1c, 0x07, 0x1c, 0x0a, 0x1c, 0x39, 0x69, 0x08, 
-       0x28, 0x13, 0xd0, 0x05, 0x69, 0x08, 0x28, 0x0b, 
-       0xdb, 0x05, 0x69, 0x08, 0x28, 0x12, 0xdc, 0x02, 
-       0x20, 0x86, 0xbc, 0x90, 0x47, 0x70, 0x6b, 0x8c, 
-       0x69, 0x48, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x00, 
-       0x08, 0x64, 0x69, 0x08, 0x00, 0x80, 0x4b, 0x03, 
-       0x58, 0x18, 0x43, 0x60, 0x60, 0x10, 0x20, 0x00, 
-       0xe7, 0xef, 0xe7, 0xee, 0x2e, 0x03, 0x3a, 0x54, 
-       0xb5, 0xf3, 0x1c, 0x07, 0xb0, 0x81, 0x9c, 0x02, 
-       0x69, 0x20, 0x28, 0x13, 0xd0, 0x05, 0x69, 0x20, 
-       0x28, 0x0b, 0xdb, 0x08, 0x69, 0x20, 0x28, 0x12, 
-       0xdc, 0x05, 0x20, 0x86, 0xb0, 0x01, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x68, 0xe5, 
-       0x68, 0x38, 0x64, 0x20, 0x68, 0x7e, 0x64, 0x66, 
-       0x08, 0xb6, 0x61, 0xa6, 0x48, 0x3f, 0x68, 0x00, 
-       0x28, 0x00, 0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 
-       0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 
-       0x2d, 0x08, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
-       0x20, 0x00, 0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 
-       0xb0, 0x01, 0xe7, 0xe0, 0x49, 0x36, 0x20, 0x91, 
-       0xf0, 0x17, 0xf8, 0xdc, 0x28, 0x92, 0xd0, 0x03, 
-       0x20, 0x01, 0xf0, 0x09, 0xf8, 0xc3, 0xe7, 0xf5, 
-       0x00, 0xa8, 0x49, 0x32, 0x58, 0x08, 0x99, 0x02, 
-       0x42, 0x88, 0xd0, 0x05, 0x20, 0x92, 0x49, 0x2e, 
-       0x60, 0x08, 0x20, 0x86, 0xb0, 0x01, 0xe7, 0xca, 
-       0x48, 0x2a, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x06, 
-       0x01, 0x28, 0x4b, 0x2b, 0x18, 0xc0, 0x90, 0x00, 
-       0x98, 0x00, 0x60, 0x06, 0xe0, 0x41, 0x48, 0x25, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x3d, 0x48, 0x27, 
-       0x68, 0x00, 0x28, 0x01, 0xd1, 0x39, 0xb0, 0x82, 
-       0x1c, 0x28, 0xf0, 0x09, 0xff, 0xdd, 0x28, 0x00, 
-       0xd1, 0x05, 0x20, 0x92, 0x49, 0x1e, 0x60, 0x08, 
-       0x20, 0x00, 0xb0, 0x03, 0xe7, 0xab, 0x49, 0x20, 
-       0x20, 0x91, 0xf0, 0x17, 0xf8, 0xa7, 0x28, 0x92, 
-       0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x0a, 0xf8, 0x27, 
-       0x20, 0x92, 0x49, 0x1b, 0x60, 0x08, 0x20, 0x01, 
-       0x49, 0x1a, 0x68, 0x09, 0x60, 0x08, 0x48, 0x19, 
-       0x68, 0x01, 0x1c, 0x20, 0xf0, 0x09, 0xff, 0xd8, 
-       0x90, 0x00, 0x69, 0xa0, 0x99, 0x00, 0x61, 0x08, 
-       0x49, 0x13, 0x20, 0x91, 0xf0, 0x17, 0xf8, 0x8e, 
-       0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0x48, 0x11, 
-       0x68, 0x00, 0x90, 0x01, 0x48, 0x10, 0x68, 0x00, 
-       0x49, 0x0e, 0x60, 0x08, 0x98, 0x01, 0x49, 0x0e, 
-       0x60, 0x08, 0x20, 0x92, 0x49, 0x0a, 0x60, 0x08, 
-       0xb0, 0x02, 0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 
-       0x20, 0x00, 0xb0, 0x01, 0xe7, 0x77, 0xb0, 0x01, 
-       0xe7, 0x75, 0x00, 0x00, 0x2e, 0x08, 0x94, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc0, 0x2e, 0x08, 0x7c, 0x58, 
-       0x68, 0x00, 0x0c, 0x04, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x94, 0x88, 0x2e, 0x08, 0x7d, 0xb4, 
-       0x2e, 0x08, 0x7d, 0xb8, 0xb4, 0x80, 0x1c, 0x01, 
-       0x06, 0x0b, 0x0e, 0x1b, 0x22, 0x01, 0x2a, 0x19, 
-       0xd3, 0x02, 0xe0, 0x0f, 0x32, 0x01, 0xe7, 0xfa, 
-       0x00, 0x90, 0x4f, 0x08, 0x58, 0x38, 0x68, 0x80, 
-       0x02, 0x00, 0x0e, 0x00, 0x42, 0x98, 0xd1, 0x04, 
-       0x00, 0x90, 0x4f, 0x04, 0x58, 0x38, 0xbc, 0x80, 
-       0x47, 0x70, 0xe7, 0xef, 0x20, 0x00, 0xe7, 0xfa, 
-       0xe7, 0xf9, 0x00, 0x00, 0x2e, 0x08, 0x7c, 0x58, 
-       0xb4, 0x90, 0x1c, 0x07, 0x1c, 0x0a, 0x06, 0x38, 
-       0x16, 0x01, 0x48, 0x20, 0x60, 0x02, 0x48, 0x20, 
-       0x68, 0x80, 0x23, 0x33, 0x06, 0x5b, 0x65, 0xd8, 
-       0x48, 0x1d, 0x68, 0xc0, 0x23, 0x33, 0x06, 0x5b, 
-       0x66, 0x18, 0x48, 0x1c, 0x4b, 0x1a, 0x60, 0x98, 
-       0x48, 0x1b, 0x4b, 0x19, 0x60, 0xd8, 0x20, 0x01, 
-       0x23, 0x33, 0x06, 0x5b, 0x66, 0xd8, 0x48, 0x19, 
-       0x68, 0x04, 0x23, 0x01, 0x04, 0xdb, 0x43, 0x23, 
-       0x60, 0x03, 0x48, 0x16, 0x68, 0x04, 0x23, 0x01, 
-       0x04, 0xdb, 0x43, 0x9c, 0x1c, 0x23, 0x60, 0x03, 
-       0x29, 0x00, 0xd1, 0x10, 0x20, 0xff, 0x30, 0x14, 
-       0x23, 0x1b, 0x06, 0x9b, 0x62, 0x18, 0x48, 0x10, 
-       0x68, 0x04, 0x23, 0xff, 0x33, 0x01, 0x43, 0x9c, 
-       0x1c, 0x23, 0x60, 0x03, 0x48, 0x0d, 0x23, 0x1b, 
-       0x06, 0x9b, 0x64, 0x18, 0xe0, 0x08, 0x20, 0xff, 
-       0x30, 0x14, 0x23, 0x1b, 0x06, 0x9b, 0x62, 0x18, 
-       0x48, 0x02, 0x68, 0x00, 0x4b, 0x08, 0x60, 0x18, 
-       0xbc, 0x90, 0x47, 0x70, 0x2e, 0x08, 0x5e, 0x50, 
-       0x2e, 0x08, 0x7c, 0x1c, 0xcc, 0x1f, 0xe0, 0x00, 
-       0xcc, 0x1f, 0xfe, 0x00, 0x6c, 0x00, 0x00, 0x40, 
-       0x6c, 0x00, 0x00, 0x20, 0x00, 0x00, 0x82, 0x18, 
-       0x6c, 0x00, 0x00, 0x80, 0xb4, 0xf0, 0x1c, 0x01, 
-       0xb0, 0x82, 0x23, 0x1b, 0x06, 0x9b, 0x6a, 0x1b, 
-       0x1c, 0x18, 0x27, 0x00, 0x22, 0x00, 0x08, 0x40, 
-       0x00, 0x40, 0x4b, 0xaf, 0x68, 0x1c, 0x08, 0x64, 
-       0x00, 0x64, 0x60, 0x1c, 0x4b, 0xad, 0x68, 0x1b, 
-       0x1c, 0x1d, 0x23, 0x1b, 0x06, 0x9b, 0x6c, 0x1b, 
-       0x93, 0x01, 0x23, 0xff, 0x33, 0x01, 0x40, 0x03, 
-       0xd0, 0x00, 0x22, 0xff, 0x23, 0x01, 0x04, 0x9b, 
-       0x40, 0x03, 0xd0, 0x1b, 0x4c, 0xa4, 0x68, 0x26, 
-       0x23, 0x01, 0x04, 0x9b, 0x43, 0x9e, 0x1c, 0x33, 
-       0x60, 0x23, 0x4c, 0xa1, 0x68, 0x26, 0x23, 0x01, 
-       0x43, 0x33, 0x60, 0x23, 0x23, 0x00, 0x93, 0x00, 
-       0x9b, 0x00, 0x2b, 0x0a, 0xdb, 0x04, 0xe0, 0x04, 
-       0x9b, 0x00, 0x33, 0x01, 0x93, 0x00, 0xe7, 0xf7, 
-       0xe7, 0xfa, 0x4b, 0x99, 0x68, 0x1c, 0x08, 0x64, 
-       0x00, 0x64, 0x60, 0x1c, 0x23, 0x01, 0x02, 0x9b, 
-       0x40, 0x0b, 0xd0, 0x29, 0x23, 0x01, 0x02, 0xdb, 
-       0x40, 0x0b, 0xd0, 0x01, 0x4b, 0x94, 0x40, 0x18, 
-       0x23, 0x01, 0x03, 0x1b, 0x40, 0x0b, 0xd0, 0x02, 
-       0x23, 0x01, 0x05, 0x9b, 0x43, 0x18, 0x4b, 0x91, 
-       0x40, 0x18, 0x02, 0x4c, 0x23, 0x7f, 0x02, 0x5b, 
-       0x40, 0x23, 0x43, 0x18, 0x23, 0x40, 0x40, 0x0b, 
-       0xd0, 0x03, 0x23, 0x01, 0x04, 0x5b, 0x43, 0x18, 
-       0xe0, 0x0a, 0x4b, 0x8b, 0x40, 0x18, 0x23, 0x20, 
-       0x40, 0x0b, 0xd0, 0x03, 0x23, 0x01, 0x04, 0x1b, 
-       0x43, 0x18, 0xe0, 0x01, 0x4b, 0x87, 0x40, 0x18, 
-       0x23, 0x1b, 0x06, 0x9b, 0x62, 0x18, 0xe0, 0xfc, 
-       0x23, 0x04, 0x40, 0x0b, 0xd0, 0x0f, 0x4c, 0x7e, 
-       0x68, 0x26, 0x23, 0x01, 0x43, 0x33, 0x60, 0x23, 
-       0x4b, 0x81, 0x68, 0x9b, 0x24, 0x33, 0x06, 0x64, 
-       0x65, 0xe3, 0x4b, 0x7f, 0x68, 0xdb, 0x24, 0x33, 
-       0x06, 0x64, 0x66, 0x23, 0xe0, 0xe9, 0x23, 0x01, 
-       0x03, 0x5b, 0x40, 0x0b, 0xd0, 0x13, 0x4b, 0x7a, 
-       0x68, 0x9b, 0x24, 0x33, 0x06, 0x64, 0x65, 0xe3, 
-       0x4b, 0x77, 0x68, 0xdb, 0x24, 0x33, 0x06, 0x64, 
-       0x66, 0x23, 0x23, 0x01, 0x24, 0x33, 0x06, 0x64, 
-       0x66, 0xe3, 0x4c, 0x6d, 0x68, 0x26, 0x23, 0x01, 
-       0x43, 0x33, 0x60, 0x23, 0xe0, 0xd1, 0x07, 0xcb, 
-       0x0f, 0xdb, 0xd0, 0x02, 0x23, 0x02, 0x43, 0x18, 
-       0xe0, 0x05, 0x23, 0x02, 0x40, 0x0b, 0xd0, 0x02, 
-       0x23, 0x02, 0x43, 0xdb, 0x40, 0x18, 0x23, 0x07, 
-       0x01, 0xdb, 0x40, 0x0b, 0xd0, 0x0f, 0x23, 0x0c, 
-       0x43, 0xdb, 0x40, 0x18, 0x23, 0xff, 0x33, 0x01, 
-       0x40, 0x0b, 0xd0, 0x02, 0x23, 0x04, 0x43, 0x18, 
-       0xe0, 0x05, 0x23, 0x01, 0x02, 0x5b, 0x40, 0x0b, 
-       0xd0, 0x01, 0x23, 0x08, 0x43, 0x18, 0x23, 0x01, 
-       0x04, 0x1b, 0x40, 0x0b, 0xd0, 0x08, 0x23, 0x01, 
-       0x04, 0x9b, 0x43, 0x98, 0x1c, 0x04, 0x20, 0x01, 
-       0x04, 0xc0, 0x43, 0x20, 0x23, 0x01, 0x43, 0x18, 
-       0x23, 0x78, 0x40, 0x0b, 0xd0, 0x73, 0x23, 0x30, 
-       0x40, 0x03, 0xd0, 0x06, 0x2b, 0x10, 0xd0, 0x04, 
-       0x2b, 0x20, 0xd0, 0x42, 0x2b, 0x30, 0xd0, 0x40, 
-       0xe0, 0x81, 0x23, 0x10, 0x40, 0x0b, 0xd1, 0x02, 
-       0x23, 0x08, 0x40, 0x0b, 0xd0, 0x08, 0x23, 0x30, 
-       0x43, 0xdb, 0x40, 0x18, 0x23, 0x10, 0x40, 0x0b, 
-       0xd0, 0x01, 0x23, 0x10, 0x43, 0x18, 0xe0, 0x2f, 
-       0x23, 0x30, 0x43, 0xdb, 0x40, 0x18, 0x23, 0x20, 
-       0x40, 0x0b, 0xd0, 0x02, 0x23, 0x20, 0x43, 0x18, 
-       0xe0, 0x01, 0x23, 0x30, 0x43, 0x18, 0x23, 0x01, 
-       0x43, 0x18, 0x23, 0x1b, 0x06, 0x9b, 0x62, 0x18, 
-       0x27, 0xff, 0x2a, 0x00, 0xd0, 0x04, 0x4b, 0x43, 
-       0x68, 0x1b, 0x4c, 0x43, 0x60, 0x23, 0xe0, 0x17, 
-       0x07, 0xab, 0x0f, 0x9b, 0xd0, 0x09, 0x2b, 0x01, 
-       0xd0, 0x02, 0x2b, 0x02, 0xd0, 0x0a, 0xe0, 0x0e, 
-       0x4b, 0x3e, 0x24, 0x1b, 0x06, 0xa4, 0x64, 0x23, 
-       0xe0, 0x0a, 0x4b, 0x3d, 0x24, 0x1b, 0x06, 0xa4, 
-       0x64, 0x23, 0xe0, 0x05, 0x4b, 0x3b, 0x24, 0x1b, 
-       0x06, 0xa4, 0x64, 0x23, 0xe0, 0x00, 0xe7, 0xff, 
-       0xe0, 0x42, 0x23, 0x40, 0x40, 0x0b, 0xd1, 0x02, 
-       0x23, 0x20, 0x40, 0x0b, 0xd0, 0x0b, 0x23, 0x30, 
-       0x43, 0xdb, 0x40, 0x18, 0x23, 0x20, 0x40, 0x0b, 
-       0xd0, 0x02, 0x23, 0x20, 0x43, 0x18, 0xe0, 0x01, 
-       0x23, 0x30, 0x43, 0x18, 0xe0, 0x2e, 0x23, 0x30, 
-       0x43, 0xdb, 0x40, 0x18, 0x23, 0x10, 0x40, 0x0b, 
-       0xd0, 0x01, 0x23, 0x10, 0x43, 0x18, 0x23, 0x01, 
-       0x43, 0x18, 0x23, 0x1b, 0x06, 0x9b, 0x62, 0x18, 
-       0x27, 0xff, 0x2a, 0x00, 0xd0, 0x04, 0x4b, 0x23, 
-       0x68, 0x1b, 0x4c, 0x23, 0x60, 0x23, 0xe0, 0x19, 
-       0x07, 0xab, 0x0f, 0x9b, 0xe0, 0x00, 0xe0, 0x17, 
-       0xd0, 0x09, 0x2b, 0x01, 0xd0, 0x02, 0x2b, 0x02, 
-       0xd0, 0x0a, 0xe0, 0x0e, 0x4b, 0x20, 0x24, 0x1b, 
-       0x06, 0xa4, 0x64, 0x23, 0xe0, 0x0a, 0x4b, 0x1f, 
-       0x24, 0x1b, 0x06, 0xa4, 0x64, 0x23, 0xe0, 0x05, 
-       0x4b, 0x1d, 0x24, 0x1b, 0x06, 0xa4, 0x64, 0x23, 
-       0xe0, 0x00, 0xe7, 0xff, 0xe0, 0x00, 0xe7, 0xff, 
-       0x2f, 0x00, 0xd1, 0x12, 0x23, 0x1b, 0x06, 0x9b, 
-       0x62, 0x18, 0x23, 0x00, 0x93, 0x00, 0x9b, 0x00, 
-       0x2b, 0x0a, 0xdb, 0x04, 0xe0, 0x04, 0x9b, 0x00, 
-       0x33, 0x01, 0x93, 0x00, 0xe7, 0xf7, 0xe7, 0xfa, 
-       0x4b, 0x03, 0x68, 0x1c, 0x08, 0x64, 0x00, 0x64, 
-       0x60, 0x1c, 0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
-       0x6c, 0x00, 0x00, 0x20, 0x6c, 0x00, 0x68, 0x00, 
-       0xff, 0xbf, 0xff, 0xff, 0xff, 0xfe, 0x01, 0xff, 
-       0xff, 0xfd, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 
-       0x2e, 0x08, 0x7c, 0x1c, 0x2e, 0x08, 0x5e, 0x50, 
-       0x6c, 0x00, 0x00, 0x80, 0x00, 0x00, 0x98, 0x60, 
-       0x00, 0x01, 0x58, 0x60, 0x00, 0x02, 0x54, 0x28, 
-       0x00, 0x00, 0x82, 0x18, 0x00, 0x01, 0x42, 0x18, 
-       0x00, 0x02, 0x42, 0x18, 0xb5, 0xf3, 0x1c, 0x0f, 
-       0xb0, 0x81, 0x98, 0x01, 0x06, 0x00, 0x0e, 0x00, 
-       0x90, 0x00, 0x98, 0x00, 0x28, 0x20, 0xdb, 0x05, 
-       0x20, 0xa2, 0xb0, 0x01, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x20, 0x33, 0x06, 0x40, 
-       0x6e, 0x00, 0x21, 0x33, 0x06, 0x49, 0x6d, 0xc9, 
-       0x1a, 0x46, 0x48, 0x12, 0x6c, 0x80, 0x1c, 0x04, 
-       0x48, 0x10, 0x6c, 0xc0, 0x1c, 0x05, 0x42, 0xac, 
-       0xd9, 0x09, 0x1b, 0x60, 0x21, 0x64, 0x43, 0x41, 
-       0x1c, 0x30, 0xf0, 0x09, 0xff, 0xcb, 0x21, 0x64, 
-       0x1a, 0x08, 0x60, 0x38, 0xe0, 0x06, 0x1b, 0x28, 
-       0x21, 0x64, 0x43, 0x41, 0x1c, 0x30, 0xf0, 0x09, 
-       0xff, 0xc1, 0x60, 0x38, 0x42, 0xac, 0xd1, 0x03, 
-       0x20, 0x31, 0xb0, 0x01, 0xe7, 0xd6, 0xe0, 0x02, 
-       0x20, 0x00, 0xb0, 0x01, 0xe7, 0xd2, 0xb0, 0x01, 
-       0xe7, 0xd0, 0x00, 0x00, 0x66, 0x00, 0x00, 0x80, 
-       0xb5, 0xff, 0x1c, 0x14, 0x1c, 0x1f, 0xb0, 0x82, 
-       0x98, 0x02, 0x06, 0x01, 0x0e, 0x09, 0x91, 0x00, 
-       0x98, 0x0b, 0x06, 0x03, 0x16, 0x1b, 0x93, 0x01, 
-       0xb0, 0x84, 0x99, 0x04, 0x29, 0x20, 0xdb, 0x05, 
-       0x20, 0xa2, 0xb0, 0x06, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x9b, 0x05, 0x2b, 0x1f, 
-       0xdd, 0x02, 0x20, 0xaf, 0xb0, 0x06, 0xe7, 0xf5, 
-       0x98, 0x07, 0x90, 0x01, 0x2f, 0x00, 0xd0, 0x47, 
-       0xb0, 0x81, 0x98, 0x08, 0x22, 0x00, 0x92, 0x00, 
-       0x22, 0x1b, 0x06, 0x92, 0x6a, 0x12, 0x23, 0x01, 
-       0x05, 0x1b, 0x40, 0x1a, 0xd0, 0x01, 0x22, 0xff, 
-       0x92, 0x00, 0x25, 0x00, 0x08, 0x62, 0x42, 0xaa, 
-       0xd8, 0x02, 0xe0, 0x34, 0x35, 0x01, 0xe7, 0xf9, 
-       0x9a, 0x00, 0x2a, 0x00, 0xd0, 0x1e, 0x88, 0x02, 
-       0x23, 0xff, 0x02, 0x1b, 0x40, 0x1a, 0x12, 0x12, 
-       0x88, 0x03, 0x02, 0x1b, 0x43, 0x1a, 0x04, 0x11, 
-       0x0c, 0x09, 0x2f, 0x00, 0xda, 0x05, 0x42, 0x7a, 
-       0x41, 0x11, 0x1c, 0x0b, 0x04, 0x19, 0x0c, 0x09, 
-       0xe0, 0x03, 0x40, 0xb9, 0x1c, 0x0a, 0x04, 0x11, 
-       0x0c, 0x09, 0x22, 0xff, 0x02, 0x12, 0x40, 0x0a, 
-       0x12, 0x12, 0x02, 0x0b, 0x43, 0x13, 0x80, 0x03, 
-       0x30, 0x02, 0xe0, 0x0f, 0x2f, 0x00, 0xda, 0x07, 
-       0x88, 0x02, 0x42, 0x7e, 0x41, 0x32, 0x04, 0x12, 
-       0x0c, 0x12, 0x80, 0x02, 0x30, 0x02, 0xe0, 0x05, 
-       0x88, 0x02, 0x40, 0xba, 0x04, 0x12, 0x0c, 0x12, 
-       0x80, 0x02, 0x30, 0x02, 0xe7, 0xca, 0xb0, 0x01, 
-       0x49, 0x23, 0x91, 0x03, 0x20, 0x01, 0x06, 0x00, 
-       0x99, 0x03, 0x60, 0x08, 0x48, 0x21, 0x6c, 0x80, 
-       0x49, 0x20, 0x6c, 0xc9, 0x1a, 0x40, 0x90, 0x00, 
-       0x98, 0x00, 0x28, 0x00, 0xdc, 0x09, 0x20, 0x33, 
-       0x06, 0x40, 0x6e, 0x00, 0x21, 0x33, 0x06, 0x49, 
-       0x6d, 0xc9, 0x1a, 0x40, 0x99, 0x00, 0x18, 0x40, 
-       0x90, 0x00, 0x98, 0x00, 0x23, 0x3b, 0x01, 0xdb, 
-       0x42, 0x98, 0xda, 0x02, 0x20, 0x06, 0xf0, 0x08, 
-       0xfd, 0x8d, 0x98, 0x00, 0x23, 0x3b, 0x01, 0xdb, 
-       0x42, 0x98, 0xdb, 0xdf, 0x98, 0x00, 0x42, 0x84, 
-       0xd9, 0x02, 0x98, 0x00, 0x90, 0x02, 0xe0, 0x00, 
-       0x94, 0x02, 0x22, 0x04, 0x99, 0x03, 0xb4, 0x06, 
-       0x9b, 0x07, 0x9a, 0x04, 0x99, 0x06, 0x98, 0x03, 
-       0xf0, 0x04, 0xfb, 0x8c, 0xb0, 0x02, 0x98, 0x02, 
-       0x1a, 0x24, 0x98, 0x01, 0x99, 0x02, 0x18, 0x40, 
-       0x90, 0x01, 0x20, 0x00, 0x90, 0x00, 0x2c, 0x00, 
-       0xd1, 0xc4, 0x20, 0x00, 0xb0, 0x06, 0xe7, 0x65, 
-       0xb0, 0x04, 0xb0, 0x02, 0xe7, 0x62, 0x00, 0x00, 
-       0x9e, 0x00, 0x08, 0x00, 0x66, 0x00, 0x00, 0x80, 
-       0x20, 0x1b, 0x06, 0x80, 0x6a, 0x00, 0x07, 0xc0, 
-       0x0f, 0xc0, 0x4a, 0x03, 0x68, 0x12, 0x1c, 0x01, 
-       0x43, 0x11, 0x1c, 0x08, 0x47, 0x70, 0xe7, 0xfd, 
-       0x6c, 0x00, 0x08, 0x00, 0xb4, 0x90, 0x1c, 0x01, 
-       0x20, 0x1b, 0x06, 0x80, 0x6a, 0x00, 0x1c, 0x04, 
-       0x48, 0x1b, 0x68, 0x00, 0x1c, 0x07, 0x20, 0x30, 
-       0x40, 0x20, 0xd0, 0x06, 0x28, 0x10, 0xd0, 0x06, 
-       0x28, 0x20, 0xd0, 0x06, 0x28, 0x30, 0xd0, 0x06, 
-       0xe0, 0x07, 0x22, 0x01, 0xe0, 0x08, 0x22, 0x02, 
-       0xe0, 0x06, 0x22, 0x04, 0xe0, 0x04, 0x22, 0x08, 
-       0xe0, 0x02, 0x20, 0x30, 0xbc, 0x90, 0x47, 0x70, 
-       0x20, 0x03, 0x07, 0x40, 0x40, 0x38, 0x0f, 0x40, 
-       0xd0, 0x04, 0x28, 0x01, 0xd0, 0x05, 0x28, 0x02, 
-       0xd0, 0x06, 0xe0, 0x08, 0x23, 0x10, 0x43, 0x1a, 
-       0xe0, 0x07, 0x23, 0x20, 0x43, 0x1a, 0xe0, 0x04, 
-       0x23, 0x40, 0x43, 0x1a, 0xe0, 0x01, 0x20, 0x30, 
-       0xe7, 0xe8, 0x20, 0x01, 0x05, 0xc0, 0x40, 0x38, 
-       0xd1, 0x01, 0x23, 0x80, 0x43, 0x1a, 0x60, 0x0a, 
-       0x20, 0x00, 0xe7, 0xdf, 0xe7, 0xde, 0x00, 0x00, 
-       0x6c, 0x00, 0x08, 0x00, 0x1c, 0x01, 0x48, 0x01, 
-       0x60, 0x01, 0x47, 0x70, 0x6c, 0x00, 0x00, 0x80, 
-       0x1c, 0x01, 0x29, 0x1f, 0xdd, 0x01, 0x20, 0xaf, 
-       0x47, 0x70, 0x20, 0x80, 0x6c, 0x00, 0x60, 0x01, 
-       0x20, 0x00, 0xe7, 0xf9, 0xe7, 0xf8, 0xb5, 0xf3, 
-       0x1c, 0x0a, 0xb0, 0x81, 0x98, 0x01, 0x06, 0x03, 
-       0x0e, 0x1b, 0x93, 0x00, 0xb0, 0x81, 0x20, 0x1b, 
-       0x06, 0x80, 0x6a, 0x00, 0x1c, 0x01, 0x25, 0x00, 
-       0x20, 0x00, 0x90, 0x00, 0x20, 0x1b, 0x06, 0x80, 
-       0x6c, 0x00, 0x1c, 0x04, 0x27, 0x00, 0x9b, 0x01, 
-       0x2b, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x02, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0x33, 0x06, 0x40, 0x6d, 0xc0, 0x23, 0x0d, 
-       0x06, 0x9b, 0x1a, 0xc0, 0x9b, 0x01, 0x00, 0xdb, 
-       0x4e, 0x5f, 0x68, 0x36, 0x19, 0x9b, 0x60, 0x58, 
-       0x20, 0xff, 0x30, 0x01, 0x40, 0x08, 0xd0, 0x01, 
-       0x20, 0xff, 0x90, 0x00, 0x23, 0x01, 0x04, 0xdb, 
-       0x43, 0x99, 0x1c, 0x08, 0x21, 0x01, 0x04, 0x89, 
-       0x43, 0x01, 0x20, 0x01, 0x03, 0x00, 0x40, 0x10, 
-       0xd0, 0x05, 0x06, 0x90, 0x0e, 0x80, 0xd0, 0x02, 
-       0x23, 0x01, 0x05, 0x1b, 0x43, 0x19, 0x23, 0x30, 
-       0x43, 0xdb, 0x40, 0x19, 0x05, 0x10, 0x0d, 0x00, 
-       0x28, 0x40, 0xd0, 0x48, 0xdc, 0x0e, 0x28, 0x08, 
-       0xd0, 0x32, 0xdc, 0x06, 0x28, 0x01, 0xd0, 0x1e, 
-       0x28, 0x02, 0xd0, 0x21, 0x28, 0x04, 0xd0, 0x26, 
-       0xe0, 0x67, 0x28, 0x10, 0xd0, 0x2f, 0x28, 0x20, 
-       0xd0, 0x32, 0xe0, 0x62, 0x23, 0x01, 0x02, 0x5b, 
-       0x42, 0x98, 0xd0, 0x49, 0xdc, 0x06, 0x28, 0x80, 
-       0xd0, 0x38, 0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 
-       0xd0, 0x3b, 0xe0, 0x56, 0x23, 0x01, 0x02, 0x9b, 
-       0x42, 0x98, 0xd0, 0x44, 0x23, 0x01, 0x02, 0xdb, 
-       0x42, 0x98, 0xd0, 0x47, 0xe0, 0x4d, 0x4b, 0x3d, 
-       0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x3b, 0xe0, 0x49, 
-       0x23, 0x10, 0x43, 0x19, 0x4b, 0x39, 0x42, 0x9c, 
-       0xd0, 0x00, 0x4f, 0x38, 0xe0, 0x42, 0x4b, 0x38, 
-       0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x36, 0xe0, 0x3d, 
-       0x23, 0x10, 0x43, 0x19, 0x4b, 0x34, 0x42, 0x9c, 
-       0xd0, 0x00, 0x4f, 0x33, 0xe0, 0x36, 0x4b, 0x33, 
-       0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x31, 0xe0, 0x31, 
-       0x23, 0x10, 0x43, 0x19, 0x4b, 0x2f, 0x42, 0x9c, 
-       0xd0, 0x00, 0x4f, 0x2e, 0xe0, 0x2a, 0x23, 0x20, 
-       0x43, 0x19, 0x4b, 0x2d, 0x42, 0x9c, 0xd0, 0x00, 
-       0x4f, 0x2b, 0xe0, 0x23, 0x23, 0x30, 0x43, 0x19, 
-       0x4b, 0x29, 0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x28, 
-       0xe0, 0x1c, 0x23, 0x20, 0x43, 0x19, 0x4b, 0x27, 
-       0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x25, 0xe0, 0x15, 
-       0x23, 0x30, 0x43, 0x19, 0x4b, 0x23, 0x42, 0x9c, 
-       0xd0, 0x00, 0x4f, 0x22, 0xe0, 0x0e, 0x23, 0x20, 
-       0x43, 0x19, 0x4b, 0x21, 0x42, 0x9c, 0xd0, 0x00, 
-       0x4f, 0x1f, 0xe0, 0x07, 0x23, 0x30, 0x43, 0x19, 
-       0x4b, 0x1d, 0x42, 0x9c, 0xd0, 0x00, 0x4f, 0x1c, 
-       0xe0, 0x00, 0xe7, 0xff, 0x98, 0x00, 0x28, 0x00, 
-       0xd0, 0x0a, 0x23, 0x01, 0x43, 0x19, 0x20, 0x1b, 
-       0x06, 0x80, 0x62, 0x01, 0x48, 0x17, 0x68, 0x00, 
-       0x4b, 0x17, 0x60, 0x18, 0x25, 0xff, 0xe0, 0x0e, 
-       0x23, 0x01, 0x43, 0x19, 0x2f, 0x00, 0xd0, 0x07, 
-       0x20, 0x1b, 0x06, 0x80, 0x62, 0x01, 0x20, 0x1b, 
-       0x06, 0x80, 0x64, 0x07, 0x25, 0xff, 0xe0, 0x02, 
-       0x20, 0x1b, 0x06, 0x80, 0x62, 0x01, 0x2d, 0x00, 
-       0xd1, 0x04, 0x48, 0x0e, 0x68, 0x03, 0x08, 0x5b, 
-       0x00, 0x5b, 0x60, 0x03, 0x20, 0x00, 0xb0, 0x02, 
-       0xe7, 0x36, 0xb0, 0x01, 0xb0, 0x01, 0xe7, 0x33, 
-       0x2e, 0x08, 0x5d, 0xd4, 0x00, 0x00, 0x82, 0x18, 
-       0x00, 0x01, 0x42, 0x18, 0x00, 0x02, 0x42, 0x18, 
-       0x00, 0x00, 0x98, 0x60, 0x00, 0x01, 0x58, 0x60, 
-       0x00, 0x02, 0x54, 0x28, 0x2e, 0x08, 0x5e, 0x50, 
-       0x6c, 0x00, 0x00, 0x80, 0x6c, 0x00, 0x00, 0x20, 
-       0xb5, 0xf3, 0x1c, 0x0f, 0xb0, 0x82, 0x49, 0x2c, 
-       0x46, 0x68, 0x22, 0x08, 0xf0, 0x09, 0xfd, 0xca, 
-       0x20, 0x04, 0xf7, 0xff, 0xfc, 0x23, 0x48, 0x29, 
-       0x68, 0x80, 0x21, 0x33, 0x06, 0x49, 0x65, 0xc8, 
-       0x48, 0x26, 0x68, 0xc0, 0x21, 0x33, 0x06, 0x49, 
-       0x66, 0x08, 0x48, 0x25, 0x68, 0x01, 0x23, 0x02, 
-       0x43, 0x19, 0x60, 0x01, 0x20, 0x01, 0x21, 0x33, 
-       0x06, 0x49, 0x67, 0xc8, 0x48, 0x21, 0x68, 0x01, 
-       0x31, 0xff, 0x31, 0xff, 0x31, 0x02, 0x60, 0x01, 
-       0x1c, 0x78, 0x12, 0x00, 0xab, 0x01, 0x70, 0x18, 
-       0x1c, 0x78, 0xab, 0x01, 0x70, 0x58, 0x20, 0x33, 
-       0x06, 0x40, 0x6d, 0xc5, 0x4b, 0x1a, 0x43, 0x1d, 
-       0x26, 0x00, 0x2e, 0x10, 0xdb, 0x02, 0xe0, 0x18, 
-       0x36, 0x01, 0xe7, 0xfa, 0x24, 0x00, 0x2c, 0x07, 
-       0xd3, 0x02, 0xe0, 0x06, 0x34, 0x01, 0xe7, 0xfa, 
-       0x46, 0x68, 0x5d, 0x01, 0x70, 0x29, 0x35, 0x01, 
-       0xe7, 0xf8, 0x24, 0x00, 0x42, 0xbc, 0xdb, 0x02, 
-       0xe0, 0x06, 0x34, 0x01, 0xe7, 0xfa, 0x98, 0x02, 
-       0x5d, 0x01, 0x70, 0x29, 0x35, 0x01, 0xe7, 0xf8, 
-       0xe7, 0xe6, 0x20, 0x33, 0x06, 0x40, 0x66, 0x05, 
-       0x48, 0x0a, 0x68, 0x01, 0x23, 0x01, 0x05, 0x5b, 
-       0x43, 0x19, 0x60, 0x01, 0xb0, 0x02, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x03, 0x39, 0xfc, 0x2e, 0x08, 0x7c, 0x1c, 
-       0x66, 0x00, 0x00, 0x70, 0x66, 0x00, 0x00, 0x5c, 
-       0xcc, 0x00, 0x00, 0x00, 0x6c, 0x00, 0x00, 0x20, 
-       0xb5, 0xf7, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x20, 
-       0x0e, 0x00, 0x06, 0x3d, 0x0e, 0x2d, 0x99, 0x02, 
-       0x06, 0x0a, 0x0e, 0x12, 0x21, 0x02, 0x40, 0x01, 
-       0xd0, 0x04, 0x21, 0xff, 0x4b, 0x2f, 0x68, 0x1b, 
-       0x72, 0x19, 0xe0, 0x0c, 0x49, 0x2d, 0x68, 0x09, 
-       0x7a, 0x09, 0x29, 0xff, 0xd1, 0x03, 0x21, 0x00, 
-       0x4b, 0x2a, 0x68, 0x1b, 0x60, 0x19, 0x21, 0x00, 
-       0x4b, 0x28, 0x68, 0x1b, 0x72, 0x19, 0x07, 0xc1, 
-       0x0f, 0xc9, 0xd0, 0x04, 0x21, 0xff, 0x4b, 0x25, 
-       0x68, 0x1b, 0x72, 0x59, 0xe0, 0x0c, 0x49, 0x23, 
-       0x68, 0x09, 0x7a, 0x49, 0x29, 0xff, 0xd1, 0x03, 
-       0x21, 0x00, 0x4b, 0x20, 0x68, 0x1b, 0x60, 0x59, 
-       0x21, 0x00, 0x4b, 0x1e, 0x68, 0x1b, 0x72, 0x59, 
-       0x2d, 0x01, 0xd1, 0x0f, 0x49, 0x1c, 0x68, 0x0e, 
-       0x23, 0x01, 0x05, 0x5b, 0x43, 0x9e, 0x1c, 0x33, 
-       0x60, 0x0b, 0x49, 0x1a, 0x68, 0x09, 0x78, 0x09, 
-       0x23, 0x02, 0x43, 0x19, 0x4b, 0x17, 0x68, 0x1b, 
-       0x70, 0x19, 0xe0, 0x0e, 0x49, 0x14, 0x68, 0x0e, 
-       0x23, 0x01, 0x05, 0x5b, 0x43, 0x33, 0x60, 0x0b, 
-       0x49, 0x12, 0x68, 0x09, 0x78, 0x09, 0x23, 0x02, 
-       0x43, 0xdb, 0x40, 0x19, 0x4b, 0x0f, 0x68, 0x1b, 
-       0x70, 0x19, 0x49, 0x0f, 0x62, 0x4a, 0x2a, 0x01, 
-       0xd1, 0x08, 0x49, 0x0c, 0x68, 0x09, 0x78, 0x09, 
-       0x23, 0x01, 0x43, 0x19, 0x4b, 0x09, 0x68, 0x1b, 
-       0x70, 0x19, 0xe0, 0x07, 0x49, 0x07, 0x68, 0x09, 
-       0x78, 0x09, 0x08, 0x49, 0x00, 0x49, 0x4b, 0x05, 
-       0x68, 0x1b, 0x70, 0x19, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x5e, 0x54, 
-       0x6c, 0x00, 0x00, 0x20, 0x2e, 0x08, 0x5e, 0x58, 
-       0xcc, 0x00, 0x0f, 0x80, 0xb4, 0x80, 0x1c, 0x07, 
-       0x1c, 0x0a, 0x68, 0x38, 0x49, 0x23, 0x68, 0x09, 
-       0x60, 0xc8, 0x68, 0x78, 0x49, 0x21, 0x68, 0x09, 
-       0x61, 0x08, 0x68, 0xb8, 0x49, 0x1f, 0x68, 0x09, 
-       0x61, 0x48, 0x68, 0xf8, 0x49, 0x1d, 0x68, 0x09, 
-       0x61, 0x88, 0x7d, 0x38, 0x49, 0x1b, 0x68, 0x09, 
-       0x31, 0x20, 0x70, 0x08, 0x7d, 0x78, 0x49, 0x19, 
-       0x68, 0x09, 0x31, 0x20, 0x70, 0x48, 0x69, 0x38, 
-       0x49, 0x16, 0x68, 0x09, 0x61, 0xc8, 0x7d, 0xb8, 
-       0x49, 0x14, 0x68, 0x09, 0x31, 0x20, 0x70, 0x88, 
-       0x68, 0x10, 0x49, 0x12, 0x68, 0x09, 0x62, 0x48, 
-       0x68, 0x50, 0x49, 0x10, 0x68, 0x09, 0x62, 0x88, 
-       0x68, 0x90, 0x49, 0x0e, 0x68, 0x09, 0x62, 0xc8, 
-       0x68, 0xd0, 0x49, 0x0c, 0x68, 0x09, 0x63, 0x08, 
-       0x7d, 0x10, 0x49, 0x0a, 0x68, 0x09, 0x31, 0x20, 
-       0x76, 0x08, 0x7d, 0x50, 0x49, 0x07, 0x68, 0x09, 
-       0x31, 0x20, 0x76, 0x48, 0x69, 0x10, 0x49, 0x05, 
-       0x68, 0x09, 0x63, 0x48, 0x7d, 0x90, 0x49, 0x03, 
-       0x68, 0x09, 0x31, 0x20, 0x76, 0x88, 0xbc, 0x80, 
-       0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x5e, 0x54, 
-       0x1c, 0x02, 0x1c, 0x0b, 0x48, 0x03, 0x68, 0x00, 
-       0x60, 0x02, 0x48, 0x02, 0x68, 0x00, 0x60, 0x43, 
-       0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x5e, 0x54, 
-       0xb5, 0xf3, 0xb0, 0x88, 0x98, 0x08, 0x68, 0x04, 
-       0x20, 0x01, 0x90, 0x06, 0x20, 0x01, 0x90, 0x05, 
-       0x48, 0x8c, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x19, 
-       0x48, 0x8a, 0x68, 0x00, 0x38, 0x01, 0x49, 0x89, 
-       0x60, 0x08, 0x48, 0x88, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x10, 0x48, 0x87, 0x78, 0x80, 0x90, 0x00, 
-       0x98, 0x00, 0x00, 0xc0, 0x49, 0x85, 0x68, 0x09, 
-       0x58, 0x08, 0x23, 0xff, 0x33, 0x01, 0x43, 0x98, 
-       0x1c, 0x01, 0x98, 0x00, 0x00, 0xc0, 0x4a, 0x81, 
-       0x68, 0x12, 0x50, 0x11, 0x20, 0x33, 0x06, 0x40, 
-       0x6e, 0x00, 0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc1, 
-       0x91, 0x02, 0x20, 0x33, 0x06, 0x40, 0x6d, 0xc0, 
-       0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc0, 0x90, 0x01, 
-       0x48, 0x79, 0x68, 0x00, 0x42, 0x84, 0xd1, 0x73, 
-       0x98, 0x01, 0x1d, 0xc7, 0x37, 0x01, 0x78, 0x38, 
-       0x18, 0x38, 0x1c, 0x47, 0x48, 0x75, 0x6c, 0xc0, 
-       0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc0, 0x42, 0xb8, 
-       0xd9, 0x19, 0x78, 0x38, 0x28, 0xff, 0xd1, 0x12, 
-       0x78, 0x78, 0x23, 0xf0, 0x40, 0x18, 0x28, 0xf0, 
-       0xd1, 0x0d, 0x78, 0xb8, 0x10, 0x80, 0x07, 0x80, 
-       0x0f, 0x80, 0x06, 0x00, 0x16, 0x00, 0x90, 0x06, 
-       0x78, 0x78, 0x10, 0xc0, 0x07, 0xc0, 0x09, 0xc0, 
-       0x16, 0x00, 0x90, 0x05, 0xe0, 0x03, 0x21, 0x01, 
-       0x70, 0x39, 0x18, 0x7f, 0xe7, 0xde, 0x21, 0x40, 
-       0x91, 0x03, 0x25, 0x20, 0x21, 0x14, 0x91, 0x07, 
-       0x98, 0x06, 0x28, 0x00, 0xd1, 0x02, 0x25, 0x23, 
-       0x21, 0x12, 0x91, 0x07, 0x98, 0x06, 0x28, 0x02, 
-       0xd1, 0x02, 0x25, 0x30, 0x21, 0x18, 0x91, 0x07, 
-       0x98, 0x05, 0x28, 0x00, 0xd1, 0x02, 0x00, 0x6d, 
-       0x21, 0x70, 0x91, 0x03, 0x99, 0x03, 0x00, 0x48, 
-       0x99, 0x02, 0x1a, 0x08, 0x90, 0x04, 0x98, 0x04, 
-       0x99, 0x02, 0x42, 0x88, 0xd3, 0x05, 0xe0, 0x4e, 
-       0x98, 0x04, 0x99, 0x03, 0x18, 0x40, 0x90, 0x04, 
-       0xe7, 0xf5, 0x9f, 0x04, 0x21, 0x00, 0x70, 0x39, 
-       0x37, 0x01, 0x21, 0x00, 0x70, 0x39, 0x37, 0x01, 
-       0x21, 0x01, 0x70, 0x39, 0x18, 0x7f, 0x21, 0xc0, 
-       0x70, 0x39, 0x37, 0x01, 0x21, 0x00, 0x70, 0x39, 
-       0x37, 0x01, 0x21, 0x3a, 0x70, 0x39, 0x37, 0x01, 
-       0x21, 0x80, 0x70, 0x39, 0x37, 0x01, 0x21, 0x00, 
-       0x70, 0x39, 0x37, 0x01, 0x99, 0x03, 0x1f, 0xc8, 
-       0x38, 0x02, 0x1b, 0x41, 0x70, 0x39, 0x37, 0x01, 
-       0x26, 0x00, 0x99, 0x03, 0x1f, 0xc8, 0x38, 0x02, 
-       0x1b, 0x40, 0x42, 0xb0, 0xdc, 0x04, 0xe0, 0x00, 
-       0xe0, 0x34, 0xe0, 0x05, 0x36, 0x01, 0xe7, 0xf4, 
-       0x21, 0xff, 0x70, 0x39, 0x37, 0x01, 0xe7, 0xf9, 
-       0x21, 0xff, 0x70, 0x39, 0x37, 0x01, 0x98, 0x05, 
-       0x00, 0xc0, 0x21, 0xf7, 0x43, 0x01, 0x70, 0x39, 
-       0x37, 0x01, 0x99, 0x07, 0x70, 0x39, 0x37, 0x01, 
-       0x21, 0xc0, 0x70, 0x39, 0x37, 0x01, 0x26, 0x00, 
-       0x1f, 0x28, 0x42, 0xb0, 0xdc, 0x02, 0xe0, 0x05, 
-       0x36, 0x01, 0xe7, 0xf9, 0x21, 0x00, 0x70, 0x39, 
-       0x37, 0x01, 0xe7, 0xf9, 0xe7, 0xb0, 0x99, 0x03, 
-       0x00, 0x48, 0x99, 0x02, 0x1a, 0x08, 0x23, 0x0d, 
-       0x06, 0x9b, 0x18, 0xc0, 0x49, 0x29, 0x64, 0x88, 
-       0x99, 0x09, 0x20, 0x78, 0x40, 0x08, 0x23, 0x02, 
-       0x43, 0x18, 0xf7, 0xff, 0xfa, 0x17, 0x20, 0x01, 
-       0xf7, 0xff, 0xfa, 0x14, 0x48, 0x22, 0x68, 0x00, 
-       0x38, 0x02, 0x42, 0xa0, 0xd1, 0x09, 0x48, 0x22, 
-       0x68, 0x01, 0x23, 0x01, 0x05, 0x5b, 0x43, 0x19, 
-       0x60, 0x01, 0x20, 0xff, 0x49, 0x1f, 0x68, 0x09, 
-       0x70, 0x08, 0x48, 0x1b, 0x68, 0x00, 0x38, 0x02, 
-       0x42, 0xa0, 0xd3, 0x0f, 0x48, 0x1c, 0x68, 0x00, 
-       0x28, 0x00, 0xd0, 0x05, 0x48, 0x1a, 0x68, 0x00, 
-       0x23, 0x01, 0x06, 0x9b, 0x40, 0x18, 0xd0, 0x05, 
-       0x20, 0x32, 0x49, 0x13, 0x60, 0x08, 0x48, 0x12, 
-       0x68, 0x00, 0x1e, 0x84, 0x2c, 0x01, 0xd1, 0x02, 
-       0x20, 0x02, 0xf7, 0xff, 0xf9, 0xeb, 0x2c, 0xff, 
-       0xd1, 0x08, 0x20, 0x33, 0x06, 0x40, 0x6d, 0xc0, 
-       0x30, 0xbc, 0x49, 0x0c, 0x6c, 0xc9, 0x42, 0x88, 
-       0xd2, 0x00, 0x24, 0x18, 0x2c, 0x00, 0xd0, 0x02, 
-       0x2c, 0xff, 0xd0, 0x00, 0x3c, 0x01, 0x98, 0x08, 
-       0x60, 0x04, 0xb0, 0x08, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x5e, 0x44, 
-       0x2e, 0x08, 0x5e, 0x30, 0x2e, 0x08, 0x5d, 0xd0, 
-       0x2e, 0x08, 0x1f, 0x18, 0x66, 0x00, 0x00, 0x80, 
-       0x6c, 0x00, 0x00, 0x20, 0x2e, 0x08, 0x5e, 0x2c, 
-       0x6c, 0x00, 0x08, 0x00, 0xb5, 0xff, 0x1c, 0x04, 
-       0x1c, 0x0f, 0x9a, 0x02, 0x06, 0x15, 0x0e, 0x2d, 
-       0x9b, 0x03, 0x06, 0x1e, 0x0e, 0x36, 0x2e, 0x20, 
-       0xdb, 0x04, 0x20, 0xa2, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2d, 0x1f, 0xdb, 0x01, 
-       0x20, 0xaf, 0xe7, 0xf7, 0x20, 0x01, 0x03, 0x40, 
-       0xf7, 0xff, 0xf9, 0xac, 0x20, 0x14, 0x49, 0x09, 
-       0x60, 0x08, 0x20, 0xff, 0x60, 0x20, 0x1c, 0x33, 
-       0x1c, 0x29, 0x1c, 0x38, 0x22, 0x02, 0xf7, 0xfc, 
-       0xfa, 0x4b, 0x48, 0x05, 0x68, 0x01, 0x23, 0x01, 
-       0x05, 0x5b, 0x43, 0x19, 0x60, 0x01, 0x20, 0x00, 
-       0xe7, 0xe0, 0xe7, 0xdf, 0x2e, 0x08, 0x1f, 0x18, 
-       0x6c, 0x00, 0x00, 0x20, 0xb4, 0x0f, 0xb5, 0xf0, 
-       0x1c, 0x07, 0xb0, 0x82, 0x20, 0x00, 0x49, 0x16, 
-       0x60, 0x08, 0x48, 0x16, 0x6f, 0x80, 0x23, 0x09, 
-       0x01, 0x9b, 0x42, 0x98, 0xd1, 0x02, 0x20, 0xe1, 
-       0x00, 0xc0, 0xe0, 0x00, 0x48, 0x12, 0x1c, 0x05, 
-       0x68, 0x38, 0x28, 0xff, 0xd1, 0x17, 0x98, 0x0d, 
-       0x90, 0x00, 0x98, 0x0c, 0x90, 0x01, 0x98, 0x01, 
-       0x99, 0x00, 0x1a, 0x46, 0x08, 0x68, 0x19, 0x81, 
-       0x1c, 0x28, 0xf0, 0x09, 0xfa, 0xeb, 0x1c, 0x04, 
-       0x34, 0x01, 0x0f, 0xf0, 0x07, 0xc0, 0xd0, 0x00, 
-       0x24, 0x04, 0x2c, 0x32, 0xd9, 0x00, 0x24, 0x04, 
-       0x1d, 0xe0, 0x30, 0x0d, 0x60, 0x38, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0xb0, 0x04, 0x47, 0x18, 
-       0x2e, 0x08, 0x5e, 0x44, 0xcc, 0x00, 0x0f, 0x80, 
-       0x00, 0x00, 0x05, 0xdd, 0xb5, 0xf3, 0x1c, 0x07, 
-       0xb0, 0x81, 0x99, 0x02, 0x06, 0x09, 0x0e, 0x09, 
-       0x91, 0x00, 0xb0, 0x82, 0x99, 0x02, 0x29, 0x20, 
-       0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x03, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x99, 0x02, 
-       0x00, 0x88, 0x49, 0x2f, 0x58, 0x08, 0x90, 0x01, 
-       0x28, 0x00, 0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x03, 
-       0xe7, 0xf1, 0x20, 0x00, 0x70, 0x78, 0x78, 0xb8, 
-       0x07, 0x00, 0x0f, 0x00, 0x90, 0x00, 0x98, 0x00, 
-       0x28, 0x04, 0xd1, 0x1f, 0x6a, 0xfe, 0x24, 0x00, 
-       0x2c, 0x08, 0xdb, 0x04, 0xe0, 0x18, 0x1c, 0x60, 
-       0x06, 0x04, 0x0e, 0x24, 0xe7, 0xf8, 0x00, 0xa0, 
-       0x19, 0x80, 0x68, 0x40, 0x00, 0xa1, 0x19, 0x89, 
-       0x64, 0x48, 0x21, 0x00, 0x00, 0xa0, 0x19, 0x80, 
-       0x62, 0x41, 0x00, 0xa0, 0x19, 0x80, 0x6c, 0x40, 
-       0x28, 0x00, 0xd0, 0x04, 0x20, 0x80, 0x41, 0x20, 
-       0x88, 0x31, 0x43, 0x08, 0x80, 0x30, 0xe7, 0xe6, 
-       0x88, 0x30, 0x80, 0x70, 0x78, 0xb8, 0x23, 0x20, 
-       0x40, 0x18, 0xd0, 0x1f, 0x6b, 0x3d, 0x20, 0x00, 
-       0x60, 0x28, 0x20, 0x00, 0x60, 0x68, 0x20, 0x00, 
-       0x60, 0xa8, 0x24, 0x00, 0x2c, 0x08, 0xdb, 0x04, 
-       0xe0, 0x0c, 0x1c, 0x60, 0x06, 0x04, 0x0e, 0x24, 
-       0xe7, 0xf8, 0x20, 0x00, 0x00, 0xa1, 0x19, 0x49, 
-       0x60, 0xc8, 0x20, 0x00, 0x00, 0xa1, 0x19, 0x49, 
-       0x63, 0x88, 0xe7, 0xf2, 0x20, 0x00, 0x62, 0xe8, 
-       0x20, 0x00, 0x63, 0x28, 0x20, 0x00, 0x63, 0x68, 
-       0x20, 0x00, 0x65, 0xa8, 0x99, 0x02, 0x1c, 0x38, 
-       0xf0, 0x00, 0xf8, 0x3e, 0xb0, 0x03, 0xe7, 0x9e, 
-       0xb0, 0x02, 0xb0, 0x01, 0xe7, 0x9b, 0x00, 0x00, 
-       0x2e, 0x08, 0x5e, 0x5c, 0xb5, 0xf3, 0x1c, 0x07, 
-       0x99, 0x01, 0x06, 0x0c, 0x0e, 0x24, 0xb0, 0x82, 
-       0x2c, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x02, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x00, 0xa0, 0x49, 0x12, 0x58, 0x08, 0x1c, 0x05, 
-       0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x02, 0xe7, 0xf3, 
-       0x1c, 0x21, 0x1c, 0x38, 0xf0, 0x00, 0xf9, 0x84, 
-       0x1c, 0x06, 0xd0, 0x02, 0x1c, 0x30, 0xb0, 0x02, 
-       0xe7, 0xea, 0x78, 0x68, 0x21, 0x20, 0x40, 0x01, 
-       0x91, 0x00, 0x99, 0x00, 0x1c, 0x38, 0xf0, 0x00, 
-       0xff, 0x3f, 0x68, 0xe9, 0x91, 0x01, 0x29, 0x00, 
-       0xd0, 0x03, 0x99, 0x01, 0x1c, 0x38, 0xf0, 0x03, 
-       0xfe, 0x7a, 0x20, 0x00, 0xb0, 0x02, 0xe7, 0xd7, 
-       0xb0, 0x02, 0xe7, 0xd5, 0x2e, 0x08, 0x5e, 0x5c, 
-       0xb5, 0xf3, 0x1c, 0x02, 0x99, 0x01, 0x06, 0x0f, 
-       0x0e, 0x3f, 0xb0, 0x86, 0x00, 0xb8, 0x4b, 0xa1, 
-       0x68, 0x1b, 0x18, 0xc0, 0x90, 0x00, 0x2f, 0x20, 
-       0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x06, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0xb8, 
-       0x4b, 0x9b, 0x58, 0x18, 0x90, 0x05, 0x28, 0x00, 
-       0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x06, 0xe7, 0xf2, 
-       0x78, 0x90, 0x90, 0x01, 0x71, 0xd7, 0x78, 0xd1, 
-       0x98, 0x01, 0x23, 0x80, 0x40, 0x18, 0xd1, 0x73, 
-       0x29, 0x20, 0xdd, 0x02, 0x20, 0xb1, 0xb0, 0x06, 
-       0xe7, 0xe5, 0x48, 0x92, 0x68, 0x00, 0x23, 0x01, 
-       0x42, 0xd8, 0xd1, 0x02, 0x20, 0xb2, 0xb0, 0x06, 
-       0xe7, 0xdd, 0x20, 0x01, 0x40, 0x88, 0x4b, 0x8d, 
-       0x68, 0x1b, 0x40, 0x18, 0xd0, 0x02, 0x20, 0xb1, 
-       0xb0, 0x06, 0xe7, 0xd4, 0x00, 0x88, 0x4b, 0x8a, 
-       0x50, 0x1a, 0x48, 0x8a, 0x54, 0x47, 0x01, 0x08, 
-       0x4b, 0x89, 0x18, 0xc5, 0x7f, 0x10, 0x06, 0x00, 
-       0x7f, 0x53, 0x04, 0x1b, 0x43, 0x18, 0x7f, 0x93, 
-       0x02, 0x1b, 0x43, 0x18, 0x7f, 0xd3, 0x43, 0x03, 
-       0xc5, 0x08, 0x1d, 0xd0, 0x30, 0x19, 0x78, 0x00, 
-       0x06, 0x00, 0x1d, 0xd3, 0x33, 0x19, 0x78, 0x5b, 
-       0x04, 0x1b, 0x43, 0x18, 0x1d, 0xd3, 0x33, 0x19, 
-       0x78, 0x9b, 0x02, 0x1b, 0x43, 0x18, 0x1d, 0xd3, 
-       0x33, 0x19, 0x78, 0xdb, 0x43, 0x03, 0xc5, 0x08, 
-       0x01, 0x08, 0x4b, 0x7a, 0x18, 0xc4, 0x7b, 0x10, 
-       0x06, 0x00, 0x7b, 0x53, 0x04, 0x1b, 0x43, 0x18, 
-       0x7b, 0x93, 0x02, 0x1b, 0x43, 0x18, 0x7b, 0xd3, 
-       0x43, 0x03, 0xc4, 0x08, 0x7c, 0x10, 0x06, 0x00, 
-       0x7c, 0x53, 0x04, 0x1b, 0x43, 0x18, 0x7c, 0x93, 
-       0x02, 0x1b, 0x43, 0x18, 0x7c, 0xd3, 0x43, 0x03, 
-       0xc4, 0x08, 0x98, 0x01, 0x07, 0xc0, 0x0f, 0xc0, 
-       0xd0, 0x20, 0x1d, 0xd0, 0x30, 0x19, 0x79, 0x00, 
-       0x06, 0x00, 0x1d, 0xd3, 0x33, 0x19, 0x79, 0x5b, 
-       0x04, 0x1b, 0x43, 0x18, 0x1d, 0xd3, 0x33, 0x19, 
-       0x79, 0x9b, 0x02, 0x1b, 0x43, 0x18, 0x1d, 0xd3, 
-       0x33, 0x19, 0x79, 0xdb, 0x43, 0x03, 0xc5, 0x08, 
-       0x7d, 0x10, 0x06, 0x00, 0x7d, 0x53, 0x04, 0x1b, 
-       0x43, 0x18, 0x7d, 0x93, 0x02, 0x1b, 0xe0, 0x00, 
-       0xe0, 0x42, 0x43, 0x18, 0x7d, 0xd3, 0x43, 0x03, 
-       0xc4, 0x08, 0xe0, 0x03, 0x23, 0x00, 0xc5, 0x08, 
-       0x23, 0x00, 0xc4, 0x08, 0x23, 0xff, 0xc5, 0x08, 
-       0x20, 0x19, 0x06, 0x80, 0x6b, 0x00, 0x23, 0x08, 
-       0x40, 0x18, 0xd0, 0x06, 0x88, 0x90, 0x04, 0x00, 
-       0x19, 0xc3, 0x93, 0x02, 0x9b, 0x02, 0xc4, 0x08, 
-       0xe0, 0x00, 0xc4, 0x80, 0x98, 0x01, 0x23, 0x08, 
-       0x40, 0x18, 0xd0, 0x17, 0x48, 0x50, 0x5d, 0xc0, 
-       0x30, 0x01, 0x4b, 0x4f, 0x55, 0xd8, 0x7a, 0x10, 
-       0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x04, 0x20, 0x01, 
-       0x40, 0x88, 0x23, 0x19, 0x06, 0x9b, 0x61, 0x18, 
-       0x7a, 0x10, 0x23, 0x02, 0x40, 0x18, 0xd0, 0x04, 
-       0x20, 0x01, 0x40, 0x88, 0x23, 0x19, 0x06, 0x9b, 
-       0x61, 0x58, 0xe0, 0x05, 0x4e, 0x45, 0x20, 0x01, 
-       0x40, 0x88, 0x68, 0x33, 0x43, 0x18, 0x60, 0x30, 
-       0x20, 0x01, 0x40, 0x88, 0x4b, 0x3b, 0x68, 0x1b, 
-       0x43, 0x18, 0x4b, 0x3a, 0x60, 0x18, 0xe0, 0x4f, 
-       0x98, 0x01, 0x23, 0x80, 0x40, 0x18, 0xd0, 0x48, 
-       0x48, 0x3d, 0x88, 0x00, 0x4b, 0x3d, 0x42, 0x98, 
-       0xd1, 0x02, 0x20, 0xb2, 0xb0, 0x06, 0xe7, 0x26, 
-       0x00, 0x88, 0x4b, 0x3b, 0x58, 0x18, 0x28, 0x00, 
-       0xd0, 0x02, 0x20, 0xb1, 0xb0, 0x06, 0xe7, 0x1e, 
-       0x29, 0x10, 0xdb, 0x02, 0x20, 0xb1, 0xb0, 0x06, 
-       0xe7, 0x19, 0x20, 0x01, 0x40, 0x88, 0x4b, 0x32, 
-       0x88, 0x1b, 0x40, 0x18, 0xd0, 0x02, 0x20, 0xb1, 
-       0xb0, 0x06, 0xe7, 0x10, 0x98, 0x05, 0x78, 0x80, 
-       0x28, 0x02, 0xdb, 0x02, 0x20, 0xb1, 0xb0, 0x06, 
-       0xe7, 0x09, 0x00, 0x88, 0x4b, 0x2c, 0x50, 0x1a, 
-       0x48, 0x2c, 0x54, 0x47, 0x00, 0xf8, 0x1b, 0xc0, 
-       0x00, 0x80, 0x4b, 0x2b, 0x68, 0x1b, 0x18, 0xc0, 
-       0x90, 0x04, 0x98, 0x04, 0x7e, 0x00, 0x28, 0xff, 
-       0xd1, 0x02, 0x98, 0x04, 0x76, 0x01, 0xe0, 0x01, 
-       0x98, 0x04, 0x76, 0x41, 0x4e, 0x25, 0x96, 0x03, 
-       0x1d, 0xd3, 0x33, 0x05, 0x00, 0x88, 0x9e, 0x03, 
-       0x50, 0x33, 0x20, 0x01, 0x40, 0x88, 0x4b, 0x1c, 
-       0x88, 0x1b, 0x43, 0x18, 0x4b, 0x1a, 0x80, 0x18, 
-       0xe0, 0x02, 0x20, 0xb1, 0xb0, 0x06, 0xe6, 0xe2, 
-       0x78, 0x50, 0x23, 0x80, 0x43, 0xdb, 0x40, 0x18, 
-       0x70, 0x50, 0x98, 0x05, 0x78, 0x80, 0x28, 0x00, 
-       0xd1, 0x09, 0x98, 0x00, 0x68, 0x00, 0x23, 0x01, 
-       0x03, 0x5b, 0x43, 0x18, 0x9b, 0x00, 0x60, 0x18, 
-       0x20, 0x02, 0x9b, 0x05, 0x70, 0xd8, 0x98, 0x05, 
-       0x78, 0x80, 0x30, 0x01, 0x9b, 0x05, 0x70, 0x98, 
-       0x20, 0x00, 0xb0, 0x06, 0xe6, 0xc7, 0xb0, 0x06, 
-       0xe6, 0xc5, 0x00, 0x00, 0x2e, 0x08, 0x5d, 0xcc, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x5e, 0xdc, 
-       0x2e, 0x08, 0x5e, 0xe4, 0x2e, 0x08, 0x5f, 0xa4, 
-       0x64, 0x00, 0x10, 0x00, 0x64, 0x00, 0x08, 0x00, 
-       0x2e, 0x08, 0x7b, 0xf4, 0x64, 0x00, 0x00, 0x18, 
-       0x2e, 0x08, 0x5e, 0xe0, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x5f, 0x64, 0x2e, 0x08, 0x5f, 0xc4, 
-       0x2e, 0x08, 0x5d, 0xc4, 0x9e, 0x00, 0x04, 0xb8, 
-       0xb5, 0xf3, 0x1c, 0x02, 0x99, 0x01, 0x06, 0x0f, 
-       0x0e, 0x3f, 0xb0, 0x86, 0x00, 0xb8, 0x4b, 0x65, 
-       0x68, 0x1b, 0x18, 0xc0, 0x90, 0x01, 0x2f, 0x20, 
-       0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x06, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0xb8, 
-       0x4b, 0x5f, 0x58, 0x18, 0x1c, 0x05, 0xd1, 0x02, 
-       0x20, 0xb0, 0xb0, 0x06, 0xe7, 0xf3, 0x78, 0x90, 
-       0x90, 0x03, 0x78, 0xd1, 0x00, 0x88, 0x4b, 0x5b, 
-       0x58, 0x18, 0x42, 0x90, 0xd0, 0x02, 0x20, 0xb1, 
-       0xb0, 0x06, 0xe7, 0xe8, 0x98, 0x03, 0x23, 0x80, 
-       0x40, 0x18, 0xd1, 0x49, 0x01, 0x08, 0x4b, 0x56, 
-       0x18, 0xc3, 0x93, 0x00, 0x20, 0x00, 0x9b, 0x00, 
-       0x60, 0x18, 0x23, 0x00, 0x00, 0x88, 0x4e, 0x51, 
-       0x50, 0x33, 0x23, 0xff, 0x48, 0x51, 0x54, 0x43, 
-       0x20, 0x01, 0x40, 0x88, 0x43, 0xc0, 0x4b, 0x50, 
-       0x68, 0x1b, 0x40, 0x18, 0x4b, 0x4e, 0x60, 0x18, 
-       0x98, 0x03, 0x23, 0x08, 0x40, 0x18, 0xd0, 0x27, 
-       0x20, 0x01, 0x40, 0x88, 0x90, 0x04, 0x7a, 0x10, 
-       0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x0b, 0x98, 0x04, 
-       0x23, 0x19, 0x06, 0x9b, 0x69, 0x1b, 0x40, 0x18, 
-       0xd0, 0x04, 0x98, 0x04, 0x23, 0x19, 0x06, 0x9b, 
-       0x61, 0x18, 0xe7, 0xf4, 0xe0, 0x0e, 0x7a, 0x10, 
-       0x23, 0x02, 0x40, 0x18, 0xd0, 0x0a, 0x98, 0x04, 
-       0x23, 0x19, 0x06, 0x9b, 0x69, 0x5b, 0x40, 0x18, 
-       0xd0, 0x04, 0x98, 0x04, 0x23, 0x19, 0x06, 0x9b, 
-       0x61, 0x58, 0xe7, 0xf4, 0x48, 0x3b, 0x5d, 0xc0, 
-       0x38, 0x01, 0x4b, 0x3a, 0x55, 0xd8, 0xe0, 0x06, 
-       0x4e, 0x39, 0x20, 0x01, 0x40, 0x88, 0x43, 0xc0, 
-       0x68, 0x33, 0x40, 0x18, 0x60, 0x30, 0xe0, 0x36, 
-       0x98, 0x03, 0x23, 0x80, 0x40, 0x18, 0xd0, 0x2f, 
-       0x00, 0xf8, 0x1b, 0xc0, 0x00, 0x80, 0x4b, 0x33, 
-       0x68, 0x1b, 0x18, 0xc3, 0x93, 0x02, 0x9b, 0x02, 
-       0x7e, 0x18, 0x42, 0x88, 0xd1, 0x03, 0x20, 0xff, 
-       0x9b, 0x02, 0x76, 0x18, 0xe0, 0x0a, 0x9b, 0x02, 
-       0x7e, 0x58, 0x42, 0x88, 0xd1, 0x03, 0x20, 0xff, 
-       0x9b, 0x02, 0x76, 0x58, 0xe0, 0x02, 0x20, 0xb1, 
-       0xb0, 0x06, 0xe7, 0x7c, 0x23, 0x00, 0x00, 0x88, 
-       0x4e, 0x27, 0x50, 0x33, 0x20, 0xff, 0x4b, 0x27, 
-       0x54, 0x58, 0x20, 0x01, 0x40, 0x88, 0x43, 0xc0, 
-       0x4b, 0x25, 0x88, 0x1b, 0x40, 0x18, 0x4b, 0x24, 
-       0x80, 0x18, 0x4e, 0x24, 0x96, 0x05, 0x23, 0x00, 
-       0x00, 0x88, 0x9e, 0x05, 0x50, 0x33, 0xe0, 0x02, 
-       0x20, 0xb1, 0xb0, 0x06, 0xe7, 0x63, 0x78, 0xa8, 
-       0x38, 0x01, 0x70, 0xa8, 0x78, 0x50, 0x23, 0x80, 
-       0x43, 0x18, 0x70, 0x50, 0x78, 0xa8, 0x28, 0x00, 
-       0xd1, 0x07, 0x98, 0x01, 0x68, 0x00, 0x4b, 0x1a, 
-       0x40, 0x18, 0x9b, 0x01, 0x60, 0x18, 0x20, 0x01, 
-       0x70, 0xe8, 0x24, 0x1f, 0x2c, 0x00, 0xd1, 0x02, 
-       0xe0, 0x0a, 0x3c, 0x01, 0xe7, 0xfa, 0x48, 0x0d, 
-       0x5d, 0x00, 0x28, 0x00, 0xd1, 0x03, 0x20, 0x19, 
-       0x06, 0x80, 0x64, 0xc4, 0xe0, 0x00, 0xe7, 0xf4, 
-       0x20, 0x00, 0xb0, 0x06, 0xe7, 0x3f, 0xb0, 0x06, 
-       0xe7, 0x3d, 0x00, 0x00, 0x2e, 0x08, 0x5d, 0xcc, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x5e, 0xe4, 
-       0x64, 0x00, 0x08, 0x08, 0x2e, 0x08, 0x5f, 0xa4, 
-       0x2e, 0x08, 0x5e, 0xdc, 0x2e, 0x08, 0x7b, 0xf4, 
-       0x64, 0x00, 0x00, 0x18, 0x2e, 0x08, 0x5d, 0xc4, 
-       0x2e, 0x08, 0x5f, 0x64, 0x2e, 0x08, 0x5f, 0xc4, 
-       0x2e, 0x08, 0x5e, 0xe0, 0x9e, 0x00, 0x04, 0xb8, 
-       0xff, 0xff, 0xdf, 0xff, 0x1c, 0x03, 0x1c, 0x0a, 
-       0x78, 0x58, 0x70, 0x10, 0x20, 0x00, 0x47, 0x70, 
-       0xe7, 0xfd, 0xb5, 0xf7, 0x1c, 0x07, 0xb0, 0x81, 
-       0x9a, 0x03, 0x06, 0x10, 0x0e, 0x00, 0x90, 0x00, 
-       0xb0, 0x87, 0x78, 0x78, 0x23, 0x80, 0x40, 0x18, 
-       0xd0, 0x4c, 0x78, 0x78, 0x23, 0x80, 0x40, 0x18, 
-       0xd0, 0x48, 0x78, 0xb8, 0x90, 0x06, 0x99, 0x09, 
-       0x78, 0x88, 0x90, 0x05, 0x98, 0x06, 0x23, 0x20, 
-       0x40, 0x18, 0xd0, 0x3f, 0x98, 0x05, 0x23, 0x20, 
-       0x40, 0x18, 0xd0, 0x3b, 0x6b, 0x38, 0x90, 0x01, 
-       0x99, 0x09, 0x6b, 0x08, 0x90, 0x00, 0x98, 0x01, 
-       0x28, 0x00, 0xd1, 0x02, 0x98, 0x00, 0x28, 0x00, 
-       0xd0, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0x28, 0x00, 0xd1, 0x05, 0x20, 0xb6, 0xb0, 0x08, 
-       0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x98, 0x01, 0x68, 0x05, 0x98, 0x00, 0x68, 0x04, 
-       0x7a, 0x2e, 0x7a, 0x21, 0x91, 0x04, 0x7d, 0x6a, 
-       0x92, 0x03, 0x7d, 0x62, 0x92, 0x02, 0x98, 0x07, 
-       0x28, 0x00, 0xd0, 0x0a, 0x9a, 0x02, 0x99, 0x04, 
-       0x1c, 0x28, 0xf0, 0x00, 0xfc, 0xe5, 0x9a, 0x03, 
-       0x1c, 0x31, 0x1c, 0x20, 0xf0, 0x00, 0xfc, 0xe0, 
-       0xe0, 0x09, 0x99, 0x04, 0x1c, 0x28, 0x22, 0x00, 
-       0xf0, 0x00, 0xfc, 0xda, 0x1c, 0x31, 0x1c, 0x20, 
-       0x22, 0x00, 0xf0, 0x00, 0xfc, 0xd5, 0x20, 0x00, 
-       0xb0, 0x08, 0xe7, 0xd5, 0x20, 0xb1, 0xb0, 0x08, 
-       0xe7, 0xd2, 0xb0, 0x07, 0xb0, 0x01, 0xe7, 0xcf, 
-       0xb4, 0xf0, 0x1c, 0x02, 0x1c, 0x0b, 0x06, 0x1d, 
-       0x0e, 0x2d, 0xb0, 0x82, 0x2d, 0x00, 0xd1, 0x0a, 
-       0x48, 0x1a, 0x69, 0x00, 0x90, 0x01, 0x49, 0x1a, 
-       0x48, 0x18, 0x69, 0x40, 0x90, 0x00, 0x48, 0x17, 
-       0x6a, 0x00, 0x1e, 0x44, 0xe0, 0x10, 0x2d, 0x20, 
-       0xd1, 0x0a, 0x48, 0x14, 0x69, 0x80, 0x90, 0x01, 
-       0x49, 0x14, 0x48, 0x12, 0x69, 0xc0, 0x90, 0x00, 
-       0x48, 0x10, 0x6a, 0x40, 0x1e, 0x44, 0xe0, 0x03, 
-       0x20, 0xb3, 0xb0, 0x02, 0xbc, 0xf0, 0x47, 0x70, 
-       0x20, 0x00, 0x70, 0x10, 0x78, 0x50, 0x00, 0x80, 
-       0x4e, 0x0d, 0x58, 0x37, 0x69, 0x38, 0x61, 0x78, 
-       0x98, 0x01, 0x9e, 0x00, 0x42, 0xb0, 0xd0, 0x07, 
-       0x98, 0x01, 0x30, 0x01, 0x90, 0x01, 0x98, 0x01, 
-       0x40, 0x20, 0x90, 0x01, 0x98, 0x01, 0x60, 0x08, 
-       0x20, 0x00, 0xb0, 0x02, 0xe7, 0xe6, 0xb0, 0x02, 
-       0xe7, 0xe4, 0x00, 0x00, 0x9e, 0x00, 0x04, 0x80, 
-       0x9e, 0x00, 0x04, 0x90, 0x9e, 0x00, 0x04, 0x98, 
-       0x2e, 0x08, 0x5e, 0x5c, 0xb5, 0xf3, 0x1c, 0x07, 
-       0xb0, 0x81, 0x99, 0x02, 0x06, 0x08, 0x0e, 0x00, 
-       0x90, 0x00, 0xb0, 0x88, 0x98, 0x08, 0x28, 0x00, 
-       0xd1, 0x0e, 0x49, 0x69, 0x91, 0x02, 0x48, 0x69, 
-       0x69, 0x00, 0x90, 0x07, 0x48, 0x68, 0x90, 0x06, 
-       0x48, 0x66, 0x69, 0x40, 0x90, 0x05, 0x48, 0x65, 
-       0x6a, 0x00, 0x1e, 0x41, 0x91, 0x04, 0xe0, 0x17, 
-       0x98, 0x08, 0x28, 0x20, 0xd1, 0x0e, 0x49, 0x63, 
-       0x91, 0x02, 0x48, 0x60, 0x69, 0x80, 0x90, 0x07, 
-       0x48, 0x61, 0x90, 0x06, 0x48, 0x5d, 0x69, 0xc0, 
-       0x90, 0x05, 0x48, 0x5c, 0x6a, 0x40, 0x1e, 0x41, 
-       0x91, 0x04, 0xe0, 0x05, 0x20, 0xb3, 0xb0, 0x09, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x25, 0x00, 0x98, 0x07, 0x99, 0x05, 0x42, 0x88, 
-       0xd0, 0x73, 0x2d, 0x00, 0xd1, 0x72, 0x98, 0x07, 
-       0x00, 0x80, 0x99, 0x02, 0x18, 0x40, 0x23, 0x01, 
-       0x02, 0x9b, 0x18, 0xc0, 0x68, 0x01, 0x91, 0x03, 
-       0x98, 0x07, 0x00, 0x80, 0x99, 0x02, 0x58, 0x08, 
-       0x90, 0x01, 0x99, 0x02, 0x98, 0x07, 0x18, 0x08, 
-       0x23, 0x01, 0x02, 0xdb, 0x18, 0xc0, 0x78, 0x00, 
-       0x90, 0x00, 0x20, 0x00, 0x99, 0x02, 0x9a, 0x07, 
-       0x18, 0x89, 0x23, 0x01, 0x02, 0xdb, 0x18, 0xc9, 
-       0x70, 0x08, 0x98, 0x07, 0x30, 0x01, 0x90, 0x07, 
-       0x98, 0x07, 0x99, 0x04, 0x40, 0x08, 0x90, 0x07, 
-       0x99, 0x03, 0x29, 0x00, 0xd0, 0x71, 0xb0, 0x83, 
-       0x20, 0x00, 0x90, 0x00, 0x99, 0x06, 0x91, 0x02, 
-       0x20, 0x01, 0x90, 0x01, 0x98, 0x03, 0x28, 0x80, 
-       0xd1, 0x1f, 0x24, 0x00, 0x2c, 0x10, 0xd3, 0x02, 
-       0xe0, 0x1a, 0x34, 0x01, 0xe7, 0xfa, 0x98, 0x01, 
-       0x99, 0x02, 0x40, 0x08, 0xd0, 0x10, 0x48, 0x39, 
-       0x5d, 0x00, 0x28, 0xff, 0xd0, 0x0c, 0x48, 0x37, 
-       0x5d, 0x00, 0x90, 0x00, 0x00, 0xa0, 0x49, 0x36, 
-       0x58, 0x09, 0x00, 0xa8, 0x19, 0xc0, 0x61, 0x01, 
-       0x1c, 0x68, 0x06, 0x05, 0x0e, 0x2d, 0xe0, 0x03, 
-       0x98, 0x01, 0x00, 0x40, 0x90, 0x01, 0xe7, 0xe4, 
-       0xe0, 0x1d, 0x24, 0x00, 0x2c, 0x20, 0xd3, 0x02, 
-       0xe0, 0x19, 0x34, 0x01, 0xe7, 0xfa, 0x98, 0x01, 
-       0x99, 0x02, 0x40, 0x08, 0xd0, 0x0f, 0x48, 0x2b, 
-       0x5d, 0x00, 0x28, 0xff, 0xd0, 0x0b, 0x48, 0x29, 
-       0x5d, 0x00, 0x90, 0x00, 0x00, 0xa0, 0x49, 0x28, 
-       0x58, 0x09, 0x00, 0xa8, 0x19, 0xc0, 0x61, 0x01, 
-       0x1c, 0x68, 0x06, 0x05, 0x0e, 0x2d, 0x98, 0x01, 
-       0x00, 0x40, 0x90, 0x01, 0xe7, 0xe5, 0x2d, 0x00, 
-       0xe0, 0x01, 0xe0, 0x27, 0xe0, 0x26, 0xd0, 0x23, 
-       0xb0, 0x81, 0x98, 0x01, 0x70, 0x78, 0x98, 0x05, 
-       0x60, 0x78, 0x98, 0x01, 0x00, 0x80, 0x49, 0x1d, 
-       0x58, 0x08, 0x90, 0x00, 0x98, 0x00, 0x69, 0x46, 
-       0x98, 0x05, 0x42, 0xb0, 0xd3, 0x04, 0x1d, 0xf0, 
-       0x30, 0xb9, 0x99, 0x05, 0x42, 0x88, 0xd2, 0x08, 
-       0x68, 0x30, 0x28, 0x00, 0xd0, 0x01, 0x68, 0x36, 
-       0xe0, 0x02, 0x20, 0xba, 0xb0, 0x0d, 0xe7, 0x63, 
-       0xe7, 0xee, 0x60, 0xbe, 0x98, 0x00, 0x61, 0x46, 
-       0x1c, 0x38, 0xf0, 0x00, 0xfb, 0x02, 0xb0, 0x01, 
-       0xb0, 0x03, 0xe7, 0x5e, 0x70, 0x3d, 0x98, 0x07, 
-       0x99, 0x06, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x09, 
-       0xe7, 0x52, 0xb0, 0x08, 0xb0, 0x01, 0xe7, 0x4f, 
-       0x2e, 0x08, 0x60, 0x90, 0x9e, 0x00, 0x04, 0x80, 
-       0x9e, 0x00, 0x04, 0x90, 0x2e, 0x08, 0x69, 0x90, 
-       0x9e, 0x00, 0x04, 0x98, 0x2e, 0x08, 0x5f, 0xc4, 
-       0x2e, 0x08, 0x5f, 0x64, 0x2e, 0x08, 0x5f, 0xa4, 
-       0x2e, 0x08, 0x5e, 0xe4, 0x2e, 0x08, 0x5e, 0x5c, 
-       0xb4, 0x90, 0x1c, 0x01, 0x78, 0x48, 0x00, 0x80, 
-       0x4c, 0x0d, 0x58, 0x23, 0x69, 0x1a, 0x68, 0x8f, 
-       0x42, 0xba, 0xd0, 0x12, 0x68, 0x10, 0x42, 0xb8, 
-       0xd0, 0x08, 0x68, 0x10, 0x28, 0x00, 0xd0, 0x01, 
-       0x68, 0x12, 0xe0, 0x02, 0x20, 0xba, 0xbc, 0x90, 
-       0x47, 0x70, 0xe7, 0xf3, 0x20, 0x00, 0x60, 0x10, 
-       0x69, 0x9c, 0x69, 0x18, 0x60, 0x20, 0x61, 0x1f, 
-       0x61, 0x9a, 0x20, 0x00, 0xe7, 0xf3, 0xe7, 0xf2, 
-       0x2e, 0x08, 0x5e, 0x5c, 0xb4, 0xb0, 0x1c, 0x02, 
-       0x1c, 0x0f, 0x78, 0x90, 0x23, 0x04, 0x40, 0x18, 
-       0xd0, 0x1c, 0x78, 0x90, 0x23, 0x20, 0x40, 0x18, 
-       0xd0, 0x18, 0x6b, 0x14, 0x68, 0x20, 0x28, 0x00, 
-       0xd0, 0x02, 0x1d, 0xe5, 0x35, 0x05, 0xe0, 0x01, 
-       0x1d, 0xe5, 0x35, 0x31, 0x21, 0x00, 0x29, 0x08, 
-       0xdb, 0x04, 0xe0, 0x08, 0x1c, 0x48, 0x06, 0x01, 
-       0x0e, 0x09, 0xe7, 0xf8, 0x00, 0x88, 0x58, 0x2b, 
-       0x00, 0x88, 0x50, 0x3b, 0xe7, 0xf6, 0x20, 0x00, 
-       0xbc, 0xb0, 0x47, 0x70, 0x20, 0xb1, 0xe7, 0xfb, 
-       0xe7, 0xfa, 0xb5, 0xf3, 0x1c, 0x0a, 0xb0, 0x93, 
-       0x20, 0x00, 0x90, 0x06, 0x98, 0x13, 0x69, 0x00, 
-       0x90, 0x00, 0x98, 0x00, 0x6b, 0x00, 0x90, 0x12, 
-       0x98, 0x00, 0x78, 0x80, 0x90, 0x05, 0x98, 0x12, 
-       0x68, 0x00, 0x90, 0x01, 0x28, 0x00, 0xd0, 0x03, 
-       0x98, 0x12, 0x30, 0x0c, 0x90, 0x09, 0xe0, 0x0e, 
-       0x98, 0x12, 0x6a, 0xc0, 0x90, 0x01, 0x28, 0x00, 
-       0xd0, 0x03, 0x98, 0x12, 0x30, 0x38, 0x90, 0x09, 
-       0xe0, 0x05, 0x20, 0xb1, 0xb0, 0x13, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 
-       0x90, 0x06, 0x98, 0x05, 0x23, 0x04, 0x40, 0x18, 
-       0xd0, 0x73, 0x21, 0x00, 0x29, 0x08, 0xdb, 0x04, 
-       0xe0, 0x0c, 0x1c, 0x48, 0x06, 0x01, 0x0e, 0x09, 
-       0xe7, 0xf8, 0x98, 0x13, 0x30, 0x80, 0x69, 0x00, 
-       0x00, 0x8b, 0x58, 0xc0, 0x00, 0x8e, 0xab, 0x0a, 
-       0x51, 0x98, 0xe7, 0xf2, 0x9d, 0x01, 0x21, 0x00, 
-       0x29, 0x08, 0xdb, 0x04, 0xe0, 0xa7, 0x1c, 0x48, 
-       0x06, 0x01, 0x0e, 0x09, 0xe7, 0xf8, 0x00, 0x88, 
-       0xab, 0x0a, 0x58, 0x18, 0x28, 0x00, 0xd0, 0x55, 
-       0x20, 0x00, 0x90, 0x08, 0x48, 0x73, 0x90, 0x07, 
-       0x20, 0x00, 0x90, 0x02, 0x98, 0x02, 0x28, 0x20, 
-       0xdb, 0x06, 0xe0, 0x8d, 0x98, 0x02, 0x30, 0x01, 
-       0x06, 0x00, 0x0e, 0x00, 0x90, 0x02, 0xe7, 0xf5, 
-       0x00, 0x8b, 0xa8, 0x0a, 0x58, 0xc0, 0x9b, 0x07, 
-       0x40, 0x18, 0x90, 0x08, 0x28, 0x00, 0xd0, 0x73, 
-       0x00, 0x88, 0x9b, 0x09, 0x58, 0x18, 0x9b, 0x08, 
-       0x40, 0x18, 0xd0, 0x6e, 0x1d, 0xec, 0x34, 0x01, 
-       0x27, 0x00, 0x79, 0xa0, 0x9b, 0x06, 0x42, 0x98, 
-       0xd0, 0x08, 0x68, 0x68, 0x1c, 0x05, 0xd1, 0x02, 
-       0x20, 0xba, 0xb0, 0x13, 0xe7, 0xab, 0x1d, 0xec, 
-       0x34, 0x01, 0xe7, 0xf2, 0x78, 0x60, 0x07, 0x00, 
-       0x0f, 0x00, 0x02, 0x00, 0x04, 0x07, 0x0c, 0x3f, 
-       0x78, 0xa0, 0x19, 0xc0, 0x30, 0x03, 0x04, 0x07, 
-       0x0c, 0x3f, 0x2a, 0x00, 0xd0, 0x42, 0x98, 0x13, 
-       0x88, 0x40, 0x42, 0xb8, 0xdb, 0x3a, 0x98, 0x13, 
-       0x88, 0x40, 0x1b, 0xc0, 0x9b, 0x13, 0x80, 0x58, 
-       0x20, 0xbc, 0x90, 0x04, 0x2f, 0x00, 0xdd, 0x30, 
-       0x2f, 0xbc, 0xdd, 0x1b, 0x20, 0x00, 0x90, 0x03, 
-       0x98, 0x03, 0x28, 0xbc, 0xdb, 0x09, 0xe0, 0x0d, 
-       0x98, 0x03, 0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 
-       0xe0, 0x01, 0xe0, 0x4c, 0xe0, 0x41, 0x90, 0x03, 
-       0xe7, 0xf2, 0x78, 0x23, 0x34, 0x01, 0x70, 0x13, 
-       0x32, 0x01, 0xe7, 0xf1, 0x1f, 0xf8, 0x38, 0xb5, 
-       0x04, 0x07, 0x0c, 0x3f, 0x68, 0x2d, 0x1d, 0xec, 
-       0x34, 0x01, 0xe0, 0x11, 0x20, 0x00, 0x90, 0x03, 
-       0x98, 0x03, 0x42, 0xb8, 0xdb, 0x06, 0xe0, 0x0a, 
-       0x98, 0x03, 0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 
-       0x90, 0x03, 0xe7, 0xf5, 0x78, 0x23, 0x34, 0x01, 
-       0x70, 0x13, 0x32, 0x01, 0xe7, 0xf4, 0x27, 0x00, 
-       0xe7, 0xcc, 0xe0, 0x02, 0x20, 0xb7, 0xb0, 0x13, 
-       0xe7, 0x59, 0xe0, 0x04, 0x98, 0x13, 0x88, 0x40, 
-       0x19, 0xc0, 0x9b, 0x13, 0x80, 0x58, 0x00, 0x88, 
-       0xab, 0x0a, 0x58, 0x18, 0x9b, 0x07, 0x43, 0x98, 
-       0x00, 0x8e, 0xab, 0x0a, 0x51, 0x98, 0xe0, 0x01, 
-       0xe0, 0x01, 0xe0, 0x00, 0x9d, 0x01, 0x98, 0x06, 
-       0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x06, 
-       0x98, 0x07, 0x08, 0x40, 0x90, 0x07, 0xe7, 0x71, 
-       0xe0, 0x04, 0x98, 0x06, 0x30, 0x20, 0x06, 0x00, 
-       0x0e, 0x00, 0x90, 0x06, 0xe7, 0x57, 0x20, 0x00, 
-       0xb0, 0x13, 0xe7, 0x34, 0xe0, 0x44, 0x98, 0x05, 
-       0x23, 0x02, 0x40, 0x18, 0xd0, 0x3b, 0x98, 0x01, 
-       0x1d, 0xc4, 0x34, 0x01, 0x78, 0x60, 0x07, 0x00, 
-       0x0f, 0x00, 0x02, 0x00, 0x04, 0x07, 0x0c, 0x3f, 
-       0x78, 0xa0, 0x19, 0xc0, 0x30, 0x03, 0x04, 0x07, 
-       0x0c, 0x3f, 0x2f, 0x00, 0xdd, 0x28, 0x2f, 0xbc, 
-       0xdd, 0x17, 0x21, 0x00, 0x29, 0xbc, 0xdb, 0x04, 
-       0xe0, 0x08, 0x1c, 0x48, 0x06, 0x01, 0x0e, 0x09, 
-       0xe7, 0xf8, 0x78, 0x23, 0x34, 0x01, 0x70, 0x13, 
-       0x32, 0x01, 0xe7, 0xf6, 0x1f, 0xf8, 0x38, 0xb5, 
-       0x04, 0x07, 0x0c, 0x3f, 0x98, 0x01, 0x68, 0x00, 
-       0x90, 0x01, 0x98, 0x01, 0x1d, 0xc4, 0x34, 0x01, 
-       0xe0, 0x0d, 0x21, 0x00, 0x42, 0xb9, 0xdb, 0x04, 
-       0xe0, 0x08, 0x1c, 0x48, 0x06, 0x01, 0x0e, 0x09, 
-       0xe7, 0xf8, 0x78, 0x23, 0x34, 0x01, 0x70, 0x13, 
-       0x32, 0x01, 0xe7, 0xf6, 0x27, 0x00, 0xe7, 0xd4, 
-       0x20, 0x00, 0xb0, 0x13, 0xe6, 0xf3, 0x20, 0xb1, 
-       0xb0, 0x13, 0xe6, 0xf0, 0xb0, 0x13, 0xe6, 0xee, 
-       0xe6, 0xed, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 
-       0xb5, 0xf3, 0xb0, 0x84, 0x98, 0x04, 0x78, 0x40, 
-       0x00, 0x80, 0x49, 0x4b, 0x58, 0x08, 0x90, 0x03, 
-       0x28, 0x00, 0xd1, 0x05, 0x20, 0xb0, 0xb0, 0x04, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x98, 0x04, 0x68, 0x86, 0x98, 0x04, 0x88, 0x47, 
-       0x98, 0x04, 0x68, 0x44, 0x1d, 0xf0, 0x30, 0xb9, 
-       0x99, 0x04, 0x68, 0x49, 0x1a, 0x45, 0x42, 0xbd, 
-       0xdb, 0x0c, 0x2f, 0x00, 0xdb, 0x01, 0x2f, 0xbc, 
-       0xdd, 0x02, 0x20, 0xba, 0xb0, 0x04, 0xe7, 0xe7, 
-       0x1c, 0x3a, 0x99, 0x05, 0x1c, 0x20, 0xf0, 0x00, 
-       0xf9, 0x29, 0xe0, 0x6b, 0x20, 0x00, 0x90, 0x00, 
-       0x98, 0x04, 0x78, 0x40, 0x00, 0xc3, 0x1a, 0x18, 
-       0x00, 0x80, 0x49, 0x36, 0x68, 0x09, 0x18, 0x40, 
-       0x90, 0x01, 0x98, 0x01, 0x78, 0x80, 0x90, 0x02, 
-       0x98, 0x02, 0x06, 0xc0, 0x0e, 0xc0, 0x90, 0x02, 
-       0x98, 0x02, 0x28, 0x12, 0xd1, 0x03, 0x2d, 0x0e, 
-       0xda, 0x01, 0x20, 0x01, 0x90, 0x00, 0x2f, 0x00, 
-       0xdd, 0x50, 0xb0, 0x81, 0x42, 0xaf, 0xdd, 0x0d, 
-       0x2d, 0x00, 0xdb, 0x01, 0x2d, 0xbc, 0xdd, 0x02, 
-       0x20, 0xba, 0xb0, 0x05, 0xe7, 0xbc, 0x1c, 0x2a, 
-       0x99, 0x06, 0x1c, 0x20, 0xf0, 0x00, 0xf8, 0xfe, 
-       0x68, 0x36, 0xe0, 0x0b, 0x2f, 0x00, 0xdb, 0x01, 
-       0x2f, 0xbc, 0xdd, 0x02, 0x20, 0xba, 0xb0, 0x05, 
-       0xe7, 0xae, 0x1c, 0x3a, 0x99, 0x06, 0x1c, 0x20, 
-       0xf0, 0x00, 0xf8, 0xf0, 0x99, 0x06, 0x19, 0x49, 
-       0x91, 0x06, 0x1b, 0x7f, 0x1d, 0x31, 0x91, 0x00, 
-       0x99, 0x00, 0x78, 0x88, 0x19, 0x84, 0x98, 0x01, 
-       0x28, 0x00, 0xd0, 0x20, 0x99, 0x00, 0x78, 0xc8, 
-       0x23, 0x80, 0x40, 0x18, 0xd1, 0x1b, 0x1d, 0xf0, 
-       0x30, 0xb9, 0x1b, 0x05, 0x42, 0xbd, 0xdb, 0x01, 
-       0x3c, 0x01, 0xe0, 0x14, 0x1c, 0x68, 0x42, 0xb8, 
-       0xd1, 0x11, 0x99, 0x00, 0x78, 0x88, 0x28, 0x09, 
-       0xdd, 0x08, 0x99, 0x00, 0x79, 0x08, 0x30, 0x09, 
-       0x99, 0x00, 0x78, 0x89, 0x42, 0x88, 0xd0, 0x00, 
-       0x3c, 0x01, 0xe0, 0x04, 0x99, 0x00, 0x78, 0x88, 
-       0x28, 0x09, 0xd1, 0x00, 0x3c, 0x01, 0x20, 0x00, 
-       0x90, 0x01, 0x1d, 0xf0, 0x30, 0xb9, 0x1b, 0x05, 
-       0xb0, 0x01, 0xe7, 0xac, 0x20, 0x00, 0xb0, 0x04, 
-       0xe7, 0x72, 0xb0, 0x04, 0xe7, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x5d, 0xc4, 
-       0xb5, 0xf1, 0x98, 0x00, 0x06, 0x04, 0x0e, 0x24, 
-       0xb0, 0x83, 0x00, 0xa0, 0x4b, 0x4c, 0x58, 0x1d, 
-       0x78, 0x28, 0x90, 0x02, 0x2c, 0x20, 0xdb, 0x05, 
-       0x20, 0xa2, 0xb0, 0x03, 0xb0, 0x01, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0xa0, 0x4b, 0x46, 
-       0x58, 0x18, 0x1c, 0x05, 0xd1, 0x02, 0x20, 0xb0, 
-       0xb0, 0x03, 0xe7, 0xf3, 0x00, 0xe0, 0x1b, 0x00, 
-       0x00, 0x80, 0x4b, 0x42, 0x68, 0x1b, 0x18, 0xc7, 
-       0x78, 0xa8, 0x28, 0x00, 0xd0, 0x63, 0x20, 0x00, 
-       0x42, 0x80, 0xd0, 0x20, 0x21, 0x00, 0x29, 0x20, 
-       0xdb, 0x04, 0xe0, 0x1b, 0x1c, 0x48, 0x06, 0x01, 
-       0x0e, 0x09, 0xe7, 0xf8, 0x00, 0x88, 0x4b, 0x3a, 
-       0x58, 0x18, 0x90, 0x01, 0x98, 0x01, 0x79, 0xc0, 
-       0x42, 0xa0, 0xd1, 0x0e, 0x20, 0x01, 0x40, 0x88, 
-       0x43, 0xc0, 0x4b, 0x36, 0x68, 0x1b, 0x40, 0x18, 
-       0x4b, 0x34, 0x60, 0x18, 0x23, 0x00, 0x00, 0x88, 
-       0x4e, 0x31, 0x50, 0x33, 0x23, 0xff, 0x48, 0x32, 
-       0x54, 0x43, 0xe7, 0xe3, 0xe0, 0x3f, 0x7e, 0x38, 
-       0x1c, 0x02, 0x28, 0xff, 0xd0, 0x10, 0x20, 0xff, 
-       0x4b, 0x2e, 0x54, 0x98, 0x23, 0x00, 0x00, 0x90, 
-       0x4e, 0x2d, 0x50, 0x33, 0x20, 0x01, 0x40, 0x90, 
-       0x43, 0xc0, 0x4b, 0x2c, 0x88, 0x1b, 0x40, 0x18, 
-       0x4b, 0x2a, 0x80, 0x18, 0x20, 0xff, 0x76, 0x38, 
-       0x7e, 0x78, 0x1c, 0x02, 0x28, 0xff, 0xd0, 0x11, 
-       0x20, 0xff, 0x4b, 0x24, 0x54, 0x98, 0x23, 0x00, 
-       0x00, 0x90, 0x4e, 0x23, 0x50, 0x33, 0x20, 0x01, 
-       0x40, 0x90, 0x43, 0xc0, 0x4b, 0x21, 0x88, 0x1b, 
-       0x40, 0x18, 0x4b, 0x20, 0x80, 0x18, 0x20, 0xff, 
-       0x76, 0x78, 0xe0, 0x02, 0x20, 0xb1, 0xb0, 0x03, 
-       0xe7, 0x98, 0x23, 0x00, 0x00, 0x90, 0x4e, 0x1a, 
-       0x50, 0x33, 0x20, 0x01, 0x40, 0x90, 0x43, 0xc0, 
-       0x4b, 0x18, 0x88, 0x1b, 0x40, 0x18, 0x4b, 0x17, 
-       0x80, 0x18, 0x4e, 0x17, 0x96, 0x00, 0x20, 0x00, 
-       0x00, 0x93, 0x9e, 0x00, 0x50, 0xf0, 0x98, 0x02, 
-       0x23, 0x20, 0x40, 0x18, 0xd0, 0xff, 0x21, 0x00, 
-       0x29, 0x0c, 0xdb, 0x04, 0xe0, 0x07, 0x1c, 0x48, 
-       0x06, 0x01, 0x0e, 0x09, 0xe7, 0xf8, 0x20, 0x00, 
-       0x18, 0x7b, 0x73, 0x18, 0xe7, 0xf7, 0x20, 0x00, 
-       0x83, 0x38, 0x20, 0x00, 0x70, 0xf8, 0x20, 0x00, 
-       0xb0, 0x03, 0xe7, 0x6f, 0xb0, 0x03, 0xe7, 0x6d, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x5d, 0xc4, 
-       0x2e, 0x08, 0x5e, 0xe4, 0x2e, 0x08, 0x5e, 0xdc, 
-       0x2e, 0x08, 0x5f, 0xa4, 0x2e, 0x08, 0x5f, 0xc4, 
-       0x2e, 0x08, 0x5f, 0x64, 0x2e, 0x08, 0x5e, 0xe0, 
-       0x9e, 0x00, 0x04, 0xb8, 0xb5, 0xf0, 0x1c, 0x05, 
-       0x1c, 0x0c, 0x1c, 0x17, 0x20, 0x1d, 0x02, 0x80, 
-       0x69, 0x86, 0x1c, 0x3a, 0x1c, 0x29, 0x1c, 0x20, 
-       0xf0, 0x08, 0xfb, 0x32, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0xb4, 0xf0, 0x1c, 0x01, 0xb0, 0x82, 
-       0x68, 0x48, 0x68, 0x8c, 0x1d, 0xe2, 0x32, 0xb7, 
-       0x42, 0x82, 0xd9, 0x09, 0x78, 0x42, 0x07, 0x12, 
-       0x0f, 0x12, 0x02, 0x12, 0x78, 0x83, 0x43, 0x1a, 
-       0x32, 0x03, 0x04, 0x17, 0x0c, 0x3f, 0xe0, 0x41, 
-       0xb0, 0x82, 0x68, 0x23, 0x93, 0x01, 0x9b, 0x01, 
-       0x33, 0x04, 0x93, 0x00, 0x9b, 0x00, 0x78, 0x9b, 
-       0x9e, 0x01, 0x19, 0x9a, 0x78, 0x4e, 0x00, 0xf3, 
-       0x1b, 0x9b, 0x00, 0x9b, 0x4e, 0x1b, 0x68, 0x36, 
-       0x19, 0x9b, 0x93, 0x02, 0x9b, 0x02, 0x78, 0x9d, 
-       0x06, 0xed, 0x0e, 0xed, 0x2d, 0x12, 0xd1, 0x0f, 
-       0x1d, 0xe3, 0x33, 0xb9, 0x68, 0x4e, 0x1b, 0x9b, 
-       0x06, 0x1b, 0x0e, 0x1b, 0x93, 0x03, 0x9b, 0x00, 
-       0x78, 0xde, 0x23, 0x80, 0x40, 0x33, 0xd1, 0x03, 
-       0x9b, 0x03, 0x2b, 0x0e, 0xda, 0x00, 0x3a, 0x01, 
-       0x1d, 0xe3, 0x33, 0xb8, 0x42, 0x83, 0xd9, 0x0b, 
-       0x78, 0x43, 0x07, 0x1b, 0x0f, 0x1b, 0x02, 0x1b, 
-       0x04, 0x1f, 0x0c, 0x3f, 0x78, 0x13, 0x18, 0xfb, 
-       0x33, 0x03, 0x04, 0x1f, 0x0c, 0x3f, 0xe0, 0x08, 
-       0x78, 0x13, 0x07, 0x1b, 0x0f, 0x1b, 0x02, 0x1b, 
-       0x78, 0x56, 0x43, 0x33, 0x33, 0x03, 0x04, 0x1f, 
-       0x0c, 0x3f, 0xb0, 0x02, 0x80, 0x4f, 0xb0, 0x02, 
-       0xbc, 0xf0, 0x47, 0x70, 0x2e, 0x08, 0x5d, 0xc4, 
-       0xb5, 0xf3, 0xb0, 0x81, 0x99, 0x02, 0x06, 0x0b, 
-       0x0e, 0x1b, 0x93, 0x00, 0x9b, 0x00, 0x2b, 0x00, 
-       0xd1, 0x0a, 0x49, 0x24, 0x4b, 0x24, 0x69, 0x1b, 
-       0x1c, 0x18, 0x4b, 0x23, 0x69, 0x5b, 0x1c, 0x1c, 
-       0x4b, 0x21, 0x6a, 0x1b, 0x1e, 0x5a, 0xe0, 0x09, 
-       0x49, 0x20, 0x4b, 0x1f, 0x69, 0x9b, 0x1c, 0x18, 
-       0x4b, 0x1d, 0x69, 0xdb, 0x1c, 0x1c, 0x4b, 0x1c, 
-       0x6a, 0x5b, 0x1e, 0x5a, 0x9b, 0x01, 0x78, 0xdd, 
-       0x26, 0x01, 0x40, 0xae, 0x1c, 0x37, 0x42, 0xa0, 
-       0xd0, 0x26, 0x00, 0x83, 0x18, 0x5d, 0x23, 0x01, 
-       0x02, 0x9b, 0x18, 0xeb, 0x68, 0x1b, 0x40, 0x3b, 
-       0xd0, 0x1b, 0x00, 0x83, 0x18, 0x5d, 0x23, 0x01, 
-       0x02, 0x9b, 0x18, 0xeb, 0x68, 0x1b, 0x43, 0xbb, 
-       0x1c, 0x1d, 0x00, 0x83, 0x18, 0x5e, 0x23, 0x01, 
-       0x02, 0x9b, 0x18, 0xf3, 0x60, 0x1d, 0x00, 0x83, 
-       0x18, 0x5d, 0x23, 0x01, 0x02, 0x9b, 0x18, 0xeb, 
-       0x68, 0x1b, 0x2b, 0x00, 0xd1, 0x05, 0x25, 0x00, 
-       0x18, 0x0e, 0x23, 0x01, 0x02, 0xdb, 0x18, 0xf3, 
-       0x70, 0x1d, 0x30, 0x01, 0x40, 0x10, 0xe7, 0xd6, 
-       0xb0, 0x01, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x60, 0x90, 
-       0x9e, 0x00, 0x04, 0x80, 0x2e, 0x08, 0x69, 0x90, 
-       0xb4, 0x90, 0x1c, 0x03, 0x1c, 0x0c, 0x1c, 0x17, 
-       0x06, 0x21, 0x0e, 0x09, 0x06, 0x38, 0x0e, 0x00, 
-       0x72, 0x19, 0x28, 0x00, 0xd0, 0x00, 0x75, 0x58, 
-       0x68, 0x5b, 0x2b, 0x00, 0xd1, 0xf8, 0xbc, 0x90, 
-       0x47, 0x70, 0x00, 0x00, 0xb5, 0x80, 0x1c, 0x07, 
-       0x68, 0xf8, 0x28, 0x1f, 0xd9, 0x03, 0x20, 0xe1, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x1e, 
-       0x6d, 0x00, 0x68, 0x00, 0x4b, 0x1d, 0x40, 0x18, 
-       0x49, 0x1b, 0x6d, 0x09, 0x60, 0x08, 0x05, 0x80, 
-       0x48, 0x19, 0x6d, 0x00, 0x68, 0x00, 0x49, 0x18, 
-       0x6e, 0xc9, 0x60, 0x08, 0x48, 0x16, 0x6d, 0x00, 
-       0x68, 0x00, 0x23, 0x01, 0x02, 0x5b, 0x43, 0x18, 
-       0x49, 0x13, 0x6d, 0x09, 0x60, 0x08, 0x05, 0x80, 
-       0x48, 0x11, 0x6d, 0x00, 0x68, 0x00, 0x49, 0x10, 
-       0x6e, 0xc9, 0x60, 0x08, 0x48, 0x0e, 0x6f, 0xc1, 
-       0xcf, 0x09, 0xc1, 0x09, 0xcf, 0x09, 0xc1, 0x09, 
-       0xcf, 0x08, 0xc1, 0x08, 0xf0, 0x00, 0xfc, 0x1e, 
-       0x20, 0x00, 0x49, 0x09, 0x60, 0x08, 0x20, 0x00, 
-       0x49, 0x07, 0x60, 0x48, 0x20, 0x00, 0x49, 0x06, 
-       0x60, 0x88, 0x49, 0x07, 0x20, 0x0b, 0xf0, 0x0c, 
-       0xf9, 0xb5, 0x20, 0xff, 0x30, 0x01, 0x49, 0x02, 
-       0x61, 0xc8, 0x20, 0x00, 0xe7, 0xc0, 0xe7, 0xbf, 
-       0x2e, 0x08, 0x1f, 0x1c, 0xff, 0xff, 0xfd, 0xff, 
-       0x2e, 0x01, 0x09, 0x15, 0x1c, 0x01, 0x48, 0x0e, 
-       0x6f, 0x00, 0x68, 0x00, 0x60, 0x08, 0x48, 0x0c, 
-       0x6e, 0x80, 0x68, 0x00, 0x60, 0x48, 0x48, 0x0a, 
-       0x6e, 0xc0, 0x68, 0x00, 0x60, 0x88, 0x48, 0x08, 
-       0x6f, 0x40, 0x68, 0x00, 0x60, 0xc8, 0x48, 0x06, 
-       0x68, 0x00, 0x61, 0x08, 0x48, 0x04, 0x68, 0x40, 
-       0x61, 0x48, 0x48, 0x03, 0x68, 0x80, 0x61, 0x88, 
-       0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0x00, 0x00, 
-       0x2e, 0x08, 0x1f, 0x1c, 0x48, 0x03, 0x6e, 0x80, 
-       0x68, 0x00, 0x07, 0x40, 0x0f, 0xc0, 0x47, 0x70, 
-       0xe7, 0xfd, 0x00, 0x00, 0x2e, 0x08, 0x1f, 0x1c, 
-       0xb4, 0x80, 0x1c, 0x07, 0x1c, 0x0a, 0x48, 0x37, 
-       0x69, 0xc0, 0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 
-       0xd0, 0x02, 0x20, 0xe0, 0xbc, 0x80, 0x47, 0x70, 
-       0x48, 0x32, 0x62, 0x07, 0x20, 0x00, 0x49, 0x31, 
-       0x62, 0x48, 0x48, 0x31, 0x60, 0x02, 0x48, 0x30, 
-       0x68, 0x00, 0x78, 0x00, 0x49, 0x2d, 0x61, 0x88, 
-       0x48, 0x2d, 0x68, 0x00, 0x7a, 0x00, 0x49, 0x2b, 
-       0x61, 0x08, 0x48, 0x2b, 0x68, 0x00, 0x68, 0x40, 
-       0x49, 0x28, 0x60, 0xc8, 0x48, 0x27, 0x69, 0x80, 
-       0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x01, 0x48, 0x27, 
-       0xe0, 0x01, 0x20, 0x01, 0x02, 0x40, 0x49, 0x23, 
-       0x61, 0xc8, 0x48, 0x22, 0x68, 0x40, 0x30, 0x01, 
-       0x49, 0x20, 0x60, 0x48, 0x48, 0x1f, 0x6d, 0x40, 
-       0x68, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x49, 0x1d, 
-       0x69, 0x89, 0x08, 0x49, 0x06, 0x09, 0x0e, 0x09, 
-       0x43, 0x08, 0x49, 0x1a, 0x6d, 0x49, 0x60, 0x08, 
-       0x06, 0x00, 0x48, 0x18, 0x6d, 0x00, 0x68, 0x00, 
-       0x4b, 0x19, 0x40, 0x18, 0x49, 0x15, 0x69, 0x89, 
-       0x07, 0xc9, 0x0c, 0x49, 0x43, 0x08, 0x49, 0x13, 
-       0x6d, 0x09, 0x60, 0x08, 0x04, 0x40, 0x48, 0x11, 
-       0x6d, 0x00, 0x68, 0x00, 0x4b, 0x13, 0x40, 0x18, 
-       0x49, 0x0e, 0x6d, 0x09, 0x60, 0x08, 0x05, 0x40, 
-       0x48, 0x0c, 0x6d, 0x00, 0x68, 0x00, 0x23, 0x01, 
-       0x03, 0x1b, 0x43, 0x18, 0x49, 0x09, 0x6d, 0x09, 
-       0x60, 0x08, 0x04, 0xc0, 0x48, 0x07, 0x6d, 0x40, 
-       0x68, 0x00, 0x49, 0x06, 0x6f, 0x09, 0x60, 0x08, 
-       0x48, 0x04, 0x6d, 0x00, 0x68, 0x00, 0x49, 0x03, 
-       0x6e, 0xc9, 0x60, 0x08, 0x20, 0x00, 0xe7, 0x99, 
-       0xe7, 0x98, 0x00, 0x00, 0x2e, 0x08, 0x1f, 0x1c, 
-       0x2e, 0x08, 0x60, 0x54, 0x00, 0x00, 0x02, 0x01, 
-       0xff, 0xff, 0xbf, 0xff, 0xff, 0xff, 0xfb, 0xff, 
-       0xb5, 0x00, 0x48, 0xf6, 0x6e, 0x80, 0x68, 0x00, 
-       0x23, 0x08, 0x40, 0x18, 0xd0, 0x74, 0x48, 0xf3, 
-       0x6d, 0x00, 0x68, 0x00, 0x4b, 0xf2, 0x40, 0x18, 
-       0x49, 0xf0, 0x6d, 0x09, 0x60, 0x08, 0x04, 0x80, 
-       0x48, 0xee, 0x6e, 0x40, 0x68, 0x00, 0x0a, 0x00, 
-       0x02, 0x00, 0x49, 0xec, 0x6e, 0x49, 0x60, 0x08, 
-       0x06, 0x00, 0x48, 0xea, 0x6e, 0xc0, 0x68, 0x00, 
-       0x23, 0x01, 0x02, 0xdb, 0x40, 0x18, 0xd0, 0x3e, 
-       0x20, 0xff, 0x30, 0x01, 0x49, 0xe5, 0x61, 0xc8, 
-       0x48, 0xe4, 0x6d, 0x00, 0x68, 0x00, 0x4b, 0xe5, 
-       0x40, 0x18, 0x49, 0xe2, 0x6d, 0x09, 0x60, 0x08, 
-       0x04, 0xc0, 0x48, 0xe0, 0x6f, 0xc0, 0x68, 0x80, 
-       0x68, 0x01, 0x02, 0x09, 0x0a, 0x09, 0x4a, 0xdd, 
-       0x6a, 0x52, 0x06, 0x12, 0x43, 0x11, 0x60, 0x01, 
-       0x48, 0xdd, 0x68, 0x00, 0x7a, 0x00, 0x49, 0xd9, 
-       0x69, 0x09, 0x1a, 0x41, 0x48, 0xd7, 0x6f, 0xc0, 
-       0x68, 0x80, 0x68, 0x02, 0x4b, 0xd9, 0x40, 0x1a, 
-       0x04, 0x09, 0x0c, 0x09, 0x02, 0x09, 0x43, 0x11, 
-       0x60, 0x01, 0x02, 0x08, 0x0c, 0x00, 0x48, 0xd1, 
-       0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 0x23, 0x04, 
-       0x43, 0x19, 0x60, 0x01, 0x07, 0x48, 0x48, 0xcd, 
-       0x6f, 0xc0, 0x68, 0xc1, 0x20, 0x01, 0x40, 0x88, 
-       0xf0, 0x0c, 0xf8, 0x96, 0x48, 0xc9, 0x68, 0x00, 
-       0x30, 0x01, 0x49, 0xc8, 0x60, 0x08, 0x48, 0xc7, 
-       0x69, 0xc0, 0x4b, 0xcb, 0x42, 0x98, 0xd0, 0x73, 
-       0xdc, 0x08, 0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 
-       0xd0, 0x6f, 0x23, 0x01, 0x02, 0x5b, 0x42, 0x98, 
-       0xd0, 0x07, 0xe2, 0xba, 0x4b, 0xc5, 0x42, 0x98, 
-       0xd0, 0x68, 0x4b, 0xc5, 0x42, 0x98, 0xd0, 0x66, 
-       0xe2, 0xb3, 0x48, 0xbc, 0x6e, 0x80, 0x68, 0x00, 
-       0x23, 0x01, 0x02, 0x5b, 0x40, 0x18, 0xe0, 0x00, 
-       0xe2, 0xcd, 0xd0, 0x3f, 0x48, 0xb7, 0x68, 0x00, 
-       0x30, 0x01, 0x49, 0xb6, 0x60, 0x08, 0x48, 0xb5, 
-       0x6d, 0x00, 0x68, 0x00, 0x4b, 0xb5, 0x40, 0x18, 
-       0x49, 0xb2, 0x6d, 0x09, 0x60, 0x08, 0x04, 0xc0, 
-       0x20, 0xff, 0x30, 0x01, 0x49, 0xaf, 0x61, 0xc8, 
-       0x48, 0xae, 0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 
-       0x02, 0x09, 0x0a, 0x09, 0x4a, 0xab, 0x6a, 0x52, 
-       0x06, 0x12, 0x43, 0x11, 0x60, 0x01, 0x48, 0xac, 
-       0x68, 0x00, 0x7a, 0x00, 0x49, 0xa7, 0x69, 0x09, 
-       0x1a, 0x41, 0x48, 0xa6, 0x6f, 0xc0, 0x68, 0x80, 
-       0x68, 0x02, 0x4b, 0xa8, 0x40, 0x1a, 0x04, 0x09, 
-       0x0c, 0x09, 0x02, 0x09, 0x43, 0x11, 0x60, 0x01, 
-       0x02, 0x08, 0x0c, 0x00, 0x48, 0x9f, 0x6f, 0xc0, 
-       0x68, 0x80, 0x68, 0x01, 0x23, 0x02, 0x43, 0x19, 
-       0x60, 0x01, 0x07, 0x88, 0x48, 0x9b, 0x6f, 0xc0, 
-       0x68, 0xc1, 0x20, 0x01, 0x40, 0x88, 0xf0, 0x0c, 
-       0xf8, 0x33, 0xe0, 0x5e, 0x48, 0x97, 0x69, 0x00, 
-       0x28, 0x00, 0xd0, 0x20, 0x48, 0x95, 0x69, 0x00, 
-       0x38, 0x01, 0x49, 0x94, 0x61, 0x08, 0x48, 0x93, 
-       0x68, 0xc0, 0x78, 0x00, 0x49, 0x91, 0x6c, 0x89, 
-       0x68, 0x09, 0x0a, 0x09, 0x02, 0x09, 0x43, 0x08, 
-       0x49, 0x8e, 0x6c, 0x89, 0x60, 0x08, 0x06, 0x00, 
-       0x0e, 0x00, 0x48, 0x8c, 0x68, 0xc0, 0xe0, 0x03, 
-       0xe1, 0x4b, 0xe2, 0x4d, 0xe0, 0x42, 0xe1, 0x93, 
-       0x30, 0x01, 0x49, 0x88, 0x60, 0xc8, 0x48, 0x8d, 
-       0x49, 0x86, 0x61, 0xc8, 0xe0, 0x39, 0x20, 0xff, 
-       0x30, 0x01, 0x49, 0x84, 0x61, 0xc8, 0x48, 0x83, 
-       0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 0x02, 0x09, 
-       0x0a, 0x09, 0x4a, 0x80, 0x6a, 0x52, 0x06, 0x12, 
-       0x43, 0x11, 0x60, 0x01, 0x48, 0x80, 0x68, 0x00, 
-       0x7a, 0x00, 0x49, 0x7c, 0x69, 0x09, 0x1a, 0x41, 
-       0x48, 0x7a, 0x6f, 0xc0, 0x68, 0x80, 0x68, 0x02, 
-       0x4b, 0x7c, 0x40, 0x1a, 0x04, 0x09, 0x0c, 0x09, 
-       0x02, 0x09, 0x43, 0x11, 0x60, 0x01, 0x02, 0x08, 
-       0x0c, 0x00, 0x48, 0x74, 0x6f, 0xc0, 0x68, 0x80, 
-       0x68, 0x01, 0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 
-       0x07, 0xc8, 0x48, 0x70, 0x6f, 0xc0, 0x68, 0xc1, 
-       0x20, 0x01, 0x40, 0x88, 0xf0, 0x0b, 0xff, 0xdc, 
-       0x48, 0x6c, 0x6d, 0x00, 0x68, 0x00, 0x4b, 0x6d, 
-       0x40, 0x18, 0x49, 0x6a, 0x6d, 0x09, 0x60, 0x08, 
-       0x04, 0xc0, 0xe2, 0x08, 0x48, 0x67, 0x69, 0x00, 
-       0x28, 0x00, 0xd0, 0x5f, 0x48, 0x65, 0x6e, 0x80, 
-       0x68, 0x00, 0x23, 0xff, 0x33, 0x01, 0x40, 0x18, 
-       0xd0, 0x3f, 0x48, 0x62, 0x68, 0x00, 0x30, 0x01, 
-       0x49, 0x60, 0x60, 0x08, 0x48, 0x5f, 0x6d, 0x00, 
-       0x68, 0x00, 0x4b, 0x60, 0x40, 0x18, 0x49, 0x5d, 
-       0x6d, 0x09, 0x60, 0x08, 0x04, 0xc0, 0x20, 0xff, 
-       0x30, 0x01, 0x49, 0x5a, 0x61, 0xc8, 0x48, 0x59, 
-       0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 0x02, 0x09, 
-       0x0a, 0x09, 0x4a, 0x56, 0x6a, 0x52, 0x06, 0x12, 
-       0x43, 0x11, 0x60, 0x01, 0x48, 0x56, 0x68, 0x00, 
-       0x7a, 0x00, 0x49, 0x52, 0x69, 0x09, 0x1a, 0x41, 
-       0x48, 0x50, 0x6f, 0xc0, 0x68, 0x80, 0x68, 0x02, 
-       0x4b, 0x52, 0x40, 0x1a, 0x04, 0x09, 0x0c, 0x09, 
-       0x02, 0x09, 0x43, 0x11, 0x60, 0x01, 0x02, 0x08, 
-       0x0c, 0x00, 0x48, 0x4a, 0x6f, 0xc0, 0x68, 0x80, 
-       0x68, 0x01, 0x23, 0x02, 0x43, 0x19, 0x60, 0x01, 
-       0x07, 0x88, 0x48, 0x46, 0x6f, 0xc0, 0x68, 0xc1, 
-       0x20, 0x01, 0x40, 0x88, 0xf0, 0x0b, 0xff, 0x88, 
-       0xe0, 0x17, 0x48, 0x42, 0x68, 0xc0, 0x78, 0x00, 
-       0x49, 0x40, 0x6c, 0x89, 0x68, 0x09, 0x0a, 0x09, 
-       0x02, 0x09, 0x43, 0x08, 0x49, 0x3d, 0x6c, 0x89, 
-       0x60, 0x08, 0x06, 0x00, 0x0e, 0x00, 0x48, 0x3b, 
-       0x68, 0xc0, 0x30, 0x01, 0x49, 0x39, 0x60, 0xc8, 
-       0x48, 0x38, 0x69, 0x00, 0x38, 0x01, 0x49, 0x37, 
-       0x61, 0x08, 0xe0, 0xa1, 0x48, 0x35, 0x6a, 0x00, 
-       0x38, 0x01, 0x49, 0x34, 0x62, 0x08, 0x48, 0x33, 
-       0x6a, 0x00, 0x28, 0x00, 0xd0, 0x4b, 0x48, 0x31, 
-       0x6a, 0x40, 0x30, 0x01, 0x49, 0x2f, 0x62, 0x48, 
-       0x48, 0x31, 0x68, 0x00, 0x30, 0x0c, 0x49, 0x30, 
-       0x60, 0x08, 0x48, 0x2f, 0x68, 0x00, 0x78, 0x00, 
-       0x49, 0x2a, 0x61, 0x88, 0x48, 0x2c, 0x68, 0x00, 
-       0x7a, 0x00, 0x49, 0x28, 0x61, 0x08, 0x48, 0x2a, 
-       0x68, 0x00, 0x68, 0x40, 0x49, 0x25, 0x60, 0xc8, 
-       0x48, 0x24, 0x69, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 
-       0xd0, 0x01, 0x48, 0x27, 0xe0, 0x01, 0x20, 0x01, 
-       0x02, 0x40, 0x49, 0x20, 0x61, 0xc8, 0x48, 0x1f, 
-       0x6d, 0x00, 0x68, 0x00, 0x23, 0x01, 0x03, 0x5b, 
-       0x43, 0x18, 0x49, 0x1c, 0x6d, 0x09, 0x60, 0x08, 
-       0x04, 0x80, 0x48, 0x1a, 0x6d, 0x40, 0x68, 0x00, 
-       0x0a, 0x00, 0x02, 0x00, 0x49, 0x17, 0x69, 0x89, 
-       0x08, 0x49, 0x06, 0x09, 0x0e, 0x09, 0x43, 0x08, 
-       0x49, 0x14, 0x6d, 0x49, 0x60, 0x08, 0x06, 0x00, 
-       0x48, 0x12, 0x6d, 0x00, 0x68, 0x00, 0x4b, 0x19, 
-       0x40, 0x18, 0x49, 0x10, 0x69, 0x89, 0x07, 0xc9, 
-       0x0c, 0x49, 0x43, 0x08, 0x49, 0x0d, 0x6d, 0x09, 
-       0x60, 0x08, 0x04, 0x40, 0xe0, 0x4c, 0x20, 0xff, 
-       0x30, 0x01, 0x49, 0x0a, 0x61, 0xc8, 0x48, 0x09, 
-       0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 0x02, 0x09, 
-       0x0a, 0x09, 0x4a, 0x06, 0x6a, 0x52, 0x06, 0x12, 
-       0x43, 0x11, 0x60, 0x01, 0x48, 0x06, 0x68, 0x00, 
-       0x7a, 0x00, 0x49, 0x02, 0x69, 0x09, 0x1a, 0x41, 
-       0x48, 0x00, 0xe0, 0x11, 0x2e, 0x08, 0x1f, 0x1c, 
-       0xff, 0xff, 0xdf, 0xff, 0xff, 0xff, 0xef, 0xff, 
-       0x2e, 0x08, 0x60, 0x54, 0xff, 0x00, 0x00, 0xff, 
-       0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x02, 0x02, 
-       0x00, 0x00, 0x02, 0x03, 0xff, 0xff, 0xbf, 0xff, 
-       0x6f, 0xc0, 0x68, 0x80, 0x68, 0x02, 0x4b, 0xa5, 
-       0x40, 0x1a, 0x04, 0x09, 0x0c, 0x09, 0x02, 0x09, 
-       0x43, 0x11, 0x60, 0x01, 0x02, 0x08, 0x0c, 0x00, 
-       0x48, 0xa1, 0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 
-       0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 0x07, 0xc8, 
-       0x48, 0x9d, 0x6f, 0xc0, 0x68, 0xc1, 0x20, 0x01, 
-       0x40, 0x88, 0xf0, 0x0b, 0xfe, 0xd5, 0x48, 0x9a, 
-       0x6d, 0x00, 0x68, 0x00, 0x4b, 0x99, 0x40, 0x18, 
-       0x49, 0x97, 0x6d, 0x09, 0x60, 0x08, 0x04, 0xc0, 
-       0xe1, 0x01, 0x48, 0x95, 0x6e, 0x80, 0x68, 0x00, 
-       0x23, 0x01, 0x02, 0x5b, 0x40, 0x18, 0xd0, 0x3f, 
-       0x48, 0x91, 0x68, 0x00, 0x30, 0x01, 0x49, 0x90, 
-       0x60, 0x08, 0x48, 0x8f, 0x6d, 0x00, 0x68, 0x00, 
-       0x4b, 0x8e, 0x40, 0x18, 0x49, 0x8c, 0x6d, 0x09, 
-       0x60, 0x08, 0x04, 0xc0, 0x20, 0xff, 0x30, 0x01, 
-       0x49, 0x89, 0x61, 0xc8, 0x48, 0x88, 0x6f, 0xc0, 
-       0x68, 0x80, 0x68, 0x01, 0x02, 0x09, 0x0a, 0x09, 
-       0x4a, 0x85, 0x6a, 0x52, 0x06, 0x12, 0x43, 0x11, 
-       0x60, 0x01, 0x48, 0x85, 0x68, 0x00, 0x7a, 0x00, 
-       0x49, 0x81, 0x69, 0x09, 0x1a, 0x41, 0x48, 0x80, 
-       0x6f, 0xc0, 0x68, 0x80, 0x68, 0x02, 0x4b, 0x7d, 
-       0x40, 0x1a, 0x04, 0x09, 0x0c, 0x09, 0x02, 0x09, 
-       0x43, 0x11, 0x60, 0x01, 0x02, 0x08, 0x0c, 0x00, 
-       0x48, 0x79, 0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 
-       0x23, 0x02, 0x43, 0x19, 0x60, 0x01, 0x07, 0x88, 
-       0x48, 0x75, 0x6f, 0xc0, 0x68, 0xc1, 0x20, 0x01, 
-       0x40, 0x88, 0xf0, 0x0b, 0xfe, 0x85, 0xe0, 0x02, 
-       0x48, 0x74, 0x49, 0x71, 0x61, 0xc8, 0xe0, 0xb6, 
-       0x48, 0x6f, 0x69, 0x00, 0x28, 0x00, 0xd0, 0x62, 
-       0x48, 0x6d, 0x6e, 0x00, 0x68, 0x00, 0x49, 0x6c, 
-       0x68, 0xc9, 0x70, 0x08, 0x48, 0x6a, 0x68, 0xc0, 
-       0x30, 0x01, 0x49, 0x69, 0x60, 0xc8, 0x48, 0x68, 
-       0x69, 0x00, 0x38, 0x01, 0x49, 0x66, 0x61, 0x08, 
-       0x48, 0x65, 0x69, 0x00, 0x28, 0x00, 0xd1, 0x4d, 
-       0x48, 0x63, 0x6a, 0x00, 0x28, 0x01, 0xd1, 0x49, 
-       0x48, 0x63, 0x68, 0x00, 0x7a, 0x40, 0x49, 0x60, 
-       0x6d, 0x09, 0x68, 0x09, 0x4b, 0x62, 0x40, 0x19, 
-       0x07, 0xc0, 0x0d, 0x40, 0x43, 0x08, 0x49, 0x5c, 
-       0x6d, 0x09, 0x60, 0x08, 0x05, 0x40, 0x0f, 0xc0, 
-       0x20, 0xff, 0x30, 0x01, 0x49, 0x58, 0x61, 0xc8, 
-       0x48, 0x57, 0x6d, 0x00, 0x68, 0x00, 0x4b, 0x57, 
-       0x40, 0x18, 0x49, 0x55, 0x6d, 0x09, 0x60, 0x08, 
-       0x04, 0xc0, 0x48, 0x53, 0x6f, 0xc0, 0x68, 0x80, 
-       0x68, 0x01, 0x02, 0x09, 0x0a, 0x09, 0x4a, 0x50, 
-       0x6a, 0x52, 0x06, 0x12, 0x43, 0x11, 0x60, 0x01, 
-       0x48, 0x4f, 0x68, 0x00, 0x7a, 0x00, 0x49, 0x4c, 
-       0x69, 0x09, 0x1a, 0x41, 0x48, 0x4a, 0x6f, 0xc0, 
-       0x68, 0x80, 0x68, 0x02, 0x4b, 0x47, 0x40, 0x1a, 
-       0x04, 0x09, 0x0c, 0x09, 0x02, 0x09, 0x43, 0x11, 
-       0x60, 0x01, 0x02, 0x08, 0x0c, 0x00, 0x48, 0x44, 
-       0x6f, 0xc0, 0x68, 0x80, 0x68, 0x01, 0x23, 0x01, 
-       0x43, 0x19, 0x60, 0x01, 0x07, 0xc8, 0x48, 0x40, 
-       0x6f, 0xc0, 0x68, 0xc1, 0x20, 0x01, 0x40, 0x88, 
-       0xf0, 0x0b, 0xfe, 0x1a, 0xe0, 0x4f, 0x48, 0x3c, 
-       0x6a, 0x00, 0x38, 0x01, 0x49, 0x3a, 0x62, 0x08, 
-       0x48, 0x39, 0x6a, 0x40, 0x30, 0x01, 0x49, 0x38, 
-       0x62, 0x48, 0x48, 0x39, 0x68, 0x00, 0x30, 0x0c, 
-       0x49, 0x37, 0x60, 0x08, 0x48, 0x36, 0x68, 0x00, 
-       0x78, 0x00, 0x49, 0x33, 0x61, 0x88, 0x48, 0x34, 
-       0x68, 0x00, 0x7a, 0x00, 0x49, 0x30, 0x61, 0x08, 
-       0x48, 0x31, 0x68, 0x00, 0x68, 0x40, 0x49, 0x2e, 
-       0x60, 0xc8, 0x48, 0x2d, 0x69, 0x80, 0x07, 0xc0, 
-       0x0f, 0xc0, 0xd0, 0x01, 0x48, 0x2f, 0xe0, 0x01, 
-       0x20, 0x01, 0x02, 0x40, 0x49, 0x28, 0x61, 0xc8, 
-       0x48, 0x27, 0x6d, 0x00, 0x68, 0x00, 0x23, 0x01, 
-       0x03, 0x5b, 0x43, 0x18, 0x49, 0x24, 0x6d, 0x09, 
-       0x60, 0x08, 0x04, 0x80, 0x48, 0x22, 0x6d, 0x40, 
-       0x68, 0x00, 0x0a, 0x00, 0x02, 0x00, 0x49, 0x20, 
-       0x69, 0x89, 0x08, 0x49, 0x06, 0x09, 0x0e, 0x09, 
-       0x43, 0x08, 0x49, 0x1d, 0x6d, 0x49, 0x60, 0x08, 
-       0x06, 0x00, 0x48, 0x1b, 0x6d, 0x00, 0x68, 0x00, 
-       0x4b, 0x1f, 0x40, 0x18, 0x49, 0x18, 0x69, 0x89, 
-       0x07, 0xc9, 0x0c, 0x49, 0x43, 0x08, 0x49, 0x16, 
-       0x6d, 0x09, 0x60, 0x08, 0x04, 0x40, 0xe0, 0x01, 
-       0xe0, 0x00, 0xe7, 0xff, 0x48, 0x12, 0x6c, 0x80, 
-       0x68, 0x00, 0x49, 0x11, 0x6e, 0x49, 0x60, 0x08, 
-       0x48, 0x0f, 0x6d, 0x40, 0x68, 0x00, 0x49, 0x0e, 
-       0x6f, 0x09, 0x60, 0x08, 0x48, 0x0c, 0x6d, 0x00, 
-       0x68, 0x00, 0x49, 0x0b, 0x6e, 0xc9, 0x60, 0x08, 
-       0x48, 0x09, 0x6c, 0xc0, 0x68, 0x00, 0x23, 0x08, 
-       0x43, 0x18, 0x49, 0x07, 0x6c, 0xc9, 0x60, 0x08, 
-       0x07, 0x00, 0x48, 0x05, 0x6c, 0xc0, 0x68, 0x00, 
-       0x49, 0x03, 0x6e, 0x89, 0x60, 0x08, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 
-       0x2e, 0x08, 0x1f, 0x1c, 0xff, 0xff, 0xef, 0xff, 
-       0x2e, 0x08, 0x60, 0x54, 0x00, 0x00, 0x02, 0x03, 
-       0xff, 0xff, 0xfb, 0xff, 0x00, 0x00, 0x02, 0x01, 
-       0xff, 0xff, 0xbf, 0xff, 0xb4, 0x80, 0x49, 0x2e, 
-       0x20, 0x00, 0x28, 0x08, 0xd3, 0x04, 0xe0, 0x06, 
-       0x1c, 0x42, 0x06, 0x10, 0x0e, 0x00, 0xe7, 0xf8, 
-       0x23, 0x00, 0xc1, 0x08, 0xe7, 0xf8, 0x4a, 0x29, 
-       0x6f, 0xd2, 0x68, 0x12, 0x4b, 0x27, 0x6d, 0x9b, 
-       0x68, 0x1b, 0x0a, 0x1b, 0x02, 0x1b, 0x06, 0x12, 
-       0x0e, 0x12, 0x43, 0x1a, 0x4b, 0x23, 0x6d, 0x9b, 
-       0x60, 0x1a, 0x06, 0x12, 0x0e, 0x12, 0x4a, 0x21, 
-       0x6f, 0xd2, 0x68, 0x52, 0x4b, 0x1f, 0x6d, 0x1b, 
-       0x68, 0x1f, 0x23, 0x01, 0x03, 0xdb, 0x43, 0x9f, 
-       0x1c, 0x3b, 0x07, 0xd2, 0x0c, 0x12, 0x43, 0x1a, 
-       0x4b, 0x1a, 0x6d, 0x1b, 0x60, 0x1a, 0x04, 0x12, 
-       0x0f, 0xd2, 0x4a, 0x18, 0x6f, 0xd2, 0x69, 0x12, 
-       0x4b, 0x16, 0x6d, 0xdb, 0x68, 0x1b, 0x0c, 0x1b, 
-       0x04, 0x1b, 0x04, 0x12, 0x0c, 0x12, 0x43, 0x1a, 
-       0x4b, 0x12, 0x6d, 0xdb, 0x60, 0x1a, 0x04, 0x12, 
-       0x0c, 0x12, 0x4a, 0x10, 0x6d, 0x12, 0x68, 0x12, 
-       0x23, 0x01, 0x02, 0x5b, 0x43, 0x1a, 0x4b, 0x0d, 
-       0x6d, 0x1b, 0x60, 0x1a, 0x05, 0x92, 0x4a, 0x0b, 
-       0x6d, 0x12, 0x68, 0x12, 0x4b, 0x09, 0x6e, 0xdb, 
-       0x60, 0x1a, 0x4a, 0x08, 0x6d, 0x92, 0x68, 0x12, 
-       0x4b, 0x06, 0x6f, 0x5b, 0x60, 0x1a, 0x4a, 0x05, 
-       0x6d, 0xd2, 0x68, 0x12, 0x4b, 0x03, 0x6f, 0x9b, 
-       0x60, 0x1a, 0xbc, 0x80, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x1f, 0x44, 0x2e, 0x08, 0x1f, 0x1c, 
-       0xb5, 0x90, 0x1c, 0x07, 0x1c, 0x0c, 0x2f, 0x22, 
-       0xd1, 0x07, 0x2c, 0x3f, 0xd8, 0x01, 0x2c, 0x01, 
-       0xd2, 0x03, 0x20, 0x38, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x20, 0x01, 0x49, 0x13, 0x70, 0x08, 
-       0x23, 0x01, 0x03, 0xdb, 0x42, 0x9f, 0xd0, 0x02, 
-       0x4b, 0x11, 0x42, 0x9f, 0xd1, 0x04, 0x48, 0x11, 
-       0x60, 0x07, 0x20, 0x00, 0xe7, 0xee, 0xe0, 0x18, 
-       0x2f, 0xff, 0xd1, 0x0b, 0x21, 0x00, 0x43, 0xc9, 
-       0x20, 0x0d, 0xf0, 0x00, 0xf8, 0x1d, 0x48, 0x0c, 
-       0x68, 0x01, 0x48, 0x0c, 0x68, 0x00, 0xf0, 0x00, 
-       0xf8, 0x43, 0xe0, 0x07, 0x1c, 0x21, 0x1c, 0x38, 
-       0xf0, 0x00, 0xf8, 0x3e, 0x48, 0x07, 0x60, 0x07, 
-       0x48, 0x05, 0x60, 0x04, 0x20, 0x00, 0xe7, 0xd5, 
-       0xe7, 0xd4, 0xe7, 0xd3, 0x2e, 0x08, 0x60, 0x7c, 
-       0x00, 0x00, 0x80, 0x0f, 0xcc, 0x00, 0x05, 0x00, 
-       0x2e, 0x08, 0x60, 0x78, 0x2e, 0x08, 0x1f, 0x9c, 
-       0xb4, 0xb0, 0x1c, 0x07, 0x1c, 0x0a, 0x4b, 0x13, 
-       0x68, 0x5b, 0x1c, 0x18, 0x21, 0x00, 0x29, 0x02, 
-       0xdb, 0x04, 0xe0, 0x1a, 0x1c, 0x4b, 0x06, 0x19, 
-       0x0e, 0x09, 0xe7, 0xf8, 0x23, 0x0d, 0x06, 0x9b, 
-       0x1a, 0xc4, 0x29, 0x00, 0xd1, 0x01, 0x60, 0x27, 
-       0xe0, 0x05, 0x23, 0x01, 0x42, 0xda, 0xd0, 0x01, 
-       0x60, 0x22, 0xe0, 0x00, 0xe0, 0x09, 0x1d, 0x05, 
-       0x23, 0x05, 0x02, 0x1b, 0x42, 0x9d, 0xdb, 0x02, 
-       0x20, 0x01, 0x02, 0x80, 0xe0, 0x00, 0x30, 0x04, 
-       0xe7, 0xe4, 0x4b, 0x02, 0x60, 0x58, 0xbc, 0xb0, 
-       0x47, 0x70, 0x00, 0x00, 0xcc, 0x00, 0x0f, 0x00, 
-       0xb5, 0x90, 0x1c, 0x04, 0x1c, 0x0f, 0x05, 0x20, 
-       0x0d, 0x00, 0x23, 0xff, 0x33, 0x04, 0x42, 0x98, 
-       0xd0, 0x50, 0xdc, 0x18, 0x28, 0x10, 0xd0, 0x2d, 
-       0xdc, 0x08, 0x28, 0x01, 0xd0, 0x23, 0x28, 0x02, 
-       0xd0, 0x1e, 0x28, 0x04, 0xd0, 0x1f, 0x28, 0x08, 
-       0xd0, 0x1d, 0xe0, 0x76, 0x28, 0x12, 0xd0, 0x1d, 
-       0x28, 0x22, 0xd0, 0x3a, 0x23, 0xff, 0x33, 0x02, 
-       0x42, 0x98, 0xd0, 0x24, 0x23, 0xff, 0x33, 0x03, 
-       0x42, 0x98, 0xd0, 0x29, 0xe0, 0x69, 0x38, 0xff, 
-       0x38, 0x05, 0x28, 0x08, 0xd2, 0x65, 0xa3, 0x02, 
-       0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x35, 0x3c, 0x41, 0x4f, 0x56, 0x4b, 0x5d, 0x46, 
-       0x20, 0x00, 0x49, 0x32, 0x63, 0x48, 0x48, 0x31, 
-       0x62, 0x04, 0xe0, 0x5c, 0x20, 0x01, 0x49, 0x2f, 
-       0x63, 0x48, 0xe0, 0x58, 0x20, 0x00, 0x49, 0x2e, 
-       0x67, 0x08, 0x21, 0x00, 0x43, 0xc9, 0x20, 0x10, 
-       0xf7, 0xff, 0xff, 0x92, 0xe0, 0x4f, 0x20, 0x01, 
-       0x49, 0x29, 0x67, 0x08, 0x21, 0x00, 0x43, 0xc9, 
-       0x20, 0x10, 0xf7, 0xff, 0xff, 0x89, 0xe0, 0x46, 
-       0x20, 0x02, 0x49, 0x25, 0x67, 0x08, 0x21, 0x00, 
-       0x43, 0xc9, 0x20, 0x10, 0xf7, 0xff, 0xff, 0x80, 
-       0xe0, 0x3d, 0x1c, 0x39, 0x20, 0x22, 0xf7, 0xff, 
-       0xff, 0x7b, 0xe0, 0x38, 0x48, 0x1e, 0x65, 0xc7, 
-       0x21, 0x01, 0x20, 0x35, 0xf7, 0xff, 0xff, 0x74, 
-       0xe0, 0x31, 0x48, 0x1b, 0x65, 0xc7, 0x21, 0x02, 
-       0x20, 0x35, 0xf7, 0xff, 0xff, 0x6d, 0xe0, 0x2a, 
-       0x21, 0x00, 0x20, 0x35, 0xf7, 0xff, 0xff, 0x68, 
-       0xe0, 0x25, 0x21, 0x03, 0x20, 0x35, 0xf7, 0xff, 
-       0xff, 0x63, 0xe0, 0x20, 0x21, 0x04, 0x20, 0x35, 
-       0xf7, 0xff, 0xff, 0x5e, 0xe0, 0x1b, 0x20, 0x00, 
-       0x49, 0x0f, 0x65, 0xc8, 0xe0, 0x17, 0x48, 0x0e, 
-       0x66, 0x07, 0x21, 0x01, 0x20, 0x36, 0xf7, 0xff, 
-       0xff, 0x53, 0xe0, 0x10, 0x48, 0x0a, 0x66, 0x07, 
-       0x21, 0x02, 0x20, 0x36, 0xf7, 0xff, 0xff, 0x4c, 
-       0xe0, 0x09, 0x20, 0x00, 0x49, 0x06, 0x66, 0x08, 
-       0xe0, 0x05, 0x1c, 0x20, 0x21, 0x00, 0x43, 0xc9, 
-       0xf7, 0xff, 0xff, 0x42, 0xe7, 0xff, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0xcc, 0x00, 0x0f, 0x80, 
-       0xcc, 0x00, 0x05, 0x00, 0xb4, 0xb0, 0x1c, 0x04, 
-       0x1c, 0x0f, 0x1c, 0x13, 0x06, 0x38, 0x0e, 0x00, 
-       0x06, 0x19, 0x0e, 0x09, 0x29, 0x01, 0xd0, 0x08, 
-       0x22, 0x00, 0x4d, 0x09, 0x60, 0x2a, 0x22, 0x00, 
-       0x43, 0xd2, 0x4d, 0x08, 0x68, 0x2d, 0x60, 0x2a, 
-       0xe0, 0x08, 0x4a, 0x07, 0x68, 0x12, 0x60, 0x14, 
-       0x4a, 0x04, 0x68, 0x12, 0x60, 0x10, 0x22, 0x01, 
-       0x4d, 0x01, 0x60, 0x2a, 0xbc, 0xb0, 0x47, 0x70, 
-       0xcc, 0x00, 0x0d, 0x00, 0x2e, 0x08, 0x60, 0x70, 
-       0x2e, 0x08, 0x60, 0x6c, 0xb5, 0xf3, 0xb0, 0x81, 
-       0x99, 0x02, 0x06, 0x08, 0x16, 0x00, 0x90, 0x00, 
-       0xb0, 0x85, 0x20, 0x00, 0x90, 0x01, 0x9c, 0x06, 
-       0x1d, 0xe6, 0x36, 0x05, 0xcc, 0x20, 0x07, 0xa8, 
-       0x0f, 0x80, 0x06, 0x00, 0x16, 0x00, 0x90, 0x00, 
-       0x08, 0xad, 0x3d, 0x03, 0xcc, 0x80, 0x08, 0xb8, 
-       0x00, 0x80, 0x19, 0x86, 0xcc, 0x02, 0x91, 0x04, 
-       0x99, 0x04, 0x08, 0x89, 0x91, 0x04, 0x20, 0x03, 
-       0x05, 0x80, 0x21, 0x35, 0x06, 0x49, 0x60, 0x08, 
-       0x48, 0x46, 0x68, 0x01, 0x08, 0x89, 0x00, 0x89, 
-       0x60, 0x01, 0x48, 0x45, 0x90, 0x03, 0x20, 0x00, 
-       0x90, 0x02, 0x98, 0x02, 0x42, 0xa8, 0xd3, 0x04, 
-       0xe0, 0x08, 0x98, 0x02, 0x30, 0x01, 0x90, 0x02, 
-       0xe7, 0xf7, 0xcc, 0x02, 0x98, 0x03, 0xc0, 0x02, 
-       0x90, 0x03, 0xe7, 0xf6, 0x98, 0x00, 0x28, 0x00, 
-       0xd0, 0x03, 0xcc, 0x02, 0x98, 0x03, 0xc0, 0x02, 
-       0x90, 0x03, 0x20, 0x00, 0x49, 0x39, 0x65, 0x88, 
-       0x9f, 0x04, 0x2f, 0x00, 0xd8, 0x02, 0xe0, 0x05, 
-       0x3f, 0x01, 0xe7, 0xfa, 0xce, 0x02, 0x48, 0x35, 
-       0x64, 0x81, 0xe7, 0xf9, 0x20, 0x00, 0x49, 0x34, 
-       0x60, 0x48, 0x20, 0x00, 0x21, 0x35, 0x06, 0x49, 
-       0x60, 0x08, 0x20, 0x00, 0x49, 0x2f, 0x66, 0x88, 
-       0x20, 0x00, 0x21, 0x35, 0x06, 0x49, 0x61, 0x88, 
-       0x20, 0x01, 0x49, 0x2c, 0x64, 0xc8, 0x48, 0x2c, 
-       0x68, 0x40, 0x28, 0x00, 0xd1, 0x0e, 0x27, 0x00, 
-       0x2f, 0x64, 0xd3, 0x02, 0xe0, 0x02, 0x37, 0x01, 
-       0xe7, 0xfa, 0xe7, 0xfc, 0x98, 0x01, 0x1c, 0x41, 
-       0x91, 0x01, 0x4b, 0x26, 0x42, 0x98, 0xdb, 0x00, 
-       0xe0, 0x00, 0xe7, 0xec, 0x48, 0x24, 0x68, 0x01, 
-       0x23, 0x01, 0x43, 0x19, 0x60, 0x01, 0x48, 0x23, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x03, 0x48, 0x21, 
-       0x68, 0x40, 0x28, 0x00, 0xd1, 0x0b, 0x48, 0x20, 
-       0x68, 0x40, 0x4b, 0x19, 0x18, 0xc0, 0x49, 0x1d, 
-       0x60, 0x08, 0x48, 0x1d, 0x68, 0x80, 0x4b, 0x16, 
-       0x18, 0xc0, 0x49, 0x1a, 0x60, 0x48, 0x48, 0x19, 
-       0x68, 0x00, 0x21, 0x33, 0x06, 0x49, 0x65, 0x48, 
-       0x48, 0x16, 0x68, 0x40, 0x21, 0x33, 0x06, 0x49, 
-       0x65, 0x88, 0x48, 0x14, 0x68, 0x40, 0x21, 0x33, 
-       0x06, 0x49, 0x66, 0x88, 0x48, 0x11, 0x68, 0x00, 
-       0x21, 0x33, 0x06, 0x49, 0x66, 0x48, 0x20, 0x03, 
-       0x21, 0x33, 0x06, 0x49, 0x67, 0x08, 0x20, 0x00, 
-       0x49, 0x0e, 0x68, 0x09, 0x70, 0x08, 0x21, 0x00, 
-       0x20, 0x0d, 0xf7, 0xff, 0xfe, 0x2d, 0xb0, 0x05, 
-       0xb0, 0x01, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x66, 0x00, 0x00, 0x70, 
-       0xcc, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x80, 
-       0xcc, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x27, 0x10, 
-       0x6a, 0x00, 0x00, 0x10, 0x2e, 0x08, 0x7c, 0x1c, 
-       0xcc, 0x00, 0x0f, 0x80, 0x2e, 0x08, 0x94, 0xa4, 
-       0x1c, 0x01, 0xb0, 0x81, 0x48, 0x27, 0x22, 0x00, 
-       0x92, 0x00, 0x9a, 0x00, 0x2a, 0x16, 0xdb, 0x04, 
-       0xe0, 0x09, 0x9a, 0x00, 0x32, 0x01, 0x92, 0x00, 
-       0xe7, 0xf7, 0x68, 0x02, 0x9b, 0x00, 0x00, 0x9b, 
-       0x50, 0xca, 0x30, 0x04, 0xe7, 0xf5, 0x48, 0x20, 
-       0x22, 0x00, 0x92, 0x00, 0x9a, 0x00, 0x2a, 0x0b, 
-       0xdb, 0x04, 0xe0, 0x0a, 0x9a, 0x00, 0x32, 0x01, 
-       0x92, 0x00, 0xe7, 0xf7, 0x68, 0x03, 0x9a, 0x00, 
-       0x00, 0x92, 0x18, 0x52, 0x65, 0x93, 0x30, 0x04, 
-       0xe7, 0xf4, 0x48, 0x18, 0x22, 0x00, 0x92, 0x00, 
-       0x9a, 0x00, 0x2a, 0x11, 0xdb, 0x04, 0xe0, 0x0b, 
-       0x9a, 0x00, 0x32, 0x01, 0x92, 0x00, 0xe7, 0xf7, 
-       0x68, 0x03, 0x9a, 0x00, 0x00, 0x92, 0x18, 0x52, 
-       0x32, 0x80, 0x60, 0x53, 0x30, 0x04, 0xe7, 0xf3, 
-       0x48, 0x0f, 0x22, 0x02, 0x92, 0x00, 0x9a, 0x00, 
-       0x2a, 0x05, 0xdb, 0x04, 0xe0, 0x0b, 0x9a, 0x00, 
-       0x32, 0x01, 0x92, 0x00, 0xe7, 0xf7, 0x68, 0x02, 
-       0x9b, 0x00, 0x00, 0x9b, 0x18, 0x5b, 0x33, 0x80, 
-       0x60, 0x5a, 0x30, 0x04, 0xe7, 0xf3, 0x4a, 0x07, 
-       0x6c, 0x12, 0x1d, 0xcb, 0x33, 0x79, 0x61, 0xda, 
-       0xb0, 0x01, 0x47, 0x70, 0xcc, 0x00, 0x05, 0x20, 
-       0xcc, 0x00, 0x0c, 0x00, 0xcc, 0x00, 0x0c, 0x5c, 
-       0xcc, 0x00, 0x0c, 0xa0, 0xcc, 0x00, 0x0c, 0x80, 
-       0xb4, 0xf0, 0x1c, 0x06, 0x1c, 0x0f, 0x1c, 0x14, 
-       0x1c, 0x1d, 0x06, 0x29, 0x0e, 0x09, 0x2c, 0x1f, 
-       0xdb, 0x02, 0x20, 0xaf, 0xbc, 0xf0, 0x47, 0x70, 
-       0x4b, 0x0b, 0x40, 0x1f, 0x48, 0x0b, 0x68, 0x00, 
-       0x60, 0x06, 0x29, 0x01, 0xd1, 0x07, 0x48, 0x0a, 
-       0x68, 0x02, 0x43, 0x3a, 0x60, 0x02, 0x20, 0x80, 
-       0x6e, 0x00, 0x60, 0x04, 0xe0, 0x05, 0x29, 0x02, 
-       0xd1, 0x03, 0x48, 0x05, 0x68, 0x02, 0x43, 0xba, 
-       0x60, 0x02, 0x20, 0x00, 0xe7, 0xe6, 0xe7, 0xe5, 
-       0xff, 0xff, 0xf8, 0xff, 0x2e, 0x08, 0x60, 0x74, 
-       0xcc, 0x00, 0x02, 0x20, 0xb5, 0xf3, 0xb0, 0x81, 
-       0x98, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 
-       0x99, 0x02, 0x06, 0x0e, 0x0e, 0x36, 0x48, 0x1a, 
-       0x6f, 0x00, 0x23, 0x02, 0x40, 0x18, 0xd0, 0x0d, 
-       0x20, 0x33, 0x06, 0x40, 0x6d, 0x80, 0x21, 0x33, 
-       0x06, 0x49, 0x6d, 0x49, 0x1a, 0x41, 0x48, 0x14, 
-       0x6d, 0xc0, 0x4a, 0x13, 0x6d, 0x92, 0x1a, 0x80, 
-       0x18, 0x0d, 0xe0, 0x06, 0x20, 0x33, 0x06, 0x40, 
-       0x6d, 0x80, 0x21, 0x33, 0x06, 0x49, 0x6d, 0x49, 
-       0x1a, 0x45, 0x98, 0x00, 0x43, 0x68, 0x1c, 0x01, 
-       0x20, 0x64, 0xf0, 0x07, 0xfb, 0x43, 0x1c, 0x04, 
-       0x43, 0x6e, 0x1c, 0x31, 0x20, 0x64, 0xf0, 0x07, 
-       0xfb, 0x3d, 0x1c, 0x07, 0x08, 0xa4, 0x00, 0xa4, 
-       0x08, 0xbf, 0x00, 0xbf, 0x48, 0x05, 0x64, 0x84, 
-       0x48, 0x04, 0x64, 0xc7, 0xb0, 0x01, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x80, 0xcc, 0x00, 0x0c, 0x80, 
-       0xb5, 0xf7, 0x9a, 0x02, 0x06, 0x15, 0x0e, 0x2d, 
-       0xb0, 0x82, 0x27, 0x00, 0x2d, 0x1f, 0xdb, 0x05, 
-       0x20, 0xaf, 0xb0, 0x02, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2f, 0x00, 0xd1, 0x0d, 
-       0x48, 0x19, 0x69, 0x80, 0x28, 0x00, 0xd0, 0x00, 
-       0xe7, 0xfa, 0x20, 0x02, 0x49, 0x16, 0x61, 0x88, 
-       0x48, 0x15, 0x69, 0x80, 0x28, 0x02, 0xd1, 0x00, 
-       0x27, 0xff, 0xe7, 0xef, 0x4c, 0x13, 0x94, 0x00, 
-       0x20, 0x01, 0x02, 0x40, 0x90, 0x01, 0x22, 0x00, 
-       0x99, 0x03, 0xb4, 0x06, 0x06, 0x2b, 0x16, 0x1b, 
-       0x9a, 0x03, 0x99, 0x04, 0x1c, 0x20, 0xf0, 0x01, 
-       0xff, 0x75, 0xb0, 0x02, 0x1c, 0x06, 0x2e, 0xd2, 
-       0xd1, 0x06, 0x20, 0x00, 0x49, 0x08, 0x61, 0x88, 
-       0x20, 0xd2, 0xb0, 0x02, 0xe7, 0xd2, 0xe0, 0x08, 
-       0x20, 0x00, 0x99, 0x00, 0x60, 0x08, 0x20, 0x00, 
-       0x49, 0x03, 0x61, 0x88, 0x20, 0x00, 0xb0, 0x02, 
-       0xe7, 0xc8, 0xb0, 0x02, 0xe7, 0xc6, 0x00, 0x00, 
-       0xcc, 0x00, 0x0f, 0x80, 0xcc, 0x00, 0x06, 0x00, 
-       0xb5, 0xff, 0x9f, 0x09, 0xb0, 0x81, 0x9b, 0x01, 
-       0x06, 0x18, 0x0e, 0x00, 0x9b, 0x02, 0x06, 0x19, 
-       0x0e, 0x09, 0x9b, 0x03, 0x06, 0x1b, 0x0e, 0x1b, 
-       0x93, 0x00, 0x9b, 0x04, 0x06, 0x1a, 0x0e, 0x12, 
-       0x06, 0x3d, 0x0e, 0x2d, 0x2d, 0x01, 0xd1, 0x07, 
-       0x4c, 0x1c, 0x68, 0x26, 0x23, 0x01, 0x02, 0x9b, 
-       0x43, 0x9e, 0x1c, 0x33, 0x60, 0x23, 0xe0, 0x07, 
-       0x2d, 0x02, 0xd1, 0x05, 0x4c, 0x17, 0x68, 0x26, 
-       0x23, 0x01, 0x02, 0x9b, 0x43, 0x33, 0x60, 0x23, 
-       0x28, 0x00, 0xd1, 0x03, 0x23, 0x00, 0x4c, 0x14, 
-       0x61, 0xe3, 0xe0, 0x04, 0x28, 0x01, 0xd1, 0x02, 
-       0x23, 0x01, 0x4c, 0x11, 0x61, 0xe3, 0x29, 0x00, 
-       0xd1, 0x03, 0x23, 0x00, 0x4c, 0x0e, 0x65, 0xa3, 
-       0xe0, 0x04, 0x29, 0x01, 0xd1, 0x02, 0x23, 0x01, 
-       0x4c, 0x0b, 0x65, 0xa3, 0x2a, 0x00, 0xd1, 0x03, 
-       0x23, 0x02, 0x4c, 0x09, 0x66, 0xe3, 0xe0, 0x04, 
-       0x2a, 0x01, 0xd1, 0x02, 0x23, 0x03, 0x4c, 0x06, 
-       0x66, 0xe3, 0x9b, 0x00, 0x4c, 0x04, 0x67, 0x23, 
-       0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0xcc, 0x00, 0x02, 0x20, 
-       0xcc, 0x00, 0x0f, 0x80, 0xb5, 0xf0, 0x1c, 0x05, 
-       0x1c, 0x0c, 0x1c, 0x17, 0x06, 0x2e, 0x0e, 0x36, 
-       0xb0, 0x84, 0x48, 0x15, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x04, 0x20, 0x39, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x01, 0xd1, 0x0a, 
-       0x94, 0x00, 0x97, 0x01, 0x48, 0x0f, 0x90, 0x02, 
-       0x48, 0x0f, 0x90, 0x03, 0x46, 0x68, 0x21, 0x01, 
-       0xf0, 0x00, 0xfd, 0x1a, 0xe0, 0x0f, 0x20, 0x00, 
-       0x90, 0x00, 0x20, 0x00, 0x90, 0x01, 0x48, 0x09, 
-       0x90, 0x02, 0x48, 0x09, 0x90, 0x03, 0x46, 0x68, 
-       0x21, 0x01, 0xf0, 0x00, 0xfd, 0x0d, 0x21, 0x00, 
-       0x20, 0x02, 0xf7, 0xff, 0xfc, 0x85, 0x20, 0x00, 
-       0xb0, 0x04, 0xe7, 0xdc, 0xb0, 0x04, 0xe7, 0xda, 
-       0x2e, 0x08, 0x7c, 0xbc, 0x00, 0x00, 0x02, 0xcf, 
-       0x00, 0x00, 0x02, 0x3f, 0xb4, 0xb0, 0x1c, 0x05, 
-       0x1c, 0x0c, 0x1c, 0x17, 0x48, 0x14, 0x6c, 0x00, 
-       0x1c, 0x01, 0x48, 0x13, 0x6f, 0x80, 0x23, 0x09, 
-       0x01, 0x9b, 0x42, 0x98, 0xd1, 0x12, 0x20, 0x02, 
-       0x40, 0x20, 0xd0, 0x0c, 0x2d, 0x02, 0xd1, 0x0a, 
-       0x2f, 0x03, 0xd1, 0x00, 0x31, 0x04, 0x2f, 0x03, 
-       0xd2, 0x05, 0x07, 0xe0, 0x0f, 0xc0, 0xd0, 0x01, 
-       0x31, 0x05, 0xe0, 0x00, 0x31, 0x08, 0x2d, 0x02, 
-       0xd9, 0x00, 0x21, 0x12, 0x00, 0x48, 0x18, 0x40, 
-       0x30, 0x01, 0x10, 0x40, 0x21, 0x2d, 0x02, 0x09, 
-       0x43, 0x41, 0x48, 0x03, 0x69, 0x40, 0x18, 0x09, 
-       0x1c, 0x08, 0xbc, 0xb0, 0x47, 0x70, 0xe7, 0xfc, 
-       0xcc, 0x00, 0x0f, 0x80, 0x48, 0x07, 0x6a, 0xc0, 
-       0x1c, 0x01, 0x00, 0x48, 0x18, 0x40, 0x30, 0x01, 
-       0x10, 0x40, 0x21, 0x2d, 0x02, 0x09, 0x43, 0x41, 
-       0x48, 0x03, 0x69, 0x40, 0x18, 0x09, 0x1c, 0x08, 
-       0x47, 0x70, 0xe7, 0xfd, 0xcc, 0x00, 0x00, 0x00, 
-       0xcc, 0x00, 0x0f, 0x80, 0x48, 0x07, 0x68, 0x80, 
-       0x28, 0x00, 0xd1, 0x03, 0x48, 0x06, 0x69, 0x00, 
-       0x1c, 0x01, 0xe0, 0x02, 0x48, 0x04, 0x68, 0xc0, 
-       0x1c, 0x01, 0x4b, 0x02, 0x18, 0xc9, 0x1c, 0x08, 
-       0x47, 0x70, 0xe7, 0xfd, 0xcc, 0x00, 0x00, 0x00, 
-       0xcc, 0x00, 0x0f, 0x80, 0xb5, 0x90, 0x1c, 0x04, 
-       0x1c, 0x0f, 0x48, 0x06, 0x6c, 0x40, 0x60, 0x20, 
-       0x48, 0x04, 0x6c, 0x80, 0x60, 0x38, 0xf7, 0xff, 
-       0xff, 0xe1, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0xe7, 0xfb, 0x00, 0x00, 0xcc, 0x00, 0x02, 0x00, 
-       0xb5, 0xf0, 0x1c, 0x05, 0x1c, 0x0c, 0x1c, 0x17, 
-       0xf7, 0xff, 0xff, 0xd4, 0x1c, 0x06, 0x2d, 0x00, 
-       0xd0, 0x01, 0x2c, 0x00, 0xd1, 0x03, 0x20, 0x3a, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x08, 0x78, 
-       0x00, 0x40, 0xd0, 0x01, 0x20, 0x3a, 0xe7, 0xf7, 
-       0x20, 0x00, 0x49, 0x0d, 0x66, 0x88, 0x48, 0x0d, 
-       0x68, 0x01, 0x23, 0x12, 0x43, 0x19, 0x60, 0x01, 
-       0x48, 0x0b, 0x63, 0x45, 0x48, 0x0a, 0x63, 0x84, 
-       0x20, 0x01, 0x49, 0x09, 0x62, 0x48, 0x48, 0x09, 
-       0x68, 0x01, 0x23, 0x01, 0x40, 0x59, 0x60, 0x01, 
-       0x48, 0x05, 0x63, 0xc7, 0x48, 0x02, 0x60, 0x46, 
-       0x20, 0x00, 0xe7, 0xdd, 0xe7, 0xdc, 0x00, 0x00, 
-       0xcc, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x0f, 0x48, 
-       0xcc, 0x00, 0x00, 0x80, 0xcc, 0x00, 0x00, 0x08, 
-       0xb4, 0xf0, 0x1c, 0x07, 0x1c, 0x0c, 0x1c, 0x16, 
-       0x1c, 0x1d, 0x48, 0x10, 0x6a, 0x00, 0x28, 0x10, 
-       0xd0, 0x02, 0x20, 0x3b, 0xbc, 0xf0, 0x47, 0x70, 
-       0x48, 0x0d, 0x68, 0x00, 0x60, 0x38, 0x68, 0x38, 
-       0x4b, 0x0b, 0x18, 0xc0, 0x60, 0x38, 0x48, 0x0b, 
-       0x6b, 0x40, 0x60, 0x30, 0x48, 0x09, 0x6b, 0x80, 
-       0x60, 0x28, 0x48, 0x09, 0x6c, 0x80, 0x23, 0x10, 
-       0x40, 0x18, 0xd0, 0x02, 0x20, 0x02, 0x60, 0x20, 
-       0xe0, 0x01, 0x20, 0x01, 0x60, 0x20, 0x20, 0x00, 
-       0xe7, 0xe4, 0xe7, 0xe3, 0xcc, 0x00, 0x05, 0x00, 
-       0xcc, 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x80, 
-       0xcc, 0x00, 0x0f, 0x00, 0xb4, 0xf0, 0x1c, 0x05, 
-       0x1c, 0x0c, 0x1c, 0x17, 0x06, 0x2a, 0x0e, 0x12, 
-       0x06, 0x21, 0x0e, 0x09, 0x2f, 0x00, 0xd1, 0x30, 
-       0xb0, 0x81, 0x46, 0x6f, 0x2a, 0x00, 0xd0, 0x06, 
-       0x2a, 0x08, 0xd0, 0x0d, 0x2a, 0x10, 0xd0, 0x14, 
-       0x2a, 0x18, 0xd0, 0x1b, 0xe0, 0x23, 0x20, 0x00, 
-       0x70, 0x38, 0x20, 0x00, 0x70, 0x78, 0x20, 0x0c, 
-       0x70, 0xb8, 0x20, 0x00, 0x70, 0xf8, 0xe0, 0x1b, 
-       0x20, 0x00, 0x70, 0x38, 0x20, 0x08, 0x70, 0x78, 
-       0x20, 0x1c, 0x70, 0xb8, 0x20, 0x00, 0x70, 0xf8, 
-       0xe0, 0x12, 0x20, 0x00, 0x70, 0x38, 0x20, 0x10, 
-       0x70, 0x78, 0x20, 0x0c, 0x70, 0xb8, 0x20, 0x00, 
-       0x70, 0xf8, 0xe0, 0x09, 0x20, 0x00, 0x70, 0x38, 
-       0x20, 0x18, 0x70, 0x78, 0x20, 0x1c, 0x70, 0xb8, 
-       0x20, 0x00, 0x70, 0xf8, 0xe0, 0x00, 0xe7, 0xff, 
-       0xb0, 0x01, 0x23, 0x00, 0x56, 0xf8, 0x23, 0x39, 
-       0x06, 0x5b, 0x60, 0x18, 0x23, 0x01, 0x56, 0xf8, 
-       0x23, 0x39, 0x06, 0x5b, 0x61, 0xd8, 0x29, 0x00, 
-       0xd1, 0x06, 0x48, 0x0e, 0x68, 0x06, 0x23, 0x20, 
-       0x43, 0x9e, 0x1c, 0x33, 0x60, 0x03, 0xe0, 0x06, 
-       0x29, 0x20, 0xd1, 0x04, 0x48, 0x09, 0x68, 0x06, 
-       0x23, 0x20, 0x43, 0x33, 0x60, 0x03, 0x23, 0x02, 
-       0x56, 0xf8, 0x23, 0x39, 0x06, 0x5b, 0x60, 0x58, 
-       0x23, 0x03, 0x56, 0xf8, 0x4b, 0x04, 0x63, 0x18, 
-       0x20, 0x00, 0x23, 0x39, 0x06, 0x5b, 0x64, 0x98, 
-       0xbc, 0xf0, 0x47, 0x70, 0x72, 0x00, 0x00, 0x1c, 
-       0x72, 0x00, 0x01, 0x00, 0xb4, 0xb0, 0x1c, 0x07, 
-       0x1c, 0x0d, 0x1c, 0x14, 0x06, 0x29, 0x0e, 0x09, 
-       0x06, 0x22, 0x0e, 0x12, 0xb0, 0x84, 0x29, 0x33, 
-       0xdc, 0x01, 0x2a, 0x0f, 0xdd, 0x03, 0x20, 0xff, 
-       0xb0, 0x04, 0xbc, 0xb0, 0x47, 0x70, 0x20, 0x39, 
-       0x06, 0x40, 0x63, 0x41, 0x20, 0x10, 0x43, 0x10, 
-       0x23, 0x39, 0x06, 0x5b, 0x63, 0x98, 0x20, 0x39, 
-       0x06, 0x40, 0x68, 0x00, 0x90, 0x03, 0x98, 0x03, 
-       0x23, 0x9c, 0x43, 0xdb, 0x40, 0x18, 0x90, 0x03, 
-       0x20, 0x39, 0x06, 0x40, 0x68, 0x40, 0x90, 0x01, 
-       0x98, 0x01, 0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 
-       0x90, 0x01, 0x06, 0x38, 0x0e, 0x00, 0xd0, 0x29, 
-       0x20, 0x10, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x03, 
-       0x23, 0x80, 0x43, 0x18, 0x90, 0x03, 0x20, 0x08, 
-       0x40, 0x38, 0xd0, 0x03, 0x98, 0x03, 0x23, 0x10, 
-       0x43, 0x18, 0x90, 0x03, 0x20, 0x04, 0x40, 0x38, 
-       0xd0, 0x04, 0x98, 0x03, 0x23, 0x08, 0x43, 0x18, 
-       0x90, 0x03, 0xe0, 0x0c, 0x20, 0x02, 0x40, 0x38, 
-       0xd0, 0x04, 0x98, 0x03, 0x23, 0x0c, 0x43, 0x18, 
-       0x90, 0x03, 0xe0, 0x04, 0x98, 0x03, 0x23, 0x0c, 
-       0x43, 0xdb, 0x40, 0x18, 0x90, 0x03, 0x20, 0x20, 
-       0x40, 0x38, 0xd0, 0x03, 0x98, 0x01, 0x23, 0x20, 
-       0x43, 0x18, 0x90, 0x01, 0x98, 0x03, 0x23, 0x39, 
-       0x06, 0x5b, 0x60, 0x18, 0x98, 0x01, 0x23, 0x39, 
-       0x06, 0x5b, 0x60, 0x58, 0x20, 0x39, 0x06, 0x40, 
-       0x6a, 0x00, 0x90, 0x00, 0x98, 0x00, 0x23, 0xf0, 
-       0x43, 0xdb, 0x43, 0x18, 0x90, 0x00, 0x20, 0xff, 
-       0x02, 0x00, 0x40, 0x38, 0xd0, 0x27, 0x20, 0xff, 
-       0x30, 0x01, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x00, 
-       0x23, 0xfe, 0x40, 0x18, 0x90, 0x00, 0x20, 0x01, 
-       0x02, 0x40, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x00, 
-       0x23, 0xfd, 0x40, 0x18, 0x90, 0x00, 0x20, 0x01, 
-       0x02, 0x80, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x00, 
-       0x23, 0xfb, 0x40, 0x18, 0x90, 0x00, 0x20, 0x01, 
-       0x02, 0xc0, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x00, 
-       0x23, 0xf7, 0x40, 0x18, 0x90, 0x00, 0x20, 0x01, 
-       0x03, 0x00, 0x40, 0x38, 0xd0, 0x03, 0x98, 0x00, 
-       0x23, 0xf0, 0x40, 0x18, 0x90, 0x00, 0x98, 0x00, 
-       0x23, 0x39, 0x06, 0x5b, 0x62, 0x18, 0x20, 0x39, 
-       0x06, 0x40, 0x69, 0xc0, 0x90, 0x02, 0x98, 0x02, 
-       0x08, 0x40, 0x00, 0x40, 0x90, 0x02, 0x20, 0x39, 
-       0x06, 0x40, 0x6a, 0xc0, 0x90, 0x00, 0x98, 0x00, 
-       0x23, 0x1c, 0x43, 0xdb, 0x40, 0x18, 0x90, 0x00, 
-       0x20, 0x39, 0x06, 0x40, 0x6b, 0x80, 0x90, 0x03, 
-       0x98, 0x03, 0x23, 0x10, 0x43, 0xdb, 0x40, 0x18, 
-       0x90, 0x03, 0x20, 0x39, 0x06, 0x40, 0x6b, 0xc0, 
-       0x90, 0x01, 0x98, 0x01, 0x09, 0x00, 0x01, 0x00, 
-       0x90, 0x01, 0x48, 0x4a, 0x40, 0x38, 0xd0, 0x45, 
-       0x20, 0x01, 0x04, 0x00, 0x40, 0x38, 0xd0, 0x03, 
-       0x98, 0x02, 0x23, 0x01, 0x43, 0x18, 0x90, 0x02, 
-       0x20, 0x01, 0x05, 0xc0, 0x40, 0x38, 0xd0, 0x03, 
-       0x98, 0x00, 0x23, 0x10, 0x43, 0x18, 0x90, 0x00, 
-       0x20, 0x07, 0x04, 0x40, 0x40, 0x38, 0x23, 0x01, 
-       0x04, 0x5b, 0x42, 0x98, 0xd0, 0x08, 0x23, 0x01, 
-       0x04, 0x9b, 0x42, 0x98, 0xd0, 0x07, 0x23, 0x01, 
-       0x04, 0xdb, 0x42, 0x98, 0xd0, 0x08, 0xe0, 0x0c, 
-       0x98, 0x00, 0x90, 0x00, 0xe0, 0x0a, 0x98, 0x00, 
-       0x23, 0x04, 0x43, 0x18, 0x90, 0x00, 0xe0, 0x05, 
-       0x98, 0x00, 0x23, 0x0c, 0x43, 0x18, 0x90, 0x00, 
-       0xe0, 0x00, 0xe7, 0xff, 0x20, 0x01, 0x05, 0x80, 
-       0x40, 0x38, 0xd0, 0x03, 0x98, 0x03, 0x23, 0x10, 
-       0x43, 0x18, 0x90, 0x03, 0x20, 0x01, 0x05, 0x00, 
-       0x40, 0x38, 0xd0, 0x03, 0x98, 0x01, 0x23, 0x08, 
-       0x43, 0x18, 0x90, 0x01, 0x20, 0x01, 0x05, 0x40, 
-       0x40, 0x38, 0xd0, 0x03, 0x98, 0x01, 0x23, 0x07, 
-       0x43, 0x18, 0x90, 0x01, 0x98, 0x03, 0x23, 0x39, 
-       0x06, 0x5b, 0x63, 0x98, 0x98, 0x02, 0x23, 0x39, 
-       0x06, 0x5b, 0x61, 0xd8, 0x98, 0x01, 0x23, 0x39, 
-       0x06, 0x5b, 0x63, 0xd8, 0x98, 0x00, 0x23, 0x39, 
-       0x06, 0x5b, 0x62, 0xd8, 0x20, 0x39, 0x06, 0x40, 
-       0x68, 0x80, 0x90, 0x03, 0x98, 0x03, 0x08, 0x80, 
-       0x00, 0x80, 0x90, 0x03, 0x0f, 0x38, 0x07, 0x00, 
-       0xd0, 0x26, 0x20, 0x01, 0x07, 0x00, 0x40, 0x38, 
-       0x23, 0x01, 0x07, 0x1b, 0x42, 0x98, 0xd1, 0x04, 
-       0x98, 0x03, 0x23, 0x02, 0x43, 0x18, 0x90, 0x03, 
-       0xe0, 0x07, 0x20, 0x00, 0x42, 0x80, 0xd1, 0x04, 
-       0x98, 0x03, 0x23, 0x02, 0x43, 0xdb, 0x40, 0x18, 
-       0x90, 0x03, 0x20, 0x01, 0x07, 0x40, 0x40, 0x38, 
-       0x23, 0x01, 0x07, 0x5b, 0x42, 0x98, 0xd1, 0x04, 
-       0x98, 0x03, 0x23, 0x01, 0x43, 0x18, 0x90, 0x03, 
-       0xe0, 0x06, 0x20, 0x00, 0x42, 0x80, 0xd1, 0x03, 
-       0x98, 0x03, 0x08, 0x40, 0x00, 0x40, 0x90, 0x03, 
-       0x98, 0x03, 0x23, 0x39, 0x06, 0x5b, 0x60, 0x98, 
-       0x20, 0x00, 0xb0, 0x04, 0xe6, 0xc1, 0xb0, 0x04, 
-       0xe6, 0xbf, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 
-       0x48, 0x02, 0x69, 0xc0, 0x06, 0x00, 0x16, 0x00, 
-       0x47, 0x70, 0xe7, 0xfd, 0x72, 0x00, 0x01, 0x00, 
-       0xb5, 0xf7, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x23, 
-       0x16, 0x18, 0x06, 0x3b, 0x16, 0x19, 0x9b, 0x02, 
-       0x06, 0x1a, 0x0e, 0x12, 0x2a, 0x00, 0xd1, 0x0b, 
-       0x23, 0x39, 0x06, 0x5b, 0x60, 0xd8, 0x23, 0x39, 
-       0x06, 0x5b, 0x61, 0x19, 0x4d, 0x0b, 0x68, 0x2e, 
-       0x23, 0x01, 0x43, 0x33, 0x60, 0x2b, 0xe0, 0x0c, 
-       0x2a, 0x01, 0xd1, 0x0a, 0x23, 0x39, 0x06, 0x5b, 
-       0x61, 0x58, 0x23, 0x39, 0x06, 0x5b, 0x61, 0x99, 
-       0x4d, 0x04, 0x68, 0x2e, 0x23, 0x02, 0x43, 0x33, 
-       0x60, 0x2b, 0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x72, 0x00, 0x00, 0x08, 
-       0xb4, 0x90, 0x1c, 0x01, 0x20, 0x92, 0x4b, 0x4b, 
-       0x60, 0x18, 0x20, 0x92, 0x4b, 0x4a, 0x60, 0x18, 
-       0x20, 0x10, 0x4b, 0x4a, 0x60, 0x18, 0x20, 0x00, 
-       0x4b, 0x48, 0x60, 0x58, 0x48, 0x48, 0x4b, 0x47, 
-       0x60, 0x98, 0x22, 0x00, 0x2a, 0x10, 0xdb, 0x02, 
-       0xe0, 0x07, 0x32, 0x01, 0xe7, 0xfa, 0x20, 0x00, 
-       0x43, 0xc0, 0x00, 0x93, 0x4c, 0x42, 0x50, 0xe0, 
-       0xe7, 0xf7, 0x20, 0x00, 0x43, 0xc0, 0x00, 0x93, 
-       0x4c, 0x3f, 0x50, 0xe0, 0x22, 0x00, 0x2a, 0x08, 
-       0xdb, 0x02, 0xe0, 0x08, 0x32, 0x01, 0xe7, 0xfa, 
-       0x20, 0x00, 0x43, 0xc0, 0x00, 0x94, 0x4b, 0x3b, 
-       0x18, 0xe3, 0x64, 0x18, 0xe7, 0xf6, 0x22, 0x00, 
-       0x2a, 0x20, 0xdb, 0x02, 0xe0, 0x08, 0x32, 0x01, 
-       0xe7, 0xfa, 0x20, 0x00, 0x43, 0xc0, 0x00, 0x94, 
-       0x4b, 0x35, 0x18, 0xe3, 0x60, 0x18, 0xe7, 0xf6, 
-       0x22, 0x00, 0x2a, 0x19, 0xdb, 0x02, 0xe0, 0x06, 
-       0x32, 0x01, 0xe7, 0xfa, 0x20, 0x00, 0x00, 0x93, 
-       0x4c, 0x30, 0x50, 0xe0, 0xe7, 0xf8, 0x20, 0x00, 
-       0x4b, 0x2f, 0x60, 0x18, 0x20, 0x39, 0x06, 0x40, 
-       0x69, 0xc0, 0x27, 0x18, 0x40, 0x07, 0x2f, 0x00, 
-       0xd0, 0x03, 0x48, 0x2c, 0x4b, 0x2c, 0x60, 0x18, 
-       0xe0, 0x03, 0x20, 0xff, 0x30, 0xe0, 0x4b, 0x2a, 
-       0x60, 0x18, 0x20, 0x00, 0x4b, 0x29, 0x60, 0x18, 
-       0x20, 0x00, 0x4b, 0x28, 0x60, 0x58, 0x48, 0x28, 
-       0x4b, 0x26, 0x60, 0x98, 0x48, 0x24, 0x68, 0x00, 
-       0x4b, 0x24, 0x60, 0xd8, 0x48, 0x25, 0x60, 0x01, 
-       0x20, 0x0d, 0x06, 0xc0, 0x61, 0xc1, 0x20, 0x05, 
-       0x02, 0x00, 0x23, 0x0d, 0x06, 0xdb, 0x60, 0x18, 
-       0x48, 0x21, 0x23, 0x0d, 0x06, 0xdb, 0x60, 0x58, 
-       0x48, 0x1f, 0x4b, 0x16, 0x63, 0x98, 0x20, 0x00, 
-       0x23, 0x0d, 0x06, 0xdb, 0x60, 0x98, 0x20, 0x00, 
-       0x23, 0x0d, 0x06, 0xdb, 0x61, 0x18, 0x48, 0x1b, 
-       0x23, 0x0d, 0x06, 0xdb, 0x61, 0x98, 0x20, 0x01, 
-       0x23, 0x0d, 0x06, 0xdb, 0x60, 0xd8, 0x48, 0x18, 
-       0x23, 0x0d, 0x06, 0xdb, 0x63, 0x18, 0x48, 0x17, 
-       0x23, 0x0d, 0x06, 0xdb, 0x63, 0x58, 0x20, 0x00, 
-       0x4b, 0x15, 0x60, 0x18, 0x48, 0x11, 0x4b, 0x15, 
-       0x60, 0x18, 0x20, 0x00, 0xbc, 0x90, 0x47, 0x70, 
-       0xe7, 0xfc, 0x00, 0x00, 0x2e, 0x08, 0x7c, 0xc4, 
-       0x2e, 0x08, 0x7c, 0xc0, 0x2e, 0x08, 0x7d, 0x94, 
-       0x2e, 0x08, 0x7c, 0xcc, 0x68, 0x00, 0x0d, 0x00, 
-       0x68, 0x00, 0x04, 0x00, 0x2e, 0x08, 0x7c, 0x58, 
-       0x2e, 0x08, 0x7c, 0xbc, 0x00, 0x00, 0x02, 0x3f, 
-       0x2e, 0x08, 0x60, 0x80, 0x2e, 0x08, 0x7d, 0xa0, 
-       0x00, 0x00, 0x02, 0xcf, 0x2e, 0x08, 0x60, 0x84, 
-       0x00, 0xf0, 0x29, 0x6d, 0x3f, 0xff, 0xff, 0xff, 
-       0x00, 0x80, 0x10, 0x80, 0x00, 0x80, 0xeb, 0x80, 
-       0x2e, 0x08, 0x94, 0x84, 0x2e, 0x08, 0x5e, 0x4c, 
-       0xb5, 0xff, 0xb0, 0x85, 0x20, 0x39, 0x06, 0x40, 
-       0x69, 0xc0, 0x23, 0x18, 0x40, 0x18, 0x90, 0x00, 
-       0x98, 0x00, 0x28, 0x00, 0xd0, 0x03, 0x48, 0x5a, 
-       0x4b, 0x5a, 0x60, 0x18, 0xe0, 0x03, 0x20, 0xff, 
-       0x30, 0xe0, 0x4b, 0x58, 0x60, 0x18, 0x9c, 0x06, 
-       0x9f, 0x07, 0x22, 0x00, 0x21, 0x00, 0x98, 0x05, 
-       0x38, 0x0c, 0x28, 0x06, 0xd2, 0x0c, 0xa3, 0x02, 
-       0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x04, 0x03, 0x06, 0x04, 0x03, 0x06, 0x32, 0x01, 
-       0x32, 0x01, 0xe0, 0x02, 0x3a, 0x01, 0xe0, 0x00, 
-       0xe7, 0xff, 0x98, 0x05, 0x38, 0x0b, 0x28, 0x08, 
-       0xd2, 0x15, 0xa3, 0x02, 0x5c, 0x1b, 0x00, 0x5b, 
-       0x44, 0x9f, 0x1c, 0x00, 0x0a, 0x04, 0x04, 0x04, 
-       0x0a, 0x0a, 0x0a, 0x04, 0x25, 0x2d, 0x01, 0x2d, 
-       0x48, 0x44, 0x68, 0x00, 0x1c, 0x46, 0xe0, 0x0e, 
-       0x48, 0x43, 0x6c, 0x40, 0x1c, 0x05, 0x48, 0x43, 
-       0x68, 0x40, 0x1c, 0x06, 0xe0, 0x07, 0x21, 0xff, 
-       0x1c, 0x08, 0xb0, 0x05, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xe7, 0xff, 0x2d, 0x00, 
-       0xd0, 0x01, 0x2e, 0x00, 0xd1, 0x04, 0x25, 0x2d, 
-       0x01, 0x2d, 0x48, 0x38, 0x68, 0x00, 0x1c, 0x46, 
-       0x29, 0xff, 0xd1, 0x02, 0x1c, 0x08, 0xb0, 0x05, 
-       0xe7, 0xec, 0x1e, 0x68, 0x90, 0x02, 0x1e, 0x70, 
-       0x90, 0x01, 0x23, 0x01, 0x42, 0xda, 0xd1, 0x08, 
-       0x42, 0x50, 0x40, 0x85, 0x1c, 0x2b, 0x1e, 0x5d, 
-       0x42, 0x50, 0x40, 0x86, 0x1c, 0x33, 0x1e, 0x5e, 
-       0xe0, 0x05, 0x41, 0x15, 0x1c, 0x28, 0x1e, 0x45, 
-       0x41, 0x16, 0x1c, 0x30, 0x1e, 0x46, 0x07, 0xe0, 
-       0x0f, 0xc0, 0xd0, 0x02, 0x21, 0x80, 0x08, 0x64, 
-       0x00, 0x64, 0x07, 0xf8, 0x0f, 0xc0, 0xd0, 0x02, 
-       0x21, 0x80, 0x08, 0x7f, 0x00, 0x7f, 0x19, 0x60, 
-       0x90, 0x04, 0x19, 0xb8, 0x90, 0x03, 0x2c, 0x00, 
-       0xda, 0x01, 0x21, 0x80, 0x24, 0x00, 0x98, 0x04, 
-       0x28, 0x01, 0xda, 0x02, 0x21, 0x80, 0x20, 0x01, 
-       0x90, 0x04, 0x4b, 0x1f, 0x42, 0x9c, 0xdb, 0x01, 
-       0x21, 0x80, 0x4c, 0x1e, 0x98, 0x04, 0x4b, 0x1c, 
-       0x42, 0x98, 0xdd, 0x02, 0x21, 0x80, 0x48, 0x1a, 
-       0x90, 0x04, 0x2f, 0x00, 0xda, 0x01, 0x21, 0x80, 
-       0x27, 0x00, 0x98, 0x03, 0x28, 0x01, 0xda, 0x02, 
-       0x21, 0x80, 0x20, 0x01, 0x90, 0x03, 0x48, 0x11, 
-       0x68, 0x00, 0x42, 0x87, 0xd3, 0x03, 0x21, 0x80, 
-       0x48, 0x0e, 0x68, 0x00, 0x1e, 0x47, 0x98, 0x03, 
-       0x4b, 0x0c, 0x68, 0x1b, 0x42, 0x98, 0xd9, 0x03, 
-       0x21, 0x80, 0x48, 0x0a, 0x68, 0x00, 0x90, 0x03, 
-       0x9b, 0x08, 0x60, 0x1c, 0x9b, 0x08, 0x60, 0x5f, 
-       0x98, 0x04, 0x9b, 0x08, 0x60, 0x98, 0x98, 0x03, 
-       0x9b, 0x08, 0x60, 0xd8, 0x1c, 0x08, 0xb0, 0x05, 
-       0xe7, 0x88, 0xb0, 0x05, 0xe7, 0x86, 0x00, 0x00, 
-       0x00, 0x00, 0x02, 0x3f, 0x2e, 0x08, 0x60, 0x80, 
-       0xcc, 0x00, 0x02, 0x00, 0xcc, 0x00, 0x0c, 0x00, 
-       0x00, 0x00, 0x02, 0xcf, 0x00, 0x00, 0x02, 0xce, 
-       0xb5, 0xf0, 0x1c, 0x07, 0x1c, 0x0c, 0xb0, 0x81, 
-       0x2c, 0x0b, 0xdb, 0x19, 0x2c, 0x12, 0xdc, 0x17, 
-       0x68, 0xbe, 0x68, 0xf9, 0x91, 0x00, 0x68, 0x7a, 
-       0x1c, 0x3b, 0x68, 0x39, 0x1c, 0x20, 0xf7, 0xff, 
-       0xff, 0x23, 0x1c, 0x05, 0x68, 0xb8, 0x42, 0xb0, 
-       0xd0, 0x00, 0x25, 0x80, 0x68, 0xf8, 0x99, 0x00, 
-       0x42, 0x88, 0xd0, 0x00, 0x25, 0x80, 0x1c, 0x28, 
-       0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x25, 0x00, 0x68, 0x38, 0x28, 0x00, 0xda, 0x02, 
-       0x25, 0x80, 0x20, 0x00, 0x60, 0x38, 0x68, 0x78, 
-       0x28, 0x00, 0xda, 0x02, 0x25, 0x80, 0x20, 0x00, 
-       0x60, 0x78, 0x68, 0x38, 0x07, 0xc0, 0x0f, 0xc0, 
-       0xd0, 0x04, 0x25, 0x80, 0x68, 0x38, 0x08, 0x40, 
-       0x00, 0x40, 0x60, 0x38, 0x68, 0xb8, 0x07, 0xc0, 
-       0x0f, 0xc0, 0xd1, 0x09, 0x25, 0x80, 0x68, 0xb8, 
-       0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x01, 0x68, 0xb8, 
-       0xe0, 0x01, 0x68, 0xb8, 0x38, 0x01, 0x60, 0xb8, 
-       0x68, 0xb8, 0x68, 0x39, 0x42, 0x88, 0xdc, 0x03, 
-       0x25, 0x80, 0x68, 0x38, 0x30, 0x01, 0x60, 0xb8, 
-       0x68, 0x78, 0x68, 0xf9, 0x42, 0x88, 0xdb, 0x03, 
-       0x25, 0x80, 0x68, 0x78, 0x30, 0x01, 0x60, 0xf8, 
-       0x1c, 0x28, 0xb0, 0x01, 0xe7, 0xc5, 0xb0, 0x01, 
-       0xe7, 0xc3, 0x1c, 0x02, 0x21, 0x18, 0xe0, 0x00, 
-       0x31, 0x01, 0x1c, 0x08, 0x47, 0x70, 0xe7, 0xfd, 
-       0xb4, 0xf0, 0x1c, 0x07, 0x1c, 0x0a, 0xb0, 0x81, 
-       0x68, 0xb8, 0x68, 0x3b, 0x1a, 0xc0, 0x1c, 0x46, 
-       0x68, 0xf8, 0x68, 0x7b, 0x1a, 0xc0, 0x30, 0x01, 
-       0x90, 0x00, 0x00, 0x90, 0x4b, 0x15, 0x58, 0x1c, 
-       0x98, 0x00, 0x43, 0x46, 0x1c, 0x35, 0x07, 0xa0, 
-       0x0f, 0x80, 0x1c, 0x29, 0x40, 0x81, 0x2a, 0x0b, 
-       0xdb, 0x01, 0x2a, 0x12, 0xdd, 0x01, 0x2a, 0x13, 
-       0xd1, 0x01, 0x21, 0x00, 0xe0, 0x0a, 0x2a, 0x09, 
-       0xd0, 0x01, 0x2a, 0x0a, 0xd1, 0x03, 0x00, 0x69, 
-       0x19, 0x49, 0x00, 0xc9, 0xe0, 0x02, 0x2a, 0x08, 
-       0xd1, 0x00, 0x01, 0x29, 0x20, 0x04, 0x40, 0x20, 
-       0xd0, 0x00, 0x08, 0x49, 0x09, 0x4c, 0x06, 0xc8, 
-       0x0e, 0xc0, 0xd0, 0x00, 0x34, 0x01, 0x1c, 0x20, 
-       0xb0, 0x01, 0xbc, 0xf0, 0x47, 0x70, 0xb0, 0x01, 
-       0xe7, 0xfb, 0x00, 0x00, 0x2e, 0x03, 0x3a, 0x04, 
-       0xb4, 0x80, 0x23, 0x00, 0x22, 0x01, 0x21, 0x00, 
-       0x29, 0x08, 0xdb, 0x02, 0xe0, 0x09, 0x31, 0x01, 
-       0xe7, 0xfa, 0x00, 0x88, 0x4f, 0x05, 0x58, 0x38, 
-       0x28, 0x00, 0xd0, 0x00, 0x43, 0x13, 0x00, 0x52, 
-       0xe7, 0xf5, 0x1c, 0x18, 0xbc, 0x80, 0x47, 0x70, 
-       0xe7, 0xfc, 0x00, 0x00, 0x2e, 0x08, 0x7c, 0x58, 
-       0xb5, 0xf3, 0x1c, 0x0f, 0xb0, 0x81, 0x20, 0x39, 
-       0x06, 0x40, 0x69, 0xc0, 0x23, 0x18, 0x40, 0x18, 
-       0x90, 0x00, 0x98, 0x00, 0x28, 0x00, 0xd0, 0x03, 
-       0x48, 0x32, 0x49, 0x33, 0x60, 0x08, 0xe0, 0x03, 
-       0x20, 0xff, 0x30, 0xe0, 0x49, 0x30, 0x60, 0x08, 
-       0x24, 0x00, 0x99, 0x01, 0x48, 0x2f, 0xf7, 0xfc, 
-       0xfa, 0x1f, 0x48, 0x2e, 0x68, 0x00, 0x28, 0x00, 
-       0xda, 0x03, 0x20, 0x00, 0x49, 0x2b, 0x60, 0x08, 
-       0x24, 0x80, 0x48, 0x2a, 0x68, 0x40, 0x28, 0x00, 
-       0xda, 0x03, 0x20, 0x00, 0x49, 0x27, 0x60, 0x48, 
-       0x24, 0x80, 0x48, 0x26, 0x68, 0x80, 0x4b, 0x26, 
-       0x42, 0x98, 0xdd, 0x03, 0x48, 0x24, 0x49, 0x23, 
-       0x60, 0x88, 0x24, 0x80, 0x48, 0x21, 0x68, 0xc0, 
-       0x49, 0x1f, 0x68, 0x09, 0x42, 0x88, 0xd9, 0x04, 
-       0x48, 0x1d, 0x68, 0x00, 0x49, 0x1d, 0x60, 0xc8, 
-       0x24, 0x80, 0x48, 0x1e, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x27, 0x2f, 0x01, 0xd1, 0x25, 0x48, 0x19, 
-       0x68, 0x06, 0x48, 0x18, 0x68, 0x45, 0x23, 0xff, 
-       0x33, 0x68, 0x42, 0x9e, 0xdd, 0x01, 0x26, 0xff, 
-       0x36, 0x68, 0x48, 0x13, 0x68, 0x00, 0x08, 0x40, 
-       0x42, 0xa8, 0xd2, 0x02, 0x48, 0x10, 0x68, 0x00, 
-       0x08, 0x45, 0x48, 0x13, 0x49, 0x13, 0x65, 0x48, 
-       0x48, 0x13, 0x43, 0x70, 0x23, 0x01, 0x04, 0x1b, 
-       0x18, 0xc0, 0x14, 0x40, 0x49, 0x0f, 0x65, 0x88, 
-       0x20, 0x00, 0x49, 0x0e, 0x65, 0xc8, 0x48, 0x0d, 
-       0x66, 0x05, 0x1c, 0x38, 0x21, 0x00, 0xf7, 0xfe, 
-       0xff, 0x13, 0x1c, 0x20, 0xb0, 0x01, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x01, 
-       0xe7, 0xf9, 0x00, 0x00, 0x00, 0x00, 0x02, 0x3f, 
-       0x2e, 0x08, 0x60, 0x80, 0x2e, 0x08, 0x7d, 0xa0, 
-       0x00, 0x00, 0x02, 0xcf, 0x2e, 0x08, 0x7c, 0xbc, 
-       0x00, 0x00, 0x07, 0xfa, 0xcc, 0x00, 0x00, 0x00, 
-       0x00, 0x0b, 0x60, 0xb6, 0xb5, 0xf0, 0x1c, 0x04, 
-       0x1c, 0x0f, 0xb0, 0x81, 0x1c, 0x26, 0x69, 0x30, 
-       0x90, 0x00, 0x98, 0x00, 0x28, 0x13, 0xd1, 0x04, 
-       0x20, 0x75, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x68, 0xf5, 0x68, 0x38, 0x08, 0x40, 
-       0x00, 0x40, 0x60, 0x38, 0x68, 0x78, 0x08, 0x40, 
-       0x00, 0x40, 0x60, 0x78, 0x68, 0xb8, 0x07, 0xc0, 
-       0x0f, 0xc0, 0xd1, 0x02, 0x68, 0xb8, 0x38, 0x01, 
-       0x60, 0xb8, 0x68, 0xf8, 0x07, 0xc0, 0x0f, 0xc0, 
-       0xd1, 0x02, 0x68, 0xf8, 0x38, 0x01, 0x60, 0xf8, 
-       0x1d, 0xf0, 0x30, 0x49, 0x1c, 0x39, 0xf7, 0xfc, 
-       0xf9, 0x8b, 0x48, 0x1c, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0x2d, 0x19, 0xd3, 0x01, 0x20, 0x01, 
-       0xe0, 0x00, 0x20, 0x00, 0xe0, 0x04, 0x2d, 0x08, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 0xb0, 0x01, 
-       0xe7, 0xcc, 0x49, 0x13, 0x20, 0x91, 0xf0, 0x13, 
-       0xfb, 0x0d, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
-       0xf0, 0x05, 0xfa, 0xf4, 0xe7, 0xf5, 0x00, 0xa8, 
-       0x49, 0x0e, 0x58, 0x08, 0x42, 0xa0, 0xd0, 0x05, 
-       0x20, 0x92, 0x49, 0x0b, 0x60, 0x08, 0x20, 0xff, 
-       0xb0, 0x01, 0xe7, 0xb7, 0x48, 0x0a, 0x68, 0x00, 
-       0x42, 0xa0, 0xd1, 0x03, 0x1c, 0x39, 0x1c, 0x20, 
-       0xf0, 0x00, 0xf8, 0x10, 0x20, 0x92, 0x49, 0x04, 
-       0x60, 0x08, 0x20, 0x00, 0xb0, 0x01, 0xe7, 0xa9, 
-       0xb0, 0x01, 0xe7, 0xa7, 0x2e, 0x08, 0x94, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc0, 0x2e, 0x08, 0x7c, 0x58, 
-       0x2e, 0x08, 0x7c, 0xbc, 0xb5, 0xf3, 0x1c, 0x0f, 
-       0xb0, 0x9b, 0x20, 0x39, 0x06, 0x40, 0x69, 0xc0, 
-       0x23, 0x18, 0x40, 0x18, 0x90, 0x01, 0x98, 0x01, 
-       0x28, 0x00, 0xd0, 0x03, 0x48, 0xf8, 0x49, 0xf9, 
-       0x60, 0x08, 0xe0, 0x03, 0x20, 0xff, 0x30, 0xe0, 
-       0x49, 0xf6, 0x60, 0x08, 0x20, 0xff, 0x30, 0x01, 
-       0x90, 0x06, 0x98, 0x1b, 0x90, 0x1a, 0x98, 0x1a, 
-       0x69, 0x05, 0x98, 0x1a, 0x68, 0xc0, 0x90, 0x19, 
-       0x48, 0xf1, 0x68, 0x00, 0x99, 0x1b, 0x42, 0x88, 
-       0xd1, 0x73, 0x20, 0x02, 0x90, 0x08, 0x2d, 0x0c, 
-       0xd0, 0x01, 0x2d, 0x0f, 0xd1, 0x02, 0x20, 0x04, 
-       0x90, 0x08, 0xe0, 0x0c, 0x2d, 0x0d, 0xd0, 0x01, 
-       0x2d, 0x10, 0xd1, 0x02, 0x20, 0x08, 0x90, 0x08, 
-       0xe0, 0x05, 0x2d, 0x0e, 0xd0, 0x01, 0x2d, 0x11, 
-       0xd1, 0x01, 0x20, 0x01, 0x90, 0x08, 0x68, 0xf8, 
-       0x68, 0x79, 0x1a, 0x40, 0x1c, 0x44, 0x2d, 0x0b, 
-       0xd0, 0x05, 0x2d, 0x0f, 0xd0, 0x03, 0x2d, 0x10, 
-       0xd0, 0x01, 0x2d, 0x11, 0xd1, 0x11, 0x48, 0xdf, 
-       0x6c, 0x40, 0x1c, 0x06, 0x48, 0xdd, 0x6c, 0x81, 
-       0x91, 0x07, 0x2e, 0x00, 0xd0, 0x02, 0x99, 0x07, 
-       0x29, 0x00, 0xd1, 0x05, 0x26, 0x2d, 0x01, 0x36, 
-       0x48, 0xd6, 0x68, 0x00, 0x1c, 0x41, 0x91, 0x07, 
-       0xe0, 0x05, 0x26, 0x2d, 0x01, 0x36, 0x48, 0xd3, 
-       0x68, 0x00, 0x1c, 0x41, 0x91, 0x07, 0x49, 0xd4, 
-       0xa8, 0x15, 0xf7, 0xfc, 0xf8, 0xe9, 0x98, 0x17, 
-       0x1e, 0x71, 0x42, 0x88, 0xdd, 0x01, 0x1e, 0x70, 
-       0x90, 0x17, 0x98, 0x18, 0x99, 0x07, 0x39, 0x01, 
-       0x42, 0x88, 0xdd, 0x02, 0x99, 0x07, 0x1e, 0x48, 
-       0x90, 0x18, 0x98, 0x18, 0x99, 0x16, 0x1a, 0x40, 
-       0x00, 0x40, 0x1c, 0x81, 0x98, 0x08, 0xf0, 0x06, 
-       0xfb, 0xd3, 0x90, 0x0a, 0x98, 0x0a, 0x42, 0x84, 
-       0xdd, 0x00, 0x9c, 0x0a, 0x48, 0xc5, 0x6f, 0x00, 
-       0x90, 0x02, 0x20, 0x00, 0x90, 0x05, 0x98, 0x02, 
-       0x28, 0x02, 0xd0, 0x02, 0x98, 0x02, 0x28, 0x03, 
-       0xd1, 0x3a, 0x48, 0xc1, 0x6b, 0x00, 0x90, 0x04, 
-       0x48, 0xbe, 0x6e, 0xc1, 0x91, 0x03, 0x98, 0x04, 
-       0x99, 0x03, 0x42, 0x88, 0xdd, 0x21, 0x20, 0xc0, 
-       0x90, 0x06, 0x1d, 0x20, 0x28, 0x00, 0xda, 0x02, 
-       0xe0, 0x00, 0xe1, 0x8e, 0x30, 0x07, 0x10, 0xc0, 
-       0x90, 0x05, 0x98, 0x04, 0x28, 0x03, 0xd0, 0x14, 
-       0x99, 0x03, 0x29, 0x03, 0xd1, 0x07, 0x20, 0xcd, 
-       0x90, 0x06, 0x1d, 0x61, 0x20, 0x0a, 0xf0, 0x06, 
-       0xfb, 0xa3, 0x90, 0x05, 0xe0, 0x09, 0x98, 0x02, 
-       0x28, 0x02, 0xd1, 0x06, 0x20, 0x9a, 0x90, 0x06, 
-       0x1c, 0xa1, 0x20, 0x05, 0xf0, 0x06, 0xfb, 0x98, 
-       0x90, 0x05, 0x98, 0x06, 0x28, 0x9a, 0xd0, 0x02, 
-       0x98, 0x06, 0x28, 0xcd, 0xd1, 0x08, 0x2d, 0x0e, 
-       0xd0, 0x01, 0x2d, 0x11, 0xd1, 0x04, 0x20, 0x00, 
-       0x90, 0x05, 0x20, 0xff, 0x30, 0x01, 0x90, 0x06, 
-       0x2d, 0x12, 0xd1, 0x0b, 0x48, 0x9d, 0x68, 0x00, 
-       0x30, 0x01, 0x42, 0xa0, 0xd1, 0x06, 0x68, 0x78, 
-       0x28, 0x00, 0xd1, 0x03, 0x20, 0x01, 0x49, 0x9f, 
-       0x63, 0x48, 0xe0, 0x02, 0x20, 0x00, 0x49, 0x9d, 
-       0x63, 0x48, 0x98, 0x0a, 0x99, 0x06, 0x43, 0x48, 
-       0x28, 0x00, 0xda, 0x00, 0x30, 0xff, 0x12, 0x00, 
-       0x42, 0xa0, 0xdd, 0x04, 0x20, 0x00, 0x90, 0x05, 
-       0x20, 0xff, 0x30, 0x01, 0x90, 0x06, 0x68, 0x78, 
-       0x99, 0x05, 0x18, 0x40, 0x60, 0x78, 0x1c, 0x39, 
-       0xa8, 0x11, 0xf7, 0xfc, 0xf8, 0x61, 0x1c, 0x29, 
-       0xa8, 0x11, 0xf7, 0xff, 0xfd, 0x71, 0x98, 0x12, 
-       0x49, 0x88, 0x68, 0x09, 0x39, 0x01, 0x42, 0x88, 
-       0xd1, 0x00, 0x24, 0x00, 0x99, 0x15, 0x91, 0x0d, 
-       0x98, 0x16, 0x90, 0x0f, 0x21, 0x00, 0x91, 0x10, 
-       0x68, 0x38, 0x28, 0x00, 0xda, 0x08, 0x68, 0x38, 
-       0x99, 0x08, 0x43, 0x48, 0x42, 0x41, 0x29, 0x00, 
-       0xda, 0x00, 0x31, 0x01, 0x10, 0x49, 0x91, 0x10, 
-       0x68, 0x78, 0x28, 0x00, 0xda, 0x0d, 0x68, 0x78, 
-       0x99, 0x08, 0x43, 0x48, 0x28, 0x00, 0xda, 0x00, 
-       0x30, 0x01, 0x10, 0x40, 0x02, 0x01, 0x98, 0x06, 
-       0xf0, 0x06, 0xfb, 0x36, 0x99, 0x0f, 0x1a, 0x08, 
-       0x90, 0x0f, 0x98, 0x18, 0x99, 0x0f, 0x42, 0x88, 
-       0xdc, 0x02, 0x98, 0x18, 0x30, 0x01, 0x90, 0x0f, 
-       0x98, 0x17, 0x99, 0x0d, 0x1a, 0x40, 0x30, 0x01, 
-       0x90, 0x0e, 0x98, 0x18, 0x99, 0x0f, 0x1a, 0x40, 
-       0x30, 0x01, 0x90, 0x09, 0x98, 0x09, 0x00, 0x41, 
-       0x98, 0x08, 0xf0, 0x06, 0xfb, 0x1d, 0x99, 0x06, 
-       0x43, 0x48, 0x28, 0x00, 0xda, 0x00, 0x30, 0xff, 
-       0x12, 0x00, 0x90, 0x09, 0x68, 0xb8, 0x68, 0x39, 
-       0x1a, 0x40, 0x1c, 0x41, 0x91, 0x0c, 0x98, 0x17, 
-       0x99, 0x15, 0x1a, 0x40, 0x00, 0x40, 0x1c, 0x81, 
-       0x98, 0x08, 0xf0, 0x06, 0xfb, 0x09, 0x90, 0x0b, 
-       0x98, 0x0b, 0x4b, 0x65, 0x40, 0x18, 0x90, 0x0b, 
-       0x98, 0x0b, 0x99, 0x08, 0x43, 0x48, 0x28, 0x00, 
-       0xda, 0x00, 0x30, 0x01, 0x10, 0x40, 0x90, 0x0e, 
-       0x99, 0x0c, 0x98, 0x0b, 0x42, 0x81, 0xdd, 0x01, 
-       0x98, 0x0b, 0x90, 0x0c, 0x99, 0x0c, 0x4b, 0x5c, 
-       0x40, 0x19, 0x91, 0x0c, 0x98, 0x0c, 0x28, 0x00, 
-       0xdd, 0x05, 0x68, 0x38, 0x99, 0x0c, 0x18, 0x40, 
-       0x38, 0x01, 0x90, 0x13, 0xe0, 0x02, 0x68, 0x38, 
-       0x30, 0x01, 0x90, 0x13, 0x98, 0x13, 0x28, 0x01, 
-       0xda, 0x01, 0x20, 0x01, 0x90, 0x13, 0x98, 0x13, 
-       0x4b, 0x52, 0x42, 0x98, 0xdd, 0x01, 0x48, 0x51, 
-       0x90, 0x13, 0x99, 0x06, 0x43, 0x4c, 0x1c, 0x20, 
-       0x28, 0x00, 0xda, 0x00, 0x30, 0xff, 0x12, 0x04, 
-       0x98, 0x0a, 0x42, 0x84, 0xdd, 0x00, 0x9c, 0x0a, 
-       0x2c, 0x02, 0xda, 0x00, 0x24, 0x02, 0x68, 0x78, 
-       0x19, 0x00, 0x38, 0x01, 0x90, 0x14, 0x98, 0x14, 
-       0x28, 0x01, 0xda, 0x01, 0x20, 0x01, 0x90, 0x14, 
-       0x98, 0x14, 0x49, 0x3c, 0x68, 0x09, 0x42, 0x88, 
-       0xd9, 0x02, 0x48, 0x3a, 0x68, 0x00, 0x90, 0x14, 
-       0x98, 0x12, 0x49, 0x38, 0x68, 0x09, 0x39, 0x01, 
-       0x42, 0x88, 0xd9, 0x03, 0x48, 0x35, 0x68, 0x00, 
-       0x38, 0x01, 0x90, 0x12, 0x98, 0x09, 0x28, 0x04, 
-       0xdb, 0x01, 0x2c, 0x04, 0xda, 0x01, 0x20, 0x00, 
-       0x90, 0x0e, 0x98, 0x0e, 0x28, 0x03, 0xdb, 0x02, 
-       0x98, 0x0c, 0x28, 0x04, 0xda, 0x09, 0x20, 0x00, 
-       0x90, 0x0e, 0x48, 0x35, 0x90, 0x11, 0x48, 0x33, 
-       0x90, 0x13, 0x20, 0x00, 0x90, 0x12, 0x20, 0x01, 
-       0x90, 0x14, 0x21, 0x00, 0x91, 0x00, 0x98, 0x08, 
-       0x28, 0x01, 0xd1, 0x16, 0x98, 0x0e, 0x99, 0x10, 
-       0x1a, 0x40, 0x00, 0x40, 0x4b, 0x2b, 0x42, 0x98, 
-       0xdd, 0x0b, 0x98, 0x0e, 0x99, 0x10, 0x1a, 0x40, 
-       0x00, 0x40, 0x23, 0x2d, 0x01, 0x1b, 0x1a, 0xc1, 
-       0x29, 0x00, 0xda, 0x00, 0x31, 0x01, 0x10, 0x49, 
-       0x91, 0x00, 0x98, 0x0e, 0x42, 0xb0, 0xdd, 0x00, 
-       0x96, 0x0e, 0x99, 0x10, 0x42, 0xb1, 0xdd, 0x00, 
-       0x96, 0x10, 0x1c, 0x30, 0x21, 0x01, 0x07, 0x49, 
-       0xf0, 0x06, 0xfa, 0x76, 0x99, 0x0d, 0x43, 0x48, 
-       0x23, 0x01, 0x04, 0x1b, 0x18, 0xc0, 0x14, 0x40, 
-       0x49, 0x1c, 0x65, 0x88, 0x1c, 0x30, 0x21, 0x01, 
-       0x07, 0x49, 0xf0, 0x06, 0xfa, 0x69, 0x99, 0x10, 
-       0x43, 0x48, 0x23, 0x01, 0x04, 0x1b, 0x18, 0xc0, 
-       0x14, 0x40, 0x49, 0x16, 0x65, 0xc8, 0x1c, 0x30, 
-       0x21, 0x01, 0x07, 0x49, 0xf0, 0x06, 0xfa, 0x5c, 
-       0x99, 0x0e, 0x43, 0x48, 0x23, 0x01, 0x04, 0x1b, 
-       0x18, 0xc0, 0x14, 0x40, 0x49, 0x0f, 0x65, 0x48, 
-       0x99, 0x07, 0x1f, 0x08, 0x99, 0x0f, 0x42, 0x88, 
-       0xdc, 0x1b, 0x99, 0x07, 0x1f, 0x08, 0xe0, 0x17, 
-       0x00, 0x00, 0x02, 0x3f, 0x2e, 0x08, 0x60, 0x80, 
-       0x2e, 0x08, 0x7c, 0xbc, 0xcc, 0x00, 0x02, 0x00, 
-       0x2e, 0x08, 0x7d, 0xa0, 0xcc, 0x00, 0x0f, 0x80, 
-       0xcc, 0x00, 0x00, 0x80, 0xcc, 0x00, 0x01, 0x00, 
-       0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x02, 0xcf, 
-       0x00, 0x00, 0x02, 0xce, 0xcc, 0x00, 0x00, 0x00, 
-       0x90, 0x0f, 0x98, 0x0f, 0x49, 0x0d, 0x66, 0x08, 
-       0x1c, 0x30, 0x21, 0x01, 0x07, 0x49, 0xf0, 0x06, 
-       0xfa, 0x2b, 0x99, 0x00, 0x43, 0x48, 0x23, 0x01, 
-       0x04, 0x1b, 0x18, 0xc0, 0x14, 0x40, 0x49, 0x07, 
-       0x66, 0x48, 0xa9, 0x11, 0x1c, 0x38, 0xf7, 0xfb, 
-       0xff, 0x1f, 0x20, 0x00, 0xb0, 0x1b, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x1b, 
-       0xe7, 0xf9, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x00, 
-       0xb4, 0xb0, 0x1c, 0x02, 0x1c, 0x0f, 0x2a, 0x00, 
-       0xd1, 0x02, 0x20, 0x01, 0xbc, 0xb0, 0x47, 0x70, 
-       0x2f, 0x01, 0xd1, 0x20, 0x20, 0x00, 0x23, 0x00, 
-       0x4d, 0x13, 0x62, 0x2b, 0x23, 0x00, 0x4d, 0x12, 
-       0x62, 0xab, 0x4b, 0x12, 0x68, 0x9b, 0x1c, 0x1c, 
-       0x4b, 0x11, 0x6e, 0xdb, 0x1c, 0x19, 0x2c, 0x02, 
-       0xd0, 0x01, 0x29, 0x02, 0xd1, 0x01, 0x20, 0x08, 
-       0xe0, 0x00, 0x20, 0x07, 0x79, 0x13, 0x2b, 0x00, 
-       0xd0, 0x01, 0x23, 0x10, 0x43, 0x18, 0x4b, 0x08, 
-       0x62, 0x58, 0x79, 0x55, 0x23, 0x80, 0x43, 0x2b, 
-       0x4d, 0x05, 0x62, 0xab, 0xe0, 0x05, 0x48, 0x07, 
-       0x68, 0x05, 0x23, 0x80, 0x43, 0x9d, 0x1c, 0x2b, 
-       0x60, 0x03, 0x20, 0x00, 0xe7, 0xd2, 0xe7, 0xd1, 
-       0x72, 0x00, 0x01, 0x00, 0xcc, 0x00, 0x0c, 0x00, 
-       0xcc, 0x00, 0x0f, 0x80, 0x72, 0x00, 0x01, 0x28, 
-       0xb5, 0xff, 0x9f, 0x09, 0xb0, 0x81, 0x98, 0x01, 
-       0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 0x99, 0x02, 
-       0x06, 0x0c, 0x0e, 0x24, 0x98, 0x03, 0x06, 0x02, 
-       0x0e, 0x12, 0x9b, 0x04, 0x06, 0x1d, 0x0e, 0x2d, 
-       0x2f, 0x01, 0xd1, 0x1b, 0x20, 0x00, 0x4b, 0x14, 
-       0x62, 0x18, 0x20, 0x00, 0x4b, 0x12, 0x62, 0x98, 
-       0x98, 0x00, 0x07, 0x00, 0x0f, 0x00, 0x01, 0x23, 
-       0x43, 0x18, 0x06, 0x01, 0x0e, 0x09, 0x48, 0x0e, 
-       0x62, 0x41, 0x07, 0x50, 0x0f, 0x40, 0x07, 0x6b, 
-       0x0f, 0x5b, 0x00, 0xdb, 0x43, 0x18, 0x06, 0x01, 
-       0x0e, 0x09, 0x20, 0x80, 0x43, 0x08, 0x4b, 0x08, 
-       0x62, 0x98, 0xe0, 0x05, 0x48, 0x07, 0x68, 0x06, 
-       0x23, 0x80, 0x43, 0x9e, 0x1c, 0x33, 0x60, 0x03, 
-       0x20, 0x00, 0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb0, 0x01, 0xe7, 0xf9, 
-       0x72, 0x00, 0x01, 0x00, 0x72, 0x00, 0x01, 0x28, 
-       0xb5, 0xf1, 0x98, 0x00, 0x06, 0x07, 0x0e, 0x3f, 
-       0xb0, 0x81, 0x2f, 0x1f, 0xdb, 0x05, 0x20, 0xb3, 
-       0xb0, 0x01, 0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x48, 0x62, 0x23, 0x80, 0x68, 0x1b, 
-       0x60, 0x18, 0x48, 0x61, 0x23, 0x80, 0x6b, 0x1b, 
-       0x60, 0x18, 0x48, 0x60, 0x23, 0x80, 0x6b, 0x5b, 
-       0x60, 0x18, 0x48, 0x5f, 0x23, 0x80, 0x6b, 0x9b, 
-       0x60, 0x18, 0x20, 0x01, 0x40, 0xb8, 0x4b, 0x59, 
-       0x60, 0x18, 0x20, 0x00, 0x4b, 0x57, 0x71, 0x18, 
-       0x20, 0x00, 0x4b, 0x56, 0x71, 0x58, 0x48, 0x55, 
-       0x68, 0x00, 0x4b, 0x58, 0x60, 0x58, 0x48, 0x58, 
-       0x4b, 0x56, 0x60, 0x98, 0x48, 0x57, 0x4b, 0x55, 
-       0x60, 0xd8, 0x20, 0xff, 0x30, 0x01, 0x4b, 0x53, 
-       0x62, 0x18, 0x20, 0xff, 0x30, 0x01, 0x4b, 0x51, 
-       0x62, 0x58, 0x20, 0x03, 0x4b, 0x52, 0x75, 0x18, 
-       0x20, 0x0e, 0x4b, 0x51, 0x75, 0x58, 0x20, 0x04, 
-       0x4b, 0x4f, 0x75, 0x98, 0x20, 0x03, 0x4b, 0x4e, 
-       0x75, 0xd8, 0x20, 0x00, 0x4b, 0x4d, 0x60, 0x18, 
-       0x20, 0x00, 0x4b, 0x4d, 0x60, 0x18, 0x20, 0x0d, 
-       0x23, 0x19, 0x06, 0x9b, 0x63, 0x18, 0x22, 0x00, 
-       0x2a, 0x20, 0xdb, 0x04, 0xe0, 0x21, 0x1c, 0x50, 
-       0x06, 0x02, 0x0e, 0x12, 0xe7, 0xf8, 0x25, 0x00, 
-       0x00, 0x93, 0x4e, 0x46, 0x50, 0xf5, 0x25, 0xff, 
-       0x4b, 0x45, 0x54, 0x9d, 0x01, 0x15, 0x4b, 0x45, 
-       0x18, 0xec, 0x01, 0x15, 0x4b, 0x44, 0x18, 0xe8, 
-       0x25, 0x00, 0xc4, 0x20, 0x25, 0x00, 0xc4, 0x20, 
-       0x25, 0x00, 0xc4, 0x20, 0x25, 0x00, 0xc4, 0x20, 
-       0x25, 0x00, 0xc0, 0x20, 0x25, 0x00, 0xc0, 0x20, 
-       0x25, 0x00, 0xc0, 0x20, 0x25, 0x00, 0xc0, 0x20, 
-       0xe7, 0xdd, 0x21, 0x00, 0x29, 0x20, 0xdb, 0x04, 
-       0xe0, 0x0b, 0x1c, 0x48, 0x04, 0x01, 0x0c, 0x09, 
-       0xe7, 0xf8, 0x23, 0x00, 0x00, 0x88, 0x4c, 0x2a, 
-       0x50, 0x23, 0x23, 0x00, 0x48, 0x35, 0x54, 0x43, 
-       0xe7, 0xf3, 0x4c, 0x35, 0x94, 0x00, 0x22, 0x00, 
-       0x2a, 0x10, 0xdb, 0x04, 0xe0, 0x0f, 0x1c, 0x50, 
-       0x06, 0x02, 0x0e, 0x12, 0xe7, 0xf8, 0x20, 0x00, 
-       0x00, 0x93, 0x4c, 0x30, 0x50, 0xe0, 0x23, 0xff, 
-       0x48, 0x2f, 0x54, 0x83, 0x20, 0x00, 0x00, 0x93, 
-       0x9c, 0x00, 0x50, 0xe0, 0xe7, 0xef, 0x21, 0x00, 
-       0x23, 0xff, 0x33, 0x01, 0x42, 0x99, 0xdb, 0x04, 
-       0xe0, 0x2a, 0x1c, 0x48, 0x04, 0x01, 0x0c, 0x09, 
-       0xe7, 0xf6, 0x23, 0x00, 0x00, 0x88, 0x4c, 0x1a, 
-       0x50, 0x23, 0x20, 0x00, 0x00, 0x8b, 0x4c, 0x18, 
-       0x19, 0x1c, 0x23, 0x01, 0x02, 0x9b, 0x18, 0xe3, 
-       0x60, 0x18, 0x20, 0x00, 0x4b, 0x14, 0x18, 0x5c, 
-       0x23, 0x01, 0x02, 0xdb, 0x18, 0xe3, 0x70, 0x18, 
-       0x20, 0x00, 0x00, 0x8b, 0x4c, 0x11, 0x50, 0xe0, 
-       0x20, 0x00, 0x00, 0x8b, 0x4c, 0x0f, 0x19, 0x1c, 
-       0x23, 0x01, 0x02, 0x9b, 0x18, 0xe3, 0x60, 0x18, 
-       0x20, 0x00, 0x4b, 0x0c, 0x18, 0x5c, 0x23, 0x01, 
-       0x02, 0xdb, 0x18, 0xe3, 0x70, 0x18, 0xe7, 0xd4, 
-       0x20, 0x00, 0xb0, 0x01, 0xe7, 0x39, 0xb0, 0x01, 
-       0xe7, 0x37, 0x00, 0x00, 0x2e, 0x08, 0x72, 0xec, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x72, 0x90, 
-       0x2e, 0x08, 0x72, 0x9c, 0x9e, 0x00, 0x04, 0x80, 
-       0x2e, 0x08, 0x60, 0x90, 0x2e, 0x08, 0x69, 0x90, 
-       0x9e, 0x00, 0x04, 0xa0, 0x2e, 0x08, 0x5e, 0xdc, 
-       0x2e, 0x08, 0x5e, 0xe0, 0x2e, 0x08, 0x5e, 0xe4, 
-       0x2e, 0x08, 0x5f, 0xa4, 0x64, 0x00, 0x08, 0x00, 
-       0x64, 0x00, 0x10, 0x00, 0x2e, 0x08, 0x7b, 0xf4, 
-       0x9e, 0x00, 0x04, 0xb8, 0x2e, 0x08, 0x5f, 0x64, 
-       0x2e, 0x08, 0x5f, 0xc4, 0xb4, 0xb0, 0x1c, 0x07, 
-       0x1c, 0x0a, 0x06, 0x11, 0x0e, 0x09, 0x29, 0x20, 
-       0xdb, 0x02, 0x20, 0xa2, 0xbc, 0xb0, 0x47, 0x70, 
-       0x00, 0x88, 0x4b, 0x0a, 0x58, 0x18, 0x1c, 0x05, 
-       0xd1, 0x01, 0x20, 0xb0, 0xe7, 0xf6, 0x68, 0xe8, 
-       0x1c, 0x04, 0xd1, 0x01, 0x20, 0xb6, 0xe7, 0xf1, 
-       0x68, 0x60, 0x00, 0x43, 0x18, 0x18, 0x01, 0x80, 
-       0x08, 0x80, 0x60, 0x38, 0x20, 0x00, 0xe7, 0xe9, 
-       0xe7, 0xe8, 0x00, 0x00, 0x2e, 0x08, 0x5e, 0x5c, 
-       0xb5, 0xff, 0xb0, 0x82, 0x9a, 0x04, 0x06, 0x11, 
-       0x0e, 0x09, 0x91, 0x00, 0x9b, 0x05, 0x06, 0x18, 
-       0x0e, 0x00, 0x90, 0x01, 0xb0, 0x83, 0x99, 0x03, 
-       0x29, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x05, 
-       0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x98, 0x05, 0x28, 0x00, 0xd0, 0x64, 0x98, 0x05, 
-       0x23, 0x0d, 0x06, 0x9b, 0x42, 0xd8, 0xd3, 0x02, 
-       0x20, 0xb4, 0xb0, 0x05, 0xe7, 0xf0, 0x99, 0x06, 
-       0x23, 0xff, 0x33, 0x81, 0x42, 0x99, 0xd2, 0x02, 
-       0x20, 0xb5, 0xb0, 0x05, 0xe7, 0xe8, 0x99, 0x03, 
-       0x00, 0x88, 0x49, 0x2c, 0x58, 0x08, 0x90, 0x02, 
-       0x28, 0x00, 0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x05, 
-       0xe7, 0xde, 0x99, 0x06, 0x00, 0x88, 0x1f, 0xc1, 
-       0x39, 0x05, 0x91, 0x00, 0x9e, 0x05, 0x98, 0x05, 
-       0x1d, 0xc5, 0x35, 0x05, 0x60, 0x35, 0x99, 0x06, 
-       0x60, 0x71, 0x20, 0x00, 0x60, 0xb0, 0x98, 0x04, 
-       0x28, 0x10, 0xd1, 0x0a, 0x98, 0x02, 0x68, 0x84, 
-       0x98, 0x02, 0x30, 0x18, 0x90, 0x01, 0x1c, 0x2a, 
-       0x99, 0x00, 0x98, 0x01, 0xf0, 0x00, 0xfc, 0x86, 
-       0xe0, 0x25, 0x98, 0x04, 0x28, 0x20, 0xd1, 0x1f, 
-       0x98, 0x02, 0x68, 0xc0, 0x1c, 0x07, 0xd1, 0x02, 
-       0x20, 0xb6, 0xb0, 0x05, 0xe7, 0xb8, 0x78, 0xb8, 
-       0x08, 0x40, 0x00, 0x40, 0x70, 0xb8, 0x69, 0x3c, 
-       0x1d, 0xf8, 0x30, 0x05, 0x90, 0x01, 0x68, 0xb8, 
-       0x28, 0x00, 0xd1, 0x00, 0x60, 0xbd, 0x1c, 0x2a, 
-       0x99, 0x00, 0x98, 0x01, 0xf0, 0x00, 0xfc, 0x6a, 
-       0x68, 0x79, 0x18, 0x40, 0x60, 0x78, 0x78, 0x78, 
-       0x99, 0x03, 0xf0, 0x00, 0xf8, 0xb9, 0xe0, 0x02, 
-       0x20, 0xbc, 0xb0, 0x05, 0xe7, 0x9c, 0x68, 0xa0, 
-       0x28, 0x00, 0xd0, 0x01, 0x68, 0xa4, 0xe7, 0xfa, 
-       0x60, 0xa6, 0x20, 0x00, 0xb0, 0x05, 0xe7, 0x93, 
-       0x20, 0xb4, 0xb0, 0x05, 0xe7, 0x90, 0xb0, 0x03, 
-       0xb0, 0x02, 0xe7, 0x8d, 0x2e, 0x08, 0x5e, 0x5c, 
-       0xb5, 0xff, 0xb0, 0x81, 0x9a, 0x03, 0x06, 0x16, 
-       0x0e, 0x36, 0x9b, 0x04, 0x06, 0x18, 0x0e, 0x00, 
-       0x90, 0x00, 0xb0, 0x83, 0x27, 0x00, 0x2e, 0x20, 
-       0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x04, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0xb0, 
-       0x49, 0x45, 0x58, 0x08, 0x1c, 0x04, 0xd1, 0x02, 
-       0x20, 0xb0, 0xb0, 0x04, 0xe7, 0xf3, 0x78, 0xe0, 
-       0x28, 0x00, 0xd1, 0x73, 0x98, 0x03, 0x28, 0x20, 
-       0xd1, 0x19, 0x68, 0xe0, 0x1c, 0x07, 0xd1, 0x02, 
-       0x20, 0xb6, 0xb0, 0x04, 0xe7, 0xe7, 0x69, 0x38, 
-       0x49, 0x3c, 0x60, 0x48, 0x48, 0x3b, 0x68, 0x40, 
-       0x68, 0x00, 0x60, 0xb8, 0x1d, 0xf8, 0x30, 0x05, 
-       0x90, 0x02, 0x20, 0x01, 0x90, 0x00, 0x48, 0x37, 
-       0x68, 0x40, 0x68, 0x40, 0x00, 0x80, 0x1f, 0xc1, 
-       0x39, 0x19, 0x91, 0x01, 0xe0, 0x1d, 0x98, 0x03, 
-       0x28, 0x10, 0xd1, 0x17, 0x68, 0xa0, 0x49, 0x31, 
-       0x60, 0x48, 0x48, 0x30, 0x68, 0x40, 0x68, 0x00, 
-       0x61, 0x20, 0x48, 0x2e, 0x68, 0x40, 0x68, 0x00, 
-       0x61, 0x60, 0x1d, 0xe0, 0x30, 0x11, 0x90, 0x02, 
-       0x48, 0x2a, 0x68, 0x40, 0x68, 0x40, 0x00, 0x80, 
-       0x1f, 0xc1, 0x39, 0x21, 0x91, 0x01, 0x20, 0x00, 
-       0x90, 0x00, 0xe0, 0x02, 0x20, 0xbc, 0xb0, 0x04, 
-       0xe7, 0xb5, 0x48, 0x24, 0x68, 0x40, 0x68, 0x80, 
-       0x28, 0x00, 0xd0, 0x37, 0x25, 0x00, 0x48, 0x21, 
-       0x68, 0x40, 0x68, 0x02, 0x99, 0x01, 0x98, 0x02, 
-       0xf0, 0x00, 0xfb, 0xe8, 0x19, 0x45, 0x48, 0x1d, 
-       0x68, 0x40, 0x49, 0x1c, 0x60, 0x08, 0x48, 0x1b, 
-       0x68, 0x00, 0x68, 0x80, 0x49, 0x19, 0x60, 0x48, 
-       0x48, 0x18, 0x68, 0x40, 0x68, 0x40, 0x00, 0x80, 
-       0x1f, 0xc1, 0x39, 0x05, 0x91, 0x01, 0x48, 0x15, 
-       0x68, 0x40, 0x68, 0x80, 0x28, 0x00, 0xd1, 0xe2, 
-       0x20, 0x00, 0x49, 0x12, 0x68, 0x09, 0x60, 0x88, 
-       0x48, 0x10, 0x68, 0x40, 0x99, 0x04, 0x60, 0x08, 
-       0x48, 0x0e, 0x68, 0x40, 0x68, 0x40, 0x99, 0x05, 
-       0x60, 0x08, 0x98, 0x00, 0x28, 0x00, 0xd0, 0x06, 
-       0x60, 0x7d, 0x78, 0x78, 0x1c, 0x31, 0xf0, 0x00, 
-       0xf8, 0x13, 0xe0, 0x00, 0xe0, 0x05, 0x20, 0x00, 
-       0xb0, 0x04, 0xe7, 0x78, 0x20, 0xb4, 0xb0, 0x04, 
-       0xe7, 0x75, 0x20, 0xbc, 0xb0, 0x04, 0xe7, 0x72, 
-       0xb0, 0x03, 0xb0, 0x01, 0xe7, 0x6f, 0x00, 0x00, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x60, 0x88, 
-       0xb5, 0xf3, 0x98, 0x00, 0x06, 0x02, 0x0e, 0x12, 
-       0x99, 0x01, 0x06, 0x0c, 0x0e, 0x24, 0xb0, 0x81, 
-       0x2c, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x01, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x00, 0xa0, 0x4b, 0x14, 0x58, 0x18, 0x1c, 0x05, 
-       0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x01, 0xe7, 0xf3, 
-       0x68, 0xe8, 0x1c, 0x01, 0xd1, 0x02, 0x20, 0xb6, 
-       0xb0, 0x01, 0xe7, 0xed, 0x11, 0x10, 0x06, 0x00, 
-       0x0e, 0x00, 0x90, 0x00, 0x28, 0x00, 0xd1, 0x04, 
-       0x68, 0x48, 0x40, 0xd0, 0x06, 0x07, 0x0e, 0x3f, 
-       0xe0, 0x09, 0x68, 0x48, 0x07, 0x16, 0x0f, 0x36, 
-       0x40, 0xf0, 0x68, 0x4e, 0x40, 0xd6, 0x1c, 0x33, 
-       0x18, 0xc0, 0x06, 0x07, 0x0e, 0x3f, 0x70, 0x0f, 
-       0x70, 0x4a, 0x20, 0x00, 0xb0, 0x01, 0xe7, 0xd3, 
-       0xb0, 0x01, 0xe7, 0xd1, 0x2e, 0x08, 0x5e, 0x5c, 
-       0xb4, 0xb0, 0x1c, 0x03, 0x1c, 0x0a, 0x06, 0x11, 
-       0x0e, 0x09, 0x29, 0x20, 0xdb, 0x02, 0x20, 0xa2, 
-       0xbc, 0xb0, 0x47, 0x70, 0x00, 0x88, 0x4d, 0x08, 
-       0x58, 0x28, 0x1c, 0x04, 0xd1, 0x01, 0x20, 0xb0, 
-       0xe7, 0xf6, 0x68, 0xe0, 0x1c, 0x07, 0xd1, 0x01, 
-       0x20, 0xb6, 0xe7, 0xf1, 0x78, 0x78, 0x70, 0x18, 
-       0x20, 0x00, 0xe7, 0xed, 0xe7, 0xec, 0x00, 0x00, 
-       0x2e, 0x08, 0x5e, 0x5c, 0xb5, 0xf3, 0xb0, 0x81, 
-       0x98, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 
-       0x99, 0x02, 0x06, 0x0d, 0x0e, 0x2d, 0xb0, 0x86, 
-       0x20, 0x00, 0x90, 0x00, 0x2d, 0x20, 0xdd, 0x05, 
-       0x20, 0xa2, 0xb0, 0x07, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0xa8, 0x49, 0xa2, 
-       0x58, 0x08, 0x90, 0x04, 0x28, 0x00, 0xd1, 0x02, 
-       0x20, 0xb0, 0xb0, 0x07, 0xe7, 0xf2, 0x00, 0xa8, 
-       0x49, 0x9e, 0x68, 0x09, 0x18, 0x40, 0x90, 0x05, 
-       0x00, 0xe8, 0x1b, 0x40, 0x00, 0x80, 0x49, 0x9c, 
-       0x68, 0x09, 0x18, 0x46, 0x98, 0x06, 0x28, 0x00, 
-       0xd0, 0x73, 0x28, 0x01, 0xd0, 0x4f, 0x28, 0x02, 
-       0xd0, 0x00, 0xe1, 0x1d, 0x98, 0x04, 0x69, 0x00, 
-       0x60, 0x70, 0x98, 0x04, 0x78, 0x40, 0x06, 0xc0, 
-       0x0e, 0xc0, 0x90, 0x02, 0x98, 0x02, 0x28, 0x13, 
-       0xd0, 0x16, 0x27, 0x00, 0x2f, 0x20, 0xdb, 0x04, 
-       0xe0, 0x11, 0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 
-       0xe7, 0xf8, 0x48, 0x8e, 0x5d, 0xc0, 0x42, 0xa8, 
-       0xd1, 0x08, 0x00, 0xb8, 0x49, 0x8c, 0x58, 0x08, 
-       0x30, 0x01, 0x78, 0x01, 0x23, 0x80, 0x43, 0xdb, 
-       0x40, 0x19, 0x70, 0x01, 0xe7, 0xed, 0xe0, 0x1e, 
-       0x27, 0x00, 0x2f, 0x10, 0xdb, 0x04, 0xe0, 0x1a, 
-       0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 0xe7, 0xf8, 
-       0x48, 0x84, 0x5d, 0xc0, 0x42, 0xa8, 0xd1, 0x11, 
-       0x00, 0xb8, 0x49, 0x83, 0x58, 0x08, 0x30, 0x01, 
-       0x78, 0x01, 0x23, 0x80, 0x43, 0xdb, 0x40, 0x19, 
-       0x70, 0x01, 0x98, 0x00, 0x30, 0x01, 0x06, 0x00, 
-       0x0e, 0x00, 0x90, 0x00, 0x98, 0x00, 0x28, 0x02, 
-       0xd1, 0x00, 0xe0, 0x00, 0xe7, 0xe4, 0x88, 0x30, 
-       0x4b, 0x7a, 0x40, 0x18, 0x80, 0x30, 0x98, 0x05, 
-       0x68, 0x00, 0x23, 0x01, 0x03, 0x5b, 0x43, 0x18, 
-       0x99, 0x05, 0x60, 0x08, 0xe0, 0xd3, 0x98, 0x05, 
-       0x68, 0x00, 0x4b, 0x75, 0x40, 0x18, 0x99, 0x05, 
-       0x60, 0x08, 0x20, 0x00, 0x60, 0xb0, 0x20, 0x00, 
-       0x70, 0xf0, 0x20, 0x00, 0x60, 0xf0, 0x98, 0x04, 
-       0x78, 0x40, 0x06, 0xc0, 0x0e, 0xc0, 0x90, 0x02, 
-       0x98, 0x02, 0x28, 0x13, 0xd0, 0x16, 0x27, 0x00, 
-       0x2f, 0x20, 0xdb, 0x04, 0xe0, 0x11, 0x1c, 0x78, 
-       0x06, 0x07, 0x0e, 0x3f, 0xe7, 0xf8, 0x48, 0x63, 
-       0x5d, 0xc0, 0x42, 0xa8, 0xd1, 0x08, 0x00, 0xb8, 
-       0xe0, 0x00, 0xe0, 0x27, 0x49, 0x60, 0x58, 0x0c, 
-       0x78, 0x60, 0x23, 0x80, 0x43, 0x18, 0x70, 0x60, 
-       0xe7, 0xed, 0xe0, 0x1e, 0x27, 0x00, 0x2f, 0x10, 
-       0xdb, 0x04, 0xe0, 0x1a, 0x1c, 0x78, 0x06, 0x07, 
-       0x0e, 0x3f, 0xe7, 0xf8, 0x48, 0x59, 0x5d, 0xc0, 
-       0x42, 0xa8, 0xd1, 0x11, 0x00, 0xb8, 0x49, 0x58, 
-       0x58, 0x08, 0x30, 0x01, 0x78, 0x01, 0x23, 0x80, 
-       0x43, 0xdb, 0x40, 0x19, 0x70, 0x01, 0x98, 0x00, 
-       0x30, 0x01, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 
-       0x98, 0x00, 0x28, 0x02, 0xd1, 0x00, 0xe0, 0x00, 
-       0xe7, 0xe4, 0xe0, 0x88, 0x98, 0x05, 0x68, 0x00, 
-       0x4b, 0x4f, 0x40, 0x18, 0x99, 0x05, 0x60, 0x08, 
-       0x20, 0x00, 0x60, 0xb0, 0x20, 0x00, 0x70, 0xf0, 
-       0x20, 0x00, 0x60, 0xf0, 0x98, 0x04, 0x78, 0x40, 
-       0x06, 0xc0, 0x0e, 0xc0, 0x90, 0x02, 0x98, 0x04, 
-       0x78, 0x40, 0x21, 0x20, 0x40, 0x01, 0x91, 0x03, 
-       0x98, 0x02, 0x28, 0x13, 0xd0, 0x4c, 0x27, 0x00, 
-       0x2f, 0x20, 0xdb, 0x04, 0xe0, 0x47, 0x1c, 0x78, 
-       0x06, 0x07, 0x0e, 0x3f, 0xe7, 0xf8, 0x48, 0x3b, 
-       0x5d, 0xc0, 0x42, 0xa8, 0xd1, 0x3e, 0x00, 0xb8, 
-       0x49, 0x39, 0x58, 0x0c, 0x20, 0x80, 0x70, 0x60, 
-       0x99, 0x03, 0x1c, 0x20, 0xf7, 0xfd, 0xfb, 0x30, 
-       0x78, 0xa0, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x28, 
-       0x6a, 0xe0, 0x22, 0x00, 0x92, 0x01, 0x99, 0x01, 
-       0x29, 0x08, 0xdb, 0x06, 0xe0, 0x1f, 0x99, 0x01, 
-       0x31, 0x01, 0x06, 0x09, 0x0e, 0x09, 0x91, 0x01, 
-       0xe7, 0xf5, 0x99, 0x01, 0x00, 0x89, 0x18, 0x09, 
-       0x68, 0x49, 0x9a, 0x01, 0x00, 0x92, 0x18, 0x12, 
-       0x64, 0x51, 0x22, 0x00, 0x99, 0x01, 0x00, 0x89, 
-       0x18, 0x09, 0x62, 0x4a, 0x99, 0x01, 0x00, 0x89, 
-       0x18, 0x09, 0x6c, 0x49, 0x29, 0x00, 0xd0, 0x05, 
-       0x9a, 0x01, 0x21, 0x80, 0x41, 0x11, 0x88, 0x02, 
-       0x43, 0x11, 0x80, 0x01, 0xe7, 0xdf, 0x88, 0x01, 
-       0x80, 0x41, 0x78, 0xa0, 0x23, 0x20, 0x40, 0x18, 
-       0xd0, 0x04, 0x98, 0x04, 0x68, 0xc1, 0x1c, 0x20, 
-       0xf0, 0x00, 0xfa, 0x3d, 0xe7, 0xb7, 0xe0, 0x1e, 
-       0x27, 0x00, 0x2f, 0x10, 0xdb, 0x04, 0xe0, 0x1a, 
-       0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 0xe7, 0xf8, 
-       0x48, 0x16, 0x5d, 0xc0, 0x42, 0xa8, 0xd1, 0x11, 
-       0x00, 0xb8, 0x49, 0x15, 0x58, 0x0c, 0x20, 0x80, 
-       0x70, 0x60, 0x99, 0x03, 0x1c, 0x20, 0xf7, 0xfd, 
-       0xfa, 0xe3, 0x98, 0x00, 0x30, 0x01, 0x06, 0x00, 
-       0x0e, 0x00, 0x90, 0x00, 0x98, 0x00, 0x28, 0x02, 
-       0xd1, 0x00, 0xe0, 0x00, 0xe7, 0xe4, 0xe0, 0x02, 
-       0x20, 0xbc, 0xb0, 0x07, 0xe6, 0xbe, 0x98, 0x06, 
-       0x99, 0x04, 0x70, 0xc8, 0x20, 0x00, 0xb0, 0x07, 
-       0xe6, 0xb8, 0xb0, 0x06, 0xb0, 0x01, 0xe6, 0xb5, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x5d, 0xcc, 
-       0x2e, 0x08, 0x5d, 0xc4, 0x2e, 0x08, 0x5f, 0xa4, 
-       0x2e, 0x08, 0x5e, 0xe4, 0x2e, 0x08, 0x5f, 0xc4, 
-       0x2e, 0x08, 0x5f, 0x64, 0xff, 0xff, 0xfb, 0xff, 
-       0xff, 0xff, 0xdf, 0xff, 0xb4, 0x90, 0x1c, 0x03, 
-       0x1c, 0x0a, 0x06, 0x11, 0x0e, 0x09, 0x29, 0x20, 
-       0xdd, 0x02, 0x20, 0xa2, 0xbc, 0x90, 0x47, 0x70, 
-       0x00, 0x88, 0x4c, 0x05, 0x58, 0x20, 0x1c, 0x07, 
-       0xd1, 0x01, 0x20, 0xb0, 0xe7, 0xf6, 0x78, 0xf8, 
-       0x70, 0x18, 0x20, 0x00, 0xe7, 0xf2, 0xe7, 0xf1, 
-       0x2e, 0x08, 0x5e, 0x5c, 0xb4, 0x90, 0x1c, 0x02, 
-       0x1c, 0x0f, 0x06, 0x38, 0x16, 0x04, 0x2a, 0x02, 
-       0xda, 0x02, 0x20, 0x00, 0xbc, 0x90, 0x47, 0x70, 
-       0x2c, 0x01, 0xd1, 0x01, 0x21, 0x28, 0xe0, 0x09, 
-       0x2c, 0x02, 0xd1, 0x01, 0x21, 0x20, 0xe0, 0x05, 
-       0x2c, 0x00, 0xd1, 0x01, 0x21, 0x0c, 0xe0, 0x01, 
-       0x20, 0x00, 0xe7, 0xef, 0x00, 0x50, 0x18, 0x80, 
-       0x01, 0x80, 0x18, 0x41, 0x1c, 0xc8, 0x08, 0x81, 
-       0x1c, 0x08, 0xe7, 0xe7, 0xe7, 0xe6, 0xb5, 0xf7, 
-       0x1c, 0x07, 0xb0, 0x81, 0x9a, 0x03, 0x06, 0x11, 
-       0x0e, 0x09, 0x91, 0x00, 0xb0, 0x84, 0x99, 0x04, 
-       0x29, 0x20, 0xdb, 0x05, 0x20, 0xa2, 0xb0, 0x05, 
-       0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x99, 0x04, 0x00, 0x88, 0x49, 0x29, 0x58, 0x08, 
-       0x1c, 0x06, 0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x05, 
-       0xe7, 0xf2, 0x2f, 0x00, 0xd1, 0x02, 0x20, 0xb4, 
-       0xb0, 0x05, 0xe7, 0xed, 0x4b, 0x24, 0x42, 0x9f, 
-       0xd1, 0x0a, 0x78, 0xf0, 0x28, 0x00, 0xd0, 0x02, 
-       0x20, 0xbc, 0xb0, 0x05, 0xe7, 0xe4, 0x20, 0x00, 
-       0x60, 0xf0, 0x20, 0x00, 0xb0, 0x05, 0xe7, 0xdf, 
-       0x68, 0xf0, 0x28, 0x00, 0xd0, 0x02, 0x20, 0xb4, 
-       0xb0, 0x05, 0xe7, 0xd9, 0x99, 0x06, 0x00, 0x88, 
-       0x1f, 0xc1, 0x39, 0x19, 0x91, 0x02, 0x20, 0xff, 
-       0x30, 0x81, 0x90, 0x01, 0x99, 0x02, 0x98, 0x01, 
-       0x42, 0x81, 0xda, 0x02, 0x20, 0xb5, 0xb0, 0x05, 
-       0xe7, 0xca, 0x1c, 0x3c, 0x60, 0xf4, 0x37, 0x14, 
-       0x1c, 0x3d, 0x37, 0x0c, 0x60, 0x2f, 0x99, 0x06, 
-       0x60, 0x69, 0x20, 0x00, 0x60, 0xa8, 0x97, 0x03, 
-       0x20, 0x00, 0x60, 0xe0, 0x1d, 0xe0, 0x30, 0x05, 
-       0x9a, 0x03, 0x99, 0x02, 0xf0, 0x00, 0xf9, 0x56, 
-       0x90, 0x00, 0x20, 0x00, 0x70, 0xa0, 0x98, 0x00, 
-       0x60, 0x60, 0x9a, 0x03, 0x60, 0xa2, 0x61, 0x25, 
-       0x99, 0x04, 0x20, 0x54, 0xf7, 0xff, 0xfd, 0xa0, 
-       0xb0, 0x05, 0xe7, 0xa9, 0xb0, 0x04, 0xb0, 0x01, 
-       0xe7, 0xa6, 0x00, 0x00, 0x2e, 0x08, 0x5e, 0x5c, 
-       0x00, 0x00, 0xff, 0xff, 0xb5, 0xff, 0xb0, 0x83, 
-       0x9a, 0x05, 0x06, 0x11, 0x0e, 0x09, 0x91, 0x00, 
-       0x9b, 0x06, 0x06, 0x18, 0x0e, 0x00, 0x90, 0x01, 
-       0x98, 0x0c, 0x06, 0x01, 0x0e, 0x09, 0x91, 0x02, 
-       0xb0, 0x85, 0x99, 0x05, 0x29, 0x20, 0xdb, 0x05, 
-       0x20, 0xa2, 0xb0, 0x08, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x98, 0x08, 0x28, 0x00, 
-       0xd1, 0x02, 0x20, 0xb4, 0xb0, 0x08, 0xe7, 0xf5, 
-       0x99, 0x05, 0x00, 0xc8, 0x1a, 0x40, 0x00, 0x80, 
-       0x49, 0x83, 0x68, 0x09, 0x18, 0x47, 0x98, 0x08, 
-       0x4b, 0x82, 0x42, 0x98, 0xd1, 0x73, 0x99, 0x05, 
-       0x00, 0x88, 0x49, 0x81, 0x58, 0x08, 0x1c, 0x05, 
-       0xd1, 0x02, 0x20, 0xb0, 0xb0, 0x08, 0xe7, 0xe1, 
-       0x68, 0xe8, 0x28, 0x00, 0xd1, 0x02, 0x78, 0xe8, 
-       0x28, 0x00, 0xd0, 0x02, 0x20, 0xbc, 0xb0, 0x08, 
-       0xe7, 0xd8, 0x78, 0xa8, 0x28, 0x00, 0xd0, 0x54, 
-       0x20, 0x00, 0x42, 0x80, 0xd0, 0x1d, 0x24, 0x00, 
-       0x2c, 0x20, 0xdb, 0x04, 0xe0, 0x18, 0x1c, 0x60, 
-       0x06, 0x04, 0x0e, 0x24, 0xe7, 0xf8, 0x48, 0x73, 
-       0x5d, 0x00, 0x99, 0x05, 0x42, 0x88, 0xd1, 0x0e, 
-       0x20, 0x01, 0x40, 0xa0, 0x43, 0xc0, 0x49, 0x70, 
-       0x68, 0x09, 0x40, 0x08, 0x49, 0x6e, 0x60, 0x08, 
-       0x20, 0x00, 0x00, 0xa1, 0x4a, 0x6d, 0x50, 0x50, 
-       0x20, 0xff, 0x49, 0x6a, 0x55, 0x08, 0xe7, 0xe6, 
-       0xe0, 0x33, 0x4a, 0x6b, 0x92, 0x03, 0x7e, 0x38, 
-       0x1c, 0x06, 0x28, 0xff, 0xd0, 0x14, 0x20, 0x00, 
-       0x00, 0xb1, 0x4a, 0x68, 0x50, 0x50, 0x20, 0x01, 
-       0x40, 0xb0, 0x43, 0xc0, 0x49, 0x66, 0x68, 0x09, 
-       0x40, 0x08, 0x49, 0x65, 0x60, 0x08, 0x20, 0xff, 
-       0x76, 0x38, 0x21, 0xff, 0x48, 0x63, 0x55, 0x81, 
-       0x21, 0x00, 0x00, 0xb0, 0x9a, 0x03, 0x50, 0x11, 
-       0x7e, 0x78, 0x1c, 0x06, 0x28, 0xff, 0xd0, 0x14, 
-       0x21, 0x00, 0x00, 0xb0, 0x4a, 0x5b, 0x50, 0x11, 
-       0x20, 0x01, 0x40, 0xb0, 0x43, 0xc0, 0x49, 0x5a, 
-       0x68, 0x09, 0x40, 0x08, 0x49, 0x58, 0x60, 0x08, 
-       0x20, 0xff, 0x76, 0x78, 0x20, 0xff, 0x49, 0x51, 
-       0x55, 0x88, 0x21, 0x00, 0x00, 0xb0, 0x9a, 0x03, 
-       0x50, 0x11, 0x20, 0x00, 0x99, 0x05, 0x00, 0x89, 
-       0x4a, 0x4b, 0x50, 0x50, 0x24, 0x00, 0x2c, 0x0c, 
-       0xdb, 0x06, 0xe0, 0x09, 0xe0, 0x00, 0xe0, 0x0e, 
-       0x1c, 0x60, 0x06, 0x04, 0x0e, 0x24, 0xe7, 0xf6, 
-       0x20, 0x00, 0x19, 0x39, 0x73, 0x08, 0xe7, 0xf7, 
-       0x20, 0x00, 0x83, 0x38, 0x20, 0x00, 0x70, 0xf8, 
-       0x20, 0x00, 0xb0, 0x08, 0xe7, 0x66, 0x99, 0x05, 
-       0x00, 0x88, 0x49, 0x3f, 0x58, 0x08, 0x28, 0x00, 
-       0xd0, 0x02, 0x20, 0xb0, 0xb0, 0x08, 0xe7, 0x5d, 
-       0x99, 0x07, 0x29, 0x11, 0xdb, 0x02, 0x99, 0x07, 
-       0x29, 0x13, 0xdd, 0x02, 0x20, 0xb1, 0xb0, 0x08, 
-       0xe7, 0x54, 0x99, 0x09, 0x00, 0x88, 0x1f, 0xc1, 
-       0x39, 0x21, 0x91, 0x01, 0x20, 0xff, 0x30, 0x81, 
-       0x90, 0x00, 0x99, 0x01, 0x98, 0x00, 0x42, 0x81, 
-       0xda, 0x02, 0x20, 0xb5, 0xb0, 0x08, 0xe7, 0x45, 
-       0x9d, 0x08, 0x98, 0x08, 0x30, 0x1c, 0x90, 0x08, 
-       0x98, 0x08, 0x90, 0x04, 0x98, 0x08, 0x30, 0x0c, 
-       0x90, 0x08, 0x98, 0x08, 0x90, 0x02, 0x9a, 0x02, 
-       0x98, 0x04, 0x60, 0x02, 0x99, 0x09, 0x98, 0x04, 
-       0x60, 0x41, 0x20, 0x00, 0x99, 0x04, 0x60, 0x88, 
-       0x20, 0x00, 0x61, 0xa8, 0x1d, 0xe8, 0x30, 0x11, 
-       0x9a, 0x02, 0x99, 0x01, 0xf0, 0x00, 0xf8, 0x56, 
-       0x20, 0x00, 0x70, 0x28, 0x98, 0x06, 0x99, 0x07, 
-       0x43, 0x08, 0x70, 0x68, 0x20, 0x00, 0x70, 0xa8, 
-       0x20, 0x02, 0x70, 0xe8, 0x20, 0x00, 0x71, 0x28, 
-       0x98, 0x04, 0x60, 0xa8, 0x20, 0x00, 0x60, 0xe8, 
-       0x9a, 0x02, 0x61, 0x2a, 0x9a, 0x02, 0x61, 0x6a, 
-       0x99, 0x05, 0x00, 0x88, 0x49, 0x16, 0x50, 0x0d, 
-       0x20, 0x00, 0x60, 0xf8, 0x88, 0x38, 0x4b, 0x1c, 
-       0x40, 0x18, 0x80, 0x38, 0x20, 0x00, 0x60, 0xb8, 
-       0x9a, 0x02, 0x60, 0x7a, 0x98, 0x06, 0x99, 0x07, 
-       0x43, 0x08, 0x70, 0xb8, 0x24, 0x00, 0x2c, 0x0c, 
-       0xdb, 0x04, 0xe0, 0x07, 0x1c, 0x60, 0x06, 0x04, 
-       0x0e, 0x24, 0xe7, 0xf8, 0x20, 0x00, 0x19, 0x39, 
-       0x74, 0x08, 0xe7, 0xf7, 0x20, 0x00, 0x83, 0x38, 
-       0x20, 0x00, 0x70, 0xf8, 0x20, 0xff, 0x76, 0x38, 
-       0x20, 0xff, 0x76, 0x78, 0x20, 0x00, 0xb0, 0x08, 
-       0xe6, 0xec, 0xb0, 0x05, 0xb0, 0x03, 0xe6, 0xe9, 
-       0x2e, 0x08, 0x5d, 0xc4, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x2e, 0x08, 0x5f, 0xa4, 
-       0x2e, 0x08, 0x5e, 0xdc, 0x2e, 0x08, 0x5e, 0xe4, 
-       0x9e, 0x00, 0x04, 0xb8, 0x2e, 0x08, 0x5f, 0x64, 
-       0x2e, 0x08, 0x5e, 0xe0, 0x2e, 0x08, 0x5f, 0xc4, 
-       0xff, 0xff, 0xfb, 0xff, 0xb4, 0x90, 0x1c, 0x04, 
-       0x1c, 0x0f, 0x1c, 0x13, 0x21, 0x00, 0x68, 0x22, 
-       0x2a, 0x00, 0xd0, 0x00, 0x60, 0x13, 0x1d, 0xd8, 
-       0x30, 0xb9, 0x60, 0x18, 0x33, 0xc0, 0x31, 0x01, 
-       0x3f, 0xc0, 0x2f, 0xc0, 0xd8, 0xf7, 0x20, 0x00, 
-       0x60, 0x18, 0x60, 0x23, 0x31, 0x01, 0x1c, 0x08, 
-       0xbc, 0x90, 0x47, 0x70, 0xe7, 0xfc, 0xb4, 0x90, 
-       0x1c, 0x03, 0x1c, 0x0a, 0x6b, 0x18, 0x68, 0xd1, 
-       0x68, 0x07, 0x2f, 0x00, 0xd0, 0x0c, 0x68, 0x07, 
-       0x60, 0x0f, 0x68, 0x41, 0x68, 0x57, 0x68, 0x84, 
-       0x19, 0x3f, 0x60, 0x57, 0x27, 0x00, 0x60, 0x07, 
-       0x27, 0x00, 0x60, 0x47, 0x27, 0x00, 0x60, 0x87, 
-       0x6a, 0xc7, 0x2f, 0x00, 0xd0, 0x0c, 0x6a, 0xc7, 
-       0x60, 0x0f, 0x6b, 0x01, 0x68, 0x57, 0x6b, 0x44, 
-       0x19, 0x3f, 0x60, 0x57, 0x27, 0x00, 0x62, 0xc7, 
-       0x27, 0x00, 0x63, 0x07, 0x27, 0x00, 0x63, 0x47, 
-       0x60, 0xd1, 0xbc, 0x90, 0x47, 0x70, 0xe7, 0xfc, 
-       0x20, 0x00, 0x49, 0x01, 0x70, 0x08, 0x47, 0x70, 
-       0x2e, 0x08, 0x7c, 0x14, 0xb5, 0xff, 0xb0, 0x82, 
-       0x9b, 0x05, 0x06, 0x18, 0x16, 0x00, 0x90, 0x00, 
-       0x98, 0x0c, 0x06, 0x01, 0x16, 0x09, 0x91, 0x01, 
-       0x98, 0x00, 0x28, 0x1f, 0xdd, 0x05, 0x20, 0xaf, 
-       0xb0, 0x02, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x48, 0x37, 0x78, 0x00, 0x28, 0x00, 
-       0xd0, 0x03, 0x20, 0xd2, 0xb0, 0x02, 0xe7, 0xf4, 
-       0xe0, 0x64, 0x20, 0xff, 0x49, 0x32, 0x70, 0x08, 
-       0x49, 0x32, 0x98, 0x00, 0xf0, 0x09, 0xfa, 0xca, 
-       0x9a, 0x04, 0x2a, 0x00, 0xd9, 0x52, 0x20, 0xff, 
-       0x49, 0x2f, 0x70, 0x08, 0x9d, 0x02, 0x98, 0x0b, 
-       0x99, 0x01, 0x18, 0x44, 0x99, 0x01, 0x20, 0xc0, 
-       0x1a, 0x40, 0x9a, 0x04, 0x42, 0x90, 0xd9, 0x01, 
-       0x9f, 0x04, 0xe0, 0x02, 0x99, 0x01, 0x20, 0xc0, 
-       0x1a, 0x47, 0x1c, 0x3a, 0x1c, 0x21, 0x1c, 0x28, 
-       0x23, 0xfe, 0xf0, 0x05, 0xfa, 0xa5, 0x1c, 0x06, 
-       0x2e, 0xd0, 0xd1, 0x0a, 0x20, 0x03, 0xf0, 0x04, 
-       0xf9, 0xa9, 0x1c, 0x3a, 0x1c, 0x21, 0x1c, 0x28, 
-       0x23, 0xfe, 0xf0, 0x05, 0xfa, 0x99, 0x1c, 0x06, 
-       0xe7, 0xf2, 0x98, 0x02, 0x19, 0xc0, 0x90, 0x02, 
-       0x9a, 0x04, 0x1b, 0xd2, 0x92, 0x04, 0x9d, 0x0b, 
-       0x9c, 0x03, 0x9b, 0x00, 0x1c, 0x3a, 0x1c, 0x21, 
-       0x1c, 0x28, 0xf0, 0x05, 0xfa, 0x89, 0x1c, 0x06, 
-       0x2e, 0xd0, 0xd1, 0x0a, 0x20, 0x03, 0xf0, 0x04, 
-       0xf9, 0x8d, 0x9b, 0x00, 0x1c, 0x3a, 0x1c, 0x21, 
-       0x1c, 0x28, 0xf0, 0x05, 0xfa, 0x7d, 0x1c, 0x06, 
-       0xe7, 0xf2, 0x99, 0x03, 0x29, 0x20, 0xd3, 0x04, 
-       0x99, 0x01, 0x18, 0x78, 0x99, 0x03, 0x18, 0x41, 
-       0x91, 0x03, 0x48, 0x0b, 0x78, 0x00, 0x28, 0x00, 
-       0xd0, 0x03, 0x20, 0x03, 0xf0, 0x04, 0xf9, 0x76, 
-       0xe7, 0xf7, 0xe7, 0xa9, 0x20, 0x00, 0x49, 0x04, 
-       0x70, 0x08, 0x20, 0x00, 0xb0, 0x02, 0xe7, 0x90, 
-       0xb0, 0x02, 0xe7, 0x8e, 0xe7, 0x8d, 0x00, 0x00, 
-       0x2e, 0x08, 0x1f, 0xa0, 0x2e, 0x01, 0x35, 0x35, 
-       0x2e, 0x08, 0x7c, 0x14, 0xb5, 0xff, 0x1c, 0x0f, 
-       0x9a, 0x02, 0x06, 0x14, 0x0e, 0x24, 0x9b, 0x03, 
-       0x06, 0x1d, 0x0e, 0x2d, 0x2c, 0x1f, 0xdb, 0x04, 
-       0x20, 0xb3, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x04, 0x3a, 0x0c, 0x12, 0x2d, 0x01, 
-       0xd1, 0x73, 0x20, 0x01, 0x03, 0x40, 0x40, 0x10, 
-       0xd0, 0x0a, 0x4b, 0x6f, 0x40, 0x1a, 0x48, 0x6f, 
-       0x68, 0x00, 0x68, 0x00, 0x23, 0x02, 0x43, 0xdb, 
-       0x40, 0x18, 0x4b, 0x6c, 0x68, 0x1b, 0x60, 0x18, 
-       0x20, 0x01, 0x02, 0x40, 0x40, 0x10, 0xd0, 0x0a, 
-       0x4b, 0x69, 0x40, 0x1a, 0x48, 0x67, 0x68, 0x00, 
-       0x68, 0x00, 0x23, 0x20, 0x43, 0xdb, 0x40, 0x18, 
-       0x4b, 0x64, 0x68, 0x1b, 0x60, 0x18, 0x20, 0x01, 
-       0x05, 0x00, 0x40, 0x38, 0xd0, 0x08, 0x48, 0x63, 
-       0x68, 0x00, 0x69, 0x80, 0x23, 0x01, 0x05, 0x1b, 
-       0x43, 0x18, 0x4b, 0x60, 0x68, 0x1b, 0x61, 0x98, 
-       0x20, 0x01, 0x05, 0x40, 0x40, 0x38, 0xd0, 0x08, 
-       0x48, 0x5c, 0x68, 0x00, 0x69, 0x80, 0x23, 0x01, 
-       0x05, 0x5b, 0x43, 0x18, 0x4b, 0x59, 0x68, 0x1b, 
-       0x61, 0x98, 0x0a, 0x12, 0x48, 0x55, 0x68, 0x00, 
-       0x68, 0x00, 0x43, 0x90, 0x4b, 0x53, 0x68, 0x1b, 
-       0x60, 0x18, 0x48, 0x52, 0x68, 0x00, 0x68, 0x00, 
-       0x4b, 0x53, 0x65, 0x18, 0x48, 0x51, 0x68, 0x00, 
-       0x77, 0x04, 0x20, 0x09, 0x04, 0x80, 0x40, 0x38, 
-       0xd0, 0x35, 0x21, 0x00, 0x29, 0x20, 0xdb, 0x04, 
-       0xe0, 0x31, 0x1c, 0x48, 0x06, 0x01, 0x0e, 0x09, 
-       0xe7, 0xf8, 0x20, 0x01, 0x40, 0x88, 0x9b, 0x00, 
-       0x40, 0x18, 0xd0, 0x27, 0x20, 0x01, 0x05, 0x40, 
-       0x40, 0x38, 0xd0, 0x0e, 0x00, 0xc8, 0x1a, 0x40, 
-       0x00, 0x80, 0x4b, 0x46, 0x68, 0x1b, 0x5a, 0x18, 
-       0x23, 0xff, 0x33, 0x01, 0x43, 0x18, 0x00, 0xcb, 
-       0x1a, 0x5b, 0x00, 0x9b, 0x4e, 0x41, 0x68, 0x36, 
-       0x52, 0xf0, 0x20, 0x01, 0x04, 0x80, 0x40, 0x38, 
-       0xd0, 0x10, 0x00, 0xc8, 0x1a, 0x40, 0x00, 0x80, 
-       0xe0, 0x00, 0xe0, 0x0d, 0x4b, 0x3b, 0x68, 0x1b, 
-       0x5a, 0x18, 0x23, 0x01, 0x02, 0x5b, 0x43, 0x18, 
-       0x00, 0xcb, 0x1a, 0x5b, 0x00, 0x9b, 0x4e, 0x37, 
-       0x68, 0x36, 0x52, 0xf0, 0xe7, 0xcd, 0xe0, 0x5c, 
-       0x2d, 0x02, 0xd1, 0x5a, 0x0a, 0x12, 0x48, 0x2f, 
-       0x68, 0x00, 0x68, 0x00, 0x43, 0x10, 0x4b, 0x2d, 
-       0x68, 0x1b, 0x60, 0x18, 0x48, 0x2b, 0x68, 0x00, 
-       0x68, 0x00, 0x4b, 0x2d, 0x65, 0x18, 0x20, 0x01, 
-       0x05, 0x00, 0x40, 0x38, 0xd0, 0x07, 0x48, 0x29, 
-       0x68, 0x00, 0x69, 0x80, 0x4b, 0x2a, 0x40, 0x18, 
-       0x4b, 0x26, 0x68, 0x1b, 0x61, 0x98, 0x20, 0x01, 
-       0x05, 0x40, 0x40, 0x38, 0xd0, 0x07, 0x48, 0x23, 
-       0x68, 0x00, 0x69, 0x80, 0x4b, 0x25, 0x40, 0x18, 
-       0x4b, 0x20, 0x68, 0x1b, 0x61, 0x98, 0x21, 0x00, 
-       0x29, 0x20, 0xdb, 0x04, 0xe0, 0x31, 0x1c, 0x48, 
-       0x06, 0x01, 0x0e, 0x09, 0xe7, 0xf8, 0x20, 0x09, 
-       0x04, 0x80, 0x40, 0x38, 0xd0, 0x28, 0x20, 0x01, 
-       0x40, 0x88, 0x9b, 0x00, 0x40, 0x18, 0xd0, 0x23, 
-       0x20, 0x01, 0x05, 0x40, 0x40, 0x38, 0xd0, 0x0d, 
-       0x00, 0xc8, 0x1a, 0x40, 0x00, 0x80, 0x4b, 0x15, 
-       0x68, 0x1b, 0x5a, 0x18, 0x4b, 0x16, 0x40, 0x18, 
-       0x00, 0xcb, 0x1a, 0x5b, 0x00, 0x9b, 0x4e, 0x11, 
-       0x68, 0x36, 0x52, 0xf0, 0x20, 0x01, 0x04, 0x80, 
-       0x40, 0x38, 0xd0, 0x0d, 0x00, 0xc8, 0x1a, 0x40, 
-       0x00, 0x80, 0x4b, 0x0c, 0x68, 0x1b, 0x5a, 0x18, 
-       0x4b, 0x05, 0x40, 0x18, 0x00, 0xcb, 0x1a, 0x5b, 
-       0x00, 0x9b, 0x4e, 0x08, 0x68, 0x36, 0x52, 0xf0, 
-       0xe7, 0xcd, 0x20, 0x00, 0xe7, 0x15, 0xe7, 0x14, 
-       0xff, 0xff, 0xfd, 0xff, 0x2e, 0x08, 0x7c, 0x18, 
-       0xff, 0xff, 0xdf, 0xff, 0x2e, 0x08, 0x5e, 0x0c, 
-       0x66, 0x00, 0x00, 0x80, 0x2e, 0x08, 0x5d, 0xc4, 
-       0xff, 0xef, 0xff, 0xff, 0xff, 0xdf, 0xff, 0xff, 
-       0xff, 0xff, 0xfe, 0xff, 0xb5, 0x80, 0x1c, 0x07, 
-       0x48, 0x17, 0x68, 0x01, 0x20, 0x00, 0xf0, 0x12, 
-       0xf8, 0x69, 0x60, 0x38, 0x48, 0x14, 0x68, 0x00, 
-       0x1d, 0x01, 0x20, 0x00, 0xf0, 0x12, 0xf8, 0x62, 
-       0x60, 0x78, 0x48, 0x11, 0x68, 0x00, 0x1d, 0xc1, 
-       0x31, 0x05, 0x20, 0x00, 0xf0, 0x12, 0xf8, 0x5a, 
-       0x60, 0xf8, 0x48, 0x0d, 0x68, 0x00, 0x1d, 0xc1, 
-       0x31, 0x09, 0x20, 0x00, 0xf0, 0x12, 0xf8, 0x52, 
-       0x61, 0x38, 0x48, 0x09, 0x68, 0x00, 0x1d, 0xc1, 
-       0x31, 0x0d, 0x20, 0x00, 0xf0, 0x12, 0xf8, 0x4a, 
-       0x61, 0x78, 0x48, 0x05, 0x68, 0x00, 0x1d, 0xc1, 
-       0x31, 0x01, 0x20, 0x00, 0xf0, 0x12, 0xf8, 0x42, 
-       0x60, 0xb8, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x5e, 0x0c, 0xb5, 0xf0, 0x1c, 0x07, 
-       0xb0, 0x82, 0x26, 0x00, 0x89, 0xb8, 0x23, 0x08, 
-       0x40, 0x18, 0xd0, 0x08, 0x48, 0x59, 0x6e, 0xc2, 
-       0x48, 0x58, 0x6f, 0x01, 0x48, 0x57, 0x6a, 0x00, 
-       0xf7, 0xfd, 0xff, 0x5c, 0x1c, 0x06, 0x89, 0xb8, 
-       0x23, 0x10, 0x40, 0x18, 0xd0, 0x02, 0x48, 0x53, 
-       0x69, 0x40, 0x1c, 0x06, 0x89, 0xb8, 0x07, 0xc0, 
-       0x0f, 0xc0, 0xd0, 0x21, 0x48, 0x50, 0x68, 0xc0, 
-       0x90, 0x00, 0x68, 0x78, 0x02, 0x40, 0x99, 0x00, 
-       0x1a, 0x08, 0x90, 0x01, 0x98, 0x01, 0x21, 0x33, 
-       0x06, 0x49, 0x65, 0xc8, 0x98, 0x00, 0x21, 0x33, 
-       0x06, 0x49, 0x66, 0x08, 0x98, 0x01, 0x49, 0x48, 
-       0x60, 0x88, 0x98, 0x00, 0x49, 0x46, 0x60, 0xc8, 
-       0x20, 0x01, 0x21, 0x33, 0x06, 0x49, 0x66, 0xc8, 
-       0x20, 0x00, 0x21, 0x33, 0x06, 0x49, 0x66, 0xc8, 
-       0x89, 0xb8, 0x23, 0x02, 0x43, 0x18, 0x81, 0xb8, 
-       0x89, 0xb8, 0x23, 0x02, 0x40, 0x18, 0xd0, 0x3e, 
-       0x48, 0x3d, 0x68, 0x80, 0x1f, 0xc4, 0x3c, 0xff, 
-       0x3c, 0xfa, 0x68, 0x38, 0x02, 0x40, 0x1a, 0x25, 
-       0x48, 0x38, 0x60, 0x45, 0x48, 0x37, 0x60, 0x84, 
-       0x20, 0x33, 0x06, 0x40, 0x65, 0x45, 0x20, 0x33, 
-       0x06, 0x40, 0x65, 0x84, 0x1b, 0x60, 0x38, 0xc0, 
-       0x21, 0x33, 0x06, 0x49, 0x66, 0x88, 0x21, 0x00, 
-       0x48, 0x32, 0xf7, 0xfd, 0xfb, 0x89, 0x48, 0x32, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x00, 0xe7, 0xfa, 
-       0x48, 0x30, 0x68, 0x01, 0x23, 0xff, 0x33, 0x01, 
-       0x43, 0x19, 0x60, 0x01, 0x48, 0x2e, 0x6d, 0x80, 
-       0x49, 0x2d, 0x65, 0x88, 0x48, 0x2c, 0x6b, 0xc0, 
-       0x23, 0x01, 0x07, 0x9b, 0x40, 0x18, 0xd0, 0x00, 
-       0xe7, 0xf8, 0x20, 0x33, 0x06, 0x40, 0x66, 0x45, 
-       0x20, 0x33, 0x06, 0x40, 0x66, 0x84, 0x21, 0x00, 
-       0x20, 0xff, 0xf7, 0xfd, 0xfb, 0x69, 0x48, 0x20, 
-       0x60, 0x05, 0x48, 0x1f, 0x60, 0x44, 0x89, 0xb8, 
-       0x23, 0x04, 0x40, 0x18, 0xd0, 0x21, 0x68, 0xb8, 
-       0x28, 0x00, 0xd1, 0x06, 0x48, 0x1f, 0x68, 0x01, 
-       0x23, 0x02, 0x43, 0xdb, 0x40, 0x19, 0x60, 0x01, 
-       0xe0, 0x17, 0x69, 0x38, 0x49, 0x1a, 0x65, 0x88, 
-       0x69, 0x38, 0x68, 0xb9, 0x02, 0x49, 0x18, 0x40, 
-       0x49, 0x17, 0x65, 0xc8, 0x20, 0x03, 0x02, 0x00, 
-       0x49, 0x15, 0x67, 0x48, 0x20, 0x02, 0x49, 0x14, 
-       0x67, 0x88, 0x20, 0x40, 0x49, 0x12, 0x66, 0x08, 
-       0x48, 0x12, 0x68, 0x01, 0x23, 0x02, 0x43, 0x19, 
-       0x60, 0x01, 0x20, 0x33, 0x06, 0x40, 0x6d, 0x40, 
-       0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc0, 0x60, 0x38, 
-       0x20, 0x33, 0x06, 0x40, 0x6d, 0xc0, 0x23, 0x0d, 
-       0x06, 0x9b, 0x1a, 0xc0, 0x60, 0x78, 0x48, 0x0a, 
-       0x43, 0x30, 0x60, 0xb8, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xcc, 0x00, 0x0f, 0x80, 
-       0x2e, 0x08, 0x7c, 0x1c, 0x00, 0x00, 0x80, 0x0f, 
-       0xcc, 0x00, 0x05, 0x00, 0x66, 0x00, 0x00, 0xe0, 
-       0x66, 0x00, 0x00, 0x80, 0x66, 0x00, 0x00, 0xf0, 
-       0xcc, 0x00, 0x00, 0x00, 0xb5, 0xf3, 0x1c, 0x02, 
-       0xb0, 0x81, 0x68, 0x93, 0x68, 0x54, 0x21, 0x00, 
-       0x1d, 0xd8, 0x30, 0xb9, 0x1b, 0x00, 0x06, 0x05, 
-       0x0e, 0x2d, 0x2d, 0x12, 0xda, 0x12, 0x21, 0x00, 
-       0x42, 0xa9, 0xdb, 0x04, 0xe0, 0x08, 0x1c, 0x48, 
-       0x06, 0x01, 0x0e, 0x09, 0xe7, 0xf8, 0x78, 0x26, 
-       0x34, 0x01, 0x98, 0x02, 0x54, 0x46, 0xe7, 0xf6, 
-       0x68, 0x1b, 0x1d, 0x18, 0x90, 0x00, 0x98, 0x00, 
-       0x78, 0x80, 0x18, 0xc4, 0x1c, 0x0f, 0x2f, 0x12, 
-       0xdb, 0x04, 0xe0, 0x08, 0x1c, 0x78, 0x06, 0x07, 
-       0x0e, 0x3f, 0xe7, 0xf8, 0x78, 0x26, 0x34, 0x01, 
-       0x98, 0x02, 0x55, 0xc6, 0xe7, 0xf6, 0x20, 0x00, 
-       0xb0, 0x01, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0xb0, 0x01, 0xe7, 0xf9, 0xb4, 0xf0, 
-       0x1c, 0x07, 0x1c, 0x0d, 0x1c, 0x14, 0xb0, 0x82, 
-       0x20, 0x00, 0x70, 0x20, 0x78, 0x78, 0x23, 0x80, 
-       0x40, 0x18, 0xd0, 0x03, 0x20, 0xb1, 0xb0, 0x02, 
-       0xbc, 0xf0, 0x47, 0x70, 0x78, 0xba, 0x20, 0x40, 
-       0x40, 0x10, 0xd0, 0x2a, 0x07, 0x12, 0x0f, 0x12, 
-       0x07, 0xd0, 0x0f, 0xc0, 0xd0, 0x25, 0x20, 0x40, 
-       0x70, 0x20, 0x35, 0x0a, 0x21, 0x00, 0x1d, 0xf8, 
-       0x30, 0x0d, 0x90, 0x01, 0x1d, 0xf8, 0x30, 0x1d, 
-       0x90, 0x00, 0x21, 0x00, 0x29, 0x08, 0xdb, 0x04, 
-       0xe0, 0x14, 0x1c, 0x48, 0x06, 0x01, 0x0e, 0x09, 
-       0xe7, 0xf8, 0x78, 0x2e, 0x35, 0x01, 0x98, 0x00, 
-       0x78, 0x03, 0x30, 0x01, 0x90, 0x00, 0x40, 0x33, 
-       0x98, 0x01, 0x78, 0x06, 0x30, 0x01, 0x90, 0x01, 
-       0x42, 0xb3, 0xd0, 0x02, 0x20, 0x00, 0x70, 0x20, 
-       0xe0, 0x00, 0xe7, 0xea, 0x20, 0x00, 0xb0, 0x02, 
-       0xe7, 0xce, 0x20, 0xb1, 0xb0, 0x02, 0xe7, 0xcb, 
-       0xb0, 0x02, 0xe7, 0xc9, 0xb5, 0xf7, 0x1c, 0x07, 
-       0xb0, 0x8d, 0x20, 0x00, 0x9a, 0x0f, 0x70, 0x10, 
-       0x78, 0x78, 0x23, 0x80, 0x40, 0x18, 0xd0, 0x05, 
-       0x20, 0xb1, 0xb0, 0x0d, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x78, 0xb8, 0x90, 0x05, 
-       0x98, 0x05, 0x23, 0x40, 0x40, 0x18, 0xd0, 0x73, 
-       0x98, 0x05, 0x07, 0x00, 0x0f, 0x00, 0x90, 0x05, 
-       0x98, 0x05, 0x23, 0x02, 0x40, 0x18, 0xd1, 0x03, 
-       0x98, 0x05, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x68, 
-       0x99, 0x0e, 0x79, 0x48, 0x23, 0x3e, 0x40, 0x18, 
-       0x90, 0x0c, 0x78, 0xf8, 0x90, 0x04, 0x98, 0x04, 
-       0x01, 0x00, 0x4b, 0x81, 0x18, 0xc0, 0x90, 0x02, 
-       0x98, 0x02, 0x68, 0x00, 0x90, 0x01, 0x78, 0x7c, 
-       0x23, 0xbf, 0x40, 0x1c, 0x23, 0xfe, 0x40, 0x1c, 
-       0x20, 0x00, 0x90, 0x03, 0x98, 0x01, 0x06, 0x00, 
-       0x0e, 0x00, 0x99, 0x0c, 0x42, 0x88, 0xd0, 0x08, 
-       0x06, 0x20, 0x0e, 0x00, 0x24, 0x01, 0x43, 0x04, 
-       0x20, 0x01, 0x90, 0x03, 0x23, 0xdf, 0x40, 0x1c, 
-       0xe0, 0x06, 0x20, 0x02, 0x40, 0x20, 0xd0, 0x03, 
-       0x70, 0x7c, 0x20, 0x00, 0xb0, 0x0d, 0xe7, 0xbd, 
-       0x23, 0xfd, 0x40, 0x1c, 0x98, 0x05, 0x23, 0x04, 
-       0x40, 0x18, 0xd0, 0x73, 0x6a, 0xfd, 0x98, 0x03, 
-       0x28, 0x00, 0xd0, 0x14, 0x26, 0x00, 0x2e, 0x08, 
-       0xdb, 0x04, 0xe0, 0x0e, 0x1c, 0x70, 0x06, 0x06, 
-       0x0e, 0x36, 0xe7, 0xf8, 0x00, 0xb0, 0x19, 0x40, 
-       0x68, 0x40, 0x00, 0xb1, 0x19, 0x49, 0x64, 0x48, 
-       0x20, 0x00, 0x00, 0xb1, 0x19, 0x49, 0x62, 0x48, 
-       0xe7, 0xf0, 0x88, 0x28, 0x80, 0x68, 0x20, 0x20, 
-       0x40, 0x20, 0xd1, 0x3e, 0x99, 0x0e, 0x79, 0xc8, 
-       0x09, 0x40, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x0a, 
-       0x99, 0x0e, 0x79, 0xc8, 0x06, 0xc0, 0x0e, 0xc0, 
-       0x90, 0x09, 0x98, 0x0a, 0x30, 0x01, 0x06, 0x06, 
-       0x0e, 0x36, 0x2e, 0x08, 0xdb, 0x04, 0xe0, 0x10, 
-       0x1c, 0x70, 0x06, 0x06, 0x0e, 0x36, 0xe7, 0xf8, 
-       0x20, 0x00, 0x00, 0xb1, 0x19, 0x49, 0xe0, 0x01, 
-       0xe0, 0x9d, 0xe0, 0x9c, 0x64, 0x48, 0x88, 0x68, 
-       0x21, 0x80, 0x41, 0x31, 0x43, 0x88, 0x80, 0x68, 
-       0xe7, 0xee, 0x98, 0x0a, 0x00, 0x80, 0x19, 0x40, 
-       0x6c, 0x41, 0x98, 0x09, 0x00, 0x80, 0x4a, 0x4b, 
-       0x58, 0x10, 0x40, 0x08, 0x99, 0x0a, 0x00, 0x89, 
-       0x19, 0x49, 0x64, 0x48, 0x06, 0x20, 0x0e, 0x00, 
-       0x24, 0x20, 0x43, 0x04, 0x98, 0x01, 0x0a, 0x00, 
-       0x02, 0x00, 0x90, 0x01, 0x98, 0x01, 0x99, 0x0c, 
-       0x43, 0x08, 0x90, 0x01, 0x98, 0x01, 0x99, 0x02, 
-       0x60, 0x08, 0x78, 0x38, 0x23, 0x80, 0x40, 0x18, 
-       0xd0, 0x19, 0x99, 0x0e, 0x7b, 0x08, 0x07, 0x42, 
-       0x0f, 0x52, 0x92, 0x07, 0x99, 0x0e, 0x7b, 0x08, 
-       0x08, 0xc0, 0x06, 0x02, 0x0e, 0x12, 0x92, 0x08, 
-       0x1d, 0xe9, 0x31, 0x3d, 0x91, 0x06, 0x99, 0x06, 
-       0x9a, 0x08, 0x5c, 0x88, 0x49, 0x36, 0x9a, 0x07, 
-       0x5c, 0x89, 0xe0, 0x00, 0xe0, 0x4e, 0x40, 0x08, 
-       0x99, 0x06, 0x9a, 0x08, 0x54, 0x88, 0x99, 0x0e, 
-       0x79, 0x88, 0x06, 0xc0, 0x0e, 0xc0, 0x90, 0x00, 
-       0x98, 0x00, 0x49, 0x30, 0x40, 0xc1, 0x91, 0x00, 
-       0x99, 0x0e, 0x79, 0x88, 0x09, 0x40, 0x06, 0x02, 
-       0x0e, 0x12, 0x92, 0x0b, 0x9a, 0x0b, 0x00, 0x90, 
-       0x19, 0x40, 0x6c, 0x40, 0x99, 0x00, 0x40, 0x08, 
-       0xd0, 0x33, 0x06, 0x20, 0x0e, 0x00, 0x24, 0x40, 
-       0x43, 0x04, 0x9a, 0x0b, 0x00, 0x90, 0x19, 0x40, 
-       0x6c, 0x40, 0x99, 0x00, 0x40, 0x41, 0x00, 0x90, 
-       0x19, 0x40, 0x64, 0x41, 0x9a, 0x0b, 0x00, 0x90, 
-       0x19, 0x40, 0x6a, 0x40, 0x99, 0x00, 0x43, 0x01, 
-       0x00, 0x90, 0x19, 0x40, 0x62, 0x41, 0x9a, 0x0b, 
-       0x00, 0x90, 0x19, 0x40, 0x6c, 0x40, 0x28, 0x00, 
-       0xd1, 0x17, 0x88, 0x68, 0x9a, 0x0b, 0x21, 0x80, 
-       0x41, 0x11, 0x43, 0x88, 0x80, 0x68, 0x88, 0x68, 
-       0x28, 0x00, 0xd1, 0x0e, 0x06, 0x20, 0x0e, 0x00, 
-       0x24, 0x02, 0x43, 0x04, 0x23, 0xfe, 0x40, 0x1c, 
-       0x98, 0x0c, 0x30, 0x02, 0x06, 0x00, 0x0e, 0x00, 
-       0x90, 0x0c, 0x98, 0x0c, 0x23, 0x3e, 0x40, 0x18, 
-       0x90, 0x0c, 0xe0, 0x0a, 0x06, 0x20, 0x0e, 0x00, 
-       0x24, 0x40, 0x43, 0x04, 0x23, 0xfe, 0x40, 0x1c, 
-       0x98, 0x0c, 0x1c, 0x41, 0x98, 0x04, 0xf0, 0x00, 
-       0xf8, 0x13, 0x9a, 0x0f, 0x70, 0x14, 0x70, 0x7c, 
-       0x20, 0x00, 0xb0, 0x0d, 0xe6, 0xe2, 0x20, 0xb1, 
-       0xb0, 0x0d, 0xe6, 0xdf, 0xb0, 0x0d, 0xe6, 0xdd, 
-       0x64, 0x00, 0x08, 0x00, 0x2e, 0x08, 0x20, 0x10, 
-       0x2e, 0x08, 0x20, 0x90, 0x80, 0x00, 0x00, 0x00, 
-       0xb5, 0xf3, 0x98, 0x00, 0x06, 0x07, 0x0e, 0x3f, 
-       0x99, 0x01, 0x06, 0x0e, 0x0e, 0x36, 0x00, 0xf8, 
-       0x4b, 0x13, 0x18, 0xc5, 0x01, 0x38, 0x4b, 0x13, 
-       0x18, 0xc4, 0x01, 0x38, 0x4b, 0x12, 0x18, 0xc2, 
-       0x68, 0x10, 0x23, 0x40, 0x43, 0xdb, 0x40, 0x18, 
-       0x60, 0x10, 0x2e, 0x3e, 0xdc, 0x15, 0x68, 0x20, 
-       0x1c, 0x01, 0x0a, 0x09, 0x02, 0x09, 0x43, 0x31, 
-       0x60, 0x21, 0x68, 0x28, 0x1c, 0x01, 0x0a, 0x09, 
-       0x02, 0x09, 0x23, 0x3e, 0x43, 0x19, 0x60, 0x29, 
-       0x68, 0x10, 0x23, 0x40, 0x43, 0x18, 0x60, 0x10, 
-       0x20, 0x00, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x20, 0xbd, 0xe7, 0xf9, 0xe7, 0xf8, 
-       0x64, 0x00, 0x10, 0x00, 0x64, 0x00, 0x08, 0x00, 
-       0x64, 0x00, 0x08, 0x08, 0xb5, 0xf3, 0xb0, 0x93, 
-       0x98, 0x13, 0x69, 0x00, 0x90, 0x01, 0x98, 0x01, 
-       0x78, 0x40, 0x23, 0x80, 0x40, 0x18, 0xd0, 0x05, 
-       0x20, 0xbe, 0xb0, 0x13, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x98, 0x01, 0x78, 0x80, 
-       0x90, 0x08, 0x98, 0x08, 0x23, 0x40, 0x40, 0x18, 
-       0xd0, 0x73, 0x98, 0x08, 0x23, 0x20, 0x40, 0x18, 
-       0xd0, 0x6f, 0x98, 0x01, 0x6b, 0x07, 0x98, 0x01, 
-       0x79, 0xc0, 0x00, 0x80, 0x49, 0x76, 0x58, 0x08, 
-       0x90, 0x00, 0x98, 0x00, 0x68, 0xc0, 0x1c, 0x06, 
-       0xd1, 0x02, 0x20, 0xb6, 0xb0, 0x13, 0xe7, 0xe1, 
-       0x78, 0xb0, 0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x02, 
-       0x20, 0xb6, 0xb0, 0x13, 0xe7, 0xda, 0xa9, 0x11, 
-       0x1c, 0x30, 0xf0, 0x00, 0xf9, 0x2b, 0x90, 0x02, 
-       0x98, 0x11, 0x28, 0x00, 0xd1, 0x02, 0x98, 0x02, 
-       0xb0, 0x13, 0xe7, 0xcf, 0x98, 0x11, 0x90, 0x0e, 
-       0x20, 0x01, 0x90, 0x0b, 0x98, 0x13, 0x88, 0x40, 
-       0x90, 0x0d, 0x98, 0x13, 0x68, 0x40, 0x90, 0x06, 
-       0x98, 0x13, 0x68, 0x81, 0x91, 0x10, 0x99, 0x10, 
-       0x1d, 0xc8, 0x30, 0xb9, 0x90, 0x05, 0x98, 0x05, 
-       0x99, 0x06, 0x1a, 0x40, 0x04, 0x04, 0x0c, 0x24, 
-       0x99, 0x14, 0x79, 0x88, 0x90, 0x03, 0x98, 0x03, 
-       0x06, 0xc0, 0x0e, 0xc0, 0x90, 0x0a, 0x98, 0x0a, 
-       0x49, 0x5a, 0x40, 0xc1, 0x91, 0x0a, 0x98, 0x03, 
-       0x09, 0x40, 0x06, 0x00, 0x0e, 0x00, 0x90, 0x09, 
-       0x98, 0x09, 0x00, 0x80, 0x19, 0xc0, 0x6b, 0x80, 
-       0x99, 0x0a, 0x40, 0x08, 0xd0, 0x02, 0x20, 0xb1, 
-       0xb0, 0x13, 0xe7, 0x9f, 0x20, 0xb8, 0x90, 0x0c, 
-       0x98, 0x11, 0x30, 0x08, 0x90, 0x04, 0x20, 0x00, 
-       0x90, 0x07, 0x98, 0x07, 0x28, 0x00, 0xd0, 0x10, 
-       0x99, 0x10, 0x68, 0x09, 0x91, 0x10, 0x99, 0x10, 
-       0x1d, 0x08, 0x90, 0x12, 0x98, 0x12, 0x78, 0x80, 
-       0x99, 0x10, 0x18, 0x40, 0x90, 0x06, 0x98, 0x12, 
-       0x78, 0x81, 0x20, 0xc0, 0x1a, 0x40, 0x04, 0x04, 
-       0x0c, 0x24, 0x98, 0x0d, 0x42, 0x84, 0xdb, 0x05, 
-       0xe0, 0x00, 0xe0, 0x7c, 0x9c, 0x0d, 0x20, 0x00, 
-       0x90, 0x0d, 0xe0, 0x06, 0x98, 0x0d, 0x1b, 0x00, 
-       0x04, 0x00, 0x0c, 0x00, 0x90, 0x0d, 0x20, 0x01, 
-       0x90, 0x07, 0x98, 0x0c, 0x42, 0xa0, 0xda, 0x2e, 
-       0x25, 0x00, 0x98, 0x0c, 0x42, 0x85, 0xdb, 0x04, 
-       0xe0, 0x0c, 0x1c, 0x68, 0x06, 0x05, 0x0e, 0x2d, 
-       0xe7, 0xf7, 0x98, 0x06, 0x78, 0x01, 0x30, 0x01, 
-       0x90, 0x06, 0x98, 0x04, 0x70, 0x01, 0x30, 0x01, 
-       0x90, 0x04, 0xe7, 0xf2, 0x98, 0x0c, 0x1a, 0x20, 
-       0x04, 0x04, 0x0c, 0x24, 0xa9, 0x11, 0x1c, 0x30, 
-       0xf0, 0x00, 0xf8, 0xac, 0x90, 0x02, 0x98, 0x11, 
-       0x28, 0x00, 0xd1, 0x08, 0x98, 0x0e, 0x60, 0xb0, 
-       0x68, 0x70, 0x99, 0x0b, 0x18, 0x40, 0x60, 0x70, 
-       0x98, 0x02, 0xb0, 0x13, 0xe7, 0x4a, 0x98, 0x0b, 
-       0x30, 0x01, 0x90, 0x0b, 0x20, 0xb8, 0x90, 0x0c, 
-       0x98, 0x11, 0x30, 0x08, 0x90, 0x04, 0x25, 0x00, 
-       0x42, 0xa5, 0xdb, 0x04, 0xe0, 0x0c, 0x1c, 0x68, 
-       0x06, 0x05, 0x0e, 0x2d, 0xe7, 0xf8, 0x98, 0x06, 
-       0x78, 0x01, 0x30, 0x01, 0x90, 0x06, 0x98, 0x04, 
-       0x70, 0x01, 0x30, 0x01, 0x90, 0x04, 0xe7, 0xf2, 
-       0x98, 0x0c, 0x1b, 0x00, 0x04, 0x00, 0x0c, 0x00, 
-       0x90, 0x0c, 0x98, 0x0d, 0x28, 0x00, 0xd1, 0x90, 
-       0x6b, 0x39, 0x91, 0x0f, 0x6a, 0xf8, 0x28, 0x00, 
-       0xd1, 0x02, 0x98, 0x0e, 0x62, 0xf8, 0xe0, 0x05, 
-       0x98, 0x0e, 0x99, 0x0f, 0x60, 0x08, 0x98, 0x0e, 
-       0x6d, 0xb9, 0x60, 0x08, 0x98, 0x09, 0x00, 0x80, 
-       0x19, 0xc0, 0x6b, 0x80, 0x99, 0x0a, 0x43, 0x01, 
-       0x98, 0x09, 0x00, 0x80, 0x19, 0xc0, 0x63, 0x81, 
-       0x6b, 0x78, 0x99, 0x0b, 0x18, 0x40, 0x63, 0x78, 
-       0x20, 0x00, 0x99, 0x11, 0x60, 0x08, 0x98, 0x11, 
-       0x63, 0x38, 0x98, 0x0e, 0x30, 0x04, 0x65, 0xb8, 
-       0x98, 0x02, 0xb0, 0x13, 0xe7, 0x02, 0x20, 0xb1, 
-       0xb0, 0x13, 0xe6, 0xff, 0xb0, 0x13, 0xe6, 0xfd, 
-       0x2e, 0x08, 0x5e, 0x5c, 0x80, 0x00, 0x00, 0x00, 
-       0xb4, 0xf0, 0x1c, 0x01, 0x78, 0x88, 0x23, 0x20, 
-       0x40, 0x18, 0xd0, 0x42, 0x79, 0xc8, 0x00, 0x80, 
-       0x4b, 0x21, 0x58, 0x1d, 0x6b, 0x0a, 0x68, 0xef, 
-       0x68, 0x10, 0x28, 0x00, 0xd0, 0x17, 0x68, 0xfe, 
-       0x68, 0x10, 0x60, 0x30, 0x68, 0x50, 0x60, 0xf8, 
-       0x68, 0x78, 0x68, 0x93, 0x18, 0xc0, 0x60, 0x78, 
-       0x20, 0x00, 0x60, 0x10, 0x20, 0x00, 0x60, 0x50, 
-       0x20, 0x00, 0x60, 0x90, 0x68, 0x78, 0x78, 0x3b, 
-       0x42, 0x98, 0xd9, 0x04, 0x78, 0xb8, 0x23, 0x02, 
-       0x43, 0xdb, 0x40, 0x18, 0x70, 0xb8, 0x6a, 0xd0, 
-       0x60, 0x10, 0x6b, 0x10, 0x60, 0x50, 0x6b, 0x50, 
-       0x60, 0x90, 0x24, 0x00, 0x2c, 0x08, 0xdb, 0x04, 
-       0xe0, 0x0e, 0x1c, 0x60, 0x06, 0x04, 0x0e, 0x24, 
-       0xe7, 0xf8, 0x00, 0xa0, 0x18, 0x80, 0x6b, 0x80, 
-       0x00, 0xa3, 0x18, 0x9b, 0x60, 0xd8, 0x23, 0x00, 
-       0x00, 0xa0, 0x18, 0x80, 0x63, 0x83, 0xe7, 0xf0, 
-       0x20, 0x00, 0x62, 0xd0, 0x20, 0x00, 0x63, 0x10, 
-       0x20, 0x00, 0x63, 0x50, 0x20, 0x00, 0xbc, 0xf0, 
-       0x47, 0x70, 0x20, 0xb1, 0xe7, 0xfb, 0xe7, 0xfa, 
-       0x2e, 0x08, 0x5e, 0x5c, 0xb4, 0x90, 0x1c, 0x02, 
-       0x1c, 0x0f, 0x78, 0x14, 0x68, 0x90, 0x1c, 0x01, 
-       0xd1, 0x08, 0x20, 0x00, 0x60, 0x38, 0x78, 0x90, 
-       0x23, 0x01, 0x43, 0x18, 0x70, 0x90, 0x20, 0xb7, 
-       0xbc, 0x90, 0x47, 0x70, 0x68, 0x08, 0x60, 0x90, 
-       0x20, 0x00, 0x60, 0x48, 0x60, 0x39, 0x68, 0x50, 
-       0x38, 0x01, 0x60, 0x50, 0x68, 0x50, 0x42, 0xa0, 
-       0xd1, 0x02, 0x20, 0xbf, 0xe7, 0xf0, 0xe0, 0x01, 
-       0x20, 0x00, 0xe7, 0xed, 0xe7, 0xec, 0x00, 0x00, 
-       0x1c, 0x01, 0x22, 0x00, 0x6a, 0x50, 0x68, 0x02, 
-       0x60, 0x0a, 0x4a, 0x05, 0x6f, 0xd2, 0x60, 0x8a, 
-       0x4a, 0x04, 0x68, 0x12, 0x60, 0x4a, 0x22, 0x1d, 
-       0x02, 0x92, 0x68, 0x12, 0x60, 0xca, 0x47, 0x70, 
-       0xcc, 0x00, 0x0f, 0x80, 0x2e, 0x08, 0x1f, 0xa4, 
-       0x1c, 0x01, 0x48, 0x02, 0x60, 0x01, 0x20, 0x00, 
-       0x47, 0x70, 0xe7, 0xfd, 0x66, 0x00, 0x01, 0x00, 
-       0x1c, 0x01, 0x20, 0x33, 0x06, 0x40, 0x62, 0x01, 
-       0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0x1c, 0x01, 
-       0x20, 0x33, 0x06, 0x40, 0x6a, 0xc0, 0x23, 0x7f, 
-       0x03, 0x9b, 0x40, 0x18, 0x03, 0x8a, 0x43, 0x10, 
-       0x22, 0x33, 0x06, 0x52, 0x62, 0xd0, 0x20, 0x00, 
-       0x47, 0x70, 0xe7, 0xfd, 0x1c, 0x01, 0x20, 0x33, 
-       0x06, 0x40, 0x6a, 0xc0, 0x23, 0x03, 0x03, 0x1b, 
-       0x40, 0x18, 0x43, 0x08, 0x22, 0x33, 0x06, 0x52, 
-       0x62, 0xd0, 0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 
-       0x1c, 0x01, 0x06, 0x0a, 0x0e, 0x12, 0x2a, 0x00, 
-       0xd0, 0x06, 0x20, 0x33, 0x06, 0x40, 0x6a, 0xc0, 
-       0x23, 0x01, 0x05, 0x5b, 0x43, 0x18, 0xe0, 0x04, 
-       0x20, 0x33, 0x06, 0x40, 0x6a, 0xc0, 0x4b, 0x04, 
-       0x40, 0x18, 0x23, 0x33, 0x06, 0x5b, 0x62, 0xd8, 
-       0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 0x00, 0x00, 
-       0xff, 0xdf, 0xff, 0xff, 0x48, 0x04, 0x69, 0x80, 
-       0x07, 0xc0, 0x0f, 0xc0, 0xd0, 0x01, 0x20, 0xff, 
-       0x47, 0x70, 0x20, 0x00, 0xe7, 0xfc, 0xe7, 0xfb, 
-       0x66, 0x00, 0x00, 0x80, 0xb4, 0x80, 0x1c, 0x01, 
-       0x06, 0x0f, 0x0e, 0x3f, 0x4a, 0x08, 0x2f, 0x00, 
-       0xd0, 0x03, 0x68, 0x10, 0x23, 0x01, 0x43, 0x18, 
-       0xe0, 0x02, 0x68, 0x10, 0x08, 0x40, 0x00, 0x40, 
-       0x68, 0x13, 0x43, 0x18, 0x60, 0x10, 0x20, 0x00, 
-       0xbc, 0x80, 0x47, 0x70, 0xe7, 0xfc, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x98, 0xb4, 0x80, 0x1c, 0x07, 
-       0x1c, 0x0a, 0x4b, 0x06, 0x40, 0x1a, 0x4b, 0x06, 
-       0x40, 0x1f, 0x0b, 0x10, 0x02, 0x39, 0x43, 0x08, 
-       0x49, 0x04, 0x61, 0xc8, 0x20, 0x00, 0xbc, 0x80, 
-       0x47, 0x70, 0xe7, 0xfc, 0x01, 0xff, 0xf0, 0x00, 
-       0x00, 0xff, 0xf0, 0x00, 0x66, 0x00, 0x00, 0x80, 
-       0x48, 0x01, 0x69, 0xc0, 0x47, 0x70, 0xe7, 0xfd, 
-       0x66, 0x00, 0x00, 0x80, 0x1c, 0x01, 0x48, 0x07, 
-       0x68, 0x02, 0x4b, 0x07, 0x40, 0x1a, 0x60, 0x02, 
-       0x23, 0x01, 0x05, 0x9b, 0x42, 0x99, 0xd1, 0x03, 
-       0x48, 0x02, 0x68, 0x02, 0x43, 0x0a, 0x60, 0x02, 
-       0x47, 0x70, 0x00, 0x00, 0x66, 0x00, 0x00, 0x2c, 
-       0xff, 0xbf, 0xff, 0xff, 0x1c, 0x01, 0x20, 0x33, 
-       0x06, 0x40, 0x67, 0x41, 0x47, 0x70, 0x1c, 0x01, 
-       0x20, 0x33, 0x06, 0x40, 0x67, 0x81, 0x47, 0x70, 
-       0xb5, 0x90, 0x4c, 0x21, 0x20, 0x01, 0x60, 0x20, 
-       0xf0, 0x11, 0xfb, 0x6a, 0x48, 0x1f, 0x69, 0x84, 
-       0x27, 0x00, 0x2f, 0x04, 0xd3, 0x04, 0xe0, 0x06, 
-       0x1c, 0x78, 0x06, 0x07, 0x0e, 0x3f, 0xe7, 0xf8, 
-       0x21, 0x00, 0xc4, 0x02, 0xe7, 0xf8, 0x20, 0x00, 
-       0x49, 0x18, 0x69, 0x49, 0x60, 0x08, 0x20, 0x00, 
-       0x49, 0x16, 0x69, 0x49, 0x60, 0x48, 0x20, 0x00, 
-       0x49, 0x14, 0x69, 0x49, 0x60, 0x88, 0x20, 0x00, 
-       0x49, 0x12, 0x69, 0x49, 0x60, 0xc8, 0x20, 0x00, 
-       0x49, 0x10, 0x69, 0x49, 0x61, 0x08, 0x20, 0x00, 
-       0x49, 0x0e, 0x69, 0x49, 0x61, 0x48, 0x20, 0x00, 
-       0x49, 0x0c, 0x69, 0x49, 0x61, 0x88, 0x20, 0x00, 
-       0x49, 0x0a, 0x69, 0x49, 0x61, 0xc8, 0x20, 0x00, 
-       0x49, 0x08, 0x69, 0x49, 0x62, 0x08, 0x20, 0x00, 
-       0x49, 0x06, 0x69, 0x49, 0x62, 0x48, 0x20, 0x18, 
-       0x49, 0x04, 0x69, 0x49, 0x62, 0x88, 0x20, 0x00, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0xe7, 0xfb, 
-       0x70, 0x00, 0x00, 0x38, 0x2e, 0x08, 0x1f, 0xa8, 
-       0xb5, 0xff, 0x1c, 0x0f, 0xb0, 0x81, 0x9c, 0x01, 
-       0x69, 0x20, 0x28, 0x08, 0xd1, 0x01, 0x08, 0x7f, 
-       0x00, 0x7f, 0x6b, 0xa0, 0x9a, 0x03, 0x43, 0x50, 
-       0x19, 0xc6, 0x69, 0x20, 0x00, 0x80, 0x49, 0x34, 
-       0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x00, 
-       0x08, 0x76, 0x69, 0x20, 0x00, 0x80, 0x49, 0x31, 
-       0x58, 0x08, 0x43, 0x70, 0x90, 0x00, 0x69, 0xa0, 
-       0x99, 0x00, 0x09, 0x49, 0x18, 0x45, 0x6b, 0xe0, 
-       0x28, 0x00, 0xd1, 0x02, 0x03, 0x28, 0x0b, 0x00, 
-       0xe0, 0x01, 0x02, 0x28, 0x0a, 0x00, 0x1c, 0x05, 
-       0xf0, 0x11, 0xfb, 0x08, 0xf0, 0x11, 0xfa, 0xe4, 
-       0x48, 0x27, 0x69, 0x80, 0x68, 0x00, 0x08, 0xc0, 
-       0x00, 0xc0, 0x49, 0x25, 0x69, 0x89, 0x60, 0x08, 
-       0x07, 0x40, 0x48, 0x23, 0x69, 0x80, 0x68, 0x00, 
-       0x01, 0x40, 0x09, 0x40, 0x49, 0x20, 0x69, 0x89, 
-       0x60, 0x08, 0x6b, 0xe0, 0x49, 0x1e, 0x69, 0x89, 
-       0x68, 0x09, 0x4b, 0x1e, 0x40, 0x19, 0x07, 0xc0, 
-       0x0c, 0x80, 0x43, 0x08, 0x49, 0x1a, 0x69, 0x89, 
-       0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 0x1c, 0x21, 
-       0x1c, 0x20, 0xf0, 0x00, 0xfe, 0x51, 0x48, 0x16, 
-       0x69, 0xc0, 0x68, 0x00, 0x4b, 0x16, 0x40, 0x18, 
-       0x02, 0x29, 0x0a, 0x09, 0x00, 0x89, 0x43, 0x08, 
-       0x49, 0x11, 0x69, 0xc9, 0x60, 0x08, 0x01, 0x80, 
-       0x48, 0x0f, 0x69, 0xc0, 0x68, 0x00, 0x01, 0x40, 
-       0x09, 0x40, 0x99, 0x00, 0x06, 0xc9, 0x43, 0x08, 
-       0x49, 0x0b, 0x69, 0xc9, 0x60, 0x08, 0x99, 0x04, 
-       0x1c, 0x20, 0x22, 0x00, 0xf0, 0x00, 0xfe, 0xbc, 
-       0xf0, 0x00, 0xff, 0x9d, 0xf0, 0x11, 0xfa, 0xda, 
-       0x20, 0x00, 0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb0, 0x01, 0xe7, 0xf9, 
-       0x2e, 0x03, 0x3a, 0x04, 0x2e, 0x03, 0x3a, 0x54, 
-       0x2e, 0x08, 0x1f, 0xa8, 0xff, 0xff, 0xdf, 0xff, 
-       0xfc, 0x00, 0x00, 0x03, 0xb5, 0xff, 0x1c, 0x0f, 
-       0xb0, 0x81, 0x9c, 0x01, 0x69, 0x20, 0x28, 0x08, 
-       0xd1, 0x01, 0x08, 0x7f, 0x00, 0x7f, 0x6b, 0xa0, 
-       0x9a, 0x03, 0x43, 0x50, 0x19, 0xc6, 0x69, 0x20, 
-       0x00, 0x80, 0x49, 0x37, 0x58, 0x08, 0x23, 0x04, 
-       0x40, 0x18, 0xd0, 0x00, 0x08, 0x76, 0x69, 0x20, 
-       0x00, 0x80, 0x49, 0x34, 0x58, 0x08, 0x43, 0x70, 
-       0x90, 0x00, 0x69, 0xa0, 0x99, 0x00, 0x09, 0x49, 
-       0x18, 0x45, 0x6b, 0xe0, 0x28, 0x00, 0xd1, 0x02, 
-       0x03, 0x28, 0x0b, 0x00, 0xe0, 0x01, 0x02, 0x28, 
-       0x0a, 0x00, 0x1c, 0x05, 0xf0, 0x11, 0xfa, 0x86, 
-       0xf0, 0x11, 0xfa, 0x62, 0x48, 0x2a, 0x69, 0x80, 
-       0x68, 0x00, 0x08, 0xc0, 0x00, 0xc0, 0x23, 0x01, 
-       0x43, 0x18, 0x49, 0x27, 0x69, 0x89, 0x60, 0x08, 
-       0x07, 0x40, 0x6b, 0xe0, 0x49, 0x24, 0x69, 0x89, 
-       0x68, 0x09, 0x4b, 0x24, 0x40, 0x19, 0x07, 0xc0, 
-       0x0c, 0x80, 0x43, 0x08, 0x49, 0x20, 0x69, 0x89, 
-       0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 0x48, 0x1e, 
-       0x69, 0x80, 0x68, 0x00, 0x01, 0x40, 0x09, 0x40, 
-       0x99, 0x00, 0x06, 0xc9, 0x43, 0x01, 0x48, 0x1a, 
-       0x69, 0x80, 0x60, 0x01, 0x1c, 0x21, 0x1c, 0x20, 
-       0xf0, 0x00, 0xfd, 0xca, 0x48, 0x16, 0x69, 0xc0, 
-       0x68, 0x00, 0x4b, 0x17, 0x40, 0x18, 0x02, 0x29, 
-       0x0a, 0x09, 0x00, 0x89, 0x43, 0x08, 0x49, 0x12, 
-       0x69, 0xc9, 0x60, 0x08, 0x01, 0x80, 0x48, 0x10, 
-       0x69, 0xc0, 0x68, 0x00, 0x01, 0x40, 0x09, 0x40, 
-       0x49, 0x0d, 0x69, 0xc9, 0x60, 0x08, 0xf0, 0x00, 
-       0xff, 0x1e, 0xf0, 0x11, 0xfa, 0x39, 0x48, 0x0a, 
-       0x6b, 0x81, 0x1c, 0x20, 0xf0, 0x00, 0xfe, 0xf0, 
-       0x9b, 0x04, 0x60, 0x18, 0xf0, 0x11, 0xfa, 0x52, 
-       0x20, 0x00, 0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb0, 0x01, 0xe7, 0xf9, 
-       0x2e, 0x03, 0x3a, 0x04, 0x2e, 0x03, 0x3a, 0x54, 
-       0x2e, 0x08, 0x1f, 0xa8, 0xff, 0xff, 0xdf, 0xff, 
-       0xfc, 0x00, 0x00, 0x03, 0xb5, 0xff, 0x1c, 0x0c, 
-       0x1c, 0x1f, 0xb0, 0x83, 0x9d, 0x03, 0x6b, 0x28, 
-       0x6a, 0xa9, 0x1a, 0x40, 0x30, 0x01, 0x90, 0x00, 
-       0x19, 0xe0, 0x99, 0x00, 0x42, 0x88, 0xd9, 0x01, 
-       0x98, 0x00, 0x1b, 0x07, 0x69, 0x28, 0x28, 0x08, 
-       0xd1, 0x02, 0x08, 0x7f, 0x08, 0x64, 0x00, 0x64, 
-       0x6b, 0xa8, 0x9a, 0x05, 0x43, 0x50, 0x19, 0x01, 
-       0x91, 0x01, 0x69, 0x28, 0x00, 0x80, 0x49, 0x38, 
-       0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 0xd0, 0x02, 
-       0x99, 0x01, 0x08, 0x49, 0x91, 0x01, 0x69, 0x28, 
-       0x00, 0x80, 0x49, 0x34, 0x58, 0x08, 0x99, 0x01, 
-       0x43, 0x48, 0x90, 0x02, 0x69, 0xa8, 0x99, 0x02, 
-       0x09, 0x49, 0x18, 0x46, 0x6b, 0xe8, 0x28, 0x00, 
-       0xd1, 0x02, 0x03, 0x30, 0x0b, 0x00, 0xe0, 0x01, 
-       0x02, 0x30, 0x0a, 0x00, 0x1c, 0x06, 0xf0, 0x11, 
-       0xf9, 0xed, 0xf0, 0x11, 0xf9, 0xc9, 0x48, 0x2a, 
-       0x69, 0x80, 0x68, 0x00, 0x01, 0x40, 0x09, 0x40, 
-       0x49, 0x27, 0x69, 0x89, 0x60, 0x08, 0x48, 0x26, 
-       0x69, 0x80, 0x68, 0x00, 0x08, 0xc0, 0x00, 0xc0, 
-       0x23, 0x02, 0x43, 0x18, 0x49, 0x22, 0x69, 0x89, 
-       0x60, 0x08, 0x07, 0x40, 0x6b, 0xe8, 0x49, 0x20, 
-       0x69, 0x89, 0x68, 0x09, 0x4b, 0x1f, 0x40, 0x19, 
-       0x07, 0xc0, 0x0c, 0x80, 0x43, 0x08, 0x49, 0x1c, 
-       0x69, 0x89, 0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 
-       0x1c, 0x29, 0x1c, 0x28, 0xf0, 0x00, 0xfd, 0x34, 
-       0x48, 0x17, 0x69, 0xc0, 0x68, 0x00, 0x4b, 0x18, 
-       0x40, 0x18, 0x02, 0x31, 0x0a, 0x09, 0x00, 0x89, 
-       0x43, 0x08, 0x49, 0x13, 0x69, 0xc9, 0x60, 0x08, 
-       0x01, 0x80, 0x48, 0x11, 0x69, 0xc0, 0x68, 0x00, 
-       0x01, 0x40, 0x09, 0x40, 0x99, 0x02, 0x06, 0xc9, 
-       0x43, 0x08, 0x49, 0x0d, 0x69, 0xc9, 0x60, 0x08, 
-       0x99, 0x0c, 0x1c, 0x28, 0x22, 0x02, 0xf0, 0x00, 
-       0xfd, 0x9f, 0x48, 0x09, 0x69, 0x40, 0x62, 0x07, 
-       0xf0, 0x00, 0xfe, 0x7d, 0xf0, 0x11, 0xf9, 0xba, 
-       0x20, 0x00, 0xb0, 0x03, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb0, 0x03, 0xe7, 0xf9, 
-       0x2e, 0x03, 0x3a, 0x04, 0x2e, 0x03, 0x3a, 0x54, 
-       0x2e, 0x08, 0x1f, 0xa8, 0xff, 0xff, 0xdf, 0xff, 
-       0xfc, 0x00, 0x00, 0x03, 0xb5, 0xff, 0xb0, 0x81, 
-       0x9f, 0x01, 0x6b, 0x78, 0x6a, 0xf9, 0x1a, 0x40, 
-       0x30, 0x01, 0x90, 0x00, 0x9a, 0x03, 0x9b, 0x04, 
-       0x18, 0xd0, 0x99, 0x00, 0x42, 0x88, 0xd9, 0x03, 
-       0x98, 0x00, 0x9a, 0x03, 0x1a, 0x83, 0x93, 0x04, 
-       0x69, 0x38, 0x28, 0x08, 0xd1, 0x03, 0x99, 0x02, 
-       0x08, 0x49, 0x00, 0x49, 0x91, 0x02, 0x6b, 0xb8, 
-       0x9a, 0x03, 0x43, 0x50, 0x99, 0x02, 0x18, 0x45, 
-       0x69, 0x38, 0x00, 0x80, 0x49, 0x3c, 0x58, 0x08, 
-       0x23, 0x04, 0x40, 0x18, 0xd0, 0x00, 0x08, 0x6d, 
-       0x69, 0x38, 0x00, 0x80, 0x49, 0x39, 0x58, 0x08, 
-       0x1c, 0x06, 0x43, 0x6e, 0x69, 0xb8, 0x09, 0x71, 
-       0x18, 0x44, 0x6b, 0xf8, 0x28, 0x00, 0xd1, 0x02, 
-       0x03, 0x20, 0x0b, 0x00, 0xe0, 0x01, 0x02, 0x20, 
-       0x0a, 0x00, 0x1c, 0x04, 0xf0, 0x11, 0xf9, 0x56, 
-       0xf0, 0x11, 0xf9, 0x32, 0x48, 0x30, 0x69, 0x80, 
-       0x68, 0x00, 0x01, 0x40, 0x09, 0x40, 0x49, 0x2e, 
-       0x69, 0x89, 0x60, 0x08, 0x48, 0x2c, 0x69, 0x80, 
-       0x68, 0x00, 0x08, 0xc0, 0x00, 0xc0, 0x23, 0x03, 
-       0x43, 0x18, 0x49, 0x29, 0x69, 0x89, 0x60, 0x08, 
-       0x07, 0x40, 0x6b, 0xf8, 0x49, 0x26, 0x69, 0x89, 
-       0x68, 0x09, 0x4b, 0x26, 0x40, 0x19, 0x07, 0xc0, 
-       0x0c, 0x80, 0x43, 0x08, 0x49, 0x22, 0x69, 0x89, 
-       0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 0x1c, 0x39, 
-       0x1c, 0x38, 0xf0, 0x00, 0xfc, 0x9d, 0x99, 0x0a, 
-       0x1c, 0x38, 0x22, 0x03, 0xf0, 0x00, 0xfd, 0x20, 
-       0x69, 0xf8, 0x49, 0x1b, 0x69, 0x49, 0x61, 0x08, 
-       0x48, 0x19, 0x69, 0xc0, 0x68, 0x00, 0x4b, 0x1a, 
-       0x40, 0x18, 0x02, 0x21, 0x0a, 0x09, 0x00, 0x89, 
-       0x43, 0x08, 0x49, 0x15, 0x69, 0xc9, 0x60, 0x08, 
-       0x01, 0x80, 0x48, 0x13, 0x69, 0xc0, 0x68, 0x00, 
-       0x01, 0x40, 0x09, 0x40, 0x06, 0xf1, 0x43, 0x08, 
-       0x49, 0x0f, 0x69, 0xc9, 0x60, 0x08, 0x48, 0x0e, 
-       0x69, 0x40, 0x61, 0x84, 0x06, 0xf0, 0x0e, 0xc0, 
-       0x49, 0x0b, 0x69, 0x49, 0x61, 0x48, 0x9b, 0x04, 
-       0x48, 0x09, 0x69, 0x40, 0x62, 0x43, 0xf0, 0x00, 
-       0xfd, 0xda, 0xf0, 0x11, 0xf9, 0x17, 0x20, 0x00, 
-       0xb0, 0x01, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0xb0, 0x01, 0xe7, 0xf9, 0x00, 0x00, 
-       0x2e, 0x03, 0x3a, 0x04, 0x2e, 0x03, 0x3a, 0x54, 
-       0x2e, 0x08, 0x1f, 0xa8, 0xff, 0xff, 0xdf, 0xff, 
-       0xfc, 0x00, 0x00, 0x03, 0xb5, 0xf3, 0xb0, 0x86, 
-       0x9f, 0x06, 0x99, 0x07, 0x68, 0x8c, 0x99, 0x07, 
-       0x68, 0xc8, 0x90, 0x03, 0x99, 0x07, 0x68, 0x0d, 
-       0x99, 0x07, 0x68, 0x49, 0x91, 0x02, 0x6b, 0x78, 
-       0x6a, 0xf9, 0x1a, 0x40, 0x30, 0x01, 0x90, 0x01, 
-       0x6b, 0x38, 0x6a, 0xb9, 0x1a, 0x40, 0x30, 0x01, 
-       0x90, 0x00, 0x99, 0x02, 0x98, 0x03, 0x18, 0x08, 
-       0x99, 0x01, 0x42, 0x88, 0xd9, 0x03, 0x98, 0x01, 
-       0x99, 0x02, 0x1a, 0x40, 0x90, 0x03, 0x19, 0x28, 
-       0x99, 0x00, 0x42, 0x88, 0xd9, 0x01, 0x98, 0x00, 
-       0x1b, 0x44, 0x69, 0x38, 0x28, 0x08, 0xd1, 0x02, 
-       0x08, 0x64, 0x08, 0x6d, 0x00, 0x6d, 0x6b, 0xb8, 
-       0x99, 0x02, 0x43, 0x48, 0x19, 0x41, 0x91, 0x04, 
-       0x69, 0x38, 0x00, 0x80, 0x49, 0x41, 0x58, 0x08, 
-       0x23, 0x04, 0x40, 0x18, 0xd0, 0x02, 0x99, 0x04, 
-       0x08, 0x49, 0x91, 0x04, 0x69, 0x38, 0x00, 0x80, 
-       0x49, 0x3d, 0x58, 0x08, 0x99, 0x04, 0x43, 0x48, 
-       0x90, 0x05, 0x69, 0xb8, 0x99, 0x05, 0x09, 0x49, 
-       0x18, 0x46, 0x6b, 0xf8, 0x28, 0x00, 0xd1, 0x02, 
-       0x03, 0x30, 0x0b, 0x00, 0xe0, 0x01, 0x02, 0x30, 
-       0x0a, 0x00, 0x1c, 0x06, 0xf0, 0x11, 0xf8, 0x9a, 
-       0xf0, 0x11, 0xf8, 0x76, 0x48, 0x33, 0x69, 0x80, 
-       0x68, 0x00, 0x01, 0x40, 0x09, 0x40, 0x49, 0x31, 
-       0x69, 0x89, 0x60, 0x08, 0x48, 0x2f, 0x69, 0x80, 
-       0x68, 0x00, 0x08, 0xc0, 0x00, 0xc0, 0x23, 0x04, 
-       0x43, 0x18, 0x49, 0x2c, 0x69, 0x89, 0x60, 0x08, 
-       0x07, 0x40, 0x48, 0x2a, 0x69, 0xc0, 0x68, 0x00, 
-       0x01, 0x40, 0x09, 0x40, 0x99, 0x05, 0x06, 0xc9, 
-       0x43, 0x08, 0x49, 0x26, 0x69, 0xc9, 0x60, 0x08, 
-       0x48, 0x24, 0x69, 0xc0, 0x68, 0x00, 0x4b, 0x24, 
-       0x40, 0x18, 0x02, 0x31, 0x0a, 0x09, 0x00, 0x89, 
-       0x43, 0x08, 0x49, 0x20, 0x69, 0xc9, 0x60, 0x08, 
-       0x01, 0x80, 0x1c, 0x39, 0x1c, 0x38, 0xf0, 0x00, 
-       0xfb, 0xd7, 0x6b, 0xf8, 0x49, 0x1b, 0x69, 0x89, 
-       0x68, 0x09, 0x4b, 0x1c, 0x40, 0x19, 0x07, 0xc0, 
-       0x0c, 0x80, 0x43, 0x08, 0x49, 0x17, 0x69, 0x89, 
-       0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 0x99, 0x07, 
-       0x69, 0x09, 0x1c, 0x38, 0x22, 0x04, 0xf0, 0x00, 
-       0xfc, 0x4b, 0x69, 0xf8, 0x49, 0x11, 0x69, 0x49, 
-       0x61, 0x08, 0x98, 0x05, 0x06, 0xc0, 0x0e, 0xc0, 
-       0x49, 0x0e, 0x69, 0x49, 0x61, 0x48, 0x48, 0x0d, 
-       0x69, 0x40, 0x61, 0x86, 0x48, 0x0b, 0x69, 0x40, 
-       0x62, 0x04, 0x98, 0x03, 0x49, 0x09, 0x69, 0x49, 
-       0x62, 0x48, 0xf0, 0x00, 0xfd, 0x18, 0xf0, 0x11, 
-       0xf8, 0x55, 0x20, 0x00, 0xb0, 0x06, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x06, 
-       0xe7, 0xf9, 0x00, 0x00, 0x2e, 0x03, 0x3a, 0x04, 
-       0x2e, 0x03, 0x3a, 0x54, 0x2e, 0x08, 0x1f, 0xa8, 
-       0xfc, 0x00, 0x00, 0x03, 0xff, 0xff, 0xdf, 0xff, 
-       0xb5, 0xff, 0x9d, 0x09, 0xb0, 0x81, 0x98, 0x0b, 
-       0x06, 0x02, 0x0e, 0x12, 0x92, 0x00, 0xb0, 0x93, 
-       0x98, 0x14, 0x90, 0x12, 0x99, 0x15, 0x91, 0x11, 
-       0xaf, 0x0c, 0x1c, 0x38, 0x9a, 0x16, 0xca, 0x5e, 
-       0xc0, 0x5e, 0x68, 0x39, 0x91, 0x04, 0x68, 0x79, 
-       0x91, 0x03, 0x98, 0x12, 0x99, 0x11, 0x42, 0x88, 
-       0xd1, 0x73, 0x99, 0x03, 0x42, 0x8d, 0xd9, 0x71, 
-       0x68, 0xb8, 0x90, 0x01, 0x68, 0xf8, 0x90, 0x02, 
-       0x99, 0x11, 0x6b, 0x48, 0x6a, 0xc9, 0x1a, 0x40, 
-       0x1c, 0x44, 0x99, 0x11, 0x6b, 0x08, 0x6a, 0x89, 
-       0x1a, 0x40, 0x30, 0x01, 0x90, 0x00, 0x98, 0x02, 
-       0x18, 0x28, 0x42, 0xa0, 0xd9, 0x01, 0x1b, 0x61, 
-       0x91, 0x02, 0x9b, 0x17, 0x98, 0x01, 0x18, 0x18, 
-       0x99, 0x00, 0x42, 0x88, 0xd9, 0x03, 0x98, 0x00, 
-       0x9b, 0x17, 0x1a, 0xc0, 0x90, 0x01, 0x98, 0x01, 
-       0x60, 0xb8, 0x98, 0x02, 0x60, 0xf8, 0x98, 0x12, 
-       0x69, 0xc0, 0x90, 0x0a, 0x98, 0x12, 0x6b, 0x80, 
-       0x99, 0x03, 0x43, 0x48, 0x99, 0x04, 0x18, 0x41, 
-       0x91, 0x05, 0x98, 0x12, 0x69, 0x00, 0x00, 0x80, 
-       0x49, 0x48, 0x58, 0x08, 0x99, 0x05, 0x43, 0x48, 
-       0x90, 0x0b, 0x98, 0x12, 0x69, 0x80, 0x99, 0x0b, 
-       0x09, 0x49, 0x18, 0x41, 0x91, 0x07, 0x98, 0x0a, 
-       0x99, 0x02, 0x43, 0x48, 0x90, 0x0b, 0x98, 0x0b, 
-       0x09, 0x40, 0x99, 0x07, 0x18, 0x40, 0x90, 0x06, 
-       0x98, 0x06, 0x0b, 0xc0, 0x99, 0x07, 0x0b, 0xc9, 
-       0x1a, 0x40, 0x90, 0x09, 0x98, 0x09, 0x28, 0x00, 
-       0xd0, 0x56, 0x9e, 0x02, 0x98, 0x06, 0x04, 0x40, 
-       0x0c, 0x40, 0x01, 0x41, 0x91, 0x08, 0x99, 0x08, 
-       0x98, 0x0a, 0xf0, 0x04, 0xf9, 0x17, 0x1c, 0x04, 
-       0x2c, 0x00, 0xd1, 0x00, 0x34, 0x01, 0x99, 0x03, 
-       0x98, 0x02, 0x18, 0x08, 0x1b, 0x00, 0x60, 0x78, 
-       0x60, 0xfc, 0x98, 0x02, 0x18, 0x28, 0x1b, 0x05, 
-       0x9a, 0x13, 0x1c, 0x29, 0xb4, 0x06, 0x9b, 0x19, 
-       0x1c, 0x3a, 0x99, 0x17, 0x98, 0x16, 0xf0, 0x00, 
-       0xf8, 0x57, 0xb0, 0x02, 0x1b, 0x36, 0x98, 0x09, 
-       0xe0, 0x01, 0xe0, 0x3c, 0xe0, 0x3b, 0x38, 0x01, 
-       0x90, 0x09, 0x98, 0x09, 0x28, 0x00, 0xd0, 0x1a, 
-       0x98, 0x0a, 0x21, 0x01, 0x03, 0x09, 0xf0, 0x04, 
-       0xf8, 0xf1, 0x1c, 0x04, 0x68, 0x78, 0x1b, 0x80, 
-       0x60, 0x78, 0x60, 0xfc, 0x68, 0xf8, 0x1a, 0x2d, 
-       0x9a, 0x13, 0x1c, 0x29, 0xb4, 0x06, 0x9b, 0x19, 
-       0x1c, 0x3a, 0x99, 0x17, 0x98, 0x16, 0xf0, 0x00, 
-       0xf8, 0x37, 0xb0, 0x02, 0x1b, 0x36, 0x98, 0x09, 
-       0x38, 0x01, 0x90, 0x09, 0xe7, 0xe1, 0x68, 0x78, 
-       0x1b, 0x80, 0x60, 0x78, 0x60, 0xfe, 0x68, 0xf8, 
-       0x1a, 0x2d, 0x9a, 0x13, 0x1c, 0x29, 0xb4, 0x06, 
-       0x9b, 0x19, 0x1c, 0x3a, 0x99, 0x17, 0x98, 0x16, 
-       0xf0, 0x00, 0xf8, 0x22, 0xb0, 0x02, 0xe0, 0x09, 
-       0x9a, 0x13, 0x1c, 0x29, 0xb4, 0x06, 0x9b, 0x19, 
-       0x1c, 0x3a, 0x99, 0x17, 0x98, 0x16, 0xf0, 0x00, 
-       0xf8, 0x17, 0xb0, 0x02, 0xe0, 0x09, 0x9a, 0x13, 
-       0x1c, 0x29, 0xb4, 0x06, 0x9b, 0x19, 0x1c, 0x3a, 
-       0x99, 0x17, 0x98, 0x16, 0xf0, 0x00, 0xf8, 0xb8, 
-       0xb0, 0x02, 0x20, 0x00, 0xb0, 0x14, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x13, 
-       0xb0, 0x01, 0xe7, 0xf8, 0x2e, 0x03, 0x3a, 0x54, 
-       0xb5, 0xff, 0x9d, 0x09, 0xb0, 0x81, 0x98, 0x0b, 
-       0x06, 0x02, 0x0e, 0x12, 0x92, 0x00, 0xb0, 0x92, 
-       0x98, 0x13, 0x90, 0x11, 0x99, 0x14, 0x91, 0x10, 
-       0xaf, 0x0b, 0x1c, 0x38, 0x9a, 0x15, 0xca, 0x5e, 
-       0xc0, 0x5e, 0x68, 0x38, 0x90, 0x03, 0x68, 0x78, 
-       0x90, 0x02, 0x68, 0xb8, 0x90, 0x00, 0x68, 0xf9, 
-       0x91, 0x01, 0x98, 0x11, 0x69, 0xc0, 0x90, 0x09, 
-       0x99, 0x10, 0x6b, 0x88, 0x43, 0x68, 0x9b, 0x16, 
-       0x18, 0xc1, 0x91, 0x04, 0x99, 0x10, 0x69, 0x08, 
-       0x00, 0x80, 0x49, 0x42, 0x58, 0x08, 0x99, 0x04, 
-       0x43, 0x48, 0x90, 0x0a, 0x99, 0x10, 0x69, 0x88, 
-       0x99, 0x0a, 0x09, 0x49, 0x18, 0x40, 0x90, 0x06, 
-       0x98, 0x09, 0x99, 0x01, 0x43, 0x48, 0x90, 0x0a, 
-       0x98, 0x0a, 0x09, 0x40, 0x99, 0x06, 0x18, 0x40, 
-       0x90, 0x05, 0x98, 0x05, 0x0b, 0xc0, 0x99, 0x06, 
-       0x0b, 0xc9, 0x1a, 0x40, 0x90, 0x08, 0x98, 0x08, 
-       0x28, 0x00, 0xd0, 0x53, 0x9e, 0x01, 0x98, 0x05, 
-       0x04, 0x40, 0x0c, 0x40, 0x01, 0x41, 0x91, 0x07, 
-       0x99, 0x07, 0x98, 0x09, 0xf0, 0x04, 0xf8, 0x5e, 
-       0x1c, 0x04, 0x2c, 0x00, 0xd1, 0x00, 0x34, 0x01, 
-       0x98, 0x02, 0x99, 0x01, 0x18, 0x40, 0x1b, 0x00, 
-       0x60, 0x78, 0x60, 0xfc, 0x99, 0x01, 0x18, 0x68, 
-       0x1b, 0x05, 0x9a, 0x12, 0x1c, 0x29, 0xb4, 0x06, 
-       0x9b, 0x18, 0x1c, 0x3a, 0x99, 0x16, 0x98, 0x15, 
-       0xf0, 0x00, 0xf8, 0x4a, 0xb0, 0x02, 0x1b, 0x36, 
-       0x98, 0x08, 0x38, 0x01, 0x90, 0x08, 0x98, 0x08, 
-       0x28, 0x00, 0xd0, 0x1a, 0x98, 0x09, 0x21, 0x01, 
-       0x03, 0x09, 0xf0, 0x04, 0xf8, 0x3b, 0x1c, 0x04, 
-       0x68, 0x78, 0x1b, 0x80, 0x60, 0x78, 0x60, 0xfc, 
-       0x68, 0xf8, 0x1a, 0x2d, 0x9a, 0x12, 0x1c, 0x29, 
-       0xb4, 0x06, 0x9b, 0x18, 0x1c, 0x3a, 0x99, 0x16, 
-       0x98, 0x15, 0xf0, 0x00, 0xf8, 0x2d, 0xb0, 0x02, 
-       0x1b, 0x36, 0x98, 0x08, 0x38, 0x01, 0x90, 0x08, 
-       0xe7, 0xe1, 0x68, 0x78, 0x1b, 0x80, 0x60, 0x78, 
-       0x60, 0xfe, 0x68, 0xf8, 0x1a, 0x2d, 0x9a, 0x12, 
-       0x1c, 0x29, 0xb4, 0x06, 0x9b, 0x18, 0x1c, 0x3a, 
-       0x99, 0x16, 0x98, 0x15, 0xf0, 0x00, 0xf8, 0x18, 
-       0xb0, 0x02, 0xe0, 0x09, 0x9a, 0x12, 0x1c, 0x29, 
-       0xb4, 0x06, 0x9b, 0x18, 0x1c, 0x3a, 0x99, 0x16, 
-       0x98, 0x15, 0xf0, 0x00, 0xf8, 0x0d, 0xb0, 0x02, 
-       0x20, 0x00, 0xb0, 0x13, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0xb0, 0x12, 0xb0, 0x01, 
-       0xe7, 0xf8, 0x00, 0x00, 0x2e, 0x03, 0x3a, 0x54, 
-       0xb5, 0xff, 0xb0, 0x81, 0x98, 0x0b, 0x06, 0x02, 
-       0x0e, 0x12, 0x92, 0x00, 0xb0, 0x8e, 0x9f, 0x0f, 
-       0x9c, 0x10, 0x9a, 0x11, 0x68, 0x10, 0x90, 0x07, 
-       0x9a, 0x11, 0x68, 0x50, 0x90, 0x06, 0x9a, 0x11, 
-       0x68, 0x91, 0x91, 0x08, 0x9a, 0x11, 0x68, 0xd0, 
-       0x90, 0x09, 0x6b, 0x60, 0x6a, 0xe1, 0x1a, 0x40, 
-       0x30, 0x01, 0x90, 0x01, 0x6b, 0x20, 0x6a, 0xa1, 
-       0x1a, 0x40, 0x30, 0x01, 0x90, 0x00, 0x99, 0x18, 
-       0x98, 0x09, 0x18, 0x08, 0x99, 0x01, 0x42, 0x88, 
-       0xd9, 0x03, 0x98, 0x01, 0x99, 0x18, 0x1a, 0x41, 
-       0x91, 0x09, 0x9b, 0x12, 0x99, 0x08, 0x18, 0x58, 
-       0x99, 0x00, 0x42, 0x88, 0xd9, 0x03, 0x98, 0x00, 
-       0x9b, 0x12, 0x1a, 0xc1, 0x91, 0x08, 0x22, 0x00, 
-       0x92, 0x05, 0x42, 0xa7, 0xd1, 0x20, 0x99, 0x18, 
-       0x98, 0x06, 0x42, 0x81, 0xd9, 0x0c, 0x22, 0x02, 
-       0x92, 0x05, 0x99, 0x06, 0x98, 0x09, 0x18, 0x08, 
-       0x1e, 0x41, 0x91, 0x06, 0x99, 0x18, 0x98, 0x09, 
-       0x18, 0x08, 0x1e, 0x41, 0x91, 0x18, 0xe0, 0x0f, 
-       0x9b, 0x12, 0x98, 0x07, 0x42, 0x83, 0xd9, 0x0b, 
-       0x22, 0x01, 0x92, 0x05, 0x98, 0x07, 0x99, 0x08, 
-       0x18, 0x40, 0x38, 0x01, 0x90, 0x07, 0x9b, 0x12, 
-       0x99, 0x08, 0x18, 0x58, 0x1e, 0x43, 0x93, 0x12, 
-       0x69, 0x38, 0x28, 0x08, 0xd1, 0x0a, 0x99, 0x08, 
-       0x08, 0x49, 0x91, 0x08, 0x98, 0x07, 0x08, 0x40, 
-       0x00, 0x40, 0x90, 0x07, 0x9b, 0x12, 0x08, 0x5b, 
-       0x00, 0x5b, 0x93, 0x12, 0x69, 0x38, 0x00, 0x80, 
-       0x49, 0xc6, 0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 
-       0x08, 0x80, 0x90, 0x03, 0x69, 0x20, 0x00, 0x80, 
-       0x49, 0xc2, 0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 
-       0x08, 0x80, 0x90, 0x02, 0x6b, 0xb8, 0x99, 0x06, 
-       0x43, 0x48, 0x99, 0x07, 0x18, 0x41, 0x91, 0x04, 
-       0x98, 0x03, 0x28, 0x00, 0xd0, 0x02, 0x99, 0x04, 
-       0x08, 0x49, 0x91, 0x04, 0x69, 0x38, 0x00, 0x80, 
-       0x49, 0xb9, 0x58, 0x08, 0x99, 0x04, 0x1c, 0x06, 
-       0x43, 0x4e, 0x6b, 0xa0, 0x99, 0x18, 0x43, 0x48, 
-       0x9b, 0x12, 0x18, 0xc1, 0x91, 0x04, 0x98, 0x02, 
-       0x28, 0x00, 0xd0, 0x02, 0x99, 0x04, 0x08, 0x49, 
-       0x91, 0x04, 0x69, 0x20, 0x00, 0x80, 0x49, 0xb0, 
-       0x58, 0x08, 0x99, 0x04, 0x1c, 0x05, 0x43, 0x4d, 
-       0x9a, 0x05, 0x2a, 0x01, 0xd1, 0x3d, 0x69, 0x38, 
-       0x28, 0x08, 0xd0, 0x3a, 0x69, 0x38, 0x28, 0x09, 
-       0xd0, 0x02, 0x69, 0x38, 0x28, 0x0a, 0xd1, 0x0a, 
-       0x36, 0x10, 0x69, 0xb8, 0x09, 0x71, 0x18, 0x41, 
-       0x91, 0x0b, 0x06, 0xf0, 0x0e, 0xc0, 0x1d, 0xc1, 
-       0x31, 0x01, 0x91, 0x0a, 0xe0, 0x0b, 0x69, 0xb8, 
-       0x09, 0x71, 0x18, 0x41, 0x91, 0x0b, 0x69, 0x38, 
-       0x00, 0x80, 0x49, 0x9f, 0x58, 0x08, 0x19, 0x86, 
-       0x06, 0xf1, 0x0e, 0xc9, 0x91, 0x0a, 0x69, 0x20, 
-       0x28, 0x09, 0xd0, 0x02, 0x69, 0x20, 0x28, 0x0a, 
-       0xd1, 0x0a, 0x35, 0x10, 0x69, 0xa0, 0x09, 0x69, 
-       0x18, 0x41, 0x91, 0x0d, 0x06, 0xe8, 0x0e, 0xc0, 
-       0x1d, 0xc1, 0x31, 0x01, 0x91, 0x0c, 0xe0, 0x0b, 
-       0x69, 0xa0, 0x09, 0x69, 0x18, 0x41, 0x91, 0x0d, 
-       0x69, 0x20, 0x00, 0x80, 0x49, 0x90, 0x58, 0x08, 
-       0x19, 0x45, 0x06, 0xe9, 0x0e, 0xc9, 0x91, 0x0c, 
-       0xe0, 0x0d, 0x69, 0xb8, 0x09, 0x71, 0x18, 0x41, 
-       0x91, 0x0b, 0x69, 0xa0, 0x09, 0x69, 0x18, 0x41, 
-       0x91, 0x0d, 0x06, 0xf1, 0x0e, 0xc9, 0x91, 0x0a, 
-       0x06, 0xe9, 0x0e, 0xc9, 0x91, 0x0c, 0x6b, 0xf8, 
-       0x28, 0x00, 0xd1, 0x03, 0x99, 0x0b, 0x03, 0x09, 
-       0x0b, 0x09, 0xe0, 0x02, 0x99, 0x0b, 0x02, 0x09, 
-       0x0a, 0x09, 0x91, 0x0b, 0x6b, 0xe0, 0x28, 0x00, 
-       0xd1, 0x03, 0x99, 0x0d, 0x03, 0x09, 0x0b, 0x09, 
-       0xe0, 0x02, 0x99, 0x0d, 0x02, 0x09, 0x0a, 0x09, 
-       0x91, 0x0d, 0xf0, 0x10, 0xfd, 0x9b, 0xf0, 0x10, 
-       0xfd, 0x77, 0x48, 0x7a, 0x69, 0x80, 0x68, 0x00, 
-       0x08, 0xc0, 0x00, 0xc0, 0x23, 0x05, 0x43, 0x18, 
-       0x49, 0x76, 0x69, 0x89, 0x60, 0x08, 0x07, 0x40, 
-       0x1c, 0x21, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0xf8, 
-       0x98, 0x03, 0x28, 0x00, 0xd0, 0x18, 0x98, 0x02, 
-       0x28, 0x00, 0xd0, 0x15, 0x48, 0x6f, 0x69, 0x80, 
-       0x68, 0x00, 0x23, 0x08, 0x43, 0xdb, 0x40, 0x18, 
-       0x49, 0x6c, 0x69, 0x89, 0x60, 0x08, 0x07, 0x00, 
-       0x48, 0x6a, 0x69, 0x80, 0x68, 0x00, 0x4b, 0x6a, 
-       0x40, 0x18, 0x49, 0x68, 0x69, 0x89, 0x60, 0x08, 
-       0x05, 0xc0, 0x99, 0x08, 0x08, 0x49, 0x91, 0x08, 
-       0x6b, 0xf8, 0x49, 0x64, 0x69, 0x89, 0x68, 0x09, 
-       0x4b, 0x64, 0x40, 0x19, 0x07, 0xc0, 0x0c, 0x40, 
-       0x43, 0x08, 0x49, 0x60, 0x69, 0x89, 0x60, 0x08, 
-       0x04, 0x40, 0x0f, 0xc0, 0x6b, 0xe0, 0x49, 0x5d, 
-       0x69, 0x89, 0x68, 0x09, 0x4b, 0x5e, 0x40, 0x19, 
-       0x07, 0xc0, 0x0c, 0x80, 0x43, 0x08, 0x49, 0x59, 
-       0x69, 0x89, 0x60, 0x08, 0x04, 0x80, 0x0f, 0xc0, 
-       0x68, 0x38, 0x28, 0x00, 0xd0, 0x0d, 0x79, 0x38, 
-       0x49, 0x54, 0x69, 0x89, 0x68, 0x09, 0x4b, 0x57, 
-       0x40, 0x19, 0x03, 0xc0, 0x43, 0x08, 0x49, 0x51, 
-       0x69, 0x89, 0x60, 0x08, 0x02, 0x40, 0x0e, 0x00, 
-       0xe0, 0x0d, 0x6a, 0x78, 0x78, 0x00, 0x49, 0x4d, 
-       0x69, 0x89, 0x68, 0x09, 0x4b, 0x4f, 0x40, 0x19, 
-       0x03, 0xc0, 0x43, 0x08, 0x49, 0x49, 0x69, 0x89, 
-       0x60, 0x08, 0x02, 0x40, 0x0e, 0x00, 0x69, 0x20, 
-       0x00, 0x80, 0x49, 0x45, 0x58, 0x08, 0x99, 0x08, 
-       0x43, 0x48, 0x28, 0x40, 0xd9, 0x01, 0x21, 0x00, 
-       0xe0, 0x00, 0x21, 0x01, 0x1c, 0x08, 0x49, 0x41, 
-       0x69, 0x89, 0x68, 0x09, 0x4b, 0x44, 0x40, 0x19, 
-       0x07, 0xc2, 0x09, 0x52, 0x43, 0x11, 0x4a, 0x3d, 
-       0x69, 0x92, 0x60, 0x11, 0x01, 0x49, 0x0f, 0xc9, 
-       0x49, 0x3a, 0x69, 0x89, 0x68, 0x09, 0x4b, 0x3f, 
-       0x40, 0x19, 0x9a, 0x05, 0x07, 0x92, 0x0f, 0x92, 
-       0x05, 0xd2, 0x43, 0x11, 0x4a, 0x35, 0x69, 0x92, 
-       0x60, 0x11, 0x01, 0xc9, 0x49, 0x33, 0x69, 0x89, 
-       0x68, 0x09, 0x4b, 0x39, 0x40, 0x19, 0x9a, 0x0e, 
-       0x07, 0xd2, 0x09, 0x92, 0x43, 0x11, 0x4a, 0x2f, 
-       0x69, 0x92, 0x60, 0x11, 0x01, 0x89, 0x69, 0xf9, 
-       0x4a, 0x2c, 0x69, 0x52, 0x60, 0x11, 0x49, 0x2b, 
-       0x69, 0x89, 0x68, 0x09, 0x01, 0x49, 0x09, 0x49, 
-       0x9a, 0x0a, 0x06, 0xd2, 0x43, 0x11, 0x4a, 0x27, 
-       0x69, 0x92, 0x60, 0x11, 0x99, 0x0a, 0x4a, 0x25, 
-       0x69, 0x52, 0x60, 0x51, 0x99, 0x0b, 0x4a, 0x23, 
-       0x69, 0x52, 0x60, 0x91, 0x99, 0x0b, 0x4a, 0x21, 
-       0x69, 0x52, 0x60, 0xd1, 0x69, 0xe1, 0x4a, 0x1f, 
-       0x69, 0x52, 0x61, 0x11, 0x49, 0x1d, 0x69, 0xc9, 
-       0x68, 0x09, 0x01, 0x49, 0x09, 0x49, 0x9a, 0x0c, 
-       0x06, 0xd2, 0x43, 0x11, 0x4a, 0x19, 0x69, 0xd2, 
-       0x60, 0x11, 0x99, 0x0c, 0x4a, 0x17, 0x69, 0x52, 
-       0x61, 0x51, 0x99, 0x0d, 0x4a, 0x15, 0x69, 0x52, 
-       0x61, 0x91, 0x99, 0x0d, 0x4a, 0x13, 0x69, 0x52, 
-       0x61, 0xd1, 0x99, 0x09, 0x4a, 0x11, 0x69, 0x52, 
-       0x62, 0x51, 0x99, 0x08, 0x4a, 0x0f, 0x69, 0x52, 
-       0x62, 0x11, 0x68, 0x38, 0x28, 0x00, 0xd0, 0x05, 
-       0x48, 0x14, 0x68, 0x01, 0x23, 0x01, 0x43, 0x19, 
-       0x60, 0x01, 0xe0, 0x02, 0x48, 0x11, 0x21, 0x00, 
-       0x60, 0x01, 0xf0, 0x00, 0xf9, 0x8c, 0xf0, 0x10, 
-       0xfc, 0xc9, 0x20, 0x00, 0xb0, 0x0f, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x0e, 
-       0xb0, 0x01, 0xe7, 0xf8, 0x2e, 0x03, 0x3a, 0x04, 
-       0x2e, 0x03, 0x3a, 0x54, 0x2e, 0x08, 0x1f, 0xa8, 
-       0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xbf, 0xff, 
-       0xff, 0xff, 0xdf, 0xff, 0xff, 0x80, 0x7f, 0xff, 
-       0xfb, 0xff, 0xff, 0xff, 0xfe, 0x7f, 0xff, 0xff, 
-       0xfd, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 0x40, 
-       0xb4, 0x80, 0x1c, 0x07, 0x1c, 0x0a, 0x69, 0x38, 
-       0x00, 0x80, 0x49, 0x3c, 0x58, 0x08, 0x23, 0x18, 
-       0x40, 0x18, 0x08, 0xc0, 0x49, 0x3a, 0x69, 0x89, 
-       0x68, 0x09, 0x23, 0xc0, 0x43, 0xdb, 0x40, 0x19, 
-       0x07, 0x80, 0x0f, 0x80, 0x01, 0x80, 0x43, 0x08, 
-       0x49, 0x35, 0x69, 0x89, 0x60, 0x08, 0x06, 0x00, 
-       0x0f, 0x80, 0x69, 0x38, 0x00, 0x80, 0x49, 0x31, 
-       0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 0x08, 0x80, 
-       0x49, 0x2f, 0x69, 0x89, 0x68, 0x09, 0x23, 0x08, 
-       0x43, 0xdb, 0x40, 0x19, 0x07, 0xc0, 0x0f, 0x00, 
-       0x43, 0x08, 0x49, 0x2b, 0x69, 0x89, 0x60, 0x08, 
-       0x07, 0x00, 0x0f, 0xc0, 0x69, 0x38, 0x00, 0x80, 
-       0x49, 0x26, 0x58, 0x08, 0x49, 0x26, 0x69, 0x89, 
-       0x68, 0x09, 0x23, 0x30, 0x43, 0xdb, 0x40, 0x19, 
-       0x07, 0x80, 0x0f, 0x80, 0x01, 0x00, 0x43, 0x08, 
-       0x49, 0x21, 0x69, 0x89, 0x60, 0x08, 0x06, 0x80, 
-       0x0f, 0x80, 0x69, 0x10, 0x00, 0x80, 0x49, 0x1d, 
-       0x58, 0x08, 0x23, 0x18, 0x40, 0x18, 0x08, 0xc0, 
-       0x49, 0x1b, 0x69, 0x89, 0x68, 0x09, 0x4b, 0x1b, 
-       0x40, 0x19, 0x07, 0x80, 0x0f, 0x80, 0x02, 0xc0, 
-       0x43, 0x08, 0x49, 0x17, 0x69, 0x89, 0x60, 0x08, 
-       0x04, 0xc0, 0x0f, 0x80, 0x69, 0x10, 0x00, 0x80, 
-       0x49, 0x12, 0x58, 0x08, 0x23, 0x04, 0x40, 0x18, 
-       0x08, 0x80, 0x49, 0x11, 0x69, 0x89, 0x68, 0x09, 
-       0x4b, 0x11, 0x40, 0x19, 0x07, 0xc0, 0x0d, 0xc0, 
-       0x43, 0x08, 0x49, 0x0d, 0x69, 0x89, 0x60, 0x08, 
-       0x05, 0xc0, 0x0f, 0xc0, 0x69, 0x10, 0x00, 0x80, 
-       0x49, 0x08, 0x58, 0x08, 0x49, 0x08, 0x69, 0x89, 
-       0x68, 0x09, 0x4b, 0x0a, 0x40, 0x19, 0x07, 0x80, 
-       0x0f, 0x80, 0x02, 0x40, 0x43, 0x08, 0x49, 0x04, 
-       0x69, 0x89, 0x60, 0x08, 0x05, 0x40, 0x0f, 0x80, 
-       0xbc, 0x80, 0x47, 0x70, 0x2e, 0x03, 0x3a, 0x04, 
-       0x2e, 0x08, 0x1f, 0xa8, 0xff, 0xff, 0xe7, 0xff, 
-       0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xf9, 0xff, 
-       0xb4, 0xb0, 0x1c, 0x04, 0x1c, 0x0f, 0x1c, 0x15, 
-       0x2d, 0x00, 0xd0, 0x06, 0x2d, 0x02, 0xd0, 0x21, 
-       0x2d, 0x03, 0xd0, 0x02, 0x2d, 0x04, 0xd0, 0x1d, 
-       0xe0, 0xa3, 0x69, 0x20, 0x28, 0x0b, 0xd2, 0x14, 
-       0xa3, 0x01, 0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 
-       0x05, 0x07, 0x09, 0x0b, 0x05, 0x07, 0x09, 0x0b, 
-       0x0d, 0x0e, 0x0e, 0x00, 0x07, 0xff, 0xe0, 0x09, 
-       0x07, 0xbf, 0xe0, 0x07, 0x07, 0x3f, 0xe0, 0x05, 
-       0x06, 0x3f, 0xe0, 0x03, 0xe0, 0x02, 0x02, 0x3f, 
-       0xe0, 0x00, 0xe7, 0xff, 0x48, 0x46, 0x6a, 0x00, 
-       0x60, 0x07, 0xe0, 0x86, 0x69, 0x20, 0x28, 0x0b, 
-       0xd2, 0x73, 0xa3, 0x02, 0x5c, 0x1b, 0x00, 0x5b, 
-       0x44, 0x9f, 0x1c, 0x00, 0x06, 0x15, 0x24, 0x33, 
-       0x06, 0x15, 0x24, 0x33, 0x41, 0x45, 0x45, 0x00, 
-       0x01, 0xff, 0x48, 0x3d, 0x6a, 0x40, 0x68, 0x00, 
-       0x4b, 0x3c, 0x40, 0x18, 0x06, 0x39, 0x0e, 0x09, 
-       0x00, 0x89, 0x43, 0x08, 0x49, 0x38, 0x6a, 0x49, 
-       0x60, 0x08, 0x05, 0x80, 0xe0, 0x69, 0x01, 0xbf, 
-       0x48, 0x35, 0x6a, 0x40, 0x68, 0x00, 0x4b, 0x35, 
-       0x40, 0x18, 0x06, 0x39, 0x0e, 0x09, 0x00, 0x89, 
-       0x43, 0x08, 0x49, 0x31, 0x6a, 0x49, 0x60, 0x08, 
-       0x05, 0x80, 0xe0, 0x5a, 0x01, 0x3f, 0x48, 0x2e, 
-       0x6a, 0x40, 0x68, 0x00, 0x4b, 0x2d, 0x40, 0x18, 
-       0x06, 0x39, 0x0e, 0x09, 0x00, 0x89, 0x43, 0x08, 
-       0x49, 0x29, 0x6a, 0x49, 0x60, 0x08, 0x05, 0x80, 
-       0xe0, 0x4b, 0x48, 0x27, 0x6a, 0x40, 0x68, 0x00, 
-       0x4b, 0x26, 0x40, 0x18, 0x06, 0x39, 0x0e, 0x09, 
-       0x00, 0x89, 0x43, 0x08, 0x49, 0x22, 0x6a, 0x49, 
-       0x60, 0x08, 0x05, 0x80, 0xe0, 0x3d, 0x48, 0x20, 
-       0x6a, 0x00, 0x60, 0x07, 0xe0, 0x39, 0x48, 0x1e, 
-       0x6a, 0x40, 0x68, 0x00, 0x4b, 0x1d, 0x40, 0x18, 
-       0x06, 0x39, 0x0e, 0x09, 0x00, 0x89, 0x43, 0x08, 
-       0x49, 0x19, 0x6a, 0x49, 0x60, 0x08, 0x05, 0x80, 
-       0x48, 0x17, 0x6a, 0x40, 0x68, 0x00, 0x4b, 0x18, 
-       0x40, 0x18, 0x21, 0xff, 0x02, 0x09, 0x40, 0x39, 
-       0x00, 0x89, 0x43, 0x08, 0x49, 0x12, 0x6a, 0x49, 
-       0x60, 0x08, 0x03, 0x80, 0x48, 0x10, 0x6a, 0x40, 
-       0x68, 0x00, 0x4b, 0x12, 0x40, 0x18, 0x21, 0xff, 
-       0x04, 0x09, 0x40, 0x39, 0x00, 0x89, 0x43, 0x01, 
-       0x48, 0x0b, 0x6a, 0x40, 0x60, 0x01, 0x01, 0x88, 
-       0xe0, 0x00, 0xe0, 0x0d, 0x48, 0x08, 0x6a, 0x40, 
-       0x68, 0x00, 0x01, 0x80, 0x09, 0x80, 0x21, 0x3f, 
-       0x06, 0x09, 0x40, 0x39, 0x00, 0x89, 0x43, 0x08, 
-       0x49, 0x03, 0x6a, 0x49, 0x60, 0x08, 0xe0, 0x00, 
-       0xe7, 0xff, 0xbc, 0xb0, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x1f, 0xa8, 0xff, 0xff, 0xfc, 0x03, 
-       0xff, 0xfc, 0x03, 0xff, 0xfc, 0x03, 0xff, 0xff, 
-       0xb4, 0x80, 0x1c, 0x07, 0x1c, 0x0a, 0x69, 0x38, 
-       0x28, 0x0b, 0xd2, 0x1a, 0xa3, 0x01, 0x5c, 0x1b, 
-       0x00, 0x5b, 0x44, 0x9f, 0x05, 0x08, 0x0b, 0x0e, 
-       0x05, 0x08, 0x0b, 0x0e, 0x11, 0x13, 0x13, 0x00, 
-       0x68, 0x10, 0x0f, 0xc1, 0xe0, 0x0f, 0x68, 0x10, 
-       0x0f, 0x81, 0xe0, 0x0c, 0x68, 0x10, 0x0f, 0x01, 
-       0xe0, 0x09, 0x68, 0x10, 0x0e, 0x01, 0xe0, 0x06, 
-       0x68, 0x11, 0xe0, 0x04, 0x68, 0x10, 0x0a, 0x01, 
-       0xe0, 0x01, 0x68, 0x11, 0xe7, 0xff, 0x1c, 0x08, 
-       0xbc, 0x80, 0x47, 0x70, 0xe7, 0xfc, 0x48, 0x14, 
-       0x69, 0x80, 0x68, 0x00, 0x49, 0x12, 0x6a, 0x89, 
-       0x60, 0x08, 0x48, 0x11, 0x69, 0xc0, 0x68, 0x00, 
-       0x49, 0x0f, 0x6a, 0xc9, 0x60, 0x08, 0x48, 0x0e, 
-       0x6a, 0x00, 0x68, 0x00, 0x49, 0x0c, 0x6b, 0x09, 
-       0x60, 0x08, 0x48, 0x0b, 0x6a, 0x40, 0x68, 0x00, 
-       0x49, 0x09, 0x6b, 0x49, 0x60, 0x08, 0x20, 0x01, 
-       0x49, 0x07, 0x6b, 0xc9, 0x60, 0x08, 0x20, 0x00, 
-       0x49, 0x06, 0x60, 0x08, 0x20, 0x00, 0x49, 0x05, 
-       0x60, 0x48, 0x20, 0x00, 0x49, 0x03, 0x60, 0x88, 
-       0x20, 0x00, 0x49, 0x02, 0x60, 0xc8, 0x47, 0x70, 
-       0x2e, 0x08, 0x1f, 0xa8, 0x2e, 0x08, 0x1f, 0xac, 
-       0xb4, 0x90, 0x1c, 0x01, 0x29, 0x00, 0xd1, 0x02, 
-       0x20, 0x8d, 0xbc, 0x90, 0x47, 0x70, 0x4c, 0x08, 
-       0x1c, 0x0f, 0x22, 0x00, 0x23, 0xff, 0x33, 0x01, 
-       0x42, 0x9a, 0xd3, 0x02, 0xe0, 0x04, 0x32, 0x01, 
-       0xe7, 0xf8, 0xcf, 0x08, 0xc4, 0x08, 0xe7, 0xfa, 
-       0x20, 0x00, 0xe7, 0xee, 0xe7, 0xed, 0x00, 0x00, 
-       0x68, 0x00, 0x18, 0x00, 0xb4, 0x90, 0x1c, 0x04, 
-       0x1c, 0x0f, 0x1c, 0x13, 0x06, 0x1a, 0x0e, 0x12, 
-       0x1c, 0x21, 0x60, 0x0f, 0x71, 0x0a, 0x20, 0x00, 
-       0xbc, 0x90, 0x47, 0x70, 0xe7, 0xfc, 0x00, 0x00, 
-       0xb5, 0x00, 0x48, 0x1d, 0x69, 0x00, 0x23, 0x04, 
-       0x40, 0x18, 0xd0, 0x19, 0x48, 0x1a, 0x69, 0x00, 
-       0x23, 0x02, 0x40, 0x18, 0xd0, 0x09, 0x48, 0x18, 
-       0x69, 0x40, 0x49, 0x18, 0x68, 0x09, 0x60, 0x08, 
-       0x20, 0x01, 0x49, 0x17, 0x68, 0x09, 0x70, 0x08, 
-       0xe0, 0x03, 0x20, 0x00, 0x49, 0x14, 0x68, 0x09, 
-       0x70, 0x08, 0x48, 0x14, 0x78, 0x01, 0x20, 0x01, 
-       0x40, 0x88, 0xf0, 0x07, 0xfb, 0x65, 0xe0, 0x18, 
-       0x48, 0x11, 0x6a, 0x80, 0x23, 0x02, 0x40, 0x18, 
-       0xd0, 0x13, 0x48, 0x0f, 0x6a, 0x80, 0x07, 0xc0, 
-       0x0f, 0xc0, 0xd0, 0x04, 0x20, 0xfe, 0x49, 0x0d, 
-       0x68, 0x09, 0x70, 0x08, 0xe0, 0x03, 0x20, 0x0e, 
-       0x49, 0x0a, 0x68, 0x09, 0x70, 0x08, 0x48, 0x0a, 
-       0x78, 0x01, 0x20, 0x01, 0x40, 0x88, 0xf0, 0x07, 
-       0xfb, 0x4b, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x6e, 0x00, 0x0c, 0x00, 0x2e, 0x08, 0x7c, 0x2c, 
-       0x2e, 0x08, 0x7c, 0x30, 0x2e, 0x08, 0x7c, 0x34, 
-       0x6e, 0x00, 0x0e, 0x00, 0x2e, 0x08, 0x7c, 0x38, 
-       0x2e, 0x08, 0x7c, 0x3c, 0xb5, 0xf0, 0x1c, 0x05, 
-       0x1c, 0x0c, 0x1c, 0x17, 0x06, 0x2e, 0x0e, 0x36, 
-       0x2e, 0x1f, 0xdd, 0x03, 0x20, 0xaf, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x49, 0x08, 0x20, 0x0d, 
-       0xf0, 0x07, 0xfb, 0x3c, 0x48, 0x07, 0x60, 0x04, 
-       0x20, 0x00, 0x49, 0x06, 0x68, 0x09, 0x70, 0x08, 
-       0x48, 0x05, 0x60, 0x07, 0x48, 0x05, 0x70, 0x06, 
-       0x20, 0x00, 0xe7, 0xec, 0xe7, 0xeb, 0x00, 0x00, 
-       0x2e, 0x01, 0x53, 0xed, 0x2e, 0x08, 0x7c, 0x30, 
-       0x2e, 0x08, 0x7c, 0x2c, 0x2e, 0x08, 0x7c, 0x34, 
-       0xb5, 0xb0, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x25, 
-       0x0e, 0x2d, 0x2d, 0x1f, 0xdd, 0x03, 0x20, 0xaf, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x49, 0x07, 
-       0x20, 0x0d, 0xf0, 0x07, 0xfb, 0x17, 0x48, 0x06, 
-       0x60, 0x07, 0x20, 0x00, 0x49, 0x04, 0x68, 0x09, 
-       0x70, 0x08, 0x48, 0x04, 0x70, 0x05, 0x20, 0x00, 
-       0xe7, 0xee, 0xe7, 0xed, 0x2e, 0x01, 0x53, 0xed, 
-       0x2e, 0x08, 0x7c, 0x38, 0x2e, 0x08, 0x7c, 0x3c, 
-       0xb4, 0xb0, 0x1c, 0x01, 0x4a, 0x35, 0x23, 0x01, 
-       0x60, 0x13, 0x4a, 0x35, 0x1c, 0x0f, 0x68, 0x3d, 
-       0xc2, 0x20, 0x88, 0x8d, 0xc2, 0x20, 0x88, 0xcb, 
-       0x60, 0x13, 0x68, 0x8c, 0x2c, 0x00, 0xd0, 0x57, 
-       0x4a, 0x30, 0x1c, 0x27, 0x20, 0x00, 0x28, 0x13, 
-       0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
-       0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 0x4a, 0x2c, 
-       0x1d, 0xe7, 0x37, 0x45, 0x20, 0x00, 0x28, 0x0b, 
-       0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
-       0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 0x4a, 0x27, 
-       0x1d, 0xe7, 0x37, 0x71, 0x20, 0x00, 0x28, 0x07, 
-       0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
-       0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 0x4a, 0x22, 
-       0x1d, 0xe7, 0x37, 0x8d, 0x20, 0x00, 0x28, 0x09, 
-       0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
-       0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 0x4a, 0x1d, 
-       0x1d, 0xe7, 0x37, 0xb1, 0x20, 0x00, 0x28, 0x09, 
-       0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 0xe7, 0xfa, 
-       0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 0x68, 0x0d, 
-       0x23, 0x01, 0x02, 0x9b, 0x40, 0x2b, 0xd0, 0x17, 
-       0x4a, 0x15, 0x1d, 0xe7, 0x37, 0xd5, 0x20, 0x00, 
-       0x28, 0x09, 0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 
-       0xe7, 0xfa, 0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 
-       0x4a, 0x10, 0x1d, 0xe7, 0x37, 0xf9, 0x20, 0x00, 
-       0x28, 0x09, 0xdb, 0x02, 0xe0, 0x04, 0x30, 0x01, 
-       0xe7, 0xfa, 0xcf, 0x20, 0xc2, 0x20, 0xe7, 0xfa, 
-       0x4a, 0x02, 0x23, 0x00, 0x60, 0x13, 0xbc, 0xb0, 
-       0x47, 0x70, 0x00, 0x00, 0x6e, 0x00, 0x0c, 0x0c, 
-       0x6e, 0x00, 0x0c, 0x00, 0x6e, 0x00, 0x08, 0x00, 
-       0x6e, 0x00, 0x08, 0x50, 0x6e, 0x00, 0x08, 0x80, 
-       0x6e, 0x00, 0x08, 0xa0, 0x6e, 0x00, 0x08, 0xd0, 
-       0x6e, 0x00, 0x09, 0x00, 0x6e, 0x00, 0x09, 0x30, 
-       0xb4, 0xf0, 0x1c, 0x01, 0x69, 0x08, 0x06, 0xc0, 
-       0x0e, 0xc0, 0x28, 0x01, 0xdb, 0x04, 0x69, 0x08, 
-       0x06, 0xc0, 0x0e, 0xc0, 0x28, 0x0a, 0xdd, 0x02, 
-       0x20, 0xc3, 0xbc, 0xf0, 0x47, 0x70, 0x69, 0x08, 
-       0x05, 0x80, 0x0e, 0xc0, 0x28, 0x01, 0xdb, 0x04, 
-       0x69, 0x08, 0x05, 0x80, 0x0e, 0xc0, 0x28, 0x0a, 
-       0xdd, 0x01, 0x20, 0xc4, 0xe7, 0xf1, 0x48, 0x4f, 
-       0x6a, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 0xd1, 0x01, 
-       0x20, 0xc0, 0xe7, 0xea, 0x68, 0x08, 0x07, 0x00, 
-       0x0f, 0xc0, 0x4b, 0x4b, 0x70, 0x18, 0x4f, 0x49, 
-       0x1c, 0x0c, 0x22, 0x00, 0x2a, 0x04, 0xd3, 0x02, 
-       0xe0, 0x04, 0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 
-       0xc7, 0x08, 0xe7, 0xfa, 0x4f, 0x45, 0x69, 0x08, 
-       0x06, 0xc0, 0x0e, 0xc0, 0x00, 0x43, 0x18, 0x18, 
-       0x38, 0x03, 0x69, 0x0b, 0x05, 0x9b, 0x0e, 0xde, 
-       0x00, 0x73, 0x19, 0x9b, 0x3b, 0x03, 0x01, 0x5b, 
-       0x43, 0x18, 0x60, 0x38, 0x4f, 0x3e, 0x69, 0x48, 
-       0x60, 0x38, 0x4f, 0x3e, 0x69, 0x88, 0x05, 0x40, 
-       0x0d, 0x40, 0x69, 0x8b, 0x02, 0x9b, 0x0d, 0x5b, 
-       0x02, 0xdb, 0x43, 0x18, 0x60, 0x38, 0x69, 0xcd, 
-       0x2d, 0x00, 0xd0, 0x63, 0x4f, 0x38, 0x1c, 0x2c, 
-       0x22, 0x00, 0x2a, 0x09, 0xd3, 0x02, 0xe0, 0x04, 
-       0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
-       0xe7, 0xfa, 0x4f, 0x34, 0x1d, 0xec, 0x34, 0x1d, 
-       0x22, 0x00, 0x2a, 0x09, 0xd3, 0x02, 0xe0, 0x04, 
-       0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
-       0xe7, 0xfa, 0x4f, 0x2f, 0x1d, 0xec, 0x34, 0x41, 
-       0x22, 0x00, 0x2a, 0x09, 0xd3, 0x02, 0xe0, 0x04, 
-       0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
-       0xe7, 0xfa, 0x4f, 0x2a, 0x1d, 0xec, 0x34, 0x65, 
-       0x22, 0x00, 0x2a, 0x09, 0xd3, 0x02, 0xe0, 0x04, 
-       0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
-       0xe7, 0xfa, 0x4f, 0x25, 0x1d, 0xec, 0x34, 0x89, 
-       0x22, 0x00, 0x2a, 0x05, 0xd3, 0x02, 0xe0, 0x04, 
-       0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
-       0xe7, 0xfa, 0x4f, 0x20, 0x1d, 0xec, 0x34, 0x9d, 
-       0x22, 0x00, 0x2a, 0x05, 0xd3, 0x02, 0xe0, 0x04, 
-       0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 0xc7, 0x08, 
-       0xe7, 0xfa, 0x68, 0x08, 0x23, 0x01, 0x02, 0x9b, 
-       0x40, 0x18, 0xd0, 0x17, 0x4f, 0x18, 0x1d, 0xec, 
-       0x34, 0xb1, 0x22, 0x00, 0x2a, 0x05, 0xd3, 0x02, 
-       0xe0, 0x04, 0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 
-       0xc7, 0x08, 0xe7, 0xfa, 0x4f, 0x13, 0x1d, 0xec, 
-       0x34, 0xc5, 0x22, 0x00, 0x2a, 0x05, 0xd3, 0x02, 
-       0xe0, 0x04, 0x32, 0x01, 0xe7, 0xfa, 0xcc, 0x08, 
-       0xc7, 0x08, 0xe7, 0xfa, 0x20, 0x00, 0xe7, 0x54, 
-       0xe7, 0x53, 0x00, 0x00, 0x6e, 0x00, 0x0e, 0x00, 
-       0x2e, 0x08, 0x7c, 0x3d, 0x6e, 0x00, 0x0e, 0x10, 
-       0x6e, 0x00, 0x0e, 0x14, 0x6e, 0x00, 0x0e, 0x18, 
-       0x6e, 0x00, 0x0a, 0x00, 0x6e, 0x00, 0x0a, 0x24, 
-       0x6e, 0x00, 0x0a, 0x48, 0x6e, 0x00, 0x0a, 0x90, 
-       0x6e, 0x00, 0x0a, 0xc0, 0x6e, 0x00, 0x0a, 0xe4, 
-       0x6e, 0x00, 0x09, 0xc0, 0x6e, 0x00, 0x09, 0xe4, 
-       0x1c, 0x01, 0x48, 0x0c, 0x78, 0x00, 0x28, 0x00, 
-       0xd0, 0x01, 0x20, 0xc1, 0x47, 0x70, 0x48, 0x0a, 
-       0x6a, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 0xd1, 0x01, 
-       0x20, 0xc0, 0xe7, 0xf7, 0x20, 0x00, 0x4b, 0x06, 
-       0x61, 0x58, 0x4a, 0x06, 0x68, 0x08, 0x60, 0x10, 
-       0x4a, 0x05, 0x68, 0x48, 0x60, 0x10, 0x20, 0x00, 
-       0xe7, 0xec, 0xe7, 0xeb, 0x2e, 0x08, 0x7c, 0x3d, 
-       0x6e, 0x00, 0x0e, 0x00, 0x6e, 0x00, 0x0e, 0x20, 
-       0x6e, 0x00, 0x0e, 0x24, 0x48, 0x09, 0x78, 0x00, 
-       0x28, 0x00, 0xd0, 0x01, 0x20, 0xc1, 0x47, 0x70, 
-       0x48, 0x07, 0x6a, 0x80, 0x07, 0xc0, 0x0f, 0xc0, 
-       0xd0, 0x01, 0x20, 0xc2, 0xe7, 0xf7, 0x20, 0x01, 
-       0x49, 0x03, 0x61, 0x48, 0x20, 0x00, 0xe7, 0xf2, 
-       0xe7, 0xf1, 0x00, 0x00, 0x2e, 0x08, 0x7c, 0x3d, 
-       0x6e, 0x00, 0x0e, 0x00, 0xb5, 0xff, 0x1c, 0x04, 
-       0x1c, 0x0d, 0x1c, 0x17, 0x9e, 0x09, 0x20, 0x00, 
-       0x60, 0x30, 0x48, 0x13, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x07, 0x9b, 0x03, 0x2b, 0x00, 0xd1, 0x04, 
-       0x20, 0x8a, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x23, 0xff, 0x33, 0x01, 0x42, 0x9c, 
-       0xdd, 0x01, 0x20, 0x87, 0xe7, 0xf5, 0x19, 0x28, 
-       0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 0xd9, 0x01, 
-       0x20, 0x88, 0xe7, 0xee, 0x68, 0x79, 0x1c, 0x20, 
-       0x80, 0x48, 0x70, 0x0d, 0x9b, 0x03, 0x60, 0x4b, 
-       0x68, 0x78, 0x60, 0xc8, 0x68, 0x38, 0x60, 0x88, 
-       0x60, 0x31, 0x20, 0x00, 0xe7, 0xe1, 0xe7, 0xe0, 
-       0x2e, 0x08, 0x60, 0x84, 0x1c, 0x03, 0x1c, 0x0a, 
-       0x1c, 0x19, 0x68, 0xc8, 0x60, 0x50, 0x68, 0x88, 
-       0x60, 0x10, 0x20, 0x00, 0x47, 0x70, 0xe7, 0xfd, 
-       0xb5, 0xf3, 0xb0, 0x87, 0x21, 0x00, 0x91, 0x06, 
-       0x26, 0x00, 0x98, 0x07, 0xf0, 0x00, 0xfa, 0xcb, 
-       0x90, 0x03, 0x9c, 0x07, 0x9d, 0x08, 0x88, 0x69, 
-       0x91, 0x04, 0x98, 0x03, 0x99, 0x04, 0x42, 0x88, 
-       0xd0, 0x09, 0x48, 0xbb, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x05, 0x20, 0xff, 0xb0, 0x07, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x78, 0x28, 
-       0x90, 0x05, 0x99, 0x04, 0x23, 0xff, 0x33, 0x01, 
-       0x42, 0x99, 0xdd, 0x02, 0x20, 0xff, 0xb0, 0x07, 
-       0xe7, 0xf1, 0x98, 0x05, 0x99, 0x04, 0x18, 0x40, 
-       0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 0xdd, 0x02, 
-       0x20, 0xff, 0xb0, 0x07, 0xe7, 0xe7, 0x48, 0xad, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x0a, 0x68, 0xa0, 
-       0x23, 0x01, 0x06, 0x1b, 0x40, 0x18, 0xd0, 0x05, 
-       0x68, 0x68, 0x28, 0x00, 0xd1, 0x02, 0x20, 0x8a, 
-       0xb0, 0x07, 0xe7, 0xd8, 0x62, 0x65, 0x69, 0x60, 
-       0x4b, 0xa5, 0x40, 0x18, 0x99, 0x05, 0x06, 0x09, 
-       0x0e, 0x09, 0x04, 0x09, 0x43, 0x08, 0x61, 0x60, 
-       0x02, 0x00, 0x68, 0xe0, 0x90, 0x00, 0x48, 0x9e, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x06, 0x98, 0x00, 
-       0x28, 0x19, 0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 
-       0x20, 0x00, 0xe0, 0x05, 0x98, 0x00, 0x28, 0x08, 
-       0xd3, 0x01, 0x20, 0x01, 0xe0, 0x00, 0x20, 0x00, 
-       0x28, 0x00, 0xd0, 0x02, 0x20, 0x00, 0xb0, 0x07, 
-       0xe7, 0xb5, 0x48, 0x94, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x1e, 0x48, 0x91, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x1a, 0x68, 0xa0, 0x02, 0x00, 0x0e, 0x00, 
-       0x06, 0x01, 0x0e, 0x09, 0x91, 0x06, 0x99, 0x04, 
-       0x29, 0x04, 0xd0, 0x06, 0x29, 0x10, 0xd0, 0x07, 
-       0x23, 0xff, 0x33, 0x01, 0x42, 0x99, 0xd0, 0x06, 
-       0xe0, 0x08, 0x26, 0xff, 0x36, 0x01, 0xe0, 0x07, 
-       0x26, 0x01, 0x02, 0x76, 0xe0, 0x04, 0x26, 0x03, 
-       0x02, 0x36, 0xe0, 0x01, 0x26, 0x00, 0xe7, 0xff, 
-       0x49, 0x84, 0x20, 0x91, 0xf0, 0x0f, 0xff, 0xca, 
-       0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x01, 
-       0xff, 0xb1, 0xe7, 0xf5, 0x98, 0x00, 0x00, 0x80, 
-       0x49, 0x7f, 0x58, 0x08, 0x99, 0x07, 0x42, 0x88, 
-       0xd0, 0x05, 0x20, 0x92, 0x49, 0x7b, 0x60, 0x08, 
-       0x20, 0xff, 0xb0, 0x07, 0xe7, 0x7b, 0x48, 0x77, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x73, 0x48, 0x74, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x6f, 0x98, 0x00, 
-       0xf0, 0x02, 0xfe, 0xd6, 0x28, 0x00, 0xd0, 0x6a, 
-       0xb0, 0x82, 0x49, 0x74, 0x20, 0x91, 0xf0, 0x0f, 
-       0xff, 0xa5, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
-       0xf0, 0x02, 0xff, 0x25, 0x20, 0x92, 0x49, 0x6f, 
-       0x60, 0x08, 0x20, 0x01, 0x49, 0x6e, 0x68, 0x09, 
-       0x60, 0x08, 0x27, 0x00, 0x20, 0x00, 0x90, 0x00, 
-       0x98, 0x00, 0x28, 0x00, 0xd1, 0x15, 0x2f, 0x07, 
-       0xd2, 0x13, 0x6a, 0xe0, 0x05, 0x81, 0x0d, 0x89, 
-       0x1c, 0x38, 0x37, 0x01, 0x00, 0x83, 0x18, 0x18, 
-       0x00, 0xc0, 0x4a, 0x65, 0x68, 0x12, 0x18, 0x80, 
-       0x23, 0x05, 0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 
-       0x42, 0x81, 0xd1, 0x01, 0x20, 0x01, 0x90, 0x00, 
-       0xe7, 0xe6, 0x98, 0x00, 0x28, 0x00, 0xd1, 0x14, 
-       0x2f, 0x18, 0xd2, 0x12, 0x6a, 0xe0, 0x05, 0x81, 
-       0x0d, 0x89, 0x1c, 0x38, 0x37, 0x01, 0x23, 0x4c, 
-       0x43, 0x58, 0x4a, 0x59, 0x68, 0x12, 0x18, 0x80, 
-       0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 0x69, 0x40, 
-       0x42, 0x81, 0xd1, 0x01, 0x20, 0x01, 0x90, 0x00, 
-       0xe7, 0xe7, 0x3f, 0x01, 0x2f, 0x07, 0xd2, 0x10, 
-       0x00, 0xb8, 0x19, 0xc0, 0x00, 0xc0, 0x49, 0x50, 
-       0x68, 0x09, 0x18, 0x40, 0x23, 0x2b, 0x01, 0x5b, 
-       0x18, 0xc0, 0x1c, 0x21, 0xf0, 0x02, 0xfb, 0x38, 
-       0x48, 0x4b, 0x68, 0x00, 0xf0, 0x02, 0xfe, 0xee, 
-       0xe0, 0x46, 0x2f, 0x18, 0xd2, 0x44, 0x20, 0x4c, 
-       0x43, 0x78, 0x49, 0x47, 0x68, 0x09, 0x18, 0x40, 
-       0x38, 0xff, 0x38, 0xff, 0x38, 0x0a, 0x1c, 0x21, 
-       0xf0, 0x02, 0xfb, 0x26, 0x20, 0x4c, 0x43, 0x78, 
-       0x49, 0x41, 0x68, 0x09, 0xe0, 0x00, 0xe0, 0x48, 
-       0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 0x38, 0x82, 
-       0x6f, 0xc0, 0x28, 0x00, 0xd0, 0x17, 0x20, 0x4c, 
-       0x43, 0x78, 0x49, 0x3b, 0x68, 0x09, 0x18, 0x40, 
-       0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 0x68, 0x00, 
-       0x04, 0x00, 0x0c, 0x00, 0xd0, 0x0b, 0x20, 0x4c, 
-       0x43, 0x78, 0x49, 0x35, 0x68, 0x09, 0x18, 0x40, 
-       0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 0x68, 0x00, 
-       0x0c, 0x00, 0x04, 0x00, 0xd1, 0x0a, 0x20, 0x02, 
-       0x21, 0x4c, 0x43, 0x79, 0x4a, 0x2e, 0x68, 0x12, 
-       0x18, 0x89, 0x39, 0xff, 0x39, 0xff, 0x39, 0x82, 
-       0x67, 0x48, 0xe0, 0x09, 0x20, 0x03, 0x21, 0x4c, 
-       0x43, 0x79, 0x4a, 0x29, 0x68, 0x12, 0x18, 0x89, 
-       0x39, 0xff, 0x39, 0xff, 0x39, 0x82, 0x67, 0x48, 
-       0x49, 0x24, 0x20, 0x91, 0xf0, 0x0f, 0xff, 0x06, 
-       0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0x48, 0x22, 
-       0x68, 0x00, 0x90, 0x01, 0x48, 0x21, 0x68, 0x00, 
-       0x49, 0x1f, 0x60, 0x08, 0x98, 0x01, 0x49, 0x1f, 
-       0x60, 0x08, 0x20, 0x92, 0x49, 0x1b, 0x60, 0x08, 
-       0xb0, 0x02, 0x48, 0x15, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x1d, 0x98, 0x00, 0x01, 0x00, 0x4b, 0x1a, 
-       0x18, 0xc1, 0x91, 0x01, 0x1d, 0xe0, 0x30, 0x0d, 
-       0x90, 0x02, 0x98, 0x02, 0x68, 0x00, 0x99, 0x01, 
-       0x60, 0x08, 0x48, 0x0e, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x0d, 0x68, 0x68, 0x08, 0x80, 0x99, 0x06, 
-       0x00, 0x89, 0x4b, 0x12, 0x18, 0xc9, 0x67, 0x08, 
-       0x98, 0x05, 0x43, 0x30, 0x99, 0x06, 0x00, 0x89, 
-       0x4b, 0x0f, 0x18, 0xc9, 0x61, 0x08, 0x20, 0x92, 
-       0x49, 0x06, 0x60, 0x08, 0x20, 0x00, 0xb0, 0x07, 
-       0xe6, 0x91, 0xb0, 0x07, 0xe6, 0x8f, 0x00, 0x00, 
-       0x2e, 0x08, 0x94, 0x84, 0x2e, 0x08, 0x60, 0x84, 
-       0xff, 0x00, 0xff, 0xff, 0x2e, 0x08, 0x7c, 0xc0, 
-       0x2e, 0x08, 0x7c, 0x58, 0x2e, 0x08, 0x94, 0x88, 
-       0x2e, 0x08, 0x7d, 0xb4, 0x2e, 0x08, 0x7d, 0xb8, 
-       0x68, 0x00, 0x0c, 0x00, 0x68, 0x00, 0x0e, 0x00, 
-       0x68, 0x00, 0x0e, 0x80, 0x1c, 0x01, 0x1c, 0x0a, 
-       0x6a, 0x53, 0x1c, 0x18, 0x47, 0x70, 0xe7, 0xfd, 
-       0xb5, 0xf3, 0x1c, 0x0f, 0xb0, 0x82, 0x48, 0x2b, 
-       0x68, 0x00, 0x28, 0x00, 0xd0, 0x05, 0x20, 0x8a, 
-       0xb0, 0x02, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x98, 0x02, 0x90, 0x01, 0x98, 0x01, 
-       0x88, 0x44, 0x98, 0x01, 0x78, 0x06, 0x23, 0xff, 
-       0x33, 0x01, 0x42, 0x9c, 0xdd, 0x02, 0x20, 0xff, 
-       0xb0, 0x02, 0xe7, 0xee, 0x19, 0x30, 0x23, 0xff, 
-       0x33, 0x01, 0x42, 0x98, 0xdd, 0x02, 0x20, 0xff, 
-       0xb0, 0x02, 0xe7, 0xe6, 0x49, 0x1c, 0x20, 0x91, 
-       0xf0, 0x0f, 0xfe, 0x88, 0x28, 0x92, 0xd0, 0x03, 
-       0x20, 0x01, 0xf0, 0x01, 0xfe, 0x6f, 0xe7, 0xf5, 
-       0x2c, 0x10, 0xda, 0x0d, 0x25, 0x00, 0x42, 0xa5, 
-       0xdb, 0x02, 0xe0, 0x08, 0x35, 0x01, 0xe7, 0xfa, 
-       0xcf, 0x01, 0x19, 0x71, 0x00, 0x89, 0x4b, 0x13, 
-       0x18, 0xc9, 0x60, 0x08, 0xe7, 0xf6, 0xe0, 0x15, 
-       0x4a, 0x11, 0x43, 0x22, 0x92, 0x00, 0x20, 0x91, 
-       0x49, 0x10, 0x60, 0x08, 0x00, 0xb0, 0x4b, 0x0d, 
-       0x18, 0xc1, 0x9a, 0x00, 0x1c, 0x38, 0x23, 0x02, 
-       0xf0, 0x00, 0xfa, 0xfe, 0x28, 0x00, 0xd0, 0x00, 
-       0xe7, 0xf4, 0x48, 0x0a, 0x68, 0x00, 0x28, 0x92, 
-       0xd0, 0x00, 0xe7, 0xfa, 0x20, 0x92, 0x49, 0x04, 
-       0x60, 0x08, 0x20, 0x00, 0xb0, 0x02, 0xe7, 0xb0, 
-       0xb0, 0x02, 0xe7, 0xae, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc4, 0x68, 0x00, 0x08, 0x00, 
-       0xf0, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x7c, 0xc8, 
-       0x21, 0x04, 0xe0, 0x00, 0x31, 0x01, 0x1c, 0x08, 
-       0x47, 0x70, 0xe7, 0xfd, 0xb5, 0xf3, 0x1c, 0x0f, 
-       0xb0, 0x82, 0x48, 0x2b, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x05, 0x20, 0x8a, 0xb0, 0x02, 0xb0, 0x02, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x98, 0x02, 
-       0x90, 0x01, 0x98, 0x01, 0x88, 0x44, 0x98, 0x01, 
-       0x78, 0x06, 0x23, 0xff, 0x33, 0x01, 0x42, 0x9c, 
-       0xdd, 0x02, 0x20, 0xff, 0xb0, 0x02, 0xe7, 0xee, 
-       0x19, 0x30, 0x23, 0xff, 0x33, 0x01, 0x42, 0x98, 
-       0xdd, 0x02, 0x20, 0xff, 0xb0, 0x02, 0xe7, 0xe6, 
-       0x49, 0x1c, 0x20, 0x91, 0xf0, 0x0f, 0xfe, 0x1e, 
-       0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x01, 
-       0xfe, 0x05, 0xe7, 0xf5, 0x2c, 0x10, 0xda, 0x0d, 
-       0x25, 0x00, 0x42, 0xa5, 0xdb, 0x02, 0xe0, 0x08, 
-       0x35, 0x01, 0xe7, 0xfa, 0x19, 0x70, 0x00, 0x80, 
-       0x4b, 0x13, 0x18, 0xc0, 0x68, 0x01, 0xc7, 0x02, 
-       0xe7, 0xf6, 0xe0, 0x15, 0x4a, 0x11, 0x43, 0x22, 
-       0x92, 0x00, 0x20, 0x91, 0x49, 0x10, 0x60, 0x08, 
-       0x00, 0xb0, 0x4b, 0x0d, 0x18, 0xc0, 0x9a, 0x00, 
-       0x1c, 0x39, 0x23, 0x02, 0xf0, 0x00, 0xfa, 0x94, 
-       0x28, 0x00, 0xd0, 0x00, 0xe7, 0xf4, 0x48, 0x0a, 
-       0x68, 0x00, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xfa, 
-       0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 0x20, 0x00, 
-       0xb0, 0x02, 0xe7, 0xb0, 0xb0, 0x02, 0xe7, 0xae, 
-       0x2e, 0x08, 0x60, 0x84, 0x2e, 0x08, 0x7c, 0xc4, 
-       0x68, 0x00, 0x08, 0x00, 0xf0, 0x00, 0x00, 0x00, 
-       0x2e, 0x08, 0x7c, 0xc8, 0xb5, 0xf7, 0x9a, 0x02, 
-       0x06, 0x15, 0x0e, 0x2d, 0x9c, 0x00, 0x88, 0x66, 
-       0x42, 0xb5, 0xdd, 0x04, 0x20, 0xff, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x78, 0x20, 
-       0x19, 0x40, 0x06, 0x07, 0x0e, 0x3f, 0x23, 0xff, 
-       0x33, 0x01, 0x42, 0x9f, 0xdd, 0x01, 0x20, 0xff, 
-       0xe7, 0xf1, 0x49, 0x0a, 0x20, 0x91, 0xf0, 0x0f, 
-       0xfd, 0xc5, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
-       0xf0, 0x01, 0xfd, 0xac, 0xe7, 0xf5, 0x99, 0x01, 
-       0x00, 0xb8, 0x4b, 0x05, 0x18, 0xc0, 0x60, 0x01, 
-       0x20, 0x92, 0x49, 0x02, 0x60, 0x08, 0x20, 0x00, 
-       0xe7, 0xdd, 0xe7, 0xdc, 0x2e, 0x08, 0x7c, 0xc4, 
-       0x68, 0x00, 0x08, 0x00, 0xb5, 0xf7, 0x9a, 0x02, 
-       0x06, 0x14, 0x0e, 0x24, 0x9f, 0x00, 0x88, 0x7d, 
-       0x78, 0x38, 0x19, 0x00, 0x06, 0x06, 0x0e, 0x36, 
-       0x42, 0xac, 0xdd, 0x04, 0x20, 0xff, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x49, 0x0b, 
-       0x20, 0x91, 0xf0, 0x0f, 0xfd, 0x9b, 0x28, 0x92, 
-       0xd0, 0x03, 0x20, 0x01, 0xf0, 0x01, 0xfd, 0x82, 
-       0xe7, 0xf5, 0x00, 0xb0, 0x4b, 0x06, 0x18, 0xc0, 
-       0x68, 0x00, 0x99, 0x01, 0x60, 0x08, 0x20, 0x92, 
-       0x49, 0x02, 0x60, 0x08, 0x20, 0x00, 0xe7, 0xe6, 
-       0xe7, 0xe5, 0x00, 0x00, 0x2e, 0x08, 0x7c, 0xc4, 
-       0x68, 0x00, 0x08, 0x00, 0x1c, 0x01, 0x1c, 0x0a, 
-       0x88, 0x50, 0x47, 0x70, 0xe7, 0xfd, 0xb4, 0x80, 
-       0x1c, 0x01, 0x1c, 0x0f, 0x69, 0x3a, 0x2a, 0x08, 
-       0xd2, 0x12, 0xa3, 0x02, 0x5c, 0x9b, 0x00, 0x5b, 
-       0x44, 0x9f, 0x1c, 0x00, 0x04, 0x07, 0x09, 0x0b, 
-       0x04, 0x07, 0x09, 0x0b, 0x20, 0x02, 0xbc, 0x80, 
-       0x47, 0x70, 0x20, 0x04, 0xe7, 0xfb, 0x20, 0x10, 
-       0xe7, 0xf9, 0x20, 0xff, 0x30, 0x01, 0xe7, 0xf6, 
-       0x20, 0x00, 0xe7, 0xf4, 0xe7, 0xf3, 0xb5, 0xf3, 
-       0x98, 0x00, 0x06, 0x05, 0x0e, 0x2d, 0x48, 0x89, 
-       0x68, 0x00, 0x28, 0x00, 0xd1, 0x04, 0x20, 0x8b, 
-       0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x48, 0x85, 0x68, 0x00, 0x28, 0x01, 0xd1, 0x04, 
-       0x2d, 0x17, 0xdd, 0x02, 0x20, 0x8c, 0xe7, 0xf3, 
-       0xe0, 0xfe, 0x2d, 0x07, 0xdd, 0x01, 0x20, 0x8c, 
-       0xe7, 0xee, 0x49, 0x80, 0x20, 0x91, 0xf0, 0x0f, 
-       0xfd, 0x45, 0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 
-       0xf0, 0x01, 0xfd, 0x2c, 0xe7, 0xf5, 0x1c, 0x28, 
-       0xf7, 0xf8, 0xfc, 0xd8, 0x1c, 0x04, 0x2c, 0x00, 
-       0xd0, 0x09, 0x68, 0xa0, 0x4b, 0x78, 0x40, 0x18, 
-       0x99, 0x01, 0x07, 0xc9, 0x09, 0xc9, 0x43, 0x08, 
-       0x60, 0xa0, 0x01, 0xc0, 0xe0, 0x04, 0x20, 0x92, 
-       0x49, 0x72, 0x60, 0x08, 0x20, 0xff, 0xe7, 0xcf, 
-       0x48, 0x6f, 0x68, 0x00, 0x28, 0x00, 0xd1, 0x11, 
-       0x99, 0x01, 0x29, 0x00, 0xd0, 0x06, 0x48, 0x6f, 
-       0x21, 0x01, 0x40, 0xa9, 0x68, 0x02, 0x43, 0x11, 
-       0x60, 0x01, 0xe0, 0x06, 0x48, 0x6b, 0x21, 0x01, 
-       0x40, 0xa9, 0x43, 0xc9, 0x68, 0x02, 0x40, 0x11, 
-       0x60, 0x01, 0xe0, 0xbf, 0x68, 0xe0, 0xf0, 0x02, 
-       0xfc, 0x3b, 0x28, 0x00, 0xd0, 0x73, 0xb0, 0x81, 
-       0x49, 0x65, 0x20, 0x91, 0xf0, 0x0f, 0xfd, 0x0a, 
-       0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 0xf0, 0x02, 
-       0xfc, 0x8a, 0x20, 0x92, 0x49, 0x60, 0x60, 0x08, 
-       0x20, 0x01, 0x49, 0x60, 0x68, 0x09, 0x60, 0x08, 
-       0x27, 0x00, 0x26, 0x00, 0x2e, 0x00, 0xd1, 0x14, 
-       0x2f, 0x07, 0xd2, 0x12, 0x6a, 0xe0, 0x05, 0x81, 
-       0x0d, 0x89, 0x1c, 0x38, 0x37, 0x01, 0x00, 0x83, 
-       0x18, 0x18, 0x00, 0xc0, 0x4a, 0x57, 0x68, 0x12, 
-       0x18, 0x80, 0x23, 0x05, 0x02, 0x1b, 0x18, 0xc0, 
-       0x6f, 0xc0, 0x42, 0x81, 0xd1, 0x00, 0x26, 0x01, 
-       0xe7, 0xe8, 0x2e, 0x00, 0xd1, 0x13, 0x2f, 0x18, 
-       0xd2, 0x11, 0x6a, 0xe0, 0x05, 0x81, 0x0d, 0x89, 
-       0x1c, 0x38, 0x37, 0x01, 0x23, 0x4c, 0x43, 0x58, 
-       0x4a, 0x4c, 0x68, 0x12, 0x18, 0x80, 0x38, 0xff, 
-       0x38, 0xff, 0x38, 0x02, 0x69, 0x40, 0x42, 0x81, 
-       0xd1, 0x00, 0x26, 0x01, 0xe7, 0xe9, 0x3f, 0x01, 
-       0x2f, 0x07, 0xd2, 0x32, 0x99, 0x02, 0x29, 0x00, 
-       0xd0, 0x16, 0x00, 0xb8, 0x19, 0xc0, 0x00, 0xc0, 
-       0x49, 0x42, 0x68, 0x09, 0x18, 0x40, 0x23, 0x05, 
-       0x02, 0x1b, 0x18, 0xc0, 0x6e, 0x80, 0x4b, 0x40, 
-       0x43, 0x18, 0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 
-       0x4a, 0x3c, 0x68, 0x12, 0x18, 0x89, 0x23, 0x05, 
-       0x02, 0x1b, 0x18, 0xc9, 0x66, 0x88, 0xe0, 0x17, 
-       0x00, 0xb8, 0x19, 0xc0, 0x00, 0xc0, 0x49, 0x37, 
-       0x68, 0x09, 0x18, 0x40, 0x23, 0x05, 0x02, 0x1b, 
-       0x18, 0xc0, 0x6e, 0x80, 0x04, 0x00, 0x0c, 0x00, 
-       0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x31, 
-       0x68, 0x12, 0x18, 0x89, 0x23, 0x05, 0x02, 0x1b, 
-       0x18, 0xc9, 0x66, 0x88, 0xe0, 0x00, 0xe0, 0x45, 
-       0xe0, 0x2b, 0x99, 0x02, 0x29, 0x00, 0xd0, 0x14, 
-       0x20, 0x4c, 0x43, 0x78, 0x49, 0x29, 0x68, 0x09, 
-       0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
-       0x68, 0x00, 0x4b, 0x27, 0x43, 0x18, 0x21, 0x4c, 
-       0x43, 0x79, 0x4a, 0x24, 0x68, 0x12, 0x18, 0x89, 
-       0x39, 0xff, 0x39, 0xff, 0x39, 0x02, 0x60, 0x08, 
-       0xe0, 0x13, 0x20, 0x4c, 0x43, 0x78, 0x49, 0x1f, 
-       0x68, 0x09, 0x18, 0x40, 0x38, 0xff, 0x38, 0xff, 
-       0x38, 0x02, 0x68, 0x00, 0x04, 0x00, 0x0c, 0x00, 
-       0x21, 0x4c, 0x43, 0x79, 0x4a, 0x19, 0x68, 0x12, 
-       0x18, 0x89, 0x39, 0xff, 0x39, 0xff, 0x39, 0x02, 
-       0x60, 0x08, 0x48, 0x16, 0x68, 0x00, 0xf0, 0x02, 
-       0xfc, 0x05, 0x49, 0x13, 0x20, 0x91, 0xf0, 0x0f, 
-       0xfc, 0x65, 0x28, 0x92, 0xd0, 0x00, 0xe7, 0xf8, 
-       0x48, 0x10, 0x68, 0x00, 0x90, 0x00, 0x48, 0x11, 
-       0x68, 0x00, 0x49, 0x0e, 0x60, 0x08, 0x98, 0x00, 
-       0x49, 0x0e, 0x60, 0x08, 0x20, 0x92, 0x49, 0x0a, 
-       0x60, 0x08, 0xb0, 0x01, 0x20, 0x92, 0x49, 0x05, 
-       0x60, 0x08, 0x20, 0x00, 0xe6, 0xf4, 0xe6, 0xf3, 
-       0xe6, 0xf2, 0x00, 0x00, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x94, 0x84, 0x2e, 0x08, 0x7c, 0xc4, 
-       0xfe, 0xff, 0xff, 0xff, 0x68, 0x00, 0x00, 0x20, 
-       0x2e, 0x08, 0x94, 0x88, 0x2e, 0x08, 0x7d, 0xb4, 
-       0xff, 0xff, 0x00, 0x00, 0x2e, 0x08, 0x7d, 0xb8, 
-       0xb5, 0xf0, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x26, 
-       0x0e, 0x36, 0x48, 0x0f, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x03, 0x20, 0x8b, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x2e, 0x07, 0xdd, 0x01, 0x20, 0x8c, 
-       0xe7, 0xf8, 0x1c, 0x30, 0xf7, 0xf8, 0xfb, 0xc2, 
-       0x1c, 0x05, 0x2d, 0x00, 0xd0, 0x04, 0x68, 0xa8, 
-       0x01, 0xc0, 0x0f, 0xc0, 0x60, 0x38, 0xe0, 0x04, 
-       0x20, 0x92, 0x49, 0x04, 0x60, 0x08, 0x20, 0xff, 
-       0xe7, 0xe8, 0x20, 0x00, 0xe7, 0xe6, 0xe7, 0xe5, 
-       0x2e, 0x08, 0x60, 0x84, 0x2e, 0x08, 0x7c, 0xc4, 
-       0xb5, 0xb0, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x25, 
-       0x0e, 0x2d, 0x48, 0x20, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x03, 0x20, 0x8b, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x48, 0x1d, 0x68, 0x00, 0x28, 0x01, 
-       0xd1, 0x04, 0x2d, 0x17, 0xdd, 0x02, 0x20, 0x8c, 
-       0xe7, 0xf4, 0xe0, 0x2d, 0x2d, 0x07, 0xdd, 0x01, 
-       0x20, 0x8c, 0xe7, 0xef, 0x48, 0x16, 0x68, 0x00, 
-       0x28, 0x00, 0xd0, 0x01, 0x20, 0xff, 0xe7, 0xe9, 
-       0x49, 0x14, 0x20, 0x91, 0xf0, 0x0f, 0xfb, 0xee, 
-       0x28, 0x92, 0xd0, 0x03, 0x20, 0x01, 0xf0, 0x01, 
-       0xfb, 0xd5, 0xe7, 0xf5, 0x2f, 0x00, 0xd0, 0x08, 
-       0x48, 0x0f, 0x1d, 0xe9, 0x31, 0x01, 0x22, 0x01, 
-       0x40, 0x8a, 0x68, 0x01, 0x43, 0x11, 0x60, 0x01, 
-       0xe0, 0x08, 0x48, 0x0b, 0x1d, 0xea, 0x32, 0x01, 
-       0x21, 0x01, 0x40, 0x91, 0x43, 0xc9, 0x68, 0x02, 
-       0x40, 0x11, 0x60, 0x01, 0x20, 0x92, 0x49, 0x05, 
-       0x60, 0x08, 0x20, 0x00, 0xe7, 0xc6, 0xe7, 0xc5, 
-       0xe7, 0xc4, 0x00, 0x00, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x94, 0x84, 0x2e, 0x08, 0x7c, 0xc4, 
-       0x68, 0x00, 0x00, 0x20, 0xb4, 0x90, 0x1c, 0x07, 
-       0x1c, 0x0a, 0x06, 0x39, 0x0e, 0x09, 0x48, 0x10, 
-       0x68, 0x00, 0x28, 0x00, 0xd1, 0x02, 0x20, 0x8b, 
-       0xbc, 0x90, 0x47, 0x70, 0x29, 0x07, 0xdd, 0x01, 
-       0x20, 0x8c, 0xe7, 0xf9, 0x48, 0x0b, 0x68, 0x00, 
-       0x28, 0x00, 0xd0, 0x01, 0x20, 0xff, 0xe7, 0xf3, 
-       0x1d, 0xc8, 0x30, 0x01, 0x24, 0x01, 0x40, 0x84, 
-       0x1c, 0x23, 0x20, 0x0d, 0x06, 0xc0, 0x6a, 0x00, 
-       0x40, 0x18, 0x1d, 0xcc, 0x34, 0x01, 0x40, 0xe0, 
-       0x60, 0x10, 0x20, 0x00, 0xe7, 0xe4, 0xe7, 0xe3, 
-       0x2e, 0x08, 0x60, 0x84, 0x2e, 0x08, 0x94, 0x84, 
-       0xb5, 0xb0, 0x1c, 0x04, 0x1c, 0x0f, 0x06, 0x25, 
-       0x0e, 0x2d, 0x48, 0x13, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x03, 0x20, 0x8b, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x2d, 0x07, 0xdd, 0x01, 0x20, 0x8c, 
-       0xe7, 0xf8, 0x48, 0x0e, 0x68, 0x00, 0x28, 0x00, 
-       0xd0, 0x01, 0x20, 0xff, 0xe7, 0xf2, 0x49, 0x0c, 
-       0x20, 0x91, 0xf0, 0x0f, 0xfb, 0x7f, 0x28, 0x92, 
-       0xd0, 0x03, 0x20, 0x01, 0xf0, 0x01, 0xfb, 0x66, 
-       0xe7, 0xf5, 0x08, 0xb8, 0x00, 0xa9, 0x4b, 0x07, 
-       0x18, 0xc9, 0x67, 0x08, 0x20, 0x92, 0x49, 0x04, 
-       0x60, 0x08, 0x20, 0x00, 0xe7, 0xde, 0xe7, 0xdd, 
-       0x2e, 0x08, 0x60, 0x84, 0x2e, 0x08, 0x94, 0x84, 
-       0x2e, 0x08, 0x7c, 0xc4, 0x68, 0x00, 0x0e, 0x00, 
-       0xb4, 0xf0, 0x1c, 0x05, 0x1c, 0x0c, 0x1c, 0x17, 
-       0x1c, 0x1e, 0x04, 0x3f, 0x0c, 0x3f, 0x1c, 0x39, 
-       0x29, 0x00, 0xd8, 0x02, 0xe0, 0x04, 0x39, 0x01, 
-       0xe7, 0xfa, 0xcd, 0x04, 0xc4, 0x04, 0xe7, 0xfa, 
-       0x20, 0x92, 0x4a, 0x03, 0x60, 0x10, 0x20, 0x00, 
-       0xbc, 0xf0, 0x47, 0x70, 0xe7, 0xfc, 0x00, 0x00, 
-       0x2e, 0x08, 0x7c, 0xc8, 0x20, 0x00, 0x6b, 0x00, 
-       0x49, 0x63, 0x60, 0x08, 0x20, 0x00, 0x6b, 0x40, 
-       0x49, 0x62, 0x60, 0x08, 0x48, 0x62, 0x49, 0x63, 
-       0x60, 0x08, 0x48, 0x63, 0x49, 0x63, 0x60, 0x08, 
-       0x20, 0x00, 0x6a, 0xc0, 0x49, 0x62, 0x60, 0x08, 
-       0x48, 0x62, 0x49, 0x63, 0x60, 0x08, 0x48, 0x63, 
-       0x49, 0x63, 0x60, 0x08, 0x48, 0x63, 0x49, 0x64, 
-       0x60, 0x08, 0x20, 0x00, 0x6b, 0x80, 0x49, 0x63, 
-       0x60, 0x08, 0x20, 0x00, 0x6b, 0xc0, 0x49, 0x62, 
-       0x60, 0x08, 0x20, 0x00, 0x6c, 0x00, 0x49, 0x61, 
-       0x60, 0x08, 0x20, 0x00, 0x6c, 0x40, 0x49, 0x60, 
-       0x60, 0x08, 0x20, 0x00, 0x6c, 0x80, 0x49, 0x5f, 
-       0x60, 0x08, 0x20, 0x00, 0x6c, 0xc0, 0x49, 0x5e, 
-       0x60, 0x08, 0x20, 0x00, 0x6e, 0xc0, 0x49, 0x5d, 
-       0x60, 0x08, 0x20, 0x80, 0x6d, 0x00, 0x49, 0x5c, 
-       0x60, 0x08, 0x20, 0x80, 0x6d, 0x40, 0x49, 0x5b, 
-       0x60, 0x08, 0x20, 0x80, 0x6d, 0x80, 0x49, 0x5a, 
-       0x60, 0x08, 0x20, 0x00, 0x6d, 0x00, 0x49, 0x59, 
-       0x60, 0x08, 0x20, 0x00, 0x6d, 0x40, 0x49, 0x58, 
-       0x60, 0x08, 0x20, 0x00, 0x6d, 0x80, 0x49, 0x57, 
-       0x60, 0x08, 0x20, 0x00, 0x6d, 0xc0, 0x49, 0x56, 
-       0x60, 0x08, 0x20, 0x80, 0x6a, 0xc0, 0x49, 0x55, 
-       0x60, 0x08, 0x20, 0x80, 0x6d, 0xc0, 0x49, 0x54, 
-       0x60, 0x08, 0x20, 0x80, 0x6c, 0xc0, 0x49, 0x53, 
-       0x60, 0x08, 0x20, 0x80, 0x68, 0x40, 0x49, 0x52, 
-       0x60, 0x08, 0x20, 0x80, 0x68, 0x80, 0x49, 0x51, 
-       0x60, 0x08, 0x20, 0x80, 0x68, 0xc0, 0x49, 0x50, 
-       0x60, 0x08, 0x20, 0x80, 0x69, 0x00, 0x49, 0x4f, 
-       0x60, 0x08, 0x20, 0x80, 0x69, 0x40, 0x49, 0x4e, 
-       0x60, 0x08, 0x20, 0x80, 0x69, 0x80, 0x49, 0x4d, 
-       0x60, 0x08, 0x20, 0x80, 0x69, 0xc0, 0x49, 0x4c, 
-       0x60, 0x08, 0x20, 0x80, 0x6a, 0x00, 0x49, 0x4b, 
-       0x60, 0x08, 0x20, 0x80, 0x6a, 0x40, 0x49, 0x4a, 
-       0x60, 0x08, 0x20, 0x80, 0x6a, 0x80, 0x49, 0x49, 
-       0x60, 0x08, 0x20, 0x00, 0x6f, 0x00, 0x49, 0x48, 
-       0x60, 0x08, 0x20, 0x00, 0x6f, 0x40, 0x49, 0x47, 
-       0x60, 0x08, 0x20, 0x80, 0x6c, 0x40, 0x49, 0x46, 
-       0x60, 0x08, 0x20, 0x80, 0x6c, 0x80, 0x49, 0x45, 
-       0x60, 0x08, 0x20, 0x80, 0x6e, 0x40, 0x49, 0x44, 
-       0x60, 0x08, 0x20, 0x80, 0x6e, 0x80, 0x49, 0x43, 
-       0x60, 0x08, 0x20, 0x00, 0x49, 0x42, 0x60, 0x08, 
-       0x20, 0x00, 0x49, 0x41, 0x60, 0x48, 0x48, 0x41, 
-       0x49, 0x3f, 0x60, 0x88, 0x48, 0x40, 0x49, 0x3e, 
-       0x60, 0xc8, 0x20, 0xff, 0x30, 0x01, 0x68, 0x40, 
-       0x49, 0x3e, 0x60, 0x08, 0x20, 0x80, 0x6e, 0xc0, 
-       0x49, 0x3d, 0x60, 0x08, 0x20, 0x80, 0x6f, 0x00, 
-       0x49, 0x3c, 0x60, 0x08, 0x20, 0x80, 0x6f, 0x40, 
-       0x49, 0x3b, 0x60, 0x08, 0x20, 0x80, 0x6f, 0x80, 
-       0x49, 0x3a, 0x60, 0x08, 0x20, 0x80, 0x6f, 0xc0, 
-       0x49, 0x39, 0x60, 0x08, 0x20, 0xff, 0x30, 0x01, 
-       0x68, 0x80, 0x49, 0x38, 0x60, 0x08, 0x47, 0x70, 
-       0x2e, 0x08, 0x5d, 0xbc, 0x2e, 0x08, 0x5d, 0xc0, 
-       0x64, 0x00, 0x05, 0x00, 0x2e, 0x08, 0x5d, 0xc8, 
-       0x64, 0x00, 0x00, 0x80, 0x2e, 0x08, 0x5d, 0xcc, 
-       0x2e, 0x08, 0x5d, 0xc4, 0x64, 0x00, 0x04, 0x00, 
-       0x2e, 0x08, 0x5d, 0xd0, 0x9e, 0x00, 0x00, 0x00, 
-       0x2e, 0x08, 0x5d, 0xe8, 0x9e, 0x00, 0x05, 0x00, 
-       0x2e, 0x08, 0x5d, 0xd4, 0x2e, 0x08, 0x94, 0x9c, 
-       0x2e, 0x08, 0x94, 0xa0, 0x2e, 0x08, 0x94, 0xa4, 
-       0x2e, 0x08, 0x94, 0xa8, 0x2e, 0x08, 0x5d, 0xd8, 
-       0x2e, 0x08, 0x5d, 0xdc, 0x2e, 0x08, 0x5d, 0xec, 
-       0x2e, 0x08, 0x5d, 0xf0, 0x2e, 0x08, 0x5d, 0xf4, 
-       0x2e, 0x08, 0x5d, 0xf8, 0x2e, 0x08, 0x5d, 0xe0, 
-       0x2e, 0x08, 0x5d, 0xe4, 0x2e, 0x08, 0x60, 0x6c, 
-       0x2e, 0x08, 0x60, 0x70, 0x2e, 0x08, 0x5d, 0xfc, 
-       0x2e, 0x08, 0x5e, 0x00, 0x2e, 0x08, 0x5e, 0x2c, 
-       0x2e, 0x08, 0x5e, 0x04, 0x2e, 0x08, 0x5e, 0x08, 
-       0x2e, 0x08, 0x5e, 0x0c, 0x2e, 0x08, 0x5e, 0x10, 
-       0x2e, 0x08, 0x5e, 0x14, 0x2e, 0x08, 0x5e, 0x18, 
-       0x2e, 0x08, 0x5e, 0x1c, 0x2e, 0x08, 0x5e, 0x20, 
-       0x2e, 0x08, 0x5e, 0x24, 0x2e, 0x08, 0x5e, 0x28, 
-       0x2e, 0x08, 0x5d, 0xb0, 0x2e, 0x08, 0x5d, 0xb4, 
-       0x2e, 0x08, 0x7c, 0x44, 0x2e, 0x08, 0x5e, 0x54, 
-       0x2e, 0x08, 0x5e, 0x34, 0x2e, 0x08, 0x60, 0x74, 
-       0x2e, 0x08, 0x7c, 0x1c, 0xcc, 0x1f, 0xe0, 0x00, 
-       0xcc, 0x1f, 0xfe, 0x00, 0x2e, 0x08, 0x5e, 0x40, 
-       0x2e, 0x08, 0x5e, 0x58, 0x2e, 0x08, 0x5e, 0x38, 
-       0x2e, 0x08, 0x5e, 0x3c, 0x2e, 0x08, 0x7c, 0x40, 
-       0x2e, 0x08, 0x7c, 0x18, 0x2e, 0x08, 0x5e, 0x48, 
-       0x49, 0x4f, 0x68, 0x0a, 0x23, 0x04, 0x43, 0x1a, 
-       0x60, 0x0a, 0x21, 0xff, 0x4a, 0x4d, 0x68, 0x12, 
-       0x32, 0x40, 0x72, 0x11, 0x21, 0xff, 0x4a, 0x4b, 
-       0x68, 0x12, 0x32, 0x40, 0x76, 0x11, 0x21, 0xff, 
-       0x4a, 0x48, 0x68, 0x12, 0x32, 0x60, 0x72, 0x11, 
-       0x21, 0xff, 0x4a, 0x46, 0x68, 0x12, 0x32, 0x20, 
-       0x72, 0x11, 0x21, 0xff, 0x4a, 0x43, 0x68, 0x12, 
-       0x32, 0x20, 0x76, 0x11, 0x21, 0xff, 0x4a, 0x41, 
-       0x68, 0x12, 0x32, 0x60, 0x76, 0x11, 0x21, 0x00, 
-       0x4a, 0x3e, 0x68, 0x12, 0x32, 0x40, 0x72, 0x91, 
-       0x21, 0x00, 0x4a, 0x3c, 0x68, 0x12, 0x32, 0x40, 
-       0x76, 0x91, 0x21, 0x00, 0x4a, 0x39, 0x68, 0x12, 
-       0x32, 0x60, 0x72, 0x91, 0x21, 0x00, 0x4a, 0x37, 
-       0x68, 0x12, 0x32, 0x20, 0x72, 0x91, 0x21, 0x00, 
-       0x4a, 0x34, 0x68, 0x12, 0x32, 0x20, 0x76, 0x91, 
-       0x21, 0x00, 0x4a, 0x32, 0x68, 0x12, 0x32, 0x60, 
-       0x76, 0x91, 0x21, 0x00, 0x4a, 0x2f, 0x68, 0x12, 
-       0x32, 0x80, 0x70, 0xd1, 0x21, 0x00, 0x4a, 0x2d, 
-       0x68, 0x12, 0x32, 0x80, 0x70, 0x51, 0x21, 0x00, 
-       0x4a, 0x2a, 0x68, 0x12, 0x32, 0x80, 0x70, 0x91, 
-       0x21, 0x00, 0x4a, 0x29, 0x60, 0x11, 0x21, 0x00, 
-       0x4a, 0x28, 0x64, 0x11, 0x21, 0x03, 0x4a, 0x28, 
-       0x61, 0x11, 0x49, 0x28, 0x68, 0x0a, 0x4b, 0x28, 
-       0x43, 0x1a, 0x60, 0x0a, 0x49, 0x26, 0x22, 0x33, 
-       0x06, 0x52, 0x60, 0x51, 0x21, 0x00, 0x4a, 0x25, 
-       0x70, 0x11, 0x21, 0x00, 0x4a, 0x23, 0x70, 0x51, 
-       0x21, 0x00, 0x4a, 0x22, 0x70, 0x91, 0x21, 0x00, 
-       0x4a, 0x20, 0x70, 0xd1, 0x21, 0x00, 0x4a, 0x1f, 
-       0x71, 0x11, 0x21, 0x00, 0x4a, 0x1d, 0x71, 0x51, 
-       0x21, 0x00, 0x4a, 0x1c, 0x71, 0x91, 0x21, 0x00, 
-       0x4a, 0x1a, 0x71, 0xd1, 0x21, 0x00, 0x4a, 0x19, 
-       0x72, 0x11, 0x21, 0x00, 0x4a, 0x17, 0x72, 0x51, 
-       0x21, 0x00, 0x4a, 0x16, 0x72, 0x91, 0x21, 0x00, 
-       0x4a, 0x14, 0x72, 0xd1, 0x21, 0x00, 0x4a, 0x13, 
-       0x73, 0x11, 0x21, 0xff, 0x4a, 0x11, 0x70, 0x11, 
-       0x21, 0x00, 0x4a, 0x10, 0x70, 0x11, 0x21, 0x00, 
-       0x4a, 0x0e, 0x70, 0x51, 0x20, 0x00, 0x28, 0x20, 
-       0xdb, 0x04, 0xe0, 0x08, 0x1c, 0x41, 0x06, 0x08, 
-       0x0e, 0x00, 0xe7, 0xf8, 0x21, 0xff, 0x4a, 0x03, 
-       0x68, 0x12, 0x54, 0x11, 0xe7, 0xf6, 0x47, 0x70, 
-       0x66, 0x00, 0x01, 0x18, 0x2e, 0x08, 0x7c, 0x44, 
-       0x9e, 0x00, 0x0a, 0x00, 0x9e, 0x00, 0x0a, 0x80, 
-       0x66, 0x00, 0x01, 0x00, 0x66, 0x00, 0x00, 0x08, 
-       0x23, 0x48, 0x00, 0x00, 0x2e, 0x08, 0x7c, 0x48, 
-       0xb4, 0x80, 0x1c, 0x07, 0x1c, 0x0a, 0x06, 0x39, 
-       0x0e, 0x09, 0x29, 0x05, 0xd2, 0x40, 0xa3, 0x02, 
-       0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x03, 0x14, 0x07, 0x0d, 0x13, 0x00, 0x78, 0x10, 
-       0x4b, 0x1f, 0x70, 0x18, 0xe0, 0x38, 0x78, 0x50, 
-       0x4b, 0x1e, 0x68, 0x1b, 0x33, 0x80, 0x71, 0x58, 
-       0xe0, 0x32, 0x78, 0x10, 0x4b, 0x1b, 0x68, 0x1b, 
-       0x33, 0x80, 0x71, 0x18, 0xe0, 0x2c, 0xe0, 0x2b, 
-       0x78, 0x10, 0x4b, 0x17, 0x70, 0x18, 0x78, 0x50, 
-       0x4b, 0x15, 0x70, 0x58, 0x78, 0x90, 0x4b, 0x14, 
-       0x70, 0x98, 0x78, 0xd0, 0x4b, 0x12, 0x70, 0xd8, 
-       0x79, 0x10, 0x4b, 0x11, 0x71, 0x18, 0x79, 0x50, 
-       0x4b, 0x0f, 0x71, 0x58, 0x79, 0x90, 0x4b, 0x0e, 
-       0x71, 0x98, 0x79, 0xd0, 0x4b, 0x0c, 0x71, 0xd8, 
-       0x7a, 0x10, 0x4b, 0x0b, 0x72, 0x18, 0x7a, 0x50, 
-       0x4b, 0x09, 0x72, 0x58, 0x7a, 0x90, 0x4b, 0x08, 
-       0x72, 0x98, 0x7a, 0xd0, 0x4b, 0x06, 0x72, 0xd8, 
-       0x7b, 0x10, 0x4b, 0x05, 0x73, 0x18, 0xe0, 0x03, 
-       0x20, 0x4a, 0xbc, 0x80, 0x47, 0x70, 0xe7, 0xff, 
-       0x20, 0x00, 0xe7, 0xfa, 0xe7, 0xf9, 0x00, 0x00, 
-       0x2e, 0x08, 0x7c, 0x48, 0x2e, 0x08, 0x7c, 0x44, 
-       0xb5, 0xf3, 0x1c, 0x07, 0x06, 0x3e, 0x0e, 0x36, 
-       0x99, 0x01, 0x06, 0x0c, 0x0e, 0x24, 0x2e, 0x20, 
-       0xdb, 0x04, 0x20, 0xa2, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2c, 0x02, 0xd0, 0x03, 
-       0x2c, 0x03, 0xd0, 0x01, 0x2c, 0x04, 0xd1, 0x0b, 
-       0x48, 0xb8, 0x68, 0x00, 0x30, 0x20, 0x7a, 0x80, 
-       0x28, 0x00, 0xd1, 0x39, 0x48, 0xb5, 0x68, 0x00, 
-       0x30, 0x20, 0x7e, 0x80, 0x28, 0x00, 0xd1, 0x33, 
-       0x2c, 0x00, 0xd1, 0x17, 0x48, 0xb1, 0x68, 0x00, 
-       0x30, 0x40, 0x7a, 0x80, 0x28, 0x00, 0xd1, 0x2b, 
-       0x48, 0xae, 0x68, 0x00, 0x30, 0x40, 0x7e, 0x80, 
-       0x28, 0x00, 0xd1, 0x25, 0x48, 0xab, 0x68, 0x00, 
-       0x30, 0x60, 0x7a, 0x80, 0x28, 0x00, 0xd1, 0x1f, 
-       0x48, 0xa8, 0x68, 0x00, 0x30, 0x20, 0x7e, 0x80, 
-       0x28, 0x00, 0xd1, 0x19, 0x2c, 0x01, 0xd1, 0x19, 
-       0x48, 0xa4, 0x68, 0x00, 0x30, 0x40, 0x7a, 0x80, 
-       0x28, 0x00, 0xd1, 0x11, 0x48, 0xa1, 0x68, 0x00, 
-       0x30, 0x40, 0x7e, 0x80, 0x28, 0x00, 0xd1, 0x0b, 
-       0x48, 0x9e, 0x68, 0x00, 0x30, 0x60, 0x7a, 0x80, 
-       0x28, 0x00, 0xd1, 0x05, 0x48, 0x9b, 0x68, 0x00, 
-       0x30, 0x20, 0x7a, 0x80, 0x28, 0x00, 0xd0, 0x01, 
-       0x20, 0x49, 0xe7, 0xb3, 0x48, 0x97, 0x68, 0x00, 
-       0x55, 0x84, 0x2c, 0xff, 0xd0, 0x73, 0x20, 0x01, 
-       0x49, 0x95, 0x60, 0x48, 0x2c, 0x05, 0xd2, 0x6f, 
-       0xa3, 0x01, 0x5d, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 
-       0x02, 0x34, 0x30, 0x30, 0x30, 0x00, 0x20, 0x02, 
-       0x49, 0x90, 0x61, 0x88, 0x48, 0x90, 0x6a, 0xc0, 
-       0x49, 0x90, 0x60, 0x08, 0x48, 0x90, 0x68, 0x01, 
-       0x23, 0x01, 0x07, 0x5b, 0x43, 0x19, 0x60, 0x01, 
-       0x48, 0x8e, 0x49, 0x8b, 0x62, 0xc8, 0x48, 0x8c, 
-       0x68, 0x01, 0x4b, 0x8d, 0x40, 0x19, 0x60, 0x01, 
-       0x20, 0x01, 0x21, 0x31, 0x06, 0x49, 0x61, 0x88, 
-       0x20, 0x15, 0x21, 0x31, 0x06, 0x49, 0x61, 0x08, 
-       0x20, 0x0f, 0x21, 0x31, 0x06, 0x49, 0x61, 0xc8, 
-       0x20, 0x0c, 0x21, 0x31, 0x06, 0x49, 0x61, 0xc8, 
-       0x20, 0x54, 0x21, 0x31, 0x06, 0x49, 0x62, 0xc8, 
-       0x20, 0x37, 0x21, 0x31, 0x06, 0x49, 0x60, 0x88, 
-       0xe0, 0x56, 0x20, 0x00, 0x49, 0x79, 0x61, 0x88, 
-       0xe0, 0x52, 0x20, 0x01, 0x49, 0x77, 0x61, 0x88, 
-       0x20, 0x01, 0x49, 0x7c, 0x62, 0x88, 0x48, 0x7c, 
-       0x78, 0x00, 0x06, 0x80, 0x0e, 0x80, 0x02, 0x80, 
-       0x49, 0x79, 0x78, 0x49, 0x07, 0xc9, 0x0d, 0x89, 
-       0x43, 0x08, 0x49, 0x77, 0x78, 0x89, 0x07, 0xc9, 
-       0x0d, 0xc9, 0x43, 0x08, 0x49, 0x74, 0x78, 0xc9, 
-       0x07, 0x89, 0x0f, 0x89, 0x01, 0x89, 0x43, 0x08, 
-       0x49, 0x71, 0x79, 0x09, 0x07, 0x89, 0x0f, 0x89, 
-       0x01, 0x09, 0x43, 0x08, 0x49, 0x6e, 0x79, 0x49, 
-       0x07, 0x89, 0x0f, 0x89, 0x00, 0x89, 0x43, 0x08, 
-       0x49, 0x6b, 0x79, 0x89, 0x07, 0x89, 0x0f, 0x89, 
-       0x43, 0x08, 0x49, 0x68, 0x62, 0x08, 0x48, 0x68, 
-       0x79, 0xc0, 0x07, 0xc0, 0x0e, 0x40, 0x49, 0x66, 
-       0x7a, 0x09, 0x07, 0xc9, 0xe0, 0x01, 0xe0, 0x21, 
-       0xe0, 0x18, 0x0e, 0xc9, 0x43, 0x08, 0x49, 0x62, 
-       0x7a, 0x49, 0x07, 0xc9, 0x0f, 0x09, 0x43, 0x08, 
-       0x49, 0x5f, 0x7a, 0x89, 0x07, 0xc9, 0x0f, 0x49, 
-       0x43, 0x08, 0x49, 0x5d, 0x7a, 0xc9, 0x07, 0xc9, 
-       0x0f, 0x89, 0x43, 0x08, 0x49, 0x5a, 0x7b, 0x09, 
-       0x07, 0xc9, 0x0f, 0xc9, 0x43, 0x08, 0x49, 0x57, 
-       0x62, 0x48, 0xe0, 0x01, 0x20, 0x4a, 0xe7, 0x1d, 
-       0x48, 0x51, 0x68, 0x01, 0x4b, 0x55, 0x40, 0x19, 
-       0x60, 0x01, 0xe0, 0x8f, 0x48, 0x49, 0x68, 0x00, 
-       0x30, 0x80, 0x78, 0xc0, 0x28, 0x00, 0xd0, 0x08, 
-       0x22, 0x00, 0xb4, 0x04, 0x1c, 0x30, 0x23, 0x00, 
-       0x22, 0x00, 0x49, 0x4f, 0xf7, 0xf4, 0xfc, 0x10, 
-       0xb0, 0x01, 0x20, 0x00, 0x49, 0x42, 0x60, 0x48, 
-       0x48, 0x45, 0x68, 0x01, 0x4b, 0x4b, 0x43, 0x19, 
-       0x60, 0x01, 0x48, 0x4a, 0x21, 0x33, 0x06, 0x49, 
-       0x60, 0x48, 0x48, 0x49, 0x68, 0x01, 0x23, 0x04, 
-       0x43, 0x19, 0x60, 0x01, 0x2c, 0x00, 0xd1, 0x0e, 
-       0x48, 0x3c, 0x68, 0x00, 0x28, 0x00, 0xd0, 0x0a, 
-       0x48, 0x3a, 0x68, 0x00, 0x49, 0x38, 0x62, 0xc8, 
-       0x20, 0x00, 0x49, 0x38, 0x60, 0x08, 0x20, 0x00, 
-       0x21, 0x31, 0x06, 0x49, 0x61, 0x88, 0x20, 0x00, 
-       0x49, 0x30, 0x68, 0x09, 0x31, 0x80, 0x70, 0x48, 
-       0x20, 0x00, 0x49, 0x2e, 0x68, 0x09, 0x31, 0x80, 
-       0x70, 0x88, 0x20, 0x00, 0x49, 0x39, 0x60, 0x08, 
-       0x20, 0x00, 0x49, 0x39, 0x64, 0x08, 0x20, 0x03, 
-       0x49, 0x2a, 0x61, 0x08, 0x25, 0x00, 0x2d, 0x20, 
-       0xd3, 0x02, 0xe0, 0x06, 0x35, 0x01, 0xe7, 0xfa, 
-       0x20, 0xff, 0x49, 0x24, 0x68, 0x09, 0x55, 0x48, 
-       0xe7, 0xf8, 0x20, 0xff, 0x49, 0x21, 0x68, 0x09, 
-       0x31, 0x40, 0x72, 0x08, 0x20, 0xff, 0x49, 0x1f, 
-       0x68, 0x09, 0x31, 0x40, 0x76, 0x08, 0x20, 0xff, 
-       0x49, 0x1c, 0x68, 0x09, 0x31, 0x60, 0x72, 0x08, 
-       0x20, 0xff, 0x49, 0x1a, 0x68, 0x09, 0x31, 0x20, 
-       0x72, 0x08, 0x20, 0xff, 0x49, 0x17, 0x68, 0x09, 
-       0x31, 0x20, 0x76, 0x08, 0x20, 0xff, 0x49, 0x15, 
-       0x68, 0x09, 0x31, 0x60, 0x76, 0x08, 0x20, 0x00, 
-       0x49, 0x12, 0x68, 0x09, 0x31, 0x40, 0x72, 0x88, 
-       0x20, 0x00, 0x49, 0x10, 0x68, 0x09, 0x31, 0x40, 
-       0x76, 0x88, 0x20, 0x00, 0x49, 0x0d, 0x68, 0x09, 
-       0x31, 0x60, 0x72, 0x88, 0x20, 0x00, 0x49, 0x0b, 
-       0x68, 0x09, 0x31, 0x20, 0x72, 0x88, 0x20, 0x00, 
-       0x49, 0x08, 0x68, 0x09, 0x31, 0x20, 0x76, 0x88, 
-       0x20, 0x00, 0x49, 0x06, 0x68, 0x09, 0x31, 0x60, 
-       0x76, 0x88, 0x20, 0x00, 0x49, 0x03, 0x68, 0x09, 
-       0x31, 0x80, 0x70, 0xc8, 0x20, 0x00, 0xe6, 0x85, 
-       0xe6, 0x84, 0x00, 0x00, 0x2e, 0x08, 0x7c, 0x44, 
-       0x62, 0x00, 0x03, 0x00, 0x66, 0x00, 0x01, 0x00, 
-       0xa0, 0x00, 0x0d, 0x80, 0x2e, 0x08, 0x20, 0x08, 
-       0x66, 0x00, 0x00, 0x08, 0x2e, 0x01, 0x8b, 0xa8, 
-       0xdf, 0xff, 0xff, 0xff, 0x62, 0x01, 0x00, 0x00, 
-       0x2e, 0x08, 0x7c, 0x48, 0xfc, 0xb7, 0xff, 0xff, 
-       0x00, 0x00, 0xff, 0xff, 0x23, 0x48, 0x00, 0x00, 
-       0x66, 0x00, 0x01, 0x18, 0x9e, 0x00, 0x0a, 0x00, 
-       0x9e, 0x00, 0x0a, 0x80, 0xb5, 0xf7, 0x1c, 0x17, 
-       0x98, 0x00, 0x06, 0x02, 0x0e, 0x12, 0x99, 0x01, 
-       0x06, 0x0d, 0x0e, 0x2d, 0x48, 0x6a, 0x68, 0x00, 
-       0x5c, 0x81, 0x2a, 0x20, 0xdb, 0x04, 0x20, 0xa2, 
-       0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x29, 0xff, 0xd1, 0x01, 0x20, 0x4b, 0xe7, 0xf7, 
-       0x48, 0x64, 0x69, 0x80, 0x28, 0x00, 0xd1, 0x03, 
-       0x29, 0x04, 0xd1, 0x01, 0x20, 0x58, 0xe7, 0xef, 
-       0x48, 0x60, 0x69, 0x80, 0x28, 0x00, 0xd1, 0x03, 
-       0x29, 0x02, 0xd0, 0x01, 0x29, 0x03, 0xd1, 0x0b, 
-       0x48, 0x5c, 0x69, 0x80, 0x28, 0x02, 0xd1, 0x01, 
-       0x29, 0x00, 0xd1, 0x05, 0x48, 0x59, 0x69, 0x80, 
-       0x28, 0x01, 0xd1, 0x03, 0x29, 0x01, 0xd0, 0x01, 
-       0x20, 0x4d, 0xe7, 0xd9, 0x29, 0x02, 0xd1, 0x05, 
-       0x48, 0x53, 0x68, 0x00, 0x30, 0x40, 0x7a, 0x80, 
-       0x28, 0x00, 0xd1, 0x17, 0x29, 0x03, 0xd1, 0x05, 
-       0x48, 0x4f, 0x68, 0x00, 0x30, 0x40, 0x7e, 0x80, 
-       0x28, 0x00, 0xd1, 0x0f, 0x29, 0x00, 0xd1, 0x05, 
-       0x48, 0x4b, 0x68, 0x00, 0x30, 0x20, 0x7a, 0x80, 
-       0x28, 0x00, 0xd1, 0x07, 0x29, 0x01, 0xd1, 0x07, 
-       0x48, 0x47, 0x68, 0x00, 0x30, 0x20, 0x7e, 0x80, 
-       0x28, 0x00, 0xd0, 0x01, 0x20, 0x4e, 0xe7, 0xb7, 
-       0x68, 0x78, 0x28, 0x00, 0xd1, 0x01, 0x20, 0x4c, 
-       0xe7, 0xb2, 0x23, 0x01, 0x01, 0x08, 0x4e, 0x40, 
-       0x68, 0x36, 0x19, 0x80, 0x30, 0x20, 0x72, 0x83, 
-       0x2d, 0x01, 0xd1, 0x0b, 0x20, 0x33, 0x06, 0x40, 
-       0x6e, 0x40, 0x23, 0x0d, 0x06, 0x9b, 0x1a, 0xc0, 
-       0x00, 0xd3, 0x4e, 0x3b, 0x68, 0x36, 0x19, 0x9b, 
-       0x60, 0x58, 0xe0, 0x12, 0x2d, 0x02, 0xd1, 0x0a, 
-       0x48, 0x38, 0x6c, 0xc0, 0x23, 0x0d, 0x06, 0x9b, 
-       0x1a, 0xc3, 0x00, 0xd0, 0x4e, 0x34, 0x68, 0x36, 
-       0x19, 0x80, 0x60, 0x43, 0xe0, 0x05, 0x68, 0x3b, 
-       0x00, 0xd0, 0x4e, 0x31, 0x68, 0x36, 0x19, 0x80, 
-       0x60, 0x43, 0x68, 0x3b, 0x01, 0x08, 0x4e, 0x2c, 
-       0x68, 0x36, 0x19, 0x80, 0x62, 0x03, 0x68, 0x7b, 
-       0x01, 0x08, 0x4e, 0x29, 0x68, 0x36, 0x19, 0x80, 
-       0x62, 0x43, 0x01, 0x08, 0x4b, 0x26, 0x68, 0x1b, 
-       0x18, 0xc0, 0x62, 0xc7, 0x01, 0x08, 0x4b, 0x24, 
-       0x68, 0x1b, 0x18, 0xc0, 0x30, 0x20, 0x72, 0x45, 
-       0x01, 0x08, 0x4b, 0x21, 0x68, 0x1b, 0x18, 0xc0, 
-       0x30, 0x20, 0x72, 0x02, 0x20, 0x00, 0x60, 0x78, 
-       0x20, 0x00, 0x72, 0x78, 0x20, 0x00, 0x4b, 0x20, 
-       0x60, 0x18, 0x20, 0x00, 0x4b, 0x1f, 0x64, 0x18, 
-       0x01, 0x08, 0x4b, 0x19, 0x68, 0x1b, 0x18, 0xc0, 
-       0x6a, 0x40, 0x28, 0xbc, 0xdd, 0x01, 0x24, 0xbc, 
-       0xe0, 0x04, 0x01, 0x08, 0x4b, 0x14, 0x68, 0x1b, 
-       0x18, 0xc0, 0x6a, 0x44, 0x48, 0x18, 0x60, 0x04, 
-       0x29, 0x01, 0xd1, 0x14, 0x20, 0x01, 0x4b, 0x17, 
-       0x62, 0x98, 0x48, 0x17, 0x68, 0x03, 0x04, 0x1b, 
-       0x0c, 0x1b, 0x60, 0x03, 0x48, 0x14, 0x04, 0x23, 
-       0x68, 0x06, 0x43, 0x33, 0x60, 0x03, 0x48, 0x13, 
-       0x68, 0x06, 0x23, 0x20, 0x43, 0x33, 0x60, 0x03, 
-       0x20, 0x01, 0x4b, 0x0e, 0x63, 0x18, 0x48, 0x07, 
-       0x69, 0x80, 0x28, 0x00, 0xd1, 0x04, 0x48, 0x0e, 
-       0x68, 0x06, 0x23, 0x28, 0x43, 0x33, 0x60, 0x03, 
-       0x20, 0x00, 0xe7, 0x31, 0xe7, 0x30, 0x00, 0x00, 
-       0x2e, 0x08, 0x7c, 0x44, 0x66, 0x00, 0x01, 0x00, 
-       0x2e, 0x08, 0x5d, 0xd4, 0x66, 0x00, 0x00, 0x80, 
-       0x9e, 0x00, 0x0a, 0x00, 0x9e, 0x00, 0x0a, 0x80, 
-       0x62, 0x00, 0x03, 0x00, 0x62, 0x01, 0x00, 0x00, 
-       0x62, 0x01, 0x00, 0x20, 0x62, 0x01, 0x00, 0x24, 
-       0x64, 0x00, 0x00, 0x60, 0xb5, 0xf3, 0x1c, 0x0f, 
-       0x98, 0x00, 0x06, 0x06, 0x0e, 0x36, 0xb0, 0x82, 
-       0x4d, 0x68, 0x49, 0x69, 0x91, 0x01, 0x48, 0x69, 
-       0x68, 0x00, 0x5d, 0x84, 0x2e, 0x20, 0xdb, 0x05, 
-       0x20, 0xa2, 0xb0, 0x02, 0xb0, 0x02, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2c, 0xff, 0xd1, 0x02, 
-       0x20, 0x4b, 0xb0, 0x02, 0xe7, 0xf6, 0x48, 0x62, 
-       0x69, 0x80, 0x28, 0x00, 0xd1, 0x05, 0x2c, 0x02, 
-       0xd0, 0x03, 0x2c, 0x03, 0xd0, 0x01, 0x2c, 0x04, 
-       0xd1, 0x0b, 0x48, 0x5d, 0x69, 0x80, 0x28, 0x02, 
-       0xd1, 0x01, 0x2c, 0x00, 0xd1, 0x05, 0x48, 0x5a, 
-       0x69, 0x80, 0x28, 0x01, 0xd1, 0x04, 0x2c, 0x01, 
-       0xd0, 0x02, 0x20, 0x4d, 0xb0, 0x02, 0xe7, 0xdd, 
-       0x48, 0x54, 0x68, 0x00, 0x30, 0x60, 0x7e, 0x80, 
-       0x28, 0x00, 0xd0, 0x02, 0x20, 0x4f, 0xb0, 0x02, 
-       0xe7, 0xd4, 0x48, 0x50, 0x68, 0x00, 0x30, 0x80, 
-       0x78, 0xc0, 0x28, 0x00, 0xd0, 0x02, 0x20, 0x50, 
-       0xb0, 0x02, 0xe7, 0xcb, 0x68, 0x78, 0x28, 0x00, 
-       0xd1, 0x02, 0x20, 0x4c, 0xb0, 0x02, 0xe7, 0xc5, 
-       0x2c, 0x04, 0xd1, 0x08, 0x68, 0x79, 0x20, 0xbc, 
-       0xf0, 0x01, 0xff, 0xac, 0x29, 0x00, 0xd0, 0x02, 
-       0x20, 0x59, 0xb0, 0x02, 0xe7, 0xba, 0x48, 0x43, 
-       0x68, 0x00, 0x30, 0x80, 0x78, 0x80, 0x21, 0x01, 
-       0x40, 0x81, 0x48, 0x41, 0x68, 0x40, 0x40, 0x08, 
-       0x07, 0x80, 0x0f, 0x80, 0xd0, 0x02, 0x20, 0x51, 
-       0xb0, 0x02, 0xe7, 0xab, 0x20, 0x33, 0x06, 0x40, 
-       0x6b, 0x80, 0x90, 0x00, 0x23, 0x04, 0x40, 0x18, 
-       0xd0, 0x02, 0x20, 0x52, 0xb0, 0x02, 0xe7, 0xa1, 
-       0x2c, 0x00, 0xd1, 0x04, 0x48, 0x37, 0x68, 0x01, 
-       0x23, 0xfd, 0x40, 0x19, 0x60, 0x01, 0x20, 0x01, 
-       0x49, 0x32, 0x68, 0x09, 0x31, 0x60, 0x76, 0x88, 
-       0x68, 0x38, 0x49, 0x30, 0x68, 0x09, 0x67, 0x08, 
-       0x68, 0x78, 0x49, 0x2e, 0x68, 0x09, 0x67, 0x48, 
-       0x48, 0x2c, 0x68, 0x00, 0x67, 0xc7, 0x20, 0x00, 
-       0x49, 0x2a, 0x68, 0x09, 0x31, 0x60, 0x76, 0x48, 
-       0x48, 0x28, 0x68, 0x00, 0x30, 0x60, 0x76, 0x06, 
-       0x20, 0x00, 0x60, 0x78, 0x20, 0x00, 0x72, 0x78, 
-       0x48, 0x24, 0x68, 0x00, 0x5d, 0x80, 0x28, 0x01, 
-       0xd1, 0x02, 0x20, 0x01, 0x49, 0x24, 0x62, 0x88, 
-       0x98, 0x00, 0x01, 0x00, 0x19, 0x45, 0x48, 0x1f, 
-       0x68, 0x00, 0x6f, 0x40, 0x28, 0xbc, 0xdd, 0x07, 
-       0x48, 0x20, 0x60, 0xa8, 0x20, 0xbc, 0x49, 0x1b, 
-       0x68, 0x09, 0x31, 0x80, 0x70, 0x08, 0xe0, 0x0d, 
-       0x48, 0x18, 0x68, 0x00, 0x6f, 0x40, 0x23, 0x01, 
-       0x07, 0x9b, 0x43, 0x18, 0x60, 0xa8, 0x48, 0x15, 
-       0x68, 0x00, 0x6f, 0x40, 0x49, 0x13, 0x68, 0x09, 
-       0x31, 0x80, 0x70, 0x08, 0x48, 0x11, 0x68, 0x00, 
-       0x30, 0x80, 0x78, 0x80, 0x00, 0x43, 0x18, 0x18, 
-       0x01, 0x80, 0x99, 0x01, 0x18, 0x41, 0x91, 0x01, 
-       0x48, 0x0c, 0x68, 0x00, 0x6f, 0x00, 0x60, 0x28, 
-       0x99, 0x01, 0x1d, 0x08, 0x60, 0x68, 0x20, 0x01, 
-       0x06, 0x00, 0x60, 0xe8, 0x99, 0x00, 0x20, 0x01, 
-       0x40, 0x88, 0x21, 0x33, 0x06, 0x49, 0x63, 0x48, 
-       0x20, 0x00, 0xb0, 0x02, 0xe7, 0x3a, 0xb0, 0x02, 
-       0xe7, 0x38, 0x00, 0x00, 0x9e, 0x00, 0x09, 0x80, 
-       0x9e, 0x00, 0x0b, 0x80, 0x2e, 0x08, 0x7c, 0x44, 
-       0x66, 0x00, 0x01, 0x00, 0x62, 0x00, 0x00, 0x1c, 
-       0x62, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0xbc, 
-       0xb5, 0xf3, 0x1c, 0x0f, 0xb0, 0x81, 0x98, 0x01, 
-       0x06, 0x00, 0x0e, 0x00, 0x90, 0x00, 0xb0, 0x82, 
-       0x48, 0xf9, 0x68, 0x00, 0x99, 0x02, 0x5c, 0x44, 
-       0x98, 0x02, 0x28, 0x20, 0xdb, 0x05, 0x20, 0xa2, 
-       0xb0, 0x03, 0xb0, 0x02, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x2c, 0xff, 0xd1, 0x02, 0x20, 0x4b, 
-       0xb0, 0x03, 0xe7, 0xf6, 0x48, 0xf1, 0x69, 0x80, 
-       0x28, 0x00, 0xd1, 0x05, 0x2c, 0x02, 0xd0, 0x03, 
-       0x2c, 0x03, 0xd0, 0x01, 0x2c, 0x04, 0xd1, 0x0b, 
-       0x48, 0xec, 0x69, 0x80, 0x28, 0x02, 0xd1, 0x01, 
-       0x2c, 0x00, 0xd1, 0x05, 0x48, 0xe9, 0x69, 0x80, 
-       0x28, 0x01, 0xd1, 0x04, 0x2c, 0x01, 0xd0, 0x02, 
-       0x20, 0x4d, 0xb0, 0x03, 0xe7, 0xdd, 0x48, 0xe4, 
-       0x68, 0x00, 0x30, 0x60, 0x7e, 0x80, 0x28, 0x00, 
-       0xd0, 0x02, 0x20, 0x4f, 0xb0, 0x03, 0xe7, 0xd4, 
-       0x68, 0x78, 0x28, 0x00, 0xd1, 0x02, 0x20, 0x4c, 
-       0xb0, 0x03, 0xe7, 0xce, 0x2c, 0x04, 0xd1, 0x08, 
-       0x68, 0x79, 0x20, 0xbc, 0xf0, 0x01, 0xfe, 0xce, 
-       0x29, 0x00, 0xd0, 0x02, 0x20, 0x59, 0xb0, 0x03, 
-       0xe7, 0xc3, 0x48, 0xd7, 0x68, 0x00, 0x30, 0x80, 
-       0x78, 0xc0, 0x28, 0x00, 0xd0, 0x02, 0x20, 0x50, 
-       0xb0, 0x03, 0xe7, 0xba, 0x2c, 0x00, 0xd1, 0x04, 
-       0x48, 0xd3, 0x68, 0x01, 0x23, 0xfd, 0x40, 0x19, 
-       0x60, 0x01, 0x48, 0xd2, 0x68, 0x01, 0x23, 0x8d, 
-       0x05, 0x9b, 0x43, 0x19, 0x60, 0x01, 0x48, 0xd0, 
-       0x21, 0x33, 0x06, 0x49, 0x60, 0x48, 0x20, 0x01, 
-       0x49, 0xc9, 0x68, 0x09, 0x31, 0x60, 0x76, 0x88, 
-       0x68, 0x38, 0x49, 0xc7, 0x68, 0x09, 0x67, 0x08, 
-       0x68, 0x78, 0x49, 0xc5, 0x68, 0x09, 0x67, 0x48, 
-       0x48, 0xc3, 0x68, 0x00, 0x67, 0xc7, 0x20, 0x00, 
-       0x49, 0xc1, 0x68, 0x09, 0x31, 0x60, 0x76, 0x48, 
-       0x98, 0x02, 0x49, 0xbf, 0x68, 0x09, 0x31, 0x60, 
-       0x76, 0x08, 0x20, 0x00, 0x49, 0xbc, 0x68, 0x09, 
-       0x6f, 0xc9, 0x60, 0x48, 0x20, 0x00, 0x49, 0xba, 
-       0x68, 0x09, 0x6f, 0xc9, 0x72, 0x48, 0x48, 0xb8, 
-       0x68, 0x00, 0x99, 0x02, 0x5c, 0x40, 0x28, 0x01, 
-       0xd1, 0x02, 0x20, 0x01, 0x49, 0xb9, 0x62, 0x88, 
-       0x48, 0xb3, 0x68, 0x00, 0x30, 0x80, 0x78, 0x81, 
-       0x20, 0x01, 0x40, 0x88, 0x49, 0xb1, 0x68, 0x49, 
-       0x40, 0x08, 0x07, 0x80, 0x0f, 0x80, 0xd0, 0x1b, 
-       0x20, 0x00, 0x49, 0xad, 0x68, 0x09, 0x31, 0x60, 
-       0x76, 0x88, 0x20, 0x51, 0x49, 0xaa, 0x68, 0x09, 
-       0x6f, 0xc9, 0x72, 0x48, 0x48, 0xa8, 0x68, 0x00, 
-       0x6f, 0xc0, 0x7a, 0x00, 0x28, 0xff, 0xd0, 0x07, 
-       0x48, 0xa5, 0x68, 0x00, 0x6f, 0xc0, 0x7a, 0x01, 
-       0x20, 0x01, 0x40, 0x88, 0xf0, 0x05, 0xfd, 0xb0, 
-       0x20, 0x51, 0xb0, 0x03, 0xe7, 0x55, 0xe1, 0x6c, 
-       0x20, 0x33, 0x06, 0x40, 0x6b, 0x81, 0x91, 0x00, 
-       0x99, 0x00, 0x20, 0x04, 0x40, 0x08, 0xd0, 0x07, 
-       0x20, 0x04, 0xf0, 0x00, 0xfc, 0xb3, 0x20, 0x33, 
-       0x06, 0x40, 0x6b, 0x81, 0x91, 0x00, 0xe7, 0xf3, 
-       0x4d, 0x9d, 0x99, 0x00, 0x01, 0x08, 0x19, 0x45, 
-       0x48, 0x95, 0x68, 0x00, 0x6f, 0x40, 0x28, 0xbc, 
-       0xdd, 0x07, 0x48, 0x9a, 0x60, 0xa8, 0x20, 0xbc, 
-       0x49, 0x91, 0x68, 0x09, 0x31, 0x80, 0x70, 0x08, 
-       0xe0, 0x0d, 0x48, 0x8f, 0x68, 0x00, 0x6f, 0x40, 
-       0x23, 0x01, 0x07, 0x9b, 0x43, 0x18, 0x60, 0xa8, 
-       0x48, 0x8b, 0x68, 0x00, 0x6f, 0x40, 0x49, 0x8a, 
-       0x68, 0x09, 0x31, 0x80, 0x70, 0x08, 0x48, 0x90, 
-       0x90, 0x01, 0x48, 0x87, 0x68, 0x00, 0x30, 0x80, 
-       0x78, 0x80, 0x00, 0x43, 0x18, 0x18, 0x01, 0x80, 
-       0x99, 0x01, 0x18, 0x40, 0x90, 0x01, 0x48, 0x82, 
-       0x68, 0x00, 0x6f, 0x00, 0x60, 0x28, 0x98, 0x01, 
-       0x30, 0x04, 0x60, 0x68, 0x20, 0x01, 0x06, 0x00, 
-       0x60, 0xe8, 0x99, 0x00, 0x20, 0x01, 0x40, 0x88, 
-       0x21, 0x33, 0x06, 0x49, 0x63, 0x48, 0x48, 0x83, 
-       0x6b, 0x00, 0x23, 0x01, 0x06, 0x1b, 0x40, 0x18, 
-       0xd1, 0x03, 0x20, 0x04, 0xf0, 0x00, 0xfc, 0x6a, 
-       0xe7, 0xf5, 0x20, 0x01, 0x06, 0x00, 0x21, 0x33, 
-       0x06, 0x49, 0x60, 0x48, 0x4e, 0x7c, 0x48, 0x72, 
-       0x68, 0x00, 0x30, 0x80, 0x78, 0x80, 0x01, 0x00, 
-       0x19, 0x86, 0x98, 0x01, 0x30, 0x04, 0x60, 0x30, 
-       0x48, 0x78, 0x60, 0x70, 0x48, 0x6c, 0x68, 0x00, 
-       0x30, 0x80, 0x78, 0x00, 0x23, 0x01, 0x07, 0x9b, 
-       0x43, 0x18, 0x60, 0xb0, 0x20, 0x01, 0x05, 0x80, 
-       0x60, 0xf0, 0x48, 0x67, 0x68, 0x00, 0x30, 0x80, 
-       0x78, 0x81, 0x20, 0x01, 0x40, 0x88, 0x49, 0x65, 
-       0x60, 0xc8, 0x48, 0x63, 0x68, 0x00, 0x30, 0x60, 
-       0x7e, 0x00, 0x49, 0x61, 0x68, 0x09, 0x5c, 0x08, 
-       0x28, 0x00, 0xd0, 0x48, 0x28, 0x01, 0xd0, 0x47, 
-       0x28, 0x02, 0xd0, 0x02, 0x28, 0x03, 0xd0, 0x21, 
-       0xe0, 0x5a, 0x48, 0x67, 0x68, 0x01, 0x23, 0x02, 
-       0x43, 0x19, 0x60, 0x01, 0x48, 0x58, 0x68, 0x00, 
-       0x6f, 0x40, 0x49, 0x57, 0x68, 0x09, 0x31, 0x80, 
-       0x78, 0x09, 0x1a, 0x40, 0x28, 0xbc, 0xd8, 0x05, 
-       0x48, 0x5f, 0x68, 0x01, 0x23, 0x10, 0x43, 0x19, 
-       0x60, 0x01, 0xe0, 0x05, 0x48, 0x5c, 0x68, 0x01, 
-       0x23, 0x10, 0x43, 0xdb, 0x40, 0x19, 0x60, 0x01, 
-       0x48, 0x59, 0x68, 0x01, 0x23, 0x08, 0x43, 0x19, 
-       0x60, 0x01, 0xe0, 0x39, 0x48, 0x56, 0x68, 0x01, 
-       0x23, 0x04, 0x43, 0x19, 0x60, 0x01, 0x48, 0x48, 
-       0x68, 0x00, 0x6f, 0x40, 0x49, 0x46, 0x68, 0x09, 
-       0x31, 0x80, 0x78, 0x09, 0x1a, 0x40, 0x28, 0xbc, 
-       0xd8, 0x05, 0x48, 0x4f, 0x68, 0x01, 0x23, 0x10, 
-       0x43, 0x19, 0x60, 0x01, 0xe0, 0x05, 0x48, 0x4c, 
-       0x68, 0x01, 0x23, 0x10, 0x43, 0xdb, 0x40, 0x19, 
-       0x60, 0x01, 0x48, 0x49, 0x68, 0x01, 0x23, 0x08, 
-       0x43, 0x19, 0x60, 0x01, 0xe0, 0x18, 0xe0, 0x17, 
-       0x48, 0x46, 0x68, 0x01, 0x04, 0x09, 0x0c, 0x09, 
-       0x60, 0x01, 0x48, 0x44, 0x49, 0x36, 0x68, 0x09, 
-       0x31, 0x80, 0x78, 0x09, 0x04, 0x09, 0x68, 0x02, 
-       0x43, 0x11, 0x60, 0x01, 0x48, 0x40, 0x68, 0x01, 
-       0x23, 0x20, 0x43, 0xdb, 0x40, 0x19, 0x60, 0x01, 
-       0x20, 0x01, 0x49, 0x34, 0x63, 0x08, 0xe7, 0xff, 
-       0x48, 0x36, 0x6b, 0x00, 0x23, 0x01, 0x05, 0x9b, 
-       0x40, 0x18, 0xd1, 0x03, 0x20, 0x04, 0xf0, 0x00, 
-       0xfb, 0xd1, 0xe7, 0xf5, 0x20, 0x01, 0x05, 0x80, 
-       0x21, 0x33, 0x06, 0x49, 0x60, 0x48, 0x48, 0x26, 
-       0x68, 0x00, 0x30, 0x80, 0x78, 0x80, 0x23, 0x01, 
-       0x40, 0x58, 0x49, 0x23, 0x68, 0x09, 0x31, 0x80, 
-       0x70, 0x88, 0x48, 0x21, 0x68, 0x00, 0x6f, 0x40, 
-       0x49, 0x1f, 0x68, 0x09, 0x31, 0x80, 0x78, 0x09, 
-       0x1a, 0x40, 0x49, 0x1d, 0x68, 0x09, 0x67, 0x48, 
-       0x48, 0x1b, 0x68, 0x00, 0x6f, 0xc0, 0x30, 0x04, 
-       0x49, 0x19, 0x68, 0x09, 0x31, 0x80, 0x78, 0x09, 
-       0x68, 0x02, 0x18, 0x89, 0x60, 0x01, 0x48, 0x16, 
-       0x68, 0x00, 0x6f, 0x00, 0x49, 0x14, 0x68, 0x09, 
-       0x31, 0x80, 0x78, 0x09, 0x18, 0x40, 0x49, 0x12, 
-       0x68, 0x09, 0x67, 0x08, 0x48, 0x10, 0x68, 0x00, 
-       0x6f, 0x40, 0x28, 0x00, 0xd0, 0x00, 0xe6, 0xb3, 
-       0x48, 0x11, 0x21, 0x33, 0x06, 0x49, 0x60, 0x48, 
-       0x48, 0x0e, 0x68, 0x01, 0x4b, 0x19, 0x40, 0x19, 
-       0x60, 0x01, 0x20, 0x48, 0x49, 0x08, 0x68, 0x09, 
-       0x6f, 0xc9, 0x72, 0x48, 0x20, 0x00, 0x49, 0x06, 
-       0x68, 0x09, 0x31, 0x60, 0x76, 0x88, 0x48, 0x04, 
-       0x68, 0x00, 0x6f, 0xc0, 0x7a, 0x00, 0x28, 0xff, 
-       0xd0, 0x29, 0x48, 0x01, 0xe0, 0x20, 0x00, 0x00, 
-       0x2e, 0x08, 0x7c, 0x44, 0x66, 0x00, 0x01, 0x00, 
-       0x62, 0x00, 0x00, 0x1c, 0x66, 0x00, 0x00, 0x08, 
-       0x23, 0x48, 0x00, 0x00, 0x62, 0x01, 0x00, 0x00, 
-       0x9e, 0x00, 0x09, 0x80, 0x40, 0x00, 0x00, 0xbc, 
-       0x9e, 0x00, 0x0b, 0x80, 0x66, 0x00, 0x00, 0x80, 
-       0x9e, 0x00, 0x09, 0xc0, 0x66, 0x00, 0x01, 0xf0, 
-       0x64, 0x00, 0x00, 0x60, 0x62, 0x01, 0x00, 0x20, 
-       0x62, 0x01, 0x00, 0x24, 0xfc, 0xb7, 0xff, 0xff, 
-       0x68, 0x00, 0x6f, 0xc0, 0x7a, 0x01, 0x20, 0x01, 
-       0x40, 0x88, 0xf0, 0x05, 0xfc, 0x45, 0x20, 0x00, 
-       0xb0, 0x03, 0xe5, 0xea, 0xb0, 0x02, 0xb0, 0x01, 
-       0xe5, 0xe7, 0xe5, 0xe6, 0xb5, 0xb0, 0x1c, 0x07, 
-       0x06, 0x3d, 0x0e, 0x2d, 0x48, 0x5d, 0x68, 0x00, 
-       0x5d, 0x44, 0x2d, 0x20, 0xdb, 0x03, 0x20, 0xa2, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x48, 0x59, 
-       0x68, 0x00, 0x5d, 0x40, 0x28, 0xff, 0xd1, 0x01, 
-       0x20, 0x4b, 0xe7, 0xf5, 0x48, 0x56, 0x69, 0x80, 
-       0x28, 0x00, 0xd1, 0x05, 0x2c, 0x02, 0xd0, 0x03, 
-       0x2c, 0x03, 0xd0, 0x01, 0x2c, 0x04, 0xd1, 0x0b, 
-       0x48, 0x51, 0x69, 0x80, 0x28, 0x02, 0xd1, 0x01, 
-       0x2c, 0x00, 0xd1, 0x05, 0x48, 0x4e, 0x69, 0x80, 
-       0x28, 0x01, 0xd1, 0x04, 0x2c, 0x01, 0xd0, 0x02, 
-       0x20, 0x4d, 0xe7, 0xdd, 0xe0, 0x90, 0x48, 0x4b, 
-       0x68, 0x01, 0x4b, 0x4b, 0x43, 0x19, 0x60, 0x01, 
-       0x48, 0x49, 0x21, 0x33, 0x06, 0x49, 0x60, 0x48, 
-       0x48, 0x48, 0x68, 0x01, 0x23, 0x04, 0x43, 0x19, 
-       0x60, 0x01, 0x20, 0x00, 0x49, 0x41, 0x68, 0x09, 
-       0x31, 0x80, 0x70, 0x88, 0x20, 0x00, 0x49, 0x3f, 
-       0x68, 0x09, 0x31, 0x80, 0x70, 0x48, 0x20, 0xff, 
-       0x49, 0x3c, 0x68, 0x09, 0x55, 0x48, 0x2c, 0x00, 
-       0xd1, 0x03, 0x20, 0x18, 0x21, 0x31, 0x06, 0x49, 
-       0x62, 0x48, 0x01, 0x20, 0x49, 0x37, 0x68, 0x09, 
-       0x18, 0x40, 0x30, 0x20, 0x7a, 0x80, 0x28, 0x00, 
-       0xd0, 0x28, 0x20, 0x00, 0x49, 0x38, 0x60, 0x08, 
-       0x20, 0x00, 0x49, 0x38, 0x64, 0x08, 0x20, 0x03, 
-       0x49, 0x31, 0x61, 0x08, 0x21, 0x55, 0x01, 0x20, 
-       0x4a, 0x2e, 0x68, 0x12, 0x18, 0x80, 0x6a, 0xc0, 
-       0x72, 0x41, 0x21, 0x00, 0x01, 0x20, 0x4a, 0x2b, 
-       0x68, 0x12, 0x18, 0x80, 0x30, 0x20, 0x72, 0x81, 
-       0x01, 0x20, 0x49, 0x28, 0x68, 0x09, 0x18, 0x40, 
-       0x6a, 0xc0, 0x7a, 0x00, 0x28, 0xff, 0xd0, 0x09, 
-       0x01, 0x20, 0x49, 0x24, 0x68, 0x09, 0x18, 0x40, 
-       0x6a, 0xc0, 0x7a, 0x01, 0x20, 0x01, 0x40, 0x88, 
-       0xf0, 0x05, 0xfb, 0xbe, 0x48, 0x1f, 0x68, 0x00, 
-       0x30, 0x60, 0x7e, 0x80, 0x28, 0x00, 0xd0, 0x2b, 
-       0x48, 0x1c, 0x68, 0x00, 0x30, 0x80, 0x78, 0xc0, 
-       0x28, 0x00, 0xd0, 0x0d, 0x20, 0x00, 0x49, 0x19, 
-       0x68, 0x09, 0x31, 0x80, 0x70, 0xc8, 0x22, 0x00, 
-       0xb4, 0x04, 0x1c, 0x28, 0x23, 0x00, 0x22, 0x00, 
-       0x49, 0x1b, 0xf7, 0xf3, 0xfe, 0xcd, 0xb0, 0x01, 
-       0x20, 0x55, 0x49, 0x12, 0x68, 0x09, 0x6f, 0xc9, 
-       0x72, 0x48, 0x20, 0x00, 0x49, 0x0f, 0x68, 0x09, 
-       0x31, 0x60, 0x76, 0x88, 0x48, 0x0d, 0x68, 0x00, 
-       0x6f, 0xc0, 0x7a, 0x00, 0x28, 0xff, 0xd0, 0x07, 
-       0x48, 0x0a, 0x68, 0x00, 0x6f, 0xc0, 0x7a, 0x01, 
-       0x20, 0x01, 0x40, 0x88, 0xf0, 0x05, 0xfb, 0x8c, 
-       0x48, 0x09, 0x21, 0x33, 0x06, 0x49, 0x60, 0x48, 
-       0x48, 0x06, 0x68, 0x01, 0x4b, 0x0b, 0x40, 0x19, 
-       0x60, 0x01, 0x20, 0x00, 0xe7, 0x4c, 0xe7, 0x4b, 
-       0xe7, 0x4a, 0x00, 0x00, 0x2e, 0x08, 0x7c, 0x44, 
-       0x66, 0x00, 0x01, 0x00, 0x66, 0x00, 0x00, 0x08, 
-       0x23, 0x48, 0x00, 0x00, 0x66, 0x00, 0x01, 0x18, 
-       0x9e, 0x00, 0x0a, 0x00, 0x9e, 0x00, 0x0a, 0x80, 
-       0x00, 0x00, 0xff, 0xff, 0xfc, 0xb7, 0xff, 0xff, 
-       0xb5, 0xff, 0x1c, 0x1f, 0x98, 0x00, 0x06, 0x02, 
-       0x0e, 0x12, 0x99, 0x01, 0x06, 0x0d, 0x0e, 0x2d, 
-       0x98, 0x02, 0x06, 0x04, 0x0e, 0x24, 0x48, 0x2d, 
-       0x68, 0x00, 0x5c, 0x81, 0x2a, 0x20, 0xdb, 0x04, 
-       0x20, 0xa2, 0xb0, 0x04, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x29, 0xff, 0xd1, 0x01, 0x20, 0x4b, 
-       0xe7, 0xf7, 0x48, 0x27, 0x69, 0x80, 0x28, 0x00, 
-       0xd1, 0x05, 0x29, 0x02, 0xd0, 0x03, 0x29, 0x03, 
-       0xd0, 0x01, 0x29, 0x04, 0xd1, 0x0b, 0x48, 0x22, 
-       0x69, 0x80, 0x28, 0x02, 0xd1, 0x01, 0x29, 0x00, 
-       0xd1, 0x05, 0x48, 0x1f, 0x69, 0x80, 0x28, 0x01, 
-       0xd1, 0x03, 0x29, 0x01, 0xd0, 0x01, 0x20, 0x4d, 
-       0xe7, 0xdf, 0x29, 0x05, 0xd2, 0x2a, 0xa3, 0x02, 
-       0x5c, 0x5b, 0x00, 0x5b, 0x44, 0x9f, 0x1c, 0x00, 
-       0x03, 0x07, 0x04, 0x05, 0x06, 0x00, 0xe0, 0x24, 
-       0xe0, 0x23, 0xe0, 0x22, 0xe0, 0x21, 0x01, 0x08, 
-       0x4b, 0x12, 0x68, 0x1b, 0x18, 0xc0, 0x30, 0x20, 
-       0x7a, 0x80, 0x28, 0x00, 0xd1, 0x05, 0x48, 0x0f, 
-       0x68, 0x00, 0x30, 0x60, 0x7e, 0x80, 0x28, 0x00, 
-       0xd0, 0x02, 0x20, 0x49, 0xe7, 0xc1, 0xe0, 0x13, 
-       0x2d, 0x00, 0xd1, 0x05, 0x00, 0xa0, 0x4b, 0x0b, 
-       0x18, 0xc0, 0x68, 0x00, 0x60, 0x38, 0xe0, 0x04, 
-       0x68, 0x38, 0x00, 0xa6, 0x4b, 0x07, 0x18, 0xf3, 
-       0x60, 0x18, 0xe0, 0x02, 0x20, 0x4a, 0xe7, 0xb0, 
-       0xe7, 0xff, 0x20, 0x00, 0xe7, 0xad, 0xe7, 0xac, 
-       0xe7, 0xab, 0x00, 0x00, 0x2e, 0x08, 0x7c, 0x44, 
-       0x66, 0x00, 0x01, 0x00, 0x62, 0x01, 0x00, 0x80, 
-       0xb5, 0xf7, 0xb0, 0x82, 0x98, 0x02, 0x06, 0x03, 
-       0x0e, 0x1b, 0x93, 0x00, 0x99, 0x03, 0x06, 0x08, 
-       0x0e, 0x00, 0x90, 0x01, 0x9a, 0x04, 0x06, 0x15, 
-       0x0e, 0x2d, 0xb0, 0x84, 0x4a, 0xca, 0x4f, 0xcb, 
-       0x48, 0xcb, 0x68, 0x00, 0x9b, 0x04, 0x5c, 0xc4, 
-       0x48, 0xca, 0x90, 0x02, 0x21, 0x00, 0x23, 0x00, 
-       0x93, 0x01, 0x9b, 0x04, 0x2b, 0x20, 0xdb, 0x05, 
-       0x20, 0xa2, 0xb0, 0x06, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2c, 0xff, 0xd1, 0x02, 
-       0x20, 0x4b, 0xb0, 0x06, 0xe7, 0xf6, 0x48, 0xc2, 
-       0x69, 0x80, 0x28, 0x02, 0xd1, 0x01, 0x2c, 0x00, 
-       0xd1, 0x03, 0x48, 0xbf, 0x69, 0x80, 0x28, 0x02, 
-       0xd0, 0x02, 0x20, 0x4d, 0xb0, 0x06, 0xe7, 0xe9, 
-       0x98, 0x05, 0x28, 0x01, 0xd1, 0x08, 0x48, 0xb8, 
-       0x68, 0x00, 0x30, 0x80, 0x78, 0xc0, 0x28, 0x00, 
-       0xd0, 0x02, 0x20, 0x50, 0xb0, 0x06, 0xe7, 0xdd, 
-       0x98, 0x05, 0x28, 0x00, 0xd1, 0x05, 0x48, 0xb2, 
-       0x68, 0x00, 0x30, 0x20, 0x7a, 0x80, 0x28, 0x00, 
-       0xd0, 0x08, 0x98, 0x05, 0x28, 0x01, 0xd1, 0x08, 
-       0x48, 0xad, 0x68, 0x00, 0x30, 0x60, 0x7e, 0x80, 
-       0x28, 0x00, 0xd1, 0x02, 0x20, 0x5a, 0xb0, 0x06, 
-       0xe7, 0xc8, 0x20, 0x00, 0x4b, 0xa8, 0x68, 0x1b, 
-       0x6f, 0xdb, 0x72, 0x58, 0x98, 0x05, 0x28, 0x00, 
-       0xd1, 0x50, 0x2d, 0x01, 0xd0, 0x01, 0x2d, 0x02, 
-       0xd1, 0x32, 0x4e, 0xa6, 0x68, 0x30, 0x23, 0x01, 
-       0x04, 0xdb, 0x43, 0x18, 0x60, 0x30, 0x20, 0x00, 
-       0x4b, 0xa3, 0x60, 0x18, 0x48, 0x9e, 0x68, 0x00, 
-       0x30, 0x80, 0x78, 0x40, 0x00, 0x43, 0x18, 0x18, 
-       0x01, 0x80, 0x9b, 0x02, 0x18, 0xc0, 0x90, 0x02, 
-       0x98, 0x02, 0x68, 0x01, 0x48, 0x9a, 0x69, 0x80, 
-       0x07, 0x80, 0x0f, 0x80, 0x01, 0x80, 0x43, 0x01, 
-       0x23, 0x20, 0x43, 0x19, 0x4b, 0x99, 0x43, 0x19, 
-       0x98, 0x02, 0x60, 0x01, 0x4e, 0x98, 0x68, 0x30, 
-       0x23, 0x01, 0x04, 0xdb, 0x43, 0x18, 0x60, 0x30, 
-       0x4e, 0x92, 0x68, 0x30, 0x4b, 0x95, 0x40, 0x18, 
-       0x60, 0x30, 0x2c, 0x00, 0xd1, 0x04, 0x20, 0x00, 
-       0x4b, 0x8b, 0x68, 0x1b, 0x33, 0x20, 0x72, 0x98, 
-       0x2d, 0x02, 0xd0, 0x04, 0x20, 0x01, 0x04, 0xc0, 
-       0x23, 0x33, 0x06, 0x5b, 0x60, 0x18, 0x2c, 0x00, 
-       0xd1, 0x0f, 0x20, 0xff, 0x02, 0x00, 0x40, 0x08, 
-       0xd1, 0x0b, 0x2d, 0x02, 0xd0, 0x09, 0x48, 0x82, 
-       0x68, 0x00, 0x30, 0x80, 0x78, 0x40, 0x23, 0x01, 
-       0x40, 0x58, 0x4b, 0x7f, 0x68, 0x1b, 0x33, 0x80, 
-       0x70, 0x58, 0xe0, 0xed, 0x2d, 0x01, 0xd1, 0x73, 
-       0x2c, 0x00, 0xd1, 0x72, 0x20, 0x31, 0x06, 0x40, 
-       0x68, 0x80, 0x23, 0x08, 0x40, 0x18, 0xd1, 0x3a, 
-       0x48, 0x7a, 0x68, 0x06, 0x23, 0x05, 0x05, 0x9b, 
-       0x43, 0x33, 0x60, 0x03, 0x68, 0x10, 0x4b, 0x7c, 
-       0x40, 0x18, 0x60, 0x10, 0x32, 0xc0, 0x68, 0x10, 
-       0x4b, 0x79, 0x40, 0x18, 0x60, 0x10, 0x20, 0x00, 
-       0x4b, 0x6f, 0x68, 0x1b, 0x67, 0x58, 0x20, 0x00, 
-       0x4b, 0x6d, 0x68, 0x1b, 0x33, 0x80, 0x70, 0x18, 
-       0x48, 0x6d, 0x68, 0x80, 0x23, 0x02, 0x40, 0x18, 
-       0xd1, 0x04, 0x20, 0x00, 0x4b, 0x68, 0x68, 0x1b, 
-       0x33, 0x60, 0x76, 0x98, 0x20, 0x5b, 0x4b, 0x66, 
-       0x68, 0x1b, 0x6f, 0xdb, 0x72, 0x58, 0x4e, 0x6d, 
-       0x68, 0x30, 0x23, 0x02, 0x43, 0x18, 0x60, 0x30, 
-       0x4e, 0x67, 0x68, 0x30, 0x23, 0x05, 0x05, 0x9b, 
-       0x43, 0x18, 0x60, 0x30, 0x4e, 0x61, 0x68, 0x30, 
-       0x4b, 0x67, 0x40, 0x18, 0x60, 0x30, 0x20, 0x5b, 
-       0xb0, 0x06, 0xe7, 0x2b, 0xe0, 0xae, 0x48, 0x5d, 
-       0x68, 0x06, 0x23, 0x01, 0x05, 0x9b, 0x43, 0x33, 
-       0x60, 0x03, 0x20, 0x31, 0x06, 0x40, 0x6a, 0x00, 
-       0x23, 0x04, 0x40, 0x18, 0xd1, 0x27, 0x9b, 0x01, 
-       0x20, 0x31, 0x06, 0x40, 0x6b, 0x00, 0x18, 0x1b, 
-       0x93, 0x01, 0x4e, 0x5c, 0x68, 0x30, 0x23, 0x3b, 
-       0x40, 0x18, 0x60, 0x30, 0x4e, 0x57, 0x68, 0x30, 
-       0x23, 0x0e, 0x43, 0x18, 0x60, 0x30, 0x4e, 0x55, 
-       0x68, 0x30, 0x23, 0x0c, 0x40, 0x18, 0x60, 0x30, 
-       0x20, 0x37, 0x23, 0x31, 0x06, 0x5b, 0x60, 0x98, 
-       0x20, 0x01, 0x90, 0x00, 0x98, 0x00, 0x28, 0x64, 
-       0xd3, 0x04, 0xe0, 0x07, 0x98, 0x00, 0x30, 0x01, 
-       0x90, 0x00, 0xe7, 0xf7, 0xe7, 0xfa, 0xe0, 0x01, 
-       0xe0, 0x36, 0xe0, 0x34, 0xe7, 0xd1, 0x4e, 0x46, 
-       0x68, 0x30, 0x23, 0x01, 0x05, 0x9b, 0x43, 0x18, 
-       0x60, 0x30, 0x4e, 0x40, 0x68, 0x30, 0x4b, 0x48, 
-       0x40, 0x18, 0x60, 0x30, 0x48, 0x3c, 0x68, 0x40, 
-       0x28, 0x00, 0xd0, 0x0d, 0x20, 0x5b, 0x4b, 0x38, 
-       0x68, 0x1b, 0x6f, 0xdb, 0x72, 0x58, 0x20, 0x00, 
-       0x4b, 0x35, 0x68, 0x1b, 0x33, 0x60, 0x76, 0x98, 
-       0x20, 0x5b, 0xb0, 0x06, 0xe6, 0xda, 0xe0, 0x5d, 
-       0x48, 0x31, 0x68, 0x00, 0x6f, 0xc0, 0x1d, 0x06, 
-       0x48, 0x2f, 0x68, 0x00, 0x30, 0x80, 0x78, 0x00, 
-       0x9b, 0x01, 0x1a, 0xc0, 0x68, 0x33, 0x18, 0xc0, 
-       0x60, 0x30, 0x20, 0x5c, 0x4b, 0x2a, 0x68, 0x1b, 
-       0x6f, 0xdb, 0x72, 0x58, 0x20, 0x00, 0x4b, 0x28, 
-       0x68, 0x1b, 0x33, 0x60, 0x76, 0x98, 0xe0, 0x3f, 
-       0x20, 0x33, 0x06, 0x40, 0x6b, 0x80, 0x90, 0x03, 
-       0x23, 0x04, 0x40, 0x18, 0xd0, 0x03, 0x20, 0x52, 
-       0xb0, 0x06, 0xe6, 0xb7, 0xe0, 0x3a, 0x98, 0x03, 
-       0x01, 0x00, 0x19, 0xc7, 0x48, 0x1e, 0x68, 0x00, 
-       0x6f, 0x40, 0x28, 0xbc, 0xdd, 0x07, 0x48, 0x29, 
-       0x60, 0xb8, 0x20, 0xbc, 0x4b, 0x1a, 0x68, 0x1b, 
-       0x33, 0x80, 0x70, 0x18, 0xe0, 0x0d, 0x48, 0x18, 
-       0x68, 0x00, 0x6f, 0x40, 0x23, 0x01, 0x07, 0x9b, 
-       0x43, 0x18, 0x60, 0xb8, 0x48, 0x14, 0x68, 0x00, 
-       0x6f, 0x40, 0x4b, 0x13, 0x68, 0x1b, 0x33, 0x80, 
-       0x70, 0x18, 0x48, 0x11, 0x68, 0x00, 0x30, 0x80, 
-       0x78, 0x80, 0x00, 0x43, 0x18, 0x18, 0x01, 0x80, 
-       0x18, 0x82, 0x48, 0x0d, 0x68, 0x00, 0x6f, 0x00, 
-       0x60, 0x38, 0x1d, 0x10, 0x60, 0x78, 0x20, 0x01, 
-       0x06, 0x00, 0x60, 0xf8, 0x9e, 0x03, 0x20, 0x01, 
-       0x40, 0xb0, 0x23, 0x33, 0x06, 0x5b, 0x63, 0x58, 
-       0x20, 0x00, 0xb0, 0x06, 0xe6, 0x7e, 0xb0, 0x04, 
-       0xb0, 0x02, 0xe6, 0x7b, 0xe6, 0x7a, 0x00, 0x00, 
-       0x9e, 0x00, 0x0b, 0x80, 0x9e, 0x00, 0x09, 0x80, 
-       0x2e, 0x08, 0x7c, 0x44, 0x9e, 0x00, 0x0a, 0x00, 
-       0x66, 0x00, 0x01, 0x00, 0x66, 0x00, 0x00, 0x08, 
-       0x62, 0x00, 0x03, 0x00, 0x80, 0x00, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x04, 0xff, 0xf7, 0xff, 0xff, 
-       0xff, 0xff, 0x00, 0xff, 0x62, 0x00, 0x00, 0x1c, 
-       0xfe, 0xbf, 0xff, 0xff, 0x62, 0x00, 0x00, 0x08, 
-       0xff, 0xbf, 0xff, 0xff, 0x40, 0x00, 0x00, 0xbc, 
-       0x48, 0x07, 0x69, 0x80, 0x28, 0x02, 0xd0, 0x03, 
-       0x48, 0x05, 0x69, 0x80, 0x28, 0x03, 0xd1, 0x04, 
-       0x20, 0x31, 0x06, 0x40, 0x6a, 0x80, 0x47, 0x70, 
-       0xe0, 0x01, 0x20, 0x00, 0xe7, 0xfb, 0xe7, 0xfa, 
-       0x66, 0x00, 0x01, 0x00, 0xb5, 0xb0, 0x27, 0x0f, 
-       0x20, 0x31, 0x06, 0x40, 0x68, 0xc0, 0x09, 0x05, 
-       0xf7, 0xff, 0xff, 0xe6, 0x43, 0xc4, 0x48, 0x18, 
-       0x69, 0x80, 0x28, 0x00, 0xd0, 0x03, 0x48, 0x16, 
-       0x69, 0x80, 0x28, 0x01, 0xd1, 0x03, 0x1c, 0x38, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x2d, 0x09, 
-       0xd2, 0x1e, 0xa3, 0x02, 0x5d, 0x5b, 0x00, 0x5b, 
-       0x44, 0x9f, 0x1c, 0x00, 0x05, 0x05, 0x05, 0x05, 
-       0x05, 0x07, 0x07, 0x07, 0x0e, 0x00, 0x1c, 0x2f, 
-       0xe0, 0x13, 0x20, 0x08, 0x40, 0x20, 0xd0, 0x01, 
-       0x1c, 0x2f, 0xe0, 0x00, 0x27, 0x02, 0xe0, 0x0c, 
-       0x20, 0x08, 0x40, 0x20, 0xd0, 0x06, 0x20, 0x02, 
-       0x40, 0x20, 0xd0, 0x01, 0x27, 0x07, 0xe0, 0x00, 
-       0x27, 0x08, 0xe0, 0x00, 0x27, 0x02, 0xe0, 0x00, 
-       0xe7, 0xff, 0x1c, 0x38, 0xe7, 0xd8, 0xe7, 0xd7, 
-       0x66, 0x00, 0x01, 0x00, 0x1c, 0x01, 0x29, 0x07, 
-       0xd2, 0x0f, 0xa3, 0x02, 0x5c, 0x5b, 0x00, 0x5b, 
-       0x44, 0x9f, 0x1c, 0x00, 0x04, 0x05, 0x06, 0x09, 
-       0x08, 0x07, 0x0a, 0x00, 0xe0, 0x06, 0xe0, 0x05, 
-       0xe0, 0x04, 0xe0, 0x03, 0xe0, 0x02, 0xe0, 0x01, 
-       0xe0, 0x00, 0xe7, 0xff, 0x20, 0x00, 0x47, 0x70, 
-       0xe7, 0xfd, 0x00, 0x00, 0x20, 0x1d, 0x02, 0x80, 
-       0x69, 0x80, 0x49, 0x06, 0x60, 0x08, 0x20, 0x1d, 
-       0x02, 0x80, 0x69, 0x40, 0x49, 0x04, 0x60, 0x08, 
-       0x20, 0x1d, 0x02, 0x80, 0x69, 0xc0, 0x49, 0x03, 
-       0x60, 0x08, 0x47, 0x70, 0x2e, 0x08, 0x94, 0x90, 
-       0x2e, 0x08, 0x94, 0x94, 0x2e, 0x08, 0x94, 0x98, 
-       0xb5, 0xf1, 0xb0, 0x81, 0x20, 0x00, 0x4d, 0x21, 
-       0x95, 0x00, 0x21, 0x00, 0x22, 0x00, 0x23, 0x00, 
-       0x43, 0xdb, 0x4c, 0x1f, 0x68, 0x64, 0x42, 0x8c, 
-       0xdd, 0x21, 0x1c, 0x0c, 0x31, 0x01, 0x00, 0xa4, 
-       0x9d, 0x00, 0x59, 0x2f, 0x42, 0x9f, 0xd0, 0xf8, 
-       0x4c, 0x19, 0x68, 0x64, 0x42, 0x8c, 0xda, 0x00, 
-       0xe0, 0x15, 0x32, 0x01, 0x1c, 0x0c, 0x31, 0x01, 
-       0x00, 0xa4, 0x9d, 0x00, 0x59, 0x2b, 0x42, 0x9f, 
-       0xd0, 0xf8, 0x02, 0x9c, 0x43, 0x3c, 0x1c, 0x25, 
-       0x1c, 0x04, 0x30, 0x01, 0x00, 0xa4, 0x9e, 0x01, 
-       0x51, 0x35, 0x4c, 0x0f, 0x68, 0x64, 0x42, 0x8c, 
-       0xdb, 0x00, 0x32, 0x01, 0xe7, 0xd9, 0x28, 0x08, 
-       0xd3, 0x02, 0xe0, 0x07, 0x30, 0x01, 0xe7, 0xfa, 
-       0x25, 0x00, 0x43, 0xed, 0x00, 0x84, 0x9e, 0x01, 
-       0x51, 0x35, 0xe7, 0xf7, 0x4c, 0x07, 0x68, 0x24, 
-       0x2c, 0x00, 0xd1, 0x02, 0x24, 0x0d, 0x06, 0xe4, 
-       0x61, 0x22, 0xb0, 0x01, 0xb0, 0x01, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x7c, 0xcc, 
-       0x2e, 0x08, 0x7d, 0x94, 0x2e, 0x08, 0x94, 0x84, 
-       0xb5, 0x80, 0x48, 0xdc, 0x68, 0x00, 0x28, 0x00, 
-       0xd1, 0x04, 0x48, 0xda, 0x68, 0x00, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0xf7, 0xff, 0xff, 0x92, 
-       0x48, 0xd7, 0x49, 0xd8, 0x60, 0x08, 0x48, 0xd8, 
-       0x49, 0xd8, 0x60, 0x08, 0x48, 0xd8, 0x49, 0xd9, 
-       0x60, 0x08, 0x48, 0xd3, 0x49, 0xd8, 0x68, 0x0b, 
-       0x4a, 0xd8, 0x21, 0x00, 0xf0, 0x01, 0xf8, 0xda, 
-       0x20, 0x00, 0x49, 0xd0, 0x68, 0x09, 0x60, 0x08, 
-       0x20, 0x00, 0x49, 0xd0, 0x68, 0x09, 0x60, 0x08, 
-       0x20, 0x00, 0x49, 0xd0, 0x68, 0x09, 0x60, 0x08, 
-       0x20, 0x00, 0x49, 0xca, 0x68, 0x09, 0x23, 0x07, 
-       0x02, 0x1b, 0x18, 0xc9, 0x66, 0x88, 0x48, 0xce, 
-       0x49, 0xc6, 0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xc9, 0x66, 0xc8, 0x20, 0x00, 0x49, 0xc5, 
-       0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 
-       0x66, 0x88, 0x48, 0xc7, 0x49, 0xc1, 0x68, 0x09, 
-       0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 0x66, 0xc8, 
-       0x20, 0x00, 0x49, 0xc0, 0x68, 0x09, 0x23, 0x07, 
-       0x02, 0x1b, 0x18, 0xc9, 0x66, 0x88, 0x48, 0xc0, 
-       0x49, 0xbc, 0x68, 0x09, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xc9, 0x66, 0xc8, 0x27, 0x00, 0x2f, 0x19, 
-       0xd3, 0x02, 0xe0, 0x38, 0x37, 0x01, 0xe7, 0xfa, 
-       0x48, 0xba, 0x00, 0xb9, 0x4a, 0xb1, 0x68, 0x12, 
-       0x18, 0x89, 0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 
-       0x62, 0x08, 0x48, 0xb6, 0x00, 0xb9, 0x4a, 0xad, 
-       0x68, 0x12, 0x18, 0x89, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xc9, 0x60, 0x48, 0x48, 0xb1, 0x00, 0xb9, 
-       0x4a, 0xaa, 0x68, 0x12, 0x18, 0x89, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc9, 0x62, 0x08, 0x48, 0xad, 
-       0x00, 0xb9, 0x4a, 0xa6, 0x68, 0x12, 0x18, 0x89, 
-       0x23, 0x07, 0x02, 0x1b, 0x18, 0xc9, 0x60, 0x48, 
-       0x48, 0xa8, 0x00, 0xb9, 0x4a, 0xa3, 0x68, 0x12, 
-       0x18, 0x89, 0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 
-       0x62, 0x08, 0x48, 0xa4, 0x00, 0xb9, 0x4a, 0x9f, 
-       0x68, 0x12, 0x18, 0x89, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xc9, 0x60, 0x48, 0xe7, 0xc6, 0x27, 0x00, 
-       0x2f, 0x07, 0xd3, 0x02, 0xe0, 0x86, 0x37, 0x01, 
-       0xe7, 0xfa, 0x48, 0x9c, 0x00, 0xb9, 0x19, 0xc9, 
-       0x00, 0xc9, 0x4a, 0x92, 0x68, 0x12, 0x18, 0x89, 
-       0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 0x60, 0x08, 
-       0x48, 0x96, 0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 
-       0x4a, 0x8c, 0x68, 0x12, 0x18, 0x89, 0x23, 0x05, 
-       0x02, 0x1b, 0x18, 0xc9, 0x67, 0xc8, 0x48, 0x91, 
-       0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x87, 
-       0x68, 0x12, 0x18, 0x89, 0x23, 0x0b, 0x01, 0xdb, 
-       0x18, 0xc9, 0x60, 0x48, 0x48, 0x8b, 0x00, 0xb9, 
-       0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x81, 0x68, 0x12, 
-       0x18, 0x89, 0x23, 0x05, 0x02, 0x1b, 0x18, 0xc9, 
-       0x67, 0x88, 0x48, 0x86, 0x00, 0xb9, 0x19, 0xc9, 
-       0x00, 0xc9, 0x4a, 0x7e, 0x68, 0x12, 0x18, 0x89, 
-       0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 0x60, 0x08, 
-       0x48, 0x80, 0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 
-       0x4a, 0x78, 0x68, 0x12, 0x18, 0x89, 0x23, 0x05, 
-       0x02, 0x1b, 0x18, 0xc9, 0x67, 0xc8, 0x48, 0x7b, 
-       0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x73, 
-       0x68, 0x12, 0x18, 0x89, 0x23, 0x0b, 0x01, 0xdb, 
-       0x18, 0xc9, 0x60, 0x48, 0x48, 0x75, 0x00, 0xb9, 
-       0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x6d, 0x68, 0x12, 
-       0x18, 0x89, 0x23, 0x05, 0x02, 0x1b, 0x18, 0xc9, 
-       0x67, 0x88, 0x48, 0x70, 0x00, 0xb9, 0x19, 0xc9, 
-       0x00, 0xc9, 0x4a, 0x6a, 0x68, 0x12, 0x18, 0x89, 
-       0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 0x60, 0x08, 
-       0x48, 0x6a, 0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 
-       0x4a, 0x64, 0x68, 0x12, 0x18, 0x89, 0x23, 0x05, 
-       0x02, 0x1b, 0x18, 0xc9, 0x67, 0xc8, 0x48, 0x65, 
-       0x00, 0xb9, 0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x5f, 
-       0x68, 0x12, 0x18, 0x89, 0x23, 0x0b, 0x01, 0xdb, 
-       0x18, 0xc9, 0x60, 0x48, 0x48, 0x5f, 0x00, 0xb9, 
-       0x19, 0xc9, 0x00, 0xc9, 0x4a, 0x59, 0x68, 0x12, 
-       0x18, 0x89, 0x23, 0x05, 0x02, 0x1b, 0x18, 0xc9, 
-       0x67, 0x88, 0xe7, 0x78, 0x27, 0x00, 0x2f, 0x12, 
-       0xd3, 0x02, 0xe0, 0x56, 0x37, 0x01, 0xe7, 0xfa, 
-       0x48, 0x56, 0x21, 0x4c, 0x43, 0x79, 0x4a, 0x4d, 
-       0x68, 0x12, 0x18, 0x89, 0x62, 0xc8, 0x48, 0x53, 
-       0x21, 0x4c, 0x43, 0x79, 0x4a, 0x49, 0x68, 0x12, 
-       0x18, 0x89, 0x62, 0x88, 0x48, 0x4f, 0x21, 0x4c, 
-       0x43, 0x79, 0x4a, 0x46, 0x68, 0x12, 0x18, 0x89, 
-       0x63, 0x08, 0x48, 0x4c, 0x21, 0x4c, 0x43, 0x79, 
-       0x4a, 0x42, 0x68, 0x12, 0x18, 0x89, 0x62, 0x48, 
-       0x48, 0x48, 0x21, 0x4c, 0x43, 0x79, 0x4a, 0x41, 
-       0x68, 0x12, 0x18, 0x89, 0x62, 0xc8, 0x48, 0x45, 
-       0x21, 0x4c, 0x43, 0x79, 0x4a, 0x3d, 0x68, 0x12, 
-       0x18, 0x89, 0x62, 0x88, 0x48, 0x41, 0x21, 0x4c, 
-       0x43, 0x79, 0x4a, 0x3a, 0x68, 0x12, 0x18, 0x89, 
-       0x63, 0x08, 0x48, 0x3e, 0x21, 0x4c, 0x43, 0x79, 
-       0x4a, 0x36, 0x68, 0x12, 0x18, 0x89, 0x62, 0x48, 
-       0x48, 0x3a, 0x21, 0x4c, 0x43, 0x79, 0x4a, 0x35, 
-       0x68, 0x12, 0x18, 0x89, 0x62, 0xc8, 0x48, 0x37, 
-       0x21, 0x4c, 0x43, 0x79, 0x4a, 0x31, 0x68, 0x12, 
-       0x18, 0x89, 0x62, 0x88, 0x48, 0x33, 0x21, 0x4c, 
-       0x43, 0x79, 0x4a, 0x2e, 0x68, 0x12, 0x18, 0x89, 
-       0x63, 0x08, 0x48, 0x30, 0x21, 0x4c, 0x43, 0x79, 
-       0x4a, 0x2a, 0x68, 0x12, 0x18, 0x89, 0x62, 0x48, 
-       0xe7, 0xa8, 0x20, 0x00, 0x49, 0x25, 0x68, 0x09, 
-       0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 0x61, 0xc8, 
-       0x20, 0x00, 0x49, 0x22, 0x68, 0x09, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0x20, 0x00, 
-       0x49, 0x1c, 0x68, 0x09, 0x23, 0x0d, 0x01, 0xdb, 
-       0x18, 0xc9, 0x61, 0xc8, 0x20, 0x00, 0x49, 0x19, 
-       0x68, 0x09, 0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 
-       0x61, 0x88, 0x20, 0x00, 0x49, 0x19, 0x68, 0x09, 
-       0x23, 0x0d, 0x01, 0xdb, 0x18, 0xc9, 0x61, 0xc8, 
-       0x20, 0x00, 0x49, 0x16, 0x68, 0x09, 0x23, 0x0d, 
-       0x01, 0xdb, 0x18, 0xc9, 0x61, 0x88, 0x20, 0x92, 
-       0x49, 0x17, 0x60, 0x08, 0x27, 0x00, 0x2f, 0x08, 
-       0xd3, 0x02, 0xe0, 0x08, 0x37, 0x01, 0xe7, 0xfa, 
-       0x20, 0x00, 0x43, 0xc0, 0x00, 0xb9, 0x4b, 0x13, 
-       0x18, 0xc9, 0x64, 0x08, 0xe7, 0xf6, 0x20, 0x10, 
-       0x21, 0x0d, 0x06, 0xc9, 0x61, 0x08, 0x20, 0x01, 
-       0x49, 0x0f, 0x60, 0x08, 0x48, 0x0e, 0x68, 0x00, 
-       0xe6, 0x4d, 0xe6, 0x4c, 0x2e, 0x08, 0x60, 0x84, 
-       0x2e, 0x08, 0x7d, 0xbc, 0x2e, 0x08, 0x7d, 0xb0, 
-       0x2e, 0x08, 0x85, 0x54, 0x2e, 0x08, 0x7d, 0xb4, 
-       0x2e, 0x08, 0x8c, 0xec, 0x2e, 0x08, 0x7d, 0xb8, 
-       0x2e, 0x08, 0x94, 0x94, 0x00, 0x00, 0x16, 0xc8, 
-       0x3f, 0xff, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 
-       0x2e, 0x08, 0x94, 0x88, 0x68, 0x00, 0x0d, 0x00, 
-       0x2e, 0x08, 0x94, 0x84, 0xb5, 0x90, 0x1c, 0x04, 
-       0x1c, 0x0f, 0x1c, 0x39, 0x20, 0x00, 0xf0, 0x00, 
-       0xf8, 0x4d, 0x1c, 0x39, 0x1c, 0x20, 0xf0, 0x00, 
-       0xf8, 0x03, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0xf0, 0x1c, 0x04, 0x1c, 0x0f, 0x68, 0x78, 
-       0x28, 0x07, 0xd9, 0x1d, 0x23, 0x03, 0x02, 0x5b, 
-       0x18, 0xf8, 0x6d, 0x40, 0x28, 0x00, 0xd0, 0x06, 
-       0x23, 0x03, 0x02, 0x5b, 0x18, 0xf8, 0x6d, 0x80, 
-       0x04, 0x00, 0x0c, 0x00, 0xd1, 0x02, 0x20, 0x02, 
-       0x60, 0xb8, 0xe0, 0x01, 0x20, 0x03, 0x60, 0xb8, 
-       0x1d, 0xfd, 0x35, 0x05, 0x23, 0x65, 0x01, 0x1b, 
-       0x18, 0xfe, 0x1c, 0x31, 0x1c, 0x28, 0x4a, 0x11, 
-       0x68, 0x13, 0x22, 0x28, 0xf0, 0x00, 0xfe, 0xee, 
-       0x2c, 0x06, 0xd0, 0x18, 0x00, 0xa0, 0x19, 0x00, 
-       0x00, 0xc0, 0x19, 0xc0, 0x23, 0x2b, 0x01, 0x5b, 
-       0x18, 0xc6, 0x00, 0xa0, 0x19, 0x00, 0x00, 0xc0, 
-       0x19, 0xc0, 0x23, 0xb1, 0x00, 0xdb, 0x18, 0xc5, 
-       0x20, 0x06, 0x1b, 0x00, 0x00, 0x82, 0x18, 0x12, 
-       0x00, 0xd2, 0x1c, 0x31, 0x1c, 0x28, 0x4b, 0x04, 
-       0x68, 0x1b, 0xf0, 0x00, 0xfe, 0xd3, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x94, 0x90, 
-       0x2e, 0x08, 0x94, 0x98, 0xb5, 0xf0, 0x1c, 0x07, 
-       0x1c, 0x0c, 0x2f, 0x10, 0xd0, 0x13, 0x20, 0x4c, 
-       0x43, 0x78, 0x19, 0x00, 0x1d, 0xc6, 0x36, 0x01, 
-       0x20, 0x4c, 0x43, 0x78, 0x19, 0x00, 0x1d, 0xc5, 
-       0x35, 0x4d, 0x20, 0x10, 0x1b, 0xc0, 0x22, 0x4c, 
-       0x43, 0x42, 0x1c, 0x31, 0x1c, 0x28, 0x4b, 0x03, 
-       0x68, 0x1b, 0xf0, 0x00, 0xfe, 0xb3, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x94, 0x98, 
-       0xb5, 0x90, 0x1c, 0x04, 0x1c, 0x0f, 0x1c, 0x39, 
-       0x1c, 0x20, 0xf0, 0x00, 0xf8, 0x07, 0x1c, 0x39, 
-       0x20, 0x00, 0xf0, 0x00, 0xf8, 0x33, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0xf0, 0x1c, 0x04, 
-       0x1c, 0x0f, 0x00, 0xa0, 0x19, 0x00, 0x00, 0xc0, 
-       0x19, 0xc0, 0x23, 0xb1, 0x00, 0xdb, 0x18, 0xc6, 
-       0x00, 0xa0, 0x19, 0x00, 0x00, 0xc0, 0x19, 0xc0, 
-       0x23, 0x2b, 0x01, 0x5b, 0x18, 0xc5, 0x20, 0x06, 
-       0x1b, 0x00, 0x00, 0x82, 0x18, 0x12, 0x00, 0xd2, 
-       0x1c, 0x31, 0x1c, 0x28, 0x4b, 0x09, 0x68, 0x1b, 
-       0xf0, 0x00, 0xfe, 0x84, 0x1d, 0xfe, 0x36, 0x05, 
-       0x23, 0x65, 0x01, 0x1b, 0x18, 0xfd, 0x1c, 0x31, 
-       0x1c, 0x28, 0x4a, 0x05, 0x68, 0x13, 0x22, 0x28, 
-       0xf0, 0x00, 0xfe, 0x78, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x94, 0x98, 
-       0x2e, 0x08, 0x94, 0x90, 0xb5, 0xf0, 0x1c, 0x07, 
-       0x1c, 0x0c, 0x20, 0x4c, 0x43, 0x78, 0x19, 0x00, 
-       0x1d, 0xc6, 0x36, 0x4d, 0x20, 0x4c, 0x43, 0x78, 
-       0x19, 0x00, 0x1d, 0xc5, 0x35, 0x01, 0x20, 0x10, 
-       0x1b, 0xc0, 0x22, 0x4c, 0x43, 0x42, 0x1c, 0x31, 
-       0x1c, 0x28, 0x4b, 0x03, 0x68, 0x1b, 0xf0, 0x00, 
-       0xfe, 0x59, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x94, 0x98, 0xb4, 0xb0, 0x1c, 0x02, 
-       0x1c, 0x0f, 0x20, 0x00, 0x1c, 0x03, 0x30, 0x01, 
-       0x00, 0x9b, 0x18, 0x9c, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xe3, 0x68, 0x5b, 0x10, 0x7c, 0x34, 0x01, 
-       0x42, 0xa3, 0xd2, 0x00, 0xe7, 0xf2, 0x38, 0x01, 
-       0x21, 0x18, 0x42, 0x81, 0xd8, 0x02, 0xe0, 0x1a, 
-       0x39, 0x01, 0xe7, 0xfa, 0x00, 0x8b, 0x18, 0x9c, 
-       0x23, 0x0d, 0x01, 0xdb, 0x18, 0xe3, 0x69, 0xdc, 
-       0x00, 0x8b, 0x18, 0x9d, 0x23, 0x0d, 0x01, 0xdb, 
-       0x18, 0xeb, 0x62, 0x1c, 0x00, 0x8b, 0x18, 0x9c, 
-       0x23, 0x07, 0x02, 0x1b, 0x18, 0xe3, 0x68, 0x1c, 
-       0x00, 0x8b, 0x18, 0x9d, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xeb, 0x60, 0x5c, 0xe7, 0xe4, 0x23, 0x00, 
-       0x2b, 0x00, 0xd0, 0x10, 0x10, 0x7b, 0x1c, 0x5c, 
-       0x00, 0x83, 0x18, 0x9d, 0x23, 0x0d, 0x01, 0xdb, 
-       0x18, 0xeb, 0x62, 0x1c, 0x10, 0x7b, 0x1c, 0x5c, 
-       0x00, 0x83, 0x18, 0x9d, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xeb, 0x60, 0x5c, 0xe0, 0x0e, 0x10, 0x7c, 
-       0x00, 0x83, 0x18, 0x9d, 0x23, 0x0d, 0x01, 0xdb, 
-       0x18, 0xeb, 0x62, 0x1c, 0x10, 0x7b, 0x1c, 0x5c, 
-       0x00, 0x83, 0x18, 0x9d, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xeb, 0x60, 0x5c, 0xbc, 0xb0, 0x47, 0x70, 
-       0xb4, 0xb0, 0x1c, 0x02, 0x1c, 0x0f, 0x21, 0x00, 
-       0x1c, 0x0b, 0x31, 0x01, 0x00, 0x9b, 0x18, 0x9c, 
-       0x23, 0x07, 0x02, 0x1b, 0x18, 0xe3, 0x68, 0x5b, 
-       0x10, 0x7c, 0x34, 0x01, 0x42, 0xa3, 0xd0, 0x00, 
-       0xe7, 0xf2, 0x39, 0x01, 0x1c, 0x08, 0x28, 0x18, 
-       0xd3, 0x02, 0xe0, 0x1a, 0x30, 0x01, 0xe7, 0xfa, 
-       0x00, 0x83, 0x18, 0x9c, 0x23, 0x0d, 0x01, 0xdb, 
-       0x18, 0xe3, 0x6a, 0x5c, 0x00, 0x83, 0x18, 0x9d, 
-       0x23, 0x0d, 0x01, 0xdb, 0x18, 0xeb, 0x62, 0x1c, 
-       0x00, 0x83, 0x18, 0x9c, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xe3, 0x68, 0x9c, 0x00, 0x83, 0x18, 0x9d, 
-       0x23, 0x07, 0x02, 0x1b, 0x18, 0xeb, 0x60, 0x5c, 
-       0xe7, 0xe4, 0x4c, 0x06, 0x23, 0x07, 0x02, 0x1b, 
-       0x18, 0xd3, 0x60, 0x1c, 0x4c, 0x03, 0x23, 0x07, 
-       0x02, 0x1b, 0x18, 0xd3, 0x66, 0x5c, 0xbc, 0xb0, 
-       0x47, 0x70, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
-       0xb4, 0xb0, 0x1c, 0x07, 0x1c, 0x0c, 0x1c, 0x15, 
-       0x6a, 0xa1, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x19, 
-       0x62, 0x39, 0x21, 0x01, 0x02, 0x89, 0x43, 0x29, 
-       0x62, 0x79, 0x6a, 0xe1, 0x05, 0x89, 0x0d, 0x89, 
-       0x61, 0xf9, 0x6b, 0x61, 0x31, 0x01, 0x05, 0x89, 
-       0x0d, 0x89, 0x61, 0xb9, 0x69, 0x61, 0x60, 0xf9, 
-       0x69, 0xa1, 0x61, 0x39, 0x69, 0xe1, 0x61, 0x79, 
-       0x68, 0xa1, 0x23, 0x01, 0x06, 0x1b, 0x40, 0x19, 
-       0xd0, 0x02, 0x49, 0x0f, 0x60, 0xb9, 0xe0, 0x01, 
-       0x21, 0x00, 0x60, 0xb9, 0x6a, 0x60, 0x28, 0x00, 
-       0xd0, 0x0b, 0x68, 0x41, 0x60, 0x39, 0x78, 0x01, 
-       0x00, 0x89, 0x4b, 0x0a, 0x18, 0xc9, 0x60, 0x79, 
-       0x68, 0xb9, 0x88, 0x42, 0x43, 0x11, 0x60, 0xb9, 
-       0xe0, 0x07, 0x21, 0x00, 0x60, 0x39, 0x21, 0x00, 
-       0x60, 0x79, 0x68, 0xb9, 0x0c, 0x09, 0x04, 0x09, 
-       0x60, 0xb9, 0xbc, 0xb0, 0x47, 0x70, 0x00, 0x00, 
-       0xff, 0xff, 0x00, 0x00, 0x68, 0x00, 0x08, 0x00, 
-       0xb4, 0x80, 0x1c, 0x02, 0x1c, 0x0f, 0x69, 0x79, 
-       0x60, 0xd1, 0x69, 0xb9, 0x61, 0x11, 0x69, 0xf9, 
-       0x61, 0x51, 0x68, 0xb9, 0x23, 0x01, 0x06, 0x1b, 
-       0x40, 0x19, 0xd0, 0x02, 0x49, 0x0e, 0x60, 0x91, 
-       0xe0, 0x01, 0x21, 0x00, 0x60, 0x91, 0x6a, 0x78, 
-       0x28, 0x00, 0xd0, 0x0b, 0x68, 0x41, 0x60, 0x11, 
-       0x78, 0x01, 0x00, 0x89, 0x4b, 0x09, 0x18, 0xc9, 
-       0x60, 0x51, 0x68, 0x91, 0x88, 0x43, 0x43, 0x19, 
-       0x60, 0x91, 0xe0, 0x07, 0x21, 0x00, 0x60, 0x11, 
-       0x21, 0x00, 0x60, 0x51, 0x68, 0x91, 0x0c, 0x09, 
-       0x04, 0x09, 0x60, 0x91, 0xbc, 0x80, 0x47, 0x70, 
-       0xff, 0xff, 0x00, 0x00, 0x68, 0x00, 0x08, 0x00, 
-       0x1c, 0x01, 0x48, 0x07, 0x62, 0x08, 0x48, 0x06, 
-       0x62, 0x48, 0x48, 0x05, 0x61, 0xc8, 0x48, 0x04, 
-       0x61, 0x88, 0x20, 0x00, 0x60, 0x08, 0x20, 0x00, 
-       0x60, 0x48, 0x20, 0x00, 0x60, 0x88, 0x47, 0x70, 
-       0x00, 0x00, 0xff, 0xff, 0xb5, 0xb0, 0x1c, 0x07, 
-       0x1c, 0x0c, 0x2c, 0x07, 0xd2, 0x73, 0x25, 0x00, 
-       0x2d, 0x07, 0xdb, 0x02, 0xe0, 0x2f, 0x35, 0x01, 
-       0xe7, 0xfa, 0x00, 0xa8, 0x19, 0x40, 0x00, 0xc0, 
-       0x19, 0xc0, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc0, 
-       0x68, 0x00, 0x00, 0xa9, 0x19, 0x49, 0x00, 0xc9, 
-       0x19, 0xc9, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 
-       0x68, 0x49, 0x42, 0x88, 0xd0, 0x1a, 0x00, 0xa8, 
-       0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 
-       0x01, 0xdb, 0x18, 0xc0, 0x68, 0x40, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 0x00, 0xa8, 
-       0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 
-       0x01, 0xdb, 0x18, 0xc0, 0x68, 0x00, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 0x48, 0xf8, 
-       0xf0, 0x00, 0xfb, 0xd2, 0xe7, 0xcf, 0x23, 0xcf, 
-       0x00, 0xdb, 0x18, 0xf8, 0xf7, 0xff, 0xfb, 0xb8, 
-       0x25, 0x00, 0x2d, 0x07, 0xdb, 0x02, 0xe0, 0x54, 
-       0x35, 0x01, 0xe7, 0xfa, 0x00, 0xa8, 0x19, 0x40, 
-       0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 0x01, 0xdb, 
-       0x18, 0xc0, 0x68, 0x00, 0x00, 0xa9, 0x19, 0x49, 
-       0x00, 0xc9, 0x19, 0xc9, 0x23, 0x0b, 0x01, 0xdb, 
-       0x18, 0xc9, 0x68, 0x49, 0x42, 0x88, 0xd0, 0x1a, 
-       0x00, 0xa8, 0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 
-       0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc0, 0x68, 0x40, 
-       0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 
-       0x00, 0xa8, 0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 
-       0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc0, 0x68, 0x00, 
-       0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 
-       0x48, 0xdb, 0xf0, 0x00, 0xfb, 0x6b, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 
-       0x43, 0x69, 0x19, 0xc9, 0xe0, 0x00, 0xe0, 0x94, 
-       0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 0x48, 0xcc, 
-       0xf0, 0x00, 0xfb, 0x7a, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x30, 0x34, 0xf7, 0xff, 0xfb, 0x60, 
-       0xe7, 0xaa, 0x25, 0x07, 0x2d, 0x11, 0xdb, 0x02, 
-       0xe0, 0x4e, 0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 
-       0x38, 0x02, 0x69, 0x80, 0x21, 0x4c, 0x43, 0x69, 
-       0x19, 0xc9, 0x39, 0xff, 0x39, 0xff, 0x39, 0x02, 
-       0x69, 0xc9, 0x42, 0x88, 0xd0, 0x18, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 
-       0x38, 0x02, 0x69, 0xc0, 0x23, 0x01, 0x02, 0x9b, 
-       0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
-       0x69, 0x80, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
-       0x1c, 0x01, 0x48, 0xb1, 0xf0, 0x00, 0xfb, 0x16, 
-       0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 
-       0x21, 0x4c, 0x43, 0x69, 0x19, 0xc9, 0x6b, 0x09, 
-       0x42, 0x88, 0xd0, 0x12, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x6b, 0x00, 0x23, 0x01, 0x02, 0x9b, 
-       0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x6a, 0xc0, 0x23, 0x01, 0x02, 0x9b, 
-       0x43, 0x98, 0x1c, 0x01, 0x48, 0xa2, 0xf0, 0x00, 
-       0xfb, 0x27, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
-       0x30, 0x34, 0xf7, 0xff, 0xfb, 0x0d, 0xe7, 0xb0, 
-       0x25, 0x0a, 0x2d, 0x11, 0xdb, 0x02, 0xe0, 0x1f, 
-       0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 0x43, 0x69, 
-       0x19, 0xc9, 0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 
-       0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 
-       0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 
-       0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 
-       0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 
-       0x48, 0x8d, 0xf0, 0x00, 0xfa, 0xcf, 0xe7, 0xdf, 
-       0xe1, 0xca, 0x2c, 0x0e, 0xd3, 0x73, 0x3c, 0x07, 
-       0x1f, 0xe5, 0x42, 0xa5, 0xd3, 0x02, 0xe0, 0x1f, 
-       0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 0x43, 0x69, 
-       0x19, 0xc9, 0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 
-       0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 
-       0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 
-       0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 
-       0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 
-       0x48, 0x79, 0xf0, 0x00, 0xfa, 0xd5, 0xe7, 0xdf, 
-       0x1c, 0x25, 0x2d, 0x11, 0xdb, 0x02, 0xe0, 0x50, 
-       0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
-       0x69, 0x80, 0x21, 0x4c, 0x43, 0x69, 0x19, 0xc9, 
-       0x39, 0xff, 0x39, 0xff, 0x39, 0x02, 0x69, 0xc9, 
-       0x42, 0x88, 0xd0, 0x18, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
-       0x69, 0xc0, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
-       0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
-       0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 0x69, 0x80, 
-       0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 
-       0x48, 0x61, 0xf0, 0x00, 0xfa, 0x77, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 
-       0x43, 0x69, 0x19, 0xc9, 0x6b, 0x09, 0x42, 0x88, 
-       0xd0, 0x12, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
-       0x6b, 0x00, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
-       0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
-       0x6a, 0xc0, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
-       0x1c, 0x01, 0x48, 0x53, 0xf0, 0x00, 0xfa, 0x88, 
-       0x20, 0x4c, 0x43, 0x68, 0xe0, 0x00, 0xe0, 0x29, 
-       0x19, 0xc0, 0x30, 0x34, 0xf7, 0xff, 0xfa, 0x6c, 
-       0xe7, 0xae, 0x25, 0x0a, 0x2d, 0x11, 0xdb, 0x02, 
-       0xe0, 0x1f, 0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 
-       0x43, 0x69, 0x19, 0xc9, 0x6b, 0x09, 0x42, 0x88, 
-       0xd0, 0x12, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
-       0x6b, 0x00, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
-       0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
-       0x6a, 0xc0, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
-       0x1c, 0x01, 0x48, 0x3d, 0xf0, 0x00, 0xfa, 0x2e, 
-       0xe7, 0xdf, 0xe1, 0x29, 0x3c, 0x07, 0x1c, 0x25, 
-       0x2d, 0x07, 0xdb, 0x02, 0xe0, 0x2f, 0x35, 0x01, 
-       0xe7, 0xfa, 0x00, 0xa8, 0x19, 0x40, 0x00, 0xc0, 
-       0x19, 0xc0, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc0, 
-       0x68, 0x00, 0x00, 0xa9, 0x19, 0x49, 0x00, 0xc9, 
-       0x19, 0xc9, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 
-       0x68, 0x49, 0x42, 0x88, 0xd0, 0x1a, 0x00, 0xa8, 
-       0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 
-       0x01, 0xdb, 0x18, 0xc0, 0x68, 0x40, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 0x00, 0xa8, 
-       0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 
-       0x01, 0xdb, 0x18, 0xc0, 0x68, 0x00, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 0x48, 0x22, 
-       0xf0, 0x00, 0xfa, 0x26, 0xe7, 0xcf, 0x25, 0x00, 
-       0x42, 0xa5, 0xd3, 0x02, 0xe0, 0x1f, 0x35, 0x01, 
-       0xe7, 0xfa, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
-       0x6a, 0xc0, 0x21, 0x4c, 0x43, 0x69, 0x19, 0xc9, 
-       0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 0x48, 0x10, 
-       0xf0, 0x00, 0xfa, 0x02, 0xe7, 0xdf, 0x1c, 0x25, 
-       0x2d, 0x07, 0xdb, 0x02, 0xe0, 0x55, 0x35, 0x01, 
-       0xe7, 0xfa, 0x00, 0xa8, 0x19, 0x40, 0x00, 0xc0, 
-       0x19, 0xc0, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc0, 
-       0x68, 0x00, 0x00, 0xa9, 0x19, 0x49, 0x00, 0xc9, 
-       0x19, 0xc9, 0x23, 0x0b, 0x01, 0xdb, 0x18, 0xc9, 
-       0x68, 0x49, 0x42, 0x88, 0xd0, 0x1d, 0x00, 0xa8, 
-       0x19, 0x40, 0x00, 0xc0, 0x19, 0xc0, 0xe0, 0x01, 
-       0x2e, 0x08, 0x7d, 0x94, 0x23, 0x0b, 0x01, 0xdb, 
-       0x18, 0xc0, 0x68, 0x40, 0x23, 0x01, 0x02, 0x9b, 
-       0x43, 0x98, 0x1c, 0x02, 0x00, 0xa8, 0x19, 0x40, 
-       0x00, 0xc0, 0x19, 0xc0, 0x23, 0x0b, 0x01, 0xdb, 
-       0x18, 0xc0, 0x68, 0x00, 0x23, 0x01, 0x02, 0x9b, 
-       0x43, 0x98, 0x1c, 0x01, 0x48, 0x50, 0xf0, 0x00, 
-       0xf9, 0x9d, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
-       0x6a, 0xc0, 0x21, 0x4c, 0x43, 0x69, 0x19, 0xc9, 
-       0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 0x23, 0x01, 
-       0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 0x48, 0x42, 
-       0xf0, 0x00, 0xf9, 0xae, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x30, 0x34, 0xf7, 0xff, 0xf9, 0x94, 
-       0xe7, 0xa9, 0x25, 0x07, 0x2d, 0x11, 0xdb, 0x02, 
-       0xe0, 0x4e, 0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 
-       0x38, 0x02, 0x69, 0x80, 0x21, 0x4c, 0x43, 0x69, 
-       0x19, 0xc9, 0x39, 0xff, 0x39, 0xff, 0x39, 0x02, 
-       0x69, 0xc9, 0x42, 0x88, 0xd0, 0x18, 0x20, 0x4c, 
-       0x43, 0x68, 0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 
-       0x38, 0x02, 0x69, 0xc0, 0x23, 0x01, 0x02, 0x9b, 
-       0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x38, 0xff, 0x38, 0xff, 0x38, 0x02, 
-       0x69, 0x80, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 
-       0x1c, 0x01, 0x48, 0x27, 0xf0, 0x00, 0xf9, 0x4a, 
-       0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 
-       0x21, 0x4c, 0x43, 0x69, 0x19, 0xc9, 0x6b, 0x09, 
-       0x42, 0x88, 0xd0, 0x12, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x6b, 0x00, 0x23, 0x01, 0x02, 0x9b, 
-       0x43, 0x98, 0x1c, 0x02, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x6a, 0xc0, 0x23, 0x01, 0x02, 0x9b, 
-       0x43, 0x98, 0x1c, 0x01, 0x48, 0x18, 0xf0, 0x00, 
-       0xf9, 0x5b, 0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 
-       0x30, 0x34, 0xf7, 0xff, 0xf9, 0x41, 0xe7, 0xb0, 
-       0x25, 0x0a, 0x2d, 0x11, 0xdb, 0x02, 0xe0, 0x1f, 
-       0x35, 0x01, 0xe7, 0xfa, 0x20, 0x4c, 0x43, 0x68, 
-       0x19, 0xc0, 0x6a, 0xc0, 0x21, 0x4c, 0x43, 0x69, 
-       0x19, 0xc9, 0x6b, 0x09, 0x42, 0x88, 0xd0, 0x12, 
-       0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6b, 0x00, 
-       0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x02, 
-       0x20, 0x4c, 0x43, 0x68, 0x19, 0xc0, 0x6a, 0xc0, 
-       0x23, 0x01, 0x02, 0x9b, 0x43, 0x98, 0x1c, 0x01, 
-       0x48, 0x03, 0xf0, 0x00, 0xf9, 0x03, 0xe7, 0xdf, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x7d, 0x94, 0xb4, 0x90, 0x1c, 0x02, 
-       0x1c, 0x0f, 0x3a, 0x01, 0x2f, 0x01, 0xd1, 0x0d, 
-       0x09, 0x50, 0x00, 0x80, 0x49, 0x0d, 0x58, 0x08, 
-       0x06, 0xd4, 0x0e, 0xe4, 0x21, 0x01, 0x40, 0xa1, 
-       0x43, 0x08, 0x09, 0x51, 0x00, 0x89, 0x4b, 0x09, 
-       0x50, 0x58, 0xe0, 0x0d, 0x09, 0x50, 0x00, 0x80, 
-       0x49, 0x06, 0x58, 0x08, 0x06, 0xd4, 0x0e, 0xe4, 
-       0x21, 0x01, 0x40, 0xa1, 0x43, 0xc9, 0x40, 0x01, 
-       0x09, 0x50, 0x00, 0x80, 0x4b, 0x01, 0x50, 0x19, 
-       0xbc, 0x90, 0x47, 0x70, 0x2e, 0x08, 0x94, 0x8c, 
-       0xb4, 0x80, 0x1c, 0x01, 0x39, 0x01, 0x09, 0x48, 
-       0x00, 0x80, 0x4a, 0x08, 0x58, 0x10, 0x06, 0xca, 
-       0x0e, 0xd2, 0x27, 0x01, 0x40, 0x97, 0x1c, 0x3b, 
-       0x40, 0x18, 0xd0, 0x03, 0x20, 0x01, 0xbc, 0x80, 
-       0x47, 0x70, 0xe0, 0x01, 0x20, 0x00, 0xe7, 0xfa, 
-       0xe7, 0xf9, 0x00, 0x00, 0x2e, 0x08, 0x94, 0x8c, 
-       0xb4, 0xf0, 0x1c, 0x07, 0x1c, 0x0a, 0x68, 0x54, 
-       0x6a, 0xf8, 0x05, 0x86, 0x0d, 0xb6, 0x2c, 0x07, 
-       0xda, 0x01, 0x1c, 0x20, 0xe0, 0x00, 0x20, 0x07, 
-       0x1c, 0x05, 0x21, 0x00, 0x42, 0xa9, 0xd3, 0x02, 
-       0xe0, 0x15, 0x31, 0x01, 0xe7, 0xfa, 0x00, 0x88, 
-       0x18, 0x40, 0x00, 0xc0, 0x18, 0x80, 0x23, 0x05, 
-       0x02, 0x1b, 0x18, 0xc0, 0x6f, 0xc0, 0x42, 0xb0, 
-       0xd1, 0x08, 0x00, 0x88, 0x18, 0x40, 0x00, 0xc0, 
-       0x18, 0x80, 0x23, 0x2b, 0x01, 0x5b, 0x18, 0xc0, 
-       0xbc, 0xf0, 0x47, 0x70, 0xe7, 0xe9, 0x1f, 0xe0, 
-       0x28, 0x11, 0xda, 0x01, 0x1f, 0xe0, 0xe0, 0x00, 
-       0x20, 0x11, 0x1c, 0x05, 0x21, 0x00, 0x42, 0xa9, 
-       0xd3, 0x02, 0xe0, 0x0d, 0x31, 0x01, 0xe7, 0xfa, 
-       0x20, 0x4c, 0x43, 0x48, 0x18, 0x80, 0x6a, 0x80, 
-       0x42, 0xb0, 0xd1, 0x04, 0x20, 0x4c, 0x43, 0x48, 
-       0x18, 0x80, 0x30, 0x0c, 0xe7, 0xe4, 0xe7, 0xf1, 
-       0x20, 0x00, 0xe7, 0xe1, 0xe7, 0xe0, 0xb5, 0x90, 
-       0x48, 0x07, 0x68, 0x04, 0x48, 0x07, 0x68, 0x07, 
-       0x1c, 0x39, 0x1c, 0x20, 0x4a, 0x06, 0x68, 0x13, 
-       0x22, 0xf3, 0x00, 0xd2, 0xf0, 0x00, 0xf9, 0xca, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x7d, 0xb4, 0x2e, 0x08, 0x7d, 0xb8, 
-       0x2e, 0x08, 0x94, 0x90, 0xb4, 0xf0, 0x1c, 0x01, 
-       0xb0, 0x83, 0x22, 0x00, 0x68, 0x4b, 0x2b, 0x07, 
-       0xdd, 0x01, 0x23, 0x07, 0xe0, 0x00, 0x68, 0x4b, 
-       0x1c, 0x1c, 0x23, 0x00, 0x43, 0xdb, 0x93, 0x02, 
-       0x23, 0x00, 0x43, 0xdb, 0x93, 0x01, 0x23, 0x00, 
-       0x93, 0x00, 0x4b, 0x17, 0x68, 0x1b, 0x2b, 0x00, 
-       0xd0, 0x07, 0x4b, 0x15, 0x68, 0x1b, 0x6a, 0xdb, 
-       0x93, 0x02, 0x4b, 0x13, 0x68, 0x1b, 0x6b, 0x5b, 
-       0x93, 0x01, 0x20, 0x00, 0x42, 0xa0, 0xd3, 0x02, 
-       0xe0, 0x16, 0x30, 0x01, 0xe7, 0xfa, 0x00, 0x83, 
-       0x18, 0x1b, 0x00, 0xdb, 0x18, 0x5d, 0x23, 0x05, 
-       0x02, 0x1b, 0x18, 0xeb, 0x6e, 0x9f, 0x04, 0x3b, 
-       0x0c, 0x1b, 0xd0, 0x08, 0x0c, 0x3b, 0x04, 0x1b, 
-       0xd0, 0x05, 0x9b, 0x00, 0x18, 0xc5, 0x26, 0x01, 
-       0x40, 0xae, 0x1c, 0x33, 0x43, 0x1a, 0xe7, 0xe8, 
-       0x23, 0x0d, 0x01, 0xdb, 0x18, 0xcb, 0x61, 0xda, 
-       0xb0, 0x03, 0xbc, 0xf0, 0x47, 0x70, 0x00, 0x00, 
-       0x2e, 0x08, 0x7c, 0x58, 0xb4, 0x80, 0x1c, 0x01, 
-       0x20, 0x00, 0x68, 0x0a, 0x42, 0x90, 0xdb, 0x02, 
-       0xe0, 0x07, 0x30, 0x01, 0xe7, 0xf9, 0x23, 0x00, 
-       0x43, 0xdb, 0x68, 0x8a, 0x00, 0x87, 0x51, 0xd3, 
-       0xe7, 0xf7, 0x22, 0x00, 0x43, 0xd2, 0x68, 0x8b, 
-       0x68, 0x0f, 0x00, 0xbf, 0x51, 0xda, 0x23, 0x00, 
-       0x43, 0xdb, 0x68, 0x8a, 0x68, 0x0f, 0x00, 0xbf, 
-       0x19, 0xd2, 0x60, 0x53, 0x22, 0x00, 0x60, 0x4a, 
-       0xbc, 0x80, 0x47, 0x70, 0xb4, 0xf0, 0x1c, 0x03, 
-       0x1c, 0x0c, 0x1c, 0x17, 0x68, 0x9a, 0xca, 0x40, 
-       0x42, 0xa6, 0xd2, 0x00, 0xe7, 0xfb, 0x3a, 0x04, 
-       0x1c, 0x11, 0xc9, 0x40, 0x42, 0xbe, 0xd2, 0x00, 
-       0xe7, 0xfb, 0x39, 0x04, 0x68, 0x10, 0x42, 0xa0, 
-       0xd1, 0x02, 0x68, 0x08, 0x42, 0xb8, 0xd0, 0x02, 
-       0x20, 0xff, 0xbc, 0xf0, 0x47, 0x70, 0x39, 0x04, 
-       0x68, 0x98, 0x68, 0x5e, 0x00, 0xb6, 0x19, 0x85, 
-       0x68, 0x58, 0x38, 0x02, 0x60, 0x58, 0x68, 0x50, 
-       0x60, 0x10, 0x32, 0x04, 0x42, 0x8a, 0xd3, 0xfa, 
-       0x68, 0x88, 0x60, 0x08, 0x31, 0x04, 0x42, 0xa9, 
-       0xd3, 0xfa, 0x20, 0x00, 0xe7, 0xe9, 0xe7, 0xe8, 
-       0xb4, 0xf0, 0x1c, 0x03, 0x1c, 0x0c, 0x1c, 0x17, 
-       0x68, 0x58, 0x68, 0x1e, 0x3e, 0x01, 0x42, 0xb0, 
-       0xdb, 0x02, 0x20, 0xff, 0xbc, 0xf0, 0x47, 0x70, 
-       0x68, 0x9a, 0xca, 0x40, 0x42, 0xa6, 0xd2, 0x00, 
-       0xe7, 0xfb, 0x3a, 0x04, 0x1c, 0x15, 0xcd, 0x40, 
-       0x42, 0xbe, 0xd2, 0x00, 0xe7, 0xfb, 0x68, 0x58, 
-       0x30, 0x02, 0x60, 0x58, 0x68, 0x98, 0x68, 0x5e, 
-       0x00, 0xb6, 0x19, 0x80, 0x1f, 0xc1, 0x39, 0x01, 
-       0x68, 0x08, 0x60, 0x88, 0x39, 0x04, 0x1d, 0xc8, 
-       0x30, 0x01, 0x42, 0xa8, 0xd8, 0xf8, 0x60, 0x8f, 
-       0x68, 0x08, 0x60, 0x48, 0x39, 0x04, 0x1d, 0x08, 
-       0x42, 0x90, 0xd8, 0xf9, 0x60, 0x14, 0x20, 0x00, 
-       0xe7, 0xd8, 0xe7, 0xd7, 0xb5, 0xf0, 0x1c, 0x07, 
-       0x1c, 0x0c, 0xb0, 0x81, 0x1c, 0x38, 0x21, 0x00, 
-       0xf0, 0x0c, 0xff, 0xe0, 0x1c, 0x06, 0x1c, 0x38, 
-       0x21, 0x01, 0xf0, 0x0c, 0xff, 0xdb, 0x90, 0x00, 
-       0x1c, 0x31, 0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x50, 
-       0x49, 0x20, 0x68, 0x09, 0x60, 0x08, 0x99, 0x00, 
-       0x1c, 0x38, 0xf0, 0x00, 0xf8, 0x49, 0x49, 0x1e, 
-       0x68, 0x09, 0x60, 0x08, 0x48, 0x1b, 0x68, 0x00, 
-       0x68, 0x05, 0x48, 0x1c, 0x68, 0x01, 0x23, 0x02, 
-       0x43, 0xdb, 0x40, 0x19, 0x60, 0x01, 0x2c, 0x00, 
-       0xd0, 0x0c, 0x48, 0x19, 0x68, 0x00, 0x78, 0x00, 
-       0x28, 0x00, 0xd0, 0x07, 0x48, 0x14, 0x68, 0x00, 
-       0x68, 0x05, 0x48, 0x14, 0x68, 0x01, 0x23, 0x02, 
-       0x43, 0x19, 0x60, 0x01, 0x1c, 0x20, 0x49, 0x13, 
-       0x68, 0x09, 0x70, 0x08, 0x48, 0x12, 0x63, 0xc5, 
-       0x20, 0x3f, 0x04, 0x00, 0x40, 0x28, 0x0c, 0x00, 
-       0x49, 0x10, 0x62, 0x08, 0x20, 0xff, 0x02, 0x00, 
-       0x40, 0x28, 0x0a, 0x00, 0x49, 0x0d, 0x62, 0x48, 
-       0x06, 0xa8, 0x0e, 0x80, 0x23, 0x80, 0x43, 0x18, 
-       0x49, 0x0a, 0x62, 0x88, 0x1c, 0x28, 0xb0, 0x01, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xb0, 0x01, 
-       0xe7, 0xfa, 0x00, 0x00, 0x2e, 0x08, 0x94, 0x9c, 
-       0x2e, 0x08, 0x94, 0xa0, 0x6a, 0x00, 0x00, 0x18, 
-       0x2e, 0x08, 0x94, 0xa4, 0x2e, 0x08, 0x94, 0xa8, 
-       0x68, 0x00, 0x0d, 0x00, 0x72, 0x00, 0x01, 0x00, 
-       0xb4, 0x80, 0x1c, 0x02, 0x1c, 0x0f, 0x06, 0xb9, 
-       0x0e, 0x89, 0x20, 0x01, 0x03, 0x80, 0x40, 0x10, 
-       0x09, 0xc0, 0x43, 0x01, 0x20, 0xf0, 0x40, 0x10, 
-       0x01, 0x40, 0x43, 0x01, 0x07, 0x10, 0x0f, 0x00, 
-       0x03, 0x00, 0x43, 0x01, 0x20, 0x07, 0x02, 0xc0, 
-       0x40, 0x10, 0x01, 0x40, 0x43, 0x01, 0x20, 0x07, 
-       0x02, 0x00, 0x40, 0x10, 0x02, 0xc0, 0x43, 0x01, 
-       0x1c, 0x08, 0xbc, 0x80, 0x47, 0x70, 0xe7, 0xfc, 
-       0xb5, 0xff, 0x1c, 0x05, 0x1c, 0x0c, 0x1c, 0x17, 
-       0x9b, 0x03, 0x06, 0x18, 0x16, 0x06, 0x20, 0x33, 
-       0x06, 0x40, 0x6b, 0x80, 0x1c, 0x01, 0x20, 0x04, 
-       0x40, 0x08, 0xd0, 0x05, 0x20, 0xd0, 0xb0, 0x04, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0xe0, 0x17, 
-       0x23, 0x04, 0x43, 0xdb, 0x40, 0x19, 0x01, 0x08, 
-       0x4b, 0x0a, 0x68, 0x1b, 0x18, 0xc2, 0x60, 0x15, 
-       0x60, 0x54, 0x2e, 0xfe, 0xd0, 0x04, 0x20, 0x01, 
-       0x40, 0xb0, 0x60, 0xd0, 0x4b, 0x06, 0x43, 0x1f, 
-       0x60, 0x97, 0x20, 0x01, 0x40, 0x88, 0x23, 0x33, 
-       0x06, 0x5b, 0x63, 0x58, 0x20, 0x00, 0xe7, 0xe2, 
-       0xe7, 0xe1, 0x00, 0x00, 0x2e, 0x08, 0x20, 0x0c, 
-       0x80, 0x00, 0x00, 0x00, 0xb4, 0xb0, 0x1c, 0x01, 
-       0x06, 0x08, 0x16, 0x04, 0x4f, 0x0c, 0x22, 0x00, 
-       0x20, 0x00, 0x28, 0x04, 0xd3, 0x02, 0xe0, 0x0b, 
-       0x30, 0x01, 0xe7, 0xfa, 0x01, 0x03, 0x19, 0xdb, 
-       0x68, 0x5b, 0x42, 0xa3, 0xd1, 0x03, 0x25, 0x01, 
-       0x40, 0x85, 0x1c, 0x2b, 0x43, 0x1a, 0xe7, 0xf3, 
-       0x23, 0x33, 0x06, 0x5b, 0x6c, 0x1b, 0x40, 0x13, 
-       0xd0, 0x00, 0xe7, 0xf9, 0xbc, 0xb0, 0x47, 0x70, 
-       0x9e, 0x00, 0x00, 0xc0, 0xe3, 0xa0, 0x14, 0x62, 
-       0xe5, 0x91, 0x10, 0x14, 0xe2, 0x01, 0x00, 0xff, 
-       0xe5, 0x9f, 0x10, 0x2c, 0xe5, 0xd1, 0x10, 0x00, 
-       0xe3, 0x51, 0x00, 0xff, 0x0a, 0x00, 0x00, 0x05, 
-       0xe5, 0x9f, 0x10, 0x1c, 0xe5, 0xd1, 0x10, 0x00, 
-       0xe3, 0xa0, 0x20, 0x01, 0xe1, 0xa0, 0x11, 0x12, 
-       0xe3, 0xa0, 0x24, 0x66, 0xe5, 0x82, 0x10, 0x10, 
-       0xe3, 0xa0, 0x14, 0x62, 0xe5, 0x81, 0x00, 0x14, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x2e, 0x08, 0x7c, 0x48, 
-       0x47, 0x00, 0x00, 0x00, 0x47, 0x08, 0x00, 0x00, 
-       0x47, 0x10, 0x00, 0x00, 0x47, 0x18, 0x00, 0x00, 
-       0x47, 0x20, 0x00, 0x00, 0x47, 0x28, 0x00, 0x00, 
-       0x47, 0x30, 0x00, 0x00, 0x47, 0x38, 0x00, 0x00, 
-       0x17, 0xcb, 0x40, 0x59, 0x1a, 0xc9, 0x17, 0xc2, 
-       0x40, 0x50, 0x1a, 0x80, 0xd1, 0x01, 0xf0, 0x00, 
-       0xfa, 0x07, 0xb4, 0x0c, 0x08, 0x4b, 0x1c, 0x02, 
-       0x42, 0x9a, 0xd8, 0x00, 0x00, 0x52, 0xd3, 0xfb, 
-       0x23, 0x00, 0xe0, 0x00, 0x08, 0x52, 0x42, 0x91, 
-       0x41, 0x5b, 0x42, 0x91, 0xd3, 0x00, 0x1a, 0x89, 
-       0x42, 0x82, 0xd1, 0xf7, 0x1c, 0x18, 0xbc, 0x0c, 
-       0x40, 0x5a, 0x40, 0x50, 0x1a, 0x80, 0x40, 0x59, 
-       0x1a, 0xc9, 0x47, 0x70, 0x08, 0x4b, 0x1c, 0x02, 
-       0xd1, 0x01, 0xf0, 0x00, 0xf9, 0xe9, 0x42, 0x9a, 
-       0xd8, 0x00, 0x00, 0x52, 0xd3, 0xfb, 0x23, 0x00, 
-       0xe0, 0x00, 0x08, 0x52, 0x42, 0x91, 0x41, 0x5b, 
-       0x42, 0x91, 0xd3, 0x00, 0x1a, 0x89, 0x42, 0x82, 
-       0xd1, 0xf7, 0x1c, 0x18, 0x47, 0x70, 0x00, 0x00, 
-       0x3a, 0x20, 0xd5, 0x09, 0x42, 0x53, 0x32, 0x20, 
-       0x40, 0xd0, 0x46, 0x94, 0x1c, 0x0a, 0x40, 0x9a, 
-       0x43, 0x10, 0x46, 0x62, 0x40, 0xd1, 0x47, 0x70, 
-       0x1c, 0x08, 0x40, 0xd0, 0x21, 0x00, 0x47, 0x70, 
-       0x40, 0x10, 0x40, 0x19, 0x47, 0x70, 0x00, 0x00, 
-       0x47, 0x70, 0x00, 0x00, 0x1a, 0x43, 0x42, 0x93, 
-       0xd3, 0x30, 0x46, 0x84, 0x07, 0x8b, 0xd0, 0x07, 
-       0x1e, 0x52, 0xd3, 0x29, 0x78, 0x0b, 0x70, 0x03, 
-       0x1c, 0x40, 0x1c, 0x49, 0x07, 0x8b, 0xd1, 0xf7, 
-       0x07, 0x83, 0xd1, 0x17, 0x3a, 0x10, 0xd3, 0x05, 
-       0xb4, 0xb0, 0xc9, 0xb8, 0xc0, 0xb8, 0x3a, 0x10, 
-       0xd2, 0xfb, 0xbc, 0xb0, 0x32, 0x0c, 0xd3, 0x0f, 
-       0xc9, 0x08, 0xc0, 0x08, 0x1f, 0x12, 0xd2, 0xfb, 
-       0xe0, 0x0a, 0xc9, 0x08, 0x70, 0xc3, 0x0a, 0x1b, 
-       0x70, 0x83, 0x0a, 0x1b, 0x70, 0x43, 0x0a, 0x1b, 
-       0x70, 0x03, 0x1d, 0x00, 0x1f, 0x12, 0xd2, 0xf4, 
-       0x1c, 0xd2, 0xd3, 0x05, 0x78, 0x0b, 0x70, 0x03, 
-       0x1c, 0x49, 0x1c, 0x40, 0x1e, 0x52, 0xd2, 0xf9, 
-       0x46, 0x60, 0x47, 0x70, 0x1c, 0x03, 0x43, 0x0b, 
-       0x43, 0x13, 0x07, 0x9b, 0xd1, 0x04, 0x1f, 0x12, 
-       0x58, 0x8b, 0x50, 0x83, 0xd1, 0xfb, 0x47, 0x70, 
-       0x1e, 0x52, 0x5c, 0x8b, 0x54, 0x83, 0xd1, 0xfb, 
-       0x47, 0x70, 0x00, 0x00, 0x42, 0x41, 0x46, 0x8c, 
-       0x07, 0x83, 0xd0, 0x05, 0x78, 0x03, 0x2b, 0x00, 
-       0xd0, 0x16, 0x1c, 0x40, 0x07, 0x83, 0xd1, 0xf9, 
-       0x49, 0x0a, 0xc8, 0x04, 0x09, 0xc9, 0x1a, 0x53, 
-       0x43, 0x93, 0x01, 0xc9, 0x40, 0x0b, 0xd0, 0xf8, 
-       0x1f, 0x00, 0x0e, 0x13, 0xd0, 0x08, 0x1c, 0x40, 
-       0x02, 0x13, 0x0e, 0x1b, 0xd0, 0x04, 0x1c, 0x40, 
-       0x04, 0x13, 0x0e, 0x1b, 0xd0, 0x00, 0x1c, 0x40, 
-       0x44, 0x60, 0x47, 0x70, 0x80, 0x80, 0x80, 0x80, 
-       0x46, 0x84, 0x07, 0x83, 0xd0, 0x05, 0x1e, 0x52, 
-       0xd3, 0x12, 0x70, 0x01, 0x1c, 0x40, 0x07, 0x83, 
-       0xd1, 0xf9, 0x3a, 0x08, 0xd3, 0x07, 0x02, 0x0b, 
-       0x43, 0x19, 0x04, 0x0b, 0x43, 0x19, 0x1c, 0x0b, 
-       0xc0, 0x0a, 0x3a, 0x08, 0xd2, 0xfc, 0x1d, 0xd2, 
-       0xd3, 0x02, 0x54, 0x81, 0x1e, 0x52, 0xd2, 0xfc, 
-       0x46, 0x60, 0x47, 0x70, 0x46, 0x84, 0x1c, 0x03, 
-       0x43, 0x0b, 0x07, 0x9b, 0xd1, 0x15, 0x1f, 0x12, 
-       0xd3, 0x0b, 0xb4, 0xb0, 0x4c, 0x10, 0x01, 0xe5, 
-       0xc9, 0x80, 0x1b, 0x3b, 0x43, 0xbb, 0x40, 0x2b, 
-       0xd1, 0x0f, 0xc0, 0x80, 0x1f, 0x12, 0xd2, 0xf7, 
-       0xbc, 0xb0, 0x1c, 0xd2, 0xd3, 0x11, 0x78, 0x0b, 
-       0x70, 0x03, 0x1c, 0x49, 0x1c, 0x40, 0x2b, 0x00, 
-       0xd0, 0x09, 0x1e, 0x52, 0xd2, 0xf7, 0x46, 0x60, 
-       0x47, 0x70, 0xbc, 0xb0, 0x1f, 0x09, 0x1c, 0xd2, 
-       0xe7, 0xf1, 0x70, 0x03, 0x1c, 0x40, 0x1e, 0x52, 
-       0xd2, 0xfb, 0x46, 0x60, 0x47, 0x70, 0x00, 0x00, 
-       0x01, 0x01, 0x01, 0x01, 0x1c, 0x02, 0x43, 0x0a, 
-       0x07, 0x92, 0xd1, 0x13, 0x46, 0x84, 0xb4, 0x30, 
-       0x4c, 0x0c, 0x01, 0xe5, 0xe0, 0x00, 0xc0, 0x04, 
-       0xc9, 0x04, 0x1b, 0x13, 0x43, 0x93, 0x40, 0x2b, 
-       0xd0, 0xf9, 0xe0, 0x01, 0x02, 0x12, 0x1c, 0x40, 
-       0x0e, 0x13, 0x70, 0x03, 0xd1, 0xfa, 0xbc, 0x30, 
-       0x46, 0x60, 0x47, 0x70, 0x1c, 0x03, 0x78, 0x0a, 
-       0x70, 0x1a, 0x1c, 0x49, 0x1c, 0x5b, 0x2a, 0x00, 
-       0xd1, 0xf9, 0x47, 0x70, 0x01, 0x01, 0x01, 0x01, 
-       0xb5, 0x80, 0x00, 0x43, 0x15, 0x5f, 0x43, 0xff, 
-       0x1c, 0x02, 0x0f, 0xc0, 0x07, 0xc0, 0x2f, 0x00, 
-       0xd0, 0x15, 0x43, 0x0b, 0xd0, 0x0c, 0x28, 0x00, 
-       0xd1, 0x07, 0x1c, 0x10, 0xf0, 0x00, 0xf9, 0x00, 
-       0xf0, 0x00, 0xf9, 0x9a, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x21, 0x01, 0x1c, 0x10, 0xe0, 0x11, 
-       0x21, 0x01, 0x07, 0xc8, 0xf0, 0x00, 0xfa, 0x98, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x03, 0x13, 
-       0x43, 0x0b, 0xd1, 0x05, 0x28, 0x00, 0xd1, 0x03, 
-       0x1c, 0x10, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x21, 0x01, 0x07, 0xc8, 0xf0, 0x00, 0xfa, 0x82, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x46, 0xbc, 0xb4, 0x60, 0x1c, 0x03, 0x43, 0x08, 
-       0x07, 0x80, 0xd1, 0x1b, 0x1f, 0x12, 0xd3, 0x0b, 
-       0x4e, 0x0f, 0xcb, 0x01, 0xc9, 0x80, 0x1b, 0xc0, 
-       0xd1, 0x09, 0x1b, 0xbd, 0x43, 0xbd, 0x01, 0xf7, 
-       0x40, 0x3d, 0xd1, 0x04, 0x1f, 0x12, 0xd2, 0xf4, 
-       0x1c, 0xd2, 0xd3, 0x0e, 0xe0, 0x02, 0x1f, 0x1b, 
-       0x1f, 0x09, 0x1c, 0xd2, 0x78, 0x18, 0x78, 0x0f, 
-       0x1b, 0xc0, 0xd1, 0x06, 0x2f, 0x00, 0xd0, 0x04, 
-       0x1c, 0x5b, 0x1c, 0x49, 0x1e, 0x52, 0xd2, 0xf5, 
-       0x20, 0x00, 0xbc, 0x60, 0x46, 0x67, 0x47, 0x70, 
-       0x01, 0x01, 0x01, 0x01, 0x47, 0x78, 0x00, 0x00, 
-       0xe2, 0x10, 0xc1, 0x02, 0x12, 0x60, 0x00, 0x00, 
-       0x03, 0x30, 0x00, 0x00, 0x03, 0xa0, 0x10, 0x00, 
-       0x01, 0x2f, 0xff, 0x1e, 0xe3, 0x8c, 0xc1, 0x01, 
-       0xe3, 0x8c, 0xc6, 0x1e, 0xe1, 0xb0, 0x28, 0x20, 
-       0x01, 0xa0, 0x08, 0x00, 0x02, 0x4c, 0xc4, 0x01, 
-       0xe1, 0xb0, 0x2c, 0x20, 0x01, 0xa0, 0x04, 0x00, 
-       0x02, 0x4c, 0xc5, 0x02, 0xe1, 0xb0, 0x2e, 0x20, 
-       0x01, 0xa0, 0x02, 0x00, 0x02, 0x4c, 0xc5, 0x01, 
-       0xe1, 0xb0, 0x2f, 0x20, 0x01, 0xa0, 0x01, 0x00, 
-       0x02, 0x4c, 0xc6, 0x02, 0xe1, 0xb0, 0x2f, 0xa0, 
-       0x01, 0xa0, 0x00, 0x80, 0x02, 0x4c, 0xc6, 0x01, 
-       0xe1, 0xa0, 0x00, 0x80, 0xe1, 0xa0, 0x1a, 0x00, 
-       0xe1, 0x8c, 0x06, 0x20, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x22, 0x01, 0x07, 0xd2, 0x40, 0x50, 0x47, 0x70, 
-       0xe2, 0x20, 0x01, 0x02, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x00, 0x40, 0x08, 0x40, 0x47, 0x70, 0x00, 0x00, 
-       0x47, 0x78, 0x00, 0x00, 0xe3, 0xa0, 0xc4, 0xff, 
-       0xe3, 0x8c, 0xc6, 0x0e, 0xe1, 0x5c, 0x00, 0x82, 
-       0x9a, 0x00, 0x00, 0x0a, 0xe1, 0xb0, 0x00, 0x80, 
-       0x03, 0x31, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0a, 
-       0x3a, 0x00, 0x00, 0x12, 0xe1, 0x50, 0x00, 0x0c, 
-       0x03, 0x51, 0x00, 0x00, 0x8a, 0x00, 0x01, 0x0c, 
-       0xe1, 0xb0, 0x20, 0x82, 0x8a, 0x00, 0x00, 0x18, 
-       0xe3, 0xa0, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x03, 0x53, 0x00, 0x00, 0x0a, 0xff, 0xff, 0xf2, 
-       0xea, 0x00, 0x01, 0x09, 0xe1, 0x50, 0x00, 0x0c, 
-       0x03, 0x51, 0x00, 0x00, 0x8a, 0x00, 0x01, 0x02, 
-       0xe1, 0xb0, 0x20, 0x82, 0x33, 0xa0, 0x00, 0x01, 
-       0x23, 0xa0, 0x00, 0x00, 0x03, 0x33, 0x00, 0x00, 
-       0x03, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe1, 0x50, 0x00, 0x0c, 0x03, 0x51, 0x00, 0x00, 
-       0x8a, 0x00, 0x00, 0xf9, 0xe1, 0xb0, 0x20, 0x82, 
-       0x23, 0xa0, 0x00, 0x00, 0x21, 0x2f, 0xff, 0x1e, 
-       0xe1, 0x50, 0x00, 0x02, 0x01, 0x51, 0x00, 0x03, 
-       0x33, 0xa0, 0x00, 0x01, 0x23, 0xa0, 0x00, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0x50, 0x00, 0x02, 
-       0x01, 0x51, 0x00, 0x03, 0x83, 0xa0, 0x00, 0x01, 
-       0x93, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe5, 0x9f, 0xc0, 0x28, 
-       0xe8, 0xac, 0x7f, 0xff, 0xe2, 0x8f, 0x00, 0x0c, 
-       0xe2, 0x4c, 0x10, 0x3c, 0xe2, 0x4e, 0xe0, 0x04, 
-       0xe5, 0x8c, 0xe0, 0x00, 0xea, 0x00, 0x01, 0x91, 
-       0x80, 0x00, 0x00, 0x20, 0x44, 0x69, 0x76, 0x69, 
-       0x64, 0x65, 0x20, 0x62, 0x79, 0x20, 0x7a, 0x65, 
-       0x72, 0x6f, 0x00, 0x00, 0x2e, 0x08, 0x21, 0x50, 
-       0xb5, 0xf0, 0xb0, 0x8f, 0xf0, 0x00, 0xfd, 0x01, 
-       0x1c, 0x04, 0x1c, 0x16, 0x1c, 0x0f, 0xf0, 0x00, 
-       0xfd, 0x3b, 0x90, 0x03, 0x91, 0x04, 0x92, 0x05, 
-       0xa3, 0x3e, 0xcb, 0x0c, 0x1c, 0x20, 0x1c, 0x39, 
-       0xf0, 0x00, 0xfd, 0xae, 0x49, 0x3d, 0x22, 0x00, 
-       0x4f, 0x3d, 0x28, 0x00, 0xd0, 0x0a, 0x48, 0x3d, 
-       0xab, 0x03, 0xf0, 0x00, 0xfd, 0xfb, 0x90, 0x0c, 
-       0x91, 0x0d, 0x92, 0x0e, 0xaa, 0x03, 0xca, 0x07, 
-       0x1c, 0x3b, 0xe0, 0x08, 0x48, 0x38, 0xab, 0x03, 
-       0x3e, 0x01, 0xf0, 0x00, 0xfd, 0xef, 0x90, 0x0c, 
-       0x91, 0x0d, 0x92, 0x0e, 0x1c, 0x3b, 0xf0, 0x00, 
-       0xfe, 0x03, 0x1c, 0x3b, 0xf0, 0x00, 0xfd, 0xe6, 
-       0xab, 0x0c, 0xf0, 0x00, 0xfe, 0x17, 0x90, 0x09, 
-       0x91, 0x0a, 0x92, 0x0b, 0xf0, 0x00, 0xfe, 0x48, 
-       0x1c, 0x04, 0x1c, 0x15, 0x1c, 0x0f, 0x4a, 0x2d, 
-       0xb4, 0x04, 0x23, 0x03, 0x1c, 0x2a, 0xf0, 0x00, 
-       0xfe, 0x5b, 0x90, 0x01, 0x91, 0x02, 0x92, 0x03, 
-       0xb0, 0x01, 0x4a, 0x29, 0xb4, 0x04, 0x23, 0x03, 
-       0x1c, 0x20, 0x1c, 0x39, 0x1c, 0x2a, 0xf0, 0x00, 
-       0xfe, 0x65, 0xb0, 0x01, 0x46, 0x6b, 0xf0, 0x00, 
-       0xfd, 0xf9, 0xab, 0x09, 0xf0, 0x00, 0xfd, 0xdc, 
-       0xab, 0x09, 0xf0, 0x00, 0xfd, 0xbf, 0x2e, 0x00, 
-       0xd0, 0x2c, 0xb0, 0x86, 0xab, 0x0c, 0xc3, 0x07, 
-       0x1c, 0x30, 0xf0, 0x00, 0xfe, 0x69, 0x1c, 0x0c, 
-       0x1c, 0x05, 0x1c, 0x17, 0x4b, 0x1b, 0x1c, 0x1e, 
-       0xf0, 0x00, 0xfd, 0xca, 0x90, 0x03, 0x91, 0x04, 
-       0x92, 0x05, 0xab, 0x0c, 0xf0, 0x00, 0xfd, 0xaa, 
-       0x90, 0x06, 0x91, 0x07, 0x92, 0x08, 0xab, 0x03, 
-       0xf0, 0x00, 0xfe, 0x86, 0xab, 0x0c, 0xf0, 0x00, 
-       0xfe, 0x83, 0x90, 0x00, 0x91, 0x01, 0x92, 0x02, 
-       0x1c, 0x28, 0x1c, 0x21, 0x1c, 0x3a, 0x1d, 0xf3, 
-       0x33, 0x05, 0xf0, 0x00, 0xfd, 0xb1, 0x46, 0x6b, 
-       0xf0, 0x00, 0xfd, 0x94, 0xab, 0x06, 0xf0, 0x00, 
-       0xfd, 0x91, 0xb0, 0x06, 0xb0, 0x0f, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x3f, 0xe6, 0xa0, 0x9e, 
-       0x66, 0x7f, 0x3b, 0xcd, 0x80, 0x00, 0x00, 0x00, 
-       0x2e, 0x03, 0x3b, 0x10, 0x80, 0x00, 0x3f, 0xff, 
-       0x80, 0x00, 0x3f, 0xfe, 0x2e, 0x03, 0x3a, 0xbc, 
-       0x2e, 0x03, 0x3a, 0xe0, 0x2e, 0x03, 0x3a, 0xa4, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0xa0, 0x38, 0x80, 
-       0xe1, 0xa0, 0x38, 0xa3, 0xe1, 0xc0, 0x00, 0x03, 
-       0xe1, 0xd1, 0xc0, 0x80, 0x5a, 0x00, 0x00, 0x0c, 
-       0xe2, 0x53, 0x3b, 0x0f, 0x4a, 0x00, 0x00, 0x13, 
-       0x12, 0x83, 0xc0, 0x01, 0x13, 0x5c, 0x0b, 0x02, 
-       0xaa, 0x00, 0x00, 0x0d, 0xe1, 0xb0, 0xc5, 0xa2, 
-       0x2a, 0x00, 0x00, 0x58, 0xe1, 0x80, 0x0a, 0x03, 
-       0xe3, 0xc1, 0x11, 0x02, 0xe1, 0x80, 0x05, 0xa1, 
-       0xe1, 0x8c, 0x1a, 0x81, 0xe3, 0xa0, 0x30, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0x10, 0x01, 0x01, 
-       0x1a, 0x00, 0x00, 0x40, 0xe2, 0x00, 0x01, 0x02, 
-       0xe3, 0xa0, 0x10, 0x00, 0xe3, 0xa0, 0x30, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0x33, 0x00, 0x00, 
-       0x13, 0xa0, 0x33, 0x19, 0x11, 0x2f, 0xff, 0x1e, 
-       0xe2, 0x93, 0x30, 0x34, 0x0a, 0x00, 0x00, 0x31, 
-       0x42, 0x00, 0x01, 0x02, 0x43, 0xa0, 0x10, 0x00, 
-       0x43, 0xa0, 0x30, 0x00, 0x41, 0x2f, 0xff, 0x1e, 
-       0xe2, 0x53, 0x30, 0x20, 0x0a, 0x00, 0x00, 0x13, 
-       0xba, 0x00, 0x00, 0x1a, 0xe1, 0xb0, 0xc3, 0x12, 
-       0x4a, 0x00, 0x00, 0x05, 0xe2, 0x63, 0xc0, 0x20, 
-       0xe1, 0x80, 0x0c, 0x31, 0xe1, 0xa0, 0x2c, 0x32, 
-       0xe1, 0x82, 0x13, 0x11, 0xe3, 0xa0, 0x30, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0x96, 0xc0, 0x8c, 
-       0xe2, 0x63, 0xc0, 0x20, 0xe1, 0x80, 0x0c, 0x31, 
-       0xe1, 0xa0, 0x2c, 0x32, 0xe1, 0x82, 0x13, 0x11, 
-       0xe3, 0xa0, 0x30, 0x00, 0x03, 0x11, 0x00, 0x01, 
-       0x01, 0x2f, 0xff, 0x1e, 0xe2, 0x91, 0x10, 0x01, 
-       0x22, 0x80, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe3, 0xa0, 0x30, 0x00, 0xe3, 0x32, 0x01, 0x02, 
-       0x41, 0x2f, 0xff, 0x1e, 0x03, 0x11, 0x00, 0x01, 
-       0x01, 0x2f, 0xff, 0x1e, 0xe2, 0x91, 0x10, 0x01, 
-       0x22, 0x80, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe2, 0x83, 0x30, 0x20, 0xe1, 0xb0, 0xc3, 0x11, 
-       0x4a, 0x00, 0x00, 0x04, 0xe2, 0x63, 0xc0, 0x20, 
-       0xe1, 0xa0, 0x1c, 0x31, 0xe2, 0x00, 0x01, 0x02, 
-       0xe3, 0xa0, 0x30, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe3, 0x3c, 0x01, 0x02, 0x01, 0x92, 0xc0, 0x06, 
-       0xe2, 0x63, 0xc0, 0x20, 0xe1, 0xa0, 0x1c, 0x31, 
-       0x03, 0x11, 0x00, 0x01, 0x12, 0x81, 0x10, 0x01, 
-       0xe3, 0xa0, 0x30, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe3, 0x31, 0x01, 0x02, 0x03, 0x32, 0x00, 0x00, 
-       0x03, 0xa0, 0x10, 0x00, 0x13, 0xa0, 0x10, 0x01, 
-       0xe3, 0xa0, 0x30, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe3, 0x10, 0x02, 0x02, 0x1a, 0x00, 0x00, 0x0b, 
-       0xe3, 0xa0, 0x30, 0x00, 0xe3, 0x31, 0x00, 0x00, 
-       0x11, 0xb0, 0x10, 0x81, 0x43, 0xe0, 0x00, 0x00, 
-       0x41, 0x2f, 0xff, 0x1e, 0x03, 0x32, 0x00, 0x00, 
-       0x13, 0xa0, 0x34, 0x61, 0x11, 0x2f, 0xff, 0x1e, 
-       0xe2, 0x00, 0x01, 0x02, 0xe3, 0x80, 0x02, 0x07, 
-       0xe3, 0x80, 0x06, 0xff, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe1, 0xa0, 0x30, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe3, 0xc1, 0x11, 0x02, 0xe1, 0xa0, 0xcb, 0x02, 
-       0xe1, 0x9c, 0xc0, 0x06, 0xe2, 0x00, 0xc1, 0x02, 
-       0xe1, 0xa0, 0x0a, 0x03, 0xe1, 0x80, 0x05, 0xa1, 
-       0xe1, 0xa0, 0x1a, 0x81, 0xe1, 0x81, 0x15, 0xa2, 
-       0xe3, 0xa0, 0x30, 0x00, 0x0a, 0x00, 0x00, 0x06, 
-       0xe2, 0x91, 0x10, 0x01, 0x22, 0x80, 0x00, 0x01, 
-       0xe2, 0x90, 0x26, 0x01, 0xe1, 0x80, 0x00, 0x0c, 
-       0x51, 0x2f, 0xff, 0x1e, 0xe3, 0xa0, 0x33, 0x19, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x03, 0x11, 0x00, 0x01, 
-       0x01, 0x80, 0x00, 0x0c, 0x01, 0x2f, 0xff, 0x1e, 
-       0xe2, 0x91, 0x10, 0x01, 0x22, 0x80, 0x00, 0x01, 
-       0xe2, 0x90, 0x26, 0x01, 0xe1, 0x80, 0x00, 0x0c, 
-       0x51, 0x2f, 0xff, 0x1e, 0xe3, 0xa0, 0x33, 0x19, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
-       0xe3, 0xa0, 0x20, 0x01, 0xea, 0x00, 0x00, 0x01, 
-       0x47, 0x78, 0x00, 0x00, 0xe3, 0xa0, 0x20, 0x02, 
-       0xe2, 0x00, 0x31, 0x02, 0xe5, 0x9f, 0x00, 0x18, 
-       0xe5, 0x80, 0x20, 0x00, 0xe3, 0x31, 0x00, 0x00, 
-       0x03, 0xa0, 0x00, 0x00, 0x15, 0x9f, 0x00, 0x0c, 
-       0x18, 0x90, 0x00, 0x03, 0xe1, 0x80, 0x00, 0x03, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x2e, 0x08, 0x20, 0xb0, 
-       0x2e, 0x08, 0x20, 0xbc, 0xe3, 0x10, 0x06, 0x01, 
-       0x13, 0xa0, 0x00, 0x00, 0x11, 0x2f, 0xff, 0x1e, 
-       0xea, 0x00, 0x00, 0x0a, 0xe3, 0x12, 0x07, 0x02, 
-       0x0a, 0x00, 0x00, 0x08, 0xe1, 0x5c, 0x00, 0x80, 
-       0x83, 0xa0, 0x00, 0x00, 0x81, 0x2f, 0xff, 0x1e, 
-       0x03, 0x51, 0x00, 0x00, 0x03, 0xa0, 0x00, 0x00, 
-       0x01, 0x2f, 0xff, 0x1e, 0xe3, 0x10, 0x07, 0x02, 
-       0x13, 0xa0, 0x00, 0x00, 0x11, 0x2f, 0xff, 0x1e, 
-       0xe3, 0xa0, 0x35, 0x06, 0xea, 0x00, 0x04, 0xee, 
-       0xe1, 0x2f, 0xff, 0x1f, 0xea, 0x00, 0x00, 0x3e, 
-       0xe5, 0x9f, 0x04, 0x5c, 0xe3, 0x50, 0x00, 0x00, 
-       0x0a, 0x00, 0x00, 0x02, 0xe3, 0xa0, 0x00, 0x20, 
-       0xe3, 0xa0, 0x10, 0x01, 0xef, 0x12, 0x34, 0x56, 
-       0xe5, 0x9f, 0x04, 0x48, 0xe3, 0x50, 0x00, 0x00, 
-       0x0a, 0x00, 0x00, 0x05, 0xe5, 0x90, 0x10, 0x00, 
-       0xe5, 0x9f, 0x04, 0x3c, 0xe5, 0x90, 0x30, 0x00, 
-       0xe5, 0x9f, 0x04, 0x38, 0xe5, 0x90, 0xd0, 0x00, 
-       0xea, 0x00, 0x00, 0x0b, 0xe3, 0xa0, 0x00, 0x16, 
-       0xe5, 0x9f, 0x44, 0x18, 0xe2, 0x84, 0x20, 0xa8, 
-       0xe2, 0x84, 0x10, 0xa4, 0xe5, 0x81, 0x20, 0x00, 
-       0xef, 0x12, 0x34, 0x56, 0xe2, 0x84, 0x00, 0xa8, 
-       0xe5, 0x90, 0xd0, 0x08, 0xe5, 0x90, 0x30, 0x04, 
-       0xe5, 0x90, 0x10, 0x00, 0xe3, 0x51, 0x00, 0x00, 
-       0x05, 0x9f, 0x14, 0x04, 0xe2, 0x8f, 0x00, 0x10, 
-       0xeb, 0x00, 0x00, 0x36, 0xe5, 0x9f, 0x03, 0xfc, 
-       0xe5, 0x9f, 0x33, 0xfc, 0xeb, 0x00, 0x00, 0x12, 
-       0xea, 0x00, 0x00, 0x4e, 0x2e, 0x00, 0x04, 0x04, 
-       0x2e, 0x03, 0x3b, 0xfc, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xe9, 0x2d, 0x40, 0x00, 
-       0xe3, 0x1c, 0x00, 0x01, 0x1a, 0x00, 0x00, 0x03, 
-       0xe1, 0xa0, 0xe0, 0x0f, 0xe1, 0x2f, 0xff, 0x1c, 
-       0xe8, 0xbd, 0x40, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe3, 0x8f, 0xe0, 0x01, 0xe1, 0x2f, 0xff, 0x1c, 
-       0x47, 0x78, 0x00, 0x00, 0xe8, 0xbd, 0x40, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x1c, 0x02, 0x1c, 0x13, 
-       0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x40, 0x00, 
-       0xe3, 0x13, 0x00, 0x01, 0x1a, 0x00, 0x00, 0x03, 
-       0xe1, 0xa0, 0xe0, 0x0f, 0xe1, 0x2f, 0xff, 0x13, 
-       0xe8, 0xbd, 0x40, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe3, 0x8f, 0xe0, 0x01, 0xe1, 0x2f, 0xff, 0x13, 
-       0x47, 0x78, 0x00, 0x00, 0xe8, 0xbd, 0x40, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe5, 0x9f, 0xc0, 0x44, 
-       0xe8, 0x8c, 0xff, 0xff, 0xe2, 0x8f, 0x00, 0x00, 
-       0xea, 0x00, 0x0c, 0xac, 0x00, 0x80, 0x0e, 0x09, 
-       0x54, 0x68, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x64, 
-       0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x6f, 0x6e, 
-       0x6c, 0x79, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x6f, 
-       0x6e, 0x20, 0x61, 0x20, 0x54, 0x68, 0x75, 0x6d, 
-       0x62, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 
-       0x69, 0x62, 0x6c, 0x65, 0x20, 0x70, 0x72, 0x6f, 
-       0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x00, 0x00, 
-       0x2e, 0x08, 0x21, 0x50, 0x47, 0x78, 0x00, 0x00, 
-       0xe5, 0x9f, 0x73, 0x08, 0xe5, 0x87, 0x00, 0x00, 
-       0xe2, 0x8f, 0x50, 0xc9, 0xe2, 0x85, 0x5c, 0x02, 
-       0xe5, 0x87, 0x50, 0x10, 0xe2, 0x8f, 0x50, 0xe9, 
-       0xe2, 0x85, 0x5c, 0x02, 0xe5, 0x87, 0x50, 0x14, 
-       0xe1, 0xa0, 0x80, 0x0e, 0xe2, 0x87, 0x00, 0x04, 
-       0xeb, 0x00, 0x02, 0x39, 0xe9, 0x2d, 0x01, 0x00, 
-       0xe3, 0xa0, 0x00, 0x00, 0xe5, 0xc7, 0x00, 0x2c, 
-       0xe2, 0x87, 0x00, 0x04, 0xeb, 0x00, 0x00, 0xce, 
-       0xe3, 0xa0, 0x40, 0x00, 0xe2, 0x8d, 0x00, 0x04, 
-       0xe5, 0x97, 0x10, 0x00, 0xe3, 0xa0, 0x30, 0x00, 
-       0xe5, 0xc7, 0x30, 0x2e, 0xe2, 0x81, 0x30, 0x08, 
-       0xe8, 0x91, 0x00, 0x06, 0xe5, 0x9f, 0xc2, 0xcc, 
-       0xeb, 0xff, 0xff, 0xb7, 0xe8, 0xbd, 0x40, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
-       0xe3, 0xa0, 0x80, 0x01, 0xea, 0x00, 0x00, 0x01, 
-       0x47, 0x78, 0x00, 0x00, 0xe3, 0xa0, 0x80, 0x00, 
-       0xe1, 0xa0, 0x70, 0x00, 0xeb, 0x00, 0x02, 0x31, 
-       0xe1, 0xa0, 0x00, 0x08, 0xeb, 0x00, 0x00, 0x0d, 
-       0xe1, 0xa0, 0x20, 0x07, 0xe3, 0x52, 0x00, 0x00, 
-       0x12, 0x8f, 0x00, 0x08, 0x15, 0x9f, 0x10, 0x00, 
-       0xeb, 0x00, 0x0c, 0x6d, 0x41, 0x42, 0x45, 0x58, 
-       0x00, 0x80, 0x0e, 0x06, 0x52, 0x65, 0x74, 0x75, 
-       0x72, 0x6e, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 
-       0x74, 0x6f, 0x6f, 0x20, 0x6c, 0x61, 0x72, 0x67, 
-       0x65, 0x00, 0x00, 0x00, 0xe3, 0xa0, 0x00, 0x00, 
-       0xe9, 0x2d, 0x40, 0x00, 0xe5, 0x9f, 0x32, 0x60, 
-       0xeb, 0xff, 0xff, 0xa9, 0xe8, 0xbd, 0x40, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
-       0xe5, 0x9f, 0xc2, 0x28, 0xe5, 0xdc, 0x00, 0x2c, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0xa0, 0x30, 0x00, 
-       0xe5, 0x9f, 0x12, 0x14, 0xe4, 0x81, 0xf0, 0x04, 
-       0xe8, 0xb3, 0x00, 0x04, 0xe8, 0xa1, 0x00, 0x04, 
-       0xe4, 0xd3, 0x20, 0x01, 0xe4, 0xc1, 0x20, 0x01, 
-       0xe3, 0x52, 0x00, 0x00, 0x1a, 0xff, 0xff, 0xfb, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0x47, 0x78, 0x00, 0x00, 
-       0xe1, 0xa0, 0x80, 0x01, 0xeb, 0xff, 0xff, 0xf2, 
-       0xe5, 0x9f, 0x71, 0xe8, 0xe5, 0xd7, 0x20, 0x2f, 
-       0xe3, 0x52, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x2c, 
-       0xe3, 0xa0, 0x20, 0x01, 0xe5, 0xc7, 0x20, 0x2f, 
-       0xeb, 0x00, 0x00, 0x3b, 0xe1, 0xa0, 0x10, 0x08, 
-       0xeb, 0x00, 0x01, 0xfa, 0xe3, 0x50, 0x00, 0x00, 
-       0x0a, 0x00, 0x00, 0x1b, 0xe2, 0x88, 0xb0, 0x40, 
-       0xe9, 0x3b, 0x01, 0xef, 0xe9, 0x2c, 0x01, 0xef, 
-       0xe9, 0x3b, 0x01, 0xef, 0xe9, 0x2c, 0x01, 0xef, 
-       0xe5, 0x9f, 0x71, 0xa8, 0xe5, 0x97, 0x40, 0xa0, 
-       0xe3, 0x84, 0x40, 0x80, 0xe1, 0x21, 0xf0, 0x04, 
-       0xe1, 0xa0, 0xd0, 0x0c, 0xe1, 0xa0, 0xb0, 0x04, 
-       0xe5, 0x9f, 0x01, 0x8c, 0xe5, 0x90, 0x00, 0x04, 
-       0xe1, 0xa0, 0x10, 0x0d, 0xeb, 0x00, 0x02, 0x1a, 
-       0xe3, 0xa0, 0x10, 0x00, 0xe5, 0xc7, 0x10, 0x2f, 
-       0xe1, 0xa0, 0x10, 0x0d, 0xe3, 0x54, 0x00, 0x10, 
-       0x1a, 0x00, 0x00, 0x02, 0xe3, 0xa0, 0x00, 0x17, 
-       0xef, 0x12, 0x34, 0x56, 0xe3, 0x21, 0xf0, 0x93, 
-       0xe1, 0xa0, 0x00, 0x00, 0xe2, 0x81, 0xe0, 0x3c, 
-       0xe9, 0x5e, 0x7f, 0xff, 0xe1, 0xa0, 0x00, 0x00, 
-       0xe8, 0xde, 0x80, 0x00, 0xe2, 0x8f, 0x00, 0x00, 
-       0xea, 0x00, 0x0c, 0x2a, 0x00, 0x80, 0x0e, 0x07, 
-       0x4e, 0x6f, 0x20, 0x53, 0x74, 0x61, 0x63, 0x6b, 
-       0x20, 0x66, 0x6f, 0x72, 0x20, 0x54, 0x72, 0x61, 
-       0x70, 0x20, 0x48, 0x61, 0x6e, 0x64, 0x6c, 0x65, 
-       0x72, 0x00, 0x00, 0x00, 0xe2, 0x8f, 0x00, 0x00, 
-       0xea, 0x00, 0x0c, 0x20, 0x00, 0x80, 0x0e, 0x00, 
-       0x52, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 
-       0x65, 0x20, 0x54, 0x72, 0x61, 0x70, 0x00, 0x00, 
-       0x47, 0x78, 0x00, 0x00, 0xe5, 0x9f, 0xc1, 0x04, 
-       0xe3, 0xa0, 0x00, 0x00, 0xe5, 0xcc, 0x00, 0x2f, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
-       0xe5, 0x9f, 0x00, 0xf0, 0xe5, 0x90, 0x00, 0x00, 
-       0xe5, 0x90, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe5, 0x9f, 0x00, 0xdc, 
-       0xe2, 0x80, 0x00, 0x04, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe5, 0x9f, 0xc0, 0xcc, 
-       0xe3, 0x50, 0x0b, 0x02, 0x33, 0xa0, 0x0b, 0x02, 
-       0xe2, 0x8c, 0xc0, 0x04, 0xe9, 0x9c, 0x00, 0x0c, 
-       0xe0, 0x53, 0x31, 0x00, 0x21, 0x53, 0x00, 0x02, 
-       0x3a, 0x00, 0x00, 0x03, 0xe5, 0x81, 0x20, 0x00, 
-       0xe0, 0x82, 0x21, 0x00, 0xe5, 0x8c, 0x20, 0x04, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe9, 0x2d, 0x50, 0x03, 
-       0xe1, 0xa0, 0x10, 0x0c, 0xeb, 0x00, 0x00, 0x44, 
-       0xe3, 0x50, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0d, 
-       0xe5, 0x9d, 0xc0, 0x08, 0xe9, 0x9c, 0x40, 0x04, 
-       0xe1, 0x5e, 0x00, 0x01, 0x10, 0x4e, 0x30, 0x02, 
-       0xe0, 0x81, 0xe0, 0x00, 0x11, 0xa0, 0x00, 0x02, 
-       0x11, 0xa0, 0x20, 0x01, 0xe9, 0x8c, 0x40, 0x04, 
-       0x13, 0x53, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x03, 
-       0xe8, 0xbd, 0x50, 0x03, 0xe5, 0x81, 0x00, 0x00, 
-       0xe1, 0xa0, 0x01, 0x43, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe8, 0xbd, 0x50, 0x03, 0xe9, 0x9c, 0x00, 0x0c, 
-       0xe0, 0x43, 0x00, 0x02, 0xe1, 0xb0, 0x01, 0x40, 
-       0x03, 0xa0, 0x20, 0x00, 0x15, 0x8c, 0x30, 0x04, 
-       0xe5, 0x81, 0x20, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe2, 0x80, 0x20, 0x03, 
-       0xe3, 0xc2, 0x20, 0x03, 0xe5, 0x9f, 0xc0, 0x24, 
-       0xe2, 0x8c, 0xc0, 0x08, 0xe8, 0x9c, 0x00, 0x03, 
-       0xe0, 0x90, 0x20, 0x02, 0x31, 0x52, 0x00, 0x01, 
-       0x35, 0x8c, 0x20, 0x00, 0x23, 0xa0, 0x00, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x2e, 0x08, 0x20, 0xcc, 
-       0x2e, 0x08, 0x20, 0x98, 0x00, 0x00, 0x00, 0x00, 
-       0x2e, 0x02, 0x5d, 0xa4, 0x2e, 0x02, 0x5d, 0xa0, 
-       0x2e, 0x02, 0x5d, 0x9c, 0x2e, 0x08, 0x99, 0xfc, 
-       0x2e, 0x00, 0x1c, 0x39, 0x2e, 0x01, 0xa1, 0x35, 
-       0x2e, 0x01, 0x9f, 0xe9, 0x2e, 0x01, 0xa0, 0xa9, 
-       0x47, 0x78, 0x00, 0x00, 0xe3, 0xa0, 0x00, 0x04, 
-       0xe5, 0x90, 0x00, 0x00, 0xe2, 0x00, 0x04, 0xff, 
-       0xe3, 0x50, 0x04, 0xea, 0x03, 0xa0, 0x00, 0x01, 
-       0x13, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe2, 0x40, 0x0b, 0x05, 
-       0xe3, 0x50, 0x0b, 0x1b, 0x33, 0xa0, 0x00, 0x01, 
-       0x23, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe3, 0xa0, 0x00, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
-       0xe2, 0x8f, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 
-       0x45, 0x72, 0x72, 0x6f, 0x72, 0x00, 0x00, 0x00, 
-       0x00, 0x02, 0x00, 0x00, 0x42, 0x72, 0x61, 0x6e, 
-       0x63, 0x68, 0x20, 0x54, 0x68, 0x72, 0x6f, 0x75, 
-       0x67, 0x68, 0x20, 0x5a, 0x65, 0x72, 0x6f, 0x00, 
-       0x00, 0x02, 0x00, 0x01, 0x55, 0x6e, 0x64, 0x65, 
-       0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x49, 0x6e, 
-       0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 
-       0x6e, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 
-       0x55, 0x6e, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 
-       0x64, 0x20, 0x53, 0x57, 0x49, 0x20, 0x49, 0x6e, 
-       0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x69, 0x6f, 
-       0x6e, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x03, 
-       0x50, 0x72, 0x65, 0x66, 0x65, 0x74, 0x63, 0x68, 
-       0x20, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x00, 0x00, 
-       0x00, 0x02, 0x00, 0x04, 0x44, 0x61, 0x74, 0x61, 
-       0x20, 0x41, 0x62, 0x6f, 0x72, 0x74, 0x00, 0x00, 
-       0x00, 0x02, 0x00, 0x05, 0x41, 0x64, 0x64, 0x72, 
-       0x65, 0x73, 0x73, 0x20, 0x45, 0x78, 0x63, 0x65, 
-       0x70, 0x74, 0x69, 0x6f, 0x6e, 0x00, 0x00, 0x00, 
-       0x00, 0x02, 0x00, 0x06, 0x55, 0x6e, 0x68, 0x61, 
-       0x6e, 0x64, 0x6c, 0x65, 0x64, 0x20, 0x49, 0x6e, 
-       0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 0x74, 0x00, 
-       0x00, 0x02, 0x00, 0x07, 0x55, 0x6e, 0x68, 0x61, 
-       0x6e, 0x64, 0x6c, 0x65, 0x64, 0x20, 0x46, 0x61, 
-       0x73, 0x74, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 
-       0x72, 0x75, 0x70, 0x74, 0x00, 0x00, 0x00, 0x00, 
-       0x2e, 0x01, 0x99, 0x2c, 0x2e, 0x01, 0x99, 0x44, 
-       0x2e, 0x01, 0x99, 0x60, 0x2e, 0x01, 0x99, 0x80, 
-       0x2e, 0x01, 0x99, 0x94, 0x2e, 0x01, 0x99, 0xa4, 
-       0x2e, 0x01, 0x99, 0xbc, 0x2e, 0x01, 0x99, 0xd4, 
-       0xe2, 0x4f, 0x20, 0x28, 0xe7, 0x92, 0x01, 0x00, 
-       0xea, 0xff, 0xff, 0x1c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xb5, 0x04, 0xf0, 0x00, 
-       0xf8, 0x04, 0xbc, 0x08, 0x60, 0x1a, 0xbc, 0x08, 
-       0x47, 0x18, 0x47, 0x78, 0xe1, 0xb0, 0x00, 0x80, 
-       0x03, 0x31, 0x00, 0x00, 0x01, 0xa0, 0x00, 0x60, 
-       0x03, 0xa0, 0x20, 0x00, 0x01, 0x2f, 0xff, 0x1e, 
-       0xe1, 0xa0, 0x2a, 0xa0, 0xe1, 0xc0, 0x0a, 0x82, 
-       0xe1, 0xa0, 0x00, 0x60, 0xe3, 0x32, 0x00, 0x00, 
-       0xe2, 0x42, 0x2c, 0x03, 0xe2, 0x42, 0x20, 0xfe, 
-       0x0a, 0x00, 0x00, 0x06, 0xe3, 0x80, 0x04, 0x3f, 
-       0xe3, 0x80, 0x06, 0x0e, 0xe2, 0x22, 0x3b, 0x01, 
-       0xe3, 0x33, 0x00, 0x01, 0x11, 0x2f, 0xff, 0x1e, 
-       0xe3, 0xa0, 0x10, 0x01, 0xea, 0xff, 0xfe, 0x39, 
-       0xe2, 0x00, 0xc1, 0x02, 0xe1, 0xa0, 0x06, 0x00, 
-       0xe2, 0x42, 0x20, 0x01, 0xe1, 0xb0, 0x00, 0x80, 
-       0x4a, 0x00, 0x00, 0x02, 0xe1, 0xb0, 0x10, 0x81, 
-       0x23, 0x80, 0x0a, 0x01, 0xea, 0xff, 0xff, 0xf9, 
-       0xe1, 0xa0, 0x04, 0xc0, 0xe3, 0xc0, 0x05, 0x01, 
-       0xe1, 0x8c, 0x01, 0x20, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0xb0, 0xc0, 0x80, 
-       0x03, 0x31, 0x00, 0x00, 0xe1, 0xa0, 0x35, 0x0c, 
-       0xe1, 0xa0, 0x0a, 0x2c, 0xe1, 0xa0, 0x25, 0x81, 
-       0xe1, 0x83, 0x1a, 0xa1, 0x12, 0x80, 0x0b, 0x1e, 
-       0xe1, 0xa0, 0x00, 0x60, 0x13, 0x81, 0x11, 0x02, 
-       0xe1, 0xb0, 0xca, 0xcc, 0x0a, 0x00, 0x00, 0x02, 
-       0xe3, 0x7c, 0x00, 0x01, 0x03, 0x80, 0x01, 0x01, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0x11, 0x01, 0x02, 
-       0x01, 0x2f, 0xff, 0x1e, 0xe3, 0xd1, 0x11, 0x02, 
-       0x0a, 0x00, 0x00, 0x15, 0xe1, 0xb0, 0x38, 0x21, 
-       0x01, 0xa0, 0x18, 0x01, 0x03, 0xa0, 0xc0, 0x10, 
-       0x13, 0xa0, 0xc0, 0x00, 0xe1, 0xb0, 0x3c, 0x21, 
-       0x01, 0xa0, 0x14, 0x01, 0x02, 0x8c, 0xc0, 0x08, 
-       0xe1, 0xb0, 0x3e, 0x21, 0x01, 0xa0, 0x12, 0x01, 
-       0x02, 0x8c, 0xc0, 0x04, 0xe1, 0xb0, 0x3f, 0x21, 
-       0x01, 0xa0, 0x11, 0x01, 0x02, 0x8c, 0xc0, 0x02, 
-       0xe1, 0xb0, 0x3f, 0xa1, 0x01, 0xa0, 0x10, 0x81, 
-       0x02, 0x8c, 0xc0, 0x01, 0xe2, 0x6c, 0x30, 0x20, 
-       0xe1, 0x81, 0x13, 0x32, 0xe1, 0xa0, 0x2c, 0x12, 
-       0xe0, 0x40, 0x00, 0x0c, 0xe2, 0x80, 0x00, 0x01, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0xb0, 0x38, 0x22, 
-       0x01, 0xa0, 0x28, 0x02, 0x03, 0xa0, 0xc0, 0x10, 
-       0x13, 0xa0, 0xc0, 0x00, 0xe1, 0xb0, 0x3c, 0x22, 
-       0x01, 0xa0, 0x24, 0x02, 0x02, 0x8c, 0xc0, 0x08, 
-       0xe1, 0xb0, 0x3e, 0x22, 0x01, 0xa0, 0x22, 0x02, 
-       0x02, 0x8c, 0xc0, 0x04, 0xe1, 0xb0, 0x3f, 0x22, 
-       0x01, 0xa0, 0x21, 0x02, 0x02, 0x8c, 0xc0, 0x02, 
-       0xe1, 0xb0, 0x3f, 0xa2, 0x01, 0xa0, 0x20, 0x82, 
-       0x02, 0x8c, 0xc0, 0x01, 0xe1, 0xa0, 0x10, 0x02, 
-       0xe3, 0xa0, 0x20, 0x00, 0xe2, 0x40, 0x00, 0x1f, 
-       0xe0, 0x40, 0x00, 0x0c, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe3, 0xa0, 0xc4, 0xff, 
-       0xe3, 0x8c, 0xc6, 0x0e, 0xe1, 0x5c, 0x00, 0x82, 
-       0x9a, 0x00, 0x00, 0x0a, 0xe1, 0xb0, 0x00, 0x80, 
-       0x03, 0x31, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0a, 
-       0x3a, 0x00, 0x00, 0x11, 0xe1, 0x50, 0x00, 0x0c, 
-       0x03, 0x51, 0x00, 0x00, 0x8a, 0xff, 0xfd, 0xf2, 
-       0xe1, 0xb0, 0x20, 0x82, 0x8a, 0x00, 0x00, 0x17, 
-       0xe3, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x03, 0x53, 0x00, 0x00, 0x0a, 0xff, 0xff, 0xf2, 
-       0xea, 0xff, 0xfd, 0xef, 0xe1, 0x50, 0x00, 0x0c, 
-       0x03, 0x51, 0x00, 0x00, 0x8a, 0xff, 0xfd, 0xe8, 
-       0xe1, 0xb0, 0x20, 0x82, 0x03, 0x33, 0x00, 0x00, 
-       0x83, 0xa0, 0x00, 0x01, 0x93, 0xa0, 0x00, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0x50, 0x00, 0x0c, 
-       0x03, 0x51, 0x00, 0x00, 0x8a, 0xff, 0xfd, 0xe0, 
-       0xe1, 0xb0, 0x20, 0x82, 0x23, 0xa0, 0x00, 0x01, 
-       0x21, 0x2f, 0xff, 0x1e, 0xe1, 0x50, 0x00, 0x02, 
-       0x01, 0x51, 0x00, 0x03, 0x93, 0xa0, 0x00, 0x00, 
-       0x83, 0xa0, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe1, 0x50, 0x00, 0x02, 0x01, 0x51, 0x00, 0x03, 
-       0x33, 0xa0, 0x00, 0x01, 0x23, 0xa0, 0x00, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
-       0xe9, 0x2d, 0x4b, 0xf0, 0xe8, 0x93, 0x00, 0x38, 
-       0xe3, 0x10, 0x01, 0x01, 0x03, 0x13, 0x01, 0x01, 
-       0x1a, 0x00, 0x00, 0x03, 0xeb, 0x00, 0x02, 0x30, 
-       0xeb, 0x00, 0x03, 0x38, 0xe8, 0xbd, 0x4b, 0xf0, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe2, 0x4f, 0xe0, 0x14, 
-       0xe3, 0xa0, 0xb0, 0x00, 0xea, 0x00, 0x02, 0x86, 
-       0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x4b, 0xf0, 
-       0xe8, 0x93, 0x00, 0x38, 0xe3, 0x10, 0x01, 0x01, 
-       0x03, 0x13, 0x01, 0x01, 0x1a, 0x00, 0x00, 0x03, 
-       0xeb, 0x00, 0x03, 0x5e, 0xeb, 0x00, 0x03, 0x2b, 
-       0xe8, 0xbd, 0x4b, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe2, 0x4f, 0xe0, 0x14, 0xe3, 0xa0, 0xb0, 0x00, 
-       0xea, 0x00, 0x03, 0xf8, 0x47, 0x78, 0x00, 0x00, 
-       0xe9, 0x2d, 0x4b, 0xf0, 0xe8, 0x93, 0x00, 0x38, 
-       0xe3, 0xa0, 0xb0, 0x00, 0xe1, 0xd1, 0xc0, 0x80, 
-       0x41, 0xd4, 0xc0, 0x83, 0x5a, 0x00, 0x00, 0x04, 
-       0xe3, 0xa0, 0xb0, 0x04, 0xeb, 0x00, 0x04, 0x3f, 
-       0xeb, 0x00, 0x03, 0x1c, 0xe8, 0xbd, 0x4b, 0xf0, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe3, 0x11, 0x01, 0x02, 
-       0x0a, 0x00, 0x00, 0x08, 0xe3, 0x10, 0x01, 0x01, 
-       0x03, 0x13, 0x01, 0x01, 0x02, 0x4f, 0xe0, 0x24, 
-       0xe3, 0xa0, 0xb0, 0x04, 0x0a, 0x00, 0x05, 0x5b, 
-       0xe0, 0x23, 0x00, 0x00, 0xe2, 0x00, 0x01, 0x02, 
-       0xe8, 0xbd, 0x4b, 0xf0, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe3, 0x14, 0x01, 0x02, 0x03, 0xa0, 0x34, 0x62, 
-       0x13, 0xa0, 0x34, 0x61, 0xea, 0x00, 0x02, 0x9d, 
-       0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x4b, 0xf0, 
-       0xe1, 0xa0, 0x30, 0x00, 0xe1, 0xa0, 0x40, 0x01, 
-       0xe1, 0xa0, 0x50, 0x02, 0xe3, 0x10, 0x01, 0x01, 
-       0x1a, 0x00, 0x00, 0x03, 0xeb, 0x00, 0x03, 0x35, 
-       0xeb, 0x00, 0x03, 0x02, 0xe8, 0xbd, 0x4b, 0xf0, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe2, 0x4f, 0xe0, 0x14, 
-       0xe3, 0xa0, 0xb0, 0x00, 0xea, 0x00, 0x03, 0xcf, 
-       0xb4, 0x77, 0x46, 0x76, 0x1e, 0x5d, 0x9b, 0x06, 
-       0x1c, 0x1c, 0x34, 0x0c, 0xf7, 0xff, 0xff, 0x8c, 
-       0x1c, 0x23, 0x34, 0x0c, 0xf7, 0xff, 0xff, 0x6e, 
-       0x46, 0x6b, 0xf7, 0xff, 0xff, 0x85, 0x1e, 0x6d, 
-       0xd1, 0xf6, 0xb0, 0x03, 0x46, 0xb6, 0xbc, 0x70, 
-       0x47, 0x70, 0x00, 0x00, 0xb4, 0x77, 0x46, 0x76, 
-       0x1e, 0x5d, 0x9b, 0x06, 0x1c, 0x1c, 0x34, 0x0c, 
-       0xf7, 0xff, 0xff, 0x5c, 0x46, 0x6b, 0xf7, 0xff, 
-       0xff, 0x73, 0x1c, 0x23, 0x34, 0x0c, 0xf7, 0xff, 
-       0xff, 0x55, 0x1e, 0x6d, 0xd1, 0xf6, 0xb0, 0x03, 
-       0x46, 0xb6, 0xbc, 0x70, 0x47, 0x70, 0x00, 0x00, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0xb0, 0x10, 0x00, 
-       0xe2, 0x00, 0x01, 0x02, 0x42, 0x61, 0x10, 0x00, 
-       0xe3, 0xa0, 0x20, 0x00, 0x01, 0x2f, 0xff, 0x1e, 
-       0xe3, 0x80, 0x09, 0x01, 0xe3, 0x80, 0x00, 0x1e, 
-       0xe1, 0xb0, 0xc8, 0x21, 0x01, 0xa0, 0x18, 0x01, 
-       0x02, 0x40, 0x00, 0x10, 0xe1, 0xb0, 0xcc, 0x21, 
-       0x01, 0xa0, 0x14, 0x01, 0x02, 0x40, 0x00, 0x08, 
-       0xe1, 0xb0, 0xce, 0x21, 0x01, 0xa0, 0x12, 0x01, 
-       0x02, 0x40, 0x00, 0x04, 0xe1, 0xb0, 0xcf, 0x21, 
-       0x01, 0xa0, 0x11, 0x01, 0x02, 0x40, 0x00, 0x02, 
-       0xe1, 0xb0, 0xcf, 0xa1, 0x01, 0xa0, 0x10, 0x81, 
-       0x02, 0x40, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x4b, 0xf0, 
-       0xe8, 0x93, 0x00, 0x38, 0xe2, 0x23, 0x31, 0x02, 
-       0xe3, 0x10, 0x01, 0x01, 0x03, 0x13, 0x01, 0x01, 
-       0x1a, 0x00, 0x00, 0x03, 0xeb, 0x00, 0x01, 0xbe, 
-       0xeb, 0x00, 0x02, 0xc6, 0xe8, 0xbd, 0x4b, 0xf0, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe2, 0x4f, 0xe0, 0x14, 
-       0xe3, 0xa0, 0xb0, 0x00, 0xea, 0x00, 0x02, 0x14, 
-       0x47, 0x78, 0x00, 0x00, 0xe3, 0xa0, 0xb0, 0x00, 
-       0xe1, 0xa0, 0x20, 0x01, 0xe8, 0x80, 0x00, 0x0e, 
-       0xe5, 0x9f, 0xc0, 0x38, 0xe5, 0x8c, 0xd0, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
-       0xe5, 0x9f, 0x20, 0x28, 0xe5, 0x92, 0x20, 0x00, 
-       0xe5, 0x91, 0x40, 0x2c, 0xe5, 0x91, 0xc0, 0x34, 
-       0xe1, 0x5c, 0x00, 0x02, 0x23, 0xa0, 0x00, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x47, 0x78, 0x00, 0x00, 
-       0xe5, 0x9f, 0xc0, 0x08, 0xe5, 0x9c, 0xd0, 0x00, 
-       0xe3, 0xa0, 0xb0, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x2e, 0x08, 0x21, 0x90, 0x47, 0x78, 0x00, 0x00, 
-       0xe9, 0x2d, 0x40, 0x00, 0xe5, 0x9f, 0xc0, 0xe4, 
-       0xe5, 0x9c, 0x00, 0x00, 0xe3, 0x50, 0x00, 0x00, 
-       0xe3, 0xa0, 0x00, 0x04, 0x15, 0x8c, 0x00, 0x04, 
-       0x0b, 0x00, 0x00, 0x01, 0xe8, 0xbd, 0x40, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe5, 0x9f, 0xc0, 0xcc, 
-       0xea, 0xff, 0xfd, 0x6b, 0xe3, 0xa0, 0x10, 0x0a, 
-       0xe3, 0x50, 0x01, 0x02, 0x13, 0x50, 0x01, 0x06, 
-       0x13, 0x50, 0x01, 0x16, 0x03, 0xa0, 0x10, 0x03, 
-       0xe3, 0x50, 0x01, 0x0a, 0x13, 0x50, 0x01, 0x0e, 
-       0x03, 0xa0, 0x10, 0x05, 0xe5, 0x9f, 0x20, 0xa8, 
-       0xe1, 0x50, 0x00, 0x02, 0xe2, 0x82, 0x20, 0xff, 
-       0x21, 0x52, 0x00, 0x00, 0x23, 0xa0, 0x10, 0x02, 
-       0xe3, 0x50, 0x01, 0x82, 0x03, 0xa0, 0x10, 0x02, 
-       0xe3, 0x50, 0x01, 0x86, 0x03, 0xa0, 0x10, 0x07, 
-       0xe5, 0x9f, 0x20, 0x88, 0xe0, 0x50, 0x20, 0x02, 
-       0x13, 0x52, 0x00, 0x01, 0x03, 0xa0, 0x10, 0x05, 
-       0xe1, 0xa0, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x40, 0x02, 
-       0xe1, 0xa0, 0x30, 0x00, 0xeb, 0xff, 0xff, 0xe4, 
-       0xe8, 0xbd, 0x40, 0x02, 0xe5, 0x9f, 0xc0, 0x50, 
-       0xe3, 0xa0, 0x20, 0x01, 0xe5, 0xcc, 0x20, 0x00, 
-       0xe9, 0x2d, 0x00, 0x0a, 0xeb, 0xff, 0xff, 0xdc, 
-       0xea, 0x00, 0x00, 0x09, 0x47, 0x78, 0x00, 0x00, 
-       0xe5, 0x9f, 0xc0, 0x30, 0xe3, 0xa0, 0x10, 0x00, 
-       0xe5, 0x8c, 0x10, 0x00, 0xe5, 0x9c, 0x00, 0x04, 
-       0xe3, 0x50, 0x00, 0x00, 0x01, 0x2f, 0xff, 0x1e, 
-       0xe5, 0x8c, 0x10, 0x04, 0xea, 0xff, 0xff, 0xd2, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0xa0, 0xc0, 0x0d, 
-       0xe9, 0x2d, 0xd9, 0xf0, 0xe2, 0x4c, 0xb0, 0x04, 
-       0xe3, 0xa0, 0x10, 0x01, 0xea, 0xff, 0xfd, 0x88, 
-       0x2e, 0x08, 0x20, 0xb4, 0x2e, 0x08, 0x20, 0xc6, 
-       0x2e, 0x01, 0xb5, 0xe1, 0x80, 0x00, 0x02, 0x00, 
-       0x80, 0x80, 0x0e, 0xa0, 0xb5, 0xff, 0xa6, 0x23, 
-       0xa5, 0x22, 0xa4, 0x22, 0x68, 0x5a, 0x68, 0x1f, 
-       0x4b, 0x21, 0x60, 0x5a, 0x23, 0x00, 0x4a, 0x21, 
-       0x70, 0x13, 0x70, 0x53, 0x70, 0x93, 0x4a, 0x20, 
-       0x2a, 0x00, 0xd0, 0x02, 0x9a, 0x02, 0xf7, 0xff, 
-       0xff, 0xfe, 0x48, 0x1e, 0x28, 0x00, 0xd0, 0x01, 
-       0xf7, 0xff, 0xff, 0xfe, 0x48, 0x1c, 0x28, 0x00, 
-       0xd0, 0x01, 0xf7, 0xff, 0xff, 0xfe, 0x48, 0x1b, 
-       0x28, 0x00, 0xd0, 0x01, 0xf0, 0x01, 0xfc, 0xb2, 
-       0x48, 0x19, 0x28, 0x00, 0xd0, 0x01, 0xf7, 0xff, 
-       0xff, 0xfe, 0x48, 0x18, 0x28, 0x00, 0xd0, 0x01, 
-       0xf0, 0x01, 0xfb, 0x18, 0x48, 0x16, 0x28, 0x00, 
-       0xd0, 0x01, 0xf0, 0x01, 0xfc, 0x89, 0x48, 0x15, 
-       0x28, 0x00, 0xd0, 0x01, 0xf7, 0xff, 0xff, 0xfe, 
-       0xf7, 0xff, 0xff, 0xa0, 0x48, 0x12, 0x28, 0x00, 
-       0xd0, 0x04, 0x1c, 0x30, 0x1c, 0x29, 0x1c, 0x22, 
-       0xf0, 0x01, 0xfe, 0xa6, 0x2f, 0x00, 0xd0, 0x01, 
-       0xf7, 0xfe, 0xfd, 0xcc, 0xb0, 0x04, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x3a, 0x74, 0x74, 0x00, 
-       0x2e, 0x08, 0x21, 0x94, 0x2e, 0x08, 0x21, 0x94, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x2e, 0x01, 0xb9, 0x91, 
-       0x00, 0x00, 0x00, 0x00, 0x2e, 0x01, 0xb6, 0x71, 
-       0x2e, 0x01, 0xb9, 0x5d, 0x00, 0x00, 0x00, 0x00, 
-       0x2e, 0x01, 0xbd, 0xb5, 0xb5, 0x90, 0x28, 0x00, 
-       0xd0, 0x04, 0x48, 0x12, 0x28, 0x00, 0xd0, 0x01, 
-       0xf7, 0xff, 0xff, 0xfe, 0x4f, 0x10, 0x68, 0x78, 
-       0x28, 0x00, 0xd0, 0x03, 0xf7, 0xfe, 0xfd, 0x94, 
-       0x20, 0x00, 0x60, 0x78, 0x4f, 0x0d, 0x78, 0x78, 
-       0x24, 0x01, 0x28, 0x00, 0xd1, 0x05, 0x70, 0x7c, 
-       0x48, 0x0b, 0x28, 0x00, 0xd0, 0x01, 0xf7, 0xff, 
-       0xff, 0xfe, 0x78, 0xb8, 0x28, 0x00, 0xd1, 0x05, 
-       0x70, 0xbc, 0x48, 0x08, 0x28, 0x00, 0xd0, 0x01, 
-       0xf0, 0x01, 0xfe, 0xb2, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x2e, 0x08, 0x21, 0x94, 0x2e, 0x08, 0x21, 0x94, 
-       0x00, 0x00, 0x00, 0x00, 0x2e, 0x01, 0xbe, 0x55, 
-       0xb5, 0x90, 0x1c, 0x0c, 0x21, 0x01, 0x1c, 0x17, 
-       0xf0, 0x01, 0xfa, 0xbc, 0x21, 0x00, 0x1c, 0x20, 
-       0xf0, 0x01, 0xfa, 0xb8, 0x21, 0x02, 0x1c, 0x38, 
-       0xf0, 0x01, 0xfa, 0xb4, 0x20, 0x01, 0xf7, 0xff, 
-       0xfa, 0x5d, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0xf1, 0x20, 0x00, 0xb0, 0x89, 0x90, 0x06, 
-       0x26, 0x00, 0x90, 0x05, 0x20, 0x01, 0x90, 0x04, 
-       0x27, 0x00, 0x20, 0x00, 0x90, 0x03, 0x90, 0x02, 
-       0x25, 0x00, 0x90, 0x01, 0xf0, 0x01, 0xfb, 0xe2, 
-       0x1c, 0x04, 0x78, 0x00, 0x28, 0x00, 0xd0, 0x17, 
-       0x49, 0xe3, 0x5d, 0xe0, 0x5c, 0x08, 0x08, 0x40, 
-       0xd3, 0x06, 0x37, 0x01, 0x5d, 0xe0, 0x5c, 0x08, 
-       0x08, 0x40, 0xd2, 0xfa, 0xe0, 0x00, 0x37, 0x01, 
-       0x5d, 0xe0, 0x5c, 0x0a, 0x08, 0x52, 0xd2, 0x01, 
-       0x28, 0x00, 0xd1, 0xf8, 0x98, 0x04, 0x30, 0x01, 
-       0x90, 0x04, 0x5d, 0xe0, 0x28, 0x00, 0xd1, 0xe8, 
-       0x98, 0x04, 0x00, 0x80, 0xf0, 0x01, 0xfc, 0x16, 
-       0x4b, 0xd6, 0x93, 0x08, 0x60, 0x18, 0x1c, 0x78, 
-       0xf0, 0x01, 0xfc, 0x10, 0x9b, 0x08, 0x60, 0x58, 
-       0x48, 0xd3, 0x28, 0x00, 0xd0, 0x01, 0xf7, 0xff, 
-       0xff, 0xfe, 0x21, 0x00, 0x20, 0x00, 0x90, 0x04, 
-       0x48, 0xd0, 0x90, 0x07, 0x78, 0x27, 0x34, 0x01, 
-       0x2e, 0x00, 0xd1, 0x58, 0x2f, 0x22, 0xd0, 0x01, 
-       0x2f, 0x27, 0xd1, 0x02, 0x97, 0x05, 0x1c, 0x3e, 
-       0xe0, 0x93, 0x98, 0x06, 0x42, 0x81, 0xd1, 0x4e, 
-       0x98, 0x03, 0x28, 0x00, 0xd1, 0x4b, 0x25, 0x00, 
-       0x43, 0xed, 0x1c, 0x2a, 0x95, 0x01, 0x22, 0x00, 
-       0xab, 0x00, 0x70, 0x1a, 0x70, 0x5a, 0x1e, 0x60, 
-       0x78, 0x02, 0x2a, 0x30, 0xdb, 0x04, 0x2a, 0x39, 
-       0xdc, 0x02, 0x30, 0x01, 0x1f, 0xd5, 0x3d, 0x29, 
-       0x78, 0x02, 0x2a, 0x3e, 0xd0, 0x01, 0x2a, 0x3c, 
-       0xd1, 0x35, 0x2a, 0x3e, 0xd1, 0x0e, 0x22, 0x77, 
-       0xab, 0x00, 0x70, 0x1a, 0x2d, 0x00, 0xd0, 0x63, 
-       0x2d, 0x02, 0xdc, 0x62, 0x78, 0x42, 0x30, 0x01, 
-       0x2a, 0x3e, 0xd1, 0x13, 0x22, 0x61, 0x70, 0x1a, 
-       0x30, 0x01, 0xe0, 0x0f, 0x30, 0x01, 0x1c, 0x02, 
-       0xe0, 0x02, 0x2b, 0x3e, 0xd0, 0x56, 0x32, 0x01, 
-       0x78, 0x13, 0x2b, 0x00, 0xd0, 0x01, 0x2b, 0x20, 
-       0xd1, 0xf7, 0x2d, 0x00, 0xdc, 0x4d, 0x22, 0x72, 
-       0xab, 0x00, 0x70, 0x1a, 0x78, 0x02, 0x2a, 0x26, 
-       0xd1, 0x24, 0x23, 0x01, 0x42, 0xdd, 0xd0, 0x19, 
-       0x2d, 0x00, 0xdd, 0x5e, 0x78, 0x42, 0x30, 0x01, 
-       0x2a, 0x30, 0xdb, 0x5b, 0x2a, 0x32, 0xdc, 0x3c, 
-       0x30, 0x01, 0x1c, 0x2b, 0xd5, 0x04, 0x07, 0xdb, 
-       0x0f, 0xdb, 0x42, 0x5b, 0xe0, 0x02, 0xe0, 0x42, 
-       0x07, 0xdb, 0x0f, 0xdb, 0x33, 0x31, 0x42, 0x9a, 
-       0xd1, 0x63, 0x22, 0x00, 0xab, 0x00, 0x70, 0x1a, 
-       0x95, 0x01, 0xe0, 0x11, 0x22, 0x02, 0x92, 0x01, 
-       0xaa, 0x00, 0x78, 0x12, 0x30, 0x01, 0x2a, 0x72, 
-       0xd0, 0x09, 0xe0, 0x06, 0x23, 0x01, 0x42, 0xdd, 
-       0xd1, 0x06, 0xaa, 0x00, 0x78, 0x12, 0x2a, 0x72, 
-       0xd0, 0x01, 0x25, 0x01, 0xe0, 0x00, 0x25, 0x00, 
-       0xaa, 0x00, 0x78, 0x12, 0x2a, 0x00, 0xd0, 0x16, 
-       0x22, 0x01, 0x92, 0x03, 0x4a, 0x8c, 0x78, 0x03, 
-       0x5c, 0xd3, 0x08, 0x5b, 0xd3, 0x04, 0x78, 0x43, 
-       0x5c, 0xd3, 0x30, 0x01, 0x08, 0x5b, 0xd2, 0xfa, 
-       0x78, 0x02, 0x2a, 0x22, 0xd0, 0x01, 0x2a, 0x27, 
-       0xd1, 0x0c, 0x30, 0x01, 0x1c, 0x16, 0xe0, 0x09, 
-       0xe0, 0x6a, 0xe0, 0xfb, 0xe0, 0x23, 0x78, 0x02, 
-       0x2a, 0x00, 0xd0, 0x03, 0x4b, 0x80, 0x5c, 0x9a, 
-       0x08, 0x52, 0xd3, 0x61, 0x22, 0x01, 0x92, 0x02, 
-       0x1c, 0x04, 0x78, 0x27, 0x34, 0x01, 0x2e, 0x00, 
-       0xd0, 0x15, 0x2f, 0x5c, 0xd1, 0x0b, 0x78, 0x20, 
-       0x28, 0x22, 0xd0, 0x03, 0x28, 0x5c, 0xd0, 0x01, 
-       0x28, 0x27, 0xd1, 0x04, 0x34, 0x01, 0x1c, 0x07, 
-       0xe0, 0x09, 0xe0, 0xdf, 0xe0, 0xde, 0x1c, 0x30, 
-       0x42, 0xb7, 0xd1, 0x04, 0x40, 0x7e, 0x78, 0x27, 
-       0x34, 0x01, 0x42, 0x87, 0xd0, 0xfa, 0x2f, 0x00, 
-       0xd0, 0x0c, 0x2e, 0x00, 0xd1, 0x03, 0x48, 0x6e, 
-       0x5d, 0xc0, 0x08, 0x40, 0xd2, 0x06, 0x1c, 0x08, 
-       0x9b, 0x08, 0x68, 0x5a, 0x54, 0x17, 0x31, 0x01, 
-       0xe0, 0x97, 0xe0, 0xc7, 0x98, 0x06, 0x42, 0x81, 
-       0xd1, 0x08, 0x98, 0x05, 0x28, 0x00, 0xd1, 0x05, 
-       0x98, 0x02, 0x28, 0x00, 0xd0, 0x74, 0x98, 0x03, 
-       0x28, 0x00, 0xd1, 0x72, 0x22, 0x00, 0x1c, 0x08, 
-       0x9b, 0x08, 0x68, 0x5b, 0x54, 0x1a, 0x98, 0x02, 
-       0x31, 0x01, 0x28, 0x00, 0xd0, 0x6a, 0x98, 0x03, 
-       0x28, 0x00, 0xd0, 0x13, 0x01, 0xa8, 0x99, 0x07, 
-       0x18, 0x42, 0x9b, 0x08, 0x68, 0x58, 0x99, 0x06, 
-       0x18, 0x40, 0x46, 0x69, 0xf0, 0x01, 0xfc, 0x72, 
-       0x28, 0x00, 0xd1, 0x07, 0x9b, 0x08, 0x68, 0x58, 
-       0x99, 0x06, 0x18, 0x41, 0xa2, 0x58, 0xa0, 0x5e, 
-       0xf7, 0xff, 0xfe, 0xb6, 0x23, 0x01, 0x98, 0x01, 
-       0x42, 0xd8, 0xdd, 0x51, 0x98, 0x01, 0x28, 0x00, 
-       0xda, 0x03, 0x40, 0x18, 0x42, 0x40, 0xe0, 0x02, 
-       0xe0, 0x90, 0x07, 0xc0, 0x0f, 0xc0, 0x1c, 0x41, 
-       0x98, 0x01, 0xf0, 0x01, 0xfd, 0x61, 0x01, 0x80, 
-       0x99, 0x07, 0x18, 0x40, 0xf0, 0x01, 0xf9, 0xfc, 
-       0x28, 0x00, 0xd1, 0x3d, 0xb0, 0x82, 0x98, 0x03, 
-       0x01, 0x80, 0x99, 0x09, 0x18, 0x40, 0x90, 0x01, 
-       0x9a, 0x03, 0x2a, 0x00, 0xda, 0x03, 0x07, 0xd2, 
-       0x0f, 0xd2, 0x42, 0x52, 0xe0, 0x01, 0x07, 0xd2, 
-       0x0f, 0xd2, 0x01, 0x90, 0x99, 0x09, 0x18, 0x40, 
-       0x30, 0x40, 0x90, 0x00, 0x20, 0xff, 0x30, 0x01, 
-       0xf0, 0x01, 0xfa, 0xe0, 0x1c, 0x01, 0x23, 0xff, 
-       0x22, 0x01, 0x02, 0x52, 0x98, 0x01, 0x33, 0x01, 
-       0xf0, 0x01, 0xfd, 0x56, 0x98, 0x01, 0x68, 0xc0, 
-       0x23, 0x01, 0x02, 0xdb, 0x43, 0x18, 0x99, 0x01, 
-       0x60, 0xc8, 0x08, 0xd8, 0xf0, 0x01, 0xfa, 0xce, 
-       0x1c, 0x01, 0x23, 0xff, 0x22, 0x01, 0x02, 0x52, 
-       0x98, 0x00, 0x33, 0x01, 0xf0, 0x01, 0xfd, 0x44, 
-       0x98, 0x00, 0x68, 0xc0, 0x23, 0x01, 0x02, 0xdb, 
-       0x43, 0x18, 0x99, 0x00, 0x60, 0xc8, 0xe0, 0x02, 
-       0xe0, 0x13, 0xe0, 0x12, 0xe0, 0x05, 0xb0, 0x02, 
-       0x20, 0x00, 0x90, 0x02, 0x90, 0x03, 0x99, 0x06, 
-       0xe0, 0x0b, 0x9b, 0x08, 0x68, 0x58, 0x9a, 0x06, 
-       0x18, 0x82, 0x98, 0x04, 0x1c, 0x43, 0x93, 0x04, 
-       0x00, 0x80, 0x9b, 0x08, 0x68, 0x1b, 0x50, 0x1a, 
-       0x91, 0x06, 0x2f, 0x00, 0xd0, 0x01, 0x26, 0x00, 
-       0x96, 0x05, 0x2f, 0x00, 0xd0, 0x00, 0xe6, 0x9d, 
-       0x2e, 0x00, 0xd0, 0x0a, 0xb0, 0x81, 0xab, 0x00, 
-       0x70, 0x1e, 0x22, 0x00, 0x70, 0x5a, 0x46, 0x69, 
-       0xa2, 0x24, 0xa0, 0x25, 0xf7, 0xff, 0xfe, 0x3c, 
-       0xb0, 0x01, 0x22, 0x00, 0x98, 0x04, 0x00, 0x80, 
-       0x9b, 0x08, 0x68, 0x19, 0x50, 0x0a, 0x98, 0x04, 
-       0x28, 0x00, 0xdd, 0x0f, 0x9b, 0x08, 0x68, 0x18, 
-       0x68, 0x01, 0x68, 0x09, 0x4b, 0x21, 0x40, 0x19, 
-       0xa2, 0x21, 0x68, 0x12, 0x42, 0x91, 0xd1, 0x05, 
-       0x9b, 0x04, 0x3b, 0x01, 0x93, 0x04, 0x30, 0x04, 
-       0x9b, 0x08, 0x60, 0x18, 0x9a, 0x09, 0x9b, 0x08, 
-       0x68, 0x19, 0x98, 0x04, 0xf7, 0xff, 0xf8, 0x0f, 
-       0xf7, 0xff, 0xf8, 0x88, 0x1e, 0x61, 0xa2, 0x19, 
-       0xa0, 0x19, 0xf7, 0xff, 0xfe, 0x15, 0xb0, 0x09, 
-       0xb0, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x21, 0xac, 0x2e, 0x08, 0x21, 0x9c, 
-       0x00, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x95, 0xdc, 
-       0x27, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x49, 0x2f, 
-       0x4f, 0x20, 0x72, 0x65, 0x64, 0x69, 0x72, 0x65, 
-       0x63, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x00, 0x00, 
-       0x63, 0x61, 0x6e, 0x27, 0x74, 0x20, 0x6f, 0x70, 
-       0x65, 0x6e, 0x20, 0x27, 0x00, 0x00, 0x00, 0x00, 
-       0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 
-       0x63, 0x6c, 0x6f, 0x73, 0x69, 0x6e, 0x67, 0x20, 
-       0x00, 0x00, 0x00, 0x00, 0xdf, 0xdf, 0xdf, 0xdf, 
-       0x52, 0x55, 0x4e, 0x00, 0x27, 0x0a, 0x00, 0x00, 
-       0x75, 0x6e, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 
-       0x74, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x69, 
-       0x6c, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x20, 0x49, 
-       0x2f, 0x4f, 0x20, 0x72, 0x65, 0x64, 0x69, 0x72, 
-       0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x27, 
-       0x00, 0x00, 0x00, 0x00, 0xe9, 0x2d, 0x40, 0x00, 
-       0xe1, 0xa0, 0x68, 0x80, 0xe0, 0x56, 0x88, 0x83, 
-       0xe0, 0x20, 0xe0, 0x03, 0xe2, 0x00, 0x01, 0x02, 
-       0xe1, 0xa0, 0x38, 0xa6, 0x8a, 0x00, 0x00, 0x1a, 
-       0x01, 0xa0, 0x90, 0x08, 0x0a, 0x00, 0x00, 0x2e, 
-       0xe2, 0x68, 0x60, 0x00, 0xe1, 0xa0, 0x68, 0xa6, 
-       0xe0, 0x83, 0x30, 0x06, 0xe1, 0xa0, 0x92, 0xa6, 
-       0xe1, 0xc6, 0x62, 0x89, 0xe3, 0x59, 0x00, 0x02, 
-       0x33, 0x39, 0x00, 0x00, 0xe2, 0x66, 0x90, 0x20, 
-       0xe1, 0xa0, 0x89, 0x12, 0xe1, 0xa0, 0x26, 0x32, 
-       0xe1, 0x82, 0x29, 0x11, 0xe1, 0xa0, 0x16, 0x31, 
-       0x0a, 0x00, 0x00, 0x03, 0x11, 0x88, 0x81, 0x08, 
-       0x11, 0x82, 0x81, 0x28, 0x11, 0xa0, 0x20, 0x01, 
-       0x13, 0xa0, 0x10, 0x00, 0x3a, 0x00, 0x00, 0x04, 
-       0x21, 0x88, 0x80, 0x02, 0x21, 0x88, 0x81, 0x08, 
-       0x21, 0x81, 0x81, 0x28, 0x23, 0xa0, 0x20, 0x00, 
-       0x23, 0xa0, 0x10, 0x00, 0xe3, 0xa0, 0x90, 0x00, 
-       0xea, 0x00, 0x00, 0x15, 0xe1, 0xa0, 0x68, 0xa8, 
-       0xe1, 0xa0, 0x82, 0xa6, 0xe1, 0xc6, 0x62, 0x88, 
-       0xe3, 0x58, 0x00, 0x02, 0x33, 0x38, 0x00, 0x00, 
-       0xe2, 0x66, 0x80, 0x20, 0xe1, 0xa0, 0x98, 0x15, 
-       0xe1, 0xa0, 0x56, 0x35, 0xe1, 0x85, 0x58, 0x14, 
-       0xe1, 0xa0, 0x46, 0x34, 0x0a, 0x00, 0x00, 0x03, 
-       0x11, 0x89, 0x91, 0x09, 0x11, 0x85, 0x91, 0x29, 
-       0x11, 0xa0, 0x50, 0x04, 0x13, 0xa0, 0x40, 0x00, 
-       0x3a, 0x00, 0x00, 0x04, 0x21, 0x89, 0x90, 0x05, 
-       0x21, 0x89, 0x91, 0x09, 0x21, 0x84, 0x91, 0x29, 
-       0x23, 0xa0, 0x50, 0x00, 0x23, 0xa0, 0x40, 0x00, 
-       0xe3, 0xa0, 0x80, 0x00, 0xe3, 0x1e, 0x01, 0x02, 
-       0x1a, 0x00, 0x00, 0x09, 0xe0, 0x98, 0x60, 0x09, 
-       0xe0, 0xb2, 0x20, 0x05, 0xe0, 0xb1, 0x10, 0x04, 
-       0x38, 0xbd, 0x80, 0x00, 0xe2, 0x83, 0x30, 0x01, 
-       0xe1, 0xb0, 0x10, 0x61, 0xe1, 0xb0, 0x20, 0x62, 
-       0xe1, 0x86, 0x60, 0x86, 0xe1, 0xa0, 0x60, 0x66, 
-       0xe8, 0xbd, 0x80, 0x00, 0xe0, 0x58, 0x60, 0x09, 
-       0xe0, 0xd2, 0x20, 0x05, 0xe0, 0xd1, 0x10, 0x04, 
-       0x2a, 0x00, 0x00, 0x03, 0xe2, 0x20, 0x01, 0x02, 
-       0xe2, 0x76, 0x60, 0x00, 0xe2, 0xf2, 0x20, 0x00, 
-       0xe2, 0xe1, 0x10, 0x00, 0xe3, 0x11, 0x01, 0x02, 
-       0x18, 0xbd, 0x80, 0x00, 0xe0, 0x96, 0x60, 0x06, 
-       0xe0, 0xb2, 0x20, 0x02, 0xe0, 0xa1, 0x10, 0x01, 
-       0xe2, 0x43, 0x30, 0x01, 0xe3, 0x11, 0x01, 0x02, 
-       0x18, 0xbd, 0x80, 0x00, 0xe1, 0x91, 0xe0, 0x02, 
-       0x1b, 0x00, 0x06, 0x90, 0x18, 0xbd, 0x80, 0x00, 
-       0xe3, 0xa0, 0x00, 0x00, 0xe3, 0xa0, 0x10, 0x00, 
-       0xe2, 0x8d, 0xd0, 0x04, 0xe8, 0xbd, 0x4b, 0xf0, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0xa0, 0x98, 0x83, 
-       0xe3, 0x79, 0x08, 0x02, 0x30, 0x09, 0x90, 0x04, 
-       0xe0, 0x19, 0x90, 0x83, 0xe1, 0xa0, 0x88, 0x80, 
-       0xe3, 0x78, 0x08, 0x02, 0x30, 0x08, 0x80, 0x01, 
-       0xe0, 0x18, 0x80, 0x80, 0x4a, 0x00, 0x00, 0x14, 
-       0xe3, 0x19, 0x01, 0x02, 0x1a, 0x00, 0x00, 0x22, 
-       0xe9, 0x2d, 0x40, 0x00, 0xe0, 0x11, 0x60, 0x80, 
-       0x43, 0xc1, 0x11, 0x02, 0x42, 0x80, 0x00, 0x01, 
-       0xe0, 0x14, 0x60, 0x83, 0x43, 0xc4, 0x41, 0x02, 
-       0x42, 0x83, 0x30, 0x01, 0xe3, 0x10, 0x01, 0x01, 
-       0x11, 0xb0, 0x68, 0x80, 0x1b, 0x00, 0x05, 0xf8, 
-       0xe3, 0x13, 0x01, 0x01, 0x11, 0xb0, 0x68, 0x83, 
-       0x1b, 0x00, 0x06, 0x2f, 0xeb, 0xff, 0xff, 0x8a, 
-       0xe3, 0x11, 0x01, 0x02, 0x18, 0xbd, 0x80, 0x00, 
-       0xe1, 0x91, 0xe0, 0x02, 0x1b, 0x00, 0x06, 0x6d, 
-       0xe8, 0xbd, 0x80, 0x00, 0xe3, 0x19, 0x01, 0x02, 
-       0x0a, 0x00, 0x00, 0x09, 0xe1, 0x82, 0x80, 0x81, 
-       0xe1, 0x88, 0x80, 0x05, 0xe1, 0x98, 0x80, 0x84, 
-       0x1a, 0x00, 0x06, 0xb7, 0xe0, 0x23, 0x85, 0x0b, 
-       0xe0, 0x38, 0x80, 0x00, 0x52, 0x00, 0x81, 0x02, 
-       0x5a, 0x00, 0x00, 0x0a, 0xe3, 0x80, 0x04, 0x61, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe1, 0x92, 0x80, 0x81, 
-       0x1a, 0x00, 0x06, 0xc0, 0xe2, 0x00, 0x81, 0x02, 
-       0xea, 0x00, 0x00, 0x04, 0xe1, 0x95, 0x80, 0x84, 
-       0x1a, 0x00, 0x06, 0xb3, 0xe2, 0x03, 0x81, 0x02, 
-       0xe3, 0x1b, 0x06, 0x02, 0x12, 0x28, 0x81, 0x02, 
-       0xe3, 0x1b, 0x06, 0x01, 0x12, 0x28, 0x81, 0x02, 
-       0xe2, 0x8f, 0x00, 0x14, 0xe8, 0x90, 0x00, 0x07, 
-       0xe1, 0x80, 0x00, 0x08, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x7f, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xe8, 0xbd, 0x4b, 0xf0, 0xe5, 0x9f, 0x20, 0x6c, 
-       0xe5, 0x92, 0x10, 0x00, 0xe1, 0xa0, 0xc1, 0x83, 
-       0xe1, 0xa0, 0xcd, 0xac, 0xe1, 0x81, 0x10, 0x0c, 
-       0xe5, 0x82, 0x10, 0x00, 0xe3, 0x13, 0x03, 0x01, 
-       0x1a, 0x00, 0x00, 0x05, 0xe3, 0x13, 0x04, 0x02, 
-       0x1a, 0x00, 0x00, 0x07, 0xe3, 0x11, 0x08, 0x01, 
-       0x0a, 0x00, 0x00, 0x44, 0xe2, 0x8f, 0x00, 0x54, 
-       0xea, 0x00, 0x00, 0x06, 0xe3, 0x11, 0x07, 0x01, 
-       0x0a, 0x00, 0x00, 0x34, 0xe2, 0x8f, 0x00, 0x74, 
-       0xea, 0x00, 0x00, 0x02, 0xe3, 0x11, 0x08, 0x02, 
-       0x0a, 0x00, 0x00, 0x30, 0xe2, 0x8f, 0x00, 0x8c, 
-       0xe5, 0x9f, 0x10, 0x1c, 0xe2, 0x4e, 0xe0, 0x04, 
-       0xe5, 0x81, 0xe0, 0x3c, 0xe3, 0xa0, 0xec, 0xde, 
-       0xe3, 0x8e, 0xe0, 0xad, 0xe1, 0x8e, 0xe8, 0x0e, 
-       0xe8, 0x81, 0x7f, 0xff, 0xea, 0x00, 0x00, 0x01, 
-       0x2e, 0x08, 0x22, 0xac, 0x2e, 0x08, 0x22, 0xb0, 
-       0xe5, 0x9f, 0xc1, 0x2c, 0xe3, 0x5c, 0x00, 0x00, 
-       0x11, 0x2f, 0xff, 0x1c, 0xe6, 0x00, 0x00, 0x10, 
-       0x80, 0x00, 0x02, 0x00, 0x46, 0x6c, 0x6f, 0x61, 
-       0x74, 0x69, 0x6e, 0x67, 0x20, 0x50, 0x6f, 0x69, 
-       0x6e, 0x74, 0x20, 0x45, 0x78, 0x63, 0x65, 0x70, 
-       0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x49, 0x6e, 
-       0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x4f, 0x70, 
-       0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x00, 
-       0x80, 0x00, 0x02, 0x01, 0x46, 0x6c, 0x6f, 0x61, 
-       0x74, 0x69, 0x6e, 0x67, 0x20, 0x50, 0x6f, 0x69, 
-       0x6e, 0x74, 0x20, 0x45, 0x78, 0x63, 0x65, 0x70, 
-       0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x4f, 0x76, 
-       0x65, 0x72, 0x66, 0x6c, 0x6f, 0x77, 0x00, 0x00, 
-       0x80, 0x00, 0x02, 0x02, 0x46, 0x6c, 0x6f, 0x61, 
-       0x74, 0x69, 0x6e, 0x67, 0x20, 0x50, 0x6f, 0x69, 
-       0x6e, 0x74, 0x20, 0x45, 0x78, 0x63, 0x65, 0x70, 
-       0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x20, 0x44, 0x69, 
-       0x76, 0x69, 0x64, 0x65, 0x20, 0x42, 0x79, 0x20, 
-       0x5a, 0x65, 0x72, 0x6f, 0x00, 0x00, 0x00, 0x00, 
-       0xe2, 0x00, 0x21, 0x02, 0xe3, 0x13, 0x07, 0x0f, 
-       0x1a, 0x00, 0x00, 0x13, 0xe3, 0x13, 0x05, 0x02, 
-       0x12, 0x8f, 0x00, 0x0c, 0x18, 0x90, 0x00, 0x03, 
-       0x05, 0x9f, 0x00, 0x0c, 0xe1, 0x80, 0x00, 0x02, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x7f, 0xf0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 
-       0xe3, 0x13, 0x07, 0x0f, 0x12, 0x00, 0x21, 0x02, 
-       0x1a, 0x00, 0x00, 0x07, 0xe3, 0x13, 0x05, 0x02, 
-       0x12, 0x8f, 0x00, 0x08, 0x18, 0x90, 0x00, 0x03, 
-       0x05, 0x9f, 0x00, 0x08, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x7f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x7f, 0xc0, 0x00, 0x00, 0xe3, 0x13, 0x07, 0x02, 
-       0x13, 0xa0, 0x00, 0x00, 0x13, 0xa0, 0x10, 0x00, 
-       0x11, 0x2f, 0xff, 0x1e, 0xe3, 0x13, 0x07, 0x01, 
-       0x13, 0xe0, 0x00, 0x00, 0x13, 0xe0, 0x10, 0x00, 
-       0x11, 0x2f, 0xff, 0x1e, 0xe3, 0x13, 0x06, 0x01, 
-       0x13, 0xa0, 0x00, 0x00, 0x13, 0xa0, 0x11, 0x02, 
-       0x03, 0xa0, 0x01, 0x02, 0xe3, 0x32, 0x01, 0x02, 
-       0x11, 0xe0, 0x00, 0x00, 0x11, 0xe0, 0x10, 0x01, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x2e, 0x01, 0x96, 0x91, 
-       0xe3, 0x10, 0x02, 0x06, 0x1a, 0x00, 0x00, 0x0d, 
-       0xe1, 0xb0, 0x80, 0x86, 0x0a, 0x00, 0x00, 0x0d, 
-       0x22, 0x92, 0x20, 0x01, 0x22, 0x91, 0x10, 0x01, 
-       0x23, 0xa0, 0x11, 0x02, 0xe2, 0xb3, 0x30, 0x00, 
-       0x4a, 0x00, 0x00, 0x0a, 0xe2, 0x83, 0xc0, 0x01, 
-       0xe3, 0xcc, 0xc1, 0x01, 0xe3, 0x5c, 0x09, 0x02, 
-       0xc3, 0xa0, 0x33, 0x19, 0xe2, 0x00, 0x01, 0x02, 
-       0xe1, 0x83, 0x00, 0x00, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xe1, 0xa0, 0x30, 0x00, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0x21, 0xb0, 0x80, 0xa2, 0xea, 0xff, 0xff, 0xef, 
-       0xe3, 0x11, 0x01, 0x02, 0x1a, 0x00, 0x00, 0x04, 
-       0xe3, 0xa0, 0x10, 0x00, 0xe3, 0xa0, 0x20, 0x00, 
-       0xe2, 0x00, 0x01, 0x02, 0xe3, 0xa0, 0x30, 0x00, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe1, 0xb0, 0xc8, 0x21, 
-       0x01, 0xa0, 0xc8, 0x22, 0x01, 0x8c, 0x18, 0x01, 
-       0x02, 0x83, 0x30, 0x10, 0xe1, 0xb0, 0xcc, 0x21, 
-       0x01, 0xa0, 0xcc, 0x22, 0x01, 0x8c, 0x14, 0x01, 
-       0x02, 0x83, 0x30, 0x08, 0xe1, 0xb0, 0xce, 0x21, 
-       0x01, 0xa0, 0xce, 0x22, 0x01, 0x8c, 0x12, 0x01, 
-       0x02, 0x83, 0x30, 0x04, 0xe1, 0xb0, 0xcf, 0x21, 
-       0x01, 0xa0, 0xcf, 0x22, 0x01, 0x8c, 0x11, 0x01, 
-       0x02, 0x83, 0x30, 0x02, 0xe1, 0xb0, 0xcf, 0xa1, 
-       0x01, 0xa0, 0xcf, 0xa2, 0x01, 0x8c, 0x10, 0x81, 
-       0x02, 0x83, 0x30, 0x01, 0xe1, 0xb0, 0x30, 0x03, 
-       0x4a, 0xff, 0xff, 0xe4, 0x5a, 0xff, 0xff, 0xda, 
-       0xe3, 0xc0, 0x81, 0x03, 0xe3, 0xc3, 0x91, 0x03, 
-       0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
-       0xe0, 0x88, 0x30, 0x09, 0xe2, 0x43, 0x3c, 0x3f, 
-       0xe2, 0x43, 0x30, 0xfe, 0xe3, 0x32, 0x00, 0x00, 
-       0x0a, 0x00, 0x00, 0x5d, 0xe3, 0x35, 0x00, 0x00, 
-       0x0a, 0x00, 0x00, 0x3d, 0xe9, 0x2d, 0x48, 0x81, 
-       0xe1, 0xa0, 0x08, 0x21, 0xe1, 0xc1, 0x78, 0x00, 
-       0xe1, 0xa0, 0x68, 0x24, 0xe1, 0xc4, 0x88, 0x06, 
-       0xe0, 0x09, 0x06, 0x90, 0xe0, 0x06, 0x06, 0x97, 
-       0xe0, 0x07, 0x07, 0x98, 0xe0, 0x97, 0x78, 0x06, 
-       0xe0, 0xa9, 0x98, 0x26, 0xe0, 0x08, 0x08, 0x90, 
-       0xe0, 0x97, 0x78, 0x08, 0xe0, 0xa9, 0x08, 0x28, 
-       0xe1, 0xa0, 0xb8, 0x22, 0xe1, 0xc2, 0xe8, 0x0b, 
-       0xe1, 0xa0, 0x68, 0x25, 0xe1, 0xc5, 0x88, 0x06, 
-       0xe0, 0x09, 0x06, 0x9b, 0xe0, 0x06, 0x06, 0x9e, 
-       0xe0, 0x0e, 0x0e, 0x98, 0xe0, 0x9e, 0xe8, 0x06, 
-       0xe0, 0xa9, 0x98, 0x26, 0xe0, 0x08, 0x08, 0x9b, 
-       0xe0, 0x9e, 0xe8, 0x08, 0xe0, 0xa9, 0xb8, 0x28, 
-       0xe0, 0x97, 0x70, 0x0b, 0xe2, 0xa0, 0x00, 0x00, 
-       0xe0, 0x97, 0xb0, 0x0e, 0xe0, 0xb7, 0x70, 0x00, 
-       0xe2, 0xa0, 0x00, 0x00, 0xe0, 0x51, 0x80, 0x02, 
-       0xe3, 0xa0, 0x10, 0x00, 0xe3, 0xa0, 0x60, 0x00, 
-       0x31, 0xe0, 0x10, 0x01, 0x30, 0x44, 0x60, 0x05, 
-       0x10, 0x55, 0x90, 0x04, 0x03, 0xa0, 0x10, 0x00, 
-       0x31, 0xe0, 0x10, 0x01, 0x30, 0x46, 0x60, 0x08, 
-       0xe1, 0xa0, 0x48, 0x28, 0xe1, 0xc8, 0x58, 0x04, 
-       0xe1, 0xa0, 0x88, 0x29, 0xe1, 0xc9, 0x98, 0x08, 
-       0xe0, 0x22, 0x68, 0x94, 0xe0, 0x08, 0x08, 0x95, 
-       0xe0, 0x06, 0x05, 0x99, 0xe0, 0x96, 0x68, 0x08, 
-       0xe0, 0xa2, 0x28, 0x28, 0xe0, 0x09, 0x09, 0x94, 
-       0xe0, 0x96, 0x68, 0x09, 0xe0, 0xa2, 0x28, 0x29, 
-       0xe0, 0x9b, 0x60, 0x06, 0xe0, 0xb7, 0x20, 0x02, 
-       0xe0, 0xb0, 0x10, 0x01, 0xe1, 0x8e, 0xe1, 0x0e, 
-       0xe1, 0x86, 0x61, 0x2e, 0x48, 0xbd, 0x88, 0x81, 
-       0xe0, 0x96, 0x60, 0x06, 0xe0, 0xb2, 0x20, 0x02, 
-       0xe0, 0xa1, 0x10, 0x01, 0xe2, 0x43, 0x30, 0x01, 
-       0xe8, 0xbd, 0x88, 0x81, 0xe1, 0xa0, 0x58, 0x24, 
-       0xe1, 0xc4, 0x68, 0x05, 0xe1, 0xa0, 0x88, 0x21, 
-       0xe1, 0xc1, 0x98, 0x08, 0xe0, 0x04, 0x08, 0x95, 
-       0xe0, 0x08, 0x08, 0x96, 0xe0, 0x01, 0x06, 0x99, 
-       0xe0, 0x91, 0x18, 0x08, 0xe0, 0xa4, 0x48, 0x28, 
-       0xe0, 0x09, 0x09, 0x95, 0xe0, 0x91, 0x18, 0x09, 
-       0xe0, 0xa4, 0x48, 0x29, 0xe1, 0xa0, 0x88, 0x22, 
-       0xe1, 0xc2, 0x98, 0x08, 0xe0, 0x02, 0x08, 0x95, 
-       0xe0, 0x08, 0x08, 0x96, 0xe0, 0x06, 0x06, 0x99, 
-       0xe0, 0x96, 0x68, 0x08, 0xe0, 0xa2, 0x28, 0x28, 
-       0xe0, 0x09, 0x09, 0x95, 0xe0, 0x96, 0x68, 0x09, 
-       0xe0, 0xa2, 0x58, 0x29, 0xe0, 0x95, 0x20, 0x01, 
-       0xe2, 0xb4, 0x10, 0x00, 0x41, 0xa0, 0xf0, 0x0e, 
-       0xe0, 0x96, 0x60, 0x06, 0xe0, 0xb2, 0x20, 0x02, 
-       0xe0, 0xa1, 0x10, 0x01, 0xe2, 0x43, 0x30, 0x01, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0x35, 0x00, 0x00, 
-       0x0a, 0x00, 0x00, 0x24, 0xe1, 0xa0, 0x28, 0x21, 
-       0xe1, 0xc1, 0x68, 0x02, 0xe1, 0xa0, 0x88, 0x24, 
-       0xe1, 0xc4, 0x98, 0x08, 0xe0, 0x01, 0x08, 0x92, 
-       0xe0, 0x08, 0x08, 0x96, 0xe0, 0x04, 0x06, 0x99, 
-       0xe0, 0x94, 0x48, 0x08, 0xe0, 0xa1, 0x18, 0x28, 
-       0xe0, 0x09, 0x09, 0x92, 0xe0, 0x94, 0x48, 0x09, 
-       0xe0, 0xa1, 0x18, 0x29, 0xe1, 0xa0, 0x88, 0x25, 
-       0xe1, 0xc5, 0x98, 0x08, 0xe0, 0x05, 0x08, 0x92, 
-       0xe0, 0x08, 0x08, 0x96, 0xe0, 0x06, 0x06, 0x99, 
-       0xe0, 0x96, 0x68, 0x08, 0xe0, 0xa5, 0x58, 0x28, 
-       0xe0, 0x09, 0x09, 0x92, 0xe0, 0x96, 0x68, 0x09, 
-       0xe0, 0xa5, 0x28, 0x29, 0xe0, 0x92, 0x20, 0x04, 
-       0xe2, 0xb1, 0x10, 0x00, 0x41, 0xa0, 0xf0, 0x0e, 
-       0xe0, 0x96, 0x60, 0x06, 0xe0, 0xb2, 0x20, 0x02, 
-       0xe0, 0xa1, 0x10, 0x01, 0xe2, 0x43, 0x30, 0x01, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0xc0, 0x81, 0x03, 
-       0xe3, 0xc3, 0x91, 0x03, 0xe0, 0x20, 0x00, 0x03, 
-       0xe2, 0x00, 0x01, 0x02, 0xe0, 0x88, 0x30, 0x09, 
-       0xe2, 0x43, 0x3c, 0x3f, 0xe2, 0x43, 0x30, 0xfe, 
-       0xe1, 0xa0, 0x58, 0x24, 0xe1, 0xc4, 0x68, 0x05, 
-       0xe1, 0xa0, 0x88, 0x21, 0xe1, 0xc1, 0x98, 0x08, 
-       0xe0, 0x01, 0x08, 0x95, 0xe0, 0x08, 0x08, 0x96, 
-       0xe0, 0x02, 0x06, 0x99, 0xe0, 0x92, 0x28, 0x08, 
-       0xe0, 0xa1, 0x18, 0x28, 0xe0, 0x09, 0x09, 0x95, 
-       0xe0, 0x92, 0x28, 0x09, 0xe0, 0xb1, 0x18, 0x29, 
-       0xe3, 0xa0, 0x60, 0x00, 0x41, 0xa0, 0xf0, 0x0e, 
-       0xe0, 0x92, 0x20, 0x02, 0xe0, 0xa1, 0x10, 0x01, 
-       0xe2, 0x43, 0x30, 0x01, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xe1, 0xa0, 0x98, 0x83, 0xe3, 0x79, 0x08, 0x02, 
-       0x30, 0x09, 0x90, 0x04, 0xe0, 0x19, 0x90, 0x83, 
-       0xe1, 0xa0, 0x88, 0x80, 0xe3, 0x78, 0x08, 0x02, 
-       0x30, 0x08, 0x80, 0x01, 0xe0, 0x18, 0x80, 0x80, 
-       0x4a, 0x00, 0x00, 0x1f, 0xe3, 0x19, 0x01, 0x02, 
-       0x1a, 0x00, 0x00, 0x2f, 0xe1, 0x91, 0x80, 0x02, 
-       0x11, 0x94, 0x80, 0x05, 0x0a, 0x00, 0x00, 0x13, 
-       0xe0, 0x11, 0x60, 0x80, 0x43, 0xc1, 0x11, 0x02, 
-       0x42, 0x80, 0x00, 0x01, 0xe0, 0x14, 0x60, 0x83, 
-       0x43, 0xc4, 0x41, 0x02, 0x42, 0x83, 0x30, 0x01, 
-       0xe3, 0xc0, 0x81, 0x03, 0xe3, 0xc3, 0x91, 0x03, 
-       0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
-       0xe0, 0x88, 0x30, 0x09, 0xe2, 0x43, 0x3c, 0x3f, 
-       0xe2, 0x43, 0x30, 0xfe, 0xe9, 0x2d, 0x40, 0x00, 
-       0xe3, 0x11, 0x01, 0x02, 0x0b, 0x00, 0x04, 0xed, 
-       0xe3, 0x14, 0x01, 0x02, 0x0b, 0x00, 0x05, 0x04, 
-       0xe8, 0xbd, 0x40, 0x00, 0xea, 0xff, 0xff, 0x44, 
-       0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
-       0xe3, 0xa0, 0x10, 0x00, 0xe3, 0xa0, 0x20, 0x00, 
-       0xe3, 0xa0, 0x30, 0x00, 0xe3, 0xa0, 0x60, 0x00, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0x19, 0x01, 0x02, 
-       0x0a, 0x00, 0x00, 0x09, 0xe1, 0x82, 0x80, 0x81, 
-       0xe1, 0x88, 0x80, 0x05, 0xe1, 0x98, 0x80, 0x84, 
-       0x1a, 0x00, 0x05, 0x2d, 0xe0, 0x20, 0x80, 0x03, 
-       0xe2, 0x08, 0x81, 0x02, 0xe2, 0x8f, 0x00, 0x44, 
-       0xe8, 0x90, 0x00, 0x07, 0xe1, 0x80, 0x00, 0x08, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe1, 0x92, 0x80, 0x81, 
-       0x1a, 0x00, 0x05, 0x36, 0xe1, 0x94, 0x80, 0x05, 
-       0x1a, 0xff, 0xff, 0xf5, 0xe3, 0x80, 0x04, 0x61, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe1, 0x95, 0x80, 0x84, 
-       0x1a, 0x00, 0x05, 0x27, 0xe1, 0x91, 0x80, 0x02, 
-       0x1a, 0xff, 0xff, 0xef, 0xe3, 0x80, 0x04, 0x61, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x40, 0x00, 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xe1, 0xa0, 0x80, 0x00, 
-       0xe1, 0xa0, 0x00, 0x03, 0xe1, 0xa0, 0x30, 0x08, 
-       0xe1, 0xa0, 0x80, 0x01, 0xe1, 0xa0, 0x10, 0x04, 
-       0xe1, 0xa0, 0x40, 0x08, 0xe1, 0xa0, 0x80, 0x02, 
-       0xe1, 0xa0, 0x20, 0x05, 0xe1, 0xa0, 0x50, 0x08, 
-       0xe3, 0xc0, 0x81, 0x03, 0xe3, 0xc3, 0x91, 0x03, 
-       0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
-       0xe0, 0x49, 0x30, 0x08, 0xe2, 0x83, 0x3c, 0x3f, 
-       0xe2, 0x83, 0x30, 0xff, 0xe9, 0x2d, 0x48, 0x89, 
-       0xe1, 0xa0, 0x08, 0x21, 0xe1, 0xc1, 0x78, 0x00, 
-       0xe1, 0xa0, 0xb8, 0x22, 0xe1, 0xc2, 0xe8, 0x0b, 
-       0xe2, 0x8f, 0x6e, 0x36, 0xe7, 0xd6, 0x64, 0x20, 
-       0xe0, 0x28, 0x66, 0x90, 0xe2, 0x68, 0x85, 0x02, 
-       0xe0, 0x06, 0x06, 0x98, 0xe1, 0xa0, 0x69, 0xa6, 
-       0xe2, 0x86, 0x60, 0x02, 0xe1, 0xa0, 0x86, 0xa1, 
-       0xe0, 0x29, 0x66, 0x98, 0xe2, 0x69, 0x92, 0x02, 
-       0xe1, 0xa0, 0x88, 0x29, 0xe1, 0xc9, 0x98, 0x08, 
-       0xe0, 0x02, 0x06, 0x99, 0xe0, 0x01, 0x06, 0x98, 
-       0xe0, 0x81, 0x68, 0x22, 0xe1, 0xa0, 0x63, 0x26, 
-       0xe1, 0xb0, 0x40, 0xa4, 0xe1, 0xb0, 0x50, 0x65, 
-       0x33, 0xa0, 0x30, 0x00, 0x23, 0xa0, 0x31, 0x02, 
-       0xe1, 0xa0, 0x87, 0xa4, 0xe0, 0x09, 0x08, 0x96, 
-       0xe1, 0xa0, 0x98, 0x29, 0xe0, 0x08, 0x0b, 0x99, 
-       0xe0, 0x55, 0x50, 0x08, 0xe0, 0x08, 0x09, 0x90, 
-       0xe0, 0xc4, 0x40, 0x08, 0xe0, 0x08, 0x0e, 0x99, 
-       0xe0, 0x53, 0x38, 0x08, 0xe0, 0xd5, 0x58, 0x28, 
-       0xe0, 0x08, 0x07, 0x99, 0x30, 0x45, 0x58, 0x08, 
-       0x20, 0x55, 0x58, 0x08, 0xe0, 0xc4, 0x48, 0x28, 
-       0xe1, 0xa0, 0x18, 0x09, 0xe1, 0xa0, 0x81, 0x24, 
-       0xe0, 0x09, 0x08, 0x96, 0xe1, 0xa0, 0x98, 0x29, 
-       0xe0, 0x08, 0x0b, 0x99, 0xe0, 0x53, 0x39, 0x88, 
-       0xe0, 0xd5, 0x56, 0xa8, 0xe0, 0x08, 0x09, 0x90, 
-       0x30, 0x45, 0x59, 0x88, 0x20, 0x55, 0x59, 0x88, 
-       0xe0, 0xc4, 0x46, 0xa8, 0xe0, 0x08, 0x0e, 0x99, 
-       0xe0, 0x53, 0x31, 0x88, 0xe0, 0xd5, 0x5e, 0xa8, 
-       0xe0, 0x08, 0x07, 0x99, 0x30, 0x45, 0x51, 0x88, 
-       0x20, 0x55, 0x51, 0x88, 0xe0, 0xc4, 0x4e, 0xa8, 
-       0xe1, 0xa0, 0x4d, 0x04, 0xe1, 0x84, 0x43, 0x25, 
-       0xe1, 0xa0, 0x5d, 0x05, 0xe1, 0x85, 0x53, 0x23, 
-       0xe1, 0xa0, 0x3d, 0x03, 0xe0, 0x81, 0x11, 0x89, 
-       0xe5, 0x9d, 0x80, 0x0c, 0xe3, 0x18, 0x00, 0x01, 
-       0x1a, 0x00, 0x00, 0x94, 0xe1, 0xa0, 0x87, 0xa4, 
-       0xe0, 0x09, 0x08, 0x96, 0xe1, 0xa0, 0x98, 0x29, 
-       0xe0, 0x08, 0x0b, 0x99, 0xe0, 0x55, 0x50, 0x08, 
-       0xe0, 0x08, 0x09, 0x90, 0xe0, 0xc4, 0x40, 0x08, 
-       0xe0, 0x08, 0x0e, 0x99, 0xe0, 0x53, 0x38, 0x08, 
-       0xe0, 0xd5, 0x58, 0x28, 0xe0, 0x08, 0x07, 0x99, 
-       0x30, 0x45, 0x58, 0x08, 0x20, 0x55, 0x58, 0x08, 
-       0xe0, 0xc4, 0x48, 0x28, 0xe1, 0xa0, 0x2b, 0x09, 
-       0xe0, 0x81, 0x15, 0x29, 0xe1, 0xa0, 0x81, 0x24, 
-       0xe0, 0x09, 0x08, 0x96, 0xe1, 0xa0, 0x98, 0x29, 
-       0xe0, 0x08, 0x0b, 0x99, 0xe0, 0x53, 0x39, 0x88, 
-       0xe0, 0xd5, 0x56, 0xa8, 0xe0, 0x08, 0x09, 0x90, 
-       0x30, 0x45, 0x59, 0x88, 0x20, 0x55, 0x59, 0x88, 
-       0xe0, 0xc4, 0x46, 0xa8, 0xe0, 0x08, 0x0e, 0x99, 
-       0xe0, 0x53, 0x31, 0x88, 0xe0, 0xd5, 0x5e, 0xa8, 
-       0xe0, 0x08, 0x07, 0x99, 0x30, 0x45, 0x51, 0x88, 
-       0x20, 0x55, 0x51, 0x88, 0xe0, 0xc4, 0x4e, 0xa8, 
-       0xe1, 0xa0, 0x4d, 0x04, 0xe1, 0x84, 0x43, 0x25, 
-       0xe1, 0xa0, 0x5d, 0x05, 0xe1, 0x85, 0x53, 0x23, 
-       0xe1, 0xa0, 0x3d, 0x03, 0xe0, 0x92, 0x24, 0x89, 
-       0xe2, 0xa1, 0x10, 0x00, 0xe5, 0x9d, 0x80, 0x0c, 
-       0xe3, 0x18, 0x00, 0x02, 0x1a, 0x00, 0x00, 0x3f, 
-       0xe1, 0xa0, 0x87, 0xa4, 0xe0, 0x09, 0x08, 0x96, 
-       0xe1, 0xa0, 0x98, 0x29, 0xe0, 0x08, 0x0b, 0x99, 
-       0xe0, 0x55, 0x50, 0x08, 0xe0, 0x08, 0x09, 0x90, 
-       0xe0, 0xc4, 0x40, 0x08, 0xe0, 0x08, 0x0e, 0x99, 
-       0xe0, 0x53, 0x38, 0x08, 0xe0, 0xd5, 0x58, 0x28, 
-       0xe0, 0x08, 0x07, 0x99, 0x30, 0x45, 0x58, 0x08, 
-       0x20, 0x55, 0x58, 0x08, 0xe0, 0xc4, 0x48, 0x28, 
-       0xe1, 0xa0, 0x47, 0x04, 0xe1, 0x84, 0x49, 0x25, 
-       0xe1, 0xa0, 0x57, 0x05, 0xe1, 0x85, 0x59, 0x23, 
-       0xe1, 0xa0, 0x37, 0x03, 0xe1, 0xa0, 0x6e, 0x09, 
-       0xe0, 0x92, 0x22, 0x29, 0xe2, 0xa1, 0x10, 0x00, 
-       0xe1, 0x87, 0x08, 0x00, 0xe1, 0x8e, 0x78, 0x0b, 
-       0xe3, 0xa0, 0xe0, 0x00, 0xe0, 0x55, 0x90, 0x07, 
-       0xe0, 0xd4, 0x80, 0x00, 0x21, 0xa0, 0x50, 0x09, 
-       0x21, 0xa0, 0x40, 0x08, 0xe0, 0xae, 0xe0, 0x0e, 
-       0xe3, 0xa0, 0xb0, 0x00, 0xe0, 0x93, 0x30, 0x03, 
-       0xe0, 0xb5, 0x50, 0x05, 0xe0, 0xb4, 0x40, 0x04, 
-       0xe0, 0xab, 0xb0, 0x0b, 0xe0, 0x55, 0x90, 0x07, 
-       0xe0, 0xd4, 0x80, 0x00, 0xe2, 0xdb, 0xb0, 0x00, 
-       0x21, 0xa0, 0x50, 0x09, 0x21, 0xa0, 0x40, 0x08, 
-       0xe0, 0xae, 0xe0, 0x0e, 0xe3, 0xa0, 0xb0, 0x00, 
-       0xe0, 0x93, 0x30, 0x03, 0xe0, 0xb5, 0x50, 0x05, 
-       0xe0, 0xb4, 0x40, 0x04, 0xe0, 0xab, 0xb0, 0x0b, 
-       0xe0, 0x55, 0x90, 0x07, 0xe0, 0xd4, 0x80, 0x00, 
-       0xe2, 0xdb, 0xb0, 0x00, 0x21, 0xa0, 0x50, 0x09, 
-       0x21, 0xa0, 0x40, 0x08, 0xe0, 0xae, 0xe0, 0x0e, 
-       0xe1, 0x94, 0x80, 0x05, 0x13, 0x86, 0x60, 0x01, 
-       0xe0, 0x96, 0x6e, 0x0e, 0xe2, 0xb2, 0x20, 0x00, 
-       0xe2, 0xb1, 0x10, 0x00, 0x48, 0xbd, 0x88, 0x89, 
-       0xe8, 0xbd, 0x48, 0x89, 0xe0, 0x96, 0x60, 0x06, 
-       0xe0, 0xb2, 0x20, 0x02, 0xe0, 0xa1, 0x10, 0x01, 
-       0xe2, 0x43, 0x30, 0x01, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xe1, 0x87, 0x08, 0x00, 0xe1, 0x8e, 0x78, 0x0b, 
-       0xe3, 0xa0, 0xe0, 0x00, 0xe0, 0x93, 0x30, 0x03, 
-       0xe0, 0xb5, 0x50, 0x05, 0xe0, 0xa4, 0x40, 0x04, 
-       0xe0, 0x55, 0x90, 0x07, 0xe0, 0xd4, 0x80, 0x00, 
-       0x21, 0xa0, 0x50, 0x09, 0x21, 0xa0, 0x40, 0x08, 
-       0xe0, 0xae, 0xe0, 0x0e, 0xe3, 0xa0, 0xb0, 0x00, 
-       0xe0, 0x93, 0x30, 0x03, 0xe0, 0xb5, 0x50, 0x05, 
-       0xe0, 0xb4, 0x40, 0x04, 0xe0, 0xab, 0xb0, 0x0b, 
-       0xe0, 0x55, 0x90, 0x07, 0xe0, 0xd4, 0x80, 0x00, 
-       0xe2, 0xdb, 0xb0, 0x00, 0x21, 0xa0, 0x50, 0x09, 
-       0x21, 0xa0, 0x40, 0x08, 0xe0, 0xae, 0xe0, 0x0e, 
-       0xe3, 0xa0, 0xb0, 0x00, 0xe0, 0x93, 0x30, 0x03, 
-       0xe0, 0xb5, 0x50, 0x05, 0xe0, 0xb4, 0x40, 0x04, 
-       0xe0, 0xab, 0xb0, 0x0b, 0xe0, 0x55, 0x90, 0x07, 
-       0xe0, 0xd4, 0x80, 0x00, 0xe2, 0xdb, 0xb0, 0x00, 
-       0x21, 0xa0, 0x50, 0x09, 0x21, 0xa0, 0x40, 0x08, 
-       0xe0, 0xae, 0xe0, 0x0e, 0xe1, 0x84, 0x60, 0x05, 
-       0xe0, 0x92, 0x24, 0x8e, 0xe2, 0xb1, 0x10, 0x00, 
-       0x48, 0xbd, 0x88, 0x89, 0xe8, 0xbd, 0x48, 0x89, 
-       0xe0, 0x92, 0x20, 0x02, 0xe0, 0xa1, 0x10, 0x01, 
-       0xe2, 0x43, 0x30, 0x01, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xe1, 0x87, 0x08, 0x00, 0xe1, 0x8e, 0x78, 0x0b, 
-       0xe0, 0x93, 0x30, 0x03, 0xe0, 0xb5, 0x50, 0x05, 
-       0xe0, 0xa4, 0x40, 0x04, 0xe0, 0x55, 0x90, 0x07, 
-       0xe0, 0xd4, 0x80, 0x00, 0x21, 0xa0, 0x50, 0x09, 
-       0x21, 0xa0, 0x40, 0x08, 0x22, 0x81, 0x10, 0x20, 
-       0xe3, 0xa0, 0xb0, 0x00, 0xe0, 0x93, 0x30, 0x03, 
-       0xe0, 0xb5, 0x50, 0x05, 0xe0, 0xb4, 0x40, 0x04, 
-       0xe0, 0xab, 0xb0, 0x0b, 0xe0, 0x55, 0x90, 0x07, 
-       0xe0, 0xd4, 0x80, 0x00, 0xe2, 0xdb, 0xb0, 0x00, 
-       0x21, 0xa0, 0x50, 0x09, 0x21, 0xa0, 0x40, 0x08, 
-       0x22, 0x81, 0x10, 0x10, 0xe3, 0xa0, 0xb0, 0x00, 
-       0xe0, 0x93, 0x30, 0x03, 0xe0, 0xb5, 0x50, 0x05, 
-       0xe0, 0xb4, 0x40, 0x04, 0xe0, 0xab, 0xb0, 0x0b, 
-       0xe0, 0x55, 0x90, 0x07, 0xe0, 0xd4, 0x80, 0x00, 
-       0xe2, 0xdb, 0xb0, 0x00, 0x21, 0xa0, 0x50, 0x09, 
-       0x21, 0xa0, 0x40, 0x08, 0x22, 0x81, 0x10, 0x08, 
-       0xe1, 0x84, 0x60, 0x05, 0xe3, 0xa0, 0x20, 0x00, 
-       0xe3, 0x31, 0x00, 0x00, 0x48, 0xbd, 0x88, 0x89, 
-       0xe8, 0xbd, 0x48, 0x89, 0xe1, 0xa0, 0x10, 0x81, 
-       0xe2, 0x43, 0x30, 0x01, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0x80, 0x80, 0x7f, 0x7e, 0x7d, 0x7c, 0x7b, 0x7a, 
-       0x79, 0x78, 0x77, 0x76, 0x76, 0x75, 0x74, 0x73, 
-       0x72, 0x71, 0x71, 0x70, 0x6f, 0x6e, 0x6e, 0x6d, 
-       0x6c, 0x6c, 0x6b, 0x6a, 0x6a, 0x69, 0x68, 0x68, 
-       0x67, 0x66, 0x66, 0x65, 0x64, 0x64, 0x63, 0x63, 
-       0x62, 0x61, 0x61, 0x60, 0x60, 0x5f, 0x5f, 0x5e, 
-       0x5e, 0x5d, 0x5d, 0x5c, 0x5c, 0x5b, 0x5b, 0x5a, 
-       0x5a, 0x59, 0x59, 0x58, 0x58, 0x57, 0x57, 0x56, 
-       0x56, 0x55, 0x55, 0x55, 0x54, 0x54, 0x53, 0x53, 
-       0x52, 0x52, 0x52, 0x51, 0x51, 0x50, 0x50, 0x50, 
-       0x4f, 0x4f, 0x4f, 0x4e, 0x4e, 0x4d, 0x4d, 0x4d, 
-       0x4c, 0x4c, 0x4c, 0x4b, 0x4b, 0x4b, 0x4a, 0x4a, 
-       0x4a, 0x49, 0x49, 0x49, 0x48, 0x48, 0x48, 0x47, 
-       0x47, 0x47, 0x47, 0x46, 0x46, 0x46, 0x45, 0x45, 
-       0x45, 0x44, 0x44, 0x44, 0x44, 0x43, 0x43, 0x43, 
-       0x43, 0x42, 0x42, 0x42, 0x42, 0x41, 0x41, 0x41, 
-       0xe1, 0xa0, 0x98, 0x83, 0xe3, 0x79, 0x08, 0x02, 
-       0x30, 0x09, 0x90, 0x04, 0xe0, 0x19, 0x90, 0x83, 
-       0xe1, 0xa0, 0x88, 0x80, 0xe3, 0x78, 0x08, 0x02, 
-       0x30, 0x08, 0x80, 0x01, 0xe0, 0x18, 0x80, 0x80, 
-       0x4a, 0x00, 0x00, 0x20, 0xe3, 0x19, 0x01, 0x02, 
-       0x1a, 0x00, 0x00, 0x32, 0xe3, 0x1b, 0x00, 0x04, 
-       0x1a, 0x00, 0x00, 0x08, 0xe1, 0xa0, 0x80, 0x00, 
-       0xe1, 0xa0, 0x00, 0x03, 0xe1, 0xa0, 0x30, 0x08, 
-       0xe1, 0xa0, 0x80, 0x01, 0xe1, 0xa0, 0x10, 0x04, 
-       0xe1, 0xa0, 0x40, 0x08, 0xe1, 0xa0, 0x80, 0x02, 
-       0xe1, 0xa0, 0x20, 0x05, 0xe1, 0xa0, 0x50, 0x08, 
-       0xe0, 0x11, 0x60, 0x80, 0x43, 0xc1, 0x11, 0x02, 
-       0x42, 0x80, 0x00, 0x01, 0xe0, 0x14, 0x60, 0x83, 
-       0x43, 0xc4, 0x41, 0x02, 0x42, 0x83, 0x30, 0x01, 
-       0xe3, 0xc0, 0x81, 0x03, 0xe3, 0xc3, 0x91, 0x03, 
-       0xe0, 0x20, 0x00, 0x03, 0xe2, 0x00, 0x01, 0x02, 
-       0xe0, 0x49, 0x30, 0x08, 0xe2, 0x83, 0x3c, 0x3f, 
-       0xe2, 0x83, 0x30, 0xff, 0xe9, 0x2d, 0x40, 0x00, 
-       0xe3, 0x11, 0x01, 0x02, 0x0b, 0x00, 0x03, 0xa1, 
-       0xe3, 0x14, 0x01, 0x02, 0x0b, 0x00, 0x03, 0x86, 
-       0xe8, 0xbd, 0x40, 0x00, 0xea, 0xff, 0xfe, 0xb6, 
-       0xe3, 0x19, 0x01, 0x02, 0x0a, 0x00, 0x00, 0x05, 
-       0xe1, 0x82, 0x80, 0x81, 0xe1, 0x88, 0x80, 0x05, 
-       0xe1, 0x98, 0x80, 0x84, 0x1a, 0x00, 0x03, 0xb6, 
-       0xe3, 0x80, 0x04, 0x61, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xe1, 0x92, 0x80, 0x81, 0x1a, 0x00, 0x03, 0xc3, 
-       0xe0, 0x20, 0x80, 0x03, 0xe2, 0x08, 0x81, 0x02, 
-       0xe3, 0x1b, 0x00, 0x04, 0x02, 0x8f, 0x00, 0x50, 
-       0x12, 0x8f, 0x00, 0x40, 0xe8, 0x90, 0x00, 0x07, 
-       0xe1, 0x80, 0x00, 0x08, 0xe3, 0xa0, 0x30, 0x00, 
-       0xe3, 0xa0, 0x60, 0x00, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xe1, 0x95, 0x80, 0x84, 0x1a, 0x00, 0x03, 0xae, 
-       0xe0, 0x20, 0x80, 0x03, 0xe2, 0x08, 0x81, 0x02, 
-       0xe3, 0x1b, 0x00, 0x04, 0x12, 0x8f, 0x00, 0x20, 
-       0x02, 0x8f, 0x00, 0x10, 0xe8, 0x90, 0x00, 0x07, 
-       0xe1, 0x80, 0x00, 0x08, 0xe3, 0xa0, 0x30, 0x00, 
-       0xe3, 0xa0, 0x60, 0x00, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x7f, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xb5, 0x00, 0x49, 0x02, 0xf0, 0x00, 0xf9, 0x2a, 
-       0xbc, 0x08, 0x47, 0x18, 0xff, 0xff, 0xff, 0xfd, 
-       0xb5, 0x80, 0x1c, 0x07, 0x28, 0x0a, 0xd2, 0x14, 
-       0xa3, 0x01, 0x5c, 0x1b, 0x00, 0x5b, 0x44, 0x9f, 
-       0x10, 0x04, 0x10, 0x06, 0x08, 0x0a, 0x0c, 0x10, 
-       0x0e, 0x0e, 0xa0, 0x0f, 0xe0, 0x0c, 0xa0, 0x1a, 
-       0xe0, 0x0a, 0xa0, 0x33, 0xe0, 0x08, 0xa0, 0x3f, 
-       0xe0, 0x06, 0xa0, 0x4b, 0xe0, 0x04, 0xa0, 0x52, 
-       0xe0, 0x02, 0x1c, 0x38, 0xf0, 0x00, 0xff, 0x89, 
-       0x21, 0x03, 0xf0, 0x00, 0xf9, 0x27, 0x2f, 0x04, 
-       0xd1, 0x05, 0x20, 0x01, 0xf7, 0xfe, 0xf8, 0xd4, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0xf7, 0xfe, 
-       0xfd, 0xb3, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x41, 0x62, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 
-       0x20, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 
-       0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x65, 0x2e, 
-       0x67, 0x2e, 0x20, 0x61, 0x62, 0x6f, 0x72, 0x74, 
-       0x28, 0x29, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 
-       0x69, 0x6f, 0x6e, 0x29, 0x00, 0x00, 0x00, 0x00, 
-       0x49, 0x6c, 0x6c, 0x65, 0x67, 0x61, 0x6c, 0x20, 
-       0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 
-       0x69, 0x6f, 0x6e, 0x20, 0x28, 0x63, 0x61, 0x6c, 
-       0x6c, 0x20, 0x74, 0x6f, 0x20, 0x6e, 0x6f, 0x6e, 
-       0x2d, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 
-       0x6e, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x63, 
-       0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x65, 0x64, 
-       0x29, 0x0a, 0x5b, 0x69, 0x73, 0x20, 0x74, 0x68, 
-       0x65, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x69, 
-       0x6e, 0x67, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 
-       0x20, 0x65, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 
-       0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6c, 
-       0x6c, 0x65, 0x64, 0x3f, 0x5d, 0x00, 0x00, 0x00, 
-       0x49, 0x6e, 0x74, 0x65, 0x72, 0x72, 0x75, 0x70, 
-       0x74, 0x20, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 
-       0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 
-       0x75, 0x73, 0x65, 0x72, 0x20, 0x2d, 0x20, 0x70, 
-       0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x74, 
-       0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x65, 
-       0x64, 0x00, 0x00, 0x00, 0x49, 0x6c, 0x6c, 0x65, 
-       0x67, 0x61, 0x6c, 0x20, 0x61, 0x64, 0x64, 0x72, 
-       0x65, 0x73, 0x73, 0x20, 0x28, 0x65, 0x2e, 0x67, 
-       0x2e, 0x20, 0x77, 0x69, 0x6c, 0x64, 0x6c, 0x79, 
-       0x20, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 
-       0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x62, 
-       0x6f, 0x75, 0x6e, 0x64, 0x73, 0x29, 0x00, 0x00, 
-       0x54, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 
-       0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x71, 0x75, 
-       0x65, 0x73, 0x74, 0x20, 0x72, 0x65, 0x63, 0x65, 
-       0x69, 0x76, 0x65, 0x64, 0x00, 0x00, 0x00, 0x00, 
-       0x55, 0x73, 0x65, 0x72, 0x2d, 0x64, 0x65, 0x66, 
-       0x69, 0x6e, 0x65, 0x64, 0x20, 0x73, 0x69, 0x67, 
-       0x6e, 0x61, 0x6c, 0x00, 0xb5, 0x00, 0x20, 0x01, 
-       0x49, 0x05, 0x70, 0x08, 0xa0, 0x05, 0x21, 0x03, 
-       0xf0, 0x00, 0xf8, 0x78, 0x20, 0x64, 0xf7, 0xfe, 
-       0xf8, 0x27, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x21, 0x94, 0x53, 0x74, 0x61, 0x63, 
-       0x6b, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x66, 0x6c, 
-       0x6f, 0x77, 0x0a, 0x00, 0xb5, 0x00, 0x28, 0x07, 
-       0xd1, 0x03, 0xf7, 0xff, 0xff, 0xe3, 0xbc, 0x08, 
-       0x47, 0x18, 0xf7, 0xff, 0xff, 0x19, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0x00, 0xf7, 0xff, 0xff, 0xf2, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0x90, 0x28, 0x00, 
-       0xdd, 0x01, 0x28, 0x0b, 0xdb, 0x05, 0x20, 0x03, 
-       0x49, 0x0b, 0x60, 0x08, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x87, 0x4b, 0x09, 0x59, 0xd9, 
-       0x4a, 0x09, 0x42, 0x91, 0xd1, 0x02, 0xf7, 0xff, 
-       0xff, 0xdd, 0xe0, 0x05, 0x4c, 0x07, 0x42, 0xa1, 
-       0xd0, 0x02, 0x51, 0xda, 0xf7, 0xfd, 0xfa, 0xee, 
-       0x20, 0x00, 0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x20, 0xb0, 0x2e, 0x08, 0x94, 0xac, 
-       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 
-       0x28, 0x00, 0xdd, 0x09, 0x28, 0x0b, 0xda, 0x07, 
-       0x00, 0x80, 0x49, 0x04, 0x58, 0x08, 0x49, 0x04, 
-       0x42, 0x88, 0xd0, 0x01, 0x20, 0x01, 0x47, 0x70, 
-       0x20, 0x00, 0x47, 0x70, 0x2e, 0x08, 0x94, 0xac, 
-       0xff, 0xff, 0xff, 0xff, 0x28, 0x00, 0xdd, 0x01, 
-       0x28, 0x0b, 0xdb, 0x01, 0x48, 0x03, 0x47, 0x70, 
-       0x00, 0x83, 0x4a, 0x03, 0x58, 0xd0, 0x50, 0xd1, 
-       0x47, 0x70, 0x00, 0x00, 0xff, 0xff, 0xff, 0xfe, 
-       0x2e, 0x08, 0x94, 0xac, 0xb5, 0x90, 0x27, 0x01, 
-       0x4c, 0x05, 0x1c, 0x38, 0x1c, 0x21, 0xf7, 0xff, 
-       0xff, 0xe9, 0x37, 0x01, 0x2f, 0x0b, 0xdb, 0xf8, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0xff, 0xff, 0xff, 0xff, 0xb5, 0x90, 0x1c, 0x0c, 
-       0x1c, 0x07, 0x48, 0x12, 0x28, 0x00, 0xd0, 0x09, 
-       0x48, 0x11, 0x78, 0x00, 0x28, 0x00, 0xd1, 0x05, 
-       0x1c, 0x38, 0x1c, 0x21, 0xf0, 0x00, 0xfb, 0x44, 
-       0x28, 0x00, 0xd1, 0x13, 0x08, 0x60, 0xd3, 0x02, 
-       0x20, 0x0a, 0xf0, 0x00, 0xf8, 0xd3, 0x78, 0x38, 
-       0x28, 0x00, 0xd0, 0x06, 0x78, 0x38, 0x37, 0x01, 
-       0xf0, 0x00, 0xf8, 0xcc, 0x78, 0x38, 0x28, 0x00, 
-       0xd1, 0xf8, 0x08, 0xa0, 0xd3, 0x02, 0x20, 0x0a, 
-       0xf0, 0x00, 0xf8, 0xc4, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x01, 0xbd, 0x35, 
-       0x2e, 0x08, 0x21, 0x94, 0xb5, 0x80, 0xb0, 0x83, 
-       0x90, 0x00, 0x91, 0x01, 0xf7, 0xfd, 0xfb, 0x1e, 
-       0x90, 0x02, 0x46, 0x69, 0x20, 0x01, 0xf0, 0x01, 
-       0xf8, 0x61, 0x23, 0x01, 0x1c, 0x07, 0x42, 0xd8, 
-       0xd1, 0x05, 0x21, 0x00, 0x20, 0x13, 0xf0, 0x01, 
-       0xf8, 0x59, 0x49, 0x03, 0x60, 0x08, 0x1c, 0x38, 
-       0xb0, 0x03, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x20, 0xb0, 0xb5, 0x80, 0xb0, 0x81, 
-       0x90, 0x00, 0x46, 0x69, 0x20, 0x02, 0xf0, 0x01, 
-       0xf8, 0x49, 0x1c, 0x07, 0xd0, 0x05, 0x21, 0x00, 
-       0x20, 0x13, 0xf0, 0x01, 0xf8, 0x43, 0x49, 0x03, 
-       0x60, 0x08, 0x1c, 0x38, 0xb0, 0x01, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x20, 0xb0, 
-       0xb5, 0x80, 0xb0, 0x84, 0x90, 0x00, 0x91, 0x01, 
-       0x92, 0x02, 0x46, 0x69, 0x20, 0x05, 0xf0, 0x01, 
-       0xf8, 0x31, 0x1c, 0x07, 0xd0, 0x05, 0x21, 0x00, 
-       0x20, 0x13, 0xf0, 0x01, 0xf8, 0x2b, 0x49, 0x03, 
-       0x60, 0x08, 0x1c, 0x38, 0xb0, 0x04, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x20, 0xb0, 
-       0xb5, 0x80, 0xb0, 0x84, 0x90, 0x00, 0x91, 0x01, 
-       0x92, 0x02, 0x93, 0x03, 0x46, 0x69, 0x20, 0x06, 
-       0xf0, 0x01, 0xf8, 0x18, 0x1c, 0x07, 0xd0, 0x05, 
-       0x21, 0x00, 0x20, 0x13, 0xf0, 0x01, 0xf8, 0x12, 
-       0x49, 0x03, 0x60, 0x08, 0x1c, 0x38, 0xb0, 0x04, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x20, 0xb0, 0xb5, 0x00, 0xb0, 0x81, 
-       0x90, 0x00, 0x46, 0x69, 0x20, 0x08, 0xf0, 0x01, 
-       0xf8, 0x01, 0xb0, 0x01, 0xbc, 0x08, 0x47, 0x18, 
-       0xb5, 0x00, 0x69, 0x40, 0xb0, 0x81, 0x90, 0x00, 
-       0x46, 0x69, 0x20, 0x09, 0xf0, 0x00, 0xff, 0xf6, 
-       0xb0, 0x01, 0xbc, 0x08, 0x47, 0x18, 0xb5, 0x80, 
-       0xb0, 0x82, 0x90, 0x00, 0x91, 0x01, 0x46, 0x69, 
-       0x20, 0x0a, 0xf0, 0x00, 0xff, 0xeb, 0x1c, 0x07, 
-       0xd5, 0x05, 0x21, 0x00, 0x20, 0x13, 0xf0, 0x00, 
-       0xff, 0xe5, 0x49, 0x03, 0x60, 0x08, 0x1c, 0x38, 
-       0xb0, 0x02, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x20, 0xb0, 0xb5, 0x80, 0xb0, 0x81, 
-       0x90, 0x00, 0x46, 0x69, 0x20, 0x0b, 0xf0, 0x00, 
-       0xff, 0xd5, 0x1c, 0x07, 0xd5, 0x05, 0x21, 0x00, 
-       0x20, 0x13, 0xf0, 0x00, 0xff, 0xcf, 0x49, 0x03, 
-       0x60, 0x08, 0x1c, 0x38, 0xb0, 0x01, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x20, 0xb0, 
-       0xb5, 0x00, 0xb0, 0x81, 0x90, 0x00, 0x46, 0x69, 
-       0x20, 0x0c, 0xf0, 0x00, 0xff, 0xbf, 0xb0, 0x01, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0x00, 0xb0, 0x83, 
-       0x90, 0x00, 0x91, 0x01, 0x92, 0x02, 0x46, 0x69, 
-       0x20, 0x0d, 0xf0, 0x00, 0xff, 0xb3, 0xb0, 0x03, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0x01, 0x46, 0x69, 
-       0x20, 0x03, 0xf0, 0x00, 0xff, 0xab, 0xb0, 0x01, 
-       0xbc, 0x08, 0x47, 0x18, 0xb5, 0x80, 0xb0, 0x82, 
-       0x90, 0x00, 0xf7, 0xfd, 0xfa, 0x5b, 0x90, 0x01, 
-       0x46, 0x69, 0x20, 0x12, 0xf0, 0x00, 0xff, 0x9e, 
-       0x1c, 0x07, 0xd0, 0x05, 0x21, 0x00, 0x20, 0x13, 
-       0xf0, 0x00, 0xff, 0x98, 0x49, 0x03, 0x60, 0x08, 
-       0x1c, 0x38, 0xb0, 0x02, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x20, 0xb0, 
-       0xb5, 0x80, 0xb0, 0x82, 0x90, 0x00, 0xf7, 0xfd, 
-       0xfa, 0x41, 0x90, 0x01, 0x46, 0x69, 0x20, 0x0e, 
-       0xf0, 0x00, 0xff, 0x84, 0x1c, 0x07, 0xd0, 0x05, 
-       0x21, 0x00, 0x20, 0x13, 0xf0, 0x00, 0xff, 0x7e, 
-       0x49, 0x03, 0x60, 0x08, 0x1c, 0x38, 0xb0, 0x02, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x20, 0xb0, 0xb5, 0x80, 0xb0, 0x84, 
-       0x90, 0x00, 0x1c, 0x0f, 0xf7, 0xfd, 0xfa, 0x26, 
-       0x90, 0x01, 0x97, 0x02, 0x1c, 0x38, 0xf7, 0xfd, 
-       0xfa, 0x21, 0x90, 0x03, 0x46, 0x69, 0x20, 0x0f, 
-       0xf0, 0x00, 0xff, 0x64, 0x1c, 0x07, 0xd0, 0x05, 
-       0x21, 0x00, 0x20, 0x13, 0xf0, 0x00, 0xff, 0x5e, 
-       0x49, 0x03, 0x60, 0x08, 0x1c, 0x38, 0xb0, 0x04, 
-       0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x20, 0xb0, 0xb5, 0x80, 0xb0, 0x82, 
-       0x4f, 0x08, 0x97, 0x00, 0x20, 0xff, 0x30, 0x01, 
-       0x90, 0x01, 0x46, 0x69, 0x20, 0x15, 0xf0, 0x00, 
-       0xff, 0x49, 0x28, 0x00, 0xd0, 0x01, 0x20, 0x00, 
-       0xe0, 0x00, 0x1c, 0x38, 0xb0, 0x02, 0xbc, 0x80, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x94, 0xdc, 
-       0xb5, 0x00, 0x21, 0x00, 0x20, 0x10, 0xf0, 0x00, 
-       0xff, 0x39, 0x49, 0x02, 0x68, 0x09, 0x1a, 0x40, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x21, 0xa4, 
-       0xb5, 0x00, 0x21, 0x00, 0x20, 0x10, 0xf0, 0x00, 
-       0xff, 0x2d, 0x49, 0x02, 0x60, 0x08, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x21, 0xa4, 
-       0xb5, 0x80, 0x21, 0x00, 0x1c, 0x07, 0x20, 0x11, 
-       0xf0, 0x00, 0xff, 0x20, 0x2f, 0x00, 0xd0, 0x00, 
-       0x60, 0x38, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0x00, 0x47, 0x70, 0xb4, 0x80, 0x20, 0x03, 
-       0x43, 0xc0, 0x23, 0x00, 0x49, 0x07, 0x54, 0x0b, 
-       0x30, 0x01, 0xd4, 0xfc, 0x20, 0x00, 0x4a, 0x06, 
-       0x5c, 0x17, 0x54, 0x0f, 0x18, 0x0f, 0x37, 0x80, 
-       0x70, 0x3b, 0x30, 0x01, 0x28, 0x80, 0xd3, 0xf7, 
-       0xbc, 0x80, 0x47, 0x70, 0x2e, 0x08, 0x21, 0xac, 
-       0x2e, 0x03, 0x3b, 0x58, 0xb5, 0x80, 0x49, 0x07, 
-       0x68, 0x09, 0xf7, 0xfd, 0xf9, 0x13, 0x1c, 0x07, 
-       0xd1, 0x03, 0xa1, 0x05, 0xa0, 0x05, 0xf0, 0x00, 
-       0xfc, 0xe7, 0x1c, 0x38, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x20, 0xa8, 
-       0x00, 0x00, 0x00, 0x00, 0x4e, 0x6f, 0x20, 0x73, 
-       0x74, 0x6f, 0x72, 0x65, 0x20, 0x6c, 0x65, 0x66, 
-       0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x49, 0x2f, 
-       0x4f, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 
-       0x20, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 
-       0x6c, 0x69, 0x6b, 0x65, 0x00, 0x00, 0x00, 0x00, 
-       0x23, 0x80, 0x68, 0xc1, 0x43, 0x19, 0x60, 0xc1, 
-       0x21, 0x00, 0x60, 0x01, 0x60, 0x81, 0x47, 0x70, 
-       0xb5, 0xf7, 0x68, 0xd5, 0x69, 0x56, 0x1c, 0x0c, 
-       0x1c, 0x17, 0x0d, 0x68, 0xd3, 0x05, 0x23, 0x10, 
-       0x43, 0x1d, 0x1c, 0x30, 0xf7, 0xff, 0xfe, 0xfc, 
-       0x61, 0xb8, 0x48, 0x12, 0x40, 0x28, 0xd0, 0x08, 
-       0x69, 0xb9, 0x1c, 0x30, 0xf7, 0xff, 0xfe, 0xc7, 
-       0x28, 0x00, 0xdb, 0x10, 0x4b, 0x0e, 0x40, 0x1d, 
-       0x60, 0xfd, 0x99, 0x00, 0x1c, 0x30, 0x1c, 0x22, 
-       0x1c, 0x2b, 0xf7, 0xff, 0xfe, 0x75, 0x00, 0x41, 
-       0x08, 0x49, 0x1a, 0x61, 0x69, 0xba, 0x18, 0x51, 
-       0x61, 0xb9, 0x28, 0x00, 0xd0, 0x08, 0x1c, 0x38, 
-       0xf7, 0xff, 0xff, 0xce, 0x20, 0x00, 0x43, 0xc0, 
-       0xb0, 0x03, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0x00, 0xe7, 0xf9, 0x00, 0x02, 0x00, 0x10, 
-       0xff, 0xfd, 0xff, 0xef, 0xb5, 0xb0, 0x48, 0x15, 
-       0x68, 0xc1, 0x4b, 0x15, 0x40, 0x19, 0x1c, 0x1d, 
-       0x42, 0x99, 0xd1, 0x01, 0xf0, 0x00, 0xfc, 0xd6, 
-       0x48, 0x12, 0x68, 0xc1, 0x4b, 0x10, 0x40, 0x19, 
-       0x42, 0xa9, 0xd1, 0x01, 0xf0, 0x00, 0xfc, 0xce, 
-       0x48, 0x0f, 0x68, 0xc1, 0x4b, 0x0c, 0x40, 0x19, 
-       0x42, 0xa9, 0xd1, 0x01, 0xf0, 0x00, 0xfc, 0xc6, 
-       0x27, 0x00, 0x4c, 0x0c, 0x01, 0xb8, 0x19, 0x00, 
-       0x68, 0xc1, 0x4b, 0x07, 0x40, 0x19, 0x42, 0xa9, 
-       0xd1, 0x01, 0xf0, 0x00, 0xfc, 0xbb, 0x37, 0x01, 
-       0x2f, 0x0d, 0xdb, 0xf3, 0xbc, 0xb0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x95, 0xdc, 
-       0x00, 0x00, 0x02, 0x02, 0x2e, 0x08, 0x96, 0x1c, 
-       0x2e, 0x08, 0x96, 0x5c, 0x2e, 0x08, 0x96, 0x9c, 
-       0xb5, 0xf0, 0x1c, 0x07, 0x69, 0x04, 0x6a, 0xc0, 
-       0x68, 0x79, 0x42, 0x88, 0xd9, 0x00, 0x1c, 0x01, 
-       0x68, 0xf8, 0x4b, 0x13, 0x40, 0x18, 0x07, 0x82, 
-       0x0f, 0x92, 0x25, 0x00, 0x60, 0xf8, 0x2a, 0x01, 
-       0xd0, 0x1a, 0x22, 0x82, 0x40, 0x02, 0x15, 0x1e, 
-       0x2a, 0x02, 0xd1, 0x0a, 0x0c, 0x40, 0xd3, 0x13, 
-       0x42, 0xa1, 0xd0, 0x0a, 0x1b, 0x09, 0x1c, 0x20, 
-       0x1c, 0x3a, 0xf7, 0xff, 0xff, 0x75, 0x28, 0x00, 
-       0xd0, 0x03, 0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x62, 0xfc, 0x60, 0x7c, 0x60, 0xbd, 
-       0x68, 0xf8, 0x4b, 0x04, 0x40, 0x18, 0x60, 0xf8, 
-       0x1c, 0x28, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0xff, 0xf7, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 
-       0xb5, 0x80, 0x1c, 0x07, 0x68, 0xc0, 0x23, 0x20, 
-       0x43, 0xdb, 0x40, 0x18, 0x60, 0xf8, 0x69, 0xb8, 
-       0x6a, 0xb9, 0x42, 0x88, 0xd0, 0x0d, 0x1c, 0x38, 
-       0xf7, 0xff, 0xff, 0xbe, 0x68, 0xf8, 0x4b, 0x08, 
-       0x40, 0x18, 0x23, 0x10, 0x43, 0x18, 0x60, 0xf8, 
-       0x6a, 0xb8, 0x61, 0xb8, 0x69, 0x38, 0x62, 0xf8, 
-       0x60, 0x78, 0x68, 0xf8, 0x4b, 0x03, 0x40, 0x18, 
-       0x60, 0xf8, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0xff, 0xff, 0xcf, 0xff, 0xff, 0xff, 0xbf, 0xbf, 
-       0xb5, 0xf0, 0x1c, 0x07, 0x69, 0x40, 0xb0, 0x83, 
-       0x90, 0x01, 0x69, 0x38, 0x90, 0x00, 0x25, 0x00, 
-       0x68, 0xfe, 0x07, 0xb0, 0xd1, 0x01, 0x43, 0xc0, 
-       0xe0, 0x48, 0x09, 0x30, 0xd2, 0x40, 0x24, 0x10, 
-       0x1c, 0x38, 0xf0, 0x00, 0xfc, 0x3f, 0x1c, 0x05, 
-       0x0d, 0x70, 0xd3, 0x1b, 0x24, 0x00, 0x49, 0x21, 
-       0x91, 0x02, 0x01, 0xa0, 0x99, 0x02, 0x18, 0x40, 
-       0x42, 0xb8, 0xd0, 0x10, 0x68, 0xc1, 0x07, 0x8a, 
-       0xd0, 0x0d, 0x69, 0x42, 0x9b, 0x01, 0x42, 0x9a, 
-       0xd1, 0x09, 0x0d, 0x49, 0xd3, 0x07, 0x68, 0xc1, 
-       0x4b, 0x19, 0x40, 0x19, 0x60, 0xc1, 0x68, 0xf8, 
-       0x40, 0x18, 0x60, 0xf8, 0xe0, 0x02, 0x34, 0x01, 
-       0x2c, 0x10, 0xdb, 0xe6, 0x2c, 0x10, 0xd1, 0x06, 
-       0x98, 0x01, 0xf7, 0xff, 0xfd, 0x83, 0x28, 0x00, 
-       0xda, 0x01, 0x25, 0x00, 0x43, 0xed, 0x0b, 0x30, 
-       0xd3, 0x04, 0x98, 0x00, 0x49, 0x0f, 0x68, 0x09, 
-       0xf7, 0xfc, 0xff, 0xe0, 0x0d, 0xf0, 0x05, 0xc0, 
-       0x23, 0xa5, 0x05, 0xdb, 0x42, 0xd8, 0xd1, 0x07, 
-       0x48, 0x0b, 0x28, 0x00, 0xd0, 0x04, 0x1c, 0x38, 
-       0x1c, 0x29, 0xf7, 0xff, 0xff, 0xfe, 0x1c, 0x05, 
-       0x22, 0x40, 0x21, 0x00, 0x1c, 0x38, 0xf7, 0xfd, 
-       0xf8, 0x8f, 0x1c, 0x28, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x95, 0xdc, 
-       0xff, 0xef, 0xff, 0xff, 0x2e, 0x08, 0x20, 0xac, 
-       0x00, 0x00, 0x00, 0x00, 0xb5, 0xf7, 0x1c, 0x10, 
-       0x1c, 0x0c, 0x1c, 0x17, 0xf7, 0xff, 0xff, 0x98, 
-       0x78, 0x20, 0x34, 0x01, 0x28, 0x61, 0xd0, 0x09, 
-       0x28, 0x72, 0xd0, 0x04, 0x28, 0x77, 0xd1, 0x25, 
-       0x26, 0x02, 0x25, 0x04, 0xe0, 0x04, 0x26, 0x01, 
-       0x25, 0x00, 0xe0, 0x01, 0x4e, 0x1a, 0x25, 0x08, 
-       0x78, 0x20, 0x34, 0x01, 0x28, 0x2b, 0xd0, 0x06, 
-       0x28, 0x62, 0xd1, 0x09, 0x23, 0x04, 0x43, 0x1e, 
-       0x23, 0x01, 0x43, 0x1d, 0xe7, 0xf4, 0x23, 0x03, 
-       0x43, 0x1e, 0x23, 0x02, 0x43, 0x1d, 0xe7, 0xef, 
-       0x1f, 0xe0, 0x38, 0x19, 0x7f, 0xc0, 0x28, 0x74, 
-       0xd1, 0x01, 0x23, 0x10, 0x43, 0x1d, 0x98, 0x00, 
-       0x1c, 0x29, 0xf7, 0xff, 0xfd, 0x0b, 0x23, 0x01, 
-       0x42, 0xd8, 0xd1, 0x04, 0x20, 0x00, 0xb0, 0x03, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x21, 0x00, 
-       0x60, 0x79, 0x61, 0x39, 0x21, 0x01, 0x03, 0x09, 
-       0x61, 0x78, 0x61, 0xf9, 0x60, 0xfe, 0x09, 0x28, 
-       0xd3, 0x04, 0x22, 0x02, 0x21, 0x00, 0x1c, 0x38, 
-       0xf0, 0x00, 0xfb, 0xc4, 0x1c, 0x38, 0xe7, 0xea, 
-       0x00, 0x00, 0x80, 0x02, 0xb5, 0x90, 0x23, 0x03, 
-       0x4f, 0x08, 0x01, 0x9a, 0x19, 0xd2, 0x68, 0xd4, 
-       0x07, 0xa4, 0xd1, 0x04, 0xf7, 0xff, 0xff, 0xaa, 
-       0xbc, 0x90, 0xbc, 0x08, 0x47, 0x18, 0x33, 0x01, 
-       0x2b, 0x10, 0xdb, 0xf2, 0x20, 0x00, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x95, 0xdc, 
-       0xb5, 0xf0, 0x1c, 0x04, 0x1c, 0x0f, 0x4d, 0x10, 
-       0x68, 0xe8, 0x08, 0x80, 0xd3, 0x18, 0x20, 0x01, 
-       0x4e, 0x0e, 0x70, 0x30, 0x40, 0x38, 0xd0, 0x03, 
-       0x20, 0x0a, 0x1c, 0x29, 0xf0, 0x00, 0xfc, 0x1e, 
-       0x1c, 0x20, 0x1c, 0x29, 0xf0, 0x00, 0xfc, 0x2c, 
-       0x08, 0xb8, 0xd3, 0x03, 0x20, 0x0a, 0x1c, 0x29, 
-       0xf0, 0x00, 0xfc, 0x14, 0x20, 0x00, 0x70, 0x30, 
-       0x20, 0x01, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x20, 0x00, 0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x96, 0x5c, 0x2e, 0x08, 0x21, 0x94, 
-       0xb5, 0x80, 0x1c, 0x07, 0xa0, 0x06, 0x21, 0x01, 
-       0xf7, 0xff, 0xfc, 0x80, 0x21, 0x02, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfc, 0x7c, 0x20, 0x01, 0xf7, 0xfd, 
-       0xfc, 0x25, 0xbc, 0x80, 0xbc, 0x08, 0x47, 0x18, 
-       0x43, 0x6f, 0x75, 0x6c, 0x64, 0x6e, 0x27, 0x74, 
-       0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x20, 0x00, 
-       0xb5, 0xf0, 0x1c, 0x04, 0x1c, 0x15, 0x1c, 0x0f, 
-       0x48, 0x20, 0x22, 0x01, 0x02, 0x92, 0x21, 0x00, 
-       0x1c, 0x06, 0xf7, 0xfc, 0xff, 0xd5, 0x4a, 0x1e, 
-       0x1c, 0x28, 0xa1, 0x1e, 0xf7, 0xff, 0xff, 0x4e, 
-       0x28, 0x00, 0xd1, 0x02, 0x1c, 0x28, 0xf7, 0xff, 
-       0xff, 0xd3, 0x1c, 0x20, 0x1c, 0x32, 0xa1, 0x1a, 
-       0xf7, 0xff, 0xff, 0x44, 0x28, 0x00, 0xd1, 0x02, 
-       0x1c, 0x20, 0xf7, 0xff, 0xff, 0xc9, 0x4a, 0x17, 
-       0x1c, 0x38, 0x1c, 0x15, 0xa1, 0x13, 0xf7, 0xff, 
-       0xff, 0x39, 0x28, 0x00, 0xd1, 0x02, 0x1c, 0x38, 
-       0xf7, 0xff, 0xff, 0xbe, 0x1c, 0x30, 0x26, 0x01, 
-       0x03, 0x36, 0x08, 0xf2, 0x21, 0x00, 0x1c, 0x33, 
-       0xf0, 0x00, 0xf8, 0x52, 0x28, 0x00, 0xd0, 0x02, 
-       0x1c, 0x20, 0xf7, 0xff, 0xff, 0xb1, 0x22, 0x01, 
-       0x02, 0x52, 0x21, 0x00, 0x1c, 0x28, 0x1c, 0x33, 
-       0xf0, 0x00, 0xf8, 0x46, 0x28, 0x00, 0xd0, 0x02, 
-       0x1c, 0x38, 0xf7, 0xff, 0xff, 0xa5, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x95, 0xdc, 
-       0x2e, 0x08, 0x96, 0x5c, 0x77, 0x00, 0x00, 0x00, 
-       0x72, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x96, 0x1c, 
-       0xb5, 0x90, 0x27, 0x03, 0x4c, 0x09, 0x01, 0xb8, 
-       0x19, 0x00, 0xf7, 0xff, 0xfe, 0xa5, 0x37, 0x01, 
-       0x2f, 0x10, 0xdb, 0xf8, 0x27, 0x00, 0x01, 0xb8, 
-       0x19, 0x00, 0xf7, 0xff, 0xfe, 0x9d, 0x37, 0x01, 
-       0x2f, 0x03, 0xdb, 0xf8, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x95, 0xdc, 
-       0xb5, 0xb0, 0x01, 0x80, 0x1c, 0x0f, 0x4c, 0x0a, 
-       0x19, 0x00, 0x1c, 0x05, 0xf7, 0xff, 0xfe, 0x8c, 
-       0x01, 0xb8, 0x19, 0x00, 0x23, 0x01, 0x05, 0x1b, 
-       0x68, 0xc1, 0x43, 0x19, 0x60, 0xc1, 0x4b, 0x05, 
-       0x40, 0x19, 0x60, 0xe9, 0x69, 0x40, 0x61, 0x68, 
-       0x1c, 0x38, 0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 
-       0x2e, 0x08, 0x95, 0xdc, 0x00, 0x10, 0x8f, 0x03, 
-       0xb4, 0xf0, 0x1c, 0x1f, 0x68, 0xc3, 0x07, 0x9e, 
-       0x0f, 0xb6, 0x25, 0x01, 0x1c, 0x1c, 0x2e, 0x00, 
-       0xd0, 0x13, 0x1c, 0x1e, 0x0d, 0xf3, 0xd2, 0x10, 
-       0x02, 0x2b, 0x42, 0x9a, 0xd0, 0x09, 0x00, 0x5b, 
-       0x42, 0x9a, 0xd0, 0x06, 0x00, 0x5b, 0x42, 0x9a, 
-       0xd1, 0x07, 0x27, 0x01, 0x1d, 0xc1, 0x31, 0x1d, 
-       0xe0, 0x06, 0x1e, 0x7e, 0x4b, 0x08, 0x42, 0x9e, 
-       0xd3, 0x02, 0x1c, 0x28, 0xbc, 0xf0, 0x47, 0x70, 
-       0x61, 0x01, 0x23, 0x0f, 0x02, 0x1b, 0x43, 0x9c, 
-       0x60, 0x41, 0x61, 0xc7, 0x1c, 0x21, 0x43, 0x11, 
-       0x60, 0xc1, 0x20, 0x00, 0xbc, 0xf0, 0x47, 0x70, 
-       0x00, 0xff, 0xff, 0xff, 0xe2, 0x00, 0x01, 0x02, 
-       0xe3, 0x31, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x17, 
-       0xe3, 0xa0, 0x80, 0x00, 0xe1, 0xb0, 0x98, 0x21, 
-       0x01, 0xa0, 0x18, 0x01, 0x02, 0x88, 0x80, 0x10, 
-       0xe1, 0xb0, 0x9c, 0x21, 0x01, 0xa0, 0x14, 0x01, 
-       0x02, 0x88, 0x80, 0x08, 0xe1, 0xb0, 0x9e, 0x21, 
-       0x01, 0xa0, 0x12, 0x01, 0x02, 0x88, 0x80, 0x04, 
-       0xe1, 0xb0, 0x9f, 0x21, 0x01, 0xa0, 0x11, 0x01, 
-       0x02, 0x88, 0x80, 0x02, 0xe1, 0xb0, 0x9f, 0xa1, 
-       0x01, 0xa0, 0x10, 0x81, 0x02, 0x88, 0x80, 0x01, 
-       0xe0, 0x58, 0x98, 0xa6, 0x81, 0xa0, 0x19, 0x31, 
-       0x81, 0xa0, 0x88, 0xa6, 0xe2, 0x68, 0x60, 0x20, 
-       0xe1, 0x81, 0x16, 0x32, 0xe1, 0xa0, 0x28, 0x12, 
-       0x30, 0x40, 0x00, 0x09, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xe3, 0x56, 0x05, 0x01, 0x3a, 0x00, 0x00, 0x16, 
-       0xe1, 0xb0, 0x10, 0x02, 0x01, 0xa0, 0xf0, 0x0e, 
-       0xe3, 0xa0, 0x20, 0x00, 0xe3, 0xa0, 0x80, 0x20, 
-       0xe1, 0xb0, 0x98, 0x21, 0x01, 0xa0, 0x18, 0x01, 
-       0x02, 0x88, 0x80, 0x10, 0xe1, 0xb0, 0x9c, 0x21, 
-       0x01, 0xa0, 0x14, 0x01, 0x02, 0x88, 0x80, 0x08, 
-       0xe1, 0xb0, 0x9e, 0x21, 0x01, 0xa0, 0x12, 0x01, 
-       0x02, 0x88, 0x80, 0x04, 0xe1, 0xb0, 0x9f, 0x21, 
-       0x01, 0xa0, 0x11, 0x01, 0x02, 0x88, 0x80, 0x02, 
-       0xe1, 0xb0, 0x9f, 0xa1, 0x01, 0xa0, 0x10, 0x81, 
-       0x02, 0x88, 0x80, 0x01, 0xe0, 0x58, 0x98, 0xa6, 
-       0x81, 0xa0, 0x19, 0x31, 0x30, 0x40, 0x00, 0x09, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe1, 0xa0, 0x88, 0xa6, 
-       0xe2, 0x68, 0x90, 0x20, 0xe1, 0xa0, 0x18, 0x11, 
-       0xe1, 0x81, 0x19, 0x32, 0xe1, 0xa0, 0x28, 0x12, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe2, 0x03, 0x31, 0x02, 
-       0xe3, 0x34, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x17, 
-       0xe3, 0xa0, 0x80, 0x00, 0xe1, 0xb0, 0x98, 0x24, 
-       0x01, 0xa0, 0x48, 0x04, 0x02, 0x88, 0x80, 0x10, 
-       0xe1, 0xb0, 0x9c, 0x24, 0x01, 0xa0, 0x44, 0x04, 
-       0x02, 0x88, 0x80, 0x08, 0xe1, 0xb0, 0x9e, 0x24, 
-       0x01, 0xa0, 0x42, 0x04, 0x02, 0x88, 0x80, 0x04, 
-       0xe1, 0xb0, 0x9f, 0x24, 0x01, 0xa0, 0x41, 0x04, 
-       0x02, 0x88, 0x80, 0x02, 0xe1, 0xb0, 0x9f, 0xa4, 
-       0x01, 0xa0, 0x40, 0x84, 0x02, 0x88, 0x80, 0x01, 
-       0xe0, 0x58, 0x98, 0xa6, 0x81, 0xa0, 0x49, 0x34, 
-       0x81, 0xa0, 0x88, 0xa6, 0xe2, 0x68, 0x60, 0x20, 
-       0xe1, 0x84, 0x46, 0x35, 0xe1, 0xa0, 0x58, 0x15, 
-       0x30, 0x43, 0x30, 0x09, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xe3, 0x56, 0x05, 0x01, 0x3a, 0x00, 0x00, 0x16, 
-       0xe1, 0xb0, 0x40, 0x05, 0x01, 0xa0, 0xf0, 0x0e, 
-       0xe3, 0xa0, 0x50, 0x00, 0xe3, 0xa0, 0x80, 0x20, 
-       0xe1, 0xb0, 0x98, 0x24, 0x01, 0xa0, 0x48, 0x04, 
-       0x02, 0x88, 0x80, 0x10, 0xe1, 0xb0, 0x9c, 0x24, 
-       0x01, 0xa0, 0x44, 0x04, 0x02, 0x88, 0x80, 0x08, 
-       0xe1, 0xb0, 0x9e, 0x24, 0x01, 0xa0, 0x42, 0x04, 
-       0x02, 0x88, 0x80, 0x04, 0xe1, 0xb0, 0x9f, 0x24, 
-       0x01, 0xa0, 0x41, 0x04, 0x02, 0x88, 0x80, 0x02, 
-       0xe1, 0xb0, 0x9f, 0xa4, 0x01, 0xa0, 0x40, 0x84, 
-       0x02, 0x88, 0x80, 0x01, 0xe0, 0x58, 0x98, 0xa6, 
-       0x81, 0xa0, 0x49, 0x34, 0x30, 0x43, 0x30, 0x09, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe1, 0xa0, 0x88, 0xa6, 
-       0xe2, 0x68, 0x90, 0x20, 0xe1, 0xa0, 0x48, 0x14, 
-       0xe1, 0x84, 0x49, 0x35, 0xe1, 0xa0, 0x58, 0x15, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0xa0, 0x20, 0x00, 
-       0xe2, 0x16, 0x01, 0x02, 0x12, 0x66, 0x10, 0x00, 
-       0x01, 0xb0, 0x10, 0x06, 0x03, 0xa0, 0x30, 0x00, 
-       0x01, 0xa0, 0xf0, 0x0e, 0xe3, 0xa0, 0x39, 0x01, 
-       0xe3, 0x83, 0x30, 0x1e, 0xe3, 0xa0, 0x60, 0x00, 
-       0xe3, 0x31, 0x00, 0x00, 0x01, 0xa0, 0x10, 0x02, 
-       0x03, 0xa0, 0x20, 0x00, 0x02, 0x43, 0x30, 0x20, 
-       0xe3, 0xa0, 0x80, 0x00, 0xe1, 0xb0, 0x98, 0x21, 
-       0x01, 0xa0, 0x18, 0x01, 0x02, 0x88, 0x80, 0x10, 
-       0xe1, 0xb0, 0x9c, 0x21, 0x01, 0xa0, 0x14, 0x01, 
-       0x02, 0x88, 0x80, 0x08, 0xe1, 0xb0, 0x9e, 0x21, 
-       0x01, 0xa0, 0x12, 0x01, 0x02, 0x88, 0x80, 0x04, 
-       0xe1, 0xb0, 0x9f, 0x21, 0x01, 0xa0, 0x11, 0x01, 
-       0x02, 0x88, 0x80, 0x02, 0xe1, 0xb0, 0x9f, 0xa1, 
-       0x01, 0xa0, 0x10, 0x81, 0x02, 0x88, 0x80, 0x01, 
-       0xe2, 0x78, 0x90, 0x20, 0xe1, 0x81, 0x19, 0x32, 
-       0xe1, 0xa0, 0x28, 0x12, 0xe0, 0x43, 0x30, 0x08, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe3, 0x34, 0x00, 0x00, 
-       0x01, 0xa0, 0x40, 0x05, 0x03, 0xa0, 0x50, 0x00, 
-       0x02, 0x43, 0x30, 0x20, 0xe3, 0xa0, 0x80, 0x00, 
-       0xe1, 0xb0, 0x98, 0x24, 0x01, 0xa0, 0x48, 0x04, 
-       0x02, 0x88, 0x80, 0x10, 0xe1, 0xb0, 0x9c, 0x24, 
-       0x01, 0xa0, 0x44, 0x04, 0x02, 0x88, 0x80, 0x08, 
-       0xe1, 0xb0, 0x9e, 0x24, 0x01, 0xa0, 0x42, 0x04, 
-       0x02, 0x88, 0x80, 0x04, 0xe1, 0xb0, 0x9f, 0x24, 
-       0x01, 0xa0, 0x41, 0x04, 0x02, 0x88, 0x80, 0x02, 
-       0xe1, 0xb0, 0x9f, 0xa4, 0x01, 0xa0, 0x40, 0x84, 
-       0x02, 0x88, 0x80, 0x01, 0xe2, 0x78, 0x90, 0x20, 
-       0xe1, 0x84, 0x49, 0x35, 0xe1, 0xa0, 0x58, 0x15, 
-       0xe0, 0x43, 0x30, 0x08, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xe3, 0x31, 0x00, 0x00, 0x01, 0xa0, 0x10, 0x02, 
-       0x03, 0xa0, 0x20, 0x00, 0x02, 0x83, 0x30, 0x20, 
-       0xe3, 0xa0, 0x80, 0x00, 0xe1, 0xb0, 0x98, 0x21, 
-       0x01, 0xa0, 0x18, 0x01, 0x02, 0x88, 0x80, 0x10, 
-       0xe1, 0xb0, 0x9c, 0x21, 0x01, 0xa0, 0x14, 0x01, 
-       0x02, 0x88, 0x80, 0x08, 0xe1, 0xb0, 0x9e, 0x21, 
-       0x01, 0xa0, 0x12, 0x01, 0x02, 0x88, 0x80, 0x04, 
-       0xe1, 0xb0, 0x9f, 0x21, 0x01, 0xa0, 0x11, 0x01, 
-       0x02, 0x88, 0x80, 0x02, 0xe1, 0xb0, 0x9f, 0xa1, 
-       0x01, 0xa0, 0x10, 0x81, 0x02, 0x88, 0x80, 0x01, 
-       0xe2, 0x78, 0x90, 0x20, 0xe1, 0x81, 0x19, 0x32, 
-       0xe1, 0xa0, 0x28, 0x12, 0xe0, 0x83, 0x30, 0x08, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x40, 0x00, 0x7f, 0xff, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xe1, 0x92, 0x80, 0x81, 
-       0x0a, 0x00, 0x00, 0x05, 0xe3, 0x11, 0x01, 0x01, 
-       0x0a, 0x00, 0x00, 0x0c, 0xe1, 0x95, 0x80, 0x84, 
-       0x0a, 0x00, 0x00, 0x0a, 0xe3, 0x14, 0x01, 0x01, 
-       0x1a, 0x00, 0x00, 0x08, 0xe3, 0x14, 0x01, 0x01, 
-       0x0a, 0x00, 0x00, 0x28, 0xe1, 0xa0, 0x00, 0x03, 
-       0xe1, 0xa0, 0x10, 0x04, 0xe1, 0xa0, 0x20, 0x05, 
-       0xea, 0x00, 0x00, 0x04, 0xe3, 0x11, 0x01, 0x01, 
-       0x0a, 0x00, 0x00, 0x22, 0xea, 0x00, 0x00, 0x01, 
-       0xe3, 0x11, 0x01, 0x01, 0x0a, 0x00, 0x00, 0x1f, 
-       0xe3, 0x1b, 0x00, 0x01, 0x1a, 0x00, 0x00, 0x16, 
-       0xe3, 0x1b, 0x00, 0x02, 0x1a, 0x00, 0x00, 0x0c, 
-       0xe3, 0x1b, 0x0c, 0x02, 0x1a, 0x00, 0x00, 0x05, 
-       0xe3, 0xc0, 0x81, 0x03, 0xe3, 0xa0, 0x90, 0xff, 
-       0xe3, 0x89, 0x9c, 0x43, 0xe1, 0x58, 0x00, 0x09, 
-       0x33, 0xc2, 0x20, 0x01, 0x03, 0x82, 0x20, 0x01, 
-       0xe2, 0x00, 0x01, 0x03, 0xe3, 0x80, 0x00, 0xff, 
-       0xe3, 0x80, 0x0c, 0x7f, 0xe1, 0x30, 0x00, 0x00, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe2, 0x00, 0x01, 0x03, 
-       0xe3, 0x80, 0x00, 0xff, 0xe3, 0x80, 0x0c, 0x43, 
-       0xe1, 0xa0, 0x25, 0xa2, 0xe1, 0xa0, 0x25, 0x82, 
-       0xe3, 0x81, 0x11, 0x02, 0xe1, 0x30, 0x00, 0x00, 
-       0xe1, 0xa0, 0xf0, 0x0e, 0xe2, 0x00, 0x01, 0x03, 
-       0xe3, 0x80, 0x00, 0x7f, 0xe3, 0x80, 0x09, 0x01, 
-       0xe3, 0xa0, 0x20, 0x00, 0xe3, 0xc1, 0x10, 0xff, 
-       0xe3, 0x81, 0x11, 0x02, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xe3, 0x80, 0x04, 0x61, 0xe1, 0xa0, 0xf0, 0x0e, 
-       0xb5, 0x80, 0x1c, 0x0f, 0x29, 0x0f, 0xdd, 0x04, 
-       0x11, 0x39, 0xf7, 0xff, 0xff, 0xf9, 0x07, 0x3f, 
-       0x0f, 0x3f, 0x2f, 0x09, 0xdd, 0x02, 0x1d, 0xf9, 
-       0x31, 0x29, 0xe0, 0x01, 0x1d, 0xf9, 0x31, 0x50, 
-       0x70, 0x01, 0x30, 0x01, 0xbc, 0x80, 0xbc, 0x08, 
-       0x47, 0x18, 0xb5, 0x90, 0x1c, 0x07, 0x48, 0x0d, 
-       0x68, 0x01, 0x29, 0x00, 0xd1, 0x12, 0x4c, 0x0c, 
-       0x1c, 0x20, 0xa1, 0x0c, 0x22, 0x14, 0xf7, 0xfc, 
-       0xfc, 0xa1, 0x1d, 0xe0, 0x30, 0x0b, 0x1c, 0x39, 
-       0xf7, 0xff, 0xff, 0xda, 0x21, 0x29, 0x70, 0x01, 
-       0x21, 0x00, 0x70, 0x41, 0x1c, 0x20, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x30, 0x08, 0xbc, 0x90, 
-       0xbc, 0x08, 0x47, 0x18, 0x2e, 0x08, 0x20, 0xcc, 
-       0x2e, 0x08, 0x99, 0xdc, 0x55, 0x6e, 0x6b, 0x6e, 
-       0x6f, 0x77, 0x6e, 0x20, 0x53, 0x69, 0x67, 0x6e, 
-       0x61, 0x6c, 0x20, 0x28, 0x30, 0x78, 0x00, 0x00, 
-       0xb5, 0x90, 0x1c, 0x04, 0x1c, 0x0f, 0xa0, 0x09, 
-       0x21, 0x01, 0xf7, 0xff, 0xf9, 0x6f, 0x21, 0x00, 
-       0x1c, 0x20, 0xf7, 0xff, 0xf9, 0x6b, 0x21, 0x02, 
-       0x1c, 0x38, 0xf7, 0xff, 0xf9, 0x67, 0x20, 0x01, 
-       0xf7, 0xfd, 0xf9, 0x10, 0xbc, 0x90, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x2a, 0x2a, 0x2a, 0x20, 
-       0x66, 0x61, 0x74, 0x61, 0x6c, 0x20, 0x65, 0x72, 
-       0x72, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x72, 
-       0x75, 0x6e, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 
-       0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x3a, 0x20, 
-       0x00, 0x00, 0x00, 0x00, 0xb5, 0xb0, 0x1c, 0x07, 
-       0x68, 0xc0, 0x07, 0x81, 0xd0, 0x1f, 0x23, 0x20, 
-       0x40, 0x18, 0xd0, 0x01, 0x6a, 0xbd, 0xe0, 0x04, 
-       0x68, 0x79, 0x69, 0xba, 0x18, 0x89, 0x69, 0x3a, 
-       0x1a, 0x8d, 0x28, 0x00, 0xd0, 0x02, 0x1c, 0x38, 
-       0xf7, 0xff, 0xfb, 0xa2, 0x68, 0xf8, 0x4b, 0x0a, 
-       0x40, 0x18, 0x60, 0xf8, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfb, 0x67, 0x1c, 0x04, 0x22, 0x00, 0x1c, 0x38, 
-       0x1c, 0x29, 0xf0, 0x00, 0xf8, 0x27, 0x1c, 0x20, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x20, 0x00, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0xff, 0xff, 0xcf, 0xff, 0xb5, 0xb0, 0x24, 0x00, 
-       0x28, 0x00, 0xd0, 0x03, 0xf7, 0xff, 0xff, 0xce, 
-       0x1c, 0x04, 0xe0, 0x0c, 0x27, 0x00, 0x4d, 0x08, 
-       0x01, 0xb8, 0x19, 0x40, 0xf7, 0xff, 0xff, 0xc6, 
-       0x28, 0x00, 0xd0, 0x01, 0x24, 0x00, 0x43, 0xe4, 
-       0x37, 0x01, 0x2f, 0x10, 0xdb, 0xf4, 0x1c, 0x20, 
-       0xbc, 0xb0, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0x2e, 0x08, 0x95, 0xdc, 0xb5, 0xf7, 0x68, 0xc5, 
-       0x69, 0x46, 0x1c, 0x0c, 0x1c, 0x07, 0xb0, 0x81, 
-       0x48, 0x3c, 0x40, 0x28, 0xd0, 0x04, 0x1c, 0x38, 
-       0xf7, 0xff, 0xf9, 0x92, 0x28, 0x00, 0xd0, 0x01, 
-       0x20, 0x02, 0xe0, 0x6a, 0x9a, 0x03, 0x2a, 0x00, 
-       0xd0, 0x26, 0x2a, 0x01, 0xd0, 0x0b, 0x2a, 0x02, 
-       0xd1, 0x24, 0x1c, 0x30, 0xf7, 0xff, 0xf9, 0xbc, 
-       0x28, 0x00, 0xda, 0x09, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfa, 0xa7, 0x20, 0x01, 0xe0, 0x59, 0x1c, 0x38, 
-       0xf0, 0x00, 0xf8, 0x8c, 0x19, 0x04, 0xe0, 0x13, 
-       0x68, 0x79, 0x6a, 0xfa, 0x42, 0x8a, 0xd9, 0x00, 
-       0x1c, 0x11, 0x69, 0xba, 0x18, 0x89, 0x69, 0x3a, 
-       0x1a, 0x89, 0x68, 0xfa, 0x09, 0x92, 0xd3, 0x03, 
-       0x6a, 0xba, 0x42, 0x8a, 0xdd, 0x00, 0x1c, 0x11, 
-       0x42, 0x81, 0xdd, 0x00, 0x1c, 0x08, 0x18, 0x24, 
-       0x2c, 0x00, 0xda, 0x03, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfa, 0x87, 0xe7, 0xcd, 0x0b, 0xa8, 0xd3, 0x04, 
-       0x68, 0x78, 0x6a, 0xf9, 0x42, 0x81, 0xd2, 0x00, 
-       0x62, 0xf8, 0x69, 0xb8, 0x42, 0xa0, 0xdc, 0x10, 
-       0x68, 0x79, 0x6a, 0xfa, 0x42, 0x8a, 0xd9, 0x01, 
-       0x1c, 0x13, 0xe0, 0x00, 0x1c, 0x0b, 0x18, 0x1b, 
-       0x69, 0x3e, 0x1b, 0x9b, 0x42, 0xa3, 0xdb, 0x04, 
-       0x6b, 0x3b, 0x93, 0x00, 0x18, 0xc3, 0x42, 0xa3, 
-       0xdc, 0x06, 0x20, 0x20, 0x43, 0x28, 0x21, 0x00, 
-       0x60, 0x39, 0x60, 0xb9, 0x62, 0xbc, 0xe0, 0x14, 
-       0x1a, 0x24, 0x08, 0xa8, 0xd3, 0x03, 0x9b, 0x00, 
-       0x1b, 0x18, 0x42, 0x40, 0x60, 0xb8, 0x08, 0x68, 
-       0xd3, 0x06, 0x42, 0x8a, 0xd9, 0x00, 0x1c, 0x11, 
-       0x1b, 0x88, 0x1b, 0x00, 0x42, 0x40, 0x60, 0x38, 
-       0x19, 0x30, 0x23, 0x20, 0x43, 0x9d, 0x60, 0x78, 
-       0x1c, 0x28, 0x4b, 0x05, 0x40, 0x18, 0x60, 0xf8, 
-       0x20, 0x00, 0xb0, 0x01, 0xb0, 0x03, 0xbc, 0xf0, 
-       0xbc, 0x08, 0x47, 0x18, 0x00, 0x10, 0x00, 0x03, 
-       0xff, 0xf7, 0xcf, 0xbf, 0xb5, 0x00, 0x68, 0x8a, 
-       0x68, 0x4b, 0x3a, 0x01, 0xd5, 0x03, 0xf0, 0x00, 
-       0xf8, 0x3f, 0xbc, 0x08, 0x47, 0x18, 0x06, 0x00, 
-       0x0e, 0x00, 0x70, 0x18, 0x33, 0x01, 0x60, 0x8a, 
-       0x60, 0x4b, 0xbc, 0x08, 0x47, 0x18, 0x00, 0x00, 
-       0xb5, 0xb0, 0x1c, 0x07, 0x78, 0x00, 0x1c, 0x0c, 
-       0x37, 0x01, 0x28, 0x00, 0xd0, 0x0e, 0x25, 0x00, 
-       0x43, 0xed, 0x1c, 0x21, 0xf0, 0x00, 0xf8, 0xe8, 
-       0x42, 0xa8, 0xd1, 0x03, 0x1c, 0x28, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x78, 0x38, 0x37, 0x01, 
-       0x28, 0x00, 0xd1, 0xf2, 0x20, 0x00, 0xbc, 0xb0, 
-       0xbc, 0x08, 0x47, 0x18, 0x68, 0xc1, 0x07, 0x8a, 
-       0xd1, 0x04, 0x20, 0x01, 0x49, 0x09, 0x60, 0x08, 
-       0x42, 0x40, 0x47, 0x70, 0x09, 0x8a, 0xd3, 0x01, 
-       0x6a, 0x80, 0xe0, 0x04, 0x68, 0x42, 0x69, 0x83, 
-       0x18, 0xd2, 0x69, 0x00, 0x1a, 0x10, 0x0d, 0x09, 
-       0xd3, 0xf3, 0x28, 0x00, 0xdd, 0xf1, 0x38, 0x01, 
-       0x47, 0x70, 0x00, 0x00, 0x2e, 0x08, 0x20, 0xb0, 
-       0xb5, 0xf0, 0x1c, 0x04, 0x68, 0xc8, 0x1c, 0x0f, 
-       0x4b, 0x5a, 0x40, 0x18, 0x23, 0x01, 0x05, 0x9b, 
-       0x43, 0x18, 0x60, 0xc8, 0x09, 0x80, 0xd3, 0x02, 
-       0x1c, 0x38, 0xf7, 0xff, 0xfa, 0x95, 0x06, 0x26, 
-       0x0e, 0x36, 0x68, 0xb9, 0x29, 0x00, 0xda, 0x12, 
-       0x68, 0xf8, 0x0a, 0x82, 0xd2, 0x0f, 0x22, 0x00, 
-       0x43, 0xd2, 0x1a, 0x51, 0x23, 0x09, 0x03, 0x5b, 
-       0x43, 0x18, 0x60, 0xf8, 0x60, 0xb9, 0x68, 0x79, 
-       0x70, 0x0e, 0x31, 0x01, 0x60, 0x79, 0x1c, 0x30, 
-       0xbc, 0xf0, 0xbc, 0x08, 0x47, 0x18, 0x68, 0xf8, 
-       0x49, 0x49, 0x40, 0x01, 0x29, 0x02, 0xd0, 0x03, 
-       0x1c, 0x38, 0xf7, 0xff, 0xf9, 0xcd, 0xe0, 0x7f, 
-       0x49, 0x46, 0x40, 0x01, 0x23, 0x01, 0x03, 0xdb, 
-       0x42, 0x99, 0xd1, 0x0b, 0x22, 0x02, 0x21, 0x00, 
-       0x1c, 0x38, 0xf7, 0xff, 0xfe, 0xfb, 0x68, 0xf8, 
-       0x09, 0x80, 0xd3, 0x02, 0x1c, 0x38, 0xf7, 0xff, 
-       0xfa, 0x63, 0x68, 0xf8, 0x25, 0x09, 0x03, 0x6d, 
-       0x43, 0x05, 0x60, 0xfd, 0x69, 0x38, 0x28, 0x00, 
-       0xd1, 0x2f, 0x1c, 0x38, 0xf7, 0xff, 0xf8, 0x88, 
-       0x28, 0x00, 0xd0, 0x18, 0x68, 0xf8, 0x0a, 0x00, 
-       0x07, 0x80, 0xd0, 0x09, 0x69, 0xf8, 0xf7, 0xff, 
-       0xf9, 0x7d, 0x61, 0x38, 0x60, 0x78, 0x23, 0x01, 
-       0x02, 0xdb, 0x43, 0x1d, 0x68, 0xf8, 0xe0, 0x1a, 
-       0x1d, 0xf8, 0x30, 0x1d, 0x61, 0x38, 0x60, 0x78, 
-       0x20, 0x01, 0x23, 0x01, 0x02, 0x9b, 0x43, 0x1d, 
-       0x61, 0xf8, 0x60, 0xfd, 0xe0, 0x11, 0x69, 0xf8, 
-       0xf7, 0xff, 0xf9, 0x68, 0x61, 0x38, 0x60, 0x78, 
-       0x23, 0x01, 0x02, 0xdb, 0x43, 0x1d, 0x68, 0xf8, 
-       0x43, 0x28, 0x60, 0xf8, 0x0a, 0x29, 0x07, 0x89, 
-       0xd1, 0x03, 0x08, 0xdb, 0x43, 0x1d, 0x43, 0x28, 
-       0x60, 0xf8, 0x0a, 0x68, 0xd3, 0x19, 0x68, 0x78, 
-       0x6a, 0xf9, 0x69, 0x3c, 0x42, 0x81, 0xd9, 0x00, 
-       0x1c, 0x08, 0x1b, 0x01, 0xd0, 0x05, 0x1c, 0x20, 
-       0x1c, 0x3a, 0xf7, 0xff, 0xf9, 0x7d, 0x28, 0x00, 
-       0xd1, 0x26, 0x1c, 0x60, 0x62, 0xf8, 0x60, 0x78, 
-       0x69, 0xf8, 0x1e, 0x41, 0x63, 0x38, 0x60, 0xb9, 
-       0x70, 0x26, 0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x69, 0x38, 0x68, 0x7a, 0x70, 0x14, 
-       0x32, 0x01, 0x60, 0x7a, 0x6a, 0xf9, 0x42, 0x91, 
-       0xd8, 0x00, 0x1c, 0x11, 0x1a, 0x09, 0x69, 0xfa, 
-       0x63, 0x3a, 0x0a, 0xeb, 0xd2, 0x03, 0x2e, 0x0a, 
-       0xd0, 0x01, 0x42, 0x8a, 0xdc, 0x0d, 0x62, 0xf8, 
-       0x22, 0x00, 0x60, 0x78, 0x60, 0xba, 0x1c, 0x3a, 
-       0xf7, 0xff, 0xf9, 0x56, 0x28, 0x00, 0xd0, 0x04, 
-       0x20, 0x00, 0x43, 0xc0, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x1c, 0x30, 0xbc, 0xf0, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0xff, 0xf7, 0xff, 0xff, 
-       0x00, 0x00, 0x10, 0x8a, 0x00, 0x00, 0xa0, 0x10, 
-       0xb5, 0x00, 0x68, 0x8a, 0x68, 0x4b, 0x3a, 0x01, 
-       0xd5, 0x03, 0xf7, 0xff, 0xff, 0x39, 0xbc, 0x08, 
-       0x47, 0x18, 0x06, 0x00, 0x0e, 0x00, 0x70, 0x18, 
-       0x33, 0x01, 0x60, 0x8a, 0x60, 0x4b, 0xbc, 0x08, 
-       0x47, 0x18, 0x00, 0x00, 0x47, 0x78, 0x46, 0xc0, 
-       0xe9, 0x2d, 0x40, 0x00, 0xe2, 0x8f, 0xe0, 0x00, 
-       0xef, 0x12, 0x34, 0x56, 0xe8, 0xbd, 0x40, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe1, 0xa0, 0x10, 0x00, 
-       0xe3, 0xa0, 0x00, 0x18, 0xe5, 0x9f, 0x10, 0x18, 
-       0xef, 0x12, 0x34, 0x56, 0xea, 0xff, 0xff, 0xfe, 
-       0xe1, 0xa0, 0x10, 0x00, 0xe3, 0xa0, 0x00, 0x18, 
-       0xe5, 0x9f, 0x10, 0x08, 0xef, 0x12, 0x34, 0x56, 
-       0xea, 0xff, 0xff, 0xfe, 0x00, 0x02, 0x00, 0x26, 
-       0x00, 0x02, 0x00, 0x23, 0xe8, 0xb0, 0x01, 0xf0, 
-       0xe8, 0xa1, 0x01, 0xf0, 0xe8, 0xb0, 0x01, 0xf8, 
-       0xe8, 0xa1, 0x01, 0xf8, 0xe8, 0xb0, 0x01, 0xf8, 
-       0xe8, 0xa1, 0x01, 0xf8, 0xe8, 0xb0, 0x01, 0xf8, 
-       0xe8, 0xa1, 0x01, 0xf8, 0xe8, 0xb0, 0x01, 0xf8, 
-       0xe8, 0xa1, 0x01, 0xf8, 0xe8, 0xb0, 0x01, 0xf8, 
-       0xe8, 0xa1, 0x01, 0xf8, 0xe8, 0xb0, 0x01, 0xf8, 
-       0xe8, 0xa1, 0x01, 0xf8, 0xe8, 0xb0, 0x01, 0xf8, 
-       0xe8, 0xa1, 0x01, 0xf8, 0xe2, 0x52, 0x20, 0xbc, 
-       0x1a, 0xff, 0xff, 0xed, 0xe8, 0xbd, 0x01, 0xf8, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe4, 0x90, 0x40, 0x04, 
-       0xe1, 0x85, 0x54, 0x24, 0xe4, 0x81, 0x50, 0x04, 
-       0xe1, 0xa0, 0x5c, 0x04, 0xe2, 0x53, 0x30, 0x04, 
-       0x1a, 0xff, 0xff, 0xf9, 0xe5, 0x9f, 0xf0, 0x88, 
-       0xe4, 0x90, 0x40, 0x04, 0xe1, 0x85, 0x5c, 0x24, 
-       0xe4, 0x81, 0x50, 0x04, 0xe1, 0xa0, 0x54, 0x04, 
-       0xe2, 0x53, 0x30, 0x04, 0x1a, 0xff, 0xff, 0xf9, 
-       0xe5, 0x9f, 0xf0, 0x70, 0xe4, 0x90, 0x40, 0x04, 
-       0xe1, 0xa0, 0x58, 0x24, 0xe0, 0xc1, 0x50, 0xb2, 
-       0xe0, 0xc1, 0x40, 0xb2, 0xe2, 0x53, 0x30, 0x04, 
-       0x1a, 0xff, 0xff, 0xf9, 0xe5, 0x9f, 0xf0, 0x4c, 
-       0xe2, 0x03, 0x40, 0x0f, 0xe0, 0x53, 0x40, 0x04, 
-       0x0a, 0x00, 0x00, 0x0a, 0xe9, 0x2d, 0x00, 0xc4, 
-       0xe1, 0xa0, 0x20, 0x03, 0xe1, 0xa0, 0x30, 0x04, 
-       0xe8, 0xb0, 0x00, 0xf0, 0xe8, 0xa1, 0x00, 0xf0, 
-       0xe2, 0x53, 0x30, 0x10, 0x1a, 0xff, 0xff, 0xfb, 
-       0xe1, 0xa0, 0x30, 0x02, 0xe8, 0xbd, 0x00, 0xc4, 
-       0xe2, 0x13, 0x30, 0x0f, 0x0a, 0x00, 0x00, 0x03, 
-       0xe4, 0x90, 0x40, 0x04, 0xe4, 0x81, 0x40, 0x04, 
-       0xe2, 0x53, 0x30, 0x04, 0x1a, 0xff, 0xff, 0xfb, 
-       0xe5, 0x9f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x2e, 0x01, 0xc9, 0xe4, 0x2e, 0x01, 0xc9, 0x88, 
-       0x2e, 0x01, 0xc9, 0xb8, 0xe9, 0x2d, 0x00, 0x38, 
-       0xe3, 0x52, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x3f, 
-       0xe3, 0xe0, 0x30, 0x03, 0xe0, 0x12, 0x30, 0x03, 
-       0x0a, 0x00, 0x00, 0x30, 0xe2, 0x10, 0x30, 0x01, 
-       0x0a, 0x00, 0x00, 0x03, 0xe4, 0xd0, 0x30, 0x01, 
-       0xe4, 0xc1, 0x30, 0x01, 0xe2, 0x52, 0x20, 0x01, 
-       0x0a, 0x00, 0x00, 0x36, 0xe2, 0x10, 0x30, 0x02, 
-       0x0a, 0x00, 0x00, 0x05, 0xe0, 0xd0, 0x30, 0xb2, 
-       0xe1, 0xa0, 0x44, 0x23, 0xe4, 0xc1, 0x40, 0x01, 
-       0xe4, 0xc1, 0x30, 0x01, 0xe2, 0x52, 0x20, 0x02, 
-       0x0a, 0x00, 0x00, 0x2e, 0xe3, 0xe0, 0x30, 0x03, 
-       0xe0, 0x12, 0x30, 0x03, 0x0a, 0x00, 0x00, 0x1f, 
-       0xe2, 0x11, 0x40, 0x01, 0x0a, 0x00, 0x00, 0x19, 
-       0xe2, 0x11, 0x40, 0x02, 0x1a, 0x00, 0x00, 0x0b, 
-       0xe2, 0x41, 0x10, 0x01, 0xe5, 0x91, 0x50, 0x00, 
-       0xe1, 0xa0, 0x5c, 0x25, 0xe1, 0xa0, 0x5c, 0x05, 
-       0xe5, 0x9f, 0xf0, 0xa8, 0xe5, 0x91, 0x40, 0x00, 
-       0xe1, 0xa0, 0x44, 0x04, 0xe1, 0xa0, 0x44, 0x24, 
-       0xe1, 0x85, 0x50, 0x04, 0xe5, 0x81, 0x50, 0x00, 
-       0xe2, 0x81, 0x10, 0x01, 0xea, 0x00, 0x00, 0x0f, 
-       0xe2, 0x41, 0x10, 0x03, 0xe5, 0x91, 0x50, 0x00, 
-       0xe1, 0xa0, 0x54, 0x25, 0xe1, 0xa0, 0x54, 0x05, 
-       0xe5, 0x9f, 0xf0, 0x7c, 0xe5, 0x91, 0x40, 0x00, 
-       0xe1, 0xa0, 0x4c, 0x04, 0xe1, 0xa0, 0x4c, 0x24, 
-       0xe1, 0x85, 0x50, 0x04, 0xe5, 0x81, 0x50, 0x00, 
-       0xe2, 0x81, 0x10, 0x03, 0xea, 0x00, 0x00, 0x03, 
-       0xe2, 0x11, 0x40, 0x02, 0x0a, 0x00, 0x00, 0x00, 
-       0xe5, 0x9f, 0xf0, 0x5c, 0xe5, 0x9f, 0xf0, 0x48, 
-       0xe2, 0x12, 0x20, 0x03, 0x0a, 0x00, 0x00, 0x09, 
-       0xe4, 0xd0, 0x40, 0x01, 0xe4, 0xc1, 0x40, 0x01, 
-       0xe2, 0x52, 0x20, 0x01, 0x0a, 0x00, 0x00, 0x05, 
-       0xe4, 0xd0, 0x40, 0x01, 0xe4, 0xc1, 0x40, 0x01, 
-       0xe2, 0x52, 0x20, 0x01, 0x0a, 0x00, 0x00, 0x01, 
-       0xe4, 0xd0, 0x40, 0x01, 0xe4, 0xc1, 0x40, 0x01, 
-       0xe8, 0xbd, 0x00, 0x38, 0xe3, 0x8e, 0xe0, 0x01, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe9, 0x2d, 0x01, 0xf8, 
-       0xe5, 0x9f, 0xf0, 0x18, 0x2e, 0x01, 0xc8, 0x58, 
-       0x2e, 0x01, 0xc8, 0x90, 0x2e, 0x01, 0xc8, 0xac, 
-       0x2e, 0x01, 0xc8, 0x58, 0x2e, 0x01, 0xc8, 0x74, 
-       0x2e, 0x01, 0xc8, 0xac, 0x2e, 0x01, 0xc8, 0x90, 
-       0x2e, 0x01, 0xc8, 0x08, 0xe9, 0x2d, 0x5f, 0xff, 
-       0xe1, 0x4f, 0x00, 0x00, 0xe9, 0x2d, 0x00, 0x01, 
-       0xe2, 0x8f, 0x00, 0x01, 0xe1, 0x2f, 0xff, 0x10, 
-       0x21, 0xff, 0x48, 0x37, 0x68, 0x00, 0x40, 0x52, 
-       0x42, 0x08, 0xd1, 0x0b, 0x32, 0x20, 0x0a, 0x00, 
-       0x42, 0x08, 0xd1, 0x07, 0x32, 0x20, 0x0a, 0x00, 
-       0x42, 0x08, 0xd1, 0x03, 0x0a, 0x00, 0x42, 0x08, 
-       0xd0, 0x23, 0x32, 0x20, 0x21, 0x0f, 0x42, 0x08, 
-       0xd1, 0x01, 0x32, 0x10, 0x09, 0x00, 0x21, 0x01, 
-       0x42, 0x08, 0xd1, 0x08, 0x1d, 0x12, 0x21, 0x02, 
-       0x42, 0x08, 0xd1, 0x04, 0x1d, 0x12, 0x21, 0x04, 
-       0x42, 0x08, 0xd1, 0x00, 0x1d, 0x12, 0x48, 0x25, 
-       0x68, 0x00, 0xb4, 0x01, 0x08, 0x90, 0x21, 0x01, 
-       0x40, 0x81, 0x48, 0x21, 0x60, 0x01, 0x48, 0x1d, 
-       0x58, 0x82, 0x48, 0x01, 0x46, 0x86, 0x47, 0x10, 
-       0x2e, 0x01, 0xca, 0xc1, 0xbc, 0x02, 0x48, 0x1d, 
-       0x60, 0x01, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
-       0xe8, 0xbd, 0x00, 0x01, 0xe1, 0x69, 0xf0, 0x00, 
-       0xe8, 0xbd, 0x5f, 0xff, 0xe2, 0x5e, 0xf0, 0x04, 
-       0x48, 0x12, 0x21, 0x20, 0x4a, 0x12, 0x60, 0x02, 
-       0x1d, 0x00, 0x1e, 0x49, 0xd1, 0xfb, 0x20, 0x00, 
-       0x47, 0x70, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x46, 0x73, 0x49, 0x0e, 0x60, 0x08, 0x20, 0x00, 
-       0x47, 0x18, 0x46, 0x73, 0x49, 0x0c, 0x60, 0x08, 
-       0x20, 0x00, 0x47, 0x18, 0x46, 0x73, 0x48, 0x0b, 
-       0x68, 0x00, 0x47, 0x18, 0x46, 0x73, 0x49, 0x09, 
-       0x60, 0x08, 0x47, 0x18, 0x46, 0x73, 0x4a, 0x03, 
-       0x00, 0x80, 0x18, 0x12, 0x68, 0x10, 0x60, 0x11, 
-       0x47, 0x18, 0x00, 0x00, 0x2e, 0x08, 0x3a, 0xf4, 
-       0x2e, 0x01, 0xca, 0xf0, 0x66, 0x00, 0x00, 0x10, 
-       0x66, 0x00, 0x00, 0x14, 0x66, 0x00, 0x00, 0x18, 
-       0x66, 0x00, 0x00, 0x1c, 0xe9, 0x2d, 0x5f, 0xf0, 
-       0xe1, 0x4f, 0x40, 0x00, 0xe3, 0x14, 0x00, 0x20, 
-       0x11, 0x5e, 0x40, 0xb2, 0x13, 0xc4, 0x4c, 0xff, 
-       0x05, 0x1e, 0x40, 0x04, 0x03, 0xc4, 0x44, 0xff, 
-       0xe5, 0x9f, 0x50, 0x14, 0xe7, 0x95, 0x51, 0x04, 
-       0xe5, 0x9f, 0xe0, 0x00, 0xe1, 0x2f, 0xff, 0x15, 
-       0x2e, 0x01, 0xcb, 0x70, 0xe8, 0xbd, 0x5f, 0xf0, 
-       0xe1, 0xb0, 0xf0, 0x0e, 0x2e, 0x08, 0x1f, 0xe8, 
-       0x00, 0x00, 0x00, 0xc0, 0x46, 0x73, 0x47, 0x78, 
-       0xe1, 0x0f, 0x10, 0x00, 0xe3, 0x81, 0x00, 0x80, 
-       0xe1, 0x29, 0xf0, 0x00, 0xe2, 0x01, 0x00, 0x80, 
-       0xe1, 0x2f, 0xff, 0x13, 0x46, 0x73, 0x00, 0x00, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0x4f, 0x10, 0x00, 
-       0xe3, 0x81, 0x00, 0x80, 0xe1, 0x69, 0xf0, 0x00, 
-       0xe2, 0x01, 0x00, 0x80, 0xe1, 0x2f, 0xff, 0x13, 
-       0x46, 0x73, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
-       0xe1, 0x0f, 0x10, 0x00, 0xe3, 0x81, 0x00, 0x40, 
-       0xe1, 0x29, 0xf0, 0x00, 0xe2, 0x01, 0x00, 0x40, 
-       0xe1, 0x2f, 0xff, 0x13, 0x46, 0x73, 0x00, 0x00, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0x4f, 0x10, 0x00, 
-       0xe3, 0x81, 0x00, 0x40, 0xe1, 0x69, 0xf0, 0x00, 
-       0xe2, 0x01, 0x00, 0x40, 0xe1, 0x2f, 0xff, 0x13, 
-       0x46, 0x73, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
-       0xe1, 0x0f, 0x00, 0x00, 0xe3, 0xc0, 0x00, 0x80, 
-       0xe1, 0x29, 0xf0, 0x00, 0xe3, 0xa0, 0x00, 0x00, 
-       0xe1, 0x2f, 0xff, 0x13, 0x46, 0x73, 0x00, 0x00, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0x4f, 0x00, 0x00, 
-       0xe3, 0xc0, 0x00, 0x80, 0xe1, 0x69, 0xf0, 0x00, 
-       0xe3, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x13, 
-       0x46, 0x73, 0x00, 0x00, 0x47, 0x78, 0x00, 0x00, 
-       0xe1, 0x0f, 0x00, 0x00, 0xe3, 0xc0, 0x00, 0x40, 
-       0xe1, 0x29, 0xf0, 0x00, 0xe3, 0xa0, 0x00, 0x00, 
-       0xe1, 0x2f, 0xff, 0x13, 0x46, 0x73, 0x00, 0x00, 
-       0x47, 0x78, 0x00, 0x00, 0xe1, 0x4f, 0x00, 0x00, 
-       0xe3, 0xc0, 0x00, 0x40, 0xe1, 0x69, 0xf0, 0x00, 
-       0xe3, 0xa0, 0x00, 0x00, 0xe1, 0x2f, 0xff, 0x13, 
-       0x46, 0x73, 0x49, 0x02, 0x60, 0x08, 0x20, 0x00, 
-       0x46, 0x9f, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 
-       0x46, 0x73, 0x49, 0x02, 0x60, 0x08, 0x20, 0x00, 
-       0x46, 0x9f, 0x00, 0x00, 0x66, 0x00, 0x00, 0x04, 
-       0x46, 0x73, 0x48, 0x03, 0x68, 0x00, 0x47, 0x18, 
-       0x46, 0x73, 0x49, 0x01, 0x60, 0x08, 0x47, 0x18, 
-       0x66, 0x00, 0x00, 0x08, 0x00, 0x00, 0x46, 0x6c, 
-       0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x01, 0x80, 
-       0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x02, 0xd0, 
-       0x00, 0x00, 0x02, 0xd0, 0x00, 0x00, 0x00, 0x15, 
-       0x00, 0x03, 0xb1, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x04, 0x90, 0x85, 0x00, 0x00, 0xa6, 0xee, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xd0, 
-       0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x08, 0x08, 0xa0, 0x00, 0x08, 0x08, 0x28, 
-       0x00, 0x08, 0x88, 0x68, 0x00, 0x08, 0xa0, 0x98, 
-       0x00, 0x08, 0x88, 0x68, 0x00, 0x08, 0x28, 0x98, 
-       0x00, 0x08, 0xac, 0xf4, 0x00, 0x08, 0xb8, 0x7c, 
-       0x00, 0x02, 0x02, 0x88, 0x00, 0x02, 0x08, 0x22, 
-       0x00, 0x02, 0x88, 0xaa, 0x00, 0x02, 0x22, 0xaa, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x04, 0x04, 0x24, 0x00, 0x04, 0x04, 0x24, 
-       0x00, 0x04, 0x28, 0x6c, 0x00, 0x04, 0x28, 0x6c, 
-       0x00, 0x01, 0x10, 0x44, 0x00, 0x01, 0x20, 0x44, 
-       0x00, 0x01, 0x11, 0xaa, 0x00, 0x01, 0x88, 0x55, 
-       0x00, 0x01, 0x44, 0xaa, 0x00, 0x01, 0x44, 0x55, 
-       0x00, 0x20, 0x80, 0xa0, 0x00, 0x20, 0x80, 0xc0, 
-       0x00, 0x20, 0x20, 0xa0, 0x00, 0x20, 0x40, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x02, 0x40, 0x00, 0x00, 0x02, 0x40, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x10, 0x13, 0x16, 0x1a, 0x1b, 0x1d, 0x22, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x10, 0x13, 0x16, 0x1a, 0x1b, 0x1d, 0x22, 
-       0x10, 0x10, 0x16, 0x18, 0x1b, 0x1d, 0x22, 0x25, 
-       0x13, 0x16, 0x1a, 0x1b, 0x1d, 0x22, 0x22, 0x26, 
-       0x16, 0x16, 0x1a, 0x1b, 0x1d, 0x22, 0x25, 0x28, 
-       0x16, 0x1a, 0x1b, 0x1d, 0x20, 0x23, 0x28, 0x30, 
-       0x1a, 0x1b, 0x1d, 0x20, 0x23, 0x28, 0x30, 0x3a, 
-       0x1a, 0x1b, 0x1d, 0x22, 0x26, 0x2e, 0x38, 0x45, 
-       0x1b, 0x1d, 0x23, 0x26, 0x2e, 0x38, 0x45, 0x53, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x04, 0xd6, 0x00, 0x00, 0x1b, 0x08, 0x00, 
-       0x00, 0x1f, 0xde, 0x00, 0x00, 0x00, 0x50, 0x00, 
-       0x00, 0x09, 0xce, 0x00, 0x00, 0x13, 0x4c, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
-       0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x01, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x15, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x03, 0x05, 0x28, 0x20, 0x01, 
-       0x00, 0x00, 0x02, 0x40, 0x71, 0x01, 0x00, 0x68, 
-       0xe0, 0x7f, 0xb0, 0x7f, 0x60, 0x40, 0xe0, 0x1d, 
-       0x90, 0x10, 0xb4, 0x81, 0xe8, 0xc0, 0xe0, 0xc2, 
-       0x90, 0x18, 0x00, 0x8a, 0x70, 0xc0, 0x0f, 0x87, 
-       0xe3, 0xe8, 0xc0, 0x00, 0x70, 0x40, 0xe0, 0x01, 
-       0xe0, 0x86, 0x00, 0x26, 0xd0, 0x28, 0xe0, 0x0e, 
-       0xd0, 0x0e, 0x0f, 0x0b, 0x70, 0x1d, 0xe0, 0x67, 
-       0x0f, 0x87, 0x0f, 0x87, 0x0f, 0x87, 0x0f, 0x87, 
-       0x0f, 0x87, 0x02, 0x20, 0xd0, 0x01, 0xe0, 0x25, 
-       0x0f, 0x45, 0x6f, 0x81, 0xdf, 0xa6, 0xe0, 0x36, 
-       0xe1, 0x30, 0xa0, 0x37, 0xc0, 0x00, 0xe0, 0x26, 
-       0x00, 0x33, 0xdf, 0x00, 0xe0, 0x32, 0x0f, 0xc5, 
-       0x0f, 0x87, 0x00, 0x27, 0xd0, 0x4c, 0xe0, 0x21, 
-       0x00, 0x33, 0xdf, 0x60, 0x00, 0x27, 0xd0, 0x56, 
-       0x60, 0x01, 0xe0, 0x2d, 0x03, 0xa0, 0xd0, 0x41, 
-       0xa0, 0x78, 0x00, 0x60, 0xd0, 0x41, 0xa0, 0x77, 
-       0x00, 0x22, 0xd0, 0x58, 0xa0, 0x76, 0x00, 0x21, 
-       0xd0, 0x7c, 0x00, 0x4a, 0xd0, 0x72, 0x70, 0x40, 
-       0x00, 0x06, 0x0f, 0x87, 0x00, 0x22, 0xdc, 0xf8, 
-       0xf0, 0x4a, 0xe1, 0x70, 0x07, 0xef, 0xdd, 0xbf, 
-       0x4f, 0x36, 0x1d, 0x99, 0x4d, 0x80, 0x10, 0x18, 
-       0xdd, 0x50, 0x60, 0x35, 0xdd, 0x72, 0xdd, 0x10, 
-       0x3d, 0xb4, 0xec, 0x57, 0x2d, 0x36, 0x1d, 0x03, 
-       0xbd, 0x04, 0xe4, 0x2b, 0x01, 0x46, 0x00, 0x06, 
-       0xac, 0xf6, 0x80, 0x3f, 0x0d, 0x0a, 0x10, 0x02, 
-       0x7d, 0x40, 0x10, 0x1e, 0xb0, 0x20, 0xbc, 0xe0, 
-       0x00, 0x06, 0x00, 0xc6, 0xe0, 0x52, 0xb7, 0x60, 
-       0xb7, 0x60, 0xc0, 0x5d, 0x30, 0x5f, 0xe4, 0x72, 
-       0xc7, 0x5e, 0x00, 0xed, 0xd0, 0x28, 0x70, 0x40, 
-       0xb0, 0x7f, 0x60, 0x40, 0xc0, 0x1d, 0x30, 0x1c, 
-       0xf8, 0x7e, 0x00, 0x21, 0xd0, 0x01, 0x00, 0x26, 
-       0xd0, 0x78, 0xa0, 0x38, 0x80, 0x3f, 0x70, 0x01, 
-       0xb0, 0x3f, 0x60, 0x01, 0x0f, 0x87, 0x80, 0x34, 
-       0x03, 0xef, 0xd8, 0x3f, 0xa8, 0x38, 0x01, 0x35, 
-       0xdc, 0x33, 0xe0, 0x46, 0xc0, 0x1c, 0xe4, 0xa5, 
-       0x97, 0x2e, 0x30, 0x1c, 0xe8, 0x8e, 0x00, 0x21, 
-       0xd0, 0x00, 0xa0, 0x38, 0xc0, 0x5d, 0x00, 0x23, 
-       0xd0, 0x00, 0x30, 0x40, 0x30, 0x5e, 0xe4, 0x99, 
-       0x20, 0x5e, 0xc0, 0x01, 0x30, 0x1c, 0xec, 0xa4, 
-       0xe0, 0x9d, 0x20, 0x5f, 0xc0, 0x1c, 0x30, 0x01, 
-       0xf4, 0xa5, 0xc0, 0x1c, 0x30, 0x1d, 0xec, 0xa4, 
-       0xe4, 0xa5, 0x90, 0x38, 0x00, 0x1b, 0xe8, 0xa5, 
-       0xa0, 0x66, 0xb1, 0x3f, 0xe4, 0xb3, 0xe8, 0xb1, 
-       0xc0, 0x4b, 0x30, 0x44, 0xf8, 0xb3, 0x60, 0x45, 
-       0xb1, 0x7c, 0x01, 0x20, 0xd0, 0x00, 0xa0, 0x05, 
-       0x80, 0x40, 0x72, 0xc5, 0x00, 0x06, 0x90, 0x55, 
-       0xd0, 0x01, 0x00, 0x40, 0xa0, 0x55, 0x0f, 0x87, 
-       0x01, 0x46, 0x00, 0x06, 0x03, 0xef, 0xd0, 0x3f, 
-       0xa0, 0x38, 0xb0, 0x01, 0xa0, 0x37, 0x80, 0x3f, 
-       0x82, 0x34, 0x80, 0x3f, 0xf2, 0x1a, 0x80, 0x34, 
-       0x80, 0x3f, 0xf2, 0x1a, 0xd8, 0x00, 0xd8, 0x40, 
-       0xd8, 0x80, 0xd8, 0xc0, 0xd9, 0x00, 0xd9, 0x40, 
-       0xd9, 0x80, 0xd9, 0xc0, 0xda, 0x00, 0xda, 0x40, 
-       0xda, 0x80, 0xda, 0xc0, 0xdb, 0x00, 0xdb, 0x40, 
-       0xdb, 0x80, 0xdb, 0xc0, 0xdc, 0x00, 0xdc, 0x40, 
-       0xdc, 0x80, 0xdc, 0xc0, 0xdd, 0x00, 0xdd, 0x40, 
-       0xdd, 0x80, 0xdd, 0xc0, 0xde, 0x00, 0xde, 0x40, 
-       0xde, 0x80, 0xde, 0xc0, 0xdf, 0x00, 0xdf, 0x40, 
-       0xdf, 0x80, 0xdf, 0xc0, 0xde, 0x80, 0xde, 0xc1, 
-       0x00, 0x28, 0xd0, 0x60, 0x6e, 0x81, 0x80, 0x00, 
-       0x80, 0x05, 0x00, 0xe3, 0xd1, 0x88, 0x00, 0x73, 
-       0xd5, 0x80, 0x60, 0x06, 0xb1, 0xbc, 0x00, 0xfa, 
-       0xd0, 0x80, 0x60, 0x06, 0x00, 0x26, 0xd0, 0x6c, 
-       0x6e, 0x81, 0x04, 0xf4, 0xdc, 0x00, 0x00, 0xee, 
-       0xd1, 0x94, 0x60, 0x06, 0x00, 0xed, 0xd0, 0x50, 
-       0x6e, 0x81, 0x00, 0x22, 0xd0, 0x70, 0x6e, 0x81, 
-       0x00, 0xee, 0xd0, 0x74, 0x6e, 0x81, 0xd0, 0x4c, 
-       0x6e, 0x81, 0xd0, 0x02, 0x00, 0xef, 0xd0, 0x6c, 
-       0x60, 0x01, 0xd0, 0x03, 0x00, 0xef, 0xd0, 0x70, 
-       0x60, 0x01, 0x00, 0xe0, 0xd0, 0x48, 0xd0, 0x02, 
-       0x60, 0x01, 0x00, 0x32, 0xdf, 0x20, 0xa0, 0x1c, 
-       0x00, 0x21, 0xd0, 0x60, 0xa0, 0x76, 0x00, 0x34, 
-       0xd5, 0x70, 0x80, 0x3f, 0x00, 0x23, 0xd0, 0x5c, 
-       0x00, 0x4a, 0xd0, 0x72, 0x70, 0x40, 0x00, 0x06, 
-       0x00, 0x22, 0xd1, 0xa4, 0x6e, 0xc6, 0xd0, 0x58, 
-       0x6e, 0xc1, 0xd0, 0xc9, 0x00, 0xed, 0xd0, 0x54, 
-       0x60, 0xc1, 0x00, 0x22, 0xd0, 0x40, 0x60, 0xc1, 
-       0x00, 0x22, 0xd0, 0x60, 0x60, 0xc1, 0x82, 0x34, 
-       0x80, 0x3f, 0xd6, 0xd9, 0x01, 0x2d, 0xd6, 0x0c, 
-       0x16, 0x08, 0xd0, 0x55, 0xd0, 0x2c, 0x60, 0x40, 
-       0xd0, 0x70, 0x00, 0xfb, 0xd1, 0x00, 0x60, 0x01, 
-       0x00, 0x2b, 0xd4, 0x10, 0x00, 0x29, 0xd4, 0x40, 
-       0x00, 0x2b, 0xd0, 0x90, 0xc0, 0xc2, 0xd1, 0x18, 
-       0xd1, 0x44, 0xa1, 0x50, 0x00, 0x21, 0xd0, 0xb6, 
-       0xd0, 0xd7, 0x00, 0x29, 0xd0, 0x04, 0x64, 0x00, 
-       0xb0, 0x3c, 0x64, 0x40, 0x80, 0x34, 0x80, 0x3f, 
-       0xd0, 0x40, 0x00, 0x35, 0xd0, 0x00, 0x60, 0x01, 
-       0xd0, 0x48, 0x6e, 0x81, 0xd0, 0x44, 0x6e, 0x81, 
-       0x00, 0x64, 0xd1, 0x80, 0x6e, 0x86, 0x01, 0x3c, 
-       0xd2, 0x39, 0xe0, 0x46, 0xd0, 0x00, 0xd0, 0x40, 
-       0xd0, 0x80, 0xd0, 0xc0, 0xd1, 0x00, 0xd1, 0x40, 
-       0xd1, 0x80, 0xd1, 0xc0, 0xd2, 0x00, 0xd2, 0x40, 
-       0xd2, 0x80, 0xd2, 0xc0, 0xd3, 0x00, 0xd3, 0x40, 
-       0xd3, 0x80, 0xd3, 0xc0, 0xd4, 0x00, 0xd4, 0x40, 
-       0xd4, 0x80, 0xd4, 0xc0, 0xd5, 0x00, 0xd5, 0x40, 
-       0xd5, 0x80, 0xd5, 0xc0, 0xd6, 0x00, 0xd6, 0x40, 
-       0xd6, 0x80, 0xd6, 0xc0, 0xd7, 0x00, 0xd7, 0x40, 
-       0xd7, 0x80, 0xd7, 0xc0, 0x0f, 0xc5, 0x50, 0x00, 
-       0x01, 0x46, 0x00, 0x06, 0xde, 0x80, 0xde, 0xc1, 
-       0x03, 0x2f, 0xd0, 0x33, 0xa0, 0x38, 0xb0, 0x01, 
-       0xa0, 0x37, 0x80, 0x3f, 0x08, 0x20, 0xdf, 0x00, 
-       0x82, 0x34, 0x80, 0x3f, 0x00, 0xee, 0xd0, 0x08, 
-       0x77, 0xc0, 0xb0, 0x04, 0x77, 0x80, 0xb0, 0x04, 
-       0xc0, 0x5f, 0x30, 0x5e, 0x60, 0x40, 0xd7, 0x00, 
-       0xb7, 0x01, 0x80, 0x34, 0x80, 0x3f, 0x00, 0x60, 
-       0xd0, 0x80, 0x00, 0xec, 0xd0, 0x40, 0x60, 0x81, 
-       0xb0, 0x7c, 0x60, 0x81, 0x00, 0xa0, 0xd0, 0x80, 
-       0xb0, 0x74, 0x60, 0x81, 0xb0, 0x7c, 0x60, 0x81, 
-       0x00, 0x68, 0xd0, 0x80, 0x6e, 0x82, 0x00, 0xef, 
-       0xd0, 0x8c, 0x6e, 0x82, 0x00, 0x06, 0xd0, 0x11, 
-       0xa0, 0x38, 0x80, 0x3f, 0x08, 0x20, 0xd0, 0x40, 
-       0x10, 0x48, 0xa0, 0x4a, 0xa0, 0x5b, 0x0c, 0x20, 
-       0xd0, 0x00, 0x10, 0x08, 0xa0, 0x27, 0xa0, 0x0a, 
-       0x90, 0x4d, 0x0f, 0xff, 0xd8, 0x1f, 0x40, 0x40, 
-       0xa0, 0x4d, 0x80, 0x0a, 0x80, 0x07, 0x80, 0x1b, 
-       0x80, 0x27, 0x00, 0x60, 0xd0, 0x00, 0xa0, 0x09, 
-       0x80, 0x28, 0x01, 0x20, 0xd0, 0x67, 0xa0, 0x69, 
-       0x80, 0x2a, 0x82, 0x29, 0x80, 0x6a, 0x84, 0x29, 
-       0xd0, 0x54, 0x10, 0x4f, 0xa0, 0x6a, 0x01, 0x20, 
-       0xd0, 0x00, 0xa0, 0x29, 0x80, 0x2b, 0x02, 0x30, 
-       0xd0, 0x00, 0xa0, 0x38, 0x80, 0x3f, 0x01, 0xb0, 
-       0xd0, 0x10, 0xa0, 0x37, 0x80, 0x3f, 0x02, 0x30, 
-       0xd0, 0x01, 0xa0, 0x38, 0x00, 0xea, 0xd0, 0x00, 
-       0xd0, 0x4e, 0x0f, 0x0b, 0x70, 0x40, 0x00, 0x06, 
-       0x00, 0x21, 0xd0, 0x88, 0x00, 0xe1, 0xd0, 0x60, 
-       0x60, 0x81, 0x00, 0x2b, 0xd0, 0x80, 0x00, 0xe0, 
-       0xd0, 0x6c, 0x60, 0x81, 0xb0, 0x7c, 0x00, 0x29, 
-       0xd0, 0x80, 0x60, 0x81, 0xb0, 0x7c, 0xd0, 0x82, 
-       0x60, 0x81, 0xb0, 0x7c, 0xd0, 0x85, 0x60, 0x81, 
-       0xb0, 0x7c, 0x03, 0xaa, 0xd0, 0x98, 0x60, 0x81, 
-       0xb0, 0x7c, 0x6e, 0x81, 0x00, 0x27, 0xd0, 0x40, 
-       0x6e, 0x81, 0xb0, 0x7c, 0x6e, 0x81, 0xb0, 0x7c, 
-       0x6e, 0x81, 0x00, 0x27, 0xd1, 0x90, 0x6e, 0x86, 
-       0x00, 0x21, 0xd1, 0xb8, 0x6e, 0x86, 0x00, 0x66, 
-       0xd1, 0xa0, 0xd0, 0x00, 0x01, 0x64, 0xd0, 0x58, 
-       0x30, 0x01, 0x60, 0x06, 0x00, 0xed, 0xd1, 0xbc, 
-       0x6e, 0x86, 0x00, 0xec, 0xd1, 0xb8, 0x6e, 0x86, 
-       0xb1, 0x84, 0x6e, 0x86, 0x00, 0xee, 0xd1, 0x84, 
-       0x70, 0x46, 0x00, 0x65, 0xd1, 0x94, 0x60, 0x46, 
-       0x00, 0x64, 0xd1, 0xbc, 0x6e, 0x86, 0x00, 0x65, 
-       0xd1, 0x80, 0x6e, 0x86, 0xb1, 0xbc, 0x6e, 0x86, 
-       0xb1, 0xbc, 0x6e, 0x86, 0x00, 0xed, 0xd1, 0xa8, 
-       0x6e, 0x86, 0xd0, 0x0e, 0xb1, 0xbc, 0x60, 0x06, 
-       0xb1, 0xbc, 0x60, 0x06, 0x00, 0x65, 0xd1, 0xa4, 
-       0x60, 0x06, 0x00, 0x28, 0xd1, 0xa4, 0x6e, 0x86, 
-       0x00, 0x27, 0xd1, 0x98, 0x6e, 0x86, 0x00, 0x64, 
-       0xd1, 0xa4, 0x6e, 0x86, 0xd2, 0x01, 0x00, 0x64, 
-       0xd0, 0x60, 0x62, 0x01, 0x00, 0x64, 0xd1, 0x80, 
-       0x70, 0x46, 0x6e, 0x86, 0x00, 0xef, 0xd1, 0x98, 
-       0x70, 0x86, 0x08, 0x20, 0xd0, 0xcf, 0x30, 0xc1, 
-       0xea, 0x42, 0xd0, 0x81, 0x00, 0x21, 0xd1, 0xa8, 
-       0x60, 0x86, 0x00, 0xed, 0xd1, 0xa0, 0x6e, 0xc6, 
-       0x00, 0x65, 0xd1, 0x98, 0x6e, 0xc6, 0x00, 0x22, 
-       0xd0, 0x00, 0xa0, 0x05, 0x80, 0x40, 0x00, 0xc6, 
-       0x01, 0x73, 0xd4, 0x3d, 0xe0, 0x46, 0x50, 0x00, 
-       0x08, 0x20, 0xd0, 0x00, 0x5f, 0x00, 0x00, 0x64, 
-       0xd0, 0x60, 0x70, 0xc1, 0x00, 0xec, 0xd0, 0x40, 
-       0x71, 0x81, 0xb0, 0x7c, 0x71, 0xc1, 0xc0, 0x87, 
-       0x30, 0x86, 0xf9, 0x83, 0x10, 0xee, 0xe9, 0x76, 
-       0x10, 0xe1, 0xe9, 0x76, 0xe2, 0x57, 0x00, 0x63, 
-       0xd0, 0xbf, 0x72, 0x06, 0xb1, 0xbc, 0x41, 0x82, 
-       0x02, 0x1b, 0xe9, 0x8d, 0x72, 0x86, 0xb1, 0xbc, 
-       0x41, 0x82, 0xd0, 0x75, 0x30, 0x48, 0xe9, 0xfe, 
-       0xb0, 0x7f, 0xea, 0x00, 0x02, 0x1c, 0xe9, 0x96, 
-       0x15, 0xa3, 0xea, 0x57, 0x10, 0xf0, 0xe9, 0x9a, 
-       0x10, 0xfa, 0xf9, 0xa1, 0x15, 0xa3, 0xea, 0x57, 
-       0x00, 0x21, 0xd0, 0x4c, 0x70, 0x41, 0x10, 0x61, 
-       0xfa, 0x57, 0x00, 0xed, 0xd0, 0x08, 0x70, 0x40, 
-       0xd0, 0x85, 0x40, 0x42, 0x60, 0x40, 0x00, 0x64, 
-       0xd0, 0x64, 0x62, 0x01, 0x12, 0x2b, 0xe9, 0xeb, 
-       0x12, 0x3b, 0xe9, 0xd5, 0x00, 0xec, 0xd0, 0x40, 
-       0x61, 0x81, 0x12, 0x2d, 0xe9, 0xbf, 0x12, 0x30, 
-       0xe9, 0xd4, 0x12, 0x36, 0xe9, 0xd4, 0x12, 0x3a, 
-       0xe9, 0xd4, 0xd0, 0x62, 0x30, 0x48, 0xe9, 0xf2, 
-       0x12, 0x2e, 0xe9, 0xf9, 0xe1, 0x76, 0x00, 0xed, 
-       0xd0, 0x08, 0x70, 0x40, 0xd0, 0x85, 0x40, 0x42, 
-       0x60, 0x40, 0xb0, 0x08, 0x00, 0x21, 0xd0, 0x41, 
-       0x60, 0x40, 0x00, 0x64, 0xd0, 0x60, 0x62, 0x01, 
-       0xf2, 0x5a, 0x00, 0xed, 0xd0, 0x20, 0xd0, 0x41, 
-       0x60, 0x40, 0x10, 0xe1, 0xea, 0x3a, 0xe2, 0x57, 
-       0xe2, 0x53, 0x10, 0xee, 0xf9, 0xe9, 0x01, 0x46, 
-       0x82, 0x34, 0x80, 0x3f, 0x97, 0x2e, 0xc7, 0x5c, 
-       0xa7, 0x66, 0x81, 0x34, 0x80, 0x3f, 0x00, 0x21, 
-       0xd0, 0x01, 0xa0, 0x38, 0x00, 0xc6, 0x00, 0x21, 
-       0xd0, 0x15, 0x0b, 0x09, 0x00, 0x4d, 0xb0, 0x01, 
-       0xed, 0xe5, 0xd2, 0x1a, 0xe1, 0xec, 0xf1, 0x18, 
-       0x00, 0xec, 0xd0, 0x40, 0x71, 0x81, 0xd0, 0x4e, 
-       0x60, 0x46, 0xe2, 0x54, 0xc0, 0x0a, 0x10, 0x06, 
-       0x52, 0x80, 0x00, 0xed, 0xd0, 0x40, 0x62, 0x81, 
-       0xe2, 0x53, 0x00, 0x64, 0xd0, 0x60, 0x62, 0x01, 
-       0xf2, 0x5a, 0xe1, 0x70, 0x12, 0xa3, 0xf6, 0x57, 
-       0x15, 0xa1, 0xfa, 0x57, 0x12, 0xa0, 0xea, 0x23, 
-       0x00, 0x65, 0xd1, 0x1c, 0xd0, 0x75, 0x30, 0x48, 
-       0xea, 0x0a, 0xb1, 0x3c, 0x71, 0x04, 0x11, 0x20, 
-       0xfa, 0x11, 0x00, 0xec, 0xd0, 0x40, 0x61, 0x81, 
-       0xe2, 0x57, 0x12, 0xa1, 0xea, 0x33, 0x00, 0xe2, 
-       0xd0, 0x60, 0x70, 0x01, 0xb0, 0x7c, 0x70, 0x41, 
-       0x10, 0x0c, 0x50, 0x40, 0x0c, 0x30, 0xd0, 0x00, 
-       0x31, 0x01, 0xee, 0x21, 0x21, 0x00, 0xe6, 0x57, 
-       0xe2, 0x23, 0x31, 0x00, 0xfe, 0x57, 0xd0, 0x75, 
-       0x30, 0x48, 0xea, 0x28, 0xf2, 0x5a, 0xe2, 0x0d, 
-       0x00, 0xec, 0xd0, 0x40, 0x71, 0x81, 0x00, 0x63, 
-       0xd1, 0x3f, 0xb1, 0xbc, 0x41, 0x84, 0x61, 0x81, 
-       0xd0, 0x50, 0x60, 0x46, 0xe2, 0x57, 0x00, 0xed, 
-       0xd0, 0x7c, 0x70, 0x41, 0x08, 0x20, 0xd0, 0x00, 
-       0x10, 0x08, 0xe2, 0x1c, 0xd2, 0x84, 0x00, 0xed, 
-       0xd1, 0xa4, 0x62, 0x86, 0xd5, 0x00, 0xb5, 0x01, 
-       0x01, 0x46, 0x82, 0x34, 0x80, 0x3f, 0xc7, 0x5e, 
-       0x97, 0x2e, 0x81, 0x34, 0x80, 0x3f, 0x02, 0xe8, 
-       0xd0, 0x30, 0xa0, 0x37, 0xa0, 0x38, 0x08, 0x20, 
-       0xdf, 0x00, 0x80, 0x73, 0x80, 0x3f, 0x00, 0xc6, 
-       0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0xf2, 0x5a, 
-       0x00, 0x64, 0xd0, 0x60, 0x62, 0x01, 0x02, 0x3c, 
-       0xdc, 0x89, 0xe0, 0x46, 0x00, 0x28, 0xd0, 0x64, 
-       0x70, 0x81, 0x00, 0x22, 0xd0, 0x00, 0x50, 0x80, 
-       0x60, 0x81, 0x0f, 0xc5, 0x50, 0x00, 0x50, 0x00, 
-       0x00, 0xed, 0xd1, 0xa4, 0x72, 0x86, 0x00, 0xef, 
-       0xd1, 0x90, 0x70, 0x46, 0x10, 0x5c, 0x10, 0x65, 
-       0xed, 0x7d, 0xd0, 0x46, 0xc0, 0x0a, 0x10, 0x40, 
-       0x60, 0x46, 0x00, 0x22, 0xd0, 0x73, 0x30, 0x54, 
-       0xe9, 0x8e, 0x12, 0xa4, 0xe9, 0xb5, 0x15, 0x20, 
-       0xe9, 0xc0, 0xb0, 0x7b, 0xe9, 0xc3, 0xb0, 0x41, 
-       0xe9, 0xc9, 0xc0, 0x54, 0x10, 0x5c, 0x10, 0x6e, 
-       0xe9, 0xc6, 0xe1, 0xb5, 0x00, 0x28, 0xd1, 0xb0, 
-       0xd0, 0x00, 0x60, 0x06, 0x12, 0xa4, 0xf9, 0xb2, 
-       0x00, 0xed, 0xd1, 0x9c, 0x62, 0x86, 0xd2, 0x80, 
-       0x00, 0xed, 0xd1, 0xa4, 0x62, 0x86, 0xd0, 0x02, 
-       0x00, 0xec, 0xd1, 0xbc, 0x60, 0x06, 0x00, 0x64, 
-       0xd1, 0xa0, 0x72, 0x06, 0x12, 0x21, 0xf9, 0xa6, 
-       0xd2, 0x0d, 0x62, 0x06, 0x00, 0xed, 0xd1, 0xa0, 
-       0x61, 0x86, 0xd0, 0x0e, 0x00, 0xed, 0xd1, 0xac, 
-       0x60, 0x06, 0xb1, 0xbc, 0x60, 0x06, 0x00, 0x65, 
-       0xd1, 0xa4, 0x60, 0x06, 0x01, 0x7e, 0xd2, 0x32, 
-       0xe1, 0xcb, 0x01, 0x46, 0x90, 0x49, 0x00, 0x60, 
-       0xd0, 0x00, 0x50, 0x40, 0xa0, 0x49, 0x80, 0x3f, 
-       0x00, 0xc6, 0x0c, 0x09, 0x05, 0x0d, 0xe1, 0x70, 
-       0x01, 0xbf, 0xd0, 0x41, 0xe1, 0xcb, 0x01, 0xbb, 
-       0xda, 0x10, 0xe1, 0xcb, 0x01, 0xbd, 0xda, 0x0b, 
-       0xe1, 0xcb, 0x03, 0xb9, 0xd8, 0x10, 0x01, 0x46, 
-       0x90, 0x49, 0x00, 0x60, 0xd1, 0x00, 0x50, 0x44, 
-       0x30, 0x44, 0xa0, 0x49, 0x80, 0x3f, 0x00, 0xc6, 
-       0xe0, 0x46, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
-       0x01, 0xfa, 0xd4, 0x3d, 0x00, 0x25, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0x00, 0x26, 0xd0, 0x18, 0xd0, 0x40, 
-       0x60, 0x40, 0x00, 0x28, 0xd0, 0x24, 0x70, 0x40, 
-       0xd0, 0x82, 0x50, 0x42, 0x60, 0x40, 0x00, 0xec, 
-       0xd0, 0xa4, 0x70, 0xc2, 0x10, 0xe0, 0xf9, 0x81, 
-       0x00, 0xec, 0xd1, 0x98, 0xd0, 0x41, 0x60, 0x46, 
-       0x70, 0xc2, 0x10, 0xe0, 0xe9, 0x8e, 0xd0, 0x40, 
-       0x60, 0x46, 0xe1, 0x81, 0xd0, 0x40, 0x00, 0xe6, 
-       0xd0, 0x10, 0x60, 0x40, 0xb0, 0x3c, 0x60, 0x40, 
-       0xb0, 0x3c, 0x60, 0x40, 0xd0, 0xe0, 0x00, 0xea, 
-       0xd0, 0x40, 0x00, 0xe8, 0xd0, 0x82, 0x01, 0x46, 
-       0x70, 0x01, 0xb0, 0x7c, 0x60, 0x02, 0xb0, 0xbc, 
-       0x00, 0x06, 0x00, 0xc6, 0xb0, 0xc1, 0xed, 0x9b, 
-       0x80, 0x49, 0xd6, 0x44, 0xd5, 0x43, 0x00, 0xe0, 
-       0xd1, 0x80, 0x00, 0x06, 0x0b, 0x09, 0x01, 0x0d, 
-       0x0b, 0x09, 0x61, 0x06, 0xb1, 0xbc, 0x01, 0x4d, 
-       0x09, 0x09, 0x61, 0x46, 0xb1, 0xbc, 0x00, 0xcd, 
-       0x09, 0x09, 0x10, 0xe4, 0xed, 0xb8, 0x60, 0xc6, 
-       0xb1, 0xbc, 0x00, 0xcd, 0x60, 0xc6, 0x00, 0xed, 
-       0xd0, 0x04, 0x70, 0x00, 0x10, 0x20, 0xf9, 0xd8, 
-       0xd0, 0x0a, 0x40, 0x03, 0xe9, 0xc9, 0x10, 0xe2, 
-       0xe9, 0xc9, 0x10, 0xe7, 0xe9, 0xc9, 0x10, 0xe8, 
-       0xf9, 0xd8, 0x01, 0x46, 0x90, 0x10, 0x00, 0x20, 
-       0xd0, 0x44, 0x50, 0x40, 0x00, 0xc6, 0xa0, 0x50, 
-       0x00, 0xa0, 0xd0, 0x00, 0xa0, 0x05, 0x80, 0x40, 
-       0x00, 0xed, 0xd1, 0xa4, 0xd0, 0x04, 0x60, 0x06, 
-       0x00, 0xee, 0xd1, 0xac, 0x73, 0x86, 0x10, 0xe3, 
-       0xe5, 0xe3, 0xe9, 0xe8, 0x00, 0xe7, 0xd0, 0x40, 
-       0x00, 0xae, 0xd0, 0xbb, 0xe1, 0xec, 0x01, 0x24, 
-       0xd0, 0x6b, 0x00, 0xea, 0xd0, 0xa6, 0xe1, 0xec, 
-       0x01, 0x21, 0xd0, 0x7b, 0x00, 0xe8, 0xd0, 0x90, 
-       0x13, 0xa0, 0xf9, 0xef, 0xc0, 0x42, 0x00, 0xe0, 
-       0xd1, 0xa8, 0x60, 0x46, 0xb1, 0x98, 0x0b, 0xc9, 
-       0x00, 0x4d, 0x09, 0x09, 0x10, 0x44, 0x00, 0x8d, 
-       0x20, 0x42, 0x10, 0x5f, 0x60, 0x46, 0xb1, 0xb8, 
-       0x00, 0x90, 0xea, 0x1c, 0x0a, 0x89, 0x00, 0x8d, 
-       0x60, 0x86, 0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 
-       0x60, 0x46, 0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 
-       0x60, 0x46, 0x10, 0x60, 0xea, 0x10, 0x00, 0xe8, 
-       0xd1, 0x80, 0xf2, 0xb0, 0x10, 0x60, 0xfa, 0x1c, 
-       0x08, 0x49, 0x00, 0xe0, 0xd1, 0xa4, 0x00, 0x4d, 
-       0x60, 0x46, 0x10, 0x60, 0xea, 0x20, 0x00, 0xe9, 
-       0xd1, 0x80, 0xf2, 0xb0, 0x10, 0x60, 0xea, 0x20, 
-       0x00, 0xe0, 0xd1, 0x88, 0xd0, 0x40, 0x60, 0x46, 
-       0xd0, 0x00, 0x00, 0xe0, 0xd1, 0xa8, 0x70, 0x46, 
-       0x00, 0xef, 0xd1, 0x9c, 0x70, 0x86, 0xb0, 0xb0, 
-       0xee, 0x2a, 0xd0, 0x81, 0x00, 0x90, 0xea, 0x2d, 
-       0x20, 0x01, 0x10, 0x41, 0x10, 0x9f, 0x10, 0xa0, 
-       0xee, 0x2a, 0x10, 0x1c, 0x00, 0x65, 0xd1, 0xa8, 
-       0x60, 0x06, 0x01, 0xb4, 0xd6, 0x3a, 0xe0, 0x46, 
-       0x02, 0x31, 0xde, 0x13, 0x00, 0x27, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0x0c, 0x09, 0x00, 0x06, 0x05, 0x0d, 
-       0x00, 0x22, 0xd0, 0x72, 0x30, 0x54, 0xe9, 0xea, 
-       0xb0, 0x7d, 0xfa, 0x05, 0x09, 0x09, 0x01, 0xcd, 
-       0x11, 0xe1, 0xf9, 0xc7, 0x80, 0x09, 0x80, 0x27, 
-       0x0a, 0x09, 0xd6, 0x45, 0x00, 0xe1, 0xd1, 0xa0, 
-       0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 0x08, 0x49, 
-       0x00, 0x4d, 0x60, 0x46, 0x00, 0x50, 0xe9, 0x91, 
-       0xd4, 0x01, 0xb1, 0xbc, 0x08, 0x89, 0x00, 0x4d, 
-       0x60, 0x46, 0x00, 0xe0, 0xd1, 0x80, 0x08, 0x89, 
-       0x00, 0x4d, 0x08, 0x89, 0x10, 0x4c, 0x71, 0x06, 
-       0x21, 0x01, 0x61, 0x06, 0xb1, 0xbc, 0x00, 0x4d, 
-       0x0b, 0x49, 0x10, 0x4c, 0x71, 0x46, 0x21, 0x41, 
-       0x61, 0x46, 0xb1, 0xb0, 0x00, 0x4d, 0x10, 0x5f, 
-       0x60, 0x46, 0xb1, 0xbc, 0x0a, 0x09, 0x00, 0x4d, 
-       0x10, 0x4a, 0x70, 0x86, 0x20, 0x81, 0x60, 0x86, 
-       0x00, 0xe1, 0xd1, 0xac, 0x08, 0x49, 0x00, 0x4d, 
-       0x60, 0x46, 0xb1, 0xbc, 0x08, 0x89, 0x00, 0x4d, 
-       0x60, 0x46, 0xb1, 0xbc, 0x09, 0x49, 0x00, 0x8d, 
-       0x60, 0x86, 0xc0, 0x02, 0x00, 0xe0, 0xd1, 0xa8, 
-       0x70, 0xc6, 0x10, 0xc0, 0xd0, 0x20, 0x30, 0x01, 
-       0x10, 0xc0, 0x60, 0xc6, 0xe1, 0x75, 0x11, 0xe2, 
-       0xf9, 0x75, 0x00, 0xe2, 0xd1, 0x80, 0x08, 0xc9, 
-       0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 0x08, 0x49, 
-       0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 0x10, 0x60, 
-       0xf9, 0xd7, 0xb1, 0xb4, 0xe1, 0xde, 0xd2, 0x03, 
-       0x0a, 0x09, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
-       0xb2, 0x01, 0xf9, 0xd8, 0x0b, 0xc9, 0x00, 0x4d, 
-       0x10, 0x49, 0x10, 0x56, 0x60, 0x46, 0xb1, 0xbc, 
-       0x0b, 0x89, 0x00, 0x4d, 0x10, 0x4a, 0x10, 0x56, 
-       0x60, 0x46, 0xe1, 0x75, 0x0b, 0x2c, 0xd4, 0x40, 
-       0xf3, 0xb0, 0xe1, 0x77, 0x00, 0xe0, 0xd0, 0x6c, 
-       0x00, 0xe0, 0xd1, 0x80, 0xd0, 0x0a, 0xf1, 0xfe, 
-       0x00, 0xe1, 0xd1, 0xb0, 0xd0, 0x02, 0xf1, 0xfe, 
-       0x00, 0xe0, 0xd1, 0x80, 0x76, 0x86, 0xb1, 0xbc, 
-       0x73, 0x46, 0xe2, 0x3c, 0x70, 0x81, 0x60, 0x86, 
-       0xb1, 0xbc, 0xb0, 0x7c, 0xb0, 0x01, 0xed, 0xfe, 
-       0x0f, 0xc5, 0x00, 0xe1, 0xd1, 0xa0, 0x70, 0x46, 
-       0xd0, 0x8f, 0x40, 0x42, 0x00, 0x25, 0xd0, 0xe0, 
-       0x00, 0x24, 0xd1, 0x20, 0x10, 0x6a, 0xea, 0x1e, 
-       0x00, 0x66, 0xd0, 0xe0, 0x00, 0x62, 0xd1, 0x00, 
-       0x10, 0x66, 0xea, 0x1e, 0x00, 0x6e, 0xd0, 0xc0, 
-       0x10, 0x64, 0xea, 0x1e, 0x00, 0x2b, 0xd0, 0xd0, 
-       0x00, 0x29, 0xd1, 0x00, 0x00, 0xe0, 0xd1, 0x80, 
-       0x76, 0x86, 0x16, 0xa0, 0xe9, 0xee, 0x30, 0xda, 
-       0xe5, 0xee, 0xb1, 0xbc, 0x73, 0x46, 0x13, 0x60, 
-       0xe9, 0xee, 0x31, 0x0d, 0xe5, 0xee, 0xd0, 0x82, 
-       0xb1, 0xbc, 0x70, 0x46, 0x10, 0x60, 0xe9, 0xee, 
-       0xb0, 0x81, 0xee, 0x2c, 0x00, 0xe0, 0xd0, 0x40, 
-       0x00, 0xe0, 0xd1, 0xac, 0xd0, 0x0a, 0xf1, 0xfe, 
-       0x00, 0xe1, 0xd0, 0x70, 0xd0, 0x02, 0xf1, 0xfe, 
-       0x00, 0xec, 0xd1, 0x98, 0xd0, 0x40, 0x60, 0x46, 
-       0x00, 0xe0, 0xd0, 0x8c, 0x70, 0x82, 0x00, 0x21, 
-       0xd0, 0x70, 0x60, 0x81, 0xd0, 0x40, 0x00, 0x25, 
-       0xd0, 0x20, 0x30, 0x1a, 0xfa, 0x50, 0x00, 0x24, 
-       0xd0, 0x20, 0x30, 0x0d, 0xfa, 0x50, 0xd0, 0x41, 
-       0x00, 0x21, 0xd1, 0x84, 0x60, 0x46, 0xb6, 0xb1, 
-       0x16, 0x9c, 0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 
-       0x02, 0x31, 0xde, 0x13, 0x00, 0x27, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0x00, 0xec, 0xd0, 0xa8, 0x70, 0xc2, 
-       0x10, 0xe0, 0xf9, 0x77, 0x00, 0xec, 0xd1, 0x9c, 
-       0xd0, 0x41, 0x60, 0x46, 0x70, 0xc2, 0x10, 0xe0, 
-       0xe9, 0x84, 0xd0, 0x40, 0x60, 0x46, 0xe1, 0x77, 
-       0x0b, 0x49, 0x00, 0xe2, 0xd1, 0xa0, 0x00, 0x4d, 
-       0x10, 0x5f, 0x00, 0x6f, 0xd0, 0xff, 0x40, 0x43, 
-       0x60, 0x46, 0xb1, 0xbc, 0x0b, 0x09, 0x00, 0x4d, 
-       0x60, 0x46, 0xb1, 0xbc, 0x08, 0x89, 0x00, 0x4d, 
-       0x60, 0x46, 0x10, 0x61, 0xf9, 0x9b, 0xd3, 0xc2, 
-       0x00, 0xec, 0xd1, 0xbc, 0x63, 0xc6, 0x0c, 0x09, 
-       0x90, 0x4d, 0x10, 0x60, 0xe5, 0x9c, 0x00, 0x06, 
-       0x05, 0x0d, 0x00, 0x22, 0xd0, 0x72, 0x30, 0x54, 
-       0xf9, 0xa9, 0x0b, 0xa0, 0xd4, 0x40, 0xf3, 0xb0, 
-       0xe1, 0xa0, 0x00, 0xec, 0xd1, 0x9c, 0xd0, 0x40, 
-       0x60, 0x46, 0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 
-       0x0b, 0x09, 0x00, 0x4d, 0x0b, 0x09, 0x00, 0x4d, 
-       0x0a, 0x09, 0x01, 0x4d, 0x0a, 0x09, 0x00, 0x4d, 
-       0x01, 0x59, 0xe9, 0x96, 0x09, 0x09, 0x00, 0x4d, 
-       0x10, 0x5f, 0x10, 0x61, 0xf9, 0x96, 0x09, 0x09, 
-       0x01, 0x4d, 0x11, 0x5f, 0x0b, 0xc9, 0x00, 0x4d, 
-       0xc0, 0x01, 0x10, 0x5f, 0x11, 0x4e, 0x51, 0x41, 
-       0x08, 0x49, 0x00, 0x4d, 0x0b, 0xc9, 0x10, 0x0f, 
-       0x00, 0x4d, 0x50, 0x01, 0x00, 0xed, 0xd1, 0xb6, 
-       0x01, 0x46, 0x00, 0x06, 0xa0, 0x3c, 0xa1, 0x7d, 
-       0x60, 0x06, 0x00, 0xc6, 0xd5, 0x00, 0xb5, 0x01, 
-       0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0x50, 0x00, 
-       0x00, 0xec, 0xd0, 0xac, 0x70, 0xc2, 0x10, 0xe0, 
-       0xf9, 0x70, 0x00, 0xec, 0xd1, 0xa0, 0xd0, 0x41, 
-       0x60, 0x46, 0x70, 0xc2, 0x10, 0xe0, 0xe9, 0x7f, 
-       0xd0, 0x40, 0x60, 0x46, 0xe1, 0x70, 0x0a, 0x89, 
-       0x0b, 0xcd, 0x00, 0xe3, 0xd1, 0x80, 0x6b, 0xc6, 
-       0x08, 0xc9, 0x05, 0x8d, 0x15, 0xa3, 0xee, 0x6e, 
-       0x15, 0xa0, 0xea, 0x6e, 0x90, 0x4d, 0xd0, 0x9f, 
-       0xd0, 0xdf, 0x40, 0x81, 0x10, 0x55, 0x40, 0xc1, 
-       0x01, 0x46, 0x82, 0x34, 0x80, 0x3f, 0xc8, 0x1d, 
-       0x81, 0x34, 0x80, 0x3f, 0x00, 0xc6, 0xd1, 0x23, 
-       0x31, 0x03, 0x11, 0x02, 0x38, 0x04, 0xb0, 0x8d, 
-       0x10, 0x9d, 0x28, 0x02, 0xc0, 0x60, 0x00, 0x65, 
-       0xd1, 0x94, 0x71, 0x06, 0x68, 0x06, 0x30, 0x44, 
-       0x00, 0xed, 0xd1, 0xa8, 0x70, 0x06, 0x10, 0x20, 
-       0xe9, 0xb0, 0x00, 0xee, 0xd0, 0xc0, 0x70, 0xc3, 
-       0x20, 0x43, 0xb0, 0x01, 0xf9, 0xac, 0x60, 0x06, 
-       0x00, 0x64, 0xd1, 0xbc, 0x71, 0x06, 0xc0, 0x04, 
-       0x21, 0x01, 0x61, 0x06, 0x10, 0x20, 0xf5, 0xbb, 
-       0x11, 0x20, 0xe5, 0xbb, 0xb0, 0x41, 0x00, 0x65, 
-       0xd1, 0x80, 0x71, 0x06, 0x21, 0x01, 0x61, 0x06, 
-       0x00, 0xed, 0xd1, 0xac, 0x71, 0x06, 0x15, 0xa1, 
-       0xe9, 0xcb, 0xb1, 0x3f, 0x61, 0x06, 0x15, 0xa3, 
-       0xf9, 0xd6, 0xd0, 0xbf, 0xe1, 0xd3, 0xd0, 0x40, 
-       0x60, 0x46, 0xb1, 0xbc, 0x70, 0x86, 0x61, 0x06, 
-       0x31, 0x02, 0xe5, 0xd3, 0x20, 0x84, 0x00, 0x65, 
-       0xd1, 0xa4, 0x60, 0x86, 0xd9, 0x40, 0x00, 0xec, 
-       0xd1, 0x94, 0x79, 0x06, 0xb1, 0x84, 0x78, 0xc6, 
-       0xc0, 0x63, 0x30, 0x64, 0xe9, 0xf8, 0x00, 0xa7, 
-       0xd0, 0xff, 0x7a, 0x63, 0x00, 0x65, 0xd0, 0x00, 
-       0x71, 0x00, 0x31, 0x29, 0xe5, 0xf8, 0xc0, 0x63, 
-       0xc8, 0xc1, 0xb0, 0x78, 0x40, 0x43, 0xc0, 0xa4, 
-       0x30, 0x81, 0xe9, 0xf2, 0x7a, 0x41, 0x31, 0x29, 
-       0xf5, 0xe8, 0x21, 0x29, 0x61, 0x00, 0xb8, 0xfc, 
-       0x79, 0x63, 0xb8, 0xfc, 0x48, 0xc3, 0x68, 0xc6, 
-       0x00, 0xed, 0xd1, 0xb8, 0x69, 0x46, 0x80, 0x28, 
-       0x0b, 0xc9, 0x00, 0x4d, 0x08, 0x49, 0x10, 0x41, 
-       0x00, 0xe3, 0xd1, 0x84, 0x00, 0x8d, 0x20, 0x42, 
-       0x60, 0x46, 0x00, 0xee, 0xd1, 0xa4, 0x70, 0x86, 
-       0x10, 0xa1, 0xee, 0x18, 0xe6, 0x6b, 0x90, 0x86, 
-       0x00, 0x90, 0xea, 0x18, 0x00, 0xed, 0xd0, 0x1c, 
-       0x70, 0x80, 0xb0, 0x81, 0xe6, 0x6b, 0x60, 0x80, 
-       0xb1, 0xa8, 0x70, 0x86, 0x10, 0xa0, 0xfa, 0x6b, 
-       0x00, 0x21, 0xd0, 0x38, 0x70, 0x80, 0x10, 0xa0, 
-       0xfa, 0x6b, 0x0f, 0xef, 0xd0, 0xbf, 0x30, 0x81, 
-       0xfa, 0x22, 0x60, 0x00, 0x08, 0x20, 0xd0, 0x00, 
-       0x5f, 0x00, 0x15, 0xa3, 0xea, 0x6b, 0x00, 0xee, 
-       0xd1, 0x80, 0x79, 0x46, 0x00, 0xf8, 0xd0, 0x00, 
-       0xc4, 0x40, 0x00, 0xe3, 0xd1, 0x84, 0x78, 0x46, 
-       0x0f, 0xef, 0xd0, 0x3f, 0x30, 0x21, 0xea, 0x48, 
-       0x00, 0xe0, 0xd1, 0x90, 0x78, 0x06, 0xc0, 0xa1, 
-       0x18, 0x43, 0x28, 0x42, 0x18, 0x43, 0x28, 0x42, 
-       0x18, 0x1e, 0xd8, 0x80, 0x08, 0x11, 0xea, 0x41, 
-       0x28, 0xa1, 0x18, 0x01, 0x18, 0x5f, 0x18, 0x60, 
-       0xee, 0x3e, 0xc0, 0x51, 0x30, 0x62, 0xee, 0x4e, 
-       0xc8, 0x91, 0x18, 0x9f, 0x00, 0x21, 0xd1, 0xb8, 
-       0xd0, 0x01, 0x60, 0x06, 0x00, 0xef, 0xd0, 0x10, 
-       0xd0, 0x72, 0x60, 0x40, 0x01, 0x46, 0x82, 0x34, 
-       0x80, 0x3f, 0xc8, 0xdc, 0xc9, 0x1d, 0x81, 0x34, 
-       0x80, 0x3f, 0x00, 0xc6, 0x38, 0xe4, 0xee, 0x5e, 
-       0xea, 0x52, 0x28, 0xe5, 0x01, 0x46, 0x90, 0x6d, 
-       0x28, 0xc1, 0x00, 0xc6, 0x38, 0xe2, 0xf6, 0x6b, 
-       0xdb, 0x08, 0xf1, 0x16, 0xf1, 0x18, 0x00, 0x21, 
-       0xd1, 0xb4, 0x61, 0x86, 0xe2, 0x52, 0x01, 0xf7, 
-       0xd2, 0x19, 0xe0, 0x46, 0xd5, 0x00, 0xb5, 0x01, 
-       0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0x50, 0x00, 
-       0x02, 0x31, 0xde, 0x13, 0x00, 0x27, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0xdb, 0x09, 0x00, 0xe3, 0xd0, 0x1c, 
-       0x6b, 0x00, 0xda, 0xc1, 0x00, 0xe6, 0xd1, 0x98, 
-       0x70, 0x06, 0xb1, 0x84, 0x60, 0x06, 0xb1, 0x84, 
-       0x60, 0x06, 0x05, 0x9f, 0xe9, 0x9f, 0x08, 0x49, 
-       0xd1, 0x17, 0x46, 0x44, 0x00, 0x4d, 0x10, 0x43, 
-       0x26, 0x41, 0x08, 0xc9, 0x05, 0xcd, 0xb5, 0xc1, 
-       0xe5, 0xcc, 0xc0, 0x57, 0x15, 0xc6, 0x25, 0xc1, 
-       0x15, 0xa3, 0xf9, 0x9f, 0x08, 0x49, 0xd1, 0x0f, 
-       0x46, 0x44, 0x00, 0x4d, 0x10, 0x44, 0x26, 0x41, 
-       0x08, 0xc9, 0x06, 0x0d, 0xb6, 0x01, 0xe5, 0xcc, 
-       0xc0, 0x58, 0x16, 0x06, 0x26, 0x01, 0x08, 0x49, 
-       0x00, 0x4d, 0x10, 0x60, 0xe9, 0xa6, 0x0a, 0x09, 
-       0x00, 0x4d, 0xe1, 0x9f, 0x0c, 0x09, 0x90, 0x4d, 
-       0x10, 0x60, 0xe5, 0xa7, 0x00, 0x06, 0x05, 0x0d, 
-       0x00, 0x22, 0xd0, 0x72, 0x30, 0x54, 0xf9, 0xb3, 
-       0xd4, 0x40, 0xf3, 0xb0, 0xe1, 0xab, 0xb0, 0x7d, 
-       0xf9, 0xb8, 0x02, 0x34, 0xd4, 0x44, 0xe0, 0x46, 
-       0x00, 0xec, 0xd1, 0xa0, 0xd0, 0x40, 0x60, 0x46, 
-       0x02, 0x3c, 0xdc, 0x89, 0x00, 0xec, 0xd1, 0x80, 
-       0x70, 0x46, 0xb1, 0xbc, 0x70, 0x86, 0x30, 0x81, 
-       0xe8, 0x46, 0x15, 0x63, 0xe9, 0xc9, 0x05, 0x5e, 
-       0xe8, 0x46, 0x01, 0x73, 0xd4, 0x3d, 0xe0, 0x46, 
-       0xd5, 0x00, 0xb5, 0x01, 0x01, 0x7a, 0xde, 0x1a, 
-       0xe0, 0x46, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
-       0xcc, 0xc0, 0xcd, 0x01, 0xcd, 0x42, 0xcd, 0x83, 
-       0x00, 0xa0, 0xd0, 0x01, 0xa0, 0x38, 0xc8, 0x7f, 
-       0xc8, 0x06, 0xb1, 0xbe, 0xf3, 0x96, 0xc8, 0x80, 
-       0xf3, 0x92, 0x58, 0x80, 0xf3, 0x96, 0xc8, 0xc0, 
-       0xf3, 0x96, 0xc9, 0x00, 0xf3, 0x92, 0x58, 0xc0, 
-       0xf3, 0x96, 0xc9, 0x40, 0xf3, 0x92, 0x59, 0x40, 
-       0xc0, 0x22, 0xc0, 0x65, 0xc0, 0x86, 0xf3, 0x9a, 
-       0xf3, 0x96, 0xc8, 0x80, 0xf3, 0x92, 0x59, 0x00, 
-       0xf3, 0x96, 0xc9, 0x40, 0xf3, 0x96, 0xc9, 0x80, 
-       0xf3, 0x92, 0x59, 0x40, 0xf3, 0x96, 0xc9, 0xc0, 
-       0xf3, 0x92, 0x58, 0x80, 0xc0, 0x23, 0xc0, 0x62, 
-       0xd0, 0x88, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 
-       0xc8, 0xc0, 0xf3, 0x92, 0x58, 0xc0, 0xf3, 0x96, 
-       0xc8, 0x80, 0xf3, 0x92, 0x59, 0xc0, 0xc0, 0x24, 
-       0xc0, 0x67, 0xd0, 0x90, 0x20, 0x86, 0xf3, 0x9a, 
-       0xf3, 0x96, 0xc9, 0x00, 0xf3, 0x92, 0x59, 0x80, 
-       0xf3, 0x96, 0xc9, 0xc0, 0xf3, 0x96, 0xca, 0x00, 
-       0xf3, 0x92, 0x59, 0xc0, 0xf3, 0x96, 0xca, 0x40, 
-       0xf3, 0x92, 0x59, 0x00, 0xc0, 0x25, 0xc0, 0x64, 
-       0xd0, 0x98, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 
-       0xc9, 0x40, 0xf3, 0x92, 0x58, 0x80, 0xf3, 0x96, 
-       0xc9, 0x00, 0xf3, 0x92, 0x59, 0x00, 0xc0, 0x23, 
-       0xc0, 0x64, 0xd0, 0x84, 0x20, 0x86, 0xf3, 0x9a, 
-       0xf3, 0x96, 0xc8, 0xc0, 0xf3, 0x92, 0x59, 0x40, 
-       0xf3, 0x96, 0xc9, 0x00, 0xf3, 0x92, 0x5a, 0x40, 
-       0xc0, 0x26, 0xc0, 0x69, 0xd0, 0xa0, 0x20, 0x86, 
-       0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x80, 0xf3, 0x92, 
-       0x5a, 0x00, 0xf3, 0x96, 0xca, 0x40, 0xf3, 0x92, 
-       0x5a, 0x40, 0xf3, 0x96, 0xca, 0x80, 0xf3, 0x92, 
-       0x59, 0x80, 0xc0, 0x27, 0xc0, 0x66, 0xd0, 0xa8, 
-       0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0xc0, 
-       0xf3, 0x92, 0x59, 0x00, 0xf3, 0x96, 0xc9, 0x80, 
-       0xf3, 0x92, 0x58, 0xc0, 0xc0, 0x22, 0xc0, 0x63, 
-       0xd0, 0x8c, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x92, 
-       0x59, 0x80, 0xc0, 0x25, 0xc0, 0x66, 0xd0, 0x94, 
-       0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc8, 0x80, 
-       0xf3, 0x92, 0x59, 0xc0, 0xf3, 0x96, 0xc8, 0xc0, 
-       0xf3, 0x92, 0x5a, 0x80, 0xc0, 0x28, 0xc0, 0x6a, 
-       0xd0, 0xb0, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 
-       0xc9, 0x40, 0xf3, 0x92, 0x59, 0x40, 0xc0, 0x29, 
-       0xc0, 0x65, 0xd0, 0xb8, 0x20, 0x86, 0xf3, 0x9a, 
-       0xf3, 0x96, 0xc9, 0x80, 0xf3, 0x92, 0x58, 0xc0, 
-       0xf3, 0x96, 0xca, 0x00, 0xf3, 0x92, 0x58, 0x80, 
-       0xc0, 0x24, 0xc0, 0x62, 0xd0, 0x9c, 0x20, 0x86, 
-       0xf3, 0x9a, 0xf3, 0x92, 0x5a, 0x00, 0xc0, 0x27, 
-       0xc0, 0x68, 0xd0, 0xa4, 0x20, 0x86, 0xf3, 0x9a, 
-       0xf3, 0x96, 0xca, 0x80, 0xf3, 0x92, 0x59, 0x80, 
-       0xf3, 0x96, 0xca, 0x40, 0xf3, 0x92, 0x5a, 0x40, 
-       0xf3, 0x96, 0xc9, 0x40, 0xf3, 0x92, 0x5a, 0x80, 
-       0xc0, 0x23, 0xc0, 0x6a, 0xd0, 0xac, 0x20, 0x86, 
-       0xf3, 0x9a, 0xf3, 0x92, 0x59, 0x40, 0xc0, 0x26, 
-       0xc0, 0x65, 0xd0, 0xb4, 0x20, 0x86, 0xf3, 0x9a, 
-       0xf3, 0x96, 0xc9, 0x00, 0xf3, 0x92, 0x59, 0x00, 
-       0xc0, 0x29, 0xc0, 0x64, 0xd0, 0xbc, 0x20, 0x86, 
-       0xf3, 0x9a, 0xc0, 0x33, 0xc0, 0x74, 0xc0, 0xb5, 
-       0xc0, 0xf6, 0xd0, 0x40, 0x00, 0xa0, 0xd8, 0x00, 
-       0xa8, 0x38, 0x08, 0x45, 0x0a, 0x09, 0x00, 0x0d, 
-       0x0f, 0xc5, 0x50, 0x00, 0x0a, 0x09, 0x00, 0x0d, 
-       0x10, 0x08, 0x0f, 0xc5, 0x01, 0x46, 0x00, 0x06, 
-       0xa0, 0x7c, 0xa0, 0x3d, 0x60, 0x42, 0x00, 0xc6, 
-       0x0f, 0xc5, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
-       0x14, 0x48, 0xd0, 0x81, 0x00, 0xef, 0xd1, 0x8c, 
-       0x71, 0x46, 0x11, 0x60, 0xfb, 0xb1, 0x60, 0x86, 
-       0x71, 0x46, 0x31, 0x42, 0xfb, 0xb1, 0x00, 0xec, 
-       0xd1, 0x0c, 0x74, 0x84, 0x00, 0x68, 0xd0, 0x80, 
-       0x70, 0x02, 0x10, 0x20, 0xfb, 0xc4, 0xc4, 0x82, 
-       0xc4, 0xd2, 0xb4, 0xfc, 0xda, 0x00, 0xda, 0x4f, 
-       0x0a, 0x09, 0x0f, 0xef, 0xd0, 0x3f, 0xb4, 0x7f, 
-       0xca, 0x29, 0x1a, 0x18, 0x4a, 0x00, 0x1a, 0x48, 
-       0x00, 0x8d, 0x2a, 0x42, 0xd0, 0x03, 0x40, 0x11, 
-       0xfb, 0xe3, 0xb4, 0x44, 0x00, 0xa0, 0xd0, 0xc0, 
-       0x30, 0xd3, 0xff, 0xe3, 0xb4, 0xfe, 0x01, 0x46, 
-       0x00, 0x06, 0xaa, 0x3d, 0xaa, 0x7c, 0x6a, 0x53, 
-       0x00, 0xc6, 0xb4, 0xfe, 0xb4, 0x7c, 0x1a, 0x61, 
-       0xfb, 0xc8, 0xb4, 0x43, 0x00, 0xef, 0xd0, 0x3f, 
-       0x40, 0x11, 0xeb, 0xf7, 0xb0, 0xc4, 0xe7, 0xf7, 
-       0xeb, 0xee, 0x61, 0x53, 0x64, 0x52, 0x64, 0xc4, 
-       0x00, 0x28, 0xd1, 0x24, 0x70, 0x04, 0x00, 0x21, 
-       0xd0, 0x80, 0x50, 0x02, 0x60, 0x04, 0x61, 0x46, 
-       0x0a, 0x09, 0x0f, 0xc5, 0x50, 0x00, 0x50, 0x00, 
-       0x02, 0x31, 0xde, 0x13, 0x00, 0x27, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0x01, 0xfa, 0xd4, 0x3d, 0x00, 0x25, 
-       0xdc, 0xd8, 0xf0, 0x4a, 0x09, 0x09, 0x01, 0xcd, 
-       0x11, 0xe8, 0xf9, 0xe2, 0x00, 0xe3, 0xd1, 0x9c, 
-       0x09, 0x09, 0x05, 0xcd, 0xb5, 0xc1, 0x09, 0x09, 
-       0x00, 0x4d, 0xb0, 0x41, 0x10, 0x46, 0x25, 0xc1, 
-       0x09, 0x09, 0x06, 0x0d, 0xb6, 0x01, 0x09, 0x09, 
-       0x00, 0x4d, 0x08, 0x89, 0xb0, 0x41, 0x10, 0x46, 
-       0x26, 0x01, 0x00, 0x8d, 0x08, 0x89, 0x10, 0x82, 
-       0xd0, 0x04, 0xc0, 0x55, 0x00, 0x40, 0x40, 0x40, 
-       0x05, 0x4d, 0x08, 0x49, 0x0b, 0x0d, 0xd1, 0x00, 
-       0x15, 0x63, 0xe9, 0xa2, 0xd1, 0x01, 0x55, 0x41, 
-       0xdb, 0x01, 0x4b, 0x15, 0xa1, 0x1b, 0x08, 0x89, 
-       0x00, 0x4d, 0x08, 0x49, 0x10, 0x41, 0xd1, 0x19, 
-       0x46, 0x44, 0x26, 0x41, 0x00, 0xcd, 0x08, 0x49, 
-       0x10, 0xc4, 0x00, 0x4d, 0x08, 0x49, 0x10, 0x41, 
-       0x20, 0x81, 0xa0, 0x89, 0x00, 0x4d, 0x10, 0x43, 
-       0x20, 0xc1, 0xa0, 0xe8, 0x08, 0x49, 0x00, 0x4d, 
-       0x1b, 0x03, 0x5b, 0x01, 0xbb, 0x3f, 0x6b, 0x06, 
-       0x08, 0x49, 0xb1, 0xbc, 0x00, 0x4d, 0x60, 0x46, 
-       0x08, 0x49, 0xb1, 0xbc, 0x0a, 0xcd, 0x1a, 0xc2, 
-       0x4a, 0xd9, 0x1a, 0xde, 0x6a, 0xc6, 0x08, 0x49, 
-       0xb1, 0xbc, 0x00, 0x4d, 0x60, 0x46, 0x10, 0x60, 
-       0xea, 0x3e, 0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 
-       0x60, 0x46, 0xb1, 0xbc, 0x08, 0xc9, 0x00, 0x4d, 
-       0x60, 0x46, 0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 
-       0x60, 0x46, 0xb1, 0xbc, 0x09, 0xc9, 0x00, 0x4d, 
-       0x60, 0x46, 0xb1, 0xbc, 0x0a, 0x09, 0x00, 0x4d, 
-       0x60, 0x46, 0xe2, 0x3e, 0x11, 0xe3, 0xfa, 0x00, 
-       0x00, 0xe7, 0xd0, 0xc0, 0xd0, 0x84, 0xb0, 0x81, 
-       0xe6, 0x3e, 0x08, 0x49, 0x00, 0x4d, 0x60, 0x43, 
-       0xb0, 0xfc, 0x10, 0x60, 0xe9, 0xe7, 0x10, 0xa3, 
-       0xf9, 0xf4, 0x00, 0xe8, 0xd1, 0x80, 0xe1, 0xf8, 
-       0x10, 0xa2, 0xf9, 0xfa, 0x00, 0xe9, 0xd1, 0x80, 
-       0xf2, 0xb0, 0xe1, 0xe7, 0xd2, 0x3f, 0x0a, 0x09, 
-       0x00, 0x4d, 0xb2, 0x01, 0xf5, 0xfb, 0xe1, 0xe7, 
-       0x11, 0xe7, 0xfa, 0x3e, 0xd4, 0x01, 0x00, 0xe1, 
-       0xd0, 0x24, 0x70, 0x00, 0x10, 0x21, 0xea, 0x0d, 
-       0x15, 0x63, 0xfa, 0x0d, 0xd4, 0x03, 0x44, 0x2c, 
-       0xb4, 0x3f, 0x00, 0xe6, 0xd1, 0x90, 0x0b, 0x09, 
-       0x00, 0x4d, 0x09, 0x49, 0x10, 0x45, 0x00, 0x8d, 
-       0x50, 0x81, 0xd0, 0x40, 0x10, 0x87, 0x10, 0x98, 
-       0x30, 0x42, 0xf2, 0x61, 0x60, 0x46, 0xb1, 0xbc, 
-       0x0b, 0x09, 0x00, 0x0d, 0x09, 0x49, 0x00, 0x0d, 
-       0xb4, 0x01, 0xfa, 0x0f, 0x00, 0xe6, 0xd0, 0x18, 
-       0x30, 0x06, 0xe6, 0x29, 0x60, 0x46, 0xb1, 0xbc, 
-       0xe2, 0x22, 0x00, 0xe0, 0xd1, 0x88, 0x70, 0x46, 
-       0x10, 0x63, 0xea, 0x39, 0x10, 0x64, 0xea, 0x39, 
-       0x00, 0xe6, 0xd1, 0x90, 0xd0, 0x00, 0x60, 0x06, 
-       0xb1, 0xbc, 0x60, 0x06, 0xb1, 0xbc, 0x60, 0x06, 
-       0xe2, 0x3e, 0x00, 0xef, 0xd1, 0x84, 0x70, 0x46, 
-       0x10, 0x60, 0xfa, 0x30, 0x0c, 0x09, 0x90, 0x4d, 
-       0x10, 0x60, 0xe6, 0x3f, 0x00, 0x06, 0x05, 0x0d, 
-       0x00, 0x22, 0xd0, 0x72, 0x30, 0x54, 0xfa, 0x4b, 
-       0xd4, 0x40, 0xf3, 0xb0, 0xe2, 0x43, 0xb0, 0x7d, 
-       0xe9, 0x7a, 0x00, 0xec, 0xd1, 0xa0, 0xd0, 0x40, 
-       0x60, 0x46, 0x02, 0x3c, 0xdc, 0x89, 0x00, 0xec, 
-       0xd1, 0x80, 0x70, 0x46, 0xb1, 0xbc, 0x70, 0x86, 
-       0x30, 0x81, 0xe8, 0x46, 0x15, 0x63, 0xea, 0x5e, 
-       0x05, 0x5e, 0xe8, 0x46, 0x01, 0x73, 0xd4, 0x3d, 
-       0xe0, 0x46, 0x00, 0xe0, 0xd0, 0x00, 0x70, 0xc0, 
-       0x10, 0xc1, 0x00, 0xe0, 0xd0, 0x08, 0x70, 0x00, 
-       0x10, 0x23, 0xea, 0x75, 0xc0, 0x83, 0x10, 0x9d, 
-       0x30, 0xc2, 0x10, 0x9f, 0x30, 0xc2, 0x00, 0xef, 
-       0xd0, 0xac, 0x70, 0x82, 0x10, 0xa3, 0xea, 0x75, 
-       0x10, 0xc1, 0xc0, 0x83, 0x30, 0x81, 0xe6, 0x7e, 
-       0xc0, 0x83, 0x20, 0x81, 0xf6, 0x7f, 0xd0, 0x40, 
-       0x30, 0x43, 0x0f, 0xc5, 0xc0, 0x43, 0x0f, 0xc5, 
-       0x00, 0xed, 0xd1, 0xa4, 0x72, 0x86, 0x15, 0xa3, 
-       0xee, 0x23, 0x15, 0xa1, 0xe6, 0x23, 0x08, 0x20, 
-       0xd0, 0x00, 0x5f, 0x00, 0xd8, 0xc4, 0x15, 0x63, 
-       0xe9, 0x7e, 0x48, 0xd5, 0x18, 0xde, 0x18, 0xe0, 
-       0xe9, 0xc2, 0x00, 0xed, 0xd1, 0xb4, 0x79, 0xc6, 
-       0x19, 0xe0, 0xe9, 0x8c, 0x00, 0xed, 0xd0, 0x3a, 
-       0x79, 0xc6, 0x69, 0xc0, 0xd9, 0xc0, 0x69, 0xc6, 
-       0x00, 0xed, 0xd0, 0x38, 0x79, 0x40, 0x19, 0x60, 
-       0xe9, 0x98, 0x00, 0x28, 0xd0, 0x24, 0x70, 0x40, 
-       0x02, 0x20, 0xd0, 0x80, 0x50, 0x42, 0x60, 0x40, 
-       0x15, 0xa3, 0xe9, 0x9f, 0x00, 0xec, 0xd1, 0xb8, 
-       0x79, 0xc6, 0x69, 0x46, 0xc9, 0x67, 0x00, 0xec, 
-       0xd9, 0xb4, 0x70, 0x66, 0x00, 0xec, 0xd1, 0xbc, 
-       0x70, 0x06, 0x10, 0x20, 0xed, 0xbe, 0x10, 0x60, 
-       0xe9, 0xc1, 0x00, 0xe0, 0xda, 0xa8, 0x7a, 0xaa, 
-       0xc0, 0x2a, 0x10, 0x1f, 0x00, 0x22, 0xd0, 0xa0, 
-       0x70, 0x82, 0x20, 0x6a, 0x00, 0x9f, 0xe9, 0xb5, 
-       0x20, 0x40, 0x19, 0x60, 0xf9, 0xb8, 0xc9, 0x41, 
-       0xb0, 0x48, 0x30, 0x65, 0xf5, 0xbd, 0xb0, 0x70, 
-       0xed, 0xbe, 0xd9, 0x40, 0x00, 0xed, 0xd1, 0xbc, 
-       0x69, 0x46, 0x69, 0x66, 0x12, 0xa4, 0xea, 0x21, 
-       0x00, 0xec, 0xd1, 0xbc, 0x73, 0xc6, 0x15, 0xa3, 
-       0xe9, 0xdf, 0x33, 0xe3, 0xe5, 0xd3, 0xed, 0xd2, 
-       0x63, 0xc6, 0x00, 0x21, 0xd1, 0xa8, 0x63, 0xc6, 
-       0x00, 0xed, 0xd1, 0xa0, 0x63, 0xc6, 0x15, 0xa1, 
-       0xf9, 0xdc, 0x12, 0xa3, 0xe5, 0xe3, 0xd3, 0xc2, 
-       0x00, 0xec, 0xd1, 0xbc, 0x63, 0xc6, 0xe1, 0xe3, 
-       0x12, 0xa3, 0xea, 0x21, 0xe1, 0xe3, 0x12, 0xa2, 
-       0xf6, 0x21, 0x13, 0xe0, 0xfa, 0x21, 0x00, 0xee, 
-       0xd1, 0x8c, 0x78, 0x06, 0xb1, 0xbc, 0x78, 0x46, 
-       0xb1, 0xbc, 0x78, 0x86, 0xd1, 0x88, 0x72, 0x46, 
-       0xd1, 0x84, 0x73, 0x06, 0x13, 0x20, 0xf9, 0xe3, 
-       0x00, 0x64, 0xd1, 0xa0, 0x70, 0x46, 0xd0, 0xa2, 
-       0x30, 0x81, 0xe9, 0xff, 0x10, 0x70, 0xea, 0x11, 
-       0x10, 0x6d, 0xea, 0x14, 0x10, 0x76, 0xea, 0x19, 
-       0x10, 0x7a, 0xea, 0x28, 0xe2, 0x3b, 0x18, 0xe0, 
-       0xea, 0x3b, 0x00, 0xed, 0xd1, 0x80, 0x70, 0x86, 
-       0xb0, 0x81, 0xd0, 0x3f, 0x40, 0x02, 0x10, 0x20, 
-       0xea, 0x0c, 0x60, 0x86, 0xf3, 0x8a, 0xe1, 0xe3, 
-       0xc0, 0x02, 0x10, 0x1a, 0x50, 0x80, 0x60, 0x86, 
-       0xe2, 0x3b, 0x15, 0xa3, 0xea, 0x21, 0xe2, 0xe9, 
-       0xd2, 0x80, 0x00, 0xed, 0xd1, 0xa4, 0x62, 0x86, 
-       0xe3, 0x0c, 0x00, 0xed, 0xd1, 0x88, 0xd0, 0x60, 
-       0x70, 0x06, 0x50, 0x40, 0x60, 0x46, 0x15, 0xa3, 
-       0xfb, 0x0c, 0xd5, 0x84, 0xe3, 0x0c, 0xd5, 0x00, 
-       0xb5, 0x01, 0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 
-       0x00, 0xed, 0xd1, 0x88, 0xd0, 0x60, 0x70, 0x06, 
-       0x50, 0x40, 0x60, 0x46, 0x15, 0xa2, 0xe7, 0x0c, 
-       0xee, 0x21, 0x00, 0x21, 0xd1, 0x8c, 0x18, 0xe0, 
-       0xfa, 0x39, 0x70, 0x46, 0x10, 0x61, 0xea, 0x70, 
-       0xe2, 0x21, 0x65, 0x86, 0xe2, 0x21, 0x18, 0xe0, 
-       0xea, 0x70, 0xd1, 0x80, 0x73, 0x06, 0x15, 0xa2, 
-       0xee, 0x68, 0x00, 0x22, 0xd1, 0x80, 0x70, 0x46, 
-       0x6b, 0x06, 0xcb, 0x01, 0xb1, 0xb4, 0x70, 0x46, 
-       0x6a, 0xc6, 0xca, 0xc1, 0x00, 0x65, 0xd1, 0x98, 
-       0x70, 0x46, 0x10, 0x61, 0xfa, 0x50, 0x02, 0x41, 
-       0xc3, 0x21, 0xc7, 0xe0, 0x02, 0x50, 0xea, 0x56, 
-       0xc3, 0x20, 0xc7, 0xe1, 0xd1, 0x88, 0xd0, 0x01, 
-       0x02, 0x40, 0x62, 0x46, 0x0f, 0xef, 0xd0, 0x7f, 
-       0x30, 0x6f, 0xfa, 0x5f, 0xc3, 0x20, 0xc7, 0x4c, 
-       0xd0, 0x00, 0x00, 0x65, 0xd1, 0x98, 0x70, 0x46, 
-       0x60, 0x06, 0xb0, 0x41, 0x43, 0x01, 0xe2, 0x70, 
-       0xc3, 0x22, 0xc7, 0xcc, 0xc7, 0x60, 0xc7, 0xa1, 
-       0x02, 0x50, 0xea, 0x70, 0xc7, 0x61, 0xc7, 0xa0, 
-       0xdb, 0x80, 0xd1, 0x00, 0x00, 0xef, 0xd1, 0xa8, 
-       0x70, 0x46, 0x10, 0x60, 0xfa, 0x7a, 0x00, 0xe0, 
-       0xd1, 0x88, 0x70, 0x46, 0x00, 0x22, 0xd1, 0xb0, 
-       0x70, 0x86, 0x30, 0x81, 0xea, 0x82, 0x60, 0x46, 
-       0xd0, 0x20, 0xf3, 0x06, 0x10, 0x63, 0xea, 0x87, 
-       0x10, 0x64, 0xea, 0x87, 0xe2, 0x95, 0x00, 0xef, 
-       0xd1, 0x6c, 0x71, 0x45, 0xc0, 0x05, 0x30, 0x01, 
-       0xf6, 0x95, 0xdb, 0x82, 0xd1, 0x01, 0x10, 0x63, 
-       0xea, 0x95, 0xd1, 0x02, 0x11, 0x62, 0xea, 0x95, 
-       0xd1, 0x03, 0xd1, 0x8c, 0x61, 0x06, 0xdb, 0x40, 
-       0x00, 0xe0, 0xd0, 0x00, 0x71, 0x00, 0xc0, 0x84, 
-       0x10, 0x9c, 0xb0, 0x96, 0xfa, 0xa0, 0xb1, 0x38, 
-       0xb0, 0x96, 0xfa, 0xa3, 0xb1, 0x30, 0x00, 0x29, 
-       0xd1, 0x84, 0x00, 0x22, 0xd0, 0x74, 0x70, 0x86, 
-       0x70, 0xc1, 0x61, 0x06, 0x30, 0xc2, 0xea, 0xae, 
-       0x60, 0x81, 0xdb, 0x41, 0xb0, 0x3c, 0xb1, 0xbc, 
-       0xb0, 0x7c, 0x71, 0x00, 0x70, 0x86, 0x70, 0xc1, 
-       0x61, 0x06, 0x30, 0xc2, 0xea, 0xb9, 0x60, 0x81, 
-       0xdb, 0x41, 0x00, 0xee, 0xd1, 0xb4, 0x70, 0x06, 
-       0xb1, 0xbc, 0x70, 0x46, 0x30, 0x40, 0xea, 0xc2, 
-       0x60, 0x06, 0xdb, 0x41, 0x00, 0x24, 0xd0, 0x60, 
-       0x30, 0x81, 0xea, 0xc7, 0x30, 0x81, 0x50, 0x02, 
-       0xea, 0xca, 0xd0, 0x01, 0x00, 0x22, 0xd1, 0xbc, 
-       0x70, 0x86, 0x30, 0x80, 0xea, 0xd2, 0x60, 0x06, 
-       0xd0, 0x10, 0xf3, 0x06, 0x00, 0x22, 0xd1, 0xa4, 
-       0x71, 0x06, 0xd0, 0x01, 0x41, 0x00, 0x5b, 0x44, 
-       0x5b, 0x6e, 0x6b, 0x46, 0x00, 0x28, 0xd0, 0x70, 
-       0x70, 0x41, 0x10, 0x62, 0xfa, 0xe6, 0xd1, 0x84, 
-       0x70, 0x06, 0x10, 0x20, 0xfa, 0xdf, 0x00, 0x22, 
-       0xd0, 0x00, 0xf3, 0x06, 0x02, 0x7d, 0xde, 0x68, 
-       0xe0, 0x46, 0x00, 0xed, 0xd1, 0x88, 0x71, 0x06, 
-       0x01, 0x1f, 0xfa, 0xfd, 0xd0, 0x41, 0x41, 0x01, 
-       0xd0, 0x62, 0x00, 0x65, 0xd0, 0x30, 0x70, 0x00, 
-       0x10, 0x21, 0xea, 0xfa, 0xee, 0xf9, 0x1a, 0xe1, 
-       0xfa, 0xfa, 0xd0, 0x52, 0x51, 0x01, 0x61, 0x06, 
-       0xe3, 0x0c, 0x18, 0xe0, 0xea, 0x70, 0xc7, 0x60, 
-       0xc7, 0xe1, 0x02, 0x50, 0xea, 0x70, 0xc7, 0x61, 
-       0xc7, 0xe0, 0xe2, 0x70, 0x00, 0x28, 0xdc, 0xa4, 
-       0x7c, 0x72, 0x5c, 0x40, 0x6c, 0x72, 0x0f, 0xc5, 
-       0x18, 0xe0, 0xeb, 0x82, 0xd9, 0x0d, 0x00, 0xee, 
-       0xd1, 0xa4, 0x70, 0x06, 0x10, 0x21, 0xfb, 0x7f, 
-       0xd9, 0x0c, 0x90, 0x06, 0x00, 0x10, 0xeb, 0x7f, 
-       0x00, 0x21, 0xd1, 0x88, 0x7a, 0x06, 0x1a, 0x20, 
-       0xeb, 0x7f, 0xd9, 0x00, 0x00, 0xed, 0xd1, 0xbc, 
-       0x79, 0x46, 0x19, 0x60, 0xeb, 0x7f, 0x39, 0x68, 
-       0xc0, 0xe5, 0xc0, 0x25, 0x10, 0x13, 0xb0, 0x0f, 
-       0xef, 0x7f, 0xb0, 0x22, 0xe7, 0x7f, 0x00, 0xe0, 
-       0xd1, 0xa8, 0x71, 0x46, 0x11, 0x5f, 0x29, 0x45, 
-       0x00, 0x22, 0xd0, 0x18, 0x00, 0x22, 0xd4, 0x54, 
-       0x00, 0x22, 0xd0, 0x9c, 0x70, 0x00, 0x74, 0x51, 
-       0x70, 0x42, 0x34, 0x40, 0xe7, 0x3c, 0xd0, 0x40, 
-       0x00, 0x22, 0xd4, 0x50, 0x74, 0x51, 0x34, 0x40, 
-       0xef, 0x42, 0x20, 0x45, 0x60, 0x42, 0x39, 0x41, 
-       0x19, 0x60, 0xf7, 0x5e, 0x00, 0x65, 0xd1, 0xa8, 
-       0x7a, 0x86, 0x29, 0x6a, 0x19, 0x59, 0xb9, 0x7e, 
-       0xf7, 0x75, 0x15, 0xa3, 0xf7, 0x57, 0x00, 0xed, 
-       0xd1, 0xac, 0x70, 0x06, 0x00, 0xed, 0xd1, 0xb0, 
-       0x70, 0x46, 0x30, 0x01, 0xfb, 0x7f, 0x00, 0x65, 
-       0xd1, 0x84, 0x70, 0x46, 0xb0, 0x7f, 0x60, 0x46, 
-       0xd5, 0x84, 0xe3, 0x7f, 0x11, 0x41, 0xd0, 0x4a, 
-       0x00, 0xed, 0xd1, 0xa0, 0x74, 0x46, 0xd0, 0x00, 
-       0x60, 0x06, 0x30, 0xc5, 0x39, 0x45, 0xe7, 0x6e, 
-       0x14, 0x60, 0xeb, 0x6b, 0xf3, 0x85, 0xb0, 0x41, 
-       0xef, 0x65, 0xe3, 0x71, 0x00, 0x66, 0xd1, 0xa0, 
-       0x60, 0xc6, 0x15, 0xa3, 0xeb, 0x7f, 0xf3, 0x85, 
-       0xe3, 0x7f, 0xd9, 0x01, 0x00, 0x66, 0xd1, 0xa0, 
-       0x70, 0x06, 0x30, 0x03, 0xe7, 0x7e, 0x10, 0x1d, 
-       0x10, 0x3b, 0xe7, 0x7f, 0x60, 0xc6, 0x00, 0x66, 
-       0xd1, 0xa4, 0x69, 0x06, 0x15, 0xa4, 0xea, 0x23, 
-       0xe2, 0x3b, 0x00, 0x65, 0xdd, 0x08, 0x7c, 0xf4, 
-       0xbc, 0xff, 0x6c, 0xf4, 0x00, 0xef, 0xdd, 0x10, 
-       0x7c, 0xf4, 0xbc, 0xfe, 0x6c, 0xf4, 0xc0, 0x3f, 
-       0xf1, 0x18, 0xf1, 0x16, 0xf1, 0x18, 0x00, 0x05, 
-       0x08, 0x20, 0xd0, 0x40, 0x5f, 0x01, 0x15, 0x63, 
-       0xe9, 0x77, 0x05, 0x5e, 0xeb, 0x08, 0x00, 0x22, 
-       0xd1, 0xa0, 0x6b, 0x06, 0x00, 0x22, 0xd1, 0xa8, 
-       0x6b, 0xc6, 0x00, 0x22, 0xd1, 0xac, 0x6a, 0xc6, 
-       0x00, 0xee, 0xd0, 0x0c, 0x00, 0xe6, 0xd1, 0x9c, 
-       0x70, 0x40, 0x30, 0x5f, 0xe9, 0x8d, 0xb0, 0x3c, 
-       0xb1, 0xb4, 0x70, 0x40, 0x30, 0x5f, 0xe9, 0x8d, 
-       0xb1, 0xb4, 0x00, 0xe6, 0xd0, 0x10, 0xd0, 0x83, 
-       0x70, 0x40, 0x60, 0x46, 0xb0, 0x3c, 0xb1, 0xbc, 
-       0xb0, 0x81, 0xed, 0x90, 0x00, 0xee, 0xd0, 0x0c, 
-       0x00, 0xe6, 0xd1, 0x9c, 0x70, 0x40, 0x30, 0x4c, 
-       0xe9, 0xa3, 0xb0, 0x3c, 0xb1, 0xb4, 0x70, 0x40, 
-       0x30, 0x4c, 0xe9, 0xa3, 0xb1, 0xb4, 0x00, 0xe6, 
-       0xd0, 0x00, 0x61, 0x80, 0x00, 0x21, 0xd1, 0xb4, 
-       0x70, 0x06, 0x10, 0x20, 0xe9, 0xae, 0xd0, 0x00, 
-       0x60, 0x06, 0xf1, 0x18, 0x00, 0x21, 0xd1, 0x8c, 
-       0x70, 0x46, 0x65, 0x86, 0xde, 0xc0, 0x00, 0xee, 
-       0xd0, 0x20, 0x70, 0x00, 0x10, 0x22, 0xfd, 0xb9, 
-       0xde, 0xc2, 0x00, 0x21, 0xd0, 0x04, 0x70, 0x00, 
-       0x10, 0x21, 0xe9, 0xc0, 0x15, 0xa3, 0xe9, 0xdc, 
-       0xd0, 0x02, 0x4c, 0x00, 0x10, 0x63, 0xe9, 0xc5, 
-       0xcc, 0x3b, 0xd0, 0x04, 0x63, 0x00, 0xd0, 0x00, 
-       0x70, 0x00, 0x30, 0x1f, 0xfb, 0x08, 0xd0, 0x18, 
-       0x70, 0x00, 0x10, 0x20, 0xed, 0xc7, 0xd0, 0x04, 
-       0x70, 0x80, 0x10, 0xa0, 0xeb, 0x08, 0xf1, 0x16, 
-       0x00, 0x21, 0xd0, 0x9a, 0xc0, 0x39, 0x30, 0x1f, 
-       0x10, 0x18, 0x30, 0x02, 0xfd, 0xcf, 0xe3, 0x08, 
-       0x00, 0xe0, 0xd9, 0x04, 0x79, 0x24, 0xb9, 0x38, 
-       0x19, 0x1c, 0xdc, 0x88, 0x4c, 0xac, 0xd0, 0x02, 
-       0x40, 0x2c, 0x10, 0x02, 0x0c, 0x80, 0x10, 0x63, 
-       0xea, 0x70, 0x15, 0x63, 0xf9, 0xec, 0xf1, 0x18, 
-       0x00, 0xef, 0xdc, 0x00, 0x7c, 0x30, 0x00, 0x24, 
-       0xd0, 0x30, 0x70, 0x00, 0x10, 0x21, 0xf9, 0xf6, 
-       0xbc, 0x3b, 0xe1, 0xfd, 0x10, 0x22, 0xf9, 0xfa, 
-       0xbc, 0x38, 0xe1, 0xfd, 0x10, 0x23, 0xf9, 0xfd, 
-       0xbc, 0x3c, 0x1e, 0xe0, 0xea, 0x03, 0x15, 0x63, 
-       0xfa, 0x02, 0xbe, 0xfc, 0xdc, 0x12, 0x0e, 0xde, 
-       0xfa, 0x09, 0xc0, 0x24, 0x30, 0x30, 0xf6, 0x09, 
-       0x2c, 0x00, 0xd0, 0x2c, 0x6c, 0x00, 0x1e, 0xe0, 
-       0xea, 0x0f, 0xcc, 0x24, 0x1c, 0x1f, 0xd9, 0x40, 
-       0x06, 0x50, 0xea, 0x22, 0xc0, 0x24, 0xb0, 0x12, 
-       0xfe, 0x22, 0xd9, 0x74, 0x79, 0x65, 0x19, 0x5f, 
-       0x30, 0x25, 0xee, 0x1b, 0x29, 0x40, 0x19, 0x5f, 
-       0x19, 0x41, 0xc0, 0x25, 0x20, 0x30, 0x30, 0x24, 
-       0xe6, 0x22, 0x3c, 0x00, 0xd0, 0x38, 0x69, 0x40, 
-       0x1c, 0x05, 0xbc, 0x38, 0x3c, 0x32, 0x5c, 0x3b, 
-       0xbc, 0x3f, 0xd8, 0xec, 0x78, 0xe3, 0xc0, 0xa3, 
-       0x10, 0xb2, 0xf6, 0x2f, 0xd0, 0x92, 0x02, 0xe4, 
-       0xd8, 0x00, 0xd0, 0xc0, 0x20, 0xe0, 0xb0, 0x81, 
-       0xee, 0x32, 0xd0, 0x30, 0x60, 0xc0, 0x00, 0xac, 
-       0xd0, 0x20, 0xc0, 0xc0, 0xd8, 0x40, 0xc1, 0x23, 
-       0xd4, 0x64, 0x34, 0x63, 0xdc, 0x40, 0x0c, 0x1f, 
-       0xfa, 0x5b, 0xc0, 0x65, 0xb0, 0x41, 0xe6, 0x47, 
-       0x68, 0x40, 0xb0, 0x3c, 0xe2, 0x42, 0xc0, 0xc0, 
-       0x34, 0x65, 0xdc, 0x48, 0x4c, 0x70, 0x1c, 0x5f, 
-       0x20, 0xf1, 0x15, 0x63, 0xfa, 0x5c, 0xf2, 0x54, 
-       0xc1, 0x11, 0xc0, 0x83, 0xf2, 0xa5, 0xe2, 0x6f, 
-       0xb1, 0x01, 0xe6, 0x5a, 0x68, 0x40, 0x28, 0x60, 
-       0xb0, 0x3c, 0xe2, 0x54, 0x0f, 0xc5, 0xd9, 0x40, 
-       0xb1, 0x12, 0x11, 0x01, 0x21, 0x25, 0xf2, 0x54, 
-       0xc1, 0x11, 0xb1, 0x01, 0xe6, 0x6f, 0x20, 0x31, 
-       0x68, 0x40, 0x30, 0x31, 0xb0, 0x3c, 0x28, 0x60, 
-       0x70, 0x43, 0x30, 0x31, 0x60, 0x40, 0x20, 0x31, 
-       0xb0, 0x3c, 0xb0, 0xf8, 0xe2, 0x61, 0xe2, 0xf7, 
-       0xd8, 0xec, 0x78, 0xe3, 0x00, 0xa8, 0xd0, 0x80, 
-       0x00, 0xa8, 0xd1, 0x44, 0x00, 0xac, 0xd0, 0x20, 
-       0xc0, 0xc0, 0x0c, 0x1f, 0xfa, 0xb3, 0xd9, 0x78, 
-       0x79, 0x65, 0x39, 0x25, 0x19, 0x5f, 0xc9, 0xa5, 
-       0x19, 0x83, 0x20, 0x26, 0x20, 0xe6, 0x20, 0xa6, 
-       0x21, 0x66, 0xc1, 0x23, 0xc0, 0x64, 0x10, 0x5f, 
-       0x10, 0x9d, 0x20, 0x81, 0x31, 0x01, 0x30, 0x44, 
-       0xf6, 0x8e, 0x21, 0x01, 0x30, 0x84, 0x10, 0x83, 
-       0xc4, 0x64, 0x34, 0x63, 0xdc, 0x48, 0x4c, 0x70, 
-       0x1c, 0x5f, 0x15, 0x63, 0xfa, 0xc3, 0x20, 0xb1, 
-       0xf2, 0xa5, 0xc1, 0x24, 0x11, 0x1f, 0xc0, 0x85, 
-       0x30, 0xb1, 0xf2, 0xa5, 0xc1, 0x11, 0xc0, 0x83, 
-       0x0c, 0x9d, 0xfa, 0xa3, 0xb0, 0xbc, 0xf2, 0xa5, 
-       0xe2, 0xec, 0xb1, 0x01, 0xe6, 0x5a, 0x70, 0x42, 
-       0xb0, 0xb8, 0x60, 0x40, 0xb0, 0x3c, 0xe2, 0xa5, 
-       0xb1, 0x01, 0xe6, 0x5a, 0x70, 0x42, 0xb0, 0xb8, 
-       0x60, 0x40, 0xb0, 0x38, 0xe2, 0xac, 0x00, 0xac, 
-       0xd0, 0x24, 0xc1, 0x23, 0xb1, 0x12, 0xf2, 0xac, 
-       0xd1, 0x24, 0x31, 0x23, 0x00, 0xa8, 0xd0, 0x84, 
-       0xf2, 0xac, 0xd1, 0x12, 0x00, 0xa8, 0xd0, 0x84, 
-       0xc0, 0x03, 0xf2, 0xac, 0xe2, 0xec, 0xd8, 0x82, 
-       0x48, 0x95, 0x18, 0x81, 0xb1, 0x01, 0xe6, 0xd9, 
-       0x20, 0xb1, 0x70, 0x42, 0x30, 0xb1, 0x20, 0x22, 
-       0x60, 0x40, 0x30, 0x22, 0xb0, 0xbc, 0xb0, 0x3c, 
-       0x30, 0xb1, 0x70, 0x42, 0x20, 0xb1, 0x30, 0x22, 
-       0x60, 0x40, 0x20, 0x22, 0xb0, 0xbc, 0xb0, 0x3c, 
-       0xe2, 0xc6, 0xc1, 0x11, 0xc0, 0x85, 0x30, 0xb1, 
-       0x20, 0xe2, 0xb1, 0x01, 0xe6, 0xec, 0x70, 0x42, 
-       0xb0, 0xb8, 0x20, 0x22, 0x60, 0x40, 0x30, 0x22, 
-       0xb0, 0x3c, 0x70, 0x43, 0xb0, 0xf8, 0x30, 0x22, 
-       0x60, 0x40, 0x20, 0x22, 0xb0, 0x3c, 0xe2, 0xdd, 
-       0xd0, 0x08, 0x5c, 0x00, 0x3c, 0x32, 0xd0, 0x04, 
-       0x40, 0x30, 0x3c, 0x00, 0x15, 0x63, 0xfa, 0xf7, 
-       0x1e, 0xe0, 0xea, 0xf7, 0xbc, 0x3c, 0x00, 0xac, 
-       0xd0, 0xa0, 0x00, 0xa8, 0xd0, 0x00, 0x00, 0x20, 
-       0xd1, 0x24, 0x70, 0x42, 0xb0, 0xbc, 0x60, 0x40, 
-       0xb0, 0x3c, 0xb1, 0x01, 0xee, 0xfd, 0xd0, 0x30, 
-       0x30, 0x30, 0xef, 0x03, 0xd0, 0x04, 0x63, 0x00, 
-       0x08, 0x20, 0xd0, 0x40, 0x3f, 0x01, 0x02, 0xba, 
-       0xde, 0x3c, 0xe0, 0x46, 0x50, 0x00, 0x50, 0x00, 
-       0x01, 0x46, 0xd0, 0x08, 0x94, 0x89, 0xd0, 0x8c, 
-       0x44, 0x82, 0x14, 0x9e, 0x30, 0x12, 0xd0, 0x88, 
-       0x10, 0x80, 0x00, 0xe8, 0xd1, 0x80, 0x70, 0xc6, 
-       0x00, 0x06, 0xa0, 0xbd, 0xa0, 0xfc, 0x80, 0x3f, 
-       0xb1, 0xbe, 0x60, 0xc6, 0x00, 0x06, 0x80, 0xa9, 
-       0x80, 0x3f, 0x80, 0x2a, 0x80, 0x3f, 0x00, 0x21, 
-       0xd0, 0x3c, 0x00, 0x0a, 0xb1, 0x82, 0xd0, 0x6b, 
-       0x70, 0x46, 0x00, 0x06, 0x80, 0x07, 0x01, 0x20, 
-       0xd0, 0x67, 0xa0, 0x69, 0x80, 0x2a, 0x82, 0x29, 
-       0x80, 0x6a, 0x84, 0x29, 0xd0, 0x54, 0x10, 0x4f, 
-       0xa0, 0x6a, 0x01, 0x20, 0xd0, 0x00, 0xa0, 0x29, 
-       0x80, 0x2b, 0x0c, 0x20, 0xd0, 0x00, 0x10, 0x08, 
-       0xa0, 0x27, 0x90, 0x09, 0xd0, 0x41, 0x40, 0x01, 
-       0xd0, 0x44, 0x40, 0x70, 0x20, 0x01, 0xa0, 0x27, 
-       0x80, 0x3f, 0x00, 0xc6, 0x15, 0x63, 0xe9, 0xae, 
-       0x05, 0x5e, 0xe9, 0xbe, 0x00, 0xe0, 0xd0, 0x40, 
-       0x70, 0x81, 0x10, 0x9c, 0xb0, 0x96, 0xf9, 0xb7, 
-       0x00, 0x21, 0xd0, 0x40, 0xe1, 0xbb, 0xb0, 0x96, 
-       0xf9, 0xbe, 0x00, 0x22, 0xd0, 0x40, 0x27, 0xc1, 
-       0x27, 0x41, 0x27, 0x81, 0x90, 0x83, 0x00, 0x64, 
-       0xd0, 0x10, 0x60, 0x80, 0x01, 0x46, 0x82, 0x34, 
-       0x80, 0x3f, 0x00, 0x64, 0xd0, 0x14, 0x67, 0x40, 
-       0x80, 0x34, 0x80, 0x3f, 0x00, 0xc6, 0x90, 0xae, 
-       0x00, 0x64, 0xd0, 0x18, 0x60, 0x80, 0x90, 0xa6, 
-       0x00, 0x64, 0xd0, 0x1c, 0x60, 0x80, 0x15, 0x63, 
-       0xe9, 0xe3, 0x0c, 0x1f, 0xe9, 0xe3, 0x05, 0x50, 
-       0xf9, 0xe3, 0x15, 0xa3, 0xf9, 0xe3, 0x90, 0x4d, 
-       0x10, 0x60, 0xe5, 0xdb, 0x00, 0x06, 0x05, 0x0d, 
-       0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0x15, 0xa3, 
-       0xf9, 0xfb, 0x00, 0x21, 0xd0, 0x04, 0x70, 0x00, 
-       0x10, 0x21, 0xe9, 0xfb, 0xd0, 0x38, 0x70, 0x00, 
-       0x15, 0x63, 0xe9, 0xef, 0x10, 0x1f, 0x15, 0x21, 
-       0xe5, 0xe0, 0xd0, 0x64, 0x30, 0x54, 0xe5, 0xe0, 
-       0xc0, 0x40, 0xb0, 0x7f, 0x30, 0x54, 0xe9, 0xfb, 
-       0x0c, 0x09, 0x05, 0x0d, 0xe1, 0xef, 0xc0, 0x5f, 
-       0x10, 0x58, 0x10, 0x48, 0x00, 0xee, 0xd0, 0x8c, 
-       0xd0, 0xc3, 0x70, 0x02, 0x30, 0x01, 0xea, 0x10, 
-       0xb0, 0xbc, 0xb0, 0xc1, 0xee, 0x01, 0x00, 0x26, 
-       0xd0, 0x20, 0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 
-       0x15, 0xa3, 0xea, 0x0f, 0xb0, 0x88, 0x77, 0xc2, 
-       0x80, 0x07, 0x09, 0x49, 0xd4, 0x00, 0xd4, 0x40, 
-       0xd4, 0x80, 0xd4, 0xc0, 0x00, 0x4d, 0xa0, 0x6c, 
-       0xd3, 0x80, 0xd0, 0xa1, 0x00, 0x88, 0xd0, 0xa9, 
-       0x00, 0x4d, 0x00, 0x50, 0xfa, 0x1a, 0x0c, 0x49, 
-       0x00, 0x8d, 0xc0, 0x42, 0x10, 0x60, 0xea, 0x2a, 
-       0xb0, 0x5e, 0xb0, 0x43, 0xfe, 0x34, 0xd0, 0x61, 
-       0x23, 0x81, 0xe2, 0x1f, 0x0c, 0x09, 0x05, 0x0d, 
-       0x15, 0x20, 0xfe, 0x31, 0xd0, 0x65, 0x30, 0x54, 
-       0xee, 0x10, 0x03, 0xb4, 0xd6, 0x29, 0xe0, 0x46, 
-       0xc6, 0xd4, 0xb6, 0xc1, 0xe6, 0x31, 0xd0, 0x64, 
-       0x30, 0x5b, 0xfe, 0x31, 0xd7, 0x00, 0xb7, 0x01, 
-       0xd3, 0x81, 0x00, 0x27, 0xd0, 0x10, 0xd0, 0x81, 
-       0x60, 0x80, 0x15, 0x63, 0xfa, 0x54, 0x00, 0x22, 
-       0xdc, 0xd8, 0x03, 0xf8, 0xd0, 0x10, 0xf0, 0x4a, 
-       0x15, 0xa3, 0xfa, 0x51, 0x02, 0xf7, 0xdc, 0x26, 
-       0x0c, 0x10, 0xf8, 0x46, 0x02, 0xfc, 0xd8, 0x22, 
-       0xe0, 0x46, 0x02, 0xf2, 0xd6, 0x2b, 0xe0, 0x46, 
-       0x00, 0x22, 0xdc, 0xd8, 0x03, 0xfa, 0xd0, 0x10, 
-       0xf0, 0x4a, 0x03, 0x35, 0xda, 0x20, 0x15, 0xa3, 
-       0xe8, 0x46, 0x03, 0x30, 0xdc, 0x27, 0xe0, 0x46, 
-       0x03, 0x76, 0xd0, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0xe1, 0xe0, 0xe1, 0xec, 0xe2, 0x12, 
-       0xe2, 0x14, 0xe1, 0xc7, 0xe1, 0x30, 0x30, 0x5a, 
-       0xe5, 0x8d, 0x06, 0x50, 0xe9, 0x83, 0xc0, 0x54, 
-       0x30, 0x5b, 0xb0, 0x42, 0xf8, 0x11, 0x37, 0x1a, 
-       0xb6, 0xff, 0xd0, 0x64, 0x30, 0x5b, 0xfc, 0x11, 
-       0xc0, 0x39, 0x30, 0x31, 0x10, 0x12, 0x10, 0x20, 
-       0xe9, 0x88, 0x03, 0x10, 0xe9, 0x93, 0x0f, 0x19, 
-       0xf9, 0x8f, 0xd1, 0x44, 0xe1, 0x79, 0x03, 0xde, 
-       0xf9, 0xba, 0x03, 0xdf, 0xe9, 0x99, 0xd3, 0x40, 
-       0xca, 0x50, 0xd1, 0x42, 0xe2, 0xea, 0xc0, 0x50, 
-       0x10, 0x54, 0xc0, 0x90, 0x10, 0x8c, 0x10, 0x92, 
-       0x10, 0xe0, 0xe5, 0xa8, 0xc0, 0x01, 0x10, 0x01, 
-       0x20, 0x40, 0xc0, 0x02, 0x10, 0x01, 0x20, 0x80, 
-       0x10, 0x60, 0xfd, 0xab, 0xb0, 0x7f, 0x10, 0xa0, 
-       0xfd, 0xae, 0xb0, 0xbf, 0x10, 0x5f, 0x10, 0x9f, 
-       0x00, 0xef, 0xd0, 0x3e, 0x20, 0x52, 0x20, 0x83, 
-       0x20, 0x93, 0x10, 0x4c, 0x10, 0x82, 0x40, 0x80, 
-       0x50, 0x42, 0x0f, 0xc5, 0xcb, 0xaa, 0xcb, 0xeb, 
-       0xca, 0x50, 0xd0, 0xc0, 0xb0, 0xc1, 0xf1, 0x9b, 
-       0xcb, 0x01, 0xd0, 0xc1, 0xf1, 0x9b, 0xcb, 0x41, 
-       0xba, 0x7f, 0xbb, 0x3f, 0xe2, 0xea, 0xcc, 0x5b, 
-       0x1c, 0x42, 0x2c, 0x5b, 0xc0, 0x31, 0x1c, 0x43, 
-       0x2c, 0x40, 0x1c, 0x48, 0xcc, 0xb1, 0x1c, 0x9f, 
-       0x06, 0xd0, 0xe9, 0xd5, 0x01, 0x69, 0xd0, 0x20, 
-       0x3c, 0x80, 0xc0, 0x1c, 0x10, 0x08, 0x20, 0x1f, 
-       0x2c, 0x40, 0x2c, 0x80, 0x01, 0xb5, 0xd4, 0x00, 
-       0x2c, 0x80, 0xde, 0x84, 0xde, 0xc4, 0xe3, 0x1e, 
-       0xd3, 0xc2, 0xf2, 0xd3, 0x13, 0xa0, 0xed, 0xe5, 
-       0xf2, 0x32, 0xb3, 0x81, 0xe9, 0xec, 0x80, 0x07, 
-       0xd4, 0x00, 0xc4, 0x50, 0xd3, 0x08, 0xe2, 0x95, 
-       0xd0, 0x71, 0x20, 0x56, 0x00, 0x48, 0xd1, 0x8c, 
-       0x03, 0x0d, 0x41, 0x8c, 0xe9, 0xfa, 0x06, 0x5e, 
-       0xfa, 0x03, 0x08, 0x89, 0x03, 0xcd, 0x13, 0xe3, 
-       0xf9, 0xfa, 0xd3, 0xc4, 0x06, 0x5e, 0xfa, 0x03, 
-       0xd0, 0x43, 0x40, 0x4c, 0xea, 0x03, 0x08, 0x49, 
-       0x00, 0x8d, 0x10, 0x87, 0x53, 0x02, 0x01, 0x46, 
-       0x90, 0x2c, 0x00, 0xc6, 0x03, 0x1c, 0xea, 0x0a, 
-       0x09, 0x49, 0x00, 0x0d, 0xd0, 0x9f, 0x40, 0x02, 
-       0xb0, 0x20, 0x03, 0x19, 0xea, 0x10, 0xb0, 0x20, 
-       0xa0, 0x2c, 0xe2, 0x5b, 0x06, 0x5f, 0xfa, 0x80, 
-       0xd4, 0x00, 0xc4, 0x50, 0xc4, 0x90, 0xc4, 0xd0, 
-       0xe2, 0x8d, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
-       0x03, 0x76, 0xd0, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0xe1, 0xd3, 0xe1, 0xdc, 0xe2, 0x00, 
-       0xe2, 0x02, 0xe1, 0xac, 0xe1, 0x30, 0x30, 0x5a, 
-       0xe5, 0x91, 0x06, 0x50, 0xe9, 0x83, 0xc0, 0x54, 
-       0x30, 0x5b, 0xb0, 0x42, 0xf8, 0x11, 0x37, 0x1a, 
-       0xb6, 0xff, 0xd0, 0x64, 0x30, 0x5b, 0xfc, 0x11, 
-       0xbc, 0x10, 0xd0, 0x10, 0x0c, 0x1e, 0xf9, 0x8e, 
-       0xbc, 0x10, 0xd0, 0x30, 0xc0, 0x40, 0x30, 0x70, 
-       0xed, 0x8e, 0x03, 0x10, 0xe9, 0x97, 0x0f, 0x19, 
-       0xf9, 0x93, 0xd1, 0x44, 0xe1, 0x79, 0x03, 0xdf, 
-       0xe9, 0xa1, 0xd3, 0x40, 0xca, 0x50, 0xcb, 0x52, 
-       0x03, 0x1d, 0xf9, 0xa8, 0xca, 0x12, 0xca, 0x52, 
-       0xe1, 0xa5, 0x03, 0x1d, 0xf9, 0xa8, 0xca, 0x12, 
-       0xca, 0x53, 0xca, 0xae, 0xca, 0xef, 0xb1, 0x7e, 
-       0x03, 0x1e, 0xfa, 0xea, 0xb1, 0x7e, 0xe2, 0xea, 
-       0x00, 0x24, 0xd0, 0x00, 0x2c, 0x40, 0x2c, 0x80, 
-       0x17, 0x20, 0xf9, 0xd2, 0x00, 0xa8, 0xd0, 0x00, 
-       0xcc, 0x5b, 0x1c, 0x5f, 0x1c, 0x43, 0x20, 0x31, 
-       0x7c, 0x40, 0xb0, 0x3c, 0x7e, 0x80, 0xcc, 0xb1, 
-       0xce, 0xfa, 0x1c, 0x9f, 0x1e, 0xdf, 0x01, 0x69, 
-       0xd0, 0x3c, 0x0c, 0x99, 0xe9, 0xc4, 0x3c, 0x80, 
-       0x0e, 0xd9, 0xe9, 0xc7, 0x3e, 0xc0, 0x3e, 0xf2, 
-       0x3e, 0xb1, 0xd0, 0x01, 0x40, 0x1b, 0x10, 0x05, 
-       0x20, 0x1f, 0x2c, 0x40, 0x2c, 0x80, 0xd0, 0x30, 
-       0x70, 0x00, 0x2c, 0x80, 0xe3, 0x1e, 0xd3, 0xc2, 
-       0xf2, 0xd3, 0x13, 0xa0, 0xed, 0xd8, 0xf2, 0x32, 
-       0xb3, 0x81, 0xe9, 0xdc, 0x80, 0x07, 0xe2, 0x95, 
-       0x0d, 0x09, 0xd1, 0x8c, 0x03, 0x0d, 0x41, 0x8c, 
-       0xe9, 0xe8, 0x06, 0x5e, 0xf9, 0xf1, 0x08, 0x89, 
-       0x03, 0xcd, 0x13, 0xe3, 0xf9, 0xe8, 0xd3, 0xc4, 
-       0x06, 0x5e, 0xf9, 0xf1, 0xd0, 0x43, 0x40, 0x4c, 
-       0xe9, 0xf1, 0x08, 0x49, 0x00, 0x8d, 0x10, 0x87, 
-       0x53, 0x02, 0x01, 0x46, 0x90, 0x2c, 0x00, 0xc6, 
-       0x03, 0x1c, 0xe9, 0xf8, 0x09, 0x49, 0x00, 0x0d, 
-       0xd0, 0x9f, 0x40, 0x02, 0xb0, 0x20, 0x03, 0x19, 
-       0xe9, 0xfe, 0xb0, 0x20, 0xa0, 0x2c, 0xe2, 0x5b, 
-       0x06, 0x5f, 0xfa, 0x80, 0xd4, 0x00, 0xc4, 0x50, 
-       0xc4, 0x90, 0xc4, 0xd0, 0xe2, 0x8d, 0x50, 0x00, 
-       0x03, 0x76, 0xd0, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0xe1, 0xc1, 0xe1, 0xca, 0xe1, 0xee, 
-       0xe1, 0xf0, 0xe1, 0xa8, 0xe1, 0x30, 0x30, 0x5a, 
-       0xe5, 0x8d, 0x06, 0x50, 0xe9, 0x83, 0xc0, 0x54, 
-       0x30, 0x5b, 0xb0, 0x42, 0xf8, 0x11, 0x37, 0x1a, 
-       0xb6, 0xff, 0xd0, 0x64, 0x30, 0x5b, 0xfc, 0x11, 
-       0xc0, 0x39, 0x30, 0x31, 0x10, 0x12, 0x10, 0x20, 
-       0xe9, 0x88, 0x03, 0x10, 0xe9, 0x93, 0x0f, 0x19, 
-       0xf9, 0x8f, 0xd1, 0x44, 0xe1, 0x79, 0x03, 0xdf, 
-       0xe9, 0x9d, 0xd3, 0x40, 0xca, 0x50, 0xcb, 0x52, 
-       0x03, 0x1d, 0xf9, 0xa4, 0xca, 0x12, 0xca, 0x52, 
-       0xe1, 0xa1, 0x03, 0x1d, 0xf9, 0xa4, 0xca, 0x12, 
-       0xca, 0x53, 0xca, 0xae, 0xca, 0xef, 0xb1, 0x7e, 
-       0x03, 0x1e, 0xfa, 0xea, 0xb1, 0x7e, 0xe2, 0xea, 
-       0xcc, 0x5b, 0x1c, 0x42, 0x2c, 0x5b, 0xc0, 0x31, 
-       0x1c, 0x43, 0x2c, 0x40, 0x1c, 0x48, 0xcc, 0xb1, 
-       0x1c, 0x9f, 0x06, 0xd0, 0xe9, 0xb6, 0x01, 0x69, 
-       0xd0, 0x20, 0x3c, 0x80, 0xc0, 0x1c, 0x10, 0x08, 
-       0x20, 0x1f, 0x2c, 0x40, 0x2c, 0x80, 0xd0, 0x30, 
-       0x70, 0x00, 0x2c, 0x80, 0xde, 0x84, 0xde, 0xc4, 
-       0xe3, 0x1e, 0xd3, 0xc2, 0xf2, 0xd3, 0x13, 0xa0, 
-       0xed, 0xc6, 0xf2, 0x32, 0xb3, 0x81, 0xe9, 0xca, 
-       0x80, 0x07, 0xe2, 0x95, 0x0d, 0x09, 0xd1, 0x8c, 
-       0x03, 0x0d, 0x41, 0x8c, 0xe9, 0xd6, 0x06, 0x5e, 
-       0xf9, 0xdf, 0x08, 0x89, 0x03, 0xcd, 0x13, 0xe3, 
-       0xf9, 0xd6, 0xd3, 0xc4, 0x06, 0x5e, 0xf9, 0xdf, 
-       0xd0, 0x43, 0x40, 0x4c, 0xe9, 0xdf, 0x08, 0x49, 
-       0x00, 0x8d, 0x10, 0x87, 0x53, 0x02, 0x01, 0x46, 
-       0x90, 0x2c, 0x00, 0xc6, 0x03, 0x1c, 0xe9, 0xe6, 
-       0x09, 0x49, 0x00, 0x0d, 0xd0, 0x9f, 0x40, 0x02, 
-       0xb0, 0x20, 0x03, 0x19, 0xe9, 0xec, 0xb0, 0x20, 
-       0xa0, 0x2c, 0xe2, 0x5b, 0x06, 0x5f, 0xfa, 0x80, 
-       0xd4, 0x00, 0xc4, 0x50, 0xc4, 0x90, 0xc4, 0xd0, 
-       0xe2, 0x8d, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
-       0x03, 0x76, 0xd0, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0xe1, 0xdb, 0xe1, 0xe9, 0xe2, 0x00, 
-       0xe2, 0x02, 0xe1, 0xc3, 0xe1, 0x65, 0x30, 0x5a, 
-       0xe5, 0x8d, 0x06, 0x50, 0xe9, 0x83, 0xc0, 0x54, 
-       0x30, 0x5b, 0xb0, 0x42, 0xf8, 0x11, 0x37, 0x1a, 
-       0xb6, 0xff, 0xd0, 0x52, 0x30, 0x5b, 0xfc, 0x11, 
-       0xc0, 0x39, 0x30, 0x31, 0x10, 0x11, 0x10, 0x20, 
-       0xe9, 0x88, 0x03, 0x10, 0xe9, 0x93, 0x0f, 0x19, 
-       0xf9, 0x8f, 0xd1, 0x44, 0xe1, 0x79, 0x03, 0xd0, 
-       0xf9, 0x98, 0xca, 0x50, 0x03, 0xde, 0xf9, 0x9a, 
-       0xd1, 0x42, 0xe2, 0xea, 0xcb, 0xaa, 0xcb, 0xeb, 
-       0xc0, 0x50, 0x10, 0x54, 0xc0, 0x90, 0x10, 0x8c, 
-       0x10, 0x92, 0xd0, 0xc1, 0x05, 0x50, 0xe9, 0xa5, 
-       0xb0, 0xc2, 0x10, 0x60, 0xfd, 0xa8, 0xb0, 0x7f, 
-       0x10, 0xa0, 0xfd, 0xab, 0xb0, 0xbf, 0x10, 0x5f, 
-       0x10, 0x9f, 0x00, 0xef, 0xd0, 0x3e, 0x20, 0x52, 
-       0x20, 0x83, 0x20, 0x93, 0x10, 0x4c, 0x10, 0x82, 
-       0x40, 0x80, 0x50, 0x42, 0xd0, 0x81, 0x14, 0x1f, 
-       0x14, 0x01, 0x05, 0x50, 0xe9, 0xbd, 0x50, 0x42, 
-       0xe1, 0xbe, 0x54, 0x02, 0xca, 0x10, 0xca, 0x50, 
-       0xcb, 0x01, 0xcb, 0x41, 0xe2, 0xea, 0xcc, 0x5b, 
-       0x1c, 0x42, 0x2c, 0x5b, 0xc0, 0x31, 0x1c, 0x43, 
-       0x2c, 0x40, 0x1c, 0x49, 0xcc, 0xb1, 0x1c, 0x9f, 
-       0xc0, 0x1c, 0x10, 0x08, 0x20, 0x1f, 0x05, 0x50, 
-       0xf9, 0xd2, 0xb0, 0x3c, 0x2c, 0x40, 0x2c, 0x80, 
-       0x01, 0xb5, 0xd4, 0x00, 0x2c, 0x80, 0x02, 0xe4, 
-       0xde, 0x80, 0xde, 0xc1, 0xe3, 0x1e, 0xd3, 0xc0, 
-       0xf2, 0xd3, 0x13, 0xa0, 0xed, 0xe0, 0xf2, 0x32, 
-       0xb3, 0x81, 0xe9, 0xe9, 0x80, 0x07, 0xd4, 0x02, 
-       0x44, 0x15, 0x14, 0x1f, 0xc4, 0x50, 0xd3, 0x08, 
-       0xe2, 0x95, 0xd0, 0x71, 0x20, 0x56, 0x00, 0x48, 
-       0xd1, 0x8c, 0x03, 0x0d, 0x41, 0x8c, 0xe9, 0xf7, 
-       0x08, 0x89, 0x03, 0xcd, 0x13, 0xe3, 0xf9, 0xf6, 
-       0xd3, 0xc4, 0xe1, 0xf7, 0xb3, 0xc1, 0x01, 0x46, 
-       0x90, 0x2c, 0x00, 0xc6, 0x03, 0x1c, 0xe9, 0xfe, 
-       0x09, 0x49, 0x00, 0x0d, 0xa0, 0x2c, 0xe2, 0x5b, 
-       0x06, 0x5f, 0xfa, 0x7f, 0xd4, 0x02, 0x44, 0x15, 
-       0x14, 0x1f, 0xc4, 0x50, 0xc4, 0x90, 0xc4, 0xd0, 
-       0xe2, 0x8d, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
-       0x03, 0x76, 0xd0, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0xe1, 0xc9, 0xe1, 0xd2, 0xe1, 0xe7, 
-       0xe1, 0xe9, 0xe1, 0xab, 0xe1, 0x30, 0x30, 0x5a, 
-       0xe5, 0x91, 0x06, 0x50, 0xe9, 0x83, 0xc0, 0x54, 
-       0x30, 0x5b, 0xb0, 0x42, 0xf8, 0x11, 0x37, 0x1a, 
-       0xb6, 0xff, 0xd0, 0x52, 0x30, 0x5b, 0xfc, 0x11, 
-       0xbc, 0x10, 0xd0, 0x10, 0x0c, 0x1e, 0xf9, 0x8e, 
-       0xbc, 0x10, 0xd0, 0x20, 0xc0, 0x40, 0x30, 0x70, 
-       0xed, 0x8e, 0x03, 0x10, 0xe9, 0x97, 0x0f, 0x19, 
-       0xf9, 0x93, 0xd1, 0x44, 0xe1, 0x79, 0x03, 0xd0, 
-       0xf9, 0xa0, 0xca, 0x50, 0xcb, 0x52, 0x03, 0x1d, 
-       0xf9, 0xa7, 0xca, 0x12, 0xca, 0x52, 0xe1, 0xa4, 
-       0x03, 0x1d, 0xf9, 0xa7, 0xca, 0x12, 0xca, 0x53, 
-       0xca, 0xae, 0xca, 0xef, 0xb1, 0x7e, 0x03, 0x1e, 
-       0xfa, 0xea, 0xb1, 0x7e, 0xe2, 0xea, 0x00, 0x24, 
-       0xd0, 0x00, 0x2c, 0x40, 0x2c, 0x80, 0x17, 0x20, 
-       0xf9, 0xc8, 0x00, 0x2a, 0xd0, 0x00, 0x20, 0x1b, 
-       0x20, 0x1b, 0x05, 0x50, 0xf9, 0xb8, 0xb0, 0x3f, 
-       0x10, 0x02, 0x7c, 0x40, 0xcc, 0xb1, 0x1c, 0x9f, 
-       0x01, 0x69, 0xd0, 0x3c, 0x0c, 0x99, 0xe9, 0xc1, 
-       0x3c, 0x80, 0xde, 0xa0, 0x2c, 0x5f, 0x2c, 0x9f, 
-       0xd0, 0x30, 0x70, 0x00, 0x2c, 0x80, 0xde, 0xc1, 
-       0xe3, 0x1e, 0xd3, 0xc0, 0xf2, 0xd3, 0x13, 0xa0, 
-       0xed, 0xce, 0xf2, 0x32, 0xb3, 0x81, 0xe9, 0xd2, 
-       0x80, 0x07, 0xe2, 0x95, 0x0d, 0x09, 0xd1, 0x8c, 
-       0x03, 0x0d, 0x41, 0x8c, 0xe9, 0xde, 0x08, 0x89, 
-       0x03, 0xcd, 0x13, 0xe3, 0xf9, 0xdd, 0xd3, 0xc4, 
-       0xe1, 0xde, 0xb3, 0xc1, 0x01, 0x46, 0x90, 0x2c, 
-       0x00, 0xc6, 0x03, 0x1c, 0xe9, 0xe5, 0x09, 0x49, 
-       0x00, 0x0d, 0xa0, 0x2c, 0xe2, 0x5b, 0x06, 0x5f, 
-       0xfa, 0x7f, 0xd4, 0x00, 0xc4, 0x50, 0xc4, 0x90, 
-       0xc4, 0xd0, 0xe2, 0x8d, 0x50, 0x00, 0x50, 0x00, 
-       0x03, 0x76, 0xd0, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0xe1, 0xa3, 0xc0, 0x00, 0xc0, 0x00, 
-       0xc0, 0x00, 0xe1, 0x8a, 0xe1, 0x30, 0x30, 0x5a, 
-       0xe5, 0x87, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x64, 
-       0x30, 0x5b, 0xfd, 0xb4, 0xc0, 0x39, 0x30, 0x31, 
-       0x10, 0x12, 0x10, 0x20, 0xe9, 0x82, 0xd1, 0x42, 
-       0xd3, 0x40, 0xe2, 0xea, 0xcc, 0x5b, 0x1c, 0x42, 
-       0x2c, 0x5b, 0xc0, 0x31, 0x1c, 0x43, 0x2c, 0x40, 
-       0x1c, 0x48, 0xcc, 0xb1, 0x1c, 0x9f, 0x06, 0xd0, 
-       0xe9, 0x98, 0x01, 0x69, 0xd0, 0x20, 0x3c, 0x80, 
-       0xc0, 0x1c, 0x10, 0x08, 0x20, 0x1f, 0x2c, 0x40, 
-       0x2c, 0x80, 0x01, 0xb5, 0xd4, 0x00, 0x2c, 0x80, 
-       0xde, 0x84, 0xde, 0xc4, 0xe3, 0x1e, 0xf2, 0xd3, 
-       0xc0, 0x5c, 0xb0, 0x7f, 0x30, 0x5a, 0xe5, 0xc8, 
-       0x00, 0x26, 0xd0, 0x00, 0x70, 0x00, 0x10, 0x20, 
-       0xe9, 0xbf, 0x00, 0xe0, 0xd0, 0x44, 0x70, 0x41, 
-       0x10, 0x5c, 0x30, 0x5b, 0xb0, 0x41, 0xed, 0xc8, 
-       0x0f, 0x17, 0xf9, 0xb4, 0x0f, 0x49, 0xf2, 0xd3, 
-       0x0f, 0x19, 0xf9, 0xb8, 0xdf, 0x00, 0x00, 0x06, 
-       0x03, 0xb4, 0xd6, 0x29, 0xe0, 0x46, 0xc0, 0x5b, 
-       0x30, 0x54, 0xb0, 0x7e, 0xe5, 0xc8, 0x0f, 0x17, 
-       0xf9, 0xc3, 0x02, 0xf2, 0xd6, 0x2b, 0xe0, 0x46, 
-       0xd3, 0x08, 0xd3, 0xc0, 0xe2, 0x95, 0x50, 0x00, 
-       0x03, 0x76, 0xd0, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0xe1, 0xb5, 0xc0, 0x00, 0xc0, 0x00, 
-       0xc0, 0x00, 0xe1, 0x8e, 0xe1, 0x30, 0x30, 0x5a, 
-       0xe5, 0x8b, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x64, 
-       0x30, 0x5b, 0xfd, 0xc6, 0xbc, 0x10, 0xd0, 0x10, 
-       0x0c, 0x1e, 0xf9, 0x88, 0xbc, 0x10, 0xd0, 0x30, 
-       0xc0, 0x40, 0x30, 0x70, 0xed, 0x88, 0xd1, 0x42, 
-       0xd3, 0x40, 0xe2, 0xea, 0x00, 0x24, 0xd0, 0x00, 
-       0x2c, 0x40, 0x2c, 0x80, 0x17, 0x20, 0xf9, 0xb4, 
-       0x00, 0xa8, 0xd0, 0x00, 0xcc, 0x5b, 0x1c, 0x5f, 
-       0x1c, 0x43, 0x20, 0x31, 0x7c, 0x40, 0xb0, 0x3c, 
-       0x7e, 0x80, 0xcc, 0xb1, 0xce, 0xfa, 0x1c, 0x9f, 
-       0x1e, 0xdf, 0x01, 0x69, 0xd0, 0x3c, 0x0c, 0x99, 
-       0xe9, 0xa6, 0x3c, 0x80, 0x0e, 0xd9, 0xe9, 0xa9, 
-       0x3e, 0xc0, 0x3e, 0xf2, 0x3e, 0xb1, 0xd0, 0x01, 
-       0x40, 0x1b, 0x10, 0x05, 0x20, 0x1f, 0x2c, 0x40, 
-       0x2c, 0x80, 0xd0, 0x30, 0x70, 0x00, 0x2c, 0x80, 
-       0xe3, 0x1e, 0xf2, 0xd3, 0xc0, 0x5c, 0xb0, 0x7f, 
-       0x30, 0x5a, 0xe5, 0xda, 0x00, 0x26, 0xd0, 0x00, 
-       0x70, 0x00, 0x10, 0x20, 0xe9, 0xd1, 0x00, 0xe0, 
-       0xd0, 0x44, 0x70, 0x41, 0x10, 0x5c, 0x30, 0x5b, 
-       0xb0, 0x41, 0xed, 0xda, 0x0f, 0x17, 0xf9, 0xc6, 
-       0x0f, 0x49, 0xf2, 0xd3, 0x0f, 0x19, 0xf9, 0xca, 
-       0xdf, 0x00, 0x00, 0x06, 0x03, 0xb4, 0xd6, 0x29, 
-       0xe0, 0x46, 0xc0, 0x5b, 0x30, 0x54, 0xb0, 0x7e, 
-       0xe5, 0xda, 0x0f, 0x17, 0xf9, 0xd5, 0x02, 0xf7, 
-       0xdc, 0x26, 0xe0, 0x46, 0xd3, 0x08, 0xd3, 0xc0, 
-       0xe2, 0x95, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
-       0x03, 0x76, 0xd0, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0xe1, 0xa2, 0xc0, 0x00, 0xc0, 0x00, 
-       0xc0, 0x00, 0xe1, 0x8a, 0xe1, 0x65, 0x30, 0x5a, 
-       0xe5, 0x87, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x52, 
-       0x30, 0x5b, 0xfd, 0xb3, 0xc0, 0x39, 0x30, 0x31, 
-       0x10, 0x11, 0x10, 0x20, 0xe9, 0x82, 0xd1, 0x42, 
-       0xd3, 0x41, 0xe2, 0xea, 0xcc, 0x5b, 0x1c, 0x42, 
-       0x2c, 0x5b, 0xc0, 0x31, 0x1c, 0x43, 0x2c, 0x40, 
-       0x1c, 0x49, 0xcc, 0xb1, 0x1c, 0x9f, 0xc0, 0x1c, 
-       0x10, 0x08, 0x20, 0x1f, 0x05, 0x50, 0xf9, 0x99, 
-       0xb0, 0x3c, 0x2c, 0x40, 0x2c, 0x80, 0x01, 0xb5, 
-       0xd4, 0x00, 0x2c, 0x80, 0x02, 0xe4, 0xde, 0x80, 
-       0xde, 0xc1, 0xe3, 0x1e, 0xf2, 0xd3, 0xc0, 0x5c, 
-       0xb0, 0x7f, 0x30, 0x5a, 0xe5, 0xc7, 0x00, 0x26, 
-       0xd0, 0x00, 0x70, 0x00, 0x10, 0x20, 0xe9, 0xbe, 
-       0x00, 0xe0, 0xd0, 0x44, 0x70, 0x41, 0x10, 0x5b, 
-       0x30, 0x5b, 0xb0, 0x41, 0xed, 0xc7, 0x0f, 0x17, 
-       0xf9, 0xb3, 0x0f, 0x49, 0xf2, 0xd3, 0x0f, 0x19, 
-       0xf9, 0xb7, 0xdf, 0x00, 0x00, 0x06, 0x03, 0xb4, 
-       0xd6, 0x29, 0xe0, 0x46, 0xc0, 0x5b, 0x30, 0x54, 
-       0xb0, 0x7e, 0xe5, 0xc7, 0x0f, 0x17, 0xf9, 0xc2, 
-       0x03, 0x30, 0xdc, 0x27, 0xe0, 0x46, 0xd3, 0x08, 
-       0xd3, 0xc0, 0xe2, 0x95, 0x50, 0x00, 0x50, 0x00, 
-       0x03, 0x76, 0xd0, 0x73, 0x00, 0x24, 0xdc, 0xd8, 
-       0xf0, 0x4a, 0xe1, 0xac, 0xc0, 0x00, 0xc0, 0x00, 
-       0xc0, 0x00, 0xe1, 0x8e, 0xe1, 0x30, 0x30, 0x5a, 
-       0xe5, 0x8b, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x52, 
-       0x30, 0x5b, 0xfd, 0xbd, 0xbc, 0x10, 0xd0, 0x10, 
-       0x0c, 0x1e, 0xf9, 0x88, 0xbc, 0x10, 0xd0, 0x20, 
-       0xc0, 0x40, 0x30, 0x70, 0xed, 0x88, 0xd1, 0x42, 
-       0xd3, 0x41, 0xe2, 0xea, 0x00, 0x24, 0xd0, 0x00, 
-       0x2c, 0x40, 0x2c, 0x80, 0x17, 0x20, 0xf9, 0xab, 
-       0x00, 0x2a, 0xd0, 0x00, 0x20, 0x1b, 0x20, 0x1b, 
-       0x05, 0x50, 0xf9, 0x9b, 0xb0, 0x3f, 0x10, 0x02, 
-       0x7c, 0x40, 0xcc, 0xb1, 0x1c, 0x9f, 0x01, 0x69, 
-       0xd0, 0x3c, 0x0c, 0x99, 0xe9, 0xa4, 0x3c, 0x80, 
-       0xde, 0xa0, 0x2c, 0x5f, 0x2c, 0x9f, 0xd0, 0x30, 
-       0x70, 0x00, 0x2c, 0x80, 0xde, 0xc1, 0xe3, 0x1e, 
-       0xf2, 0xd3, 0xc0, 0x5c, 0xb0, 0x7f, 0x30, 0x5a, 
-       0xe5, 0xd1, 0x00, 0x26, 0xd0, 0x00, 0x70, 0x00, 
-       0x10, 0x20, 0xe9, 0xc8, 0x00, 0xe0, 0xd0, 0x44, 
-       0x70, 0x41, 0x10, 0x5b, 0x30, 0x5b, 0xb0, 0x41, 
-       0xed, 0xd1, 0x0f, 0x17, 0xf9, 0xbd, 0x0f, 0x49, 
-       0xf2, 0xd3, 0x0f, 0x19, 0xf9, 0xc1, 0xdf, 0x00, 
-       0x00, 0x06, 0x03, 0xb4, 0xd6, 0x29, 0xe0, 0x46, 
-       0xc0, 0x5b, 0x30, 0x54, 0xb0, 0x7e, 0xe5, 0xd1, 
-       0x0f, 0x17, 0xf9, 0xcc, 0x03, 0x35, 0xda, 0x20, 
-       0xe0, 0x46, 0xd3, 0x08, 0xd3, 0xc0, 0xe2, 0x95, 
-       0xd0, 0x61, 0x23, 0x81, 0x0c, 0x49, 0xd0, 0x61, 
-       0x00, 0x8d, 0x10, 0xa0, 0xea, 0x3b, 0x30, 0x42, 
-       0xe6, 0x30, 0x23, 0x82, 0x0f, 0xc5, 0x0c, 0x09, 
-       0x05, 0x0d, 0x15, 0x20, 0xfe, 0x45, 0xd0, 0x65, 
-       0x15, 0x63, 0xea, 0x43, 0xd0, 0x53, 0x30, 0x54, 
-       0xee, 0x4a, 0x0f, 0x17, 0xfa, 0x45, 0x03, 0xb4, 
-       0xd6, 0x29, 0xe0, 0x46, 0x80, 0x07, 0x09, 0x49, 
-       0xd4, 0x00, 0xd4, 0x40, 0xd4, 0x80, 0xd4, 0xc0, 
-       0x00, 0x4d, 0xa0, 0x6c, 0xd0, 0xa1, 0x00, 0x88, 
-       0xd0, 0xa9, 0x00, 0x4d, 0x00, 0x50, 0xfa, 0x53, 
-       0xf2, 0x32, 0xd3, 0x80, 0xe1, 0x76, 0xd1, 0xc2, 
-       0x41, 0xcf, 0x11, 0xdf, 0xd0, 0x41, 0x01, 0xc1, 
-       0x00, 0xef, 0xd0, 0xbe, 0x03, 0x10, 0xf9, 0x77, 
-       0x80, 0x07, 0x21, 0x96, 0x11, 0xa2, 0xe9, 0x78, 
-       0x03, 0x1d, 0xea, 0x73, 0xc0, 0xd7, 0xc2, 0x90, 
-       0xf2, 0xa4, 0xc4, 0x0a, 0x03, 0xd0, 0xea, 0x72, 
-       0xc2, 0x91, 0xf2, 0xa4, 0xc4, 0x4a, 0x03, 0x1e, 
-       0xea, 0x8d, 0xc0, 0xd8, 0xc2, 0x92, 0xf2, 0xa4, 
-       0xc4, 0x8a, 0x03, 0xd0, 0xea, 0x7d, 0xc2, 0x93, 
-       0xf2, 0xa4, 0xc4, 0xca, 0xe2, 0x8d, 0xd3, 0xc0, 
-       0xc0, 0xd7, 0xc2, 0x90, 0xf2, 0xa4, 0xc4, 0x0a, 
-       0x03, 0xd0, 0xea, 0x88, 0xc2, 0x91, 0xf2, 0xa4, 
-       0xc4, 0x4a, 0x08, 0x49, 0x00, 0x4d, 0x10, 0x61, 
-       0xf8, 0x11, 0x03, 0x1f, 0xea, 0x93, 0x0d, 0xc9, 
-       0x00, 0x4d, 0xd0, 0x1a, 0xe2, 0x98, 0x03, 0x10, 
-       0xfa, 0x97, 0xd0, 0x1d, 0xe2, 0x98, 0xd0, 0x18, 
-       0x0f, 0x16, 0xfa, 0x98, 0xd0, 0x4c, 0x40, 0x4c, 
-       0x10, 0x6c, 0xea, 0xa2, 0x03, 0xde, 0xfa, 0xa2, 
-       0x0f, 0x12, 0xfa, 0xa0, 0x00, 0x08, 0xe2, 0xd9, 
-       0xd2, 0x00, 0x13, 0xe1, 0xee, 0xa9, 0x08, 0x49, 
-       0x02, 0x0d, 0x00, 0xc8, 0xc2, 0xca, 0x12, 0x94, 
-       0xd0, 0x1f, 0x30, 0x07, 0x12, 0xc0, 0xc2, 0x43, 
-       0x12, 0x5a, 0x00, 0x0d, 0x03, 0xde, 0xea, 0xb6, 
-       0x0e, 0xc9, 0x04, 0x8d, 0x02, 0x48, 0x22, 0x80, 
-       0x12, 0x88, 0xd0, 0x0b, 0x30, 0x03, 0x12, 0x80, 
-       0xd0, 0x19, 0x20, 0x03, 0x12, 0x80, 0x00, 0x0d, 
-       0x22, 0xc0, 0x12, 0xc8, 0xd0, 0x0b, 0x30, 0x09, 
-       0x12, 0xc0, 0x12, 0xd8, 0xd0, 0x16, 0x20, 0x09, 
-       0x20, 0x07, 0x12, 0xc0, 0x42, 0xc2, 0x22, 0x8b, 
-       0x22, 0x88, 0x03, 0xde, 0xea, 0xd2, 0x0e, 0xc9, 
-       0xc4, 0x4a, 0x04, 0xcd, 0x0f, 0xc5, 0x01, 0x46, 
-       0x90, 0x4d, 0x00, 0xc6, 0x10, 0x60, 0xe6, 0xd3, 
-       0x0f, 0xc5, 0x01, 0xb5, 0xd4, 0x00, 0xca, 0x9d, 
-       0xcb, 0x9e, 0xca, 0xea, 0xcb, 0xee, 0x2a, 0xc0, 
-       0x2b, 0xc0, 0xca, 0x10, 0xca, 0x51, 0xcb, 0x12, 
-       0xcb, 0x53, 0xd1, 0x40, 0xd3, 0x41, 0xb7, 0x3f, 
-       0xc0, 0x5c, 0xe1, 0x7b, 0xd0, 0xc0, 0xc1, 0x28, 
-       0xc2, 0x2a, 0xc2, 0xab, 0xf1, 0x7a, 0x0f, 0x17, 
-       0xfa, 0xef, 0xcc, 0xe8, 0xcd, 0x29, 0xcd, 0x6c, 
-       0xcd, 0xad, 0xc8, 0x08, 0xc8, 0x49, 0xca, 0x0a, 
-       0xca, 0x4b, 0xf3, 0x31, 0xd0, 0xc1, 0xc1, 0x34, 
-       0xc2, 0x2a, 0xc2, 0xab, 0xf1, 0x7a, 0x00, 0x28, 
-       0xd9, 0xc0, 0xc8, 0x88, 0xc8, 0xc9, 0xa9, 0xf8, 
-       0xca, 0x8a, 0xca, 0xcb, 0x11, 0x62, 0xe9, 0x79, 
-       0xd0, 0xc0, 0xc1, 0x35, 0xc2, 0x2e, 0xc2, 0xaf, 
-       0xf1, 0x7a, 0xc9, 0x08, 0xc9, 0x49, 0xa9, 0xf8, 
-       0xcb, 0x0a, 0xcb, 0x4b, 0xd0, 0xc1, 0xc1, 0x36, 
-       0xc2, 0x2e, 0xc2, 0xaf, 0xf1, 0x7a, 0xc0, 0x27, 
-       0xc9, 0x88, 0xc9, 0xc9, 0xa0, 0x38, 0xcb, 0x8a, 
-       0xcb, 0xcb, 0xe1, 0x79, 0x5f, 0x0d, 0x07, 0x7d, 
-       0xde, 0x07, 0x11, 0x5e, 0x30, 0x05, 0xcd, 0xc0, 
-       0x00, 0x28, 0xd0, 0x00, 0xa0, 0x38, 0x11, 0x61, 
-       0xf9, 0x75, 0x00, 0xe2, 0xd0, 0x00, 0x0f, 0x1d, 
-       0xeb, 0x29, 0x00, 0x2d, 0xdf, 0x4b, 0xf3, 0x3f, 
-       0xe1, 0x75, 0x04, 0xeb, 0xd0, 0x00, 0x11, 0x62, 
-       0xeb, 0x36, 0xb0, 0x20, 0x0f, 0x19, 0xfb, 0x36, 
-       0xac, 0xe0, 0x01, 0xa4, 0xde, 0x00, 0x5e, 0x0d, 
-       0x00, 0x2d, 0xdf, 0x7a, 0xdd, 0xc0, 0xd8, 0x80, 
-       0xd9, 0x00, 0xd9, 0x80, 0x5f, 0x00, 0x01, 0x46, 
-       0x00, 0x28, 0xd0, 0x01, 0x00, 0x06, 0xa0, 0x37, 
-       0x80, 0x3f, 0x00, 0xc6, 0x0f, 0xc5, 0xad, 0xda, 
-       0xc6, 0xb1, 0xd0, 0x01, 0x01, 0xa3, 0xde, 0x1d, 
-       0x40, 0x30, 0x3e, 0x00, 0x80, 0x3f, 0x0e, 0x0a, 
-       0x66, 0xda, 0xc8, 0x28, 0xc8, 0x69, 0xc8, 0xaa, 
-       0xc8, 0xeb, 0x0c, 0x1e, 0xfb, 0x68, 0x26, 0xba, 
-       0x07, 0x7d, 0xdc, 0x00, 0x1d, 0xcf, 0x1d, 0xd1, 
-       0x5d, 0xc0, 0x00, 0x2d, 0xdf, 0x64, 0x0f, 0x87, 
-       0xad, 0xda, 0x80, 0x3f, 0x0e, 0x0a, 0x66, 0xda, 
-       0xc9, 0x2c, 0xc9, 0x6d, 0xc9, 0xae, 0xc9, 0xef, 
-       0x0f, 0x2f, 0xd0, 0x37, 0x4f, 0x00, 0x0f, 0x1a, 
-       0xeb, 0xbe, 0x01, 0xa4, 0xde, 0x20, 0xd0, 0x01, 
-       0x40, 0x3c, 0x2e, 0x00, 0x00, 0x2d, 0xdf, 0x7a, 
-       0xac, 0xe0, 0x0f, 0x87, 0x0e, 0x0a, 0x76, 0xe0, 
-       0xbf, 0x79, 0xbe, 0x3c, 0x0f, 0x1b, 0xeb, 0x9e, 
-       0x0f, 0x87, 0x0e, 0x0a, 0x76, 0xe1, 0xbf, 0x79, 
-       0xbe, 0x34, 0x18, 0xa0, 0xeb, 0xb9, 0x0f, 0x87, 
-       0xad, 0x20, 0x80, 0x3f, 0x0e, 0x0a, 0x76, 0xe2, 
-       0xbf, 0x79, 0xbe, 0x3c, 0x0f, 0x87, 0x0e, 0x0a, 
-       0x76, 0xe3, 0x0f, 0x1b, 0xeb, 0xb3, 0xbf, 0x77, 
-       0xbe, 0x0c, 0x19, 0x20, 0xeb, 0xb9, 0x0f, 0x87, 
-       0xad, 0x60, 0x80, 0x3f, 0x0e, 0x0a, 0x76, 0xe4, 
-       0xbe, 0x3c, 0xbf, 0x75, 0x0f, 0x15, 0xf8, 0x1c, 
-       0x1f, 0x0a, 0x1f, 0x16, 0x0f, 0x87, 0x0e, 0x0a, 
-       0x76, 0xe5, 0xbf, 0x79, 0xbe, 0x34, 0x19, 0xa0, 
-       0xeb, 0xb9, 0x0f, 0x87, 0xad, 0xa0, 0x80, 0x3f, 
-       0x0e, 0x0a, 0x76, 0xe6, 0xbe, 0x3c, 0xbf, 0x79, 
-       0x0f, 0x87, 0x0e, 0x0a, 0x76, 0xe7, 0x0f, 0x15, 
-       0xeb, 0xbe, 0x00, 0x2f, 0xdf, 0x72, 0x1d, 0xe0, 
-       0xf8, 0x1c, 0x00, 0x28, 0xd0, 0x01, 0xa0, 0x38, 
-       0x80, 0x3f, 0x0f, 0x87, 0xd0, 0x01, 0x4d, 0xc0, 
-       0x1f, 0x0f, 0x1f, 0x11, 0x00, 0x2f, 0xdf, 0x76, 
-       0xc6, 0xb2, 0x03, 0x7d, 0xde, 0x0e, 0x01, 0xa3, 
-       0xde, 0x2d, 0x5d, 0xc0, 0x0f, 0x87, 0x1e, 0xe1, 
-       0xeb, 0xdb, 0xad, 0xda, 0x80, 0x3f, 0x0e, 0x0a, 
-       0x66, 0xda, 0x0c, 0x1e, 0xfb, 0xe4, 0x26, 0xbb, 
-       0x03, 0xff, 0xdd, 0xff, 0x4d, 0xc0, 0x00, 0xa3, 
-       0xde, 0x2d, 0xbf, 0x56, 0x0f, 0x87, 0x07, 0x7d, 
-       0xde, 0x0e, 0x5d, 0xc0, 0x00, 0xa3, 0xde, 0x1d, 
-       0xad, 0xda, 0x80, 0x3f, 0x0e, 0x0a, 0x66, 0xda, 
-       0xdf, 0x5c, 0xd0, 0x0e, 0x4f, 0x00, 0x0f, 0x87, 
-       0xd0, 0x06, 0x40, 0x3c, 0xeb, 0xf0, 0xbf, 0x3e, 
-       0xb0, 0x04, 0xe7, 0xf2, 0xeb, 0xf6, 0xbf, 0x0c, 
-       0xbf, 0x3a, 0x0f, 0x87, 0x0f, 0x1d, 0xfb, 0x4b, 
-       0xbf, 0x38, 0x0f, 0x87, 0x0f, 0x1c, 0xfb, 0xcb, 
-       0xbf, 0x30, 0x0f, 0x87, 0x50, 0x00, 0x50, 0x00, 
-       0x0f, 0x17, 0xf9, 0x70, 0x90, 0x4d, 0x10, 0x60, 
-       0xe5, 0x72, 0x0f, 0x49, 0x90, 0x4d, 0x10, 0x60, 
-       0xe5, 0x76, 0x0f, 0x19, 0xf9, 0x79, 0x01, 0x46, 
-       0xd0, 0x11, 0xa0, 0x38, 0x80, 0x3f, 0x00, 0xc6, 
-       0xdf, 0x00, 0x00, 0x06, 0x08, 0x20, 0xd0, 0x00, 
-       0x10, 0x08, 0xa0, 0x0a, 0xa0, 0x1b, 0x0c, 0x20, 
-       0xd0, 0x00, 0x10, 0x08, 0xa0, 0x27, 0x90, 0x4d, 
-       0x0f, 0xff, 0xd8, 0x1f, 0x40, 0x40, 0xa0, 0x4d, 
-       0x80, 0x0a, 0xd0, 0x00, 0x06, 0x50, 0xf9, 0x95, 
-       0xd0, 0x01, 0xa0, 0x09, 0x80, 0x1b, 0xa0, 0x27, 
-       0x01, 0x20, 0xd0, 0x67, 0xa0, 0x69, 0x80, 0x2a, 
-       0x82, 0x29, 0x80, 0x6a, 0x84, 0x29, 0xd0, 0x54, 
-       0x10, 0x4f, 0xa0, 0x6a, 0x01, 0x20, 0xd0, 0x40, 
-       0xa0, 0x69, 0x80, 0x2b, 0x80, 0x07, 0x08, 0x20, 
-       0xdf, 0x00, 0x02, 0x30, 0xd0, 0x00, 0xa0, 0x38, 
-       0x80, 0x3f, 0x01, 0xb0, 0xd0, 0x10, 0xa0, 0x37, 
-       0x80, 0x3f, 0x02, 0x30, 0xd0, 0x01, 0xa0, 0x38, 
-       0xd0, 0x10, 0xa0, 0x38, 0x15, 0x63, 0xe9, 0xba, 
-       0x05, 0x5e, 0xf9, 0xfa, 0xc0, 0xdf, 0x00, 0xe0, 
-       0xd1, 0x80, 0x70, 0x06, 0x10, 0x1c, 0xc1, 0x40, 
-       0x11, 0x48, 0xd3, 0x10, 0x00, 0x21, 0xd0, 0x80, 
-       0xb0, 0x16, 0xe9, 0xca, 0xd3, 0x20, 0x10, 0x81, 
-       0xb0, 0x16, 0xf9, 0xfa, 0x30, 0xc2, 0xd2, 0x64, 
-       0xd0, 0x92, 0x00, 0xee, 0xd0, 0x54, 0x70, 0x41, 
-       0x30, 0x43, 0xed, 0xd7, 0xd2, 0x6c, 0x72, 0x49, 
-       0xc0, 0x89, 0xb0, 0xbf, 0x10, 0x9f, 0x22, 0x42, 
-       0x04, 0x31, 0xd0, 0x10, 0xc0, 0x42, 0x30, 0x49, 
-       0xe5, 0xde, 0x10, 0x03, 0xc1, 0x0c, 0xc1, 0x83, 
-       0xb1, 0xbe, 0x01, 0x46, 0x00, 0x06, 0xa0, 0x3d, 
-       0xa0, 0x3c, 0x60, 0x06, 0x00, 0xc6, 0xb1, 0xbc, 
-       0xb1, 0x01, 0xed, 0xe1, 0xc1, 0x0c, 0x21, 0x85, 
-       0x01, 0x46, 0x00, 0x06, 0xa0, 0x3d, 0xa0, 0x3c, 
-       0x60, 0x06, 0x00, 0xc6, 0xb1, 0xbc, 0xb1, 0x01, 
-       0xed, 0xec, 0x02, 0xe4, 0xd0, 0x00, 0x20, 0xc0, 
-       0xb2, 0x41, 0xed, 0xd8, 0x15, 0xa3, 0xfa, 0x00, 
-       0xbc, 0x10, 0x0c, 0x1e, 0xfa, 0x00, 0xbc, 0x10, 
-       0xd0, 0x04, 0x70, 0x00, 0x10, 0x20, 0xfa, 0x00, 
-       0x00, 0x27, 0xd0, 0x10, 0xd0, 0x40, 0x60, 0x40, 
-       0x00, 0x26, 0xd0, 0x14, 0x60, 0x40, 0xb0, 0x28, 
-       0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0x01, 0x7a, 
-       0xde, 0x1a, 0xe0, 0x46, 0x50, 0x00, 0x50, 0x00, 
-       0x00, 0x28, 0xd1, 0xb0, 0x70, 0x06, 0xd0, 0x81, 
-       0x60, 0x86, 0x10, 0x20, 0xe9, 0xab, 0xb0, 0x3f, 
-       0x60, 0x06, 0x00, 0xec, 0xd1, 0x84, 0x70, 0x46, 
-       0xb1, 0x84, 0x70, 0x86, 0x30, 0x42, 0xe9, 0xab, 
-       0x70, 0x42, 0xd0, 0x35, 0x30, 0x40, 0xf9, 0xab, 
-       0x00, 0x63, 0xd0, 0x3f, 0xb0, 0xbc, 0x40, 0x80, 
-       0x70, 0xc2, 0x10, 0xe3, 0xe5, 0xab, 0xb0, 0xbc, 
-       0x40, 0x80, 0x60, 0x86, 0x00, 0x28, 0xd0, 0x24, 
-       0x70, 0x40, 0x00, 0x22, 0xd0, 0x80, 0x50, 0x42, 
-       0x60, 0x40, 0x00, 0x64, 0xd0, 0x60, 0xd0, 0x90, 
-       0x60, 0x81, 0x00, 0xed, 0xd1, 0x88, 0x70, 0x46, 
-       0x10, 0xe4, 0xe9, 0xa8, 0x00, 0x21, 0xd0, 0xe8, 
-       0xd0, 0x00, 0x60, 0x03, 0xd0, 0x81, 0x40, 0x42, 
-       0x60, 0x46, 0x02, 0x3c, 0xdc, 0x89, 0xe0, 0x46, 
-       0xd0, 0x82, 0x50, 0x42, 0x60, 0x46, 0x00, 0x23, 
-       0xd5, 0x3e, 0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 
-       0x01, 0x46, 0xdf, 0x5c, 0x08, 0x20, 0xd1, 0x00, 
-       0xcf, 0x04, 0x11, 0x08, 0xa1, 0x0a, 0xa1, 0x1b, 
-       0x11, 0x1f, 0xa1, 0x27, 0xd2, 0x80, 0xb2, 0x81, 
-       0x90, 0x4d, 0xc0, 0x01, 0x10, 0x14, 0x00, 0x16, 
-       0xe9, 0x8d, 0x80, 0x33, 0x80, 0x3f, 0x92, 0x8b, 
-       0x00, 0x23, 0xd0, 0x3f, 0x42, 0x80, 0xe9, 0x8d, 
-       0x0f, 0xff, 0xdf, 0xff, 0x40, 0x01, 0xa0, 0x0d, 
-       0xe1, 0x94, 0xa1, 0x0a, 0x00, 0xea, 0xd0, 0x00, 
-       0xd0, 0x8e, 0x00, 0x06, 0x0f, 0x0b, 0x70, 0x80, 
-       0x80, 0x73, 0x80, 0x0a, 0xd0, 0x00, 0x06, 0x50, 
-       0xf9, 0x9a, 0xd0, 0x01, 0xd0, 0x44, 0x40, 0x70, 
-       0x20, 0x01, 0x15, 0x63, 0xf9, 0xa1, 0x80, 0x1b, 
-       0xe1, 0xa2, 0x80, 0x5b, 0xa0, 0x27, 0x01, 0x20, 
-       0xd0, 0x67, 0xa0, 0x69, 0x80, 0x2a, 0x82, 0x29, 
-       0x80, 0x6a, 0x84, 0x29, 0xd0, 0x54, 0x10, 0x4f, 
-       0xa0, 0x6a, 0x01, 0x20, 0xd0, 0x40, 0xa0, 0x69, 
-       0x80, 0x2b, 0x80, 0x07, 0x08, 0x20, 0xd0, 0x00, 
-       0xcf, 0x00, 0x02, 0x30, 0xd0, 0x00, 0xa0, 0x38, 
-       0x80, 0x3f, 0x01, 0xb2, 0xd2, 0x10, 0xa0, 0x37, 
-       0x80, 0x3f, 0x02, 0x30, 0xd0, 0x01, 0xa0, 0x38, 
-       0x00, 0x30, 0xd0, 0x10, 0xa0, 0x38, 0x80, 0x3f, 
-       0x00, 0xc6, 0x00, 0x28, 0xd1, 0x24, 0x70, 0x04, 
-       0xd0, 0x41, 0x50, 0x01, 0x60, 0x04, 0x00, 0x27, 
-       0xd0, 0x18, 0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 
-       0x00, 0x26, 0xd0, 0x20, 0x70, 0x40, 0xb0, 0x7f, 
-       0x60, 0x40, 0x08, 0x20, 0xdf, 0x00, 0xd4, 0x00, 
-       0xd4, 0x40, 0xd4, 0x80, 0xd4, 0xc0, 0xd3, 0x81, 
-       0x12, 0xa0, 0xed, 0xe3, 0xd0, 0x08, 0x0a, 0x09, 
-       0x00, 0x4d, 0xb0, 0x01, 0xed, 0xdf, 0x03, 0xbf, 
-       0xd4, 0x27, 0xe0, 0x46, 0x50, 0x00, 0x50, 0x00, 
-       0x02, 0x24, 0xd0, 0x00, 0xa0, 0x37, 0x00, 0x27, 
-       0xd3, 0xd0, 0x00, 0x26, 0xd0, 0x04, 0x73, 0xcf, 
-       0x13, 0xe1, 0xe9, 0x7b, 0xb0, 0x3c, 0xf2, 0x00, 
-       0x00, 0x26, 0xd0, 0x40, 0xd0, 0x00, 0x60, 0x01, 
-       0x00, 0x26, 0xd0, 0x14, 0xf2, 0x00, 0x00, 0x26, 
-       0xd0, 0x18, 0xf2, 0x00, 0x00, 0xee, 0xd0, 0x1c, 
-       0x71, 0x40, 0xd1, 0x24, 0x15, 0x63, 0xe9, 0x8d, 
-       0x11, 0x1f, 0xc7, 0x1a, 0xb7, 0x01, 0xd3, 0x81, 
-       0xc4, 0xd4, 0xf2, 0x04, 0x00, 0x26, 0xd0, 0x18, 
-       0x70, 0x40, 0xb0, 0x54, 0xfd, 0x9b, 0x00, 0xed, 
-       0xd0, 0x24, 0xd0, 0x44, 0x60, 0x40, 0x13, 0xe1, 
-       0xf9, 0xbc, 0x15, 0xa3, 0xf9, 0xa1, 0x0c, 0x10, 
-       0xe9, 0xb9, 0x11, 0x61, 0xe5, 0xb3, 0xed, 0xb9, 
-       0x15, 0xa3, 0xf9, 0xab, 0x00, 0x26, 0xd0, 0x14, 
-       0x70, 0x40, 0x10, 0x62, 0xf5, 0xb3, 0x15, 0x22, 
-       0xe5, 0xb3, 0xc0, 0x44, 0x30, 0x54, 0xe5, 0xb3, 
-       0x34, 0xd4, 0xf5, 0xb3, 0xe1, 0xbf, 0x03, 0xb4, 
-       0xd6, 0x29, 0x00, 0x26, 0xd0, 0x40, 0x60, 0x01, 
-       0xe1, 0xdb, 0x03, 0xb4, 0xd6, 0x29, 0xe0, 0x46, 
-       0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0x80, 0x07, 
-       0x09, 0x49, 0xd4, 0x00, 0xd4, 0x40, 0xd4, 0x80, 
-       0xd4, 0xc0, 0x00, 0x4d, 0xa0, 0x6c, 0xd3, 0x80, 
-       0xd0, 0xa1, 0x00, 0x88, 0xd0, 0xa9, 0x00, 0x4d, 
-       0x00, 0x50, 0xf9, 0xc9, 0x0c, 0x49, 0xd0, 0x61, 
-       0x00, 0x8d, 0x10, 0xa0, 0xe9, 0x90, 0x30, 0x42, 
-       0xf5, 0xd8, 0xd0, 0x61, 0x23, 0x81, 0xe1, 0xce, 
-       0x23, 0x82, 0x13, 0xa1, 0xf9, 0x90, 0xd0, 0x42, 
-       0x15, 0xa1, 0xf9, 0xdf, 0xb0, 0x7f, 0x00, 0x26, 
-       0xd0, 0x14, 0x70, 0x00, 0x30, 0x01, 0xf5, 0xe8, 
-       0x16, 0xe0, 0xe5, 0xe8, 0xb6, 0xc1, 0xbc, 0x20, 
-       0xc0, 0x44, 0x30, 0x5b, 0xfd, 0xb9, 0xc0, 0x44, 
-       0x30, 0x54, 0xe5, 0xb9, 0x15, 0x63, 0xf9, 0xf8, 
-       0x15, 0xa3, 0xf9, 0xf5, 0x03, 0x3c, 0xd8, 0x1c, 
-       0xe0, 0x46, 0x03, 0x39, 0xda, 0x17, 0xe0, 0x46, 
-       0x15, 0xa3, 0xf9, 0xfd, 0x03, 0x72, 0xde, 0x19, 
-       0xe0, 0x46, 0x03, 0x70, 0xd0, 0x17, 0xe0, 0x46, 
-       0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0x0f, 0xc5, 
-       0xdf, 0x00, 0x0c, 0x09, 0x05, 0x0d, 0x08, 0x20, 
-       0xdf, 0x00, 0x0f, 0xc5, 0x50, 0x00, 0x50, 0x00, 
-       0x00, 0xef, 0xd0, 0x14, 0x70, 0x40, 0x10, 0x60, 
-       0xe9, 0x45, 0xb0, 0x04, 0x70, 0x40, 0xb0, 0x41, 
-       0xed, 0x44, 0x00, 0xed, 0xd0, 0x24, 0xd0, 0x44, 
-       0x60, 0x40, 0x00, 0x64, 0xd0, 0x20, 0x70, 0x00, 
-       0x10, 0x30, 0xe9, 0x45, 0x00, 0x21, 0xd0, 0x28, 
-       0x60, 0x40, 0x00, 0x64, 0xd2, 0xc0, 0x70, 0x0b, 
-       0x00, 0x11, 0xe9, 0x6a, 0x08, 0x20, 0xd0, 0x4f, 
-       0x30, 0x40, 0xe9, 0x55, 0xb0, 0x4f, 0xf9, 0x6a, 
-       0x03, 0xef, 0xdf, 0xbf, 0xaf, 0xb8, 0xdf, 0x80, 
-       0x0f, 0x87, 0xd0, 0x18, 0x70, 0x00, 0x10, 0x20, 
-       0xed, 0x6c, 0xdf, 0x84, 0xd0, 0x40, 0x60, 0x7e, 
-       0x00, 0x27, 0xd0, 0x54, 0x70, 0x41, 0x10, 0x60, 
-       0x01, 0xa0, 0xd0, 0x40, 0xa0, 0x78, 0x80, 0x34, 
-       0x80, 0x3f, 0x01, 0x3c, 0xd2, 0x39, 0x00, 0x21, 
-       0xdf, 0x86, 0x0f, 0x87, 0xd0, 0x40, 0x60, 0x4b, 
-       0x03, 0xe6, 0xd0, 0x08, 0xe0, 0x36, 0x50, 0x00, 
-       0x00, 0x28, 0xd0, 0x24, 0x72, 0xc0, 0xd0, 0x40, 
-       0x60, 0x40, 0xd0, 0x0c, 0x52, 0xc0, 0xc0, 0x1c, 
-       0x30, 0x1d, 0xf5, 0x3c, 0x20, 0x1f, 0x30, 0x1e, 
-       0x90, 0x6d, 0x20, 0x01, 0x00, 0x22, 0xd0, 0x58, 
-       0x60, 0x01, 0x00, 0xe3, 0xd0, 0x48, 0x70, 0x41, 
-       0x30, 0x40, 0xf5, 0x47, 0xb2, 0xc8, 0x00, 0xe3, 
-       0xd0, 0x4c, 0x70, 0x41, 0x30, 0x40, 0xfd, 0x4d, 
-       0xb2, 0xc4, 0x00, 0x28, 0xd0, 0x20, 0x70, 0x00, 
-       0x42, 0xc0, 0xa2, 0xc5, 0x12, 0xe0, 0xe9, 0x55, 
-       0x80, 0x40, 0x80, 0x34, 0x80, 0x3f, 0xcf, 0x95, 
-       0x82, 0x34, 0x80, 0x3f, 0x03, 0xe8, 0xd0, 0x00, 
-       0x1f, 0xa3, 0xe9, 0x60, 0x03, 0xea, 0xd0, 0x00, 
-       0x00, 0x27, 0xd0, 0x4c, 0x7f, 0x81, 0x00, 0x27, 
-       0xd0, 0x54, 0x70, 0x41, 0x10, 0x60, 0x03, 0xa0, 
-       0xd0, 0x40, 0xa0, 0x78, 0xe0, 0x3c, 0x50, 0x00, 
-       0xc0, 0x84, 0x10, 0x8c, 0x10, 0x92, 0xd0, 0x41, 
-       0x30, 0x4d, 0x40, 0x43, 0x10, 0x43, 0x20, 0x81, 
-       0xd1, 0x8f, 0x41, 0x82, 0x10, 0x9c, 0x20, 0x9b, 
-       0xc1, 0xc2, 0x10, 0x82, 0x20, 0x87, 0xc0, 0x42, 
-       0x10, 0x43, 0x20, 0x81, 0x10, 0x88, 0x22, 0x02, 
-       0x10, 0x97, 0x01, 0xd0, 0xe9, 0x48, 0xb0, 0x96, 
-       0x10, 0x88, 0x22, 0x82, 0xc0, 0x5c, 0x10, 0x48, 
-       0xc0, 0x84, 0x10, 0x91, 0x10, 0x86, 0x20, 0x42, 
-       0x41, 0x0d, 0x11, 0x02, 0x20, 0x44, 0x22, 0x01, 
-       0x22, 0x81, 0x02, 0xe4, 0xd2, 0x40, 0xc2, 0xca, 
-       0xb2, 0xe0, 0x01, 0xd0, 0xe9, 0x5e, 0xc2, 0xca, 
-       0x22, 0xc9, 0xb2, 0xa0, 0x22, 0x48, 0xd0, 0x78, 
-       0x03, 0x50, 0xf9, 0x69, 0xd0, 0x7c, 0x01, 0x9d, 
-       0xf9, 0x69, 0xc2, 0x48, 0xb2, 0x60, 0xc2, 0xca, 
-       0xb2, 0xf0, 0x11, 0x82, 0x41, 0x81, 0x22, 0x06, 
-       0x11, 0x9f, 0x41, 0x81, 0x22, 0x86, 0x0f, 0xc5, 
-       0xc0, 0x84, 0x10, 0x8c, 0x10, 0x92, 0xd1, 0x8f, 
-       0x41, 0x82, 0x10, 0x9c, 0xc1, 0xdb, 0x11, 0xc1, 
-       0x21, 0xc3, 0x20, 0x87, 0xc1, 0xc2, 0x10, 0x82, 
-       0x20, 0x87, 0xc0, 0x42, 0x10, 0x43, 0x20, 0x81, 
-       0x10, 0x88, 0x22, 0x02, 0x10, 0x97, 0x01, 0xd0, 
-       0xe9, 0x46, 0xb0, 0x96, 0x10, 0x88, 0x22, 0x82, 
-       0xc0, 0x5c, 0x10, 0x48, 0xc0, 0x84, 0x10, 0x91, 
-       0x10, 0x86, 0x20, 0x42, 0xd0, 0x81, 0x41, 0x02, 
-       0x11, 0x02, 0x20, 0x44, 0x22, 0x01, 0x22, 0x81, 
-       0x02, 0xe4, 0xd2, 0x40, 0xc2, 0xca, 0xb2, 0xe0, 
-       0x01, 0xd0, 0xe9, 0x5d, 0xc2, 0xca, 0x22, 0xc9, 
-       0xb2, 0xa0, 0x22, 0x48, 0x11, 0x9f, 0x11, 0x83, 
-       0x22, 0x06, 0x11, 0x9c, 0x11, 0x83, 0x22, 0x86, 
-       0x0f, 0xc5, 0xd0, 0x41, 0x40, 0x44, 0x20, 0x55, 
-       0x10, 0x62, 0xf9, 0x6f, 0x01, 0xb5, 0xd4, 0x00, 
-       0xc2, 0x9f, 0xc2, 0x1f, 0x22, 0x80, 0xe1, 0x30, 
-       0x0f, 0x11, 0xf9, 0x51, 0x90, 0x38, 0x80, 0x3f, 
-       0x00, 0x1b, 0xf9, 0x51, 0x00, 0x27, 0xd0, 0x04, 
-       0x70, 0x40, 0x30, 0x71, 0xf9, 0x51, 0xb0, 0x3c, 
-       0x70, 0x40, 0x30, 0x5d, 0xf9, 0x51, 0xb0, 0x08, 
-       0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0x10, 0x63, 
-       0xe5, 0x5d, 0x02, 0x20, 0xd0, 0x01, 0xa0, 0x37, 
-       0x00, 0x26, 0xd0, 0x24, 0x70, 0x40, 0xb0, 0x7f, 
-       0x60, 0x40, 0xb0, 0x08, 0x70, 0x40, 0xb0, 0x41, 
-       0x60, 0x40, 0x00, 0x26, 0xd0, 0x30, 0x70, 0x40, 
-       0xb0, 0x7f, 0x60, 0x40, 0xb0, 0x30, 0xd0, 0x40, 
-       0x60, 0x40, 0xb0, 0x3c, 0x6c, 0x40, 0xb0, 0x3c, 
-       0x67, 0x40, 0x00, 0x33, 0xdf, 0xb0, 0xe0, 0x36, 
-       0x00, 0x26, 0xd0, 0x1c, 0x70, 0x40, 0xb0, 0x7f, 
-       0x60, 0x40, 0xb0, 0x3c, 0x70, 0x40, 0xb0, 0x41, 
-       0x60, 0x40, 0x08, 0x20, 0xdf, 0x00, 0x80, 0x35, 
-       0xc0, 0x3c, 0x10, 0x08, 0xa0, 0x0a, 0xa0, 0x27, 
-       0xa0, 0x1b, 0xdf, 0x5c, 0x01, 0xa0, 0xd0, 0x00, 
-       0xa0, 0x38, 0x80, 0x3f, 0x80, 0x34, 0x80, 0x3f, 
-       0x03, 0xbb, 0xd8, 0x1e, 0xcf, 0x95, 0x82, 0x34, 
-       0x80, 0x3f, 0x03, 0xe8, 0xd0, 0x00, 0x1f, 0xa3, 
-       0xe9, 0x55, 0x1f, 0xa0, 0xe9, 0x55, 0x03, 0xea, 
-       0xd0, 0x00, 0x00, 0x21, 0xdf, 0x86, 0xe0, 0x3c, 
-       0x89, 0x78, 0x89, 0x37, 0x00, 0xee, 0xd0, 0x14, 
-       0x76, 0x00, 0xd0, 0x30, 0x76, 0x40, 0x26, 0x58, 
-       0xd6, 0xd9, 0x00, 0xee, 0xd0, 0x20, 0x75, 0x40, 
-       0xd0, 0x1c, 0x71, 0x40, 0xd0, 0x20, 0x71, 0x00, 
-       0xd0, 0x24, 0x70, 0x80, 0xc4, 0x02, 0xd0, 0x28, 
-       0x70, 0xc0, 0x00, 0x21, 0xd0, 0x10, 0x72, 0x00, 
-       0x93, 0x90, 0xd4, 0x81, 0x13, 0x96, 0x43, 0x92, 
-       0x34, 0x8e, 0x00, 0x22, 0xd1, 0xa4, 0x71, 0x86, 
-       0xde, 0x40, 0x7e, 0x79, 0xd0, 0x18, 0x70, 0x40, 
-       0xb0, 0x41, 0xf5, 0x58, 0xd3, 0x42, 0x50, 0x4d, 
-       0x60, 0x40, 0x10, 0x60, 0xe5, 0x62, 0xd0, 0x54, 
-       0x70, 0x01, 0xb0, 0x3c, 0x60, 0x01, 0x04, 0x2d, 
-       0xd0, 0x30, 0xe0, 0x36, 0x00, 0x22, 0xd0, 0x60, 
-       0x71, 0xc1, 0xd0, 0x4f, 0x41, 0xc1, 0x04, 0x20, 
-       0xd0, 0x28, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
-       0x04, 0x22, 0xd0, 0x18, 0xd3, 0x44, 0x72, 0x8d, 
-       0x12, 0xa0, 0xe8, 0x36, 0xc0, 0x47, 0x10, 0x5d, 
-       0x30, 0x4e, 0xf8, 0x36, 0xb2, 0x3e, 0x60, 0x4d, 
-       0x00, 0xed, 0xd0, 0x48, 0x70, 0x01, 0xde, 0x45, 
-       0x50, 0x39, 0x00, 0x1b, 0xf9, 0x44, 0xb0, 0x01, 
-       0x00, 0x1c, 0xf9, 0x47, 0xb0, 0x04, 0x60, 0x01, 
-       0xd0, 0x40, 0x62, 0x81, 0xce, 0x4a, 0xd0, 0x43, 
-       0x41, 0xc1, 0xd0, 0x58, 0x61, 0xc1, 0x90, 0x43, 
-       0x00, 0xe0, 0xd0, 0x28, 0x70, 0x00, 0x10, 0x1f, 
-       0x20, 0x40, 0xb1, 0xc1, 0xf5, 0x54, 0x00, 0x21, 
-       0xd0, 0x08, 0x60, 0x40, 0x00, 0xe6, 0xd0, 0x40, 
-       0x70, 0x41, 0xd2, 0x94, 0x60, 0x4a, 0x04, 0x2c, 
-       0xd0, 0x08, 0x01, 0x90, 0xf8, 0x36, 0x04, 0x2d, 
-       0xd0, 0x30, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
-       0xc0, 0x47, 0x10, 0x5d, 0x30, 0x4e, 0xf9, 0x41, 
-       0x90, 0x43, 0x00, 0xe0, 0xd0, 0x28, 0x70, 0x00, 
-       0x20, 0x40, 0x00, 0x21, 0xd0, 0x08, 0x60, 0x40, 
-       0x00, 0x26, 0xd0, 0x74, 0x70, 0x01, 0xb0, 0x3f, 
-       0x60, 0x01, 0x00, 0xed, 0xd0, 0x48, 0x70, 0x41, 
-       0x00, 0x5e, 0xf9, 0x4b, 0x00, 0x21, 0xd0, 0x00, 
-       0x73, 0x80, 0xd4, 0x81, 0x34, 0x8e, 0x00, 0x34, 
-       0xd3, 0x70, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
-       0xd1, 0x88, 0xd1, 0xc8, 0x01, 0x1b, 0xe9, 0x39, 
-       0x11, 0x9f, 0x11, 0xdf, 0xd4, 0x80, 0xd3, 0x81, 
-       0xe1, 0x43, 0x00, 0xed, 0xd0, 0x08, 0x70, 0x00, 
-       0x00, 0x10, 0xf9, 0x37, 0x0c, 0x1f, 0xf9, 0x36, 
-       0x13, 0xa1, 0xe9, 0x43, 0xbe, 0x7c, 0x00, 0x69, 
-       0xd2, 0x54, 0x12, 0x48, 0xc0, 0x39, 0x30, 0x18, 
-       0xe5, 0x4b, 0xd2, 0x70, 0x72, 0x49, 0x22, 0x79, 
-       0x00, 0x21, 0xd0, 0x00, 0x63, 0x80, 0x04, 0x24, 
-       0xd0, 0x38, 0x02, 0x10, 0xe9, 0x56, 0xd0, 0x41, 
-       0x51, 0x41, 0xe0, 0x36, 0x15, 0x61, 0xe8, 0x36, 
-       0xd5, 0x80, 0xd3, 0x00, 0xd3, 0x40, 0x04, 0x28, 
-       0xd0, 0x18, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
-       0x00, 0x21, 0xd0, 0x18, 0x73, 0x00, 0xb0, 0x04, 
-       0x73, 0x80, 0xd2, 0x80, 0xb0, 0x38, 0x72, 0xc0, 
-       0x31, 0x0d, 0xc0, 0x0e, 0x10, 0x0b, 0x10, 0x20, 
-       0xe9, 0x42, 0xf5, 0x3f, 0x22, 0x8d, 0x10, 0x01, 
-       0x13, 0x5f, 0xe1, 0x3b, 0x33, 0x8b, 0x15, 0x61, 
-       0xf9, 0x49, 0x00, 0x21, 0xd0, 0x64, 0x70, 0x41, 
-       0x33, 0x81, 0x03, 0xd0, 0xe9, 0x4c, 0x20, 0x0b, 
-       0x13, 0xdf, 0x12, 0xc1, 0x13, 0xe0, 0xf9, 0x49, 
-       0x10, 0x03, 0xc0, 0x50, 0x10, 0x4b, 0x13, 0x0b, 
-       0x23, 0x00, 0x13, 0x20, 0xe9, 0x5c, 0xf5, 0x59, 
-       0x22, 0x81, 0x13, 0x01, 0x10, 0x5f, 0xe1, 0x55, 
-       0x12, 0x99, 0x12, 0x87, 0x21, 0x0a, 0x00, 0xa0, 
-       0xd2, 0x80, 0xc3, 0x0a, 0x03, 0x90, 0xe9, 0x66, 
-       0x22, 0x82, 0x23, 0x03, 0x10, 0x81, 0x10, 0xc1, 
-       0x13, 0x9f, 0x13, 0xa0, 0xed, 0x62, 0xc0, 0x8a, 
-       0xc0, 0xcc, 0x04, 0x26, 0xd0, 0x38, 0xe0, 0x36, 
-       0x15, 0x61, 0xf9, 0x3d, 0x07, 0x32, 0xd0, 0x00, 
-       0x30, 0x03, 0xed, 0x3d, 0xc0, 0x03, 0x10, 0x1d, 
-       0x30, 0xc0, 0xc0, 0x02, 0x10, 0x1d, 0x30, 0x80, 
-       0xe1, 0x32, 0x10, 0x94, 0x10, 0xd4, 0x00, 0x21, 
-       0xd0, 0x20, 0x73, 0x00, 0xc5, 0x8c, 0xd3, 0x4e, 
-       0x01, 0x1b, 0xe9, 0x48, 0x13, 0x1f, 0xd3, 0x4f, 
-       0x43, 0x4c, 0x13, 0x1c, 0xc0, 0x0c, 0x10, 0x03, 
-       0x20, 0x0c, 0xc0, 0x40, 0x10, 0x42, 0x20, 0x40, 
-       0x10, 0x46, 0x20, 0x4d, 0x10, 0x42, 0x2e, 0x41, 
-       0x10, 0x5c, 0x10, 0x43, 0x00, 0x59, 0xe9, 0x5b, 
-       0x01, 0x69, 0xd0, 0x20, 0x30, 0x40, 0x22, 0x41, 
-       0x04, 0x28, 0xd0, 0x18, 0xe0, 0x36, 0x50, 0x00, 
-       0x2c, 0x14, 0xd0, 0x34, 0x63, 0x00, 0xd0, 0x38, 
-       0x72, 0xc0, 0xc0, 0x51, 0x10, 0x5c, 0x30, 0x4b, 
-       0x10, 0x44, 0xd4, 0xc0, 0xd5, 0x00, 0xc0, 0x18, 
-       0x30, 0x39, 0xed, 0x5f, 0xd4, 0xd0, 0xc5, 0x01, 
-       0xd0, 0x18, 0x70, 0x00, 0x0c, 0x1f, 0xe9, 0x48, 
-       0x10, 0x20, 0xfd, 0x48, 0xd4, 0xc0, 0xd5, 0x00, 
-       0x10, 0x22, 0xe5, 0x4e, 0xd4, 0xc0, 0xbc, 0x30, 
-       0xd5, 0x00, 0xb5, 0x10, 0xb0, 0x3f, 0xf9, 0x52, 
-       0x3c, 0x01, 0x3c, 0x01, 0x02, 0x1f, 0xe9, 0x5f, 
-       0x00, 0xa8, 0xd3, 0xc0, 0xd3, 0xa4, 0x00, 0xaa, 
-       0xd0, 0x10, 0x70, 0x4f, 0xb3, 0xfc, 0x60, 0x40, 
-       0xb0, 0x3c, 0xb3, 0x81, 0xed, 0x59, 0x00, 0x21, 
-       0xd0, 0x28, 0x70, 0x00, 0x10, 0x20, 0xf9, 0x69, 
-       0x02, 0x1f, 0xf9, 0x6a, 0x90, 0x10, 0x00, 0x1e, 
-       0xe9, 0x6a, 0xb1, 0x7c, 0x04, 0x2a, 0xd0, 0x18, 
-       0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 0x50, 0x00, 
-       0x01, 0x5e, 0xf9, 0x35, 0x01, 0x50, 0xe9, 0x35, 
-       0xb1, 0x78, 0xd2, 0x00, 0x01, 0x5c, 0xf9, 0x5f, 
-       0xc0, 0x18, 0x30, 0x39, 0xed, 0x5f, 0x11, 0x9f, 
-       0xce, 0x58, 0xc2, 0x59, 0x00, 0xaa, 0xd2, 0x10, 
-       0x14, 0x82, 0x22, 0x12, 0xc0, 0x0c, 0x10, 0x1f, 
-       0x10, 0x03, 0x22, 0x00, 0x70, 0x48, 0x03, 0x10, 
-       0xe9, 0x4c, 0xb2, 0x38, 0xbe, 0x60, 0xb2, 0x60, 
-       0x2e, 0x41, 0x10, 0x5f, 0x00, 0x59, 0xe9, 0x53, 
-       0x01, 0x69, 0xd0, 0x3c, 0x30, 0x40, 0x22, 0x41, 
-       0x13, 0x41, 0x2e, 0x4d, 0x13, 0x5d, 0x13, 0x43, 
-       0x22, 0x4d, 0x14, 0xe0, 0xe9, 0x5f, 0x33, 0x0b, 
-       0x13, 0x04, 0x2c, 0x0c, 0x35, 0x0c, 0xc3, 0x46, 
-       0xc3, 0x87, 0x04, 0x62, 0xd0, 0x10, 0x15, 0x62, 
-       0xfc, 0x36, 0x04, 0x60, 0xd0, 0x10, 0xe0, 0x36, 
-       0x00, 0x22, 0xd0, 0x74, 0x74, 0x01, 0xb0, 0x7c, 
-       0x74, 0x41, 0xb0, 0x7c, 0x71, 0x41, 0xd1, 0x18, 
-       0xc0, 0x10, 0x10, 0x1c, 0xb0, 0x16, 0xf9, 0x45, 
-       0x00, 0x24, 0xd0, 0x20, 0x30, 0x11, 0xf9, 0x45, 
-       0xb1, 0x70, 0x01, 0x50, 0xf9, 0x45, 0xb1, 0x20, 
-       0x14, 0x41, 0xc0, 0x90, 0x00, 0x2b, 0xd0, 0xd0, 
-       0x01, 0x50, 0xe9, 0x4b, 0xc0, 0xd0, 0x00, 0x35, 
-       0xdc, 0x00, 0x20, 0x11, 0x10, 0x1f, 0xa0, 0x1c, 
-       0x00, 0x21, 0xd0, 0x2c, 0x70, 0x00, 0x10, 0x05, 
-       0x51, 0x40, 0xd0, 0x1c, 0x61, 0x40, 0xd0, 0x20, 
-       0x61, 0x00, 0xd0, 0x24, 0x60, 0x80, 0xd0, 0x28, 
-       0x60, 0xc0, 0x04, 0x2d, 0xd0, 0x30, 0x00, 0x22, 
-       0xd0, 0x64, 0xb1, 0x81, 0x61, 0x81, 0xe0, 0x36, 
-       0x90, 0x50, 0xd0, 0x3c, 0x10, 0x41, 0x60, 0x40, 
-       0x15, 0x62, 0xfd, 0x3d, 0xc0, 0x10, 0x10, 0x1e, 
-       0x10, 0x07, 0x21, 0x00, 0x10, 0x16, 0x34, 0x00, 
-       0xc0, 0x90, 0xd3, 0x40, 0x00, 0x24, 0xd3, 0xc0, 
-       0x04, 0x23, 0xd0, 0x18, 0x01, 0x9f, 0xe8, 0x36, 
-       0xd0, 0x54, 0x70, 0x41, 0x73, 0x41, 0x04, 0x2e, 
-       0xd0, 0x28, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
-       0x00, 0xef, 0xd3, 0x30, 0x73, 0x0c, 0xd0, 0x0c, 
-       0x70, 0x00, 0xc0, 0x40, 0x13, 0x24, 0xf5, 0x42, 
-       0x13, 0x22, 0xe9, 0x41, 0xe5, 0x43, 0xd3, 0x00, 
-       0x10, 0x22, 0xf9, 0x41, 0xd0, 0x01, 0xd0, 0x43, 
-       0xd3, 0x01, 0x21, 0x00, 0xd3, 0x40, 0x03, 0x10, 
-       0xf9, 0x47, 0xd3, 0x40, 0xe1, 0x61, 0x00, 0x23, 
-       0xd0, 0x00, 0x10, 0x61, 0xe9, 0x50, 0xb0, 0x33, 
-       0x10, 0x63, 0xe9, 0x50, 0x00, 0x22, 0xd0, 0x1a, 
-       0xc3, 0xc0, 0xd2, 0xc0, 0x00, 0x10, 0xe9, 0x55, 
-       0x22, 0xd0, 0x10, 0x1f, 0x14, 0x01, 0x10, 0x20, 
-       0xed, 0x52, 0x14, 0x18, 0x12, 0xd8, 0xc0, 0x8b, 
-       0x32, 0xd0, 0x12, 0xc3, 0x33, 0x4b, 0x13, 0x47, 
-       0x21, 0x0d, 0x04, 0x23, 0xd0, 0x18, 0xe0, 0x36, 
-       0x00, 0x24, 0xd0, 0x30, 0xd0, 0x40, 0x60, 0x40, 
-       0xd3, 0xc7, 0x43, 0xc4, 0x31, 0x0f, 0xd5, 0xd4, 
-       0x25, 0xcf, 0x15, 0xc4, 0x10, 0xdf, 0xc2, 0xc6, 
-       0xc3, 0x07, 0x11, 0x81, 0xb1, 0x3b, 0x15, 0x64, 
-       0xe9, 0x47, 0x10, 0xdf, 0x12, 0xc1, 0x11, 0x81, 
-       0x11, 0xc1, 0xb1, 0x3f, 0xb5, 0xf8, 0x90, 0x10, 
-       0x00, 0x16, 0xf9, 0x5e, 0xb5, 0xfc, 0xd0, 0x20, 
-       0x40, 0x39, 0x2e, 0x4b, 0x22, 0x4c, 0x12, 0x20, 
-       0xe9, 0x59, 0x20, 0x39, 0x00, 0x1b, 0xe9, 0x59, 
-       0x2c, 0x13, 0x35, 0x13, 0x0e, 0x5a, 0xf9, 0x59, 
-       0xb2, 0x38, 0x02, 0xe3, 0xd0, 0x00, 0x0e, 0x5a, 
-       0xe9, 0x5e, 0x2e, 0x40, 0x01, 0xee, 0xd2, 0x80, 
-       0x42, 0x84, 0xc0, 0x03, 0x30, 0x02, 0xf5, 0x6b, 
-       0x31, 0x0a, 0x12, 0x98, 0x20, 0x03, 0xf5, 0x69, 
-       0x12, 0x9f, 0x12, 0x87, 0x51, 0x0a, 0x00, 0x34, 
-       0xd4, 0xf0, 0xe0, 0x36, 0x50, 0x00, 0x50, 0x00, 
-       0xd3, 0xc7, 0x43, 0xc4, 0x15, 0x61, 0xf9, 0x48, 
-       0x10, 0xc1, 0xd5, 0xe0, 0xd1, 0x80, 0xd1, 0xc0, 
-       0x31, 0x0f, 0x13, 0xe1, 0xe9, 0x3c, 0xd3, 0xc0, 
-       0x00, 0x24, 0xd0, 0x30, 0x63, 0xc0, 0x25, 0xcf, 
-       0x15, 0xc2, 0xd0, 0x03, 0x40, 0x16, 0x25, 0xc0, 
-       0x15, 0xc2, 0x15, 0x81, 0x35, 0x91, 0xe1, 0x5c, 
-       0x00, 0x24, 0xd0, 0x30, 0x63, 0xc0, 0x01, 0x50, 
-       0xe9, 0x54, 0x15, 0xa0, 0xf9, 0x55, 0x00, 0x24, 
-       0xd0, 0x34, 0x70, 0x00, 0x10, 0x20, 0xe9, 0x55, 
-       0xd3, 0xc0, 0x31, 0x0f, 0xd5, 0xfc, 0x25, 0xcf, 
-       0x15, 0xc3, 0x14, 0xa0, 0xe9, 0x5c, 0xb5, 0xfc, 
-       0x00, 0x34, 0xd4, 0xf0, 0xe0, 0x36, 0x50, 0x00, 
-       0xc4, 0x91, 0x34, 0x96, 0xed, 0x34, 0xd4, 0x80, 
-       0x14, 0x84, 0xb3, 0xc1, 0xe5, 0x41, 0xc0, 0x52, 
-       0x10, 0x5e, 0x34, 0x81, 0xb3, 0xc1, 0xe5, 0x41, 
-       0xc0, 0x52, 0x10, 0x5c, 0x24, 0x81, 0xb3, 0xc1, 
-       0xe5, 0x37, 0x02, 0xe8, 0xd0, 0x00, 0xb4, 0xb0, 
-       0x14, 0x9b, 0x00, 0x24, 0xd0, 0x60, 0x30, 0x52, 
-       0xed, 0x4a, 0x24, 0x81, 0x20, 0x12, 0xa0, 0x1c, 
-       0x10, 0x8a, 0x50, 0x83, 0xa0, 0x96, 0xa1, 0x50, 
-       0xa1, 0x11, 0xc0, 0x52, 0xd4, 0x84, 0x10, 0x6c, 
-       0xed, 0x56, 0xd4, 0x81, 0xd1, 0x00, 0xb1, 0x17, 
-       0x00, 0x23, 0xd1, 0x40, 0xc2, 0xb9, 0x22, 0x86, 
-       0x12, 0x20, 0xf9, 0x66, 0x02, 0xe3, 0xd0, 0x40, 
-       0x02, 0x9a, 0xe9, 0x63, 0x22, 0x81, 0x02, 0x5a, 
-       0xe9, 0x66, 0x22, 0x41, 0x75, 0xd7, 0xc3, 0xd7, 
-       0xd0, 0xd7, 0x00, 0x21, 0xd0, 0xb6, 0x8b, 0x38, 
-       0x00, 0x33, 0xdd, 0x08, 0xe0, 0x36, 0x50, 0x00, 
-       0xd0, 0x7c, 0x60, 0x01, 0xae, 0x52, 0xd0, 0x60, 
-       0x40, 0x79, 0x00, 0x13, 0xe8, 0xc9, 0xa2, 0x94, 
-       0x22, 0x86, 0x13, 0xe0, 0xe4, 0xd0, 0x13, 0xc1, 
-       0x15, 0x62, 0xfc, 0xd1, 0x13, 0xc1, 0xe0, 0xd1, 
-       0xc3, 0xd7, 0x03, 0xd9, 0xe8, 0xd4, 0x22, 0x8d, 
-       0x15, 0x62, 0xfc, 0xda, 0x03, 0xda, 0xe8, 0xda, 
-       0x22, 0x8d, 0x22, 0x8d, 0xce, 0x4a, 0x22, 0x86, 
-       0x00, 0x14, 0xe8, 0xe0, 0xa2, 0x53, 0x22, 0x47, 
-       0x03, 0xd1, 0xe8, 0xe8, 0x22, 0x4e, 0x15, 0x62, 
-       0xfc, 0xe8, 0x03, 0xd2, 0xe8, 0xe8, 0x22, 0x4e, 
-       0x12, 0x20, 0xe9, 0x09, 0x20, 0x79, 0x00, 0x5b, 
-       0xe8, 0xf4, 0x15, 0x20, 0xfc, 0xf1, 0x2c, 0x13, 
-       0x35, 0x13, 0x0e, 0x5b, 0xe8, 0xf4, 0xb2, 0x38, 
-       0x02, 0x9a, 0xe8, 0xfb, 0x70, 0x08, 0xd0, 0x7c, 
-       0x42, 0x81, 0x22, 0x98, 0x22, 0x80, 0x02, 0x5a, 
-       0xe9, 0x11, 0x70, 0x08, 0xd0, 0x78, 0x42, 0x41, 
-       0x22, 0x59, 0x10, 0x1f, 0x22, 0x40, 0x00, 0x19, 
-       0xe9, 0x11, 0x01, 0x69, 0xd0, 0x7c, 0x32, 0x41, 
-       0xe1, 0x11, 0x02, 0xe3, 0xd0, 0x40, 0x02, 0x9a, 
-       0xe9, 0x0e, 0x22, 0x81, 0x02, 0x5a, 0xe9, 0x11, 
-       0x22, 0x41, 0x0e, 0x5a, 0xe9, 0x15, 0xce, 0x4a, 
-       0x3e, 0x46, 0x0f, 0x87, 0xdd, 0x48, 0xe1, 0x19, 
-       0xdd, 0x40, 0xdc, 0xc8, 0xdd, 0x3c, 0x7d, 0x34, 
-       0x1d, 0x19, 0x3d, 0x35, 0x4d, 0x33, 0x4c, 0xec, 
-       0x3d, 0x33, 0xf9, 0x17, 0x0f, 0xc5, 0x50, 0x00, 
-       0xd0, 0x39, 0xd0, 0x35, 0xd0, 0x1d, 0xd0, 0x2d, 
-       0xd0, 0x3f, 0xd0, 0x2e, 0xd0, 0x3c, 0xd0, 0x37, 
-       0xd0, 0x33, 0xd0, 0x19, 0xd0, 0x33, 0xd0, 0x2e, 
-       0xd0, 0x3d, 0xd0, 0x3e, 0xd0, 0x27, 0xd0, 0x3e, 
-       0xd0, 0x3a, 0xd0, 0x2f, 0xd0, 0x32, 0x00, 0x00, 
-       0x00, 0x00, 0x46, 0x44, 0x00, 0x00, 0x10, 0x00, 
-       0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x50, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
-       0x00, 0x00, 0x02, 0xd0, 0x00, 0x00, 0x02, 0xd0, 
-       0x00, 0x00, 0x00, 0x1e, 0x00, 0x05, 0x46, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x90, 0x85, 
-       0x00, 0x00, 0xa6, 0xee, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x02, 0xd0, 0x00, 0x00, 0x01, 0xe0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x08, 0xa0, 
-       0x00, 0x08, 0x08, 0x28, 0x00, 0x08, 0x88, 0x68, 
-       0x00, 0x08, 0xa0, 0x98, 0x00, 0x08, 0x88, 0x68, 
-       0x00, 0x08, 0x28, 0x98, 0x00, 0x08, 0xac, 0xf4, 
-       0x00, 0x08, 0xb8, 0x7c, 0x00, 0x02, 0x02, 0x88, 
-       0x00, 0x02, 0x08, 0x22, 0x00, 0x02, 0x88, 0xaa, 
-       0x00, 0x02, 0x22, 0xaa, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x24, 
-       0x00, 0x04, 0x04, 0x24, 0x00, 0x04, 0x28, 0x6c, 
-       0x00, 0x04, 0x28, 0x6c, 0x00, 0x01, 0x10, 0x44, 
-       0x00, 0x01, 0x20, 0x44, 0x00, 0x01, 0x11, 0xaa, 
-       0x00, 0x01, 0x88, 0x55, 0x00, 0x01, 0x44, 0xaa, 
-       0x00, 0x01, 0x44, 0x55, 0x00, 0x20, 0x80, 0xa0, 
-       0x00, 0x20, 0x80, 0xc0, 0x00, 0x20, 0x20, 0xa0, 
-       0x00, 0x20, 0x40, 0xc0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xe0, 
-       0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x13, 0x16, 
-       0x1a, 0x1b, 0x1d, 0x22, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x13, 0x16, 
-       0x1a, 0x1b, 0x1d, 0x22, 0x10, 0x10, 0x16, 0x18, 
-       0x1b, 0x1d, 0x22, 0x25, 0x13, 0x16, 0x1a, 0x1b, 
-       0x1d, 0x22, 0x22, 0x26, 0x16, 0x16, 0x1a, 0x1b, 
-       0x1d, 0x22, 0x25, 0x28, 0x16, 0x1a, 0x1b, 0x1d, 
-       0x20, 0x23, 0x28, 0x30, 0x1a, 0x1b, 0x1d, 0x20, 
-       0x23, 0x28, 0x30, 0x3a, 0x1a, 0x1b, 0x1d, 0x22, 
-       0x26, 0x2e, 0x38, 0x45, 0x1b, 0x1d, 0x23, 0x26, 
-       0x2e, 0x38, 0x45, 0x53, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0xd6, 0x00, 
-       0x00, 0x1b, 0x08, 0x00, 0x00, 0x1f, 0xde, 0x00, 
-       0x00, 0x00, 0x50, 0x00, 0x00, 0x08, 0x39, 0x00, 
-       0x00, 0x10, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 
-       0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
-       0x05, 0x28, 0x20, 0x01, 0x00, 0x00, 0x01, 0xe0, 
-       0x71, 0x01, 0x00, 0x68, 0xe0, 0x7f, 0xb0, 0x7f, 
-       0x60, 0x40, 0xe0, 0x1d, 0x90, 0x10, 0xb4, 0x81, 
-       0xe8, 0xc0, 0xe0, 0xc2, 0x90, 0x18, 0x00, 0x8a, 
-       0x70, 0xc0, 0x0f, 0x87, 0xe3, 0xe8, 0xc0, 0x00, 
-       0x70, 0x40, 0xe0, 0x01, 0xe0, 0x86, 0x00, 0x26, 
-       0xd0, 0x28, 0xe0, 0x0e, 0xd0, 0x0e, 0x0f, 0x0b, 
-       0x70, 0x1d, 0xe0, 0x67, 0x0f, 0x87, 0x0f, 0x87, 
-       0x0f, 0x87, 0x0f, 0x87, 0x0f, 0x87, 0x02, 0x20, 
-       0xd0, 0x01, 0xe0, 0x25, 0x0f, 0x45, 0x6f, 0x81, 
-       0xdf, 0xa6, 0xe0, 0x36, 0xe1, 0x30, 0xa0, 0x37, 
-       0xc0, 0x00, 0xe0, 0x26, 0x00, 0x33, 0xde, 0xc8, 
-       0xe0, 0x32, 0x0f, 0xc5, 0x0f, 0x87, 0x00, 0x27, 
-       0xd0, 0x4c, 0xe0, 0x21, 0x00, 0x33, 0xdf, 0x28, 
-       0x00, 0x27, 0xd0, 0x56, 0x60, 0x01, 0xe0, 0x2d, 
-       0x03, 0xa0, 0xd0, 0x41, 0xa0, 0x78, 0x00, 0x60, 
-       0xd0, 0x41, 0xa0, 0x77, 0x00, 0x22, 0xd0, 0x58, 
-       0xa0, 0x76, 0x00, 0x21, 0xd0, 0x7c, 0x00, 0x4a, 
-       0xd0, 0x72, 0x70, 0x40, 0x00, 0x06, 0x0f, 0x87, 
-       0x00, 0x22, 0xdc, 0xf8, 0xf0, 0x4a, 0xe1, 0x70, 
-       0x07, 0xef, 0xdd, 0xbf, 0x4f, 0x36, 0x1d, 0x99, 
-       0x4d, 0x80, 0x10, 0x18, 0xdd, 0x50, 0x60, 0x35, 
-       0xdd, 0x72, 0xdd, 0x10, 0x3d, 0xb4, 0xec, 0x57, 
-       0x2d, 0x36, 0x1d, 0x03, 0xbd, 0x04, 0xe4, 0x2b, 
-       0x01, 0x46, 0x00, 0x06, 0xac, 0xf6, 0x80, 0x3f, 
-       0x0d, 0x0a, 0x10, 0x02, 0x7d, 0x40, 0x10, 0x1e, 
-       0xb0, 0x20, 0xbc, 0xe0, 0x00, 0x06, 0x00, 0xc6, 
-       0xe0, 0x52, 0xb7, 0x60, 0xb7, 0x60, 0xc0, 0x5d, 
-       0x30, 0x5f, 0xe4, 0x72, 0xc7, 0x5e, 0x00, 0xed, 
-       0xd0, 0x28, 0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 
-       0xc0, 0x1d, 0x30, 0x1c, 0xf8, 0x7e, 0x00, 0x21, 
-       0xd0, 0x01, 0x00, 0x26, 0xd0, 0x78, 0xa0, 0x38, 
-       0x80, 0x3f, 0x70, 0x01, 0xb0, 0x3f, 0x60, 0x01, 
-       0x0f, 0x87, 0x80, 0x34, 0x03, 0xef, 0xd8, 0x3f, 
-       0xa8, 0x38, 0x01, 0x35, 0xdc, 0x33, 0xe0, 0x46, 
-       0xc0, 0x1c, 0xe4, 0xa5, 0x97, 0x2e, 0x30, 0x1c, 
-       0xe8, 0x8e, 0x00, 0x21, 0xd0, 0x00, 0xa0, 0x38, 
-       0xc0, 0x5d, 0x00, 0x23, 0xd0, 0x00, 0x30, 0x40, 
-       0x30, 0x5e, 0xe4, 0x99, 0x20, 0x5e, 0xc0, 0x01, 
-       0x30, 0x1c, 0xec, 0xa4, 0xe0, 0x9d, 0x20, 0x5f, 
-       0xc0, 0x1c, 0x30, 0x01, 0xf4, 0xa5, 0xc0, 0x1c, 
-       0x30, 0x1d, 0xec, 0xa4, 0xe4, 0xa5, 0x90, 0x38, 
-       0x00, 0x1b, 0xe8, 0xa5, 0xa0, 0x66, 0xb1, 0x3f, 
-       0xe4, 0xb3, 0xe8, 0xb1, 0xc0, 0x4b, 0x30, 0x44, 
-       0xf8, 0xb3, 0x60, 0x45, 0xb1, 0x7c, 0x01, 0x20, 
-       0xd0, 0x00, 0xa0, 0x05, 0x80, 0x40, 0x72, 0xc5, 
-       0x00, 0x06, 0x90, 0x55, 0xd0, 0x01, 0x00, 0x40, 
-       0xa0, 0x55, 0x0f, 0x87, 0x01, 0x46, 0x00, 0x06, 
-       0x03, 0xef, 0xd0, 0x3f, 0xa0, 0x38, 0xb0, 0x01, 
-       0xa0, 0x37, 0x80, 0x3f, 0x82, 0x34, 0x80, 0x3f, 
-       0xf2, 0x1a, 0x80, 0x34, 0x80, 0x3f, 0xf2, 0x1a, 
-       0xd8, 0x00, 0xd8, 0x40, 0xd8, 0x80, 0xd8, 0xc0, 
-       0xd9, 0x00, 0xd9, 0x40, 0xd9, 0x80, 0xd9, 0xc0, 
-       0xda, 0x00, 0xda, 0x40, 0xda, 0x80, 0xda, 0xc0, 
-       0xdb, 0x00, 0xdb, 0x40, 0xdb, 0x80, 0xdb, 0xc0, 
-       0xdc, 0x00, 0xdc, 0x40, 0xdc, 0x80, 0xdc, 0xc0, 
-       0xdd, 0x00, 0xdd, 0x40, 0xdd, 0x80, 0xdd, 0xc0, 
-       0xde, 0x00, 0xde, 0x40, 0xde, 0x80, 0xde, 0xc0, 
-       0xdf, 0x00, 0xdf, 0x40, 0xdf, 0x80, 0xdf, 0xc0, 
-       0xde, 0x80, 0xde, 0xc1, 0x00, 0x28, 0xd0, 0x60, 
-       0x6e, 0x81, 0x80, 0x00, 0x80, 0x05, 0x00, 0xe3, 
-       0xd1, 0x88, 0x00, 0x73, 0xd5, 0x80, 0x60, 0x06, 
-       0xb1, 0xbc, 0x00, 0xfa, 0xd0, 0x80, 0x60, 0x06, 
-       0x00, 0x26, 0xd0, 0x6c, 0x6e, 0x81, 0x04, 0x32, 
-       0xd2, 0x00, 0x00, 0xee, 0xd1, 0x94, 0x60, 0x06, 
-       0x00, 0xed, 0xd0, 0x50, 0x6e, 0x81, 0x00, 0x22, 
-       0xd0, 0x70, 0x6e, 0x81, 0x00, 0xee, 0xd0, 0x74, 
-       0x6e, 0x81, 0xd0, 0x4c, 0x6e, 0x81, 0xd0, 0x02, 
-       0x00, 0xef, 0xd0, 0x6c, 0x60, 0x01, 0xd0, 0x03, 
-       0x00, 0xef, 0xd0, 0x70, 0x60, 0x01, 0x00, 0xe0, 
-       0xd0, 0x48, 0xd0, 0x02, 0x60, 0x01, 0x00, 0x32, 
-       0xd6, 0xf0, 0xa0, 0x1c, 0x00, 0x21, 0xd0, 0x60, 
-       0xa0, 0x76, 0x00, 0x34, 0xd5, 0x48, 0x80, 0x3f, 
-       0x00, 0x23, 0xd0, 0x5c, 0x00, 0x4a, 0xd0, 0x72, 
-       0x70, 0x40, 0x00, 0x06, 0x00, 0x22, 0xd1, 0xa4, 
-       0x6e, 0xc6, 0xd0, 0x58, 0x6e, 0xc1, 0xd0, 0xc9, 
-       0x00, 0xed, 0xd0, 0x54, 0x60, 0xc1, 0x00, 0x22, 
-       0xd0, 0x40, 0x60, 0xc1, 0x00, 0x22, 0xd0, 0x60, 
-       0x60, 0xc1, 0x82, 0x34, 0x80, 0x3f, 0xd6, 0xd9, 
-       0x01, 0x20, 0xd6, 0x22, 0x16, 0x08, 0xd0, 0x5e, 
-       0xd0, 0x2c, 0x60, 0x40, 0xd0, 0x70, 0x01, 0x74, 
-       0xd6, 0x00, 0x60, 0x01, 0x00, 0x2b, 0xd4, 0x10, 
-       0x00, 0x27, 0xd4, 0x60, 0x00, 0x2b, 0xd0, 0x90, 
-       0xc0, 0xc2, 0xd1, 0x08, 0xd1, 0x44, 0xa1, 0x50, 
-       0x00, 0x21, 0xd0, 0xb6, 0xd0, 0xd7, 0x00, 0x29, 
-       0xd0, 0x04, 0x64, 0x00, 0xb0, 0x3c, 0x64, 0x40, 
-       0x80, 0x34, 0x80, 0x3f, 0xd0, 0x40, 0x00, 0x35, 
-       0xd0, 0x00, 0x60, 0x01, 0xd0, 0x48, 0x6e, 0x81, 
-       0xd0, 0x44, 0x6e, 0x81, 0x00, 0x64, 0xd1, 0x80, 
-       0x6e, 0x86, 0x01, 0x3c, 0xd2, 0x39, 0xe0, 0x46, 
-       0xd0, 0x00, 0xd0, 0x40, 0xd0, 0x80, 0xd0, 0xc0, 
-       0xd1, 0x00, 0xd1, 0x40, 0xd1, 0x80, 0xd1, 0xc0, 
-       0xd2, 0x00, 0xd2, 0x40, 0xd2, 0x80, 0xd2, 0xc0, 
-       0xd3, 0x00, 0xd3, 0x40, 0xd3, 0x80, 0xd3, 0xc0, 
-       0xd4, 0x00, 0xd4, 0x40, 0xd4, 0x80, 0xd4, 0xc0, 
-       0xd5, 0x00, 0xd5, 0x40, 0xd5, 0x80, 0xd5, 0xc0, 
-       0xd6, 0x00, 0xd6, 0x40, 0xd6, 0x80, 0xd6, 0xc0, 
-       0xd7, 0x00, 0xd7, 0x40, 0xd7, 0x80, 0xd7, 0xc0, 
-       0x0f, 0xc5, 0x50, 0x00, 0x01, 0x46, 0x00, 0x06, 
-       0xde, 0x80, 0xde, 0xc1, 0x03, 0x2f, 0xd0, 0x33, 
-       0xa0, 0x38, 0xb0, 0x01, 0xa0, 0x37, 0x80, 0x3f, 
-       0x08, 0x20, 0xdf, 0x00, 0x82, 0x34, 0x80, 0x3f, 
-       0x00, 0xee, 0xd0, 0x08, 0x77, 0xc0, 0xb0, 0x04, 
-       0x77, 0x80, 0xb0, 0x04, 0xc0, 0x5f, 0x30, 0x5e, 
-       0x60, 0x40, 0xd7, 0x00, 0xb7, 0x01, 0x80, 0x34, 
-       0x80, 0x3f, 0x00, 0x60, 0xd0, 0x80, 0x00, 0xec, 
-       0xd0, 0x40, 0x60, 0x81, 0xb0, 0x7c, 0x60, 0x81, 
-       0x00, 0xa0, 0xd0, 0x80, 0xb0, 0x74, 0x60, 0x81, 
-       0xb0, 0x7c, 0x60, 0x81, 0x00, 0x68, 0xd0, 0x80, 
-       0x6e, 0x82, 0x00, 0xef, 0xd0, 0x8c, 0x6e, 0x82, 
-       0x00, 0x06, 0xd0, 0x11, 0xa0, 0x38, 0x80, 0x3f, 
-       0x08, 0x20, 0xd0, 0x40, 0x10, 0x48, 0xa0, 0x4a, 
-       0xa0, 0x5b, 0x0c, 0x20, 0xd0, 0x00, 0x10, 0x08, 
-       0xa0, 0x27, 0xa0, 0x0a, 0x90, 0x4d, 0x0f, 0xff, 
-       0xd8, 0x1f, 0x40, 0x40, 0xa0, 0x4d, 0x80, 0x0a, 
-       0x80, 0x07, 0x80, 0x1b, 0x80, 0x27, 0x00, 0x60, 
-       0xd0, 0x00, 0xa0, 0x09, 0x80, 0x28, 0x01, 0x20, 
-       0xd0, 0x67, 0xa0, 0x69, 0x80, 0x2a, 0x82, 0x29, 
-       0x80, 0x6a, 0x84, 0x29, 0xd0, 0x54, 0x10, 0x4f, 
-       0xa0, 0x6a, 0x01, 0x20, 0xd0, 0x00, 0xa0, 0x29, 
-       0x80, 0x2b, 0x02, 0x30, 0xd0, 0x00, 0xa0, 0x38, 
-       0x80, 0x3f, 0x01, 0xb0, 0xd0, 0x10, 0xa0, 0x37, 
-       0x80, 0x3f, 0x02, 0x30, 0xd0, 0x01, 0xa0, 0x38, 
-       0x00, 0xea, 0xd0, 0x00, 0xd0, 0x4e, 0x0f, 0x0b, 
-       0x70, 0x40, 0x00, 0x06, 0x00, 0x21, 0xd0, 0x88, 
-       0x00, 0xe1, 0xd0, 0x60, 0x60, 0x81, 0x00, 0x2b, 
-       0xd0, 0x80, 0x00, 0xe0, 0xd0, 0x6c, 0x60, 0x81, 
-       0xb0, 0x7c, 0x00, 0x27, 0xd0, 0xa0, 0x60, 0x81, 
-       0xb0, 0x7c, 0xd0, 0x82, 0x60, 0x81, 0xb0, 0x7c, 
-       0xd0, 0x85, 0x60, 0x81, 0xb0, 0x7c, 0x03, 0xaa, 
-       0xd0, 0x98, 0x60, 0x81, 0xb0, 0x7c, 0x6e, 0x81, 
-       0x00, 0x27, 0xd0, 0x40, 0x6e, 0x81, 0xb0, 0x7c, 
-       0x6e, 0x81, 0xb0, 0x7c, 0x6e, 0x81, 0x00, 0x27, 
-       0xd1, 0x90, 0x6e, 0x86, 0x00, 0x21, 0xd1, 0xb8, 
-       0x6e, 0x86, 0x00, 0x66, 0xd1, 0xa0, 0xd0, 0x00, 
-       0x01, 0x26, 0xd0, 0x58, 0x30, 0x01, 0x60, 0x06, 
-       0x00, 0xed, 0xd1, 0xbc, 0x6e, 0x86, 0x00, 0xec, 
-       0xd1, 0xb8, 0x6e, 0x86, 0xb1, 0x84, 0x6e, 0x86, 
-       0x00, 0xee, 0xd1, 0x84, 0x70, 0x46, 0x00, 0x65, 
-       0xd1, 0x94, 0x60, 0x46, 0x00, 0x64, 0xd1, 0xbc, 
-       0x6e, 0x86, 0x00, 0x65, 0xd1, 0x80, 0x6e, 0x86, 
-       0xb1, 0xbc, 0x6e, 0x86, 0xb1, 0xbc, 0x6e, 0x86, 
-       0x00, 0xed, 0xd1, 0xa8, 0x6e, 0x86, 0xd0, 0x0e, 
-       0xb1, 0xbc, 0x60, 0x06, 0xb1, 0xbc, 0x60, 0x06, 
-       0x00, 0x65, 0xd1, 0xa4, 0x60, 0x06, 0x00, 0x28, 
-       0xd1, 0xa4, 0x6e, 0x86, 0x00, 0x27, 0xd1, 0x98, 
-       0x6e, 0x86, 0x00, 0x64, 0xd1, 0xa4, 0x6e, 0x86, 
-       0xd2, 0x01, 0x00, 0x64, 0xd0, 0x60, 0x62, 0x01, 
-       0x00, 0x64, 0xd1, 0x80, 0x70, 0x46, 0x6e, 0x86, 
-       0x00, 0xef, 0xd1, 0x98, 0x70, 0x86, 0x08, 0x20, 
-       0xd0, 0xcf, 0x30, 0xc1, 0xea, 0x42, 0xd0, 0x81, 
-       0x00, 0x21, 0xd1, 0xa8, 0x60, 0x86, 0x00, 0xed, 
-       0xd1, 0xa0, 0x6e, 0xc6, 0x00, 0x65, 0xd1, 0x98, 
-       0x6e, 0xc6, 0x00, 0x22, 0xd0, 0x00, 0xa0, 0x05, 
-       0x80, 0x40, 0x00, 0xc6, 0x01, 0x73, 0xd4, 0x3d, 
-       0xe0, 0x46, 0x50, 0x00, 0x08, 0x20, 0xd0, 0x00, 
-       0x5f, 0x00, 0x00, 0x64, 0xd0, 0x60, 0x70, 0xc1, 
-       0x00, 0xec, 0xd0, 0x40, 0x71, 0x81, 0xb0, 0x7c, 
-       0x71, 0xc1, 0xc0, 0x87, 0x30, 0x86, 0xf9, 0x83, 
-       0x10, 0xee, 0xe9, 0x76, 0x10, 0xe1, 0xe9, 0x76, 
-       0xe2, 0x57, 0x00, 0x63, 0xd0, 0xbf, 0x72, 0x06, 
-       0xb1, 0xbc, 0x41, 0x82, 0x02, 0x1b, 0xe9, 0x8d, 
-       0x72, 0x86, 0xb1, 0xbc, 0x41, 0x82, 0xd0, 0x75, 
-       0x30, 0x48, 0xe9, 0xfe, 0xb0, 0x7f, 0xea, 0x00, 
-       0x02, 0x1c, 0xe9, 0x96, 0x15, 0xa3, 0xea, 0x57, 
-       0x10, 0xf0, 0xe9, 0x9a, 0x10, 0xfa, 0xf9, 0xa1, 
-       0x15, 0xa3, 0xea, 0x57, 0x00, 0x21, 0xd0, 0x4c, 
-       0x70, 0x41, 0x10, 0x61, 0xfa, 0x57, 0x00, 0xed, 
-       0xd0, 0x08, 0x70, 0x40, 0xd0, 0x85, 0x40, 0x42, 
-       0x60, 0x40, 0x00, 0x64, 0xd0, 0x64, 0x62, 0x01, 
-       0x12, 0x2b, 0xe9, 0xeb, 0x12, 0x3b, 0xe9, 0xd5, 
-       0x00, 0xec, 0xd0, 0x40, 0x61, 0x81, 0x12, 0x2d, 
-       0xe9, 0xbf, 0x12, 0x30, 0xe9, 0xd4, 0x12, 0x36, 
-       0xe9, 0xd4, 0x12, 0x3a, 0xe9, 0xd4, 0xd0, 0x62, 
-       0x30, 0x48, 0xe9, 0xf2, 0x12, 0x2e, 0xe9, 0xf9, 
-       0xe1, 0x76, 0x00, 0xed, 0xd0, 0x08, 0x70, 0x40, 
-       0xd0, 0x85, 0x40, 0x42, 0x60, 0x40, 0xb0, 0x08, 
-       0x00, 0x21, 0xd0, 0x41, 0x60, 0x40, 0x00, 0x64, 
-       0xd0, 0x60, 0x62, 0x01, 0xf2, 0x5a, 0x00, 0xed, 
-       0xd0, 0x20, 0xd0, 0x41, 0x60, 0x40, 0x10, 0xe1, 
-       0xea, 0x3a, 0xe2, 0x57, 0xe2, 0x53, 0x10, 0xee, 
-       0xf9, 0xe9, 0x01, 0x46, 0x82, 0x34, 0x80, 0x3f, 
-       0x97, 0x2e, 0xc7, 0x5c, 0xa7, 0x66, 0x81, 0x34, 
-       0x80, 0x3f, 0x00, 0x21, 0xd0, 0x01, 0xa0, 0x38, 
-       0x00, 0xc6, 0x00, 0x21, 0xd0, 0x15, 0x0b, 0x09, 
-       0x00, 0x4d, 0xb0, 0x01, 0xed, 0xe5, 0xd2, 0x1a, 
-       0xe1, 0xec, 0xf1, 0x18, 0x00, 0xec, 0xd0, 0x40, 
-       0x71, 0x81, 0xd0, 0x4e, 0x60, 0x46, 0xe2, 0x54, 
-       0xc0, 0x0a, 0x10, 0x06, 0x52, 0x80, 0x00, 0xed, 
-       0xd0, 0x40, 0x62, 0x81, 0xe2, 0x53, 0x00, 0x64, 
-       0xd0, 0x60, 0x62, 0x01, 0xf2, 0x5a, 0xe1, 0x70, 
-       0x12, 0xa3, 0xf6, 0x57, 0x15, 0xa1, 0xfa, 0x57, 
-       0x12, 0xa0, 0xea, 0x23, 0x00, 0x65, 0xd1, 0x1c, 
-       0xd0, 0x75, 0x30, 0x48, 0xea, 0x0a, 0xb1, 0x3c, 
-       0x71, 0x04, 0x11, 0x20, 0xfa, 0x11, 0x00, 0xec, 
-       0xd0, 0x40, 0x61, 0x81, 0xe2, 0x57, 0x12, 0xa1, 
-       0xea, 0x33, 0x00, 0xe2, 0xd0, 0x60, 0x70, 0x01, 
-       0xb0, 0x7c, 0x70, 0x41, 0x10, 0x0c, 0x50, 0x40, 
-       0x0c, 0x30, 0xd0, 0x00, 0x31, 0x01, 0xee, 0x21, 
-       0x21, 0x00, 0xe6, 0x57, 0xe2, 0x23, 0x31, 0x00, 
-       0xfe, 0x57, 0xd0, 0x75, 0x30, 0x48, 0xea, 0x28, 
-       0xf2, 0x5a, 0xe2, 0x0d, 0x00, 0xec, 0xd0, 0x40, 
-       0x71, 0x81, 0x00, 0x63, 0xd1, 0x3f, 0xb1, 0xbc, 
-       0x41, 0x84, 0x61, 0x81, 0xd0, 0x50, 0x60, 0x46, 
-       0xe2, 0x57, 0x00, 0xed, 0xd0, 0x7c, 0x70, 0x41, 
-       0x08, 0x20, 0xd0, 0x00, 0x10, 0x08, 0xe2, 0x1c, 
-       0xd2, 0x84, 0x00, 0xed, 0xd1, 0xa4, 0x62, 0x86, 
-       0xd5, 0x00, 0xb5, 0x01, 0x01, 0x46, 0x82, 0x34, 
-       0x80, 0x3f, 0xc7, 0x5e, 0x97, 0x2e, 0x81, 0x34, 
-       0x80, 0x3f, 0x02, 0xe8, 0xd0, 0x30, 0xa0, 0x37, 
-       0xa0, 0x38, 0x08, 0x20, 0xdf, 0x00, 0x80, 0x73, 
-       0x80, 0x3f, 0x00, 0xc6, 0x01, 0x7a, 0xde, 0x1a, 
-       0xe0, 0x46, 0xf2, 0x5a, 0x00, 0x64, 0xd0, 0x60, 
-       0x62, 0x01, 0x02, 0x3c, 0xda, 0x89, 0xe0, 0x46, 
-       0x00, 0x28, 0xd0, 0x64, 0x70, 0x81, 0x00, 0x22, 
-       0xd0, 0x00, 0x50, 0x80, 0x60, 0x81, 0x0f, 0xc5, 
-       0x50, 0x00, 0x50, 0x00, 0x00, 0xed, 0xd1, 0xa4, 
-       0x72, 0x86, 0x00, 0xef, 0xd1, 0x90, 0x70, 0x46, 
-       0x10, 0x5c, 0x10, 0x65, 0xed, 0x7d, 0xd0, 0x46, 
-       0xc0, 0x0a, 0x10, 0x40, 0x60, 0x46, 0x00, 0x22, 
-       0xd0, 0x73, 0x30, 0x54, 0xe9, 0x8e, 0x12, 0xa4, 
-       0xe9, 0xb5, 0x15, 0x20, 0xe9, 0xc0, 0xb0, 0x7b, 
-       0xe9, 0xc3, 0xb0, 0x41, 0xe9, 0xc9, 0xc0, 0x54, 
-       0x10, 0x5c, 0x10, 0x6e, 0xe9, 0xc6, 0xe1, 0xb5, 
-       0x00, 0x28, 0xd1, 0xb0, 0xd0, 0x00, 0x60, 0x06, 
-       0x12, 0xa4, 0xf9, 0xb2, 0x00, 0xed, 0xd1, 0x9c, 
-       0x62, 0x86, 0xd2, 0x80, 0x00, 0xed, 0xd1, 0xa4, 
-       0x62, 0x86, 0xd0, 0x02, 0x00, 0xec, 0xd1, 0xbc, 
-       0x60, 0x06, 0x00, 0x64, 0xd1, 0xa0, 0x72, 0x06, 
-       0x12, 0x21, 0xf9, 0xa6, 0xd2, 0x0d, 0x62, 0x06, 
-       0x00, 0xed, 0xd1, 0xa0, 0x61, 0x86, 0xd0, 0x0e, 
-       0x00, 0xed, 0xd1, 0xac, 0x60, 0x06, 0xb1, 0xbc, 
-       0x60, 0x06, 0x00, 0x65, 0xd1, 0xa4, 0x60, 0x06, 
-       0x01, 0x7e, 0xd2, 0x31, 0xe1, 0xcb, 0x01, 0x46, 
-       0x90, 0x49, 0x00, 0x60, 0xd0, 0x00, 0x50, 0x40, 
-       0xa0, 0x49, 0x80, 0x3f, 0x00, 0xc6, 0x0c, 0x09, 
-       0x05, 0x0d, 0xe1, 0x70, 0x01, 0xbe, 0xde, 0x41, 
-       0xe1, 0xcb, 0x01, 0xbb, 0xd8, 0x10, 0xe1, 0xcb, 
-       0x01, 0xbd, 0xd8, 0x0b, 0xe1, 0xcb, 0x03, 0xb8, 
-       0xda, 0x10, 0x01, 0x46, 0x90, 0x49, 0x00, 0x60, 
-       0xd1, 0x00, 0x50, 0x44, 0x30, 0x44, 0xa0, 0x49, 
-       0x80, 0x3f, 0x00, 0xc6, 0xe0, 0x46, 0x50, 0x00, 
-       0x50, 0x00, 0x50, 0x00, 0x01, 0xfa, 0xd2, 0x3d, 
-       0x00, 0x25, 0xdc, 0xd8, 0xf0, 0x4a, 0x00, 0x26, 
-       0xd0, 0x18, 0xd0, 0x40, 0x60, 0x40, 0x00, 0x28, 
-       0xd0, 0x24, 0x70, 0x40, 0xd0, 0x82, 0x50, 0x42, 
-       0x60, 0x40, 0x00, 0xec, 0xd0, 0xa4, 0x70, 0xc2, 
-       0x10, 0xe0, 0xf9, 0x81, 0x00, 0xec, 0xd1, 0x98, 
-       0xd0, 0x41, 0x60, 0x46, 0x70, 0xc2, 0x10, 0xe0, 
-       0xe9, 0x8e, 0xd0, 0x40, 0x60, 0x46, 0xe1, 0x81, 
-       0xd0, 0x40, 0x00, 0xe6, 0xd0, 0x10, 0x60, 0x40, 
-       0xb0, 0x3c, 0x60, 0x40, 0xb0, 0x3c, 0x60, 0x40, 
-       0xd0, 0xe0, 0x00, 0xea, 0xd0, 0x40, 0x00, 0xe8, 
-       0xd0, 0x82, 0x01, 0x46, 0x70, 0x01, 0xb0, 0x7c, 
-       0x60, 0x02, 0xb0, 0xbc, 0x00, 0x06, 0x00, 0xc6, 
-       0xb0, 0xc1, 0xed, 0x9b, 0x80, 0x49, 0xd6, 0x44, 
-       0xd5, 0x43, 0x00, 0xe0, 0xd1, 0x80, 0x00, 0x06, 
-       0x0b, 0x09, 0x01, 0x0d, 0x0b, 0x09, 0x61, 0x06, 
-       0xb1, 0xbc, 0x01, 0x4d, 0x09, 0x09, 0x61, 0x46, 
-       0xb1, 0xbc, 0x00, 0xcd, 0x09, 0x09, 0x10, 0xe4, 
-       0xed, 0xb8, 0x60, 0xc6, 0xb1, 0xbc, 0x00, 0xcd, 
-       0x60, 0xc6, 0x00, 0xed, 0xd0, 0x04, 0x70, 0x00, 
-       0x10, 0x20, 0xf9, 0xd3, 0x10, 0xe3, 0xe9, 0xc4, 
-       0x10, 0xe6, 0xf9, 0xd3, 0x01, 0x46, 0x90, 0x10, 
-       0x00, 0x20, 0xd0, 0x44, 0x50, 0x40, 0x00, 0xc6, 
-       0xa0, 0x50, 0x00, 0xa0, 0xd0, 0x00, 0xa0, 0x05, 
-       0x80, 0x40, 0x00, 0xed, 0xd1, 0xa4, 0xd0, 0x04, 
-       0x60, 0x06, 0x00, 0xee, 0xd1, 0xac, 0x73, 0x86, 
-       0x10, 0xe3, 0xe5, 0xde, 0xe9, 0xe3, 0x00, 0xe7, 
-       0xd0, 0x40, 0x00, 0xae, 0xd0, 0xbb, 0xe1, 0xe7, 
-       0x01, 0x24, 0xd0, 0x6b, 0x00, 0xea, 0xd0, 0xa6, 
-       0xe1, 0xe7, 0x01, 0x21, 0xd0, 0x7b, 0x00, 0xe8, 
-       0xd0, 0x90, 0x13, 0xa0, 0xf9, 0xea, 0xc0, 0x42, 
-       0x00, 0xe0, 0xd1, 0xa8, 0x60, 0x46, 0xb1, 0x98, 
-       0x0b, 0xc9, 0x00, 0x4d, 0x09, 0x09, 0x10, 0x44, 
-       0x00, 0x8d, 0x20, 0x42, 0x10, 0x5f, 0x60, 0x46, 
-       0xb1, 0xb8, 0x00, 0x90, 0xea, 0x17, 0x0a, 0x89, 
-       0x00, 0x8d, 0x60, 0x86, 0xb1, 0xbc, 0x08, 0x49, 
-       0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 0x08, 0x49, 
-       0x00, 0x4d, 0x60, 0x46, 0x10, 0x60, 0xea, 0x0b, 
-       0x00, 0xe8, 0xd1, 0x80, 0xf2, 0xb0, 0x10, 0x60, 
-       0xfa, 0x17, 0x08, 0x49, 0x00, 0xe0, 0xd1, 0xa4, 
-       0x00, 0x4d, 0x60, 0x46, 0x10, 0x60, 0xea, 0x1b, 
-       0x00, 0xe9, 0xd1, 0x80, 0xf2, 0xb0, 0x10, 0x60, 
-       0xea, 0x1b, 0x00, 0xe0, 0xd1, 0x88, 0xd0, 0x40, 
-       0x60, 0x46, 0xd0, 0x00, 0x00, 0xe0, 0xd1, 0xa8, 
-       0x70, 0x46, 0x00, 0xef, 0xd1, 0x9c, 0x70, 0x86, 
-       0xb0, 0xb0, 0xee, 0x25, 0xd0, 0x81, 0x00, 0x90, 
-       0xea, 0x28, 0x20, 0x01, 0x10, 0x41, 0x10, 0x9f, 
-       0x10, 0xa0, 0xee, 0x25, 0x10, 0x1c, 0x00, 0x65, 
-       0xd1, 0xa8, 0x60, 0x06, 0x01, 0xb4, 0xd4, 0x3a, 
-       0xe0, 0x46, 0x50, 0x00, 0x02, 0x31, 0xdc, 0x13, 
-       0x00, 0x27, 0xdc, 0xd8, 0xf0, 0x4a, 0x0c, 0x09, 
-       0x00, 0x06, 0x05, 0x0d, 0x00, 0x22, 0xd0, 0x72, 
-       0x30, 0x54, 0xe9, 0xea, 0xb0, 0x7d, 0xfa, 0x05, 
-       0x09, 0x09, 0x01, 0xcd, 0x11, 0xe1, 0xf9, 0xc7, 
-       0x80, 0x09, 0x80, 0x27, 0x0a, 0x09, 0xd6, 0x45, 
-       0x00, 0xe1, 0xd1, 0xa0, 0x00, 0x4d, 0x60, 0x46, 
-       0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 
-       0x00, 0x50, 0xe9, 0x91, 0xd4, 0x01, 0xb1, 0xbc, 
-       0x08, 0x89, 0x00, 0x4d, 0x60, 0x46, 0x00, 0xe0, 
-       0xd1, 0x80, 0x08, 0x89, 0x00, 0x4d, 0x08, 0x89, 
-       0x10, 0x4c, 0x71, 0x06, 0x21, 0x01, 0x61, 0x06, 
-       0xb1, 0xbc, 0x00, 0x4d, 0x0b, 0x49, 0x10, 0x4c, 
-       0x71, 0x46, 0x21, 0x41, 0x61, 0x46, 0xb1, 0xb0, 
-       0x00, 0x4d, 0x10, 0x5f, 0x60, 0x46, 0xb1, 0xbc, 
-       0x0a, 0x09, 0x00, 0x4d, 0x10, 0x4a, 0x70, 0x86, 
-       0x20, 0x81, 0x60, 0x86, 0x00, 0xe1, 0xd1, 0xac, 
-       0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
-       0x08, 0x89, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
-       0x09, 0x49, 0x00, 0x8d, 0x60, 0x86, 0xc0, 0x02, 
-       0x00, 0xe0, 0xd1, 0xa8, 0x70, 0xc6, 0x10, 0xc0, 
-       0xd0, 0x20, 0x30, 0x01, 0x10, 0xc0, 0x60, 0xc6, 
-       0xe1, 0x75, 0x11, 0xe2, 0xf9, 0x75, 0x00, 0xe2, 
-       0xd1, 0x80, 0x08, 0xc9, 0x00, 0x4d, 0x60, 0x46, 
-       0xb1, 0xbc, 0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 
-       0xb1, 0xbc, 0x10, 0x60, 0xf9, 0xd7, 0xb1, 0xb4, 
-       0xe1, 0xde, 0xd2, 0x03, 0x0a, 0x09, 0x00, 0x4d, 
-       0x60, 0x46, 0xb1, 0xbc, 0xb2, 0x01, 0xf9, 0xd8, 
-       0x0b, 0xc9, 0x00, 0x4d, 0x10, 0x49, 0x10, 0x56, 
-       0x60, 0x46, 0xb1, 0xbc, 0x0b, 0x89, 0x00, 0x4d, 
-       0x10, 0x4a, 0x10, 0x56, 0x60, 0x46, 0xe1, 0x75, 
-       0x0b, 0x2c, 0xd4, 0x40, 0xf3, 0xb0, 0xe1, 0x77, 
-       0x00, 0xe0, 0xd0, 0x6c, 0x00, 0xe0, 0xd1, 0x80, 
-       0xd0, 0x0a, 0xf1, 0xfe, 0x00, 0xe1, 0xd1, 0xb0, 
-       0xd0, 0x02, 0xf1, 0xfe, 0x00, 0xe0, 0xd1, 0x80, 
-       0x76, 0x86, 0xb1, 0xbc, 0x73, 0x46, 0xe2, 0x3c, 
-       0x70, 0x81, 0x60, 0x86, 0xb1, 0xbc, 0xb0, 0x7c, 
-       0xb0, 0x01, 0xed, 0xfe, 0x0f, 0xc5, 0x00, 0xe1, 
-       0xd1, 0xa0, 0x70, 0x46, 0xd0, 0x8f, 0x40, 0x42, 
-       0x00, 0x25, 0xd0, 0xe0, 0x00, 0x24, 0xd1, 0x20, 
-       0x10, 0x6a, 0xea, 0x1e, 0x00, 0x66, 0xd0, 0xe0, 
-       0x00, 0x62, 0xd1, 0x00, 0x10, 0x66, 0xea, 0x1e, 
-       0x00, 0x6e, 0xd0, 0xc0, 0x10, 0x64, 0xea, 0x1e, 
-       0x00, 0x2b, 0xd0, 0xd0, 0x00, 0x29, 0xd1, 0x00, 
-       0x00, 0xe0, 0xd1, 0x80, 0x76, 0x86, 0x16, 0xa0, 
-       0xe9, 0xee, 0x30, 0xda, 0xe5, 0xee, 0xb1, 0xbc, 
-       0x73, 0x46, 0x13, 0x60, 0xe9, 0xee, 0x31, 0x0d, 
-       0xe5, 0xee, 0xd0, 0x82, 0xb1, 0xbc, 0x70, 0x46, 
-       0x10, 0x60, 0xe9, 0xee, 0xb0, 0x81, 0xee, 0x2c, 
-       0x00, 0xe0, 0xd0, 0x40, 0x00, 0xe0, 0xd1, 0xac, 
-       0xd0, 0x0a, 0xf1, 0xfe, 0x00, 0xe1, 0xd0, 0x70, 
-       0xd0, 0x02, 0xf1, 0xfe, 0x00, 0xec, 0xd1, 0x98, 
-       0xd0, 0x40, 0x60, 0x46, 0x00, 0xe0, 0xd0, 0x8c, 
-       0x70, 0x82, 0x00, 0x21, 0xd0, 0x70, 0x60, 0x81, 
-       0xd0, 0x40, 0x00, 0x25, 0xd0, 0x20, 0x30, 0x1a, 
-       0xfa, 0x50, 0x00, 0x23, 0xd0, 0x30, 0x30, 0x0d, 
-       0xfa, 0x50, 0xd0, 0x41, 0x00, 0x21, 0xd1, 0x84, 
-       0x60, 0x46, 0xb6, 0xb1, 0x16, 0x9c, 0x01, 0x7a, 
-       0xde, 0x1a, 0xe0, 0x46, 0x02, 0x31, 0xdc, 0x13, 
-       0x00, 0x27, 0xdc, 0xd8, 0xf0, 0x4a, 0x00, 0xec, 
-       0xd0, 0xa8, 0x70, 0xc2, 0x10, 0xe0, 0xf9, 0x77, 
-       0x00, 0xec, 0xd1, 0x9c, 0xd0, 0x41, 0x60, 0x46, 
-       0x70, 0xc2, 0x10, 0xe0, 0xe9, 0x84, 0xd0, 0x40, 
-       0x60, 0x46, 0xe1, 0x77, 0x0b, 0x49, 0x00, 0xe2, 
-       0xd1, 0xa0, 0x00, 0x4d, 0x10, 0x5f, 0x00, 0x6f, 
-       0xd0, 0xff, 0x40, 0x43, 0x60, 0x46, 0xb1, 0xbc, 
-       0x0b, 0x09, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
-       0x08, 0x89, 0x00, 0x4d, 0x60, 0x46, 0x10, 0x61, 
-       0xf9, 0x9b, 0xd3, 0xc2, 0x00, 0xec, 0xd1, 0xbc, 
-       0x63, 0xc6, 0x0c, 0x09, 0x90, 0x4d, 0x10, 0x60, 
-       0xe5, 0x9c, 0x00, 0x06, 0x05, 0x0d, 0x00, 0x22, 
-       0xd0, 0x72, 0x30, 0x54, 0xf9, 0xa9, 0x0b, 0xa0, 
-       0xd4, 0x40, 0xf3, 0xb0, 0xe1, 0xa0, 0x00, 0xec, 
-       0xd1, 0x9c, 0xd0, 0x40, 0x60, 0x46, 0x01, 0x7a, 
-       0xde, 0x1a, 0xe0, 0x46, 0x0b, 0x09, 0x00, 0x4d, 
-       0x0b, 0x09, 0x00, 0x4d, 0x0a, 0x09, 0x01, 0x4d, 
-       0x0a, 0x09, 0x00, 0x4d, 0x01, 0x59, 0xe9, 0x96, 
-       0x09, 0x09, 0x00, 0x4d, 0x10, 0x5f, 0x10, 0x61, 
-       0xf9, 0x96, 0x09, 0x09, 0x01, 0x4d, 0x11, 0x5f, 
-       0x0b, 0xc9, 0x00, 0x4d, 0xc0, 0x01, 0x10, 0x5f, 
-       0x11, 0x4e, 0x51, 0x41, 0x08, 0x49, 0x00, 0x4d, 
-       0x0b, 0xc9, 0x10, 0x0f, 0x00, 0x4d, 0x50, 0x01, 
-       0x00, 0xed, 0xd1, 0xb6, 0x01, 0x46, 0x00, 0x06, 
-       0xa0, 0x3c, 0xa1, 0x7d, 0x60, 0x06, 0x00, 0xc6, 
-       0xd5, 0x00, 0xb5, 0x01, 0x01, 0x7a, 0xde, 0x1a, 
-       0xe0, 0x46, 0x50, 0x00, 0x00, 0xec, 0xd0, 0xac, 
-       0x70, 0xc2, 0x10, 0xe0, 0xf9, 0x70, 0x00, 0xec, 
-       0xd1, 0xa0, 0xd0, 0x41, 0x60, 0x46, 0x70, 0xc2, 
-       0x10, 0xe0, 0xe9, 0x7f, 0xd0, 0x40, 0x60, 0x46, 
-       0xe1, 0x70, 0x0a, 0x89, 0x0b, 0xcd, 0x00, 0xe3, 
-       0xd1, 0x80, 0x6b, 0xc6, 0x08, 0xc9, 0x05, 0x8d, 
-       0x15, 0xa3, 0xee, 0x6e, 0x15, 0xa0, 0xea, 0x6e, 
-       0x90, 0x4d, 0xd0, 0x9f, 0xd0, 0xdf, 0x40, 0x81, 
-       0x10, 0x55, 0x40, 0xc1, 0x01, 0x46, 0x82, 0x34, 
-       0x80, 0x3f, 0xc8, 0x1d, 0x81, 0x34, 0x80, 0x3f, 
-       0x00, 0xc6, 0xd1, 0x23, 0x31, 0x03, 0x11, 0x02, 
-       0x38, 0x04, 0xb0, 0x8d, 0x10, 0x9d, 0x28, 0x02, 
-       0xc0, 0x60, 0x00, 0x65, 0xd1, 0x94, 0x71, 0x06, 
-       0x68, 0x06, 0x30, 0x44, 0x00, 0xed, 0xd1, 0xa8, 
-       0x70, 0x06, 0x10, 0x20, 0xe9, 0xb0, 0x00, 0xee, 
-       0xd0, 0xc0, 0x70, 0xc3, 0x20, 0x43, 0xb0, 0x01, 
-       0xf9, 0xac, 0x60, 0x06, 0x00, 0x64, 0xd1, 0xbc, 
-       0x71, 0x06, 0xc0, 0x04, 0x21, 0x01, 0x61, 0x06, 
-       0x10, 0x20, 0xf5, 0xbb, 0x11, 0x20, 0xe5, 0xbb, 
-       0xb0, 0x41, 0x00, 0x65, 0xd1, 0x80, 0x71, 0x06, 
-       0x21, 0x01, 0x61, 0x06, 0x00, 0xed, 0xd1, 0xac, 
-       0x71, 0x06, 0x15, 0xa1, 0xe9, 0xcb, 0xb1, 0x3f, 
-       0x61, 0x06, 0x15, 0xa3, 0xf9, 0xd6, 0xd0, 0xbf, 
-       0xe1, 0xd3, 0xd0, 0x40, 0x60, 0x46, 0xb1, 0xbc, 
-       0x70, 0x86, 0x61, 0x06, 0x31, 0x02, 0xe5, 0xd3, 
-       0x20, 0x84, 0x00, 0x65, 0xd1, 0xa4, 0x60, 0x86, 
-       0xd9, 0x40, 0x00, 0xec, 0xd1, 0x94, 0x79, 0x06, 
-       0xb1, 0x84, 0x78, 0xc6, 0xc0, 0x63, 0x30, 0x64, 
-       0xe9, 0xf8, 0x00, 0xa7, 0xd0, 0xff, 0x7a, 0x63, 
-       0x00, 0x65, 0xd0, 0x00, 0x71, 0x00, 0x31, 0x29, 
-       0xe5, 0xf8, 0xc0, 0x63, 0xc8, 0xc1, 0xb0, 0x78, 
-       0x40, 0x43, 0xc0, 0xa4, 0x30, 0x81, 0xe9, 0xf2, 
-       0x7a, 0x41, 0x31, 0x29, 0xf5, 0xe8, 0x21, 0x29, 
-       0x61, 0x00, 0xb8, 0xfc, 0x79, 0x63, 0xb8, 0xfc, 
-       0x48, 0xc3, 0x68, 0xc6, 0x00, 0xed, 0xd1, 0xb8, 
-       0x69, 0x46, 0x80, 0x28, 0x0b, 0xc9, 0x00, 0x4d, 
-       0x08, 0x49, 0x10, 0x41, 0x00, 0xe3, 0xd1, 0x84, 
-       0x00, 0x8d, 0x20, 0x42, 0x60, 0x46, 0x00, 0xee, 
-       0xd1, 0xa4, 0x70, 0x86, 0x10, 0xa1, 0xee, 0x18, 
-       0xe6, 0x6b, 0x90, 0x86, 0x00, 0x90, 0xea, 0x18, 
-       0x00, 0xed, 0xd0, 0x1c, 0x70, 0x80, 0xb0, 0x81, 
-       0xe6, 0x6b, 0x60, 0x80, 0xb1, 0xa8, 0x70, 0x86, 
-       0x10, 0xa0, 0xfa, 0x6b, 0x00, 0x21, 0xd0, 0x38, 
-       0x70, 0x80, 0x10, 0xa0, 0xfa, 0x6b, 0x0f, 0xef, 
-       0xd0, 0xbf, 0x30, 0x81, 0xfa, 0x22, 0x60, 0x00, 
-       0x08, 0x20, 0xd0, 0x00, 0x5f, 0x00, 0x15, 0xa3, 
-       0xea, 0x6b, 0x00, 0xee, 0xd1, 0x80, 0x79, 0x46, 
-       0x00, 0xf8, 0xd0, 0x00, 0xc4, 0x40, 0x00, 0xe3, 
-       0xd1, 0x84, 0x78, 0x46, 0x0f, 0xef, 0xd0, 0x3f, 
-       0x30, 0x21, 0xea, 0x48, 0x00, 0xe0, 0xd1, 0x90, 
-       0x78, 0x06, 0xc0, 0xa1, 0x18, 0x43, 0x28, 0x42, 
-       0x18, 0x43, 0x28, 0x42, 0x18, 0x1e, 0xd8, 0x80, 
-       0x08, 0x11, 0xea, 0x41, 0x28, 0xa1, 0x18, 0x01, 
-       0x18, 0x5f, 0x18, 0x60, 0xee, 0x3e, 0xc0, 0x51, 
-       0x30, 0x62, 0xee, 0x4e, 0xc8, 0x91, 0x18, 0x9f, 
-       0x00, 0x21, 0xd1, 0xb8, 0xd0, 0x01, 0x60, 0x06, 
-       0x00, 0xef, 0xd0, 0x10, 0xd0, 0x72, 0x60, 0x40, 
-       0x01, 0x46, 0x82, 0x34, 0x80, 0x3f, 0xc8, 0xdc, 
-       0xc9, 0x1d, 0x81, 0x34, 0x80, 0x3f, 0x00, 0xc6, 
-       0x38, 0xe4, 0xee, 0x5e, 0xea, 0x52, 0x28, 0xe5, 
-       0x01, 0x46, 0x90, 0x6d, 0x28, 0xc1, 0x00, 0xc6, 
-       0x38, 0xe2, 0xf6, 0x6b, 0xdb, 0x08, 0xf1, 0x16, 
-       0xf1, 0x18, 0x00, 0x21, 0xd1, 0xb4, 0x61, 0x86, 
-       0xe2, 0x52, 0x01, 0xf7, 0xd0, 0x19, 0xe0, 0x46, 
-       0xd5, 0x00, 0xb5, 0x01, 0x01, 0x7a, 0xde, 0x1a, 
-       0xe0, 0x46, 0x50, 0x00, 0x02, 0x31, 0xdc, 0x13, 
-       0x00, 0x27, 0xdc, 0xd8, 0xf0, 0x4a, 0xdb, 0x09, 
-       0x00, 0xe3, 0xd0, 0x1c, 0x6b, 0x00, 0xda, 0xc1, 
-       0x00, 0xe6, 0xd1, 0x98, 0x70, 0x06, 0xb1, 0x84, 
-       0x60, 0x06, 0xb1, 0x84, 0x60, 0x06, 0x05, 0x9f, 
-       0xe9, 0x9f, 0x08, 0x49, 0xd1, 0x17, 0x46, 0x44, 
-       0x00, 0x4d, 0x10, 0x43, 0x26, 0x41, 0x08, 0xc9, 
-       0x05, 0xcd, 0xb5, 0xc1, 0xe5, 0xcc, 0xc0, 0x57, 
-       0x15, 0xc6, 0x25, 0xc1, 0x15, 0xa3, 0xf9, 0x9f, 
-       0x08, 0x49, 0xd1, 0x0f, 0x46, 0x44, 0x00, 0x4d, 
-       0x10, 0x44, 0x26, 0x41, 0x08, 0xc9, 0x06, 0x0d, 
-       0xb6, 0x01, 0xe5, 0xcc, 0xc0, 0x58, 0x16, 0x06, 
-       0x26, 0x01, 0x08, 0x49, 0x00, 0x4d, 0x10, 0x60, 
-       0xe9, 0xa6, 0x0a, 0x09, 0x00, 0x4d, 0xe1, 0x9f, 
-       0x0c, 0x09, 0x90, 0x4d, 0x10, 0x60, 0xe5, 0xa7, 
-       0x00, 0x06, 0x05, 0x0d, 0x00, 0x22, 0xd0, 0x72, 
-       0x30, 0x54, 0xf9, 0xb3, 0xd4, 0x40, 0xf3, 0xb0, 
-       0xe1, 0xab, 0xb0, 0x7d, 0xf9, 0xb8, 0x02, 0x34, 
-       0xd2, 0x44, 0xe0, 0x46, 0x00, 0xec, 0xd1, 0xa0, 
-       0xd0, 0x40, 0x60, 0x46, 0x02, 0x3c, 0xda, 0x89, 
-       0x00, 0xec, 0xd1, 0x80, 0x70, 0x46, 0xb1, 0xbc, 
-       0x70, 0x86, 0x30, 0x81, 0xe8, 0x46, 0x15, 0x63, 
-       0xe9, 0xc9, 0x05, 0x5e, 0xe8, 0x46, 0x01, 0x73, 
-       0xd4, 0x3d, 0xe0, 0x46, 0xd5, 0x00, 0xb5, 0x01, 
-       0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 0x50, 0x00, 
-       0x50, 0x00, 0x50, 0x00, 0xcc, 0xc0, 0xcd, 0x01, 
-       0xcd, 0x42, 0xcd, 0x83, 0x00, 0xa0, 0xd0, 0x01, 
-       0xa0, 0x38, 0xc8, 0x7f, 0xc8, 0x06, 0xb1, 0xbe, 
-       0xf3, 0x96, 0xc8, 0x80, 0xf3, 0x92, 0x58, 0x80, 
-       0xf3, 0x96, 0xc8, 0xc0, 0xf3, 0x96, 0xc9, 0x00, 
-       0xf3, 0x92, 0x58, 0xc0, 0xf3, 0x96, 0xc9, 0x40, 
-       0xf3, 0x92, 0x59, 0x40, 0xc0, 0x22, 0xc0, 0x65, 
-       0xc0, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc8, 0x80, 
-       0xf3, 0x92, 0x59, 0x00, 0xf3, 0x96, 0xc9, 0x40, 
-       0xf3, 0x96, 0xc9, 0x80, 0xf3, 0x92, 0x59, 0x40, 
-       0xf3, 0x96, 0xc9, 0xc0, 0xf3, 0x92, 0x58, 0x80, 
-       0xc0, 0x23, 0xc0, 0x62, 0xd0, 0x88, 0x20, 0x86, 
-       0xf3, 0x9a, 0xf3, 0x96, 0xc8, 0xc0, 0xf3, 0x92, 
-       0x58, 0xc0, 0xf3, 0x96, 0xc8, 0x80, 0xf3, 0x92, 
-       0x59, 0xc0, 0xc0, 0x24, 0xc0, 0x67, 0xd0, 0x90, 
-       0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x00, 
-       0xf3, 0x92, 0x59, 0x80, 0xf3, 0x96, 0xc9, 0xc0, 
-       0xf3, 0x96, 0xca, 0x00, 0xf3, 0x92, 0x59, 0xc0, 
-       0xf3, 0x96, 0xca, 0x40, 0xf3, 0x92, 0x59, 0x00, 
-       0xc0, 0x25, 0xc0, 0x64, 0xd0, 0x98, 0x20, 0x86, 
-       0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x40, 0xf3, 0x92, 
-       0x58, 0x80, 0xf3, 0x96, 0xc9, 0x00, 0xf3, 0x92, 
-       0x59, 0x00, 0xc0, 0x23, 0xc0, 0x64, 0xd0, 0x84, 
-       0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc8, 0xc0, 
-       0xf3, 0x92, 0x59, 0x40, 0xf3, 0x96, 0xc9, 0x00, 
-       0xf3, 0x92, 0x5a, 0x40, 0xc0, 0x26, 0xc0, 0x69, 
-       0xd0, 0xa0, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 
-       0xc9, 0x80, 0xf3, 0x92, 0x5a, 0x00, 0xf3, 0x96, 
-       0xca, 0x40, 0xf3, 0x92, 0x5a, 0x40, 0xf3, 0x96, 
-       0xca, 0x80, 0xf3, 0x92, 0x59, 0x80, 0xc0, 0x27, 
-       0xc0, 0x66, 0xd0, 0xa8, 0x20, 0x86, 0xf3, 0x9a, 
-       0xf3, 0x96, 0xc9, 0xc0, 0xf3, 0x92, 0x59, 0x00, 
-       0xf3, 0x96, 0xc9, 0x80, 0xf3, 0x92, 0x58, 0xc0, 
-       0xc0, 0x22, 0xc0, 0x63, 0xd0, 0x8c, 0x20, 0x86, 
-       0xf3, 0x9a, 0xf3, 0x92, 0x59, 0x80, 0xc0, 0x25, 
-       0xc0, 0x66, 0xd0, 0x94, 0x20, 0x86, 0xf3, 0x9a, 
-       0xf3, 0x96, 0xc8, 0x80, 0xf3, 0x92, 0x59, 0xc0, 
-       0xf3, 0x96, 0xc8, 0xc0, 0xf3, 0x92, 0x5a, 0x80, 
-       0xc0, 0x28, 0xc0, 0x6a, 0xd0, 0xb0, 0x20, 0x86, 
-       0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x40, 0xf3, 0x92, 
-       0x59, 0x40, 0xc0, 0x29, 0xc0, 0x65, 0xd0, 0xb8, 
-       0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x80, 
-       0xf3, 0x92, 0x58, 0xc0, 0xf3, 0x96, 0xca, 0x00, 
-       0xf3, 0x92, 0x58, 0x80, 0xc0, 0x24, 0xc0, 0x62, 
-       0xd0, 0x9c, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x92, 
-       0x5a, 0x00, 0xc0, 0x27, 0xc0, 0x68, 0xd0, 0xa4, 
-       0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xca, 0x80, 
-       0xf3, 0x92, 0x59, 0x80, 0xf3, 0x96, 0xca, 0x40, 
-       0xf3, 0x92, 0x5a, 0x40, 0xf3, 0x96, 0xc9, 0x40, 
-       0xf3, 0x92, 0x5a, 0x80, 0xc0, 0x23, 0xc0, 0x6a, 
-       0xd0, 0xac, 0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x92, 
-       0x59, 0x40, 0xc0, 0x26, 0xc0, 0x65, 0xd0, 0xb4, 
-       0x20, 0x86, 0xf3, 0x9a, 0xf3, 0x96, 0xc9, 0x00, 
-       0xf3, 0x92, 0x59, 0x00, 0xc0, 0x29, 0xc0, 0x64, 
-       0xd0, 0xbc, 0x20, 0x86, 0xf3, 0x9a, 0xc0, 0x33, 
-       0xc0, 0x74, 0xc0, 0xb5, 0xc0, 0xf6, 0xd0, 0x40, 
-       0x00, 0xa0, 0xd8, 0x00, 0xa8, 0x38, 0x08, 0x45, 
-       0x0a, 0x09, 0x00, 0x0d, 0x0f, 0xc5, 0x50, 0x00, 
-       0x0a, 0x09, 0x00, 0x0d, 0x10, 0x08, 0x0f, 0xc5, 
-       0x01, 0x46, 0x00, 0x06, 0xa0, 0x7c, 0xa0, 0x3d, 
-       0x60, 0x42, 0x00, 0xc6, 0x0f, 0xc5, 0x50, 0x00, 
-       0x50, 0x00, 0x50, 0x00, 0x14, 0x48, 0xd0, 0x81, 
-       0x00, 0xef, 0xd1, 0x8c, 0x71, 0x46, 0x11, 0x60, 
-       0xfb, 0xb1, 0x60, 0x86, 0x71, 0x46, 0x31, 0x42, 
-       0xfb, 0xb1, 0x00, 0xec, 0xd1, 0x0c, 0x74, 0x84, 
-       0x00, 0x68, 0xd0, 0x80, 0x70, 0x02, 0x10, 0x20, 
-       0xfb, 0xc4, 0xc4, 0x82, 0xc4, 0xd2, 0xb4, 0xfc, 
-       0xda, 0x00, 0xda, 0x4f, 0x0a, 0x09, 0x0f, 0xef, 
-       0xd0, 0x3f, 0xb4, 0x7f, 0xca, 0x29, 0x1a, 0x18, 
-       0x4a, 0x00, 0x1a, 0x48, 0x00, 0x8d, 0x2a, 0x42, 
-       0xd0, 0x03, 0x40, 0x11, 0xfb, 0xe3, 0xb4, 0x44, 
-       0x00, 0xa0, 0xd0, 0xc0, 0x30, 0xd3, 0xff, 0xe3, 
-       0xb4, 0xfe, 0x01, 0x46, 0x00, 0x06, 0xaa, 0x3d, 
-       0xaa, 0x7c, 0x6a, 0x53, 0x00, 0xc6, 0xb4, 0xfe, 
-       0xb4, 0x7c, 0x1a, 0x61, 0xfb, 0xc8, 0xb4, 0x43, 
-       0x00, 0xef, 0xd0, 0x3f, 0x40, 0x11, 0xeb, 0xf7, 
-       0xb0, 0xc4, 0xe7, 0xf7, 0xeb, 0xee, 0x61, 0x53, 
-       0x64, 0x52, 0x64, 0xc4, 0x00, 0x28, 0xd1, 0x24, 
-       0x70, 0x04, 0x00, 0x21, 0xd0, 0x80, 0x50, 0x02, 
-       0x60, 0x04, 0x61, 0x46, 0x0a, 0x09, 0x0f, 0xc5, 
-       0x50, 0x00, 0x50, 0x00, 0x02, 0x31, 0xdc, 0x13, 
-       0x00, 0x27, 0xdc, 0xd8, 0xf0, 0x4a, 0x01, 0xfa, 
-       0xd2, 0x3d, 0x00, 0x25, 0xdc, 0xd8, 0xf0, 0x4a, 
-       0x09, 0x09, 0x01, 0xcd, 0x11, 0xe8, 0xf9, 0xe2, 
-       0x00, 0xe3, 0xd1, 0x9c, 0x09, 0x09, 0x05, 0xcd, 
-       0xb5, 0xc1, 0x09, 0x09, 0x00, 0x4d, 0xb0, 0x41, 
-       0x10, 0x46, 0x25, 0xc1, 0x09, 0x09, 0x06, 0x0d, 
-       0xb6, 0x01, 0x09, 0x09, 0x00, 0x4d, 0x08, 0x89, 
-       0xb0, 0x41, 0x10, 0x46, 0x26, 0x01, 0x00, 0x8d, 
-       0x08, 0x89, 0x10, 0x82, 0xd0, 0x04, 0xc0, 0x55, 
-       0x00, 0x40, 0x40, 0x40, 0x05, 0x4d, 0x08, 0x49, 
-       0x0b, 0x0d, 0xd1, 0x00, 0x15, 0x63, 0xe9, 0xa2, 
-       0xd1, 0x01, 0x55, 0x41, 0xdb, 0x01, 0x4b, 0x15, 
-       0xa1, 0x1b, 0x08, 0x89, 0x00, 0x4d, 0x08, 0x49, 
-       0x10, 0x41, 0xd1, 0x19, 0x46, 0x44, 0x26, 0x41, 
-       0x00, 0xcd, 0x08, 0x49, 0x10, 0xc4, 0x00, 0x4d, 
-       0x08, 0x49, 0x10, 0x41, 0x20, 0x81, 0xa0, 0x89, 
-       0x00, 0x4d, 0x10, 0x43, 0x20, 0xc1, 0xa0, 0xe8, 
-       0x08, 0x49, 0x00, 0x4d, 0x1b, 0x03, 0x5b, 0x01, 
-       0xbb, 0x3f, 0x6b, 0x06, 0x08, 0x49, 0xb1, 0xbc, 
-       0x00, 0x4d, 0x60, 0x46, 0x08, 0x49, 0xb1, 0xbc, 
-       0x0a, 0xcd, 0x1a, 0xc2, 0x4a, 0xd9, 0x1a, 0xde, 
-       0x6a, 0xc6, 0x08, 0x49, 0xb1, 0xbc, 0x00, 0x4d, 
-       0x60, 0x46, 0x10, 0x60, 0xea, 0x3e, 0xb1, 0xbc, 
-       0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
-       0x08, 0xc9, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
-       0x08, 0x49, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
-       0x09, 0xc9, 0x00, 0x4d, 0x60, 0x46, 0xb1, 0xbc, 
-       0x0a, 0x09, 0x00, 0x4d, 0x60, 0x46, 0xe2, 0x3e, 
-       0x11, 0xe3, 0xfa, 0x00, 0x00, 0xe7, 0xd0, 0xc0, 
-       0xd0, 0x84, 0xb0, 0x81, 0xe6, 0x3e, 0x08, 0x49, 
-       0x00, 0x4d, 0x60, 0x43, 0xb0, 0xfc, 0x10, 0x60, 
-       0xe9, 0xe7, 0x10, 0xa3, 0xf9, 0xf4, 0x00, 0xe8, 
-       0xd1, 0x80, 0xe1, 0xf8, 0x10, 0xa2, 0xf9, 0xfa, 
-       0x00, 0xe9, 0xd1, 0x80, 0xf2, 0xb0, 0xe1, 0xe7, 
-       0xd2, 0x3f, 0x0a, 0x09, 0x00, 0x4d, 0xb2, 0x01, 
-       0xf5, 0xfb, 0xe1, 0xe7, 0x11, 0xe7, 0xfa, 0x3e, 
-       0xd4, 0x01, 0x00, 0xe1, 0xd0, 0x24, 0x70, 0x00, 
-       0x10, 0x21, 0xea, 0x0d, 0x15, 0x63, 0xfa, 0x0d, 
-       0xd4, 0x03, 0x44, 0x2c, 0xb4, 0x3f, 0x00, 0xe6, 
-       0xd1, 0x90, 0x0b, 0x09, 0x00, 0x4d, 0x09, 0x49, 
-       0x10, 0x45, 0x00, 0x8d, 0x50, 0x81, 0xd0, 0x40, 
-       0x10, 0x87, 0x10, 0x98, 0x30, 0x42, 0xf2, 0x61, 
-       0x60, 0x46, 0xb1, 0xbc, 0x0b, 0x09, 0x00, 0x0d, 
-       0x09, 0x49, 0x00, 0x0d, 0xb4, 0x01, 0xfa, 0x0f, 
-       0x00, 0xe6, 0xd0, 0x18, 0x30, 0x06, 0xe6, 0x29, 
-       0x60, 0x46, 0xb1, 0xbc, 0xe2, 0x22, 0x00, 0xe0, 
-       0xd1, 0x88, 0x70, 0x46, 0x10, 0x63, 0xea, 0x39, 
-       0x10, 0x64, 0xea, 0x39, 0x00, 0xe6, 0xd1, 0x90, 
-       0xd0, 0x00, 0x60, 0x06, 0xb1, 0xbc, 0x60, 0x06, 
-       0xb1, 0xbc, 0x60, 0x06, 0xe2, 0x3e, 0x00, 0xef, 
-       0xd1, 0x84, 0x70, 0x46, 0x10, 0x60, 0xfa, 0x30, 
-       0x0c, 0x09, 0x90, 0x4d, 0x10, 0x60, 0xe6, 0x3f, 
-       0x00, 0x06, 0x05, 0x0d, 0x00, 0x22, 0xd0, 0x72, 
-       0x30, 0x54, 0xfa, 0x4b, 0xd4, 0x40, 0xf3, 0xb0, 
-       0xe2, 0x43, 0xb0, 0x7d, 0xe9, 0x7a, 0x00, 0xec, 
-       0xd1, 0xa0, 0xd0, 0x40, 0x60, 0x46, 0x02, 0x3c, 
-       0xda, 0x89, 0x00, 0xec, 0xd1, 0x80, 0x70, 0x46, 
-       0xb1, 0xbc, 0x70, 0x86, 0x30, 0x81, 0xe8, 0x46, 
-       0x15, 0x63, 0xea, 0x5e, 0x05, 0x5e, 0xe8, 0x46, 
-       0x01, 0x73, 0xd4, 0x3d, 0xe0, 0x46, 0x00, 0xe0, 
-       0xd0, 0x00, 0x70, 0xc0, 0x10, 0xc1, 0x00, 0xe0, 
-       0xd0, 0x08, 0x70, 0x00, 0x10, 0x23, 0xea, 0x75, 
-       0xc0, 0x83, 0x10, 0x9d, 0x30, 0xc2, 0x10, 0x9f, 
-       0x30, 0xc2, 0x00, 0xef, 0xd0, 0xac, 0x70, 0x82, 
-       0x10, 0xa3, 0xea, 0x75, 0x10, 0xc1, 0xc0, 0x83, 
-       0x30, 0x81, 0xe6, 0x7e, 0xc0, 0x83, 0x20, 0x81, 
-       0xf6, 0x7f, 0xd0, 0x40, 0x30, 0x43, 0x0f, 0xc5, 
-       0xc0, 0x43, 0x0f, 0xc5, 0x00, 0xed, 0xd1, 0xa4, 
-       0x72, 0x86, 0x15, 0xa3, 0xee, 0x23, 0x15, 0xa1, 
-       0xe6, 0x23, 0x08, 0x20, 0xd0, 0x00, 0x5f, 0x00, 
-       0xd8, 0xc4, 0x15, 0x63, 0xe9, 0x7e, 0x48, 0xd5, 
-       0x18, 0xde, 0x18, 0xe0, 0xe9, 0xc2, 0x00, 0xed, 
-       0xd1, 0xb4, 0x79, 0xc6, 0x19, 0xe0, 0xe9, 0x8c, 
-       0x00, 0xed, 0xd0, 0x3a, 0x79, 0xc6, 0x69, 0xc0, 
-       0xd9, 0xc0, 0x69, 0xc6, 0x00, 0xed, 0xd0, 0x38, 
-       0x79, 0x40, 0x19, 0x60, 0xe9, 0x98, 0x00, 0x28, 
-       0xd0, 0x24, 0x70, 0x40, 0x02, 0x20, 0xd0, 0x80, 
-       0x50, 0x42, 0x60, 0x40, 0x15, 0xa3, 0xe9, 0x9f, 
-       0x00, 0xec, 0xd1, 0xb8, 0x79, 0xc6, 0x69, 0x46, 
-       0xc9, 0x67, 0x00, 0xec, 0xd9, 0xb4, 0x70, 0x66, 
-       0x00, 0xec, 0xd1, 0xbc, 0x70, 0x06, 0x10, 0x20, 
-       0xed, 0xbe, 0x10, 0x60, 0xe9, 0xc1, 0x00, 0xe0, 
-       0xda, 0xa8, 0x7a, 0xaa, 0xc0, 0x2a, 0x10, 0x1f, 
-       0x00, 0x22, 0xd0, 0xa0, 0x70, 0x82, 0x20, 0x6a, 
-       0x00, 0x9f, 0xe9, 0xb5, 0x20, 0x40, 0x19, 0x60, 
-       0xf9, 0xb8, 0xc9, 0x41, 0xb0, 0x48, 0x30, 0x65, 
-       0xf5, 0xbd, 0xb0, 0x70, 0xed, 0xbe, 0xd9, 0x40, 
-       0x00, 0xed, 0xd1, 0xbc, 0x69, 0x46, 0x69, 0x66, 
-       0x12, 0xa4, 0xea, 0x21, 0x00, 0xec, 0xd1, 0xbc, 
-       0x73, 0xc6, 0x15, 0xa3, 0xe9, 0xdf, 0x33, 0xe3, 
-       0xe5, 0xd3, 0xed, 0xd2, 0x63, 0xc6, 0x00, 0x21, 
-       0xd1, 0xa8, 0x63, 0xc6, 0x00, 0xed, 0xd1, 0xa0, 
-       0x63, 0xc6, 0x15, 0xa1, 0xf9, 0xdc, 0x12, 0xa3, 
-       0xe5, 0xe3, 0xd3, 0xc2, 0x00, 0xec, 0xd1, 0xbc, 
-       0x63, 0xc6, 0xe1, 0xe3, 0x12, 0xa3, 0xea, 0x21, 
-       0xe1, 0xe3, 0x12, 0xa2, 0xf6, 0x21, 0x13, 0xe0, 
-       0xfa, 0x21, 0x00, 0xee, 0xd1, 0x8c, 0x78, 0x06, 
-       0xb1, 0xbc, 0x78, 0x46, 0xb1, 0xbc, 0x78, 0x86, 
-       0xd1, 0x88, 0x72, 0x46, 0xd1, 0x84, 0x73, 0x06, 
-       0x13, 0x20, 0xf9, 0xe3, 0x00, 0x64, 0xd1, 0xa0, 
-       0x70, 0x46, 0xd0, 0xa2, 0x30, 0x81, 0xe9, 0xff, 
-       0x10, 0x70, 0xea, 0x11, 0x10, 0x6d, 0xea, 0x14, 
-       0x10, 0x76, 0xea, 0x19, 0x10, 0x7a, 0xea, 0x28, 
-       0xe2, 0x3b, 0x18, 0xe0, 0xea, 0x3b, 0x00, 0xed, 
-       0xd1, 0x80, 0x70, 0x86, 0xb0, 0x81, 0xd0, 0x3f, 
-       0x40, 0x02, 0x10, 0x20, 0xea, 0x0c, 0x60, 0x86, 
-       0xf3, 0x8a, 0xe1, 0xe3, 0xc0, 0x02, 0x10, 0x1a, 
-       0x50, 0x80, 0x60, 0x86, 0xe2, 0x3b, 0x15, 0xa3, 
-       0xea, 0x21, 0xe2, 0xe9, 0xd2, 0x80, 0x00, 0xed, 
-       0xd1, 0xa4, 0x62, 0x86, 0xe3, 0x0c, 0x00, 0xed, 
-       0xd1, 0x88, 0xd0, 0x60, 0x70, 0x06, 0x50, 0x40, 
-       0x60, 0x46, 0x15, 0xa3, 0xfb, 0x0c, 0xd5, 0x84, 
-       0xe3, 0x0c, 0xd5, 0x00, 0xb5, 0x01, 0x01, 0x7a, 
-       0xde, 0x1a, 0xe0, 0x46, 0x00, 0xed, 0xd1, 0x88, 
-       0xd0, 0x60, 0x70, 0x06, 0x50, 0x40, 0x60, 0x46, 
-       0x15, 0xa2, 0xe7, 0x0c, 0xee, 0x21, 0x00, 0x21, 
-       0xd1, 0x8c, 0x18, 0xe0, 0xfa, 0x39, 0x70, 0x46, 
-       0x10, 0x61, 0xea, 0x70, 0xe2, 0x21, 0x65, 0x86, 
-       0xe2, 0x21, 0x18, 0xe0, 0xea, 0x70, 0xd1, 0x80, 
-       0x73, 0x06, 0x15, 0xa2, 0xee, 0x68, 0x00, 0x22, 
-       0xd1, 0x80, 0x70, 0x46, 0x6b, 0x06, 0xcb, 0x01, 
-       0xb1, 0xb4, 0x70, 0x46, 0x6a, 0xc6, 0xca, 0xc1, 
-       0x00, 0x65, 0xd1, 0x98, 0x70, 0x46, 0x10, 0x61, 
-       0xfa, 0x50, 0x02, 0x41, 0xc3, 0x21, 0xc7, 0xe0, 
-       0x02, 0x50, 0xea, 0x56, 0xc3, 0x20, 0xc7, 0xe1, 
-       0xd1, 0x88, 0xd0, 0x01, 0x02, 0x40, 0x62, 0x46, 
-       0x0f, 0xef, 0xd0, 0x7f, 0x30, 0x6f, 0xfa, 0x5f, 
-       0xc3, 0x20, 0xc7, 0x4c, 0xd0, 0x00, 0x00, 0x65, 
-       0xd1, 0x98, 0x70, 0x46, 0x60, 0x06, 0xb0, 0x41, 
-       0x43, 0x01, 0xe2, 0x70, 0xc3, 0x22, 0xc7, 0xcc, 
-       0xc7, 0x60, 0xc7, 0xa1, 0x02, 0x50, 0xea, 0x70, 
-       0xc7, 0x61, 0xc7, 0xa0, 0xdb, 0x80, 0xd1, 0x00, 
-       0x00, 0xef, 0xd1, 0xa8, 0x70, 0x46, 0x10, 0x60, 
-       0xfa, 0x7a, 0x00, 0xe0, 0xd1, 0x88, 0x70, 0x46, 
-       0x00, 0x22, 0xd1, 0xb0, 0x70, 0x86, 0x30, 0x81, 
-       0xea, 0x82, 0x60, 0x46, 0xd0, 0x20, 0xf3, 0x06, 
-       0x10, 0x63, 0xea, 0x87, 0x10, 0x64, 0xea, 0x87, 
-       0xe2, 0x95, 0x00, 0xef, 0xd1, 0x6c, 0x71, 0x45, 
-       0xc0, 0x05, 0x30, 0x01, 0xf6, 0x95, 0xdb, 0x82, 
-       0xd1, 0x01, 0x10, 0x63, 0xea, 0x95, 0xd1, 0x02, 
-       0x11, 0x62, 0xea, 0x95, 0xd1, 0x03, 0xd1, 0x8c, 
-       0x61, 0x06, 0xdb, 0x40, 0x00, 0xe0, 0xd0, 0x00, 
-       0x71, 0x00, 0xc0, 0x84, 0x10, 0x9c, 0xb0, 0x96, 
-       0xfa, 0xa0, 0xb1, 0x38, 0xb0, 0x96, 0xfa, 0xa3, 
-       0xb1, 0x30, 0x00, 0x29, 0xd1, 0x84, 0x00, 0x22, 
-       0xd0, 0x74, 0x70, 0x86, 0x70, 0xc1, 0x61, 0x06, 
-       0x30, 0xc2, 0xea, 0xae, 0x60, 0x81, 0xdb, 0x41, 
-       0xb0, 0x3c, 0xb1, 0xbc, 0xb0, 0x7c, 0x71, 0x00, 
-       0x70, 0x86, 0x70, 0xc1, 0x61, 0x06, 0x30, 0xc2, 
-       0xea, 0xb9, 0x60, 0x81, 0xdb, 0x41, 0x00, 0xee, 
-       0xd1, 0xb4, 0x70, 0x06, 0xb1, 0xbc, 0x70, 0x46, 
-       0x30, 0x40, 0xea, 0xc2, 0x60, 0x06, 0xdb, 0x41, 
-       0x00, 0x23, 0xd0, 0x70, 0x30, 0x81, 0xea, 0xc7, 
-       0x30, 0x81, 0x50, 0x02, 0xea, 0xca, 0xd0, 0x01, 
-       0x00, 0x22, 0xd1, 0xbc, 0x70, 0x86, 0x30, 0x80, 
-       0xea, 0xd2, 0x60, 0x06, 0xd0, 0x10, 0xf3, 0x06, 
-       0x00, 0x22, 0xd1, 0xa4, 0x71, 0x06, 0xd0, 0x01, 
-       0x41, 0x00, 0x5b, 0x44, 0x5b, 0x6e, 0x6b, 0x46, 
-       0x00, 0x28, 0xd0, 0x70, 0x70, 0x41, 0x10, 0x62, 
-       0xfa, 0xe6, 0xd1, 0x84, 0x70, 0x06, 0x10, 0x20, 
-       0xfa, 0xdf, 0x00, 0x22, 0xd0, 0x00, 0xf3, 0x06, 
-       0x02, 0x7d, 0xdc, 0x62, 0xe0, 0x46, 0x00, 0xed, 
-       0xd1, 0x88, 0x71, 0x06, 0x01, 0x1f, 0xfa, 0xfd, 
-       0xd0, 0x41, 0x41, 0x01, 0xd0, 0x62, 0x00, 0x65, 
-       0xd0, 0x30, 0x70, 0x00, 0x10, 0x21, 0xea, 0xfa, 
-       0xee, 0xf9, 0x1a, 0xe1, 0xfa, 0xfa, 0xd0, 0x52, 
-       0x51, 0x01, 0x61, 0x06, 0xe3, 0x0c, 0x18, 0xe0, 
-       0xea, 0x70, 0xc7, 0x60, 0xc7, 0xe1, 0x02, 0x50, 
-       0xea, 0x70, 0xc7, 0x61, 0xc7, 0xe0, 0xe2, 0x70, 
-       0x00, 0x28, 0xdc, 0xa4, 0x7c, 0x72, 0x5c, 0x40, 
-       0x6c, 0x72, 0x0f, 0xc5, 0x18, 0xe0, 0xeb, 0x82, 
-       0xd9, 0x0d, 0x00, 0xee, 0xd1, 0xa4, 0x70, 0x06, 
-       0x10, 0x21, 0xfb, 0x7f, 0xd9, 0x0c, 0x90, 0x06, 
-       0x00, 0x10, 0xeb, 0x7f, 0x00, 0x21, 0xd1, 0x88, 
-       0x7a, 0x06, 0x1a, 0x20, 0xeb, 0x7f, 0xd9, 0x00, 
-       0x00, 0xed, 0xd1, 0xbc, 0x79, 0x46, 0x19, 0x60, 
-       0xeb, 0x7f, 0x39, 0x68, 0xc0, 0xe5, 0xc0, 0x25, 
-       0x10, 0x13, 0xb0, 0x0f, 0xef, 0x7f, 0xb0, 0x22, 
-       0xe7, 0x7f, 0x00, 0xe0, 0xd1, 0xa8, 0x71, 0x46, 
-       0x11, 0x5f, 0x29, 0x45, 0x00, 0x22, 0xd0, 0x18, 
-       0x00, 0x22, 0xd4, 0x54, 0x00, 0x22, 0xd0, 0x9c, 
-       0x70, 0x00, 0x74, 0x51, 0x70, 0x42, 0x34, 0x40, 
-       0xe7, 0x3c, 0xd0, 0x40, 0x00, 0x22, 0xd4, 0x50, 
-       0x74, 0x51, 0x34, 0x40, 0xef, 0x42, 0x20, 0x45, 
-       0x60, 0x42, 0x39, 0x41, 0x19, 0x60, 0xf7, 0x5e, 
-       0x00, 0x65, 0xd1, 0xa8, 0x7a, 0x86, 0x29, 0x6a, 
-       0x19, 0x59, 0xb9, 0x7e, 0xf7, 0x75, 0x15, 0xa3, 
-       0xf7, 0x57, 0x00, 0xed, 0xd1, 0xac, 0x70, 0x06, 
-       0x00, 0xed, 0xd1, 0xb0, 0x70, 0x46, 0x30, 0x01, 
-       0xfb, 0x7f, 0x00, 0x65, 0xd1, 0x84, 0x70, 0x46, 
-       0xb0, 0x7f, 0x60, 0x46, 0xd5, 0x84, 0xe3, 0x7f, 
-       0x11, 0x41, 0xd0, 0x4a, 0x00, 0xed, 0xd1, 0xa0, 
-       0x74, 0x46, 0xd0, 0x00, 0x60, 0x06, 0x30, 0xc5, 
-       0x39, 0x45, 0xe7, 0x6e, 0x14, 0x60, 0xeb, 0x6b, 
-       0xf3, 0x85, 0xb0, 0x41, 0xef, 0x65, 0xe3, 0x71, 
-       0x00, 0x66, 0xd1, 0xa0, 0x60, 0xc6, 0x15, 0xa3, 
-       0xeb, 0x7f, 0xf3, 0x85, 0xe3, 0x7f, 0xd9, 0x01, 
-       0x00, 0x66, 0xd1, 0xa0, 0x70, 0x06, 0x30, 0x03, 
-       0xe7, 0x7e, 0x10, 0x1d, 0x10, 0x3b, 0xe7, 0x7f, 
-       0x60, 0xc6, 0x00, 0x66, 0xd1, 0xa4, 0x69, 0x06, 
-       0x15, 0xa4, 0xea, 0x23, 0xe2, 0x3b, 0x00, 0x65, 
-       0xdd, 0x08, 0x7c, 0xf4, 0xbc, 0xff, 0x6c, 0xf4, 
-       0x00, 0xef, 0xdd, 0x10, 0x7c, 0xf4, 0xbc, 0xfe, 
-       0x6c, 0xf4, 0xc0, 0x3f, 0xf1, 0x18, 0xf1, 0x16, 
-       0xf1, 0x18, 0x00, 0x05, 0x08, 0x20, 0xd0, 0x40, 
-       0x5f, 0x01, 0x15, 0x63, 0xe9, 0x77, 0x05, 0x5e, 
-       0xea, 0xf2, 0x00, 0x22, 0xd1, 0xa0, 0x6b, 0x06, 
-       0x00, 0x22, 0xd1, 0xa8, 0x6b, 0xc6, 0x00, 0x22, 
-       0xd1, 0xac, 0x6a, 0xc6, 0x00, 0xee, 0xd0, 0x0c, 
-       0x00, 0xe6, 0xd1, 0x9c, 0x70, 0x40, 0x30, 0x5f, 
-       0xe9, 0x8d, 0xb0, 0x3c, 0xb1, 0xb4, 0x70, 0x40, 
-       0x30, 0x5f, 0xe9, 0x8d, 0xb1, 0xb4, 0x00, 0xe6, 
-       0xd0, 0x10, 0xd0, 0x83, 0x70, 0x40, 0x60, 0x46, 
-       0xb0, 0x3c, 0xb1, 0xbc, 0xb0, 0x81, 0xed, 0x90, 
-       0x00, 0xee, 0xd0, 0x0c, 0x00, 0xe6, 0xd1, 0x9c, 
-       0x70, 0x40, 0x30, 0x4c, 0xe9, 0xa3, 0xb0, 0x3c, 
-       0xb1, 0xb4, 0x70, 0x40, 0x30, 0x4c, 0xe9, 0xa3, 
-       0xb1, 0xb4, 0x00, 0xe6, 0xd0, 0x00, 0x61, 0x80, 
-       0x00, 0x21, 0xd1, 0xb4, 0x70, 0x06, 0x10, 0x20, 
-       0xe9, 0xae, 0xd0, 0x00, 0x60, 0x06, 0xf1, 0x18, 
-       0x00, 0x21, 0xd1, 0x8c, 0x70, 0x46, 0x65, 0x86, 
-       0xde, 0xc0, 0x00, 0xee, 0xd0, 0x20, 0x70, 0x00, 
-       0x10, 0x22, 0xfd, 0xb9, 0xde, 0xc2, 0x00, 0x21, 
-       0xd0, 0x04, 0x70, 0x00, 0x10, 0x21, 0xe9, 0xc0, 
-       0x15, 0xa3, 0xe9, 0xdc, 0xd0, 0x02, 0x4c, 0x00, 
-       0x10, 0x63, 0xe9, 0xc5, 0xcc, 0x3b, 0xd0, 0x04, 
-       0x63, 0x00, 0xd0, 0x00, 0x70, 0x00, 0x30, 0x1f, 
-       0xfa, 0xf2, 0xd0, 0x18, 0x70, 0x00, 0x10, 0x20, 
-       0xed, 0xc7, 0xd0, 0x04, 0x70, 0x80, 0x10, 0xa0, 
-       0xea, 0xf2, 0xf1, 0x16, 0x00, 0x21, 0xd0, 0x9a, 
-       0xc0, 0x39, 0x30, 0x1f, 0x10, 0x18, 0x30, 0x02, 
-       0xfd, 0xcf, 0xe2, 0xf2, 0x00, 0xe0, 0xd9, 0x04, 
-       0x79, 0x24, 0xb9, 0x38, 0x19, 0x1c, 0xd0, 0x1e, 
-       0x30, 0x24, 0xf5, 0xe5, 0x29, 0x00, 0xdc, 0x88, 
-       0x4c, 0xac, 0xd0, 0x02, 0x40, 0x2c, 0x10, 0x02, 
-       0x0c, 0x80, 0x10, 0x63, 0xea, 0x5a, 0x15, 0x63, 
-       0xf9, 0xf0, 0xf1, 0x18, 0xdc, 0x1e, 0x1e, 0xe0, 
-       0xe9, 0xf6, 0x15, 0x63, 0xf9, 0xf6, 0xbe, 0xfc, 
-       0xd0, 0x2c, 0x6c, 0x00, 0xcc, 0x24, 0xd9, 0x40, 
-       0x06, 0x50, 0xea, 0x0c, 0xc0, 0x24, 0xb0, 0x0f, 
-       0xfe, 0x0c, 0xd9, 0x74, 0x79, 0x65, 0x19, 0x5f, 
-       0x30, 0x25, 0xee, 0x05, 0x29, 0x40, 0x19, 0x5f, 
-       0x19, 0x41, 0xc0, 0x25, 0x20, 0x30, 0x30, 0x24, 
-       0xe6, 0x0c, 0x3c, 0x00, 0xd0, 0x38, 0x69, 0x40, 
-       0x1c, 0x05, 0xbc, 0x38, 0x3c, 0x32, 0x5c, 0x3b, 
-       0xbc, 0x3f, 0xd8, 0xec, 0x78, 0xe3, 0xc0, 0xa3, 
-       0x10, 0xaf, 0xf6, 0x19, 0xd0, 0x8f, 0x02, 0xe4, 
-       0xd8, 0x00, 0xd0, 0xc0, 0x20, 0xe0, 0xb0, 0x81, 
-       0xee, 0x1c, 0xd0, 0x30, 0x60, 0xc0, 0x00, 0xab, 
-       0xd0, 0x30, 0xc0, 0xc0, 0xd8, 0x40, 0xc1, 0x23, 
-       0xd4, 0x5e, 0x34, 0x63, 0xdc, 0x40, 0x0c, 0x1f, 
-       0xfa, 0x45, 0xc0, 0x65, 0xb0, 0x41, 0xe6, 0x31, 
-       0x68, 0x40, 0xb0, 0x3c, 0xe2, 0x2c, 0xc0, 0xc0, 
-       0x34, 0x65, 0xdc, 0x48, 0x4c, 0x70, 0x1c, 0x5f, 
-       0x20, 0xf1, 0x15, 0x63, 0xfa, 0x46, 0xf2, 0x3e, 
-       0xc1, 0x11, 0xc0, 0x83, 0xf2, 0x8f, 0xe2, 0x59, 
-       0xb1, 0x01, 0xe6, 0x44, 0x68, 0x40, 0x28, 0x60, 
-       0xb0, 0x3c, 0xe2, 0x3e, 0x0f, 0xc5, 0xd9, 0x40, 
-       0xb1, 0x0f, 0x11, 0x01, 0x21, 0x25, 0xf2, 0x3e, 
-       0xc1, 0x11, 0xb1, 0x01, 0xe6, 0x59, 0x20, 0x31, 
-       0x68, 0x40, 0x30, 0x31, 0xb0, 0x3c, 0x28, 0x60, 
-       0x70, 0x43, 0x30, 0x31, 0x60, 0x40, 0x20, 0x31, 
-       0xb0, 0x3c, 0xb0, 0xf8, 0xe2, 0x4b, 0xe2, 0xe1, 
-       0xd8, 0xec, 0x78, 0xe3, 0x00, 0xa8, 0xd0, 0x80, 
-       0x00, 0xa8, 0xd1, 0x44, 0x00, 0xab, 0xd0, 0x30, 
-       0xc0, 0xc0, 0x0c, 0x1f, 0xfa, 0x9d, 0xd9, 0x78, 
-       0x79, 0x65, 0x39, 0x25, 0x19, 0x5f, 0xc9, 0xa5, 
-       0x19, 0x83, 0x20, 0x26, 0x20, 0xe6, 0x20, 0xa6, 
-       0x21, 0x66, 0xc1, 0x23, 0xc0, 0x64, 0x10, 0x5f, 
-       0x10, 0x9d, 0x20, 0x81, 0x31, 0x01, 0x30, 0x44, 
-       0xf6, 0x78, 0x21, 0x01, 0x30, 0x84, 0x10, 0x83, 
-       0xc4, 0x64, 0x34, 0x63, 0xdc, 0x48, 0x4c, 0x70, 
-       0x1c, 0x5f, 0x15, 0x63, 0xfa, 0xad, 0x20, 0xb1, 
-       0xf2, 0x8f, 0xc1, 0x24, 0x11, 0x1f, 0xc0, 0x85, 
-       0x30, 0xb1, 0xf2, 0x8f, 0xc1, 0x11, 0xc0, 0x83, 
-       0x0c, 0x9d, 0xfa, 0x8d, 0xb0, 0xbc, 0xf2, 0x8f, 
-       0xe2, 0xd6, 0xb1, 0x01, 0xe6, 0x44, 0x70, 0x42, 
-       0xb0, 0xb8, 0x60, 0x40, 0xb0, 0x3c, 0xe2, 0x8f, 
-       0xb1, 0x01, 0xe6, 0x44, 0x70, 0x42, 0xb0, 0xb8, 
-       0x60, 0x40, 0xb0, 0x38, 0xe2, 0x96, 0x00, 0xab, 
-       0xd0, 0x34, 0xc1, 0x23, 0xb1, 0x0f, 0xf2, 0x96, 
-       0xd1, 0x1e, 0x31, 0x23, 0x00, 0xa8, 0xd0, 0x84, 
-       0xf2, 0x96, 0xd1, 0x0f, 0x00, 0xa8, 0xd0, 0x84, 
-       0xc0, 0x03, 0xf2, 0x96, 0xe2, 0xd6, 0xd8, 0x82, 
-       0x48, 0x95, 0x18, 0x81, 0xb1, 0x01, 0xe6, 0xc3, 
-       0x20, 0xb1, 0x70, 0x42, 0x30, 0xb1, 0x20, 0x22, 
-       0x60, 0x40, 0x30, 0x22, 0xb0, 0xbc, 0xb0, 0x3c, 
-       0x30, 0xb1, 0x70, 0x42, 0x20, 0xb1, 0x30, 0x22, 
-       0x60, 0x40, 0x20, 0x22, 0xb0, 0xbc, 0xb0, 0x3c, 
-       0xe2, 0xb0, 0xc1, 0x11, 0xc0, 0x85, 0x30, 0xb1, 
-       0x20, 0xe2, 0xb1, 0x01, 0xe6, 0xd6, 0x70, 0x42, 
-       0xb0, 0xb8, 0x20, 0x22, 0x60, 0x40, 0x30, 0x22, 
-       0xb0, 0x3c, 0x70, 0x43, 0xb0, 0xf8, 0x30, 0x22, 
-       0x60, 0x40, 0x20, 0x22, 0xb0, 0x3c, 0xe2, 0xc7, 
-       0xd0, 0x08, 0x5c, 0x00, 0x3c, 0x32, 0xd0, 0x04, 
-       0x40, 0x30, 0x3c, 0x00, 0x15, 0x63, 0xfa, 0xe1, 
-       0x1e, 0xe0, 0xea, 0xe1, 0xbc, 0x3c, 0x00, 0xab, 
-       0xd0, 0xb0, 0x00, 0xa8, 0xd0, 0x00, 0x00, 0x20, 
-       0xd1, 0x1e, 0x70, 0x42, 0xb0, 0xbc, 0x60, 0x40, 
-       0xb0, 0x3c, 0xb1, 0x01, 0xee, 0xe7, 0xd0, 0x30, 
-       0x30, 0x30, 0xee, 0xed, 0xd0, 0x04, 0x63, 0x00, 
-       0x08, 0x20, 0xd0, 0x40, 0x3f, 0x01, 0x02, 0xba, 
-       0xd0, 0x3c, 0xe0, 0x46, 0x01, 0x46, 0xd0, 0x08, 
-       0x94, 0x89, 0xd0, 0x8c, 0x44, 0x82, 0x14, 0x9e, 
-       0x30, 0x12, 0xd0, 0x88, 0x10, 0x80, 0x00, 0xe8, 
-       0xd1, 0x80, 0x70, 0xc6, 0x00, 0x06, 0xa0, 0xbd, 
-       0xa0, 0xfc, 0x80, 0x3f, 0xb1, 0xbe, 0x60, 0xc6, 
-       0x00, 0x06, 0x80, 0xa9, 0x80, 0x3f, 0x80, 0x2a, 
-       0x80, 0x3f, 0x00, 0x21, 0xd0, 0x3c, 0x00, 0x0a, 
-       0xb1, 0x82, 0xd0, 0x6b, 0x70, 0x46, 0x00, 0x06, 
-       0x80, 0x07, 0x01, 0x20, 0xd0, 0x67, 0xa0, 0x69, 
-       0x80, 0x2a, 0x82, 0x29, 0x80, 0x6a, 0x84, 0x29, 
-       0xd0, 0x54, 0x10, 0x4f, 0xa0, 0x6a, 0x01, 0x20, 
-       0xd0, 0x00, 0xa0, 0x29, 0x80, 0x2b, 0x0c, 0x20, 
-       0xd0, 0x00, 0x10, 0x08, 0xa0, 0x27, 0x90, 0x09, 
-       0xd0, 0x41, 0x40, 0x01, 0xd0, 0x44, 0x40, 0x70, 
-       0x20, 0x01, 0xa0, 0x27, 0x80, 0x3f, 0x00, 0xc6, 
-       0x15, 0x63, 0xe9, 0xae, 0x05, 0x5e, 0xe9, 0xbe, 
-       0x00, 0xe0, 0xd0, 0x40, 0x70, 0x81, 0x10, 0x9c, 
-       0xb0, 0x96, 0xf9, 0xb7, 0x00, 0x21, 0xd0, 0x40, 
-       0xe1, 0xbb, 0xb0, 0x96, 0xf9, 0xbe, 0x00, 0x22, 
-       0xd0, 0x40, 0x27, 0xc1, 0x27, 0x41, 0x27, 0x81, 
-       0x90, 0x83, 0x00, 0x64, 0xd0, 0x10, 0x60, 0x80, 
-       0x01, 0x46, 0x82, 0x34, 0x80, 0x3f, 0x00, 0x64, 
-       0xd0, 0x14, 0x67, 0x40, 0x80, 0x34, 0x80, 0x3f, 
-       0x00, 0xc6, 0x90, 0xae, 0x00, 0x64, 0xd0, 0x18, 
-       0x60, 0x80, 0x90, 0xa6, 0x00, 0x64, 0xd0, 0x1c, 
-       0x60, 0x80, 0x15, 0x63, 0xe9, 0xe3, 0x0c, 0x1f, 
-       0xe9, 0xe3, 0x05, 0x50, 0xf9, 0xe3, 0x15, 0xa3, 
-       0xf9, 0xe3, 0x90, 0x4d, 0x10, 0x60, 0xe5, 0xdb, 
-       0x00, 0x06, 0x05, 0x0d, 0x01, 0x7a, 0xde, 0x1a, 
-       0xe0, 0x46, 0x15, 0xa3, 0xf9, 0xfb, 0x00, 0x21, 
-       0xd0, 0x04, 0x70, 0x00, 0x10, 0x21, 0xe9, 0xfb, 
-       0xd0, 0x38, 0x70, 0x00, 0x15, 0x63, 0xe9, 0xef, 
-       0x10, 0x1f, 0x15, 0x21, 0xe5, 0xe0, 0xd0, 0x5e, 
-       0x30, 0x54, 0xe5, 0xe0, 0xc0, 0x40, 0xb0, 0x7f, 
-       0x30, 0x54, 0xe9, 0xfb, 0x0c, 0x09, 0x05, 0x0d, 
-       0xe1, 0xef, 0xc0, 0x5f, 0x10, 0x58, 0x10, 0x48, 
-       0x00, 0xee, 0xd0, 0x8c, 0xd0, 0xc3, 0x70, 0x02, 
-       0x30, 0x01, 0xea, 0x10, 0xb0, 0xbc, 0xb0, 0xc1, 
-       0xee, 0x01, 0x00, 0x26, 0xd0, 0x20, 0x70, 0x40, 
-       0xb0, 0x7f, 0x60, 0x40, 0x15, 0xa3, 0xea, 0x0f, 
-       0xb0, 0x88, 0x77, 0xc2, 0x80, 0x07, 0x09, 0x49, 
-       0xd4, 0x00, 0xd4, 0x40, 0xd4, 0x80, 0xd4, 0xc0, 
-       0x00, 0x4d, 0xa0, 0x6c, 0xd3, 0x80, 0xd0, 0xa1, 
-       0x00, 0x88, 0xd0, 0xa9, 0x00, 0x4d, 0x00, 0x50, 
-       0xfa, 0x1a, 0x0c, 0x49, 0x00, 0x8d, 0xc0, 0x42, 
-       0x10, 0x60, 0xea, 0x2a, 0xb0, 0x5e, 0xb0, 0x43, 
-       0xfe, 0x34, 0xd0, 0x61, 0x23, 0x81, 0xe2, 0x1f, 
-       0x0c, 0x09, 0x05, 0x0d, 0x15, 0x20, 0xfe, 0x31, 
-       0xd0, 0x5f, 0x30, 0x54, 0xee, 0x10, 0x03, 0xb3, 
-       0xd8, 0x29, 0xe0, 0x46, 0xc6, 0xd4, 0xb6, 0xc1, 
-       0xe6, 0x31, 0xd0, 0x5e, 0x30, 0x5b, 0xfe, 0x31, 
-       0xd7, 0x00, 0xb7, 0x01, 0xd3, 0x81, 0x00, 0x27, 
-       0xd0, 0x10, 0xd0, 0x81, 0x60, 0x80, 0x15, 0x63, 
-       0xfa, 0x54, 0x00, 0x22, 0xdc, 0xd8, 0x03, 0xf7, 
-       0xd2, 0x10, 0xf0, 0x4a, 0x15, 0xa3, 0xfa, 0x51, 
-       0x02, 0xf6, 0xde, 0x26, 0x0c, 0x10, 0xf8, 0x46, 
-       0x02, 0xfb, 0xda, 0x22, 0xe0, 0x46, 0x02, 0xf1, 
-       0xd8, 0x2b, 0xe0, 0x46, 0x00, 0x22, 0xdc, 0xd8, 
-       0x03, 0xf9, 0xd2, 0x10, 0xf0, 0x4a, 0x03, 0x34, 
-       0xdc, 0x20, 0x15, 0xa3, 0xe8, 0x46, 0x02, 0xff, 
-       0xde, 0x27, 0xe0, 0x46, 0x03, 0x75, 0xd2, 0x73, 
-       0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xe0, 
-       0xe1, 0xec, 0xe2, 0x12, 0xe2, 0x14, 0xe1, 0xc7, 
-       0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x8d, 0x06, 0x50, 
-       0xe9, 0x83, 0xc0, 0x54, 0x30, 0x5b, 0xb0, 0x42, 
-       0xf8, 0x11, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x5e, 
-       0x30, 0x5b, 0xfc, 0x11, 0xc0, 0x39, 0x30, 0x31, 
-       0x10, 0x12, 0x10, 0x20, 0xe9, 0x88, 0x03, 0x10, 
-       0xe9, 0x93, 0x0f, 0x19, 0xf9, 0x8f, 0xd1, 0x44, 
-       0xe1, 0x79, 0x03, 0xde, 0xf9, 0xba, 0x03, 0xdf, 
-       0xe9, 0x99, 0xd3, 0x40, 0xca, 0x50, 0xd1, 0x42, 
-       0xe2, 0xea, 0xc0, 0x50, 0x10, 0x54, 0xc0, 0x90, 
-       0x10, 0x8c, 0x10, 0x92, 0x10, 0xe0, 0xe5, 0xa8, 
-       0xc0, 0x01, 0x10, 0x01, 0x20, 0x40, 0xc0, 0x02, 
-       0x10, 0x01, 0x20, 0x80, 0x10, 0x60, 0xfd, 0xab, 
-       0xb0, 0x7f, 0x10, 0xa0, 0xfd, 0xae, 0xb0, 0xbf, 
-       0x10, 0x5f, 0x10, 0x9f, 0x00, 0xef, 0xd0, 0x3e, 
-       0x20, 0x52, 0x20, 0x83, 0x20, 0x93, 0x10, 0x4c, 
-       0x10, 0x82, 0x40, 0x80, 0x50, 0x42, 0x0f, 0xc5, 
-       0xcb, 0xaa, 0xcb, 0xeb, 0xca, 0x50, 0xd0, 0xc0, 
-       0xb0, 0xc1, 0xf1, 0x9b, 0xcb, 0x01, 0xd0, 0xc1, 
-       0xf1, 0x9b, 0xcb, 0x41, 0xba, 0x7f, 0xbb, 0x3f, 
-       0xe2, 0xea, 0xcc, 0x5b, 0x1c, 0x42, 0x2c, 0x5b, 
-       0xc0, 0x31, 0x1c, 0x43, 0x2c, 0x40, 0x1c, 0x48, 
-       0xcc, 0xb1, 0x1c, 0x9f, 0x06, 0xd0, 0xe9, 0xd5, 
-       0x01, 0x69, 0xd0, 0x20, 0x3c, 0x80, 0xc0, 0x1c, 
-       0x10, 0x08, 0x20, 0x1f, 0x2c, 0x40, 0x2c, 0x80, 
-       0x01, 0x74, 0xd6, 0x00, 0x2c, 0x80, 0xde, 0x84, 
-       0xde, 0xc4, 0xe3, 0x1e, 0xd3, 0xc2, 0xf2, 0xd3, 
-       0x13, 0xa0, 0xed, 0xe5, 0xf2, 0x32, 0xb3, 0x81, 
-       0xe9, 0xec, 0x80, 0x07, 0xd4, 0x00, 0xc4, 0x50, 
-       0xd3, 0x08, 0xe2, 0x95, 0xd0, 0x71, 0x20, 0x56, 
-       0x00, 0x48, 0xd1, 0x8c, 0x03, 0x0d, 0x41, 0x8c, 
-       0xe9, 0xfa, 0x06, 0x5e, 0xfa, 0x03, 0x08, 0x89, 
-       0x03, 0xcd, 0x13, 0xe3, 0xf9, 0xfa, 0xd3, 0xc4, 
-       0x06, 0x5e, 0xfa, 0x03, 0xd0, 0x43, 0x40, 0x4c, 
-       0xea, 0x03, 0x08, 0x49, 0x00, 0x8d, 0x10, 0x87, 
-       0x53, 0x02, 0x01, 0x46, 0x90, 0x2c, 0x00, 0xc6, 
-       0x03, 0x1c, 0xea, 0x0a, 0x09, 0x49, 0x00, 0x0d, 
-       0xd0, 0x9f, 0x40, 0x02, 0xb0, 0x20, 0x03, 0x19, 
-       0xea, 0x10, 0xb0, 0x20, 0xa0, 0x2c, 0xe2, 0x5b, 
-       0x06, 0x5f, 0xfa, 0x80, 0xd4, 0x00, 0xc4, 0x50, 
-       0xc4, 0x90, 0xc4, 0xd0, 0xe2, 0x8d, 0x50, 0x00, 
-       0x50, 0x00, 0x50, 0x00, 0x03, 0x75, 0xd2, 0x73, 
-       0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xd3, 
-       0xe1, 0xdc, 0xe2, 0x00, 0xe2, 0x02, 0xe1, 0xac, 
-       0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x91, 0x06, 0x50, 
-       0xe9, 0x83, 0xc0, 0x54, 0x30, 0x5b, 0xb0, 0x42, 
-       0xf8, 0x11, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x5e, 
-       0x30, 0x5b, 0xfc, 0x11, 0xbc, 0x10, 0xd0, 0x10, 
-       0x0c, 0x1e, 0xf9, 0x8e, 0xbc, 0x10, 0xd0, 0x30, 
-       0xc0, 0x40, 0x30, 0x70, 0xed, 0x8e, 0x03, 0x10, 
-       0xe9, 0x97, 0x0f, 0x19, 0xf9, 0x93, 0xd1, 0x44, 
-       0xe1, 0x79, 0x03, 0xdf, 0xe9, 0xa1, 0xd3, 0x40, 
-       0xca, 0x50, 0xcb, 0x52, 0x03, 0x1d, 0xf9, 0xa8, 
-       0xca, 0x12, 0xca, 0x52, 0xe1, 0xa5, 0x03, 0x1d, 
-       0xf9, 0xa8, 0xca, 0x12, 0xca, 0x53, 0xca, 0xae, 
-       0xca, 0xef, 0xb1, 0x7e, 0x03, 0x1e, 0xfa, 0xea, 
-       0xb1, 0x7e, 0xe2, 0xea, 0x00, 0x24, 0xd0, 0x00, 
-       0x2c, 0x40, 0x2c, 0x80, 0x17, 0x20, 0xf9, 0xd2, 
-       0x00, 0xa8, 0xd0, 0x00, 0xcc, 0x5b, 0x1c, 0x5f, 
-       0x1c, 0x43, 0x20, 0x31, 0x7c, 0x40, 0xb0, 0x3c, 
-       0x7e, 0x80, 0xcc, 0xb1, 0xce, 0xfa, 0x1c, 0x9f, 
-       0x1e, 0xdf, 0x01, 0x69, 0xd0, 0x3c, 0x0c, 0x99, 
-       0xe9, 0xc4, 0x3c, 0x80, 0x0e, 0xd9, 0xe9, 0xc7, 
-       0x3e, 0xc0, 0x3e, 0xf2, 0x3e, 0xb1, 0xd0, 0x01, 
-       0x40, 0x1b, 0x10, 0x05, 0x20, 0x1f, 0x2c, 0x40, 
-       0x2c, 0x80, 0xd0, 0x30, 0x70, 0x00, 0x2c, 0x80, 
-       0xe3, 0x1e, 0xd3, 0xc2, 0xf2, 0xd3, 0x13, 0xa0, 
-       0xed, 0xd8, 0xf2, 0x32, 0xb3, 0x81, 0xe9, 0xdc, 
-       0x80, 0x07, 0xe2, 0x95, 0x0d, 0x09, 0xd1, 0x8c, 
-       0x03, 0x0d, 0x41, 0x8c, 0xe9, 0xe8, 0x06, 0x5e, 
-       0xf9, 0xf1, 0x08, 0x89, 0x03, 0xcd, 0x13, 0xe3, 
-       0xf9, 0xe8, 0xd3, 0xc4, 0x06, 0x5e, 0xf9, 0xf1, 
-       0xd0, 0x43, 0x40, 0x4c, 0xe9, 0xf1, 0x08, 0x49, 
-       0x00, 0x8d, 0x10, 0x87, 0x53, 0x02, 0x01, 0x46, 
-       0x90, 0x2c, 0x00, 0xc6, 0x03, 0x1c, 0xe9, 0xf8, 
-       0x09, 0x49, 0x00, 0x0d, 0xd0, 0x9f, 0x40, 0x02, 
-       0xb0, 0x20, 0x03, 0x19, 0xe9, 0xfe, 0xb0, 0x20, 
-       0xa0, 0x2c, 0xe2, 0x5b, 0x06, 0x5f, 0xfa, 0x80, 
-       0xd4, 0x00, 0xc4, 0x50, 0xc4, 0x90, 0xc4, 0xd0, 
-       0xe2, 0x8d, 0x50, 0x00, 0x03, 0x75, 0xd2, 0x73, 
-       0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xc1, 
-       0xe1, 0xca, 0xe1, 0xee, 0xe1, 0xf0, 0xe1, 0xa8, 
-       0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x8d, 0x06, 0x50, 
-       0xe9, 0x83, 0xc0, 0x54, 0x30, 0x5b, 0xb0, 0x42, 
-       0xf8, 0x11, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x5e, 
-       0x30, 0x5b, 0xfc, 0x11, 0xc0, 0x39, 0x30, 0x31, 
-       0x10, 0x12, 0x10, 0x20, 0xe9, 0x88, 0x03, 0x10, 
-       0xe9, 0x93, 0x0f, 0x19, 0xf9, 0x8f, 0xd1, 0x44, 
-       0xe1, 0x79, 0x03, 0xdf, 0xe9, 0x9d, 0xd3, 0x40, 
-       0xca, 0x50, 0xcb, 0x52, 0x03, 0x1d, 0xf9, 0xa4, 
-       0xca, 0x12, 0xca, 0x52, 0xe1, 0xa1, 0x03, 0x1d, 
-       0xf9, 0xa4, 0xca, 0x12, 0xca, 0x53, 0xca, 0xae, 
-       0xca, 0xef, 0xb1, 0x7e, 0x03, 0x1e, 0xfa, 0xea, 
-       0xb1, 0x7e, 0xe2, 0xea, 0xcc, 0x5b, 0x1c, 0x42, 
-       0x2c, 0x5b, 0xc0, 0x31, 0x1c, 0x43, 0x2c, 0x40, 
-       0x1c, 0x48, 0xcc, 0xb1, 0x1c, 0x9f, 0x06, 0xd0, 
-       0xe9, 0xb6, 0x01, 0x69, 0xd0, 0x20, 0x3c, 0x80, 
-       0xc0, 0x1c, 0x10, 0x08, 0x20, 0x1f, 0x2c, 0x40, 
-       0x2c, 0x80, 0xd0, 0x30, 0x70, 0x00, 0x2c, 0x80, 
-       0xde, 0x84, 0xde, 0xc4, 0xe3, 0x1e, 0xd3, 0xc2, 
-       0xf2, 0xd3, 0x13, 0xa0, 0xed, 0xc6, 0xf2, 0x32, 
-       0xb3, 0x81, 0xe9, 0xca, 0x80, 0x07, 0xe2, 0x95, 
-       0x0d, 0x09, 0xd1, 0x8c, 0x03, 0x0d, 0x41, 0x8c, 
-       0xe9, 0xd6, 0x06, 0x5e, 0xf9, 0xdf, 0x08, 0x89, 
-       0x03, 0xcd, 0x13, 0xe3, 0xf9, 0xd6, 0xd3, 0xc4, 
-       0x06, 0x5e, 0xf9, 0xdf, 0xd0, 0x43, 0x40, 0x4c, 
-       0xe9, 0xdf, 0x08, 0x49, 0x00, 0x8d, 0x10, 0x87, 
-       0x53, 0x02, 0x01, 0x46, 0x90, 0x2c, 0x00, 0xc6, 
-       0x03, 0x1c, 0xe9, 0xe6, 0x09, 0x49, 0x00, 0x0d, 
-       0xd0, 0x9f, 0x40, 0x02, 0xb0, 0x20, 0x03, 0x19, 
-       0xe9, 0xec, 0xb0, 0x20, 0xa0, 0x2c, 0xe2, 0x5b, 
-       0x06, 0x5f, 0xfa, 0x80, 0xd4, 0x00, 0xc4, 0x50, 
-       0xc4, 0x90, 0xc4, 0xd0, 0xe2, 0x8d, 0x50, 0x00, 
-       0x50, 0x00, 0x50, 0x00, 0x03, 0x75, 0xd2, 0x73, 
-       0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xdb, 
-       0xe1, 0xe9, 0xe2, 0x00, 0xe2, 0x02, 0xe1, 0xc3, 
-       0xe1, 0x65, 0x30, 0x5a, 0xe5, 0x8d, 0x06, 0x50, 
-       0xe9, 0x83, 0xc0, 0x54, 0x30, 0x5b, 0xb0, 0x42, 
-       0xf8, 0x11, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x4f, 
-       0x30, 0x5b, 0xfc, 0x11, 0xc0, 0x39, 0x30, 0x31, 
-       0x10, 0x11, 0x10, 0x20, 0xe9, 0x88, 0x03, 0x10, 
-       0xe9, 0x93, 0x0f, 0x19, 0xf9, 0x8f, 0xd1, 0x44, 
-       0xe1, 0x79, 0x03, 0xd0, 0xf9, 0x98, 0xca, 0x50, 
-       0x03, 0xde, 0xf9, 0x9a, 0xd1, 0x42, 0xe2, 0xea, 
-       0xcb, 0xaa, 0xcb, 0xeb, 0xc0, 0x50, 0x10, 0x54, 
-       0xc0, 0x90, 0x10, 0x8c, 0x10, 0x92, 0xd0, 0xc1, 
-       0x05, 0x50, 0xe9, 0xa5, 0xb0, 0xc2, 0x10, 0x60, 
-       0xfd, 0xa8, 0xb0, 0x7f, 0x10, 0xa0, 0xfd, 0xab, 
-       0xb0, 0xbf, 0x10, 0x5f, 0x10, 0x9f, 0x00, 0xef, 
-       0xd0, 0x3e, 0x20, 0x52, 0x20, 0x83, 0x20, 0x93, 
-       0x10, 0x4c, 0x10, 0x82, 0x40, 0x80, 0x50, 0x42, 
-       0xd0, 0x81, 0x14, 0x1f, 0x14, 0x01, 0x05, 0x50, 
-       0xe9, 0xbd, 0x50, 0x42, 0xe1, 0xbe, 0x54, 0x02, 
-       0xca, 0x10, 0xca, 0x50, 0xcb, 0x01, 0xcb, 0x41, 
-       0xe2, 0xea, 0xcc, 0x5b, 0x1c, 0x42, 0x2c, 0x5b, 
-       0xc0, 0x31, 0x1c, 0x43, 0x2c, 0x40, 0x1c, 0x49, 
-       0xcc, 0xb1, 0x1c, 0x9f, 0xc0, 0x1c, 0x10, 0x08, 
-       0x20, 0x1f, 0x05, 0x50, 0xf9, 0xd2, 0xb0, 0x3c, 
-       0x2c, 0x40, 0x2c, 0x80, 0x01, 0x74, 0xd6, 0x00, 
-       0x2c, 0x80, 0x02, 0xe4, 0xde, 0x80, 0xde, 0xc1, 
-       0xe3, 0x1e, 0xd3, 0xc0, 0xf2, 0xd3, 0x13, 0xa0, 
-       0xed, 0xe0, 0xf2, 0x32, 0xb3, 0x81, 0xe9, 0xe9, 
-       0x80, 0x07, 0xd4, 0x02, 0x44, 0x15, 0x14, 0x1f, 
-       0xc4, 0x50, 0xd3, 0x08, 0xe2, 0x95, 0xd0, 0x71, 
-       0x20, 0x56, 0x00, 0x48, 0xd1, 0x8c, 0x03, 0x0d, 
-       0x41, 0x8c, 0xe9, 0xf7, 0x08, 0x89, 0x03, 0xcd, 
-       0x13, 0xe3, 0xf9, 0xf6, 0xd3, 0xc4, 0xe1, 0xf7, 
-       0xb3, 0xc1, 0x01, 0x46, 0x90, 0x2c, 0x00, 0xc6, 
-       0x03, 0x1c, 0xe9, 0xfe, 0x09, 0x49, 0x00, 0x0d, 
-       0xa0, 0x2c, 0xe2, 0x5b, 0x06, 0x5f, 0xfa, 0x7f, 
-       0xd4, 0x02, 0x44, 0x15, 0x14, 0x1f, 0xc4, 0x50, 
-       0xc4, 0x90, 0xc4, 0xd0, 0xe2, 0x8d, 0x50, 0x00, 
-       0x50, 0x00, 0x50, 0x00, 0x03, 0x75, 0xd2, 0x73, 
-       0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xc9, 
-       0xe1, 0xd2, 0xe1, 0xe7, 0xe1, 0xe9, 0xe1, 0xab, 
-       0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x91, 0x06, 0x50, 
-       0xe9, 0x83, 0xc0, 0x54, 0x30, 0x5b, 0xb0, 0x42, 
-       0xf8, 0x11, 0x37, 0x1a, 0xb6, 0xff, 0xd0, 0x4f, 
-       0x30, 0x5b, 0xfc, 0x11, 0xbc, 0x10, 0xd0, 0x10, 
-       0x0c, 0x1e, 0xf9, 0x8e, 0xbc, 0x10, 0xd0, 0x20, 
-       0xc0, 0x40, 0x30, 0x70, 0xed, 0x8e, 0x03, 0x10, 
-       0xe9, 0x97, 0x0f, 0x19, 0xf9, 0x93, 0xd1, 0x44, 
-       0xe1, 0x79, 0x03, 0xd0, 0xf9, 0xa0, 0xca, 0x50, 
-       0xcb, 0x52, 0x03, 0x1d, 0xf9, 0xa7, 0xca, 0x12, 
-       0xca, 0x52, 0xe1, 0xa4, 0x03, 0x1d, 0xf9, 0xa7, 
-       0xca, 0x12, 0xca, 0x53, 0xca, 0xae, 0xca, 0xef, 
-       0xb1, 0x7e, 0x03, 0x1e, 0xfa, 0xea, 0xb1, 0x7e, 
-       0xe2, 0xea, 0x00, 0x24, 0xd0, 0x00, 0x2c, 0x40, 
-       0x2c, 0x80, 0x17, 0x20, 0xf9, 0xc8, 0x00, 0x2a, 
-       0xd0, 0x00, 0x20, 0x1b, 0x20, 0x1b, 0x05, 0x50, 
-       0xf9, 0xb8, 0xb0, 0x3f, 0x10, 0x02, 0x7c, 0x40, 
-       0xcc, 0xb1, 0x1c, 0x9f, 0x01, 0x69, 0xd0, 0x3c, 
-       0x0c, 0x99, 0xe9, 0xc1, 0x3c, 0x80, 0xde, 0xa0, 
-       0x2c, 0x5f, 0x2c, 0x9f, 0xd0, 0x30, 0x70, 0x00, 
-       0x2c, 0x80, 0xde, 0xc1, 0xe3, 0x1e, 0xd3, 0xc0, 
-       0xf2, 0xd3, 0x13, 0xa0, 0xed, 0xce, 0xf2, 0x32, 
-       0xb3, 0x81, 0xe9, 0xd2, 0x80, 0x07, 0xe2, 0x95, 
-       0x0d, 0x09, 0xd1, 0x8c, 0x03, 0x0d, 0x41, 0x8c, 
-       0xe9, 0xde, 0x08, 0x89, 0x03, 0xcd, 0x13, 0xe3, 
-       0xf9, 0xdd, 0xd3, 0xc4, 0xe1, 0xde, 0xb3, 0xc1, 
-       0x01, 0x46, 0x90, 0x2c, 0x00, 0xc6, 0x03, 0x1c, 
-       0xe9, 0xe5, 0x09, 0x49, 0x00, 0x0d, 0xa0, 0x2c, 
-       0xe2, 0x5b, 0x06, 0x5f, 0xfa, 0x7f, 0xd4, 0x00, 
-       0xc4, 0x50, 0xc4, 0x90, 0xc4, 0xd0, 0xe2, 0x8d, 
-       0x50, 0x00, 0x50, 0x00, 0x03, 0x75, 0xd2, 0x73, 
-       0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xa3, 
-       0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xe1, 0x8a, 
-       0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x87, 0x37, 0x1a, 
-       0xb6, 0xff, 0xd0, 0x5e, 0x30, 0x5b, 0xfd, 0xb4, 
-       0xc0, 0x39, 0x30, 0x31, 0x10, 0x12, 0x10, 0x20, 
-       0xe9, 0x82, 0xd1, 0x42, 0xd3, 0x40, 0xe2, 0xea, 
-       0xcc, 0x5b, 0x1c, 0x42, 0x2c, 0x5b, 0xc0, 0x31, 
-       0x1c, 0x43, 0x2c, 0x40, 0x1c, 0x48, 0xcc, 0xb1, 
-       0x1c, 0x9f, 0x06, 0xd0, 0xe9, 0x98, 0x01, 0x69, 
-       0xd0, 0x20, 0x3c, 0x80, 0xc0, 0x1c, 0x10, 0x08, 
-       0x20, 0x1f, 0x2c, 0x40, 0x2c, 0x80, 0x01, 0x74, 
-       0xd6, 0x00, 0x2c, 0x80, 0xde, 0x84, 0xde, 0xc4, 
-       0xe3, 0x1e, 0xf2, 0xd3, 0xc0, 0x5c, 0xb0, 0x7f, 
-       0x30, 0x5a, 0xe5, 0xc8, 0x00, 0x26, 0xd0, 0x00, 
-       0x70, 0x00, 0x10, 0x20, 0xe9, 0xbf, 0x00, 0xe0, 
-       0xd0, 0x44, 0x70, 0x41, 0x10, 0x5c, 0x30, 0x5b, 
-       0xb0, 0x41, 0xed, 0xc8, 0x0f, 0x17, 0xf9, 0xb4, 
-       0x0f, 0x49, 0xf2, 0xd3, 0x0f, 0x19, 0xf9, 0xb8, 
-       0xdf, 0x00, 0x00, 0x06, 0x03, 0xb3, 0xd8, 0x29, 
-       0xe0, 0x46, 0xc0, 0x5b, 0x30, 0x54, 0xb0, 0x7e, 
-       0xe5, 0xc8, 0x0f, 0x17, 0xf9, 0xc3, 0x02, 0xf1, 
-       0xd8, 0x2b, 0xe0, 0x46, 0xd3, 0x08, 0xd3, 0xc0, 
-       0xe2, 0x95, 0x50, 0x00, 0x03, 0x75, 0xd2, 0x73, 
-       0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xb5, 
-       0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xe1, 0x8e, 
-       0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x8b, 0x37, 0x1a, 
-       0xb6, 0xff, 0xd0, 0x5e, 0x30, 0x5b, 0xfd, 0xc6, 
-       0xbc, 0x10, 0xd0, 0x10, 0x0c, 0x1e, 0xf9, 0x88, 
-       0xbc, 0x10, 0xd0, 0x30, 0xc0, 0x40, 0x30, 0x70, 
-       0xed, 0x88, 0xd1, 0x42, 0xd3, 0x40, 0xe2, 0xea, 
-       0x00, 0x24, 0xd0, 0x00, 0x2c, 0x40, 0x2c, 0x80, 
-       0x17, 0x20, 0xf9, 0xb4, 0x00, 0xa8, 0xd0, 0x00, 
-       0xcc, 0x5b, 0x1c, 0x5f, 0x1c, 0x43, 0x20, 0x31, 
-       0x7c, 0x40, 0xb0, 0x3c, 0x7e, 0x80, 0xcc, 0xb1, 
-       0xce, 0xfa, 0x1c, 0x9f, 0x1e, 0xdf, 0x01, 0x69, 
-       0xd0, 0x3c, 0x0c, 0x99, 0xe9, 0xa6, 0x3c, 0x80, 
-       0x0e, 0xd9, 0xe9, 0xa9, 0x3e, 0xc0, 0x3e, 0xf2, 
-       0x3e, 0xb1, 0xd0, 0x01, 0x40, 0x1b, 0x10, 0x05, 
-       0x20, 0x1f, 0x2c, 0x40, 0x2c, 0x80, 0xd0, 0x30, 
-       0x70, 0x00, 0x2c, 0x80, 0xe3, 0x1e, 0xf2, 0xd3, 
-       0xc0, 0x5c, 0xb0, 0x7f, 0x30, 0x5a, 0xe5, 0xda, 
-       0x00, 0x26, 0xd0, 0x00, 0x70, 0x00, 0x10, 0x20, 
-       0xe9, 0xd1, 0x00, 0xe0, 0xd0, 0x44, 0x70, 0x41, 
-       0x10, 0x5c, 0x30, 0x5b, 0xb0, 0x41, 0xed, 0xda, 
-       0x0f, 0x17, 0xf9, 0xc6, 0x0f, 0x49, 0xf2, 0xd3, 
-       0x0f, 0x19, 0xf9, 0xca, 0xdf, 0x00, 0x00, 0x06, 
-       0x03, 0xb3, 0xd8, 0x29, 0xe0, 0x46, 0xc0, 0x5b, 
-       0x30, 0x54, 0xb0, 0x7e, 0xe5, 0xda, 0x0f, 0x17, 
-       0xf9, 0xd5, 0x02, 0xf6, 0xde, 0x26, 0xe0, 0x46, 
-       0xd3, 0x08, 0xd3, 0xc0, 0xe2, 0x95, 0x50, 0x00, 
-       0x50, 0x00, 0x50, 0x00, 0x03, 0x75, 0xd2, 0x73, 
-       0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xa2, 
-       0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xe1, 0x8a, 
-       0xe1, 0x65, 0x30, 0x5a, 0xe5, 0x87, 0x37, 0x1a, 
-       0xb6, 0xff, 0xd0, 0x4f, 0x30, 0x5b, 0xfd, 0xb3, 
-       0xc0, 0x39, 0x30, 0x31, 0x10, 0x11, 0x10, 0x20, 
-       0xe9, 0x82, 0xd1, 0x42, 0xd3, 0x41, 0xe2, 0xea, 
-       0xcc, 0x5b, 0x1c, 0x42, 0x2c, 0x5b, 0xc0, 0x31, 
-       0x1c, 0x43, 0x2c, 0x40, 0x1c, 0x49, 0xcc, 0xb1, 
-       0x1c, 0x9f, 0xc0, 0x1c, 0x10, 0x08, 0x20, 0x1f, 
-       0x05, 0x50, 0xf9, 0x99, 0xb0, 0x3c, 0x2c, 0x40, 
-       0x2c, 0x80, 0x01, 0x74, 0xd6, 0x00, 0x2c, 0x80, 
-       0x02, 0xe4, 0xde, 0x80, 0xde, 0xc1, 0xe3, 0x1e, 
-       0xf2, 0xd3, 0xc0, 0x5c, 0xb0, 0x7f, 0x30, 0x5a, 
-       0xe5, 0xc7, 0x00, 0x26, 0xd0, 0x00, 0x70, 0x00, 
-       0x10, 0x20, 0xe9, 0xbe, 0x00, 0xe0, 0xd0, 0x44, 
-       0x70, 0x41, 0x10, 0x5b, 0x30, 0x5b, 0xb0, 0x41, 
-       0xed, 0xc7, 0x0f, 0x17, 0xf9, 0xb3, 0x0f, 0x49, 
-       0xf2, 0xd3, 0x0f, 0x19, 0xf9, 0xb7, 0xdf, 0x00, 
-       0x00, 0x06, 0x03, 0xb3, 0xd8, 0x29, 0xe0, 0x46, 
-       0xc0, 0x5b, 0x30, 0x54, 0xb0, 0x7e, 0xe5, 0xc7, 
-       0x0f, 0x17, 0xf9, 0xc2, 0x02, 0xff, 0xde, 0x27, 
-       0xe0, 0x46, 0xd3, 0x08, 0xd3, 0xc0, 0xe2, 0x95, 
-       0x50, 0x00, 0x50, 0x00, 0x03, 0x75, 0xd2, 0x73, 
-       0x00, 0x24, 0xdc, 0xd8, 0xf0, 0x4a, 0xe1, 0xac, 
-       0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xe1, 0x8e, 
-       0xe1, 0x30, 0x30, 0x5a, 0xe5, 0x8b, 0x37, 0x1a, 
-       0xb6, 0xff, 0xd0, 0x4f, 0x30, 0x5b, 0xfd, 0xbd, 
-       0xbc, 0x10, 0xd0, 0x10, 0x0c, 0x1e, 0xf9, 0x88, 
-       0xbc, 0x10, 0xd0, 0x20, 0xc0, 0x40, 0x30, 0x70, 
-       0xed, 0x88, 0xd1, 0x42, 0xd3, 0x41, 0xe2, 0xea, 
-       0x00, 0x24, 0xd0, 0x00, 0x2c, 0x40, 0x2c, 0x80, 
-       0x17, 0x20, 0xf9, 0xab, 0x00, 0x2a, 0xd0, 0x00, 
-       0x20, 0x1b, 0x20, 0x1b, 0x05, 0x50, 0xf9, 0x9b, 
-       0xb0, 0x3f, 0x10, 0x02, 0x7c, 0x40, 0xcc, 0xb1, 
-       0x1c, 0x9f, 0x01, 0x69, 0xd0, 0x3c, 0x0c, 0x99, 
-       0xe9, 0xa4, 0x3c, 0x80, 0xde, 0xa0, 0x2c, 0x5f, 
-       0x2c, 0x9f, 0xd0, 0x30, 0x70, 0x00, 0x2c, 0x80, 
-       0xde, 0xc1, 0xe3, 0x1e, 0xf2, 0xd3, 0xc0, 0x5c, 
-       0xb0, 0x7f, 0x30, 0x5a, 0xe5, 0xd1, 0x00, 0x26, 
-       0xd0, 0x00, 0x70, 0x00, 0x10, 0x20, 0xe9, 0xc8, 
-       0x00, 0xe0, 0xd0, 0x44, 0x70, 0x41, 0x10, 0x5b, 
-       0x30, 0x5b, 0xb0, 0x41, 0xed, 0xd1, 0x0f, 0x17, 
-       0xf9, 0xbd, 0x0f, 0x49, 0xf2, 0xd3, 0x0f, 0x19, 
-       0xf9, 0xc1, 0xdf, 0x00, 0x00, 0x06, 0x03, 0xb3, 
-       0xd8, 0x29, 0xe0, 0x46, 0xc0, 0x5b, 0x30, 0x54, 
-       0xb0, 0x7e, 0xe5, 0xd1, 0x0f, 0x17, 0xf9, 0xcc, 
-       0x03, 0x34, 0xdc, 0x20, 0xe0, 0x46, 0xd3, 0x08, 
-       0xd3, 0xc0, 0xe2, 0x95, 0xd0, 0x61, 0x23, 0x81, 
-       0x0c, 0x49, 0xd0, 0x61, 0x00, 0x8d, 0x10, 0xa0, 
-       0xea, 0x3b, 0x30, 0x42, 0xe6, 0x30, 0x23, 0x82, 
-       0x0f, 0xc5, 0x0c, 0x09, 0x05, 0x0d, 0x15, 0x20, 
-       0xfe, 0x45, 0xd0, 0x5f, 0x15, 0x63, 0xea, 0x43, 
-       0xd0, 0x50, 0x30, 0x54, 0xee, 0x4a, 0x0f, 0x17, 
-       0xfa, 0x45, 0x03, 0xb3, 0xd8, 0x29, 0xe0, 0x46, 
-       0x80, 0x07, 0x09, 0x49, 0xd4, 0x00, 0xd4, 0x40, 
-       0xd4, 0x80, 0xd4, 0xc0, 0x00, 0x4d, 0xa0, 0x6c, 
-       0xd0, 0xa1, 0x00, 0x88, 0xd0, 0xa9, 0x00, 0x4d, 
-       0x00, 0x50, 0xfa, 0x53, 0xf2, 0x32, 0xd3, 0x80, 
-       0xe1, 0x76, 0xd1, 0xc2, 0x41, 0xcf, 0x11, 0xdf, 
-       0xd0, 0x41, 0x01, 0xc1, 0x00, 0xef, 0xd0, 0xbe, 
-       0x03, 0x10, 0xf9, 0x77, 0x80, 0x07, 0x21, 0x96, 
-       0x11, 0xa2, 0xe9, 0x78, 0x03, 0x1d, 0xea, 0x73, 
-       0xc0, 0xd7, 0xc2, 0x90, 0xf2, 0xa4, 0xc4, 0x0a, 
-       0x03, 0xd0, 0xea, 0x72, 0xc2, 0x91, 0xf2, 0xa4, 
-       0xc4, 0x4a, 0x03, 0x1e, 0xea, 0x8d, 0xc0, 0xd8, 
-       0xc2, 0x92, 0xf2, 0xa4, 0xc4, 0x8a, 0x03, 0xd0, 
-       0xea, 0x7d, 0xc2, 0x93, 0xf2, 0xa4, 0xc4, 0xca, 
-       0xe2, 0x8d, 0xd3, 0xc0, 0xc0, 0xd7, 0xc2, 0x90, 
-       0xf2, 0xa4, 0xc4, 0x0a, 0x03, 0xd0, 0xea, 0x88, 
-       0xc2, 0x91, 0xf2, 0xa4, 0xc4, 0x4a, 0x08, 0x49, 
-       0x00, 0x4d, 0x10, 0x61, 0xf8, 0x11, 0x03, 0x1f, 
-       0xea, 0x93, 0x0d, 0xc9, 0x00, 0x4d, 0xd0, 0x1a, 
-       0xe2, 0x98, 0x03, 0x10, 0xfa, 0x97, 0xd0, 0x1d, 
-       0xe2, 0x98, 0xd0, 0x18, 0x0f, 0x16, 0xfa, 0x98, 
-       0xd0, 0x4c, 0x40, 0x4c, 0x10, 0x6c, 0xea, 0xa2, 
-       0x03, 0xde, 0xfa, 0xa2, 0x0f, 0x12, 0xfa, 0xa0, 
-       0x00, 0x08, 0xe2, 0xd9, 0xd2, 0x00, 0x13, 0xe1, 
-       0xee, 0xa9, 0x08, 0x49, 0x02, 0x0d, 0x00, 0xc8, 
-       0xc2, 0xca, 0x12, 0x94, 0xd0, 0x1f, 0x30, 0x07, 
-       0x12, 0xc0, 0xc2, 0x43, 0x12, 0x5a, 0x00, 0x0d, 
-       0x03, 0xde, 0xea, 0xb6, 0x0e, 0xc9, 0x04, 0x8d, 
-       0x02, 0x48, 0x22, 0x80, 0x12, 0x88, 0xd0, 0x0b, 
-       0x30, 0x03, 0x12, 0x80, 0xd0, 0x19, 0x20, 0x03, 
-       0x12, 0x80, 0x00, 0x0d, 0x22, 0xc0, 0x12, 0xc8, 
-       0xd0, 0x0b, 0x30, 0x09, 0x12, 0xc0, 0x12, 0xd8, 
-       0xd0, 0x16, 0x20, 0x09, 0x20, 0x07, 0x12, 0xc0, 
-       0x42, 0xc2, 0x22, 0x8b, 0x22, 0x88, 0x03, 0xde, 
-       0xea, 0xd2, 0x0e, 0xc9, 0xc4, 0x4a, 0x04, 0xcd, 
-       0x0f, 0xc5, 0x01, 0x46, 0x90, 0x4d, 0x00, 0xc6, 
-       0x10, 0x60, 0xe6, 0xd3, 0x0f, 0xc5, 0x01, 0x74, 
-       0xd6, 0x00, 0xca, 0x9d, 0xcb, 0x9e, 0xca, 0xea, 
-       0xcb, 0xee, 0x2a, 0xc0, 0x2b, 0xc0, 0xca, 0x10, 
-       0xca, 0x51, 0xcb, 0x12, 0xcb, 0x53, 0xd1, 0x40, 
-       0xd3, 0x41, 0xb7, 0x3f, 0xc0, 0x5c, 0xe1, 0x7b, 
-       0xd0, 0xc0, 0xc1, 0x28, 0xc2, 0x2a, 0xc2, 0xab, 
-       0xf1, 0x7a, 0x0f, 0x17, 0xfa, 0xef, 0xcc, 0xe8, 
-       0xcd, 0x29, 0xcd, 0x6c, 0xcd, 0xad, 0xc8, 0x08, 
-       0xc8, 0x49, 0xca, 0x0a, 0xca, 0x4b, 0xf3, 0x31, 
-       0xd0, 0xc1, 0xc1, 0x34, 0xc2, 0x2a, 0xc2, 0xab, 
-       0xf1, 0x7a, 0x00, 0x28, 0xd9, 0xc0, 0xc8, 0x88, 
-       0xc8, 0xc9, 0xa9, 0xf8, 0xca, 0x8a, 0xca, 0xcb, 
-       0x11, 0x62, 0xe9, 0x79, 0xd0, 0xc0, 0xc1, 0x35, 
-       0xc2, 0x2e, 0xc2, 0xaf, 0xf1, 0x7a, 0xc9, 0x08, 
-       0xc9, 0x49, 0xa9, 0xf8, 0xcb, 0x0a, 0xcb, 0x4b, 
-       0xd0, 0xc1, 0xc1, 0x36, 0xc2, 0x2e, 0xc2, 0xaf, 
-       0xf1, 0x7a, 0xc0, 0x27, 0xc9, 0x88, 0xc9, 0xc9, 
-       0xa0, 0x38, 0xcb, 0x8a, 0xcb, 0xcb, 0xe1, 0x79, 
-       0x5f, 0x0d, 0x07, 0x7d, 0xde, 0x07, 0x11, 0x5e, 
-       0x30, 0x05, 0xcd, 0xc0, 0x00, 0x28, 0xd0, 0x00, 
-       0xa0, 0x38, 0x11, 0x61, 0xf9, 0x75, 0x00, 0xe2, 
-       0xd0, 0x00, 0x0f, 0x1d, 0xeb, 0x29, 0x00, 0x2d, 
-       0xdf, 0x4b, 0xf3, 0x3f, 0xe1, 0x75, 0x04, 0xeb, 
-       0xd0, 0x00, 0x11, 0x62, 0xeb, 0x36, 0xb0, 0x20, 
-       0x0f, 0x19, 0xfb, 0x36, 0xac, 0xe0, 0x01, 0xa4, 
-       0xde, 0x00, 0x5e, 0x0d, 0x00, 0x2d, 0xdf, 0x7a, 
-       0xdd, 0xc0, 0xd8, 0x80, 0xd9, 0x00, 0xd9, 0x80, 
-       0x5f, 0x00, 0x01, 0x46, 0x00, 0x28, 0xd0, 0x01, 
-       0x00, 0x06, 0xa0, 0x37, 0x80, 0x3f, 0x00, 0xc6, 
-       0x0f, 0xc5, 0xad, 0xda, 0xc6, 0xb1, 0xd0, 0x01, 
-       0x01, 0xa3, 0xde, 0x1d, 0x40, 0x30, 0x3e, 0x00, 
-       0x80, 0x3f, 0x0e, 0x0a, 0x66, 0xda, 0xc8, 0x28, 
-       0xc8, 0x69, 0xc8, 0xaa, 0xc8, 0xeb, 0x0c, 0x1e, 
-       0xfb, 0x68, 0x26, 0xba, 0x07, 0x7d, 0xdc, 0x00, 
-       0x1d, 0xcf, 0x1d, 0xd1, 0x5d, 0xc0, 0x00, 0x2d, 
-       0xdf, 0x64, 0x0f, 0x87, 0xad, 0xda, 0x80, 0x3f, 
-       0x0e, 0x0a, 0x66, 0xda, 0xc9, 0x2c, 0xc9, 0x6d, 
-       0xc9, 0xae, 0xc9, 0xef, 0x0f, 0x2f, 0xd0, 0x37, 
-       0x4f, 0x00, 0x0f, 0x1a, 0xeb, 0xbe, 0x01, 0xa4, 
-       0xde, 0x20, 0xd0, 0x01, 0x40, 0x3c, 0x2e, 0x00, 
-       0x00, 0x2d, 0xdf, 0x7a, 0xac, 0xe0, 0x0f, 0x87, 
-       0x0e, 0x0a, 0x76, 0xe0, 0xbf, 0x79, 0xbe, 0x3c, 
-       0x0f, 0x1b, 0xeb, 0x9e, 0x0f, 0x87, 0x0e, 0x0a, 
-       0x76, 0xe1, 0xbf, 0x79, 0xbe, 0x34, 0x18, 0xa0, 
-       0xeb, 0xb9, 0x0f, 0x87, 0xad, 0x20, 0x80, 0x3f, 
-       0x0e, 0x0a, 0x76, 0xe2, 0xbf, 0x79, 0xbe, 0x3c, 
-       0x0f, 0x87, 0x0e, 0x0a, 0x76, 0xe3, 0x0f, 0x1b, 
-       0xeb, 0xb3, 0xbf, 0x77, 0xbe, 0x0c, 0x19, 0x20, 
-       0xeb, 0xb9, 0x0f, 0x87, 0xad, 0x60, 0x80, 0x3f, 
-       0x0e, 0x0a, 0x76, 0xe4, 0xbe, 0x3c, 0xbf, 0x75, 
-       0x0f, 0x15, 0xf8, 0x1c, 0x1f, 0x0a, 0x1f, 0x16, 
-       0x0f, 0x87, 0x0e, 0x0a, 0x76, 0xe5, 0xbf, 0x79, 
-       0xbe, 0x34, 0x19, 0xa0, 0xeb, 0xb9, 0x0f, 0x87, 
-       0xad, 0xa0, 0x80, 0x3f, 0x0e, 0x0a, 0x76, 0xe6, 
-       0xbe, 0x3c, 0xbf, 0x79, 0x0f, 0x87, 0x0e, 0x0a, 
-       0x76, 0xe7, 0x0f, 0x15, 0xeb, 0xbe, 0x00, 0x2f, 
-       0xdf, 0x72, 0x1d, 0xe0, 0xf8, 0x1c, 0x00, 0x28, 
-       0xd0, 0x01, 0xa0, 0x38, 0x80, 0x3f, 0x0f, 0x87, 
-       0xd0, 0x01, 0x4d, 0xc0, 0x1f, 0x0f, 0x1f, 0x11, 
-       0x00, 0x2f, 0xdf, 0x76, 0xc6, 0xb2, 0x03, 0x7d, 
-       0xde, 0x0e, 0x01, 0xa3, 0xde, 0x2d, 0x5d, 0xc0, 
-       0x0f, 0x87, 0x1e, 0xe1, 0xeb, 0xdb, 0xad, 0xda, 
-       0x80, 0x3f, 0x0e, 0x0a, 0x66, 0xda, 0x0c, 0x1e, 
-       0xfb, 0xe4, 0x26, 0xbb, 0x03, 0xff, 0xdd, 0xff, 
-       0x4d, 0xc0, 0x00, 0xa3, 0xde, 0x2d, 0xbf, 0x56, 
-       0x0f, 0x87, 0x07, 0x7d, 0xde, 0x0e, 0x5d, 0xc0, 
-       0x00, 0xa3, 0xde, 0x1d, 0xad, 0xda, 0x80, 0x3f, 
-       0x0e, 0x0a, 0x66, 0xda, 0xdf, 0x5c, 0xd0, 0x0e, 
-       0x4f, 0x00, 0x0f, 0x87, 0xd0, 0x06, 0x40, 0x3c, 
-       0xeb, 0xf0, 0xbf, 0x3e, 0xb0, 0x04, 0xe7, 0xf2, 
-       0xeb, 0xf6, 0xbf, 0x0c, 0xbf, 0x3a, 0x0f, 0x87, 
-       0x0f, 0x1d, 0xfb, 0x4b, 0xbf, 0x38, 0x0f, 0x87, 
-       0x0f, 0x1c, 0xfb, 0xcb, 0xbf, 0x30, 0x0f, 0x87, 
-       0x50, 0x00, 0x50, 0x00, 0x0f, 0x17, 0xf9, 0x70, 
-       0x90, 0x4d, 0x10, 0x60, 0xe5, 0x72, 0x0f, 0x49, 
-       0x90, 0x4d, 0x10, 0x60, 0xe5, 0x76, 0x0f, 0x19, 
-       0xf9, 0x79, 0x01, 0x46, 0xd0, 0x11, 0xa0, 0x38, 
-       0x80, 0x3f, 0x00, 0xc6, 0xdf, 0x00, 0x00, 0x06, 
-       0x08, 0x20, 0xd0, 0x00, 0x10, 0x08, 0xa0, 0x0a, 
-       0xa0, 0x1b, 0x0c, 0x20, 0xd0, 0x00, 0x10, 0x08, 
-       0xa0, 0x27, 0x90, 0x4d, 0x0f, 0xff, 0xd8, 0x1f, 
-       0x40, 0x40, 0xa0, 0x4d, 0x80, 0x0a, 0xd0, 0x00, 
-       0x06, 0x50, 0xf9, 0x95, 0xd0, 0x01, 0xa0, 0x09, 
-       0x80, 0x1b, 0xa0, 0x27, 0x01, 0x20, 0xd0, 0x67, 
-       0xa0, 0x69, 0x80, 0x2a, 0x82, 0x29, 0x80, 0x6a, 
-       0x84, 0x29, 0xd0, 0x54, 0x10, 0x4f, 0xa0, 0x6a, 
-       0x01, 0x20, 0xd0, 0x40, 0xa0, 0x69, 0x80, 0x2b, 
-       0x80, 0x07, 0x08, 0x20, 0xdf, 0x00, 0x02, 0x30, 
-       0xd0, 0x00, 0xa0, 0x38, 0x80, 0x3f, 0x01, 0xb0, 
-       0xd0, 0x10, 0xa0, 0x37, 0x80, 0x3f, 0x02, 0x30, 
-       0xd0, 0x01, 0xa0, 0x38, 0xd0, 0x10, 0xa0, 0x38, 
-       0x15, 0x63, 0xe9, 0xba, 0x05, 0x5e, 0xf9, 0xfa, 
-       0xc0, 0xdf, 0x00, 0xe0, 0xd1, 0x80, 0x70, 0x06, 
-       0x10, 0x1c, 0xc1, 0x40, 0x11, 0x48, 0xd3, 0x10, 
-       0x00, 0x21, 0xd0, 0x80, 0xb0, 0x16, 0xe9, 0xca, 
-       0xd3, 0x20, 0x10, 0x81, 0xb0, 0x16, 0xf9, 0xfa, 
-       0x30, 0xc2, 0xd2, 0x5e, 0xd0, 0x8f, 0x00, 0xee, 
-       0xd0, 0x54, 0x70, 0x41, 0x30, 0x43, 0xed, 0xd7, 
-       0xd2, 0x6c, 0x72, 0x49, 0xc0, 0x89, 0xb0, 0xbf, 
-       0x10, 0x9f, 0x22, 0x42, 0x04, 0x31, 0xd0, 0x10, 
-       0xc0, 0x42, 0x30, 0x49, 0xe5, 0xde, 0x10, 0x03, 
-       0xc1, 0x0c, 0xc1, 0x83, 0xb1, 0xbe, 0x01, 0x46, 
-       0x00, 0x06, 0xa0, 0x3d, 0xa0, 0x3c, 0x60, 0x06, 
-       0x00, 0xc6, 0xb1, 0xbc, 0xb1, 0x01, 0xed, 0xe1, 
-       0xc1, 0x0c, 0x21, 0x85, 0x01, 0x46, 0x00, 0x06, 
-       0xa0, 0x3d, 0xa0, 0x3c, 0x60, 0x06, 0x00, 0xc6, 
-       0xb1, 0xbc, 0xb1, 0x01, 0xed, 0xec, 0x02, 0xe4, 
-       0xd0, 0x00, 0x20, 0xc0, 0xb2, 0x41, 0xed, 0xd8, 
-       0x15, 0xa3, 0xfa, 0x00, 0xbc, 0x10, 0x0c, 0x1e, 
-       0xfa, 0x00, 0xbc, 0x10, 0xd0, 0x04, 0x70, 0x00, 
-       0x10, 0x20, 0xfa, 0x00, 0x00, 0x27, 0xd0, 0x10, 
-       0xd0, 0x40, 0x60, 0x40, 0x00, 0x26, 0xd0, 0x14, 
-       0x60, 0x40, 0xb0, 0x28, 0x70, 0x40, 0xb0, 0x7f, 
-       0x60, 0x40, 0x01, 0x7a, 0xde, 0x1a, 0xe0, 0x46, 
-       0x50, 0x00, 0x50, 0x00, 0x00, 0x28, 0xd1, 0xb0, 
-       0x70, 0x06, 0xd0, 0x81, 0x60, 0x86, 0x10, 0x20, 
-       0xe9, 0xab, 0xb0, 0x3f, 0x60, 0x06, 0x00, 0xec, 
-       0xd1, 0x84, 0x70, 0x46, 0xb1, 0x84, 0x70, 0x86, 
-       0x30, 0x42, 0xe9, 0xab, 0x70, 0x42, 0xd0, 0x35, 
-       0x30, 0x40, 0xf9, 0xab, 0x00, 0x63, 0xd0, 0x3f, 
-       0xb0, 0xbc, 0x40, 0x80, 0x70, 0xc2, 0x10, 0xe3, 
-       0xe5, 0xab, 0xb0, 0xbc, 0x40, 0x80, 0x60, 0x86, 
-       0x00, 0x28, 0xd0, 0x24, 0x70, 0x40, 0x00, 0x22, 
-       0xd0, 0x80, 0x50, 0x42, 0x60, 0x40, 0x00, 0x64, 
-       0xd0, 0x60, 0xd0, 0x90, 0x60, 0x81, 0x00, 0xed, 
-       0xd1, 0x88, 0x70, 0x46, 0x10, 0xe4, 0xe9, 0xa8, 
-       0x00, 0x21, 0xd0, 0xe8, 0xd0, 0x00, 0x60, 0x03, 
-       0xd0, 0x81, 0x40, 0x42, 0x60, 0x46, 0x02, 0x3c, 
-       0xda, 0x89, 0xe0, 0x46, 0xd0, 0x82, 0x50, 0x42, 
-       0x60, 0x46, 0x00, 0x23, 0xd5, 0x3e, 0x01, 0x7a, 
-       0xde, 0x1a, 0xe0, 0x46, 0x01, 0x46, 0xdf, 0x5c, 
-       0x08, 0x20, 0xd1, 0x00, 0xcf, 0x04, 0x11, 0x08, 
-       0xa1, 0x0a, 0xa1, 0x1b, 0x11, 0x1f, 0xa1, 0x27, 
-       0xd2, 0x80, 0xb2, 0x81, 0x90, 0x4d, 0xc0, 0x01, 
-       0x10, 0x14, 0x00, 0x16, 0xe9, 0x8d, 0x80, 0x33, 
-       0x80, 0x3f, 0x92, 0x8b, 0x00, 0x23, 0xd0, 0x3f, 
-       0x42, 0x80, 0xe9, 0x8d, 0x0f, 0xff, 0xdf, 0xff, 
-       0x40, 0x01, 0xa0, 0x0d, 0xe1, 0x94, 0xa1, 0x0a, 
-       0x00, 0xea, 0xd0, 0x00, 0xd0, 0x8e, 0x00, 0x06, 
-       0x0f, 0x0b, 0x70, 0x80, 0x80, 0x73, 0x80, 0x0a, 
-       0xd0, 0x00, 0x06, 0x50, 0xf9, 0x9a, 0xd0, 0x01, 
-       0xd0, 0x44, 0x40, 0x70, 0x20, 0x01, 0x15, 0x63, 
-       0xf9, 0xa1, 0x80, 0x1b, 0xe1, 0xa2, 0x80, 0x5b, 
-       0xa0, 0x27, 0x01, 0x20, 0xd0, 0x67, 0xa0, 0x69, 
-       0x80, 0x2a, 0x82, 0x29, 0x80, 0x6a, 0x84, 0x29, 
-       0xd0, 0x54, 0x10, 0x4f, 0xa0, 0x6a, 0x01, 0x20, 
-       0xd0, 0x40, 0xa0, 0x69, 0x80, 0x2b, 0x80, 0x07, 
-       0x08, 0x20, 0xd0, 0x00, 0xcf, 0x00, 0x02, 0x30, 
-       0xd0, 0x00, 0xa0, 0x38, 0x80, 0x3f, 0x01, 0xb2, 
-       0xd2, 0x10, 0xa0, 0x37, 0x80, 0x3f, 0x02, 0x30, 
-       0xd0, 0x01, 0xa0, 0x38, 0x00, 0x30, 0xd0, 0x10, 
-       0xa0, 0x38, 0x80, 0x3f, 0x00, 0xc6, 0x00, 0x28, 
-       0xd1, 0x24, 0x70, 0x04, 0xd0, 0x41, 0x50, 0x01, 
-       0x60, 0x04, 0x00, 0x27, 0xd0, 0x18, 0x70, 0x40, 
-       0xb0, 0x7f, 0x60, 0x40, 0x00, 0x26, 0xd0, 0x20, 
-       0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0x08, 0x20, 
-       0xdf, 0x00, 0xd4, 0x00, 0xd4, 0x40, 0xd4, 0x80, 
-       0xd4, 0xc0, 0xd3, 0x81, 0x12, 0xa0, 0xed, 0xe3, 
-       0xd0, 0x08, 0x0a, 0x09, 0x00, 0x4d, 0xb0, 0x01, 
-       0xed, 0xdf, 0x03, 0xbe, 0xd6, 0x27, 0xe0, 0x46, 
-       0x50, 0x00, 0x50, 0x00, 0x02, 0x24, 0xd0, 0x00, 
-       0xa0, 0x37, 0x00, 0x27, 0xd3, 0xd0, 0x00, 0x26, 
-       0xd0, 0x04, 0x73, 0xcf, 0x13, 0xe1, 0xe9, 0x7b, 
-       0xb0, 0x3c, 0xf2, 0x00, 0x00, 0x26, 0xd0, 0x40, 
-       0xd0, 0x00, 0x60, 0x01, 0x00, 0x26, 0xd0, 0x14, 
-       0xf2, 0x00, 0x00, 0x26, 0xd0, 0x18, 0xf2, 0x00, 
-       0x00, 0xee, 0xd0, 0x1c, 0x71, 0x40, 0xd1, 0x1e, 
-       0x15, 0x63, 0xe9, 0x8d, 0x11, 0x1f, 0xc7, 0x1a, 
-       0xb7, 0x01, 0xd3, 0x81, 0xc4, 0xd4, 0xf2, 0x04, 
-       0x00, 0x26, 0xd0, 0x18, 0x70, 0x40, 0xb0, 0x54, 
-       0xfd, 0x9b, 0x00, 0xed, 0xd0, 0x24, 0xd0, 0x44, 
-       0x60, 0x40, 0x13, 0xe1, 0xf9, 0xbc, 0x15, 0xa3, 
-       0xf9, 0xa1, 0x0c, 0x10, 0xe9, 0xb9, 0x11, 0x61, 
-       0xe5, 0xb3, 0xed, 0xb9, 0x15, 0xa3, 0xf9, 0xab, 
-       0x00, 0x26, 0xd0, 0x14, 0x70, 0x40, 0x10, 0x62, 
-       0xf5, 0xb3, 0x15, 0x22, 0xe5, 0xb3, 0xc0, 0x44, 
-       0x30, 0x54, 0xe5, 0xb3, 0x34, 0xd4, 0xf5, 0xb3, 
-       0xe1, 0xbf, 0x03, 0xb3, 0xd8, 0x29, 0x00, 0x26, 
-       0xd0, 0x40, 0x60, 0x01, 0xe1, 0xdb, 0x03, 0xb3, 
-       0xd8, 0x29, 0xe0, 0x46, 0x01, 0x7a, 0xde, 0x1a, 
-       0xe0, 0x46, 0x80, 0x07, 0x09, 0x49, 0xd4, 0x00, 
-       0xd4, 0x40, 0xd4, 0x80, 0xd4, 0xc0, 0x00, 0x4d, 
-       0xa0, 0x6c, 0xd3, 0x80, 0xd0, 0xa1, 0x00, 0x88, 
-       0xd0, 0xa9, 0x00, 0x4d, 0x00, 0x50, 0xf9, 0xc9, 
-       0x0c, 0x49, 0xd0, 0x61, 0x00, 0x8d, 0x10, 0xa0, 
-       0xe9, 0x90, 0x30, 0x42, 0xf5, 0xd8, 0xd0, 0x61, 
-       0x23, 0x81, 0xe1, 0xce, 0x23, 0x82, 0x13, 0xa1, 
-       0xf9, 0x90, 0xd0, 0x42, 0x15, 0xa1, 0xf9, 0xdf, 
-       0xb0, 0x7f, 0x00, 0x26, 0xd0, 0x14, 0x70, 0x00, 
-       0x30, 0x01, 0xf5, 0xe8, 0x16, 0xe0, 0xe5, 0xe8, 
-       0xb6, 0xc1, 0xbc, 0x20, 0xc0, 0x44, 0x30, 0x5b, 
-       0xfd, 0xb9, 0xc0, 0x44, 0x30, 0x54, 0xe5, 0xb9, 
-       0x15, 0x63, 0xf9, 0xf8, 0x15, 0xa3, 0xf9, 0xf5, 
-       0x03, 0x3b, 0xda, 0x1c, 0xe0, 0x46, 0x03, 0x38, 
-       0xdc, 0x17, 0xe0, 0x46, 0x15, 0xa3, 0xf9, 0xfd, 
-       0x03, 0x72, 0xd0, 0x19, 0xe0, 0x46, 0x03, 0x3f, 
-       0xd2, 0x17, 0xe0, 0x46, 0x70, 0x40, 0xb0, 0x7f, 
-       0x60, 0x40, 0x0f, 0xc5, 0xdf, 0x00, 0x0c, 0x09, 
-       0x05, 0x0d, 0x08, 0x20, 0xdf, 0x00, 0x0f, 0xc5, 
-       0x50, 0x00, 0x50, 0x00, 0x00, 0xef, 0xd0, 0x14, 
-       0x70, 0x40, 0x10, 0x60, 0xe9, 0x45, 0xb0, 0x04, 
-       0x70, 0x40, 0xb0, 0x41, 0xed, 0x44, 0x00, 0xed, 
-       0xd0, 0x24, 0xd0, 0x44, 0x60, 0x40, 0x00, 0x64, 
-       0xd0, 0x20, 0x70, 0x00, 0x10, 0x30, 0xe9, 0x45, 
-       0x00, 0x21, 0xd0, 0x28, 0x60, 0x40, 0x00, 0x64, 
-       0xd2, 0xc0, 0x70, 0x0b, 0x00, 0x11, 0xe9, 0x6a, 
-       0x08, 0x20, 0xd0, 0x4f, 0x30, 0x40, 0xe9, 0x55, 
-       0xb0, 0x4f, 0xf9, 0x6a, 0x03, 0xef, 0xdf, 0xbf, 
-       0xaf, 0xb8, 0xdf, 0x80, 0x0f, 0x87, 0xd0, 0x18, 
-       0x70, 0x00, 0x10, 0x20, 0xed, 0x6c, 0xdf, 0x84, 
-       0xd0, 0x40, 0x60, 0x7e, 0x00, 0x27, 0xd0, 0x54, 
-       0x70, 0x41, 0x10, 0x60, 0x01, 0xa0, 0xd0, 0x40, 
-       0xa0, 0x78, 0x80, 0x34, 0x80, 0x3f, 0x01, 0x3c, 
-       0xd2, 0x39, 0x00, 0x21, 0xdf, 0x86, 0x0f, 0x87, 
-       0xd0, 0x40, 0x60, 0x4b, 0x03, 0xe5, 0xd0, 0x10, 
-       0xe0, 0x36, 0x50, 0x00, 0x00, 0x28, 0xd0, 0x24, 
-       0x72, 0xc0, 0xd0, 0x40, 0x60, 0x40, 0xd0, 0x0c, 
-       0x52, 0xc0, 0xc0, 0x1c, 0x30, 0x1d, 0xf5, 0x3c, 
-       0x20, 0x1f, 0x30, 0x1e, 0x90, 0x6d, 0x20, 0x01, 
-       0x00, 0x22, 0xd0, 0x58, 0x60, 0x01, 0x00, 0xe3, 
-       0xd0, 0x48, 0x70, 0x41, 0x30, 0x40, 0xf5, 0x47, 
-       0xb2, 0xc8, 0x00, 0xe3, 0xd0, 0x4c, 0x70, 0x41, 
-       0x30, 0x40, 0xfd, 0x4d, 0xb2, 0xc4, 0x00, 0x28, 
-       0xd0, 0x20, 0x70, 0x00, 0x42, 0xc0, 0xa2, 0xc5, 
-       0x12, 0xe0, 0xe9, 0x55, 0x80, 0x40, 0x80, 0x34, 
-       0x80, 0x3f, 0xcf, 0x95, 0x82, 0x34, 0x80, 0x3f, 
-       0x03, 0xe7, 0xd0, 0x08, 0x1f, 0xa3, 0xe9, 0x60, 
-       0x03, 0xe9, 0xd0, 0x08, 0x00, 0x27, 0xd0, 0x4c, 
-       0x7f, 0x81, 0x00, 0x27, 0xd0, 0x54, 0x70, 0x41, 
-       0x10, 0x60, 0x03, 0xa0, 0xd0, 0x40, 0xa0, 0x78, 
-       0xe0, 0x3c, 0x50, 0x00, 0xc0, 0x84, 0x10, 0x8c, 
-       0x10, 0x92, 0xd0, 0x41, 0x30, 0x4d, 0x40, 0x43, 
-       0x10, 0x43, 0x20, 0x81, 0xd1, 0x8f, 0x41, 0x82, 
-       0x10, 0x9c, 0x20, 0x9b, 0xc1, 0xc2, 0x10, 0x82, 
-       0x20, 0x87, 0xc0, 0x42, 0x10, 0x43, 0x20, 0x81, 
-       0x10, 0x88, 0x22, 0x02, 0x10, 0x97, 0x01, 0xd0, 
-       0xe9, 0x48, 0xb0, 0x96, 0x10, 0x88, 0x22, 0x82, 
-       0xc0, 0x5c, 0x10, 0x48, 0xc0, 0x84, 0x10, 0x91, 
-       0x10, 0x86, 0x20, 0x42, 0x41, 0x0d, 0x11, 0x02, 
-       0x20, 0x44, 0x22, 0x01, 0x22, 0x81, 0x02, 0xe4, 
-       0xd2, 0x40, 0xc2, 0xca, 0xb2, 0xe0, 0x01, 0xd0, 
-       0xe9, 0x5e, 0xc2, 0xca, 0x22, 0xc9, 0xb2, 0xa0, 
-       0x22, 0x48, 0xd0, 0x78, 0x03, 0x50, 0xf9, 0x69, 
-       0xd0, 0x7c, 0x01, 0x9d, 0xf9, 0x69, 0xc2, 0x48, 
-       0xb2, 0x60, 0xc2, 0xca, 0xb2, 0xf0, 0x11, 0x82, 
-       0x41, 0x81, 0x22, 0x06, 0x11, 0x9f, 0x41, 0x81, 
-       0x22, 0x86, 0x0f, 0xc5, 0xc0, 0x84, 0x10, 0x8c, 
-       0x10, 0x92, 0xd1, 0x8f, 0x41, 0x82, 0x10, 0x9c, 
-       0xc1, 0xdb, 0x11, 0xc1, 0x21, 0xc3, 0x20, 0x87, 
-       0xc1, 0xc2, 0x10, 0x82, 0x20, 0x87, 0xc0, 0x42, 
-       0x10, 0x43, 0x20, 0x81, 0x10, 0x88, 0x22, 0x02, 
-       0x10, 0x97, 0x01, 0xd0, 0xe9, 0x46, 0xb0, 0x96, 
-       0x10, 0x88, 0x22, 0x82, 0xc0, 0x5c, 0x10, 0x48, 
-       0xc0, 0x84, 0x10, 0x91, 0x10, 0x86, 0x20, 0x42, 
-       0xd0, 0x81, 0x41, 0x02, 0x11, 0x02, 0x20, 0x44, 
-       0x22, 0x01, 0x22, 0x81, 0x02, 0xe4, 0xd2, 0x40, 
-       0xc2, 0xca, 0xb2, 0xe0, 0x01, 0xd0, 0xe9, 0x5d, 
-       0xc2, 0xca, 0x22, 0xc9, 0xb2, 0xa0, 0x22, 0x48, 
-       0x11, 0x9f, 0x11, 0x83, 0x22, 0x06, 0x11, 0x9c, 
-       0x11, 0x83, 0x22, 0x86, 0x0f, 0xc5, 0xd0, 0x41, 
-       0x40, 0x44, 0x20, 0x55, 0x10, 0x62, 0xf9, 0x6f, 
-       0x01, 0x74, 0xd6, 0x00, 0xc2, 0x9f, 0xc2, 0x1f, 
-       0x22, 0x80, 0xe1, 0x30, 0x0f, 0x11, 0xf9, 0x51, 
-       0x90, 0x38, 0x80, 0x3f, 0x00, 0x1b, 0xf9, 0x51, 
-       0x00, 0x27, 0xd0, 0x04, 0x70, 0x40, 0x30, 0x71, 
-       0xf9, 0x51, 0xb0, 0x3c, 0x70, 0x40, 0x30, 0x5d, 
-       0xf9, 0x51, 0xb0, 0x08, 0x70, 0x40, 0xb0, 0x7f, 
-       0x60, 0x40, 0x10, 0x63, 0xe5, 0x5d, 0x02, 0x20, 
-       0xd0, 0x01, 0xa0, 0x37, 0x00, 0x26, 0xd0, 0x24, 
-       0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0xb0, 0x08, 
-       0x70, 0x40, 0xb0, 0x41, 0x60, 0x40, 0x00, 0x26, 
-       0xd0, 0x30, 0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 
-       0xb0, 0x30, 0xd0, 0x40, 0x60, 0x40, 0xb0, 0x3c, 
-       0x6c, 0x40, 0xb0, 0x3c, 0x67, 0x40, 0x00, 0x33, 
-       0xdf, 0x78, 0xe0, 0x36, 0x00, 0x26, 0xd0, 0x1c, 
-       0x70, 0x40, 0xb0, 0x7f, 0x60, 0x40, 0xb0, 0x3c, 
-       0x70, 0x40, 0xb0, 0x41, 0x60, 0x40, 0x08, 0x20, 
-       0xdf, 0x00, 0x80, 0x35, 0xc0, 0x3c, 0x10, 0x08, 
-       0xa0, 0x0a, 0xa0, 0x27, 0xa0, 0x1b, 0xdf, 0x5c, 
-       0x01, 0xa0, 0xd0, 0x00, 0xa0, 0x38, 0x80, 0x3f, 
-       0x80, 0x34, 0x80, 0x3f, 0x03, 0xba, 0xda, 0x1e, 
-       0xcf, 0x95, 0x82, 0x34, 0x80, 0x3f, 0x03, 0xe7, 
-       0xd0, 0x08, 0x1f, 0xa3, 0xe9, 0x55, 0x1f, 0xa0, 
-       0xe9, 0x55, 0x03, 0xe9, 0xd0, 0x08, 0x00, 0x21, 
-       0xdf, 0x86, 0xe0, 0x3c, 0x89, 0x78, 0x89, 0x37, 
-       0x00, 0xee, 0xd0, 0x14, 0x76, 0x00, 0xd0, 0x30, 
-       0x76, 0x40, 0x26, 0x58, 0xd6, 0xd9, 0x00, 0xee, 
-       0xd0, 0x20, 0x75, 0x40, 0xd0, 0x1c, 0x71, 0x40, 
-       0xd0, 0x20, 0x71, 0x00, 0xd0, 0x24, 0x70, 0x80, 
-       0xc4, 0x02, 0xd0, 0x28, 0x70, 0xc0, 0x00, 0x21, 
-       0xd0, 0x10, 0x72, 0x00, 0x93, 0x90, 0xd4, 0x81, 
-       0x13, 0x96, 0x43, 0x92, 0x34, 0x8e, 0x00, 0x22, 
-       0xd1, 0xa4, 0x71, 0x86, 0xde, 0x40, 0x7e, 0x79, 
-       0xd0, 0x18, 0x70, 0x40, 0xb0, 0x41, 0xf5, 0x58, 
-       0xd3, 0x42, 0x50, 0x4d, 0x60, 0x40, 0x10, 0x60, 
-       0xe5, 0x62, 0xd0, 0x54, 0x70, 0x01, 0xb0, 0x3c, 
-       0x60, 0x01, 0x04, 0x2d, 0xd0, 0x08, 0xe0, 0x36, 
-       0x00, 0x22, 0xd0, 0x60, 0x71, 0xc1, 0xd0, 0x4f, 
-       0x41, 0xc1, 0x03, 0xef, 0xd0, 0x30, 0xe0, 0x36, 
-       0x50, 0x00, 0x50, 0x00, 0x04, 0x21, 0xd0, 0x20, 
-       0xd3, 0x44, 0x72, 0x8d, 0x12, 0xa0, 0xe8, 0x36, 
-       0xc0, 0x47, 0x10, 0x5d, 0x30, 0x4e, 0xf8, 0x36, 
-       0xb2, 0x3e, 0x60, 0x4d, 0x00, 0xed, 0xd0, 0x48, 
-       0x70, 0x01, 0xde, 0x45, 0x50, 0x39, 0x00, 0x1b, 
-       0xf9, 0x44, 0xb0, 0x01, 0x00, 0x1c, 0xf9, 0x47, 
-       0xb0, 0x04, 0x60, 0x01, 0xd0, 0x40, 0x62, 0x81, 
-       0xce, 0x4a, 0xd0, 0x43, 0x41, 0xc1, 0xd0, 0x58, 
-       0x61, 0xc1, 0x90, 0x43, 0x00, 0xe0, 0xd0, 0x28, 
-       0x70, 0x00, 0x10, 0x1f, 0x20, 0x40, 0xb1, 0xc1, 
-       0xf5, 0x54, 0x00, 0x21, 0xd0, 0x08, 0x60, 0x40, 
-       0x00, 0xe6, 0xd0, 0x40, 0x70, 0x41, 0xd2, 0x94, 
-       0x60, 0x4a, 0x04, 0x2b, 0xd0, 0x10, 0x01, 0x90, 
-       0xf8, 0x36, 0x04, 0x2d, 0xd0, 0x08, 0xe0, 0x36, 
-       0x50, 0x00, 0x50, 0x00, 0xc0, 0x47, 0x10, 0x5d, 
-       0x30, 0x4e, 0xf9, 0x41, 0x90, 0x43, 0x00, 0xe0, 
-       0xd0, 0x28, 0x70, 0x00, 0x20, 0x40, 0x00, 0x21, 
-       0xd0, 0x08, 0x60, 0x40, 0x00, 0x26, 0xd0, 0x74, 
-       0x70, 0x01, 0xb0, 0x3f, 0x60, 0x01, 0x00, 0xed, 
-       0xd0, 0x48, 0x70, 0x41, 0x00, 0x5e, 0xf9, 0x4b, 
-       0x00, 0x21, 0xd0, 0x00, 0x73, 0x80, 0xd4, 0x81, 
-       0x34, 0x8e, 0x00, 0x34, 0xd3, 0x48, 0xe0, 0x36, 
-       0x50, 0x00, 0x50, 0x00, 0xd1, 0x88, 0xd1, 0xc8, 
-       0x01, 0x1b, 0xe9, 0x39, 0x11, 0x9f, 0x11, 0xdf, 
-       0xd4, 0x80, 0xd3, 0x81, 0xe1, 0x43, 0x00, 0xed, 
-       0xd0, 0x08, 0x70, 0x00, 0x00, 0x10, 0xf9, 0x37, 
-       0x0c, 0x1f, 0xf9, 0x36, 0x13, 0xa1, 0xe9, 0x43, 
-       0xbe, 0x7c, 0x00, 0x65, 0xd2, 0x46, 0x12, 0x48, 
-       0xc0, 0x39, 0x30, 0x18, 0xe5, 0x4b, 0xd2, 0x70, 
-       0x72, 0x49, 0x22, 0x79, 0x00, 0x21, 0xd0, 0x00, 
-       0x63, 0x80, 0x04, 0x24, 0xd0, 0x00, 0x02, 0x10, 
-       0xe9, 0x56, 0xd0, 0x41, 0x51, 0x41, 0xe0, 0x36, 
-       0x15, 0x61, 0xe8, 0x36, 0xd5, 0x80, 0xd3, 0x00, 
-       0xd3, 0x40, 0x04, 0x27, 0xd0, 0x20, 0xe0, 0x36, 
-       0x50, 0x00, 0x50, 0x00, 0x00, 0x21, 0xd0, 0x18, 
-       0x73, 0x00, 0xb0, 0x04, 0x73, 0x80, 0xd2, 0x80, 
-       0xb0, 0x38, 0x72, 0xc0, 0x31, 0x0d, 0xc0, 0x0e, 
-       0x10, 0x0b, 0x10, 0x20, 0xe9, 0x42, 0xf5, 0x3f, 
-       0x22, 0x8d, 0x10, 0x01, 0x13, 0x5f, 0xe1, 0x3b, 
-       0x33, 0x8b, 0x15, 0x61, 0xf9, 0x49, 0x00, 0x21, 
-       0xd0, 0x64, 0x70, 0x41, 0x33, 0x81, 0x03, 0xd0, 
-       0xe9, 0x4c, 0x20, 0x0b, 0x13, 0xdf, 0x12, 0xc1, 
-       0x13, 0xe0, 0xf9, 0x49, 0x10, 0x03, 0xc0, 0x50, 
-       0x10, 0x4b, 0x13, 0x0b, 0x23, 0x00, 0x13, 0x20, 
-       0xe9, 0x5c, 0xf5, 0x59, 0x22, 0x81, 0x13, 0x01, 
-       0x10, 0x5f, 0xe1, 0x55, 0x12, 0x99, 0x12, 0x87, 
-       0x21, 0x0a, 0x00, 0xa0, 0xd2, 0x80, 0xc3, 0x0a, 
-       0x03, 0x90, 0xe9, 0x66, 0x22, 0x82, 0x23, 0x03, 
-       0x10, 0x81, 0x10, 0xc1, 0x13, 0x9f, 0x13, 0xa0, 
-       0xed, 0x62, 0xc0, 0x8a, 0xc0, 0xcc, 0x04, 0x26, 
-       0xd0, 0x00, 0xe0, 0x36, 0x15, 0x61, 0xf9, 0x3d, 
-       0x07, 0x32, 0xd0, 0x00, 0x30, 0x03, 0xed, 0x3d, 
-       0xc0, 0x03, 0x10, 0x1d, 0x30, 0xc0, 0xc0, 0x02, 
-       0x10, 0x1d, 0x30, 0x80, 0xe1, 0x32, 0x10, 0x94, 
-       0x10, 0xd4, 0x00, 0x21, 0xd0, 0x20, 0x73, 0x00, 
-       0xc5, 0x8c, 0xd3, 0x4e, 0x01, 0x1b, 0xe9, 0x48, 
-       0x13, 0x1f, 0xd3, 0x4f, 0x43, 0x4c, 0x13, 0x1c, 
-       0xc0, 0x0c, 0x10, 0x03, 0x20, 0x0c, 0xc0, 0x40, 
-       0x10, 0x42, 0x20, 0x40, 0x10, 0x46, 0x20, 0x4d, 
-       0x10, 0x42, 0x2e, 0x41, 0x10, 0x5c, 0x10, 0x43, 
-       0x00, 0x59, 0xe9, 0x5b, 0x01, 0x69, 0xd0, 0x20, 
-       0x30, 0x40, 0x22, 0x41, 0x04, 0x27, 0xd0, 0x20, 
-       0xe0, 0x36, 0x50, 0x00, 0x2c, 0x14, 0xd0, 0x34, 
-       0x63, 0x00, 0xd0, 0x38, 0x72, 0xc0, 0xc0, 0x51, 
-       0x10, 0x5c, 0x30, 0x4b, 0x10, 0x44, 0xd4, 0xc0, 
-       0xd5, 0x00, 0xc0, 0x18, 0x30, 0x39, 0xed, 0x5f, 
-       0xd4, 0xd0, 0xc5, 0x01, 0xd0, 0x18, 0x70, 0x00, 
-       0x0c, 0x1f, 0xe9, 0x48, 0x10, 0x20, 0xfd, 0x48, 
-       0xd4, 0xc0, 0xd5, 0x00, 0x10, 0x22, 0xe5, 0x4e, 
-       0xd4, 0xc0, 0xbc, 0x30, 0xd5, 0x00, 0xb5, 0x10, 
-       0xb0, 0x3f, 0xf9, 0x52, 0x3c, 0x01, 0x3c, 0x01, 
-       0x02, 0x1f, 0xe9, 0x5f, 0x00, 0xa8, 0xd3, 0xc0, 
-       0xd3, 0x9e, 0x00, 0xa9, 0xd0, 0x38, 0x70, 0x4f, 
-       0xb3, 0xfc, 0x60, 0x40, 0xb0, 0x3c, 0xb3, 0x81, 
-       0xed, 0x59, 0x00, 0x21, 0xd0, 0x28, 0x70, 0x00, 
-       0x10, 0x20, 0xf9, 0x69, 0x02, 0x1f, 0xf9, 0x6a, 
-       0x90, 0x10, 0x00, 0x1e, 0xe9, 0x6a, 0xb1, 0x7c, 
-       0x04, 0x29, 0xd0, 0x20, 0xe0, 0x36, 0x50, 0x00, 
-       0x50, 0x00, 0x50, 0x00, 0x01, 0x5e, 0xf9, 0x35, 
-       0x01, 0x50, 0xe9, 0x35, 0xb1, 0x78, 0xd2, 0x00, 
-       0x01, 0x5c, 0xf9, 0x5f, 0xc0, 0x18, 0x30, 0x39, 
-       0xed, 0x5f, 0x11, 0x9f, 0xce, 0x58, 0xc2, 0x59, 
-       0x00, 0xa9, 0xd2, 0x38, 0x14, 0x82, 0x22, 0x12, 
-       0xc0, 0x0c, 0x10, 0x1f, 0x10, 0x03, 0x22, 0x00, 
-       0x70, 0x48, 0x03, 0x10, 0xe9, 0x4c, 0xb2, 0x38, 
-       0xbe, 0x60, 0xb2, 0x60, 0x2e, 0x41, 0x10, 0x5f, 
-       0x00, 0x59, 0xe9, 0x53, 0x01, 0x69, 0xd0, 0x3c, 
-       0x30, 0x40, 0x22, 0x41, 0x13, 0x41, 0x2e, 0x4d, 
-       0x13, 0x5d, 0x13, 0x43, 0x22, 0x4d, 0x14, 0xe0, 
-       0xe9, 0x5f, 0x33, 0x0b, 0x13, 0x04, 0x2c, 0x0c, 
-       0x35, 0x0c, 0xc3, 0x46, 0xc3, 0x87, 0x04, 0x61, 
-       0xd0, 0x28, 0x15, 0x62, 0xfc, 0x36, 0x04, 0x2f, 
-       0xd0, 0x28, 0xe0, 0x36, 0x00, 0x22, 0xd0, 0x74, 
-       0x74, 0x01, 0xb0, 0x7c, 0x74, 0x41, 0xb0, 0x7c, 
-       0x00, 0x27, 0xd0, 0x20, 0x30, 0x11, 0xf5, 0x3b, 
-       0x24, 0x40, 0x71, 0x41, 0xd1, 0x08, 0xc0, 0x10, 
-       0x10, 0x1c, 0xb0, 0x16, 0xf9, 0x4a, 0x00, 0x23, 
-       0xd0, 0x30, 0x30, 0x11, 0xf9, 0x4a, 0xb1, 0x70, 
-       0x01, 0x50, 0xf9, 0x4a, 0xb1, 0x20, 0x14, 0x41, 
-       0xc0, 0x90, 0x00, 0x2b, 0xd0, 0xd0, 0x01, 0x50, 
-       0xe9, 0x50, 0xc0, 0xd0, 0x00, 0x34, 0xdc, 0x00, 
-       0x20, 0x11, 0x10, 0x1f, 0xa0, 0x1c, 0x00, 0x21, 
-       0xd0, 0x2c, 0x70, 0x00, 0x10, 0x05, 0x51, 0x40, 
-       0xd0, 0x1c, 0x61, 0x40, 0xd0, 0x20, 0x61, 0x00, 
-       0xd0, 0x24, 0x60, 0x80, 0xd0, 0x28, 0x60, 0xc0, 
-       0x04, 0x2d, 0xd0, 0x08, 0x00, 0x22, 0xd0, 0x64, 
-       0xb1, 0x81, 0x61, 0x81, 0xe0, 0x36, 0x50, 0x00, 
-       0x50, 0x00, 0x50, 0x00, 0x90, 0x50, 0xd0, 0x3c, 
-       0x10, 0x41, 0x60, 0x40, 0x15, 0x62, 0xfd, 0x3d, 
-       0xc0, 0x10, 0x10, 0x1e, 0x10, 0x07, 0x21, 0x00, 
-       0x10, 0x16, 0x34, 0x00, 0xc0, 0x90, 0xd3, 0x40, 
-       0x00, 0x24, 0xd3, 0xc0, 0x04, 0x22, 0xd0, 0x20, 
-       0x01, 0x9f, 0xe8, 0x36, 0xd0, 0x54, 0x70, 0x41, 
-       0x73, 0x41, 0x04, 0x2e, 0xd0, 0x00, 0xe0, 0x36, 
-       0x50, 0x00, 0x50, 0x00, 0x00, 0xef, 0xd3, 0x30, 
-       0x73, 0x0c, 0xd0, 0x0c, 0x70, 0x00, 0xc0, 0x40, 
-       0x13, 0x24, 0xf5, 0x42, 0x13, 0x22, 0xe9, 0x41, 
-       0xe5, 0x43, 0xd3, 0x00, 0x10, 0x22, 0xf9, 0x41, 
-       0xd0, 0x01, 0xd0, 0x43, 0xd3, 0x01, 0x21, 0x00, 
-       0xd3, 0x40, 0x03, 0x10, 0xf9, 0x47, 0xd3, 0x40, 
-       0xe1, 0x61, 0x00, 0x23, 0xd0, 0x00, 0x10, 0x61, 
-       0xe9, 0x50, 0xb0, 0x33, 0x10, 0x63, 0xe9, 0x50, 
-       0x00, 0x22, 0xd0, 0x1a, 0xc3, 0xc0, 0xd2, 0xc0, 
-       0x00, 0x10, 0xe9, 0x55, 0x22, 0xd0, 0x10, 0x1f, 
-       0x14, 0x01, 0x10, 0x20, 0xed, 0x52, 0x14, 0x18, 
-       0x12, 0xd8, 0xc0, 0x8b, 0x32, 0xd0, 0x12, 0xc3, 
-       0x33, 0x4b, 0x13, 0x47, 0x21, 0x0d, 0x04, 0x22, 
-       0xd0, 0x20, 0xe0, 0x36, 0x00, 0x24, 0xd0, 0x30, 
-       0xd0, 0x40, 0x60, 0x40, 0xd3, 0xc7, 0x43, 0xc4, 
-       0x31, 0x0f, 0xd5, 0xd4, 0x25, 0xcf, 0x15, 0xc4, 
-       0x10, 0xdf, 0xc2, 0xc6, 0xc3, 0x07, 0x11, 0x81, 
-       0xb1, 0x3b, 0x15, 0x64, 0xe9, 0x47, 0x10, 0xdf, 
-       0x12, 0xc1, 0x11, 0x81, 0x11, 0xc1, 0xb1, 0x3f, 
-       0xb5, 0xf8, 0x90, 0x10, 0x00, 0x16, 0xf9, 0x5e, 
-       0xb5, 0xfc, 0xd0, 0x20, 0x40, 0x39, 0x2e, 0x4b, 
-       0x22, 0x4c, 0x12, 0x20, 0xe9, 0x59, 0x20, 0x39, 
-       0x00, 0x1b, 0xe9, 0x59, 0x2c, 0x13, 0x35, 0x13, 
-       0x0e, 0x5a, 0xf9, 0x59, 0xb2, 0x38, 0x02, 0xe3, 
-       0xd0, 0x00, 0x0e, 0x5a, 0xe9, 0x5e, 0x2e, 0x40, 
-       0x01, 0xee, 0xd2, 0x80, 0x42, 0x84, 0xc0, 0x03, 
-       0x30, 0x02, 0xf5, 0x6b, 0x31, 0x0a, 0x12, 0x98, 
-       0x20, 0x03, 0xf5, 0x69, 0x12, 0x9f, 0x12, 0x87, 
-       0x51, 0x0a, 0x00, 0x34, 0xd4, 0xc8, 0xe0, 0x36, 
-       0x50, 0x00, 0x50, 0x00, 0xd3, 0xc7, 0x43, 0xc4, 
-       0x15, 0x61, 0xf9, 0x48, 0x10, 0xc1, 0xd5, 0xe0, 
-       0xd1, 0x80, 0xd1, 0xc0, 0x31, 0x0f, 0x13, 0xe1, 
-       0xe9, 0x3c, 0xd3, 0xc0, 0x00, 0x24, 0xd0, 0x30, 
-       0x63, 0xc0, 0x25, 0xcf, 0x15, 0xc2, 0xd0, 0x03, 
-       0x40, 0x16, 0x25, 0xc0, 0x15, 0xc2, 0x15, 0x81, 
-       0x35, 0x91, 0xe1, 0x5c, 0x00, 0x24, 0xd0, 0x30, 
-       0x63, 0xc0, 0x01, 0x50, 0xe9, 0x54, 0x15, 0xa0, 
-       0xf9, 0x55, 0x00, 0x24, 0xd0, 0x34, 0x70, 0x00, 
-       0x10, 0x20, 0xe9, 0x55, 0xd3, 0xc0, 0x31, 0x0f, 
-       0xd5, 0xfc, 0x25, 0xcf, 0x15, 0xc3, 0x14, 0xa0, 
-       0xe9, 0x5c, 0xb5, 0xfc, 0x00, 0x34, 0xd4, 0xc8, 
-       0xe0, 0x36, 0x50, 0x00, 0xc4, 0x91, 0x34, 0x96, 
-       0xed, 0x34, 0xd4, 0x80, 0x14, 0x84, 0xb3, 0xc1, 
-       0xe5, 0x41, 0xc0, 0x52, 0x10, 0x5e, 0x34, 0x81, 
-       0xb3, 0xc1, 0xe5, 0x41, 0xc0, 0x52, 0x10, 0x5c, 
-       0x24, 0x81, 0xb3, 0xc1, 0xe5, 0x37, 0x02, 0x68, 
-       0xd0, 0x00, 0xb4, 0xb0, 0x14, 0x9b, 0x00, 0x23, 
-       0xd0, 0x70, 0x30, 0x52, 0xed, 0x4a, 0x24, 0x81, 
-       0x20, 0x12, 0xa0, 0x1c, 0x10, 0x8a, 0x50, 0x83, 
-       0xa0, 0x96, 0xa1, 0x50, 0xa1, 0x11, 0xc0, 0x52, 
-       0xd4, 0x84, 0x10, 0x6c, 0xed, 0x56, 0xd4, 0x81, 
-       0xd1, 0x00, 0xb1, 0x13, 0x00, 0x23, 0xd1, 0x40, 
-       0xc2, 0xb9, 0x22, 0x86, 0x12, 0x20, 0xf9, 0x66, 
-       0x02, 0xe3, 0xd0, 0x40, 0x02, 0x9a, 0xe9, 0x63, 
-       0x22, 0x81, 0x02, 0x5a, 0xe9, 0x66, 0x22, 0x41, 
-       0x75, 0xd7, 0xc3, 0xd7, 0xd0, 0xd7, 0x00, 0x21, 
-       0xd0, 0xb6, 0x8b, 0x38, 0x00, 0x33, 0xdc, 0xd0, 
-       0xe0, 0x36, 0x50, 0x00, 0xd0, 0x7c, 0x60, 0x01, 
-       0xae, 0x52, 0xd0, 0x60, 0x40, 0x79, 0x00, 0x13, 
-       0xe8, 0xc9, 0xa2, 0x94, 0x22, 0x86, 0x13, 0xe0, 
-       0xe4, 0xd0, 0x13, 0xc1, 0x15, 0x62, 0xfc, 0xd1, 
-       0x13, 0xc1, 0xe0, 0xd1, 0xc3, 0xd7, 0x03, 0xd9, 
-       0xe8, 0xd4, 0x22, 0x8d, 0x15, 0x62, 0xfc, 0xda, 
-       0x03, 0xda, 0xe8, 0xda, 0x22, 0x8d, 0x22, 0x8d, 
-       0xce, 0x4a, 0x22, 0x86, 0x00, 0x14, 0xe8, 0xe0, 
-       0xa2, 0x53, 0x22, 0x47, 0x03, 0xd1, 0xe8, 0xe8, 
-       0x22, 0x4e, 0x15, 0x62, 0xfc, 0xe8, 0x03, 0xd2, 
-       0xe8, 0xe8, 0x22, 0x4e, 0x12, 0x20, 0xe9, 0x09, 
-       0x20, 0x79, 0x00, 0x5b, 0xe8, 0xf4, 0x15, 0x20, 
-       0xfc, 0xf1, 0x2c, 0x13, 0x35, 0x13, 0x0e, 0x5b, 
-       0xe8, 0xf4, 0xb2, 0x38, 0x02, 0x9a, 0xe8, 0xfb, 
-       0x70, 0x08, 0xd0, 0x7c, 0x42, 0x81, 0x22, 0x98, 
-       0x22, 0x80, 0x02, 0x5a, 0xe9, 0x11, 0x70, 0x08, 
-       0xd0, 0x78, 0x42, 0x41, 0x22, 0x59, 0x10, 0x1f, 
-       0x22, 0x40, 0x00, 0x19, 0xe9, 0x11, 0x01, 0x69, 
-       0xd0, 0x7c, 0x32, 0x41, 0xe1, 0x11, 0x02, 0xe3, 
-       0xd0, 0x40, 0x02, 0x9a, 0xe9, 0x0e, 0x22, 0x81, 
-       0x02, 0x5a, 0xe9, 0x11, 0x22, 0x41, 0x0e, 0x5a, 
-       0xe9, 0x15, 0xce, 0x4a, 0x3e, 0x46, 0x0f, 0x87, 
-       0xdd, 0x48, 0xe1, 0x19, 0xdd, 0x40, 0xdc, 0xc8, 
-       0xdd, 0x3c, 0x7d, 0x34, 0x1d, 0x19, 0x3d, 0x35, 
-       0x4d, 0x33, 0x4c, 0xec, 0x3d, 0x33, 0xf9, 0x17, 
-       0x0f, 0xc5, 0x50, 0x00, 0xd0, 0x39, 0xd0, 0x35, 
-       0xd0, 0x1d, 0xd0, 0x2d, 0xd0, 0x3f, 0xd0, 0x2e, 
-       0xd0, 0x3c, 0xd0, 0x37, 0xd0, 0x38, 0xd0, 0x19, 
-       0xd0, 0x33, 0xd0, 0x2e, 0xd0, 0x3d, 0xd0, 0x3e, 
-       0xd0, 0x27, 0xd0, 0x3e, 0xd0, 0x3a, 0xd0, 0x2f, 
-       0xd0, 0x32, 0x00, 0x00, 0x47, 0x78, 0x46, 0xc0, 
-       0xe1, 0x01, 0x00, 0x90, 0xe1, 0x2f, 0xff, 0x1e, 
-       0x47, 0x78, 0x00, 0x00, 0xe9, 0x2d, 0x40, 0x00, 
-       0xe5, 0x9f, 0x20, 0x6c, 0xe0, 0x21, 0x10, 0x01, 
-       0xe1, 0x02, 0x00, 0x91, 0xe3, 0x50, 0x00, 0x00, 
-       0x1a, 0x00, 0x00, 0x02, 0xe3, 0xa0, 0x00, 0x00, 
-       0xeb, 0x00, 0x38, 0x99, 0xea, 0xff, 0xff, 0xf7, 
-       0xe8, 0xbd, 0x40, 0x00, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xb5, 0x00, 0x4a, 0x12, 0x68, 0x10, 0x28, 0x00, 
-       0xd1, 0x03, 0x20, 0x00, 0xf7, 0xf1, 0xff, 0xc6, 
-       0xe7, 0xf7, 0xbd, 0x00, 0x47, 0x78, 0x00, 0x00, 
-       0xe9, 0x2d, 0x40, 0x00, 0xe5, 0x9f, 0x20, 0x2c, 
-       0xe3, 0xa0, 0x10, 0x01, 0xe1, 0x02, 0x00, 0x91, 
-       0xe3, 0x50, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x02, 
-       0xe3, 0xa0, 0x00, 0x00, 0xeb, 0x00, 0x38, 0x88, 
-       0xea, 0xff, 0xff, 0xf7, 0xe8, 0xbd, 0x00, 0x01, 
-       0xe1, 0x2f, 0xff, 0x10, 0x48, 0x02, 0x40, 0x49, 
-       0x60, 0x01, 0x47, 0x70, 0x70, 0x00, 0x00, 0x34, 
-       0x2e, 0x08, 0x1f, 0xa8, 0x47, 0x78, 0x46, 0xc0, 
-       0xe1, 0xa0, 0x09, 0x00, 0xe1, 0xb0, 0x10, 0x01, 
-       0x03, 0xc0, 0x01, 0x02, 0x13, 0x80, 0x01, 0x02, 
-       0xe3, 0xa0, 0x13, 0x3f, 0xe3, 0xa0, 0x30, 0x0e, 
-       0xe1, 0xb0, 0x10, 0x81, 0x3a, 0x00, 0x00, 0x04, 
-       0xe1, 0xb0, 0x00, 0x80, 0x32, 0x21, 0x13, 0x03, 
-       0xe2, 0x53, 0x30, 0x01, 0x1a, 0xff, 0xff, 0xf9, 
-       0xea, 0x00, 0x00, 0x03, 0xe1, 0xb0, 0x00, 0x80, 
-       0x22, 0x21, 0x13, 0x03, 0xe2, 0x53, 0x30, 0x01, 
-       0x1a, 0xff, 0xff, 0xf4, 0xe1, 0xa0, 0x0d, 0x21, 
-       0xe1, 0x2f, 0xff, 0x1e, 0xe9, 0x2d, 0x41, 0xf0, 
-       0xe2, 0x4d, 0xd0, 0x14, 0xe3, 0xa0, 0xc0, 0x44, 
-       0xe2, 0x8c, 0xc4, 0x66, 0xe5, 0x9c, 0xc0, 0x00, 
-       0xe5, 0x9f, 0x01, 0x94, 0xe5, 0x80, 0xc0, 0x00, 
-       0xe1, 0xa0, 0xc1, 0x4c, 0xe2, 0x0c, 0xc0, 0x03, 
-       0xe5, 0x9f, 0x01, 0x88, 0xe5, 0xc0, 0xc0, 0x00, 
-       0xe5, 0x9f, 0x01, 0x84, 0xe5, 0x90, 0x00, 0x00, 
-       0xe0, 0x80, 0x64, 0x0c, 0xe1, 0xa0, 0x70, 0x06, 
-       0xe8, 0xb7, 0x00, 0x01, 0xe2, 0x00, 0x40, 0x1f, 
-       0xe2, 0x8f, 0x2f, 0x69, 0xe7, 0x92, 0x21, 0x04, 
-       0xe3, 0x52, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x51, 
-       0xe5, 0x9f, 0x32, 0x1c, 0xe2, 0x83, 0x50, 0xbc, 
-       0xe5, 0x9f, 0x12, 0x1c, 0xe1, 0x55, 0x00, 0x01, 
-       0x03, 0xa0, 0x50, 0x00, 0xe5, 0x9f, 0x12, 0x04, 
-       0xe1, 0x51, 0x00, 0x05, 0x0a, 0x00, 0x00, 0x45, 
-       0xe5, 0x9f, 0x81, 0xf4, 0xe0, 0x88, 0x80, 0x03, 
-       0xe5, 0x9f, 0x11, 0x5c, 0xe1, 0xa0, 0x36, 0x20, 
-       0xe2, 0x03, 0x30, 0x0f, 0xe1, 0x81, 0x10, 0x03, 
-       0xe5, 0x9f, 0x21, 0x48, 0xe7, 0x92, 0x31, 0x04, 
-       0xe1, 0xa0, 0x39, 0x83, 0xe1, 0xa0, 0x35, 0xa3, 
-       0xe1, 0x81, 0x10, 0x03, 0xe1, 0xa0, 0x33, 0xa0, 
-       0xe2, 0x03, 0x30, 0x01, 0xe1, 0xa0, 0x3b, 0x03, 
-       0xe1, 0x81, 0x10, 0x03, 0xe1, 0xa0, 0x35, 0x20, 
-       0xe2, 0x03, 0x30, 0x03, 0xe1, 0xa0, 0x32, 0x03, 
-       0xe1, 0x81, 0x10, 0x03, 0xe1, 0xa0, 0x3a, 0xa0, 
-       0xe2, 0x03, 0x30, 0x01, 0xe1, 0xa0, 0x3b, 0x83, 
-       0xe1, 0x81, 0x10, 0x03, 0xe1, 0xa0, 0x34, 0xa0, 
-       0xe2, 0x03, 0x30, 0x01, 0xe1, 0xa0, 0x3a, 0x83, 
-       0xe1, 0x81, 0x10, 0x03, 0xe2, 0x00, 0x30, 0x60, 
-       0xe1, 0xa0, 0x30, 0x83, 0xe1, 0x81, 0x10, 0x03, 
-       0xe8, 0xa8, 0x00, 0x02, 0xe5, 0x9f, 0x00, 0xf0, 
-       0xe3, 0xa0, 0x10, 0x30, 0xe5, 0x80, 0x10, 0x00, 
-       0xe5, 0x9f, 0x00, 0x9c, 0xe5, 0xd0, 0x40, 0x00, 
-       0xe2, 0x84, 0x10, 0x01, 0xe5, 0xc0, 0x10, 0x00, 
-       0xe2, 0x04, 0x40, 0x00, 0xe5, 0x9f, 0x00, 0x98, 
-       0xe5, 0x90, 0x10, 0x00, 0xe3, 0x11, 0x00, 0x10, 
-       0x1a, 0x00, 0x00, 0x1a, 0xe5, 0x80, 0x10, 0x00, 
-       0xe5, 0x8f, 0x51, 0x4c, 0xe1, 0xa0, 0x22, 0x04, 
-       0xe1, 0x82, 0x10, 0x0c, 0xe5, 0x9f, 0x00, 0xac, 
-       0xe0, 0x80, 0x02, 0x01, 0xe5, 0x80, 0x70, 0x00, 
-       0xe5, 0x80, 0x80, 0x04, 0xe5, 0x9f, 0x10, 0x5c, 
-       0xe5, 0x80, 0x10, 0x08, 0xe5, 0x9f, 0x10, 0x58, 
-       0xe5, 0x80, 0x10, 0x0c, 0xe5, 0x9f, 0x00, 0x58, 
-       0xe5, 0x90, 0x10, 0x00, 0xe0, 0x84, 0x00, 0x01, 
-       0xe3, 0xa0, 0x20, 0x01, 0xe1, 0xa0, 0x00, 0x12, 
-       0xe3, 0xa0, 0x10, 0x40, 0xe2, 0x81, 0x14, 0x66, 
-       0xe5, 0x81, 0x00, 0x00, 0xe3, 0xa0, 0x10, 0x01, 
-       0xe1, 0xa0, 0x0c, 0x11, 0xe3, 0xa0, 0x10, 0xb8, 
-       0xe2, 0x81, 0x14, 0x66, 0xe5, 0x81, 0x00, 0x00, 
-       0xe2, 0x8d, 0xd0, 0x14, 0xe8, 0xbd, 0x81, 0xf0, 
-       0xe5, 0x9f, 0x10, 0xf0, 0xe2, 0x81, 0x10, 0x01, 
-       0xe5, 0x8f, 0x10, 0xe8, 0xea, 0xff, 0xff, 0xf4, 
-       0xe5, 0x9f, 0xf0, 0x08, 0xa0, 0x00, 0x05, 0xc4, 
-       0x80, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x10, 
-       0x00, 0x00, 0x06, 0xf4, 0xa0, 0x00, 0x04, 0x28, 
-       0xa0, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x05, 0x50, 
-       0x2c, 0x00, 0x1f, 0xe8, 0x2c, 0x00, 0x1f, 0xea, 
-       0x2c, 0x00, 0x1f, 0xf4, 0x00, 0x00, 0x05, 0xe0, 
-       0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x12, 
-       0x2c, 0x00, 0x02, 0x00, 0x64, 0x00, 0x04, 0x00, 
-       0x64, 0x00, 0x00, 0x80, 0x47, 0x00, 0x00, 0x00, 
-       0x9e, 0x00, 0x00, 0xc0, 0x66, 0x00, 0x00, 0x50, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xea, 0x00, 0x00, 0x07, 
-       0xe1, 0xb0, 0xf0, 0x0e, 0xe5, 0x9f, 0xf1, 0x00, 
-       0xe2, 0x5e, 0xf0, 0x04, 0xe2, 0x5e, 0xf0, 0x08, 
-       0xea, 0x00, 0x00, 0x02, 0xe5, 0x9f, 0xf0, 0xec, 
-       0xe2, 0x5e, 0xf0, 0x04, 0x2c, 0x00, 0x00, 0xe8, 
-       0xe1, 0x0f, 0x00, 0x00, 0xe3, 0xc0, 0x00, 0x1f, 
-       0xe3, 0x80, 0x00, 0x1b, 0xe1, 0x29, 0xf0, 0x00, 
-       0xe5, 0x9f, 0xd0, 0xd8, 0xe5, 0x9f, 0x00, 0xd8, 
-       0xe0, 0x8d, 0xd0, 0x00, 0xe1, 0x0f, 0x00, 0x00, 
-       0xe3, 0xc0, 0x00, 0x1f, 0xe3, 0x80, 0x00, 0x13, 
-       0xe1, 0x29, 0xf0, 0x00, 0xe5, 0x9f, 0xd0, 0xc4, 
-       0xe5, 0x9f, 0x00, 0xc4, 0xe0, 0x8d, 0xd0, 0x00, 
-       0xe1, 0x0f, 0x00, 0x00, 0xe3, 0xc0, 0x00, 0x1f, 
-       0xe3, 0x80, 0x00, 0x12, 0xe1, 0x29, 0xf0, 0x00, 
-       0xe5, 0x9f, 0xd0, 0xb0, 0xe5, 0x9f, 0x00, 0xb0, 
-       0xe0, 0x8d, 0xd0, 0x00, 0xe1, 0x0f, 0x00, 0x00, 
-       0xe3, 0xc0, 0x00, 0x9f, 0xe3, 0x80, 0x00, 0x10, 
-       0xe1, 0x29, 0xf0, 0x00, 0xe5, 0x9f, 0xd0, 0x60, 
-       0xeb, 0x00, 0x00, 0x08, 0xe5, 0x9f, 0x00, 0x64, 
-       0xe5, 0x9f, 0x10, 0x5c, 0xeb, 0x00, 0x37, 0xa7, 
-       0xe5, 0x9f, 0x00, 0x60, 0xe5, 0x9f, 0x10, 0x58, 
-       0xeb, 0x00, 0x37, 0xa7, 0xe5, 0x9f, 0xe0, 0x58, 
-       0xe3, 0x8e, 0xe0, 0x01, 0xe1, 0x2f, 0xff, 0x1e, 
-       0xe5, 0x9f, 0x00, 0x8c, 0xe5, 0x9f, 0x10, 0x8c, 
-       0xe5, 0x9f, 0x30, 0x8c, 0xe1, 0x50, 0x00, 0x01, 
-       0x0a, 0x00, 0x00, 0x03, 0xe1, 0x51, 0x00, 0x03, 
-       0x34, 0x90, 0x20, 0x04, 0x34, 0x81, 0x20, 0x04, 
-       0x3a, 0xff, 0xff, 0xfb, 0xe5, 0x9f, 0x10, 0x74, 
-       0xe3, 0xa0, 0x20, 0x00, 0xe1, 0x53, 0x00, 0x01, 
-       0x34, 0x83, 0x20, 0x04, 0x3a, 0xff, 0xff, 0xfc, 
-       0xe1, 0x2f, 0xff, 0x1e, 0x2e, 0x1b, 0xff, 0xf0, 
-       0x2e, 0x1b, 0x7f, 0xf0, 0x2e, 0x1b, 0x7f, 0xef, 
-       0x2e, 0x08, 0x9a, 0x00, 0xcc, 0x1f, 0xff, 0xef, 
-       0xcc, 0x1f, 0x7f, 0xf0, 0x2e, 0x00, 0x1c, 0x39, 
-       0x2e, 0x01, 0xca, 0x48, 0x2e, 0x01, 0xcb, 0x40, 
-       0x2e, 0x08, 0x32, 0xf4, 0x00, 0x00, 0x08, 0x00, 
-       0x2e, 0x08, 0x22, 0xf4, 0x00, 0x00, 0x08, 0x00, 
-       0x2e, 0x08, 0x2a, 0xf4, 0x00, 0x00, 0x08, 0x00, 
-       0x2e, 0x08, 0x59, 0xb0, 0xe5, 0x9f, 0xf0, 0x04, 
-       0xe5, 0x9f, 0xf0, 0x04, 0xe5, 0x9f, 0xf0, 0x04, 
-       0x2e, 0x08, 0x59, 0xb0, 0x2e, 0x08, 0x59, 0xb1, 
-       0x2e, 0x08, 0x59, 0xb2, 0x2e, 0x03, 0x3b, 0xfc, 
-       0x2e, 0x08, 0x00, 0x00, 0x2e, 0x08, 0x3b, 0x70, 
-       0x2e, 0x08, 0x99, 0xfc, 0x1d, 0x77, 0x1e, 0x16, 
-       0x03, 0x00, 0x03, 0x03, 0x1d, 0x7f, 0x50, 0x50, 
-       0x4f, 0x5d, 0x49, 0x5d, 0x40, 0x4a, 0x44, 0x43, 
-       0x01, 0x49, 0x4d, 0x56, 0x48, 0x4b, 0x5d, 0x4f, 
-       0x5d, 0x4d, 0x4f, 0x0a, 0x78, 0x71, 0x73, 0x7f, 
-       0x70, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x1b, 
-       0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 
-       0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 
-       0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 0x12, 
-       0x08, 0x0f, 0x0f, 0x0d, 0x13, 0x0d, 0x11, 0x0e, 
-       0x07, 0x08, 0x09, 0x0d, 0x0d, 0x15, 0x10, 0x05, 
-       0x08, 0x08, 0x09, 0x0e, 0x07, 0x08, 0x07, 0x07, 
-       0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 
-       0x0d, 0x0d, 0x07, 0x07, 0x0e, 0x0e, 0x0e, 0x0d, 
-       0x18, 0x0f, 0x10, 0x11, 0x11, 0x10, 0x0f, 0x13, 
-       0x11, 0x06, 0x0c, 0x10, 0x0d, 0x13, 0x11, 0x13, 
-       0x10, 0x13, 0x11, 0x10, 0x0e, 0x11, 0x0f, 0x17, 
-       0x0f, 0x10, 0x0f, 0x07, 0x07, 0x07, 0x0c, 0x0d, 
-       0x08, 0x0d, 0x0e, 0x0c, 0x0e, 0x0d, 0x07, 0x0e, 
-       0x0e, 0x05, 0x06, 0x0c, 0x06, 0x14, 0x0e, 0x0d, 
-       0x0e, 0x0e, 0x08, 0x0c, 0x07, 0x0e, 0x0b, 0x11, 
-       0x0b, 0x0c, 0x0c, 0x08, 0x06, 0x08, 0x0e, 0x12, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 
-       0x07, 0xc0, 0x00, 0x00, 0x19, 0x80, 0x00, 0x00, 
-       0x0f, 0xfe, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x07, 0xc0, 0x00, 0x00, 0x19, 0x80, 0x00, 0x00, 
-       0x1e, 0x0f, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 
-       0x06, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 
-       0x0e, 0xe0, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
-       0x30, 0x01, 0x80, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 
-       0x0c, 0x60, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 
-       0x0c, 0x60, 0x00, 0x00, 0x70, 0xe0, 0x00, 0x00, 
-       0x60, 0x00, 0xc0, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 
-       0x60, 0x00, 0xc0, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 
-       0x18, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 
-       0x60, 0x00, 0xc0, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0xf0, 0x00, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 
-       0x60, 0x00, 0xc0, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0xfe, 0x00, 0x00, 0x00, 0x30, 0x78, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0x60, 0x00, 0xc0, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0xfe, 0x00, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x3e, 0x60, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x0c, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x70, 0x60, 0x00, 0x00, 
-       0x30, 0x01, 0x80, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x32, 0x0c, 0x00, 0x00, 
-       0x60, 0x0c, 0x00, 0x00, 0x60, 0xe0, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x38, 0x0e, 0x00, 0x00, 0x30, 0x70, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x37, 0x1c, 0x00, 0x00, 
-       0x60, 0x0c, 0x00, 0x00, 0x71, 0xe0, 0x00, 0x00, 
-       0x1e, 0x0f, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x1c, 0x1c, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x10, 0x02, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x33, 0xf8, 0x00, 0x00, 
-       0xe0, 0x0e, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 
-       0x0f, 0xfe, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
-       0x0f, 0xf8, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x1f, 0xfe, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x31, 0xf0, 0x00, 0x00, 
-       0xc0, 0x06, 0x00, 0x00, 0x1e, 0x30, 0x00, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x07, 0xf0, 0x00, 0x00, 0x0f, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x00, 0x06, 0x30, 0x00, 0x00, 
-       0x1f, 0xc0, 0x00, 0x00, 0x1e, 0x03, 0x00, 0x00, 
-       0x07, 0x80, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x06, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x00, 0x0e, 0x70, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x33, 0x07, 0x00, 0x00, 
-       0x0f, 0xc0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x0c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x00, 0x0e, 0x70, 0x00, 0x00, 
-       0x7a, 0xf0, 0x00, 0x00, 0x61, 0x86, 0x00, 0x00, 
-       0x1c, 0xe0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x00, 
-       0x62, 0x30, 0x00, 0x00, 0x61, 0x8e, 0x00, 0x00, 
-       0x18, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x3f, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x00, 0x0c, 0x60, 0x00, 0x00, 
-       0x62, 0x00, 0x00, 0x00, 0x61, 0x8c, 0x00, 0x00, 
-       0x18, 0x60, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x1e, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x66, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 
-       0x72, 0x00, 0x00, 0x00, 0x61, 0x9c, 0x00, 0x00, 
-       0x0c, 0xe0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 
-       0x7a, 0x00, 0x00, 0x00, 0x61, 0xb8, 0x00, 0x00, 
-       0x0f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x33, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0xc0, 0x00, 0x00, 
-       0x3f, 0x80, 0x00, 0x00, 0x33, 0x30, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0xc0, 0x00, 0x00, 
-       0x0f, 0xe0, 0x00, 0x00, 0x1e, 0x73, 0xc0, 0x00, 
-       0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0xc0, 0x00, 0x00, 
-       0x02, 0xe0, 0x00, 0x00, 0x00, 0x66, 0x60, 0x00, 
-       0x39, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x39, 0xc0, 0x00, 0x00, 
-       0x02, 0x70, 0x00, 0x00, 0x00, 0xec, 0x30, 0x00, 
-       0x70, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 
-       0x02, 0x30, 0x00, 0x00, 0x00, 0xcc, 0x30, 0x00, 
-       0x60, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 
-       0x62, 0x30, 0x00, 0x00, 0x01, 0xcc, 0x30, 0x00, 
-       0x60, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x31, 0x80, 0x00, 0x00, 
-       0x72, 0x70, 0x00, 0x00, 0x01, 0x8c, 0x30, 0x00, 
-       0x70, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x73, 0x80, 0x00, 0x00, 
-       0x3a, 0xf0, 0x00, 0x00, 0x03, 0x8c, 0x30, 0x00, 
-       0x38, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x73, 0x80, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x03, 0x06, 0x60, 0x00, 
-       0x3f, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0x07, 0x03, 0xc0, 0x00, 
-       0x0f, 0xcc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x18, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x0f, 0xc0, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0x0f, 0xc0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x01, 0xc0, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0x1f, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
-       0x1f, 0xc0, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
-       0x38, 0xe0, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
-       0x38, 0xf0, 0x00, 0x00, 0x70, 0xe0, 0x00, 0x00, 
-       0x03, 0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x70, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 
-       0x38, 0xe0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
-       0x70, 0x60, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x70, 0x70, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 
-       0x03, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 
-       0x30, 0x60, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x70, 0x70, 0x00, 0x00, 0x1d, 0x80, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 
-       0x06, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
-       0x30, 0x60, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x78, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x19, 0x80, 0x00, 0x00, 
-       0x00, 0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 
-       0x0e, 0xc0, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
-       0x30, 0x60, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x03, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
-       0x3e, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x00, 0x70, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
-       0x0c, 0xc0, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 
-       0x67, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x38, 0xe0, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x00, 0x60, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
-       0x1c, 0xc0, 0x00, 0x00, 0x70, 0xe0, 0x00, 0x00, 
-       0x7f, 0xe0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
-       0x1f, 0xc0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0xe0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
-       0x38, 0xc0, 0x00, 0x00, 0x60, 0x70, 0x00, 0x00, 
-       0x78, 0xe0, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x1f, 0xc0, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x70, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 
-       0x30, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x70, 0x70, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x30, 0xe0, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0xe0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x70, 0xc0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x60, 0x70, 0x00, 0x00, 0x0f, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x7f, 0xf0, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xe0, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
-       0x3e, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x7f, 0xf0, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x78, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x70, 0x70, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x30, 0x70, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0xe0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x38, 0xe0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x38, 0x60, 0x00, 0x00, 0x70, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x7f, 0xf0, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x1f, 0xe0, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x1f, 0x80, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x7f, 0xf0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0xff, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x30, 0x0f, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x38, 0x06, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
-       0x03, 0xff, 0xc0, 0x00, 0x07, 0xc0, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x30, 0x1e, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
-       0x38, 0x06, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
-       0x07, 0xc1, 0xe0, 0x00, 0x07, 0xc0, 0x00, 0x00, 
-       0x30, 0x1c, 0x00, 0x00, 0x1e, 0x1e, 0x00, 0x00, 
-       0x30, 0x1c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x30, 0x3c, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
-       0x3c, 0x06, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
-       0x0e, 0x00, 0x70, 0x00, 0x06, 0xc0, 0x00, 0x00, 
-       0x30, 0x0c, 0x00, 0x00, 0x38, 0x07, 0x00, 0x00, 
-       0x30, 0x0e, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x38, 0x03, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x30, 0x70, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 
-       0x3e, 0x06, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x1c, 0x79, 0xb8, 0x00, 0x0e, 0xe0, 0x00, 0x00, 
-       0x30, 0x0c, 0x00, 0x00, 0x30, 0x07, 0x00, 0x00, 
-       0x30, 0x07, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x03, 0x80, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x30, 0xe0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x36, 0x0d, 0x80, 0x00, 
-       0x36, 0x06, 0x00, 0x00, 0x30, 0x01, 0x80, 0x00, 
-       0x39, 0xff, 0x9c, 0x00, 0x0c, 0x60, 0x00, 0x00, 
-       0x30, 0x0c, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x30, 0x07, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x31, 0xc0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x36, 0x0d, 0x80, 0x00, 
-       0x37, 0x06, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
-       0x31, 0xcf, 0x9c, 0x00, 0x0c, 0x60, 0x00, 0x00, 
-       0x30, 0x1c, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x37, 0x80, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x36, 0x0d, 0x80, 0x00, 
-       0x33, 0x06, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
-       0x33, 0x87, 0x0c, 0x00, 0x1c, 0x70, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x03, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x3f, 0xfe, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x37, 0x1d, 0x80, 0x00, 
-       0x31, 0x86, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
-       0x77, 0x03, 0x0c, 0x00, 0x18, 0x30, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x03, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x60, 0x3f, 0x80, 0x00, 
-       0x3f, 0xfe, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x33, 0x19, 0x80, 0x00, 
-       0x31, 0xc6, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
-       0x67, 0x03, 0x0c, 0x00, 0x38, 0x38, 0x00, 0x00, 
-       0x30, 0x1c, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x3f, 0x80, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x3d, 0xe0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x33, 0x19, 0x80, 0x00, 
-       0x30, 0xc6, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
-       0x66, 0x03, 0x0c, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
-       0x30, 0x0e, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x03, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x01, 0x80, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x33, 0x19, 0x80, 0x00, 
-       0x30, 0x66, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
-       0x66, 0x07, 0x1c, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x70, 0x03, 0x00, 0x00, 
-       0x30, 0x07, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x70, 0x01, 0x80, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0xc0, 0x00, 0x00, 0x30, 0x70, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x31, 0xb1, 0x80, 0x00, 
-       0x30, 0x76, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
-       0x66, 0x06, 0x18, 0x00, 0x70, 0x1c, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x07, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x01, 0x80, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x60, 0xc0, 0x00, 0x00, 0x30, 0x38, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x31, 0xb1, 0x80, 0x00, 
-       0x30, 0x36, 0x00, 0x00, 0x30, 0x01, 0x80, 0x00, 
-       0x67, 0x0e, 0x38, 0x00, 0x60, 0x0c, 0x00, 0x00, 
-       0x30, 0x0e, 0x00, 0x00, 0x38, 0x06, 0x00, 0x00, 
-       0x30, 0x0e, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x60, 0xc0, 0x00, 0x00, 0x30, 0x3c, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x31, 0xf1, 0x80, 0x00, 
-       0x30, 0x3e, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x77, 0x1e, 0x70, 0x00, 0x60, 0x0c, 0x00, 0x00, 
-       0x30, 0x1e, 0x00, 0x00, 0x1e, 0x1e, 0x00, 0x00, 
-       0x30, 0x1c, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x1e, 0x0f, 0x80, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x71, 0xc0, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x31, 0xf1, 0x80, 0x00, 
-       0x30, 0x1e, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
-       0x73, 0xff, 0xe0, 0x00, 0xe0, 0x0e, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x3f, 0x80, 0x00, 0x00, 0x30, 0x0e, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x30, 0xe1, 0x80, 0x00, 
-       0x30, 0x0e, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
-       0x39, 0xe7, 0xc0, 0x00, 0xc0, 0x06, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x1f, 0x00, 0x00, 0x00, 0x30, 0x07, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x30, 0xe1, 0x80, 0x00, 
-       0x30, 0x0e, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
-       0x3c, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1e, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0xc0, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 
-       0xff, 0xfc, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0xc0, 0x06, 0x00, 0x00, 0xc0, 0x38, 0x06, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0xe0, 0x07, 0x00, 0x00, 
-       0x7f, 0xfc, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0xc0, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
-       0xff, 0xfc, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0xe0, 0x0e, 0x00, 0x00, 0xe0, 0x7c, 0x0e, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x7f, 0xfc, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0xe0, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x1e, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
-       0x30, 0x1e, 0x00, 0x00, 0x3c, 0x1c, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x60, 0x0c, 0x00, 0x00, 0xe0, 0x7c, 0x0e, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x30, 0x1c, 0x00, 0x00, 
-       0x00, 0x38, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x0e, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x0e, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x60, 0x6c, 0x0c, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x00, 0x30, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x01, 0x80, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x60, 0xec, 0x0c, 0x00, 
-       0x0e, 0xe0, 0x00, 0x00, 0x1c, 0x38, 0x00, 0x00, 
-       0x00, 0x70, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
-       0x30, 0x06, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x70, 0xee, 0x1c, 0x00, 
-       0x06, 0xc0, 0x00, 0x00, 0x0e, 0x70, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x39, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x0e, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
-       0x30, 0x1e, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x70, 0xc6, 0x1c, 0x00, 
-       0x07, 0xc0, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 
-       0x01, 0xc0, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x1c, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x18, 0x30, 0x00, 0x00, 0x30, 0xc6, 0x18, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x70, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x18, 0x30, 0x00, 0x00, 0x31, 0xc7, 0x18, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x60, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
-       0x30, 0xe0, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x31, 0x83, 0x18, 0x00, 
-       0x07, 0xc0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0xc0, 0x00, 
-       0x30, 0x70, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x0c, 0x60, 0x00, 0x00, 0x39, 0x83, 0x38, 0x00, 
-       0x0e, 0xe0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x18, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
-       0x30, 0x38, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x0e, 0xe0, 0x00, 0x00, 0x1b, 0x83, 0xb0, 0x00, 
-       0x0e, 0xe0, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x31, 0x80, 0x00, 
-       0x30, 0x38, 0x00, 0x00, 0x70, 0x06, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x30, 0x06, 0x00, 0x00, 
-       0x0e, 0xe0, 0x00, 0x00, 0x1b, 0x01, 0xb0, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x38, 0x3f, 0x80, 0x00, 
-       0x30, 0x1c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x07, 0xc0, 0x00, 0x00, 0x1f, 0x01, 0xf0, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x1e, 0x1f, 0x00, 0x00, 
-       0x30, 0x1e, 0x00, 0x00, 0x3c, 0x1c, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 
-       0x07, 0xc0, 0x00, 0x00, 0x1f, 0x01, 0xf0, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x80, 0x00, 
-       0x30, 0x0e, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x1e, 0x00, 0xe0, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0xff, 0xfc, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x03, 0xff, 0xc0, 0x00, 
-       0x30, 0x07, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x0e, 0x00, 0xe0, 0x00, 
-       0xe0, 0x0e, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0xff, 0xfc, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x06, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xff, 0xf8, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xff, 0xf8, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
-       0x33, 0xc0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x0f, 0xb0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0xfe, 0x00, 0x00, 0x00, 0x0f, 0x30, 0x00, 0x00, 
-       0x33, 0xc0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x37, 0xcf, 0x80, 0x00, 
-       0x33, 0xc0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0xfe, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x3f, 0xdf, 0x80, 0x00, 
-       0x37, 0xe0, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0xe0, 0x00, 0x00, 
-       0x3c, 0x70, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x38, 0xf0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
-       0x3c, 0x70, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x31, 0x80, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x3c, 0xf9, 0xc0, 0x00, 
-       0x3c, 0x70, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x70, 0x60, 0x00, 0x00, 
-       0x70, 0x70, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x38, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x70, 0xc0, 0x00, 
-       0x38, 0x30, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0xc0, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0xc0, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x7f, 0xf0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0xc0, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3e, 0x60, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x33, 0x80, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0xc0, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x60, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x60, 0x30, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x33, 0x80, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0xc0, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x60, 0xe0, 0x00, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x70, 0x60, 0x00, 0x00, 
-       0x70, 0x70, 0x00, 0x00, 0x70, 0x30, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x31, 0xc0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0xc0, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x71, 0xe0, 0x00, 0x00, 
-       0x3c, 0x70, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x38, 0xf0, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0xe0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0xc0, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x1f, 0xf0, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0xc0, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1e, 0x30, 0x00, 0x00, 
-       0x33, 0xc0, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x0f, 0x30, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x0f, 0x30, 0x00, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x70, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x60, 0xc0, 0x00, 
-       0x30, 0x30, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x60, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
-       0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
-       0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x37, 0xc0, 0x00, 0x00, 0x0f, 0x30, 0x00, 0x00, 
-       0x37, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
-       0xfe, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0xc0, 0x60, 0x00, 0x00, 0xc0, 0x81, 0x80, 0x00, 
-       0xe0, 0x60, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
-       0x3f, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0xfe, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0xc0, 0x60, 0x00, 0x00, 0xc1, 0xc1, 0x80, 0x00, 
-       0x60, 0xc0, 0x00, 0x00, 0x60, 0xe0, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x3c, 0x70, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x70, 0xe0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0xe0, 0xe0, 0x00, 0x00, 0xe1, 0xc1, 0x80, 0x00, 
-       0x31, 0xc0, 0x00, 0x00, 0x70, 0xe0, 0x00, 0x00, 
-       0x01, 0xe0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x60, 0xc0, 0x00, 0x00, 0x63, 0xe3, 0x00, 0x00, 
-       0x3b, 0x80, 0x00, 0x00, 0x30, 0xc0, 0x00, 0x00, 
-       0x01, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x3e, 0x08, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x71, 0xc0, 0x00, 0x00, 0x63, 0x63, 0x00, 0x00, 
-       0x1f, 0x00, 0x00, 0x00, 0x31, 0xc0, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x7f, 0x98, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x31, 0x80, 0x00, 0x00, 0x67, 0x63, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x39, 0xc0, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x67, 0xf8, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x31, 0x80, 0x00, 0x00, 0x37, 0x76, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x19, 0x80, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x41, 0xf0, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x3b, 0x80, 0x00, 0x00, 0x36, 0x36, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x19, 0x80, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x30, 0x18, 0x00, 0x00, 0x60, 0x30, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 
-       0x1b, 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x00, 0x00, 
-       0x1f, 0x00, 0x00, 0x00, 0x1d, 0x80, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x60, 0x60, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x30, 0x70, 0x00, 0x00, 
-       0x1f, 0x00, 0x00, 0x00, 0x1e, 0x3c, 0x00, 0x00, 
-       0x3b, 0x80, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x3c, 0x70, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x70, 0xe0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x38, 0xf0, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 
-       0x31, 0x80, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x37, 0xe0, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x3e, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 
-       0x60, 0xc0, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
-       0x7f, 0xe0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 
-       0x33, 0xc0, 0x00, 0x00, 0x0f, 0x30, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
-       0x1e, 0x00, 0x00, 0x00, 0x0f, 0x30, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x0c, 0x18, 0x00, 0x00, 
-       0xe0, 0xe0, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x7f, 0xe0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 
-       0x00, 0x00, 0x00, 0x21, 0x16, 0x16, 0x16, 0x16, 
-       0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 
-       0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 
-       0x16, 0x16, 0x16, 0x16, 0x0a, 0x12, 0x13, 0x10, 
-       0x17, 0x10, 0x15, 0x10, 0x08, 0x09, 0x0a, 0x10, 
-       0x10, 0x1a, 0x13, 0x06, 0x0a, 0x0a, 0x0b, 0x11, 
-       0x08, 0x0a, 0x08, 0x08, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x08, 0x08, 
-       0x11, 0x11, 0x11, 0x10, 0x1d, 0x13, 0x13, 0x15, 
-       0x15, 0x13, 0x12, 0x17, 0x15, 0x07, 0x0f, 0x13, 
-       0x10, 0x17, 0x15, 0x17, 0x13, 0x17, 0x15, 0x13, 
-       0x13, 0x15, 0x13, 0x1e, 0x13, 0x13, 0x12, 0x08, 
-       0x08, 0x08, 0x0e, 0x10, 0x0a, 0x10, 0x10, 0x0f, 
-       0x10, 0x10, 0x08, 0x10, 0x10, 0x07, 0x07, 0x0e, 
-       0x07, 0x19, 0x10, 0x10, 0x10, 0x10, 0x0a, 0x0f, 
-       0x08, 0x10, 0x0d, 0x15, 0x0d, 0x0d, 0x0e, 0x0a, 
-       0x08, 0x0a, 0x11, 0x16, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0xc7, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x8e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0xc7, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x8e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0xc7, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x8e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0xf0, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0xf8, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x07, 0xff, 0x80, 0x00, 
-       0x0e, 0x38, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1e, 0x1c, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x0f, 0xff, 0xe0, 0x00, 
-       0x0e, 0x38, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0x0c, 0x00, 0x00, 0x03, 0xb8, 0x00, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x1f, 0x83, 0xf0, 0x00, 
-       0x0e, 0x38, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x07, 0xbc, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0xf8, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x78, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 
-       0x0f, 0xf0, 0x00, 0x00, 0x78, 0x00, 0x3c, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x0f, 0x1e, 0x00, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x78, 0x00, 0x3c, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x70, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00, 
-       0x3c, 0x7c, 0x00, 0x00, 0x70, 0x00, 0x1c, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x70, 0x00, 0x00, 0x0e, 0x0e, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x70, 0x00, 0x1c, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x70, 0x00, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x70, 0x00, 0x1c, 0x00, 
-       0x78, 0x1e, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x78, 0x00, 0x00, 0x1c, 0x07, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x70, 0x00, 0x1c, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x7f, 0x80, 0x00, 0x00, 
-       0x38, 0x3e, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 
-       0x00, 0xfc, 0x00, 0x00, 0x70, 0x00, 0x1c, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x7f, 0x80, 0x00, 0x00, 
-       0x38, 0x1f, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x1f, 0xfc, 0x00, 0x00, 0x78, 0x00, 0x3c, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x7f, 0x80, 0x00, 0x00, 
-       0x38, 0x07, 0x80, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x3f, 0x9c, 0x00, 0x00, 0x78, 0x00, 0x3c, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x78, 0x1c, 0x00, 0x00, 0x3c, 0x00, 0x78, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x3c, 0x01, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x78, 0x03, 0xc0, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x1e, 0x00, 0xf8, 0x00, 
-       0x78, 0x1e, 0x00, 0x00, 0x3c, 0x01, 0xe0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x39, 0xc3, 0x80, 0x00, 0x70, 0x01, 0xc0, 0x00, 
-       0x70, 0x3c, 0x00, 0x00, 0x1f, 0x83, 0xf0, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x1f, 0x07, 0xc0, 0x00, 
-       0x38, 0x3c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x39, 0xe7, 0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 
-       0x78, 0x7c, 0x00, 0x00, 0x0f, 0xff, 0xe0, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x0f, 0xff, 0x80, 0x00, 
-       0x3c, 0x7c, 0x00, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x08, 0x00, 0x40, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0xff, 0x00, 0x00, 0xe0, 0x01, 0xe0, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x03, 0xff, 0xc0, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x07, 0xff, 0x00, 0x00, 
-       0x1f, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x0f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x7c, 0x00, 0x00, 0xe0, 0x00, 0xe0, 0x00, 
-       0x1f, 0x8e, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x00, 
-       0x0f, 0x9c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x73, 0x80, 0x00, 0x00, 
-       0x07, 0x1c, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 
-       0x0f, 0x80, 0x60, 0x00, 0x03, 0xe0, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
-       0xe0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x73, 0x80, 0x00, 0x00, 
-       0x07, 0x1c, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
-       0x1f, 0xc0, 0xe0, 0x00, 0x07, 0xf0, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x73, 0x80, 0x00, 0x00, 
-       0x0f, 0x3c, 0x00, 0x00, 0x3d, 0xb8, 0x00, 0x00, 
-       0x38, 0xe0, 0xc0, 0x00, 0x0f, 0x78, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x76, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x73, 0x80, 0x00, 0x00, 
-       0x0e, 0x38, 0x00, 0x00, 0x79, 0xbc, 0x00, 0x00, 
-       0x30, 0x61, 0xc0, 0x00, 0x0e, 0x38, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x73, 0x80, 0x00, 0x00, 
-       0x0e, 0x38, 0x00, 0x00, 0x71, 0x9c, 0x00, 0x00, 
-       0x30, 0x61, 0x80, 0x00, 0x0e, 0x38, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x73, 0x80, 0x00, 0x00, 
-       0xff, 0xfe, 0x00, 0x00, 0x71, 0x80, 0x00, 0x00, 
-       0x30, 0x63, 0x80, 0x00, 0x0e, 0x38, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x73, 0x80, 0x00, 0x00, 
-       0xff, 0xfe, 0x00, 0x00, 0x79, 0x80, 0x00, 0x00, 
-       0x30, 0x63, 0x00, 0x00, 0x0f, 0x78, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xff, 0xfe, 0x00, 0x00, 0x7d, 0x80, 0x00, 0x00, 
-       0x30, 0x67, 0x00, 0x00, 0x07, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x39, 0xc0, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1e, 0x78, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 
-       0x38, 0xe6, 0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x19, 0x80, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0x1f, 0xce, 0x00, 0x00, 0x07, 0xc0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 
-       0x0f, 0x8c, 0x7c, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x7f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x70, 0x00, 0x00, 0x01, 0xfc, 0x00, 0x00, 
-       0x00, 0x1c, 0xfe, 0x00, 0x3e, 0xe2, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x7f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0xf0, 0x00, 0x00, 0x01, 0xbe, 0x00, 0x00, 
-       0x00, 0x19, 0xc7, 0x00, 0x38, 0x73, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xff, 0xfe, 0x00, 0x00, 0x01, 0x9e, 0x00, 0x00, 
-       0x00, 0x39, 0x83, 0x00, 0x78, 0x3f, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xff, 0xfe, 0x00, 0x00, 0x01, 0x8e, 0x00, 0x00, 
-       0x00, 0x31, 0x83, 0x00, 0x70, 0x3f, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x7f, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xff, 0xfe, 0x00, 0x00, 0x71, 0x8e, 0x00, 0x00, 
-       0x00, 0x71, 0x83, 0x00, 0x70, 0x1f, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0xe0, 0x00, 0x00, 0x71, 0x8e, 0x00, 0x00, 
-       0x00, 0x61, 0x83, 0x00, 0x70, 0x0f, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0xe0, 0x00, 0x00, 0x79, 0x9e, 0x00, 0x00, 
-       0x00, 0xe1, 0x83, 0x00, 0x78, 0x1f, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x79, 0xe0, 0x00, 0x00, 0x3d, 0xbc, 0x00, 0x00, 
-       0x00, 0xc1, 0xc7, 0x00, 0x3c, 0x7f, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x71, 0xc0, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
-       0x01, 0xc0, 0xfe, 0x00, 0x1f, 0xfb, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x71, 0xc0, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 
-       0x01, 0x80, 0x7c, 0x00, 0x0f, 0xe1, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
-       0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 
-       0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
-       0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
-       0x00, 0x60, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 
-       0x0f, 0xe0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x1f, 0xfc, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 
-       0x3f, 0xfe, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0xf0, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
-       0x1f, 0xf0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x1f, 0xfc, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 
-       0x3f, 0xfe, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
-       0x1f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
-       0x01, 0xe0, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
-       0x3f, 0xfe, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
-       0x03, 0xe0, 0x00, 0x00, 0x7c, 0x7c, 0x00, 0x00, 
-       0x7c, 0x7c, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x3e, 0x3e, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x1e, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x0f, 0xe0, 0x00, 0x00, 0x78, 0x3c, 0x00, 0x00, 
-       0x70, 0x3c, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x78, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x78, 0x0e, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
-       0x1e, 0xe0, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x01, 0xf8, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x1c, 0xe0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x03, 0xb8, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x78, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 
-       0x7f, 0xfe, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x10, 0xe0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x3c, 0x00, 0x00, 0x07, 0x38, 0x00, 0x00, 
-       0x7b, 0xe0, 0x00, 0x00, 0x73, 0xf0, 0x00, 0x00, 
-       0x00, 0x70, 0x00, 0x00, 0x1c, 0x38, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 
-       0x7f, 0xfe, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
-       0x00, 0x1e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 
-       0x00, 0x78, 0x00, 0x00, 0x0f, 0x38, 0x00, 0x00, 
-       0x7f, 0xf8, 0x00, 0x00, 0x77, 0xf8, 0x00, 0x00, 
-       0x00, 0xf0, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0x7f, 0xfe, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 
-       0x00, 0x3c, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x03, 0xf0, 0x00, 0x00, 0x0e, 0x38, 0x00, 0x00, 
-       0x7f, 0xfc, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 
-       0x78, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
-       0x00, 0x78, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x1c, 0x38, 0x00, 0x00, 
-       0x78, 0x3c, 0x00, 0x00, 0x7c, 0x3e, 0x00, 0x00, 
-       0x01, 0xe0, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
-       0x3c, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 
-       0x00, 0xf0, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 
-       0x00, 0x3c, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 
-       0x00, 0x1e, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
-       0x01, 0xc0, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
-       0x3f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
-       0x01, 0xe0, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 
-       0x00, 0x1e, 0x00, 0x00, 0x78, 0x38, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x01, 0xc0, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
-       0x1f, 0xee, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0x7f, 0xfe, 0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 
-       0x03, 0xc0, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x03, 0xc0, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x0f, 0xce, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0xfc, 0x00, 0x00, 
-       0x7f, 0xfe, 0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 
-       0x7f, 0xfe, 0x00, 0x00, 0x3f, 0x80, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x78, 0x0e, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x78, 0x1e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x78, 0x1e, 0x00, 0x00, 0x38, 0x1e, 0x00, 0x00, 
-       0x07, 0x80, 0x00, 0x00, 0x78, 0x1e, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
-       0x07, 0x80, 0x00, 0x00, 0x7c, 0x3e, 0x00, 0x00, 
-       0x78, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
-       0x3f, 0xf8, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 
-       0x1f, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x7f, 0xfc, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 
-       0x0f, 0xc0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf0, 0x00, 
-       0x01, 0xf0, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
-       0x01, 0xfe, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x3f, 0xff, 0x80, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x00, 0xff, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x38, 0x01, 0xe0, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x7c, 0x00, 0x7c, 0x00, 0x3c, 0x00, 0xe0, 0x00, 
-       0x01, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0x00, 0x00, 
-       0x07, 0xff, 0x80, 0x00, 0x3f, 0xff, 0x00, 0x00, 
-       0x3f, 0xff, 0x80, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x07, 0xff, 0xc0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x38, 0x03, 0xc0, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x7c, 0x00, 0x7c, 0x00, 0x3c, 0x00, 0xe0, 0x00, 
-       0x07, 0xff, 0x80, 0x00, 0x01, 0xff, 0xff, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0x00, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x3f, 0xff, 0xc0, 0x00, 
-       0x3f, 0xff, 0x80, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x0f, 0xff, 0xe0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x38, 0x07, 0x80, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x7e, 0x00, 0xfc, 0x00, 0x3e, 0x00, 0xe0, 0x00, 
-       0x0f, 0xff, 0xe0, 0x00, 0x03, 0xf8, 0x3f, 0x80, 
-       0x03, 0xb8, 0x00, 0x00, 0x38, 0x0f, 0x80, 0x00, 
-       0x1f, 0x83, 0xe0, 0x00, 0x38, 0x07, 0xc0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x1f, 0x83, 0xf0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x38, 0x0f, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x7e, 0x00, 0xfc, 0x00, 0x3f, 0x00, 0xe0, 0x00, 
-       0x1f, 0x83, 0xf0, 0x00, 0x07, 0xc0, 0x07, 0xc0, 
-       0x07, 0xbc, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x3e, 0x01, 0xe0, 0x00, 0x38, 0x01, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3e, 0x00, 0xf0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x38, 0x1e, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x7f, 0x01, 0xfc, 0x00, 0x3f, 0x00, 0xe0, 0x00, 
-       0x3e, 0x00, 0xf8, 0x00, 0x07, 0x80, 0x03, 0xe0, 
-       0x07, 0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x3c, 0x00, 0xf0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x78, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x38, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x77, 0x01, 0xdc, 0x00, 0x3b, 0x80, 0xe0, 0x00, 
-       0x3c, 0x00, 0x78, 0x00, 0x0f, 0x0f, 0x1d, 0xe0, 
-       0x07, 0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x78, 0x00, 0x70, 0x00, 0x38, 0x00, 0xf0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x30, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x38, 0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x77, 0x01, 0xdc, 0x00, 0x3b, 0xc0, 0xe0, 0x00, 
-       0x78, 0x00, 0x3c, 0x00, 0x1e, 0x3f, 0xbc, 0xf0, 
-       0x0f, 0x1e, 0x00, 0x00, 0x38, 0x0f, 0x00, 0x00, 
-       0x78, 0x00, 0x00, 0x00, 0x38, 0x00, 0x70, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x78, 0x00, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x38, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x77, 0x83, 0xdc, 0x00, 0x39, 0xc0, 0xe0, 0x00, 
-       0x78, 0x00, 0x3c, 0x00, 0x1e, 0x7f, 0xfc, 0xf0, 
-       0x0e, 0x0e, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x70, 0x00, 
-       0x3f, 0xff, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x39, 0xe0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x73, 0x83, 0x9c, 0x00, 0x38, 0xe0, 0xe0, 0x00, 
-       0x70, 0x00, 0x1c, 0x00, 0x1c, 0xf9, 0xf8, 0x70, 
-       0x0e, 0x0e, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x70, 0x00, 
-       0x3f, 0xff, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x3f, 0xff, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x3b, 0xe0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x73, 0x83, 0x9c, 0x00, 0x38, 0xe0, 0xe0, 0x00, 
-       0x70, 0x00, 0x1c, 0x00, 0x3c, 0xf0, 0xf8, 0x70, 
-       0x1e, 0x0f, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x70, 0x00, 
-       0x3f, 0xff, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x70, 0x0f, 0xf8, 0x00, 0x3f, 0xff, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x73, 0xc7, 0x9c, 0x00, 0x38, 0x70, 0xe0, 0x00, 
-       0x70, 0x00, 0x1c, 0x00, 0x39, 0xe0, 0x78, 0x70, 
-       0x1c, 0x07, 0x00, 0x00, 0x38, 0x07, 0x80, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x70, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0x0f, 0xf8, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x71, 0xc7, 0x1c, 0x00, 0x38, 0x38, 0xe0, 0x00, 
-       0x70, 0x00, 0x1c, 0x00, 0x39, 0xe0, 0x78, 0x70, 
-       0x1f, 0xff, 0x00, 0x00, 0x38, 0x03, 0xc0, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x70, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0x0f, 0xf8, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x3e, 0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x71, 0xc7, 0x1c, 0x00, 0x38, 0x38, 0xe0, 0x00, 
-       0x70, 0x00, 0x1c, 0x00, 0x39, 0xc0, 0x70, 0x70, 
-       0x3f, 0xff, 0x80, 0x00, 0x38, 0x01, 0xc0, 0x00, 
-       0x78, 0x00, 0x60, 0x00, 0x38, 0x00, 0xf0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x78, 0x00, 0x38, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x71, 0xef, 0x1c, 0x00, 0x38, 0x1c, 0xe0, 0x00, 
-       0x78, 0x00, 0x3c, 0x00, 0x39, 0xc0, 0xf0, 0xf0, 
-       0x3f, 0xff, 0x80, 0x00, 0x38, 0x01, 0xc0, 0x00, 
-       0x78, 0x00, 0xf0, 0x00, 0x38, 0x00, 0xf0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x78, 0x00, 0x38, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 
-       0x38, 0x3e, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0xee, 0x1c, 0x00, 0x38, 0x1e, 0xe0, 0x00, 
-       0x78, 0x00, 0x3c, 0x00, 0x39, 0xc0, 0xf0, 0xe0, 
-       0x38, 0x03, 0x80, 0x00, 0x38, 0x01, 0xc0, 0x00, 
-       0x3c, 0x00, 0xf0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x38, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 
-       0x38, 0x1e, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0xee, 0x1c, 0x00, 0x38, 0x0e, 0xe0, 0x00, 
-       0x3c, 0x00, 0x78, 0x00, 0x39, 0xe1, 0xe1, 0xc0, 
-       0x78, 0x03, 0xc0, 0x00, 0x38, 0x03, 0xc0, 0x00, 
-       0x3e, 0x01, 0xe0, 0x00, 0x38, 0x01, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3e, 0x00, 0x78, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 
-       0x38, 0x0f, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0xfe, 0x1c, 0x00, 0x38, 0x07, 0xe0, 0x00, 
-       0x1e, 0x00, 0xf8, 0x00, 0x3d, 0xe3, 0xe3, 0xc0, 
-       0x70, 0x01, 0xc0, 0x00, 0x38, 0x07, 0xc0, 0x00, 
-       0x1f, 0x87, 0xe0, 0x00, 0x38, 0x07, 0xc0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x1f, 0x81, 0xf8, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x7c, 0xf8, 0x00, 0x00, 
-       0x38, 0x07, 0x80, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0x7c, 0x1c, 0x00, 0x38, 0x07, 0xe0, 0x00, 
-       0x1f, 0x83, 0xf0, 0x00, 0x3c, 0xff, 0xe7, 0x80, 
-       0x70, 0x01, 0xc0, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x3f, 0xff, 0x80, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x0f, 0xff, 0xf0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
-       0x38, 0x07, 0x80, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x70, 0x7c, 0x1c, 0x00, 0x38, 0x03, 0xe0, 0x00, 
-       0x0f, 0xff, 0xe0, 0x00, 0x1e, 0xfe, 0xff, 0x00, 
-       0xe0, 0x01, 0xe0, 0x00, 0x3f, 0xff, 0x00, 0x00, 
-       0x07, 0xff, 0x80, 0x00, 0x3f, 0xff, 0x00, 0x00, 
-       0x3f, 0xff, 0x80, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x03, 0xff, 0xe0, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x3f, 0xf0, 0x00, 0x00, 
-       0x38, 0x03, 0xc0, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x70, 0x7c, 0x1c, 0x00, 0x38, 0x01, 0xe0, 0x00, 
-       0x03, 0xff, 0xc0, 0x00, 0x1e, 0x3c, 0x7c, 0x78, 
-       0xe0, 0x00, 0xe0, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
-       0x01, 0xfe, 0x00, 0x00, 0x3f, 0xfc, 0x00, 0x00, 
-       0x3f, 0xff, 0x80, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0xff, 0x00, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
-       0x38, 0x01, 0xe0, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x70, 0x38, 0x1c, 0x00, 0x38, 0x01, 0xe0, 0x00, 
-       0x00, 0xfe, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xf0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0xc0, 0x01, 0xf0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x0f, 0xe0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xff, 0x80, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x01, 0xff, 0x00, 0x00, 0x3f, 0xff, 0x00, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0xe0, 0x00, 0xe0, 0x00, 
-       0xe0, 0x0f, 0x80, 0x38, 0x78, 0x03, 0xc0, 0x00, 
-       0xf0, 0x01, 0xe0, 0x00, 0x7f, 0xff, 0x00, 0x00, 
-       0x3f, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 
-       0xfc, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x00, 0x00, 
-       0x07, 0xff, 0xc0, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x0f, 0xfe, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0xf0, 0x01, 0xe0, 0x00, 
-       0xf0, 0x0f, 0x80, 0x78, 0x3c, 0x07, 0x80, 0x00, 
-       0x70, 0x03, 0xc0, 0x00, 0x7f, 0xff, 0x00, 0x00, 
-       0x3f, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
-       0xfc, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x0f, 0xff, 0xe0, 0x00, 0x3f, 0xff, 0xc0, 0x00, 
-       0x1f, 0xff, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x70, 0x01, 0xc0, 0x00, 
-       0xf0, 0x1f, 0xc0, 0x78, 0x1c, 0x07, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x7f, 0xff, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x07, 0xc0, 0x00, 
-       0x1f, 0x83, 0xf0, 0x00, 0x38, 0x03, 0xe0, 0x00, 
-       0x3e, 0x0f, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x70, 0x01, 0xc0, 0x00, 
-       0x70, 0x1f, 0xc0, 0x70, 0x1e, 0x0f, 0x00, 0x00, 
-       0x3c, 0x07, 0x80, 0x00, 0x00, 0x0f, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0xc0, 0x00, 
-       0x1e, 0x00, 0xf8, 0x00, 0x38, 0x01, 0xe0, 0x00, 
-       0x3c, 0x07, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x78, 0x03, 0xc0, 0x00, 
-       0x70, 0x1d, 0xc0, 0x70, 0x0f, 0x1e, 0x00, 0x00, 
-       0x1e, 0x0f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x01, 0xc0, 0x00, 
-       0x3c, 0x00, 0x78, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x78, 0x1d, 0xc0, 0xf0, 0x07, 0xbc, 0x00, 0x00, 
-       0x0e, 0x0e, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x1c, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x01, 0xc0, 0x00, 
-       0x38, 0x00, 0x3c, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x38, 0x07, 0x80, 0x00, 
-       0x78, 0x3d, 0xe0, 0xf0, 0x07, 0xbc, 0x00, 0x00, 
-       0x0f, 0x1e, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x1c, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x01, 0xc0, 0x00, 
-       0x78, 0x00, 0x3c, 0x00, 0x38, 0x01, 0xe0, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x3c, 0x07, 0x80, 0x00, 
-       0x38, 0x38, 0xe0, 0xe0, 0x03, 0xf8, 0x00, 0x00, 
-       0x07, 0x1c, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x03, 0xc0, 0x00, 
-       0x70, 0x00, 0x1c, 0x00, 0x38, 0x03, 0xe0, 0x00, 
-       0x1f, 0x80, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x1c, 0x07, 0x00, 0x00, 
-       0x38, 0x38, 0xe0, 0xe0, 0x01, 0xf0, 0x00, 0x00, 
-       0x07, 0xbc, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x38, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x07, 0xc0, 0x00, 
-       0x70, 0x00, 0x1c, 0x00, 0x3f, 0xff, 0xc0, 0x00, 
-       0x0f, 0xf8, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
-       0x3c, 0x38, 0xe1, 0xe0, 0x00, 0xe0, 0x00, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x78, 0x78, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x70, 0x00, 0x1c, 0x00, 0x3f, 0xff, 0x80, 0x00, 
-       0x03, 0xfe, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x1e, 0x0f, 0x00, 0x00, 
-       0x3c, 0x78, 0xf1, 0xe0, 0x01, 0xf0, 0x00, 0x00, 
-       0x01, 0xf0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x70, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x00, 0x00, 
-       0x70, 0x00, 0x1c, 0x00, 0x3f, 0xff, 0x00, 0x00, 
-       0x00, 0x7f, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x0e, 0x0e, 0x00, 0x00, 
-       0x1c, 0x70, 0x71, 0xc0, 0x01, 0xf0, 0x00, 0x00, 
-       0x01, 0xf0, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x70, 0x00, 0x1c, 0x00, 0x38, 0x3c, 0x00, 0x00, 
-       0x00, 0x07, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x0f, 0x1e, 0x00, 0x00, 
-       0x1c, 0x70, 0x71, 0xc0, 0x03, 0xb8, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x78, 0x00, 0x3c, 0x00, 0x38, 0x1e, 0x00, 0x00, 
-       0x00, 0x03, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x07, 0x1c, 0x00, 0x00, 
-       0x1e, 0x70, 0x73, 0xc0, 0x07, 0xbc, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x78, 0x08, 0x38, 0x00, 0x38, 0x0f, 0x00, 0x00, 
-       0x70, 0x03, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x38, 0x00, 0xe0, 0x00, 0x07, 0x1c, 0x00, 0x00, 
-       0x1e, 0xf0, 0x7b, 0xc0, 0x0f, 0x1e, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3c, 0x0e, 0x78, 0x00, 0x38, 0x07, 0x80, 0x00, 
-       0x78, 0x03, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x3c, 0x01, 0xe0, 0x00, 0x07, 0xbc, 0x00, 0x00, 
-       0x0e, 0xe0, 0x3b, 0x80, 0x0f, 0x1e, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x1e, 0x0f, 0xf0, 0x00, 0x38, 0x03, 0x80, 0x00, 
-       0x78, 0x07, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x3c, 0x01, 0xe0, 0x00, 0x03, 0xb8, 0x00, 0x00, 
-       0x0e, 0xe0, 0x3b, 0x80, 0x1e, 0x0f, 0x00, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x1f, 0x83, 0xe0, 0x00, 0x38, 0x03, 0xc0, 0x00, 
-       0x3e, 0x0f, 0x80, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x1f, 0x07, 0xc0, 0x00, 0x03, 0xf8, 0x00, 0x00, 
-       0x0f, 0xe0, 0x3f, 0x80, 0x3c, 0x07, 0x80, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x0f, 0xff, 0xf0, 0x00, 0x38, 0x01, 0xe0, 0x00, 
-       0x1f, 0xff, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x0f, 0xff, 0x80, 0x00, 0x03, 0xf8, 0x00, 0x00, 
-       0x0f, 0xe0, 0x3f, 0x80, 0x38, 0x03, 0x80, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0xff, 0xff, 0x80, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x03, 0xff, 0xf8, 0x00, 0x38, 0x00, 0xe0, 0x00, 
-       0x0f, 0xfe, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x07, 0xff, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 
-       0x07, 0xc0, 0x1f, 0x00, 0x78, 0x03, 0xc0, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0xff, 0xff, 0x80, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x01, 0xff, 0x3c, 0x00, 0x38, 0x00, 0xf0, 0x00, 
-       0x07, 0xf8, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 
-       0x03, 0xfe, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 
-       0x07, 0xc0, 0x1f, 0x00, 0xf0, 0x01, 0xe0, 0x00, 
-       0x00, 0xe0, 0x00, 0x00, 0xff, 0xff, 0x80, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
-       0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
-       0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0xf0, 0x00, 0x00, 0x39, 0xf0, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x0f, 0x9c, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
-       0x0f, 0x9c, 0x00, 0x00, 0x39, 0xf0, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x39, 0xf0, 0xf8, 0x00, 0x39, 0xf0, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
-       0x1f, 0xf0, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
-       0x1f, 0xfc, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3f, 0xfb, 0xfc, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0x7c, 0x00, 0x00, 0x3e, 0x3c, 0x00, 0x00, 
-       0x3c, 0x78, 0x00, 0x00, 0x3c, 0x7c, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3c, 0x7c, 0x00, 0x00, 0x3e, 0x3c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3e, 0x3f, 0x1e, 0x00, 0x3e, 0x3c, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x3c, 0x1c, 0x00, 0x00, 
-       0x38, 0x3c, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x3c, 0x00, 0x00, 0x3c, 0x3c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x39, 0xe0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3c, 0x1e, 0x0e, 0x00, 0x3c, 0x1c, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x1e, 0x00, 0x00, 
-       0x78, 0x1c, 0x00, 0x00, 0x78, 0x3c, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x78, 0x1c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3b, 0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x78, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3f, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0xfc, 0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
-       0x7f, 0xfe, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3f, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xfc, 0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
-       0x7f, 0xfe, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3f, 0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3f, 0x9c, 0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3b, 0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x78, 0x1c, 0x00, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x39, 0xe0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x70, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x3c, 0x1e, 0x00, 0x00, 
-       0x78, 0x1c, 0x00, 0x00, 0x78, 0x3c, 0x00, 0x00, 
-       0x78, 0x0e, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x78, 0x3c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x78, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x3c, 0x00, 0x00, 0x3c, 0x1c, 0x00, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x38, 0x3c, 0x00, 0x00, 
-       0x38, 0x1e, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x3c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x78, 0x7c, 0x00, 0x00, 0x3e, 0x3c, 0x00, 0x00, 
-       0x3c, 0x78, 0x00, 0x00, 0x3c, 0x7c, 0x00, 0x00, 
-       0x3e, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3c, 0x7c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3f, 0xfc, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
-       0x1f, 0xf0, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x1f, 0xfc, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0x8e, 0x00, 0x00, 0x39, 0xf0, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x0f, 0x9c, 0x00, 0x00, 
-       0x07, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x0f, 0x9c, 0x00, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x0e, 0x00, 0x38, 0x1c, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x78, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x7c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x39, 0xf0, 0x00, 0x00, 
-       0x0f, 0x9c, 0x00, 0x00, 0x3b, 0xc0, 0x00, 0x00, 
-       0x1f, 0xe0, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0xe0, 0x38, 0x00, 0x01, 
-       0xe0, 0x70, 0x3c, 0x00, 0xe0, 0x38, 0x00, 0x00, 
-       0xe0, 0x38, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
-       0x1f, 0xfc, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x3f, 0xf0, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0xf0, 0x78, 0x00, 0x00, 
-       0xe0, 0x70, 0x38, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0xf0, 0x78, 0x00, 0x00, 0x7f, 0xf8, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x3e, 0x3c, 0x00, 0x00, 
-       0x3c, 0x7c, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 
-       0x78, 0x78, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0xe0, 0xf8, 0x38, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x70, 0x70, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x1f, 0x01, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x3c, 0x1c, 0x00, 0x00, 
-       0x38, 0x3c, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x70, 0x38, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0xe0, 0xf8, 0x38, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x70, 0x70, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x7f, 0xe3, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x38, 0x1e, 0x00, 0x00, 
-       0x78, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x70, 0xd8, 0x70, 0x00, 0x1d, 0xc0, 0x00, 0x00, 
-       0x78, 0xf0, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x7f, 0xff, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x7c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x71, 0xdc, 0x70, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x38, 0xe0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
-       0x1e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1e, 0x00, 0x00, 0x00, 0x61, 0xff, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3f, 0xc0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x71, 0x8c, 0x70, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x38, 0xe0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x40, 0x7c, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x1f, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x31, 0x8c, 0x60, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x39, 0xe0, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x78, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x1d, 0xc0, 0x00, 0x00, 
-       0x33, 0x8e, 0xe0, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x1d, 0xc0, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x78, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x38, 0x0e, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x1d, 0xc0, 0x00, 0x00, 
-       0x3b, 0x06, 0xe0, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x1d, 0xc0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x3c, 0x1e, 0x00, 0x00, 
-       0x78, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x70, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x0d, 0x80, 0x00, 0x00, 
-       0x1b, 0x06, 0xe0, 0x00, 0x1d, 0xc0, 0x00, 0x00, 
-       0x1f, 0xc0, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x1e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x3c, 0x1c, 0x00, 0x00, 
-       0x38, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x78, 0x1c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x38, 0x3c, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x1f, 0x07, 0xc0, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x3e, 0x3c, 0x00, 0x00, 
-       0x3c, 0x7c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x3c, 0x7c, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 
-       0x1e, 0x07, 0xc0, 0x00, 0x38, 0xe0, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x3f, 0xf8, 0x00, 0x00, 
-       0x1f, 0xfc, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x1f, 0xf8, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 
-       0x1f, 0xfc, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x1e, 0x03, 0xc0, 0x00, 0x70, 0x70, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x40, 0x00, 0x39, 0xe0, 0x00, 0x00, 
-       0x07, 0x9c, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x0f, 0xe0, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
-       0x0f, 0x9c, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x0e, 0x03, 0x80, 0x00, 0xe0, 0x38, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0xff, 0xc0, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xc0, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x27, 
-       0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 
-       0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 
-       0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 0x1a, 
-       0x0b, 0x15, 0x17, 0x13, 0x1a, 0x13, 0x19, 0x13, 
-       0x09, 0x0b, 0x0c, 0x13, 0x13, 0x1e, 0x17, 0x06, 
-       0x0b, 0x0b, 0x0d, 0x14, 0x09, 0x0b, 0x09, 0x09, 
-       0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 0x13, 
-       0x13, 0x13, 0x09, 0x09, 0x14, 0x14, 0x14, 0x13, 
-       0x23, 0x17, 0x17, 0x19, 0x19, 0x17, 0x15, 0x1a, 
-       0x19, 0x09, 0x11, 0x17, 0x13, 0x1d, 0x19, 0x1a, 
-       0x17, 0x1a, 0x19, 0x17, 0x15, 0x19, 0x17, 0x22, 
-       0x17, 0x15, 0x15, 0x09, 0x09, 0x09, 0x11, 0x13, 
-       0x0b, 0x12, 0x12, 0x11, 0x12, 0x12, 0x0a, 0x12, 
-       0x13, 0x07, 0x07, 0x11, 0x07, 0x1b, 0x13, 0x12, 
-       0x12, 0x12, 0x0b, 0x11, 0x09, 0x13, 0x11, 0x17, 
-       0x10, 0x11, 0x10, 0x0b, 0x09, 0x0b, 0x14, 0x1a, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
-       0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
-       0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
-       0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
-       0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
-       0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
-       0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
-       0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
-       0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
-       0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
-       0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
-       0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
-       0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
-       0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
-       0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
-       0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
-       0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
-       0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
-       0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 
-       0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 
-       0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe3, 
-       0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xf8, 0x00, 
-       0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xfe, 0x00, 
-       0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 
-       0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x07, 
-       0x1c, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 
-       0x00, 0x07, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 0x00, 
-       0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
-       0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
-       0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
-       0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
-       0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x1f, 0x00, 
-       0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x07, 
-       0x1c, 0x00, 0x00, 0x00, 0x07, 0xe1, 0xf8, 0x00, 
-       0x00, 0x07, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x07, 0x00, 
-       0x00, 0x00, 0x00, 0xee, 0x00, 0x00, 0x00, 0x07, 
-       0x1c, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x7c, 0x00, 
-       0x00, 0x07, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x07, 0x1c, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x07, 0x00, 
-       0x00, 0x00, 0x01, 0xef, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1e, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x07, 0x00, 
-       0x00, 0x00, 0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1e, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x07, 0x00, 
-       0x00, 0x00, 0x03, 0xc7, 0x80, 0x00, 0x00, 0x0f, 
-       0xf8, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 
-       0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0e, 0x00, 
-       0x00, 0x00, 0x03, 0xc7, 0x80, 0x00, 0x00, 0x1f, 
-       0xfe, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x0f, 0x00, 
-       0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0e, 0x00, 
-       0x00, 0x00, 0x03, 0x83, 0x80, 0x00, 0x00, 0x3f, 
-       0xff, 0x00, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 
-       0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 
-       0x00, 0x00, 0x07, 0x83, 0xc0, 0x00, 0x00, 0x78, 
-       0x1f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 
-       0x00, 0x3e, 0x1f, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 
-       0x00, 0x00, 0x07, 0x01, 0xc0, 0x00, 0x00, 0x70, 
-       0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 
-       0x00, 0x3c, 0x0f, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 
-       0x00, 0x00, 0x0f, 0x01, 0xe0, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 
-       0x00, 0x78, 0x07, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1f, 0x00, 
-       0x00, 0x00, 0x0f, 0x01, 0xe0, 0x00, 0x00, 0x00, 
-       0x3f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 
-       0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x0f, 0x80, 
-       0x00, 0x00, 0x0f, 0xff, 0xe0, 0x00, 0x00, 0x07, 
-       0xff, 0x00, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 
-       0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x7f, 0xc0, 0x00, 0x00, 0x00, 0x1c, 0x07, 0xc0, 
-       0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x1f, 
-       0xff, 0x00, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 
-       0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x7f, 0xc0, 0x00, 0x00, 0x00, 0x1c, 0x01, 0xe0, 
-       0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x3f, 
-       0xf7, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x0f, 0x00, 
-       0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x7f, 0xc0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0xf0, 
-       0x00, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x00, 0x7c, 
-       0x07, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 
-       0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x1c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x70, 
-       0x00, 0x00, 0x3c, 0x00, 0x78, 0x00, 0x00, 0x70, 
-       0x07, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1e, 0x00, 
-       0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 0x1e, 0x00, 
-       0x3c, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x20, 0x70, 
-       0x00, 0x00, 0x38, 0x00, 0x38, 0x00, 0x00, 0x70, 
-       0x0f, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x1e, 0x00, 
-       0x00, 0x78, 0x07, 0x80, 0x00, 0x00, 0x1e, 0x00, 
-       0x3c, 0x00, 0x00, 0x38, 0x07, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xf0, 0xf0, 
-       0x00, 0x00, 0x78, 0x00, 0x3c, 0x00, 0x00, 0x70, 
-       0x1f, 0x00, 0x00, 0x00, 0x0f, 0x80, 0x7c, 0x00, 
-       0x00, 0x3c, 0x0f, 0x00, 0x00, 0x00, 0x0f, 0x00, 
-       0x78, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0xf9, 0xf0, 
-       0x00, 0x00, 0x78, 0x00, 0x3c, 0x00, 0x00, 0x7c, 
-       0x3f, 0x00, 0x00, 0x00, 0x07, 0xe1, 0xf8, 0x00, 
-       0x00, 0x3e, 0x1f, 0x00, 0x00, 0x00, 0x0f, 0xc1, 
-       0xf8, 0x00, 0x00, 0x3e, 0x1f, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x7f, 0xe0, 
-       0x00, 0x00, 0x70, 0x00, 0x1c, 0x00, 0x00, 0x3f, 
-       0xff, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 
-       0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0x07, 0xff, 
-       0xf0, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x00, 
-       0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 
-       0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 
-       0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 
-       0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 
-       0x04, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x3f, 0xc0, 
-       0x00, 0x00, 0xf0, 0x00, 0x1e, 0x00, 0x00, 0x3f, 
-       0xf7, 0x80, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 
-       0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0x03, 0xff, 
-       0xe0, 0x00, 0x00, 0x1f, 0xfb, 0x80, 0x00, 0x00, 
-       0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 
-       0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 
-       0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 
-       0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 
-       0xfc, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1f, 0x80, 
-       0x00, 0x00, 0xe0, 0x00, 0x0e, 0x00, 0x00, 0x0f, 
-       0xe3, 0x80, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 
-       0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xff, 
-       0x80, 0x00, 0x00, 0x07, 0xe3, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x01, 
-       0xc3, 0x80, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 
-       0x00, 0x07, 0xc0, 0x0e, 0x00, 0x00, 0x00, 0xf8, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x01, 
-       0xc7, 0x80, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 
-       0x00, 0x1f, 0xe0, 0x1e, 0x00, 0x00, 0x01, 0xfe, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x03, 
-       0xc7, 0x80, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 
-       0x00, 0x1c, 0x70, 0x1c, 0x00, 0x00, 0x03, 0xfe, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x03, 
-       0xc7, 0x00, 0x00, 0x00, 0x3e, 0xde, 0x00, 0x00, 
-       0x00, 0x3c, 0x78, 0x3c, 0x00, 0x00, 0x07, 0x8f, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x76, 0xe0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x03, 
-       0x87, 0x00, 0x00, 0x00, 0x3c, 0xcf, 0x00, 0x00, 
-       0x00, 0x38, 0x38, 0x38, 0x00, 0x00, 0x07, 0x07, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x7f, 0xe0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x03, 
-       0x87, 0x00, 0x00, 0x00, 0x38, 0xc7, 0x00, 0x00, 
-       0x00, 0x38, 0x38, 0x78, 0x00, 0x00, 0x07, 0x07, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x03, 
-       0x8f, 0x00, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 
-       0x00, 0x38, 0x38, 0x70, 0x00, 0x00, 0x07, 0x07, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x71, 0xc0, 0x00, 0x00, 0x00, 0x7f, 
-       0xff, 0xc0, 0x00, 0x00, 0x38, 0xc0, 0x00, 0x00, 
-       0x00, 0x38, 0x38, 0xf0, 0x00, 0x00, 0x07, 0x8f, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x1e, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 
-       0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x70, 0xc0, 0x00, 0x00, 0x00, 0x7f, 
-       0xff, 0xc0, 0x00, 0x00, 0x3c, 0xc0, 0x00, 0x00, 
-       0x00, 0x38, 0x38, 0xe0, 0x00, 0x00, 0x03, 0x9e, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x39, 0xc0, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 
-       0xff, 0xc0, 0x00, 0x00, 0x1e, 0xc0, 0x00, 0x00, 
-       0x00, 0x3c, 0x79, 0xe0, 0x00, 0x00, 0x03, 0xfc, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x19, 0x80, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
-       0x0e, 0x00, 0x00, 0x00, 0x1f, 0xe0, 0x00, 0x00, 
-       0x00, 0x1c, 0x71, 0xc0, 0x00, 0x00, 0x01, 0xf8, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
-       0x1e, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 0x00, 
-       0x00, 0x1f, 0xe3, 0xc0, 0x00, 0x00, 0x03, 0xf0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
-       0x1e, 0x00, 0x00, 0x00, 0x03, 0xfe, 0x00, 0x00, 
-       0x00, 0x07, 0xc3, 0x8f, 0x80, 0x00, 0x07, 0xf0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 
-       0x00, 0x00, 0x07, 0xbf, 0xc0, 0x00, 0x0f, 0x78, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0xcf, 0x00, 0x00, 
-       0x00, 0x00, 0x07, 0x38, 0xe0, 0x00, 0x1e, 0x3c, 
-       0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 
-       0xff, 0xc0, 0x00, 0x00, 0x00, 0xc7, 0x80, 0x00, 
-       0x00, 0x00, 0x0f, 0x78, 0xf0, 0x00, 0x3c, 0x1e, 
-       0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 
-       0xff, 0xc0, 0x00, 0x00, 0x00, 0xc3, 0x80, 0x00, 
-       0x00, 0x00, 0x0e, 0x70, 0x70, 0x00, 0x38, 0x1e, 
-       0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 
-       0xff, 0xc0, 0x00, 0x00, 0x00, 0xc3, 0x80, 0x00, 
-       0x00, 0x00, 0x1e, 0x70, 0x70, 0x00, 0x38, 0x0f, 
-       0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x7f, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 
-       0x38, 0x00, 0x00, 0x00, 0x70, 0xc3, 0x80, 0x00, 
-       0x00, 0x00, 0x1c, 0x70, 0x70, 0x00, 0x38, 0x07, 
-       0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
-       0x38, 0x00, 0x00, 0x00, 0x78, 0xc7, 0x80, 0x00, 
-       0x00, 0x00, 0x3c, 0x70, 0x70, 0x00, 0x3c, 0x03, 
-       0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
-       0x38, 0x00, 0x00, 0x00, 0x78, 0xc7, 0x80, 0x00, 
-       0x00, 0x00, 0x38, 0x70, 0x70, 0x00, 0x3c, 0x07, 
-       0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
-       0x78, 0x00, 0x00, 0x00, 0x3e, 0xdf, 0x00, 0x00, 
-       0x00, 0x00, 0x70, 0x78, 0xf0, 0x00, 0x1f, 0x1f, 
-       0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x70, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 
-       0x78, 0x00, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 
-       0x00, 0x00, 0x70, 0x38, 0xe0, 0x00, 0x0f, 0xff, 
-       0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 
-       0x70, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 
-       0x00, 0x00, 0xe0, 0x3f, 0xc0, 0x00, 0x07, 0xfe, 
-       0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x70, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 
-       0x00, 0x00, 0xe0, 0x0f, 0x80, 0x00, 0x03, 0xf8, 
-       0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x80, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 
-       0x00, 0x00, 0x03, 0xfc, 0x00, 0x00, 0x00, 0x07, 
-       0xf8, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x1f, 0xff, 0x80, 0x00, 0x00, 0x01, 0xfc, 
-       0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 
-       0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x0f, 
-       0xfe, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x1f, 0xff, 0x80, 0x00, 0x00, 0x07, 0xff, 
-       0x00, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 
-       0x0f, 0xfe, 0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 
-       0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x1f, 
-       0xff, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 
-       0x00, 0x3f, 0xff, 0x80, 0x00, 0x00, 0x0f, 0xff, 
-       0x80, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 
-       0x1f, 0xff, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 
-       0x1f, 0x1f, 0x00, 0x00, 0x00, 0x01, 0xf0, 0x00, 
-       0x00, 0x00, 0x3e, 0x0f, 0x80, 0x00, 0x00, 0x3e, 
-       0x1f, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 
-       0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x0f, 
-       0x80, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
-       0x1e, 0x0f, 0x00, 0x00, 0x00, 0x3e, 0x0f, 0x80, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1f, 0x1f, 0x00, 0x00, 0x00, 
-       0x3c, 0x07, 0x80, 0x00, 0x00, 0x03, 0xf0, 0x00, 
-       0x00, 0x00, 0x78, 0x03, 0xc0, 0x00, 0x00, 0x78, 
-       0x07, 0x80, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
-       0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x03, 
-       0xc0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x3c, 0x07, 0x80, 0x00, 0x00, 0x3c, 0x03, 0x80, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 
-       0x00, 0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x0f, 0xf0, 0x00, 
-       0x00, 0x00, 0x70, 0x03, 0xc0, 0x00, 0x00, 0x70, 
-       0x03, 0x80, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
-       0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x01, 
-       0xc0, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x78, 0x03, 0x80, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 
-       0x00, 0x00, 0x00, 0x3c, 0x03, 0x80, 0x00, 0x00, 
-       0x78, 0x03, 0xc0, 0x00, 0x00, 0x1f, 0x70, 0x00, 
-       0x00, 0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 
-       0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 0x01, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 
-       0x00, 0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 
-       0x78, 0x03, 0xc0, 0x00, 0x00, 0x1e, 0x70, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x03, 0x80, 0x00, 0x00, 0x01, 0xee, 0x00, 0x00, 
-       0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 0x01, 0xc0, 
-       0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x18, 0x70, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x07, 0x80, 0x00, 0x00, 0x03, 0xce, 0x00, 0x00, 
-       0x00, 0x3b, 0xf8, 0x00, 0x00, 0x00, 0x78, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x3c, 0x07, 0x80, 0x00, 0x00, 0x70, 0x01, 0xc0, 
-       0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 
-       0x00, 0x3f, 0xff, 0xc0, 0x00, 0x00, 0x07, 0xf8, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 
-       0x1f, 0x00, 0x00, 0x00, 0x03, 0xce, 0x00, 0x00, 
-       0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, 0x71, 0xfc, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x1e, 0x0f, 0x00, 0x00, 0x00, 0x70, 0x01, 0xc0, 
-       0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 
-       0x00, 0x3f, 0xff, 0xc0, 0x00, 0x00, 0x01, 0xfe, 
-       0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x01, 
-       0xfe, 0x00, 0x00, 0x00, 0x07, 0x8e, 0x00, 0x00, 
-       0x00, 0x7f, 0xff, 0x00, 0x00, 0x00, 0x77, 0xfe, 
-       0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0x0f, 0xfe, 0x00, 0x00, 0x00, 0x78, 0x03, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 
-       0x00, 0x3f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x3f, 
-       0x80, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x01, 
-       0xfe, 0x00, 0x00, 0x00, 0x0f, 0x0e, 0x00, 0x00, 
-       0x00, 0x7c, 0x0f, 0x80, 0x00, 0x00, 0x7f, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x07, 0xfc, 0x00, 0x00, 0x00, 0x78, 0x07, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
-       0xc0, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x01, 
-       0xff, 0x80, 0x00, 0x00, 0x1e, 0x0e, 0x00, 0x00, 
-       0x00, 0x78, 0x03, 0x80, 0x00, 0x00, 0x7e, 0x0f, 
-       0x80, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0x00, 0x00, 0x00, 0x3e, 0x0f, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
-       0xc0, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0x80, 0x00, 0x00, 0x1e, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x7c, 0x03, 
-       0xc0, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
-       0x3e, 0x0f, 0x80, 0x00, 0x00, 0x1f, 0xff, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
-       0xc0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xc0, 0x00, 0x00, 0x3c, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x78, 0x03, 
-       0xc0, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 
-       0x78, 0x03, 0x80, 0x00, 0x00, 0x0f, 0xfd, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x1f, 0xc0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0x80, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xc0, 0x00, 0x00, 0x78, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x70, 0x01, 
-       0xc0, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x78, 0x03, 0xc0, 0x00, 0x00, 0x07, 0xf1, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 
-       0x00, 0x3f, 0xff, 0xc0, 0x00, 0x00, 0x01, 0xfe, 
-       0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0xc0, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 
-       0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x70, 0x01, 
-       0xc0, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0xfe, 0x00, 0x00, 
-       0x00, 0x3f, 0xff, 0xc0, 0x00, 0x00, 0x07, 0xf8, 
-       0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x78, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0xc0, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 
-       0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x70, 0x01, 
-       0xc0, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x80, 0x00, 
-       0x00, 0x3f, 0xff, 0xc0, 0x00, 0x00, 0x1f, 0xc0, 
-       0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x78, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x70, 
-       0x01, 0xc0, 0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 
-       0x00, 0x70, 0x01, 0xc0, 0x00, 0x00, 0x70, 0x01, 
-       0xc0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 
-       0x70, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x03, 0x80, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x78, 
-       0x03, 0xc0, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x78, 0x03, 0xc0, 0x00, 0x00, 0x38, 0x03, 
-       0xc0, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 0x00, 
-       0x78, 0x03, 0xc0, 0x00, 0x00, 0x70, 0x07, 0x80, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0x07, 0x80, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x78, 
-       0x07, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x78, 0x07, 0x80, 0x00, 0x00, 0x3c, 0x03, 
-       0x80, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 
-       0x78, 0x03, 0xc0, 0x00, 0x00, 0x78, 0x07, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x3e, 
-       0x0f, 0x80, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x3e, 0x0f, 0x00, 0x00, 0x00, 0x1e, 0x0f, 
-       0x80, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 
-       0x3e, 0x0f, 0x80, 0x00, 0x00, 0x3c, 0x1f, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 0x1f, 
-       0xff, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x0f, 0xff, 
-       0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0x00, 0x00, 0x00, 0x3f, 0xfe, 0x00, 
-       0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x0f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 0x0f, 
-       0xfe, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x07, 0xfe, 
-       0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 
-       0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x7f, 0xff, 0xc0, 0x00, 0x00, 0x03, 
-       0xf8, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 
-       0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x03, 0xf8, 
-       0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xf8, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x00, 
-       0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x07, 0xfe, 0x00, 0x00, 0x00, 0x7c, 0x00, 
-       0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x00, 
-       0x7f, 0x80, 0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 
-       0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x1f, 0xff, 
-       0xe0, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x7c, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1f, 0x00, 0x07, 0xc0, 0x00, 0x1e, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 
-       0x00, 0x1f, 0xff, 0x80, 0x00, 0x00, 0x7c, 0x00, 
-       0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x00, 0x01, 
-       0xff, 0xc0, 0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 
-       0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x1f, 0xff, 
-       0xe0, 0x00, 0x00, 0x01, 0xff, 0xf0, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0xf8, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1f, 0x80, 0x0f, 0xc0, 0x00, 0x1e, 0x00, 
-       0x1c, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 
-       0x00, 0x7f, 0xff, 0xe0, 0x00, 0x00, 0xfe, 0x00, 
-       0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x03, 
-       0xff, 0xf0, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 
-       0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x1f, 0xff, 
-       0xe0, 0x00, 0x00, 0x03, 0xff, 0xf8, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x01, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1f, 0x80, 0x0f, 0xc0, 0x00, 0x1f, 0x00, 
-       0x1c, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 0x00, 
-       0x00, 0xfe, 0x07, 0xf0, 0x00, 0x00, 0xfe, 0x00, 
-       0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x07, 
-       0xc1, 0xf0, 0x00, 0x00, 0x1c, 0x01, 0xf8, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x07, 0xe0, 0xfc, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x03, 0xe0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1f, 0x80, 0x0f, 0xc0, 0x00, 0x1f, 0x80, 
-       0x1c, 0x00, 0x00, 0x07, 0xe1, 0xf8, 0x00, 0x00, 
-       0x01, 0xf0, 0x00, 0xf8, 0x00, 0x00, 0xee, 0x00, 
-       0x00, 0x00, 0x1c, 0x00, 0xf0, 0x00, 0x00, 0x0f, 
-       0x00, 0x78, 0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0x80, 0x1e, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x07, 0xc0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1f, 0xc0, 0x1f, 0xc0, 0x00, 0x1f, 0x80, 
-       0x1c, 0x00, 0x00, 0x0f, 0x80, 0x7c, 0x00, 0x00, 
-       0x03, 0xc0, 0x00, 0x7c, 0x00, 0x01, 0xef, 0x00, 
-       0x00, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x00, 0x1e, 
-       0x00, 0x3c, 0x00, 0x00, 0x1c, 0x00, 0x3c, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0x00, 0x0e, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x0f, 0x80, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1d, 0xc0, 0x1d, 0xc0, 0x00, 0x1f, 0xc0, 
-       0x1c, 0x00, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x00, 
-       0x07, 0x80, 0x00, 0x3c, 0x00, 0x01, 0xc7, 0x00, 
-       0x00, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x00, 0x1c, 
-       0x00, 0x3c, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x1e, 0x00, 0x0f, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x1f, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1d, 0xc0, 0x1d, 0xc0, 0x00, 0x1d, 0xc0, 
-       0x1c, 0x00, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x00, 
-       0x0f, 0x03, 0xe3, 0x9e, 0x00, 0x03, 0xc7, 0x80, 
-       0x00, 0x00, 0x1c, 0x00, 0x70, 0x00, 0x00, 0x1c, 
-       0x00, 0x18, 0x00, 0x00, 0x1c, 0x00, 0x1e, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x06, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x3e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1d, 0xe0, 0x1d, 0xc0, 0x00, 0x1c, 0xe0, 
-       0x1c, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 0x00, 
-       0x0f, 0x0f, 0xf7, 0x8e, 0x00, 0x03, 0xc7, 0x80, 
-       0x00, 0x00, 0x1c, 0x00, 0xf0, 0x00, 0x00, 0x3c, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1e, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x7c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0xe0, 0x39, 0xc0, 0x00, 0x1c, 0xf0, 
-       0x1c, 0x00, 0x00, 0x3c, 0x00, 0x0f, 0x00, 0x00, 
-       0x1e, 0x1f, 0xff, 0x8f, 0x00, 0x03, 0x83, 0x80, 
-       0x00, 0x00, 0x1c, 0x01, 0xe0, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0xf8, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0xe0, 0x39, 0xc0, 0x00, 0x1c, 0x70, 
-       0x1c, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 0x00, 
-       0x1c, 0x3e, 0x3f, 0x0f, 0x00, 0x07, 0x83, 0xc0, 
-       0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0xfc, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1d, 
-       0xf0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0xf0, 0x39, 0xc0, 0x00, 0x1c, 0x78, 
-       0x1c, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 0x00, 
-       0x1c, 0x3c, 0x1f, 0x07, 0x00, 0x07, 0x01, 0xc0, 
-       0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 
-       0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x1f, 0xff, 
-       0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0xfc, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1f, 
-       0xf8, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0xf0, 0x79, 0xc0, 0x00, 0x1c, 0x3c, 
-       0x1c, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 0x00, 
-       0x3c, 0x78, 0x0f, 0x07, 0x00, 0x0f, 0x01, 0xe0, 
-       0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 
-       0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x1f, 0xff, 
-       0x80, 0x00, 0x00, 0x38, 0x03, 0xff, 0x00, 0x00, 
-       0x1f, 0xff, 0xfc, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1f, 
-       0xfc, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x70, 0x71, 0xc0, 0x00, 0x1c, 0x1c, 
-       0x1c, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 0x00, 
-       0x38, 0x70, 0x0f, 0x07, 0x00, 0x0f, 0x01, 0xe0, 
-       0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 
-       0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x1f, 0xff, 
-       0x80, 0x00, 0x00, 0x38, 0x03, 0xff, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1f, 
-       0x9c, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x70, 0x71, 0xc0, 0x00, 0x1c, 0x1e, 
-       0x1c, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 0x00, 
-       0x38, 0xf0, 0x0f, 0x07, 0x00, 0x0f, 0xff, 0xe0, 
-       0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x38, 0x03, 0xff, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1f, 
-       0x1e, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x78, 0xf1, 0xc0, 0x00, 0x1c, 0x0f, 
-       0x1c, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 0x00, 
-       0x38, 0xe0, 0x0e, 0x07, 0x00, 0x1f, 0xff, 0xf0, 
-       0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1e, 
-       0x0f, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x38, 0xe1, 0xc0, 0x00, 0x1c, 0x07, 
-       0x1c, 0x00, 0x00, 0x38, 0x00, 0x07, 0x00, 0x00, 
-       0x38, 0xe0, 0x0e, 0x0f, 0x00, 0x1f, 0xff, 0xf0, 
-       0x00, 0x00, 0x1c, 0x00, 0x38, 0x00, 0x00, 0x3c, 
-       0x00, 0x0c, 0x00, 0x00, 0x1c, 0x00, 0x1e, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x3c, 0x00, 0x07, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x07, 0x80, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x38, 0xe1, 0xc0, 0x00, 0x1c, 0x07, 
-       0x9c, 0x00, 0x00, 0x3c, 0x00, 0x0f, 0x00, 0x00, 
-       0x38, 0xe0, 0x1e, 0x0e, 0x00, 0x1c, 0x00, 0x70, 
-       0x00, 0x00, 0x1c, 0x00, 0x38, 0x00, 0x00, 0x1c, 
-       0x00, 0x1e, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x1c, 0x00, 0x07, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x03, 0x80, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x3d, 0xe1, 0xc0, 0x00, 0x1c, 0x03, 
-       0x9c, 0x00, 0x00, 0x1c, 0x00, 0x0e, 0x00, 0x00, 
-       0x38, 0xe0, 0x1e, 0x1e, 0x00, 0x3c, 0x00, 0x78, 
-       0x00, 0x00, 0x1c, 0x00, 0x38, 0x00, 0x00, 0x1e, 
-       0x00, 0x1e, 0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x1e, 0x00, 0x07, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x03, 0xc0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x1d, 0xc1, 0xc0, 0x00, 0x1c, 0x01, 
-       0xdc, 0x00, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x00, 
-       0x38, 0xe0, 0x3c, 0x1c, 0x00, 0x38, 0x00, 0x38, 
-       0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 0x00, 0x1e, 
-       0x00, 0x3c, 0x00, 0x00, 0x1c, 0x00, 0x3c, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0x00, 0x07, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x70, 0x1c, 0x00, 0x00, 0x00, 0x1c, 
-       0x01, 0xe0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x1d, 0xc1, 0xc0, 0x00, 0x1c, 0x01, 
-       0xfc, 0x00, 0x00, 0x1e, 0x00, 0x1e, 0x00, 0x00, 
-       0x3c, 0xf0, 0x7c, 0x3c, 0x00, 0x78, 0x00, 0x3c, 
-       0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 0x00, 0x0f, 
-       0x00, 0x7c, 0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0x80, 0x1f, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x78, 0x3c, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0xf0, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x1f, 0xc1, 0xc0, 0x00, 0x1c, 0x00, 
-       0xfc, 0x00, 0x00, 0x0f, 0x80, 0x7c, 0x00, 0x00, 
-       0x3c, 0x78, 0xfc, 0xf8, 0x00, 0x78, 0x00, 0x3c, 
-       0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x07, 
-       0xe1, 0xf8, 0x00, 0x00, 0x1c, 0x01, 0xf8, 0x00, 
-       0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x07, 0xe0, 0x7f, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x7c, 0x78, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x70, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1c, 0x1f, 0x81, 0xc0, 0x00, 0x1c, 0x00, 
-       0xfc, 0x00, 0x00, 0x07, 0xe1, 0xf8, 0x00, 0x00, 
-       0x1c, 0x7f, 0xff, 0xf0, 0x00, 0x70, 0x00, 0x1c, 
-       0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x03, 
-       0xff, 0xf0, 0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 
-       0x00, 0x1f, 0xff, 0xf8, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x03, 0xff, 0xfc, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x78, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 
-       0x00, 0x1c, 0x0f, 0x81, 0xc0, 0x00, 0x1c, 0x00, 
-       0x7c, 0x00, 0x00, 0x03, 0xff, 0xf0, 0x00, 0x00, 
-       0x1e, 0x3f, 0xdf, 0xe0, 0x00, 0xf0, 0x00, 0x1e, 
-       0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x00, 0x01, 
-       0xff, 0xe0, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 
-       0x00, 0x1f, 0xff, 0xf8, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xff, 0xf8, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x1f, 0xf0, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x3c, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 
-       0x00, 0x1c, 0x0f, 0x81, 0xc0, 0x00, 0x1c, 0x00, 
-       0x3c, 0x00, 0x00, 0x01, 0xff, 0xe0, 0x00, 0x00, 
-       0x0f, 0x1f, 0x0f, 0x87, 0x80, 0xe0, 0x00, 0x0e, 
-       0x00, 0x00, 0x1f, 0xff, 0x80, 0x00, 0x00, 0x00, 
-       0x7f, 0x80, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 
-       0x00, 0x1f, 0xff, 0xf8, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x3f, 0xc0, 0x00, 0x00, 
-       0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 0x00, 
-       0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x00, 0x1c, 
-       0x00, 0x1e, 0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 
-       0x00, 0x1c, 0x0f, 0x01, 0xc0, 0x00, 0x1c, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 
-       0x0f, 0x80, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x07, 0xc0, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xf0, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0xfe, 0x01, 0xfc, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x3f, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x07, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0x80, 0x00, 0x00, 0x00, 0x7f, 0x00, 
-       0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x00, 0x01, 
-       0xfe, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xf0, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0xe0, 0x00, 
-       0x0e, 0x00, 0x00, 0xe0, 0x03, 0xe0, 0x03, 0x80, 
-       0x3c, 0x00, 0x78, 0x00, 0x00, 0xf0, 0x00, 0x78, 
-       0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x3f, 
-       0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 
-       0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0xe0, 0x00, 0x00, 0x01, 0xff, 0xc0, 
-       0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x03, 
-       0xff, 0x80, 0x00, 0x00, 0x7f, 0xff, 0xf0, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0xf0, 0x00, 
-       0x1e, 0x00, 0x00, 0xf0, 0x03, 0xe0, 0x07, 0x80, 
-       0x1e, 0x00, 0xf0, 0x00, 0x00, 0x70, 0x00, 0x70, 
-       0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x3f, 
-       0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 
-       0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0xf0, 0x00, 0x00, 0x03, 0xff, 0xe0, 
-       0x00, 0x00, 0x1f, 0xff, 0xf8, 0x00, 0x00, 0x0f, 
-       0xff, 0xc0, 0x00, 0x00, 0x7f, 0xff, 0xf0, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0xf0, 0x00, 
-       0x1e, 0x00, 0x00, 0xf0, 0x07, 0xe0, 0x07, 0x80, 
-       0x0e, 0x00, 0xe0, 0x00, 0x00, 0x78, 0x00, 0xf0, 
-       0x00, 0x00, 0x1f, 0xff, 0xe0, 0x00, 0x00, 0x3f, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x03, 0xe0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0xf0, 0x00, 0x00, 0x07, 0xc1, 0xf0, 
-       0x00, 0x00, 0x1c, 0x00, 0xf8, 0x00, 0x00, 0x0f, 
-       0x83, 0xe0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x78, 0x00, 
-       0x3c, 0x00, 0x00, 0x70, 0x07, 0xf0, 0x07, 0x00, 
-       0x0f, 0x01, 0xe0, 0x00, 0x00, 0x3c, 0x01, 0xe0, 
-       0x00, 0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x07, 0xf0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x78, 0x00, 0x00, 0x0f, 0x00, 0x78, 
-       0x00, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x00, 0x1e, 
-       0x00, 0xf0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x78, 0x00, 
-       0x3c, 0x00, 0x00, 0x70, 0x07, 0x70, 0x07, 0x00, 
-       0x07, 0x83, 0xc0, 0x00, 0x00, 0x1c, 0x01, 0xc0, 
-       0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x07, 0x70, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x78, 0x00, 0x00, 0x1e, 0x00, 0x3c, 
-       0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 
-       0x00, 0xf0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x38, 0x00, 
-       0x38, 0x00, 0x00, 0x78, 0x07, 0x70, 0x0f, 0x00, 
-       0x03, 0x83, 0x80, 0x00, 0x00, 0x1e, 0x03, 0xc0, 
-       0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x78, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x3c, 
-       0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 
-       0x00, 0x70, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x3c, 0x00, 
-       0x78, 0x00, 0x00, 0x78, 0x0f, 0x78, 0x0f, 0x00, 
-       0x03, 0xc7, 0x80, 0x00, 0x00, 0x0f, 0x07, 0x80, 
-       0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x38, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
-       0x00, 0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x3c, 0x00, 
-       0x78, 0x00, 0x00, 0x38, 0x0e, 0x38, 0x0e, 0x00, 
-       0x01, 0xef, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x3c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x38, 0x00, 0x00, 0x3c, 0x00, 0x1e, 
-       0x00, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x00, 0x1e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1c, 0x00, 
-       0x70, 0x00, 0x00, 0x38, 0x0e, 0x38, 0x0e, 0x00, 
-       0x00, 0xfe, 0x00, 0x00, 0x00, 0x07, 0x8f, 0x00, 
-       0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x1c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x78, 0x00, 0x00, 0x38, 0x00, 0x0e, 
-       0x00, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x00, 0x0f, 
-       0x80, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1e, 0x00, 
-       0xf0, 0x00, 0x00, 0x3c, 0x0e, 0x38, 0x1e, 0x00, 
-       0x00, 0x7c, 0x00, 0x00, 0x00, 0x03, 0x8e, 0x00, 
-       0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x1e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x78, 0x00, 0x00, 0x38, 0x00, 0x0e, 
-       0x00, 0x00, 0x1c, 0x00, 0xf8, 0x00, 0x00, 0x0f, 
-       0xf8, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x1e, 0x00, 
-       0xf0, 0x00, 0x00, 0x3c, 0x1e, 0x3c, 0x1e, 0x00, 
-       0x00, 0x7c, 0x00, 0x00, 0x00, 0x03, 0xde, 0x00, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x01, 0xf0, 0x00, 0x00, 0x38, 0x00, 0x0e, 
-       0x00, 0x00, 0x1f, 0xff, 0xf8, 0x00, 0x00, 0x07, 
-       0xff, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x0f, 0x01, 
-       0xe0, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 
-       0x00, 0x7c, 0x00, 0x00, 0x00, 0x01, 0xfc, 0x00, 
-       0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x38, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0xe0, 0x00, 0x00, 0x38, 0x00, 0x0e, 
-       0x00, 0x00, 0x1f, 0xff, 0xf0, 0x00, 0x00, 0x01, 
-       0xff, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x0f, 0x01, 
-       0xe0, 0x00, 0x00, 0x1c, 0x1c, 0x1c, 0x1c, 0x00, 
-       0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 
-       0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x70, 0x07, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0xc0, 0x00, 0x00, 0x38, 0x00, 0x0e, 
-       0x00, 0x00, 0x1f, 0xff, 0xc0, 0x00, 0x00, 0x00, 
-       0x3f, 0xe0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x07, 0x01, 
-       0xc0, 0x00, 0x00, 0x1e, 0x3c, 0x1c, 0x3c, 0x00, 
-       0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 
-       0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1f, 0xff, 0x80, 0x00, 0x00, 0x38, 0x00, 0x0e, 
-       0x00, 0x00, 0x1c, 0x0f, 0x00, 0x00, 0x00, 0x00, 
-       0x03, 0xf0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x07, 0x83, 
-       0xc0, 0x00, 0x00, 0x1e, 0x3c, 0x1e, 0x3c, 0x00, 
-       0x01, 0xef, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x0e, 
-       0x00, 0x00, 0x1c, 0x07, 0x80, 0x00, 0x00, 0x00, 
-       0x00, 0xf8, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x07, 0x83, 
-       0xc0, 0x00, 0x00, 0x0e, 0x38, 0x0e, 0x38, 0x00, 
-       0x01, 0xc7, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x1e, 
-       0x00, 0x00, 0x1c, 0x07, 0xc0, 0x00, 0x00, 0x38, 
-       0x00, 0x78, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x03, 0xc7, 
-       0x80, 0x00, 0x00, 0x0e, 0x38, 0x0e, 0x38, 0x00, 
-       0x03, 0xc7, 0x80, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x1c, 
-       0x00, 0x00, 0x1c, 0x03, 0xe0, 0x00, 0x00, 0x38, 
-       0x00, 0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1c, 0x00, 0x1c, 0x00, 0x00, 0x03, 0xc7, 
-       0x80, 0x00, 0x00, 0x0f, 0x78, 0x0f, 0x78, 0x00, 
-       0x07, 0x83, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x07, 0x3c, 
-       0x00, 0x00, 0x1c, 0x01, 0xf0, 0x00, 0x00, 0x3c, 
-       0x00, 0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1e, 0x00, 0x3c, 0x00, 0x00, 0x01, 0xc7, 
-       0x00, 0x00, 0x00, 0x0f, 0x70, 0x07, 0x78, 0x00, 
-       0x0f, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x07, 0xb8, 
-       0x00, 0x00, 0x1c, 0x00, 0xf0, 0x00, 0x00, 0x1c, 
-       0x00, 0x78, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x1e, 0x00, 0x3c, 0x00, 0x00, 0x01, 0xef, 
-       0x00, 0x00, 0x00, 0x07, 0x70, 0x07, 0x70, 0x00, 
-       0x0e, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x07, 0xf8, 
-       0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 0x00, 0x1e, 
-       0x00, 0xf8, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x0f, 0x00, 0x78, 0x00, 0x00, 0x01, 0xef, 
-       0x00, 0x00, 0x00, 0x07, 0xf0, 0x07, 0xf0, 0x00, 
-       0x1e, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x07, 0xc1, 0xf0, 
-       0x00, 0x00, 0x1c, 0x00, 0x78, 0x00, 0x00, 0x0f, 
-       0xc1, 0xf0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x0f, 0xc1, 0xf8, 0x00, 0x00, 0x00, 0xfe, 
-       0x00, 0x00, 0x00, 0x07, 0xf0, 0x07, 0xf0, 0x00, 
-       0x3c, 0x00, 0x78, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xf8, 
-       0x00, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x00, 0x0f, 
-       0xff, 0xe0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x07, 0xff, 0xf0, 0x00, 0x00, 0x00, 0xfe, 
-       0x00, 0x00, 0x00, 0x07, 0xe0, 0x03, 0xf0, 0x00, 
-       0x38, 0x00, 0x38, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x7f, 0xff, 0xf0, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x01, 0xff, 0xfe, 
-       0x00, 0x00, 0x1c, 0x00, 0x3e, 0x00, 0x00, 0x03, 
-       0xff, 0xc0, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x03, 0xff, 0xe0, 0x00, 0x00, 0x00, 0x7c, 
-       0x00, 0x00, 0x00, 0x03, 0xe0, 0x03, 0xe0, 0x00, 
-       0x78, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x7f, 0xff, 0xf0, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7f, 0x9f, 
-       0x00, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x00, 0x00, 
-       0xff, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0x7c, 
-       0x00, 0x00, 0x00, 0x03, 0xe0, 0x03, 0xe0, 0x00, 
-       0xf0, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x70, 0x00, 
-       0x00, 0x00, 0x7f, 0xff, 0xf0, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x01, 0xff, 0xff, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x01, 0xff, 0xff, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x01, 0xff, 0xff, 0xe0, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xe0, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf8, 0x00, 
-       0x00, 0x00, 0x39, 0xf8, 0x00, 0x00, 0x00, 0x03, 
-       0xf0, 0x00, 0x00, 0x00, 0x07, 0xe7, 0x00, 0x00, 
-       0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 0xff, 0x80, 
-       0x00, 0x00, 0x00, 0x07, 0xe7, 0x00, 0x00, 0x00, 
-       0x38, 0xfc, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x0f, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x39, 0xf0, 0x7e, 0x00, 0x00, 0x39, 0xfc, 
-       0x00, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 
-       0x00, 0x00, 0x3b, 0xfc, 0x00, 0x00, 0x00, 0x0f, 
-       0xfc, 0x00, 0x00, 0x00, 0x0f, 0xf7, 0x00, 0x00, 
-       0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 0xff, 0x80, 
-       0x00, 0x00, 0x00, 0x0f, 0xf7, 0x00, 0x00, 0x00, 
-       0x3b, 0xfe, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x1f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x3b, 0xfc, 0xff, 0x00, 0x00, 0x3b, 0xff, 
-       0x00, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x00, 
-       0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 0x00, 0x1f, 
-       0xfe, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 
-       0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 0xff, 0x80, 
-       0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 
-       0x3f, 0xff, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x3e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x3f, 0xfd, 0xff, 0x80, 0x00, 0x3f, 0xff, 
-       0x00, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x1f, 0x00, 
-       0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x00, 0x3e, 
-       0x1e, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x00, 0x00, 
-       0x00, 0x3e, 0x1f, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x3e, 0x3f, 0x00, 0x00, 0x00, 
-       0x3f, 0x0f, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x78, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x3f, 0x1f, 0x8f, 0x80, 0x00, 0x3f, 0x0f, 
-       0x80, 0x00, 0x00, 0x3e, 0x1f, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 
-       0x00, 0x00, 0x3e, 0x07, 0x00, 0x00, 0x00, 0x3c, 
-       0x0f, 0x00, 0x00, 0x00, 0x38, 0x1f, 0x00, 0x00, 
-       0x00, 0x38, 0x07, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x3c, 0x1f, 0x00, 0x00, 0x00, 
-       0x3c, 0x07, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0xf0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x3c, 0x1f, 0x07, 0x80, 0x00, 0x3c, 0x07, 
-       0x80, 0x00, 0x00, 0x3c, 0x0f, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 
-       0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 0x00, 0x78, 
-       0x07, 0x00, 0x00, 0x00, 0x78, 0x0f, 0x00, 0x00, 
-       0x00, 0x78, 0x07, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x78, 0x0f, 0x00, 0x00, 0x00, 
-       0x3c, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x39, 
-       0xe0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x3c, 0x0f, 0x03, 0x80, 0x00, 0x3c, 0x03, 
-       0x80, 0x00, 0x00, 0x78, 0x07, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 
-       0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 
-       0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3b, 
-       0xc0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0xff, 0x00, 
-       0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 
-       0x00, 0x7f, 0xff, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0xc0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 
-       0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 
-       0x00, 0x7f, 0xff, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0xe0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf7, 0x00, 
-       0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 
-       0x00, 0x7f, 0xff, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0xe0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x07, 0x00, 
-       0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
-       0x00, 0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 
-       0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3c, 
-       0xf0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 
-       0x00, 0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 
-       0x07, 0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 
-       0x00, 0x70, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x78, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x70, 0x03, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0f, 0x00, 
-       0x00, 0x00, 0x3c, 0x07, 0x80, 0x00, 0x00, 0x78, 
-       0x0f, 0x00, 0x00, 0x00, 0x78, 0x0f, 0x00, 0x00, 
-       0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x78, 0x0f, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x78, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x78, 0x07, 0x80, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x1f, 0x00, 
-       0x00, 0x00, 0x3c, 0x0f, 0x00, 0x00, 0x00, 0x38, 
-       0x0f, 0x00, 0x00, 0x00, 0x3c, 0x0f, 0x00, 0x00, 
-       0x00, 0x3c, 0x07, 0x80, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x38, 0x0f, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x3c, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x3c, 0x0f, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x3f, 0x00, 
-       0x00, 0x00, 0x3f, 0x1f, 0x00, 0x00, 0x00, 0x3e, 
-       0x3e, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x00, 0x00, 
-       0x00, 0x3e, 0x0f, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x3e, 0x3f, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x1e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x3e, 0x1f, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 0x00, 
-       0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 0x00, 0x1f, 
-       0xfc, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 
-       0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x1e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x1f, 0xfe, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xf7, 0x80, 
-       0x00, 0x00, 0x3b, 0xfc, 0x00, 0x00, 0x00, 0x0f, 
-       0xf8, 0x00, 0x00, 0x00, 0x0f, 0xf7, 0x00, 0x00, 
-       0x00, 0x0f, 0xfe, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x0f, 0xfc, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xe3, 0x80, 
-       0x00, 0x00, 0x39, 0xf8, 0x00, 0x00, 0x00, 0x07, 
-       0xf0, 0x00, 0x00, 0x00, 0x07, 0xe7, 0x00, 0x00, 
-       0x00, 0x03, 0xf8, 0x00, 0x00, 0x00, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0x07, 0xe7, 0x00, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x38, 
-       0x07, 0x80, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x0e, 0x03, 0x80, 0x00, 0x38, 0x03, 
-       0x80, 0x00, 0x00, 0x03, 0xf0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x78, 0x0f, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x7c, 0x3e, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x3f, 0xfe, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x01, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x03, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
-       0xc0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
-       0xc0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
-       0xc0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x39, 0xf8, 0x00, 0x00, 0x00, 0x07, 0xe7, 0x00, 
-       0x00, 0x00, 0x39, 0xe0, 0x00, 0x00, 0x00, 0x0f, 
-       0xf0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0xf0, 0x07, 
-       0x80, 0x00, 0x01, 0xe0, 0x38, 0x0f, 0x00, 0x00, 
-       0xf0, 0x0f, 0x00, 0x00, 0x00, 0x70, 0x07, 0x00, 
-       0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3b, 0xfc, 0x00, 0x00, 0x00, 0x0f, 0xf7, 0x00, 
-       0x00, 0x00, 0x3b, 0xe0, 0x00, 0x00, 0x00, 0x1f, 
-       0xf8, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0xf0, 0x07, 
-       0x80, 0x00, 0x00, 0xe0, 0x3c, 0x0e, 0x00, 0x00, 
-       0x78, 0x0f, 0x00, 0x00, 0x00, 0x78, 0x0f, 0x00, 
-       0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3f, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 
-       0x00, 0x00, 0x3f, 0xe0, 0x00, 0x00, 0x00, 0x3f, 
-       0xfc, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 0x07, 
-       0x00, 0x00, 0x00, 0xf0, 0x7c, 0x1e, 0x00, 0x00, 
-       0x38, 0x1e, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x00, 
-       0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3f, 0x1f, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x00, 
-       0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0x00, 0x78, 
-       0x3e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x78, 0x0f, 
-       0x00, 0x00, 0x00, 0xf0, 0x7c, 0x1e, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x00, 0x38, 0x0e, 0x00, 
-       0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 
-       0x40, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3e, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x1f, 0x00, 
-       0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x70, 
-       0x0e, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x0e, 
-       0x00, 0x00, 0x00, 0x70, 0x7c, 0x1c, 0x00, 0x00, 
-       0x1e, 0x38, 0x00, 0x00, 0x00, 0x3c, 0x1e, 0x00, 
-       0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xc0, 
-       0xc0, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3c, 0x07, 0x80, 0x00, 0x00, 0x78, 0x0f, 0x00, 
-       0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x70, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x38, 0x0e, 
-       0x00, 0x00, 0x00, 0x70, 0xec, 0x1c, 0x00, 0x00, 
-       0x0e, 0x78, 0x00, 0x00, 0x00, 0x1c, 0x1c, 0x00, 
-       0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x1e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xf1, 
-       0xc0, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3c, 0x03, 0x80, 0x00, 0x00, 0x70, 0x0f, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x7e, 
-       0x00, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x3c, 0x1e, 
-       0x00, 0x00, 0x00, 0x78, 0xee, 0x3c, 0x00, 0x00, 
-       0x0f, 0xf0, 0x00, 0x00, 0x00, 0x1e, 0x1c, 0x00, 
-       0x00, 0x00, 0x01, 0xf0, 0x00, 0x00, 0x00, 0x3c, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x71, 0xff, 
-       0xc0, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 0x07, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0xe0, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x1c, 0x1c, 
-       0x00, 0x00, 0x00, 0x38, 0xee, 0x38, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x00, 0x1e, 0x1c, 0x00, 
-       0x00, 0x00, 0x01, 0xe0, 0x00, 0x00, 0x00, 0x78, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x60, 0x7f, 
-       0x80, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 0x07, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0xfc, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x1e, 0x3c, 
-       0x00, 0x00, 0x00, 0x38, 0xe6, 0x38, 0x00, 0x00, 
-       0x03, 0xe0, 0x00, 0x00, 0x00, 0x0e, 0x38, 0x00, 
-       0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x70, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x01, 0xc0, 0x00, 0x00, 0x00, 0x40, 0x1f, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 0x07, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x0f, 
-       0xfe, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x0e, 0x38, 
-       0x00, 0x00, 0x00, 0x3d, 0xc6, 0x78, 0x00, 0x00, 
-       0x03, 0xc0, 0x00, 0x00, 0x00, 0x0f, 0x38, 0x00, 
-       0x00, 0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x78, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 0x07, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x01, 
-       0xff, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x0e, 0x38, 
-       0x00, 0x00, 0x00, 0x1d, 0xc7, 0x70, 0x00, 0x00, 
-       0x07, 0xe0, 0x00, 0x00, 0x00, 0x0f, 0x38, 0x00, 
-       0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x3c, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x07, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x38, 0x03, 0x80, 0x00, 0x00, 0x70, 0x07, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x03, 0x80, 0x00, 0x00, 0x0f, 0x78, 
-       0x00, 0x00, 0x00, 0x1d, 0xc7, 0x70, 0x00, 0x00, 
-       0x07, 0xf0, 0x00, 0x00, 0x00, 0x07, 0x70, 0x00, 
-       0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x1e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3c, 0x07, 0x80, 0x00, 0x00, 0x78, 0x0f, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x70, 
-       0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x07, 0x80, 0x00, 0x00, 0x07, 0x70, 
-       0x00, 0x00, 0x00, 0x1d, 0xc3, 0x70, 0x00, 0x00, 
-       0x0f, 0x70, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x00, 
-       0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3c, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x0f, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x78, 
-       0x07, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x3c, 0x07, 0x80, 0x00, 0x00, 0x07, 0xf0, 
-       0x00, 0x00, 0x00, 0x0f, 0x83, 0xe0, 0x00, 0x00, 
-       0x1e, 0x78, 0x00, 0x00, 0x00, 0x07, 0xf0, 0x00, 
-       0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3f, 0x1f, 0x00, 0x00, 0x00, 0x3e, 0x3f, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3c, 
-       0x1f, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 
-       0x00, 0x3e, 0x1f, 0x80, 0x00, 0x00, 0x03, 0xe0, 
-       0x00, 0x00, 0x00, 0x0f, 0x83, 0xe0, 0x00, 0x00, 
-       0x3c, 0x3c, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 
-       0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3f, 0xfe, 0x00, 0x00, 0x00, 0x1f, 0xff, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0xfe, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
-       0x00, 0x1f, 0xff, 0x80, 0x00, 0x00, 0x03, 0xe0, 
-       0x00, 0x00, 0x00, 0x0f, 0x83, 0xe0, 0x00, 0x00, 
-       0x38, 0x1c, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 
-       0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x3b, 0xfc, 0x00, 0x00, 0x00, 0x0f, 0xf7, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x1f, 
-       0xfc, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 0x00, 
-       0x00, 0x1f, 0xfb, 0x80, 0x00, 0x00, 0x03, 0xe0, 
-       0x00, 0x00, 0x00, 0x0f, 0x03, 0xc0, 0x00, 0x00, 
-       0x78, 0x1e, 0x00, 0x00, 0x00, 0x03, 0xe0, 0x00, 
-       0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x00, 
-       0x39, 0xf0, 0x00, 0x00, 0x00, 0x03, 0xe7, 0x00, 
-       0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x07, 
-       0xf0, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 
-       0x00, 0x07, 0xe3, 0x80, 0x00, 0x00, 0x01, 0xc0, 
-       0x00, 0x00, 0x00, 0x07, 0x01, 0xc0, 0x00, 0x00, 
-       0xf0, 0x0f, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 
-       0x00, 0x00, 0xff, 0xfe, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0f, 0xff, 0xfc, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x80, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
-       0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 
-       0xc0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 
-       0xc0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
-       0xc0, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 
-       0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 
-       0xf0, 0x24, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x0c, 0x94, 
-       0xea, 0xff, 0xfd, 0x70, 0xea, 0x00, 0x00, 0x01, 
-       0xe3, 0x5c, 0x00, 0xb7, 0xa5, 0x9f, 0xf0, 0x04, 
-       0xe0, 0x86, 0xc0, 0x0c, 0xe5, 0x9f, 0xf0, 0x00, 
-       0x00, 0x00, 0x0f, 0x74, 0x00, 0x00, 0x0c, 0x98, 
-       0x00, 0x00, 0x00, 0x0f, 0xf0, 0x24, 0x00, 0x09, 
-       0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xff, 
-       0x00, 0x00, 0x0e, 0x4c, 0xea, 0xff, 0xfd, 0x03, 
-       0xea, 0x00, 0x00, 0x07, 0xe5, 0x9f, 0xc0, 0x1c, 
-       0xe5, 0x9c, 0x30, 0x00, 0xe3, 0x83, 0x33, 0x33, 
-       0xe1, 0x52, 0x00, 0x03, 0x05, 0x9f, 0xc0, 0x10, 
-       0x05, 0x9c, 0xc0, 0x00, 0x03, 0x8c, 0x23, 0x33, 
-       0xe5, 0x9f, 0xc0, 0x08, 0xe5, 0x9f, 0xf0, 0x08, 
-       0x66, 0x00, 0x00, 0x60, 0x66, 0x00, 0x00, 0x5c, 
-       0x66, 0x00, 0x00, 0x58, 0x00, 0x00, 0x0e, 0x50, 
-       0x00, 0x00, 0x00, 0x01, 0xf0, 0x24, 0x00, 0x09, 
-       0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 
-       0x00, 0x00, 0x02, 0x6c, 0xa0, 0x00, 0x0b, 0x38, 
-       0x00, 0x00, 0x01, 0xc0, 0x00, 0x00, 0x0f, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
-       0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x03, 
-       0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x05, 
-       0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x07, 
-       0x00, 0x00, 0x00, 0x0b, 0x00, 0x00, 0x00, 0x13, 
-       0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x18, 
-       0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x1a, 
-       0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x19, 
-       0x00, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x18, 
-       0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x1f, 
-       0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 
-       0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 
-       0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x02, 
-       0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 
-       0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x18, 
-       0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3f, 0xfe, 0xb1, 0x72, 0x17, 0xf7, 
-       0xd1, 0xcf, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xcd, 
-       0xf3, 0x57, 0x93, 0xc0, 0x00, 0x00, 0x00, 0x00, 
-       0x80, 0x00, 0x3f, 0xfe, 0xca, 0x20, 0xad, 0x9a, 
-       0xb5, 0xe9, 0x46, 0xe9, 0x00, 0x00, 0x40, 0x03, 
-       0x83, 0x12, 0x51, 0x00, 0xb5, 0x7f, 0x65, 0x09, 
-       0x80, 0x00, 0x40, 0x05, 0x80, 0x3f, 0xf8, 0x95, 
-       0x9d, 0xac, 0xd2, 0x28, 0x80, 0x00, 0x40, 0x04, 
-       0x8e, 0xac, 0x02, 0x5b, 0x3e, 0x70, 0x76, 0xbb, 
-       0x00, 0x00, 0x40, 0x07, 0x9c, 0x04, 0x1f, 0xd0, 
-       0xa9, 0x33, 0xef, 0x60, 0x80, 0x00, 0x40, 0x08, 
-       0xc0, 0x5f, 0xf4, 0xe0, 0x6c, 0x83, 0xbb, 0x96, 
-       0x00, 0x00, 0x3f, 0xff, 0x80, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfe, 
-       0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xff, 
-       0xc9, 0x0f, 0xda, 0xa2, 0x21, 0x68, 0xc2, 0x35, 
-       0x00, 0x00, 0x3f, 0xfe, 0xb1, 0x73, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0xfc, 
-       0xff, 0xfe, 0x2f, 0xf1, 0x48, 0x3b, 0x9d, 0x27, 
-       0x00, 0x00, 0x3f, 0xee, 0xe8, 0x08, 0x97, 0x58, 
-       0x10, 0x16, 0xb3, 0x7d, 0x40, 0x40, 0x40, 0x40, 
-       0x40, 0x40, 0x40, 0x40, 0x40, 0x41, 0x41, 0x41, 
-       0x41, 0x41, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 
-       0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 
-       0x40, 0x40, 0x40, 0x40, 0x05, 0x02, 0x02, 0x02, 
-       0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 
-       0x02, 0x02, 0x02, 0x02, 0x20, 0x20, 0x20, 0x20, 
-       0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x02, 0x02, 
-       0x02, 0x02, 0x02, 0x02, 0x02, 0x90, 0x90, 0x90, 
-       0x90, 0x90, 0x90, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 
-       0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x02, 
-       0x02, 0x02, 0x02, 0x02, 0x02, 0x88, 0x88, 0x88, 
-       0x88, 0x88, 0x88, 0x08, 0x08, 0x08, 0x08, 0x08, 
-       0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 
-       0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x02, 
-       0x02, 0x02, 0x02, 0x40, 0xe5, 0x9f, 0xc0, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1c, 0x2e, 0x01, 0x79, 0x19, 
-       0xe5, 0x9f, 0xc0, 0x00, 0xe1, 0x2f, 0xff, 0x1c, 
-       0x2e, 0x00, 0x5c, 0x7b, 0xe5, 0x9f, 0xc0, 0x00, 
-       0xe1, 0x2f, 0xff, 0x1c, 0x2e, 0x00, 0x5d, 0x05, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x2e, 0x01, 0xc9, 0x08, 0x2e, 0x01, 0xca, 0x20, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x2e, 0x01, 0xc9, 0x08, 
-       0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x07, 0x03, 0x01, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x00, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00, 0x01, 
-       0x01, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 
-       0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 
-       0xff, 0xff, 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 
-       0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x02, 0xcf, 0x00, 0x00, 0x02, 0x40, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x2c, 0x00, 0x01, 0x00, 0x43, 0x6f, 0x70, 0x79, 
-       0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x46, 0x75, 
-       0x6a, 0x69, 0x74, 0x73, 0x75, 0x20, 0x53, 0x69, 
-       0x65, 0x6d, 0x65, 0x6e, 0x73, 0x20, 0x26, 0x20, 
-       0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x67, 0x65, 
-       0x6e, 0x63, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65, 
-       0x67, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6d, 
-       0x65, 0x64, 0x69, 0x61, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x57, 0x5e, 0x61, 0xa3, 
-       0x29, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x6a, 0x00, 0x00, 0x0c, 
-       0x6c, 0x00, 0x00, 0x24, 0x64, 0x00, 0x00, 0x28, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x4e, 0x20, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x07, 0xd0, 0x00, 0x00, 0x07, 0xd0, 
-       0x00, 0x00, 0x13, 0x88, 0x02, 0x02, 0x01, 0x00, 
-       0x00, 0x00, 0x4e, 0x20, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x07, 0xd0, 0x00, 0x00, 0x07, 0xd0, 
-       0x00, 0x00, 0x13, 0x88, 0x02, 0x02, 0x01, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x05, 0xc4, 
-       0x2e, 0x08, 0x05, 0xc4, 0x2e, 0x08, 0x05, 0xcc, 
-       0x2e, 0x08, 0x05, 0xcc, 0x2e, 0x08, 0x05, 0xd4, 
-       0x2e, 0x08, 0x05, 0xd4, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 
-       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 
-       0x99, 0x81, 0x81, 0x7e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 
-       0xe7, 0xff, 0xff, 0x7e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 
-       0xfe, 0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 
-       0x7c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0xe7, 0xe7, 
-       0xe7, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 
-       0x7e, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 
-       0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 
-       0xc3, 0xe7, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 
-       0x42, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 
-       0xbd, 0x99, 0xc3, 0xff, 0xff, 0xff, 0xff, 0xff, 
-       0x00, 0x00, 0x1e, 0x0e, 0x1a, 0x32, 0x78, 0xcc, 
-       0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 
-       0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x30, 
-       0x30, 0x70, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x63, 
-       0x63, 0x67, 0xe7, 0xe6, 0xc0, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x18, 0x18, 0xdb, 0x3c, 0xe7, 
-       0x3c, 0xdb, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xf8, 
-       0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x02, 0x06, 0x0e, 0x1e, 0x3e, 0xfe, 0x3e, 
-       0x1e, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 
-       0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 
-       0x66, 0x00, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7f, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 
-       0x1b, 0x1b, 0x1b, 0x1b, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 
-       0x6c, 0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xfe, 0xfe, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 
-       0x7e, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x7e, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xfe, 
-       0x0c, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 
-       0x60, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 
-       0xc0, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x6c, 0xfe, 
-       0x6c, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 
-       0x7c, 0xfe, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 
-       0x38, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 
-       0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 
-       0x6c, 0xfe, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 
-       0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 
-       0x06, 0x86, 0xc6, 0x7c, 0x18, 0x18, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 
-       0x30, 0x60, 0xc6, 0x86, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 
-       0x30, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 
-       0x0c, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 
-       0x3c, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 
-       0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 
-       0x30, 0x60, 0xc0, 0x80, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 
-       0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 
-       0x60, 0xc0, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 
-       0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 
-       0x0c, 0x0c, 0x0c, 0x1e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 
-       0x06, 0x06, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xfe, 0xc6, 0x06, 0x06, 0x0c, 0x18, 
-       0x30, 0x30, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 
-       0x06, 0x06, 0x0c, 0x78, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 
-       0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 
-       0x00, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 
-       0x30, 0x18, 0x0c, 0x06, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 
-       0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 
-       0x0c, 0x18, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 
-       0x18, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xde, 0xde, 
-       0xde, 0xdc, 0xc0, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 
-       0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 
-       0x66, 0x66, 0x66, 0xfc, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 
-       0xc0, 0xc2, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 
-       0x66, 0x66, 0x6c, 0xf8, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 
-       0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 
-       0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 
-       0xc6, 0xc6, 0x66, 0x3a, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 
-       0xcc, 0xcc, 0xcc, 0x78, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 
-       0x6c, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 
-       0x60, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc6, 0xee, 0xfe, 0xfe, 0xd6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 
-       0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x60, 
-       0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
-       0xc6, 0xd6, 0xde, 0x7c, 0x0c, 0x0e, 0x00, 0x00, 
-       0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x6c, 
-       0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x60, 0x38, 0x0c, 
-       0x06, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7e, 0x7e, 0x5a, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
-       0xc6, 0x6c, 0x38, 0x10, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xd6, 0xd6, 
-       0xd6, 0xfe, 0xee, 0x6c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 
-       0x7c, 0x6c, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 
-       0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 
-       0x60, 0xc2, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 
-       0x30, 0x30, 0x30, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 
-       0x1c, 0x0e, 0x06, 0x02, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 
-       0x0c, 0x0c, 0x0c, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 
-       0x00, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 
-       0x66, 0x66, 0x66, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 
-       0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 
-       0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x1c, 0x36, 0x32, 0x30, 0x78, 0x30, 
-       0x30, 0x30, 0x30, 0x78, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 
-       0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0xcc, 0x78, 0x00, 
-       0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 
-       0x66, 0x66, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 
-       0x06, 0x06, 0x06, 0x06, 0x66, 0x66, 0x3c, 0x00, 
-       0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 
-       0x78, 0x6c, 0x66, 0xe6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 
-       0xd6, 0xd6, 0xd6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 
-       0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 
-       0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xf0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 
-       0xcc, 0xcc, 0xcc, 0x7c, 0x0c, 0x0c, 0x1e, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 
-       0x60, 0x60, 0x60, 0xf0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 
-       0x38, 0x0c, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 
-       0x30, 0x30, 0x36, 0x1c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 
-       0xd6, 0xd6, 0xfe, 0x6c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 
-       0x38, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0xf8, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 
-       0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 
-       0x18, 0x18, 0x18, 0x0e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 
-       0x18, 0x18, 0x18, 0x70, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 
-       0xc6, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 
-       0xc0, 0xc2, 0x66, 0x3c, 0x18, 0x70, 0x00, 0x00, 
-       0x00, 0x00, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x0c, 0x18, 0x30, 0x00, 0x7c, 0xc6, 0xfe, 
-       0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x10, 0x38, 0x6c, 0x00, 0x78, 0x0c, 0x7c, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xcc, 0x00, 0x00, 0x78, 0x0c, 0x7c, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x60, 0x30, 0x18, 0x00, 0x78, 0x0c, 0x7c, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x6c, 0x38, 0x00, 0x78, 0x0c, 0x7c, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 
-       0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x70, 0x00, 0x00, 
-       0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xfe, 
-       0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc6, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 
-       0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xfe, 
-       0xc0, 0xc0, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x66, 0x00, 0x00, 0x38, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x18, 0x3c, 0x66, 0x00, 0x38, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0xc6, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 
-       0xfe, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x38, 0x6c, 0x38, 0x10, 0x38, 0x6c, 0xc6, 0xfe, 
-       0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x0c, 0x18, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 
-       0x68, 0x62, 0x66, 0xfe, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x36, 0x36, 
-       0x7e, 0xd8, 0xd8, 0x6e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3e, 0x6c, 0xcc, 0xcc, 0xfe, 0xcc, 
-       0xcc, 0xcc, 0xcc, 0xce, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc6, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x30, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x60, 0x30, 0x18, 0x00, 0xcc, 0xcc, 0xcc, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xc6, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x0c, 0x78, 0x00, 
-       0x00, 0xc6, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x18, 0x18, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 
-       0xc6, 0x7c, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 
-       0x60, 0x60, 0xe6, 0xfc, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 
-       0x7e, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0xf8, 0xcc, 0xcc, 0xf8, 0xc4, 0xcc, 0xde, 
-       0xcc, 0xcc, 0xcc, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x0e, 0x1b, 0x18, 0x18, 0x18, 0x7e, 0x18, 
-       0x18, 0x18, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x18, 0x30, 0x60, 0x00, 0x78, 0x0c, 0x7c, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x0c, 0x18, 0x30, 0x00, 0x38, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x18, 0x30, 0x60, 0x00, 0x7c, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x18, 0x30, 0x60, 0x00, 0xcc, 0xcc, 0xcc, 
-       0xcc, 0xcc, 0xcc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x76, 0xdc, 0x00, 0xdc, 0x66, 0x66, 
-       0x66, 0x66, 0x66, 0x66, 0x00, 0x00, 0x00, 0x00, 
-       0x76, 0xdc, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 
-       0xce, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x7c, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 
-       0xc0, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xc0, 
-       0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 
-       0x06, 0x06, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x60, 0xe0, 0x62, 0x66, 0x6c, 0x18, 0x30, 
-       0x60, 0xdc, 0x86, 0x0c, 0x18, 0x3e, 0x00, 0x00, 
-       0x00, 0x60, 0xe0, 0x62, 0x66, 0x6c, 0x18, 0x30, 
-       0x66, 0xce, 0x9a, 0x3f, 0x06, 0x06, 0x00, 0x00, 
-       0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 
-       0x3c, 0x3c, 0x3c, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 
-       0x6c, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 
-       0x6c, 0xd8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 
-       0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 0x11, 0x44, 
-       0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 
-       0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 0x55, 0xaa, 
-       0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 
-       0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 0xdd, 0x77, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x18, 0xf8, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xf6, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0xf6, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0xf6, 0x06, 0xfe, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xfe, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 0x18, 0xf8, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x3f, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 0x30, 0x37, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xf7, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x37, 0x30, 0x37, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0xf7, 0x00, 0xf7, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x00, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x00, 0xff, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x3f, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x1f, 0x18, 0x1f, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x18, 0x1f, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3f, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0xff, 
-       0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 0x36, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0xff, 0x18, 0xff, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xf8, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 
-       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 
-       0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 
-       0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 
-       0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 
-       0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 
-       0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0xd8, 
-       0xd8, 0xd8, 0xdc, 0x76, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x78, 0xcc, 0xcc, 0xcc, 0xd8, 0xcc, 
-       0xc6, 0xc6, 0xc6, 0xcc, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xfe, 0xc6, 0xc6, 0xc0, 0xc0, 0xc0, 
-       0xc0, 0xc0, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x6c, 0x6c, 
-       0x6c, 0x6c, 0x6c, 0x6c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0xfe, 0xc6, 0x60, 0x30, 0x18, 0x18, 
-       0x30, 0x60, 0xc6, 0xfe, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xd8, 0xd8, 
-       0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 
-       0x66, 0x66, 0x66, 0x7c, 0x60, 0x60, 0xc0, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x7e, 0x18, 0x3c, 0x66, 0x66, 0x66, 
-       0x66, 0x3c, 0x18, 0x7e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 
-       0xc6, 0xc6, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0x6c, 
-       0x6c, 0x6c, 0x6c, 0xee, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x1e, 0x30, 0x18, 0x0c, 0x3e, 0x66, 
-       0x66, 0x66, 0x66, 0x3c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0xdb, 0xdb, 
-       0xdb, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x03, 0x06, 0x7e, 0xdb, 0xdb, 
-       0xf3, 0x7e, 0x60, 0xc0, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x1c, 0x30, 0x60, 0x60, 0x7c, 0x60, 
-       0x60, 0x60, 0x30, 0x1c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 
-       0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0xfe, 
-       0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 
-       0x18, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x30, 0x18, 0x0c, 0x06, 0x0c, 
-       0x18, 0x30, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0x30, 
-       0x18, 0x0c, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x0e, 0x1b, 0x1b, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 
-       0x18, 0xd8, 0xd8, 0xd8, 0x70, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7e, 
-       0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xdc, 0x00, 
-       0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 
-       0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x0f, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xec, 
-       0x6c, 0x6c, 0x3c, 0x1c, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x6c, 0x36, 0x36, 0x36, 0x36, 0x36, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x3c, 0x66, 0x0c, 0x18, 0x32, 0x7e, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x7e, 0x7e, 0x7e, 0x7e, 
-       0x7e, 0x7e, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x01, 0x2e, 0x00, 0x67, 0x20, 
-       0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x10, 
-       0x2e, 0x08, 0x07, 0x98, 0x00, 0x00, 0x00, 0x00, 
-       0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 
-       0x38, 0x39, 0x41, 0x42, 0x43, 0x44, 0x45, 0x46, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x52, 
-       0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x39, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x20, 
-       0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x21, 
-       0x00, 0x00, 0x00, 0x39, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x41, 
-       0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x38, 
-       0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x39, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0xb1, 0x0e, 0xa6, 0x06, 0x53, 
-       0x2e, 0x08, 0x17, 0xdc, 0x00, 0x00, 0x00, 0x02, 
-       0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x13, 
-       0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x19, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
-       0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x07, 
-       0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0f, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0a, 
-       0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x04, 
-       0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
-       0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x10, 
-       0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x13, 
-       0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x04, 
-       0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 
-       0x00, 0x00, 0x00, 0x17, 0x00, 0x00, 0x00, 0x19, 
-       0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0e, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x04, 0xf5, 0x11, 0x38, 0x06, 0x53, 
-       0x2e, 0x08, 0x19, 0x0c, 0x2e, 0x08, 0x19, 0x00, 
-       0x2e, 0x08, 0x1a, 0x30, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x64, 0x00, 0x00, 
-       0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 
-       0x00, 0x80, 0x10, 0x80, 0x00, 0x80, 0xda, 0x80, 
-       0x00, 0x5a, 0x51, 0xf0, 0x00, 0x36, 0x91, 0x22, 
-       0x00, 0xf0, 0x29, 0x6e, 0x00, 0x10, 0xd2, 0x92, 
-       0x00, 0xca, 0x6a, 0xde, 0x00, 0xa6, 0xaa, 0x10, 
-       0x00, 0x80, 0x3b, 0x80, 0x00, 0x80, 0xbc, 0x80, 
-       0x00, 0x80, 0x7e, 0x80, 0x00, 0xcf, 0x22, 0x73, 
-       0x00, 0x93, 0x48, 0x5d, 0x00, 0xa2, 0x73, 0x93, 
-       0x00, 0x25, 0xae, 0xad, 0x00, 0xa7, 0x9f, 0x60, 
-       0x00, 0x10, 0x10, 0x10, 0x00, 0x59, 0x10, 0x10, 
-       0x00, 0xa2, 0x10, 0x10, 0x00, 0xeb, 0x10, 0x10, 
-       0x00, 0x10, 0x10, 0x59, 0x00, 0x59, 0x10, 0x59, 
-       0x00, 0xa2, 0x10, 0x59, 0x00, 0xeb, 0x10, 0x59, 
-       0x00, 0x10, 0x10, 0xa2, 0x00, 0x59, 0x10, 0xa2, 
-       0x00, 0xa2, 0x10, 0xa2, 0x00, 0xeb, 0x10, 0xa2, 
-       0x00, 0x10, 0x10, 0xeb, 0x00, 0x59, 0x10, 0xeb, 
-       0x00, 0xa2, 0x10, 0xeb, 0x00, 0xeb, 0x10, 0xeb, 
-       0x00, 0x10, 0x2f, 0x10, 0x00, 0x59, 0x2f, 0x10, 
-       0x00, 0xa2, 0x2f, 0x10, 0x00, 0xeb, 0x2f, 0x10, 
-       0x00, 0x10, 0x2f, 0x59, 0x00, 0x59, 0x2f, 0x59, 
-       0x00, 0xa2, 0x2f, 0x59, 0x00, 0xeb, 0x2f, 0x59, 
-       0x00, 0x10, 0x2f, 0xa2, 0x00, 0x59, 0x2f, 0xa2, 
-       0x00, 0xa2, 0x2f, 0xa2, 0x00, 0xeb, 0x2f, 0xa2, 
-       0x00, 0x10, 0x2f, 0xeb, 0x00, 0x59, 0x2f, 0xeb, 
-       0x00, 0xa2, 0x2f, 0xeb, 0x00, 0xeb, 0x2f, 0xeb, 
-       0x00, 0x10, 0x4e, 0x10, 0x00, 0x59, 0x4e, 0x10, 
-       0x00, 0xa2, 0x4e, 0x10, 0x00, 0xeb, 0x4e, 0x10, 
-       0x00, 0x10, 0x4e, 0x59, 0x00, 0x59, 0x4e, 0x59, 
-       0x00, 0xa2, 0x4e, 0x59, 0x00, 0xeb, 0x4e, 0x59, 
-       0x00, 0x10, 0x4e, 0xa2, 0x00, 0x59, 0x4e, 0xa2, 
-       0x00, 0xa2, 0x4e, 0xa2, 0x00, 0xeb, 0x4e, 0xa2, 
-       0x00, 0x10, 0x4e, 0xeb, 0x00, 0x59, 0x4e, 0xeb, 
-       0x00, 0xa2, 0x4e, 0xeb, 0x00, 0xeb, 0x4e, 0xeb, 
-       0x00, 0x10, 0x6d, 0x10, 0x00, 0x59, 0x6d, 0x10, 
-       0x00, 0xa2, 0x6d, 0x10, 0x00, 0xeb, 0x6d, 0x10, 
-       0x00, 0x10, 0x6d, 0x59, 0x00, 0x59, 0x6d, 0x59, 
-       0x00, 0xa2, 0x6d, 0x59, 0x00, 0xeb, 0x6d, 0x59, 
-       0x00, 0x10, 0x6d, 0xa2, 0x00, 0x59, 0x6d, 0xa2, 
-       0x00, 0xa2, 0x6d, 0xa2, 0x00, 0xeb, 0x6d, 0xa2, 
-       0x00, 0x10, 0x6d, 0xeb, 0x00, 0x59, 0x6d, 0xeb, 
-       0x00, 0xa2, 0x6d, 0xeb, 0x00, 0xeb, 0x6d, 0xeb, 
-       0x00, 0x10, 0x8c, 0x10, 0x00, 0x59, 0x8c, 0x10, 
-       0x00, 0xa2, 0x8c, 0x10, 0x00, 0xeb, 0x8c, 0x10, 
-       0x00, 0x10, 0x8c, 0x59, 0x00, 0x59, 0x8c, 0x59, 
-       0x00, 0xa2, 0x8c, 0x59, 0x00, 0xeb, 0x8c, 0x59, 
-       0x00, 0x10, 0x8c, 0xa2, 0x00, 0x59, 0x8c, 0xa2, 
-       0x00, 0xa2, 0x8c, 0xa2, 0x00, 0xeb, 0x8c, 0xa2, 
-       0x00, 0x10, 0x8c, 0xeb, 0x00, 0x59, 0x8c, 0xeb, 
-       0x00, 0xa2, 0x8c, 0xeb, 0x00, 0xeb, 0x8c, 0xeb, 
-       0x00, 0x10, 0xab, 0x10, 0x00, 0x59, 0xab, 0x10, 
-       0x00, 0xa2, 0xab, 0x10, 0x00, 0xeb, 0xab, 0x10, 
-       0x00, 0x10, 0xab, 0x59, 0x00, 0x59, 0xab, 0x59, 
-       0x00, 0xa2, 0xab, 0x59, 0x00, 0xeb, 0xab, 0x59, 
-       0x00, 0x10, 0xab, 0xa2, 0x00, 0x59, 0xab, 0xa2, 
-       0x00, 0xa2, 0xab, 0xa2, 0x00, 0xeb, 0xab, 0xa2, 
-       0x00, 0x10, 0xab, 0xeb, 0x00, 0x59, 0xab, 0xeb, 
-       0x00, 0xa2, 0xab, 0xeb, 0x00, 0xeb, 0xab, 0xeb, 
-       0x00, 0x10, 0xca, 0x10, 0x00, 0x59, 0xca, 0x10, 
-       0x00, 0xa2, 0xca, 0x10, 0x00, 0xeb, 0xca, 0x10, 
-       0x00, 0x10, 0xca, 0x59, 0x00, 0x59, 0xca, 0x59, 
-       0x00, 0xa2, 0xca, 0x59, 0x00, 0xeb, 0xca, 0x59, 
-       0x00, 0x10, 0xca, 0xa2, 0x00, 0x59, 0xca, 0xa2, 
-       0x00, 0xa2, 0xca, 0xa2, 0x00, 0xeb, 0xca, 0xa2, 
-       0x00, 0x10, 0xca, 0xeb, 0x00, 0x59, 0xca, 0xeb, 
-       0x00, 0xa2, 0xca, 0xeb, 0x00, 0xeb, 0xca, 0xeb, 
-       0x00, 0x10, 0xe9, 0x10, 0x00, 0x59, 0xe9, 0x10, 
-       0x00, 0xa2, 0xe9, 0x10, 0x00, 0xeb, 0xe9, 0x10, 
-       0x00, 0x10, 0xe9, 0x59, 0x00, 0x59, 0xe9, 0x59, 
-       0x00, 0xa2, 0xe9, 0x59, 0x00, 0xeb, 0xe9, 0x59, 
-       0x00, 0x10, 0xe9, 0xa2, 0x00, 0x59, 0xe9, 0xa2, 
-       0x00, 0xa2, 0xe9, 0xa2, 0x00, 0xeb, 0xe9, 0xa2, 
-       0x00, 0x10, 0xe9, 0xeb, 0x00, 0x59, 0xe9, 0xeb, 
-       0x00, 0xa2, 0xe9, 0xeb, 0x00, 0xeb, 0xe9, 0xeb, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0xff, 0xff, 0x24, 0xc0, 0xc1, 0x11, 0x11, 0x10, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0f, 0x6d, 0xbb, 0xeb, 
-       0x8e, 0x01, 0xea, 0x25, 0x04, 0xd0, 0x82, 0x49, 
-       0xed, 0x4c, 0x8f, 0xc2, 0x66, 0x0b, 0x65, 0xc5, 
-       0x0c, 0xc2, 0x41, 0x19, 0x07, 0xa8, 0x94, 0x13, 
-       0x42, 0x09, 0x27, 0xb5, 0x32, 0x3f, 0x09, 0x98, 
-       0x2d, 0x97, 0x14, 0x33, 0x09, 0x04, 0x64, 0x00, 
-       0xff, 0xff, 0x24, 0xc0, 0xe0, 0x11, 0x21, 0x00, 
-       0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x13, 0x8e, 0xf7, 0xe7, 
-       0x6e, 0x9c, 0x0c, 0xc3, 0xd2, 0xb4, 0x05, 0x16, 
-       0x3c, 0x8e, 0x82, 0xd4, 0x16, 0x5e, 0x9c, 0x0c, 
-       0xc3, 0xd2, 0xb4, 0x05, 0x16, 0x3c, 0x8e, 0x82, 
-       0xd4, 0x16, 0x5e, 0x9c, 0x0c, 0xc3, 0xd2, 0xb4, 
-       0x05, 0x16, 0x3c, 0x8e, 0x82, 0xd4, 0x16, 0x50, 
-       0xff, 0xff, 0x24, 0xc0, 0xd4, 0x11, 0x20, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x0d, 0x4d, 0xf8, 0xd5, 
-       0x9e, 0x7f, 0x02, 0x22, 0x08, 0xa3, 0xbd, 0x94, 
-       0x53, 0x16, 0x79, 0xfc, 0x08, 0x88, 0x22, 0x8e, 
-       0xf6, 0x51, 0x4c, 0x59, 0xe7, 0xf0, 0x22, 0x20, 
-       0x8a, 0x3b, 0xd9, 0x45, 0x31, 0x67, 0x9f, 0xc0, 
-       0x88, 0x82, 0x28, 0xef, 0x65, 0x14, 0xc4, 0x00, 
-       0xff, 0xff, 0x24, 0xc0, 0xe8, 0x00, 0x10, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x14, 0x6d, 0xfb, 0x1d, 
-       0x77, 0xc1, 0x38, 0x81, 0xfb, 0xb1, 0xd7, 0x7c, 
-       0x13, 0x88, 0x1f, 0xbb, 0x1d, 0x77, 0xc1, 0x38, 
-       0x81, 0xfb, 0xb1, 0xd7, 0x7c, 0x13, 0x88, 0x1f, 
-       0xbb, 0x1d, 0x77, 0xc1, 0x38, 0x81, 0xfb, 0xb1, 
-       0xd7, 0x7c, 0x13, 0x88, 0x1f, 0x80, 0x00, 0x00, 
-       0xff, 0xff, 0x24, 0xc0, 0x9b, 0x00, 0x20, 0x00, 
-       0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x50, 0x3d, 0x75, 0xf7, 
-       0x14, 0x0a, 0xc3, 0x29, 0x9f, 0x51, 0xbc, 0xfb, 
-       0xdc, 0x7b, 0x8a, 0x05, 0x61, 0x94, 0xcf, 0xa8, 
-       0xde, 0x7d, 0xee, 0x3d, 0xc5, 0x02, 0xb0, 0xca, 
-       0x67, 0xd4, 0x6f, 0x3e, 0xf7, 0x1e, 0xe2, 0x81, 
-       0x58, 0x65, 0x33, 0xea, 0x37, 0x9f, 0x7b, 0x80, 
-       0xff, 0xff, 0x24, 0xc0, 0x12, 0xe0, 0x00, 0x00, 
-       0x00, 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xeb, 0x50, 0xfb, 0xe7, 
-       0x78, 0x1f, 0xde, 0xa1, 0x62, 0x99, 0x11, 0x36, 
-       0x02, 0x00, 0x97, 0xd6, 0x69, 0x98, 0x1f, 0xde, 
-       0xa1, 0x62, 0x99, 0x11, 0x36, 0x02, 0x00, 0x97, 
-       0xd6, 0x69, 0x98, 0x1f, 0xde, 0xa1, 0x62, 0x99, 
-       0x11, 0x36, 0x02, 0x00, 0x97, 0xd6, 0x69, 0x90, 
-       0xff, 0xff, 0x24, 0xc0, 0x11, 0xba, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xdf, 0x95, 0x03, 0xa1, 
-       0x49, 0xc5, 0x45, 0xe7, 0x96, 0xe6, 0x1d, 0xdc, 
-       0x0d, 0x50, 0xa4, 0xe2, 0xa2, 0xf3, 0xcb, 0x73, 
-       0x0e, 0xee, 0x06, 0xa8, 0x52, 0x71, 0x51, 0x79, 
-       0xe5, 0xb9, 0x87, 0x77, 0x03, 0x54, 0x29, 0x38, 
-       0xa8, 0xbc, 0xf2, 0xdc, 0xc3, 0xbb, 0x81, 0xa0, 
-       0xff, 0xff, 0x24, 0xc0, 0x11, 0x21, 0xc3, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0xe7, 0xae, 0x35, 0x0d, 
-       0x42, 0x14, 0xc2, 0xf9, 0x4a, 0x13, 0x55, 0xa6, 
-       0x6e, 0xf4, 0x88, 0x53, 0x0b, 0xe5, 0x28, 0x4d, 
-       0x56, 0x99, 0xbb, 0xd2, 0x21, 0x4c, 0x2f, 0x94, 
-       0xa1, 0x35, 0x5a, 0x66, 0xef, 0x48, 0x85, 0x30, 
-       0xbe, 0x52, 0x84, 0xd5, 0x69, 0x9b, 0xbd, 0x20, 
-       0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x2e, 0x08, 0x1f, 0x48, 
-       0x2e, 0x08, 0x1f, 0x4c, 0x2e, 0x08, 0x1f, 0x50, 
-       0x2e, 0x08, 0x1f, 0x58, 0x2e, 0x08, 0x1f, 0x5c, 
-       0x2e, 0x08, 0x1f, 0x60, 0x6e, 0x00, 0x01, 0x00, 
-       0x6e, 0x00, 0x01, 0x00, 0x6e, 0x00, 0x01, 0x08, 
-       0x6e, 0x00, 0x01, 0x0c, 0x6e, 0x00, 0x01, 0x04, 
-       0x6e, 0x00, 0x01, 0x10, 0x6e, 0x00, 0x01, 0x14, 
-       0x2e, 0x08, 0x60, 0x58, 0x00, 0x00, 0x00, 0x0d, 
-       0x00, 0x00, 0x00, 0x00, 0xb0, 0x25, 0x00, 0x18, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x0d, 0x00, 
-       0x2e, 0x08, 0x1f, 0xac, 0x2e, 0x08, 0x1f, 0xb0, 
-       0x2e, 0x08, 0x1f, 0xb4, 0x2e, 0x08, 0x1f, 0xb8, 
-       0x70, 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x04, 
-       0x70, 0x00, 0x00, 0x08, 0x70, 0x00, 0x00, 0x0c, 
-       0x70, 0x00, 0x00, 0x10, 0x70, 0x00, 0x00, 0x30, 
-       0x2e, 0x01, 0xcc, 0x09, 0x2e, 0x01, 0xcb, 0x99, 
-       0x2e, 0x01, 0xcb, 0x11, 0x2e, 0x01, 0xcb, 0x09, 
-       0x2e, 0x01, 0xcc, 0x41, 0x2e, 0x01, 0xcb, 0xd1, 
-       0x2e, 0x01, 0xcc, 0x85, 0x2e, 0x01, 0xcc, 0x7d, 
-       0x00, 0x00, 0x00, 0x00, 0x9e, 0x00, 0x09, 0x80, 
-       0x80, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 
-       0xe0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 
-       0xf8, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 
-       0xfe, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 
-       0xff, 0x80, 0x00, 0x00, 0xff, 0xc0, 0x00, 0x00, 
-       0xff, 0xe0, 0x00, 0x00, 0xff, 0xf0, 0x00, 0x00, 
-       0xff, 0xf8, 0x00, 0x00, 0xff, 0xfc, 0x00, 0x00, 
-       0xff, 0xfe, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 
-       0xff, 0xff, 0x80, 0x00, 0xff, 0xff, 0xc0, 0x00, 
-       0xff, 0xff, 0xe0, 0x00, 0xff, 0xff, 0xf0, 0x00, 
-       0xff, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xfc, 0x00, 
-       0xff, 0xff, 0xfe, 0x00, 0xff, 0xff, 0xff, 0x00, 
-       0xff, 0xff, 0xff, 0x80, 0xff, 0xff, 0xff, 0xc0, 
-       0xff, 0xff, 0xff, 0xe0, 0xff, 0xff, 0xff, 0xf0, 
-       0xff, 0xff, 0xff, 0xf8, 0xff, 0xff, 0xff, 0xfc, 
-       0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 
-       0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x7f, 0xef, 0xff, 0xff, 
-       0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x40, 0x1f, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 
-       0x00, 0x00, 0x00, 0x00, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-       0x2e, 0x01, 0xca, 0xf0, 0x2e, 0x01, 0xca, 0xf0, 
-};
-
index 59a9759..45e3161 100644 (file)
@@ -41,75 +41,14 @@ struct budget_ci {
        struct tasklet_struct msp430_irq_tasklet;
 };
 
-
-
-#ifndef BORROWED_FROM_AV7110_H_BUT_REALLY_BELONGS_IN_SAA7146_DEFS_H
-
-#define DEBINOSWAP 0x000e0000
-#define GPIO_IRQHI 0x10
-#define GPIO_INPUT 0x00
-
-void gpio_set(struct saa7146_dev* saa, u8 pin, u8 data)
-{
-        u32 value = 0;
-
-        /* sanity check */
-        if(pin > 3)
-                return;
-
-        /* read old register contents */
-        value = saa7146_read(saa, GPIO_CTRL );
-
-        value &= ~(0xff << (8*pin));
-        value |= (data << (8*pin));
-
-        saa7146_write(saa, GPIO_CTRL, value);
-}
-
-
-
-static int wait_for_debi_done(struct saa7146_dev *saa)
-{
-       int start = jiffies;
-
-       /* wait for registers to be programmed */
-       while (1) {
-               if (saa7146_read(saa, MC2) & 2)
-                       break;
-               if (jiffies - start > HZ / 20) {
-                       printk ("DVB (%s): timed out while waiting"
-                               " for registers getting programmed\n",
-                               __FUNCTION__);
-                       return -ETIMEDOUT;
-               }
-       }
-
-       /* wait for transfer to complete */
-       start = jiffies;
-       while (1) {
-               if (!(saa7146_read(saa, PSR) & SPCI_DEBI_S))
-                       break;
-               saa7146_read(saa, MC2);
-               if (jiffies - start > HZ / 4) {
-                       printk ("DVB (%s): timed out while waiting"
-                               " for transfer completion\n",
-                               __FUNCTION__);
-                       return -ETIMEDOUT;
-               }
-       }
-
-       return 0;
-}
-
-
-static u32 debiread (struct saa7146_dev *saa, u32 config, int addr, int count)
+static u32 budget_debiread4 (struct saa7146_dev *saa, u32 config, int addr, int count)
 {
        u32 result = 0;
 
        if (count > 4 || count <= 0)
                return 0;
 
-       if (wait_for_debi_done(saa) < 0)
+       if (saa7146_wait_for_debi_done(saa) < 0)
                return 0;
 
        saa7146_write (saa, DEBI_COMMAND,
@@ -118,7 +57,7 @@ static u32 debiread (struct saa7146_dev *saa, u32 config, int addr, int count)
        saa7146_write(saa, DEBI_CONFIG, config);
        saa7146_write(saa, MC2, (2 << 16) | 2);
 
-       wait_for_debi_done(saa);
+       saa7146_wait_for_debi_done(saa);
 
        result = saa7146_read(saa, DEBI_AD);
        result &= (0xffffffffUL >> ((4 - count) * 8));
@@ -126,20 +65,6 @@ static u32 debiread (struct saa7146_dev *saa, u32 config, int addr, int count)
        return result;
 }
 
-
-
-/* DEBI during interrupt */
-static inline u32 irdebi(struct saa7146_dev *saa, u32 config, int addr, u32 val, int count)
-{
-       u32 res;
-       res = debiread(saa, config, addr, count);
-       return res;
-}
-#endif
-
-
-
-
 /* from reading the following remotes:
    Zenith Universal 7 / TV Mode 807 / VCR Mode 837
    Hauppauge (from NOVA-CI-s box product)
@@ -150,7 +75,7 @@ static  u16 key_map[64] = {
        KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8,
        KEY_9,
        KEY_ENTER,
-       0,
+       KEY_RED,
        KEY_POWER,              /* RADIO on Hauppauge */
        KEY_MUTE,
        0,
@@ -162,11 +87,11 @@ static  u16 key_map[64] = {
        0, 0, 0, 0, 0, 0, 0,
        KEY_UP, KEY_DOWN,
        KEY_OPTION,             /* RESERVED on Hauppauge */
-       0,
+       KEY_BREAK,
        /* 0x2X */
        KEY_CHANNELUP, KEY_CHANNELDOWN,
        KEY_PREVIOUS,           /* Prev. Ch on Zenith, SOURCE on Hauppauge */
-       0, 0, 0,
+       0, KEY_RESTART, KEY_OK,
        KEY_CYCLEWINDOWS,       /* MINIMIZE on Hauppauge */
        0,
        KEY_ENTER,              /* VCR mode on Zenith */
@@ -177,7 +102,7 @@ static  u16 key_map[64] = {
        KEY_MENU,               /* FULL SCREEN on Hauppauge */
        0,
        /* 0x3X */
-       0,
+       KEY_SLOW,
        KEY_PREVIOUS,           /* VCR mode on Zenith */
        KEY_REWIND,
        0,
@@ -189,7 +114,7 @@ static  u16 key_map[64] = {
        KEY_C,
        0,
        KEY_EXIT,
-       0,
+       KEY_POWER2,
        KEY_TUNER,              /* VCR mode on Zenith */
        0,
 };
@@ -217,7 +142,7 @@ static void msp430_ir_interrupt (unsigned long data)
        struct budget_ci *budget_ci = (struct budget_ci*) data;
        struct saa7146_dev *saa = budget_ci->budget.dev;
        struct input_dev *dev = &budget_ci->input_dev;
-       unsigned int code = irdebi(saa, DEBINOSWAP, 0x1234, 0, 2) >> 8;
+       unsigned int code = budget_debiread4(saa, DEBINOSWAP, 0x1234, 2) >> 8;
 
        if (code & 0x40) {
                code &= 0x3f;
@@ -271,7 +196,7 @@ static int msp430_ir_init (struct budget_ci *budget_ci)
 
        saa7146_write(saa, IER, saa7146_read(saa, IER) | MASK_06);
 
-       gpio_set(saa, 3, GPIO_IRQHI);
+       saa7146_setgpio(saa, 3, SAA7146_GPIO_IRQHI); 
 
        return 0;
 }
@@ -283,8 +208,8 @@ static void msp430_ir_deinit (struct budget_ci *budget_ci)
        struct input_dev *dev = &budget_ci->input_dev;
 
        saa7146_write(saa, IER, saa7146_read(saa, IER) & ~MASK_06);
-       gpio_set(saa, 3, GPIO_INPUT);
-       gpio_set(saa, 2, GPIO_INPUT);
+       saa7146_setgpio(saa, 3, SAA7146_GPIO_INPUT);
+       saa7146_setgpio(saa, 2, SAA7146_GPIO_INPUT);
 
        if (del_timer(&dev->timer))
                input_event(dev, EV_KEY, key_map[dev->repeat_key], !!0);
index 0135bee..0af6725 100644 (file)
@@ -64,8 +64,8 @@ static struct saa7146_pci_extension_data x_var = { \
        .ext_priv = &x_var ## _info, \
        .ext = &budget_extension };
 
-#define TS_WIDTH  (4*188)
-#define TS_HEIGHT (1024/4)
+#define TS_WIDTH  (376)
+#define TS_HEIGHT (512)
 #define TS_BUFLEN (TS_WIDTH*TS_HEIGHT)
 #define TS_MAX_PACKETS (TS_BUFLEN/TS_SIZE)
 
diff --git a/drivers/media/dvb/ttpci/fdump.c b/drivers/media/dvb/ttpci/fdump.c
new file mode 100644 (file)
index 0000000..0b478db
--- /dev/null
@@ -0,0 +1,44 @@
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+int main(int argc, char **argv)
+{
+    unsigned char buf[8];
+    unsigned int i, count, bytes = 0;
+    FILE *fd_in, *fd_out;
+
+    if (argc != 4) {
+       fprintf(stderr, "\n\tusage: %s <ucode.bin> <array_name> <output_name>\n\n", argv[0]);
+       return -1;
+    }
+
+    fd_in = fopen(argv[1], "rb");
+    if (fd_in == NULL) {
+       fprintf(stderr, "firmware file '%s' not found\n", argv[1]);
+       return -1;
+    }
+
+    fd_out = fopen(argv[3], "w+");
+    if (fd_out == NULL) {
+       fprintf(stderr, "cannot create output file '%s'\n", argv[3]);
+       return -1;
+    }
+
+    fprintf(fd_out, "\n#include <asm/types.h>\n\nu8 %s [] = {", argv[2]);
+
+    while ((count = fread(buf, 1, 8, fd_in)) > 0) {
+       fprintf(fd_out, "\n\t");
+       for (i = 0; i < count; i++, bytes++)
+           fprintf(fd_out, "0x%02x, ", buf[i]);
+    }
+
+    fprintf(fd_out, "\n};\n\n");
+    
+    fclose(fd_in);
+    fclose(fd_out);
+
+    return 0;
+}
index 74fcfe0..a17c828 100644 (file)
@@ -142,3 +142,9 @@ int ttpci_eeprom_parse_mac(struct dvb_i2c_bus *i2c)
 }
 
 EXPORT_SYMBOL(ttpci_eeprom_parse_mac);
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Ralph Metzler, Marcus Metzler, others");
+MODULE_DESCRIPTION("Decode dvb_net MAC address from EEPROM of PCI DVB cards "
+               "made by Siemens, Technotrend, Hauppauge");
+
index 94827cb..96d89e4 100644 (file)
@@ -2,7 +2,7 @@
  * TTUSB DVB driver
  *
  * Copyright (c) 2002 Holger Waechtler <holger@convergence.de>
- * Copyright (c) 2003 Felix Domke <tmbinc@gmx.net>
+ * Copyright (c) 2003 Felix Domke <tmbinc@elitedvb.net>
  *
  *     This program is free software; you can redistribute it and/or
  *     modify it under the terms of the GNU General Public License as
@@ -742,11 +742,7 @@ static void ttusb_process_frame(struct ttusb *ttusb, u8 * data, int len)
        }
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_iso_irq(struct urb *urb)
-#else
 static void ttusb_iso_irq(struct urb *urb, struct pt_regs *ptregs)
-#endif
 {
        struct ttusb *ttusb = urb->context;
 
@@ -787,9 +783,7 @@ static void ttusb_iso_irq(struct urb *urb, struct pt_regs *ptregs)
                        ttusb_process_frame(ttusb, data, len);
                }
        }
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
        usb_submit_urb(urb, GFP_ATOMIC);
-#endif
 }
 
 static void ttusb_free_iso_urbs(struct ttusb *ttusb)
@@ -879,13 +873,6 @@ static int ttusb_start_iso_xfer(struct ttusb *ttusb)
                }
        }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-       for (i = 0; i < ISO_BUF_COUNT; i++) {
-               int next = (i + 1) % ISO_BUF_COUNT;
-               ttusb->iso_urb[i]->next = ttusb->iso_urb[next];
-       }
-#endif
-
        for (i = 0; i < ISO_BUF_COUNT; i++) {
                if ((err = usb_submit_urb(ttusb->iso_urb[i], GFP_KERNEL))) {
                        ttusb_stop_iso_xfer(ttusb);
@@ -1076,22 +1063,6 @@ static struct file_operations stc_fops = {
 };
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void *ttusb_probe(struct usb_device *udev, unsigned int ifnum,
-                 const struct usb_device_id *id)
-{
-       struct ttusb *ttusb;
-       int result, channel;
-
-       if (ifnum != 0)
-               return NULL;
-
-       dprintk("%s: TTUSB DVB connected\n", __FUNCTION__);
-
-       if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL)))
-               return NULL;
-
-#else
 static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
 {
        struct usb_device *udev;
@@ -1105,8 +1076,6 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
        if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL)))
                return -ENOMEM;
 
-#endif
-
        memset(ttusb, 0, sizeof(struct ttusb));
 
        for (channel = 0; channel < TTUSB_MAXCHANNEL; ++channel) {
@@ -1180,35 +1149,22 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
                           S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
                           | S_IROTH | S_IWOTH, &stc_fops, ttusb);
 #endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-       return (void *) ttusb;
-#else
+
        usb_set_intfdata(intf, (void *) ttusb);
 
        return 0;
-#endif
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_disconnect(struct usb_device *udev, void *data)
-{
-       struct ttusb *ttusb = data;
-#else
 static void ttusb_disconnect(struct usb_interface *intf)
 {
        struct ttusb *ttusb = usb_get_intfdata(intf);
 
        usb_set_intfdata(intf, NULL);
-#endif
 
        ttusb->disconnecting = 1;
 
        ttusb_stop_iso_xfer(ttusb);
 
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69))
-#undef devfs_remove
-#define devfs_remove(x)        devfs_unregister(ttusb->stc_devfs_handle);
-#endif
 #if 0
        devfs_remove(TTUSB_BUDGET_NAME);
 #endif
index afcaf29..90f0c26 100644 (file)
@@ -1,24 +1,18 @@
 config DVB_TTUSB_DEC
-       tristate "Technotrend/Hauppauge USB DEC2000-T devices"
-       depends on DVB_CORE && USB && !STANDALONE
+       tristate "Technotrend/Hauppauge USB DEC devices"
+       depends on DVB_CORE && USB
+       select FW_LOADER
        help
          Support for external USB adapters designed by Technotrend and
-         produced by Hauppauge, shipped under the brand name 'DEC2000-T'.
+         produced by Hauppauge, shipped under the brand name 'DEC2000-t'
+         and 'DEC3000-s'.
 
           Even if these devices have a MPEG decoder built in, they transmit
          only compressed MPEG data over the USB bus, so you need
          an external software decoder to watch TV on your computer.      
 
-         Say Y if you own such a device and want to use it.
+         The DEC devices require firmware in order to boot into a mode in
+         which they are slaves to the PC.  See
+         linux/Documentation/dvb/ttusb-dec.txt for details.
 
-config DVB_TTUSB_DEC_FIRMWARE_FILE
-       string "Full pathname of dec2000t.bin firmware file"
-       depends on DVB_TTUSB_DEC
-       default "/etc/dvb/dec2000t.bin"
-       help
-         The DEC2000-T requires a firmware in order to boot into a mode in
-         which it is a slave to the PC.  The firmware file can obtained as
-         follows:
-           wget http://hauppauge.lightpath.net/de/dec215a.exe
-           unzip -j dec215a.exe Software/Oem/STB/App/Boot/STB_PC_T.bin
-           mv STB_PC_T.bin /etc/dvb/dec2000t.bin
+         Say Y if you own such a device and want to use it.
index daefade..bf4e387 100644 (file)
@@ -1,11 +1,3 @@
-
-obj-$(CONFIG_DVB_TTUSB_DEC) += ttusb_dec.o dec2000_frontend.o
+obj-$(CONFIG_DVB_TTUSB_DEC) += ttusb_dec.o
 
 EXTRA_CFLAGS = -Idrivers/media/dvb/dvb-core/
-
-host-progs     := fdump
-
-$(obj)/ttusb_dec.o: $(obj)/dsp_dec2000.h
-
-$(obj)/dsp_dec2000.h: $(patsubst "%", %, $(CONFIG_DVB_TTUSB_DEC_FIRMWARE_FILE)) $(obj)/fdump
-       $(obj)/fdump $< dsp_dec2000 > $@
diff --git a/drivers/media/dvb/ttusb-dec/dec2000_frontend.c b/drivers/media/dvb/ttusb-dec/dec2000_frontend.c
deleted file mode 100644 (file)
index b1bce42..0000000
+++ /dev/null
@@ -1,178 +0,0 @@
-/*
- * TTUSB DEC-2000-t Frontend
- *
- * Copyright (C) 2003 Alex Woods <linux-dvb@giblets.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <linux/init.h>
-#include <linux/module.h>
-
-#include "dvb_frontend.h"
-#include "dvb_functions.h"
-
-static int debug = 0;
-
-#define dprintk        if (debug) printk
-
-static struct dvb_frontend_info dec2000_frontend_info = {
-       .name                   = "TechnoTrend/Hauppauge DEC-2000-t Frontend",
-       .type                   = FE_OFDM,
-       .frequency_min          = 51000000,
-       .frequency_max          = 858000000,
-       .frequency_stepsize     = 62500,
-       .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
-               FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
-               FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
-               FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO |
-               FE_CAN_HIERARCHY_AUTO,
-};
-
-static int dec2000_frontend_ioctl(struct dvb_frontend *fe, unsigned int cmd,
-                                 void *arg)
-{
-       dprintk("%s\n", __FUNCTION__);
-
-       switch (cmd) {
-
-       case FE_GET_INFO:
-               dprintk("%s: FE_GET_INFO\n", __FUNCTION__);
-               memcpy(arg, &dec2000_frontend_info,
-                      sizeof (struct dvb_frontend_info));
-               break;
-
-       case FE_READ_STATUS: {
-                       fe_status_t *status = (fe_status_t *)arg;
-                       dprintk("%s: FE_READ_STATUS\n", __FUNCTION__);
-                       *status = FE_HAS_SIGNAL | FE_HAS_VITERBI |
-                                 FE_HAS_SYNC | FE_HAS_CARRIER | FE_HAS_LOCK;
-                       break;
-               }
-
-       case FE_READ_BER: {
-                       u32 *ber = (u32 *)arg;
-                       dprintk("%s: FE_READ_BER\n", __FUNCTION__);
-                       *ber = 0;
-                       return -ENOSYS;
-                       break;
-               }
-
-       case FE_READ_SIGNAL_STRENGTH: {
-                       dprintk("%s: FE_READ_SIGNAL_STRENGTH\n", __FUNCTION__);
-                       *(s32 *)arg = 0xFF;
-                       return -ENOSYS;
-                       break;
-               }
-
-       case FE_READ_SNR:
-               dprintk("%s: FE_READ_SNR\n", __FUNCTION__);
-               *(s32 *)arg = 0;
-               return -ENOSYS;
-               break;
-
-       case FE_READ_UNCORRECTED_BLOCKS:
-               dprintk("%s: FE_READ_UNCORRECTED_BLOCKS\n", __FUNCTION__);
-               *(u32 *)arg = 0;
-               return -ENOSYS;
-               break;
-
-       case FE_SET_FRONTEND:{
-                       struct dvb_frontend_parameters *p =
-                               (struct dvb_frontend_parameters *)arg;
-                       u8 b[] = { 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00,
-                                  0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00,
-                                  0x00, 0xff, 0x00, 0x00, 0x00, 0xff };
-                       u32 freq;
-                       struct i2c_msg msg = { addr: 0x71, flags: 0, len:20 };
-
-                       dprintk("%s: FE_SET_FRONTEND\n", __FUNCTION__);
-
-                       dprintk("            frequency->%d\n", p->frequency);
-                       dprintk("            symbol_rate->%d\n",
-                               p->u.qam.symbol_rate);
-                       dprintk("            inversion->%d\n", p->inversion);
-
-                       freq = htonl(p->frequency / 1000);
-                       memcpy(&b[4], &freq, sizeof (int));
-                       msg.buf = b;
-                       fe->i2c->xfer(fe->i2c, &msg, 1);
-
-                       break;
-               }
-
-       case FE_GET_FRONTEND:
-               dprintk("%s: FE_GET_FRONTEND\n", __FUNCTION__);
-               break;
-
-       case FE_SLEEP:
-               dprintk("%s: FE_SLEEP\n", __FUNCTION__);
-               return -ENOSYS;
-               break;
-
-       case FE_INIT:
-               dprintk("%s: FE_INIT\n", __FUNCTION__);
-               break;
-
-       case FE_RESET:
-               dprintk("%s: FE_RESET\n", __FUNCTION__);
-               break;
-
-       default:
-               dprintk("%s: unknown IOCTL (0x%X)\n", __FUNCTION__, cmd);
-               return -EINVAL;
-
-       }
-
-       return 0;
-}
-
-static int dec2000_frontend_attach(struct dvb_i2c_bus *i2c, void **data)
-{
-       dprintk("%s\n", __FUNCTION__);
-
-       return dvb_register_frontend(dec2000_frontend_ioctl, i2c, NULL,
-                             &dec2000_frontend_info);
-}
-
-static void dec2000_frontend_detach(struct dvb_i2c_bus *i2c, void *data)
-{
-       dprintk("%s\n", __FUNCTION__);
-
-       dvb_unregister_frontend(dec2000_frontend_ioctl, i2c);
-}
-
-static int __init dec2000_frontend_init(void)
-{
-       return dvb_register_i2c_device(THIS_MODULE, dec2000_frontend_attach,
-                                      dec2000_frontend_detach);
-}
-
-static void __exit dec2000_frontend_exit(void)
-{
-       dvb_unregister_i2c_device(dec2000_frontend_attach);
-}
-
-module_init(dec2000_frontend_init);
-module_exit(dec2000_frontend_exit);
-
-MODULE_DESCRIPTION("TechnoTrend/Hauppauge DEC-2000-t Frontend");
-MODULE_AUTHOR("Alex Woods <linux-dvb@giblets.org");
-MODULE_LICENSE("GPL");
-
-MODULE_PARM(debug, "i");
-MODULE_PARM_DESC(debug, "Debug level");
-
diff --git a/drivers/media/dvb/ttusb-dec/fdump.c b/drivers/media/dvb/ttusb-dec/fdump.c
deleted file mode 100644 (file)
index 834314a..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-
-int main (int argc, char **argv)
-{
-       unsigned char buf[8];
-       unsigned int i, count, bytes = 0;
-       int fd;
-
-       if (argc != 3) {
-               fprintf (stderr, "\n\tusage: %s <ucode.bin> <array_name>\n\n",
-                        argv[0]);
-               return -1;
-       }
-
-       fd = open (argv[1], O_RDONLY);
-
-       printf ("\n#include <asm/types.h>\n\nu8 %s [] __initdata = {",
-               argv[2]);
-
-       while ((count = read (fd, buf, 8)) > 0) {
-               printf ("\n\t");
-               for (i=0;i<count;i++, bytes++)
-                       printf ("0x%02x, ", buf[i]);
-       }
-
-       printf ("\n};\n\n");
-       close (fd);
-
-       return 0;
-}
-
index a45299a..8f69c3e 100644 (file)
  *
  */
 
-#include <linux/version.h>
+#include <asm/semaphore.h>
+#include <linux/list.h>
 #include <linux/module.h>
+#include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/slab.h>
+#include <linux/spinlock.h>
 #include <linux/usb.h>
+#include <linux/version.h>
+#include <linux/interrupt.h>
+#include <linux/firmware.h>
 
-#include "ttusb_dec.h"
+#include "dmxdev.h"
+#include "dvb_demux.h"
+#include "dvb_i2c.h"
+#include "dvb_filter.h"
 #include "dvb_frontend.h"
+#include "dvb_net.h"
 
 static int debug = 0;
 
 #define dprintk        if (debug) printk
 
+#define DRIVER_NAME            "TechnoTrend/Hauppauge DEC USB"
+
+#define COMMAND_PIPE           0x03
+#define RESULT_PIPE            0x84
+#define STREAM_PIPE            0x88
+
+#define COMMAND_PACKET_SIZE    0x3c
+#define ARM_PACKET_SIZE                0x1000
+
+#define ISO_BUF_COUNT          0x04
+#define FRAMES_PER_ISO_BUF     0x04
+#define ISO_FRAME_SIZE         0x0380
+
+#define        MAX_AV_PES_LENGTH       6144
+
+#define LOF_HI                 10600000
+#define LOF_LO                 9750000
+
+enum ttusb_dec_model {
+       TTUSB_DEC2000T,
+       TTUSB_DEC3000S
+};
+
+enum ttusb_dec_packet_type {
+       PACKET_AV_PES,
+       PACKET_SECTION
+};
+
+struct ttusb_dec {
+       enum ttusb_dec_model            model;
+       char                            *model_name;
+       char                            *firmware_name;
+
+       /* DVB bits */
+       struct dvb_adapter              *adapter;
+       struct dmxdev                   dmxdev;
+       struct dvb_demux                demux;
+       struct dmx_frontend             frontend;
+       struct dvb_i2c_bus              i2c_bus;
+       struct dvb_net                  dvb_net;
+       struct dvb_frontend_info        *frontend_info;
+       int (*frontend_ioctl) (struct dvb_frontend *, unsigned int, void *);
+
+       u16                     pid[DMX_PES_OTHER];
+       int                     hi_band;
+
+       /* USB bits */
+       struct usb_device       *udev;
+       u8                      trans_count;
+       unsigned int            command_pipe;
+       unsigned int            result_pipe;
+       unsigned int            stream_pipe;
+       int                     interface;
+       struct semaphore        usb_sem;
+
+       void                    *iso_buffer;
+       dma_addr_t              iso_dma_handle;
+       struct urb              *iso_urb[ISO_BUF_COUNT];
+       int                     iso_stream_count;
+       struct semaphore        iso_sem;
+
+       u8                              packet[MAX_AV_PES_LENGTH + 4];
+       enum ttusb_dec_packet_type      packet_type;
+       int                             packet_state;
+       int                             packet_length;
+       int                             packet_payload_length;
+
+       int                             av_pes_stream_count;
+       int                             filter_stream_count;
+
+       struct dvb_filter_pes2ts        a_pes2ts;
+       struct dvb_filter_pes2ts        v_pes2ts;
+
+       u8                      v_pes[16 + MAX_AV_PES_LENGTH];
+       int                     v_pes_length;
+       int                     v_pes_postbytes;
+
+       struct list_head        urb_frame_list;
+       struct tasklet_struct   urb_tasklet;
+       spinlock_t              urb_frame_list_lock;
+
+       struct list_head        filter_info_list;
+       spinlock_t              filter_info_list_lock;
+
+       int                     active; /* Loaded successfully */
+};
+
+struct urb_frame {
+       u8                      data[ISO_FRAME_SIZE];
+       int                     length;
+       struct list_head        urb_frame_list;
+};
+
+struct filter_info {
+       u8                      stream_id;
+       struct dvb_demux_filter *filter;
+       struct list_head        filter_info_list;
+};
+
+static struct dvb_frontend_info dec2000t_frontend_info = {
+       .name                   = "TechnoTrend/Hauppauge DEC2000-t Frontend",
+       .type                   = FE_OFDM,
+       .frequency_min          = 51000000,
+       .frequency_max          = 858000000,
+       .frequency_stepsize     = 62500,
+       .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
+               FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
+               FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
+               FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO |
+               FE_CAN_HIERARCHY_AUTO,
+};
+
+static struct dvb_frontend_info dec3000s_frontend_info = {
+       .name                   = "TechnoTrend/Hauppauge DEC3000-s Frontend",
+       .type                   = FE_QPSK,
+       .frequency_min          = 950000,
+       .frequency_max          = 2150000,
+       .frequency_stepsize     = 125,
+       .caps = FE_CAN_FEC_1_2 | FE_CAN_FEC_2_3 | FE_CAN_FEC_3_4 |
+               FE_CAN_FEC_5_6 | FE_CAN_FEC_7_8 | FE_CAN_FEC_AUTO |
+               FE_CAN_QAM_16 | FE_CAN_QAM_64 | FE_CAN_QAM_AUTO |
+               FE_CAN_TRANSMISSION_MODE_AUTO | FE_CAN_GUARD_INTERVAL_AUTO |
+               FE_CAN_HIERARCHY_AUTO,
+};
+
 static int ttusb_dec_send_command(struct ttusb_dec *dec, const u8 command,
                                  int param_length, const u8 params[],
                                  int *result_length, u8 cmd_result[])
@@ -62,8 +197,8 @@ static int ttusb_dec_send_command(struct ttusb_dec *dec, const u8 command,
                printk("\n");
        }
 
-       result = usb_bulk_msg(dec->udev, dec->command_pipe, b, sizeof(b),
-                             &actual_len, HZ);
+       result = usb_bulk_msg(dec->udev, dec->command_pipe, b,
+                             sizeof(b), &actual_len, HZ);
 
        if (result) {
                printk("%s: command bulk message failed: error %d\n",
@@ -72,8 +207,8 @@ static int ttusb_dec_send_command(struct ttusb_dec *dec, const u8 command,
                return result;
        }
 
-       result = usb_bulk_msg(dec->udev, dec->result_pipe, c, sizeof(c),
-                             &actual_len, HZ);
+       result = usb_bulk_msg(dec->udev, dec->result_pipe, c,
+                             sizeof(c), &actual_len, HZ);
 
        if (result) {
                printk("%s: result bulk message failed: error %d\n",
@@ -110,8 +245,9 @@ static int ttusb_dec_av_pes2ts_cb(void *priv, unsigned char *data)
 
 static void ttusb_dec_set_pids(struct ttusb_dec *dec)
 {
-       u8 b[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
-                  0xff, 0xff };
+       u8 b[] = { 0x00, 0x00, 0x00, 0x00,
+                  0x00, 0x00, 0xff, 0xff,
+                  0xff, 0xff, 0xff, 0xff };
 
        u16 pcr = htons(dec->pid[DMX_PES_PCR]);
        u16 audio = htons(dec->pid[DMX_PES_AUDIO]);
@@ -129,55 +265,20 @@ static void ttusb_dec_set_pids(struct ttusb_dec *dec)
                                       ttusb_dec_av_pes2ts_cb, dec->demux.feed);
                dvb_filter_pes2ts_init(&dec->v_pes2ts, dec->pid[DMX_PES_VIDEO],
                                       ttusb_dec_av_pes2ts_cb, dec->demux.feed);
-}
-
-static int ttusb_dec_i2c_master_xfer(struct dvb_i2c_bus *i2c,
-                                    const struct i2c_msg msgs[], int num)
-{
-       int result, i;
-
-       dprintk("%s\n", __FUNCTION__);
-
-       for (i = 0; i < num; i++)
-               if ((result = ttusb_dec_send_command(i2c->data, msgs[i].addr,
-                                                    msgs[i].len, msgs[i].buf,
-                                                    NULL, NULL)))
-                       return result;
-
-       return 0;
+       dec->v_pes_length = 0;
+       dec->v_pes_postbytes = 0;
 }
 
 static void ttusb_dec_process_av_pes(struct ttusb_dec * dec, u8 * av_pes,
                                     int length)
 {
-       int i;
-       u16 csum = 0;
-       u8 c;
-
-       if (length < 16) {
-               printk("%s: packet too short.\n", __FUNCTION__);
+       if (length < 8) {
+               printk("%s: packet too short - discarding\n", __FUNCTION__);
                return;
        }
 
-       for (i = 0; i < length; i += 2) {
-               csum ^= le16_to_cpup((u16 *)(av_pes + i));
-               c = av_pes[i];
-               av_pes[i] = av_pes[i + 1];
-               av_pes[i + 1] = c;
-       }
-
-       if (csum) {
-               printk("%s: checksum failed.\n", __FUNCTION__);
-               return;
-       }
-
-       if (length > 8 + MAX_AV_PES_LENGTH + 4) {
-               printk("%s: packet too long.\n", __FUNCTION__);
-               return;
-       }
-
-       if (!(av_pes[0] == 'A' && av_pes[1] == 'V')) {
-               printk("%s: invalid AV_PES packet.\n", __FUNCTION__);
+       if (length > 8 + MAX_AV_PES_LENGTH) {
+               printk("%s: packet too long - discarding\n", __FUNCTION__);
                return;
        }
 
@@ -194,15 +295,14 @@ static void ttusb_dec_process_av_pes(struct ttusb_dec * dec, u8 * av_pes,
                                       &av_pes[12], prebytes);
 
                                dvb_filter_pes2ts(&dec->v_pes2ts, dec->v_pes,
-                                                 dec->v_pes_length + prebytes);
+                                         dec->v_pes_length + prebytes, 1);
                        }
 
                        if (av_pes[5] & 0x10) {
                                dec->v_pes[7] = 0x80;
                                dec->v_pes[8] = 0x05;
 
-                               dec->v_pes[9] = 0x21 |
-                                               ((av_pes[8] & 0xc0) >> 5);
+                       dec->v_pes[9] = 0x21 | ((av_pes[8] & 0xc0) >> 5);
                                dec->v_pes[10] = ((av_pes[8] & 0x3f) << 2) |
                                                 ((av_pes[9] & 0xc0) >> 6);
                                dec->v_pes[11] = 0x01 |
@@ -210,18 +310,17 @@ static void ttusb_dec_process_av_pes(struct ttusb_dec * dec, u8 * av_pes,
                                                 ((av_pes[10] & 0x80) >> 6);
                                dec->v_pes[12] = ((av_pes[10] & 0x7f) << 1) |
                                                 ((av_pes[11] & 0xc0) >> 7);
-                               dec->v_pes[13] = 0x01 |
-                                                ((av_pes[11] & 0x7f) << 1);
+                       dec->v_pes[13] = 0x01 | ((av_pes[11] & 0x7f) << 1);
 
                                memcpy(&dec->v_pes[14], &av_pes[12 + prebytes],
-                                      length - 16 - prebytes);
-                               dec->v_pes_length = 14 + length - 16 - prebytes;
+                              length - 12 - prebytes);
+                       dec->v_pes_length = 14 + length - 12 - prebytes;
                        } else {
                                dec->v_pes[7] = 0x00;
                                dec->v_pes[8] = 0x00;
 
-                               memcpy(&dec->v_pes[9], &av_pes[8], length - 12);
-                               dec->v_pes_length = 9 + length - 12;
+                       memcpy(&dec->v_pes[9], &av_pes[8], length - 8);
+                       dec->v_pes_length = 9 + length - 8;
                        }
 
                        dec->v_pes_postbytes = postbytes;
@@ -239,106 +338,208 @@ static void ttusb_dec_process_av_pes(struct ttusb_dec * dec, u8 * av_pes,
 
                        if (postbytes == 0)
                                dvb_filter_pes2ts(&dec->v_pes2ts, dec->v_pes,
-                                                         dec->v_pes_length);
+                                                 dec->v_pes_length, 1);
 
                        break;
                }
 
        case 0x02:              /* MainAudioStream */
-               dvb_filter_pes2ts(&dec->a_pes2ts, &av_pes[8], length - 12);
+               dvb_filter_pes2ts(&dec->a_pes2ts, &av_pes[8], length - 8,
+                                 av_pes[5] & 0x10);
                break;
 
        default:
                printk("%s: unknown AV_PES type: %02x.\n", __FUNCTION__,
                       av_pes[2]);
                break;
+       }
+}
 
+static void ttusb_dec_process_filter(struct ttusb_dec *dec, u8 *packet,
+                                    int length)
+{
+       struct list_head *item;
+       struct filter_info *finfo;
+       struct dvb_demux_filter *filter = NULL;
+       unsigned long flags;
+       u8 sid;
+
+       sid = packet[1];
+       spin_lock_irqsave(&dec->filter_info_list_lock, flags);
+       for (item = dec->filter_info_list.next; item != &dec->filter_info_list;
+            item = item->next) {
+               finfo = list_entry(item, struct filter_info, filter_info_list);
+               if (finfo->stream_id == sid) {
+                       filter = finfo->filter;
+                       break;
+               }
+       }
+       spin_unlock_irqrestore(&dec->filter_info_list_lock, flags);
+
+       if (filter)
+               filter->feed->cb.sec(&packet[2], length - 2, NULL, 0,
+                                    &filter->filter, DMX_OK);
+}
+
+static void ttusb_dec_process_packet(struct ttusb_dec *dec)
+{
+       int i;
+       u16 csum = 0;
+
+       if (dec->packet_length % 2) {
+               printk("%s: odd sized packet - discarding\n", __FUNCTION__);
+               return;
+       }
+
+       for (i = 0; i < dec->packet_length; i += 2)
+               csum ^= ((dec->packet[i] << 8) + dec->packet[i + 1]);
+
+       if (csum) {
+               printk("%s: checksum failed - discarding\n", __FUNCTION__);
+               return;
+       }
+
+       switch (dec->packet_type) {
+       case PACKET_AV_PES:
+               if (dec->av_pes_stream_count)
+                       ttusb_dec_process_av_pes(dec, dec->packet,
+                                                dec->packet_payload_length);
+               break;
+
+       case PACKET_SECTION:
+               if (dec->filter_stream_count)
+                       ttusb_dec_process_filter(dec, dec->packet,
+                                                dec->packet_payload_length);
+               break;
+       }
+}
+
+static void swap_bytes(u8 *b, int length)
+{
+       u8 c;
+
+       length -= length % 2;
+       for (; length; b += 2, length -= 2) {
+               c = *b;
+               *b = *(b + 1);
+               *(b + 1) = c;
        }
 }
 
 static void ttusb_dec_process_urb_frame(struct ttusb_dec * dec, u8 * b,
                                        int length)
 {
+       swap_bytes(b, length);
+
        while (length) {
-               switch (dec->av_pes_state) {
+               switch (dec->packet_state) {
 
                case 0:
                case 1:
-               case 3:
-                       if (*b++ == 0xaa) {
-                               dec->av_pes_state++;
-                               if (dec->av_pes_state == 4)
-                                       dec->av_pes_length = 0;
-                       } else {
-                               dec->av_pes_state = 0;
-                       }
+               case 2:
+                       if (*b++ == 0xaa)
+                               dec->packet_state++;
+                       else
+                               dec->packet_state = 0;
 
                        length--;
                        break;
 
-               case 2:
+               case 3:
                        if (*b++ == 0x00) {
-                               dec->av_pes_state++;
+                               dec->packet_state++;
+                               dec->packet_length = 0;
                        } else {
-                               dec->av_pes_state = 0;
+                               dec->packet_state = 0;
                        }
 
                        length--;
                        break;
 
                case 4:
-                       dec->av_pes[dec->av_pes_length++] = *b++;
+                       dec->packet[dec->packet_length++] = *b++;
+
+                       if (dec->packet_length == 3) {
+                               if (dec->packet[0] == 'A' &&
+                                   dec->packet[1] == 'V') {
+                                       dec->packet_type = PACKET_AV_PES;
+                                       dec->packet_state++;
+                               } else if (dec->packet[0] == 'S') {
+                                       dec->packet_type = PACKET_SECTION;
+                                       dec->packet_state++;
+                       } else {
+                                       dec->packet_state = 0;
+                               }
+                       }
 
-                       if (dec->av_pes_length == 8) {
-                               dec->av_pes_state++;
-                               dec->av_pes_payload_length = le16_to_cpup(
-                                               (u16 *)(dec->av_pes + 6));
+                       length--;
+                       break;
+
+               case 5:
+                       dec->packet[dec->packet_length++] = *b++;
+
+                       if (dec->packet_type == PACKET_AV_PES &&
+                           dec->packet_length == 8) {
+                               dec->packet_state++;
+                               dec->packet_payload_length = 8 +
+                                       (dec->packet[6] << 8) +
+                                       dec->packet[7];
+                       } else if (dec->packet_type == PACKET_SECTION &&
+                                  dec->packet_length == 5) {
+                               dec->packet_state++;
+                               dec->packet_payload_length = 5 +
+                                       ((dec->packet[3] & 0x0f) << 8) +
+                                       dec->packet[4];
                        }
 
                        length--;
                        break;
 
-               case 5: {
-                               int remainder = dec->av_pes_payload_length +
-                                               8 - dec->av_pes_length;
+               case 6: {
+                       int remainder = dec->packet_payload_length -
+                                       dec->packet_length;
 
                                if (length >= remainder) {
-                                       memcpy(dec->av_pes + dec->av_pes_length,
+                               memcpy(dec->packet + dec->packet_length,
                                               b, remainder);
-                                       dec->av_pes_length += remainder;
+                               dec->packet_length += remainder;
                                        b += remainder;
                                        length -= remainder;
-                                       dec->av_pes_state++;
+                               dec->packet_state++;
                                } else {
-                                       memcpy(&dec->av_pes[dec->av_pes_length],
+                               memcpy(&dec->packet[dec->packet_length],
                                               b, length);
-                                       dec->av_pes_length += length;
+                               dec->packet_length += length;
                                        length = 0;
                                }
 
                                break;
                        }
 
-               case 6:
-                       dec->av_pes[dec->av_pes_length++] = *b++;
+               case 7: {
+                       int tail = 4;
 
-                       if (dec->av_pes_length ==
-                           8 + dec->av_pes_payload_length + 4) {
-                               ttusb_dec_process_av_pes(dec, dec->av_pes,
-                                                        dec->av_pes_length);
-                               dec->av_pes_state = 0;
+                       dec->packet[dec->packet_length++] = *b++;
+
+                       if (dec->packet_type == PACKET_SECTION &&
+                           dec->packet_payload_length % 2)
+                               tail++;
+
+                       if (dec->packet_length ==
+                           dec->packet_payload_length + tail) {
+                               ttusb_dec_process_packet(dec);
+                               dec->packet_state = 0;
                        }
 
                        length--;
                        break;
+               }
 
                default:
                        printk("%s: illegal packet state encountered.\n",
                               __FUNCTION__);
-                       dec->av_pes_state = 0;
-
+                       dec->packet_state = 0;
                }
-
        }
 }
 
@@ -367,11 +568,7 @@ static void ttusb_dec_process_urb_frame_list(unsigned long data)
        }
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_dec_process_urb(struct urb *urb)
-#else
 static void ttusb_dec_process_urb(struct urb *urb, struct pt_regs *ptregs)
-#endif
 {
        struct ttusb_dec *dec = urb->context;
 
@@ -380,6 +577,7 @@ static void ttusb_dec_process_urb(struct urb *urb, struct pt_regs *ptregs)
 
                for (i = 0; i < FRAMES_PER_ISO_BUF; i++) {
                        struct usb_iso_packet_descriptor *d;
+
                        u8 *b;
                        int length;
                        struct urb_frame *frame;
@@ -412,10 +610,8 @@ static void ttusb_dec_process_urb(struct urb *urb, struct pt_regs *ptregs)
                                urb->status);
        }
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
        if (dec->iso_stream_count)
                usb_submit_urb(urb, GFP_ATOMIC);
-#endif
 }
 
 static void ttusb_dec_setup_urbs(struct ttusb_dec *dec)
@@ -433,9 +629,8 @@ static void ttusb_dec_setup_urbs(struct ttusb_dec *dec)
                urb->complete = ttusb_dec_process_urb;
                urb->pipe = dec->stream_pipe;
                urb->transfer_flags = URB_ISO_ASAP;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
                urb->interval = 1;
-#endif
+
                urb->number_of_packets = FRAMES_PER_ISO_BUF;
                urb->transfer_buffer_length = ISO_FRAME_SIZE *
                                              FRAMES_PER_ISO_BUF;
@@ -462,12 +657,8 @@ static void ttusb_dec_stop_iso_xfer(struct ttusb_dec *dec)
        dec->iso_stream_count--;
 
        if (!dec->iso_stream_count) {
-               u8 b0[] = { 0x00 };
-
                for (i = 0; i < ISO_BUF_COUNT; i++)
                        usb_unlink_urb(dec->iso_urb[i]);
-
-               ttusb_dec_send_command(dec, 0x81, sizeof(b0), b0, NULL, NULL);
        }
 
        up(&dec->iso_sem);
@@ -495,15 +686,11 @@ static int ttusb_dec_start_iso_xfer(struct ttusb_dec *dec)
                return -EAGAIN;
 
        if (!dec->iso_stream_count) {
-               u8 b0[] = { 0x05 };
-
-               ttusb_dec_send_command(dec, 0x80, sizeof(b0), b0, NULL, NULL);
-
                ttusb_dec_setup_urbs(dec);
 
                for (i = 0; i < ISO_BUF_COUNT; i++) {
-                       if ((result = usb_submit_urb(dec->iso_urb[i]
-                                                   , GFP_KERNEL))) {
+                       if ((result = usb_submit_urb(dec->iso_urb[i],
+                                                    GFP_ATOMIC))) {
                                printk("%s: failed urb submission %d: "
                                       "error %d\n", __FUNCTION__, i, result);
 
@@ -517,7 +704,7 @@ static int ttusb_dec_start_iso_xfer(struct ttusb_dec *dec)
                        }
                }
 
-               dec->av_pes_state = 0;
+               dec->packet_state = 0;
                dec->v_pes_postbytes = 0;
        }
 
@@ -525,41 +712,17 @@ static int ttusb_dec_start_iso_xfer(struct ttusb_dec *dec)
 
        up(&dec->iso_sem);
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-       ttusb_dec_set_streaming_interface(dec);
-#endif
-
        return 0;
 }
 
-static int ttusb_dec_start_feed(struct dvb_demux_feed *dvbdmxfeed)
+static int ttusb_dec_start_ts_feed(struct dvb_demux_feed *dvbdmxfeed)
 {
        struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
        struct ttusb_dec *dec = dvbdmx->priv;
+       u8 b0[] = { 0x05 };
 
        dprintk("%s\n", __FUNCTION__);
 
-       if (!dvbdmx->dmx.frontend)
-               return -EINVAL;
-
-       dprintk("  pid: 0x%04X\n", dvbdmxfeed->pid);
-
-       switch (dvbdmxfeed->type) {
-
-       case DMX_TYPE_TS:
-               dprintk("  type: DMX_TYPE_TS\n");
-               break;
-
-       case DMX_TYPE_SEC:
-               dprintk("  type: DMX_TYPE_SEC\n");
-               break;
-
-       default:
-               dprintk("  type: unknown (%d)\n", dvbdmxfeed->type);
-               return -EINVAL;
-
-       }
-
        dprintk("  ts_type:");
 
        if (dvbdmxfeed->ts_type & TS_DECODER)
@@ -609,22 +772,151 @@ static int ttusb_dec_start_feed(struct dvb_demux_feed *dvbdmxfeed)
 
        }
 
+       ttusb_dec_send_command(dec, 0x80, sizeof(b0), b0, NULL, NULL);
+
+       dec->av_pes_stream_count++;
        ttusb_dec_start_iso_xfer(dec);
 
        return 0;
 }
 
-static int ttusb_dec_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
+static int ttusb_dec_start_sec_feed(struct dvb_demux_feed *dvbdmxfeed)
 {
        struct ttusb_dec *dec = dvbdmxfeed->demux->priv;
+       u8 b0[] = { 0x00, 0x00, 0x00, 0x01,
+                   0x00, 0x00, 0x00, 0x00,
+                   0x00, 0x00, 0x00, 0x00,
+                   0x00, 0x00, 0x00, 0x00,
+                   0x00, 0xff, 0x00, 0x00,
+                   0x00, 0x00, 0x00, 0x00,
+                   0x00, 0x00, 0x00, 0x00,
+                   0x00 };
+       u16 pid;
+       u8 c[COMMAND_PACKET_SIZE];
+       int c_length;
+       int result;
+       struct filter_info *finfo;
+       unsigned long flags;
+       u8 x = 1;
 
        dprintk("%s\n", __FUNCTION__);
 
+       pid = htons(dvbdmxfeed->pid);
+       memcpy(&b0[0], &pid, 2);
+       memcpy(&b0[4], &x, 1);
+       memcpy(&b0[5], &dvbdmxfeed->filter->filter.filter_value[0], 1);
+
+       result = ttusb_dec_send_command(dec, 0x60, sizeof(b0), b0,
+                                       &c_length, c);
+
+       if (!result) {
+               if (c_length == 2) {
+                       if (!(finfo = kmalloc(sizeof(struct filter_info),
+                                             GFP_ATOMIC)))
+                               return -ENOMEM;
+
+                       finfo->stream_id = c[1];
+                       finfo->filter = dvbdmxfeed->filter;
+
+                       spin_lock_irqsave(&dec->filter_info_list_lock, flags);
+                       list_add_tail(&finfo->filter_info_list,
+                                     &dec->filter_info_list);
+                       spin_unlock_irqrestore(&dec->filter_info_list_lock,
+                                              flags);
+
+                       dvbdmxfeed->priv = finfo;
+
+                       dec->filter_stream_count++;
+                       ttusb_dec_start_iso_xfer(dec);
+
+                       return 0;
+               }
+
+               return -EAGAIN;
+       } else
+               return result;
+}
+
+static int ttusb_dec_start_feed(struct dvb_demux_feed *dvbdmxfeed)
+{
+       struct dvb_demux *dvbdmx = dvbdmxfeed->demux;
+
+       dprintk("%s\n", __FUNCTION__);
+
+       if (!dvbdmx->dmx.frontend)
+               return -EINVAL;
+
+       dprintk("  pid: 0x%04X\n", dvbdmxfeed->pid);
+
+       switch (dvbdmxfeed->type) {
+
+       case DMX_TYPE_TS:
+               return ttusb_dec_start_ts_feed(dvbdmxfeed);
+               break;
+
+       case DMX_TYPE_SEC:
+               return ttusb_dec_start_sec_feed(dvbdmxfeed);
+               break;
+
+       default:
+               dprintk("  type: unknown (%d)\n", dvbdmxfeed->type);
+               return -EINVAL;
+
+       }
+}
+
+static int ttusb_dec_stop_ts_feed(struct dvb_demux_feed *dvbdmxfeed)
+{
+       struct ttusb_dec *dec = dvbdmxfeed->demux->priv;
+       u8 b0[] = { 0x00 };
+
+       ttusb_dec_send_command(dec, 0x81, sizeof(b0), b0, NULL, NULL);
+
+       dec->av_pes_stream_count--;
+
+       ttusb_dec_stop_iso_xfer(dec);
+
+       return 0;
+}
+
+static int ttusb_dec_stop_sec_feed(struct dvb_demux_feed *dvbdmxfeed)
+{
+       struct ttusb_dec *dec = dvbdmxfeed->demux->priv;
+       u8 b0[] = { 0x00, 0x00 };
+       struct filter_info *finfo = (struct filter_info *)dvbdmxfeed->priv;
+       unsigned long flags;
+
+       b0[1] = finfo->stream_id;
+       spin_lock_irqsave(&dec->filter_info_list_lock, flags);
+       list_del(&finfo->filter_info_list);
+       spin_unlock_irqrestore(&dec->filter_info_list_lock, flags);
+       kfree(finfo);
+       ttusb_dec_send_command(dec, 0x62, sizeof(b0), b0, NULL, NULL);
+
+       dec->filter_stream_count--;
+
        ttusb_dec_stop_iso_xfer(dec);
 
        return 0;
 }
 
+static int ttusb_dec_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
+{
+       dprintk("%s\n", __FUNCTION__);
+
+       switch (dvbdmxfeed->type) {
+       case DMX_TYPE_TS:
+               return ttusb_dec_stop_ts_feed(dvbdmxfeed);
+               break;
+
+       case DMX_TYPE_SEC:
+               return ttusb_dec_stop_sec_feed(dvbdmxfeed);
+               break;
+       }
+
+       return 0;
+}
+
 static void ttusb_dec_free_iso_urbs(struct ttusb_dec *dec)
 {
        int i;
@@ -659,7 +951,7 @@ static int ttusb_dec_alloc_iso_urbs(struct ttusb_dec *dec)
        for (i = 0; i < ISO_BUF_COUNT; i++) {
                struct urb *urb;
 
-               if (!(urb = usb_alloc_urb(FRAMES_PER_ISO_BUF, GFP_KERNEL))) {
+               if (!(urb = usb_alloc_urb(FRAMES_PER_ISO_BUF, GFP_ATOMIC))) {
                        ttusb_dec_free_iso_urbs(dec);
                        return -ENOMEM;
                }
@@ -669,13 +961,6 @@ static int ttusb_dec_alloc_iso_urbs(struct ttusb_dec *dec)
 
        ttusb_dec_setup_urbs(dec);
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-       for (i = 0; i < ISO_BUF_COUNT; i++) {
-               int next = (i + 1) % ISO_BUF_COUNT;
-               dec->iso_urb[i]->next = dec->iso_urb[next];
-       }
-#endif
-
        return 0;
 }
 
@@ -711,20 +996,46 @@ static void ttusb_dec_init_usb(struct ttusb_dec *dec)
        ttusb_dec_alloc_iso_urbs(dec);
 }
 
-#include "dsp_dec2000.h"
-
 static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
 {
        int i, j, actual_len, result, size, trans_count;
-       u8 b0[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1b, 0xc8, 0x61,
-                   0x00 };
+       u8 b0[] = { 0x00, 0x00, 0x00, 0x00,
+                   0x00, 0x00, 0x00, 0x00,
+                   0x00, 0x00 };
        u8 b1[] = { 0x61 };
        u8 b[ARM_PACKET_SIZE];
-       u32 dsp_length = htonl(sizeof(dsp_dec2000));
+       u8 *firmware = NULL;
+       size_t firmware_size = 0;
+       u32 firmware_csum = 0;
+       u32 firmware_size_nl;
+       u32 firmware_csum_nl;
+       const struct firmware *fw_entry = NULL;
 
        dprintk("%s\n", __FUNCTION__);
 
-       memcpy(b0, &dsp_length, 4);
+       if (request_firmware(&fw_entry, dec->firmware_name, &dec->udev->dev)) {
+               printk(KERN_ERR "%s: Firmware (%s) unavailable.\n",
+                      __FUNCTION__, dec->firmware_name);
+               return 1;
+       }
+
+       firmware = fw_entry->data;
+       firmware_size = fw_entry->size;
+
+       switch (dec->model) {
+               case TTUSB_DEC2000T:
+                       firmware_csum = 0x1bc86100;
+                       break;
+
+               case TTUSB_DEC3000S:
+                       firmware_csum = 0x00000000;
+                       break;
+       }
+
+       firmware_size_nl = htonl(firmware_size);
+       memcpy(b0, &firmware_size_nl, 4);
+       firmware_csum_nl = htonl(firmware_csum);
+       memcpy(&b0[6], &firmware_csum_nl, 4);
 
        result = ttusb_dec_send_command(dec, 0x41, sizeof(b0), b0, NULL, NULL);
 
@@ -734,8 +1045,8 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
        trans_count = 0;
        j = 0;
 
-       for (i = 0; i < sizeof(dsp_dec2000); i += COMMAND_PACKET_SIZE) {
-               size = sizeof(dsp_dec2000) - i;
+       for (i = 0; i < firmware_size; i += COMMAND_PACKET_SIZE) {
+               size = firmware_size - i;
                if (size > COMMAND_PACKET_SIZE)
                        size = COMMAND_PACKET_SIZE;
 
@@ -743,7 +1054,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
                b[j + 1] = trans_count++;
                b[j + 2] = 0xf0;
                b[j + 3] = size;
-               memcpy(&b[j + 4], &dsp_dec2000[i], size);
+               memcpy(&b[j + 4], &firmware[i], size);
 
                j += COMMAND_PACKET_SIZE + 4;
 
@@ -764,7 +1075,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec)
        return result;
 }
 
-static void ttusb_dec_init_stb(struct ttusb_dec *dec)
+static int ttusb_dec_init_stb(struct ttusb_dec *dec)
 {
        u8 c[COMMAND_PACKET_SIZE];
        int c_length;
@@ -774,9 +1085,14 @@ static void ttusb_dec_init_stb(struct ttusb_dec *dec)
 
        result = ttusb_dec_send_command(dec, 0x08, 0, NULL, &c_length, c);
 
-       if (!result)
+       if (!result) {
                if (c_length != 0x0c || (c_length == 0x0c && c[9] != 0x63))
-                       ttusb_dec_boot_dsp(dec);
+                       return ttusb_dec_boot_dsp(dec);
+               else
+                       return 0;
+       }
+       else
+               return result;
 }
 
 static int ttusb_dec_init_dvb(struct ttusb_dec *dec)
@@ -785,22 +1101,13 @@ static int ttusb_dec_init_dvb(struct ttusb_dec *dec)
 
        dprintk("%s\n", __FUNCTION__);
 
-       if ((result = dvb_register_adapter(&dec->adapter, "dec2000")) < 0) {
+       if ((result = dvb_register_adapter(&dec->adapter, dec->model_name)) < 0) {
                printk("%s: dvb_register_adapter failed: error %d\n",
                       __FUNCTION__, result);
 
                return result;
        }
 
-       if (!(dec->i2c_bus = dvb_register_i2c_bus(ttusb_dec_i2c_master_xfer,
-                                                 dec, dec->adapter, 0))) {
-               printk("%s: dvb_register_i2c_bus failed\n", __FUNCTION__);
-
-               dvb_unregister_adapter(dec->adapter);
-
-               return -ENOMEM;
-       }
-
        dec->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING;
 
        dec->demux.priv = (void *)dec;
@@ -814,8 +1121,6 @@ static int ttusb_dec_init_dvb(struct ttusb_dec *dec)
                printk("%s: dvb_dmx_init failed: error %d\n", __FUNCTION__,
                       result);
 
-               dvb_unregister_i2c_bus(ttusb_dec_i2c_master_xfer, dec->adapter,
-                                      0);
                dvb_unregister_adapter(dec->adapter);
 
                return result;
@@ -830,8 +1135,6 @@ static int ttusb_dec_init_dvb(struct ttusb_dec *dec)
                       __FUNCTION__, result);
 
                dvb_dmx_release(&dec->demux);
-               dvb_unregister_i2c_bus(ttusb_dec_i2c_master_xfer, dec->adapter,
-                                      0);
                dvb_unregister_adapter(dec->adapter);
 
                return result;
@@ -846,8 +1149,6 @@ static int ttusb_dec_init_dvb(struct ttusb_dec *dec)
 
                dvb_dmxdev_release(&dec->dmxdev);
                dvb_dmx_release(&dec->demux);
-               dvb_unregister_i2c_bus(ttusb_dec_i2c_master_xfer, dec->adapter,
-                                      0);
                dvb_unregister_adapter(dec->adapter);
 
                return result;
@@ -861,8 +1162,6 @@ static int ttusb_dec_init_dvb(struct ttusb_dec *dec)
                dec->demux.dmx.remove_frontend(&dec->demux.dmx, &dec->frontend);
                dvb_dmxdev_release(&dec->dmxdev);
                dvb_dmx_release(&dec->demux);
-               dvb_unregister_i2c_bus(ttusb_dec_i2c_master_xfer, dec->adapter,
-                                      0);
                dvb_unregister_adapter(dec->adapter);
 
                return result;
@@ -882,7 +1181,6 @@ static void ttusb_dec_exit_dvb(struct ttusb_dec *dec)
        dec->demux.dmx.remove_frontend(&dec->demux.dmx, &dec->frontend);
        dvb_dmxdev_release(&dec->dmxdev);
        dvb_dmx_release(&dec->demux);
-       dvb_unregister_i2c_bus(ttusb_dec_i2c_master_xfer, dec->adapter, 0);
        dvb_unregister_adapter(dec->adapter);
 }
 
@@ -914,35 +1212,282 @@ static void ttusb_dec_exit_tasklet(struct ttusb_dec *dec)
        }
 }
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void *ttusb_dec_probe(struct usb_device *udev, unsigned int ifnum,
-                            const struct usb_device_id *id)
+static int ttusb_dec_2000t_frontend_ioctl(struct dvb_frontend *fe, unsigned int cmd,
+                                 void *arg)
 {
-       struct ttusb_dec *dec;
+       struct ttusb_dec *dec = fe->data;
 
        dprintk("%s\n", __FUNCTION__);
 
-       if (ifnum != 0)
-               return NULL;
+       switch (cmd) {
+
+       case FE_GET_INFO:
+               dprintk("%s: FE_GET_INFO\n", __FUNCTION__);
+               memcpy(arg, dec->frontend_info,
+                      sizeof (struct dvb_frontend_info));
+               break;
+
+       case FE_READ_STATUS: {
+                       fe_status_t *status = (fe_status_t *)arg;
+                       dprintk("%s: FE_READ_STATUS\n", __FUNCTION__);
+                       *status = FE_HAS_SIGNAL | FE_HAS_VITERBI |
+                                 FE_HAS_SYNC | FE_HAS_CARRIER | FE_HAS_LOCK;
+                       break;
+               }
+
+       case FE_READ_BER: {
+                       u32 *ber = (u32 *)arg;
+                       dprintk("%s: FE_READ_BER\n", __FUNCTION__);
+                       *ber = 0;
+                       return -ENOSYS;
+                       break;
+               }
+
+       case FE_READ_SIGNAL_STRENGTH: {
+                       dprintk("%s: FE_READ_SIGNAL_STRENGTH\n", __FUNCTION__);
+                       *(s32 *)arg = 0xFF;
+                       return -ENOSYS;
+                       break;
+               }
+
+       case FE_READ_SNR:
+               dprintk("%s: FE_READ_SNR\n", __FUNCTION__);
+               *(s32 *)arg = 0;
+               return -ENOSYS;
+               break;
+
+       case FE_READ_UNCORRECTED_BLOCKS:
+               dprintk("%s: FE_READ_UNCORRECTED_BLOCKS\n", __FUNCTION__);
+               *(u32 *)arg = 0;
+               return -ENOSYS;
+               break;
+
+       case FE_SET_FRONTEND: {
+                       struct dvb_frontend_parameters *p =
+                               (struct dvb_frontend_parameters *)arg;
+               u8 b[] = { 0x00, 0x00, 0x00, 0x03,
+                          0x00, 0x00, 0x00, 0x00,
+                          0x00, 0x00, 0x00, 0x01,
+                          0x00, 0x00, 0x00, 0xff,
+                          0x00, 0x00, 0x00, 0xff };
+                       u32 freq;
+
+                       dprintk("%s: FE_SET_FRONTEND\n", __FUNCTION__);
+
+                       dprintk("            frequency->%d\n", p->frequency);
+                       dprintk("            symbol_rate->%d\n",
+                               p->u.qam.symbol_rate);
+                       dprintk("            inversion->%d\n", p->inversion);
+
+                       freq = htonl(p->frequency / 1000);
+                       memcpy(&b[4], &freq, sizeof (u32));
+                       ttusb_dec_send_command(dec, 0x71, sizeof(b), b, NULL, NULL);
+
+                       break;
+               }
+
+       case FE_GET_FRONTEND:
+               dprintk("%s: FE_GET_FRONTEND\n", __FUNCTION__);
+               break;
+
+       case FE_SLEEP:
+               dprintk("%s: FE_SLEEP\n", __FUNCTION__);
+               return -ENOSYS;
+               break;
+
+       case FE_INIT:
+               dprintk("%s: FE_INIT\n", __FUNCTION__);
+               break;
+
+       case FE_RESET:
+               dprintk("%s: FE_RESET\n", __FUNCTION__);
+               break;
+
+       default:
+               dprintk("%s: unknown IOCTL (0x%X)\n", __FUNCTION__, cmd);
+               return -EINVAL;
 
-       if (!(dec = kmalloc(sizeof(struct ttusb_dec), GFP_KERNEL))) {
-               printk("%s: couldn't allocate memory.\n", __FUNCTION__);
-               return NULL;
        }
 
-       memset(dec, 0, sizeof(struct ttusb_dec));
+       return 0;
+}
 
-       dec->udev = udev;
+static int ttusb_dec_3000s_frontend_ioctl(struct dvb_frontend *fe,
+                                         unsigned int cmd, void *arg)
+{
+       struct ttusb_dec *dec = fe->data;
 
-       ttusb_dec_init_usb(dec);
-       ttusb_dec_init_stb(dec);
-       ttusb_dec_init_dvb(dec);
-       ttusb_dec_init_v_pes(dec);
-       ttusb_dec_init_tasklet(dec);
+       dprintk("%s\n", __FUNCTION__);
+
+       switch (cmd) {
+
+       case FE_GET_INFO:
+               dprintk("%s: FE_GET_INFO\n", __FUNCTION__);
+               memcpy(arg, dec->frontend_info,
+                      sizeof (struct dvb_frontend_info));
+               break;
+
+       case FE_READ_STATUS: {
+                       fe_status_t *status = (fe_status_t *)arg;
+                       dprintk("%s: FE_READ_STATUS\n", __FUNCTION__);
+                       *status = FE_HAS_SIGNAL | FE_HAS_VITERBI |
+                                 FE_HAS_SYNC | FE_HAS_CARRIER | FE_HAS_LOCK;
+                       break;
+               }
+
+       case FE_READ_BER: {
+                       u32 *ber = (u32 *)arg;
+                       dprintk("%s: FE_READ_BER\n", __FUNCTION__);
+                       *ber = 0;
+                       return -ENOSYS;
+                       break;
+               }
+
+       case FE_READ_SIGNAL_STRENGTH: {
+                       dprintk("%s: FE_READ_SIGNAL_STRENGTH\n", __FUNCTION__);
+                       *(s32 *)arg = 0xFF;
+                       return -ENOSYS;
+                       break;
+               }
+
+       case FE_READ_SNR:
+               dprintk("%s: FE_READ_SNR\n", __FUNCTION__);
+               *(s32 *)arg = 0;
+               return -ENOSYS;
+               break;
+
+       case FE_READ_UNCORRECTED_BLOCKS:
+               dprintk("%s: FE_READ_UNCORRECTED_BLOCKS\n", __FUNCTION__);
+               *(u32 *)arg = 0;
+               return -ENOSYS;
+               break;
+
+       case FE_SET_FRONTEND: {
+                       struct dvb_frontend_parameters *p =
+                               (struct dvb_frontend_parameters *)arg;
+               u8 b[] = { 0x00, 0x00, 0x00, 0x01,
+                          0x00, 0x00, 0x00, 0x00,
+                          0x00, 0x00, 0x00, 0x01,
+                          0x00, 0x00, 0x00, 0x00,
+                          0x00, 0x00, 0x00, 0x00,
+                          0x00, 0x00, 0x00, 0x00,
+                          0x00, 0x00, 0x00, 0x00,
+                          0x00, 0x00, 0x00, 0x0d,
+                          0x00, 0x00, 0x00, 0x00,
+                          0x00, 0x00, 0x00, 0x00 };
+                       u32 freq;
+                       u32 sym_rate;
+                       u32 band;
+
+
+                       dprintk("%s: FE_SET_FRONTEND\n", __FUNCTION__);
+
+                       dprintk("            frequency->%d\n", p->frequency);
+                       dprintk("            symbol_rate->%d\n",
+                               p->u.qam.symbol_rate);
+                       dprintk("            inversion->%d\n", p->inversion);
+
+               freq = htonl(p->frequency * 1000 +
+                      (dec->hi_band ? LOF_HI : LOF_LO));
+                       memcpy(&b[4], &freq, sizeof(u32));
+                       sym_rate = htonl(p->u.qam.symbol_rate);
+                       memcpy(&b[12], &sym_rate, sizeof(u32));
+                       band = htonl(dec->hi_band ? LOF_HI : LOF_LO);
+                       memcpy(&b[24], &band, sizeof(u32));
+
+                       ttusb_dec_send_command(dec, 0x71, sizeof(b), b, NULL, NULL);
+
+                       break;
+               }
+
+       case FE_GET_FRONTEND:
+               dprintk("%s: FE_GET_FRONTEND\n", __FUNCTION__);
+               break;
+
+       case FE_SLEEP:
+               dprintk("%s: FE_SLEEP\n", __FUNCTION__);
+               return -ENOSYS;
+               break;
+
+       case FE_INIT:
+               dprintk("%s: FE_INIT\n", __FUNCTION__);
+               break;
+
+       case FE_RESET:
+               dprintk("%s: FE_RESET\n", __FUNCTION__);
+               break;
+
+       case FE_DISEQC_SEND_MASTER_CMD:
+               dprintk("%s: FE_DISEQC_SEND_MASTER_CMD\n", __FUNCTION__);
+               break;
+
+       case FE_DISEQC_SEND_BURST:
+               dprintk("%s: FE_DISEQC_SEND_BURST\n", __FUNCTION__);
+               break;
+
+       case FE_SET_TONE: {
+                       fe_sec_tone_mode_t tone = (fe_sec_tone_mode_t)arg;
+                       dprintk("%s: FE_SET_TONE\n", __FUNCTION__);
+                       dec->hi_band = (SEC_TONE_ON == tone);
+                       break;
+               }
 
-       return (void *)dec;
+       case FE_SET_VOLTAGE:
+               dprintk("%s: FE_SET_VOLTAGE\n", __FUNCTION__);
+               break;
+
+       default:
+               dprintk("%s: unknown IOCTL (0x%X)\n", __FUNCTION__, cmd);
+               return -EINVAL;
+
+       }
+
+       return 0;
+}
+
+static void ttusb_dec_init_frontend(struct ttusb_dec *dec)
+{
+       dec->i2c_bus.adapter = dec->adapter;
+
+       switch (dec->model) {
+               case TTUSB_DEC2000T:
+                       dec->frontend_info = &dec2000t_frontend_info;
+                       dec->frontend_ioctl = ttusb_dec_2000t_frontend_ioctl;
+                       break;
+
+               case TTUSB_DEC3000S:
+                       dec->frontend_info = &dec3000s_frontend_info;
+                       dec->frontend_ioctl = ttusb_dec_3000s_frontend_ioctl;
+                       break;
+       }
+
+       dvb_register_frontend(dec->frontend_ioctl, &dec->i2c_bus, (void *)dec,
+                             dec->frontend_info);
 }
-#else
+
+static void ttusb_dec_exit_frontend(struct ttusb_dec *dec)
+{
+       dvb_unregister_frontend(dec->frontend_ioctl, &dec->i2c_bus);
+}
+
+static void ttusb_dec_init_filters(struct ttusb_dec *dec)
+{
+       INIT_LIST_HEAD(&dec->filter_info_list);
+       dec->filter_info_list_lock = SPIN_LOCK_UNLOCKED;
+}
+
+static void ttusb_dec_exit_filters(struct ttusb_dec *dec)
+{
+       struct list_head *item;
+       struct filter_info *finfo;
+
+       while ((item = dec->filter_info_list.next) != &dec->filter_info_list) {
+               finfo = list_entry(item, struct filter_info, filter_info_list);
+               list_del(&finfo->filter_info_list);
+               kfree(finfo);
+       }
+}
+
 static int ttusb_dec_probe(struct usb_interface *intf,
                           const struct usb_device_id *id)
 {
@@ -958,48 +1503,67 @@ static int ttusb_dec_probe(struct usb_interface *intf,
                return -ENOMEM;
        }
 
+       usb_set_intfdata(intf, (void *)dec);
+
        memset(dec, 0, sizeof(struct ttusb_dec));
 
+       switch (id->idProduct) {
+               case 0x1006:
+                       dec->model = TTUSB_DEC3000S;
+                       dec->model_name = "DEC3000-s";
+               dec->firmware_name = "dvb-ttusb-dec-3000s-2.15a.fw";
+                       break;
+
+               case 0x1008:
+                       dec->model = TTUSB_DEC2000T;
+                       dec->model_name = "DEC2000-t";
+               dec->firmware_name = "dvb-ttusb-dec-2000t-2.15a.fw";
+                       break;
+       }
+
        dec->udev = udev;
 
        ttusb_dec_init_usb(dec);
-       ttusb_dec_init_stb(dec);
+       if (ttusb_dec_init_stb(dec)) {
+               ttusb_dec_exit_usb(dec);
+               return 0;
+       }
        ttusb_dec_init_dvb(dec);
+       ttusb_dec_init_frontend(dec);
        ttusb_dec_init_v_pes(dec);
+       ttusb_dec_init_filters(dec);
        ttusb_dec_init_tasklet(dec);
 
-       usb_set_intfdata(intf, (void *)dec);
+       dec->active = 1;
+
        ttusb_dec_set_streaming_interface(dec);
 
        return 0;
 }
-#endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_dec_disconnect(struct usb_device *udev, void *data)
-{
-       struct ttusb_dec *dec = data;
-#else
 static void ttusb_dec_disconnect(struct usb_interface *intf)
 {
        struct ttusb_dec *dec = usb_get_intfdata(intf);
 
        usb_set_intfdata(intf, NULL);
-#endif
 
        dprintk("%s\n", __FUNCTION__);
 
+       if (dec->active) {
        ttusb_dec_exit_tasklet(dec);
+               ttusb_dec_exit_filters(dec);
        ttusb_dec_exit_usb(dec);
+               ttusb_dec_exit_frontend(dec);
        ttusb_dec_exit_dvb(dec);
+       }
 
        kfree(dec);
 }
 
 static struct usb_device_id ttusb_dec_table[] = {
-       {USB_DEVICE(0x0b48, 0x1006)},   /* Unconfirmed */
-       {USB_DEVICE(0x0b48, 0x1007)},   /* Unconfirmed */
-       {USB_DEVICE(0x0b48, 0x1008)},   /* DEC 2000 t */
+       {USB_DEVICE(0x0b48, 0x1006)},   /* DEC3000-s */
+       /*{USB_DEVICE(0x0b48, 0x1007)},    Unconfirmed */
+       {USB_DEVICE(0x0b48, 0x1008)},   /* DEC2000-t */
        {}
 };
 
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.h b/drivers/media/dvb/ttusb-dec/ttusb_dec.h
deleted file mode 100644 (file)
index db1c13f..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * TTUSB DEC Driver
- *
- * Copyright (C) 2003 Alex Woods <linux-dvb@giblets.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _TTUSB_DEC_H
-#define _TTUSB_DEC_H
-
-#include <asm/semaphore.h>
-#include <linux/interrupt.h>
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include "dmxdev.h"
-#include "dvb_demux.h"
-#include "dvb_filter.h"
-#include "dvb_i2c.h"
-#include "dvb_net.h"
-
-#define DRIVER_NAME            "TechnoTrend/Hauppauge DEC USB"
-
-#define COMMAND_PIPE           0x03
-#define RESULT_PIPE            0x84
-#define STREAM_PIPE            0x88
-
-#define COMMAND_PACKET_SIZE    0x3c
-#define ARM_PACKET_SIZE                0x1000
-
-#define ISO_BUF_COUNT          0x04
-#define FRAMES_PER_ISO_BUF     0x04
-#define ISO_FRAME_SIZE         0x0380
-
-#define        MAX_AV_PES_LENGTH       6144
-
-struct ttusb_dec {
-       /* DVB bits */
-       struct dvb_adapter      *adapter;
-       struct dmxdev           dmxdev;
-       struct dvb_demux        demux;
-       struct dmx_frontend     frontend;
-       struct dvb_i2c_bus      *i2c_bus;
-       struct dvb_net          dvb_net;
-
-       u16                     pid[DMX_PES_OTHER];
-
-       /* USB bits */
-       struct usb_device       *udev;
-       u8                      trans_count;
-       unsigned int            command_pipe;
-       unsigned int            result_pipe;
-       unsigned int            stream_pipe;
-       int                     interface;
-       struct semaphore        usb_sem;
-
-       void                    *iso_buffer;
-       dma_addr_t              iso_dma_handle;
-       struct urb              *iso_urb[ISO_BUF_COUNT];
-       int                     iso_stream_count;
-       struct semaphore        iso_sem;
-
-       u8                      av_pes[MAX_AV_PES_LENGTH + 4];
-       int                     av_pes_state;
-       int                     av_pes_length;
-       int                     av_pes_payload_length;
-
-       struct dvb_filter_pes2ts        a_pes2ts;
-       struct dvb_filter_pes2ts        v_pes2ts;
-
-       u8                      v_pes[16 + MAX_AV_PES_LENGTH];
-       int                     v_pes_length;
-       int                     v_pes_postbytes;
-
-       struct list_head        urb_frame_list;
-       struct tasklet_struct   urb_tasklet;
-       spinlock_t              urb_frame_list_lock;
-};
-
-struct urb_frame {
-       u8                      data[ISO_FRAME_SIZE];
-       int                     length;
-       struct list_head        urb_frame_list;
-};
-
-#endif
index a481129..62263fa 100644 (file)
@@ -2,8 +2,6 @@
 # Makefile for the kernel character device drivers.
 #
 
-obj-y          := dummy.o
-
 miropcm20-objs := miropcm20-rds-core.o miropcm20-radio.o
 
 obj-$(CONFIG_RADIO_AZTECH) += radio-aztech.o
diff --git a/drivers/media/radio/dummy.c b/drivers/media/radio/dummy.c
deleted file mode 100644 (file)
index 4f9d00a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* just so the linker knows what kind of object files it's deadling with... */
index 6f7c419..0ccad83 100644 (file)
@@ -7,7 +7,6 @@ bttv-objs       :=      bttv-driver.o bttv-cards.o bttv-if.o \
 zoran-objs      :=     zr36120.o zr36120_i2c.o zr36120_mem.o
 zr36067-objs   :=      zoran_procfs.o zoran_device.o \
                        zoran_driver.o zoran_card.o
-obj-y          :=      dummy.o
 
 obj-$(CONFIG_VIDEO_DEV) += videodev.o v4l2-common.o v4l1-compat.o
 
diff --git a/drivers/media/video/dummy.c b/drivers/media/video/dummy.c
deleted file mode 100644 (file)
index 4f9d00a..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/* just so the linker knows what kind of object files it's deadling with... */
index 5afc77f..bac87d0 100644 (file)
@@ -1078,7 +1078,7 @@ videobuf_vm_close(struct vm_area_struct *vma)
  */
 static struct page*
 videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr,
-                 int write_access)
+                 int *type)
 {
        struct page *page;
 
@@ -1090,6 +1090,8 @@ videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr,
        if (!page)
                return NOPAGE_OOM;
        clear_user_page(page_address(page), vaddr, page);
+       if (type)
+               *type = VM_FAULT_MINOR;
        return page;
 }
 
index b035ae6..1703ef9 100644 (file)
@@ -5,11 +5,11 @@
  *      Error Report logging output.  This module implements SCSI-3
  *      Opcode lookup and a sorted table of SCSI-3 ASC/ASCQ strings.
  *
- *  Copyright (c) 1991-2002 Steven J. Ralston
+ *  Copyright (c) 1991-2003 Steven J. Ralston
  *  Written By: Steven J. Ralston
  *  (yes I wrote some of the orig. code back in 1991!)
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: isense.c,v 1.33 2002/02/27 18:44:19 sralston Exp $
  */
@@ -66,7 +66,7 @@
 #endif
 
 #define MODULEAUTHOR "Steven J. Ralston"
-#define COPYRIGHT "Copyright (c) 2001-2002 " MODULEAUTHOR
+#define COPYRIGHT "Copyright (c) 2001-2003 " MODULEAUTHOR
 #include "mptbase.h"
 
 #include "isense.h"
index 6b1cc1d..e17b29d 100644 (file)
  *      for gobs of hard work fixing and optimizing LAN code.
  *      THANK YOU!
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Originally By: Steven J. Ralston
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptbase.c,v 1.126 2002/12/16 15:28:45 pdelaney Exp $
  */
@@ -3138,7 +3138,7 @@ KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag)
 {
        int hard_reset_done = 0;
        u32 ioc_state;
-       int cnt = 0;
+       int cntdn, cnt = 0;
 
        dprintk((KERN_WARNING MYNAM ": KickStarting %s!\n", ioc->name));
        if ((int)ioc->chip_type > (int)FC929) {
@@ -3161,7 +3161,8 @@ KickStart(MPT_ADAPTER *ioc, int force, int sleepFlag)
        dprintk((MYIOC_s_INFO_FMT "Diagnostic reset successful!\n",
                        ioc->name));
 
-       for (cnt=0; cnt<HZ*20; cnt++) {
+       cntdn = ((sleepFlag == CAN_SLEEP) ? HZ : 1000) * 20;    /* 20 seconds */
+       for (cnt=0; cnt<cntdn; cnt++) {
                if ((ioc_state = mpt_GetIocState(ioc, 1)) == MPI_IOC_STATE_READY) {
                        dprintk((MYIOC_s_INFO_FMT "KickStart successful! (cnt=%d)\n",
                                        ioc->name, cnt));
index d351b4a..f39f99e 100644 (file)
@@ -8,10 +8,10 @@
  *  Credits:
  *     (see mptbase.c)
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Originally By: Steven J. Ralston
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptbase.h,v 1.144 2003/01/28 21:31:56 pdelaney Exp $
  */
 #endif
 
 #ifndef COPYRIGHT
-#define COPYRIGHT      "Copyright (c) 1999-2002 " MODULEAUTHOR
+#define COPYRIGHT      "Copyright (c) 1999-2003 " MODULEAUTHOR
 #endif
 
-#define MPT_LINUX_VERSION_COMMON       "2.05.00.03"
-#define MPT_LINUX_PACKAGE_NAME         "@(#)mptlinux-2.05.00.03"
+#define MPT_LINUX_VERSION_COMMON       "2.05.00.05"
+#define MPT_LINUX_PACKAGE_NAME         "@(#)mptlinux-2.05.00.05"
 #define WHAT_MAGIC_STRING              "@" "(" "#" ")"
 
 #define show_mptmod_ver(s,ver)  \
index 1e707d0..9b0fea5 100644 (file)
  *
  *      (see also mptbase.c)
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Originally By: Steven J. Ralston, Noah Romer
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptctl.c,v 1.63 2002/12/03 21:26:33 pdelaney Exp $
  */
@@ -91,7 +91,7 @@
 #include "../../scsi/scsi.h"
 #include "../../scsi/hosts.h"
 
-#define COPYRIGHT      "Copyright (c) 1999-2001 LSI Logic Corporation"
+#define COPYRIGHT      "Copyright (c) 1999-2003 LSI Logic Corporation"
 #define MODULEAUTHOR   "Steven J. Ralston, Noah Romer, Pamela Delaney"
 #include "mptbase.h"
 #include "mptctl.h"
@@ -2985,6 +2985,21 @@ void mptctl_exit(void)
        mpt_deregister(mptctl_id);
        printk(KERN_INFO MYNAM ": Deregistered from Fusion MPT base driver\n");
 
+#ifdef CONFIG_COMPAT
+       unregister_ioctl32_conversion(MPTIOCINFO);
+       unregister_ioctl32_conversion(MPTIOCINFO1);
+       unregister_ioctl32_conversion(MPTTARGETINFO);
+       unregister_ioctl32_conversion(MPTTEST);
+       unregister_ioctl32_conversion(MPTEVENTQUERY);
+       unregister_ioctl32_conversion(MPTEVENTENABLE);
+       unregister_ioctl32_conversion(MPTEVENTREPORT);
+       unregister_ioctl32_conversion(MPTHARDRESET);
+       unregister_ioctl32_conversion(MPTCOMMAND32);
+       unregister_ioctl32_conversion(MPTFWDOWNLOAD32);
+       unregister_ioctl32_conversion(HP_GETHOSTINFO);
+       unregister_ioctl32_conversion(HP_GETTARGETINFO);
+#endif
+
        /* Free allocated memory */
        for (i=0; i<MPT_MAX_ADAPTERS; i++) {
                ioc = NULL;
index 337cfba..b2b5fca 100644 (file)
  *
  *      (see also mptbase.c)
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Originally By: Steven J. Ralston
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptctl.h,v 1.13 2002/12/03 21:26:33 pdelaney Exp $
  */
index 720a50a..32a5710 100644 (file)
@@ -23,8 +23,9 @@
  *
  *      (see also mptbase.c)
  *
- *  Copyright (c) 2000-2002 LSI Logic Corporation
+ *  Copyright (c) 2000-2003 LSI Logic Corporation
  *  Originally By: Noah Romer
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptlan.c,v 1.53 2002/10/17 20:15:58 pdelaney Exp $
  */
index a25d05a..d40e07e 100644 (file)
  *
  *      (see mptbase.c)
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Original author: Steven J. Ralston
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptscsih.c,v 1.104 2002/12/03 21:26:34 pdelaney Exp $
  */
@@ -178,9 +178,12 @@ static int mptscsih_writeSDP1(MPT_SCSI_HOST *hd, int portnum, int target, int fl
 static int     mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
 static void    mptscsih_timer_expired(unsigned long data);
 static void    mptscsih_taskmgmt_timeout(unsigned long data);
+static void    mptscsih_schedule_reset(void *hd);
 static int     mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *iocmd);
 static int     mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, int portnum);
 
+static struct mpt_work_struct   mptscsih_rstTask;
+
 #ifndef MPTSCSIH_DISABLE_DOMAIN_VALIDATION
 static int     mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io);
 static void    mptscsih_domainValidation(void *hd);
@@ -1058,7 +1061,7 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOST *hd)
                                            SCpnt->use_sg, scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
                        } else if (SCpnt->request_bufflen) {
                                scPrivate       *my_priv;
-               
+
                                my_priv = (scPrivate *) &SCpnt->SCp;
                                pci_unmap_single(hd->ioc->pcidev, (dma_addr_t)(ulong)my_priv->p1,
                                           SCpnt->request_bufflen,
@@ -2155,7 +2158,7 @@ int mptscsih_proc_info(struct Scsi_Host *host, char *buffer, char **start, off_t
        MPT_SCSI_HOST   *hd = NULL;
        int size = 0;
 
-       dprintk(("Called mptscsih_proc_info: hostno=%d, func=%d\n", hostno, func));
+       dprintk(("Called mptscsih_proc_info: hostno=%d, func=%d\n", host->host_no, func));
        dprintk(("buffer %p, start=%p (%p) offset=%ld length = %d\n",
                        buffer, start, *start, offset, length));
 
@@ -2788,13 +2791,14 @@ mptscsih_abort(Scsi_Cmnd * SCpnt)
        MPT_FRAME_HDR   *mf;
        u32              ctx2abort;
        int              scpnt_idx;
+       spinlock_t      *host_lock = SCpnt->device->host->host_lock;
 
        /* If we can't locate our host adapter structure, return FAILED status.
         */
        if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL) {
                SCpnt->result = DID_RESET << 16;
                SCpnt->scsi_done(SCpnt);
-               nehprintk((KERN_WARNING MYNAM ": mptscsih_abort: "
+               dtmprintk((KERN_WARNING MYNAM ": mptscsih_abort: "
                           "Can't locate host! (sc=%p)\n",
                           SCpnt));
                return FAILED;
@@ -2816,7 +2820,7 @@ mptscsih_abort(Scsi_Cmnd * SCpnt)
 
                SCpnt->result = DID_RESET << 16;
                SCpnt->scsi_done(SCpnt);
-               nehprintk((KERN_WARNING MYNAM ": %s: mptscsih_abort: "
+               dtmprintk((KERN_WARNING MYNAM ": %s: mptscsih_abort: "
                           "Command not in the active list! (sc=%p)\n",
                           hd->ioc->name, SCpnt));
                return SUCCESS;
@@ -2827,13 +2831,16 @@ mptscsih_abort(Scsi_Cmnd * SCpnt)
         *  call to mptscsih_tm_pending_wait() will set the pending flag if we are
         *  successful.
         */
+       spin_unlock_irq(host_lock);
        if (mptscsih_tm_pending_wait(hd) == FAILED){
-               nehprintk((KERN_WARNING MYNAM ": %s: mptscsih_abort: "
+               dtmprintk((KERN_WARNING MYNAM ": %s: mptscsih_abort: "
                           "Timed out waiting for previous TM to complete! "
                           "(sc = %p)\n",
                           hd->ioc->name, SCpnt));
+               spin_lock_irq(host_lock);
                return FAILED;
        }
+       spin_lock_irq(host_lock);
 
        /* If this command is pended, then timeout/hang occurred
         * during DV. Post command and flush pending Q
@@ -2842,7 +2849,7 @@ mptscsih_abort(Scsi_Cmnd * SCpnt)
        if ((mf = mptscsih_search_pendingQ(hd, scpnt_idx)) != NULL) {
                mptscsih_put_msgframe(ScsiDoneCtx, hd->ioc->id, mf);
                post_pendingQ_commands(hd);
-               nehprintk((KERN_WARNING MYNAM ": %s: mptscsih_abort: "
+               dtmprintk((KERN_WARNING MYNAM ": %s: mptscsih_abort: "
                           "Found command in pending queue! (sc=%p)\n",
                           hd->ioc->name, SCpnt));
        }
@@ -2858,8 +2865,10 @@ mptscsih_abort(Scsi_Cmnd * SCpnt)
        ctx2abort = mf->u.frame.hwhdr.msgctxu.MsgContext;
 
        hd->abortSCpnt = SCpnt;
+
+       spin_unlock_irq(host_lock);
        if (mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK,
-                              SCpnt->device->id, SCpnt->device->lun, ctx2abort, NO_SLEEP)
+                              SCpnt->device->id, SCpnt->device->lun, ctx2abort, CAN_SLEEP)
                < 0) {
 
                /* The TM request failed and the subsequent FW-reload failed!
@@ -2873,8 +2882,10 @@ mptscsih_abort(Scsi_Cmnd * SCpnt)
                hd->tmPending = 0;
                hd->tmState = TM_STATE_NONE;
 
+               spin_lock_irq(host_lock);
                return FAILED;
        }
+       spin_lock_irq(host_lock);
        return FAILED;
 
 }
@@ -2892,11 +2903,12 @@ int
 mptscsih_dev_reset(Scsi_Cmnd * SCpnt)
 {
        MPT_SCSI_HOST   *hd;
+       spinlock_t      *host_lock = SCpnt->device->host->host_lock;
 
        /* If we can't locate our host adapter structure, return FAILED status.
         */
        if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
-               nehprintk((KERN_WARNING MYNAM ": mptscsih_dev_reset: "
+               dtmprintk((KERN_WARNING MYNAM ": mptscsih_dev_reset: "
                           "Can't locate host! (sc=%p)\n",
                           SCpnt));
                return FAILED;
@@ -2915,16 +2927,18 @@ mptscsih_dev_reset(Scsi_Cmnd * SCpnt)
         *  call to mptscsih_tm_pending_wait() will set the pending flag if we are
         *  successful.
         */
+       spin_unlock_irq(host_lock);
        if (mptscsih_tm_pending_wait(hd) == FAILED) {
-               nehprintk((KERN_WARNING MYNAM ": %s: mptscsih_dev_reset: "
+               dtmprintk((KERN_WARNING MYNAM ": %s: mptscsih_dev_reset: "
                           "Timed out waiting for previous TM to complete! "
                           "(sc = %p)\n",
                           hd->ioc->name, SCpnt));
+               spin_lock_irq(host_lock);
                return FAILED;
        }
 
        if (mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET,
-                              SCpnt->device->id, 0, 0, NO_SLEEP)
+                              SCpnt->device->id, 0, 0, CAN_SLEEP)
                < 0){
                /* The TM request failed and the subsequent FW-reload failed!
                 * Fatal error case.
@@ -2933,8 +2947,10 @@ mptscsih_dev_reset(Scsi_Cmnd * SCpnt)
                                hd->ioc->name, SCpnt);
                hd->tmPending = 0;
                hd->tmState = TM_STATE_NONE;
+               spin_lock_irq(host_lock);
                return FAILED;
        }
+       spin_lock_irq(host_lock);
        return SUCCESS;
 
 }
@@ -2952,11 +2968,12 @@ int
 mptscsih_bus_reset(Scsi_Cmnd * SCpnt)
 {
        MPT_SCSI_HOST   *hd;
+       spinlock_t      *host_lock = SCpnt->device->host->host_lock;
 
        /* If we can't locate our host adapter structure, return FAILED status.
         */
        if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
-               nehprintk((KERN_WARNING MYNAM ": mptscsih_bus_reset: "
+               dtmprintk((KERN_WARNING MYNAM ": mptscsih_bus_reset: "
                           "Can't locate host! (sc=%p)\n",
                           SCpnt ) );
                return FAILED;
@@ -2973,17 +2990,19 @@ mptscsih_bus_reset(Scsi_Cmnd * SCpnt)
         *  call to mptscsih_tm_pending_wait() will set the pending flag if we are
         *  successful.
         */
+       spin_unlock_irq(host_lock);
        if (mptscsih_tm_pending_wait(hd) == FAILED) {
-               nehprintk((KERN_WARNING MYNAM ": %s: mptscsih_bus_reset: "
+               dtmprintk((KERN_WARNING MYNAM ": %s: mptscsih_bus_reset: "
                           "Timed out waiting for previous TM to complete! "
                           "(sc = %p)\n",
                           hd->ioc->name, SCpnt));
+               spin_lock_irq(host_lock);
                return FAILED;
        }
 
        /* We are now ready to execute the task management request. */
        if (mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
-                              0, 0, 0, NO_SLEEP)
+                              0, 0, 0, CAN_SLEEP)
            < 0){
 
                /* The TM request failed and the subsequent FW-reload failed!
@@ -2994,9 +3013,10 @@ mptscsih_bus_reset(Scsi_Cmnd * SCpnt)
                       hd->ioc->name, SCpnt);
                hd->tmPending = 0;
                hd->tmState = TM_STATE_NONE;
+               spin_lock_irq(host_lock);
                return FAILED;
        }
-
+       spin_lock_irq(host_lock);
        return SUCCESS;
 }
 
@@ -3015,10 +3035,11 @@ mptscsih_host_reset(Scsi_Cmnd *SCpnt)
 {
        MPT_SCSI_HOST *  hd;
        int              status = SUCCESS;
+       spinlock_t      *host_lock = SCpnt->device->host->host_lock;
 
        /*  If we can't locate the host to reset, then we failed. */
        if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
-               nehprintk( ( KERN_WARNING MYNAM ": mptscsih_host_reset: "
+               dtmprintk( ( KERN_WARNING MYNAM ": mptscsih_host_reset: "
                             "Can't locate host! (sc=%p)\n",
                             SCpnt ) );
                return FAILED;
@@ -3032,7 +3053,8 @@ mptscsih_host_reset(Scsi_Cmnd *SCpnt)
        /*  If our attempts to reset the host failed, then return a failed
         *  status.  The host will be taken off line by the SCSI mid-layer.
         */
-       if (mpt_HardResetHandler(hd->ioc, NO_SLEEP) < 0){
+       spin_unlock_irq(host_lock);
+       if (mpt_HardResetHandler(hd->ioc, CAN_SLEEP) < 0){
                status = FAILED;
        } else {
                /*  Make sure TM pending is cleared and TM state is set to
@@ -3041,9 +3063,10 @@ mptscsih_host_reset(Scsi_Cmnd *SCpnt)
                hd->tmPending = 0;
                hd->tmState = TM_STATE_NONE;
        }
+       spin_lock_irq(host_lock);
 
 
-       nehprintk( ( KERN_WARNING MYNAM ": mptscsih_host_reset: "
+       dtmprintk( ( KERN_WARNING MYNAM ": mptscsih_host_reset: "
                     "Status = %s\n",
                     (status == SUCCESS) ? "SUCCESS" : "FAILED" ) );
 
@@ -3075,7 +3098,8 @@ mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd)
                        break;
                }
                spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
-               mdelay(250);
+               set_current_state(TASK_INTERRUPTIBLE);
+               schedule_timeout(HZ/4);
        } while (--loop_count);
 
        return status;
@@ -4716,13 +4740,30 @@ static void mptscsih_taskmgmt_timeout(unsigned long data)
        /* Call the reset handler. Already had a TM request
         * timeout - so issue a diagnostic reset
         */
-       if (mpt_HardResetHandler(hd->ioc, NO_SLEEP) < 0) {
+       MPT_INIT_WORK(&mptscsih_rstTask, mptscsih_schedule_reset, (void *)hd);
+       SCHEDULE_TASK(&mptscsih_rstTask);
+       return;
+}
+
+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
+/*     mptscsih_schedule_reset - Call back for timeout on a
+ *     task management request.
+ *     @data: Pointer to MPT_SCSI_HOST recast as an unsigned long
+ *
+ */
+static void
+mptscsih_schedule_reset(void *arg)
+{
+        MPT_SCSI_HOST           *hd;
+        hd = (MPT_SCSI_HOST *) arg;
+
+       if (mpt_HardResetHandler(hd->ioc, CAN_SLEEP) < 0) {
                printk((KERN_WARNING " Firmware Reload FAILED!!\n"));
        } else {
                /* Because we have reset the IOC, no TM requests can be
                 * pending.  So let's make sure the tmPending flag is reset.
                 */
-               nehprintk((KERN_WARNING MYNAM
+               dtmprintk((KERN_WARNING MYNAM
                           ": %s: mptscsih_taskmgmt_timeout\n",
                           hd->ioc->name));
                hd->tmPending = 0;
@@ -6900,7 +6941,7 @@ static char setup_token[] __initdata =
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 static int
-__init get_setup_token(char *p)
+get_setup_token(char *p)
 {
        char *cur = setup_token;
        char *pc;
@@ -6918,7 +6959,7 @@ __init get_setup_token(char *p)
 
 /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
 static int
-__init mptscsih_setup(char *str)
+mptscsih_setup(char *str)
 {
        char *cur = str;
        char *pc, *pv;
index 76ffd0e..04dd95c 100644 (file)
  *
  *      (see also mptbase.c)
  *
- *  Copyright (c) 1999-2002 LSI Logic Corporation
+ *  Copyright (c) 1999-2003 LSI Logic Corporation
  *  Originally By: Steven J. Ralston
  *  (mailto:netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: mptscsih.h,v 1.21 2002/12/03 21:26:35 pdelaney Exp $
  */
index 0dd95e8..d329791 100644 (file)
@@ -4,10 +4,10 @@
  *      (Ultimately) SCSI-3 definitions; for now, inheriting
  *      SCSI-2 definitions.
  *
- *  Copyright (c) 1996-2002 Steven J. Ralston
+ *  Copyright (c) 1996-2003 Steven J. Ralston
  *  Written By: Steven J. Ralston (19960517)
  *  (mailto:sjralston1@netscape.net)
- *  (mailto:Pam.Delaney@lsil.com)
+ *  (mailto:mpt_linux_developer@lsil.com)
  *
  *  $Id: scsi3.h,v 1.9 2002/02/27 18:45:02 sralston Exp $
  */
index f9f12c2..7e471fe 100644 (file)
@@ -8,6 +8,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/init.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <asm/io.h>
index fc1646e..9fd9376 100644 (file)
@@ -2475,10 +2475,11 @@ static int rtl8139_suspend (struct pci_dev *pdev, u32 state)
        tp->stats.rx_missed_errors += RTL_R32 (RxMissed);
        RTL_W32 (RxMissed, 0);
 
+       spin_unlock_irqrestore (&tp->lock, flags);
+
        pci_set_power_state (pdev, 3);
        pci_save_state (pdev, tp->pci_state);
 
-       spin_unlock_irqrestore (&tp->lock, flags);
        return 0;
 }
 
index 5aa4377..0a10a05 100644 (file)
@@ -2061,19 +2061,10 @@ config IXGB_NAPI
 endmenu
 
 
-config ISERIES_VETH
+config VETH
        tristate "iSeries Virtual Ethernet driver support"
        depends on NETDEVICES && PPC_ISERIES
 
-config IBMVETH
-       tristate "IBM LAN Virtual Ethernet support"
-       depends on NET_ETHERNET && PPC_PSERIES
-       ---help---
-         This is the Virtual Ethernet adapter driver.  
-
-         To compile this driver as a module, choose M here and read
-         <file:Documentation/networking/net-modules.txt>. 
-
 config FDDI
        bool "FDDI driver support"
        depends on NETDEVICES && (PCI || EISA)
index 154aa92..5d9ecba 100644 (file)
@@ -45,7 +45,7 @@ obj-$(CONFIG_SIS190) += sis190.o
 obj-$(CONFIG_SIS900) += sis900.o
 obj-$(CONFIG_YELLOWFIN) += yellowfin.o
 obj-$(CONFIG_ACENIC) += acenic.o
-obj-$(CONFIG_ISERIES_VETH) += iseries_veth.o
+obj-$(CONFIG_VETH) += veth.o
 obj-$(CONFIG_NATSEMI) += natsemi.o
 obj-$(CONFIG_NS83820) += ns83820.o
 obj-$(CONFIG_STNIC) += stnic.o 8390.o
@@ -175,7 +175,6 @@ obj-$(CONFIG_TUN) += tun.o
 obj-$(CONFIG_DL2K) += dl2k.o
 obj-$(CONFIG_R8169) += r8169.o
 obj-$(CONFIG_AMD8111_ETH) += amd8111e.o
-obj-$(CONFIG_IBMVETH) += ibmveth.o
 
 obj-$(CONFIG_ARM) += arm/
 obj-$(CONFIG_NET_FC) += fc/
index 9fc0055..5bed209 100644 (file)
@@ -3910,7 +3910,6 @@ static void bond_free_all(void)
 
                unregister_netdevice(dev);
                bond_deinit(dev);
-               free_netdev(dev);
        }
 
 #ifdef CONFIG_PROC_FS
@@ -4008,6 +4007,8 @@ static int __init bond_init(struct net_device *dev)
        bond_create_proc_info(bond);
 #endif
 
+       dev->destructor = free_netdev;
+
        list_add_tail(&bond->bond_list, &bond_dev_list);
 
        return 0;
index af8b183..dd2abd4 100644 (file)
@@ -47,7 +47,7 @@
                     : <klee@crystal.cirrus.com>)
                     : Don't call netif_wake_queue() in net_send_packet()
                     : Fixed an out-of-mem bug in dma_rx()
-                    : Updated Documentation/cs89x0.txt
+                    : Updated Documentation/networking/cs89x0.txt
 
   Andrew Morton     : andrewm@uow.edu.au / Kernel 2.3.99-pre1
                     : Use skb_reserve to longword align IP header (two places)
index 1ffaecd..ac59098 100644 (file)
@@ -60,7 +60,7 @@ static const u8 def_config[] = {
  * All other init functions will only set values that are
  * different from the 82557 default.
  */
-void __devinit
+void
 e100_config_init_82557(struct e100_private *bdp)
 {
        /* initialize config block */
@@ -104,7 +104,7 @@ e100_config_init_82557(struct e100_private *bdp)
        e100_config_mulcast_enbl(bdp, false);
 }
 
-static void __devinit
+static void
 e100_config_init_82558(struct e100_private *bdp)
 {
        /* MWI enable. This should be turned on only if the adapter is a 82558/9
@@ -136,7 +136,7 @@ e100_config_init_82558(struct e100_private *bdp)
        e100_config_long_rx(bdp, true);
 }
 
-static void __devinit
+static void
 e100_config_init_82550(struct e100_private *bdp)
 {
        /* The D102 chip allows for 32 config bytes.  This value is
@@ -160,7 +160,7 @@ e100_config_init_82550(struct e100_private *bdp)
 }
 
 /* Initialize the adapter's configure block */
-void __devinit
+void
 e100_config_init(struct e100_private *bdp)
 {
        e100_config_init_82557(bdp);
index 9733f4d..371f6ff 100644 (file)
@@ -124,7 +124,7 @@ static void e100_free_nontx_list(struct e100_private *);
 static void e100_non_tx_background(unsigned long);
 static inline void e100_tx_skb_free(struct e100_private *bdp, tcb_t *tcb);
 /* Global Data structures and variables */
-char e100_copyright[] __devinitdata = "Copyright (c) 2003 Intel Corporation";
+char e100_copyright[] = "Copyright (c) 2003 Intel Corporation";
 char e100_driver_version[]="2.3.30-k1";
 const char *e100_full_driver_name = "Intel(R) PRO/100 Network Driver";
 char e100_short_driver_name[] = "e100";
@@ -539,7 +539,7 @@ e100_trigger_SWI(struct e100_private *bdp)
        readw(&(bdp->scb->scb_status)); /* flushes last write, read-safe */
 }
 
-static int __devinit
+static int
 e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent)
 {
        static int first_time = true;
@@ -823,7 +823,7 @@ module_exit(e100_cleanup_module);
  *
  * This routine does range checking on command-line options
  */
-void __devinit
+void
 e100_check_options(int board, struct e100_private *bdp)
 {
        if (board >= E100_MAX_NIC) {
@@ -894,7 +894,7 @@ e100_check_options(int board, struct e100_private *bdp)
  * If the option's value is '-1' use the specified default.
  * Otherwise, if the value is invalid, change it to the default.
  */
-void __devinit
+void
 e100_set_int_option(int *option, int val, int min, int max, int default_val,
                    char *name)
 {
@@ -928,7 +928,7 @@ e100_set_int_option(int *option, int val, int min, int max, int default_val,
  * Otherwise, if the value is invalid (not 0 or 1), 
  * change it to the default.
  */
-void __devinit
+void
 e100_set_bool_option(struct e100_private *bdp, int val, u32 mask,
                     int default_val, char *name)
 {
@@ -1241,7 +1241,7 @@ e100_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
  *      true: if successful
  *      false: otherwise
  */
-static unsigned char __devinit
+static unsigned char
 e100_init(struct e100_private *bdp)
 {
        u32 st_timeout = 0;
@@ -1290,7 +1290,7 @@ e100_init(struct e100_private *bdp)
  *      true: if S/W was successfully initialized
  *      false: otherwise
  */
-static unsigned char __devinit
+static unsigned char
 e100_sw_init(struct e100_private *bdp)
 {
        bdp->next_cu_cmd = START_WAIT;  // init the next cu state
@@ -1318,7 +1318,7 @@ e100_sw_init(struct e100_private *bdp)
        return 1;
 }
 
-static void __devinit
+static void
 e100_tco_workaround(struct e100_private *bdp)
 {
        int i;
@@ -1500,7 +1500,7 @@ e100_setup_tcb_pool(tcb_t *head, unsigned int qlen, struct e100_private *bdp)
                pcurr_tcb->tcb_skb = NULL;
        }
 
-       mb();
+       wmb();
 }
 
 /***************************************************************************/
@@ -1519,7 +1519,7 @@ e100_setup_tcb_pool(tcb_t *head, unsigned int qlen, struct e100_private *bdp)
  *      0: if the operation was successful
  *      %-ENOMEM: if memory allocation failed
  */
-unsigned char __devinit
+unsigned char
 e100_alloc_space(struct e100_private *bdp)
 {
        unsigned long off;
@@ -1753,7 +1753,7 @@ e100_watchdog(struct net_device *dev)
        /* Check for command completion on next watchdog timer. */
        e100_dump_stats_cntrs(bdp);
 
-       mb();
+       wmb();
 
        /* relaunch watchdog timer in 2 sec */
        mod_timer(&(bdp->watchdog_timer), jiffies + (2 * HZ));
@@ -2229,7 +2229,7 @@ e100_prepare_xmit_buff(struct e100_private *bdp, struct sk_buff *skb)
 
        bdp->tcb_pool.tail = NEXT_TCB_TOUSE(bdp->tcb_pool.tail);
 
-       mb();
+       wmb();
 
        e100_start_cu(bdp, tcb);
 
@@ -2508,7 +2508,7 @@ e100_cmd_complete_location(struct e100_private *bdp)
  *      true: if successfully cleared stat counters
  *      false: otherwise
  */
-static unsigned char __devinit
+static unsigned char
 e100_clr_cntrs(struct e100_private *bdp)
 {
        volatile u32 *pcmd_complete;
@@ -2516,7 +2516,7 @@ e100_clr_cntrs(struct e100_private *bdp)
        /* clear the dump counter complete word */
        pcmd_complete = e100_cmd_complete_location(bdp);
        *pcmd_complete = 0;
-       mb();
+       wmb();
 
        if (!e100_wait_exec_cmplx(bdp, bdp->stat_cnt_phys, SCB_CUC_DUMP_ADDR, 0))
                return false;
@@ -2651,7 +2651,7 @@ e100_exec_non_cu_cmd(struct e100_private *bdp, nxmit_cb_entry_t *command)
        ntcb_hdr->cb_status = 0;
        ntcb_hdr->cb_lnk_ptr = 0;
 
-       mb();
+       wmb();
        if (in_interrupt())
                return e100_delayed_exec_non_cu_cmd(bdp, command);
 
@@ -2873,7 +2873,7 @@ e100_load_microcode(struct e100_private *bdp)
 /***************************************************************************/
 
 /* Read PWA (printed wired assembly) number */
-void __devinit
+void
 e100_rd_pwa_no(struct e100_private *bdp)
 {
        bdp->pwa_no = e100_eeprom_read(bdp, EEPROM_PWA_NO);
@@ -2882,7 +2882,7 @@ e100_rd_pwa_no(struct e100_private *bdp)
 }
 
 /* Read the permanent ethernet address from the eprom. */
-void __devinit
+void
 e100_rd_eaddr(struct e100_private *bdp)
 {
        int i;
@@ -2947,7 +2947,7 @@ e100_D101M_checksum(struct e100_private *bdp, struct sk_buff *skb)
 /***************************************************************************/
 
 /* Print the board's configuration */
-void __devinit
+void
 e100_print_brd_conf(struct e100_private *bdp)
 {
        /* Print the string if checksum Offloading was enabled */
@@ -2975,7 +2975,7 @@ e100_print_brd_conf(struct e100_private *bdp)
  *      true: if successfull
  *      false: otherwise
  */
-static unsigned char __devinit
+static unsigned char
 e100_pci_setup(struct pci_dev *pcid, struct e100_private *bdp)
 {
        struct net_device *dev = bdp->device;
@@ -3754,7 +3754,7 @@ e100_ethtool_led_blink(struct net_device *dev, struct ifreq *ifr)
        return 0;
 }
 
-static inline int __devinit
+static inline int
 e100_10BaseT_adapter(struct e100_private *bdp)
 {
        return ((bdp->pdev->device == 0x1229) &&
@@ -3762,7 +3762,7 @@ e100_10BaseT_adapter(struct e100_private *bdp)
                (bdp->pdev->subsystem_device == 0x0003));
 }
 
-static void __devinit
+static void
 e100_get_speed_duplex_caps(struct e100_private *bdp)
 {
        u16 status;
index ad8e6a6..955a361 100644 (file)
@@ -132,7 +132,7 @@ e100_mdi_read(struct e100_private *bdp, u32 reg_addr, u32 phy_addr, u16 *data)
        }
 }
 
-static unsigned char __devinit
+static unsigned char
 e100_phy_valid(struct e100_private *bdp, unsigned int phy_address)
 {
        u16 ctrl_reg, stat_reg;
@@ -150,7 +150,7 @@ e100_phy_valid(struct e100_private *bdp, unsigned int phy_address)
        return true;
 }
 
-static void __devinit
+static void
 e100_phy_address_detect(struct e100_private *bdp)
 {
        unsigned int addr;
@@ -180,7 +180,7 @@ e100_phy_address_detect(struct e100_private *bdp)
        }
 }
 
-static void __devinit
+static void
 e100_phy_id_detect(struct e100_private *bdp)
 {
        u16 low_id_reg, high_id_reg;
@@ -204,7 +204,7 @@ e100_phy_id_detect(struct e100_private *bdp)
                      ((unsigned int) high_id_reg << 16));
 }
 
-static void __devinit
+static void
 e100_phy_isolate(struct e100_private *bdp)
 {
        unsigned int phy_address;
@@ -227,7 +227,7 @@ e100_phy_isolate(struct e100_private *bdp)
        }
 }
 
-static unsigned char __devinit
+static unsigned char
 e100_phy_specific_setup(struct e100_private *bdp)
 {
        u16 misc_reg;
@@ -380,7 +380,7 @@ e100_phy_fix_squelch(struct e100_private *bdp)
  * Returns:
  *     NOTHING
  */
-static void __devinit
+static void
 e100_fix_polarity(struct e100_private *bdp)
 {
        u16 status;
@@ -916,7 +916,7 @@ e100_phy_reset(struct e100_private *bdp)
        schedule_timeout(HZ / 2);
 }
 
-unsigned char __devinit
+unsigned char
 e100_phy_init(struct e100_private *bdp)
 {
        e100_phy_reset(bdp);
index af4c295..208a920 100644 (file)
@@ -316,7 +316,7 @@ e100_diag_loopback_alloc(struct e100_private *bdp)
        memset((void *) ((u8 *) tbd + sizeof (tbd_t)), 0xFF, 512);
        /* The value of second 512 bytes is BA */
        memset((void *) ((u8 *) tbd + sizeof (tbd_t) + 512), 0xBA, 512);
-       mb();
+       wmb();
        rfd = pci_alloc_consistent(bdp->pdev, sizeof (rfd_t), &dma_handle);
 
        if (rfd == NULL) {
@@ -335,7 +335,7 @@ e100_diag_loopback_alloc(struct e100_private *bdp)
        bdp->loopback.dma_handle = dma_handle;
        bdp->loopback.tcb = tcb;
        bdp->loopback.rfd = rfd;
-       mb();
+       wmb();
        return true;
 }
 
index 0eec5d3..7d4afa3 100644 (file)
@@ -1196,11 +1196,7 @@ static void t_tail(unsigned long channel)
        if (scc->stat.tx_state == TXS_TIMEOUT)          /* we had a timeout? */
        {
                scc->stat.tx_state = TXS_WAIT;
-
-               if (scc->kiss.mintime != TIMER_OFF)     /* try it again */
-                       scc_start_tx_timer(scc, t_dwait, scc->kiss.mintime*100);
-               else
-                       scc_start_tx_timer(scc, t_dwait, 0);
+               scc_start_tx_timer(scc, t_dwait, scc->kiss.mintime*100);
                return;
        }
        
@@ -1274,8 +1270,7 @@ static void t_idle(unsigned long channel)
        del_timer(&scc->tx_wdog);
 
        scc_key_trx(scc, TX_OFF);
-
-       if (scc->kiss.mintime != TIMER_OFF)
+       if(scc->kiss.mintime)
                scc_start_tx_timer(scc, t_dwait, scc->kiss.mintime*100);
        scc->stat.tx_state = TXS_WAIT;
 }
diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c
deleted file mode 100644 (file)
index f8a2eb3..0000000
+++ /dev/null
@@ -1,1136 +0,0 @@
-/**************************************************************************/
-/*                                                                        */
-/* IBM eServer i/pSeries Virtual Ethernet Device Driver                   */
-/* Copyright (C) 2003 IBM Corp.                                           */
-/*  Dave Larson (larson1@us.ibm.com)                                      */
-/*  Santiago Leon (santil@us.ibm.com)                                     */
-/*                                                                        */
-/*  This program is free software; you can redistribute it and/or modify  */
-/*  it under the terms of the GNU General Public License as published by  */
-/*  the Free Software Foundation; either version 2 of the License, or     */
-/*  (at your option) any later version.                                   */
-/*                                                                        */
-/*  This program is distributed in the hope that it will be useful,       */
-/*  but WITHOUT ANY WARRANTY; without even the implied warranty of        */
-/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         */
-/*  GNU General Public License for more details.                          */
-/*                                                                        */
-/*  You should have received a copy of the GNU General Public License     */
-/*  along with this program; if not, write to the Free Software           */
-/*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  */
-/*                                                                   USA  */
-/*                                                                        */
-/* This module contains the implementation of a virtual ethernet device   */
-/* for use with IBM i/pSeries LPAR Linux.  It utilizes the logical LAN    */
-/* option of the RS/6000 Platform Architechture to interface with virtual */
-/* ethernet NICs that are presented to the partition by the hypervisor.   */
-/*                                                                        */ 
-/**************************************************************************/
-/*
-   TODO:
-     - remove frag processing code - no longer needed
-     - add support for sysfs
-     - possibly remove procfs support
-*/
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/version.h>
-#include <linux/types.h>
-#include <linux/errno.h>
-#include <linux/ioport.h>
-#include <linux/pci.h>
-#include <linux/kernel.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/mm.h>
-#ifdef SIOCETHTOOL
-#include <linux/ethtool.h>
-#endif
-#include <linux/proc_fs.h>
-#include <asm/semaphore.h>
-#include <asm/hvcall.h>
-#include <asm/atomic.h>
-#include <asm/pci_dma.h>
-#include <asm/vio.h>
-#include <asm/uaccess.h>
-#ifdef CONFIG_PROC_FS
-#include <linux/proc_fs.h>
-#endif
-
-#include "ibmveth.h"
-
-#define DEBUG 1
-
-#define ibmveth_printk(fmt, args...) \
-  printk(KERN_INFO "%s: " fmt, __FILE__, ## args)
-
-#define ibmveth_error_printk(fmt, args...) \
-  printk(KERN_ERR "(%s:%3.3d ua:%lx) ERROR: " fmt, __FILE__, __LINE__ , adapter->vdev->unit_address, ## args)
-
-#ifdef DEBUG
-#define ibmveth_debug_printk_no_adapter(fmt, args...) \
-  printk(KERN_DEBUG "(%s:%3.3d): " fmt, __FILE__, __LINE__ , ## args)
-#define ibmveth_debug_printk(fmt, args...) \
-  printk(KERN_DEBUG "(%s:%3.3d ua:%lx): " fmt, __FILE__, __LINE__ , adapter->vdev->unit_address, ## args)
-#define ibmveth_assert(expr) \
-  if(!(expr)) {                                   \
-    printk(KERN_DEBUG "assertion failed (%s:%3.3d ua:%lx): %s\n", __FILE__, __LINE__, adapter->vdev->unit_address, #expr); \
-    BUG(); \
-  }
-#else
-#define ibmveth_debug_printk_no_adapter(fmt, args...)
-#define ibmveth_debug_printk(fmt, args...)
-#define ibmveth_assert(expr) 
-#endif
-
-static int ibmveth_open(struct net_device *dev);
-static int ibmveth_close(struct net_device *dev);
-static int ibmveth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
-static int ibmveth_poll(struct net_device *dev, int *budget);
-static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *dev);
-static struct net_device_stats *ibmveth_get_stats(struct net_device *dev);
-static void ibmveth_set_multicast_list(struct net_device *dev);
-static void ibmveth_proc_register_driver(void);
-static void ibmveth_proc_unregister_driver(void);
-static void ibmveth_proc_register_adapter(struct ibmveth_adapter *adapter);
-static void ibmveth_proc_unregister_adapter(struct ibmveth_adapter *adapter);
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-static irqreturn_t ibmveth_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
-#define INIT_BOTTOM_HALF(x,y,z) INIT_WORK(x, y, (void*)z)
-#define SCHEDULE_BOTTOM_HALF(x) schedule_work(x)
-#else
-static void ibmveth_interrupt(int irq, void *dev_instance, struct pt_regs *regs);
-#define INIT_BOTTOM_HALF(x,y,z) tasklet_init(x, y, (unsigned long)z)
-#define SCHEDULE_BOTTOM_HALF(x) tasklet_schedule(x)
-#endif
-
-#ifdef CONFIG_PROC_FS
-#define IBMVETH_PROC_DIR "ibmveth"
-static struct proc_dir_entry *ibmveth_proc_dir;
-#endif
-
-char ibmveth_driver_name[] = "ibmveth";
-char ibmveth_driver_string[] = "IBM i/pSeries Virtual Ethernet Driver";
-char ibmveth_driver_version[] = "1.0";
-
-char ibmveth_driver_cvs_version[] = "$Revision: 1.7 $";
-char ibmveth_driver_cvs_tag[] = "$Name:  $";
-
-MODULE_AUTHOR("Dave Larson <larson1@us.ibm.com>");
-MODULE_DESCRIPTION("IBM i/pSeries Virtual Ethernet Driver");
-MODULE_LICENSE("GPL");
-
-/* simple methods of getting data from the current rxq entry */
-static inline int ibmveth_rxq_pending_buffer(struct ibmveth_adapter *adapter)
-{
-    return (adapter->rx_queue.queue_addr[adapter->rx_queue.index].toggle == adapter->rx_queue.toggle);
-}
-
-static inline int ibmveth_rxq_buffer_valid(struct ibmveth_adapter *adapter)
-{
-    return (adapter->rx_queue.queue_addr[adapter->rx_queue.index].valid);
-}
-
-static inline int ibmveth_rxq_frame_offset(struct ibmveth_adapter *adapter)
-{
-    return (adapter->rx_queue.queue_addr[adapter->rx_queue.index].offset);
-}
-
-static inline int ibmveth_rxq_frame_length(struct ibmveth_adapter *adapter)
-{
-    return (adapter->rx_queue.queue_addr[adapter->rx_queue.index].length);
-}
-
-/* setup the initial settings for a buffer pool */
-static void ibmveth_init_buffer_pool(struct ibmveth_buff_pool *pool, u32 pool_index, u32 pool_size, u32 buff_size)
-{
-    pool->size = pool_size;
-    pool->index = pool_index;
-    pool->buff_size = buff_size;
-    pool->threshold = pool_size / 2;
-}
-
-/* allocate and setup an buffer pool - called during open */
-static int ibmveth_alloc_buffer_pool(struct ibmveth_buff_pool *pool)
-{
-    int i;
-
-    pool->free_map = kmalloc(sizeof(u16) * pool->size, GFP_KERNEL); 
-
-    if(!pool->free_map) {
-       /* ibmveth_cleanup will take care of cleanup in this case */
-       return -1;
-    }
-
-    pool->dma_addr = kmalloc(sizeof(dma_addr_t) * pool->size, GFP_KERNEL); 
-    pool->skbuff = kmalloc(sizeof(void*) * pool->size, GFP_KERNEL);
-
-    if(!pool->skbuff || !pool->dma_addr) {
-       /* ibmveth_cleanup will take care of cleanup in this case */
-       return -1;
-    }
-
-    memset(pool->skbuff, 0, sizeof(void*) * pool->size);
-    memset(pool->dma_addr, 0, sizeof(dma_addr_t) * pool->size);
-
-    for(i = 0; i < pool->size; ++i) {
-       pool->free_map[i] = i;
-    }
-
-    atomic_set(&pool->available, 0);
-    pool->producer_index = 0;
-    pool->consumer_index = 0;
-
-    return 0;
-}
-
-/* replenish the buffers for a pool */
-static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struct ibmveth_buff_pool *pool)
-{
-    u32 i;
-    u32 count = pool->size - atomic_read(&pool->available);
-    u32 buffers_added = 0;
-
-    mb();
-
-    for(i = 0; i < count; ++i) {
-       struct sk_buff *skb;
-       unsigned int free_index, index;
-       u64 correlator;
-       union ibmveth_buf_desc desc;
-       unsigned long lpar_rc;
-       dma_addr_t dma_addr;
-
-       skb = alloc_skb(pool->buff_size, GFP_ATOMIC);
-
-       if(!skb) {
-           ibmveth_debug_printk("replenish: unable to allocate skb\n");
-           adapter->replenish_no_mem++;
-           break;
-       }
-
-       free_index = pool->consumer_index++ % pool->size;
-       index = pool->free_map[free_index];
-       
-       ibmveth_assert(index != 0xFFFF);
-       ibmveth_assert(pool->skbuff[index] == NULL);
-
-       dma_addr = vio_map_single(adapter->vdev, skb->data, pool->buff_size, PCI_DMA_FROMDEVICE);
-
-       pool->dma_addr[index] = dma_addr;
-       pool->skbuff[index] = skb;
-
-       correlator = ((u64)pool->index << 32) | index;
-       *(u64*)skb->data = correlator;
-
-       desc.desc = 0;
-       desc.fields.valid = 1;
-       desc.fields.length = pool->buff_size;
-       desc.fields.address = dma_addr; 
-
-       lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc);
-                   
-       if(lpar_rc != H_Success) {
-           pool->skbuff[index] = NULL;
-           pool->consumer_index--;
-           vio_unmap_single(adapter->vdev, pool->dma_addr[index], pool->buff_size, PCI_DMA_FROMDEVICE);
-           dev_kfree_skb_any(skb);
-           adapter->replenish_add_buff_failure++;
-           break;
-       } else {
-           pool->free_map[free_index] = 0xFFFF;
-           buffers_added++;
-           adapter->replenish_add_buff_success++;
-       }
-    }
-    
-    atomic_add(buffers_added, &(pool->available));
-}
-
-/* check if replenishing is needed */
-static inline int ibmveth_is_replenishing_needed(struct ibmveth_adapter *adapter)
-{
-    return ((atomic_read(&adapter->rx_buff_pool[0].available) < adapter->rx_buff_pool[0].threshold) ||
-           (atomic_read(&adapter->rx_buff_pool[1].available) < adapter->rx_buff_pool[1].threshold) ||
-           (atomic_read(&adapter->rx_buff_pool[2].available) < adapter->rx_buff_pool[2].threshold));
-}
-
-/* replenish tasklet routine */
-static void ibmveth_replenish_task(struct ibmveth_adapter *adapter) 
-{
-    adapter->replenish_task_cycles++;
-
-    ibmveth_replenish_buffer_pool(adapter, &adapter->rx_buff_pool[0]);
-    ibmveth_replenish_buffer_pool(adapter, &adapter->rx_buff_pool[1]);
-    ibmveth_replenish_buffer_pool(adapter, &adapter->rx_buff_pool[2]);
-
-    adapter->rx_no_buffer = *(u64*)(((char*)adapter->buffer_list_addr) + 4096 - 8);
-
-    if(ibmveth_is_replenishing_needed(adapter) || (atomic_dec_return(&adapter->in_replenish_task) > 0)) {
-       /* there is more work, or we didn't change in_replenish_task from 1 -> 0 */
-       atomic_set(&adapter->in_replenish_task, 1);
-       SCHEDULE_BOTTOM_HALF(&adapter->replenish_task);
-    }
-}
-
-/* kick the replenish tasklet if we need replenishing and it isn't already running */
-static inline void ibmveth_schedule_replenishing(struct ibmveth_adapter *adapter)
-{
-    if(ibmveth_is_replenishing_needed(adapter)) {      
-       if(atomic_inc_return(&adapter->in_replenish_task) == 1) {
-               SCHEDULE_BOTTOM_HALF(&adapter->replenish_task);
-       }
-    }
-}
-
-/* empty and free ana buffer pool - also used to do cleanup in error paths */
-static void ibmveth_free_buffer_pool(struct ibmveth_adapter *adapter, struct ibmveth_buff_pool *pool)
-{
-    int i;
-
-    if(pool->free_map) {
-       kfree(pool->free_map);
-       pool->free_map  = NULL;
-    }
-
-    if(pool->skbuff && pool->dma_addr) {
-       for(i = 0; i < pool->size; ++i) {
-           struct sk_buff *skb = pool->skbuff[i];
-           if(skb) {
-               vio_unmap_single(adapter->vdev,
-                                pool->dma_addr[i],
-                                pool->buff_size,
-                                PCI_DMA_FROMDEVICE);
-               dev_kfree_skb_any(skb);
-                pool->skbuff[i] = NULL;
-           }
-       }
-    }
-
-    if(pool->dma_addr) {
-       kfree(pool->dma_addr);
-       pool->dma_addr = NULL;
-    }
-
-    if(pool->skbuff) {
-       kfree(pool->skbuff);
-       pool->skbuff = NULL;
-    }
-}
-
-/* remove a buffer from a pool */
-static void ibmveth_remove_buffer_from_pool(struct ibmveth_adapter *adapter, u64 correlator)
-{
-    unsigned int pool  = correlator >> 32;
-    unsigned int index = correlator & 0xFFFFFFFF;
-    unsigned int free_index;
-    struct sk_buff *skb;
-
-    ibmveth_assert(pool < IbmVethNumBufferPools);
-    ibmveth_assert(index < adapter->rx_buff_pool[pool].size);
-
-    skb = adapter->rx_buff_pool[pool].skbuff[index];
-
-    ibmveth_assert(skb != NULL);
-
-    adapter->rx_buff_pool[pool].skbuff[index] = NULL;
-
-    vio_unmap_single(adapter->vdev,
-                    adapter->rx_buff_pool[pool].dma_addr[index],
-                    adapter->rx_buff_pool[pool].buff_size,
-                    PCI_DMA_FROMDEVICE);
-
-    free_index = adapter->rx_buff_pool[pool].producer_index++ % adapter->rx_buff_pool[pool].size;
-    adapter->rx_buff_pool[pool].free_map[free_index] = index;
-
-    mb();
-
-    atomic_dec(&(adapter->rx_buff_pool[pool].available));
-}
-
-/* get the current buffer on the rx queue */
-static inline struct sk_buff *ibmveth_rxq_get_buffer(struct ibmveth_adapter *adapter)
-{
-    u64 correlator = adapter->rx_queue.queue_addr[adapter->rx_queue.index].correlator;
-    unsigned int pool = correlator >> 32;
-    unsigned int index = correlator & 0xFFFFFFFF;
-
-    ibmveth_assert(pool < IbmVethNumBufferPools);
-    ibmveth_assert(index < adapter->rx_buff_pool[pool].size);
-
-    return adapter->rx_buff_pool[pool].skbuff[index];
-}
-
-/* recycle the current buffer on the rx queue */
-static void ibmveth_rxq_recycle_buffer(struct ibmveth_adapter *adapter)
-{
-    u32 q_index = adapter->rx_queue.index;
-    u64 correlator = adapter->rx_queue.queue_addr[q_index].correlator;
-    unsigned int pool = correlator >> 32;
-    unsigned int index = correlator & 0xFFFFFFFF;
-    union ibmveth_buf_desc desc;
-    unsigned long lpar_rc;
-
-    ibmveth_assert(pool < IbmVethNumBufferPools);
-    ibmveth_assert(index < adapter->rx_buff_pool[pool].size);
-
-    desc.desc = 0;
-    desc.fields.valid = 1;
-    desc.fields.length = adapter->rx_buff_pool[pool].buff_size;
-    desc.fields.address = adapter->rx_buff_pool[pool].dma_addr[index];
-
-    lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc);
-                   
-    if(lpar_rc != H_Success) {
-       ibmveth_debug_printk("h_add_logical_lan_buffer failed during recycle rc=%ld", lpar_rc);
-       ibmveth_remove_buffer_from_pool(adapter, adapter->rx_queue.queue_addr[adapter->rx_queue.index].correlator);
-    }
-
-    if(++adapter->rx_queue.index == adapter->rx_queue.num_slots) {
-       adapter->rx_queue.index = 0;
-       adapter->rx_queue.toggle = !adapter->rx_queue.toggle;
-    }
-}
-
-static inline void ibmveth_rxq_harvest_buffer(struct ibmveth_adapter *adapter)
-{
-    ibmveth_remove_buffer_from_pool(adapter, adapter->rx_queue.queue_addr[adapter->rx_queue.index].correlator);
-
-    if(++adapter->rx_queue.index == adapter->rx_queue.num_slots) {
-       adapter->rx_queue.index = 0;
-       adapter->rx_queue.toggle = !adapter->rx_queue.toggle;
-    }
-}
-
-static void ibmveth_cleanup(struct ibmveth_adapter *adapter)
-{
-    if(adapter->buffer_list_addr != NULL) {
-       if(adapter->buffer_list_dma != NO_TCE) {
-           vio_unmap_single(adapter->vdev, adapter->buffer_list_dma, 4096, PCI_DMA_BIDIRECTIONAL);
-           adapter->buffer_list_dma = NO_TCE;
-       }
-       free_page((unsigned long)adapter->buffer_list_addr);
-       adapter->buffer_list_addr = NULL;
-    } 
-
-    if(adapter->filter_list_addr != NULL) {
-       if(adapter->filter_list_dma != NO_TCE) {
-           vio_unmap_single(adapter->vdev, adapter->filter_list_dma, 4096, PCI_DMA_BIDIRECTIONAL);
-           adapter->filter_list_dma = NO_TCE;
-       }
-       free_page((unsigned long)adapter->filter_list_addr);
-       adapter->filter_list_addr = NULL;
-    }
-
-    if(adapter->rx_queue.queue_addr != NULL) {
-       if(adapter->rx_queue.queue_dma != NO_TCE) {
-           vio_unmap_single(adapter->vdev, adapter->rx_queue.queue_dma, adapter->rx_queue.queue_len, PCI_DMA_BIDIRECTIONAL);
-           adapter->rx_queue.queue_dma = NO_TCE;
-       }
-       kfree(adapter->rx_queue.queue_addr);
-       adapter->rx_queue.queue_addr = NULL;
-    }
-
-    ibmveth_free_buffer_pool(adapter, &adapter->rx_buff_pool[0]);
-    ibmveth_free_buffer_pool(adapter, &adapter->rx_buff_pool[1]);
-    ibmveth_free_buffer_pool(adapter, &adapter->rx_buff_pool[2]);
-}
-
-static int ibmveth_open(struct net_device *netdev)
-{
-    struct ibmveth_adapter *adapter = netdev->priv;
-    u64 mac_address = 0;
-    int rxq_entries;
-    unsigned long lpar_rc;
-    union ibmveth_buf_desc rxq_desc;
-
-    ibmveth_debug_printk("open starting\n");
-
-    rxq_entries =
-      adapter->rx_buff_pool[0].size +
-      adapter->rx_buff_pool[1].size +
-      adapter->rx_buff_pool[2].size + 1;
-    
-    adapter->buffer_list_addr = (void*) get_zeroed_page(GFP_KERNEL);
-    adapter->filter_list_addr = (void*) get_zeroed_page(GFP_KERNEL);
-    if(!adapter->buffer_list_addr || !adapter->filter_list_addr) {
-       ibmveth_error_printk("unable to allocate filter or buffer list pages\n");
-       ibmveth_cleanup(adapter);
-       return -ENOMEM;
-    }
-
-    adapter->rx_queue.queue_len = sizeof(struct ibmveth_rx_q_entry) * rxq_entries;
-    adapter->rx_queue.queue_addr = kmalloc(adapter->rx_queue.queue_len, GFP_KERNEL);
-
-    if(!adapter->rx_queue.queue_addr) {
-       ibmveth_error_printk("unable to allocate rx queue pages\n");
-       ibmveth_cleanup(adapter);
-       return -ENOMEM;
-    }
-
-    adapter->buffer_list_dma = vio_map_single(adapter->vdev, adapter->buffer_list_addr, 4096, PCI_DMA_BIDIRECTIONAL);
-    adapter->filter_list_dma = vio_map_single(adapter->vdev, adapter->filter_list_addr, 4096, PCI_DMA_BIDIRECTIONAL);
-    adapter->rx_queue.queue_dma = vio_map_single(adapter->vdev, adapter->rx_queue.queue_addr, adapter->rx_queue.queue_len, PCI_DMA_BIDIRECTIONAL);
-
-    if((adapter->buffer_list_dma == NO_TCE) || 
-       (adapter->filter_list_dma == NO_TCE) || 
-       (adapter->rx_queue.queue_dma == NO_TCE)) {
-       ibmveth_error_printk("unable to map filter or buffer list pages\n");
-       ibmveth_cleanup(adapter);
-       return -ENOMEM;
-    }
-
-    adapter->rx_queue.index = 0;
-    adapter->rx_queue.num_slots = rxq_entries;
-    adapter->rx_queue.toggle = 1;
-
-    if(ibmveth_alloc_buffer_pool(&adapter->rx_buff_pool[0]) ||
-       ibmveth_alloc_buffer_pool(&adapter->rx_buff_pool[1]) ||
-       ibmveth_alloc_buffer_pool(&adapter->rx_buff_pool[2]))
-    {
-       ibmveth_error_printk("unable to allocate buffer pools\n");
-       ibmveth_cleanup(adapter);
-       return -ENOMEM;
-    }
-
-    atomic_set(&adapter->in_replenish_task, 0);    
-
-    memcpy(&mac_address, netdev->dev_addr, netdev->addr_len);
-    mac_address = mac_address >> 16;
-
-    rxq_desc.desc = 0;
-    rxq_desc.fields.valid = 1;
-    rxq_desc.fields.length = adapter->rx_queue.queue_len;
-    rxq_desc.fields.address = adapter->rx_queue.queue_dma;
-
-    ibmveth_debug_printk("buffer list @ 0x%p\n", adapter->buffer_list_addr);
-    ibmveth_debug_printk("filter list @ 0x%p\n", adapter->filter_list_addr);
-    ibmveth_debug_printk("receive q   @ 0x%p\n", adapter->rx_queue.queue_addr);
-
-    
-    lpar_rc = h_register_logical_lan(adapter->vdev->unit_address,
-                                    adapter->buffer_list_dma,
-                                    rxq_desc.desc,
-                                    adapter->filter_list_dma,
-                                    mac_address);
-
-    if(lpar_rc != H_Success) {
-       ibmveth_error_printk("h_register_logical_lan failed with %ld\n", lpar_rc);
-       ibmveth_error_printk("buffer TCE:0x%x filter TCE:0x%x rxq desc:0x%lx MAC:0x%lx\n",
-                            adapter->buffer_list_dma,
-                            adapter->filter_list_dma,
-                            rxq_desc.desc,
-                            mac_address);
-       ibmveth_cleanup(adapter);
-       return -ENONET; /* TODO: what error should we use? */
-    }
-
-    ibmveth_debug_printk("registering irq 0x%x\n", netdev->irq);
-    if(request_irq(netdev->irq, &ibmveth_interrupt, 0, netdev->name, netdev) != 0) {
-       ibmveth_error_printk("unable to request irq 0x%x\n", netdev->irq);
-       h_free_logical_lan(adapter->vdev->unit_address);
-       ibmveth_cleanup(adapter);
-       return -ENONET; /* TODO: what errno should this be? */
-    }
-
-    ibmveth_debug_printk("scheduling initial replenish cycle\n");
-    ibmveth_schedule_replenishing(adapter);
-
-    ibmveth_debug_printk("open complete\n");
-
-    return 0;
-}
-
-static int ibmveth_close(struct net_device *netdev)
-{
-    struct ibmveth_adapter *adapter = netdev->priv;
-    long lpar_rc;
-    
-    ibmveth_debug_printk("close starting\n");
-
-    free_irq(netdev->irq, netdev);
-
-    while(atomic_read(&adapter->in_replenish_task)) {
-       udelay(100);
-    }
-
-    lpar_rc = h_free_logical_lan(adapter->vdev->unit_address);
-
-    if(lpar_rc != H_Success)
-    {
-       ibmveth_error_printk("h_free_logical_lan failed with %lx, continuing with close\n",
-                            lpar_rc);
-    }
-
-    adapter->rx_no_buffer = *(u64*)(((char*)adapter->buffer_list_addr) + 4096 - 8);
-
-    ibmveth_cleanup(adapter);
-
-    ibmveth_debug_printk("close complete\n");
-
-    return 0;
-}
-
-static int ibmveth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-{
-#ifdef SIOCETHTOOL
-    struct ibmveth_adapter *adapter = dev->priv;
-    u32 ethtool_command; 
-
-    if (cmd != SIOCETHTOOL) {
-       ibmveth_debug_printk("unsupported ioctl 0x%xd\n", cmd);
-       return -EOPNOTSUPP;
-    }
-
-    if(get_user(ethtool_command, (u32*)ifr->ifr_data)) {
-       ibmveth_debug_printk("unable to copy from user memory\n");
-       return -EFAULT;
-    }
-
-    ibmveth_debug_printk("SIOCETHTOOL cmd %d\n", ethtool_command); 
-    switch (ethtool_command) {
-       case ETHTOOL_GSET: {
-               struct ethtool_cmd ecmd = {ETHTOOL_GSET};
-               ecmd.supported = (SUPPORTED_1000baseT_Full | SUPPORTED_Autoneg | SUPPORTED_FIBRE);
-               ecmd.advertising = (ADVERTISED_1000baseT_Full | ADVERTISED_Autoneg | ADVERTISED_FIBRE);
-               ecmd.speed = SPEED_1000;
-               ecmd.duplex = DUPLEX_FULL;
-               ecmd.port = PORT_FIBRE;
-               ecmd.phy_address = 0;
-               ecmd.transceiver = XCVR_INTERNAL;
-               ecmd.autoneg = AUTONEG_ENABLE;
-               ecmd.maxtxpkt = 0;
-               ecmd.maxrxpkt = 1;
-               if(copy_to_user(ifr->ifr_data, &ecmd, sizeof(ecmd)))
-                   return -EFAULT;
-               return 0;
-           }   
-
-       case ETHTOOL_GDRVINFO: {
-               struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
-               strncpy(info.driver, ibmveth_driver_name, sizeof(info.driver) - 1);
-               strncpy(info.version, ibmveth_driver_version, sizeof(info.version) - 1);
-
-               if (copy_to_user(ifr->ifr_data, &info, sizeof(info)))
-                   return -EFAULT;
-               return 0;
-           }
-
-       case ETHTOOL_GLINK: {
-               struct ethtool_value edata = {ETHTOOL_GLINK};
-
-               if (copy_to_user(ifr->ifr_data, &edata, sizeof(edata)))
-                   return -EFAULT;
-               return 0;
-           }
-
-       default:
-           break;
-    }
-#endif
-    return -EOPNOTSUPP;
-}
-
-#define page_offset(v) ((unsigned long)(v) & ((1 << 12) - 1))
-
-static int ibmveth_start_xmit(struct sk_buff *skb, struct net_device *netdev)
-{
-    struct ibmveth_adapter *adapter = netdev->priv;
-    union ibmveth_buf_desc desc[IbmVethMaxSendFrags];
-    unsigned long lpar_rc;
-    int nfrags = 0, curfrag;
-
-    if ((skb_shinfo(skb)->nr_frags + 1) > IbmVethMaxSendFrags) {
-       adapter->tx_linearized++;
-       if(skb_linearize(skb, GFP_ATOMIC) != 0)
-       {
-           ibmveth_debug_printk("tx: unable to linearize skb\n");
-           adapter->tx_linearize_failed++;
-           adapter->stats.tx_dropped++;
-           dev_kfree_skb(skb);
-           return 0;
-       }
-    }
-
-    memset(&desc, 0, sizeof(desc));
-
-    /* nfrags = number of frags after the initial fragment */
-    nfrags = skb_shinfo(skb)->nr_frags;
-
-    if(nfrags)
-       adapter->tx_multidesc_send++;
-
-    /* map the initial fragment */
-    desc[0].fields.length  = nfrags ? skb->len - skb->data_len : skb->len;
-    desc[0].fields.address = vio_map_single(adapter->vdev, skb->data, desc[0].fields.length, PCI_DMA_TODEVICE);
-    desc[0].fields.valid   = 1;
-
-    if(desc[0].fields.address == NO_TCE) {
-       ibmveth_error_printk("tx: unable to map initial fragment\n");
-       adapter->tx_map_failed++;
-       adapter->stats.tx_dropped++;
-       return 0;
-    }
-
-    curfrag = nfrags;
-
-    /* map fragments past the initial portion if there are any */
-    while(curfrag--) {
-       skb_frag_t *frag = &skb_shinfo(skb)->frags[curfrag];
-       desc[curfrag+1].fields.address = vio_map_single(adapter->vdev,
-                                                       page_address(frag->page) + frag->page_offset,
-                                                       frag->size, PCI_DMA_TODEVICE);
-       desc[curfrag+1].fields.length = frag->size;
-       desc[curfrag+1].fields.valid  = 1;
-
-       if(desc[curfrag+1].fields.address == NO_TCE) {
-           ibmveth_error_printk("tx: unable to map fragment %d\n", curfrag);
-           adapter->tx_map_failed++;
-           adapter->stats.tx_dropped++;
-           while(curfrag) {
-               vio_unmap_single(adapter->vdev,
-                                desc[curfrag].fields.address,
-                                desc[curfrag].fields.length,
-                                PCI_DMA_TODEVICE);
-               curfrag--;
-           }
-           return 0;
-       }
-    }
-
-    /* send the frame */
-    unsigned long correlator = 0;
-    do {
-       lpar_rc = h_send_logical_lan(adapter->vdev->unit_address,
-                                    desc[0].desc,
-                                    desc[1].desc,
-                                    desc[2].desc,
-                                    desc[3].desc,
-                                    desc[4].desc,
-                                    desc[5].desc,
-                                    correlator);
-     } while(lpar_rc == H_Busy);
-
-    
-    if(lpar_rc != H_Success && lpar_rc != H_Dropped) {
-       int i;
-       ibmveth_error_printk("tx: h_send_logical_lan failed with rc=%ld\n", lpar_rc);
-       for(i = 0; i < 6; i++) {
-           ibmveth_error_printk("tx: desc[%i] valid=%d, len=%d, address=0x%d\n", i,
-                                desc[i].fields.valid, desc[i].fields.length, desc[i].fields.address);
-       }
-       adapter->tx_send_failed++;
-       adapter->stats.tx_dropped++;
-    } else {
-       adapter->stats.tx_packets++;
-       adapter->stats.tx_bytes += skb->len;
-    }
-
-    do {
-       vio_unmap_single(adapter->vdev, desc[nfrags].fields.address, desc[nfrags].fields.length, PCI_DMA_TODEVICE);
-    } while(--nfrags >= 0);
-
-    dev_kfree_skb(skb);
-    return 0;
-}
-
-static int ibmveth_poll(struct net_device *netdev, int *budget)
-{
-    struct ibmveth_adapter *adapter = netdev->priv;
-    int max_frames_to_process = netdev->quota;
-    int frames_processed = 0;
-    int more_work = 1;
-    unsigned long lpar_rc;
-
-restart_poll:
-    do {
-       struct net_device *netdev = adapter->netdev;
-
-       if(ibmveth_rxq_pending_buffer(adapter)) {
-           struct sk_buff *skb;
-
-           if(!ibmveth_rxq_buffer_valid(adapter)) {
-               wmb();
-               adapter->rx_invalid_buffer++;
-               ibmveth_debug_printk("recycling invalid buffer\n");
-               ibmveth_rxq_recycle_buffer(adapter);
-           } else {
-               int length = ibmveth_rxq_frame_length(adapter);
-               int offset = ibmveth_rxq_frame_offset(adapter);
-               skb = ibmveth_rxq_get_buffer(adapter);
-
-               ibmveth_rxq_harvest_buffer(adapter);
-
-               skb_reserve(skb, offset);
-               skb_put(skb, length);
-               skb->dev = netdev;
-               skb->protocol = eth_type_trans(skb, netdev);
-
-               netif_receive_skb(skb); /* send it up */
-
-               adapter->stats.rx_packets++;
-               adapter->stats.rx_bytes += length;
-               frames_processed++;
-           }
-       } else {
-           more_work = 0;
-       }
-    } while(more_work && (frames_processed < max_frames_to_process));
-
-    ibmveth_schedule_replenishing(adapter);
-
-    if(more_work) {
-       /* more work to do - return that we are not done yet */
-       netdev->quota -= frames_processed;
-       *budget -= frames_processed;
-       return 1; 
-    }
-
-    /* we think we are done - reenable interrupts, then check once more to make sure we are done */
-    lpar_rc = h_vio_signal(adapter->vdev->unit_address, VIO_IRQ_ENABLE);
-
-    ibmveth_assert(lpar_rc == H_Success);
-    
-    netif_rx_complete(netdev);
-
-    if(ibmveth_rxq_pending_buffer(adapter) && netif_rx_reschedule(netdev, frames_processed))
-    {
-       lpar_rc = h_vio_signal(adapter->vdev->unit_address, VIO_IRQ_DISABLE);
-       ibmveth_assert(lpar_rc == H_Success);
-       more_work = 1;
-       goto restart_poll;
-    }
-
-    /* we really are done */
-    return 0;
-}
-
-static irqreturn_t ibmveth_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
-{   
-    struct net_device *netdev = dev_instance;
-    struct ibmveth_adapter *adapter = netdev->priv;
-    unsigned long lpar_rc;
-
-    if(netif_rx_schedule_prep(netdev)) {
-       lpar_rc = h_vio_signal(adapter->vdev->unit_address, VIO_IRQ_DISABLE);
-       ibmveth_assert(lpar_rc == H_Success);
-       __netif_rx_schedule(netdev);
-    }
-       return IRQ_HANDLED;
-}
-
-static struct net_device_stats *ibmveth_get_stats(struct net_device *dev)
-{
-    struct ibmveth_adapter *adapter = dev->priv;
-    return &adapter->stats;
-}
-
-static void ibmveth_set_multicast_list(struct net_device *netdev)
-{
-    struct ibmveth_adapter *adapter = netdev->priv;
-    unsigned long lpar_rc;
-
-    if((netdev->flags & IFF_PROMISC) || (netdev->mc_count > adapter->mcastFilterSize)) {
-       lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
-                                  IbmVethMcastEnableRecv |
-                                  IbmVethMcastDisableFiltering,
-                                  0);
-       if(lpar_rc != H_Success) {
-           ibmveth_error_printk("h_multicast_ctrl rc=%ld when entering promisc mode\n", lpar_rc);
-       }
-    } else {
-       struct dev_mc_list *mclist = netdev->mc_list;
-       int i;
-       /* clear the filter table & disable filtering */
-       lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
-                                  IbmVethMcastEnableRecv |
-                                  IbmVethMcastDisableFiltering |
-                                  IbmVethMcastClearFilterTable,
-                                  0);
-       if(lpar_rc != H_Success) {
-           ibmveth_error_printk("h_multicast_ctrl rc=%ld when attempting to clear filter table\n", lpar_rc);
-       }
-       /* add the addresses to the filter table */
-       for(i = 0; i < netdev->mc_count; ++i, mclist = mclist->next) {
-           // add the multicast address to the filter table
-             unsigned long mcast_addr = 0;
-             memcpy(((char *)&mcast_addr)+2, mclist->dmi_addr, 6);
-             lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
-                                        IbmVethMcastAddFilter,
-                                        mcast_addr);
-           if(lpar_rc != H_Success) {
-               ibmveth_error_printk("h_multicast_ctrl rc=%ld when adding an entry to the filter table\n", lpar_rc);
-           }
-       }
-       
-       /* re-enable filtering */
-       lpar_rc = h_multicast_ctrl(adapter->vdev->unit_address,
-                                  IbmVethMcastEnableFiltering,
-                                  0);
-       if(lpar_rc != H_Success) {
-           ibmveth_error_printk("h_multicast_ctrl rc=%ld when enabling filtering\n", lpar_rc);
-       }
-    }
-}
-
-static int ibmveth_set_mac_address(struct net_device *netdev, void *p)
-{
-    struct ibmveth_adapter *adapter = netdev->priv;
-    struct sockaddr *addr = p;
-    unsigned long mac_address;
-    unsigned long lpar_rc;
-
-    if(!is_valid_ether_addr(addr->sa_data))
-       return -EADDRNOTAVAIL;
-
-    memcpy(&mac_address, addr->sa_data, netdev->addr_len);
-    mac_address = mac_address >> 16;
-
-    lpar_rc = h_change_logical_lan_mac(adapter->vdev->unit_address, mac_address);
-
-    if(lpar_rc != H_Success) {
-       ibmveth_error_printk("h_change_logical_lan_mac rc=%ld when changing mac\n", lpar_rc);
-       return -1;
-    }
-
-    memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len);
-
-    return 0;
-}
-
-static int __devinit ibmveth_probe(struct vio_dev *dev, const struct vio_device_id *id)
-{
-       int rc;
-       struct net_device *netdev;
-       struct ibmveth_adapter *adapter;
-
-       unsigned int *mac_addr_p;
-       unsigned int *mcastFilterSize_p;
-
-
-       ibmveth_debug_printk_no_adapter("entering ibmveth_probe for UA 0x%lx\n", 
-                                   dev->unit_address);
-
-       mac_addr_p = (unsigned int *) vio_get_attribute(dev, VETH_MAC_ADDR, 0);
-       if(!mac_addr_p) {
-               ibmveth_printk(KERN_WARNING "Can't find VETH_MAC_ADDR attribute\n");
-               return 0;
-       }
-       
-       mcastFilterSize_p= (unsigned int *) vio_get_attribute(dev, VETH_MCAST_FILTER_SIZE, 0);
-       if(!mcastFilterSize_p) {
-               ibmveth_printk(KERN_WARNING "Can't find VETH_MCAST_FILTER_SIZE attribute\n");
-               return 0;
-       }
-       
-       netdev = alloc_etherdev(sizeof(struct ibmveth_adapter));
-
-       if(!netdev)
-               return -ENOMEM;
-
-       SET_MODULE_OWNER(netdev);
-
-       adapter = netdev->priv;
-       memset(adapter, 0, sizeof(adapter));
-       dev->driver_data = netdev;
-
-       adapter->vdev = dev;
-       adapter->netdev = netdev;
-       adapter->mcastFilterSize= *mcastFilterSize_p;
-       
-       /*      Some older boxes running PHYP non-natively have an OF that
-               returns a 8-byte local-mac-address field (and the first 
-               2 bytes have to be ignored) while newer boxes' OF return
-               a 6-byte field. Note that IEEE 1275 specifies that 
-               local-mac-address must be a 6-byte field.
-               The RPA doc specifies that the first byte must be 10b, so 
-               we'll just look for it to solve this 8 vs. 6 byte field issue */
-
-       while (*((char*)mac_addr_p) != (char)(0x02))
-               ((char*)mac_addr_p)++;
-
-       adapter->mac_addr = 0;
-       memcpy(&adapter->mac_addr, mac_addr_p, 6);
-
-       adapter->liobn = dev->tce_table->index;
-       
-       netdev->irq = dev->irq;
-       netdev->mtu = 9000;
-       netdev->open               = ibmveth_open;
-       netdev->poll               = ibmveth_poll;
-       netdev->weight             = 16;
-       netdev->stop               = ibmveth_close;
-       netdev->hard_start_xmit    = ibmveth_start_xmit;
-       netdev->get_stats          = ibmveth_get_stats;
-       netdev->set_multicast_list = ibmveth_set_multicast_list;
-       netdev->set_mac_address    = ibmveth_set_mac_address;
-       netdev->do_ioctl           = ibmveth_ioctl;
-
-       memcpy(&netdev->dev_addr, &adapter->mac_addr, netdev->addr_len);
-
-       ibmveth_init_buffer_pool(&adapter->rx_buff_pool[0], 0, IbmVethPool0DftCnt, IbmVethPool0DftSize);
-       ibmveth_init_buffer_pool(&adapter->rx_buff_pool[1], 1, IbmVethPool1DftCnt, IbmVethPool1DftSize);
-       ibmveth_init_buffer_pool(&adapter->rx_buff_pool[2], 2, IbmVethPool2DftCnt, IbmVethPool2DftSize);
-
-       ibmveth_debug_printk("adapter @ 0x%p\n", adapter);
-
-       INIT_BOTTOM_HALF(&adapter->replenish_task, (void*)ibmveth_replenish_task, adapter);
-
-       adapter->buffer_list_dma = NO_TCE;
-       adapter->filter_list_dma = NO_TCE;
-       adapter->rx_queue.queue_dma = NO_TCE;
-
-       ibmveth_debug_printk("registering netdev...\n");
-
-       rc = register_netdev(netdev);
-
-       if(rc) {
-               ibmveth_debug_printk("failed to register netdev rc=%d\n", rc);
-               kfree(dev);
-               return rc;
-       }
-
-       ibmveth_debug_printk("registered\n");
-
-       ibmveth_proc_register_adapter(adapter);
-
-       return 0;
-}
-
-static void __devexit ibmveth_remove(struct vio_dev *dev)
-{
-    struct net_device *netdev = dev->driver_data;
-    struct ibmveth_adapter *adapter = netdev->priv;
-
-    unregister_netdev(netdev);
-
-    ibmveth_proc_unregister_adapter(adapter);
-
-    kfree(netdev);
-    return;
-}
-
-#ifdef CONFIG_PROC_FS
-static int ibmveth_proc_read(char *page, char **start, off_t off, int count, int *eof, void *data)
-{
-    struct ibmveth_adapter *adapter = data;
-    char *buf = page;
-    char *current_mac = ((char*) &adapter->netdev->dev_addr);
-    char *firmware_mac = ((char*) &adapter->mac_addr) ;
-    int len = 0;
-
-    buf += sprintf(buf, "%s %s\n\n", ibmveth_driver_string, ibmveth_driver_version);
-    buf += sprintf(buf, "Detailed Version Info: %s %s\n\n", ibmveth_driver_cvs_tag, ibmveth_driver_cvs_version);
-
-    buf += sprintf(buf, "Unit Address:    0x%lx\n", adapter->vdev->unit_address);
-    buf += sprintf(buf, "LIOBN:           0x%lx\n", adapter->liobn);
-    buf += sprintf(buf, "Current MAC:     %02X:%02X:%02X:%02X:%02X:%02X\n",
-                  current_mac[0], current_mac[1], current_mac[2],
-                  current_mac[3], current_mac[4], current_mac[5]);
-    buf += sprintf(buf, "Firmware MAC:    %02X:%02X:%02X:%02X:%02X:%02X\n",
-                  firmware_mac[0], firmware_mac[1], firmware_mac[2],
-                  firmware_mac[3], firmware_mac[4], firmware_mac[5]);
-
-    buf += sprintf(buf, "\nAdapter Statistics:\n");
-    buf += sprintf(buf, "  TX:  skbuffs linearized:          %ld\n", adapter->tx_linearized);
-    buf += sprintf(buf, "       multi-descriptor sends:      %ld\n", adapter->tx_multidesc_send);
-    buf += sprintf(buf, "       skb_linearize failures:      %ld\n", adapter->tx_linearize_failed);
-    buf += sprintf(buf, "       vio_map_single failres:      %ld\n", adapter->tx_map_failed);
-    buf += sprintf(buf, "       send failures:               %ld\n", adapter->tx_send_failed);
-    buf += sprintf(buf, "  RX:  replenish task cycles:       %ld\n", adapter->replenish_task_cycles);
-    buf += sprintf(buf, "       alloc_skb_failures:          %ld\n", adapter->replenish_no_mem);
-    buf += sprintf(buf, "       add buffer failures:         %ld\n", adapter->replenish_add_buff_failure);
-    buf += sprintf(buf, "       invalid buffers:             %ld\n", adapter->rx_invalid_buffer);
-    buf += sprintf(buf, "       no buffers:                  %ld\n", adapter->rx_no_buffer);
-
-    len = buf - page;    /* len = bytes in this proc file */
-
-    len -= off;          /* take the offset off the front of the read */
-    if(len < count) {    /* if they want more than we have, then this is EOF */
-       *eof = 1;
-       if(len <= 0) {   /* if len -= off is < 0, then they are reading past EOF, return 0 bytes */
-           return 0;
-       }
-    } else {
-       len = count;     /* only return what they asked for */
-    }
-    *start = page + off; /* set the start ptr to the beginning of what they asked for */
-    return len;
-}
-#endif
-
-static void ibmveth_proc_register_driver(void)
-{
-#ifdef CONFIG_PROC_FS
-    ibmveth_proc_dir = create_proc_entry(IBMVETH_PROC_DIR, S_IFDIR, proc_net);
-    SET_MODULE_OWNER(ibmveth_proc_dir);
-#endif
-}
-
-static void ibmveth_proc_unregister_driver(void)
-{
-#ifdef CONFIG_PROC_FS
-    remove_proc_entry(IBMVETH_PROC_DIR, proc_net);
-#endif
-}
-
-static void ibmveth_proc_register_adapter(struct ibmveth_adapter *adapter)
-{
-#ifdef CONFIG_PROC_FS
-    struct proc_dir_entry *entry;
-    entry = create_proc_entry(adapter->netdev->name, S_IFREG, ibmveth_proc_dir);
-    SET_MODULE_OWNER(entry);
-    entry->data = (void *) adapter;
-    entry->read_proc = ibmveth_proc_read;
-#endif
-}
-
-static void ibmveth_proc_unregister_adapter(struct ibmveth_adapter *adapter)
-{
-#ifdef CONFIG_PROC_FS
-    remove_proc_entry(adapter->netdev->name, ibmveth_proc_dir);
-#endif
-}
-
-
-static struct vio_device_id ibmveth_device_table[] __devinitdata= {
-    { "network", "IBM,l-lan"},
-    { 0,}
-};
-
-MODULE_DEVICE_TABLE(vio, ibmveth_device_table);
-
-static struct vio_driver ibmveth_driver = {
-    .name        = ibmveth_driver_name,
-    .id_table    = ibmveth_device_table,
-    .probe       = ibmveth_probe,
-    .remove      = ibmveth_remove
-};
-
-static int __init ibmveth_module_init(void)
-{
-    int rc;
-
-    ibmveth_printk("%s: %s %s\n", ibmveth_driver_name, ibmveth_driver_string, ibmveth_driver_version);
-
-    ibmveth_proc_register_driver();
-
-    rc = vio_module_init(&ibmveth_driver);
-
-    return rc;
-}
-
-static void __exit ibmveth_module_exit(void)
-{
-       vio_unregister_driver(&ibmveth_driver);
-       ibmveth_proc_unregister_driver();
-}      
-
-module_init(ibmveth_module_init);
-module_exit(ibmveth_module_exit);
diff --git a/drivers/net/ibmveth.h b/drivers/net/ibmveth.h
deleted file mode 100644 (file)
index 6f0a4fe..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/**************************************************************************/
-/*                                                                        */
-/* IBM eServer i/[Series Virtual Ethernet Device Driver                   */
-/* Copyright (C) 2003 IBM Corp.                                           */
-/*  Dave Larson (larson1@us.ibm.com)                                      */
-/*  Santiago Leon (santil@us.ibm.com)                                     */
-/*                                                                        */
-/*  This program is free software; you can redistribute it and/or modify  */
-/*  it under the terms of the GNU General Public License as published by  */
-/*  the Free Software Foundation; either version 2 of the License, or     */
-/*  (at your option) any later version.                                   */
-/*                                                                        */
-/*  This program is distributed in the hope that it will be useful,       */
-/*  but WITHOUT ANY WARRANTY; without even the implied warranty of        */
-/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         */
-/*  GNU General Public License for more details.                          */
-/*                                                                        */
-/*  You should have received a copy of the GNU General Public License     */
-/*  along with this program; if not, write to the Free Software           */
-/*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  */
-/*                                                                   USA  */
-/*                                                                        */
-/**************************************************************************/
-
-#ifndef _IBMVETH_H
-#define _IBMVETH_H
-
-#define IbmVethMaxSendFrags 6
-
-/* constants for H_MULTICAST_CTRL */
-#define IbmVethMcastReceptionModifyBit     0x80000UL
-#define IbmVethMcastReceptionEnableBit     0x20000UL
-#define IbmVethMcastFilterModifyBit        0x40000UL
-#define IbmVethMcastFilterEnableBit        0x10000UL
-
-#define IbmVethMcastEnableRecv       (IbmVethMcastReceptionModifyBit | IbmVethMcastReceptionEnableBit)
-#define IbmVethMcastDisableRecv      (IbmVethMcastReceptionModifyBit)
-#define IbmVethMcastEnableFiltering  (IbmVethMcastFilterModifyBit | IbmVethMcastFilterEnableBit)
-#define IbmVethMcastDisableFiltering (IbmVethMcastFilterModifyBit)
-#define IbmVethMcastAddFilter        0x1UL
-#define IbmVethMcastRemoveFilter     0x2UL
-#define IbmVethMcastClearFilterTable 0x3UL
-
-/* hcall numbers */
-#define H_VIO_SIGNAL             0x104
-#define H_REGISTER_LOGICAL_LAN   0x114
-#define H_FREE_LOGICAL_LAN       0x118
-#define H_ADD_LOGICAL_LAN_BUFFER 0x11C
-#define H_SEND_LOGICAL_LAN       0x120
-#define H_MULTICAST_CTRL         0x130
-#define H_CHANGE_LOGICAL_LAN_MAC 0x14C
-
-/* hcall macros */
-#define h_register_logical_lan(ua, buflst, rxq, fltlst, mac) \
-  plpar_hcall_norets(H_REGISTER_LOGICAL_LAN, ua, buflst, rxq, fltlst, mac)
-
-#define h_free_logical_lan(ua) \
-  plpar_hcall_norets(H_FREE_LOGICAL_LAN, ua)
-
-#define h_add_logical_lan_buffer(ua, buf) \
-  plpar_hcall_norets(H_ADD_LOGICAL_LAN_BUFFER, ua, buf)
-
-#define h_send_logical_lan(ua, buf1, buf2, buf3, buf4, buf5, buf6, correlator) \
-  plpar_hcall_8arg_2ret(H_SEND_LOGICAL_LAN, ua, buf1, buf2, buf3, buf4, buf5, buf6, correlator, &correlator)
-
-#define h_multicast_ctrl(ua, cmd, mac) \
-  plpar_hcall_norets(H_MULTICAST_CTRL, ua, cmd, mac)
-
-#define h_change_logical_lan_mac(ua, mac) \
-  plpar_hcall_norets(H_CHANGE_LOGICAL_LAN_MAC, ua, mac)
-
-#define IbmVethNumBufferPools 3
-#define IbmVethPool0DftSize (1024 * 2)
-#define IbmVethPool1DftSize (1024 * 4)
-#define IbmVethPool2DftSize (1024 * 10)
-#define IbmVethPool0DftCnt  256
-#define IbmVethPool1DftCnt  256
-#define IbmVethPool2DftCnt  256
-
-struct ibmveth_buff_pool {
-    u32 size;
-    u32 index;
-    u32 buff_size;
-    u32 threshold;
-    atomic_t available;
-    u32 consumer_index;
-    u32 producer_index;
-    u16 *free_map;
-    dma_addr_t *dma_addr;
-    struct sk_buff **skbuff;
-};
-
-struct ibmveth_rx_q {
-    u64        index;
-    u64        num_slots;
-    u64        toggle;
-    dma_addr_t queue_dma;
-    u32        queue_len;
-    struct ibmveth_rx_q_entry *queue_addr;
-};
-
-struct ibmveth_adapter {
-    struct vio_dev *vdev;
-    struct net_device *netdev;
-    struct net_device_stats stats;
-    unsigned int mcastFilterSize;
-    unsigned long mac_addr;
-    unsigned long liobn;
-    void * buffer_list_addr;
-    void * filter_list_addr;
-    dma_addr_t buffer_list_dma;
-    dma_addr_t filter_list_dma;
-    struct ibmveth_buff_pool rx_buff_pool[IbmVethNumBufferPools];
-    struct ibmveth_rx_q rx_queue;
-    /* helper tasks */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-    struct work_struct replenish_task;
-#else    
-    struct tasklet_struct replenish_task;
-#endif
-    atomic_t in_replenish_task;
-    /* adapter specific stats */
-    u64 replenish_task_cycles;
-    u64 replenish_no_mem;
-    u64 replenish_add_buff_failure;
-    u64 replenish_add_buff_success;
-    u64 rx_invalid_buffer;
-    u64 rx_no_buffer;
-    u64 tx_multidesc_send;
-    u64 tx_linearized;
-    u64 tx_linearize_failed;
-    u64 tx_map_failed;
-    u64 tx_send_failed;
-};
-
-struct ibmveth_buf_desc_fields {       
-    u32 valid : 1;
-    u32 toggle : 1;
-    u32 reserved : 6;
-    u32 length : 24;
-    u32 address;
-};
-
-union ibmveth_buf_desc {
-    u64 desc;  
-    struct ibmveth_buf_desc_fields fields;
-};
-
-struct ibmveth_rx_q_entry {
-    u16 toggle : 1;
-    u16 valid : 1;
-    u16 reserved : 14;
-    u16 offset;
-    u32 length;
-    u64 correlator;
-};
-
-#endif /* _IBMVETH_H */
index 9353fb1..9017b2a 100644 (file)
@@ -8,6 +8,8 @@
  * Created at:    2000/10/16 03:46PM
  * Modified at:   2001/1/3 02:55PM
  * Modified by:   Benjamin Kong <benjamin_kong@ali.com.tw>
+ * Modified at:   2003/11/6 and support for ALi south-bridge chipsets M1563
+ * Modified by:   Clear Zhang <clear_zhang@ali.com.tw>
  * 
  *     Copyright (c) 2000 Benjamin Kong <benjamin_kong@ali.com.tw>
  *     All Rights Reserved
@@ -68,6 +70,7 @@ static ali_chip_t chips[] =
 {
        { "M1543", { 0x3f0, 0x370 }, 0x51, 0x23, 0x20, 0x43, ali_ircc_probe_53, ali_ircc_init_43 },
        { "M1535", { 0x3f0, 0x370 }, 0x51, 0x23, 0x20, 0x53, ali_ircc_probe_53, ali_ircc_init_53 },
+       { "M1563", { 0x3f0, 0x370 }, 0x51, 0x23, 0x20, 0x63, ali_ircc_probe_53, ali_ircc_init_53 },
        { NULL }
 };
 
@@ -1331,7 +1334,7 @@ static int ali_ircc_net_open(struct net_device *dev)
        }
        
        /* Turn on interrups */
-       outb(UART_IER_RLSI | UART_IER_RDI |UART_IER_THRI, iobase+UART_IER);
+       outb(UART_IER_RDI , iobase+UART_IER);
 
        /* Ready to play! */
        netif_start_queue(dev); //benjamin by irport
diff --git a/drivers/net/iseries_veth.c b/drivers/net/iseries_veth.c
deleted file mode 100644 (file)
index ea490ad..0000000
+++ /dev/null
@@ -1,1358 +0,0 @@
-/* File veth.c created by Kyle A. Lucke on Mon Aug  7 2000. */
-
-/*
- * IBM eServer iSeries Virtual Ethernet Device Driver
- * Copyright (C) 2001 Kyle A. Lucke (klucke@us.ibm.com), IBM Corp.
- * Substantially cleaned up by:
- * Copyright (C) 2003 David Gibson <dwg@au1.ibm.com>, IBM Corporation.
- */
-
-/*  This program is free software; you can redistribute it and/or modify  */
-/*  it under the terms of the GNU General Public License as published by  */
-/*  the Free Software Foundation; either version 2 of the License, or     */
-/*  (at your option) any later version.                                   */
-/*                                                                        */
-/*  This program is distributed in the hope that it will be useful,       */
-/*  but WITHOUT ANY WARRANTY; without even the implied warranty of        */
-/*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         */
-/*  GNU General Public License for more details.                          */
-/*                                                                        */
-/*  You should have received a copy of the GNU General Public License     */
-/*  along with this program; if not, write to the Free Software           */
-/*  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  */
-/*                                                                   USA  */
-/*                                                                        */
-/* This module contains the implementation of a virtual ethernet device   */
-/* for use with iSeries LPAR Linux.  It utilizes low-level message passing*/
-/* provided by the hypervisor to enable an ethernet-like network device   */
-/* that can be used to enable inter-partition communications on the same  */
-/* physical iSeries.                                                      */
-/*                                                                        */
-/* The iSeries LPAR hypervisor has currently defined the ability for a    */
-/* partition to communicate on up to 16 different virtual ethernets, all  */
-/* dynamically configurable, at least for an OS/400 partition.  The       */
-/* dynamic nature is not supported for Linux yet.                         */
-/*                                                                        */
-/* Each virtual ethernet a given Linux partition participates in will     */
-/* cause a network device with the form ethXX to be created,              */
-/*                                                                        */
-/* This driver (and others like it on other partitions) is responsible for*/
-/* routing packets to and from other partitions.  The MAC addresses used  */
-/* by the virtual ethernets contain meaning, and should not be modified.  */
-/* Doing so could disable the ability of your Linux partition to          */
-/* communicate with the other OS/400 partitions on your physical iSeries. */
-/* Similarly, setting the MAC address to something other than the         */
-/* "virtual burned-in" address is not allowed, for the same reason.       */
-/*                                                                        */
-/* Notes:                                                                 */
-/*                                                                        */
-/* 1. Although there is the capability to talk on multiple shared         */
-/*    ethernets to communicate to the same partition, each shared         */
-/*    ethernet to a given partition X will use a finite, shared amount    */
-/*    of hypervisor messages to do the communication.  So having 2 shared */
-/*    ethernets to the same remote partition DOES NOT double the          */
-/*    available bandwidth.  Each of the 2 shared ethernets will share the */
-/*    same bandwidth available to another.                                */
-/*                                                                        */
-/* 2. It is allowed to have a virtual ethernet that does not communicate  */
-/*    with any other partition.  It won't do anything, but it's allowed.  */
-/*                                                                        */
-/* 3. There is no "loopback" mode for a virtual ethernet device.  If you  */
-/*    send a packet to your own mac address, it will just be dropped, you */
-/*    won't get it on the receive side.  Such a thing could be done,      */
-/*    but my default driver DOES NOT do so.                               */
-/*                                                                        */
-/* 4. Multicast addressing is implemented via broadcasting the multicast  */
-/*    frames to other partitions.  It is the responsibility of the        */
-/*    receiving partition to filter the addresses desired.                */
-/*                                                                        */
-/* 5. This module utilizes several different bottom half handlers for     */
-/*    non-high-use path function (setup, error handling, etc.).  Multiple */
-/*    bottom halves were used because only one would not keep up to the   */
-/*    much faster iSeries device drivers this Linux driver is talking to. */
-/*    All hi-priority work (receiving frames, handling frame acks) is done*/
-/*    in the interrupt handler for maximum performance.                   */
-/*                                                                        */
-/* Tunable parameters:                                                    */
-/*                                                                        */
-/* VETH_NUMBUFFERS: This compile time option defaults to 120. It can      */
-/* be safely changed to something greater or less than the default.  It   */
-/* controls how much memory Linux will allocate per remote partition it is*/
-/* communicating with.  The user can play with this to see how it affects */
-/* performance, packets dropped, etc.  Without trying to understand the   */
-/* complete driver, it can be thought of as the maximum number of packets */
-/* outstanding to a remote partition at a time.                           */
-/*                                                                        */
-/**************************************************************************/
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/version.h>
-#include <linux/types.h>
-#include <linux/errno.h>
-#include <linux/ioport.h>
-#include <linux/pci.h>
-#include <linux/kernel.h>
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
-#include <linux/init.h>
-#include <linux/delay.h>
-#include <linux/mm.h>
-#ifdef SIOCETHTOOL
-#include <linux/ethtool.h>
-#endif
-#include <asm/iSeries/mf.h>
-#include <asm/uaccess.h>
-
-#include "iseries_veth.h"
-#include <asm/iSeries/HvLpConfig.h>
-#include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/iSeries_dma.h>
-#include <asm/semaphore.h>
-
-#define veth_printk(prio, fmt, args...) \
-       printk(prio "%s: " fmt, __FILE__, ## args)
-
-#define veth_error(fmt, args...) \
-       printk(KERN_ERR "(%s:%3.3d) ERROR: " fmt, __FILE__, __LINE__ , ## args)
-
-#define VETH_NUMBUFFERS                120
-
-static struct VethFabricMgr *mFabricMgr = NULL;
-
-static int veth_open(struct net_device *dev);
-static int veth_close(struct net_device *dev);
-static int veth_start_xmit(struct sk_buff *skb, struct net_device *dev);
-static int veth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd);
-static void veth_handle_event(struct HvLpEvent *, struct pt_regs *);
-static void veth_handle_ack(struct VethLpEvent *);
-static void veth_handle_int(struct VethLpEvent *);
-static void veth_init_connection(struct VethLpConnection *cnx, u8 rlp);
-static void veth_open_connection(u8);
-static void veth_finish_open_connection(void *parm);
-static void veth_closeConnection(u8);
-static void veth_set_multicast_list(struct net_device *dev);
-
-static void veth_take_cap(struct VethLpConnection *, struct VethLpEvent *);
-static void veth_take_cap_ack(struct VethLpConnection *, struct VethLpEvent *);
-static void veth_take_monitor_ack(struct VethLpConnection *,
-                                 struct VethLpEvent *);
-static void veth_recycle_msg(struct VethLpConnection *, struct VethMsg *);
-static void veth_monitor_ack_task(void *);
-static void veth_receive(struct VethLpConnection *, struct VethLpEvent *);
-static int veth_pTransmit(struct sk_buff *skb, HvLpIndex rlp,
-                         struct net_device *dev);
-static struct net_device_stats *veth_get_stats(struct net_device *dev);
-static void veth_timed_ack(unsigned long connectionPtr);
-static void veth_startQueues(void);
-static void veth_failMe(struct VethLpConnection *cnx);
-
-extern struct pci_dev *iSeries_veth_dev;
-static struct net_device *veth_devices[HVMAXARCHITECTEDVIRTUALLANS];
-static int veth_num_devices; /* = 0 */
-
-#define VETH_MAX_MTU           9000
-
-MODULE_AUTHOR("Kyle Lucke <klucke@us.ibm.com>");
-MODULE_DESCRIPTION("iSeries Virtual ethernet driver");
-MODULE_LICENSE("GPL");
-
-int VethModuleReopen = 1;
-
-static inline u64 veth_dma_addr(void *p)
-{
-       return 0x8000000000000000LL | virt_to_absolute((unsigned long) p);
-}
-
-static inline HvLpEvent_Rc 
-veth_signalevent(struct VethLpConnection *cnx, u16 subtype, 
-                HvLpEvent_AckInd ackind, HvLpEvent_AckType acktype,
-                u64 token,
-                u64 data1, u64 data2, u64 data3, u64 data4, u64 data5)
-{
-       return HvCallEvent_signalLpEventFast(cnx->remote_lp,
-                                            HvLpEvent_Type_VirtualLan,
-                                            subtype, ackind, acktype,
-                                            cnx->src_inst,
-                                            cnx->dst_inst,
-                                            token, data1, data2, data3,
-                                            data4, data5);
-}
-
-static inline HvLpEvent_Rc
-veth_signaldata(struct VethLpConnection *cnx, u16 subtype,
-               u64 token, void *data)
-{
-       u64 *p = (u64 *) data;
-
-       return veth_signalevent(cnx, subtype, HvLpEvent_AckInd_NoAck,
-                               HvLpEvent_AckType_ImmediateAck,
-                               token, p[0], p[1], p[2], p[3], p[4]);
-}
-
-struct veth_allocation {
-       struct completion c;
-       int num;
-};
-
-static void veth_complete_allocation(void *parm, int number)
-{
-       struct veth_allocation *vc = (struct veth_allocation *)parm;
-
-       vc->num = number;
-       complete(&vc->c);
-}
-
-static int veth_allocate_events(HvLpIndex rlp, int number)
-{
-       struct veth_allocation vc = { COMPLETION_INITIALIZER(vc.c), 0 };
-
-       mf_allocateLpEvents(rlp, HvLpEvent_Type_VirtualLan,
-                           sizeof(struct VethLpEvent), number,
-                           &veth_complete_allocation, &vc);
-       wait_for_completion(&vc.c);
-
-       return vc.num;
-}
-
-struct net_device * __init veth_probe_one(int idx)
-{
-       struct net_device *dev;
-       struct veth_port *port;
-       int rc;
-
-       dev = alloc_etherdev(sizeof (struct veth_port));
-       if (! dev) {
-               veth_error("Unable to allocate net_device structure!\n");
-               return NULL;
-       }
-
-       port = (struct veth_port *) dev->priv;
-
-       memset(port, 0, sizeof(*port));
-       
-       port->mDev = dev;
-       rwlock_init(&port->mcast_gate);
-
-       dev->dev_addr[0] = 0x02;
-       dev->dev_addr[1] = 0x01;
-       dev->dev_addr[2] = 0xff;
-       dev->dev_addr[3] = idx;
-       dev->dev_addr[4] = 0xff;
-       dev->dev_addr[5] = HvLpConfig_getLpIndex_outline();
-
-       dev->mtu = VETH_MAX_MTU;
-
-       memcpy(&port->mMyAddress, dev->dev_addr, 6);
-
-       dev->open = &veth_open;
-       dev->hard_start_xmit = &veth_start_xmit;
-       dev->stop = &veth_close;
-       dev->get_stats = veth_get_stats;
-       dev->set_multicast_list = &veth_set_multicast_list;
-       dev->do_ioctl = &veth_ioctl;
-
-       rc = register_netdev(dev);
-       if (rc != 0) {
-               veth_printk(KERN_ERR,
-                           "Failed to register an ethernet device (veth=%d)\n",
-                           idx);
-               kfree(dev);
-               return NULL;
-       }
-
-       veth_printk(KERN_DEBUG, "Found an ethernet device %s (veth=%d) (addr=%p)\n",
-                   dev->name, idx, dev);
-
-       return dev;
-}
-
-int __init veth_probe(void)
-{
-       int vlans_found = 0;
-       u16 vlan_map = HvLpConfig_getVirtualLanIndexMap();
-       int i;
-
-       memset(veth_devices, 0, sizeof(veth_devices));
-
-       for (i = 0; vlan_map != 0; vlan_map <<= 1, i++) {
-               struct net_device *dev = NULL;
-
-               if (! (vlan_map & 0x8000))
-                       continue;
-
-               vlans_found++;
-               dev = veth_probe_one(i);
-
-               if (dev) {
-                       mFabricMgr->mPorts[i] = (struct veth_port *)dev->priv;
-                       veth_devices[veth_num_devices] = dev;
-                       veth_num_devices++;
-               }
-       }
-
-       if (vlans_found == 0)
-               return -ENODEV;
-
-       return 0;
-}
-
-void __exit veth_module_cleanup(void)
-{
-       int i;
-       struct VethFabricMgr *myFm = mFabricMgr;
-
-       if (! mFabricMgr)
-               return;
-
-       VethModuleReopen = 0;
-       
-       for (i = 0; i < HVMAXARCHITECTEDLPS; ++i) {
-               struct VethLpConnection *cnx = &(mFabricMgr->mConnection[i]);
-               unsigned long flags;
-
-               spin_lock_irqsave(&cnx->status_gate, flags);
-               veth_closeConnection(i);
-               spin_unlock_irqrestore(&cnx->status_gate, flags);
-       }
-       
-       flush_scheduled_work();
-       
-       HvLpEvent_unregisterHandler(HvLpEvent_Type_VirtualLan);
-       
-       mb();
-       mFabricMgr = NULL;
-       mb();
-       
-       for (i = 0; i < HVMAXARCHITECTEDLPS; ++i) {
-               struct VethLpConnection *cnx = &myFm->mConnection[i];
-
-               if (cnx->mNumberAllocated + cnx->mNumberRcvMsgs > 0) {
-                       mf_deallocateLpEvents(cnx->remote_lp,
-                                             HvLpEvent_Type_VirtualLan,
-                                             cnx->mNumberAllocated
-                                             + cnx->mNumberRcvMsgs,
-                                             NULL, NULL);
-               }
-               
-               if (cnx->mMsgs)
-                       kfree(cnx->mMsgs);
-       }
-       
-       for (i = 0; i < HvMaxArchitectedVirtualLans; ++i) {
-               struct net_device *dev;
-
-               if (! myFm->mPorts[i])
-                       continue;
-
-               dev = myFm->mPorts[i]->mDev;
-               myFm->mPorts[i] = NULL;
-
-               mb();
-                       
-               if (dev) {
-                       unregister_netdev(dev);
-                       kfree(dev);
-               }
-       }
-       
-       kfree(myFm);
-}
-
-module_exit(veth_module_cleanup);
-
-int __init veth_module_init(void)
-{
-       int i;
-       int this_lp = mFabricMgr->mThisLp;
-       int rc;
-
-       mFabricMgr = kmalloc(sizeof (struct VethFabricMgr), GFP_KERNEL);
-       if (! mFabricMgr) {
-               veth_error("Unable to allocate fabric manager\n");
-               return -ENOMEM;
-       }
-
-       memset(mFabricMgr, 0, sizeof (*mFabricMgr));
-
-       mFabricMgr->mEyecatcher = 0x56455448464D4752ULL;
-       this_lp = HvLpConfig_getLpIndex_outline();
-       mFabricMgr->mThisLp = this_lp;
-
-       for (i = 0; i < HVMAXARCHITECTEDLPS; ++i) {
-               struct VethLpConnection *cnx = &mFabricMgr->mConnection[i];
-
-               veth_init_connection(cnx, i);
-       }
-
-       rc = veth_probe();
-       if (rc != 0)
-               return rc;
-
-       HvLpEvent_registerHandler(HvLpEvent_Type_VirtualLan, &veth_handle_event);
-
-       /* Run through the active lps and open connections to the ones
-        * we need to */
-       /* FIXME: is there any reason to do this backwards? */
-       for (i = HVMAXARCHITECTEDLPS - 1; i >= 0; --i) {
-               struct VethLpConnection *cnx = &mFabricMgr->mConnection[i];
-
-               if ( (i == this_lp) 
-                    || ! HvLpConfig_doLpsCommunicateOnVirtualLan(this_lp, i) )
-                       continue;
-
-               spin_lock_irq(&cnx->status_gate);
-               veth_open_connection(i);
-               spin_unlock_irq(&cnx->status_gate);
-       }
-
-       return 0;
-}
-
-module_init(veth_module_init);
-
-static int veth_open(struct net_device *dev)
-{
-       struct veth_port *port = (struct veth_port *) dev->priv;
-
-       memset(&port->stats, 0, sizeof (port->stats));
-
-       netif_start_queue(dev);
-
-       return 0;
-}
-
-static int veth_close(struct net_device *dev)
-{
-       netif_stop_queue(dev);
-
-       return 0;
-}
-
-static struct net_device_stats *veth_get_stats(struct net_device *dev)
-{
-       struct veth_port *port = (struct veth_port *) dev->priv;
-
-       return &port->stats;
-}
-
-static int veth_start_xmit(struct sk_buff *skb, struct net_device *dev)
-{
-       unsigned char *frame = skb->data;
-       struct veth_port *port = (struct veth_port *) dev->priv;
-       int i;
-       int rc = 1;
-       int individual_rc;
-       int skb_len = skb->len;
-
-       if (! mFabricMgr) {
-               veth_error("NULL fabric manager with active ports!\n");
-               netif_stop_queue(dev);
-               BUG();
-               return 1;
-       }
-
-       if (! (frame[0] & 0x01)) {
-               /* unicast packet */
-               HvLpIndex rlp = frame[5];
-
-               if ((rlp != mFabricMgr->mThisLp)
-                   &&
-                   (HvLpConfig_doLpsCommunicateOnVirtualLan
-                    (mFabricMgr->mThisLp, rlp))) {
-                       rc = veth_pTransmit(skb, rlp, dev);
-               } else {
-                       dev_kfree_skb(skb);
-                       rc = 0;
-               }
-       } else {
-               /* broadcast or multicast */
-               for (i = 0; i < HVMAXARCHITECTEDLPS; ++i) {
-                       if (i == mFabricMgr->mThisLp)
-                               continue;
-
-                       if (HvLpConfig_doLpsCommunicateOnVirtualLan
-                           (mFabricMgr->mThisLp, i)) {
-                               struct sk_buff *clone =
-                                       skb_clone(skb, GFP_ATOMIC);
-                               
-                               if (! clone) {
-                                       veth_error("skb_clone failed %p\n",
-                                                  skb);
-                                       rc = 0;
-                                       break;
-                               }
-                               
-                               /* the ack handles deleting the skb */
-                               individual_rc = veth_pTransmit(clone, i, dev);
-                               
-                               /* tx failed, we need to free the sbk */
-                               if (individual_rc != 0)
-                                       dev_kfree_skb(clone);
-                               
-                               /* if we didn't fail from lack of
-                                * buffers, the tx as a whole is
-                                * successful */
-                               if (individual_rc != 1)
-                                       rc = 0;
-                       }
-               }
-
-               /* broadcast/multicast - If every connection is out of
-                  buffers (highly unlikely) then we leave rc set to 1
-                  and stop the queue. If any connection fails for any
-                  reason other than out of buffers, then we say the
-                  tx succeeded.
-                */
-               if (rc == 0)
-                       dev_kfree_skb(skb);
-       }
-
-       if (rc != 0) {
-               if (rc == 1) {
-                       /* reasons for stopping the queue:
-                          - a non broadcast/multicast packet was destined for a connection that is out of buffers
-                          - a broadcast/multicast packet and every connection was out of buffers
-                        */
-
-                       netif_stop_queue(dev);
-               } else {
-                       /* reasons for not stopping the queue:
-                          - a non broadcast/multicast packet was destined for a failed connection
-                          - a broadcast/multicast packet and at least one connection had available buffers
-                        */
-                       dev_kfree_skb(skb);
-                       rc = 0;
-               }
-       } else {
-               port->stats.tx_packets++;
-               port->stats.tx_bytes += skb_len;
-       }
-
-       return rc;
-}
-
-static int
-veth_pTransmit(struct sk_buff *skb, HvLpIndex rlp, struct net_device *dev)
-{
-       struct VethLpConnection *cnx = mFabricMgr->mConnection + rlp;
-       HvLpEvent_Rc rc;
-       u32 dma_address, dma_length;
-       struct VethMsg *msg = NULL;
-
-       if (! cnx->status.ready)
-               return 2;
-
-       if ((skb->len - 14) > VETH_MAX_MTU)
-               return 2;
-
-       VETHSTACKPOP(&cnx->mMsgStack, msg);
-
-       if (! msg)
-               return 1;
-
-       dma_length = skb->len;
-       dma_address = pci_map_single(iSeries_veth_dev, skb->data,
-                                    dma_length, PCI_DMA_TODEVICE);
-       
-       /* Is it really necessary to check the length and address
-        * fields of the first entry here? */
-       if (dma_address != NO_TCE) {
-               msg->skb = skb;
-               msg->mSendData.addr[0] = dma_address;
-               msg->mSendData.len[0] = dma_length;
-               msg->mSendData.eof = 1;
-               set_bit(0, &(msg->mInUse));
-               rc = veth_signaldata(cnx, VethEventTypeFrames,
-                                    msg->mIndex, &msg->mSendData);
-       } else {
-               struct veth_port *port = (struct veth_port *) dev->priv;
-               rc = -1;        /* Bad return code */
-               port->stats.tx_errors++;
-       }
-       
-       if (rc != HvLpEvent_Rc_Good) {
-               msg->skb = NULL;
-               /* need to set in use to make veth_recycle_msg in case
-                * this was a mapping failure */
-               set_bit(0, &msg->mInUse);
-               veth_recycle_msg(cnx, msg);
-               return 2;
-       }
-
-       return 0;
-}
-
-static int
-veth_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-{
-#ifdef SIOCETHTOOL
-       struct ethtool_cmd ecmd;
-
-       if (cmd != SIOCETHTOOL)
-               return -EOPNOTSUPP;
-       if (copy_from_user(&ecmd, ifr->ifr_data, sizeof (ecmd)))
-               return -EFAULT;
-       switch (ecmd.cmd) {
-       case ETHTOOL_GSET:
-               ecmd.supported = (SUPPORTED_1000baseT_Full
-                                 | SUPPORTED_Autoneg | SUPPORTED_FIBRE);
-               ecmd.advertising = (SUPPORTED_1000baseT_Full
-                                   | SUPPORTED_Autoneg | SUPPORTED_FIBRE);
-
-               ecmd.port = PORT_FIBRE;
-               ecmd.transceiver = XCVR_INTERNAL;
-               ecmd.phy_address = 0;
-               ecmd.speed = SPEED_1000;
-               ecmd.duplex = DUPLEX_FULL;
-               ecmd.autoneg = AUTONEG_ENABLE;
-               ecmd.maxtxpkt = 120;
-               ecmd.maxrxpkt = 120;
-               if (copy_to_user(ifr->ifr_data, &ecmd, sizeof(ecmd)))
-                       return -EFAULT;
-               return 0;
-
-       case ETHTOOL_GDRVINFO:{
-                       struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
-                       strncpy(info.driver, "veth", sizeof(info.driver) - 1);
-                       info.driver[sizeof(info.driver) - 1] = '\0';
-                       strncpy(info.version, "1.0", sizeof(info.version) - 1);
-                       if (copy_to_user(ifr->ifr_data, &info, sizeof(info)))
-                               return -EFAULT;
-                       return 0;
-               }
-               /* get link status */
-       case ETHTOOL_GLINK:{
-                       struct ethtool_value edata = { ETHTOOL_GLINK };
-                       edata.data = 1;
-                       if (copy_to_user(ifr->ifr_data, &edata, sizeof(edata)))
-                               return -EFAULT;
-                       return 0;
-               }
-
-       default:
-               break;
-       }
-
-#endif
-       return -EOPNOTSUPP;
-}
-
-static void veth_set_multicast_list(struct net_device *dev)
-{
-       struct veth_port *port = (struct veth_port *) dev->priv;
-       unsigned long flags;
-
-       write_lock_irqsave(&port->mcast_gate, flags);
-
-       if (dev->flags & IFF_PROMISC) { /* set promiscuous mode */
-               port->promiscuous = 1;
-       } else if ( (dev->flags & IFF_ALLMULTI)
-                   || (dev->mc_count > VETH_MAX_MCAST) ) {
-               port->all_mcast = 1;
-       } else {
-               struct dev_mc_list *dmi = dev->mc_list;
-               int i;
-
-               /* Update table */
-               port->num_mcast = 0;
-               
-               for (i = 0; i < dev->mc_count; i++) {
-                       u8 *addr = dmi->dmi_addr;
-                       u64 xaddr = 0;
-
-                       if (addr[0] & 0x01) {/* multicast address? */
-                               memcpy(&xaddr, addr, 6);
-                               port->mcast_addr[port->num_mcast] = xaddr;
-                               port->num_mcast++;
-                       }
-                       dmi = dmi->next;
-               }
-       }
-
-       write_unlock_irqrestore(&port->mcast_gate, flags);
-}
-
-static void
-veth_handle_event(struct HvLpEvent *event, struct pt_regs *regs)
-{
-       struct VethLpEvent *veth_event = (struct VethLpEvent *)event;
-
-       if (event->xFlags.xFunction == HvLpEvent_Function_Ack)
-               veth_handle_ack(veth_event);
-       else if (event->xFlags.xFunction == HvLpEvent_Function_Int)
-               veth_handle_int(veth_event);
-}
-
-static void
-veth_handle_ack(struct VethLpEvent *event)
-{
-       HvLpIndex rlp = event->mBaseEvent.xTargetLp;
-       struct VethLpConnection *cnx = &mFabricMgr->mConnection[rlp];
-
-       switch (event->mBaseEvent.xSubtype) {
-       case VethEventTypeCap:
-               veth_take_cap_ack(cnx, event);
-               break;
-       case VethEventTypeMonitor:
-               veth_take_monitor_ack(cnx, event);
-               break;
-       default:
-               veth_error("Unknown ack type %d from lpar %d\n",
-                          event->mBaseEvent.xSubtype, rlp);
-       };
-}
-
-static void
-veth_handle_int(struct VethLpEvent *event)
-{
-       HvLpIndex rlp = event->mBaseEvent.xSourceLp;
-       struct VethLpConnection *cnx = &mFabricMgr->mConnection[rlp];
-       int i;
-
-       switch (event->mBaseEvent.xSubtype) {
-       case VethEventTypeCap:
-               veth_take_cap(cnx, event);
-               break;
-       case VethEventTypeMonitor:
-               /* do nothing... this'll hang out here til we're dead,
-                * and the hypervisor will return it for us. */
-               break;
-       case VethEventTypeFramesAck:
-               for (i = 0; i < VETH_MAX_ACKS_PER_MSG; ++i) {
-                       u16 msgnum = event->u.mFramesAckData.mToken[i];
-
-                       if (msgnum < cnx->mNumMsgs)
-                               veth_recycle_msg(cnx, cnx->mMsgs + msgnum);
-               }
-               break;
-       case VethEventTypeFrames:
-               veth_receive(cnx, event);
-               break;
-       default:
-               veth_error("Unknown interrupt type %d from lpar %d\n",
-                          event->mBaseEvent.xSubtype, rlp);
-       };
-}
-
-static void veth_failMe(struct VethLpConnection *cnx)
-{
-       cnx->status.ready = 0;
-}
-
-static void veth_init_connection(struct VethLpConnection *cnx, u8 rlp)
-{
-       struct VethMsg *msgs;
-       HvLpIndex this_lp = mFabricMgr->mThisLp;
-       int i;
-
-       veth_failMe(cnx);
-
-       cnx->remote_lp = rlp;
-
-       spin_lock_init(&cnx->ack_gate);
-       spin_lock_init(&cnx->status_gate);
-
-       cnx->status.got_cap = 0;
-       cnx->status.got_cap_ack = 0;
-
-       INIT_WORK(&cnx->finish_open_wq, veth_finish_open_connection, cnx);
-       INIT_WORK(&cnx->monitor_ack_wq, veth_monitor_ack_task, cnx);
-
-       init_timer(&cnx->ack_timer);
-       cnx->ack_timer.function = veth_timed_ack;
-       cnx->ack_timer.data = (unsigned long) cnx;
-
-       if ( (rlp == this_lp) 
-            || ! HvLpConfig_doLpsCommunicateOnVirtualLan(this_lp, rlp) )
-               return;
-
-       msgs = kmalloc(VETH_NUMBUFFERS * sizeof(struct VethMsg), GFP_KERNEL);
-       if (! msgs)
-               return;
-
-       cnx->mMsgs = msgs;
-       memset(msgs, 0, VETH_NUMBUFFERS * sizeof(struct VethMsg));
-       spin_lock_init(&cnx->mMsgStack.lock);
-
-       for (i = 0; i < VETH_NUMBUFFERS; i++) {
-               msgs[i].mIndex = i;
-               VETHSTACKPUSH(&cnx->mMsgStack, msgs + i);
-       }
-
-       cnx->mNumMsgs = VETH_NUMBUFFERS;
-
-       cnx->mNumberAllocated = veth_allocate_events(rlp, 2);
-
-       if (cnx->mNumberAllocated < 2) {
-               veth_error("Couldn't allocate base msgs for lpar %d, only got %d\n",
-                          cnx->remote_lp, cnx->mNumberAllocated);
-               veth_failMe(cnx);
-               return;
-       }
-
-       cnx->mNumberRcvMsgs = veth_allocate_events(cnx->remote_lp,
-                                                  VETH_NUMBUFFERS);
-}
-
-static void veth_open_connection(u8 rlp)
-{
-       struct VethLpConnection *cnx = &mFabricMgr->mConnection[rlp];
-       HvLpEvent_Rc rc;
-       u64 *rawcap = (u64 *) &cnx->mMyCap;
-
-       if (! cnx->mMsgs || (cnx->mNumberAllocated < 2)
-           || ! cnx->mNumberRcvMsgs) {
-               veth_failMe(cnx);
-               return;
-       }
-
-       spin_lock_irq(&cnx->ack_gate);
-
-       memset(&cnx->pending_acks, 0xff, sizeof (cnx->pending_acks));
-       cnx->num_pending_acks = 0;
-
-       HvCallEvent_openLpEventPath(rlp, HvLpEvent_Type_VirtualLan);
-
-       cnx->status.mOpen = 1;
-
-       cnx->src_inst = 
-               HvCallEvent_getSourceLpInstanceId(rlp,
-                                                 HvLpEvent_Type_VirtualLan);
-       cnx->dst_inst =
-               HvCallEvent_getTargetLpInstanceId(rlp,
-                                                 HvLpEvent_Type_VirtualLan);
-
-       spin_unlock_irq(&cnx->ack_gate);
-
-       cnx->mMyCap.mNumberBuffers = cnx->mNumMsgs;
-
-       if (cnx->mNumMsgs < 10)
-               cnx->mMyCap.mThreshold = 1;
-       else if (cnx->mNumMsgs < 20)
-               cnx->mMyCap.mThreshold = 4;
-       else if (cnx->mNumMsgs < 40)
-               cnx->mMyCap.mThreshold = 10;
-       else
-               cnx->mMyCap.mThreshold = 20;
-
-       cnx->mMyCap.mTimer = VETH_ACKTIMEOUT;
-
-       rc = veth_signalevent(cnx, VethEventTypeCap,
-                             HvLpEvent_AckInd_DoAck,
-                             HvLpEvent_AckType_ImmediateAck,
-                             0, rawcap[0], rawcap[1], rawcap[2], rawcap[3],
-                             rawcap[4]);
-
-       if ( (rc == HvLpEvent_Rc_PartitionDead)
-            || (rc == HvLpEvent_Rc_PathClosed)) {
-               /* Never mind we'll resend out caps when we get the
-                * caps from the other end comes up and sends
-                * theirs */
-               return;
-       } else if (rc != HvLpEvent_Rc_Good) {
-               veth_error("Couldn't send capabilities to lpar %d, rc=%x\n",
-                                 cnx->remote_lp, (int) rc);
-               veth_failMe(cnx);
-               return;
-       }
-
-       cnx->status.sent_caps = 1;
-}
-
-static void veth_finish_open_connection(void *parm)
-{
-       struct VethLpConnection *cnx = (struct VethLpConnection *)parm;
-       struct VethCapData *remoteCap = &cnx->mRemoteCap;
-       u64 numAcks = 0;
-       HvLpEvent_Rc rc;
-
-       spin_lock_irq(&cnx->status_gate);
-
-       memcpy(remoteCap, &cnx->cap_event.u.mCapabilitiesData,
-              sizeof(*remoteCap));
-
-       if ( (remoteCap->mNumberBuffers == 0)
-            || (remoteCap->mThreshold > VETH_MAX_ACKS_PER_MSG)
-            || (remoteCap->mThreshold == 0) ) {
-               veth_error("Received incompatible capabilities from lpar %d\n",
-                          cnx->remote_lp);
-               cnx->cap_event.mBaseEvent.xRc = HvLpEvent_Rc_InvalidSubtypeData;
-               HvCallEvent_ackLpEvent((struct HvLpEvent *)&cnx->cap_event);
-
-               veth_failMe(cnx);
-               goto out;
-       }
-
-       numAcks = (remoteCap->mNumberBuffers / remoteCap->mThreshold) + 1;
-
-       if (cnx->mNumberLpAcksAlloced < numAcks) {
-               int num;
-               
-               numAcks = numAcks - cnx->mNumberLpAcksAlloced;
-               
-               spin_unlock_irq(&cnx->status_gate);
-               
-               num = veth_allocate_events(cnx->remote_lp, numAcks);
-               
-               if (num > 0)
-                       cnx->mNumberLpAcksAlloced += num;
-               spin_lock_irq(&cnx->status_gate);
-               
-       }
-       
-       /* Convert timer to jiffies */
-       if (cnx->mMyCap.mTimer)
-               cnx->ack_timeout = remoteCap->mTimer * HZ / 1000000;
-       else
-               cnx->ack_timeout = VETH_ACKTIMEOUT * HZ / 1000000;
-
-       if (cnx->mNumberLpAcksAlloced < numAcks) {
-               veth_error("Couldn't allocate all the frames ack events for lpar %d\n",
-                          cnx->remote_lp);
-
-               cnx->cap_event.mBaseEvent.xRc = HvLpEvent_Rc_BufferNotAvailable;
-               HvCallEvent_ackLpEvent((struct HvLpEvent *)&cnx->cap_event);
-
-               veth_failMe(cnx);
-               goto out;
-       }
-
-       rc = HvCallEvent_ackLpEvent((struct HvLpEvent *)&cnx->cap_event);
-       if (rc != HvLpEvent_Rc_Good) {
-               veth_error("Failed to ack remote cap for lpar %d with rc %x\n",
-                          cnx->remote_lp, (int) rc);
-               veth_failMe(cnx);
-               goto out;
-       }
-
-       if (cnx->cap_ack_event.mBaseEvent.xRc != HvLpEvent_Rc_Good) {
-               veth_printk(KERN_ERR, "Bad rc(%d) from lpar %d on capabilities\n",
-                           cnx->cap_ack_event.mBaseEvent.xRc, cnx->remote_lp);
-               veth_failMe(cnx);
-               goto out;
-       }
-
-       /* Send the monitor */
-       rc = veth_signalevent(cnx, VethEventTypeMonitor,
-                             HvLpEvent_AckInd_DoAck,
-                             HvLpEvent_AckType_DeferredAck,
-                             0, 0, 0, 0, 0, 0);
-       
-       if (rc != HvLpEvent_Rc_Good) {
-               veth_error("Monitor send to lpar %d failed with rc %x\n",
-                                 cnx->remote_lp, (int) rc);
-               veth_failMe(cnx);
-               goto out;
-       }
-
-       cnx->status.ready = 1;
-       
-       /* Start the ACK timer */
-       cnx->ack_timer.expires = jiffies + cnx->ack_timeout;
-       add_timer(&cnx->ack_timer);
-
- out:
-       spin_unlock_irq(&cnx->status_gate);
-}
-
-static void
-veth_closeConnection(u8 rlp)
-{
-       struct VethLpConnection *cnx = &mFabricMgr->mConnection[rlp];
-       unsigned long flags;
-
-       del_timer_sync(&cnx->ack_timer);
-
-       cnx->status.sent_caps = 0;
-       cnx->status.got_cap = 0;
-       cnx->status.got_cap_ack = 0;
-
-       if (cnx->status.mOpen) {
-               int i;          
-
-               HvCallEvent_closeLpEventPath(rlp, HvLpEvent_Type_VirtualLan);
-               cnx->status.mOpen = 0;
-               veth_failMe(cnx);
-
-               /* reset ack data */
-               spin_lock_irqsave(&cnx->ack_gate, flags);
-
-               memset(&cnx->pending_acks, 0xff, sizeof (cnx->pending_acks));
-               cnx->num_pending_acks = 0;
-
-               spin_unlock_irqrestore(&cnx->ack_gate, flags);
-
-               /* Clean up any leftover messages */
-               for (i = 0; i < cnx->mNumMsgs; ++i)
-                       veth_recycle_msg(cnx, cnx->mMsgs + i);
-       }
-
-}
-
-static void veth_take_cap(struct VethLpConnection *cnx, struct VethLpEvent *event)
-{
-       unsigned long flags;
-       HvLpEvent_Rc rc;
-
-       spin_lock_irqsave(&cnx->status_gate, flags);
-
-       if (cnx->status.got_cap) {
-               veth_error("Received a second capabilities from lpar %d\n",
-                          cnx->remote_lp);
-               event->mBaseEvent.xRc = HvLpEvent_Rc_BufferNotAvailable;
-               HvCallEvent_ackLpEvent((struct HvLpEvent *) event);
-               goto out;
-       }
-
-       memcpy(&cnx->cap_event, event, sizeof (cnx->cap_event));
-       /* If we failed to send caps out before (presumably because
-        * the target lpar was down), send them now. */
-       if (! cnx->status.sent_caps) {
-               u64 *rawcap = (u64 *) &cnx->mMyCap;
-
-               cnx->dst_inst =
-                       HvCallEvent_getTargetLpInstanceId(cnx->remote_lp,
-                                                         HvLpEvent_Type_VirtualLan);
-
-               rc = veth_signalevent(cnx, VethEventTypeCap,
-                                     HvLpEvent_AckInd_DoAck,
-                                     HvLpEvent_AckType_ImmediateAck,
-                                     0, rawcap[0], rawcap[1], rawcap[2], rawcap[3],
-                                     rawcap[4]);
-               if ( (rc == HvLpEvent_Rc_PartitionDead)
-                    || (rc == HvLpEvent_Rc_PathClosed)) {
-                       veth_error("Partition down when resending capabilities!!\n");
-                       goto out;
-               } else if (rc != HvLpEvent_Rc_Good) {
-                       veth_error("Couldn't send cap to lpar %d, rc %x\n",
-                                  cnx->remote_lp, (int) rc);
-                       veth_failMe(cnx);
-                       goto out;
-               }
-               cnx->status.sent_caps = 1;
-       }
-
-       cnx->status.got_cap = 1;
-       if (cnx->status.got_cap_ack)
-               schedule_work(&cnx->finish_open_wq);
-
- out:
-       spin_unlock_irqrestore(&cnx->status_gate, flags);
-}
-
-static void
-veth_take_cap_ack(struct VethLpConnection *cnx, struct VethLpEvent *event)
-{
-       unsigned long flags;
-
-       spin_lock_irqsave(&cnx->status_gate, flags);
-
-       if (cnx->status.got_cap_ack) {
-               veth_error("Received a second capabilities ack from lpar %d\n",
-                          cnx->remote_lp);
-               goto out;
-       }
-
-       memcpy(&cnx->cap_ack_event, event, sizeof(&cnx->cap_ack_event));
-       cnx->status.got_cap_ack = 1;
-
-       if (cnx->status.got_cap)
-               schedule_work(&cnx->finish_open_wq);
-
- out:
-       spin_unlock_irqrestore(&cnx->status_gate, flags);
-}
-
-static void
-veth_take_monitor_ack(struct VethLpConnection *cnx,  struct VethLpEvent *event)
-{
-       unsigned long flags;
-
-       spin_lock_irqsave(&cnx->status_gate, flags);
-
-       veth_printk(KERN_DEBUG, "Monitor ack returned for lpar %d\n", cnx->remote_lp);
-
-       if (cnx->status.monitor_ack_pending) {
-               veth_error("Received a monitor ack from lpar %d while already processing one\n",
-                          cnx->remote_lp);
-               goto out;
-       }
-
-       schedule_work(&cnx->monitor_ack_wq);
-
- out:
-       spin_unlock_irqrestore(&cnx->status_gate, flags);
-}
-
-static void
-veth_recycle_msg(struct VethLpConnection *cnx, struct VethMsg *myMsg)
-{
-       u32 dma_address, dma_length;
-
-       if (test_and_clear_bit(0, &myMsg->mInUse)) {
-               dma_address = myMsg->mSendData.addr[0];
-               dma_length = myMsg->mSendData.len[0];
-
-               pci_unmap_single(iSeries_veth_dev, dma_address, dma_length,
-                                PCI_DMA_TODEVICE);
-
-               if (myMsg->skb) {
-                       dev_kfree_skb_any(myMsg->skb);
-                       myMsg->skb = NULL;
-               }
-
-               memset(&myMsg->mSendData, 0, sizeof(myMsg->mSendData));
-               VETHSTACKPUSH(&cnx->mMsgStack, myMsg);
-       } else {
-               if (cnx->status.mOpen) {
-                       veth_error("Received a frames ack for msg %d from lpar %d while not outstanding\n",
-                                  myMsg->mIndex, cnx->remote_lp);
-               }
-       }
-
-       veth_startQueues();
-}
-
-static void
-veth_startQueues(void)
-{
-       int i;
-
-       for (i = 0; i < veth_num_devices; ++i)
-               netif_wake_queue(veth_devices[i]);
-}
-
-static void veth_monitor_ack_task(void *parm)
-{
-       struct VethLpConnection *cnx = (struct VethLpConnection *) parm;
-
-       spin_lock_irq(&cnx->status_gate);
-
-       veth_failMe(cnx);
-
-       if (cnx->status.mOpen) {
-               veth_closeConnection(cnx->remote_lp);
-
-               udelay(100);
-       }
-
-       if (VethModuleReopen) {
-               veth_open_connection(cnx->remote_lp);
-       }
-       cnx->status.monitor_ack_pending = 0;
-
-       spin_unlock_irq(&cnx->status_gate);
-}
-
-static inline int veth_frame_wanted(struct veth_port *port, u64 mac_addr)
-{
-       int wanted = 0;
-       int i;
-       unsigned long flags;
-
-       if ( (mac_addr == port->mMyAddress)
-            || (mac_addr == 0xffffffffffff0000)
-            || port->promiscuous )
-               return 1;
-       
-       if (! (((char *) &mac_addr)[0] & 0x01))
-               return 0;
-
-       read_lock_irqsave(&port->mcast_gate, flags);
-
-       if (port->all_mcast) {
-               wanted = 1;
-               goto out;
-       }
-
-       for (i = 0; i < port->num_mcast; ++i) {
-               if (port->mcast_addr[i] == mac_addr) {
-                       wanted = 1;
-                       break;
-               }
-       }
-
- out:
-       read_unlock_irqrestore(&port->mcast_gate, flags);
-
-       return wanted;
-}
-
-struct dma_chunk {
-       u64 addr;
-       u64 size;
-};
-
-#define VETH_MAX_PAGES_PER_FRAME ( (VETH_MAX_MTU+PAGE_SIZE-2)/PAGE_SIZE + 1 )
-
-static inline void veth_build_dma_list(struct dma_chunk *list, unsigned char *p,
-                                     unsigned long length)
-{
-       unsigned long done;
-       int i = 1;
-
-       /* FIXME: skbs are continguous in real addresses.  Do we
-        * really need to break it into PAGE_SIZE chunks, or can we do
-        * it just at the granularity of iSeries real->absolute
-        * mapping? */
-       list[0].addr = veth_dma_addr(p);
-       list[0].size = min(length,
-                          PAGE_SIZE - ((unsigned long)p & ~PAGE_MASK));
-
-       done = list[0].size;
-       while (done < length) {
-               list[i].addr = veth_dma_addr(p + done);
-               list[i].size = min(done, PAGE_SIZE);
-               done += list[i].size;
-               i++;
-       }
-}
-
-static void veth_receive(struct VethLpConnection *cnx, struct VethLpEvent *event)
-{
-       struct VethFramesData *senddata = &event->u.mSendData;
-       int startchunk = 0;
-       int nchunks;
-       unsigned long flags;
-       HvLpDma_Rc rc;
-
-       do {
-               u16 length = 0;
-               struct sk_buff *skb;
-               struct dma_chunk local_list[VETH_MAX_PAGES_PER_FRAME];
-               struct dma_chunk remote_list[VETH_MAXFRAMESPERMSG];
-               u64 dest;
-               HvLpVirtualLanIndex vlan;
-               struct veth_port *port;
-
-               /* FIXME: do we need this? */
-               memset(local_list, 0, sizeof(local_list));
-               memset(remote_list, 0, sizeof(VETH_MAXFRAMESPERMSG));
-
-               nchunks = 0;
-
-               /* a 0 address marks the end of the valid entries */
-               if (senddata->addr[startchunk] == 0)
-                       break;
-
-               /* make sure that we have at least 1 EOF entry in the
-                * remaining entries */
-               if (! (senddata->eof >> startchunk)) {
-                       veth_error("missing EOF frag in event: 0x%x startchunk=%d\n",
-                                  (unsigned) senddata->eof, startchunk);
-                       break;
-               }
-
-               /* build list of chunks in this frame */
-               do {
-                       remote_list[nchunks].addr =
-                               (u64) senddata->addr[startchunk + nchunks] << 32;
-                       remote_list[nchunks].size =
-                               senddata->len[startchunk + nchunks];
-                       length += remote_list[nchunks].size;
-               } while (! (senddata->eof & (1 << (startchunk + nchunks++))));
-
-               /* length == total length of all chunks */
-               /* nchunks == # of chunks in this frame */
-
-               if ((length - ETH_HLEN) > VETH_MAX_MTU)
-                       continue;
-
-               skb = alloc_skb(length, GFP_ATOMIC);
-               if (!skb)
-                       continue;
-
-               veth_build_dma_list(local_list, skb->data, length);
-
-               rc = HvCallEvent_dmaBufList(HvLpEvent_Type_VirtualLan,
-                                           event->mBaseEvent.xSourceLp,
-                                           HvLpDma_Direction_RemoteToLocal,
-                                           cnx->src_inst,
-                                           cnx->dst_inst,
-                                           HvLpDma_AddressType_RealAddress,
-                                           HvLpDma_AddressType_TceIndex,
-                                           veth_dma_addr(&local_list),
-                                           veth_dma_addr(&remote_list),
-                                           length);
-               if (rc != HvLpDma_Rc_Good) {
-                       dev_kfree_skb_irq(skb);
-                       continue;
-               }
-               
-               vlan = skb->data[9];
-               port = mFabricMgr->mPorts[vlan];
-               dest = *((u64 *) skb->data) & 0xFFFFFFFFFFFF0000;
-
-               if ((vlan > HVMAXARCHITECTEDVIRTUALLANS) || !port) {
-                       dev_kfree_skb_irq(skb);
-                       continue;
-               }
-               if (! veth_frame_wanted(port, dest)) {
-                       dev_kfree_skb_irq(skb);
-                       continue;
-               }
-                       
-               skb_put(skb, length);
-               skb->dev = port->mDev;
-               skb->protocol = eth_type_trans(skb, port->mDev);
-               skb->ip_summed = CHECKSUM_NONE;
-               netif_rx(skb);  /* send it up */
-               port->stats.rx_packets++;
-               port->stats.rx_bytes += length;
-       } while (startchunk += nchunks, startchunk < VETH_MAXFRAMESPERMSG);
-
-       /* Ack it */
-       spin_lock_irqsave(&cnx->ack_gate, flags);
-       
-       if (cnx->num_pending_acks < VETH_MAX_ACKS_PER_MSG) {
-               cnx->pending_acks[cnx->num_pending_acks] =
-                       event->mBaseEvent.xCorrelationToken;
-               ++cnx->num_pending_acks;
-               
-               if (cnx->num_pending_acks == cnx->mRemoteCap.mThreshold) {
-                       rc = veth_signaldata(cnx, VethEventTypeFramesAck,
-                                            0, &cnx->pending_acks);
-                       
-                       if (rc != HvLpEvent_Rc_Good)
-                               veth_error("Error 0x%x acking frames from lpar %d!\n",
-                                          (unsigned)rc, cnx->remote_lp);
-                       
-                       cnx->num_pending_acks = 0;
-                       memset(&cnx->pending_acks, 0xff, sizeof(cnx->pending_acks));
-               }
-               
-       }
-       
-       spin_unlock_irqrestore(&cnx->ack_gate, flags);
-}
-
-static void veth_timed_ack(unsigned long ptr)
-{
-       unsigned long flags;
-       HvLpEvent_Rc rc;
-       struct VethLpConnection *cnx = (struct VethLpConnection *) ptr;
-
-       /* Ack all the events */
-       spin_lock_irqsave(&cnx->ack_gate, flags);
-
-       if (cnx->num_pending_acks > 0) {
-               rc = veth_signaldata(cnx, VethEventTypeFramesAck,
-                                    0, &cnx->pending_acks);
-               if (rc != HvLpEvent_Rc_Good)
-                       veth_error("Error 0x%x acking frames from lpar %d!\n", 
-                                  (unsigned) rc, cnx->remote_lp);
-
-               cnx->num_pending_acks = 0;
-               memset(&cnx->pending_acks, 0xff, sizeof(cnx->pending_acks));
-       }
-
-       spin_unlock_irqrestore(&cnx->ack_gate, flags);
-
-       veth_startQueues();
-
-       /* Reschedule the timer */
-       cnx->ack_timer.expires = jiffies + cnx->ack_timeout;
-       add_timer(&cnx->ack_timer);
-}
diff --git a/drivers/net/iseries_veth.h b/drivers/net/iseries_veth.h
deleted file mode 100644 (file)
index 00bedd4..0000000
+++ /dev/null
@@ -1,147 +0,0 @@
-/* File veth.h created by Kyle A. Lucke on Mon Aug  7 2000. */
-
-/* Change Activity: */
-/* End Change Activity */
-
-#ifndef _ISERIES_VETH_H
-#define _ISERIES_VETH_H
-
-#include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/HvLpEvent.h>
-#include <linux/netdevice.h>
-
-#define VethEventTypeCap (0)
-#define VethEventTypeFrames (1)
-#define VethEventTypeMonitor (2)
-#define VethEventTypeFramesAck (3)
-
-#define VETH_MAX_ACKS_PER_MSG  (20)
-#define VETH_MAXFRAMESPERMSG   (6)
-#define VETH_ACKTIMEOUT        (1000000) /* microseconds */
-#define HVMAXARCHITECTEDVIRTUALLANS 16
-#define VETH_MAX_MCAST 12
-
-#define VETHSTACK(T) \
-       struct VethStack##T \
-       { \
-               struct T *head; \
-               spinlock_t lock; \
-       }
-#define VETHSTACKPUSH(s, p) \
-       do { \
-               unsigned long flags; \
-               spin_lock_irqsave(&(s)->lock,flags); \
-               (p)->next = (s)->head; \
-               (s)->head = (p); \
-               spin_unlock_irqrestore(&(s)->lock, flags); \
-       } while(0)
-
-#define VETHSTACKPOP(s,p) \
-       do { \
-               unsigned long flags; \
-               spin_lock_irqsave(&(s)->lock,flags); \
-               (p) = (s)->head; \
-               if ((s)->head != NULL) { \
-                       (s)->head = (s)->head->next; \
-               } \
-               spin_unlock_irqrestore(&(s)->lock, flags); \
-       } while(0)
-
-struct VethFramesData {
-       u32 addr[6];
-       u16 len[6];
-       u32 eof:6;
-       u32 mReserved:26;
-};
-
-struct VethFramesAckData {
-       u16 mToken[VETH_MAX_ACKS_PER_MSG];
-};
-
-struct VethCapData {
-       u8 mVersion;
-       u8 mReserved1;
-       u16 mNumberBuffers;
-       u16 mThreshold;
-       u16 mReserved2;
-       u32 mTimer;
-       u32 mReserved3;
-       u64 mReserved4;
-       u64 mReserved5;
-       u64 mReserved6;
-};
-
-struct VethLpEvent {
-       struct HvLpEvent mBaseEvent;
-       union {
-               struct VethFramesData mSendData;
-               struct VethCapData mCapabilitiesData;
-               struct VethFramesAckData mFramesAckData;
-       } u;
-
-};
-
-struct VethMsg {
-       struct VethMsg *next;
-       struct VethFramesData mSendData;
-       int mIndex;
-       unsigned long mInUse;
-       struct sk_buff *skb;
-};
-
-struct VethLpConnection {
-       HvLpIndex remote_lp;
-       struct work_struct finish_open_wq;
-       struct work_struct monitor_ack_wq;
-       struct timer_list ack_timer;
-       u32 mNumMsgs;
-       struct VethMsg *mMsgs;
-
-       HvLpInstanceId src_inst;
-       HvLpInstanceId dst_inst;
-
-       spinlock_t status_gate;
-       struct {
-               u64 mOpen:1;
-               u64 ready;
-               u64 sent_caps:1;
-               u64 got_cap:1;
-               u64 got_cap_ack:1;
-               u64 monitor_ack_pending:1;
-       } status;
-       struct VethLpEvent cap_event, cap_ack_event;
-
-       spinlock_t ack_gate;
-       u16 pending_acks[VETH_MAX_ACKS_PER_MSG];
-       u32 num_pending_acks;
-
-       int mNumberRcvMsgs;
-       int mNumberLpAcksAlloced;
-       struct VethCapData mMyCap;
-       struct VethCapData mRemoteCap;
-       unsigned long mAllocTaskPending;
-       int mNumberAllocated;
-       u32 ack_timeout;
-       VETHSTACK(VethMsg) mMsgStack;
-};
-
-struct veth_port {
-       struct net_device *mDev;
-       struct net_device_stats stats;
-       u64 mMyAddress;
-
-       rwlock_t mcast_gate;
-       int promiscuous;
-       int all_mcast;
-       int num_mcast;
-       u64 mcast_addr[VETH_MAX_MCAST];
-};
-
-struct VethFabricMgr {
-       u64 mEyecatcher;
-       HvLpIndex mThisLp;
-       struct VethLpConnection mConnection[HVMAXARCHITECTEDLPS];
-       struct veth_port *mPorts[HVMAXARCHITECTEDVIRTUALLANS];
-};
-
-#endif /* _ISERIES_VETH_H */
index 756ce28..89a44c4 100644 (file)
@@ -1092,8 +1092,12 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
 {
        struct el3_private *lp = (struct el3_private *)dev->priv;
 
-       if (netif_device_present(dev))
+       if (netif_device_present(dev)) {
+               unsigned long flags;
+               spin_lock_irqsave(&lp->window_lock, flags);
                update_stats(dev);
+               spin_unlock_irqrestore(&lp->window_lock, flags);
+       }
        return &lp->stats;
 }
 
@@ -1105,7 +1109,6 @@ static void update_stats(struct net_device *dev)
 {
        struct el3_private *lp = (struct el3_private *)dev->priv;
        ioaddr_t ioaddr = dev->base_addr;
-       unsigned long flags;
        u8 rx, tx, up;
 
        DEBUG(2, "%s: updating the statistics.\n", dev->name);
@@ -1113,8 +1116,6 @@ static void update_stats(struct net_device *dev)
        if (inw(ioaddr+EL3_STATUS) == 0xffff) /* No card. */
                return;
                
-       spin_lock_irqsave(&lp->window_lock, flags);
-
        /* Unlike the 3c509 we need not turn off stats updates while reading. */
        /* Switch to the stats window, and read everything. */
        EL3WINDOW(6);
@@ -1139,7 +1140,6 @@ static void update_stats(struct net_device *dev)
        lp->stats.tx_bytes                      += tx + ((up & 0xf0) << 12);
 
        EL3WINDOW(1);
-       spin_unlock_irqrestore(&lp->window_lock, flags);
 }
 
 static int el3_rx(struct net_device *dev, int worklimit)
@@ -1281,6 +1281,8 @@ static int el3_close(struct net_device *dev)
        DEBUG(2, "%s: shutting down ethercard.\n", dev->name);
        
        if (DEV_OK(link)) {
+               unsigned long flags;
+
                /* Turn off statistics ASAP.  We update lp->stats below. */
                outw(StatsDisable, ioaddr + EL3_CMD);
                
@@ -1290,8 +1292,9 @@ static int el3_close(struct net_device *dev)
                
                /* Note: Switching to window 0 may disable the IRQ. */
                EL3WINDOW(0);
-               
+               spin_lock_irqsave(&lp->window_lock, flags);
                update_stats(dev);
+               spin_unlock_irqrestore(&lp->window_lock, flags);
        }
 
        link->open--;
index c52f1c1..635cead 100644 (file)
@@ -11,7 +11,7 @@
 
     Copyright (C) 1999 David A. Hinds -- dahinds@users.sourceforge.net
 
-    pcnet_cs.c 1.149 2002/06/29 06:27:37
+    pcnet_cs.c 1.153 2003/11/09 18:53:09
     
     The network driver code is based on Donald Becker's NE2000 code:
 
@@ -74,7 +74,7 @@ static int pc_debug = PCMCIA_DEBUG;
 MODULE_PARM(pc_debug, "i");
 #define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
 static char *version =
-"pcnet_cs.c 1.149 2002/06/29 06:27:37 (David Hinds)";
+"pcnet_cs.c 1.153 2003/11/09 18:53:09 (David Hinds)";
 #else
 #define DEBUG(n, args...)
 #endif
@@ -871,13 +871,15 @@ static int pcnet_event(event_t event, int priority,
 
     MII interface support for DL10019 and DL10022 based cards
 
-    On the DL10019, the MII IO direction bit is 0x10; on  the DL10022
+    On the DL10019, the MII IO direction bit is 0x10; on the DL10022
     it is 0x20.  Setting both bits seems to work on both card types.
 
 ======================================================================*/
 
 #define DLINK_GPIO             0x1c
 #define DLINK_DIAG             0x1d
+#define DLINK_EEPROM           0x1e
+
 #define MDIO_SHIFT_CLK         0x80
 #define MDIO_DATA_OUT          0x40
 #define MDIO_DIR_WRITE         0x30
@@ -940,6 +942,98 @@ static void mdio_reset(ioaddr_t addr, int phy_id)
     outb_p(0x00, addr);
 }
 
+/*======================================================================
+
+    EEPROM access routines for DL10019 and DL10022 based cards
+
+======================================================================*/
+
+#define EE_EEP         0x40
+#define EE_ASIC                0x10
+#define EE_CS          0x08
+#define EE_CK          0x04
+#define EE_DO          0x02
+#define EE_DI          0x01
+#define EE_ADOT                0x01    /* DataOut for ASIC */
+#define EE_READ_CMD    0x06
+
+#define DL19FDUPLX     0x0400  /* DL10019 Full duplex mode */
+
+static int read_eeprom(ioaddr_t ioaddr, int location)
+{
+    int i, retval = 0;
+    ioaddr_t ee_addr = ioaddr + DLINK_EEPROM;
+    int read_cmd = location | (EE_READ_CMD << 8);
+
+    outb(0, ee_addr);
+    outb(EE_EEP|EE_CS, ee_addr);
+
+    /* Shift the read command bits out. */
+    for (i = 10; i >= 0; i--) {
+       short dataval = (read_cmd & (1 << i)) ? EE_DO : 0;
+       outb_p(EE_EEP|EE_CS|dataval, ee_addr);
+       outb_p(EE_EEP|EE_CS|dataval|EE_CK, ee_addr);
+    }
+    outb(EE_EEP|EE_CS, ee_addr);
+
+    for (i = 16; i > 0; i--) {
+       outb_p(EE_EEP|EE_CS | EE_CK, ee_addr);
+       retval = (retval << 1) | ((inb(ee_addr) & EE_DI) ? 1 : 0);
+       outb_p(EE_EEP|EE_CS, ee_addr);
+    }
+
+    /* Terminate the EEPROM access. */
+    outb(0, ee_addr);
+    return retval;
+}
+
+/*
+    The internal ASIC registers can be changed by EEPROM READ access
+    with EE_ASIC bit set.
+    In ASIC mode, EE_ADOT is used to output the data to the ASIC.
+*/
+
+static void write_asic(ioaddr_t ioaddr, int location, short asic_data)
+{
+       int i;
+       ioaddr_t ee_addr = ioaddr + DLINK_EEPROM;
+       short dataval;
+       int read_cmd = location | (EE_READ_CMD << 8);
+
+       asic_data |= read_eeprom(ioaddr, location);
+
+       outb(0, ee_addr);
+       outb(EE_ASIC|EE_CS|EE_DI, ee_addr);
+
+       read_cmd = read_cmd >> 1;
+
+       /* Shift the read command bits out. */
+       for (i = 9; i >= 0; i--) {
+               dataval = (read_cmd & (1 << i)) ? EE_DO : 0;
+               outb_p(EE_ASIC|EE_CS|EE_DI|dataval, ee_addr);
+               outb_p(EE_ASIC|EE_CS|EE_DI|dataval|EE_CK, ee_addr);
+               outb_p(EE_ASIC|EE_CS|EE_DI|dataval, ee_addr);
+       }
+       // sync
+       outb(EE_ASIC|EE_CS, ee_addr);
+       outb(EE_ASIC|EE_CS|EE_CK, ee_addr);
+       outb(EE_ASIC|EE_CS, ee_addr);
+
+       for (i = 15; i >= 0; i--) {
+               dataval = (asic_data & (1 << i)) ? EE_ADOT : 0;
+               outb_p(EE_ASIC|EE_CS|dataval, ee_addr);
+               outb_p(EE_ASIC|EE_CS|dataval|EE_CK, ee_addr);
+               outb_p(EE_ASIC|EE_CS|dataval, ee_addr);
+       }
+
+       /* Terminate the ASIC access. */
+       outb(EE_ASIC|EE_DI, ee_addr);
+       outb(EE_ASIC|EE_DI| EE_CK, ee_addr);
+       outb(EE_ASIC|EE_DI, ee_addr);
+
+       outb(0, ee_addr);
+}
+
 /*====================================================================*/
 
 static void set_misc_reg(struct net_device *dev)
@@ -1154,6 +1248,9 @@ static void ei_watchdog(u_long arg)
        if (link && (info->flags & IS_DL10022)) {
            /* Disable collision detection on full duplex links */
            outb((p & 0x0140) ? 4 : 0, nic_base + DLINK_DIAG);
+       } else if (link && (info->flags & IS_DL10019)) {
+           /* Disable collision detection on full duplex links */
+           write_asic(dev->base_addr, 4, (p & 0x140) ? DL19FDUPLX : 0);
        }
        if (link) {
            if (info->phy_id == info->eth_phy) {
index 0968a4d..d204dbb 100644 (file)
@@ -1151,3 +1151,4 @@ module_exit(pppoe_exit);
 MODULE_AUTHOR("Michal Ostrowski <mostrows@speakeasy.net>");
 MODULE_DESCRIPTION("PPP over Ethernet driver");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS_NETPROTO(PF_PPPOX);
index 7d97ba7..4b9ce66 100644 (file)
    preliminary Rev. 1.0 Jan. 18, 1998
    http://www.sis.com.tw/support/databook.htm
 
+   Rev 1.08.07 Nov.  2 2003 Daniele Venzano <webvenza@libero.it> add suspend/resume support
    Rev 1.08.06 Sep. 24 2002 Mufasa Yang bug fix for Tx timeout & add SiS963 support
-   Rev 1.08.05 Jun. 6 2002 Mufasa Yang bug fix for read_eeprom & Tx descriptor over-boundary 
+   Rev 1.08.05 Jun.  6 2002 Mufasa Yang bug fix for read_eeprom & Tx descriptor over-boundary
    Rev 1.08.04 Apr. 25 2002 Mufasa Yang <mufasa@sis.com.tw> added SiS962 support
-   Rev 1.08.03 Feb. 1 2002 Matt Domsch <Matt_Domsch@dell.com> update to use library crc32 function
+   Rev 1.08.03 Feb.  1 2002 Matt Domsch <Matt_Domsch@dell.com> update to use library crc32 function
    Rev 1.08.02 Nov. 30 2001 Hui-Fen Hsu workaround for EDB & bug fix for dhcp problem
    Rev 1.08.01 Aug. 25 2001 Hui-Fen Hsu update for 630ET & workaround for ICS1893 PHY
    Rev 1.08.00 Jun. 11 2001 Hui-Fen Hsu workaround for RTL8201 PHY and some bug fix
@@ -72,7 +73,7 @@
 #include "sis900.h"
 
 #define SIS900_MODULE_NAME "sis900"
-#define SIS900_DRV_VERSION "v1.08.06 9/24/2002"
+#define SIS900_DRV_VERSION "v1.08.07 11/02/2003"
 
 static char version[] __devinitdata =
 KERN_INFO "sis900.c: " SIS900_DRV_VERSION "\n";
@@ -169,6 +170,7 @@ struct sis900_private {
 
        unsigned int tx_full;                   /* The Tx queue is full.    */
        u8 host_bridge_rev;
+       u32 pci_state[16];
 };
 
 MODULE_AUTHOR("Jim Huang <cmhuang@sis.com.tw>, Ollie Lho <ollie@sis.com.tw>");
@@ -305,7 +307,7 @@ static int __devinit sis635_get_mac_addr(struct pci_dev * pci_dev, struct net_de
                *( ((u16 *)net_dev->dev_addr) + i) = inw(ioaddr + rfdr);
        }
 
-       /* enable packet filitering */
+       /* enable packet filtering */
        outl(rfcrSave | RFEN, rfcr + ioaddr);
 
        return 1;
@@ -994,7 +996,7 @@ sis900_init_rxfilter (struct net_device * net_dev)
                }
        }
 
-       /* enable packet filitering */
+       /* enable packet filtering */
        outl(rfcrSave | RFEN, rfcr + ioaddr);
 }
 
@@ -1466,7 +1468,7 @@ static void sis900_tx_timeout(struct net_device *net_dev)
  *     @net_dev: the net device to transmit with
  *
  *     Set the transmit buffer descriptor, 
- *     and write TxENA to enable transimt state machine.
+ *     and write TxENA to enable transmit state machine.
  *     tell upper layer if the buffer is full
  */
 
@@ -2184,11 +2186,72 @@ static void __devexit sis900_remove(struct pci_dev *pci_dev)
        pci_set_drvdata(pci_dev, NULL);
 }
 
+#ifdef CONFIG_PM
+
+static int sis900_suspend(struct pci_dev *pci_dev, u32 state)
+{
+       struct net_device *net_dev = pci_get_drvdata(pci_dev);
+       struct sis900_private *sis_priv = net_dev->priv;
+       long ioaddr = net_dev->base_addr;
+
+       if(!netif_running(net_dev))
+               return 0;
+
+       netif_stop_queue(net_dev);
+
+       /* Stop the chip's Tx and Rx Status Machine */
+       outl(RxDIS | TxDIS | inl(ioaddr + cr), ioaddr + cr);
+
+       pci_set_power_state(pci_dev, 3);
+       pci_save_state(pci_dev, sis_priv->pci_state);
+
+       return 0;
+}
+
+static int sis900_resume(struct pci_dev *pci_dev)
+{
+       struct net_device *net_dev = pci_get_drvdata(pci_dev);
+       struct sis900_private *sis_priv = net_dev->priv;
+       long ioaddr = net_dev->base_addr;
+
+       if(!netif_running(net_dev))
+               return 0;
+       pci_restore_state(pci_dev, sis_priv->pci_state);
+       pci_set_power_state(pci_dev, 0);
+
+       sis900_init_rxfilter(net_dev);
+
+       sis900_init_tx_ring(net_dev);
+       sis900_init_rx_ring(net_dev);
+
+       set_rx_mode(net_dev);
+
+       netif_device_attach(net_dev);
+       netif_start_queue(net_dev);
+
+       /* Workaround for EDB */
+       sis900_set_mode(ioaddr, HW_SPEED_10_MBPS, FDX_CAPABLE_HALF_SELECTED);
+
+       /* Enable all known interrupts by setting the interrupt mask. */
+       outl((RxSOVR|RxORN|RxERR|RxOK|TxURN|TxERR|TxIDLE), ioaddr + imr);
+       outl(RxENA | inl(ioaddr + cr), ioaddr + cr);
+       outl(IE, ioaddr + ier);
+
+       sis900_check_mode(net_dev, sis_priv->mii);
+
+       return 0;
+}
+#endif /* CONFIG_PM */
+
 static struct pci_driver sis900_pci_driver = {
        .name           = SIS900_MODULE_NAME,
        .id_table       = sis900_pci_tbl,
        .probe          = sis900_probe,
        .remove         = __devexit_p(sis900_remove),
+#ifdef CONFIG_PM
+       .suspend        = sis900_suspend,
+       .resume         = sis900_resume,
+#endif /* CONFIG_PM */
 };
 
 static int __init sis900_init_module(void)
index 9a208b9..8c3e990 100644 (file)
@@ -56,8 +56,8 @@
 
 #define DRV_MODULE_NAME                "tg3"
 #define PFX DRV_MODULE_NAME    ": "
-#define DRV_MODULE_VERSION     "2.3"
-#define DRV_MODULE_RELDATE     "November 5, 2003"
+#define DRV_MODULE_VERSION     "2.5"
+#define DRV_MODULE_RELDATE     "December 22, 2003"
 
 #define TG3_DEF_MAC_MODE       0
 #define TG3_DEF_RX_MODE                0
@@ -176,6 +176,10 @@ static struct pci_device_id tg3_pci_tbl[] = {
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
        { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5901_2,
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+       { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5704S_2,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+       { PCI_VENDOR_ID_BROADCOM, PCI_DEVICE_ID_TIGON3_5705F,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
        { PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9DXX,
          PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
        { PCI_VENDOR_ID_SYSKONNECT, PCI_DEVICE_ID_SYSKONNECT_9MXX,
@@ -2688,7 +2692,13 @@ static int tg3_start_xmit_4gbug(struct sk_buff *skb, struct net_device *dev)
                                mss |= (tsflags << 11);
                        }
                } else {
-                       mss += tcp_opt_len;
+                       if (tcp_opt_len || skb->nh.iph->ihl > 5) {
+                               int tsflags;
+
+                               tsflags = ((skb->nh.iph->ihl - 5) +
+                                          (tcp_opt_len >> 2));
+                               base_flags |= tsflags << 12;
+                       }
                }
        }
 #else
@@ -2895,7 +2905,13 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev)
                                mss |= (tsflags << 11);
                        }
                } else {
-                       mss += tcp_opt_len;
+                       if (tcp_opt_len || skb->nh.iph->ihl > 5) {
+                               int tsflags;
+
+                               tsflags = ((skb->nh.iph->ihl - 5) +
+                                          (tcp_opt_len >> 2));
+                               base_flags |= tsflags << 12;
+                       }
                }
        }
 #else
@@ -3860,180 +3876,181 @@ static int tg3_load_5701_a0_firmware_fix(struct tg3 *tp)
 #if TG3_TSO_SUPPORT != 0
 
 #define TG3_TSO_FW_RELEASE_MAJOR       0x1
-#define TG3_TSO_FW_RELASE_MINOR                0x3
+#define TG3_TSO_FW_RELASE_MINOR                0x4
 #define TG3_TSO_FW_RELEASE_FIX         0x0
 #define TG3_TSO_FW_START_ADDR          0x08000000
 #define TG3_TSO_FW_TEXT_ADDR           0x08000000
-#define TG3_TSO_FW_TEXT_LEN            0x1ac0
-#define TG3_TSO_FW_RODATA_ADDR         0x08001650
+#define TG3_TSO_FW_TEXT_LEN            0x1a90
+#define TG3_TSO_FW_RODATA_ADDR         0x08001a900
 #define TG3_TSO_FW_RODATA_LEN          0x60
-#define TG3_TSO_FW_DATA_ADDR           0x080016a0
+#define TG3_TSO_FW_DATA_ADDR           0x08001b20
 #define TG3_TSO_FW_DATA_LEN            0x20
-#define TG3_TSO_FW_SBSS_ADDR           0x080016c0
+#define TG3_TSO_FW_SBSS_ADDR           0x08001b40
 #define TG3_TSO_FW_SBSS_LEN            0x2c
-#define TG3_TSO_FW_BSS_ADDR            0x080016e0
-#define TG3_TSO_FW_BSS_LEN             0x890
+#define TG3_TSO_FW_BSS_ADDR            0x08001b70
+#define TG3_TSO_FW_BSS_LEN             0x894
 
 static u32 tg3TsoFwText[] = {
        0x00000000, 0x10000003, 0x00000000, 0x0000000d, 0x0000000d, 0x3c1d0800,
        0x37bd4000, 0x03a0f021, 0x3c100800, 0x26100000, 0x0e000010, 0x00000000,
        0x0000000d, 0x00000000, 0x00000000, 0x00000000, 0x27bdffe0, 0x3c04fefe,
-       0xafbf0018, 0x0e0005e0, 0x34840002, 0x0e000670, 0x00000000, 0x3c030800,
-       0x90631b78, 0x24020002, 0x3c040800, 0x24841acc, 0x14620003, 0x24050001,
-       0x3c040800, 0x24841ac0, 0x24060002, 0x00003821, 0xafa00010, 0x0e000684,
+       0xafbf0018, 0x0e0005d4, 0x34840002, 0x0e000664, 0x00000000, 0x3c030800,
+       0x90631b58, 0x24020002, 0x3c040800, 0x24841a9c, 0x14620003, 0x24050001,
+       0x3c040800, 0x24841a90, 0x24060003, 0x00003821, 0xafa00010, 0x0e000678,
        0xafa00014, 0x8f625c50, 0x34420001, 0xaf625c50, 0x8f625c90, 0x34420001,
        0xaf625c90, 0x2402ffff, 0x0e000034, 0xaf625404, 0x8fbf0018, 0x03e00008,
-       0x27bd0020, 0x00000000, 0x00000000, 0x00000000, 0x27bdffe0, 0xafbf0018,
-       0xafb10014, 0x0e000052, 0xafb00010, 0x24110001, 0x8f706820, 0x32020100,
-       0x10400003, 0x00000000, 0x0e0000b2, 0x00000000, 0x8f706820, 0x32022000,
-       0x10400004, 0x32020001, 0x0e0001e3, 0x24040001, 0x32020001, 0x10400003,
-       0x00000000, 0x0e00009a, 0x00000000, 0x0a00003a, 0xaf715028, 0x8fbf0018,
-       0x8fb10014, 0x8fb00010, 0x03e00008, 0x27bd0020, 0x27bdffe0, 0x3c040800,
-       0x24841ae0, 0x00002821, 0x00003021, 0x00003821, 0xafbf0018, 0xafa00010,
-       0x0e000684, 0xafa00014, 0x3c040800, 0x248423e8, 0xa4800000, 0x3c010800,
-       0xa0201ba8, 0x3c010800, 0xac201bac, 0x3c010800, 0xac201bb0, 0x3c010800,
-       0xac201bb4, 0x3c010800, 0xac201bbc, 0x3c010800, 0xac201bc8, 0x3c010800,
-       0xac201bcc, 0x8f624434, 0x3c010800, 0xac221b98, 0x8f624438, 0x3c010800,
-       0xac221b9c, 0x8f624410, 0xac80f7a8, 0x3c010800, 0xac201b94, 0x3c010800,
-       0xac2023f0, 0x3c010800, 0xac2023d8, 0x3c010800, 0xac2023dc, 0x3c010800,
-       0xac202410, 0x3c010800, 0xac221ba0, 0x8f620068, 0x24030007, 0x00021702,
-       0x10430005, 0x00000000, 0x8f620068, 0x00021702, 0x14400004, 0x24020001,
-       0x3c010800, 0x0a00008e, 0xac20241c, 0xac820034, 0x3c040800, 0x24841aec,
-       0x3c050800, 0x8ca5241c, 0x00003021, 0x00003821, 0xafa00010, 0x0e000684,
-       0xafa00014, 0x8fbf0018, 0x03e00008, 0x27bd0020, 0x27bdffe0, 0x3c040800,
-       0x24841af8, 0x00002821, 0x00003021, 0x00003821, 0xafbf0018, 0xafa00010,
-       0x0e000684, 0xafa00014, 0x0e000052, 0x00000000, 0x0e0000ab, 0x00002021,
-       0x8fbf0018, 0x03e00008, 0x27bd0020, 0x24020001, 0x8f636820, 0x00821004,
-       0x00021027, 0x00621824, 0x03e00008, 0xaf636820, 0x27bdffd0, 0xafbf002c,
-       0xafb60028, 0xafb50024, 0xafb40020, 0xafb3001c, 0xafb20018, 0xafb10014,
-       0xafb00010, 0x8f665c5c, 0x3c030800, 0x24631bcc, 0x8c620000, 0x14460005,
-       0x3c0200ff, 0x3c020800, 0x90421ba8, 0x14400115, 0x3c0200ff, 0x3442fff8,
-       0x00c28824, 0xac660000, 0x00111902, 0x306300ff, 0x30c20003, 0x000211c0,
-       0x00623825, 0x00e02821, 0x00061602, 0x3c030800, 0x90631ba8, 0x3044000f,
-       0x1460002b, 0x00804021, 0x24020001, 0x3c010800, 0xa0221ba8, 0x00071100,
-       0x00821025, 0x3c010800, 0xac201bac, 0x3c010800, 0xac201bb0, 0x3c010800,
-       0xac201bb4, 0x3c010800, 0xac201bbc, 0x3c010800, 0xac201bc8, 0x3c010800,
-       0xac201bc0, 0x3c010800, 0xac201bc4, 0x3c010800, 0xa42223e8, 0x9623000c,
-       0x30628000, 0x10400008, 0x30627fff, 0x2442003e, 0x3c010800, 0xa4221ba6,
-       0x24020001, 0x3c010800, 0x0a0000f9, 0xac222404, 0x24620036, 0x3c010800,
-       0xa4221ba6, 0x3c010800, 0xac202404, 0x3c010800, 0xac202400, 0x3c010800,
-       0x0a000101, 0xac202408, 0x9622000c, 0x3c010800, 0xa42223fc, 0x3c040800,
-       0x24841bac, 0x8c820000, 0x00021100, 0x3c010800, 0x00220821, 0xac311bd8,
-       0x8c820000, 0x00021100, 0x3c010800, 0x00220821, 0xac261bdc, 0x8c820000,
-       0x24a30001, 0x306701ff, 0x00021100, 0x3c010800, 0x00220821, 0xac271be0,
-       0x8c820000, 0x00021100, 0x3c010800, 0x00220821, 0xac281be4, 0x96230008,
-       0x3c020800, 0x8c421bbc, 0x00432821, 0x3c010800, 0xac251bbc, 0x9622000a,
-       0x30420004, 0x14400018, 0x00071100, 0x8f630c14, 0x3063000f, 0x2c620002,
-       0x1440000b, 0x3c02c000, 0x8f630c14, 0x3c020800, 0x8c421b50, 0x3063000f,
-       0x24420001, 0x3c010800, 0xac221b50, 0x2c620002, 0x1040fff7, 0x3c02c000,
-       0x00c21825, 0xaf635c5c, 0x8f625c50, 0x30420002, 0x10400014, 0x00000000,
-       0x0a000133, 0x00000000, 0x3c030800, 0x8c631b90, 0x3c040800, 0x94841ba4,
-       0x01021025, 0x3c010800, 0xa42223ea, 0x24020001, 0x3c010800, 0xac221bc8,
-       0x24630001, 0x0085202a, 0x3c010800, 0x10800003, 0xac231b90, 0x3c010800,
-       0xa4251ba4, 0x3c060800, 0x24c61bac, 0x8cc20000, 0x24420001, 0xacc20000,
-       0x28420080, 0x14400005, 0x00000000, 0x0e00065e, 0x24040002, 0x0a0001d9,
-       0x00000000, 0x3c020800, 0x8c421bc8, 0x1040007f, 0x24020001, 0x3c040800,
-       0x90841ba8, 0x14820077, 0x24020003, 0x3c150800, 0x96b51ba6, 0x3c050800,
-       0x8ca51bbc, 0x32a3ffff, 0x00a3102a, 0x14400073, 0x00000000, 0x14a30003,
-       0x00000000, 0x3c010800, 0xac242400, 0x10600061, 0x00009021, 0x24d60004,
-       0x0060a021, 0x24d30014, 0x8ec20000, 0x00028100, 0x3c110800, 0x02308821,
-       0x0e00062d, 0x8e311bd8, 0x00403021, 0x10c00059, 0x00000000, 0x9628000a,
-       0x31020040, 0x10400004, 0x2407180c, 0x8e22000c, 0x2407188c, 0xacc20018,
-       0x31021000, 0x10400004, 0x34e32000, 0x00081040, 0x3042c000, 0x00623825,
-       0x3c030800, 0x00701821, 0x8c631be0, 0x3c020800, 0x00501021, 0x8c421be4,
-       0x00031d00, 0x00021400, 0x00621825, 0xacc30014, 0x8ec30004, 0x96220008,
-       0x00432023, 0x3242ffff, 0x3083ffff, 0x00431021, 0x0282102a, 0x14400002,
-       0x02b22823, 0x00802821, 0x8e620000, 0x30a4ffff, 0x00441021, 0xae620000,
-       0x8e220000, 0xacc20000, 0x8e220004, 0x8e63fff4, 0x00431021, 0xacc20004,
-       0xa4c5000e, 0x8e62fff4, 0x00441021, 0xae62fff4, 0x96230008, 0x0043102a,
-       0x14400005, 0x02459021, 0x8e62fff0, 0xae60fff4, 0x24420001, 0xae62fff0,
-       0xacc00008, 0x3242ffff, 0x14540008, 0x24020305, 0x31020080, 0x54400001,
-       0x34e70010, 0x24020905, 0xa4c2000c, 0x0a0001bc, 0x34e70020, 0xa4c2000c,
-       0x3c020800, 0x8c422400, 0x10400003, 0x3c024b65, 0x0a0001c4, 0x34427654,
-       0x3c02b49a, 0x344289ab, 0xacc2001c, 0x30e2ffff, 0xacc20010, 0x0e0005aa,
-       0x00c02021, 0x3242ffff, 0x0054102b, 0x1440ffa4, 0x00000000, 0x24020002,
-       0x3c010800, 0x0a0001d9, 0xa0221ba8, 0x8ec2083c, 0x24420001, 0x0a0001d9,
-       0xaec2083c, 0x14820003, 0x00000000, 0x0e0004b9, 0x00000000, 0x8fbf002c,
+       0x27bd0020, 0x00000000, 0x00000000, 0x00000000, 0x27bdffe0, 0xafbf001c,
+       0xafb20018, 0xafb10014, 0x0e00005b, 0xafb00010, 0x24120002, 0x24110001,
+       0x8f706820, 0x32020100, 0x10400003, 0x00000000, 0x0e0000bb, 0x00000000,
+       0x8f706820, 0x32022000, 0x10400004, 0x32020001, 0x0e0001ef, 0x24040001,
+       0x32020001, 0x10400003, 0x00000000, 0x0e0000a3, 0x00000000, 0x3c020800,
+       0x90421b88, 0x14520003, 0x00000000, 0x0e0004bf, 0x00000000, 0x0a00003c,
+       0xaf715028, 0x8fbf001c, 0x8fb20018, 0x8fb10014, 0x8fb00010, 0x03e00008,
+       0x27bd0020, 0x27bdffe0, 0x3c040800, 0x24841ab0, 0x00002821, 0x00003021,
+       0x00003821, 0xafbf0018, 0xafa00010, 0x0e000678, 0xafa00014, 0x3c040800,
+       0x248423c8, 0xa4800000, 0x3c010800, 0xa0201b88, 0x3c010800, 0xac201b8c,
+       0x3c010800, 0xac201b90, 0x3c010800, 0xac201b94, 0x3c010800, 0xac201b9c,
+       0x3c010800, 0xac201ba8, 0x3c010800, 0xac201bac, 0x8f624434, 0x3c010800,
+       0xac221b78, 0x8f624438, 0x3c010800, 0xac221b7c, 0x8f624410, 0xac80f7a8,
+       0x3c010800, 0xac201b74, 0x3c010800, 0xac2023d0, 0x3c010800, 0xac2023b8,
+       0x3c010800, 0xac2023bc, 0x3c010800, 0xac2023f0, 0x3c010800, 0xac221b80,
+       0x8f620068, 0x24030007, 0x00021702, 0x10430005, 0x00000000, 0x8f620068,
+       0x00021702, 0x14400004, 0x24020001, 0x3c010800, 0x0a000097, 0xac2023fc,
+       0xac820034, 0x3c040800, 0x24841abc, 0x3c050800, 0x8ca523fc, 0x00003021,
+       0x00003821, 0xafa00010, 0x0e000678, 0xafa00014, 0x8fbf0018, 0x03e00008,
+       0x27bd0020, 0x27bdffe0, 0x3c040800, 0x24841ac8, 0x00002821, 0x00003021,
+       0x00003821, 0xafbf0018, 0xafa00010, 0x0e000678, 0xafa00014, 0x0e00005b,
+       0x00000000, 0x0e0000b4, 0x00002021, 0x8fbf0018, 0x03e00008, 0x27bd0020,
+       0x24020001, 0x8f636820, 0x00821004, 0x00021027, 0x00621824, 0x03e00008,
+       0xaf636820, 0x27bdffd0, 0xafbf002c, 0xafb60028, 0xafb50024, 0xafb40020,
+       0xafb3001c, 0xafb20018, 0xafb10014, 0xafb00010, 0x8f675c5c, 0x3c030800,
+       0x24631bac, 0x8c620000, 0x14470005, 0x3c0200ff, 0x3c020800, 0x90421b88,
+       0x14400118, 0x3c0200ff, 0x3442fff8, 0x00e28824, 0xac670000, 0x00111902,
+       0x306300ff, 0x30e20003, 0x000211c0, 0x00622825, 0x00a04021, 0x00071602,
+       0x3c030800, 0x90631b88, 0x3044000f, 0x14600036, 0x00804821, 0x24020001,
+       0x3c010800, 0xa0221b88, 0x00051100, 0x00821025, 0x3c010800, 0xac201b8c,
+       0x3c010800, 0xac201b90, 0x3c010800, 0xac201b94, 0x3c010800, 0xac201b9c,
+       0x3c010800, 0xac201ba8, 0x3c010800, 0xac201ba0, 0x3c010800, 0xac201ba4,
+       0x3c010800, 0xa42223c8, 0x9622000c, 0x30437fff, 0x3c010800, 0xa4222400,
+       0x30428000, 0x3c010800, 0xa4231bb6, 0x10400005, 0x24020001, 0x3c010800,
+       0xac2223e4, 0x0a000102, 0x2406003e, 0x24060036, 0x3c010800, 0xac2023e4,
+       0x9622000a, 0x3c030800, 0x94631bb6, 0x3c010800, 0xac2023e0, 0x3c010800,
+       0xac2023e8, 0x00021302, 0x00021080, 0x00c21021, 0x00621821, 0x3c010800,
+       0xa42223c0, 0x3c010800, 0x0a000115, 0xa4231b86, 0x9622000c, 0x3c010800,
+       0xa42223dc, 0x3c040800, 0x24841b8c, 0x8c820000, 0x00021100, 0x3c010800,
+       0x00220821, 0xac311bb8, 0x8c820000, 0x00021100, 0x3c010800, 0x00220821,
+       0xac271bbc, 0x8c820000, 0x25030001, 0x306601ff, 0x00021100, 0x3c010800,
+       0x00220821, 0xac261bc0, 0x8c820000, 0x00021100, 0x3c010800, 0x00220821,
+       0xac291bc4, 0x96230008, 0x3c020800, 0x8c421b9c, 0x00432821, 0x3c010800,
+       0xac251b9c, 0x9622000a, 0x30420004, 0x14400018, 0x00061100, 0x8f630c14,
+       0x3063000f, 0x2c620002, 0x1440000b, 0x3c02c000, 0x8f630c14, 0x3c020800,
+       0x8c421b30, 0x3063000f, 0x24420001, 0x3c010800, 0xac221b30, 0x2c620002,
+       0x1040fff7, 0x3c02c000, 0x00e21825, 0xaf635c5c, 0x8f625c50, 0x30420002,
+       0x10400014, 0x00000000, 0x0a000147, 0x00000000, 0x3c030800, 0x8c631b70,
+       0x3c040800, 0x94841b84, 0x01221025, 0x3c010800, 0xa42223ca, 0x24020001,
+       0x3c010800, 0xac221ba8, 0x24630001, 0x0085202a, 0x3c010800, 0x10800003,
+       0xac231b70, 0x3c010800, 0xa4251b84, 0x3c060800, 0x24c61b8c, 0x8cc20000,
+       0x24420001, 0xacc20000, 0x28420080, 0x14400005, 0x00000000, 0x0e000652,
+       0x24040002, 0x0a0001e5, 0x00000000, 0x3c020800, 0x8c421ba8, 0x10400077,
+       0x24020001, 0x3c050800, 0x90a51b88, 0x14a20071, 0x00000000, 0x3c150800,
+       0x96b51b86, 0x3c040800, 0x8c841b9c, 0x32a3ffff, 0x0083102a, 0x1440006b,
+       0x00000000, 0x14830003, 0x00000000, 0x3c010800, 0xac2523e0, 0x1060005b,
+       0x00009021, 0x24d60004, 0x0060a021, 0x24d30014, 0x8ec20000, 0x00028100,
+       0x3c110800, 0x02308821, 0x0e000621, 0x8e311bb8, 0x00402821, 0x10a00053,
+       0x00000000, 0x9628000a, 0x31020040, 0x10400004, 0x2407180c, 0x8e22000c,
+       0x2407188c, 0xaca20018, 0x3c030800, 0x00701821, 0x8c631bc0, 0x3c020800,
+       0x00501021, 0x8c421bc4, 0x00031d00, 0x00021400, 0x00621825, 0xaca30014,
+       0x8ec30004, 0x96220008, 0x00432023, 0x3242ffff, 0x3083ffff, 0x00431021,
+       0x0282102a, 0x14400002, 0x02b23023, 0x00803021, 0x8e620000, 0x30c4ffff,
+       0x00441021, 0xae620000, 0x8e220000, 0xaca20000, 0x8e220004, 0x8e63fff4,
+       0x00431021, 0xaca20004, 0xa4a6000e, 0x8e62fff4, 0x00441021, 0xae62fff4,
+       0x96230008, 0x0043102a, 0x14400005, 0x02469021, 0x8e62fff0, 0xae60fff4,
+       0x24420001, 0xae62fff0, 0xaca00008, 0x3242ffff, 0x14540008, 0x24020305,
+       0x31020080, 0x54400001, 0x34e70010, 0x24020905, 0xa4a2000c, 0x0a0001ca,
+       0x34e70020, 0xa4a2000c, 0x3c020800, 0x8c4223e0, 0x10400003, 0x3c024b65,
+       0x0a0001d2, 0x34427654, 0x3c02b49a, 0x344289ab, 0xaca2001c, 0x30e2ffff,
+       0xaca20010, 0x0e00059f, 0x00a02021, 0x3242ffff, 0x0054102b, 0x1440ffaa,
+       0x00000000, 0x24020002, 0x3c010800, 0x0a0001e5, 0xa0221b88, 0x8ec2083c,
+       0x24420001, 0x0a0001e5, 0xaec2083c, 0x0e0004bf, 0x00000000, 0x8fbf002c,
        0x8fb60028, 0x8fb50024, 0x8fb40020, 0x8fb3001c, 0x8fb20018, 0x8fb10014,
        0x8fb00010, 0x03e00008, 0x27bd0030, 0x27bdffd0, 0xafbf0028, 0xafb30024,
        0xafb20020, 0xafb1001c, 0xafb00018, 0x8f725c9c, 0x3c0200ff, 0x3442fff8,
-       0x3c060800, 0x24c61bc4, 0x02428824, 0x9623000e, 0x8cc20000, 0x00431021,
-       0xacc20000, 0x8e220010, 0x30420020, 0x14400011, 0x00809821, 0x0e000643,
+       0x3c060800, 0x24c61ba4, 0x02428824, 0x9623000e, 0x8cc20000, 0x00431021,
+       0xacc20000, 0x8e220010, 0x30420020, 0x14400011, 0x00809821, 0x0e000637,
        0x02202021, 0x3c02c000, 0x02421825, 0xaf635c9c, 0x8f625c90, 0x30420002,
        0x10400121, 0x00000000, 0xaf635c9c, 0x8f625c90, 0x30420002, 0x1040011c,
-       0x00000000, 0x0a000200, 0x00000000, 0x8e240008, 0x8e230014, 0x00041402,
+       0x00000000, 0x0a00020c, 0x00000000, 0x8e240008, 0x8e230014, 0x00041402,
        0x000241c0, 0x00031502, 0x304201ff, 0x2442ffff, 0x3042007f, 0x00031942,
        0x30637800, 0x00021100, 0x24424000, 0x00625021, 0x9542000a, 0x3084ffff,
-       0x30420008, 0x104000b3, 0x000429c0, 0x3c020800, 0x8c422410, 0x1440002d,
-       0x25050008, 0x95020014, 0x3c010800, 0xa42223e0, 0x8d070010, 0x00071402,
-       0x3c010800, 0xa42223e2, 0x3c010800, 0xa42723e4, 0x9502000e, 0x30e3ffff,
-       0x00431023, 0x3c010800, 0xac222418, 0x8f626800, 0x3c030010, 0x00431024,
-       0x10400005, 0x00000000, 0x9503001a, 0x9502001c, 0x0a000235, 0x00431021,
-       0x9502001a, 0x3c010800, 0xac22240c, 0x3c02c000, 0x02421825, 0x3c010800,
-       0xac282410, 0x3c010800, 0xac322414, 0xaf635c9c, 0x8f625c90, 0x30420002,
+       0x30420008, 0x104000b3, 0x000429c0, 0x3c020800, 0x8c4223f0, 0x1440002d,
+       0x25050008, 0x95020014, 0x3c010800, 0xa42223c0, 0x8d070010, 0x00071402,
+       0x3c010800, 0xa42223c2, 0x3c010800, 0xa42723c4, 0x9502000e, 0x30e3ffff,
+       0x00431023, 0x3c010800, 0xac2223f8, 0x8f626800, 0x3c030010, 0x00431024,
+       0x10400005, 0x00000000, 0x9503001a, 0x9502001c, 0x0a000241, 0x00431021,
+       0x9502001a, 0x3c010800, 0xac2223ec, 0x3c02c000, 0x02421825, 0x3c010800,
+       0xac2823f0, 0x3c010800, 0xac3223f4, 0xaf635c9c, 0x8f625c90, 0x30420002,
        0x104000df, 0x00000000, 0xaf635c9c, 0x8f625c90, 0x30420002, 0x104000da,
-       0x00000000, 0x0a000242, 0x00000000, 0x9502000e, 0x3c030800, 0x946323e4,
+       0x00000000, 0x0a00024e, 0x00000000, 0x9502000e, 0x3c030800, 0x946323c4,
        0x00434823, 0x3123ffff, 0x2c620008, 0x1040001c, 0x00000000, 0x95020014,
        0x24420028, 0x00a22821, 0x00031042, 0x1840000b, 0x00002021, 0x24c60848,
        0x00403821, 0x94a30000, 0x8cc20000, 0x24840001, 0x00431021, 0xacc20000,
        0x0087102a, 0x1440fff9, 0x24a50002, 0x31220001, 0x1040001f, 0x3c024000,
-       0x3c040800, 0x2484240c, 0xa0a00001, 0x94a30000, 0x8c820000, 0x00431021,
-       0x0a000281, 0xac820000, 0x8f626800, 0x3c030010, 0x00431024, 0x10400009,
-       0x00000000, 0x9502001a, 0x3c030800, 0x8c63240c, 0x00431021, 0x3c010800,
-       0xac22240c, 0x0a000282, 0x3c024000, 0x9502001a, 0x9504001c, 0x3c030800,
-       0x8c63240c, 0x00441023, 0x00621821, 0x3c010800, 0xac23240c, 0x3c024000,
+       0x3c040800, 0x248423ec, 0xa0a00001, 0x94a30000, 0x8c820000, 0x00431021,
+       0x0a00028d, 0xac820000, 0x8f626800, 0x3c030010, 0x00431024, 0x10400009,
+       0x00000000, 0x9502001a, 0x3c030800, 0x8c6323ec, 0x00431021, 0x3c010800,
+       0xac2223ec, 0x0a00028e, 0x3c024000, 0x9502001a, 0x9504001c, 0x3c030800,
+       0x8c6323ec, 0x00441023, 0x00621821, 0x3c010800, 0xac2323ec, 0x3c024000,
        0x02421825, 0xaf635c9c, 0x8f625c90, 0x30420002, 0x1440fffc, 0x00000000,
-       0x9542000a, 0x30420010, 0x10400095, 0x00000000, 0x3c060800, 0x24c62410,
-       0x3c020800, 0x944223e4, 0x8cc50000, 0x3c040800, 0x8c842418, 0x24420030,
-       0x00a22821, 0x94a20004, 0x3c030800, 0x8c63240c, 0x00441023, 0x00621821,
+       0x9542000a, 0x30420010, 0x10400095, 0x00000000, 0x3c060800, 0x24c623f0,
+       0x3c020800, 0x944223c4, 0x8cc50000, 0x3c040800, 0x8c8423f8, 0x24420030,
+       0x00a22821, 0x94a20004, 0x3c030800, 0x8c6323ec, 0x00441023, 0x00621821,
        0x00603821, 0x00032402, 0x30e2ffff, 0x00823821, 0x00071402, 0x00e23821,
-       0x00071027, 0x3c010800, 0xac23240c, 0xa4a20006, 0x3c030800, 0x8c632414,
+       0x00071027, 0x3c010800, 0xac2323ec, 0xa4a20006, 0x3c030800, 0x8c6323f4,
        0x3c0200ff, 0x3442fff8, 0x00628824, 0x96220008, 0x24040001, 0x24034000,
        0x000241c0, 0x00e01021, 0xa502001a, 0xa500001c, 0xacc00000, 0x3c010800,
-       0xac241b70, 0xaf635cb8, 0x8f625cb0, 0x30420002, 0x10400003, 0x00000000,
-       0x3c010800, 0xac201b70, 0x8e220008, 0xaf625cb8, 0x8f625cb0, 0x30420002,
-       0x10400003, 0x00000000, 0x3c010800, 0xac201b70, 0x3c020800, 0x8c421b70,
-       0x1040ffec, 0x00000000, 0x3c040800, 0x0e000643, 0x8c842414, 0x0a000320,
-       0x00000000, 0x3c030800, 0x90631ba8, 0x24020002, 0x14620003, 0x3c034b65,
-       0x0a0002d7, 0x00008021, 0x8e22001c, 0x34637654, 0x10430002, 0x24100002,
-       0x24100001, 0x01002021, 0x0e000346, 0x02003021, 0x24020003, 0x3c010800,
-       0xa0221ba8, 0x24020002, 0x1202000a, 0x24020001, 0x3c030800, 0x8c632400,
-       0x10620006, 0x00000000, 0x3c020800, 0x944223e8, 0x00021400, 0x0a000315,
-       0xae220014, 0x3c040800, 0x248423ea, 0x94820000, 0x00021400, 0xae220014,
-       0x3c020800, 0x8c421bcc, 0x3c03c000, 0x3c010800, 0xa0201ba8, 0x00431025,
+       0xac241b50, 0xaf635cb8, 0x8f625cb0, 0x30420002, 0x10400003, 0x00000000,
+       0x3c010800, 0xac201b50, 0x8e220008, 0xaf625cb8, 0x8f625cb0, 0x30420002,
+       0x10400003, 0x00000000, 0x3c010800, 0xac201b50, 0x3c020800, 0x8c421b50,
+       0x1040ffec, 0x00000000, 0x3c040800, 0x0e000637, 0x8c8423f4, 0x0a00032c,
+       0x00000000, 0x3c030800, 0x90631b88, 0x24020002, 0x14620003, 0x3c034b65,
+       0x0a0002e3, 0x00008021, 0x8e22001c, 0x34637654, 0x10430002, 0x24100002,
+       0x24100001, 0x01002021, 0x0e000352, 0x02003021, 0x24020003, 0x3c010800,
+       0xa0221b88, 0x24020002, 0x1202000a, 0x24020001, 0x3c030800, 0x8c6323e0,
+       0x10620006, 0x00000000, 0x3c020800, 0x944223c8, 0x00021400, 0x0a000321,
+       0xae220014, 0x3c040800, 0x248423ca, 0x94820000, 0x00021400, 0xae220014,
+       0x3c020800, 0x8c421bac, 0x3c03c000, 0x3c010800, 0xa0201b88, 0x00431025,
        0xaf625c5c, 0x8f625c50, 0x30420002, 0x10400009, 0x00000000, 0x2484f7e2,
        0x8c820000, 0x00431025, 0xaf625c5c, 0x8f625c50, 0x30420002, 0x1440fffa,
-       0x00000000, 0x3c020800, 0x24421b94, 0x8c430000, 0x24630001, 0xac430000,
+       0x00000000, 0x3c020800, 0x24421b74, 0x8c430000, 0x24630001, 0xac430000,
        0x8f630c14, 0x3063000f, 0x2c620002, 0x1440000c, 0x3c024000, 0x8f630c14,
-       0x3c020800, 0x8c421b50, 0x3063000f, 0x24420001, 0x3c010800, 0xac221b50,
+       0x3c020800, 0x8c421b30, 0x3063000f, 0x24420001, 0x3c010800, 0xac221b30,
        0x2c620002, 0x1040fff7, 0x00000000, 0x3c024000, 0x02421825, 0xaf635c9c,
        0x8f625c90, 0x30420002, 0x1440fffc, 0x00000000, 0x12600003, 0x00000000,
-       0x0e0004b9, 0x00000000, 0x8fbf0028, 0x8fb30024, 0x8fb20020, 0x8fb1001c,
-       0x8fb00018, 0x03e00008, 0x27bd0030, 0x8f634450, 0x3c040800, 0x24841b98,
+       0x0e0004bf, 0x00000000, 0x8fbf0028, 0x8fb30024, 0x8fb20020, 0x8fb1001c,
+       0x8fb00018, 0x03e00008, 0x27bd0030, 0x8f634450, 0x3c040800, 0x24841b78,
        0x8c820000, 0x00031c02, 0x0043102b, 0x14400007, 0x3c038000, 0x8c840004,
        0x8f624450, 0x00021c02, 0x0083102b, 0x1040fffc, 0x3c038000, 0xaf634444,
        0x8f624444, 0x00431024, 0x1440fffd, 0x00000000, 0x8f624448, 0x03e00008,
        0x3042ffff, 0x3c024000, 0x00822025, 0xaf645c38, 0x8f625c30, 0x30420002,
        0x1440fffc, 0x00000000, 0x03e00008, 0x00000000, 0x27bdffe0, 0x00805821,
-       0x14c00017, 0x256e0008, 0x3c020800, 0x8c422404, 0x1040000a, 0x2402003e,
-       0x3c010800, 0xa42223e0, 0x24020016, 0x3c010800, 0xa42223e2, 0x2402002a,
-       0x3c010800, 0x0a000360, 0xa42223e4, 0x95620014, 0x3c010800, 0xa42223e0,
-       0x8d670010, 0x00071402, 0x3c010800, 0xa42223e2, 0x3c010800, 0xa42723e4,
-       0x3c040800, 0x948423e4, 0x3c030800, 0x946323e2, 0x95cf0006, 0x3c020800,
-       0x944223e0, 0x00832023, 0x01e2c023, 0x3065ffff, 0x24a20028, 0x01c24821,
+       0x14c00011, 0x256e0008, 0x3c020800, 0x8c4223e4, 0x10400007, 0x24020016,
+       0x3c010800, 0xa42223c2, 0x2402002a, 0x3c010800, 0x0a000366, 0xa42223c4,
+       0x8d670010, 0x00071402, 0x3c010800, 0xa42223c2, 0x3c010800, 0xa42723c4,
+       0x3c040800, 0x948423c4, 0x3c030800, 0x946323c2, 0x95cf0006, 0x3c020800,
+       0x944223c0, 0x00832023, 0x01e2c023, 0x3065ffff, 0x24a20028, 0x01c24821,
        0x3082ffff, 0x14c0001a, 0x01226021, 0x9582000c, 0x3042003f, 0x3c010800,
-       0xa42223e6, 0x95820004, 0x95830006, 0x3c010800, 0xac2023f4, 0x3c010800,
-       0xac2023f8, 0x00021400, 0x00431025, 0x3c010800, 0xac221bd0, 0x95220004,
-       0x3c010800, 0xa4221bd4, 0x95230002, 0x01e51023, 0x0043102a, 0x10400010,
-       0x24020001, 0x3c010800, 0x0a000394, 0xac222408, 0x3c030800, 0x8c6323f8,
-       0x3c020800, 0x94421bd4, 0x00431021, 0xa5220004, 0x3c020800, 0x94421bd0,
-       0xa5820004, 0x3c020800, 0x8c421bd0, 0xa5820006, 0x3c020800, 0x8c422400,
-       0x3c0d0800, 0x8dad23f4, 0x3c0a0800, 0x144000e5, 0x8d4a23f8, 0x3c020800,
-       0x94421bd4, 0x004a1821, 0x3063ffff, 0x0062182b, 0x24020002, 0x10c2000d,
-       0x01435023, 0x3c020800, 0x944223e6, 0x30420009, 0x10400008, 0x00000000,
-       0x9582000c, 0x3042fff6, 0xa582000c, 0x3c020800, 0x944223e6, 0x30420009,
-       0x01a26823, 0x3c020800, 0x8c422408, 0x1040004a, 0x01203821, 0x3c020800,
-       0x944223e2, 0x00004021, 0xa520000a, 0x01e21023, 0xa5220002, 0x3082ffff,
+       0xa42223c6, 0x95820004, 0x95830006, 0x3c010800, 0xac2023d4, 0x3c010800,
+       0xac2023d8, 0x00021400, 0x00431025, 0x3c010800, 0xac221bb0, 0x95220004,
+       0x3c010800, 0xa4221bb4, 0x95230002, 0x01e51023, 0x0043102a, 0x10400010,
+       0x24020001, 0x3c010800, 0x0a00039a, 0xac2223e8, 0x3c030800, 0x8c6323d8,
+       0x3c020800, 0x94421bb4, 0x00431021, 0xa5220004, 0x3c020800, 0x94421bb0,
+       0xa5820004, 0x3c020800, 0x8c421bb0, 0xa5820006, 0x3c020800, 0x8c4223e0,
+       0x3c0d0800, 0x8dad23d4, 0x3c0a0800, 0x144000e5, 0x8d4a23d8, 0x3c020800,
+       0x94421bb4, 0x004a1821, 0x3063ffff, 0x0062182b, 0x24020002, 0x10c2000d,
+       0x01435023, 0x3c020800, 0x944223c6, 0x30420009, 0x10400008, 0x00000000,
+       0x9582000c, 0x3042fff6, 0xa582000c, 0x3c020800, 0x944223c6, 0x30420009,
+       0x01a26823, 0x3c020800, 0x8c4223e8, 0x1040004a, 0x01203821, 0x3c020800,
+       0x944223c2, 0x00004021, 0xa520000a, 0x01e21023, 0xa5220002, 0x3082ffff,
        0x00021042, 0x18400008, 0x00003021, 0x00401821, 0x94e20000, 0x25080001,
        0x00c23021, 0x0103102a, 0x1440fffb, 0x24e70002, 0x00061c02, 0x30c2ffff,
        0x00623021, 0x00061402, 0x00c23021, 0x00c02821, 0x00061027, 0xa522000a,
@@ -4044,131 +4061,127 @@ static u32 tg3TsoFwText[] = {
        0x30e2007f, 0x14400006, 0x25080001, 0x8d630000, 0x3c02007f, 0x3442ff80,
        0x00625824, 0x25670008, 0x0109102a, 0x1440fff3, 0x00000000, 0x30820001,
        0x10400005, 0x00061c02, 0xa0e00001, 0x94e20000, 0x00c23021, 0x00061c02,
-       0x30c2ffff, 0x00623021, 0x00061402, 0x00c23021, 0x0a000479, 0x30c6ffff,
-       0x24020002, 0x14c20081, 0x00000000, 0x3c020800, 0x8c42241c, 0x14400007,
-       0x00000000, 0x3c020800, 0x944223e2, 0x95230002, 0x01e21023, 0x10620077,
-       0x00000000, 0x3c020800, 0x944223e2, 0x01e21023, 0xa5220002, 0x3c020800,
-       0x8c42241c, 0x1040001a, 0x31e3ffff, 0x8dc70010, 0x3c020800, 0x94421ba6,
+       0x30c2ffff, 0x00623021, 0x00061402, 0x00c23021, 0x0a00047f, 0x30c6ffff,
+       0x24020002, 0x14c20081, 0x00000000, 0x3c020800, 0x8c4223fc, 0x14400007,
+       0x00000000, 0x3c020800, 0x944223c2, 0x95230002, 0x01e21023, 0x10620077,
+       0x00000000, 0x3c020800, 0x944223c2, 0x01e21023, 0xa5220002, 0x3c020800,
+       0x8c4223fc, 0x1040001a, 0x31e3ffff, 0x8dc70010, 0x3c020800, 0x94421b86,
        0x00e04021, 0x00072c02, 0x00aa2021, 0x00431023, 0x00823823, 0x00072402,
        0x30e2ffff, 0x00823821, 0x00071027, 0xa522000a, 0x3102ffff, 0x3c040800,
-       0x948423e4, 0x00453023, 0x00e02821, 0x00641823, 0x006d1821, 0x00c33021,
-       0x00061c02, 0x30c2ffff, 0x0a000479, 0x00623021, 0x01203821, 0x00004021,
+       0x948423c4, 0x00453023, 0x00e02821, 0x00641823, 0x006d1821, 0x00c33021,
+       0x00061c02, 0x30c2ffff, 0x0a00047f, 0x00623021, 0x01203821, 0x00004021,
        0x3082ffff, 0x00021042, 0x18400008, 0x00003021, 0x00401821, 0x94e20000,
        0x25080001, 0x00c23021, 0x0103102a, 0x1440fffb, 0x24e70002, 0x00061c02,
        0x30c2ffff, 0x00623021, 0x00061402, 0x00c23021, 0x00c02821, 0x00061027,
        0xa522000a, 0x00003021, 0x2527000c, 0x00004021, 0x94e20000, 0x25080001,
        0x00c23021, 0x2d020004, 0x1440fffb, 0x24e70002, 0x95220002, 0x00004021,
        0x91230009, 0x00442023, 0x01803821, 0x3082ffff, 0xa4e00010, 0x3c040800,
-       0x948423e4, 0x00621821, 0x00c33021, 0x00061c02, 0x30c2ffff, 0x00623021,
-       0x00061c02, 0x3c020800, 0x944223e0, 0x00c34821, 0x00441023, 0x00021fc2,
+       0x948423c4, 0x00621821, 0x00c33021, 0x00061c02, 0x30c2ffff, 0x00623021,
+       0x00061c02, 0x3c020800, 0x944223c0, 0x00c34821, 0x00441023, 0x00021fc2,
        0x00431021, 0x00021043, 0x18400010, 0x00003021, 0x00402021, 0x94e20000,
        0x24e70002, 0x00c23021, 0x30e2007f, 0x14400006, 0x25080001, 0x8d630000,
        0x3c02007f, 0x3442ff80, 0x00625824, 0x25670008, 0x0104102a, 0x1440fff3,
-       0x00000000, 0x3c020800, 0x944223fc, 0x00c23021, 0x3122ffff, 0x00c23021,
+       0x00000000, 0x3c020800, 0x944223dc, 0x00c23021, 0x3122ffff, 0x00c23021,
        0x00061c02, 0x30c2ffff, 0x00623021, 0x00061402, 0x00c23021, 0x00c04021,
-       0x00061027, 0xa5820010, 0xadc00014, 0x0a000499, 0xadc00000, 0x8dc70010,
+       0x00061027, 0xa5820010, 0xadc00014, 0x0a00049f, 0xadc00000, 0x8dc70010,
        0x00e04021, 0x11400007, 0x00072c02, 0x00aa3021, 0x00061402, 0x30c3ffff,
        0x00433021, 0x00061402, 0x00c22821, 0x00051027, 0xa522000a, 0x3c030800,
-       0x946323e4, 0x3102ffff, 0x01e21021, 0x00433023, 0x00cd3021, 0x00061c02,
+       0x946323c4, 0x3102ffff, 0x01e21021, 0x00433023, 0x00cd3021, 0x00061c02,
        0x30c2ffff, 0x00623021, 0x00061402, 0x00c23021, 0x00c04021, 0x00061027,
        0xa5820010, 0x3102ffff, 0x00051c00, 0x00431025, 0xadc20010, 0x3c020800,
-       0x8c422404, 0x10400002, 0x25e2fff2, 0xa5c20034, 0x3c020800, 0x8c4223f8,
-       0x3c040800, 0x8c8423f4, 0x24420001, 0x3c010800, 0xac2223f8, 0x3c020800,
-       0x8c421bd0, 0x3303ffff, 0x00832021, 0x3c010800, 0xac2423f4, 0x00431821,
-       0x0062102b, 0x10400003, 0x2482ffff, 0x3c010800, 0xac2223f4, 0x3c010800,
-       0xac231bd0, 0x03e00008, 0x27bd0020, 0x27bdffb8, 0x3c050800, 0x24a51ba8,
+       0x8c4223e4, 0x10400002, 0x25e2fff2, 0xa5c20034, 0x3c020800, 0x8c4223d8,
+       0x3c040800, 0x8c8423d4, 0x24420001, 0x3c010800, 0xac2223d8, 0x3c020800,
+       0x8c421bb0, 0x3303ffff, 0x00832021, 0x3c010800, 0xac2423d4, 0x00431821,
+       0x0062102b, 0x10400003, 0x2482ffff, 0x3c010800, 0xac2223d4, 0x3c010800,
+       0xac231bb0, 0x03e00008, 0x27bd0020, 0x27bdffb8, 0x3c050800, 0x24a51b86,
        0xafbf0044, 0xafbe0040, 0xafb7003c, 0xafb60038, 0xafb50034, 0xafb40030,
-       0xafb3002c, 0xafb20028, 0xafb10024, 0xafb00020, 0x90a30000, 0x24020003,
-       0x146200d5, 0x00000000, 0x3c090800, 0x95291ba6, 0x3c020800, 0x944223e0,
-       0x3c030800, 0x8c631bc0, 0x3c040800, 0x8c841bbc, 0x01221023, 0x0064182a,
-       0xa7a9001e, 0x106000c8, 0xa7a20016, 0x24be0020, 0x97b6001e, 0x24b30018,
-       0x24b70014, 0x8fc20000, 0x14400008, 0x00000000, 0x8fc2fff8, 0x97a30016,
-       0x8fc4fff4, 0x00431021, 0x0082202a, 0x148000ba, 0x00000000, 0x97d50818,
-       0x32a2ffff, 0x104000ad, 0x00009021, 0x0040a021, 0x00008821, 0x0e00062d,
-       0x00000000, 0x00403021, 0x14c00007, 0x00000000, 0x3c020800, 0x8c4223ec,
-       0x24420001, 0x3c010800, 0x0a00059e, 0xac2223ec, 0x3c100800, 0x02118021,
-       0x8e101bd8, 0x9608000a, 0x31020040, 0x10400004, 0x2407180c, 0x8e02000c,
-       0x2407188c, 0xacc20018, 0x31021000, 0x10400004, 0x34e32000, 0x00081040,
-       0x3042c000, 0x00623825, 0x31020080, 0x54400001, 0x34e70010, 0x3c020800,
-       0x00511021, 0x8c421be0, 0x3c030800, 0x00711821, 0x8c631be4, 0x00021500,
-       0x00031c00, 0x00431025, 0xacc20014, 0x96040008, 0x3242ffff, 0x00821021,
-       0x0282102a, 0x14400002, 0x02b22823, 0x00802821, 0x8e020000, 0x02459021,
-       0xacc20000, 0x8e020004, 0x00c02021, 0x26310010, 0xac820004, 0x30e2ffff,
-       0xac800008, 0xa485000e, 0xac820010, 0x24020305, 0x0e0005aa, 0xa482000c,
-       0x3242ffff, 0x0054102b, 0x1440ffc0, 0x3242ffff, 0x0a000596, 0x00000000,
-       0x8e620000, 0x8e63fffc, 0x0043102a, 0x1040006c, 0x00000000, 0x8e62fff0,
-       0x00028900, 0x3c100800, 0x02118021, 0x0e00062d, 0x8e101bd8, 0x00403021,
-       0x14c00005, 0x00000000, 0x8e62082c, 0x24420001, 0x0a00059e, 0xae62082c,
-       0x9608000a, 0x31020040, 0x10400004, 0x2407180c, 0x8e02000c, 0x2407188c,
-       0xacc20018, 0x31021000, 0x10400004, 0x34e32000, 0x00081040, 0x3042c000,
-       0x00623825, 0x3c020800, 0x00511021, 0x8c421be0, 0x3c030800, 0x00711821,
-       0x8c631be4, 0x00021500, 0x00031c00, 0x00431025, 0xacc20014, 0x8e63fff4,
-       0x96020008, 0x00432023, 0x3242ffff, 0x3083ffff, 0x00431021, 0x02c2102a,
-       0x10400003, 0x00802821, 0x97a9001e, 0x01322823, 0x8e620000, 0x30a4ffff,
-       0x00441021, 0xae620000, 0xa4c5000e, 0x8e020000, 0xacc20000, 0x8e020004,
-       0x8e63fff4, 0x00431021, 0xacc20004, 0x8e63fff4, 0x96020008, 0x00641821,
-       0x0062102a, 0x14400006, 0x02459021, 0x8e62fff0, 0xae60fff4, 0x24420001,
-       0x0a000579, 0xae62fff0, 0xae63fff4, 0xacc00008, 0x3242ffff, 0x10560003,
-       0x31020004, 0x10400006, 0x24020305, 0x31020080, 0x54400001, 0x34e70010,
-       0x34e70020, 0x24020905, 0xa4c2000c, 0x8ee30000, 0x8ee20004, 0x14620007,
-       0x3c02b49a, 0x8ee20860, 0x54400001, 0x34e70400, 0x3c024b65, 0x0a000590,
-       0x34427654, 0x344289ab, 0xacc2001c, 0x30e2ffff, 0xacc20010, 0x0e0005aa,
-       0x00c02021, 0x3242ffff, 0x0056102b, 0x1440ff96, 0x00000000, 0x8e620000,
-       0x8e63fffc, 0x0043102a, 0x1440ff3e, 0x00000000, 0x8fbf0044, 0x8fbe0040,
-       0x8fb7003c, 0x8fb60038, 0x8fb50034, 0x8fb40030, 0x8fb3002c, 0x8fb20028,
-       0x8fb10024, 0x8fb00020, 0x03e00008, 0x27bd0048, 0x27bdffe8, 0xafbf0014,
-       0xafb00010, 0x8f624450, 0x8f634410, 0x0a0005b9, 0x00808021, 0x8f626820,
-       0x30422000, 0x10400003, 0x00000000, 0x0e0001e3, 0x00002021, 0x8f624450,
-       0x8f634410, 0x3042ffff, 0x0043102b, 0x1440fff5, 0x00000000, 0x8f630c14,
-       0x3063000f, 0x2c620002, 0x1440000b, 0x00000000, 0x8f630c14, 0x3c020800,
-       0x8c421b50, 0x3063000f, 0x24420001, 0x3c010800, 0xac221b50, 0x2c620002,
-       0x1040fff7, 0x00000000, 0xaf705c18, 0x8f625c10, 0x30420002, 0x10400009,
-       0x00000000, 0x8f626820, 0x30422000, 0x1040fff8, 0x00000000, 0x0e0001e3,
-       0x00002021, 0x0a0005cc, 0x00000000, 0x8fbf0014, 0x8fb00010, 0x03e00008,
-       0x27bd0018, 0x00000000, 0x00000000, 0x00000000, 0x27bdffe8, 0x3c1bc000,
+       0xafb3002c, 0xafb20028, 0xafb10024, 0xafb00020, 0x94a90000, 0x3c020800,
+       0x944223c0, 0x3c030800, 0x8c631ba0, 0x3c040800, 0x8c841b9c, 0x01221023,
+       0x0064182a, 0xa7a9001e, 0x106000bc, 0xa7a20016, 0x24be0022, 0x97b6001e,
+       0x24b3001a, 0x24b70016, 0x8fc20000, 0x14400008, 0x00000000, 0x8fc2fff8,
+       0x97a30016, 0x8fc4fff4, 0x00431021, 0x0082202a, 0x148000ae, 0x00000000,
+       0x97d50818, 0x32a2ffff, 0x104000a1, 0x00009021, 0x0040a021, 0x00008821,
+       0x0e000621, 0x00000000, 0x00403021, 0x14c00007, 0x00000000, 0x3c020800,
+       0x8c4223cc, 0x24420001, 0x3c010800, 0x0a000593, 0xac2223cc, 0x3c100800,
+       0x02118021, 0x8e101bb8, 0x9608000a, 0x31020040, 0x10400004, 0x2407180c,
+       0x8e02000c, 0x2407188c, 0xacc20018, 0x31020080, 0x54400001, 0x34e70010,
+       0x3c020800, 0x00511021, 0x8c421bc0, 0x3c030800, 0x00711821, 0x8c631bc4,
+       0x00021500, 0x00031c00, 0x00431025, 0xacc20014, 0x96040008, 0x3242ffff,
+       0x00821021, 0x0282102a, 0x14400002, 0x02b22823, 0x00802821, 0x8e020000,
+       0x02459021, 0xacc20000, 0x8e020004, 0x00c02021, 0x26310010, 0xac820004,
+       0x30e2ffff, 0xac800008, 0xa485000e, 0xac820010, 0x24020305, 0x0e00059f,
+       0xa482000c, 0x3242ffff, 0x0054102b, 0x1440ffc6, 0x3242ffff, 0x0a00058b,
+       0x00000000, 0x8e620000, 0x8e63fffc, 0x0043102a, 0x10400066, 0x00000000,
+       0x8e62fff0, 0x00028900, 0x3c100800, 0x02118021, 0x0e000621, 0x8e101bb8,
+       0x00403021, 0x14c00005, 0x00000000, 0x8e62082c, 0x24420001, 0x0a000593,
+       0xae62082c, 0x9608000a, 0x31020040, 0x10400004, 0x2407180c, 0x8e02000c,
+       0x2407188c, 0xacc20018, 0x3c020800, 0x00511021, 0x8c421bc0, 0x3c030800,
+       0x00711821, 0x8c631bc4, 0x00021500, 0x00031c00, 0x00431025, 0xacc20014,
+       0x8e63fff4, 0x96020008, 0x00432023, 0x3242ffff, 0x3083ffff, 0x00431021,
+       0x02c2102a, 0x10400003, 0x00802821, 0x97a9001e, 0x01322823, 0x8e620000,
+       0x30a4ffff, 0x00441021, 0xae620000, 0xa4c5000e, 0x8e020000, 0xacc20000,
+       0x8e020004, 0x8e63fff4, 0x00431021, 0xacc20004, 0x8e63fff4, 0x96020008,
+       0x00641821, 0x0062102a, 0x14400006, 0x02459021, 0x8e62fff0, 0xae60fff4,
+       0x24420001, 0x0a00056e, 0xae62fff0, 0xae63fff4, 0xacc00008, 0x3242ffff,
+       0x10560003, 0x31020004, 0x10400006, 0x24020305, 0x31020080, 0x54400001,
+       0x34e70010, 0x34e70020, 0x24020905, 0xa4c2000c, 0x8ee30000, 0x8ee20004,
+       0x14620007, 0x3c02b49a, 0x8ee20860, 0x54400001, 0x34e70400, 0x3c024b65,
+       0x0a000585, 0x34427654, 0x344289ab, 0xacc2001c, 0x30e2ffff, 0xacc20010,
+       0x0e00059f, 0x00c02021, 0x3242ffff, 0x0056102b, 0x1440ff9c, 0x00000000,
+       0x8e620000, 0x8e63fffc, 0x0043102a, 0x1440ff4a, 0x00000000, 0x8fbf0044,
+       0x8fbe0040, 0x8fb7003c, 0x8fb60038, 0x8fb50034, 0x8fb40030, 0x8fb3002c,
+       0x8fb20028, 0x8fb10024, 0x8fb00020, 0x03e00008, 0x27bd0048, 0x27bdffe8,
+       0xafbf0014, 0xafb00010, 0x8f624450, 0x8f634410, 0x0a0005ae, 0x00808021,
+       0x8f626820, 0x30422000, 0x10400003, 0x00000000, 0x0e0001ef, 0x00002021,
+       0x8f624450, 0x8f634410, 0x3042ffff, 0x0043102b, 0x1440fff5, 0x00000000,
+       0x8f630c14, 0x3063000f, 0x2c620002, 0x1440000b, 0x00000000, 0x8f630c14,
+       0x3c020800, 0x8c421b30, 0x3063000f, 0x24420001, 0x3c010800, 0xac221b30,
+       0x2c620002, 0x1040fff7, 0x00000000, 0xaf705c18, 0x8f625c10, 0x30420002,
+       0x10400009, 0x00000000, 0x8f626820, 0x30422000, 0x1040fff8, 0x00000000,
+       0x0e0001ef, 0x00002021, 0x0a0005c1, 0x00000000, 0x8fbf0014, 0x8fb00010,
+       0x03e00008, 0x27bd0018, 0x00000000, 0x00000000, 0x27bdffe8, 0x3c1bc000,
        0xafbf0014, 0xafb00010, 0xaf60680c, 0x8f626804, 0x34420082, 0xaf626804,
-       0x8f634000, 0x24020b50, 0x3c010800, 0xac221b64, 0x24020b78, 0x3c010800,
-       0xac221b74, 0x34630002, 0xaf634000, 0x0e00060d, 0x00808021, 0x3c010800,
-       0xa0221b78, 0x304200ff, 0x24030002, 0x14430005, 0x00000000, 0x3c020800,
-       0x8c421b64, 0x0a000600, 0xac5000c0, 0x3c020800, 0x8c421b64, 0xac5000bc,
-       0x8f624434, 0x8f634438, 0x8f644410, 0x3c010800, 0xac221b6c, 0x3c010800,
-       0xac231b7c, 0x3c010800, 0xac241b68, 0x8fbf0014, 0x8fb00010, 0x03e00008,
+       0x8f634000, 0x24020b50, 0x3c010800, 0xac221b44, 0x24020b78, 0x3c010800,
+       0xac221b54, 0x34630002, 0xaf634000, 0x0e000601, 0x00808021, 0x3c010800,
+       0xa0221b58, 0x304200ff, 0x24030002, 0x14430005, 0x00000000, 0x3c020800,
+       0x8c421b44, 0x0a0005f4, 0xac5000c0, 0x3c020800, 0x8c421b44, 0xac5000bc,
+       0x8f624434, 0x8f634438, 0x8f644410, 0x3c010800, 0xac221b4c, 0x3c010800,
+       0xac231b5c, 0x3c010800, 0xac241b48, 0x8fbf0014, 0x8fb00010, 0x03e00008,
        0x27bd0018, 0x3c040800, 0x8c870000, 0x3c03aa55, 0x3463aa55, 0x3c06c003,
        0xac830000, 0x8cc20000, 0x14430007, 0x24050002, 0x3c0355aa, 0x346355aa,
        0xac830000, 0x8cc20000, 0x50430001, 0x24050001, 0x3c020800, 0xac470000,
        0x03e00008, 0x00a01021, 0x27bdfff8, 0x18800009, 0x00002821, 0x8f63680c,
        0x8f62680c, 0x1043fffe, 0x00000000, 0x24a50001, 0x00a4102a, 0x1440fff9,
-       0x00000000, 0x03e00008, 0x27bd0008, 0x8f634450, 0x3c020800, 0x8c421b6c,
-       0x00031c02, 0x0043102b, 0x14400008, 0x3c038000, 0x3c040800, 0x8c841b7c,
+       0x00000000, 0x03e00008, 0x27bd0008, 0x8f634450, 0x3c020800, 0x8c421b4c,
+       0x00031c02, 0x0043102b, 0x14400008, 0x3c038000, 0x3c040800, 0x8c841b5c,
        0x8f624450, 0x00021c02, 0x0083102b, 0x1040fffc, 0x3c038000, 0xaf634444,
        0x8f624444, 0x00431024, 0x1440fffd, 0x00000000, 0x8f624448, 0x03e00008,
        0x3042ffff, 0x3082ffff, 0x2442e000, 0x2c422001, 0x14400003, 0x3c024000,
-       0x0a000650, 0x2402ffff, 0x00822025, 0xaf645c38, 0x8f625c30, 0x30420002,
+       0x0a000644, 0x2402ffff, 0x00822025, 0xaf645c38, 0x8f625c30, 0x30420002,
        0x1440fffc, 0x00001021, 0x03e00008, 0x00000000, 0x8f624450, 0x3c030800,
-       0x8c631b68, 0x0a000659, 0x3042ffff, 0x8f624450, 0x3042ffff, 0x0043102b,
+       0x8c631b48, 0x0a00064d, 0x3042ffff, 0x8f624450, 0x3042ffff, 0x0043102b,
        0x1440fffc, 0x00000000, 0x03e00008, 0x00000000, 0x27bdffe0, 0x00802821,
-       0x3c040800, 0x24841b10, 0x00003021, 0x00003821, 0xafbf0018, 0xafa00010,
-       0x0e000684, 0xafa00014, 0x0a000668, 0x00000000, 0x8fbf0018, 0x03e00008,
+       0x3c040800, 0x24841ae0, 0x00003021, 0x00003821, 0xafbf0018, 0xafa00010,
+       0x0e000678, 0xafa00014, 0x0a00065c, 0x00000000, 0x8fbf0018, 0x03e00008,
        0x27bd0020, 0x00000000, 0x00000000, 0x00000000, 0x3c020800, 0x34423000,
-       0x3c030800, 0x34633000, 0x3c040800, 0x348437ff, 0x3c010800, 0xac221b84,
-       0x24020040, 0x3c010800, 0xac221b88, 0x3c010800, 0xac201b80, 0xac600000,
+       0x3c030800, 0x34633000, 0x3c040800, 0x348437ff, 0x3c010800, 0xac221b64,
+       0x24020040, 0x3c010800, 0xac221b68, 0x3c010800, 0xac201b60, 0xac600000,
        0x24630004, 0x0083102b, 0x5040fffd, 0xac600000, 0x03e00008, 0x00000000,
-       0x00804821, 0x8faa0010, 0x3c020800, 0x8c421b80, 0x3c040800, 0x8c841b88,
-       0x8fab0014, 0x24430001, 0x0044102b, 0x3c010800, 0xac231b80, 0x14400003,
-       0x00004021, 0x3c010800, 0xac201b80, 0x3c020800, 0x8c421b80, 0x3c030800,
-       0x8c631b84, 0x91240000, 0x00021140, 0x00431021, 0x00481021, 0x25080001,
-       0xa0440000, 0x29020008, 0x1440fff4, 0x25290001, 0x3c020800, 0x8c421b80,
-       0x3c030800, 0x8c631b84, 0x8f64680c, 0x00021140, 0x00431021, 0xac440008,
+       0x00804821, 0x8faa0010, 0x3c020800, 0x8c421b60, 0x3c040800, 0x8c841b68,
+       0x8fab0014, 0x24430001, 0x0044102b, 0x3c010800, 0xac231b60, 0x14400003,
+       0x00004021, 0x3c010800, 0xac201b60, 0x3c020800, 0x8c421b60, 0x3c030800,
+       0x8c631b64, 0x91240000, 0x00021140, 0x00431021, 0x00481021, 0x25080001,
+       0xa0440000, 0x29020008, 0x1440fff4, 0x25290001, 0x3c020800, 0x8c421b60,
+       0x3c030800, 0x8c631b64, 0x8f64680c, 0x00021140, 0x00431021, 0xac440008,
        0xac45000c, 0xac460010, 0xac470014, 0xac4a0018, 0x03e00008, 0xac4b001c,
        0x00000000, 0x00000000,
 };
 
 u32 tg3TsoFwRodata[] = {
-       0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541,
-       0x00000000, 0x00000000, 0x00000000, 0x73746b6f, 0x66666c64,
-       0x496e0000, 0x73746b6f, 0x66662a2a, 0x00000000, 0x53774576,
-       0x656e7430, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
-       0x66617461, 0x6c457272, 0x00000000, 0x00000000, 0x00000000
+       0x4d61696e, 0x43707542, 0x00000000, 0x4d61696e, 0x43707541, 0x00000000,
+       0x00000000, 0x00000000, 0x73746b6f, 0x66666c64, 0x496e0000, 0x73746b6f,
+       0x66662a2a, 0x00000000, 0x53774576, 0x656e7430, 0x00000000, 0x00000000,
+       0x00000000, 0x00000000, 0x66617461, 0x6c457272, 0x00000000, 0x00000000,
 };
 
 #if 0 /* All zeros, don't eat up space with it. */
@@ -4541,7 +4554,10 @@ static int tg3_reset_hw(struct tg3 *tp)
 
        tg3_chip_reset(tp);
 
-       tw32(GRC_MODE, tp->grc_mode);
+       val = tr32(GRC_MODE);
+       val &= GRC_MODE_HOST_STACKUP;
+       tw32(GRC_MODE, val | tp->grc_mode);
+
        tg3_write_mem(tp,
                      NIC_SRAM_FIRMWARE_MBOX,
                      NIC_SRAM_FIRMWARE_MBOX_MAGIC1);
@@ -4597,17 +4613,6 @@ static int tg3_reset_hw(struct tg3 *tp)
         */
        tg3_init_rings(tp);
 
-       /* Clear statistics/status block in chip, and status block in ram. */
-       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) {
-               for (i = NIC_SRAM_STATS_BLK;
-                    i < NIC_SRAM_STATUS_BLK + TG3_HW_STATUS_SIZE;
-                    i += sizeof(u32)) {
-                       tg3_write_mem(tp, i, 0);
-                       udelay(40);
-               }
-       }
-       memset(tp->hw_status, 0, TG3_HW_STATUS_SIZE);
-
        /* This value is determined during the probe time DMA
         * engine test, tg3_test_dma.
         */
@@ -4706,6 +4711,17 @@ static int tg3_reset_hw(struct tg3 *tp)
                return -ENODEV;
        }
 
+       /* Clear statistics/status block in chip, and status block in ram. */
+       if (GET_ASIC_REV(tp->pci_chip_rev_id) != ASIC_REV_5705) {
+               for (i = NIC_SRAM_STATS_BLK;
+                    i < NIC_SRAM_STATUS_BLK + TG3_HW_STATUS_SIZE;
+                    i += sizeof(u32)) {
+                       tg3_write_mem(tp, i, 0);
+                       udelay(40);
+               }
+       }
+       memset(tp->hw_status, 0, TG3_HW_STATUS_SIZE);
+
        /* Setup replenish threshold. */
        tw32(RCVBDI_STD_THRESH, tp->rx_pending / 8);
 
@@ -5760,14 +5776,20 @@ static void __tg3_set_rx_mode(struct net_device *dev)
 
        rx_mode = tp->rx_mode & ~(RX_MODE_PROMISC |
                                  RX_MODE_KEEP_VLAN_TAG);
+
+       /* When ASF is in use, we always keep the RX_MODE_KEEP_VLAN_TAG
+        * flag clear.
+        */
 #if TG3_VLAN_TAG_USED
-       if (!tp->vlgrp)
+       if (!tp->vlgrp &&
+           !(tp->tg3_flags & TG3_FLAG_ENABLE_ASF))
                rx_mode |= RX_MODE_KEEP_VLAN_TAG;
 #else
        /* By definition, VLAN is disabled always in this
         * case.
         */
-       rx_mode |= RX_MODE_KEEP_VLAN_TAG;
+       if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF))
+               rx_mode |= RX_MODE_KEEP_VLAN_TAG;
 #endif
 
        if (dev->flags & IFF_PROMISC) {
@@ -6402,25 +6424,22 @@ struct subsys_tbl_ent {
 
 static struct subsys_tbl_ent subsys_id_to_phy_id[] = {
        /* Broadcom boards. */
-       { 0x14e4, 0x1644, PHY_ID_BCM5401 }, /* BCM95700A6 */
-       { 0x14e4, 0x0001, PHY_ID_BCM5701 }, /* BCM95701A5 */
-       { 0x14e4, 0x0002, PHY_ID_BCM8002 }, /* BCM95700T6 */
-       { 0x14e4, 0x0003, PHY_ID_SERDES  }, /* BCM95700A9 */
-       { 0x14e4, 0x0005, PHY_ID_BCM5701 }, /* BCM95701T1 */
-       { 0x14e4, 0x0006, PHY_ID_BCM5701 }, /* BCM95701T8 */
-       { 0x14e4, 0x0007, PHY_ID_SERDES  }, /* BCM95701A7 */
-       { 0x14e4, 0x0008, PHY_ID_BCM5701 }, /* BCM95701A10 */
-       { 0x14e4, 0x8008, PHY_ID_BCM5701 }, /* BCM95701A12 */
-       { 0x14e4, 0x0009, PHY_ID_BCM5701 }, /* BCM95703Ax1 */
-       { 0x14e4, 0x8009, PHY_ID_BCM5701 }, /* BCM95703Ax2 */
+       { PCI_VENDOR_ID_BROADCOM, 0x1644, PHY_ID_BCM5401 }, /* BCM95700A6 */
+       { PCI_VENDOR_ID_BROADCOM, 0x0001, PHY_ID_BCM5701 }, /* BCM95701A5 */
+       { PCI_VENDOR_ID_BROADCOM, 0x0002, PHY_ID_BCM8002 }, /* BCM95700T6 */
+       { PCI_VENDOR_ID_BROADCOM, 0x0003, PHY_ID_SERDES  }, /* BCM95700A9 */
+       { PCI_VENDOR_ID_BROADCOM, 0x0005, PHY_ID_BCM5701 }, /* BCM95701T1 */
+       { PCI_VENDOR_ID_BROADCOM, 0x0006, PHY_ID_BCM5701 }, /* BCM95701T8 */
+       { PCI_VENDOR_ID_BROADCOM, 0x0007, PHY_ID_SERDES  }, /* BCM95701A7 */
+       { PCI_VENDOR_ID_BROADCOM, 0x0008, PHY_ID_BCM5701 }, /* BCM95701A10 */
+       { PCI_VENDOR_ID_BROADCOM, 0x8008, PHY_ID_BCM5701 }, /* BCM95701A12 */
+       { PCI_VENDOR_ID_BROADCOM, 0x0009, PHY_ID_BCM5701 }, /* BCM95703Ax1 */
+       { PCI_VENDOR_ID_BROADCOM, 0x8009, PHY_ID_BCM5701 }, /* BCM95703Ax2 */
 
        /* 3com boards. */
        { PCI_VENDOR_ID_3COM, 0x1000, PHY_ID_BCM5401 }, /* 3C996T */
        { PCI_VENDOR_ID_3COM, 0x1006, PHY_ID_BCM5701 }, /* 3C996BT */
-       /* { PCI_VENDOR_ID_3COM, 0x1002, PHY_ID_XXX },     3C996CT */
-       /* { PCI_VENDOR_ID_3COM, 0x1003, PHY_ID_XXX },     3C997T */
        { PCI_VENDOR_ID_3COM, 0x1004, PHY_ID_SERDES  }, /* 3C996SX */
-       /* { PCI_VENDOR_ID_3COM, 0x1005, PHY_ID_XXX },     3C997SZ */
        { PCI_VENDOR_ID_3COM, 0x1007, PHY_ID_BCM5701 }, /* 3C1000T */
        { PCI_VENDOR_ID_3COM, 0x1008, PHY_ID_BCM5701 }, /* 3C940BR01 */
 
@@ -6435,7 +6454,10 @@ static struct subsys_tbl_ent subsys_id_to_phy_id[] = {
        { PCI_VENDOR_ID_COMPAQ, 0x009a, PHY_ID_BCM5701 }, /* BANSHEE_2 */
        { PCI_VENDOR_ID_COMPAQ, 0x007d, PHY_ID_SERDES  }, /* CHANGELING */
        { PCI_VENDOR_ID_COMPAQ, 0x0085, PHY_ID_BCM5701 }, /* NC7780 */
-       { PCI_VENDOR_ID_COMPAQ, 0x0099, PHY_ID_BCM5701 }  /* NC7780_2 */
+       { PCI_VENDOR_ID_COMPAQ, 0x0099, PHY_ID_BCM5701 }, /* NC7780_2 */
+
+       /* IBM boards. */
+       { PCI_VENDOR_ID_IBM, 0x0281, PHY_ID_SERDES } /* IBM??? */
 };
 
 static int __devinit tg3_phy_probe(struct tg3 *tp)
@@ -6716,6 +6738,7 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
        u32 misc_ctrl_reg;
        u32 cacheline_sz_reg;
        u32 pci_state_reg, grc_misc_cfg;
+       u32 val;
        u16 pci_cmd;
        int err;
 
@@ -6912,7 +6935,9 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
        udelay(40);
 
        /* Initialize data/descriptor byte/word swapping. */
-       tw32(GRC_MODE, tp->grc_mode);
+       val = tr32(GRC_MODE);
+       val &= GRC_MODE_HOST_STACKUP;
+       tw32(GRC_MODE, val | tp->grc_mode);
 
        tg3_switch_clocks(tp);
 
@@ -6975,7 +7000,8 @@ static int __devinit tg3_get_invariants(struct tg3 *tp)
            (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705 &&
             tp->pdev->vendor == PCI_VENDOR_ID_BROADCOM &&
             (tp->pdev->device == PCI_DEVICE_ID_TIGON3_5901 ||
-             tp->pdev->device == PCI_DEVICE_ID_TIGON3_5901_2)))
+             tp->pdev->device == PCI_DEVICE_ID_TIGON3_5901_2 ||
+             tp->pdev->device == PCI_DEVICE_ID_TIGON3_5705F)))
                tp->tg3_flags |= TG3_FLAG_10_100_ONLY;
 
        err = tg3_phy_probe(tp);
@@ -7526,13 +7552,16 @@ static int __devinit tg3_init_one(struct pci_dev *pdev,
        if (pm_cap == 0) {
                printk(KERN_ERR PFX "Cannot find PowerManagement capability, "
                       "aborting.\n");
+               err = -EIO;
                goto err_out_free_res;
        }
 
        /* Configure DMA attributes. */
-       if (!pci_set_dma_mask(pdev, 0xffffffffffffffffULL)) {
+       err = pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
+       if (!err) {
                pci_using_dac = 1;
-               if (pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL)) {
+               err = pci_set_consistent_dma_mask(pdev, 0xffffffffffffffffULL);
+               if (err < 0) {
                        printk(KERN_ERR PFX "Unable to obtain 64 bit DMA "
                               "for consistent allocations\n");
                        goto err_out_free_res;
index c69f68d..90cd1f2 100644 (file)
@@ -107,7 +107,7 @@ config TMS380TR
 
 config TMSPCI
        tristate "Generic TMS380 PCI support"
-       depends on TR && TMS380TR!=n && PCI
+       depends on TR && TMS380TR && PCI
        ---help---
          This tms380 module supports generic TMS380-based PCI cards.
 
@@ -122,7 +122,7 @@ config TMSPCI
 
 config SKISA
        tristate "SysKonnect TR4/16 ISA support"
-       depends on TR && TMS380TR!=n && ISA
+       depends on TR && TMS380TR && ISA
        help
          This tms380 module supports SysKonnect TR4/16 ISA cards.
 
@@ -134,7 +134,7 @@ config SKISA
 
 config PROTEON
        tristate "Proteon ISA support"
-       depends on TR && TMS380TR!=n && ISA
+       depends on TR && TMS380TR && ISA
        help
          This tms380 module supports Proteon ISA cards.
 
@@ -147,7 +147,7 @@ config PROTEON
 
 config ABYSS
        tristate "Madge Smart 16/4 PCI Mk2 support"
-       depends on TR && TMS380TR!=n && PCI
+       depends on TR && TMS380TR && PCI
        help
          This tms380 module supports the Madge Smart 16/4 PCI Mk2
          cards (51-02).
@@ -157,7 +157,7 @@ config ABYSS
 
 config MADGEMC
        tristate "Madge Smart 16/4 Ringnode MicroChannel"
-       depends on TR && TMS380TR!=n && MCA
+       depends on TR && TMS380TR && MCA
        help
          This tms380 module supports the Madge Smart 16/4 MC16 and MC32
          MicroChannel adapters.
index 4658e36..ad7d115 100644 (file)
@@ -278,10 +278,6 @@ void tulip_select_media(struct net_device *dev, int startup)
                                for (i = 0; i < init_length; i++)
                                        outl(init_sequence[i], ioaddr + CSR12);
                        }
-
-                       (void) inl(ioaddr + CSR6); /* flush CSR12 writes */
-                       udelay(500);            /* Give MII time to recover */
-
                        tmp_info = get_u16(&misc_info[1]);
                        if (tmp_info)
                                tp->advertising[phy_num] = tmp_info | 1;
index f30b722..6d1f024 100644 (file)
@@ -85,8 +85,8 @@ static const int multicast_filter_limit = 32;
 #define PKT_BUF_SZ             1536
 
 #define DRV_MODULE_NAME                "typhoon"
-#define DRV_MODULE_VERSION     "1.5.1"
-#define DRV_MODULE_RELDATE     "03/06/26"
+#define DRV_MODULE_VERSION     "1.5.2"
+#define DRV_MODULE_RELDATE     "03/11/25"
 #define PFX                    DRV_MODULE_NAME ": "
 #define ERR_PFX                        KERN_ERR PFX
 
@@ -127,7 +127,7 @@ static const int multicast_filter_limit = 32;
 static char version[] __devinitdata =
     "typhoon.c: version " DRV_MODULE_VERSION " (" DRV_MODULE_RELDATE ")\n";
 
-MODULE_AUTHOR("David Dillow <dillowd@y12.doe.gov>");
+MODULE_AUTHOR("David Dillow <dave@thedillows.org>");
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("3Com Typhoon Family (3C990, 3CR990, and variants)");
 MODULE_PARM(rx_copybreak, "i");
@@ -146,11 +146,12 @@ struct typhoon_card_info {
        int capabilities;
 };
 
-#define TYPHOON_CRYPTO_NONE            0
-#define TYPHOON_CRYPTO_DES             1
-#define TYPHOON_CRYPTO_3DES            2
-#define        TYPHOON_CRYPTO_VARIABLE         4
-#define TYPHOON_FIBER                  8
+#define TYPHOON_CRYPTO_NONE            0x00
+#define TYPHOON_CRYPTO_DES             0x01
+#define TYPHOON_CRYPTO_3DES            0x02
+#define        TYPHOON_CRYPTO_VARIABLE         0x04
+#define TYPHOON_FIBER                  0x08
+#define TYPHOON_WAKEUP_NEEDS_RESET     0x10
 
 enum typhoon_cards {
        TYPHOON_TX = 0, TYPHOON_TX95, TYPHOON_TX97, TYPHOON_SVR,
@@ -307,7 +308,8 @@ enum state_values {
 /* We'll wait up to six seconds for a reset, and half a second normally.
  */
 #define TYPHOON_UDELAY                 50
-#define TYPHOON_RESET_TIMEOUT          (6 * HZ)
+#define TYPHOON_RESET_TIMEOUT_SLEEP    (6 * HZ)
+#define TYPHOON_RESET_TIMEOUT_NOSLEEP  ((6 * 1000000) / TYPHOON_UDELAY)
 #define TYPHOON_WAIT_TIMEOUT           ((1000000 / 2) / TYPHOON_UDELAY)
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 28)
@@ -375,10 +377,12 @@ static int
 typhoon_reset(unsigned long ioaddr, int wait_type)
 {
        int i, err = 0;
-       int timeout = TYPHOON_RESET_TIMEOUT;
+       int timeout;
 
        if(wait_type == WaitNoSleep)
-               timeout = (timeout * 1000000) / (HZ * TYPHOON_UDELAY);
+               timeout = TYPHOON_RESET_TIMEOUT_NOSLEEP;
+       else
+               timeout = TYPHOON_RESET_TIMEOUT_SLEEP;
 
        writel(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_MASK);
        writel(TYPHOON_INTR_ALL, ioaddr + TYPHOON_REG_INTR_STATUS);
@@ -1858,6 +1862,11 @@ typhoon_sleep(struct typhoon *tp, int state, u16 events)
        if(typhoon_wait_status(ioaddr, TYPHOON_STATUS_SLEEPING) < 0)
                return -ETIMEDOUT;
 
+       /* Since we cannot monitor the status of the link while sleeping,
+        * tell the world it went away.
+        */
+       netif_carrier_off(tp->dev);
+
        pci_enable_wake(tp->pdev, state, 1);
        pci_disable_device(pdev);
        return pci_set_power_state(pdev, state);
@@ -1872,8 +1881,13 @@ typhoon_wakeup(struct typhoon *tp, int wait_type)
        pci_set_power_state(pdev, 0);
        pci_restore_state(pdev, tp->pci_state);
 
+       /* Post 2.x.x versions of the Sleep Image require a reset before
+        * we can download the Runtime Image. But let's not make users of
+        * the old firmware pay for the reset.
+        */
        writel(TYPHOON_BOOTCMD_WAKEUP, ioaddr + TYPHOON_REG_COMMAND);
-       if(typhoon_wait_status(ioaddr, TYPHOON_STATUS_WAITING_FOR_HOST) < 0)
+       if(typhoon_wait_status(ioaddr, TYPHOON_STATUS_WAITING_FOR_HOST) < 0 ||
+                       (tp->capabilities & TYPHOON_WAKEUP_NEEDS_RESET))
                return typhoon_reset(ioaddr, wait_type);
 
        return 0;
@@ -2251,7 +2265,7 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        void *shared;
        dma_addr_t shared_dma;
        struct cmd_desc xp_cmd;
-       struct resp_desc xp_resp;
+       struct resp_desc xp_resp[3];
        int i;
        int err = 0;
 
@@ -2380,15 +2394,15 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
 
        INIT_COMMAND_WITH_RESPONSE(&xp_cmd, TYPHOON_CMD_READ_MAC_ADDRESS);
-       if(typhoon_issue_command(tp, 1, &xp_cmd, 1, &xp_resp) < 0) {
+       if(typhoon_issue_command(tp, 1, &xp_cmd, 1, xp_resp) < 0) {
                printk(ERR_PFX "%s: cannot read MAC address\n",
                       pci_name(pdev));
                err = -EIO;
                goto error_out_reset;
        }
 
-       *(u16 *)&dev->dev_addr[0] = htons(le16_to_cpu(xp_resp.parm1));
-       *(u32 *)&dev->dev_addr[2] = htonl(le32_to_cpu(xp_resp.parm2));
+       *(u16 *)&dev->dev_addr[0] = htons(le16_to_cpu(xp_resp[0].parm1));
+       *(u32 *)&dev->dev_addr[2] = htonl(le32_to_cpu(xp_resp[0].parm2));
 
        if(!is_valid_ether_addr(dev->dev_addr)) {
                printk(ERR_PFX "%s: Could not obtain valid ethernet address, "
@@ -2396,6 +2410,28 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                goto error_out_reset;
        }
 
+       /* Read the Sleep Image version last, so the response is valid
+        * later when we print out the version reported.
+        */
+       INIT_COMMAND_WITH_RESPONSE(&xp_cmd, TYPHOON_CMD_READ_VERSIONS);
+       if(typhoon_issue_command(tp, 1, &xp_cmd, 3, xp_resp) < 0) {
+               printk(ERR_PFX "%s: Could not get Sleep Image version\n",
+                       pdev->slot_name);
+               goto error_out_reset;
+       }
+
+       tp->capabilities = typhoon_card_info[card_id].capabilities;
+       tp->xcvr_select = TYPHOON_XCVR_AUTONEG;
+
+       /* Typhoon 1.0 Sleep Images return one response descriptor to the
+        * READ_VERSIONS command. Those versions are OK after waking up
+        * from sleep without needing a reset. Typhoon 1.1+ Sleep Images
+        * seem to need a little extra help to get started. Since we don't
+        * know how to nudge it along, just kick it.
+        */
+       if(xp_resp[0].numDesc != 0)
+               tp->capabilities |= TYPHOON_WAKEUP_NEEDS_RESET;
+
        if(typhoon_sleep(tp, 3, 0) < 0) {
                printk(ERR_PFX "%s: cannot put adapter to sleep\n",
                       pci_name(pdev));
@@ -2403,9 +2439,6 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                goto error_out_reset;
        }
 
-       tp->capabilities = typhoon_card_info[card_id].capabilities;
-       tp->xcvr_select = TYPHOON_XCVR_AUTONEG;
-
        /* The chip-specific entries in the device structure. */
        dev->open               = typhoon_open;
        dev->hard_start_xmit    = typhoon_start_tx;
@@ -2442,6 +2475,32 @@ typhoon_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
                printk("%2.2x:", dev->dev_addr[i]);
        printk("%2.2x\n", dev->dev_addr[i]);
 
+       /* xp_resp still contains the response to the READ_VERSIONS command.
+        * For debugging, let the user know what version he has.
+        */
+       if(xp_resp[0].numDesc == 0) {
+               /* This is the Typhoon 1.0 type Sleep Image, last 16 bits
+                * of version is Month/Day of build.
+                */
+               u16 monthday = le32_to_cpu(xp_resp[0].parm2) & 0xffff;
+               printk(KERN_INFO "%s: Typhoon 1.0 Sleep Image built "
+                       "%02u/%02u/2000\n", dev->name, monthday >> 8,
+                       monthday & 0xff);
+       } else if(xp_resp[0].numDesc == 2) {
+               /* This is the Typhoon 1.1+ type Sleep Image
+                */
+               u32 sleep_ver = le32_to_cpu(xp_resp[0].parm2);
+               u8 *ver_string = (u8 *) &xp_resp[1];
+               ver_string[25] = 0;
+               printk(KERN_INFO "%s: Typhoon 1.1+ Sleep Image version "
+                       "%u.%u.%u.%u %s\n", dev->name, HIPQUAD(sleep_ver),
+                       ver_string);
+       } else {
+               printk(KERN_WARNING "%s: Unknown Sleep Image version "
+                       "(%u:%04x)\n", dev->name, xp_resp[0].numDesc,
+                       le32_to_cpu(xp_resp[0].parm2));
+       }
+               
        return 0;
 
 error_out_reset:
index 1d07059..052864b 100644 (file)
@@ -334,7 +334,7 @@ config WANXL
 
          If you want to compile the driver as a module ( = code which can be
          inserted in and removed from the running kernel whenever you want),
-         say M here and read <file:Documentation/modules.txt>.  The module
+         say M here and read <file:Documentation/kbuild/modules.txt>.  The module
          will be called wanxl.
 
          If unsure, say N here.
@@ -467,7 +467,7 @@ config SDLA
          Say Y here if you need a driver for the Sangoma S502A, S502E, and
          S508 Frame Relay Access Devices. These are multi-protocol cards, but
          only frame relay is supported by the driver at this time. Please
-         read <file:Documentation/framerelay.txt>.
+         read <file:Documentation/networking/framerelay.txt>.
 
          To compile this driver as a module, choose M here: the module will be
          called sdla.
index 610a96e..d5c4954 100644 (file)
@@ -425,8 +425,8 @@ static int load_cyc2x(struct cycx_hw *hw, struct cycx_firmware *cfm, u32 len)
        if (cksum != cfm->checksum) {
                printk(KERN_ERR "%s:%s: firmware corrupted!\n",
                                modname, __FUNCTION__);
-               printk(KERN_ERR " cdsize = 0x%lx (expected 0x%lx)\n",
-                               len - sizeof(struct cycx_firmware) - 1,
+               printk(KERN_ERR " cdsize = 0x%x (expected 0x%x)\n",
+                               len - (int)sizeof(struct cycx_firmware) - 1,
                                cfm->info.codesize);
                printk(KERN_ERR " chksum = 0x%x (expected 0x%x)\n",
                                cksum, cfm->checksum);
index 87e8e80..85c066d 100644 (file)
@@ -748,13 +748,13 @@ static int start_tx (struct sk_buff *skb, struct net_device *dev)
        
        if(priv->station_state != STATION_STATE_READY) {
                priv->stats.tx_errors++;
-               return 0;
+               goto done;
        }
        
        if (priv->card && priv->present_callback && 
            !(*priv->present_callback)(priv->card)) {
                priv->stats.tx_errors++;
-               return 0;
+               goto done;
        }
        
        /* first ensure the timer func cannot run */
@@ -804,6 +804,8 @@ static int start_tx (struct sk_buff *skb, struct net_device *dev)
        
        spin_unlock_irqrestore(&priv->irqlock, flags);
        spin_unlock_bh(&priv->timerlock);
+
+done:
        dev_kfree_skb(skb);
        
        return 0;       
index d810ce6..37aa2f6 100644 (file)
@@ -109,7 +109,7 @@ config IOMMU_SBA
 
 config SUPERIO
        bool "SuperIO (SuckyIO) support"
-       depends on PCI
+       depends on PCI_LBA
        default y
        help
          Say Y here to support the SuperIO chip found in Bxxxx, C3xxx and
@@ -124,10 +124,23 @@ config CHASSIS_LCD_LED
          Disk/Network activities LEDs on some PA-RISC machines,
          or support for the LCD that can be found on recent material.
        
-         This has nothing to do with LED State support for A, J and E class.
+         This has nothing to do with LED State support for A and E class.
        
          If unsure, say Y.
 
+config PDC_CHASSIS
+       bool "PDC chassis State Panel support"
+       default y
+       help
+         Say Y here if you want to enable support for the LED State front
+         panel as found on E class, and support for the GSP Virtual Front
+         Panel (LED State and message logging)  as found on high end
+         servers such as A, L and N-class.
+         
+         This has nothing to do with Chassis LCD and LED support.
+         
+         If unsure, say Y.
 config HOTPLUG
        bool "Support for hot-pluggable devices"
        ---help---
index 070069d..d88555b 100644 (file)
@@ -483,7 +483,7 @@ typedef unsigned long space_t;
 */
 #define IOPDIR_VALID    0x01UL
 #define HINT_SAFE_DMA   0x02UL /* used for pci_alloc_consistent() pages */
-#ifdef CONFIG_ISA      /* EISA support really */
+#ifdef CONFIG_EISA
 #define HINT_STOP_MOST  0x04UL /* LSL support */
 #else
 #define HINT_STOP_MOST  0x00UL /* only needed for "some EISA devices" */
@@ -617,7 +617,7 @@ ccio_clear_io_tlb(struct ioc *ioc, dma_addr_t iovp, size_t byte_cnt)
                WRITE_U32(CMD_TLB_PURGE | iovp, &ioc->ioc_hpa->io_command);
                iovp += chain_size;
                byte_cnt -= chain_size;
-      }
+       }
 }
 
 /**
@@ -1312,8 +1312,8 @@ static struct ioc * ccio_find_ioc(int hw_path)
  * ccio_get_iommu - Find the iommu which controls this device
  * @dev: The parisc device.
  *
- * This function searches through the registerd IOMMU's and returns the
- * appropriate IOMMU for the device based upon the devices hardware path.
+ * This function searches through the registered IOMMU's and returns
+ * the appropriate IOMMU for the device based on its hardware path.
  */
 void * ccio_get_iommu(const struct parisc_device *dev)
 {
@@ -1509,12 +1509,13 @@ ccio_init_resource(struct resource *res, char *name, unsigned long ioaddr)
 {
        int result;
 
+       res->parent = NULL;
        res->flags = IORESOURCE_MEM;
        res->start = (unsigned long)(signed) __raw_readl(ioaddr) << 16;
        res->end = (unsigned long)(signed) (__raw_readl(ioaddr + 4) << 16) - 1;
+       res->name = name;
        if (res->end + 1 == res->start)
                return;
-       res->name = name;
        result = request_resource(&iomem_resource, res);
        if (result < 0) {
                printk(KERN_ERR "%s: failed to claim CCIO bus address space (%08lx,%08lx)\n", 
@@ -1534,120 +1535,111 @@ static void __init ccio_init_resources(struct ioc *ioc)
                        (unsigned long)&ioc->ioc_hpa->io_io_low_hv);
 }
 
-static int expand_resource(struct resource *res, unsigned long size,
-                          unsigned long align)
+static int new_ioc_area(struct resource *res, unsigned long size,
+               unsigned long min, unsigned long max, unsigned long align)
 {
-       struct resource *temp_res;
-       unsigned long start = res->start;
-       unsigned long end ;
+       if (max <= min)
+               return -EBUSY;
 
-       /* see if we can expand above */
-       end = (res->end + size + align - 1) & ~(align - 1);;
-       
-       temp_res = __request_region(res->parent, res->end, end - res->end,
-                                   "expansion");
-       if(!temp_res) {
-               /* now try below */
-               start = ((res->start - size + align) & ~(align - 1)) - align;
-               end = res->end;
-               temp_res = __request_region(res->parent, start, size,
-                                           "expansion");       
-               if(!temp_res) {
-                       return -ENOMEM;
-               }
-       } 
-       release_resource(temp_res);
-       temp_res = res->parent;
-       release_resource(res);
-       res->start = start;
-       res->end = end;
-
-       /* This could be caused by some sort of race.  Basically, if
-        * this tripped something stole the region we just reserved
-        * and then released to check for expansion */
-       BUG_ON(request_resource(temp_res, res) != 0);
+       res->start = (max - size + 1) &~ (align - 1);
+       res->end = res->start + size;
+       if (!request_resource(&iomem_resource, res))
+               return 0;
 
-       return 0;
+       return new_ioc_area(res, size, min, max - size, align);
 }
 
-static void expand_ioc_area(struct resource *parent, struct ioc *ioc,
-                           unsigned long size, unsigned long min,
-                           unsigned long max, unsigned long align)
+static int expand_ioc_area(struct resource *res, unsigned long size,
+               unsigned long min, unsigned long max, unsigned long align)
 {
-       if(ioc == NULL)
-               /* no IOC, so nothing to expand */
-               return;
+       unsigned long start, len;
 
-       if (expand_resource(parent, size, align) != 0) {
-               printk(KERN_ERR "Unable to expand %s window by 0x%lx\n",
-                      parent->name, size);
-               return;
+       if (!res->parent)
+               return new_ioc_area(res, size, min, max, align);
+
+       start = (res->start - size) &~ (align - 1);
+       len = res->end - start + 1;
+       if (start >= min) {
+               if (!adjust_resource(res, start, len))
+                       return 0;
        }
 
-       /* OK, we have the memory, now expand the window */
-       if (parent == &ioc->mmio_region[0]) {
+       start = res->start;
+       len = ((size + res->end + align) &~ (align - 1)) - start;
+       if (start + len <= max) {
+               if (!adjust_resource(res, start, len))
+                       return 0;
+       }
+
+       return -EBUSY;
+}
+
+/*
+ * Dino calls this function.  Beware that we may get called on systems
+ * which have no IOC (725, B180, C160L, etc) but do have a Dino.
+ * So it's legal to find no parent IOC.
+ *
+ * Some other issues: one of the resources in the ioc may be unassigned.
+ */
+int ccio_allocate_resource(const struct parisc_device *dev,
+               struct resource *res, unsigned long size,
+               unsigned long min, unsigned long max, unsigned long align)
+{
+       struct resource *parent = &iomem_resource;
+       struct ioc *ioc = ccio_get_iommu(dev);
+       if (!ioc)
+               goto out;
+
+       parent = ioc->mmio_region;
+       if (parent->parent &&
+           !allocate_resource(parent, res, size, min, max, align, NULL, NULL))
+               return 0;
+
+       if ((parent + 1)->parent &&
+           !allocate_resource(parent + 1, res, size, min, max, align,
+                               NULL, NULL))
+               return 0;
+
+       if (!expand_ioc_area(parent, size, min, max, align)) {
                __raw_writel(((parent->start)>>16) | 0xffff0000,
                             (unsigned long)&(ioc->ioc_hpa->io_io_low));
                __raw_writel(((parent->end)>>16) | 0xffff0000,
                             (unsigned long)&(ioc->ioc_hpa->io_io_high));
-       } else if (parent == &ioc->mmio_region[1]) {
+       } else if (!expand_ioc_area(parent + 1, size, min, max, align)) {
+               parent++;
                __raw_writel(((parent->start)>>16) | 0xffff0000,
                             (unsigned long)&(ioc->ioc_hpa->io_io_low_hv));
                __raw_writel(((parent->end)>>16) | 0xffff0000,
                             (unsigned long)&(ioc->ioc_hpa->io_io_high_hv));
        } else {
-               /* This should be impossible.  It means
-                * expand_ioc_area got called with a resource that
-                * didn't belong to the ioc
-                */
-               BUG();
+               return -EBUSY;
        }
+
+ out:
+       return allocate_resource(parent, res, size, min, max, align, NULL,NULL);
 }
 
-static struct resource *ccio_get_resource(struct ioc* ioc,
-               const struct parisc_device *dev)
+int ccio_request_resource(const struct parisc_device *dev,
+               struct resource *res)
 {
+       struct resource *parent;
+       struct ioc *ioc = ccio_get_iommu(dev);
+
        if (!ioc) {
-               return &iomem_resource;
+               parent = &iomem_resource;
        } else if ((ioc->mmio_region->start <= dev->hpa) &&
                        (dev->hpa < ioc->mmio_region->end)) {
-               return ioc->mmio_region;
+               parent = ioc->mmio_region;
        } else if (((ioc->mmio_region + 1)->start <= dev->hpa) &&
                        (dev->hpa < (ioc->mmio_region + 1)->end)) {
-               return ioc->mmio_region + 1;
+               parent = ioc->mmio_region + 1;
        } else {
-               return NULL;
-       }
-}
-
-int ccio_allocate_resource(const struct parisc_device *dev,
-               struct resource *res, unsigned long size,
-               unsigned long min, unsigned long max, unsigned long align,
-               void (*alignf)(void *, struct resource *, unsigned long, unsigned long),
-               void *alignf_data)
-{
-       struct ioc *ioc = ccio_get_iommu(dev);
-       struct resource *parent = ccio_get_resource(ioc, dev);
-       if (!parent)
                return -EBUSY;
-
-       if (!allocate_resource(parent, res, size, min, max, align, alignf,
-                       alignf_data))
-               return 0;
-
-       expand_ioc_area(parent, ioc, size, min, max, align);
-       return allocate_resource(parent, res, size, min, max, align, alignf,
-                       alignf_data);
-}
-
-int ccio_request_resource(const struct parisc_device *dev,
-               struct resource *res)
-{
-       struct ioc *ioc = ccio_get_iommu(dev);
-       struct resource *parent = ccio_get_resource(ioc, dev);
+       }
 
        return request_resource(parent, res);
 }
+
 /**
  * ccio_probe - Determine if ccio should claim this device.
  * @dev: The device which has been found
index cea71fe..a2bfdfa 100644 (file)
@@ -165,6 +165,13 @@ struct dino_device
 
 #define DINO_CFG_TOK(bus,dfn,pos) ((u32) ((bus)<<16 | (dfn)<<8 | (pos)))
 
+/*
+ * keep the current highest bus count to assist in allocating busses.  This
+ * tries to keep a global bus count total so that when we discover an 
+ * entirely new bus, it can be given a unique bus number.
+ */
+static int dino_current_bus = 0;
+
 static int dino_cfg_read(struct pci_bus *bus, unsigned int devfn, int where,
                int size, u32 *val)
 {
@@ -478,8 +485,7 @@ dino_card_setup(struct pci_bus *bus, unsigned long base_addr)
 
        if (ccio_allocate_resource(dino_dev->hba.dev, res, _8MB,
                                F_EXTEND(0xf0000000UL) | _8MB,
-                               F_EXTEND(0xffffffffUL) &~ _8MB, _8MB,
-                               NULL, NULL) < 0) {
+                               F_EXTEND(0xffffffffUL) &~ _8MB, _8MB) < 0) {
                struct list_head *ln, *tmp_ln;
 
                printk(KERN_ERR "Dino: cannot attach bus %s\n",
@@ -505,8 +511,6 @@ dino_card_setup(struct pci_bus *bus, unsigned long base_addr)
        DBG("DINO GSC WRITE i=%d, start=%lx, dino addr = %lx\n",
            i, res->start, base_addr + DINO_IO_ADDR_EN);
        gsc_writel(1 << i, base_addr + DINO_IO_ADDR_EN);
-
-       pci_bus_assign_resources(bus);
 }
 
 static void __init
@@ -547,6 +551,9 @@ dino_card_fixup(struct pci_dev *dev)
        dino_cfg_write(dev->bus, dev->devfn, PCI_INTERRUPT_LINE, 1, dev->irq); 
 }
 
+/* The alignment contraints for PCI bridges under dino */
+#define DINO_BRIDGE_ALIGN 0x100000
+
 
 static void __init
 dino_fixup_bus(struct pci_bus *bus)
@@ -560,13 +567,48 @@ dino_fixup_bus(struct pci_bus *bus)
                        __FUNCTION__, bus, bus->secondary, bus->dev->platform_data);
 
        /* Firmware doesn't set up card-mode dino, so we have to */
-       if (is_card_dino(&dino_dev->hba.dev->id))
+       if (is_card_dino(&dino_dev->hba.dev->id)) {
                dino_card_setup(bus, dino_dev->hba.base_addr);
+       } else if(bus->parent == NULL) {
+               /* must have a dino above it, reparent the resources
+                * into the dino window */
+               bus->resource[0] = &(dino_dev->hba.io_space);
+               bus->resource[1] = &(dino_dev->hba.lmmio_space); 
+       } else if(bus->self) {
+               int i;
 
-       /* If this is a PCI-PCI Bridge, read the window registers etc */
-       if (bus->self)
                pci_read_bridge_bases(bus);
 
+
+               for(i = 0; i < PCI_NUM_RESOURCES; i++) {
+                       if((bus->self->resource[i].flags & (IORESOURCE_IO | IORESOURCE_MEM)) == 0)
+                               continue;
+                       
+                       if(bus->self->resource[i].flags & IORESOURCE_MEM) {
+                               /* There's a quirk to alignment of
+                                * bridge memory resources: the start
+                                * is the alignment and start-end is
+                                * the size.  However, firmware will
+                                * have assigned start and end, so we
+                                * need to take this into account */
+                               bus->self->resource[i].end = bus->self->resource[i].end - bus->self->resource[i].start + DINO_BRIDGE_ALIGN;
+                               bus->self->resource[i].start = DINO_BRIDGE_ALIGN;
+                               
+                       }
+                                       
+                       DBG("DEBUG %s assigning %d [0x%lx,0x%lx]\n",
+                           bus->self->dev.bus_id, i,
+                           bus->self->resource[i].start,
+                           bus->self->resource[i].end);
+                       pci_assign_resource(bus->self, i);
+                       DBG("DEBUG %s after assign %d [0x%lx,0x%lx]\n",
+                           bus->self->dev.bus_id, i,
+                           bus->self->resource[i].start,
+                           bus->self->resource[i].end);
+               }
+       }
+
+
        list_for_each(ln, &bus->devices) {
                int i;
 
@@ -596,9 +638,39 @@ dino_fixup_bus(struct pci_bus *bus)
                        }
 #endif
                }
+               /* null out the ROM resource if there is one (we don't
+                * care about an expansion rom on parisc, since it
+                * usually contains (x86) bios code) */
+               dev->resource[PCI_ROM_RESOURCE].flags = 0;
+               dev->resource[PCI_ROM_RESOURCE].start = 0;
+               dev->resource[PCI_ROM_RESOURCE].end = 0;
+                               
+               if(dev->irq == 255) {
+
+#ifdef DINO_FIX_UNASSIGNED_INTERRUPTS
+
+                       /* This code tries to assign an unassigned
+                        * interrupt.  Leave it disabled unless you
+                        * *really* know what you're doing since the
+                        * pin<->interrupt line mapping varies by bus
+                        * and machine */
+
+                       u32 irq_pin;
+                       
+                       dino_cfg_read(dev->bus, dev->devfn, PCI_INTERRUPT_PIN, 1, &irq_pin);
+                       dev->irq = (irq_pin + PCI_SLOT(dev->devfn) - 1) % 4 ;
+                       dino_cfg_write(dev->bus, dev->devfn, PCI_INTERRUPT_LINE, 1, dev->irq);
+                       dev->irq += dino_dev->dino_region->data.irqbase
+                       printk(KERN_WARNING "Device %s has undefined IRQ, setting to %d\n", dev->slot_name, irq_pin);
+#else
+                       dev->irq = 65535;
+                       printk(KERN_WARNING "Device %s has unassigned IRQ\n", dev->slot_name);  
+#endif
+               } else {
 
-               /* Adjust INT_LINE for that busses region */
-               dev->irq = dino_dev->dino_region->data.irqbase + dev->irq;
+                       /* Adjust INT_LINE for that busses region */
+                       dev->irq += dino_dev->dino_region->data.irqbase;
+               }
        }
 }
 
@@ -827,6 +899,7 @@ dino_driver_callback(struct parisc_device *dev)
        const int name_len = 32;
        char *name;
        int is_cujo = 0;
+       struct pci_bus *bus;
 
        name = kmalloc(name_len, GFP_KERNEL);
        if(name)
@@ -912,9 +985,20 @@ dino_driver_callback(struct parisc_device *dev)
        ** It's not used to avoid chicken/egg problems
        ** with configuration accessor functions.
        */
-       dino_dev->hba.hba_bus = 
-               pci_scan_bus_parented(&dev->dev, dino_dev->hba.hba_num,
-                                     &dino_cfg_ops, NULL);
+       bus = pci_scan_bus_parented(&dev->dev, dino_current_bus,
+                                   &dino_cfg_ops, NULL);
+       if(bus) {
+               /* This code *depends* on scanning being single threaded
+                * if it isn't, this global bus number count will fail
+                */
+               dino_current_bus = bus->subordinate + 1;
+               pci_bus_assign_resources(bus);
+       } else {
+               printk(KERN_ERR "ERROR: failed to scan PCI bus on %s (probably duplicate bus number %d)\n", dev->dev.bus_id, dino_current_bus);
+               /* increment the bus number in case of duplicates */
+               dino_current_bus++;
+       }
+       dino_dev->hba.hba_bus = bus;
        return 0;
 }
 
@@ -923,10 +1007,13 @@ dino_driver_callback(struct parisc_device *dev)
  * the same sversion as Dino, so we have to check hversion as well.
  * Unfortunately, the J2240 PDC reports the wrong hversion for the first
  * Dino, so we have to test for Dino, Cujo and Dino-in-a-J2240.
+ * For card-mode Dino, most machines report an sversion of 9D.  But 715
+ * and 725 firmware misreport it as 0x08080 for no adequately explained
+ * reason.
  */
 static struct parisc_device_id dino_tbl[] = {
-       { HPHW_A_DMA, HVERSION_REV_ANY_ID, 0x004, 0x0009D }, /* Card-mode Dino. */
-       { HPHW_A_DMA, HVERSION_REV_ANY_ID, 0x444, 0x08080 }, /* Same card in a 715.  Bug? */
+       { HPHW_A_DMA, HVERSION_REV_ANY_ID, 0x004, 0x0009D },/* Card-mode Dino */
+       { HPHW_A_DMA, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x08080 }, /* XXX */
        { HPHW_BRIDGE, HVERSION_REV_ANY_ID, 0x680, 0xa }, /* Bridge-mode Dino */
        { HPHW_BRIDGE, HVERSION_REV_ANY_ID, 0x682, 0xa }, /* Bridge-mode Cujo */
        { HPHW_BRIDGE, HVERSION_REV_ANY_ID, 0x05d, 0xa }, /* Dino in a J2240 */
index 6396063..612fb29 100644 (file)
@@ -441,7 +441,6 @@ static __inline__ int led_get_diskio_activity(void)
 #if HZ==100
  #define NORMALIZED_COUNT(count) (count)
 #else
- #warning "Untested situation HZ != 100 !!"
  #define NORMALIZED_COUNT(count) (count/(HZ/100))
 #endif
 
index fbe8eb6..7673be9 100644 (file)
@@ -65,7 +65,9 @@
 #include <linux/ioport.h>
 #include <linux/parport.h>
 #include <linux/parport_pc.h>
-#include <linux/serial_reg.h>
+#include <linux/termios.h>
+#include <linux/tty.h>
+#include <linux/serial_core.h>
 #include <asm/io.h>
 #include <asm/hardware.h>
 #include <asm/irq.h>
@@ -387,11 +389,27 @@ int superio_fixup_irq(struct pci_dev *pcidev)
        return(sio_dev.irq_region->data.irqbase + local_irq);
 }
 
+static struct uart_port serial[] = {
+       {
+               .iotype         = UPIO_PORT,
+               .line           = 0,
+               .type           = PORT_16550A,
+               .uartclk        = 115200*16,
+               .fifosize       = 16,
+       },
+       {
+               .iotype         = UPIO_PORT,
+               .line           = 1,
+               .type           = PORT_16550A,
+               .uartclk        = 115200*16,
+               .fifosize       = 16,
+       }
+};
+
 void __devinit
 superio_serial_init(void)
 {
 #ifdef CONFIG_SERIAL_8250
-       struct serial_struct *serial;
        int retval;
        
        if (!sio_dev.irq_region)
@@ -400,47 +418,15 @@ superio_serial_init(void)
        if (!sio_dev.iosapic_irq_enabled)
                superio_init(&sio_dev);
 
-       serial = kmalloc(2 * sizeof (struct serial_struct), GFP_KERNEL);
-
-       if (!serial) {
-               printk(KERN_WARNING "SuperIO: Could not get memory for serial struct.\n");
-               return;
-       }
+       serial[0].iobase = sio_dev.sp1_base;
+       retval = early_serial_setup(&serial[0]);
 
-       memset(serial, 0, 2 * sizeof (struct serial_struct));
-
-       serial->type = PORT_16550A;
-       serial->line = 0;
-       serial->port = sio_dev.sp1_base;
-       serial->port_high = 0;
-       serial->irq = sio_dev.irq_region->data.irqbase + SP1_IRQ;
-       serial->io_type = SERIAL_IO_PORT;
-       serial->flags = 0;
-       serial->xmit_fifo_size = 16;
-       serial->custom_divisor = 0;
-       serial->baud_base = 115200;
-
-       retval = register_serial(serial);
-       if (retval < 0) {
+       if (retval < 0)
                printk(KERN_WARNING "SuperIO: Register Serial #0 failed.\n");
-               kfree (serial);
-               return;
-       }
-
-       serial++;
 
-       serial->type = PORT_16550A;
-       serial->line = 1;
-       serial->port = sio_dev.sp2_base;
-       serial->port_high = 0;
-       serial->irq = sio_dev.irq_region->data.irqbase + SP2_IRQ;
-       serial->io_type = SERIAL_IO_PORT;
-       serial->flags = 0;
-       serial->xmit_fifo_size = 16;
-       serial->custom_divisor = 0;
-       serial->baud_base = 115200;
+       serial[1].iobase = sio_dev.sp2_base;
+       retval = early_serial_setup(&serial[1]);
 
-       retval = register_serial(serial);
        if (retval < 0)
                printk(KERN_WARNING "SuperIO: Register Serial #1 failed.\n");
 #endif /* CONFIG_SERIAL_8250 */
@@ -543,5 +529,5 @@ static void __exit superio_exit(void)
  *
  * FIXME: does this break the superio console?
  */
-late_initcall(superio_modinit);
+module_init(superio_modinit);
 module_exit(superio_exit);
index 10a9da7..3195131 100644 (file)
@@ -22,12 +22,12 @@ obj-$(CONFIG_ALPHA) += setup-bus.o setup-irq.o
 obj-$(CONFIG_ARM) += setup-bus.o setup-irq.o
 obj-$(CONFIG_PARISC) += setup-bus.o
 obj-$(CONFIG_SUPERH) += setup-bus.o setup-irq.o
-obj-$(CONFIG_PPC64) += setup-bus.o
 obj-$(CONFIG_PPC32) += setup-irq.o
 obj-$(CONFIG_PPC64) += setup-bus.o
 obj-$(CONFIG_SGI_IP27) += setup-irq.o
 obj-$(CONFIG_SGI_IP32) += setup-irq.o
 obj-$(CONFIG_X86_VISWS) += setup-irq.o
+obj-$(CONFIG_PCI_USE_VECTOR) += msi.o
 
 # Cardbus & CompactPCI use setup-bus
 obj-$(CONFIG_HOTPLUG) += setup-bus.o
index 969ec42..ea4b430 100644 (file)
@@ -116,8 +116,6 @@ void __devinit pci_bus_add_devices(struct pci_bus *bus)
                        list_add_tail(&dev->subordinate->node, &dev->bus->children);
                        spin_unlock(&pci_bus_lock);
                        pci_bus_add_devices(dev->subordinate);
-
-                       sysfs_create_link(&dev->subordinate->class_dev.kobj, &dev->dev.kobj, "bridge");
                }
        }
 }
index 716ca09..d1eebb9 100644 (file)
@@ -88,10 +88,6 @@ config HOTPLUG_PCI_ACPI
 
          When in doubt, say N.
 
-config HOTPLUG_PCI_AMD
-       tristate "AMD Standard Hot Plug Controller (SHPC) driver"
-       depends on HOTPLUG_PCI
-
 config HOTPLUG_PCI_CPCI
        bool "CompactPCI Hotplug driver"
        depends on HOTPLUG_PCI
@@ -126,28 +122,5 @@ config HOTPLUG_PCI_CPCI_GENERIC
 
          When in doubt, say N.
 
-config HOTPLUG_PCI_RPA
-       tristate "RPA PCI Hotplug driver"
-       depends on HOTPLUG_PCI && PPC64
-       help
-         Say Y here if you have a a RPA system that supports PCI Hotplug.
-
-         To compile this driver as a module, choose M here: the
-         module will be called rpaphp.
-
-         When in doubt, say N.
-
-config HOTPLUG_PCI_RPA_DLPAR
-       tristate "RPA Dynamic Logical Partitioning for I/O slots"
-       depends on HOTPLUG_PCI_RPA
-       help
-         Say Y here if your system supports Dynamic Logical Partitioning
-         for I/O slots.
-
-         To compile this driver as a module, choose M here: the
-         module will be called rpadlpar_io.
-         When in doubt, say N.
-
 endmenu
 
index 713043c..93549e1 100644 (file)
@@ -7,12 +7,8 @@ obj-$(CONFIG_HOTPLUG_PCI_FAKE)         += fakephp.o
 obj-$(CONFIG_HOTPLUG_PCI_COMPAQ)       += cpqphp.o
 obj-$(CONFIG_HOTPLUG_PCI_IBM)          += ibmphp.o
 obj-$(CONFIG_HOTPLUG_PCI_ACPI)         += acpiphp.o
-obj-$(CONFIG_HOTPLUG_PCI_AMD)          += amdshpc.o
 obj-$(CONFIG_HOTPLUG_PCI_CPCI_ZT5550)  += cpcihp_zt5550.o
 obj-$(CONFIG_HOTPLUG_PCI_CPCI_GENERIC) += cpcihp_generic.o
-obj-$(CONFIG_HOTPLUG_PCI_FAKE)         += fakephp.o 
-obj-$(CONFIG_HOTPLUG_PCI_RPA)          += rpaphp.o
-obj-$(CONFIG_HOTPLUG_PCI_RPA_DLPAR)    += rpadlpar_io.o
 
 pci_hotplug-objs       :=      pci_hotplug_core.o
 
@@ -37,21 +33,6 @@ acpiphp-objs         :=      acpiphp_core.o  \
                                acpiphp_pci.o   \
                                acpiphp_res.o
 
-amdshpc-objs           :=      amdshpc_core.o  \
-                               amdshpc_ctrl.o  \
-                               amdshpc_pci.o   \
-                               amdshpc_ddi.o   \
-                               amdshpc_int.o   \
-                               amdshpc_led.o   \
-                               amdshpc_enb.o   \
-                               amdshpc_dsb.o
-
-rpaphp-objs            :=      rpaphp_core.o   \
-                               rpaphp_pci.o    
-
-rpadlpar_io-objs       :=      rpadlpar_core.o \
-                               rpadlpar_sysfs.o
-
 ifdef CONFIG_HOTPLUG_PCI_ACPI
   EXTRA_CFLAGS  += -D_LINUX -I$(TOPDIR)/drivers/acpi
   ifdef CONFIG_ACPI_DEBUG
index bbf25f2..9f5591f 100644 (file)
@@ -974,21 +974,6 @@ static void handle_hotplug_event_bridge (acpi_handle handle, u32 type, void *con
                dbg("%s: Device eject notify on %s\n", __FUNCTION__, objname);
                break;
 
-       case ACPI_NOTIFY_FREQUENCY_MISMATCH:
-               printk(KERN_ERR "Device %s cannot be configured due"
-                               " to a frequency mismatch\n", objname);
-               break;
-
-       case ACPI_NOTIFY_BUS_MODE_MISMATCH:
-               printk(KERN_ERR "Device %s cannot be configured due"
-                               " to a bus mode mismatch\n", objname);
-               break;
-
-       case ACPI_NOTIFY_POWER_FAULT:
-               printk(KERN_ERR "Device %s has suffered a power fault\n",
-                               objname);
-               break;
-
        default:
                warn("notify_handler: unknown event type 0x%x for %s\n", type, objname);
                break;
diff --git a/drivers/pci/hotplug/amdshpc.h b/drivers/pci/hotplug/amdshpc.h
deleted file mode 100644 (file)
index 25fd4f4..0000000
+++ /dev/null
@@ -1,1265 +0,0 @@
-/*
- * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (C) 2001,2003 IBM Corp.
- * Copyright (C) 2002-2003 Advanced Micro Devices
- *
- * YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS
- * AND CONDITIONS OF THE GNU GENERAL PUBLIC
- * LICENSE FOUND IN THE "GPL.TXT" FILE THAT IS
- * INCLUDED WITH THIS FILE AND POSTED AT
- * http://www.gnu.org/licenses/gpl.html
- *
- * Send feedback to <greg@kroah.com> <david.keck@amd.com>
- *
- */
-
-#ifndef _SHPC_H_
-#define _SHPC_H_
-
-
-#include <linux/types.h>
-#include <linux/wait.h>
-#include <linux/pci.h>
-#include <linux/interrupt.h>
-#include <linux/timer.h>
-#include <linux/sched.h>
-#include <asm/semaphore.h>
-#include "pci_hotplug.h"
-
-//
-// Timeouts
-//
-#define ONE_TENTH_SEC_TIMEOUT          10              // 0.1 sec
-#define ONE_SEC_TIMEOUT                 HZ * 1          // 1 sec
-#define FIVE_SEC_TIMEOUT                HZ * 5          // 5 secs
-#define TEN_SEC_TIMEOUT                 HZ * 10         // 10 secs
-#define FIFTEEN_SEC_TIMEOUT             HZ * 15         // 15 secs
-#define QUIESCE_QUIET_TIMEOUT           HZ * 30         // 30 secs
-#define QUIESCE_TIMEOUT                 HZ * 60         // 60 secs
-#define ONE_SEC_INCREMENT               HZ * 1          // 1 sec
-
-#define SLOT_MAGIC      0x67267322
-struct slot {
-       u32 magic;
-       struct slot *next;
-       struct list_head slot_list;
-       u8 bus;
-       u8 device;
-       u8 number;
-       u8 is_a_board;
-       u8 configured;
-       u8 state;
-       u8 switch_save;
-       u8 presence_save;
-       u32 capabilities;
-       u16 reserved2;
-       struct timer_list task_event;
-       u8 hp_slot;
-       struct controller *ctrl;
-       void *p_sm_slot;
-       struct hotplug_slot *hotplug_slot;
-       void* private;
-};
-
-struct controller {
-       struct controller *next;
-       void *shpc_context;
-       u32 ctrl_int_comp;
-       void *hpc_reg;          /* cookie for our pci controller location */
-       struct pci_resource *mem_head;
-       struct pci_resource *p_mem_head;
-       struct pci_resource *io_head;
-       struct pci_resource *bus_head;
-       struct pci_dev *pci_dev;
-       struct pci_bus *pci_bus;
-       struct slot *slot;
-       u8 interrupt;
-       u8 bus;
-       u8 device;
-       u8 function;
-       u8 slot_device_offset;
-       u8 first_slot;
-       u8 add_support;
-       u16 vendor_id;
-};
-
-
-static LIST_HEAD(slot_list);
-
-#if !defined(CONFIG_HOTPLUG_PCI_AMD_MODULE)
-       #define MY_NAME "amd_shpc.o"
-#else
-       #define MY_NAME THIS_MODULE->name
-#endif
-
-//
-// Debug Facilities
-//
-#define debug 0
-#define dbg(format, arg...)                                     \
-       do {                                                    \
-               if (debug)                                      \
-                   printk (KERN_DEBUG "%s: " format "\n",      \
-                   MY_NAME , ## arg);          \
-       } while (0)
-
-#define err(format, arg...) printk(KERN_ERR "%s: " format "\n", MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format "\n", MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format "\n", MY_NAME , ## arg)
-
-#define msg_initialization_err  "Initialization failure, error=%d\n"
-#define msg_HPC_rev_error       "Unsupported revision of the PCI hot plug controller found.\n"
-#define msg_HPC_non_amd         "Non-AMD PCI hot plug controller is not supported by this driver.\n"
-#define msg_HPC_not_amd_hp     "Device is not a hot plug controller.\n"
-#define msg_HPC_not_supported   "This system is not supported by this version of amdshpc. Upgrade to a newer version of amdshpc\n"
-#define msg_unable_to_save      "Unable to store PCI hot plug add resource information. This system must be rebooted before adding any PCI devices.\n"
-
-struct hrt {
-       char sig0;
-       char sig1;
-       char sig2;
-       char sig3;
-       u16 unused_IRQ;
-       u16 PCIIRQ;
-       u8 number_of_entries;
-       u8 revision;
-       u16 reserved1;
-       u32 reserved2;
-} __attribute__ ((packed));
-
-/* offsets to the hotplug resource table registers based on the above structure layout */
-enum hrt_offsets {
-       SIG0 =                  offsetof(struct hrt, sig0),
-       SIG1 =                  offsetof(struct hrt, sig1),
-       SIG2 =                  offsetof(struct hrt, sig2),
-       SIG3 =                  offsetof(struct hrt, sig3),
-       UNUSED_IRQ =            offsetof(struct hrt, unused_IRQ),
-       PCIIRQ =                offsetof(struct hrt, PCIIRQ),
-       NUMBER_OF_ENTRIES =     offsetof(struct hrt, number_of_entries),
-       REVISION =              offsetof(struct hrt, revision),
-       HRT_RESERVED1 =         offsetof(struct hrt, reserved1),
-       HRT_RESERVED2 =         offsetof(struct hrt, reserved2),
-};
-
-struct slot_rt {
-       u8 dev_func;
-       u8 primary_bus;
-       u8 secondary_bus;
-       u8 max_bus;
-       u16 io_base;
-       u16 io_length;
-       u16 mem_base;
-       u16 mem_length;
-       u16 pre_mem_base;
-       u16 pre_mem_length;
-} __attribute__ ((packed));
-
-/* offsets to the hotplug slot resource table registers based on the above structure layout */
-enum slot_rt_offsets {
-       DEV_FUNC =      offsetof(struct slot_rt, dev_func),
-       PRIMARY_BUS =   offsetof(struct slot_rt, primary_bus),
-       SECONDARY_BUS = offsetof(struct slot_rt, secondary_bus),
-       MAX_BUS =       offsetof(struct slot_rt, max_bus),
-       IO_BASE =       offsetof(struct slot_rt, io_base),
-       IO_LENGTH =     offsetof(struct slot_rt, io_length),
-       MEM_BASE =      offsetof(struct slot_rt, mem_base),
-       MEM_LENGTH =    offsetof(struct slot_rt, mem_length),
-       PRE_MEM_BASE =  offsetof(struct slot_rt, pre_mem_base),
-       PRE_MEM_LENGTH = offsetof(struct slot_rt, pre_mem_length),
-};
-
-struct pci_func {
-       struct pci_func *next;
-       u8 bus;
-       u8 device;
-       u8 function;
-       u8 is_a_board;
-       u16 status;
-       u8 configured;
-       u8 switch_save;
-       u8 presence_save;
-       u32 base_length[0x06];
-       u8 base_type[0x06];
-       u16 reserved2;
-       u32 config_space[0x20];
-       struct pci_resource *mem_head;
-       struct pci_resource *p_mem_head;
-       struct pci_resource *io_head;
-       struct pci_resource *bus_head;
-       struct timer_list *p_task_event;
-       struct pci_dev* pci_dev;
-};
-
-
-#ifndef FALSE
-       #define FALSE 0
-       #define TRUE 1
-#endif
-
-#define IN
-#define OUT
-
-enum mutex_action {
-       ACQUIRE,
-       RELEASE,
-};
-
-enum hp_boolean {
-       HP_FALSE = 0,
-       HP_TRUE = 1,
-};
-
-// card power requirements
-enum hp_power_requirements {
-       POWER_LOW,              // low power requirements
-       POWER_MEDIUM,           // medium power requirements
-       POWER_HIGH,             // high power requirements
-};
-
-//
-// slot event masks
-//
-#define ATTN_BUTTON_EVENT               0x00000001
-#define ALERT_EVENT                    0x00000002
-#define BUS_REBALANCE_EVENT             0x00000004
-#define QUIESCE_EVENT                   0x00000008
-#define ATTN_LED_PROBLEM_EVENT          0x00000010
-#define ATTN_LED_REQUEST_EVENT          0x00000020
-#define SLOT_REQUEST_EVENT              0x00000040
-#define SLOT_TIMER1_EVENT               0x00000080
-#define SLOT_TIMER2_EVENT               0x00000100
-#define SLOT_TIMER3_EVENT               0x00000200
-#define SLOT_TIMER4_EVENT               0x00000400
-#define SLOT_TIMER5_EVENT               0x00000800
-#define SLOT_TIMER6_EVENT               0x00001000
-#define SLOT_TIMER7_EVENT               0x00002000
-#define SLOT_TIMER8_EVENT               0x00004000
-#define SLOT_TIMER9_EVENT               0x00008000
-#define SLOT_TIMER10_EVENT              0x00010000
-#define LED_TIMER1_EVENT                0x00020000
-#define LED_TIMER2_EVENT                0x00040000
-#define LED_TIMER3_EVENT                0x00080000
-#define LED_TIMER4_EVENT                0x00100000
-#define CMD_ACQUIRE_EVENT               0x00200000
-#define CMD_RELEASE_EVENT               0x00400000
-#define LED_CMD_ACQUIRE_EVENT           0x00800000
-#define LED_CMD_RELEASE_EVENT           0x01000000
-#define BUS_RELEASE_EVENT               0x02000000
-#define BUS_ACQUIRE_EVENT               0x04000000
-
-//
-// controller event masks
-//
-#define BUS_COMPLETE_EVENT              0x00000001
-#define SUSPEND_EVENT                   0x00000002
-#define RESUME_EVENT                    0x00000004
-#define REMOVE_EVENT                    0x00000008
-#define EXIT_REQUEST_EVENT              0x00000010
-#define CTRL_TIMER_EVENT                0x00000020
-#define CMD_COMPLETION_EVENT            0x00000040
-#define CMD_AVAILABLE_MUTEX_EVENT       0x00000080
-#define BUS_AVAILABLE_MUTEX_EVENT       0x00000100
-#define LED_CMD_AVAILABLE_MUTEX_EVENT   0x00000200
-
-
-#define PCI_TO_PCI_BRIDGE_CLASS         0x00060400
-#define SLOT_MASK                       0x28
-
-
-#define ADD_NOT_SUPPORTED               0x00000003
-#define ADAPTER_NOT_SAME                0x00000006
-#define NO_ADAPTER_PRESENT              0x00000009
-
-#define REMOVE_NOT_SUPPORTED            0x00000003
-
-
-
-// slot states
-enum hp_states {
-       SLOT_DISABLE,           // slot disable
-       SLOT_ENABLE,            // slot enable
-};
-
-// indicator values
-enum mode_frequency {
-       MODE_PCI_33,            // PCI 33Mhz
-       MODE_PCI_66,            // PCI 66Mhz
-       MODE_PCIX_66,           // PCI-X 66Mhz
-       MODE_PCIX_100,          // PCI-X 100Mhz
-       MODE_PCIX_133,          // PCI-X 133Mhz
-};
-
-enum hp_indicators {
-       INDICATOR_OFF,          // Indicator off state
-       INDICATOR_ON,           // Indicator on state
-       INDICATOR_BLINK,        // Indicator blink state
-       INDICATOR_NORMAL,       // Indicator normal state
-};
-
-struct pci_resource {
-       struct pci_resource * next;
-       u32 base;
-       u32 length;
-};
-
-struct resource_descriptor {
-       u32 base;
-       u32 limit;
-};
-
-struct irq_mapping {
-       u8 barber_pole;
-       u8 valid_INT;
-       u8 interrupt[4];
-};
-
-struct resource_lists {
-       struct pci_resource *mem_head;
-       struct pci_resource *p_mem_head;
-       struct pci_resource *io_head;
-       struct pci_resource *bus_head;
-       struct irq_mapping *irqs;
-};
-
-#define ROM_PHY_ADDR                    0x0F0000
-#define ROM_PHY_LEN                     0x00ffff
-
-#define NOT_ENOUGH_RESOURCES            0x0000000B
-#define DEVICE_TYPE_NOT_SUPPORTED       0x0000000C
-
-//
-// Prototypes
-//
-extern int  amdshpc_resource_sort_and_combine (struct pci_resource **head);
-
-//
-// State-Machine Function
-//
-typedef long ( *SLOT_STATE_FUNCTION )(
-                                    void* shpc_context,
-                                    void* slot_context);
-
-//
-// SHPC Constants
-//
-#define SHPC_MAX_NUM_SLOTS      4
-
-
-#define arraysize(p) (sizeof(p)/sizeof((p)[0]))
-
-
-//
-// SHPC Register Offsets
-//
-enum shpc_register_offset {
-       SHPC_SLOTS_AVAILABLE1_REG_OFFSET        = 0x04,
-       SHPC_SLOTS_AVAILABLE2_REG_OFFSET        = 0x08,
-       SHPC_SLOT_CONFIG_REG_OFFSET             = 0x0C,
-       SHPC_SEC_BUS_CONFIG_REG_OFFSET          = 0x10,
-       SHPC_COMMAND_REG_OFFSET                 = 0x14,
-       SHPC_STATUS_REG_OFFSET                  = 0x16,
-       SHPC_INT_LOCATOR_REG_OFFSET             = 0x18,
-       SHPC_SERR_LOCATOR_REG_OFFSET            = 0x1C,
-       SHPC_SERR_INT_REG_OFFSET                = 0x20,
-       SHPC_LOGICAL_SLOT_REG_OFFSET            = 0x24,
-};
-
-
-//
-// SHPC Slots Available Register I
-//
-union SHPC_SLOTS_AVAILABLE1_DWREG {
-       struct {
-               u32 N_33CONV    :5;     // 4:0
-               u32 reserved1   :3;     // 7:5
-               u32 N_66PCIX    :5;     // 12:8
-               u32 reserved2   :3;     // 15:13
-               u32 N_100PCIX   :5;     // 20:16
-               u32 reserved3   :3;     // 23:21
-               u32 N_133PCIX   :5;     // 28:24
-               u32 reserved4   :3;     // 31:29
-       }x;
-       u32 AsDWord;
-};
-
-
-//
-// SHPC Slots Available Register II
-//
-union SHPC_SLOTS_AVAILABLE2_DWREG {
-       struct {
-               u32 N_66CONV    :5;     // 4:0
-               u32 reserved4   :27;    // 31:5
-       }x;
-       u32 AsDWord;
-};
-
-
-//
-// SHPC Slot Configuration Register
-//
-union SHPC_SLOT_CONFIG_DWREG {
-       struct {
-               u32 NSI         :5;     // 4:0
-               u32 reserved1   :3;     // 7:5
-               u32 FDN         :5;     // 12:8
-               u32 reserved2   :3;     // 15:13
-               u32 PSN         :11;    // 26:16
-               u32 reserved3   :2;     // 28:27
-               u32 PSN_UP      :1;     // 29
-               u32 MRLSI       :1;     // 30
-               u32 ABI         :1;     // 31
-       }x;
-       u32 AsDWord;
-};
-
-
-//
-// SHPC Secondary Bus Configuration Register
-//
-union SHPC_SEC_BUS_CONFIG_DWREG {
-       struct {
-               u32 MODE        :3;     // 2:0
-               u32 reserved    :21;    // 23:3
-               u32 format      :8;     // 31:24
-       }x;
-       u32 AsDWord;
-};
-
-
-//
-// SHPC Command Register
-//
-union SHPC_COMMAND_WREG {
-       struct {
-               u16 state               : 2;    // 1:0
-               u16 power_led           : 2;    // 3:2
-               u16 attention_led       : 2;    // 5:4
-               u16 code                : 2;    // 7:6
-               u16 TGT                 : 5;    // 12:8
-               u16 reserved            : 3;    // 15:13
-       } Slot;
-       struct {
-               u16 speed_mode          : 3;    // 2:0
-               u16 code                : 5;    // 7:3
-               u16 reserved            : 8;    // 15:8
-       } Bus;
-       struct {
-               u16 code                : 8;    // 7:0
-               u16 reserved            : 8;    // 15:8
-       }x;
-       u16 AsWord;
-};
-
-
-//
-// SHPC Status Register
-//
-union SHPC_STATUS_WREG {
-       struct {
-               u16 BSY         :1;     // 0
-               u16 MRLO_ERR    :1;     // 1
-               u16 INVCMD_ERR  :1;     // 2
-               u16 INVSM_ERR   :1;     // 3
-               u16 reserved    :12;    // 15:4
-       }x;
-       u16 AsWord;
-};
-
-
-//
-// SHPC Interrupt Locator Register
-//
-union SHPC_INT_LOCATOR_DWREG {
-       struct {
-               u32 CC_IP       :1;     // 0
-               u32 SLOT_IP     :4;     // 4:1
-               u32 reserved    :27;    // 31:5
-       }x;
-       u32 AsDWord;
-};
-
-
-//
-// SHPC SERR Locator Register
-//
-union SHPC_SERR_LOCATOR_DWREG {
-       struct {
-               u32 A_SERRP     :1;     // 0
-               u32 SLOT_SERRP  :4;     // 4:1
-               u32 reserved    :27;    // 31:5
-       }x;
-       u32 AsDWord;
-};
-
-
-//
-// SHPC SERR-INT Register
-//
-union SHPC_SERR_INT_DWREG {
-       struct {
-               u32 GIM         :1;     // 0
-               u32 GSERRM      :1;     // 1
-               u32 CC_IM       :1;     // 2
-               u32 A_SERRM     :1;     // 3
-               u32 reserved1   :12;    // 15:4
-               u32 CC_STS      :1;     // 16
-               u32 ATOUT_STS   :1;     // 17
-               u32 reserved2   :14;    // 31:18
-       }x;
-       u32 AsDWord;
-};
-
-
-//
-// SHPC Logical Slot Register
-//
-union SHPC_LOGICAL_SLOT_DWREG {
-       struct {
-               u32 S_STATE     :2;     // 1:0
-               u32 PIS         :2;     // 3:2
-               u32 AIS         :2;     // 5:4
-               u32 PF          :1;     // 6
-               u32 AB          :1;     // 7
-               u32 MRLS        :1;     // 8
-               u32 M66_CAP     :1;     // 9
-               u32 PRSNT1_2    :2;     // 11:10
-               u32 PCIX_CAP    :2;     // 13:12
-               u32 reserved1   :2;     // 15:14
-               u32 CPC_STS     :1;     // 16
-               u32 IPF_STS     :1;     // 17
-               u32 ABP_STS     :1;     // 18
-               u32 MRLSC_STS   :1;     // 19
-               u32 CPF_STS     :1;     // 20
-               u32 reserved2   :3;     // 23:21
-               u32 CP_IM       :1;     // 24
-               u32 IPF_IM      :1;     // 25
-               u32 AB_IM       :1;     // 26
-               u32 MRLS_IM     :1;     // 27
-               u32 CPF_IM      :1;     // 28
-               u32 MRLS_SERRM  :1;     // 29
-               u32 CPF_SERRM   :1;     // 30
-               u32 reserved3   :1;     // 31
-       }x;
-       u32 AsDWord;
-};
-
-
-//
-// Bus Speed/Mode
-//
-enum shpc_speed_mode {
-       SHPC_BUS_CONV_33        = 0,
-       SHPC_BUS_CONV_66        = 1,
-       SHPC_BUS_PCIX_66        = 2,
-       SHPC_BUS_PCIX_100       = 3,
-       SHPC_BUS_PCIX_133       = 4,
-};
-
-
-//
-// Slot PCIX Capability
-//
-enum shpc_slot_pcix_cap {
-       SHPC_SLOT_CONV          = 0,
-       SHPC_SLOT_PCIX_66       = 1,
-       SHPC_SLOT_PCIX_133      = 3,
-};
-
-
-//
-// Slot LEDs
-//
-enum shpc_slot_led {
-       SHPC_led_NO_CHANGE      = 0,
-       SHPC_LED_ON             = 1,
-       SHPC_LED_BLINK          = 2,
-       SHPC_LED_OFF            = 3,
-};
-
-
-//
-// Slot State
-//
-enum shpc_slot_state {
-       SHPC_SLOT_NO_CHANGE     = 0,
-       SHPC_POWER_ONLY         = 1,
-       SHPC_ENABLE_SLOT        = 2,
-       SHPC_DISABLE_SLOT       = 3,
-};
-
-
-//
-// Command Code
-//
-#define SHPC_SLOT_OPERATION             0x00    // 7:6  (00xxxxxxb)
-#define SHPC_SET_BUS_SPEED_MODE         0x08    // 7:3  (01000xxxb)
-#define SHPC_POWER_ONLY_ALL_SLOTS       0x48    // 7:0  (01001000b)
-#define SHPC_ENABLE_ALL_SLOTS           0x49    // 7:0  (01001001b)
-
-
-//
-// SHPC Status
-//
-enum shpc_status {
-       SHPC_STATUS_CLEARED     = 0,
-       SHPC_STATUS_SET         = 1,
-};
-
-
-//
-// SHPC Mask
-//
-enum shpc_mask {
-       SHPC_UNMASKED   = 0,
-       SHPC_MASKED     = 1,
-};
-
-
-//
-// Slot MRL Sensor
-//
-enum shpc_slot_mrl {
-       SHPC_MRL_CLOSED = 0,
-       SHPC_MRL_OPEN   = 1,
-};
-
-
-//
-// Slot Attn Button
-//
-enum shpc_slot_attn_button {
-       SHPC_ATTN_BUTTON_RELEASED  = 0,
-       SHPC_ATTN_BUTTON_PRESSED   = 1,
-};
-
-
-//
-// Card Power Requirements
-//
-enum shpc_card_power {
-       SHPC_CARD_PRESENT_7_5W  = 0,
-       SHPC_CARD_PRESENT_15W   = 1,
-       SHPC_CARD_PRESENT_25W   = 2,
-       SHPC_SLOT_EMPTY         = 3,
-};
-
-
-// slot config structure
-union SLOT_CONFIG_INFO {
-       struct {
-               u32             lu_slots_implemented    : 5;    // [ 4:0 ]Number of slots implemented
-               u32             lu_reserved1            : 3;    // [ 7:5 ]Reserved
-               u32             lu_base_FDN             : 5;    // [ 12:8 ]First Device Number
-               u32             lu_reserved2            : 3;    // [ 15:13 ]Reserved
-               u32             lu_base_PSN             : 11;   // [ 26:16 ]Physical Slot Number
-               u32             lu_reserved3            : 2;    // [ 28:27 ]Reserved
-               u32             lu_PSN_up               : 1;    // [ 29 ]PSN Up (1=TRUE, 0=FALSE)
-               u32             lu_reserved4            : 2;    // [ 31:30 ]Reserved
-       }x;
-       u32     AsDWord;
-};
-
-
-// logical slot information
-union SLOT_STATUS_INFO {
-       struct {
-               u32     lu_slot_state           : 1;    // [ 0 ]Slot state (1=Enabled, 0=Disabled)
-               u32     lu_power_fault          : 1;    // [ 1 ]Power-Fault? (1=TRUE, 0=FALSE)
-               u32     lu_card_present         : 1;    // [ 2 ]Card Present? (1=TRUE, 0=FALSE)
-               u32     lu_card_power           : 2;    // [ 4:3 ]Card Power Requirements (low/medium/high)
-               u32     lu_card_mode_freq_cap   : 3;    // [ 7:5 ]Card Speed/mode capability
-               u32     lu_mrl_implemented      : 1;    // [ 8 ]MRL Implemented? (1=TRUE, 0=FALSE)
-               u32     lu_mrl_opened           : 1;    // [ 9 ]MRL State (if implemented: 1=TRUE, 0=FALSE)
-               u32     lu_ai_state             : 2;    // [ 11:10 ]Attn Indicator State (Blink/On/Off)
-               u32     lu_pi_state             : 2;    // [ 13:12 ]Power Indicator State (Blink/On/Off)
-               u32     lu_reserved1            : 2;    // [ 14 ]Reserved
-               u32     lu_card_pci66_capable   : 1;    // [ 15 ]Card PCI66 capability (1=TRUE, 0=FALSE)
-               u32     lu_bus_mode_freq        : 3;    // [ 18:16 ]Current Bus speed/mode
-               u32     lu_max_bus_mode_freq    : 3;    // [ 21:19 ]Maximum Bus speed/mode
-               u32     lu_reserved2            : 9;    // [ 30:22 ]Reserved
-               u32     lu_request_failed       : 1;    // [ 31 ]Request Failed? (1=TRUE, 0=FALSE)
-       }x;
-       u32     AsDWord;
-};
-
-enum return_status {
-       STATUS_UNSUCCESSFUL,
-       STATUS_SUCCESS
-};
-
-//
-// Async Request
-//
-enum shpc_async_request {
-       SHPC_ASYNC_ENABLE_SLOT,
-       SHPC_ASYNC_DISABLE_SLOT,
-       SHPC_ASYNC_SURPRISE_REMOVE,
-       SHPC_ASYNC_QUIESCE_DEVNODE,
-       SHPC_ASYNC_QUIESCE_DEVNODE_QUIET,
-       SHPC_ASYNC_QUIESCE_DEVNODE_NOTIFY,
-       SHPC_ASYNC_CANCEL_QUIESCE_DEVNODE,
-       SHPC_ASYNC_LED_LOCATE,
-       SHPC_ASYNC_LED_NORMAL
-};
-
-
-//
-// Async Request
-//
-struct async_request {
-       enum shpc_async_request type;
-       wait_queue_head_t       event;
-       unsigned long           timeout;
-       void                    *request_context;
-};
-
-
-//
-// Async Completion
-//
-struct async_completion {
-       enum shpc_async_request type;
-       unsigned long                   timeout;
-       u8                              hw_initiated;
-       u8                              done;
-       enum hp_boolean                 failed;
-       void                            *request_context;
-};
-
-// ****************************************************************************
-//
-// async_callback() @ PASSIVE_LEVEL
-//
-// Parameters
-//      driver_context - Pointer provided in hp_AddDevice()
-//      slot_id - Zero-based slot number (0..n-1).
-//      Request - Async request completed.  For example: Slot Enable/Disable, AttnLED Attn/Normal.
-//      Status - Slot status at completion
-//      request_context - Pointer provided in hp_StartAsyncRequest(), NULL for
-//              completions on hardware-initiated requests.
-//
-// Return Value
-//      For QUIESCE_DEVNODE request: #DevNodes associated with a particular slot, else 0.
-//
-// ****************************************************************************
-typedef unsigned long ( *SHPC_ASYNC_CALLBACK )( void* driver_context,
-                                               u8 slot_id,
-                                               enum shpc_async_request Request,
-                                               union SLOT_STATUS_INFO Status,
-                                               void* request_context );
-
-//
-// Slot Context
-//
-struct slot_context {
-
-       spinlock_t              slot_spinlock;
-       struct semaphore        slot_event_bits_semaphore;
-       struct semaphore        cmd_acquire_mutex;
-       struct semaphore        bus_acquire_mutex;
-       u32                     *logical_slot_addr;
-       u8                      slot_number;
-       u8                      slot_psn;
-       u32                     quiesce_requests;
-       u32                     quiesce_replies;
-       u8                      slot_enabled;
-       enum shpc_speed_mode    card_speed_mode;
-       u8                      card_pci66_capable;
-       u8                      in_bus_speed_mode_contention;
-       u8                      problem_detected;
-       u8                      slot_quiesced;
-       u8                      slot_occupied;
-       struct tasklet_struct   attn_button_dpc;
-       struct tasklet_struct   mrl_sensor_dpc;
-       struct tasklet_struct   card_presence_dpc;
-       struct tasklet_struct   isolated_power_fault_dpc;
-       struct tasklet_struct   connected_power_fault_dpc;
-       wait_queue_head_t       slot_event;
-       wait_queue_head_t       led_cmd_acquire_event;
-       wait_queue_head_t       led_cmd_release_event;
-       wait_queue_head_t       cmd_acquire_event;
-       wait_queue_head_t       cmd_release_event;
-       wait_queue_head_t       bus_acquire_event;
-       wait_queue_head_t       bus_release_event;
-       u32                     slot_event_bits;
-       void                    *slot_thread;
-       void                    *attn_led_thread;
-       SLOT_STATE_FUNCTION     slot_function;
-       SLOT_STATE_FUNCTION     attn_led_function;
-       struct async_request    slot_request;
-       struct async_completion slot_completion;
-       struct async_request    attn_led_request;
-       struct async_completion attn_led_completion;
-       void                    *shpc_context;
-       struct timer_list       slot_timer1;
-       struct timer_list       slot_timer2;
-       struct timer_list       slot_timer3;
-       struct timer_list       slot_timer4;
-       struct timer_list       slot_timer5;
-       struct timer_list       slot_timer6;
-       struct timer_list       slot_timer7;
-       struct timer_list       slot_timer8;
-       struct timer_list       slot_timer9;
-       struct timer_list       slot_timer10;
-       struct timer_list       led_timer1;
-       struct timer_list       led_timer2;
-       struct timer_list       led_timer3;
-       struct timer_list       led_timer4;
-};
-
-//
-// SHPC Context
-//
-struct shpc_context {
-       spinlock_t              shpc_spinlock;
-       struct semaphore        shpc_event_bits_semaphore;
-       void                    *mmio_base_addr;
-       struct shpc_context     *next;
-       u8                      first_slot;
-       u8                      number_of_slots;
-       u8                      slots_enabled;
-       u8                      at_power_device_d0;
-       u8                      bus_released;
-       enum shpc_speed_mode    max_speed_mode;
-       enum shpc_speed_mode    bus_speed_mode;
-       struct semaphore        cmd_available_mutex;
-       struct tasklet_struct   cmd_completion_dpc;
-       struct semaphore        bus_available_mutex;
-       wait_queue_head_t       *user_event_pointer;
-       u32                     shpc_event_bits;
-       void                    *driver_context;
-       SHPC_ASYNC_CALLBACK     async_callback;
-       u32                     shpc_instance;
-       struct slot_context     slot_context[ SHPC_MAX_NUM_SLOTS ];
-       void                    *hpc_reg;               // cookie for our pci controller location
-       struct pci_ops          *pci_ops;
-       struct pci_resource     *mem_head;
-       struct pci_resource     *p_mem_head;
-       struct pci_resource     *io_head;
-       struct pci_resource     *bus_head;
-       struct pci_dev          *pci_dev;
-       u8                      interrupt;
-       u8                      bus;
-       u8                      device;
-       u8                      function;
-       u16                     vendor_id;
-       u32                     ctrl_int_comp;
-       u8                      add_support;
-};
-
-//
-// Function Prototypes
-//
-int amdshpc_get_bus_dev (struct controller  *ctrl, u8 * bus_num, u8 * dev_num, u8 slot);
-int amdshpc_process_SI (struct controller *ctrl, struct pci_func *func);
-int amdshpc_process_SS (struct controller *ctrl, struct pci_func *func);
-int amdshpc_find_available_resources (struct controller *ctrl, void *rom_start);
-int amdshpc_save_config(struct controller *ctrl, int busnumber, union SLOT_CONFIG_INFO * is_hot_plug);
-struct pci_func *amdshpc_slot_create(u8 busnumber);
-
-
-void hp_clear_shpc_event_bit(struct shpc_context * shpc_context, u32 mask);
-void hp_set_shpc_event_bit(struct shpc_context * shpc_context, u32 mask);
-
-void hp_clear_slot_event_bit(struct slot_context * slot_context, u32 mask);
-void hp_set_slot_event_bit(struct slot_context * slot_context, u32 mask);
-
-void hp_send_event_to_all_slots(struct shpc_context *shpc_context, u32 mask);
-void hp_send_slot_event(struct slot_context *slot_context, u32 mask);
-
-int hp_get_led_cmd_available_mutex_thread(void *slot_context);
-int hp_get_cmd_available_mutex_thread    (void *slot_context);
-int hp_get_bus_available_mutex_thread(void *slot_context);
-int hp_cmd_available_mutex_thread(void * slot_context);
-int hp_bus_available_mutex_thread(void * slot_context);
-int hp_led_cmd_available_mutex_thread(void * slot_context);
-
-void hp_slot_timer1_func(unsigned long data);
-void hp_slot_timer2_func(unsigned long data);
-void hp_slot_timer3_func(unsigned long data);
-void hp_slot_timer4_func(unsigned long data);
-void hp_slot_timer5_func(unsigned long data);
-void hp_slot_timer6_func(unsigned long data);
-void hp_slot_timer7_func(unsigned long data);
-void hp_slot_timer8_func(unsigned long data);
-void hp_slot_timer9_func(unsigned long data);
-void hp_slot_timer10_func(unsigned long data);
-void hp_led_timer1_func(unsigned long data);
-void hp_led_timer2_func(unsigned long data);
-void hp_led_timer3_func(unsigned long data);
-void hp_led_timer4_func(unsigned long data);
-
-irqreturn_t hp_interrupt_service(int IRQ, void *v, struct pt_regs *regs);
-
-u32 board_replaced(struct pci_func * func, struct controller  * ctrl);
-struct pci_func *amdshpc_slot_find(u8 bus, u8 device, u8 index);
-int amdshpc_save_base_addr_length(struct controller  *ctrl, struct pci_func * func);
-int amdshpc_save_used_resources (struct controller  *ctrl, struct pci_func * func);
-int amdshpc_return_board_resources(struct pci_func * func, struct resource_lists * resources);
-int amdshpc_save_slot_config (struct controller  *ctrl, struct pci_func * new_slot);
-int amdshpc_configure_device (struct controller * ctrl, struct pci_func* func);
-int amdshpc_unconfigure_device(struct pci_func* func);
-
-
-
-void
-hp_attn_button_dpc(
-                         unsigned long deferred_context
-                         );
-
-void
-hp_mrl_sensor_dpc(
-                        unsigned long deferred_context
-                        );
-
-void
-hp_card_presence_dpc(
-                           unsigned long deferred_context
-                           );
-
-void
-hp_isolated_power_fault_dpc(
-                                  unsigned long deferred_context
-                                  );
-
-void
-hp_connected_power_fault_dpc(
-                           unsigned long deferred_context
-                           );
-
-void
-hp_cmd_completion_dpc(
-                    unsigned long deferred_context
-                    );
-
-int
-hp_slot_thread(
-             void* slot_context
-             );
-
-long
-hp_at_slot_disabled_wait_for_slot_request(
-                                        struct shpc_context* shpc_context,
-                                        struct slot_context* slot_context
-                                                );
-
-long
-hp_at_slot_disabled_wait_for_led_cmd_available(
-                                             struct shpc_context* shpc_context,
-                                             struct slot_context* slot_context
-                                             );
-
-long
-hp_at_slot_disabled_wait_for_led_cmd_completion(
-                                              struct shpc_context* shpc_context,
-                                              struct slot_context* slot_context
-                                              );
-
-long
-hp_at_slot_disabled_wait_for_timeout(
-                                   struct shpc_context* shpc_context,
-                                   struct slot_context* slot_context
-                                   );
-
-long
-hp_at_slot_disabled_wait_for_power_cmd_available(
-                                               struct shpc_context* shpc_context,
-                                               struct slot_context* slot_context
-                                               );
-
-long
-hp_at_slot_disabled_wait_for_power_cmd_timeout(
-                                             struct shpc_context* shpc_context,
-                                             struct slot_context* slot_context
-                                             );
-
-long
-hp_at_slot_disabled_wait_for_power_cmd_completion(
-                                                struct shpc_context* shpc_context,
-                                                struct slot_context* slot_context
-                                                );
-
-long
-hp_at_slot_disabled_wait_for_bus_available(
-                                         struct shpc_context* shpc_context,
-                                         struct slot_context* slot_context
-                                         );
-
-long
-hp_at_slot_disabled_wait_for_bus_released(
-                                        struct shpc_context* shpc_context,
-                                        struct slot_context* slot_context
-                                        );
-
-long
-hp_at_slot_disabled_wait_for_speed_mode_cmd_available(
-                                                    struct shpc_context* shpc_context,
-                                                    struct slot_context* slot_context
-                                                    );
-
-long
-hp_at_slot_disabled_wait_for_speed_mode_cmd_completion(
-                                                     struct shpc_context* shpc_context,
-                                                     struct slot_context* slot_context
-                                                     );
-
-long
-hp_at_slot_disabled_wait_for_enable_cmd_available(
-                                                struct shpc_context* shpc_context,
-                                                struct slot_context* slot_context
-                                                );
-
-long
-hp_at_slot_disabled_wait_for_enable_cmd_completion(
-                                                 struct shpc_context* shpc_context,
-                                                 struct slot_context* slot_context
-                                                 );
-
-long
-hp_at_slot_disabled_wait_for_enable_timeout(
-                                          struct shpc_context* shpc_context,
-                                          struct slot_context* slot_context
-                                          );
-
-long
-hp_to_slot_disabled_wait_for_led_cmd_available(
-                                             struct shpc_context* shpc_context,
-                                             struct slot_context* slot_context
-                                             );
-
-long
-hp_to_slot_disabled_wait_for_led_cmd_completion(
-                                              struct shpc_context* shpc_context,
-                                              struct slot_context* slot_context
-                                              );
-
-long
-hp_to_slot_disabled_wait_for_disable_cmd_available(
-                                                 struct shpc_context* shpc_context,
-                                                 struct slot_context* slot_context
-                                                 );
-
-long
-hp_to_slot_disabled_wait_for_disable_cmd_completion(
-                                                  struct shpc_context* shpc_context,
-                                                  struct slot_context* slot_context
-                                                  );
-
-long
-hp_to_slot_disabled_wait_for_disable_timeout(
-                                           struct shpc_context* shpc_context,
-                                           struct slot_context* slot_context
-                                           );
-
-long
-hp_to_slot_disabled_wait_for_bus_available(
-                                         struct shpc_context* shpc_context,
-                                         struct slot_context* slot_context
-                                         );
-
-long
-hp_at_slot_enabled_wait_for_slot_request(
-                                       struct shpc_context* shpc_context,
-                                       struct slot_context* slot_context
-                                       );
-
-long
-hp_at_slot_enabled_wait_for_stop_on_bus_rebalance(
-                                                struct shpc_context* shpc_context,
-                                                struct slot_context* slot_context
-                                                );
-
-long
-hp_at_slot_enabled_wait_for_power_cmd_available(
-                                              struct shpc_context* shpc_context,
-                                              struct slot_context* slot_context
-                                              );
-
-long
-hp_at_slot_enabled_wait_for_power_cmd_completion(
-                                               struct shpc_context* shpc_context,
-                                               struct slot_context* slot_context
-                                               );
-
-long
-hp_at_slot_enabled_wait_for_led_cmd_available(
-                                            struct shpc_context* shpc_context,
-                                            struct slot_context* slot_context
-                                            );
-
-long
-hp_at_slot_enabled_wait_for_led_cmd_completion(
-                                             struct shpc_context* shpc_context,
-                                             struct slot_context* slot_context
-                                             );
-
-long
-hp_at_slot_enabled_wait_for_timeout(
-                                  struct shpc_context* shpc_context,
-                                  struct slot_context* slot_context
-                                  );
-
-long
-hp_at_slot_enabled_wait_for_stop_on_slot_disable(
-                                               struct shpc_context* shpc_context,
-                                               struct slot_context* slot_context
-                                               );
-
-long
-hp_at_slot_enabled_wait_for_stop_on_slot_disable_quiet(
-                                                     struct shpc_context* shpc_context,
-                                                     struct slot_context* slot_context
-                                                     );
-
-long
-hp_to_slot_enabled_wait_for_led_cmd_available(
-                                            struct shpc_context* shpc_context,
-                                            struct slot_context* slot_context
-                                            );
-
-long
-hp_to_slot_enabled_wait_for_led_cmd_completion(
-                                             struct shpc_context* shpc_context,
-                                             struct slot_context* slot_context
-                                             );
-
-void
-hp_get_slot_configuration(
-                        struct shpc_context* shpc_context
-                        );
-
-void
-hp_enable_slot_interrupts(
-                        struct slot_context* slot_context
-                        );
-
-void
-hp_disable_slot_interrupts(
-                         struct slot_context* slot_context
-                         );
-
-void
-hp_enable_global_interrupts(
-                          struct shpc_context* shpc_context
-                          );
-
-void
-hp_disable_global_interrupts(
-                           struct shpc_context* shpc_context
-                           );
-
-enum shpc_speed_mode
-hp_get_bus_speed_mode(
-                    struct shpc_context* shpc_context
-                    );
-
-enum shpc_speed_mode
-hp_get_card_speed_mode(
-                     struct slot_context* slot_context
-                     );
-
-enum mode_frequency
-hp_translate_speed_mode(
-                      enum shpc_speed_mode shpc_speed_mode
-                      );
-
-enum hp_power_requirements
-hp_translate_card_power(
-                      enum shpc_card_power ShpcCardPower
-                              );
-
-enum hp_indicators
-hp_translate_indicator(
-                     enum shpc_slot_led ShpcIndicator
-                             );
-
-u8
-hp_flag_slot_as_enabled(
-                      struct shpc_context* shpc_context,
-                      struct slot_context* slot_context
-                      );
-
-u8
-hp_flag_slot_as_disabled(
-                       struct shpc_context* shpc_context,
-                       struct slot_context* slot_context
-                       );
-
-u8
-hp_signal_enabled_slots_to_rebalance_bus(
-                                       struct shpc_context* shpc_context
-                                       );
-
-enum shpc_speed_mode
-hp_get_max_speed_mode(
-                    struct shpc_context* shpc_context,
-                    enum shpc_speed_mode From_speed_mode
-                    );
-
-void
-hp_signal_user_event(
-                   struct shpc_context* shpc_context
-                   );
-
-void
-hp_signal_user_event_at_dpc_level(
-                                struct shpc_context* shpc_context
-                                );
-
-int
-hp_attn_led_thread(
-                 void* slot_context
-                 );
-
-long
-hp_wait_for_attn_led_request(
-                           struct shpc_context* shpc_context,
-                           struct slot_context* slot_context
-                           );
-
-long
-hp_wait_for_attn_led_blink_cmd_available(
-                                       struct shpc_context* shpc_context,
-                                       struct slot_context* slot_context
-                                       );
-
-long
-hp_wait_for_attn_led_blink_cmd_completion(
-                                        struct shpc_context* shpc_context,
-                                        struct slot_context* slot_context
-                                        );
-
-long
-hp_wait_for_attn_led_blink_timeout(
-                                 struct shpc_context* shpc_context,
-                                 struct slot_context* slot_context
-                                 );
-
-long
-hp_wait_for_attn_led_normal_cmd_available(
-                                        struct shpc_context* shpc_context,
-                                        struct slot_context* slot_context
-                                        );
-
-long
-hp_wait_for_attn_led_normal_cmd_completion(
-                                         struct shpc_context* shpc_context,
-                                         struct slot_context* slot_context
-                                         );
-
-long
-hp_wait_for_attn_led_back_to_normal_cmd_available(
-                                                struct shpc_context* shpc_context,
-                                                struct slot_context* slot_context
-                                                );
-
-long
-hp_wait_for_attn_led_back_to_normal_cmd_completion(
-                                                 struct shpc_context* shpc_context,
-                                                 struct slot_context* slot_context
-                                                 );
-
-
-
-#endif  // _SHPC_H_
diff --git a/drivers/pci/hotplug/amdshpc_core.c b/drivers/pci/hotplug/amdshpc_core.c
deleted file mode 100644 (file)
index 9fe7209..0000000
+++ /dev/null
@@ -1,915 +0,0 @@
-/*
- * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (C) 2001,2003 IBM Corp.
- * Copyright (C) 2002-2003 Advanced Micro Devices
- *
- * YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS
- * AND CONDITIONS OF THE GNU GENERAL PUBLIC
- * LICENSE FOUND IN THE "GPL.TXT" FILE THAT IS
- * INCLUDED WITH THIS FILE AND POSTED AT
- * http://www.gnu.org/licenses/gpl.html
- *
- *
- * Send feedback to <greg@kroah.com> <david.keck@amd.com>
- *
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/types.h>
-#include <asm/uaccess.h>
-#include <linux/slab.h>
-#include <linux/pci.h>
-#include <linux/init.h>
-#include "amdshpc.h"
-#include "amdshpc_ddi.h"
-#include "pci_hotplug.h"
-#include "../../../arch/i386/pci/pci.h"
-
-/* Global variables */
-int amdshpc_debug;
-struct shpc_context *amdshpc_ctrl_list; // used for the shpc state machine
-struct controller *ctrl_list;            // used only for resource management
-struct pci_func *amdshpc_slot_list[256];
-
-static int num_slots;
-static void *amdshpc_rom_start;
-static unsigned long shpc_instance;
-
-#define DRIVER_VERSION "1.03"
-#define DRIVER_AUTHOR  "Dave Keck <david.keck@amd.com>"
-#define DRIVER_DESC    "AMD Standard Hot Plug Controller Driver"
-#define PCI_DEVICE_ID_AMD_GOLAM_7450   0x7450
-
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE("GPL");
-//MODULE_PARM(debug, "i");
-//MODULE_PARM_DESC(debug, "Debugging mode enabled or not");
-
-static int enable_slot         (struct hotplug_slot *slot);
-static int disable_slot                (struct hotplug_slot *slot);
-static int set_attention_status (struct hotplug_slot *slot, u8 value);
-static int hardware_test       (struct hotplug_slot *slot, u32 value);
-static int get_power_status    (struct hotplug_slot *slot, u8 *value);
-static int get_attention_status        (struct hotplug_slot *slot, u8 *value);
-static int get_latch_status    (struct hotplug_slot *slot, u8 *value);
-static int get_adapter_status  (struct hotplug_slot *slot, u8 *value);
-
-// values to be returned to the PCI Hotplug Core
-#define CORE_SLOT_DISABLED             0
-#define CORE_SLOT_ENABLED              1
-
-#define        CORE_INDICATOR_OFF              0
-#define        CORE_INDICATOR_ON               1
-#define        CORE_INDICATOR_BLINK            2
-
-#define CORE_LATCH_CLOSED              1
-#define CORE_LATCH_OPENED              0
-
-static int init_slots (        struct controller *ctrl, int num_slots );
-static void translate_slot_info (struct hotplug_slot_info *info,
-                                                                union SLOT_STATUS_INFO *query);
-
-static struct hotplug_slot_ops skel_hotplug_slot_ops = {
-       .owner =                THIS_MODULE,
-       .enable_slot =          enable_slot,
-       .disable_slot =         disable_slot,
-       .set_attention_status = set_attention_status,
-       .hardware_test =        hardware_test,
-       .get_power_status =     get_power_status,
-       .get_attention_status = get_attention_status,
-       .get_latch_status =     get_latch_status,
-       .get_adapter_status =   get_adapter_status,
-};
-
-/* Inline functions to check the sanity of a pointer that is passed to us */
-static inline int slot_paranoia_check (struct slot *slot, const char *function)
-{
-       if (!slot) {
-               dbg("-->%s - slot == NULL", function);
-               return -1;
-       }
-       if (slot->magic != SLOT_MAGIC) {
-               dbg("-->%s - bad magic number for slot", function);
-               return -1;
-       }
-       if (!slot->hotplug_slot) {
-               dbg("-->%s - slot->hotplug_slot == NULL!", function);
-               return -1;
-       }
-       return 0;
-}
-
-static inline struct slot *get_slot (struct hotplug_slot *hotplug_slot, const char *function)
-{
-       struct slot *slot;
-
-       if (!hotplug_slot) {
-               dbg("-->%s - hotplug_slot == NULL\n", function);
-               return NULL;
-       }
-
-       slot = (struct slot *)hotplug_slot->private;
-       if (slot_paranoia_check (slot, function))
-                               return NULL;
-       return slot;
-}
-
-static int enable_slot (struct hotplug_slot *hotplug_slot)
-{
-       struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
-       struct shpc_context *shpc_context;
-       union SLOT_STATUS_INFO query;
-       long status;
-       int retval = 0;
-
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       dbg ("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
-
-       /*
-        *  enable the specified slot
-        */
-       shpc_context = ( struct shpc_context * )slot->private;
-       status = hp_StartAsyncRequest(shpc_context, slot->number,
-               SHPC_ASYNC_ENABLE_SLOT, 0, slot );
-
-       //
-       // pretend async request was completed (we're not queuing slot requests)
-       //
-       hp_QuerySlotStatus( shpc_context, slot->number, &query );
-       if( status == STATUS_SUCCESS ) {
-               query.x.lu_slot_state = SLOT_ENABLE;
-               query.x.lu_pi_state = INDICATOR_BLINK;
-               if( query.x.lu_card_present &&
-                       ( query.x.lu_mrl_implemented == HP_FALSE ||
-                       query.x.lu_mrl_opened == HP_FALSE ) &&
-                       query.x.lu_power_fault == HP_FALSE ) {
-                               query.x.lu_request_failed = HP_FALSE;
-               }
-               else {
-                       query.x.lu_request_failed = HP_TRUE;
-               }
-       }
-       else {
-               query.x.lu_request_failed = HP_TRUE;
-       }
-
-       //
-       // translate the slot info to PCI HOTPLUG CORE values
-       //
-       translate_slot_info (hotplug_slot->info, &query);
-
-       retval = ( query.x.lu_request_failed == HP_TRUE ) ? 0 : -1;
-       return retval;
-}
-
-
-static int disable_slot (struct hotplug_slot *hotplug_slot)
-{
-       struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
-       struct shpc_context *shpc_context;
-       union SLOT_STATUS_INFO query;
-       long status;
-       int retval = 0;
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       dbg ("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
-
-       /*
-        *  disable the specified slot
-        */
-       shpc_context = ( struct shpc_context * )slot->private;
-       status = hp_StartAsyncRequest(shpc_context, slot->number,
-               SHPC_ASYNC_DISABLE_SLOT, 0, slot );
-
-       //
-       // pretend async request was completed (we're not queuing slot requests)
-       //
-       hp_QuerySlotStatus( shpc_context, slot->number, &query );
-       if( status == STATUS_SUCCESS ) {
-               query.x.lu_slot_state = SLOT_DISABLE;
-               query.x.lu_pi_state = INDICATOR_BLINK;
-               query.x.lu_request_failed = HP_FALSE;
-       }
-       else {
-               query.x.lu_request_failed = HP_TRUE;
-       }
-
-       //
-       // translate the slot info to CORE values
-       //
-       translate_slot_info (hotplug_slot->info, &query);
-
-       retval = ( query.x.lu_request_failed == HP_TRUE ) ? 0 : -1;
-       return retval;
-}
-
-static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 status)
-{
-       struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
-       struct shpc_context *shpc_context;
-       int retval = 0;
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       dbg (" %s - physical_slot = %s  state = %d",__FUNCTION__, hotplug_slot->name, status);
-
-       /*
-        *  turn light on/off
-        */
-       shpc_context = (struct shpc_context *)slot->private;
-
-       status = hp_StartAsyncRequest(shpc_context, slot->number,
-               ((status == CORE_INDICATOR_OFF) ? SHPC_ASYNC_LED_NORMAL : SHPC_ASYNC_LED_LOCATE), 10, slot);
-       hotplug_slot->info->attention_status  = status;
-
-       return retval;
-}
-
-static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value)
-{
-       struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
-       struct shpc_context *shpc_context;
-       union SLOT_STATUS_INFO query;
-       int retval = 0;
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       dbg("%s - physical_slot = %s\n",__FUNCTION__, hotplug_slot->name);
-
-       /*
-        * get the current power status of the specific
-        * slot and store it in the *value location.
-        */
-       shpc_context = (struct shpc_context *)slot->private;
-       hp_QuerySlotStatus(shpc_context, slot->number, &query);
-       translate_slot_info (hotplug_slot->info, &query);
-       *value = hotplug_slot->info->power_status;
-
-       return retval;
-}
-
-static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 *value)
-{
-       struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
-       struct shpc_context *shpc_context;
-       union SLOT_STATUS_INFO query;
-       int retval = 0;
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       dbg("%s - physical_slot = %s\n",__FUNCTION__, hotplug_slot->name);
-
-       /*
-        * get the current attention status of the specific
-        * slot and store it in the *value location.
-        */
-       shpc_context = (struct shpc_context *)slot->private;
-       hp_QuerySlotStatus(shpc_context, slot->number, &query);
-       translate_slot_info (hotplug_slot->info, &query);
-       *value = hotplug_slot->info->attention_status;
-
-       return retval;
-}
-
-static int get_latch_status (struct hotplug_slot *hotplug_slot, u8 *value)
-{
-       struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
-       struct shpc_context *shpc_context;
-       union SLOT_STATUS_INFO query;
-       int retval = 0;
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       dbg("%s - physical_slot = %s\n",__FUNCTION__, hotplug_slot->name);
-
-       /*
-        * get the current latch status of the specific
-        * slot and store it in the *value location.
-        */
-       shpc_context = (struct shpc_context *)slot->private;
-       hp_QuerySlotStatus(shpc_context, slot->number, &query);
-       translate_slot_info (hotplug_slot->info, &query);
-       *value = hotplug_slot->info->latch_status;
-
-       return retval;
-}
-
-static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value)
-{
-       struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
-       struct shpc_context *shpc_context;
-       union SLOT_STATUS_INFO query;
-       int retval = 0;
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       dbg("%s - physical_slot = %s\n",__FUNCTION__, hotplug_slot->name);
-
-       /*
-        * get the current adapter status of the specific
-        * slot and store it in the *value location.
-        */
-       shpc_context = (struct shpc_context *)slot->private;
-       hp_QuerySlotStatus(shpc_context, slot->number, &query);
-       translate_slot_info (hotplug_slot->info, &query);
-       *value = hotplug_slot->info->adapter_status;
-
-       return retval;
-}
-
-static void translate_slot_info (struct hotplug_slot_info *info,
-                                union SLOT_STATUS_INFO *query)
-{
-       // power indicator
-       if( query->x.lu_pi_state == INDICATOR_OFF ) {
-               info->power_status = CORE_INDICATOR_OFF;
-       }
-       else if( query->x.lu_pi_state == INDICATOR_ON ) {
-               info->power_status = CORE_INDICATOR_ON;
-       }
-       else {
-               info->power_status = CORE_INDICATOR_BLINK;
-       }
-
-       // attention indicator
-       if( query->x.lu_ai_state == INDICATOR_OFF ) {
-               info->attention_status = CORE_INDICATOR_OFF;
-       }
-       else if( query->x.lu_ai_state == INDICATOR_ON ) {
-               info->attention_status = CORE_INDICATOR_ON;
-       }
-       else {
-               info->attention_status = CORE_INDICATOR_BLINK;
-       }
-
-       // retention latch
-       if( query->x.lu_mrl_implemented == HP_TRUE &&
-               query->x.lu_mrl_opened == HP_TRUE ) {
-               info->latch_status = CORE_LATCH_OPENED;
-       }
-       else {
-               info->latch_status = CORE_LATCH_CLOSED;
-       }
-
-       // adapter status
-       if( query->x.lu_slot_state == SLOT_ENABLE ) {
-               info->adapter_status = CORE_SLOT_ENABLED;
-       }
-       else {
-               info->adapter_status = CORE_SLOT_DISABLED;
-       }
-}
-
-static int hardware_test (struct hotplug_slot *hotplug_slot, u32 value)
-{
-       struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
-       int retval = 0;
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       dbg ("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
-
-       err ("No hardware tests are defined for this driver");
-       retval = -ENODEV;
-
-       /* Or you can specify a test if you want to */
-       /* AMD driver does not have a test */
-       return retval;
-}
-
-#define SLOT_NAME_SIZE 10
-static void make_slot_name (struct slot *slot)
-{
-       unsigned long slot_psn;
-       struct shpc_context *shpc_context;
-
-       shpc_context = ( struct shpc_context * )slot->private;
-
-       //
-       // Get physical slot number
-       //
-       hp_Queryslot_psn(shpc_context, slot->number, &slot_psn);
-
-       snprintf (slot->hotplug_slot->name, SLOT_NAME_SIZE, "%d", (char)slot_psn);
-}
-
-static void release_slot(struct hotplug_slot *hotplug_slot)
-{
-       struct slot *slot = get_slot (hotplug_slot, __FUNCTION__);
-
-       if (slot == NULL)
-               return;
-
-       dbg ("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
-
-       kfree(slot->hotplug_slot->info);
-       kfree(slot->hotplug_slot->name);
-       kfree(slot->hotplug_slot);
-       kfree(slot);
-}
-
-static int init_slots (struct controller *ctrl, int num_slots)
-{
-       struct slot *slot;
-       struct hotplug_slot *hotplug_slot;
-       struct hotplug_slot_info *info;
-       char *name;
-       int retval = 0;
-       int i;
-       u8 value;
-
-       /*
-        * Create a structure for each slot, and register that slot
-        * with the pci_hotplug subsystem.
-        */
-       for (i = 0; i < num_slots; ++i) {
-               slot = kmalloc (sizeof (struct slot), GFP_KERNEL);
-               if (!slot)
-                       return -ENOMEM;
-               memset(slot, 0, sizeof(struct slot));
-
-               hotplug_slot = kmalloc (sizeof (struct hotplug_slot), GFP_KERNEL);
-               if (!hotplug_slot) {
-                       kfree (slot);
-                       return -ENOMEM;
-               }
-               memset(hotplug_slot, 0, sizeof (struct hotplug_slot));
-               slot->hotplug_slot = hotplug_slot;
-
-               info = kmalloc (sizeof (struct hotplug_slot_info), GFP_KERNEL);
-               if (!info) {
-                       kfree (hotplug_slot);
-                       kfree (slot);
-                       return -ENOMEM;
-               }
-               memset(info, 0, sizeof (struct hotplug_slot_info));
-               hotplug_slot->info = info;
-
-               name = kmalloc (SLOT_NAME_SIZE, GFP_KERNEL);
-               if (!name) {
-                       kfree (info);
-                       kfree (hotplug_slot);
-                       kfree (slot);
-                       return -ENOMEM;
-               }
-               hotplug_slot->name = name;
-
-               slot->magic = SLOT_MAGIC;
-               slot->number = i;
-               slot->private = (void*) ctrl->shpc_context;
-
-               hotplug_slot->private = slot;
-               hotplug_slot->release = &release_slot;
-               make_slot_name (slot);
-               hotplug_slot->ops = &skel_hotplug_slot_ops;
-
-               /*
-                * Initilize the slot info structure with some known
-                * good values.
-                */
-               get_power_status(hotplug_slot, &value);
-               info->power_status = value;
-               get_attention_status(hotplug_slot, &value);
-               info->attention_status = value;
-               get_latch_status(hotplug_slot, &value);
-               info->latch_status = value;
-               get_adapter_status(hotplug_slot, &value);
-               info->adapter_status = value;
-
-               dbg ("registering slot %d\n", i);
-               retval = pci_hp_register (slot->hotplug_slot);
-               if (retval) {
-                       err ("pci_hp_register failed with error %d\n", retval);
-                       kfree (info);
-                       kfree (name);
-                       kfree (hotplug_slot);
-                       kfree (slot);
-                       return retval;
-               }
-
-               /* add slot to our internal list */
-               list_add (&slot->slot_list, &slot_list);
-       }
-
-       return retval;
-}
-
-static int amdshpc_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
-{
-       int retval;
-       int loop;
-       u16 vendor_id;
-       u16 device_id;
-       u32 rc;
-       long status = STATUS_SUCCESS;
-       struct controller *ctrl;
-       struct shpc_context *shpc_context;
-       union SLOT_CONFIG_INFO slot_config;
-
-       rc = pci_read_config_word(pdev, PCI_VENDOR_ID, &vendor_id);
-       dbg( "%s-->Vendor ID: %x\n",__FUNCTION__, vendor_id);
-       if (rc || (vendor_id != PCI_VENDOR_ID_AMD)) {
-               err(msg_HPC_non_amd);
-               return -ENODEV;
-       }
-
-       rc = pci_read_config_word(pdev, PCI_DEVICE_ID, &device_id);
-       dbg( "%s-->Device ID: %x\n",__FUNCTION__, device_id);
-       if (rc || (device_id != PCI_DEVICE_ID_AMD_GOLAM_7450)) {
-               err(msg_HPC_not_amd_hp);
-               return -ENODEV;
-       }
-
-       if (vendor_id == PCI_VENDOR_ID_AMD) {
-
-               shpc_context = (struct shpc_context *)kmalloc(sizeof(struct shpc_context), GFP_KERNEL);
-               if (!shpc_context) {
-                       err("%s : out of memory\n",__FUNCTION__);
-                       return -ENOMEM;
-               }
-               memset(shpc_context, 0, sizeof(struct shpc_context));
-
-               ctrl = (struct controller *)kmalloc(sizeof(struct controller), GFP_KERNEL);
-               if (!ctrl) {
-                       err("%s : out of memory\n", __FUNCTION__);
-                       rc =  -ENOMEM;
-                       goto err_free_shpc_context;
-               }
-               memset(ctrl, 0, sizeof(struct controller));
-
-               /* Set Vendor ID, so it can be accessed later from other functions */
-               ctrl->vendor_id = vendor_id;
-
-       } else {
-               err(msg_HPC_not_supported);
-               return -ENODEV;
-       }
-
-       ctrl->shpc_context = shpc_context;
-       ctrl->pci_dev = pdev;
-       ctrl->interrupt = pdev->irq;
-       ctrl->device = PCI_SLOT(pdev->devfn);
-       ctrl->function = PCI_FUNC(pdev->devfn);
-
-       //
-       // the AMD hotplug bus is behind a bridge
-       //
-//     ctrl->pci_ops = pdev->subordinate->ops;
-       ctrl->pci_bus = pdev->subordinate;
-       ctrl->bus = pdev->subordinate->number;
-
-       dbg( "%s-->bus = %d   device = %d   function = %d\n",__FUNCTION__, ctrl->bus, ctrl->device, ctrl->function);
-
-       info("Found PCI hot plug controller on bus %d\n", pdev->bus->number);
-       info("Checking if MMIO region available for this HP controller...\n");
-                   
-       //
-       // Get memory mapped I/O region
-       //
-       dbg( "%s-->pdev = %p\n",__FUNCTION__, pdev);
-       dbg("%s -->pci resource start %lx\n",__FUNCTION__, pci_resource_start(pdev, 0));
-       dbg("%s -->pci resource len   %lx\n",__FUNCTION__, pci_resource_len  (pdev, 0));
-       if (!request_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0), MY_NAME)) {
-               err("MMIO region not available, skipping\n");
-               rc = -ENOMEM;
-               goto err_free_ctrl;
-       }
-
-       //
-       // Get linear address to put in controller structure
-       //
-       shpc_context->mmio_base_addr = ioremap(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0));
-       if (!shpc_context->mmio_base_addr) {
-               err("cannot remap MMIO region %lx @ %lx\n", pci_resource_len(pdev, 0), pci_resource_start(pdev, 0));
-               rc = -ENODEV;
-               goto err_free_mem_region;
-       }
-
-       dbg("%s -->shpc_context->mmio_base_addr = %p",__FUNCTION__, (unsigned long*)shpc_context->mmio_base_addr);
-
-       hp_AddDevice(shpc_context, ctrl, shpc_context->async_callback, shpc_instance++);
-
-       // Initialize controller
-       shpc_context->interrupt = pdev->irq;
-       dbg("%s -->shpc_context->interrupt = %d", __FUNCTION__,pdev->irq);
-       if (!hp_StartDevice(shpc_context)){
-               rc = -ENODEV;
-               goto err_iounmap;
-       }
-
-       //
-       // initialize this array only once
-       //
-       if (shpc_context->shpc_instance == 0 ) {
-               dbg("%s  Initialize slot lists\n",__FUNCTION__);
-               for (loop = 0; loop < 256; loop++) {
-                       amdshpc_slot_list[loop] = NULL;
-               }
-       }
-
-       if (!amdshpc_ctrl_list) {
-               amdshpc_ctrl_list = shpc_context;
-               shpc_context->next = NULL;
-       } else {
-               amdshpc_ctrl_list->next = shpc_context;
-               shpc_context->next = NULL;
-       }
-
-       if (!ctrl_list) {
-               ctrl_list = ctrl;
-               ctrl->next = NULL;
-       } else {
-               ctrl_list->next = ctrl;
-               ctrl->next = NULL;
-       }
-
-       // Map rom address so we can get the HPRT table
-       amdshpc_rom_start = ioremap(ROM_PHY_ADDR, ROM_PHY_LEN);
-       if (!amdshpc_rom_start) {
-               err ("Could not ioremap memory region for ROM\n");
-               retval = -EIO;;
-               iounmap(amdshpc_rom_start);
-               return retval;
-       }
-
-       //**************************************************
-       //
-       //      Save configuration headers for this and
-       //      subordinate PCI buses
-       //
-       //**************************************************
-
-       // find the physical slot number of the first hot plug slot
-       status = hp_QuerySlots(shpc_context, &slot_config);
-       // first slot on a bridged bus is always #1
-       ctrl->first_slot = 1;
-       dbg("%s  hp_QuerySlots: first_slot = %d, FDN = %d PSN_UP = %d\n",__FUNCTION__,
-                                               ctrl->first_slot, slot_config.x.lu_base_FDN, slot_config.x.lu_PSN_up);
-
-       if (rc) {
-               err(msg_initialization_err, rc);
-               goto err_iounmap;
-       }
-
-       if (!status) {
-               err(msg_initialization_err, (int)status);
-               goto err_iounmap;
-       }
-
-       // Store PCI Config Space for all devices on this bus
-       rc = amdshpc_save_config(ctrl, ctrl->bus, &slot_config);
-       if (rc) {
-               err("%s: unable to save PCI configuration data, error %d",__FUNCTION__, rc);
-               goto err_iounmap;
-       }
-
-       //
-       // Get IO, memory, and IRQ resources for new PCI devices
-       //
-       rc = amdshpc_find_available_resources(ctrl, amdshpc_rom_start);
-       if (rc) {
-               dbg("%s -->amdshpc_find_available_resources = 0x%x\n",__FUNCTION__, rc);
-               err("unable to locate PCI configuration resources for hot plug.\n");
-               goto err_iounmap;
-       }
-       
-       //
-       // set global variable num_slots
-       //
-       num_slots = shpc_context->number_of_slots;
-
-       dbg("%s   about to call init_slots()",__FUNCTION__);
-       rc = init_slots(ctrl, num_slots);
-       if (rc){
-               goto err_iounmap;
-       }
-
-       return 0;
-
-err_iounmap:
-       iounmap((void *)shpc_context->mmio_base_addr);
-err_free_mem_region:
-       release_mem_region(pci_resource_start(pdev, 0), pci_resource_len(pdev, 0));
-err_free_shpc_context:
-       kfree(shpc_context);
-err_free_ctrl:
-       kfree(ctrl);
-       return rc;
-}
-
-static void cleanup_slots (void)
-{
-       struct list_head *tmp;
-       struct list_head *next;
-       struct slot *slot;
-
-       /*
-        * Unregister all of our slots with the pci_hotplug subsystem.
-        * The memory will be freed in the release_slot() callback.
-        */
-       list_for_each_safe(tmp, next, &slot_list) {
-               slot = list_entry(tmp, struct slot, slot_list);
-               list_del(&slot->slot_list);
-               pci_hp_deregister(slot->hotplug_slot);
-       }
-
-       return;
-}
-static void unload_amdshpc(void)
-{
-       struct pci_func *next;
-       struct pci_func *TempSlot;
-       int loop;
-       struct shpc_context *shpc_context;
-       struct shpc_context *tshpc_context;
-       struct controller *ctrl;
-       struct controller *tctrl;
-       struct pci_resource *res;
-       struct pci_resource *tres;
-
-       ctrl = ctrl_list;
-
-       while (ctrl) {
-               //reclaim PCI mem
-               release_mem_region(pci_resource_start(ctrl->pci_dev, 0),
-                                  pci_resource_len(ctrl->pci_dev, 0));
-
-               res = ctrl->io_head;
-               while (res) {
-                       tres = res;
-                       res = res->next;
-                       kfree(tres);
-               }
-
-               res = ctrl->mem_head;
-               while (res) {
-                       tres = res;
-                       res = res->next;
-                       kfree(tres);
-               }
-
-               res = ctrl->p_mem_head;
-               while (res) {
-                       tres = res;
-                       res = res->next;
-                       kfree(tres);
-               }
-
-               res = ctrl->bus_head;
-               while (res) {
-                       tres = res;
-                       res = res->next;
-                       kfree(tres);
-               }
-
-               tctrl = ctrl;
-               ctrl = ctrl->next;
-               kfree(tctrl);
-       }
-
-       for (loop = 0; loop < 256; loop++) {
-               next = amdshpc_slot_list[loop];
-               while (next != NULL) {
-                       res = next->io_head;
-                       while (res) {
-                               tres = res;
-                               res = res->next;
-                               kfree(tres);
-                       }
-
-                       res = next->mem_head;
-                       while (res) {
-                               tres = res;
-                               res = res->next;
-                               kfree(tres);
-                       }
-
-                       res = next->p_mem_head;
-                       while (res) {
-                               tres = res;
-                               res = res->next;
-                               kfree(tres);
-                       }
-
-                       res = next->bus_head;
-                       while (res) {
-                               tres = res;
-                               res = res->next;
-                               kfree(tres);
-                       }
-
-                       TempSlot = next;
-                       next = next->next;
-                       kfree(TempSlot);
-               }
-       }
-
-       shpc_context = amdshpc_ctrl_list;
-
-       while(shpc_context){
-
-               dbg("%s -->shpc_context = %p",__FUNCTION__ , shpc_context);
-               dbg("%s -->kill_amdshpc() instance = %d", __FUNCTION__ ,shpc_context->shpc_instance);
-               hp_StopDevice(shpc_context);
-
-               //Free IRQ associated with hot plug device
-               free_irq(shpc_context->interrupt, shpc_context);
-
-               //Unmap the memory
-               iounmap(shpc_context->mmio_base_addr);
-
-               // free the controller memory
-               tshpc_context = shpc_context;
-               shpc_context = shpc_context->next;
-               kfree(tshpc_context);
-       }
-
-       //unmap the rom address
-       if (amdshpc_rom_start)
-               iounmap(amdshpc_rom_start);
-}
-
-
-static struct pci_device_id hpcd_pci_tbl[] = {
-       {
-       /* handle AMD Standard Hotplug controller */
-
-//    class:          ((PCI_CLASS_SYSTEM_PCI_HOTPLUG << 8) | 0x00),
-       class:   ((PCI_CLASS_BRIDGE_PCI << 8) | 0x00),
-       class_mask:     ~0,
-
-       /* AMD makes it */
-       vendor:         PCI_VENDOR_ID_AMD,
-       device:         PCI_DEVICE_ID_AMD_GOLAM_7450,
-       subvendor:      PCI_ANY_ID,
-       subdevice:      PCI_ANY_ID,
-
-       }, { /* end: all zeroes */ }
-};
-
-MODULE_DEVICE_TABLE(pci, hpcd_pci_tbl);
-
-
-
-static struct pci_driver amdshpc_driver = {
-       name:           "pci_hotplug",
-       id_table:       hpcd_pci_tbl,
-       probe:          amdshpc_probe,
-       /* remove:      amdshpc_remove_one, */
-};
-
-
-static int __init amdshpc_init(void)
-{
-       int result;
-
-       amdshpc_debug = debug;
-       /*
-        * Do specific initialization stuff for your driver here
-        * Like initilizing your controller hardware (if any) and
-        * determining the number of slots you have in the system
-        * right now.
-        */
-
-       result = pci_module_init(&amdshpc_driver);
-       dbg("%s -->pci_module_init = %d\n",__FUNCTION__ , result);
-       if (result)
-               return result;
-
-
-       info (DRIVER_DESC " version: " DRIVER_VERSION "\n");
-       return 0;
-}
-
-static void __exit amdshpc_exit(void)
-{
-       //
-       // Clean everything up.
-       //
-       dbg("%s -->unload_amdshpc()\n",__FUNCTION__ );
-       unload_amdshpc();
-
-       cleanup_slots();
-
-       dbg("%s -->pci_unregister_driver\n",__FUNCTION__ );
-       pci_unregister_driver(&amdshpc_driver);
-
-}
-
-module_init(amdshpc_init);
-module_exit(amdshpc_exit);
diff --git a/drivers/pci/hotplug/amdshpc_ctrl.c b/drivers/pci/hotplug/amdshpc_ctrl.c
deleted file mode 100644 (file)
index 52aed3b..0000000
+++ /dev/null
@@ -1,969 +0,0 @@
-/*
- * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (C) 2001,2003 IBM Corp.
- * Copyright (C) 2002-2003 Advanced Micro Devices
- *
- * YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS
- * AND CONDITIONS OF THE GNU GENERAL PUBLIC
- * LICENSE FOUND IN THE "GPL.TXT" FILE THAT IS
- * INCLUDED WITH THIS FILE AND POSTED AT
- * http://www.gnu.org/licenses/gpl.html
- *
- *
- * Send feedback to <david.keck@amd.com>
- *
- */
-
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/smp_lock.h>
-#include "amdshpc_ddi.h"
-#include "amdshpc.h"
-
-
-// ****************************************************************************
-//
-// hp_slot_thread() @ PASSIVE_LEVEL
-//
-// ****************************************************************************
-int hp_slot_thread(void* ptr)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       struct shpc_context* shpc_context;
-       struct slot_context* slot_context;
-       union SLOT_STATUS_INFO slot_status;
-       
-       lock_kernel ();
-       daemonize ("amdshpc_slot");
-       unlock_kernel ();
-
-       slot_context = (struct slot_context*) ptr;
-       shpc_context = (struct shpc_context*) slot_context->shpc_context;
-
-       //
-       // Insertion/Removal State Machine (loops until requested to exit)
-       //
-       do {
-               status = slot_context->slot_function( shpc_context, slot_context );
-               //
-               // Suspend?
-               //
-               if(!status) {
-                       spin_lock_irqsave(&shpc_context->shpc_spinlock, old_irq_flags);
-                       if(shpc_context->shpc_event_bits & SUSPEND_EVENT ) {
-                               status = STATUS_SUCCESS;
-                       }
-                       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-                       if(status) {
-                               dbg( "%s-->SUSPEND: slot_id[ %d:%d ]",__FUNCTION__,
-                                       (int)shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-                               do {
-                                       interruptible_sleep_on(&slot_context->slot_event);
-                               }while(!((shpc_context->shpc_event_bits & RESUME_EVENT) ||
-                                       (shpc_context->shpc_event_bits & REMOVE_EVENT)));
-
-                               if(shpc_context->shpc_event_bits & REMOVE_EVENT ) {
-                                       status = STATUS_UNSUCCESSFUL;
-                               }
-                               else {
-                                       dbg("%s-->RESUME: slot_id[ %d:%d ]",__FUNCTION__,
-                                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                               }
-                       }
-               }
-       } while(status);
-
-       //
-       // We're exiting, most likely due to an exit_request_event.  So, let's cleanup!
-       //
-       dbg("%s-->Slot Thread Termination: slot_id[ %d:%d ]",__FUNCTION__,
-               shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Pending SW-initiated slot request?
-       //
-       if(slot_context->slot_event_bits & SLOT_REQUEST_EVENT ) {
-               //
-               // Complete it with failure code
-               //
-               hp_QuerySlotStatus(     shpc_context, slot_context->slot_number - 1, &slot_status );
-               slot_status.x.lu_request_failed = HP_TRUE;
-               shpc_context->async_callback(
-                       shpc_context->driver_context,
-                       slot_context->slot_number - 1,
-                       slot_context->slot_request.type,
-                       slot_status,
-                       slot_context->slot_request.request_context );
-
-               //
-               // Signal registered user EVENT
-               //
-               hp_signal_user_event( shpc_context );
-       }
-       return(status);
-}
-
-
-// ****************************************************************************
-//
-// hp_attn_led_thread() @ PASSIVE_LEVEL
-//
-// ****************************************************************************
-int
-hp_attn_led_thread(
-       void* ptr
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       struct shpc_context* shpc_context;
-       struct slot_context* slot_context;
-       union SLOT_STATUS_INFO slot_status;
-       
-       lock_kernel ();
-       daemonize ("amdshpc_led");
-       unlock_kernel ();
-
-       slot_context = (struct slot_context*) ptr;
-       shpc_context = (struct shpc_context*) slot_context->shpc_context;
-
-       //
-       // Attention LED State Machine (loops until requested to exit)
-       //
-       do {
-               status = slot_context->attn_led_function(shpc_context, slot_context);
-               //
-               // Suspend?
-               //
-               if(!status) {
-                       spin_lock_irqsave(&shpc_context->shpc_spinlock, old_irq_flags);
-                       if(shpc_context->shpc_event_bits & SUSPEND_EVENT ) {
-                               status = STATUS_SUCCESS;
-                       }
-                       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-                       if(status) {
-                               dbg("%s-->SUSPEND: slot_id[ %d:%d ]",__FUNCTION__,
-                                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-                               do {
-                                       interruptible_sleep_on(&slot_context->slot_event);
-                               }while(!((shpc_context->shpc_event_bits & RESUME_EVENT) ||
-                                       (shpc_context->shpc_event_bits & REMOVE_EVENT)));
-
-                               if(shpc_context->shpc_event_bits & REMOVE_EVENT ) {
-                                       status = STATUS_UNSUCCESSFUL;
-                               }
-                               else {
-                                       dbg("%s-->RESUME: slot_id[ %d:%d ]",__FUNCTION__,
-                                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                               }
-                       }
-               }
-       } while(status);
-
-       //
-       // We're exiting, most likely due to an exit_request_event.  So, let's cleanup!
-       //
-       dbg("%s-->LED Thread Termination: slot_id[ %d:%d ]",__FUNCTION__,
-               shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Pending SW-initiated AttnLED request?
-       //
-       if(slot_context->slot_event_bits & ATTN_LED_REQUEST_EVENT ) {
-               //
-               // Complete it with failure code
-               //
-               hp_QuerySlotStatus(     shpc_context, slot_context->slot_number - 1, &slot_status );
-               slot_status.x.lu_request_failed = HP_TRUE;
-               shpc_context->async_callback(
-                       shpc_context->driver_context,
-                       slot_context->slot_number - 1,
-                       slot_context->attn_led_request.type,
-                       slot_status,
-                       slot_context->attn_led_request.request_context );
-
-               //
-               // Signal registered user EVENT
-               //
-               hp_signal_user_event( shpc_context );
-       }
-       return(status);
-}
-
-
-// ****************************************************************************
-//
-// hp_get_slot_configuration() @ Any IRQL
-//
-// ****************************************************************************
-void
-hp_get_slot_configuration(
-       struct shpc_context* shpc_context
-)
-{
-       struct slot_context* slot_context;
-       union SHPC_SLOTS_AVAILABLE1_DWREG SlotAvail1Reg;
-       union SHPC_SLOTS_AVAILABLE2_DWREG SlotAvail2Reg;
-       union SHPC_SLOT_CONFIG_DWREG SlotConfigReg;
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-       enum shpc_speed_mode max_speed_mode;
-       u8 i;
-
-       //
-       // Get max number of slots available
-       //
-       SlotAvail1Reg.AsDWord = readl(shpc_context->mmio_base_addr + SHPC_SLOTS_AVAILABLE1_REG_OFFSET);
-       SlotAvail2Reg.AsDWord = readl(shpc_context->mmio_base_addr + SHPC_SLOTS_AVAILABLE2_REG_OFFSET);
-       //
-       // Get slot configuration
-       //
-       SlotConfigReg.AsDWord = readl(shpc_context->mmio_base_addr + SHPC_SLOT_CONFIG_REG_OFFSET);
-
-       //
-       // Get number of available slots per speed/mode
-       //
-       shpc_context->slots_enabled = 0;
-       shpc_context->number_of_slots = 0;
-       if( SlotAvail1Reg.x.N_133PCIX ) {
-               shpc_context->number_of_slots = ( u8 )SlotAvail1Reg.x.N_133PCIX;
-               shpc_context->max_speed_mode = SHPC_BUS_PCIX_133;
-       }
-       else if( SlotAvail1Reg.x.N_100PCIX ) {
-               shpc_context->number_of_slots = ( u8 )SlotAvail1Reg.x.N_100PCIX;
-               shpc_context->max_speed_mode = SHPC_BUS_PCIX_100;
-       }
-       else if( SlotAvail1Reg.x.N_66PCIX ) {
-               shpc_context->number_of_slots = ( u8 )SlotAvail1Reg.x.N_66PCIX;
-               shpc_context->max_speed_mode = SHPC_BUS_PCIX_66;
-       }
-       else if( SlotAvail2Reg.x.N_66CONV ) {
-               shpc_context->number_of_slots = ( u8 )SlotAvail2Reg.x.N_66CONV;
-               shpc_context->max_speed_mode = SHPC_BUS_CONV_66;
-       }
-       else if( SlotAvail1Reg.x.N_33CONV ) {
-               shpc_context->number_of_slots = ( u8 )SlotAvail1Reg.x.N_33CONV;
-               shpc_context->max_speed_mode = SHPC_BUS_CONV_33;
-       }
-
-       if( shpc_context->number_of_slots ) {
-               //
-               // Be sure NSI field is not exceeded (this should not happen!)
-               //
-               if( shpc_context->number_of_slots > SlotConfigReg.x.NSI ) {
-                       shpc_context->number_of_slots = ( u8 )SlotConfigReg.x.NSI;
-               }
-
-               //
-               // Limit slot count to what we're prepared to support
-               //
-               if( shpc_context->number_of_slots > SHPC_MAX_NUM_SLOTS ) {
-                       shpc_context->number_of_slots = SHPC_MAX_NUM_SLOTS;
-               }
-
-               //
-               // Get current Bus speed/mode
-               //
-               shpc_context->bus_speed_mode = hp_get_bus_speed_mode( shpc_context );
-
-               //
-               // Initialize slot state based on HW disposition
-               //
-               for( i=0; i< shpc_context->number_of_slots; ++i ) {
-                       slot_context = &shpc_context->slot_context[ i ];
-
-                       //
-                       // Get Physical Slot Number (PSN-based)
-                       //
-                       if( SlotConfigReg.x.PSN_UP ) {
-                               slot_context->slot_psn = ( u8 )SlotConfigReg.x.PSN + i;
-                       }
-                       else {
-                               slot_context->slot_psn = ( u8 )SlotConfigReg.x.PSN - i;
-                       }
-
-                       //
-                       // Assign Logical Slot Number (1-based)
-                       //
-                       slot_context->slot_number = ( u8 )i+1;
-
-                       //
-                       // Get Card's speed/mode capabilities
-                       //
-                       hp_get_card_speed_mode( slot_context );
-
-                       //
-                       // Check current HW state
-                       //
-                       logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-
-                       //
-                       // Already enabled: Card Present, MRL closed, Slot Enabled, No Power-Fault?
-                       //
-                       if( logical_slot_reg.x.PRSNT1_2 != SHPC_SLOT_EMPTY &&
-                               ( logical_slot_reg.x.MRLS_IM == SHPC_MASKED ||
-                               logical_slot_reg.x.MRLS == SHPC_MRL_CLOSED ) &&
-                               logical_slot_reg.x.PF == SHPC_STATUS_CLEARED &&
-                               logical_slot_reg.x.S_STATE == SHPC_ENABLE_SLOT ) {
-                               //
-                               // Treat it as a SUCCESSFUL "Slot Enabled" HW-initiated request
-                               //
-                               slot_context->slot_completion.hw_initiated = TRUE;
-                               slot_context->slot_completion.type = SHPC_ASYNC_ENABLE_SLOT;
-                               slot_context->slot_completion.failed = HP_FALSE;
-                               slot_context->slot_completion.request_context = NULL;
-                               slot_context->slot_completion.done = TRUE;
-
-                               //
-                               // Flag as "Slot Enabled"
-                               //
-                               ++shpc_context->slots_enabled;
-                               slot_context->slot_enabled = TRUE;
-                               slot_context->in_bus_speed_mode_contention = TRUE;
-                               if( logical_slot_reg.x.PIS == SHPC_LED_ON ) {
-                                       slot_context->slot_function = (SLOT_STATE_FUNCTION) hp_at_slot_enabled_wait_for_slot_request;
-                               }
-                               else {
-                                       slot_context->slot_function = (SLOT_STATE_FUNCTION) hp_to_slot_enabled_wait_for_led_cmd_available;
-                               }
-                       }
-                       else {
-                               //
-                               // Treat it as a SUCCESSFUL "Slot Disable" HW-initiated request
-                               //
-                               slot_context->slot_completion.hw_initiated = TRUE;
-                               slot_context->slot_completion.type = SHPC_ASYNC_DISABLE_SLOT;
-                               slot_context->slot_completion.failed = HP_FALSE;
-                               slot_context->slot_completion.request_context = NULL;
-                               slot_context->slot_completion.done = TRUE;
-
-                               //
-                               // Flag as "Slot Disabled"
-                               //
-                               slot_context->slot_enabled = FALSE;
-                               slot_context->in_bus_speed_mode_contention = FALSE;
-                               if( logical_slot_reg.x.S_STATE == SHPC_DISABLE_SLOT ) {
-                                       slot_context->slot_function = (SLOT_STATE_FUNCTION) hp_at_slot_disabled_wait_for_slot_request;
-                               }
-                               else {
-                                       slot_context->slot_function = (SLOT_STATE_FUNCTION) hp_to_slot_disabled_wait_for_disable_cmd_available;
-                               }
-                       }
-
-                       //
-                       // Set Attention LED function
-                       //
-                       if( logical_slot_reg.x.PF == SHPC_STATUS_SET ) {
-                               //
-                               // Turn it ON
-                               //
-                               slot_context->problem_detected = TRUE;
-                               slot_context->attn_led_function = (SLOT_STATE_FUNCTION) hp_wait_for_attn_led_back_to_normal_cmd_available;
-                       }
-                       else {
-                               //
-                               // Make sure it is turned OFF
-                               //
-                               slot_context->problem_detected = FALSE;
-                               if( logical_slot_reg.x.AIS == SHPC_LED_OFF ) {
-                                       slot_context->attn_led_function = (SLOT_STATE_FUNCTION) hp_wait_for_attn_led_request;
-                               }
-                               else {
-                                       slot_context->attn_led_function = (SLOT_STATE_FUNCTION) hp_wait_for_attn_led_back_to_normal_cmd_available;
-                               }
-                       }
-               }
-
-               //
-               // Enabled slots running at maximum speed/mode?
-               //
-               if( shpc_context->slots_enabled ) {
-                       max_speed_mode = hp_get_max_speed_mode( shpc_context, shpc_context->max_speed_mode );
-
-                       //
-                       // Signal enabled slots to release the bus, then change bus speed/mode
-                       //
-                       if( shpc_context->bus_speed_mode != max_speed_mode ) {
-                               hp_signal_enabled_slots_to_rebalance_bus( shpc_context );
-                       }
-               }
-       }
-}
-
-
-// ****************************************************************************
-//
-// hp_enable_slot_interrupts() @ Any IRQL
-//
-// ****************************************************************************
-void
-hp_enable_slot_interrupts(
-       struct slot_context* slot_context
-)
-{
-       struct shpc_context* shpc_context = ( struct shpc_context* )slot_context->shpc_context;
-       union SHPC_SLOT_CONFIG_DWREG SlotConfigReg;
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-
-       //
-       // Get HW implementation: Attention Button, MRL Sensor
-       //
-       SlotConfigReg.AsDWord = readl(shpc_context->mmio_base_addr + SHPC_SLOT_CONFIG_REG_OFFSET);
-
-       //
-       // Attention Button: Enabled only if implemented
-       //
-       logical_slot_reg.x.AB_IM = ( SlotConfigReg.x.ABI == SHPC_STATUS_SET ) ?
-               SHPC_UNMASKED : SHPC_MASKED;
-       logical_slot_reg.x.ABP_STS = SHPC_STATUS_SET;
-
-       //
-       // MRL Sensor: Enabled only if implemented (System Error Disabled)
-       //
-       logical_slot_reg.x.MRLS_IM = ( SlotConfigReg.x.MRLSI == SHPC_STATUS_SET ) ?
-               SHPC_UNMASKED : SHPC_MASKED;
-       logical_slot_reg.x.MRLS_SERRM = SHPC_MASKED;
-       logical_slot_reg.x.MRLSC_STS = SHPC_STATUS_SET;
-
-       //
-       // Card Presence: Enabled
-       //
-       logical_slot_reg.x.CP_IM = SHPC_UNMASKED;
-       logical_slot_reg.x.CPC_STS = SHPC_STATUS_SET;
-
-       //
-       // Isolated Power-Fault: Enabled
-       //
-       logical_slot_reg.x.IPF_IM = SHPC_UNMASKED;
-       logical_slot_reg.x.IPF_STS = SHPC_STATUS_SET;
-
-       //
-       // Connected Power-Fault: Enabled (System Error Disabled)
-       //
-       logical_slot_reg.x.CPF_IM = SHPC_UNMASKED;
-       logical_slot_reg.x.CPF_SERRM = SHPC_MASKED;
-       logical_slot_reg.x.CPF_STS = SHPC_STATUS_SET;
-
-       //
-       // Update Mask and Status bits
-       //
-       writel(logical_slot_reg.AsDWord, slot_context->logical_slot_addr);
-}
-
-
-// ****************************************************************************
-//
-// hp_disable_slot_interrupts() @ Any IRQL
-//
-// ****************************************************************************
-void
-hp_disable_slot_interrupts(
-       struct slot_context* slot_context
-)
-{
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-
-       //
-       // Get HW implementation: Attention Button, MRL Sensor
-       //
-       logical_slot_reg.AsDWord = readl(slot_context->logical_slot_addr);
-
-       //
-       // Attention Button: Disabled
-       //
-       logical_slot_reg.x.AB_IM = SHPC_MASKED;
-       logical_slot_reg.x.ABP_STS = SHPC_STATUS_SET;
-
-       //
-       // MRL Sensor: Disabled
-       //
-       logical_slot_reg.x.MRLS_IM = SHPC_MASKED;
-       logical_slot_reg.x.MRLS_SERRM = SHPC_MASKED;
-       logical_slot_reg.x.MRLSC_STS = SHPC_STATUS_SET;
-
-       //
-       // Card Presence: Disabled
-       //
-       logical_slot_reg.x.CP_IM = SHPC_MASKED;
-       logical_slot_reg.x.CPC_STS = SHPC_STATUS_SET;
-
-       //
-       // Isolated Power-Fault: Disabled
-       //
-       logical_slot_reg.x.IPF_IM = SHPC_MASKED;
-       logical_slot_reg.x.IPF_STS = SHPC_STATUS_SET;
-
-       //
-       // Connected Power-Fault: Enabled (System Error Disabled)
-       //
-       logical_slot_reg.x.CPF_IM = SHPC_MASKED;
-       logical_slot_reg.x.CPF_SERRM = SHPC_MASKED;
-       logical_slot_reg.x.CPF_STS = SHPC_STATUS_SET;
-
-       //
-       // Update Mask and Status bits
-       //
-       writel(logical_slot_reg.AsDWord, slot_context->logical_slot_addr);
-}
-
-
-// ****************************************************************************
-//
-// hp_enable_global_interrupts() @ Any IRQL
-//
-// ****************************************************************************
-void
-hp_enable_global_interrupts(
-       struct shpc_context* shpc_context
-)
-{
-       union SHPC_SERR_INT_DWREG SerrIntReg;
-
-       SerrIntReg.AsDWord = readl(shpc_context->mmio_base_addr + SHPC_SERR_INT_REG_OFFSET);
-
-       //
-       // Arbiter timeout: System Error Disabled
-       //
-       SerrIntReg.x.A_SERRM = SHPC_MASKED;
-       SerrIntReg.x.ATOUT_STS = SHPC_STATUS_SET;
-
-       //
-       // Command Completion: Enabled
-       //
-       SerrIntReg.x.CC_IM = SHPC_UNMASKED;
-       SerrIntReg.x.CC_STS = SHPC_STATUS_SET;
-
-       //
-       // Global: Interrputs Enabled, System Error Disabled
-       //
-       SerrIntReg.x.GIM = SHPC_UNMASKED;
-       SerrIntReg.x.GSERRM = SHPC_MASKED;
-
-       //
-       // Update Mask and Status bits
-       //
-       writel(SerrIntReg.AsDWord, shpc_context->mmio_base_addr + SHPC_SERR_INT_REG_OFFSET);
-}
-
-
-// ****************************************************************************
-//
-// hp_disable_global_interrupts() @ Any IRQL
-//
-// ****************************************************************************
-void
-hp_disable_global_interrupts(
-       struct shpc_context* shpc_context
-)
-{
-       union SHPC_SERR_INT_DWREG SerrIntReg;
-
-       SerrIntReg.AsDWord = readl(shpc_context->mmio_base_addr + SHPC_SERR_INT_REG_OFFSET);
-       //
-       // Arbiter timeout: System Error Disabled
-       //
-       SerrIntReg.x.A_SERRM = SHPC_MASKED;
-       SerrIntReg.x.ATOUT_STS = SHPC_STATUS_SET;
-
-       //
-       // Command Completion: Disabled
-       //
-       SerrIntReg.x.CC_IM = SHPC_MASKED;
-       SerrIntReg.x.CC_STS = SHPC_STATUS_SET;
-
-       //
-       // Global: Interrputs Disabled, System Error Disabled
-       //
-       SerrIntReg.x.GIM = SHPC_MASKED;
-       SerrIntReg.x.GSERRM = SHPC_MASKED;
-
-       //
-       // Update Mask and Status bits
-       //
-       writel(SerrIntReg.AsDWord, shpc_context->mmio_base_addr + SHPC_SERR_INT_REG_OFFSET);
-}
-
-
-// ****************************************************************************
-//
-// hp_get_card_speed_mode() @ Any IRQL
-//
-// ****************************************************************************
-enum shpc_speed_mode
-hp_get_card_speed_mode(
-       struct slot_context* slot_context
-)
-{
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-
-       //
-       // Slot powered-up?
-       //
-       logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-       if(( logical_slot_reg.x.PRSNT1_2 != SHPC_SLOT_EMPTY ) &&
-               ( logical_slot_reg.x.S_STATE == SHPC_POWER_ONLY ||
-               logical_slot_reg.x.S_STATE == SHPC_ENABLE_SLOT )) {
-               //
-               // Get Card's maximum speed/mode
-               //
-               if( logical_slot_reg.x.PCIX_CAP == SHPC_SLOT_PCIX_133 ) {
-                       slot_context->card_speed_mode = SHPC_BUS_PCIX_133;
-               }
-               else if( logical_slot_reg.x.PCIX_CAP == SHPC_SLOT_PCIX_66 ) {
-                       slot_context->card_speed_mode = SHPC_BUS_PCIX_66;
-               }
-               else if( logical_slot_reg.x.M66_CAP == SHPC_STATUS_SET ) {
-                       slot_context->card_speed_mode = SHPC_BUS_CONV_66;
-               }
-               else {
-                       slot_context->card_speed_mode = SHPC_BUS_CONV_33;
-               }
-
-               //
-               // Get Card's PCI-66 capability
-               //
-               if( logical_slot_reg.x.M66_CAP == SHPC_STATUS_SET ) {
-                       slot_context->card_pci66_capable = TRUE;
-               }
-       }
-       else {
-               //
-               // Slot is not powered-up, use PCI-33 as default
-               //
-               slot_context->card_speed_mode = SHPC_BUS_CONV_33;
-               slot_context->card_pci66_capable = FALSE;
-       }
-
-       return slot_context->card_speed_mode;
-}
-
-// ****************************************************************************
-//
-// hp_get_bus_speed_mode() @ Any IRQL
-//
-// ****************************************************************************
-enum shpc_speed_mode
-hp_get_bus_speed_mode(
-       struct shpc_context* shpc_context
-)
-{
-       union SHPC_SEC_BUS_CONFIG_DWREG bus_config_reg;
-       enum shpc_speed_mode bus_speed_mode;
-
-       bus_config_reg.AsDWord = readl(shpc_context->mmio_base_addr + SHPC_SEC_BUS_CONFIG_REG_OFFSET);
-
-       bus_speed_mode = ( enum shpc_speed_mode )bus_config_reg.x.MODE;
-       if( bus_speed_mode > SHPC_BUS_PCIX_133 ) {
-               bus_speed_mode = SHPC_BUS_CONV_33;
-       }
-
-       return bus_speed_mode;
-}
-
-
-// ****************************************************************************
-//
-// hp_translate_speed_mode() @ Any IRQL
-//
-// ****************************************************************************
-enum mode_frequency
-hp_translate_speed_mode(
-       enum shpc_speed_mode shpc_speed_mode
-)
-{
-       enum mode_frequency translated_speed_mode;
-
-       switch( shpc_speed_mode ) {
-       case SHPC_BUS_PCIX_133:
-               translated_speed_mode = MODE_PCIX_133;
-               break;
-
-       case SHPC_BUS_PCIX_100:
-               translated_speed_mode = MODE_PCIX_100;
-               break;
-
-       case SHPC_BUS_PCIX_66:
-               translated_speed_mode = MODE_PCIX_66;
-               break;
-
-       case SHPC_BUS_CONV_66:
-               translated_speed_mode = MODE_PCI_66;
-               break;
-
-       case SHPC_BUS_CONV_33:
-       default:
-               translated_speed_mode = MODE_PCI_33;
-               break;
-       }
-
-       return translated_speed_mode;
-}
-
-
-// ****************************************************************************
-//
-// hp_translate_card_power() @ Any IRQL
-//
-// ****************************************************************************
-enum hp_power_requirements
-hp_translate_card_power(
-       enum shpc_card_power ShpcCardPower
-)
-{
-       enum hp_states TranslatedCardPower;
-
-       switch( ShpcCardPower ) {
-       case SHPC_CARD_PRESENT_25W:
-               TranslatedCardPower = POWER_HIGH;
-               break;
-
-       case SHPC_CARD_PRESENT_15W:
-               TranslatedCardPower = POWER_MEDIUM;
-               break;
-
-       case SHPC_CARD_PRESENT_7_5W:
-       default:
-               TranslatedCardPower = POWER_LOW;
-               break;
-       }
-
-       return TranslatedCardPower;
-}
-
-
-// ****************************************************************************
-//
-// hp_translate_indicator() @ Any IRQL
-//
-// ****************************************************************************
-enum hp_indicators
-hp_translate_indicator(
-       enum shpc_slot_led ShpcIndicator
-)
-{
-       enum hp_indicators TranslatedIndicator;
-
-       switch( ShpcIndicator ) {
-       case SHPC_LED_ON:
-               TranslatedIndicator = INDICATOR_ON;
-               break;
-
-       case SHPC_LED_BLINK:
-               TranslatedIndicator = INDICATOR_BLINK;
-               break;
-
-       case SHPC_LED_OFF:
-       default:
-               TranslatedIndicator =INDICATOR_OFF;
-               break;
-       }
-
-       return TranslatedIndicator;
-}
-
-
-// ****************************************************************************
-//
-// hp_flag_slot_as_enabled() @ <= DISPATCH_LEVEL
-//
-// ****************************************************************************
-u8
-hp_flag_slot_as_enabled(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       u8 SlotFlagged = FALSE;
-
-       spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-       if( !slot_context->slot_enabled ) {
-               //
-               // Slot just coming on-line
-               //
-               SlotFlagged = TRUE;
-               ++shpc_context->slots_enabled;
-               slot_context->slot_enabled = TRUE;
-               hp_clear_shpc_event_bit(shpc_context, BUS_REBALANCE_EVENT);
-       }
-       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-       return SlotFlagged;
-}
-
-
-// ****************************************************************************
-//
-// hp_flag_slot_as_disabled() @ <= DISPATCH_LEVEL
-//
-// ****************************************************************************
-u8
-hp_flag_slot_as_disabled(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       u8 SlotFlagged = FALSE;
-
-       spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-       if( slot_context->slot_enabled ) {
-               if( --shpc_context->slots_enabled == 0 ) {
-                       //
-                       // This was the last enabled slot, signal waiting thread that bus is released,
-                       //
-                       shpc_context->bus_released = TRUE;
-                       hp_send_event_to_all_slots(shpc_context, BUS_COMPLETE_EVENT);
-               }
-               SlotFlagged = TRUE;
-               slot_context->slot_enabled = FALSE;
-       }
-       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-       return SlotFlagged;
-}
-
-
-// ****************************************************************************
-//
-// hp_signal_enabled_slots_to_rebalance_bus() @ <= DISPATCH_LEVEL
-//
-// Comments:
-//     Assumes shpc_spinlock is already held.
-//
-// ****************************************************************************
-u8
-hp_signal_enabled_slots_to_rebalance_bus(
-       struct shpc_context* shpc_context
-)
-{
-       struct slot_context* SlotArray[ SHPC_MAX_NUM_SLOTS ];
-       struct slot_context* Slot;
-       u8 i, j, n;
-
-       //
-       // Initialize array of slot pointers
-       //
-       n = shpc_context->number_of_slots;
-       for( i=0, j=0; i<n; ++i ) {
-               Slot = &shpc_context->slot_context[ i ];
-               if( Slot->slot_enabled ) {
-                       SlotArray[ j++ ] = Slot;
-               }
-       }
-       //
-       // Found slots enabled?
-       //
-       if( j ) {
-               //
-               // Bubble-sort enabled slots in order of increasing card speed/mode
-               //
-               n = j;
-               for( i=0; i<n-1; i++ ) {
-                       for( j=0; j<n-1-i; j++ ) {
-                               if( SlotArray[ j+1 ]->card_speed_mode < SlotArray[ j ]->card_speed_mode ) {
-                                       Slot = SlotArray[ j ];
-                                       SlotArray[ j ] = SlotArray[ j+1 ];
-                                       SlotArray[ j+1 ] = Slot;
-                               }
-                       }
-               }
-               //
-               // Signal enabled slots in sorted order as an attempt to re-enable slower cards first
-               //
-               hp_set_shpc_event_bit(shpc_context, BUS_REBALANCE_EVENT);
-               for( i=0; i<n; i++ ) {
-                       wake_up_interruptible( &SlotArray[ i ]->slot_event);
-               }
-               return TRUE;
-       }
-
-       return FALSE;
-}
-
-
-// ****************************************************************************
-//
-// hp_get_max_speed_mode() @ <= DISPATCH_LEVEL
-//
-// Comments:
-//     Assumes shpc_spinlock is already held.
-//
-// ****************************************************************************
-enum shpc_speed_mode
-hp_get_max_speed_mode(
-       struct shpc_context* shpc_context,
-       enum shpc_speed_mode From_speed_mode
-)
-{
-       struct slot_context* slot_context;
-       enum shpc_speed_mode max_speed_mode;
-       u8 i;
-
-       max_speed_mode = From_speed_mode;
-       for( i=0; i< shpc_context->number_of_slots; ++i ) {
-               slot_context = &shpc_context->slot_context[ i ];
-               if( slot_context->in_bus_speed_mode_contention &&
-                       slot_context->card_speed_mode < max_speed_mode ) {
-                       //
-                       // Can only go as fast as the slowest card
-                       //
-                       max_speed_mode = slot_context->card_speed_mode;
-               }
-       }
-
-       //
-       // Make sure all cards support conventional PCI-66 speed/mode
-       //
-       if( max_speed_mode == SHPC_BUS_CONV_66 ) {
-               for( i=0; i< shpc_context->number_of_slots; ++i ) {
-                       slot_context = &shpc_context->slot_context[ i ];
-                       if( slot_context->in_bus_speed_mode_contention &&
-                               !slot_context->card_pci66_capable ) {
-                               //
-                               // Fall back to slower common denominator
-                               //
-                               max_speed_mode = SHPC_BUS_CONV_33;
-                       }
-               }
-       }
-
-       return max_speed_mode;
-}
-
-
-// ****************************************************************************
-//
-// hp_signal_user_event() @ <= DISPATCH_LEVEL
-//
-// ****************************************************************************
-void hp_signal_user_event(struct shpc_context* shpc_context)
-{
-       unsigned long           old_irq_flags;
-return;
-       spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-       if( shpc_context->user_event_pointer ) {
-               wake_up_interruptible( shpc_context->user_event_pointer);
-       }
-       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-}
-
-
-// ****************************************************************************
-//
-// hp_signal_user_event_at_dpc_level() @ DISPATCH_LEVEL
-//
-// ****************************************************************************
-void hp_signal_user_event_at_dpc_level(struct shpc_context* shpc_context)
-{
-return;
-       spin_lock_bh( &shpc_context->shpc_spinlock );
-       if( shpc_context->user_event_pointer ) {
-               wake_up_interruptible( shpc_context->user_event_pointer);
-       }
-       spin_unlock_bh( &shpc_context->shpc_spinlock );
-}
diff --git a/drivers/pci/hotplug/amdshpc_ddi.c b/drivers/pci/hotplug/amdshpc_ddi.c
deleted file mode 100644 (file)
index 21c64fe..0000000
+++ /dev/null
@@ -1,1660 +0,0 @@
-/*
- * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (C) 2001,2003 IBM Corp.
- * Copyright (C) 2002-2003 Advanced Micro Devices
- *
- * YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS
- * AND CONDITIONS OF THE GNU GENERAL PUBLIC
- * LICENSE FOUND IN THE "GPL.TXT" FILE THAT IS
- * INCLUDED WITH THIS FILE AND POSTED AT
- * http://www.gnu.org/licenses/gpl.html
- *
- *
- * Send feedback to <david.keck@amd.com>
- *
- */
-
-#include <linux/module.h>
-#include <linux/sched.h>
-#include <linux/smp_lock.h>
-#include "amdshpc_ddi.h"
-#include "amdshpc.h"
-
-static unsigned long async_callback (void* driver_context,
-                                        u8 slot_number,
-                                        enum shpc_async_request async_request,
-                                        union SLOT_STATUS_INFO slot_tatus,
-                                        void* request_context );
-
-// ****************************************************************************
-//
-// hp_AddDevice() 
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data (per hardware-instance).
-//     driver_context - Caller provided pointer to be returned upon completion.
-//     Callback - Caller provided function to be called upon completion of async requests.
-//  shpc_instance - Zero-based hardware instance.
-//
-// Return Value
-//  Status returned by any system calls made within hp_AddDevice().
-//
-// ****************************************************************************
-long
-hp_AddDevice(
-       struct shpc_context* shpc_context,
-       void* driver_context,
-       SHPC_ASYNC_CALLBACK Callback,
-       unsigned long shpc_instance
-       )
-
-{
-       struct slot_context* slot_context;
-       u8 i;
-       DECLARE_TASKLET(mrl_sensor_dpc0, hp_mrl_sensor_dpc, (unsigned long) &shpc_context->slot_context[0] );
-       DECLARE_TASKLET(attn_button_dpc0, hp_attn_button_dpc, (unsigned long) &shpc_context->slot_context[0]);
-       DECLARE_TASKLET(card_presence_dpc0, hp_card_presence_dpc, (unsigned long) &shpc_context->slot_context[0]);
-       DECLARE_TASKLET(isolated_power_fault_dpc0, hp_isolated_power_fault_dpc, (unsigned long) &shpc_context->slot_context[0]);
-       DECLARE_TASKLET(connected_power_fault_dpc0, hp_connected_power_fault_dpc, (unsigned long) &shpc_context->slot_context[0]);
-
-       DECLARE_TASKLET(mrl_sensor_dpc1, hp_mrl_sensor_dpc, (unsigned long) &shpc_context->slot_context[1] );
-       DECLARE_TASKLET(attn_button_dpc1, hp_attn_button_dpc, (unsigned long) &shpc_context->slot_context[1]);
-       DECLARE_TASKLET(card_presence_dpc1, hp_card_presence_dpc, (unsigned long) &shpc_context->slot_context[1]);
-       DECLARE_TASKLET(isolated_power_fault_dpc1, hp_isolated_power_fault_dpc, (unsigned long) &shpc_context->slot_context[1]);
-       DECLARE_TASKLET(connected_power_fault_dpc1, hp_connected_power_fault_dpc, (unsigned long) &shpc_context->slot_context[1]);
-
-       DECLARE_TASKLET(mrl_sensor_dpc2, hp_mrl_sensor_dpc, (unsigned long) &shpc_context->slot_context[2] );
-       DECLARE_TASKLET(attn_button_dpc2, hp_attn_button_dpc, (unsigned long) &shpc_context->slot_context[2]);
-       DECLARE_TASKLET(card_presence_dpc2, hp_card_presence_dpc, (unsigned long) &shpc_context->slot_context[2]);
-       DECLARE_TASKLET(isolated_power_fault_dpc2, hp_isolated_power_fault_dpc, (unsigned long) &shpc_context->slot_context[2]);
-       DECLARE_TASKLET(connected_power_fault_dpc2, hp_connected_power_fault_dpc, (unsigned long) &shpc_context->slot_context[2]);
-
-       DECLARE_TASKLET(mrl_sensor_dpc3, hp_mrl_sensor_dpc, (unsigned long) &shpc_context->slot_context[3] );
-       DECLARE_TASKLET(attn_button_dpc3, hp_attn_button_dpc, (unsigned long) &shpc_context->slot_context[3]);
-       DECLARE_TASKLET(card_presence_dpc3, hp_card_presence_dpc, (unsigned long) &shpc_context->slot_context[3]);
-       DECLARE_TASKLET(isolated_power_fault_dpc3, hp_isolated_power_fault_dpc, (unsigned long) &shpc_context->slot_context[3]);
-       DECLARE_TASKLET(connected_power_fault_dpc3, hp_connected_power_fault_dpc, (unsigned long) &shpc_context->slot_context[3]);
-
-
-       DECLARE_TASKLET(cmd_completion_dpc, hp_cmd_completion_dpc, (unsigned long) shpc_context );
-
-       //
-       // Init common resources
-       //
-       shpc_context->cmd_completion_dpc = cmd_completion_dpc;
-       shpc_context->driver_context = driver_context;
-       shpc_context->async_callback = (SHPC_ASYNC_CALLBACK)async_callback;
-       shpc_context->shpc_instance = shpc_instance;
-       shpc_context->slots_enabled = 0;
-       shpc_context->number_of_slots = 0;
-       shpc_context->at_power_device_d0 = FALSE;
-       shpc_context->bus_released = FALSE;
-       shpc_context->user_event_pointer = NULL;
-       spin_lock_init( &shpc_context->shpc_spinlock );
-       sema_init( &shpc_context->cmd_available_mutex, 1);
-       sema_init( &shpc_context->bus_available_mutex, 1);
-       sema_init( &shpc_context->shpc_event_bits_semaphore, 1);
-
-       shpc_context->shpc_event_bits=0;        // all shpc events cleared
-
-       dbg("%s -->HwInstance[ %d ]", __FUNCTION__ ,shpc_context->shpc_instance );
-
-       //
-       // Init slot resources
-       //
-       for( i=0; i< SHPC_MAX_NUM_SLOTS; ++i ) {
-               slot_context = &shpc_context->slot_context[ i ];
-               slot_context->shpc_context = ( void* )shpc_context;
-               slot_context->slot_number = ( u8 )i+1;
-               slot_context->slot_enabled = FALSE;
-               slot_context->in_bus_speed_mode_contention = FALSE;
-               slot_context->problem_detected = FALSE;
-               slot_context->slot_quiesced = FALSE;
-               slot_context->slot_thread = NULL;
-               slot_context->slot_function = NULL;
-               slot_context->attn_led_thread = NULL;
-               slot_context->attn_led_function = NULL;
-
-               //
-               // Slot SpinLocks and semaphores
-               //
-               spin_lock_init( &slot_context->slot_spinlock);
-               sema_init(&slot_context->slot_event_bits_semaphore, 1);
-               sema_init(&slot_context->cmd_acquire_mutex, 1);
-               sema_init(&slot_context->bus_acquire_mutex, 1);
-
-               //
-               // Slot timers
-               //
-               init_timer(&slot_context->slot_timer1);
-               init_timer(&slot_context->slot_timer2);
-               init_timer(&slot_context->slot_timer3);
-               init_timer(&slot_context->slot_timer4);
-               init_timer(&slot_context->slot_timer5);
-               init_timer(&slot_context->slot_timer6);
-               init_timer(&slot_context->slot_timer7);
-               init_timer(&slot_context->slot_timer8);
-               init_timer(&slot_context->slot_timer9);
-               init_timer(&slot_context->slot_timer10);
-               init_timer(&slot_context->led_timer1);
-               init_timer(&slot_context->led_timer2);
-               init_timer(&slot_context->led_timer3);
-               init_timer(&slot_context->led_timer4);
-
-               //
-               // Interrupt Service
-               //
-               switch (i) {
-               case 0:
-                       slot_context->attn_button_dpc           = attn_button_dpc0;
-                       slot_context->mrl_sensor_dpc            = mrl_sensor_dpc0;
-                       slot_context->card_presence_dpc         = card_presence_dpc0;
-                       slot_context->isolated_power_fault_dpc  = isolated_power_fault_dpc0;
-                       slot_context->connected_power_fault_dpc = connected_power_fault_dpc0;
-                       break;
-               case 1:
-                       slot_context->attn_button_dpc           = attn_button_dpc1;
-                       slot_context->mrl_sensor_dpc            = mrl_sensor_dpc1;
-                       slot_context->card_presence_dpc         = card_presence_dpc1;
-                       slot_context->isolated_power_fault_dpc  = isolated_power_fault_dpc1;
-                       slot_context->connected_power_fault_dpc = connected_power_fault_dpc1;
-                       break;
-               case 2:
-                       slot_context->attn_button_dpc           = attn_button_dpc2;
-                       slot_context->mrl_sensor_dpc            = mrl_sensor_dpc2;
-                       slot_context->card_presence_dpc         = card_presence_dpc2;
-                       slot_context->isolated_power_fault_dpc  = isolated_power_fault_dpc2;
-                       slot_context->connected_power_fault_dpc = connected_power_fault_dpc2;
-                       break;
-               case 3:
-                       slot_context->attn_button_dpc           = attn_button_dpc3;
-                       slot_context->mrl_sensor_dpc            = mrl_sensor_dpc3;
-                       slot_context->card_presence_dpc         = card_presence_dpc3;
-                       slot_context->isolated_power_fault_dpc  = isolated_power_fault_dpc3;
-                       slot_context->connected_power_fault_dpc = connected_power_fault_dpc3;
-                       break;
-               }
-
-
-               //
-               // Slot Events
-               //
-               slot_context->slot_event_bits=0;        // all slot events cleared
-
-               dbg("%s -->Init slot wait queues",__FUNCTION__ );
-
-               init_waitqueue_head(&slot_context->slot_event);
-               init_waitqueue_head(&slot_context->led_cmd_acquire_event);
-               init_waitqueue_head(&slot_context->led_cmd_release_event);
-               init_waitqueue_head(&slot_context->cmd_acquire_event);
-               init_waitqueue_head(&slot_context->cmd_release_event);
-               init_waitqueue_head(&slot_context->bus_acquire_event);
-               init_waitqueue_head(&slot_context->bus_release_event);
-       }
-       return STATUS_SUCCESS;
-}
-
-
-// ****************************************************************************
-//
-// hp_StartDevice()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//  Status returned by any system calls made within hp_StartDevice().
-//
-//
-// ****************************************************************************
-long
-hp_StartDevice(
-       struct shpc_context* shpc_context
-       )
-{
-       struct slot_context* slot_context;
-       long status = STATUS_SUCCESS;
-       u32 *logical_slot_addr;
-       u8 i;
-       int pid;
-
-       dbg("%s -->From hp_StartDevice:  MmioBase[ %p ]",__FUNCTION__ , (unsigned long*)shpc_context->mmio_base_addr);
-
-       //
-       // Disable Global Interrupts
-       //
-       dbg("%s -->hp_disable_global_interrupts( shpc_context=%p );",__FUNCTION__ , shpc_context);
-       hp_disable_global_interrupts( shpc_context );
-
-       //
-       // Reset common resources
-       //
-       shpc_context->at_power_device_d0 = TRUE;
-       shpc_context->bus_released = FALSE;
-
-       //
-       // Reset slot resources
-       //
-       logical_slot_addr = shpc_context->mmio_base_addr + SHPC_LOGICAL_SLOT_REG_OFFSET;
-       for( i=0; i< SHPC_MAX_NUM_SLOTS; ++i ) {
-               slot_context = &shpc_context->slot_context[ i ];
-
-               //
-               // Assign Logical Slot Register Address
-               //
-               slot_context->logical_slot_addr = logical_slot_addr++;
-
-               //
-               // Disable Slot Interrupts
-               //
-               dbg("%s -->hp_disable_slot_interrupts(slot_context)=%p",__FUNCTION__ , slot_context);
-               hp_disable_slot_interrupts(slot_context);
-
-               //
-               // Reset slot flags and pointers
-               //
-               slot_context->slot_enabled = FALSE;
-               slot_context->in_bus_speed_mode_contention = FALSE;
-               slot_context->problem_detected = FALSE;
-               slot_context->slot_quiesced = FALSE;
-               slot_context->slot_thread = NULL;
-               slot_context->slot_function = NULL;
-               slot_context->attn_led_thread = NULL;
-               slot_context->attn_led_function = NULL;
-               slot_context->slot_occupied = 0;
-       }
-
-       //
-       // Get initial slot configuration: number_of_slots, slots_enabled, SlotStateFunction
-       //
-       shpc_context->slots_enabled = 0;
-       shpc_context->number_of_slots = 0;
-       hp_get_slot_configuration( shpc_context );
-       dbg("%s -->from hp_StartDevice() number_of_slots = %d", __FUNCTION__ ,shpc_context->number_of_slots);
-       if( shpc_context->number_of_slots == 0 ) {
-               status = STATUS_UNSUCCESSFUL;
-       }
-
-       //
-       //  Hook Interrupt
-       //
-       dbg("%s -->HPC interrupt = %d \n", __FUNCTION__ ,shpc_context->interrupt);
-
-       if (request_irq(shpc_context->interrupt, hp_interrupt_service, SA_SHIRQ, MY_NAME, shpc_context)) {
-               err("Can't get irq %d for the PCI hotplug controller\n", shpc_context->interrupt);
-               status = STATUS_UNSUCCESSFUL;
-               return(status);
-       }
-
-       //
-       // Set slot operation in motion
-       //
-       for( i=0; i<shpc_context->number_of_slots && status; ++i ) {
-
-               slot_context = &shpc_context->slot_context[ i ];
-
-               //
-               // Launch slot command and bus completion mutex threads
-               //
-               // get led cmd available thread
-               pid = kernel_thread(hp_get_led_cmd_available_mutex_thread, slot_context, CLONE_SIGHAND);
-               if (pid < 0) {
-                       err ("Can't start up our get_led_cmd_available_mutex thread\n");
-                       status = STATUS_UNSUCCESSFUL;
-               }
-               dbg("%s -->Our hp_get_led_cmd_available_mutex thread pid = %d",__FUNCTION__ , pid);
-
-               // get cmd available thread
-               pid = kernel_thread(hp_get_cmd_available_mutex_thread, slot_context, CLONE_SIGHAND);
-               if (pid < 0) {
-                       err ("Can't start up our get_cmd_available_mutex thread\n");
-                       status = STATUS_UNSUCCESSFUL;
-               }
-               dbg("%s -->Our hp_get_cmd_available_mutex thread pid = %d",__FUNCTION__ , pid);
-
-               // get bus available thread
-               pid = kernel_thread(hp_get_bus_available_mutex_thread, slot_context, CLONE_SIGHAND);
-               if (pid < 0) {
-                       err ("Can't start up our get_bus_available_mutex thread\n");
-                       status = STATUS_UNSUCCESSFUL;
-               }
-               dbg("%s \n\n\n-->Our get_bus_available_mutex thread pid = %d",__FUNCTION__ , pid);
-
-               //
-               // Launch slot thread
-               //
-               pid = kernel_thread(hp_slot_thread, slot_context, CLONE_SIGHAND);
-               if (pid < 0) {
-                       err ("Can't start up our event thread\n");
-                       status = STATUS_UNSUCCESSFUL;
-               }
-               dbg("%s -->Our slot event thread pid = %d\n",__FUNCTION__ , pid);
-
-               //
-               // Launch Attention LED Thread
-               //
-               pid = kernel_thread(hp_attn_led_thread, slot_context, CLONE_SIGHAND);
-               if (pid < 0) {
-                       err ("Can't start up our event thread\n");
-                       status = STATUS_UNSUCCESSFUL;
-               }
-               dbg("%s -->Our LED event thread pid = %d\n",__FUNCTION__ , pid);
-
-               //
-               // Enable Slot Interrupts: Attn Button, MRL Sensor, Card Presence, Power-Fault
-               //
-               if(status) {
-                       dbg("%s -->hpStartDevice() Enabling slot interrupts...",__FUNCTION__ );
-                       hp_enable_slot_interrupts( slot_context );
-               }
-       }
-
-       //
-       // Enable Global Interrupts: Command Completion
-       //
-       if(status) {
-               dbg("%s -->hpStartDevice() Enabling global interrupts...",__FUNCTION__ );
-               hp_enable_global_interrupts( shpc_context );
-       } else {
-               //
-               // Bail out, we're hosed!
-               //
-               hp_StopDevice( shpc_context );
-               status = STATUS_UNSUCCESSFUL;
-       }
-       dbg("%s -->status = %d\n",__FUNCTION__ , (u32)status);
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_StopDevice()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//  Status returned by any system calls made within hp_StopDevice().
-//
-// Comments:
-//     The caller is responsible for unmapping mmio_base_addr, via MmUnmapIoSpace(),
-//  after calling hp_StopDevice() for resource re-balancing or device removal.
-//
-// ****************************************************************************
-long
-hp_StopDevice(
-       struct shpc_context* shpc_context
-       )
-{
-       struct slot_context* slot_context;
-       long status = STATUS_SUCCESS;
-       unsigned long   old_irq_flags;
-       u8 i;
-
-       //
-       // Already stopped or never started ?
-       //
-       if( shpc_context->mmio_base_addr == 0 ) {
-               return STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Disable Global Interrupts
-       //
-       hp_disable_global_interrupts( shpc_context );
-
-       //
-       // Signal EXIT request to slot threads
-       //
-
-       spin_lock_irqsave(&shpc_context->shpc_spinlock, old_irq_flags);
-       hp_clear_shpc_event_bit(shpc_context, SUSPEND_EVENT);
-       hp_send_event_to_all_slots(shpc_context,
-                                  RESUME_EVENT || REMOVE_EVENT || EXIT_REQUEST_EVENT);
-       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-       for( i=0; i<SHPC_MAX_NUM_SLOTS; ++i ) {
-               slot_context = &shpc_context->slot_context[ i ];
-
-               //
-               // Disable Slot Interrupts
-               //
-               hp_disable_slot_interrupts( slot_context );
-
-               //
-               // Remove scheduled slot DPCs
-               //
-               tasklet_kill( &slot_context->attn_button_dpc );
-               tasklet_kill( &slot_context->card_presence_dpc );
-               tasklet_kill( &slot_context->isolated_power_fault_dpc );
-               tasklet_kill( &slot_context->connected_power_fault_dpc );
-
-               //
-               // Send events to kill all threads
-               //
-               //
-               // Set event bits to send to running threads
-               //
-               hp_set_shpc_event_bit(shpc_context,
-                                     (RESUME_EVENT | REMOVE_EVENT | EXIT_REQUEST_EVENT));
-
-               
-               
-               wake_up_interruptible(&slot_context->led_cmd_acquire_event);
-               wake_up_interruptible(&slot_context->cmd_acquire_event);
-               wake_up_interruptible(&slot_context->bus_acquire_event);
-               wake_up_interruptible(&slot_context->led_cmd_release_event);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               wake_up_interruptible(&slot_context->bus_release_event);
-               //
-               // Reset slot pointers and flags
-               //
-               slot_context->slot_enabled = FALSE;
-               slot_context->slot_thread = NULL;
-               slot_context->slot_function = NULL;
-               slot_context->attn_led_thread = NULL;
-               slot_context->attn_led_function = NULL;
-       }
-
-       //
-       // Remove scheduled common DPC
-       //
-       tasklet_kill(&shpc_context->cmd_completion_dpc );
-
-       //
-       // Reset common resources
-       //
-       shpc_context->number_of_slots = 0;
-       shpc_context->slots_enabled = 0;
-       shpc_context->at_power_device_d0 = FALSE;
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_SuspendDevice()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//  Status returned by any system calls made within hp_SuspendDevice().
-//
-// Comments:
-//     hp_SuspendDevice() must be called before transitioning away from PowerDeviceD0.
-//
-// ****************************************************************************
-long
-hp_SuspendDevice(
-       struct shpc_context* shpc_context
-       )
-{
-       long status = STATUS_SUCCESS;
-       unsigned long   old_irq_flags;
-
-       dbg("%s -->HwInstance[ %d ]", __FUNCTION__ ,shpc_context->shpc_instance );
-
-       spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-
-       if(shpc_context->mmio_base_addr &&
-               (!shpc_context->shpc_event_bits & SUSPEND_EVENT) &&
-               (!shpc_context->shpc_event_bits & REMOVE_EVENT)) {
-               hp_clear_shpc_event_bit(shpc_context, RESUME_EVENT);
-
-               hp_send_event_to_all_slots(shpc_context, SUSPEND_EVENT);
-               hp_send_event_to_all_slots(shpc_context, EXIT_REQUEST_EVENT);
-
-               shpc_context->at_power_device_d0 = FALSE;
-       }
-       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_ResumeDevice() 
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//  Status returned by any system calls made within hp_ResumeDevice().
-//
-// Comments:
-//     hp_SuspendDevice() must be called after transitioning back to PowerDeviceD0.
-//
-// ****************************************************************************
-long
-hp_ResumeDevice(
-       struct shpc_context* shpc_context
-       )
-{
-       long status = STATUS_SUCCESS;
-       unsigned long           old_irq_flags;
-
-       dbg("%s -->HwInstance[ %d ]", __FUNCTION__ ,shpc_context->shpc_instance );
-
-       spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-       if(shpc_context->mmio_base_addr &&
-               (shpc_context->shpc_event_bits & SUSPEND_EVENT) &&
-               (!shpc_context->shpc_event_bits & REMOVE_EVENT)) {
-               hp_clear_shpc_event_bit(shpc_context, SUSPEND_EVENT);
-               hp_clear_shpc_event_bit(shpc_context, EXIT_REQUEST_EVENT);
-               hp_send_event_to_all_slots(shpc_context, RESUME_EVENT);
-               shpc_context->at_power_device_d0 = TRUE;
-       }
-
-       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_QuerySlots() 
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//     slot_config - Caller provided storage for slots configuration info.
-//
-// Return Value
-//  Status returned by any system calls made within hp_QuerySlots().
-//
-// ****************************************************************************
-long
-hp_QuerySlots(
-       struct shpc_context* shpc_context,
-       union SLOT_CONFIG_INFO* slot_config
-       )
-{
-       long status = STATUS_SUCCESS;
-       union SHPC_SLOT_CONFIG_DWREG slot_config_reg;
-
-       dbg("%s -->HwInstance[ %d ]  Slots[ %d ]",__FUNCTION__ ,
-               shpc_context->shpc_instance, shpc_context->number_of_slots );
-
-       //
-       // Get slot configuration
-       //
-       slot_config_reg.AsDWord = readl(shpc_context->mmio_base_addr + SHPC_SLOT_CONFIG_REG_OFFSET);
-
-       slot_config->AsDWord = 0;
-       slot_config->x.lu_slots_implemented = slot_config_reg.x.NSI;
-       slot_config->x.lu_base_PSN = slot_config_reg.x.PSN;
-       slot_config->x.lu_PSN_up = slot_config_reg.x.PSN_UP;
-       slot_config->x.lu_base_FDN = slot_config_reg.x.FDN;
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_QuerySlotStatus()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//     slot_id - Zero-based slot number (0..n-1).
-//     Query - Pointer to Slot Status Structure
-//
-// Return Value
-//  Status returned by any system calls made within hp_QuerySlotStatus().
-//
-// ****************************************************************************
-long
-hp_QuerySlotStatus(
-       struct shpc_context* shpc_context,
-       u8 slot_id,
-       union SLOT_STATUS_INFO* Query
-       )
-{
-       struct slot_context* slot_context;
-       long status = STATUS_SUCCESS;
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_id );
-
-       //
-       // Valid slot_id?
-       //
-       if( slot_id >= shpc_context->number_of_slots ) {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       else {
-               //
-               // Which slot?
-               //
-               slot_context = &shpc_context->slot_context[ slot_id ];
-
-               //
-               // Get Max Speed/Mode from common context
-               //
-               Query->x.lu_max_bus_mode_freq = hp_translate_speed_mode( shpc_context->max_speed_mode );
-
-               //
-               // Get Bus Speed/Mode from HW
-               //
-               Query->x.lu_bus_mode_freq = hp_translate_speed_mode( hp_get_bus_speed_mode( shpc_context ));
-
-               //
-               // Get Card Speed/Mode from HW
-               //
-               Query->x.lu_card_mode_freq_cap = hp_translate_speed_mode( hp_get_card_speed_mode( slot_context ));
-
-               //
-               // Get current slot info from HW
-               //
-               logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-
-               //
-               // Card Present?
-               //
-               Query->x.lu_card_present = ( logical_slot_reg.x.PRSNT1_2 != SHPC_SLOT_EMPTY ) ?
-                       HP_TRUE : HP_FALSE;
-
-               //
-               // Get Card PCI-66 capability
-               //
-               Query->x.lu_card_pci66_capable = (( logical_slot_reg.x.PRSNT1_2 != SHPC_SLOT_EMPTY ) &&
-                       ( logical_slot_reg.x.S_STATE == SHPC_POWER_ONLY || logical_slot_reg.x.S_STATE == SHPC_ENABLE_SLOT ) &&
-                       ( logical_slot_reg.x.M66_CAP == SHPC_STATUS_SET )) ?
-                       HP_TRUE : HP_FALSE;
-
-               //
-               // Power-Fault?
-               //
-               Query->x.lu_power_fault = ( logical_slot_reg.x.PF == SHPC_STATUS_SET ) ?
-                       HP_TRUE : HP_FALSE;
-
-               //
-               //  Card Power Requirements
-               //
-               Query->x.lu_card_power = hp_translate_card_power( logical_slot_reg.x.PRSNT1_2 );
-
-               //
-               //  Attention Indicator
-               //
-               Query->x.lu_ai_state = hp_translate_indicator( logical_slot_reg.x.AIS );
-
-               //
-               //  Power Indicator
-               //
-               Query->x.lu_pi_state = hp_translate_indicator( logical_slot_reg.x.PIS );
-
-               //
-               // MRL Implemented?
-               //
-               Query->x.lu_mrl_implemented = ( logical_slot_reg.x.MRLS_IM == SHPC_UNMASKED ) ?
-                       HP_TRUE : HP_FALSE;
-
-               //
-               // MRL Opened?
-               //
-               Query->x.lu_mrl_opened = (( logical_slot_reg.x.MRLS == SHPC_MRL_OPEN ) &&
-                       ( logical_slot_reg.x.MRLS_IM == SHPC_UNMASKED )) ? HP_TRUE : HP_FALSE;
-
-               //
-               // Slot State: Card Present, MRL closed, No Power-Fault, Enabled?
-               //
-               if( logical_slot_reg.x.PRSNT1_2 != SHPC_SLOT_EMPTY &&
-                       ( logical_slot_reg.x.MRLS_IM == SHPC_MASKED ||
-                       logical_slot_reg.x.MRLS == SHPC_MRL_CLOSED ) &&
-                       logical_slot_reg.x.PF == SHPC_STATUS_CLEARED &&
-                       logical_slot_reg.x.S_STATE == SHPC_ENABLE_SLOT ) {
-                       Query->x.lu_slot_state = SLOT_ENABLE;
-               }
-               else {
-                       Query->x.lu_slot_state = SLOT_DISABLE;
-               }
-
-               //
-               // OK, it's all there!
-               //
-               Query->x.lu_reserved1 = 0;
-               Query->x.lu_reserved2 = 0;
-               Query->x.lu_request_failed = HP_FALSE;
-       }
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_StartAsyncRequest()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//     slot_id - Zero-based slot number (0..n-1).
-//     Request - Async request: Slot "Enable/Disable", AttnLED "Attn/Normal").
-//     timeout - For AttnLED "Attn" requests (in seconds)
-//     request_context - Caller provided pointer to be returned upon completion.
-//
-// Return Value
-//     STATUS_SUCCESS if the request is accepted.  The Callback() is later invoked with a completion status.
-//  STATUS_UNSUCCESSFUL if the request is rejected (invalid parameters, or similar request in progress),
-//
-// Comment:
-//     For AttnLED "Attn" requests, the completion Callback() function is invoked as soon as the hardware
-//     completes (Blink) execution.  When the timeout period expires, the AttnLED is brought back to
-//  its "Normal" (On/Off) state, and the Callback() is invoked once again.
-//
-// ****************************************************************************
-long
-hp_StartAsyncRequest(
-       struct shpc_context* shpc_context,
-       u8 slot_id,
-       enum shpc_async_request request,
-       u32 timeout,
-       void* request_context
-       )
-{
-       unsigned long           old_irq_flags;
-       struct slot_context* slot_context;
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]  Request[ %d ]",__FUNCTION__ ,
-               shpc_context->shpc_instance, slot_id, request );
-
-       //
-       // Valid slot_id?
-       //
-       if( slot_id >= shpc_context->number_of_slots ) {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       else {
-               slot_context = &shpc_context->slot_context[ slot_id ];
-
-               switch( request ) {
-               case SHPC_ASYNC_ENABLE_SLOT:
-                       dbg("%s SHPC_ASYNC_ENABLE_SLOT",__FUNCTION__);
-               case SHPC_ASYNC_DISABLE_SLOT:
-                       dbg("%s SHPC_ASYNC_DISABLE_SLOT",__FUNCTION__);
-                       //
-                       // Slot Request Pending?
-                       //
-                       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                       down_interruptible(&slot_context->slot_event_bits_semaphore);
-                       down_interruptible(&shpc_context->shpc_event_bits_semaphore);
-                       if((slot_context->slot_event_bits & SLOT_REQUEST_EVENT) ||
-                               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)) {
-                               status = STATUS_UNSUCCESSFUL;
-                               up(&slot_context->slot_event_bits_semaphore);
-                               up(&shpc_context->shpc_event_bits_semaphore);
-                       }
-                       else {
-                               up(&slot_context->slot_event_bits_semaphore);
-                               up(&shpc_context->shpc_event_bits_semaphore);
-                               slot_context->slot_request.type = request;
-                               slot_context->slot_request.request_context = request_context;
-                               hp_send_slot_event(slot_context, SLOT_REQUEST_EVENT);
-                       }
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-                       break;
-
-               case SHPC_ASYNC_LED_LOCATE:
-                       dbg("%s SHPC_ASYNC_LED_LOCATE",__FUNCTION__);
-               case SHPC_ASYNC_LED_NORMAL:
-                       dbg("%s SHPC_ASYNC_LED_NORMAL",__FUNCTION__);
-                       //
-                       // AttnLED Request Pending?
-                       //
-                       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                       down_interruptible(&slot_context->slot_event_bits_semaphore);
-                       down_interruptible(&shpc_context->shpc_event_bits_semaphore);
-                       if((slot_context->slot_event_bits & ATTN_LED_REQUEST_EVENT) ||
-                               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)) {
-                               dbg("%s  LED--STATUS_UNSUCCESSFUL  slot_event_bits = %08X", __FUNCTION__ ,slot_context->slot_event_bits);
-                               status = STATUS_UNSUCCESSFUL;
-                               up(&slot_context->slot_event_bits_semaphore);
-                               up(&shpc_context->shpc_event_bits_semaphore);
-                       }
-                       else {
-                               up(&slot_context->slot_event_bits_semaphore);
-                               up(&shpc_context->shpc_event_bits_semaphore);
-                               slot_context->attn_led_request.type = request;
-                               slot_context->attn_led_request.timeout = timeout;
-                               slot_context->attn_led_request.request_context = request_context;
-                               hp_send_slot_event(slot_context, ATTN_LED_REQUEST_EVENT);
-                       }
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-                       break;
-
-               case SHPC_ASYNC_QUIESCE_DEVNODE_NOTIFY:
-                       dbg("%s SHPC_ASYNC_QUIESCE_DEVNODE_NOTIFY",__FUNCTION__);
-                       //
-                       // HP library notification: DevNode is quiesced
-                       //
-                       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                       ++slot_context->quiesce_replies;
-                       if( slot_context->quiesce_requests &&
-                               slot_context->quiesce_replies >= slot_context->quiesce_requests ) {
-                               slot_context->slot_quiesced = TRUE;
-                               hp_send_slot_event(slot_context, QUIESCE_EVENT);
-                       }
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-                       break;
-
-               case SHPC_ASYNC_CANCEL_QUIESCE_DEVNODE:
-                       dbg("%s SHPC_ASYNC_CANCEL_QUIESCE_DEVNODE",__FUNCTION__);
-                       //
-                       // HP library notification: could not quiesce DevNode
-                       //
-                       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                       slot_context->slot_quiesced = FALSE;
-                       hp_send_slot_event(slot_context, QUIESCE_EVENT);
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-                       //
-                       // Abort bus-rebalancing
-                       //
-                       spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-                       shpc_context->bus_released = FALSE;
-                       hp_send_event_to_all_slots(shpc_context, BUS_COMPLETE_EVENT);
-                       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-                       break;
-
-               default:
-                       status = STATUS_UNSUCCESSFUL;
-                       break;
-               }
-       }
-
-       return status;
-}
-
-// ****************************************************************************
-//
-// hp_Queryslot_psn() 
-//
-// Parameters
-//          shpc_context - Caller provided storage for SHPC context data.
-//          SlotID - Zero-based slot number (0..n-1).
-//          slot_psn - Pointer to Physical Slot Number
-//
-// Return Value
-//  STATUS_SUCCESS, or STATUS_UNSUCCESSFUL for invalid SlotID.
-//
-// ****************************************************************************
-long hp_Queryslot_psn(struct shpc_context *shpc_context, unsigned char slot_ID, unsigned long *slot_psn)
-{
-       struct slot_context *slot_context;
-       long status = STATUS_SUCCESS;
-       dbg("%s slot_ID[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_ID);
-       //
-       // Valid SlotID?
-       //
-       if( slot_ID >= shpc_context->number_of_slots || slot_psn == NULL ) {
-                               status = STATUS_UNSUCCESSFUL;
-       }
-       else {
-               //
-               // Which slot?
-               //
-               slot_context = &shpc_context->slot_context[ slot_ID ];
-               //
-               // Get slot PSN
-               //
-               *slot_psn = slot_context->slot_psn;
-       }
-       return status;
-}
-
-// ****************************************************************************
-//
-// hp_slot_timers1-10func(): Function passed to timer to send event
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-void hp_slot_timer1_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, SLOT_TIMER1_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_slot_timer2_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, SLOT_TIMER2_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_slot_timer3_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, SLOT_TIMER3_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_slot_timer4_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, SLOT_TIMER4_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_slot_timer5_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, SLOT_TIMER5_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_slot_timer6_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, SLOT_TIMER6_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_slot_timer7_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, SLOT_TIMER7_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_slot_timer8_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, SLOT_TIMER8_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_slot_timer9_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, SLOT_TIMER9_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_slot_timer10_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, SLOT_TIMER10_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-// ****************************************************************************
-//
-// hp_led_timers1-4_func(): Function passed to timer to send event
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-void hp_led_timer1_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, LED_TIMER1_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_led_timer2_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, LED_TIMER2_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_led_timer3_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, LED_TIMER3_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-void hp_led_timer4_func(unsigned long data){
-
-       struct slot_context *slot_context;
-       slot_context = (struct slot_context*) data;
-
-       dbg("%s", __FUNCTION__);
-       hp_set_slot_event_bit(slot_context, LED_TIMER4_EVENT);
-
-       wake_up_interruptible(&slot_context->slot_event);
-}
-
-// ****************************************************************************
-//
-// hp_clear_slot_event_bit():
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-void hp_clear_slot_event_bit(struct slot_context * slot_context, u32 mask)
-{
-//     dbg("%s -->slot bits %08X   MASK=%08X",__FUNCTION__ ,slot_context->slot_event_bits, mask);
-
-       down_interruptible(&slot_context->slot_event_bits_semaphore);
-       // cleareventbit
-       slot_context->slot_event_bits &= ~mask;
-       up(&slot_context->slot_event_bits_semaphore);
-}
-
-// ****************************************************************************
-//
-// hp_set_slot_event_bit():
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-void hp_set_slot_event_bit(struct slot_context * slot_context, u32 mask)
-{
-//     dbg("%s -->slot bits %08X   MASK=%08X",__FUNCTION__ ,slot_context->slot_event_bits, mask);
-
-       down_interruptible(&slot_context->slot_event_bits_semaphore);
-       // cleareventbit
-       slot_context->slot_event_bits |= mask;
-       up(&slot_context->slot_event_bits_semaphore);
-}
-
-// ****************************************************************************
-//
-// hp_clear_shpc_event_bit():
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-void hp_clear_shpc_event_bit(struct shpc_context * shpc_context, u32 mask)
-{
-       down_interruptible(&shpc_context->shpc_event_bits_semaphore);
-       // cleareventbit
-       shpc_context->shpc_event_bits &= ~mask;
-       up(&shpc_context->shpc_event_bits_semaphore);
-}
-
-// ****************************************************************************
-//
-// hp_set_shpc_event_bit():
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-void hp_set_shpc_event_bit(struct shpc_context * shpc_context, u32 mask)
-{
-       down_interruptible(&shpc_context->shpc_event_bits_semaphore);
-       // set event bit
-       shpc_context->shpc_event_bits |= mask;
-       up(&shpc_context->shpc_event_bits_semaphore);
-}
-
-// ****************************************************************************
-//
-// hp_send_event_to_all_slots():
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-void hp_send_event_to_all_slots(struct shpc_context *shpc_context, u32 mask)
-{
-       u8 i;
-       struct slot_context * slot_context;
-
-       down_interruptible(&shpc_context->shpc_event_bits_semaphore);
-       // set event bit
-       shpc_context->shpc_event_bits |= mask;
-       // send event to each slot thread
-       for( i=0; i<shpc_context->number_of_slots; ++i ) {
-               slot_context = &shpc_context->slot_context[ i ];
-               wake_up_interruptible(&slot_context->slot_event);
-       }
-       up(&shpc_context->shpc_event_bits_semaphore);
-}
-
-// ****************************************************************************
-//
-// hp_send_slot_event():
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-void hp_send_slot_event(struct slot_context * slot_context, u32 mask)
-{
-       // set event bit
-       hp_set_slot_event_bit(slot_context, mask);
-       wake_up_interruptible( &slot_context->slot_event);
-}
-
-
-// ****************************************************************************
-//
-// hp_get_led_cmd_available_mutex_thread():  run as a thread per each slot
-//
-// Parameters
-//     slot_context - Caller provided storage for slot context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-int hp_get_led_cmd_available_mutex_thread(void *ptr)
-{
-       long status = STATUS_SUCCESS;
-       struct shpc_context* shpc_context;
-       struct slot_context* slot_context;
-       int pid;
-       
-       lock_kernel ();
-       daemonize ("amdshpc_getledcmd_av_mutex");
-       unlock_kernel ();
-
-       slot_context = (struct slot_context* ) ptr;
-       shpc_context = (struct shpc_context* ) slot_context->shpc_context;
-       do {
-               interruptible_sleep_on(&slot_context->led_cmd_acquire_event);
-               if (slot_context->slot_event_bits & LED_CMD_ACQUIRE_EVENT){
-                       hp_clear_slot_event_bit(slot_context, LED_CMD_ACQUIRE_EVENT);
-                       pid = kernel_thread(hp_led_cmd_available_mutex_thread, slot_context, CLONE_SIGHAND);
-                       if (pid < 0) {
-                               err ("Can't start up our hp_led_cmd_available_mutex_thread\n");
-                               status = STATUS_UNSUCCESSFUL;
-                               break;
-                       }
-               } else {
-                       dbg("%s terminating return 0  slot_id[ %d:%d ]",__FUNCTION__,
-                               shpc_context->shpc_instance, slot_context->slot_number-1);
-                       return 0;
-               }
-       } while (1);
-       return(status);
-}
-
-// ****************************************************************************
-//
-// hp_led_cmd_available_mutex_thread():  run as a thread per each request for cmd
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-int hp_led_cmd_available_mutex_thread(void *ptr)
-{
-       struct shpc_context* shpc_context;
-       struct slot_context* slot_context;
-       
-       lock_kernel ();
-       daemonize ("amdshpc_ledcmd_av_mutex");
-       unlock_kernel ();
-
-       slot_context = (struct slot_context* ) ptr;
-       shpc_context = (struct shpc_context* ) slot_context->shpc_context;
-
-       //
-       // acquire the main mutex for all slots exclusion
-       //
-       down_interruptible(&shpc_context->cmd_available_mutex);
-       if ((shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)||
-               (shpc_context->shpc_event_bits & RESUME_EVENT)||
-               (shpc_context->shpc_event_bits & REMOVE_EVENT)){
-               dbg("%s return 0  slot_id[ %d:%d ]",__FUNCTION__,
-                       shpc_context->shpc_instance, slot_context->slot_number-1);
-               up(&shpc_context->cmd_available_mutex);
-               return 0;
-       }
-
-       //
-       // now tell our slot thread that it has the mutex
-       //
-       hp_set_shpc_event_bit(shpc_context, LED_CMD_AVAILABLE_MUTEX_EVENT);
-       wake_up_interruptible(&slot_context->slot_event);
-
-       //
-       // wait for our slot thread to release the mutex
-       //
-       interruptible_sleep_on(&slot_context->led_cmd_release_event);
-       if ((shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)||
-               (shpc_context->shpc_event_bits & RESUME_EVENT)||
-               (shpc_context->shpc_event_bits & REMOVE_EVENT)){
-               dbg("%s return 0  slot_id[ %d:%d ]",__FUNCTION__,
-                       shpc_context->shpc_instance, slot_context->slot_number-1);
-               up(&shpc_context->cmd_available_mutex);
-               return 0;
-       }
-       hp_clear_slot_event_bit(slot_context, LED_CMD_RELEASE_EVENT);
-
-       hp_clear_shpc_event_bit(shpc_context, LED_CMD_AVAILABLE_MUTEX_EVENT);
-       up(&shpc_context->cmd_available_mutex);
-       dbg("%s cmd_available_mutex RELEASED",__FUNCTION__);
-       return(0);
-}
-
-// ****************************************************************************
-//
-// hp_get_cmd_available_mutex_thread():  run as a thread per each slot
-//
-// Parameters
-//     slot_context - Caller provided storage for slot context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-int hp_get_cmd_available_mutex_thread(void *ptr)
-{
-       long status = STATUS_SUCCESS;
-       struct shpc_context* shpc_context;
-       struct slot_context* slot_context;
-       int pid;
-       
-       lock_kernel ();
-       daemonize ("amdshpc_getcmd_av_mutex");
-       unlock_kernel ();
-
-       slot_context = (struct slot_context* ) ptr;
-       shpc_context = (struct shpc_context* ) slot_context->shpc_context;
-
-       do {
-               interruptible_sleep_on(&slot_context->cmd_acquire_event);
-               if ((slot_context->slot_event_bits & CMD_ACQUIRE_EVENT) || 
-                   (slot_context->slot_event_bits & CMD_RELEASE_EVENT)){
-                       hp_clear_slot_event_bit(slot_context,CMD_ACQUIRE_EVENT);
-                       pid = kernel_thread(hp_cmd_available_mutex_thread, slot_context, CLONE_SIGHAND);
-                       if (pid < 0) {
-                               err ("Can't start up our hp_get_cmd_available_mutex_thread\n");
-                               status = STATUS_UNSUCCESSFUL;
-                               break;
-                       }
-               } else {
-                       dbg("%s terminating return 0  slot_id[ %d:%d ]",__FUNCTION__,
-                               shpc_context->shpc_instance, slot_context->slot_number-1);
-                       return 0;
-               }
-       } while (1);
-       return(status);
-}
-
-// ****************************************************************************
-//
-// hp_cmd_available_mutex_thread():  run as a thread per each request for cmd
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-int hp_cmd_available_mutex_thread(void *ptr)
-{
-       struct shpc_context* shpc_context;
-       struct slot_context* slot_context;
-       
-       lock_kernel ();
-       daemonize ("amdshpc_cmd_av_mutex");
-       unlock_kernel ();
-
-       slot_context = (struct slot_context* ) ptr;
-       shpc_context = (struct shpc_context* ) slot_context->shpc_context;
-
-       //
-       // acquire the main mutex for all slots exclusion
-       //
-       down_interruptible(&shpc_context->cmd_available_mutex);
-       if ((shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)||
-               (shpc_context->shpc_event_bits & RESUME_EVENT)||
-               (shpc_context->shpc_event_bits & REMOVE_EVENT)){
-               dbg("%s return 0  slot_id[ %d:%d ]",__FUNCTION__,
-                       shpc_context->shpc_instance, slot_context->slot_number-1);
-               up(&shpc_context->cmd_available_mutex);
-               return 0;
-       }
-
-       //
-       // now tell our slot thread that it has the mutex
-       //
-       hp_set_shpc_event_bit(shpc_context, CMD_AVAILABLE_MUTEX_EVENT);
-       wake_up_interruptible(&slot_context->slot_event);
-
-       //
-       // wait for our slot thread to release the mutex
-       //
-       interruptible_sleep_on(&slot_context->cmd_release_event);
-       if ((shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)||
-               (shpc_context->shpc_event_bits & RESUME_EVENT)||
-               (shpc_context->shpc_event_bits & REMOVE_EVENT)){
-               dbg("%s return 0  slot_id[ %d:%d ]",__FUNCTION__,
-                       shpc_context->shpc_instance, slot_context->slot_number-1);
-               up(&shpc_context->cmd_available_mutex);
-               return 0;
-       }
-       hp_clear_slot_event_bit(slot_context,CMD_RELEASE_EVENT);
-       hp_clear_shpc_event_bit(shpc_context, CMD_AVAILABLE_MUTEX_EVENT);
-       up(&shpc_context->cmd_available_mutex);
-       return(0);
-}
-
-// ****************************************************************************
-//
-// hp_get_bus_available_mutex_thread():  run as a thread per each slot
-//
-// Parameters
-//     slot_context - Caller provided storage for slot context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-int hp_get_bus_available_mutex_thread(void *ptr)
-{
-       long status = STATUS_SUCCESS;
-       struct shpc_context* shpc_context;
-       struct slot_context* slot_context;
-       int pid;
-       
-       lock_kernel ();
-       daemonize ("amdshpc_getbus_av_mutex");
-       unlock_kernel ();
-
-       slot_context = (struct slot_context* ) ptr;
-       shpc_context = (struct shpc_context* ) slot_context->shpc_context;
-
-       do {
-               interruptible_sleep_on(&slot_context->bus_acquire_event);
-               if (slot_context->slot_event_bits & BUS_ACQUIRE_EVENT) {
-                       hp_clear_slot_event_bit(slot_context, BUS_ACQUIRE_EVENT);
-                       pid = kernel_thread(hp_bus_available_mutex_thread, slot_context, CLONE_SIGHAND);
-                       if (pid < 0) {
-                               err ("Can't start up our hp_get_bus_available_mutex_thread\n");
-                               status = STATUS_UNSUCCESSFUL;
-                               break;
-                       }
-               } else {
-                       dbg("%s terminating return 0  slot_id[ %d:%d ]",__FUNCTION__,
-                               shpc_context->shpc_instance, slot_context->slot_number-1);
-                       return 0;
-               }
-       } while (1);
-       return(status);
-}
-
-// ****************************************************************************
-//
-// hp_bus_available_mutex_thread():
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-int hp_bus_available_mutex_thread(void *ptr)
-{
-       struct shpc_context* shpc_context;
-       struct slot_context* slot_context;
-       
-       lock_kernel ();
-       daemonize ("amdshpc_bus_av_mutex");
-       //  New name
-       unlock_kernel ();
-
-       slot_context = (struct slot_context* ) ptr;
-       shpc_context = (struct shpc_context* ) slot_context->shpc_context;
-
-       //
-       // acquire the main mutex for all slots exclusion
-       //
-       down_interruptible(&shpc_context->bus_available_mutex);
-       if ((shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)||
-               (shpc_context->shpc_event_bits & RESUME_EVENT)||
-               (shpc_context->shpc_event_bits & REMOVE_EVENT)){
-               dbg("%s return 0  slot_id[ %d:%d ]",__FUNCTION__,
-                       shpc_context->shpc_instance, slot_context->slot_number-1);
-               up(&shpc_context->bus_available_mutex);
-               return 0;
-       }
-
-       //
-       // now tell our slot thread that it has the mutex
-       //
-       hp_set_shpc_event_bit(shpc_context, BUS_AVAILABLE_MUTEX_EVENT);
-       wake_up_interruptible(&slot_context->slot_event);
-
-       //
-       // wait for our slot thread to release the mutex
-       //
-       interruptible_sleep_on(&slot_context->bus_release_event);
-       if ((shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)||
-               (shpc_context->shpc_event_bits & RESUME_EVENT)||
-               (shpc_context->shpc_event_bits & REMOVE_EVENT)){
-               dbg("%s return 0  slot_id[ %d:%d ]",__FUNCTION__,
-                       shpc_context->shpc_instance, slot_context->slot_number-1);
-               up(&shpc_context->bus_available_mutex);
-               return 0;
-       }
-       hp_clear_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-
-       hp_clear_shpc_event_bit(shpc_context, BUS_AVAILABLE_MUTEX_EVENT);
-       up(&shpc_context->bus_available_mutex);
-       return(0);
-}
-
-// ****************************************************************************
-//
-// call_back_routine():
-//
-// Parameters
-//     slot_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     void
-//
-// ****************************************************************************
-static unsigned long async_callback (void* driver_context,
-                                    u8 slot_id,
-                                    enum shpc_async_request async_request,
-                                    union SLOT_STATUS_INFO slot_status,
-                                    void* request_context )
-{
-       u8 phys_slot_num;
-       long rc=0;
-       struct pci_func *slot_func;
-       struct controller *ctrl;
-       struct shpc_context *shpc_context;
-       u8 bus=0;
-       u8 device=0;
-       u8 function=0;
-       unsigned long devices_still_quiescing = 0;
-
-       dbg("%s slot_id = %d",__FUNCTION__, slot_id);
-
-       ctrl = ((struct controller*) driver_context);
-       if (ctrl == NULL){
-               return -ENODEV;
-       }
-
-       shpc_context = (struct shpc_context* ) ctrl->shpc_context;
-       phys_slot_num = shpc_context->slot_context[slot_id].slot_psn;
-       
-       bus             = ctrl->bus;
-       device  = slot_id + 1;
-       
-       dbg("%s - physical_slot = %d  instance = %d",__FUNCTION__, phys_slot_num, shpc_context->shpc_instance);
-
-       switch( async_request ) {
-       case SHPC_ASYNC_ENABLE_SLOT:
-               dbg("%s SHPC_ASYNC_ENABLE_SLOT",__FUNCTION__);
-               dbg("%s slot occupied = %d",__FUNCTION__,shpc_context->slot_context[slot_id].slot_occupied);
-               if (shpc_context->slot_context[slot_id].slot_occupied == 1) {
-                       return 0;
-               }
-               //
-               // Force pci-bus re-enumeration (probe), to load drivers on behalf on enabled device(s) on this slot.
-               //
-               dbg("%s   In callback routine processing enable slot",__FUNCTION__ );
-
-               dbg("%s   CALLING amdshpc_slot_find  bus, dev, fn = %d, %d, %d\n",__FUNCTION__ ,
-                       bus, device, function);
-               slot_func = amdshpc_slot_find(bus, device, function);
-               dbg("%s  slot_func = %p ",__FUNCTION__ , slot_func);
-               if (!slot_func) {
-                       dbg("%s --> slot_func not found",__FUNCTION__ );
-                       return -ENODEV;
-               }
-
-               slot_func->bus = bus;
-               slot_func->device = device;
-               slot_func->function = function;
-               slot_func->configured = 0;
-               dbg("%s   CALLING amdshpc_process_SI(ctrl=%p slot_func=%p)\n",__FUNCTION__ , ctrl, slot_func);
-               rc = amdshpc_process_SI(ctrl, slot_func);
-               if (!rc ) {
-                       shpc_context->slot_context[slot_id].slot_occupied = 1;
-               }
-               dbg("%s   amdshpc_process_SI returned  rc=%d",__FUNCTION__ , (int)rc);
-               break;
-
-       case SHPC_ASYNC_SURPRISE_REMOVE:
-               dbg("%s SHPC_ASYNC_SURPRISE_REMOVE",__FUNCTION__);
-               //
-               // Something went wrong with the slot (eg, power-fault), and loaded drivers must be removed.
-               //
-       case SHPC_ASYNC_QUIESCE_DEVNODE:
-               dbg("%s SHPC_ASYNC_QUIESCE_DEVNODE",__FUNCTION__);
-               //
-               // Friendly opportunity to quiesce (remove) drivers, prior to disabling the slot.
-               // After device drivers are removed, it's OK to show messages to that effect.
-               //
-               // If device quiecing will complete at a later time (from a separate thread),
-               // then set "devices_still_quiescing" accordingly, and upon quiecing-completion,
-               // call hp_StartAsyncRequest() with a "SHPC_ASYNC_QUIESCE_DEVNODE_NOTIFY" request.
-               //
-       case SHPC_ASYNC_QUIESCE_DEVNODE_QUIET:
-               dbg("%s SHPC_ASYNC_QUIESCE_DEVNODE_QUIET",__FUNCTION__);
-               //
-               // Friendly opportunity to quiesce (remove) drivers, prior to disabling the slot.
-               // After device drivers are removed, don't show messages to that effect.
-               //
-               // If device quiecing will complete at a later time (from a separate thread),
-               // then set "devices_still_quiescing" accordingly, and upon quiecing-completion,
-               // call hp_StartAsyncRequest() with a "SHPC_ASYNC_QUIESCE_DEVNODE_NOTIFY" request.
-               //
-               dbg("%s   Processing disable slot",__FUNCTION__ );
-               
-               dbg("%s   CALLING amdshpc_slot_find  bus, dev, fn = %d, %d, %d\n",__FUNCTION__ ,
-                       bus, device, function);
-
-               slot_func = amdshpc_slot_find(bus, device, function);
-               dbg("%s  slot_func = %p ",__FUNCTION__ , slot_func);
-               if (!slot_func) {
-                       dbg("%s --> slot_func not found",__FUNCTION__ );
-                       return -ENODEV;
-               }
-
-               dbg("%s   CALLING amdshpc_process_SS(ctrl=%p slot_func=%p)\n",__FUNCTION__ , ctrl, slot_func);
-               rc = amdshpc_process_SS(ctrl, slot_func);
-               if (!rc ) {
-                       shpc_context->slot_context[slot_id].slot_occupied = 0;
-               }
-               dbg("%s   amdshpc_process_SS returned  rc=%d",__FUNCTION__ , (int)rc);
-
-               break;
-
-       case SHPC_ASYNC_DISABLE_SLOT:
-               dbg("%s SHPC_ASYNC_DISABLE_SLOT",__FUNCTION__);
-               //
-               // Just a notification, may be used to update some interested GUI application.
-               //
-               break;
-
-       default:
-               break;
-       }
-       return devices_still_quiescing;
-}
-
diff --git a/drivers/pci/hotplug/amdshpc_ddi.h b/drivers/pci/hotplug/amdshpc_ddi.h
deleted file mode 100644 (file)
index 3377dcb..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
-* Copyright (C) 2002,2003 Advanced Micro Devices, Inc.
-* YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS
-* AND CONDITIONS OF THE GNU GENERAL PUBLIC
-* LICENSE FOUND IN THE "GPL.TXT" FILE THAT IS
-* INCLUDED WITH THIS FILE AND POSTED AT
-* http://www.gnu.org/licenses/gpl.html
-*
-*
-* This driver is to be used as a skeleton driver to be show how to interface
-* with the pci hotplug core easily.
-*
-* Send feedback to <david.keck@amd.com>
-*
-*/
-
-
-#ifndef _SHPC_DDI_H_
-#define _SHPC_DDI_H_
-
-#include "amdshpc.h"
-//
-// SHPC Constants
-//
-#define        SHPC_MAX_NUM_SLOTS              4
-
-
-// ****************************************************************************
-//
-// hp_AddDevice()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data (per hardware-instance).
-//     driver_context - Caller provided pointer to be returned upon completion.
-//     Callback - Caller provided function to be called upon completion of async requests.
-//  shpc_instance - Zero-based hardware instance.
-//
-// Return Value
-//  Status returned by any system calls made within hp_AddDevice().
-//
-// ****************************************************************************
-long
-       hp_AddDevice(
-                       struct shpc_context *shpc_context,
-                       void* driver_context,
-                       SHPC_ASYNC_CALLBACK Callback,
-                       unsigned long shpc_instance
-                       );
-
-
-// ****************************************************************************
-//
-// hp_StartDevice()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//  mmio_base_addr - from u.Memory member of CmResourceTypeMemory
-//     IntVector - from u.Interrupt.Vector member of CmResourceTypeInterrupt
-//     IntMode - from Flags member of CmResourceTypeInterrupt
-//     IntShared - from ShareDisposition member of CmResourceTypeInterrupt
-//     IntAffinity - from u.Interrupt.Affinity member of CmResourceTypeInterrupt
-//
-// Return Value
-//  Status returned by any system calls made within hp_StartDevice().
-//
-// Comments:
-//     The caller is responsible for mapping mmio_base_addr, via MmMapIoSpace(),
-//     before calling hp_StartDevice().
-//
-// ****************************************************************************
-long
-       hp_StartDevice(
-                     struct shpc_context* shpc_context
-                     );
-
-
-// ****************************************************************************
-//
-// hp_StopDevice() 
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//  Status returned by any system calls made within hp_StopDevice().
-//
-// Comments:
-//     The caller is responsible for unmapping mmio_base_addr, via MmUnmapIoSpace(),
-//  after calling hp_StopDevice() for resource re-balancing or device removal.
-//
-// ****************************************************************************
-long hp_StopDevice(struct shpc_context *shpc_context);
-
-// ****************************************************************************
-//
-// hp_SuspendDevice()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//  Status returned by any system calls made within hp_SuspendDevice().
-//
-// Comments:
-//     hp_SuspendDevice() must be called before transitioning away from PowerDeviceD0.
-//
-// ****************************************************************************
-long hp_SuspendDevice(struct shpc_context *shpc_context);
-
-// ****************************************************************************
-//
-// hp_ResumeDevice() 
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//  Status returned by any system calls made within hp_ResumeDevice().
-//
-// Comments:
-//     hp_SuspendDevice() must be called after transitioning back to PowerDeviceD0.
-//
-// ****************************************************************************
-long hp_ResumeDevice(struct shpc_context *shpc_context);
-
-// ****************************************************************************
-//
-// hp_QuerySlots() 
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//     SlotConfig - Caller provided storage for slots configuration info.
-//
-// Return Value
-//  Status returned by any system calls made within hp_QuerySlots().
-//
-// ****************************************************************************
-long hp_QuerySlots(struct shpc_context *shpc_context, union SLOT_CONFIG_INFO* SlotConfig);
-
-
-// ****************************************************************************
-//
-// hp_QuerySlotStatus()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//     slot_id - Zero-based slot number (0..n-1).
-//     Query - Pointer to Slot Status Structure
-//
-// Return Value
-//  Status returned by any system calls made within hp_QuerySlotStatus().
-//
-// ****************************************************************************
-long hp_QuerySlotStatus(struct shpc_context *shpc_context, u8 slot_id, union SLOT_STATUS_INFO* Query);
-
-// ****************************************************************************
-//
-// hp_Queryslot_psn()
-//
-// Parameters
-//          shpc_context - Caller provided storage for SHPC context data.
-//          SlotID - Zero-based slot number (0..n-1).
-//          slot_psn - Pointer to Physical Slot Number
-//
-// Return Value
-//  STATUS_SUCCESS, or STATUS_UNSUCCESSFUL for invalid SlotID.
-//
-// ****************************************************************************
-long hp_Queryslot_psn(struct shpc_context *shpc_context, unsigned char slot_ID, unsigned long *slot_psn);
-
-// ****************************************************************************
-//
-// hp_StartAsyncRequest()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//     slot_id - Zero-based slot number (0..n-1).
-//     Request - Async request: Slot "Enable/Disable", AttnLED "Attn/Normal").
-//     timeout - For AttnLED "Attn" requests (in seconds)
-//     request_context - Caller provided pointer to be returned upon completion.
-//
-// Return Value
-//     STATUS_SUCCESS if the request is accepted.  The Callback() is later invoked with a completion status.
-//  STATUS_UNSUCCESSFUL if the request is rejected (invalid parameters, or similar request in progress),
-//
-// Comment:
-//     For AttnLED "Attn" requests, the completion Callback() function is invoked as soon as the hardware
-//     completes (Blink) execution.  When the timeout period expires, the AttnLED is brought back to
-//  its "Normal" (On/Off) state, and the Callback() is invoked once again.
-//
-// ****************************************************************************
-long hp_StartAsyncRequest(
-                        struct shpc_context *shpc_context,
-                        u8 slot_id,     
-                        enum shpc_async_request Request,
-                        u32 timeout,                            
-                        void* request_context                           
-                        );
-
-
-// ****************************************************************************
-//
-// hp_RegisterUserEvent()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//     user_event_pointer - Pointer to caller's provided EVENT object.
-//
-// Return Value
-//     STATUS_SUCCESS if the request is accepted.
-//  STATUS_UNSUCCESSFUL if the request is rejected (EVENT already registered).
-//
-// ****************************************************************************
-long hp_RegisterUserEvent(
-                        struct shpc_context *shpc_context,
-                        wait_queue_head_t *user_event_pointer
-                        );
-
-
-// ****************************************************************************
-//
-// hp_UnRegisterUserEvent()
-//
-// Parameters
-//     shpc_context - Caller provided storage for SHPC context data.
-//
-// Return Value
-//     STATUS_SUCCESS if the request is accepted.
-//  STATUS_UNSUCCESSFUL if the request is rejected (EVENT not previously registered).
-//
-// ****************************************************************************
-long hp_UnRegisterUserEvent(struct shpc_context *shpc_context);
-
-#endif // _SHPC_DDI_H_
-
diff --git a/drivers/pci/hotplug/amdshpc_dsb.c b/drivers/pci/hotplug/amdshpc_dsb.c
deleted file mode 100644 (file)
index b25a8d0..0000000
+++ /dev/null
@@ -1,1502 +0,0 @@
-/*
- * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (C) 2001,2003 IBM Corp.
- * Copyright (C) 2002-2003 Advanced Micro Devices
- * 
- * YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS
- * AND CONDITIONS OF THE GNU GENERAL PUBLIC
- * LICENSE FOUND IN THE "GPL.TXT" FILE THAT IS
- * INCLUDED WITH THIS FILE AND POSTED AT
- * http://www.gnu.org/licenses/gpl.html
- *
- * Send feedback to <david.keck@amd.com>
- *
- */
-
-#include <linux/module.h>
-#include <linux/sched.h>
-#include "amdshpc_ddi.h"
-#include "amdshpc.h"
-
-
-// ****************************************************************************
-//
-// hp_at_slot_enabled_wait_for_slot_request()
-//
-// ****************************************************************************
-long
-hp_at_slot_enabled_wait_for_slot_request(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SLOT_STATUS_INFO slot_status;
-       unsigned long  DevNodes;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Slot Enabled: complete pending slot request
-       //
-       if( slot_context->slot_completion.done ) {
-               dbg("%s -->ENABLE_DONE: slot_id[ %d:%d ]  card_speed_mode[ %d+%d ]  bus_speed_mode[ %d ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       slot_context->card_speed_mode, slot_context->card_pci66_capable,
-                       shpc_context->bus_speed_mode );
-               //
-               // Call Completion Callback()
-               //
-               hp_QuerySlotStatus(     shpc_context, slot_context->slot_number - 1, &slot_status );
-               slot_status.x.lu_request_failed = slot_context->slot_completion.failed;
-               shpc_context->async_callback(
-                       shpc_context->driver_context,
-                       slot_context->slot_number - 1,
-                       slot_context->slot_completion.type,
-                       slot_status,
-                       slot_context->slot_completion.request_context );
-
-               //
-               // Signal registered user EVENT
-               //
-               hp_signal_user_event( shpc_context );
-
-               //
-               // Clear completion flag
-               //
-               slot_context->slot_completion.done = FALSE;
-       }
-
-       //
-       // Clear Button EVENT before waiting
-       //
-       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-       hp_clear_slot_event_bit(slot_context, ATTN_BUTTON_EVENT);
-       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-       //
-       // Wait for slot request
-       //
-       shpc_context->shpc_event_bits = 0;slot_context->slot_event_bits = 0;
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & ATTN_BUTTON_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_REQUEST_EVENT) ||
-               (slot_context->slot_event_bits & BUS_REBALANCE_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Notify unrequested removal
-               //
-               slot_context->slot_completion.hw_initiated = TRUE;
-               slot_context->slot_completion.type = SHPC_ASYNC_SURPRISE_REMOVE;
-               slot_context->slot_completion.failed = HP_FALSE;
-               slot_context->slot_completion.request_context = NULL;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // bus_rebalance_event
-       //
-       else if(slot_context->slot_event_bits & BUS_REBALANCE_EVENT) {
-               //
-               // Clear Quiesced EVENT before invoking Callback()
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->quiesce_requests = 0;
-               slot_context->quiesce_replies = 0;
-               slot_context->slot_quiesced = FALSE;
-               hp_clear_slot_event_bit(slot_context, QUIESCE_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Call Completion Callback() to quiesce DevNode(s)
-               //
-               slot_status.AsDWord = 0;
-               DevNodes = shpc_context->async_callback(
-                       shpc_context->driver_context,
-                       slot_context->slot_number - 1,
-                       SHPC_ASYNC_QUIESCE_DEVNODE_QUIET,
-                       slot_status,
-                       ( void* )(unsigned long)slot_context->slot_psn );
-
-               //
-               // Update request count
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->quiesce_requests = DevNodes;
-               if( slot_context->quiesce_requests == 0 ||
-                       slot_context->quiesce_replies >= slot_context->quiesce_requests ) {
-                       slot_context->slot_quiesced = TRUE;
-                       hp_send_slot_event(slot_context, QUIESCE_EVENT);
-               }
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Wait for DevNode quiescing
-               //
-               dbg("%s -->BUS_REBALANCE: slot_id[ %d:%d ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_stop_on_bus_rebalance;
-       }
-       //
-       // attn_button_event
-       //
-       else if(slot_context->slot_event_bits & ATTN_BUTTON_EVENT) {
-               //
-               // Set completion info for HW-initiated request
-               //
-               slot_context->slot_completion.hw_initiated = TRUE;
-               slot_context->slot_completion.type = SHPC_ASYNC_DISABLE_SLOT;
-               slot_context->slot_completion.request_context = NULL;
-
-               //
-               // Grab Command MUTEX to blink Power LED
-               //
-               dbg("%s -->DISABLE_REQ: slot_id[ %d:%d ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_led_cmd_available;
-       }
-       //
-       // SlotRequestEvent
-       //
-       else if(slot_context->slot_event_bits & SLOT_REQUEST_EVENT) {
-               //
-               // Set completion info for SW-initiated request
-               //
-               slot_context->slot_completion.hw_initiated = FALSE;
-               slot_context->slot_completion.type = slot_context->slot_request.type;
-               slot_context->slot_completion.request_context = slot_context->slot_request.request_context;
-
-               //
-               // Request to disable slot?
-               //
-               if( slot_context->slot_request.type == SHPC_ASYNC_DISABLE_SLOT ) {
-                       //
-                       // Grab Command MUTEX to blink Power LED
-                       //
-                       dbg("%s -->DISABLE_REQ: slot_id[ %d:%d ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_led_cmd_available;
-               }
-               else {
-                       //
-                       // Slot already enabled, just complete the request
-                       //
-                       dbg("%s -->ENABLE_REQ: slot_id[ %d:%d ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       slot_context->slot_completion.failed = HP_FALSE;
-                       slot_context->slot_completion.done = TRUE;
-               }
-
-               //
-               // Allow next SW-initiated slot request while processing this one
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               hp_clear_slot_event_bit(slot_context, SLOT_REQUEST_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_enabled_wait_for_stop_on_bus_rebalance()
-//
-// ****************************************************************************
-long
-hp_at_slot_enabled_wait_for_stop_on_bus_rebalance(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER1_EVENT);
-       slot_context->slot_timer1.data = (unsigned long)slot_context;
-       slot_context->slot_timer1.function = hp_slot_timer1_func;
-       slot_context->slot_timer1.expires = jiffies + QUIESCE_QUIET_TIMEOUT;
-       add_timer(&slot_context->slot_timer1);
-
-       //
-       // Wait for Quiescing EVENT
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & QUIESCE_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER1_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER1_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer1);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Notify unrequested removal
-               //
-               slot_context->slot_completion.hw_initiated = TRUE;
-               slot_context->slot_completion.type = SHPC_ASYNC_SURPRISE_REMOVE;
-               slot_context->slot_completion.failed = HP_FALSE;
-               slot_context->slot_completion.request_context = NULL;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // quiesce_event, timeout
-       //
-       else if((slot_context->slot_event_bits & QUIESCE_EVENT) || (slot_context->slot_event_bits & SLOT_TIMER1_EVENT)) {
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               if((slot_context->slot_event_bits & SLOT_TIMER1_EVENT) || slot_context->slot_quiesced ) {
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-                       //
-                       // Grab Command MUTEX to set slot at power-only
-                       //
-                       if((slot_context->slot_event_bits & SLOT_TIMER1_EVENT)) {
-                               dbg("%s -->BUS_REBALANCE: slot_id[ %d:%d ] Quiesce timeout",__FUNCTION__ ,
-                                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       }
-                       else {
-                               dbg("%s -->BUS_REBALANCE: slot_id[ %d:%d ] Slot Quiesced",__FUNCTION__ ,
-                                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       }
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_power_cmd_available;
-               }
-               else {
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-                       //
-                       // Cancel bus re-balancing and treat it as a "Slot Enabled" request
-                       //
-                       slot_context->slot_completion.hw_initiated = TRUE;
-                       slot_context->slot_completion.type = SHPC_ASYNC_ENABLE_SLOT;
-                       slot_context->slot_completion.request_context = NULL;
-                       slot_context->slot_completion.failed = HP_FALSE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       dbg("%s -->BUS_REBALANCE: slot_id[ %d:%d ] Cancelled: BUSY DevNode",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_slot_request;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_enabled_wait_for_power_cmd_available() 
-//
-// ****************************************************************************
-long
-hp_at_slot_enabled_wait_for_power_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       struct task_struct;
-       union SHPC_COMMAND_WREG command_reg;
-       unsigned long   old_irq_flags;
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-
-               //
-               // Notify unrequested removal
-               //
-               slot_context->slot_completion.hw_initiated = TRUE;
-               slot_context->slot_completion.type = SHPC_ASYNC_SURPRISE_REMOVE;
-               slot_context->slot_completion.failed = HP_FALSE;
-               slot_context->slot_completion.request_context = NULL;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_available_mutex
-       //
-       else if(shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Set slot to "Disable" and blink Power LED
-               //
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_LED_BLINK;
-               command_reg.Slot.attention_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.state = SHPC_DISABLE_SLOT;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for command to complete (while holding MUTEX)
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_power_cmd_completion;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_enabled_wait_for_power_cmd_completion()
-//
-// ****************************************************************************
-long
-hp_at_slot_enabled_wait_for_power_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SLOT_STATUS_INFO slot_status;
-       union SHPC_STATUS_WREG status_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER2_EVENT);
-       slot_context->slot_timer2.data = (unsigned long)slot_context;
-       slot_context->slot_timer2.function = hp_slot_timer2_func;
-       slot_context->slot_timer2.expires = jiffies + FIFTEEN_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer2);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER2_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER2_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer2);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Notify unrequested removal
-               //
-               slot_context->slot_completion.hw_initiated = TRUE;
-               slot_context->slot_completion.type = SHPC_ASYNC_SURPRISE_REMOVE;
-               slot_context->slot_completion.failed = HP_FALSE;
-               slot_context->slot_completion.request_context = NULL;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_completion_event, timeout
-       //
-               else if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-                               (slot_context->slot_event_bits & SLOT_TIMER2_EVENT)) {
-               //
-               // Command completed OK?
-               //
-               status_reg.AsWord = readw(shpc_context->mmio_base_addr + SHPC_STATUS_REG_OFFSET);
-
-               if( status_reg.x.BSY == SHPC_STATUS_CLEARED &&
-                       status_reg.x.MRLO_ERR == SHPC_STATUS_CLEARED &&
-                       status_reg.x.INVCMD_ERR == SHPC_STATUS_CLEARED ) {
-                       //
-                       // Flag this slot as DISABLED
-                       //
-                       hp_flag_slot_as_disabled( shpc_context, slot_context );
-
-                       //
-                       // Call Completion Callback(): slot disabled
-                       //
-                       hp_QuerySlotStatus(     shpc_context, slot_context->slot_number - 1, &slot_status );
-                       slot_status.x.lu_request_failed = HP_FALSE;
-                       shpc_context->async_callback(
-                               shpc_context->driver_context,
-                               slot_context->slot_number - 1,
-                               SHPC_ASYNC_DISABLE_SLOT,
-                               slot_status,
-                               NULL );
-
-                       //
-                       // Signal registered user EVENT
-                       //
-                       hp_signal_user_event( shpc_context );
-
-                       //
-                       // Treat it as an on-going ENABLE request
-                       //
-                       slot_context->slot_completion.hw_initiated = TRUE;
-                       slot_context->slot_completion.type = SHPC_ASYNC_ENABLE_SLOT;
-                       slot_context->slot_completion.request_context = NULL;
-
-                       //
-                       // Grab Command MUTEX to power-on the slot
-                       //
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_power_cmd_available;
-               }
-               else {
-                       //
-                       // Treat it as a HW-initiated DISABLE request
-                       //
-                       slot_context->slot_completion.hw_initiated = TRUE;
-                       slot_context->slot_completion.type = SHPC_ASYNC_DISABLE_SLOT;
-                       slot_context->slot_completion.failed = HP_FALSE;
-                       slot_context->slot_completion.request_context = NULL;
-                       slot_context->slot_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to disable slot
-                       //
-                       dbg("%s -->CMD_ERROR: slot_id[ %d:%d ]  Cmd[ %X ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1, status_reg.AsWord );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Release Command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_release_event);
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_enabled_wait_for_led_cmd_available()
-//
-// ****************************************************************************
-long
-hp_at_slot_enabled_wait_for_led_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_available_mutex
-       //
-       else if(shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Blink Power LED
-               //
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_LED_BLINK;
-               command_reg.Slot.attention_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.state = SHPC_SLOT_NO_CHANGE;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for command to complete (while holding MUTEX)
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_led_cmd_completion;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               status =STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_enabled_wait_for_led_cmd_completion()
-//
-// ****************************************************************************
-long
-hp_at_slot_enabled_wait_for_led_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SLOT_STATUS_INFO slot_status;
-       union SHPC_STATUS_WREG status_reg;
-       unsigned long  DevNodes;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER3_EVENT);
-       slot_context->slot_timer3.data = (unsigned long)slot_context;
-       slot_context->slot_timer3.function = hp_slot_timer3_func;
-       slot_context->slot_timer3.expires = jiffies + ONE_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer3);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-                (slot_context->slot_event_bits & ALERT_EVENT) ||
-                (slot_context->slot_event_bits & SLOT_TIMER3_EVENT) ||
-                (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER3_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer3);
-       }
-       dbg("%s -->slot bits %08X   shpc bits  %08X",__FUNCTION__ ,
-               slot_context->slot_event_bits,shpc_context->shpc_event_bits);
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_completion_event, timeout
-       //
-       else if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-                       (slot_context->slot_event_bits & SLOT_TIMER3_EVENT)) {
-               //
-               // Command completed OK?
-               //
-               status_reg.AsWord = readw(shpc_context->mmio_base_addr + SHPC_STATUS_REG_OFFSET);
-
-               if( status_reg.x.BSY == SHPC_STATUS_CLEARED &&
-                       status_reg.x.MRLO_ERR == SHPC_STATUS_CLEARED &&
-                       status_reg.x.INVCMD_ERR == SHPC_STATUS_CLEARED ) {
-                       //
-                       // Allow cancellation of operation?
-                       //
-                       if( slot_context->slot_completion.hw_initiated ) {
-                               //
-                               // Wait for 5 sec timeout
-                               //
-                               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_timeout;
-                       }
-                       else {
-                               //
-                               // Clear Quiesced EVENT before invoking Callback()
-                               //
-                               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                               slot_context->quiesce_requests = 0;
-                               slot_context->quiesce_replies = 0;
-                               slot_context->slot_quiesced = FALSE;
-                               hp_clear_slot_event_bit(slot_context, QUIESCE_EVENT);
-                               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-                               //
-                               // Call Completion Callback() to quiesce DevNode(s)
-                               //
-                               slot_status.AsDWord = 0;
-                               DevNodes = shpc_context->async_callback(
-                                       shpc_context->driver_context,
-                                       slot_context->slot_number - 1,
-                                       SHPC_ASYNC_QUIESCE_DEVNODE,
-                                       slot_status,
-                                       ( void* )(unsigned long)slot_context->slot_psn );
-
-                               //
-                               // Update request count
-                               //
-                               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                               slot_context->quiesce_requests = DevNodes;
-                               if( slot_context->quiesce_requests == 0 ||
-                                       slot_context->quiesce_replies >= slot_context->quiesce_requests ) {
-                                       slot_context->slot_quiesced = TRUE;
-                                       hp_send_slot_event(slot_context, QUIESCE_EVENT);
-                               }
-                               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-                               //
-                               // Wait for DevNode quiescing
-                               //
-                               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_stop_on_slot_disable;
-                       }
-               }
-               else {
-                       //
-                       // Fail on-going request
-                       //
-                       slot_context->slot_completion.failed = HP_TRUE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to disable slot
-                       //
-                       dbg("%s -->CMD_ERROR: slot_id[ %d:%d ]  Cmd[ %X ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1, status_reg.AsWord );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Release Command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_release_event);
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_enabled_wait_for_timeout()
-//
-// ****************************************************************************
-long
-hp_at_slot_enabled_wait_for_timeout(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SLOT_STATUS_INFO slot_status;
-       unsigned long  DevNodes;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Clear Button EVENT before waiting
-       //
-       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-       down_interruptible(&slot_context->slot_event_bits_semaphore);
-       slot_context->slot_event_bits &= ~ATTN_BUTTON_EVENT;
-       up(&slot_context->slot_event_bits_semaphore);
-       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER7_EVENT);
-       slot_context->slot_timer7.data = (unsigned long)slot_context;
-       slot_context->slot_timer7.function = hp_slot_timer7_func;
-       slot_context->slot_timer7.expires = jiffies + FIVE_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer7);
-
-       //
-       // Wait for 5 sec timeout
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & ATTN_BUTTON_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER7_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER7_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer7);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // attn_button_event
-       //
-       else if(slot_context->slot_event_bits & ATTN_BUTTON_EVENT) {
-               //
-               // Cancel request, grab Command MUTEX to Power LED back ON
-               //
-               dbg("%s -->DISABLE_REQ: slot_id[ %d:%d ] Cancelled: Attn Button",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_enabled_wait_for_led_cmd_available;
-       }
-       //
-       // timeout
-       //
-       else if(slot_context->slot_event_bits & SLOT_TIMER7_EVENT) {
-               //
-               // Clear Quiesced EVENT before invoking Callback()
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->quiesce_requests = 0;
-               slot_context->quiesce_replies = 0;
-               slot_context->slot_quiesced = FALSE;
-               hp_clear_slot_event_bit(slot_context, QUIESCE_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Call Completion Callback() to quiesce DevNode(s)
-               //
-               slot_status.AsDWord = 0;
-               DevNodes = shpc_context->async_callback(
-                       shpc_context->driver_context,
-                       slot_context->slot_number - 1,
-                       SHPC_ASYNC_QUIESCE_DEVNODE,
-                       slot_status,
-                       ( void* )(unsigned long)slot_context->slot_psn );
-
-               //
-               // Update request count
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->quiesce_requests = DevNodes;
-               if( slot_context->quiesce_requests == 0 ||
-                       slot_context->quiesce_replies == slot_context->quiesce_requests ) {
-                       slot_context->slot_quiesced = TRUE;
-                       hp_send_slot_event(slot_context, QUIESCE_EVENT);
-               }
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Wait for DevNode quiescing
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_stop_on_slot_disable;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_enabled_wait_for_stop_on_slot_disable()
-//
-// ****************************************************************************
-long
-hp_at_slot_enabled_wait_for_stop_on_slot_disable(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SLOT_STATUS_INFO slot_status;
-       unsigned long  DevNodes;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__ ,shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER4_EVENT);
-       slot_context->slot_timer4.data = (unsigned long)slot_context;
-       slot_context->slot_timer4.function = hp_slot_timer4_func;
-       slot_context->slot_timer4.expires = jiffies + QUIESCE_QUIET_TIMEOUT;
-       add_timer(&slot_context->slot_timer4);
-
-       //
-       // Wait for Quiescing EVENT
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & QUIESCE_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER4_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER4_EVENT)) {
-       //
-       // delete the timer because we got an event other than the timer
-       //
-               del_timer_sync(&slot_context->slot_timer4);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // quiesce_event
-       //
-       else if(slot_context->slot_event_bits & QUIESCE_EVENT) {
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               if( slot_context->slot_quiesced ) {
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-                       //
-                       // Complete succesful DISABLE request
-                       //
-                       slot_context->slot_completion.failed = HP_FALSE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to disable slot
-                       //
-                       //
-                       dbg("%s -->DISABLE_REQ: slot_id[ %d:%d ] Slot Quiesced",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-               }
-               else {
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-                       //
-                       // Cancel request, grab Command MUTEX to turn Power LED back ON
-                       //
-                       slot_context->slot_completion.hw_initiated = TRUE;
-                       slot_context->slot_completion.type = SHPC_ASYNC_ENABLE_SLOT;
-                       slot_context->slot_completion.request_context = NULL;
-                       slot_context->slot_completion.failed = HP_FALSE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       dbg("%s -->DISABLE_REQ: slot_id[ %d:%d ] Cancelled: BUSY DevNode",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_enabled_wait_for_led_cmd_available;
-               }
-       }
-       //
-       // timeout
-       //
-       else if(slot_context->slot_event_bits & SLOT_TIMER4_EVENT) {
-               //
-               // Clear Quiesced EVENT before invoking Callback()
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->quiesce_requests = 0;
-               slot_context->quiesce_replies = 0;
-               slot_context->slot_quiesced = FALSE;
-               hp_clear_slot_event_bit(slot_context, QUIESCE_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Call Completion Callback() to quiesce DevNode(s)
-               //
-               slot_status.AsDWord = 0;
-               DevNodes = shpc_context->async_callback(
-                       shpc_context->driver_context,
-                       slot_context->slot_number - 1,
-                       SHPC_ASYNC_QUIESCE_DEVNODE_QUIET,
-                       slot_status,
-                       ( void* )(unsigned long)slot_context->slot_psn );
-
-               //
-               // Update request count
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->quiesce_requests = DevNodes;
-               if( slot_context->quiesce_requests == 0 ||
-                       slot_context->quiesce_replies == slot_context->quiesce_requests ) {
-                       slot_context->slot_quiesced = TRUE;
-                       hp_send_slot_event(slot_context, QUIESCE_EVENT);
-               }
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Wait for DevNode quiescing
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_stop_on_slot_disable_quiet;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_enabled_wait_for_stop_on_slot_disable_quiet()
-//
-// ****************************************************************************
-long
-hp_at_slot_enabled_wait_for_stop_on_slot_disable_quiet(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__ ,shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER5_EVENT);
-       slot_context->slot_timer5.data = (unsigned long)slot_context;
-       slot_context->slot_timer5.function = hp_slot_timer5_func;
-       slot_context->slot_timer5.expires = jiffies + QUIESCE_QUIET_TIMEOUT;
-       add_timer(&slot_context->slot_timer5);
-
-       //
-       // Wait for Quiescing EVENT
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & QUIESCE_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER5_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER5_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer5);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // quiesce_event, timeout
-       //
-       else if((slot_context->slot_event_bits & QUIESCE_EVENT) ||
-                       (slot_context->slot_event_bits & SLOT_TIMER5_EVENT)) {
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               if((slot_context->slot_event_bits & SLOT_TIMER5_EVENT) || slot_context->slot_quiesced ) {
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-                       //
-                       // Complete succesful DISABLE request
-                       //
-                       slot_context->slot_completion.failed = HP_FALSE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to disable slot
-                       //
-                       //
-                       if(slot_context->slot_event_bits & SLOT_TIMER5_EVENT) {
-                               dbg("%s -->DISABLE_REQ: slot_id[ %d:%d ] Quiesce timeout",__FUNCTION__ ,
-                                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       }
-                       else {
-                               dbg("%s -->DISABLE_REQ: slot_id[ %d:%d ] Slot Quiesced",__FUNCTION__ ,
-                                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       }
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-               }
-               else {
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-                       //
-                       // Cancel request, grab Command MUTEX to turn Power LED back ON
-                       //
-                       dbg("%s -->DISABLE_REQ: slot_id[ %d:%d ] Cancelled: BUSY DevNode",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_enabled_wait_for_led_cmd_available;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_to_slot_enabled_wait_for_led_cmd_available()
-//
-// ****************************************************************************
-long
-hp_to_slot_enabled_wait_for_led_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__ ,shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_available_mutex
-       //
-       else if(shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Turn Power LED back ON
-               //
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_LED_ON;
-               command_reg.Slot.attention_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.state = SHPC_SLOT_NO_CHANGE;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for command to complete (while holding MUTEX)
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_enabled_wait_for_led_cmd_completion;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_to_slot_enabled_wait_for_led_cmd_completion()
-//
-// ****************************************************************************
-long
-hp_to_slot_enabled_wait_for_led_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-)
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_STATUS_WREG status_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , (int)shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER6_EVENT);
-       slot_context->slot_timer6.data = (unsigned long)slot_context;
-       slot_context->slot_timer6.function = hp_slot_timer6_func;
-       slot_context->slot_timer6.expires = jiffies + ONE_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer6);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER6_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER6_EVENT)) {
-       //
-       // delete the timer because we got an event other than the timer
-       //
-               del_timer_sync(&slot_context->slot_timer6);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_completion_event, timeout
-       //
-               else if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-                               (slot_context->slot_event_bits & SLOT_TIMER6_EVENT)) {
-               //
-               // Command completed OK?
-               //
-               status_reg.AsWord = readw(shpc_context->mmio_base_addr + SHPC_STATUS_REG_OFFSET);
-
-               if( status_reg.x.BSY == SHPC_STATUS_CLEARED &&
-                       status_reg.x.MRLO_ERR == SHPC_STATUS_CLEARED &&
-                       status_reg.x.INVCMD_ERR == SHPC_STATUS_CLEARED ) {
-                       //
-                       // Wait for next request
-                       //
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_slot_request;
-               }
-               else {
-                       //
-                       // Fail on-going request
-                       //
-                       slot_context->slot_completion.failed = HP_TRUE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to disable slot
-                       //
-                       dbg("%s -->CMD_ERROR: slot_id[ %d:%d ]  Cmd[ %X ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1, status_reg.AsWord );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Release Command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_release_event);
-
-       return status;
-}
-
diff --git a/drivers/pci/hotplug/amdshpc_enb.c b/drivers/pci/hotplug/amdshpc_enb.c
deleted file mode 100644 (file)
index f952cf2..0000000
+++ /dev/null
@@ -1,2112 +0,0 @@
-/*
- * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (C) 2001,2003 IBM Corp.
- * Copyright (C) 2002-2003 Advanced Micro Devices
- *
- * YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS
- * AND CONDITIONS OF THE GNU GENERAL PUBLIC
- * LICENSE FOUND IN THE "GPL.TXT" FILE THAT IS
- * INCLUDED WITH THIS FILE AND POSTED AT
- * http://www.gnu.org/licenses/gpl.html
- *
- * Send feedback to <david.keck@amd.com>
- *
- */
-
-#include <linux/module.h>
-#include <linux/sched.h>
-#include "amdshpc_ddi.h"
-#include "amdshpc.h"
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_slot_request()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_slot_request(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SLOT_STATUS_INFO slot_status;
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__ ,shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Slot Disabled: complete pending slot request
-       //
-       if( slot_context->slot_completion.done ) {
-               dbg("%s -->DISABLE_DONE: slot_id[ %d:%d ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-               //
-               // Call Completion Callback()
-               //
-               hp_QuerySlotStatus(     shpc_context, slot_context->slot_number - 1, &slot_status );
-               slot_status.x.lu_request_failed = slot_context->slot_completion.failed;
-               shpc_context->async_callback(
-                       shpc_context->driver_context,
-                       slot_context->slot_number - 1,
-                       slot_context->slot_completion.type,
-                       slot_status,
-                       slot_context->slot_completion.request_context );
-
-               //
-               // Signal registered user EVENT
-               //
-               hp_signal_user_event( shpc_context );
-
-               //
-               // Clear completion flag
-               //
-               slot_context->slot_completion.done = FALSE;
-       }
-
-       //
-       // Clear Button EVENT before waiting
-       //
-       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-       hp_clear_slot_event_bit(slot_context, ATTN_BUTTON_EVENT);
-       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-       //
-       // Wait for slot request
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & ATTN_BUTTON_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_REQUEST_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // attn_button_event
-       //
-       if(slot_context->slot_event_bits & ATTN_BUTTON_EVENT) {
-               //
-               // Set completion info for HW-initiated request
-               //
-               slot_context->slot_completion.hw_initiated = TRUE;
-               slot_context->slot_completion.type = SHPC_ASYNC_ENABLE_SLOT;
-               slot_context->slot_completion.request_context = NULL;
-
-               //
-               // Get current HW disposition
-               //
-               logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-               //
-               // Card present, MRL closed, and no Power-Fault?
-               //
-               if( logical_slot_reg.x.PRSNT1_2 != SHPC_SLOT_EMPTY &&
-                       ( logical_slot_reg.x.MRLS_IM == SHPC_MASKED ||
-                       logical_slot_reg.x.MRLS == SHPC_MRL_CLOSED ) &&
-                       logical_slot_reg.x.PF == SHPC_STATUS_CLEARED ) {
-                       //
-                       // Clear Alert EVENT and Attention LED
-                       //
-                       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                       hp_clear_slot_event_bit(slot_context, ALERT_EVENT);
-                       slot_context->problem_detected = FALSE;
-                       hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-                       //
-                       // Grab Command MUTEX to blink Power LED
-                       //
-                       dbg("%s -->ENABLE_REQ: slot_id[ %d:%d ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_led_cmd_available;
-               }
-               //
-               // Alert: MRL Opened, Power-Fault?
-               //
-               else if( logical_slot_reg.x.PRSNT1_2 != SHPC_SLOT_EMPTY ) {
-                       //
-                       // Update Attention LED
-                       //
-                       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                       slot_context->problem_detected = TRUE;
-                       hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-                       //
-                       // Fail on-going request
-                       //
-                       slot_context->slot_completion.failed = HP_TRUE;
-                       slot_context->slot_completion.done = TRUE;
-                       dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1,
-                               logical_slot_reg.AsDWord & 0x3F );
-               }
-       }
-       //
-       // SlotRequestEvent
-       //
-       else if(slot_context->slot_event_bits & SLOT_REQUEST_EVENT) {
-               //
-               // Set completion info for SW-initiated request
-               //
-               slot_context->slot_completion.hw_initiated = FALSE;
-               slot_context->slot_completion.type = slot_context->slot_request.type;
-               slot_context->slot_completion.request_context = slot_context->slot_request.request_context;
-
-               //
-               // Request to enable slot?
-               //
-               if( slot_context->slot_request.type == SHPC_ASYNC_ENABLE_SLOT ) {
-                       //
-                       // Update alert events based on current HW disposition
-                       //
-                       logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-                       //
-                       // Card present, MRL closed, and no Power-Fault?
-                       //
-                       if( logical_slot_reg.x.PRSNT1_2 != SHPC_SLOT_EMPTY &&
-                               (logical_slot_reg.x.MRLS_IM == SHPC_MASKED ||
-                               logical_slot_reg.x.MRLS == SHPC_MRL_CLOSED ) &&
-                               logical_slot_reg.x.PF == SHPC_STATUS_CLEARED ) {
-                               //
-                               // Clear Alert EVENT and Attention LED
-                               //
-                               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                               slot_context->problem_detected = FALSE;
-                               hp_clear_slot_event_bit(slot_context, ALERT_EVENT);
-                               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-                               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-                               //
-                               // Grab Command MUTEX to blink Power LED
-                               //
-                               dbg("%s -->ENABLE_REQ: slot_id[ %d:%d ]",__FUNCTION__ ,
-                                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-                               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_led_cmd_available;
-                       }
-                       //
-                       // Alert: MRL Opened, Power-Fault?
-                       //
-                       else if( logical_slot_reg.x.PRSNT1_2 != SHPC_SLOT_EMPTY ) {
-                               //
-                               // Update Attention LED
-                               //
-                               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                               slot_context->problem_detected = TRUE;
-                               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-                               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-                               //
-                               // Fail on-going request
-                               //
-                               slot_context->slot_completion.failed = HP_TRUE;
-                               slot_context->slot_completion.done = TRUE;
-                               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                                       logical_slot_reg.AsDWord & 0x3F );
-                       }
-               }
-               else {
-                       //
-                       // Slot already disabled, just complete the request
-                       //
-                       dbg("%s -->DISABLE_REQ: slot_id[ %d:%d ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       slot_context->slot_completion.failed = HP_FALSE;
-                       slot_context->slot_completion.done = TRUE;
-               }
-
-               //
-               // Allow next SW-initiated slot request while processing this one
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               hp_clear_slot_event_bit(slot_context, SLOT_REQUEST_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_led_cmd_available()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_led_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-       //
-       // Wait for Command Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_REQUEST_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Wait for next request
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       (readl( slot_context->logical_slot_addr ) & 0x3F ));
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_slot_request;
-       }
-       //
-       // cmd_available_mutex
-       //
-       else if(shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Blink Power LED
-               //
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_LED_BLINK;
-               command_reg.Slot.attention_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.state = SHPC_SLOT_NO_CHANGE;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord ,shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for command to complete (while holding MUTEX)
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_led_cmd_completion;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_led_cmd_completion()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_led_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long   old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_STATUS_WREG status_reg;
-
-       dbg( "%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER1_EVENT);
-       slot_context->slot_timer1.data = (unsigned long)slot_context;
-       slot_context->slot_timer1.function = hp_slot_timer1_func;
-       slot_context->slot_timer1.expires = jiffies + ONE_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer1);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER1_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER1_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer1);
-       }
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to make sure Power LED is OFF
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_led_cmd_available;
-       }
-       //
-       // cmd_completion_event, timeout
-       //
-       else if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-                       (slot_context->slot_event_bits & SLOT_TIMER1_EVENT)) {
-               //
-               // Command completed OK?
-               //
-               status_reg.AsWord = readw(shpc_context->mmio_base_addr + SHPC_STATUS_REG_OFFSET);
-
-               if( status_reg.x.BSY == SHPC_STATUS_CLEARED &&
-                       status_reg.x.INVCMD_ERR == SHPC_STATUS_CLEARED ) {
-                       //
-                       // Allow cancellation of operation?
-                       //
-                       if( slot_context->slot_completion.hw_initiated ) {
-                               //
-                               // Wait for 5 sec timeout
-                               //
-                               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_timeout;
-                       }
-                       else {
-                               //
-                               // Grab Command MUTEX to power-on the slot
-                               //
-                               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_power_cmd_available;
-                       }
-               }
-               else {
-                       //
-                       // Fail on-going request
-                       //
-                       slot_context->slot_completion.failed = HP_TRUE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to make sure Power LED is OFF
-                       //
-                       dbg("%s -->CMD_ERROR: slot_id[ %d:%d ]  Cmd[ %X ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1, status_reg.AsWord );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_led_cmd_available;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Release Command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_release_event);
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_timeout()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_timeout(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__ ,shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Clear Button EVENT before waiting
-       //
-       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-       hp_clear_slot_event_bit(slot_context, ATTN_BUTTON_EVENT);
-       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER2_EVENT);
-       slot_context->slot_timer2.data = (unsigned long)slot_context;
-       slot_context->slot_timer2.function = hp_slot_timer2_func;
-       slot_context->slot_timer2.expires = jiffies + FIVE_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer2);
-
-       //
-       // Wait for 5 sec timeout
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & ATTN_BUTTON_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER2_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER2_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer2);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to turn OFF Power LED
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_led_cmd_available;
-       }
-       //
-       // attn_button_event
-       //
-       else if(slot_context->slot_event_bits & ATTN_BUTTON_EVENT) {
-               //
-               // Cancel request, grab Command MUTEX to turn OFF Power LED
-               //
-               dbg("%s -->ENABLE_REQ: slot_id[ %d:%d ] Cancelled: Attn Button",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_led_cmd_available;
-       }
-       //
-       // timeout
-       //
-       else if(slot_context->slot_event_bits & SLOT_TIMER2_EVENT) {
-               //
-               // Grab Command MUTEX to set slot at Power-Only state
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_power_cmd_available;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_power_cmd_available()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_power_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to turn OFF Power LED
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_led_cmd_available;
-       }
-       //
-       // cmd_available_mutex
-       //
-       else if(shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Power-on the slot
-               //
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.attention_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.state = SHPC_POWER_ONLY;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for 100ms completion pre-amble on RevB-Errata (while holding MUTEX)
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_power_cmd_timeout;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_power_cmd_timeout()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_power_cmd_timeout(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER3_EVENT);
-       slot_context->slot_timer3.data = (unsigned long)slot_context;
-       slot_context->slot_timer3.function = hp_slot_timer3_func;
-       slot_context->slot_timer3.expires = jiffies + ONE_TENTH_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer3);
-
-       //
-       // Wait for 100ms completion pre-amble on RevB-Errata (while holding MUTEX)
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER3_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER3_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer3);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // timeout
-       //
-       else if(slot_context->slot_event_bits & SLOT_TIMER3_EVENT) {
-               //
-               // Wait for command to complete (while holding MUTEX)
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_power_cmd_completion;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_power_cmd_completion()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_power_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_STATUS_WREG status_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER4_EVENT);
-       slot_context->slot_timer4.data = (unsigned long)slot_context;
-       slot_context->slot_timer4.function = hp_slot_timer4_func;
-       slot_context->slot_timer4.expires = jiffies + FIFTEEN_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer4);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER4_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER4_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer4);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_completion_event, timeout
-       //
-       else if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-                       (slot_context->slot_event_bits & SLOT_TIMER4_EVENT)) {
-               //
-               // Command completed OK?
-               //
-               status_reg.AsWord = readw(shpc_context->mmio_base_addr + SHPC_STATUS_REG_OFFSET);
-
-               if( status_reg.x.BSY == SHPC_STATUS_CLEARED &&
-                       status_reg.x.MRLO_ERR == SHPC_STATUS_CLEARED &&
-                       status_reg.x.INVCMD_ERR == SHPC_STATUS_CLEARED ) {
-                       //
-                       // Grab Bus MUTEX to validate speed/mode
-                       //
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_bus_available;
-               }
-               else {
-                       //
-                       // Fail on-going request
-                       //
-                       slot_context->slot_completion.failed = HP_TRUE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to disable slot
-                       //
-                       dbg("%s -->CMD_ERROR: slot_id[ %d:%d ]  Cmd[ %X ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1, status_reg.AsWord );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-
-       //
-       // Release Command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_release_event);
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_bus_available()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_bus_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       enum shpc_speed_mode max_speed_mode, bus_speed_mode;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Bus Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, BUS_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->bus_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & BUS_AVAILABLE_MUTEX_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Bus MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // bus_available_mutex
-       //
-       else if(shpc_context->shpc_event_bits & BUS_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Get current HW speed/mode
-               //
-               bus_speed_mode = hp_get_bus_speed_mode( shpc_context );
-               max_speed_mode = hp_get_card_speed_mode( slot_context );
-               if( max_speed_mode > shpc_context->max_speed_mode ) {
-                       //
-                       // Can only go as fast as the controller allows
-                       //
-                       max_speed_mode = shpc_context->max_speed_mode;
-               }
-
-               //
-               // Grab global spinlock to check current speed/mode settings
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Other slots in contetion for bus speed/mode changes?
-               //
-               slot_context->in_bus_speed_mode_contention = FALSE;
-               max_speed_mode = hp_get_max_speed_mode( shpc_context, max_speed_mode );
-
-               //
-               // Make this card can handle PCI-66 speed/mode
-               //
-               if( max_speed_mode == SHPC_BUS_CONV_66 && !slot_context->card_pci66_capable ) {
-                       //
-                       // Fall back to slower common denominator
-                       //
-                       max_speed_mode = SHPC_BUS_CONV_33;
-               }
-
-               //
-               // Bus running at incompatible speed/mode?
-               //
-               if( bus_speed_mode != max_speed_mode ) {
-                       //
-                       // Other slots already enabled?
-                       //
-                       if( hp_signal_enabled_slots_to_rebalance_bus( shpc_context )) {
-                               //
-                               // Wait for enabled slots to release the bus, then change bus speed/mode
-                               //
-                               shpc_context->bus_speed_mode = max_speed_mode;
-                               shpc_context->bus_released = FALSE;
-                               hp_clear_shpc_event_bit(shpc_context, BUS_COMPLETE_EVENT);
-                               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_bus_released;
-                       }
-                       else {
-                               //
-                               // Change bus speed/mode to enable this slot
-                               //
-                               shpc_context->bus_speed_mode = max_speed_mode;
-                               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_speed_mode_cmd_available;
-                       }
-               }
-               else {
-                       //
-                       // Enable slot at current bus speed/mode
-                       //
-                       shpc_context->bus_speed_mode = bus_speed_mode;
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_enable_cmd_available;
-               }
-
-               //
-               // Flag this slot in contention for bus speed/mode validation
-               //
-               slot_context->in_bus_speed_mode_contention = TRUE;
-
-               //
-               // Release global spinlock since we're done checking speed/mode
-               //
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               dbg("%s -->ENABLE_IN_PROGRESS: slot_id[ %d:%d ]  card_speed_mode[ %d+%d ]  bus_speed_mode[ %d=>%d ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       slot_context->card_speed_mode, slot_context->card_pci66_capable,
-                       bus_speed_mode, shpc_context->bus_speed_mode );
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Bus MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_bus_released() 
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_bus_released(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Bus Release EVENT while holding MUTEX
-       //
-       shpc_context->shpc_event_bits = 0;slot_context->slot_event_bits = 0;
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & BUS_RELEASE_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Bus MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // bus_release_event
-       //
-       else if(shpc_context->shpc_event_bits & BUS_RELEASE_EVENT) {
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               if( shpc_context->bus_released ) {
-                       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-                       //
-                       // Grab Command MUTEX to set Bus speed/mode
-                       //
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_speed_mode_cmd_available;
-               }
-               else {
-                       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-                       //
-                       // Release Bus MUTEX
-                       //
-                       hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-                       wake_up_interruptible(&slot_context->bus_release_event);
-
-                       //
-                       // Fail on-going request
-                       //
-                       slot_context->slot_completion.failed = HP_TRUE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to disable slot
-                       //
-                       dbg("%s -->ENABLE_REQ: slot_id[ %d:%d ] Cancelled: BUSY DevNode",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Bus MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-               status =STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_speed_mode_cmd_available()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_speed_mode_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Bus, Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_available_mutex
-       //
-       else if(shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Set Bus speed/mode
-               //
-               command_reg.Bus.code = SHPC_SET_BUS_SPEED_MODE;
-               command_reg.Bus.speed_mode = shpc_context->bus_speed_mode;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for command to complete (while holding MUTEX)
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_speed_mode_cmd_completion;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Bus, Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-               status =STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_speed_mode_cmd_completion()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_speed_mode_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_STATUS_WREG status_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER5_EVENT);
-       slot_context->slot_timer5.data = (unsigned long)slot_context;
-       slot_context->slot_timer5.function = hp_slot_timer5_func;
-       slot_context->slot_timer5.expires = jiffies + FIFTEEN_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer5);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER5_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER5_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer5);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Bus MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_completion_event, timeout
-       //
-       else if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-                       (slot_context->slot_event_bits & SLOT_TIMER5_EVENT)) {
-
-               //
-               // Command completed OK?
-               //
-               status_reg.AsWord = readw(shpc_context->mmio_base_addr + SHPC_STATUS_REG_OFFSET);
-
-               if( status_reg.x.BSY == SHPC_STATUS_CLEARED &&
-                       status_reg.x.MRLO_ERR == SHPC_STATUS_CLEARED &&
-                       status_reg.x.INVCMD_ERR == SHPC_STATUS_CLEARED &&
-                       status_reg.x.INVSM_ERR == SHPC_STATUS_CLEARED ) {
-                       //
-                       // Grab Command MUTEX to enable slot
-                       //
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_enable_cmd_available;
-               }
-               else {
-                       //
-                       // Release Bus MUTEX
-                       //
-                       hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-                       wake_up_interruptible(&slot_context->bus_release_event);
-
-                       //
-                       // Fail on-going request
-                       //
-                       slot_context->slot_completion.failed = HP_TRUE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to disable slot
-                       //
-                       dbg("%s -->CMD_ERROR: slot_id[ %d:%d ]  Cmd[ %X ]",__FUNCTION__ ,
-                               shpc_context->shpc_instance, slot_context->slot_number-1, status_reg.AsWord );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Bus MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-               status =STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Release Command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_release_event);
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_enable_cmd_available() 
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_enable_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_acquire_event);
-
-        wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Bus, Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]",__FUNCTION__ ,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_available_mutex
-       //
-       else if(shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Enable the slot
-               //
-               dbg("%s  ENABLING SLOT...",__FUNCTION__ );
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_LED_ON;
-               command_reg.Slot.attention_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.state = SHPC_ENABLE_SLOT;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for command to complete (while holding Bus,Command MUTEX)
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_enable_cmd_completion;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Bus, Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_enable_cmd_completion()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_enable_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_STATUS_WREG status_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]",__FUNCTION__ , shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER6_EVENT);
-       slot_context->slot_timer6.data = (unsigned long)slot_context;
-       slot_context->slot_timer6.function = hp_slot_timer6_func;
-       slot_context->slot_timer6.expires = jiffies + FIFTEEN_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer6);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER6_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER6_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer6);
-       }
-
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Release Bus MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]", __FUNCTION__,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // cmd_completion_event, timeout
-       //
-       else if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-                       (slot_context->slot_event_bits & SLOT_TIMER6_EVENT)) {
-               //
-               // Command completed OK?
-               //
-               status_reg.AsWord = readw(shpc_context->mmio_base_addr + SHPC_STATUS_REG_OFFSET);
-
-               if( status_reg.x.BSY == SHPC_STATUS_CLEARED &&
-                       status_reg.x.MRLO_ERR == SHPC_STATUS_CLEARED &&
-                       status_reg.x.INVCMD_ERR == SHPC_STATUS_CLEARED &&
-                       status_reg.x.INVSM_ERR == SHPC_STATUS_CLEARED ) {
-                       //
-                       // Wait for settling time
-                       //
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_enable_timeout;
-               }
-               else {
-                       //
-                       // Release Bus MUTEX
-                       //
-                       hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-                       wake_up_interruptible(&slot_context->bus_release_event);
-
-                       //
-                       // Fail on-going request
-                       //
-                       slot_context->slot_completion.failed = HP_TRUE;
-                       slot_context->slot_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to disable slot
-                       //
-                       dbg("%s -->CMD_ERROR: slot_id[ %d:%d ]  Cmd[ %X ]", __FUNCTION__,
-                               shpc_context->shpc_instance, slot_context->slot_number-1, status_reg.AsWord );
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Bus MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->bus_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Release Command MUTEX
-       //
-       up( &shpc_context->cmd_available_mutex);
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_at_slot_disabled_wait_for_enable_timeout()
-//
-// ****************************************************************************
-long
-hp_at_slot_disabled_wait_for_enable_timeout(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER7_EVENT);
-       slot_context->slot_timer7.data = (unsigned long)slot_context;
-       slot_context->slot_timer7.function = hp_slot_timer7_func;
-       slot_context->slot_timer7.expires = jiffies + ONE_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer7);
-
-       //
-       // Wait for timeout
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & ALERT_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER7_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER7_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer7);
-       }
-       //
-       // Alert: MRL Opened, Card Removed, Power-Fault?
-       //
-       if(slot_context->slot_event_bits & ALERT_EVENT) {
-
-               //
-               // Update attn_led_problem_event LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               slot_context->problem_detected = TRUE;
-               hp_send_slot_event(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-               //
-               // Fail on-going request
-               //
-               slot_context->slot_completion.failed = HP_TRUE;
-               slot_context->slot_completion.done = TRUE;
-
-               //
-               // Grab Command MUTEX to disable slot
-               //
-               dbg("%s -->ALERT: slot_id[ %d:%d ]  LSR_13:0[ %X ]", __FUNCTION__,
-                       shpc_context->shpc_instance, slot_context->slot_number-1,
-                       readl( slot_context->logical_slot_addr ) & 0x3F );
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_available;
-       }
-       //
-       // timeout
-       //
-       else if(slot_context->slot_event_bits & SLOT_TIMER7_EVENT) {
-               //
-               // Flag this slot as ENABLED
-               //
-               hp_flag_slot_as_enabled( shpc_context, slot_context );
-
-               //
-               // Complete succesful ENABLE request
-               //
-               slot_context->slot_completion.failed = HP_FALSE;
-               slot_context->slot_completion.done = TRUE;
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_enabled_wait_for_slot_request;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status =STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Release Bus MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->bus_release_event);
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_to_slot_disabled_wait_for_led_cmd_available()
-//
-// ****************************************************************************
-long
-hp_to_slot_disabled_wait_for_led_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Turn OFF Power LED
-               //
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_LED_OFF;
-               command_reg.Slot.attention_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.state = SHPC_SLOT_NO_CHANGE;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for Power LED command to complete
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_led_cmd_completion;
-       }
-       else {                          // exit_request_event
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-// ****************************************************************************
-//
-// hp_to_slot_disabled_wait_for_led_cmd_completion()
-//
-// ****************************************************************************
-long
-hp_to_slot_disabled_wait_for_led_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER8_EVENT);
-       slot_context->slot_timer8.data = (unsigned long)slot_context;
-       slot_context->slot_timer8.function = hp_slot_timer8_func;
-       slot_context->slot_timer8.expires = jiffies + ONE_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer8);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER8_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER8_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer8);
-       }
-
-       if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-          (slot_context->slot_event_bits & SLOT_TIMER8_EVENT)) {
-               //
-               // Wait for next request
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_slot_request;
-
-       }else{                          // exit_request_event
-               status = STATUS_UNSUCCESSFUL;
-       }
-
-       //
-       // Release command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_release_event);
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_to_slot_disabled_wait_for_disable_cmd_available()
-//
-// ****************************************************************************
-long
-hp_to_slot_disabled_wait_for_disable_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if(shpc_context->shpc_event_bits & CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Disable slot and turn OFF Power LED
-               //
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_LED_OFF;
-               command_reg.Slot.attention_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.state = SHPC_DISABLE_SLOT;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for command to complete
-               //
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_cmd_completion;
-       }
-       else {
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_to_slot_disabled_wait_for_disable_cmd_completion()
-//
-// ****************************************************************************
-long
-hp_to_slot_disabled_wait_for_disable_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER9_EVENT);
-       slot_context->slot_timer9.data = (unsigned long)slot_context;
-       slot_context->slot_timer9.function = hp_slot_timer9_func;
-       slot_context->slot_timer9.expires = jiffies + FIFTEEN_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer9);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & SLOT_TIMER9_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER9_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer9);
-       }
-
-       if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-          (slot_context->slot_event_bits & SLOT_TIMER9_EVENT)) {
-               //
-               // Flag this slot as DISABLED (if enabled)
-               //
-               if( hp_flag_slot_as_disabled( shpc_context, slot_context )) {
-                       //
-                       // Wait for settling time
-                       //
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_disable_timeout;
-               }
-               else {
-                       //
-                       // Wait for next request
-                       //
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_slot_request;
-               }
-       }
-       else {                          // exit_request_event
-               status = STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Release command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->cmd_release_event);
-
-       return status;
-}
-
-// ****************************************************************************
-//
-// hp_to_slot_disabled_wait_for_DisableTimeout()
-//
-// ****************************************************************************
-long
-hp_to_slot_disabled_wait_for_disable_timeout(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, SLOT_TIMER10_EVENT);
-       slot_context->slot_timer10.data = (unsigned long)slot_context;
-       slot_context->slot_timer10.function = hp_slot_timer10_func;
-       slot_context->slot_timer10.expires = jiffies + ONE_SEC_TIMEOUT;
-       add_timer(&slot_context->slot_timer10);
-
-       //
-       // Wait for timeout
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & SLOT_TIMER10_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & SLOT_TIMER10_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->slot_timer10);
-       }
-
-       //
-       // timeout
-       //
-       if(slot_context->slot_event_bits & SLOT_TIMER10_EVENT) {
-               slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_to_slot_disabled_wait_for_bus_available;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_to_slot_disabled_wait_for_bus_available() 
-//
-// ****************************************************************************
-long
-hp_to_slot_disabled_wait_for_bus_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long           old_irq_flags;
-       long status = STATUS_SUCCESS;
-       enum shpc_speed_mode max_speed_mode;
-
-       dbg("%s -->slot_id[ %d:%d ]",  __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Bus Available MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, BUS_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->bus_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & BUS_AVAILABLE_MUTEX_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if(shpc_context->shpc_event_bits & BUS_AVAILABLE_MUTEX_EVENT) {
-                       //
-                       // Grab global spinlock to check current speed/mode settings
-                       //
-                       spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-
-                       //
-                       // Flag this slot out of contetion for bus speed/mode changes
-                       //
-                       slot_context->in_bus_speed_mode_contention = FALSE;
-
-                       //
-                       // Enabled slots running at maximum speed/mode?
-                       //
-                       if( shpc_context->slots_enabled ) {
-                               max_speed_mode = hp_get_max_speed_mode( shpc_context, shpc_context->max_speed_mode );
-
-                               //
-                               // Signal enabled slots to release the bus, then change bus speed/mode
-                               //
-                               if( shpc_context->bus_speed_mode != max_speed_mode ) {
-                                       hp_signal_enabled_slots_to_rebalance_bus( shpc_context );
-                               }
-                       }
-
-                       //
-                       // Release global spinlock since we're done checking speed/mode
-                       //
-                       spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-                       //
-                       // Wait for next request on this slot
-                       //
-                       slot_context->slot_function = (SLOT_STATE_FUNCTION)hp_at_slot_disabled_wait_for_slot_request;
-       }
-       else {                          // exit_request_event
-               status = STATUS_UNSUCCESSFUL;
-       }
-
-       //
-       // Release Bus MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, BUS_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->bus_release_event);
-
-       return status;
-}
-
diff --git a/drivers/pci/hotplug/amdshpc_int.c b/drivers/pci/hotplug/amdshpc_int.c
deleted file mode 100644 (file)
index de61e6f..0000000
+++ /dev/null
@@ -1,374 +0,0 @@
-/*
- * Copyright (C) 2003 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (C) 2003 IBM Corp.
- * Copyright (C) 2002-2003 Advanced Micro Devices
- *
- * YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS
- * AND CONDITIONS OF THE GNU GENERAL PUBLIC
- * LICENSE FOUND IN THE "GPL.TXT" FILE THAT IS
- * INCLUDED WITH THIS FILE AND POSTED AT
- * http://www.gnu.org/licenses/gpl.html
- *
- * Send feedback to <david.keck@amd.com>
- *
- */
-
-#include <linux/module.h>
-#include <linux/sched.h>
-#include "amdshpc_ddi.h"
-#include "amdshpc.h"
-
-
-// ****************************************************************************
-//
-// hp_interrupt_service()
-//
-// ****************************************************************************
-irqreturn_t hp_interrupt_service(int IRQ, void *v, struct pt_regs *regs)
-{
-       struct shpc_context *shpc_context = v;
-       struct slot_context *slot_context;
-       union SHPC_SERR_INT_DWREG       SerrIntReg;
-       union SHPC_INT_LOCATOR_DWREG    IntLocatorReg, SlotIndex;
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-       u8 IsShpcInterrupt = FALSE;
-       u8 i;
-
-       //
-       // Device at PowerDeviceD0?
-       //
-       if( !shpc_context->at_power_device_d0 ) {
-               return IRQ_HANDLED;
-       }
-
-       //
-       // Read Interrupt Locator Register ( Pending Interrupts )
-       //
-       IntLocatorReg.AsDWord = readl(shpc_context->mmio_base_addr + SHPC_INT_LOCATOR_REG_OFFSET);
-
-       //
-       // Read SERR-INT Register ( Global Mask, Command Completion )
-       //
-       SerrIntReg.AsDWord = readl(shpc_context->mmio_base_addr + SHPC_SERR_INT_REG_OFFSET);
-
-       //
-       // Global Interrupts Disabled?
-       //
-//     if( SerrIntReg.x.GIM == SHPC_MASKED ) {
-//             return FALSE;
-//     }
-
-       //
-       // Command Completion?
-       //
-       if( IntLocatorReg.x.CC_IP ) {
-               if(( SerrIntReg.x.CC_STS == SHPC_STATUS_SET ) &&
-                       ( SerrIntReg.x.CC_IM == SHPC_UNMASKED )) {
-                       //
-                       // Schedule Dpc
-                       //
-                       IsShpcInterrupt = TRUE;
-                       tasklet_schedule(&shpc_context->cmd_completion_dpc);
-
-                       //
-                       // Clear Interrput (Write-back 1 to STS bits)
-                       //
-                       writel(SerrIntReg.AsDWord, shpc_context->mmio_base_addr + SHPC_SERR_INT_REG_OFFSET);
-               }
-       }
-
-       //
-       // Slot Interrupts?
-       //
-       if( IntLocatorReg.x.SLOT_IP ) {
-               //
-               // Walk a "1" thru each bit position (one bit per slot)
-               //
-               for( i=0, SlotIndex.x.SLOT_IP = 1; i< SHPC_MAX_NUM_SLOTS; ++i, SlotIndex.x.SLOT_IP <<= 1 ) {
-                       slot_context = &shpc_context->slot_context[ i ];
-
-                       //
-                       // Interrupt from this slot?
-                       //
-                       if( IntLocatorReg.x.SLOT_IP & SlotIndex.x.SLOT_IP ) {
-                               //
-                               //  Read Logical Slot Register
-                               //
-                               logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-
-                               //
-                               // Attention Button?
-                               //
-                               if(( logical_slot_reg.x.ABP_STS == SHPC_STATUS_SET ) &&
-                                       ( logical_slot_reg.x.AB_IM == SHPC_UNMASKED )) {
-                                       //
-                                       // Schedule Dpc
-                                       //
-                                       IsShpcInterrupt = TRUE;
-                                       tasklet_schedule(&slot_context->attn_button_dpc);
-                               }
-
-                               //
-                               // MRL Sensor?
-                               //
-                               if(( logical_slot_reg.x.MRLSC_STS == SHPC_STATUS_SET ) &&
-                                       ( logical_slot_reg.x.MRLS_IM == SHPC_UNMASKED )) {
-                                       //
-                                       // Schedule Dpc
-                                       //
-                                       IsShpcInterrupt = TRUE;
-                                       tasklet_schedule(&slot_context->mrl_sensor_dpc);
-                               }
-
-                               //
-                               // Card Presence Change?
-                               //
-                               if(( logical_slot_reg.x.CPC_STS == SHPC_STATUS_SET ) &&
-                                       ( logical_slot_reg.x.CP_IM == SHPC_UNMASKED )) {
-                                       //
-                                       // Schedule Dpc
-                                       //
-                                       IsShpcInterrupt = TRUE;
-                                       tasklet_schedule(&slot_context->card_presence_dpc);
-                               }
-
-                               //
-                               // Isolated Power Fault?
-                               //
-                               if(( logical_slot_reg.x.IPF_STS == SHPC_STATUS_SET ) &&
-                                       ( logical_slot_reg.x.IPF_IM == SHPC_UNMASKED )) {
-                                       //
-                                       // Schedule Dpc
-                                       //
-                                       IsShpcInterrupt = TRUE;
-                                       tasklet_schedule(&slot_context->isolated_power_fault_dpc);
-                               }
-
-                               //
-                               // Connected Power Fault?
-                               //
-                               if(( logical_slot_reg.x.CPF_STS == SHPC_STATUS_SET ) &&
-                                       ( logical_slot_reg.x.CPF_IM == SHPC_UNMASKED )) {
-                                       //
-                                       // Schedule Dpc
-                                       //
-                                       IsShpcInterrupt = TRUE;
-                                       tasklet_schedule(&slot_context->connected_power_fault_dpc);
-                               }
-
-                               //
-                               // Clear Interrputs for this slot (Write-back 1 to STS bits)
-                               //
-                               writel(logical_slot_reg.AsDWord, slot_context->logical_slot_addr);
-                       }
-               }
-       }
-       return IRQ_HANDLED;
-}
-
-
-// ****************************************************************************
-//
-// hp_attn_button_dpc() @ DISPATCH_LEVEL
-//
-// ****************************************************************************
-void
-hp_attn_button_dpc(
-       unsigned long deferred_context  // struct slot_context*
-       )
-{
-       struct slot_context* slot_context = ( struct slot_context* )deferred_context;
-       struct shpc_context* shpc_context = slot_context->shpc_context;
-
-       dbg("%s ->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, (slot_context->slot_number-1) );
-       //
-       // Notification Event: Attention Button pressed
-       //
-       spin_lock( &slot_context->slot_spinlock );
-       hp_send_slot_event(slot_context, ATTN_BUTTON_EVENT);
-       spin_unlock( &slot_context->slot_spinlock );
-}
-
-
-// ****************************************************************************
-//
-// hp_card_presence_dpc() @ DISPATCH_LEVEL
-//
-// ****************************************************************************
-void
-hp_card_presence_dpc(
-       unsigned long deferred_context  // struct slot_context*
-       )
-{
-       struct slot_context* slot_context = ( struct slot_context* )deferred_context;
-       struct shpc_context* shpc_context = slot_context->shpc_context;
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Signal registered user EVENT
-       //
-       hp_signal_user_event_at_dpc_level( shpc_context );
-
-       //
-       // Card Removed?
-       //
-       logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-       if( logical_slot_reg.x.PRSNT1_2 == SHPC_SLOT_EMPTY ) {
-               //
-               // Signal Alert EVENT
-               //
-               spin_lock( &slot_context->slot_spinlock );
-               hp_send_slot_event(slot_context, ALERT_EVENT);
-               spin_unlock( &slot_context->slot_spinlock );
-       }
-}
-
-
-// ****************************************************************************
-//
-// hp_mrl_sensor_dpc() @ DISPATCH_LEVEL
-//
-// ****************************************************************************
-void
-hp_mrl_sensor_dpc(
-       unsigned long deferred_context  // struct slot_context*
-       )
-{
-       struct slot_context* slot_context = ( struct slot_context* )deferred_context;
-       struct shpc_context* shpc_context = slot_context->shpc_context;
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Signal registered user EVENT
-       //
-       hp_signal_user_event_at_dpc_level( shpc_context );
-
-       //
-       // MRL Sensor opened?
-       //
-       logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-       if( logical_slot_reg.x.MRLS == SHPC_MRL_OPEN ) {
-               //
-               // Card Present?
-               //
-               if( logical_slot_reg.x.PRSNT1_2 != SHPC_SLOT_EMPTY ) {
-                       //
-                       // Signal Alert EVENT
-                       //
-                       spin_lock( &slot_context->slot_spinlock );
-                       hp_send_slot_event(slot_context, ALERT_EVENT);
-                       spin_unlock( &slot_context->slot_spinlock );
-               }
-       }
-       else {
-               //
-               // Power Fault detected whith MRL closed?
-               // Note: Golem A0 may not generate power-fault interrupt
-               if( logical_slot_reg.x.PF == SHPC_STATUS_SET ) {
-                       //
-                       // Signal Alert EVENT
-                       //
-                       spin_lock( &slot_context->slot_spinlock );
-                       hp_send_slot_event(slot_context, ALERT_EVENT);
-                       spin_unlock( &slot_context->slot_spinlock );
-               }
-       }
-}
-
-// ****************************************************************************
-//
-// isolated_power_fault_dpc() @ DISPATCH_LEVEL
-//
-// ****************************************************************************
-void
-hp_isolated_power_fault_dpc(
-       unsigned long deferred_context  // struct slot_context*
-       )
-{
-       struct slot_context* slot_context = ( struct slot_context* )deferred_context;
-       struct shpc_context* shpc_context = slot_context->shpc_context;
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Signal registered user EVENT
-       //
-       hp_signal_user_event_at_dpc_level( shpc_context );
-
-       //
-       // Power Fault detected?
-       //
-       logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-       if( logical_slot_reg.x.PF == SHPC_STATUS_SET ) {
-               //
-               // Signal Alert EVENT
-               //
-               spin_lock( &slot_context->slot_spinlock );
-               hp_send_slot_event(slot_context, ALERT_EVENT);
-               spin_unlock( &slot_context->slot_spinlock );
-       }
-}
-
-
-// ****************************************************************************
-//
-// connected_power_fault_dpc() @ DISPATCH_LEVEL
-//
-// ****************************************************************************
-void
-hp_connected_power_fault_dpc(
-       unsigned long deferred_context  // struct slot_context*
-       )
-{
-       struct slot_context* slot_context = ( struct slot_context* )deferred_context;
-       struct shpc_context* shpc_context = slot_context->shpc_context;
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Signal registered user EVENT
-       //
-       hp_signal_user_event_at_dpc_level( shpc_context );
-
-       //
-       // Power Fault detected?
-       //
-       logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-       if( logical_slot_reg.x.PF == SHPC_STATUS_SET ) {
-               //
-               // Signal Alert EVENT
-               //
-               spin_lock( &slot_context->slot_spinlock );
-               hp_send_slot_event(slot_context, ALERT_EVENT);
-               spin_unlock( &slot_context->slot_spinlock );
-       }
-}
-
-
-// ****************************************************************************
-//
-// hp_cmd_completion_dpc() @ DISPATCH_LEVEL
-//
-// ****************************************************************************
-void
-hp_cmd_completion_dpc(
-       unsigned long deferred_context  // struct shpc_context*
-       )
-{
-       struct shpc_context* shpc_context = ( struct shpc_context* )deferred_context;
-
-       dbg("%s -->HwInstance[ %d ]", __FUNCTION__, shpc_context->shpc_instance );
-
-       //
-       // Notification Event: Command Completion
-       //
-       spin_lock( &shpc_context->shpc_spinlock );
-       hp_send_event_to_all_slots(shpc_context, CMD_COMPLETION_EVENT);
-       spin_unlock( &shpc_context->shpc_spinlock );
-}
diff --git a/drivers/pci/hotplug/amdshpc_led.c b/drivers/pci/hotplug/amdshpc_led.c
deleted file mode 100644 (file)
index aee8583..0000000
+++ /dev/null
@@ -1,742 +0,0 @@
-/*
- * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (C) 2001,2003 IBM Corp.
- * Copyright (C) 2002-2003 Advanced Micro Devices
- *
- * YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS
- * AND CONDITIONS OF THE GNU GENERAL PUBLIC
- * LICENSE FOUND IN THE "GPL.TXT" FILE THAT IS
- * INCLUDED WITH THIS FILE AND POSTED AT
- * http://www.gnu.org/licenses/gpl.html
- *
- * Send feedback to <david.keck@amd.com>
- *
- */
-
-#include <linux/module.h>
-#include <linux/sched.h>
-#include "amdshpc_ddi.h"
-#include "amdshpc.h"
-
-
-// ****************************************************************************
-//
-// hp_wait_for_attn_led_request() @ PASSIVE_LEVEL
-//
-// ****************************************************************************
-long
-hp_wait_for_attn_led_request(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SLOT_STATUS_INFO slot_status;
-       union SHPC_LOGICAL_SLOT_DWREG logical_slot_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // LED "Normal": complete pending request
-       //
-       if( slot_context->attn_led_completion.done ) {
-               //
-               // Call Completion Callback()
-               //
-               hp_QuerySlotStatus(     shpc_context, slot_context->slot_number - 1, &slot_status );
-               slot_status.x.lu_request_failed = slot_context->slot_completion.failed;
-               shpc_context->async_callback(
-                       shpc_context->driver_context,
-                       slot_context->slot_number - 1,
-                       slot_context->attn_led_completion.type,
-                       slot_status,
-                       slot_context->attn_led_completion.request_context );
-               //
-               // Signal registered user EVENT
-               //
-               hp_signal_user_event( shpc_context );
-               //
-               // Clear completion flag
-               //
-               slot_context->attn_led_completion.done = FALSE;
-       }
-       //
-       // Wait for slot request
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & ATTN_LED_REQUEST_EVENT) ||
-               (slot_context->slot_event_bits & ATTN_LED_PROBLEM_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       // AttnLEDRequestEvent
-       if(slot_context->slot_event_bits & ATTN_LED_REQUEST_EVENT) {
-               //
-               // Set completion info for SW-initiated request
-               //
-               slot_context->attn_led_completion.hw_initiated = FALSE;
-               slot_context->attn_led_completion.type = slot_context->attn_led_request.type;
-               slot_context->attn_led_completion.timeout = slot_context->attn_led_request.timeout;
-               slot_context->attn_led_completion.request_context = slot_context->attn_led_request.request_context;
-
-               //
-               // Request to locate slot?
-               //
-               if( slot_context->attn_led_request.type == SHPC_ASYNC_LED_LOCATE ) {
-                       dbg("%s -->LED_LOCATE_REQ: slot_id[ %d:%d ]", __FUNCTION__,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-                       //
-                       // Grab Command MUTEX to blink Attn LED
-                       //
-                       slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_blink_cmd_available;
-               }
-               else {
-                       dbg("%s -->LED_NORMAL_REQ: slot_id[ %d:%d ]", __FUNCTION__,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-                       logical_slot_reg.AsDWord = readl( slot_context->logical_slot_addr );
-                       if( logical_slot_reg.x.AIS == SHPC_LED_ON || logical_slot_reg.x.AIS == SHPC_LED_OFF ) {
-                               //
-                               // Already "Normal", just complete the request
-                               //
-                               slot_context->attn_led_completion.failed = HP_FALSE;
-                               slot_context->attn_led_completion.done = TRUE;
-                       }
-                       //
-                       // While waitimg on a request here, the Attn LED should already be On/Off, but...
-                       //
-                       else {
-                               //
-                               // Grab Command MUTEX to set Attn LED to "Normal" (On/Off) state
-                               //
-                               slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_normal_cmd_available;
-                       }
-               }
-
-               //
-               // Allow next SW-initiated request while processing this one
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               hp_clear_slot_event_bit(slot_context, ATTN_LED_REQUEST_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-       }
-       // attn_led_problem_event: Detected, Resolved
-       else if (slot_context->slot_event_bits & ATTN_LED_PROBLEM_EVENT){
-               //
-               // Set completion info for HW-initiated request
-               //
-               slot_context->attn_led_completion.hw_initiated = TRUE;
-               slot_context->attn_led_completion.type = SHPC_ASYNC_LED_NORMAL;
-               slot_context->attn_led_completion.timeout = 0;
-               slot_context->attn_led_completion.request_context = NULL;
-
-               //
-               // Grab Command MUTEX to update Attention LED (On/Off)
-               //
-               slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_normal_cmd_available;
-       }
-       else {  // exit_request_event
-               status = STATUS_UNSUCCESSFUL;
-               dbg("%s -->EXIT_REQUEST: slot_id[ %d:%d ]", __FUNCTION__,
-                       shpc_context->shpc_instance, slot_context->slot_number-1 );
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_wait_for_attn_led_blink_cmd_available() @ PASSIVE_LEVEL
-//
-// ****************************************************************************
-long
-hp_wait_for_attn_led_blink_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       //down_interruptible(&slot_context->cmd_acquire_mutex);
-       hp_set_slot_event_bit(slot_context, LED_CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->led_cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & LED_CMD_AVAILABLE_MUTEX_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       // cmd_available_mutex
-       if(shpc_context->shpc_event_bits & LED_CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Blink Attention LED
-               //
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.attention_led = SHPC_LED_BLINK;
-               command_reg.Slot.state = SHPC_SLOT_NO_CHANGE;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for command to complete (while holding MUTEX)
-               //
-               slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_blink_cmd_completion;
-       }
-       // exit_request_event
-       else {
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, LED_CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->led_cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_wait_for_attn_led_blink_cmd_completion() @ PASSIVE_LEVEL
-//
-// ****************************************************************************
-long
-hp_wait_for_attn_led_blink_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       long status = STATUS_SUCCESS;
-       union SLOT_STATUS_INFO slot_status;
-       union SHPC_STATUS_WREG status_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, LED_TIMER1_EVENT);
-       slot_context->led_timer1.data = (unsigned long)slot_context;
-       slot_context->led_timer1.function = hp_led_timer1_func;
-       slot_context->led_timer1.expires = jiffies + ONE_SEC_TIMEOUT;
-       add_timer(&slot_context->led_timer1);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & LED_TIMER1_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & LED_TIMER1_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->led_timer1);
-       }
-
-       if(shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) {
-               // cmd_completion_event, timeout
-               if ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) || (slot_context->slot_event_bits & LED_TIMER1_EVENT)) {
-                       //
-                       // Command completed OK?
-                       //
-                       status_reg.AsWord = readw(shpc_context->mmio_base_addr + SHPC_STATUS_REG_OFFSET);
-
-                       if( status_reg.x.BSY == SHPC_STATUS_CLEARED &&
-                               status_reg.x.INVCMD_ERR == SHPC_STATUS_CLEARED ) {
-                               //
-                               // Call Completion Callback()
-                               //
-                               hp_QuerySlotStatus(     shpc_context, slot_context->slot_number - 1, &slot_status );
-                               slot_status.x.lu_request_failed = HP_FALSE;
-                               shpc_context->async_callback(
-                                       shpc_context->driver_context,
-                                       slot_context->slot_number - 1,
-                                       SHPC_ASYNC_LED_LOCATE,
-                                       slot_status,
-                                       slot_context->attn_led_completion.request_context );
-
-                               //
-                               // Signal registered user EVENT
-                               //
-                               hp_signal_user_event( shpc_context );
-
-                               //
-                               // Wait for specified timeout (in seconds)
-                               //
-                               slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_blink_timeout;
-                       }
-                       else {
-                               //
-                               // Fail on-going request
-                               //
-                               slot_context->attn_led_completion.failed = HP_TRUE;
-                               slot_context->attn_led_completion.done = TRUE;
-
-                               //
-                               // Grab Command MUTEX to make sure Attn LED gets back to "Normal" (On/Off)
-                               //
-                               dbg("%s -->CMD_ERROR: slot_id[ %d:%d ]  Cmd[ %X ]", __FUNCTION__,
-                                       shpc_context->shpc_instance, slot_context->slot_number-1, status_reg.AsWord );
-                               slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_back_to_normal_cmd_available;
-                       }
-
-               // exit_request_event
-               }
-               else {
-                       status = STATUS_UNSUCCESSFUL;
-               }
-       }
-       //
-       // Release Command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, LED_CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->led_cmd_release_event);
-
-       return status;
-}
-
-// ****************************************************************************
-//
-// hp_wait_for_attn_led_blink_timeout() @ PASSIVE_LEVEL
-//
-// ****************************************************************************
-long
-hp_wait_for_attn_led_blink_timeout(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SLOT_STATUS_INFO slot_status;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, LED_TIMER2_EVENT);
-       slot_context->led_timer2.data = (unsigned long)slot_context;
-       slot_context->led_timer2.function = hp_led_timer2_func;
-       slot_context->led_timer2.expires = jiffies + (ONE_SEC_INCREMENT * slot_context->attn_led_completion.timeout);
-       add_timer(&slot_context->led_timer2);
-
-       //
-       // Wait for specified timeout ( in seconds )
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((slot_context->slot_event_bits & ATTN_LED_REQUEST_EVENT) ||
-               (slot_context->slot_event_bits & LED_TIMER2_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & LED_TIMER2_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               hp_clear_slot_event_bit(slot_context, LED_TIMER2_EVENT);
-               del_timer_sync(&slot_context->led_timer2);
-       }
-
-       // AttnLEDRequestEvent
-       if(slot_context->slot_event_bits & ATTN_LED_REQUEST_EVENT) {
-               //
-               // Set completion info for SW-initiated request
-               //
-               slot_context->attn_led_completion.hw_initiated = FALSE;
-               slot_context->attn_led_completion.type = slot_context->attn_led_request.type;
-               slot_context->attn_led_completion.timeout = slot_context->attn_led_request.timeout;
-               slot_context->attn_led_completion.request_context = slot_context->attn_led_request.request_context;
-
-               //
-               // Request to cancel locate?
-               //
-               if( slot_context->attn_led_request.type == SHPC_ASYNC_LED_NORMAL ) {
-                       dbg("%s -->LED_NORMAL_REQ: slot_id[ %d:%d ]", __FUNCTION__,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-                       //
-                       // Grab Command MUTEX to set Attn LED at "Normal" (On/Off) state
-                       //
-                       slot_context->attn_led_function = (SLOT_STATE_FUNCTION)&hp_wait_for_attn_led_normal_cmd_available;
-
-                       //
-                       // Allow next SW-initiated request while processing this one
-                       //
-                       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                       hp_clear_slot_event_bit(slot_context, ATTN_LED_REQUEST_EVENT);
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-               }
-               //
-               // Already located (Attn LED blinking), just re-start timeout
-               //
-               else {
-                       dbg("%s -->LED_LOCATE_REQ: slot_id[ %d:%d ]", __FUNCTION__,
-                               shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-                       //
-                       // Allow next SW-initiated request before invoking callback, since next
-                       // request may be sent in the context of this thread.
-                       //
-                       spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-                       hp_clear_slot_event_bit(slot_context, ATTN_LED_REQUEST_EVENT);
-                       spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-
-                       //
-                       // Call Completion Callback()
-                       //
-                       hp_QuerySlotStatus(     shpc_context, slot_context->slot_number - 1, &slot_status );
-                       slot_status.x.lu_request_failed = HP_FALSE;
-                       shpc_context->async_callback(
-                               shpc_context->driver_context,
-                               slot_context->slot_number - 1,
-                               SHPC_ASYNC_LED_LOCATE,
-                               slot_status,
-                               slot_context->attn_led_completion.request_context );
-
-                       //
-                       // Signal registered user EVENT
-                       //
-                       hp_signal_user_event( shpc_context );
-               }
-       }
-       // timeout
-       else if (slot_context->slot_event_bits & LED_TIMER2_EVENT) {
-               //
-               // Set completion info for HW-initiated request
-               //
-               slot_context->attn_led_completion.hw_initiated = TRUE;
-               slot_context->attn_led_completion.type = SHPC_ASYNC_LED_NORMAL;
-               slot_context->attn_led_completion.timeout = 0;
-               slot_context->attn_led_completion.request_context = NULL;
-
-               //
-               // Grab Command MUTEX to set Attn LED at "Normal" (On/Off) state
-               //
-               slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_normal_cmd_available;
-
-       }
-       // exit_request_event
-       else {
-       status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_wait_for_attn_led_normal_cmd_available() @ PASSIVE_LEVEL
-//
-// ****************************************************************************
-long
-hp_wait_for_attn_led_normal_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       //down_interruptible(&slot_context->cmd_acquire_mutex);
-       hp_set_slot_event_bit(slot_context, LED_CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->led_cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & LED_CMD_AVAILABLE_MUTEX_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // cmd_available_mutex
-       //
-       if(shpc_context->shpc_event_bits & LED_CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Update Attention LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               command_reg.Slot.attention_led = slot_context->problem_detected ?
-                       SHPC_LED_ON : SHPC_LED_OFF;
-               hp_clear_slot_event_bit(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.state = SHPC_SLOT_NO_CHANGE;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for command to complete (while holding MUTEX)
-               //
-               slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_normal_cmd_completion;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, LED_CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->led_cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_wait_for_attn_led_normal_cmd_completion() @ PASSIVE_LEVEL
-//
-// ****************************************************************************
-long
-hp_wait_for_attn_led_normal_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       long status = STATUS_SUCCESS;
-       union SHPC_STATUS_WREG status_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, LED_TIMER3_EVENT);
-       slot_context->led_timer3.data = (unsigned long)slot_context;
-       slot_context->led_timer3.function = hp_led_timer3_func;
-       slot_context->led_timer3.expires = jiffies + ONE_SEC_TIMEOUT;
-       add_timer(&slot_context->led_timer3);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & LED_TIMER3_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & LED_TIMER3_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->led_timer3);
-       }
-
-       //
-       // cmd_completion_event, timeout
-       //
-       if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-          (slot_context->slot_event_bits & LED_TIMER3_EVENT)) {
-               //
-               // Command completed OK?
-               //
-               status_reg.AsWord = readw(shpc_context->mmio_base_addr + SHPC_STATUS_REG_OFFSET);
-
-               if( status_reg.x.BSY == SHPC_STATUS_CLEARED &&
-                       status_reg.x.INVCMD_ERR == SHPC_STATUS_CLEARED ) {
-                       //
-                       // Complete succesful ENABLE request
-                       //
-                       slot_context->attn_led_completion.failed = HP_FALSE;
-                       slot_context->attn_led_completion.done = TRUE;
-                       slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_request;
-               }
-               else {
-                       //
-                       // Fail on-going request
-                       //
-                       slot_context->attn_led_completion.failed = HP_TRUE;
-                       slot_context->attn_led_completion.done = TRUE;
-
-                       //
-                       // Grab Command MUTEX to make sure Attn LED gets back to "Normal" (On/Off)
-                       //
-                       dbg("%s -->CMD_ERROR: slot_id[ %d:%d ]  Cmd[ %X ]", __FUNCTION__,
-                               shpc_context->shpc_instance, slot_context->slot_number-1, status_reg.AsWord );
-                       slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_back_to_normal_cmd_available;
-               }
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Release Command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, LED_CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->led_cmd_release_event);
-
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_wait_for_attn_led_back_to_normal_cmd_available() @ PASSIVE_LEVEL
-//
-// ****************************************************************************
-long
-hp_wait_for_attn_led_back_to_normal_cmd_available(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       unsigned long old_irq_flags;
-       long status = STATUS_SUCCESS;
-       union SHPC_COMMAND_WREG command_reg;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Wait for Command Available MUTEX
-       //
-       //down_interruptible(&slot_context->cmd_acquire_mutex);
-       hp_set_slot_event_bit(slot_context, LED_CMD_ACQUIRE_EVENT);
-       wake_up_interruptible(&slot_context->led_cmd_acquire_event);
-
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & LED_CMD_AVAILABLE_MUTEX_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       //
-       // cmd_available_mutex
-       //
-       if(shpc_context->shpc_event_bits & LED_CMD_AVAILABLE_MUTEX_EVENT) {
-               //
-               // Clear Completion EVENT before issuing next command
-               //
-               spin_lock_irqsave( &shpc_context->shpc_spinlock, old_irq_flags );
-               hp_clear_shpc_event_bit(shpc_context, CMD_COMPLETION_EVENT);
-               spin_unlock_irqrestore( &shpc_context->shpc_spinlock, old_irq_flags );
-
-               //
-               // Update Attention LED
-               //
-               spin_lock_irqsave( &slot_context->slot_spinlock, old_irq_flags );
-               command_reg.Slot.attention_led = slot_context->problem_detected ?
-                       SHPC_LED_ON : SHPC_LED_OFF;
-               hp_clear_slot_event_bit(slot_context, ATTN_LED_PROBLEM_EVENT);
-               spin_unlock_irqrestore( &slot_context->slot_spinlock, old_irq_flags );
-               command_reg.Slot.code = SHPC_SLOT_OPERATION;
-               command_reg.Slot.power_led = SHPC_led_NO_CHANGE;
-               command_reg.Slot.state = SHPC_SLOT_NO_CHANGE;
-               command_reg.Slot.TGT = slot_context->slot_number;
-               writew(command_reg.AsWord, shpc_context->mmio_base_addr + SHPC_COMMAND_REG_OFFSET);
-
-               //
-               // Wait for command to complete (while holding MUTEX)
-               //
-               slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_back_to_normal_cmd_completion;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               //
-               // Release Command MUTEX
-               //
-               hp_set_slot_event_bit(slot_context, LED_CMD_RELEASE_EVENT);
-               wake_up_interruptible(&slot_context->led_cmd_release_event);
-               status = STATUS_UNSUCCESSFUL;
-       }
-       return status;
-}
-
-
-// ****************************************************************************
-//
-// hp_wait_for_attn_led_back_to_normal_cmd_completion() @ PASSIVE_LEVEL
-//
-// ****************************************************************************
-long
-hp_wait_for_attn_led_back_to_normal_cmd_completion(
-       struct shpc_context* shpc_context,
-       struct slot_context* slot_context
-       )
-{
-       long status = STATUS_SUCCESS;
-
-       dbg("%s -->slot_id[ %d:%d ]", __FUNCTION__, shpc_context->shpc_instance, slot_context->slot_number-1 );
-
-       //
-       // Setup our timer
-       //
-       hp_clear_slot_event_bit(slot_context, LED_TIMER4_EVENT);
-       slot_context->led_timer4.data = (unsigned long)slot_context;
-       slot_context->led_timer4.function = hp_led_timer4_func;
-       slot_context->led_timer4.expires = jiffies + ONE_SEC_TIMEOUT;
-       add_timer(&slot_context->led_timer4);
-
-       //
-       // Wait for Command Completion EVENT while holding MUTEX
-       //
-       wait_event_interruptible(slot_context->slot_event,
-               ((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-               (slot_context->slot_event_bits & LED_TIMER4_EVENT) ||
-               (shpc_context->shpc_event_bits & EXIT_REQUEST_EVENT)));
-
-       if (!(slot_context->slot_event_bits & LED_TIMER4_EVENT)) {
-               //
-               // delete the timer because we got an event other than the timer
-               //
-               del_timer_sync(&slot_context->led_timer4);
-       }
-
-       //
-       // cmd_completion_event, timeout
-       //
-       if((shpc_context->shpc_event_bits & CMD_COMPLETION_EVENT) ||
-          (slot_context->slot_event_bits & LED_TIMER4_EVENT)) {
-               slot_context->attn_led_function = (SLOT_STATE_FUNCTION)hp_wait_for_attn_led_request;
-       }
-       //
-       // exit_request_event
-       //
-       else {
-               status = STATUS_UNSUCCESSFUL;
-       }
-       //
-       // Release Command MUTEX
-       //
-       hp_set_slot_event_bit(slot_context, LED_CMD_RELEASE_EVENT);
-       wake_up_interruptible(&slot_context->led_cmd_release_event);
-
-       return status;
-}
diff --git a/drivers/pci/hotplug/amdshpc_pci.c b/drivers/pci/hotplug/amdshpc_pci.c
deleted file mode 100644 (file)
index e8560fc..0000000
+++ /dev/null
@@ -1,3513 +0,0 @@
-/* 
- * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (C) 2001,2003 IBM Corp.
- * Copyright (C) 2002-2003 Advanced Micro Devices
- *
- * YOUR USE OF THIS CODE IS SUBJECT TO THE TERMS
- * AND CONDITIONS OF THE GNU GENERAL PUBLIC
- * LICENSE FOUND IN THE "GPL.TXT" FILE THAT IS
- * INCLUDED WITH THIS FILE AND POSTED AT
- * http://www.gnu.org/licenses/gpl.html
- *
- * Send feedback to <greg@kroah.com> <david.keck@amd.com>
- *
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/types.h>
-#include <linux/slab.h>
-#include <linux/proc_fs.h>
-#include <linux/pci.h>
-#include "amdshpc.h"
-#include "../pci.h"
-#include "../../../arch/i386/pci/pci.h"
-
-u8 amdshpc_nic_irq;
-u8 amdshpc_disk_irq;
-
-static u16 unused_IRQ;
-
-extern struct controller *amdshpc_ctrl_list;   /* = NULL */
-extern struct pci_func *amdshpc_slot_list[256];
-
-static int bridge_slot_remove(struct pci_func *bridge);
-static int is_bridge(struct pci_func * func);
-static int update_slot_info (struct controller  *ctrl, struct slot *slot);
-static int slot_remove(struct pci_func * old_slot);
-static u32 configure_new_device(struct controller * ctrl, struct pci_func *func,u8 behind_bridge, struct resource_lists *resources);
-static int configure_new_function(struct controller * ctrl, struct pci_func *func,u8 behind_bridge, struct resource_lists *resources);
-int amdshpc_process_SI (struct controller *ctrl, struct pci_func *func);
-
-static u16 unused_IRQ;
-
-/**
- * board_added - Called after a board has been added to the system.
- *
- * Turns power on for the board
- * Configures board
- *
- */
-static u32 board_added(struct pci_func * func, struct controller * ctrl)
-{
-       int index;
-       u32 temp_register = 0xFFFFFFFF;
-       u32 rc = 0;
-       struct pci_func *new_slot = NULL;
-       struct resource_lists res_lists;
-
-       dbg("%s: func->device, slot_offset = %d, %d \n",__FUNCTION__,
-               func->device, ctrl->slot_device_offset);
-
-       // Get vendor/device ID u32
-       rc = pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(func->device, func->function), PCI_VENDOR_ID, &temp_register);
-       dbg("%s: pci_bus_read_config_dword returns %d\n",__FUNCTION__, rc);
-       dbg("%s: temp_register is %x\n",__FUNCTION__, temp_register);
-
-       if (rc != 0) {
-               // Something's wrong here
-               temp_register = 0xFFFFFFFF;
-               dbg("%s: temp register set to %x by error\n",__FUNCTION__, temp_register);
-       }
-       // Preset return code.  It will be changed later if things go okay.
-       rc = NO_ADAPTER_PRESENT;
-
-       // All F's is an empty slot or an invalid board
-       if (temp_register != 0xFFFFFFFF) {        // Check for a board in the slot
-               res_lists.io_head       = ctrl->io_head;
-               res_lists.mem_head      = ctrl->mem_head;
-               res_lists.p_mem_head = ctrl->p_mem_head;
-               res_lists.bus_head      = ctrl->bus_head;
-               res_lists.irqs = NULL;
-
-               rc = configure_new_device(ctrl, func, 0, &res_lists);
-
-               dbg("%s: back from configure_new_device\n",__FUNCTION__);
-               ctrl->io_head   = res_lists.io_head;
-               ctrl->mem_head  = res_lists.mem_head;
-               ctrl->p_mem_head = res_lists.p_mem_head;
-               ctrl->bus_head  = res_lists.bus_head;
-
-               amdshpc_resource_sort_and_combine(&(ctrl->mem_head));
-               amdshpc_resource_sort_and_combine(&(ctrl->p_mem_head));
-               amdshpc_resource_sort_and_combine(&(ctrl->io_head));
-               amdshpc_resource_sort_and_combine(&(ctrl->bus_head));
-
-               if (rc) {
-                       // Something went wrong; disable slot
-//                     TO_DO_amd_disable_slot();
-                       return(rc);
-               } else {
-                       amdshpc_save_slot_config(ctrl, func);
-               }
-
-
-               func->status = 0;
-               func->switch_save = 0x10;
-               func->is_a_board = 0x01;
-
-               //next, we will instantiate the linux pci_dev structures (with appropriate driver notification, if already present)
-               dbg("%s: configure linux pci_dev structure\n",__FUNCTION__);
-               index = 0;
-               do {
-                       new_slot = amdshpc_slot_find(ctrl->bus, func->device, index++);
-                       if (new_slot && !new_slot->pci_dev) {
-                               amdshpc_configure_device(ctrl, new_slot);
-                       }
-               } while (new_slot);
-       } else {
-               // Something went wrong; disable slot
-//             TO_DO_amd_disable_slot();
-               return(rc);
-       }
-       return 0;
-}
-
-
-/**
- * remove_board - Returns resources
- */
-static u32 remove_board(struct pci_func * func, u32 replace_flag, struct controller  * ctrl)
-{
-       int index;
-       u8 skip = 0;
-       u8 device;
-       u8 hp_slot;
-       u32 rc;
-       struct resource_lists res_lists;
-       struct pci_func *temp_func;
-
-       if (func == NULL)
-               return(1);
-
-       if (amdshpc_unconfigure_device(func))
-               return(1);
-
-       device = func->device;
-
-       hp_slot = func->device - ctrl->slot_device_offset;
-       dbg("In %s, hp_slot = %d\n",__FUNCTION__, hp_slot);
-
-       // When we get here, it is safe to change base Address Registers.
-       // We will attempt to save the base Address Register Lengths
-       if (replace_flag || !ctrl->add_support)
-               rc = amdshpc_save_base_addr_length(ctrl, func);
-       else if (!func->bus_head && !func->mem_head &&
-                !func->p_mem_head && !func->io_head) {
-               // Here we check to see if we've saved any of the board's
-               // resources already.  If so, we'll skip the attempt to
-               // determine what's being used.
-               index = 0;
-               temp_func = amdshpc_slot_find(func->bus, func->device, index++);
-               while (temp_func) {
-                       if (temp_func->bus_head || temp_func->mem_head
-                               || temp_func->p_mem_head || temp_func->io_head) {
-                               skip = 1;
-                               break;
-                       }
-                       temp_func = amdshpc_slot_find(temp_func->bus, temp_func->device, index++);
-               }
-
-               if (!skip)
-                       rc = amdshpc_save_used_resources(ctrl, func);
-       }
-       // Change status to shutdown
-       if (func->is_a_board)
-               func->status = 0x01;
-       func->configured = 0;
-
-//     TO_DO_amd_disable_slot(ctrl, hp_slot);
-
-       if (!replace_flag && ctrl->add_support) {
-               while (func) {
-                       res_lists.io_head = ctrl->io_head;
-                       res_lists.mem_head = ctrl->mem_head;
-                       res_lists.p_mem_head = ctrl->p_mem_head;
-                       res_lists.bus_head = ctrl->bus_head;
-
-                       amdshpc_return_board_resources(func, &res_lists);
-
-                       ctrl->io_head = res_lists.io_head;
-                       ctrl->mem_head = res_lists.mem_head;
-                       ctrl->p_mem_head = res_lists.p_mem_head;
-                       ctrl->bus_head = res_lists.bus_head;
-
-                       amdshpc_resource_sort_and_combine(&(ctrl->mem_head));
-                       amdshpc_resource_sort_and_combine(&(ctrl->p_mem_head));
-                       amdshpc_resource_sort_and_combine(&(ctrl->io_head));
-                       amdshpc_resource_sort_and_combine(&(ctrl->bus_head));
-
-                       if (is_bridge(func)) {
-                               bridge_slot_remove(func);
-                       } else
-                               slot_remove(func);
-
-                       func = amdshpc_slot_find(ctrl->bus, device, 0);
-               }
-
-               // Setup slot structure with entry for empty slot
-               func = amdshpc_slot_create(ctrl->bus);
-
-               if (func == NULL) {
-                       // Out of memory
-                       return(1);
-               }
-
-               func->bus = ctrl->bus;
-               func->device = device;
-               func->function = 0;
-               func->configured = 0;
-               func->switch_save = 0x10;
-               func->is_a_board = 0;
-               func->p_task_event = NULL;
-       }
-       return 0;
-}
-
-
-/*
- * find_slot
- */
-static inline struct slot* find_slot (struct controller* ctrl, u8 device)
-{
-       struct slot *slot;
-
-       dbg("%s", __FUNCTION__);
-       if (!ctrl)
-               return NULL;
-
-       slot = ctrl->slot;
-
-       while (slot && (slot->device != device)) {
-               slot = slot->next;
-       }
-
-       return slot;
-}
-
-// board insertion
-int amdshpc_process_SI (struct controller *ctrl, struct pci_func *func)
-{
-       u8 device, hp_slot;
-       u16 temp_word;
-       u32 tempdword;
-       int rc;
-       struct slot* p_slot;
-       int physical_slot = 0;
-
-       dbg("%s  0", __FUNCTION__);
-       if (!ctrl)
-               return(1);
-
-       tempdword = 0;
-
-       device = func->device;
-       hp_slot = device - ctrl->slot_device_offset;
-       p_slot = find_slot(ctrl, device);
-       if (p_slot) {
-               physical_slot = p_slot->number;
-       }
-
-       if (tempdword & (0x01 << hp_slot)) {
-               dbg("%s  1", __FUNCTION__);
-               return(1);
-       }
-
-       // add board
-       slot_remove(func);
-
-       func = amdshpc_slot_create(ctrl->bus);
-       dbg("%s  2",__FUNCTION__);
-       if (func == NULL) {
-               dbg("%s 3",__FUNCTION__);
-               return(1);
-       }
-
-       func->bus = ctrl->bus;
-       func->device = device;
-       func->function = 0;
-       func->configured = 0;
-       func->is_a_board = 1;
-
-       // We have to save the presence info for these slots
-       temp_word = ctrl->ctrl_int_comp >> 16;
-       func->presence_save = (temp_word >> hp_slot) & 0x01;
-       func->presence_save |= (temp_word >> (hp_slot + 7)) & 0x02;
-
-       dbg("%s 4",__FUNCTION__);
-       if (ctrl->ctrl_int_comp & (0x1L << hp_slot)) {
-               dbg("%s 5",__FUNCTION__);
-               func->switch_save = 0;
-       } else {
-               dbg("%s 6",__FUNCTION__);
-               func->switch_save = 0x10;
-       }
-
-       rc = board_added(func, ctrl);
-       dbg("%s 7 rc=%d",__FUNCTION__,rc);
-       if (rc) {
-               dbg("%s 8",__FUNCTION__);
-               if (is_bridge(func)) {
-                       dbg("%s 9",__FUNCTION__);
-                       bridge_slot_remove(func);
-               } else {
-                       dbg("%s 10",__FUNCTION__);
-                       slot_remove(func);
-               }
-
-               // Setup slot structure with entry for empty slot
-               func = amdshpc_slot_create(ctrl->bus);
-
-               dbg("%s 11",__FUNCTION__);
-               if (func == NULL) {
-                       // Out of memory
-                       return(1);
-               }
-
-               func->bus = ctrl->bus;
-               func->device = device;
-               func->function = 0;
-               func->configured = 0;
-               func->is_a_board = 0;
-
-               // We have to save the presence info for these slots
-               temp_word = ctrl->ctrl_int_comp >> 16;
-               func->presence_save = (temp_word >> hp_slot) & 0x01;
-               func->presence_save |=
-               (temp_word >> (hp_slot + 7)) & 0x02;
-
-               if (ctrl->ctrl_int_comp & (0x1L << hp_slot)) {
-                       dbg("%s 12",__FUNCTION__);
-                       func->switch_save = 0;
-               } else {
-                       dbg("%s 13",__FUNCTION__);
-                       func->switch_save = 0x10;
-               }
-       }
-
-       if (rc) {
-               dbg("%s: rc = %d\n",__FUNCTION__, rc);
-       }
-
-       if (p_slot){
-               dbg("%s 14",__FUNCTION__);
-               update_slot_info(ctrl, p_slot);
-       }
-
-       return rc;
-}
-
-// Disable Slot
-int amdshpc_process_SS (struct controller *ctrl, struct pci_func *func)
-{
-       u8 device, class_code, header_type, BCR;
-       u8 index = 0;
-       u8 replace_flag;
-       u32 rc = 0;
-       struct slot* p_slot;
-       int physical_slot=0;
-
-       dbg("%s 0",__FUNCTION__);
-       device = func->device;
-       func = amdshpc_slot_find(ctrl->bus, device, index++);
-       p_slot = find_slot(ctrl, device);
-       if (p_slot) {
-               physical_slot = p_slot->number;
-       }
-
-       // Make sure there are no video controllers here
-       while (func && !rc) {
-               dbg("%s 1..",__FUNCTION__);
-               // Check the Class Code
-               rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(func->device, func->function), 0x0B, &class_code);
-               dbg("%s 1.1 rc = %d  class_code = %02x",__FUNCTION__, rc, class_code);
-               if (rc){
-                       dbg("%s 2",__FUNCTION__);
-                       return rc;
-               }
-
-               if (class_code == PCI_BASE_CLASS_DISPLAY) {
-                       /* Display/Video adapter (not supported) */
-                       dbg("%s 3",__FUNCTION__);
-                       rc = REMOVE_NOT_SUPPORTED;
-               } else {
-                       dbg("%s 3.5",__FUNCTION__);
-                       // See if it's a bridge
-                       rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(func->device, func->function), PCI_HEADER_TYPE, &header_type);
-                       if (rc){
-                               dbg("%s 4",__FUNCTION__);
-                               return rc;
-                       }
-
-                       // If it's a bridge, check the VGA Enable bit
-                       if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {
-                               dbg("%s 4.5",__FUNCTION__);
-                               rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(func->device, func->function), PCI_BRIDGE_CONTROL, &BCR);
-                               if (rc){
-                                       dbg("%s 5",__FUNCTION__);
-                                       return rc;
-                               }
-
-                               dbg("%s 5.5",__FUNCTION__);
-                               // If the VGA Enable bit is set, remove isn't supported
-                               if (BCR & PCI_BRIDGE_CTL_VGA) {
-                                       dbg("%s 6",__FUNCTION__);
-                                       rc = REMOVE_NOT_SUPPORTED;
-                               }
-                       }
-               }
-
-               func = amdshpc_slot_find(ctrl->bus, device, index++);
-               dbg("%s 7",__FUNCTION__);
-       }
-
-       func = amdshpc_slot_find(ctrl->bus, device, 0);
-       dbg("%s 8",__FUNCTION__);
-       if ((func != NULL) && !rc) {
-               dbg("%s 9",__FUNCTION__);
-               //FIXME: Replace flag should be passed into process_SS
-               replace_flag = !(ctrl->add_support);
-               rc = remove_board(func, replace_flag, ctrl);
-       } else if (!rc) {
-               dbg("%s 10",__FUNCTION__);
-               rc = 1;
-       }
-
-       if (p_slot){
-               dbg("%s 11",__FUNCTION__);
-               update_slot_info(ctrl, p_slot);
-       }
-
-       dbg("%s 12",__FUNCTION__);
-       return(rc);
-}
-
-
-/*
- * detect_HRT_floating_pointer
- *
- * find the Hot Plug Resource Table in the specified region of memory.
- *
- */
-static void *detect_HRT_floating_pointer(void *begin, void *end)
-{
-       void *fp;
-       void *endp;
-       u8 temp1, temp2, temp3, temp4;
-       int status = 0;
-
-       endp = (end - sizeof(struct hrt) + 1);
-
-       for (fp = begin; fp <= endp; fp += 16) {
-               temp1 = readb(fp + SIG0);
-               temp2 = readb(fp + SIG1);
-               temp3 = readb(fp + SIG2);
-               temp4 = readb(fp + SIG3);
-               if (temp1 == '$' &&
-                       temp2 == 'H' &&
-                       temp3 == 'R' &&
-                       temp4 == 'T') {
-                       status = 1;
-                       dbg("%s -->temp string----> %c%c%c%c  at----->  %p\n", __FUNCTION__, temp1,temp2,temp3,temp4,fp);
-                       break;
-               }
-       }
-
-       if (!status) {
-               fp = NULL;
-               dbg("%s -->Did not discover Hotplug Resource Table between start:%p  end:%p\n", __FUNCTION__, begin, end);
-               return fp;
-       }
-
-       dbg("%s -->Discovered Hotplug Resource Table at %p\n", __FUNCTION__, fp);
-       return fp;
-}
-
-/**
- * amdshpc_slot_find - Looks for a node by bus, and device, multiple functions accessed
- * @bus: bus to find
- * @device: device to find
- * @index: is 0 for first function found, 1 for the second...
- *
- * Returns pointer to the node if successful, %NULL otherwise.
- */
-struct pci_func *amdshpc_slot_find(u8 bus, u8 device, u8 index) {
-       int found = -1;
-       struct pci_func *func;
-
-       func = amdshpc_slot_list[bus];
-       dbg("%s  amdshpc_slot_list[%02x] = %p", __FUNCTION__, bus, amdshpc_slot_list[bus]);
-       dbg("%s  bus, device, index  %x %d %d", __FUNCTION__, bus, device, index);
-
-       if ((func == NULL) || ((func->device == device) && (index == 0)))
-               return(func);
-
-       if (func->device == device)
-               found++;
-
-       while (func->next != NULL) {
-               func = func->next;
-
-               if (func->device == device)
-                       found++;
-
-               if (found == index)
-                       return(func);
-       }
-
-       return(NULL);
-}
-
-
-/*
- * amdshpc_resource_sort_and_combine
- *
- * Sorts all of the nodes in the list in ascending order by
- * their base addresses.  Also does garbage collection by
- * combining adjacent nodes.
- *
- * returns 0 if success
- */
-int amdshpc_resource_sort_and_combine(struct pci_resource **head)
-{
-       struct pci_resource *node1;
-       struct pci_resource *node2;
-       int out_of_order = 1;
-
-       dbg("%s: head = %p, *head = %p\n",__FUNCTION__, head, *head);
-
-       if (!(*head))
-               return(1);
-
-       dbg("%s -->*head->next = %p\n", __FUNCTION__,(*head)->next);
-
-       if (!(*head)->next)
-               return(0);      /* only one item on the list, already sorted! */
-
-       dbg("%s -->*head->base = 0x%x\n", __FUNCTION__,(*head)->base);
-       dbg("%s -->*head->next->base = 0x%x\n", __FUNCTION__,(*head)->next->base);
-       while (out_of_order) {
-               out_of_order = 0;
-
-               // Special case for swapping list head
-               if (((*head)->next) &&
-                       ((*head)->base > (*head)->next->base)) {
-                       node1 = *head;
-                       (*head) = (*head)->next;
-                       node1->next = (*head)->next;
-                       (*head)->next = node1;
-                       out_of_order++;
-               }
-
-               node1 = (*head);
-
-               while (node1->next && node1->next->next) {
-                       if (node1->next->base > node1->next->next->base) {
-                               out_of_order++;
-                               node2 = node1->next;
-                               node1->next = node1->next->next;
-                               node1 = node1->next;
-                               node2->next = node1->next;
-                               node1->next = node2;
-                       } else
-                               node1 = node1->next;
-               }
-       }  // End of out_of_order loop
-
-       node1 = *head;
-
-       while (node1 && node1->next) {
-               if ((node1->base + node1->length) == node1->next->base) {
-                       // Combine
-                       dbg("%s -->8..\n", __FUNCTION__);
-                       node1->length += node1->next->length;
-                       node2 = node1->next;
-                       node1->next = node1->next->next;
-                       kfree(node2);
-               } else
-                       node1 = node1->next;
-       }
-
-       return(0);
-}
-
-
-/*
- * amdshpc_find_available_resources
- *
- * Finds available memory, IO, and IRQ resources for programming
- * devices which may be added to the system
- * this function is for hot plug ADD!
- *
- * returns 0 if success
- */
-int amdshpc_find_available_resources (struct controller *ctrl, void *rom_start)
-{
-       u8 temp;
-       u8 populated_slot=0;
-       u8 bridged_slot;
-       u8 slot_index;
-       void *one_slot;
-       struct pci_func *func = NULL;
-       int i = 10, index;
-       u32 temp_dword, rc;
-       struct pci_resource *mem_node;
-       struct pci_resource *p_mem_node;
-       struct pci_resource *io_node;
-       struct pci_resource *bus_node;
-       void *rom_resource_table;
-       struct shpc_context *shpc_context;
-
-       slot_index=0;
-
-       shpc_context = (struct shpc_context* ) ctrl->shpc_context;
-       rom_resource_table = detect_HRT_floating_pointer(rom_start, rom_start+0xffff);
-       dbg("%s -->rom_resource_table = %p\n", __FUNCTION__, rom_resource_table);
-
-       if (rom_resource_table == NULL) {
-               return -ENODEV;
-       }
-       // Sum all resources and setup resource maps
-       unused_IRQ = readl(rom_resource_table + UNUSED_IRQ);
-       dbg("%s -->unused_IRQ = %x\n", __FUNCTION__, unused_IRQ);
-       dbg("%s -->PCI_IRQ = %x\n", __FUNCTION__, readl(rom_resource_table + PCIIRQ));
-
-       temp = 0;
-
-       while (unused_IRQ) {
-               if (unused_IRQ & 1) {
-                       amdshpc_disk_irq = temp;
-                       break;
-               }
-               unused_IRQ = unused_IRQ >> 1;
-               temp++;
-       }
-
-       dbg("%s -->amdshpc_disk_irq= %d\n", __FUNCTION__, amdshpc_disk_irq);
-       unused_IRQ = unused_IRQ >> 1;
-       temp++;
-
-       while (unused_IRQ) {
-               if (unused_IRQ & 1) {
-                       amdshpc_nic_irq = temp;
-                       break;
-               }
-               unused_IRQ = unused_IRQ >> 1;
-               temp++;
-       }
-
-       dbg("%s -->amdshpc_nic_irq= %d\n", __FUNCTION__, amdshpc_nic_irq);
-       unused_IRQ = readl(rom_resource_table + PCIIRQ);
-
-       temp = 0;
-
-       if (!amdshpc_nic_irq) {
-               amdshpc_nic_irq = ctrl->interrupt;
-       }
-
-       if (!amdshpc_disk_irq) {
-               amdshpc_disk_irq = ctrl->interrupt;
-       }
-
-       dbg("%s -->amdshpc_disk_irq, amdshpc_nic_irq= %d, %d\n", __FUNCTION__, amdshpc_disk_irq, amdshpc_nic_irq);
-
-       one_slot = rom_resource_table + sizeof (struct hrt);
-
-       i = readb(rom_resource_table + NUMBER_OF_ENTRIES);
-       dbg("%s -->number_of_entries = %d\n", __FUNCTION__, i);
-
-       if (!readb(one_slot + SECONDARY_BUS)) {
-               return(1);
-       }
-
-       dbg("%s -->dev|IO base|length|Mem base|length|Pre base|length|PB SB MB\n", __FUNCTION__);
-
-       while (i && readb(one_slot + SECONDARY_BUS)) {
-               u8 dev_func =           readb(one_slot + DEV_FUNC);
-               u8 primary_bus =        readb(one_slot + PRIMARY_BUS);
-               u8 secondary_bus =      readb(one_slot + SECONDARY_BUS);
-               u8 max_bus =            readb(one_slot + MAX_BUS);
-               u16 io_base =           readw(one_slot + IO_BASE);
-               u16 io_length =         readw(one_slot + IO_LENGTH);
-               u16 mem_base =          readw(one_slot + MEM_BASE);
-               u16 mem_length =        readw(one_slot + MEM_LENGTH);
-               u16 pre_mem_base =      readw(one_slot + PRE_MEM_BASE);
-               u16 pre_mem_length = readw(one_slot + PRE_MEM_LENGTH);
-
-               dbg("%s -->%2.2x | %4.4x  | %4.4x | %4.4x   | %4.4x | %4.4x   | %4.4x |%2.2x %2.2x %2.2x\n", __FUNCTION__,
-                       dev_func, io_base, io_length, mem_base, mem_length, pre_mem_base, pre_mem_length,
-                       primary_bus, secondary_bus, max_bus);
-
-               // If this entry isn't for our controller's bus, ignore it
-               if (primary_bus != ctrl->bus) {
-                       i--;
-                       one_slot += sizeof (struct slot_rt);
-                       continue;
-               }
-               
-               // find out if this entry is for an occupied slot
-               pci_bus_read_config_dword(ctrl->pci_bus, dev_func, PCI_VENDOR_ID, &temp_dword);
-               dbg("bus %p, pri-bus %08x, slot %d, function %d, vend ID %d, tempDW %p\n",
-                       ctrl->pci_bus, primary_bus, PCI_SLOT(dev_func), PCI_FUNC(dev_func), PCI_VENDOR_ID, &temp_dword);
-
-               dbg("%s -->temp_D_word = %08X\n", __FUNCTION__, temp_dword);
-
-               if (temp_dword != 0xFFFFFFFF) {
-                       index = 0;
-                       func = amdshpc_slot_find(primary_bus, dev_func >> 3, 0);
-                       dbg("%s -->func = %p",__FUNCTION__, (unsigned long*)func);
-                       while (func && (func->function != PCI_FUNC(dev_func))) {
-                               dbg("%s -->func = %p (bus, dev, fun) = (%d, %d, %d)\n",__FUNCTION__, func, primary_bus, dev_func >> 3, index);
-                               func = amdshpc_slot_find(primary_bus, PCI_SLOT(dev_func), index++);
-                       }
-
-                       // If we can't find a match, skip this table entry
-                       if (!func) {
-                               i--;
-                               one_slot += sizeof (struct slot_rt);
-                               continue;
-                       }
-                       // this may not work and shouldn't be used
-                       if (secondary_bus != primary_bus){
-                               bridged_slot = 1;
-                  }
-                       else{
-                               bridged_slot = 0;
-                  }
-                       shpc_context->slot_context[slot_index].slot_occupied = 1;
-               } else {
-
-                       populated_slot = 0;
-                       bridged_slot = 0;
-               }
-           slot_index++;
-           
-               // If we've got a valid IO base, use it
-
-               temp_dword = io_base + io_length;
-               dbg("%s -->temp_D_word for io base = %08x",__FUNCTION__, temp_dword);
-
-               if ((io_base) && (temp_dword < 0x10000)) {
-                       io_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                       if (!io_node)
-                               return -ENOMEM;
-
-                       io_node->base = io_base;
-                       io_node->length = io_length;
-
-                       dbg("%s -->found io_node(base, length) = %x, %x\n",__FUNCTION__, io_node->base, io_node->length);
-                       dbg("%s -->populated slot =%d \n",__FUNCTION__, populated_slot);
-                       if (!populated_slot) {
-                               io_node->next = ctrl->io_head;
-                               ctrl->io_head = io_node;
-                       } else {
-                               io_node->next = func->io_head;
-                               func->io_head = io_node;
-                       }
-               }
-
-               // If we've got a valid memory base, use it
-               temp_dword = mem_base + mem_length;
-               dbg("%s -->temp_D_word for mem base = %08x",__FUNCTION__, temp_dword);
-               if ((mem_base) && (temp_dword < 0x10000)) {
-                       mem_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                       if (!mem_node)
-                               return -ENOMEM;
-
-                       mem_node->base = mem_base << 16;
-
-                       mem_node->length = mem_length << 16;
-
-                       dbg("%s -->found mem_node(base, length) = %08x, %08x\n",__FUNCTION__, mem_node->base, mem_node->length);
-                       dbg("%s -->populated slot =%d \n",__FUNCTION__, populated_slot);
-                       if (!populated_slot) {
-                               mem_node->next = ctrl->mem_head;
-                               ctrl->mem_head = mem_node;
-                       } else {
-                               mem_node->next = func->mem_head;
-                               func->mem_head = mem_node;
-                       }
-               }
-
-               // If we've got a valid prefetchable memory base, and
-               // the base + length isn't greater than 0xFFFF
-               temp_dword = pre_mem_base + pre_mem_length;
-               dbg("%s -->temp_D_word for pre mem base = %08x",__FUNCTION__, temp_dword);
-               if ((pre_mem_base) && (temp_dword < 0x10000)) {
-                       p_mem_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                       if (!p_mem_node)
-                               return -ENOMEM;
-
-                       p_mem_node->base = pre_mem_base << 16;
-
-                       p_mem_node->length = pre_mem_length << 16;
-                       dbg("%s -->found p_mem_node(base, length) = %08x, %08x\n",__FUNCTION__, p_mem_node->base, p_mem_node->length);
-                       dbg("%s -->populated slot =%d \n",__FUNCTION__, populated_slot);
-
-                       if (!populated_slot) {
-                               p_mem_node->next = ctrl->p_mem_head;
-                               ctrl->p_mem_head = p_mem_node;
-                       } else {
-                               p_mem_node->next = func->p_mem_head;
-                               func->p_mem_head = p_mem_node;
-                       }
-               }
-
-               // If we've got a valid bus number, use it
-               // The second condition is to ignore bus numbers on
-               // populated slots that don't have PCI-PCI bridges
-               if (secondary_bus && (secondary_bus != primary_bus)) {
-                       bus_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                       if (!bus_node)
-                               return -ENOMEM;
-
-                       bus_node->base = secondary_bus;
-                       bus_node->length = max_bus - secondary_bus + 1;
-                       dbg("%s -->found bus_node(base, length) = %08x, %08x\n",__FUNCTION__, bus_node->base, bus_node->length);
-                       dbg("%s -->populated slot =%d \n",__FUNCTION__, populated_slot);
-                       if (!populated_slot) {
-                               bus_node->next = ctrl->bus_head;
-                               ctrl->bus_head = bus_node;
-                       } else {
-                               bus_node->next = func->bus_head;
-                               func->bus_head = bus_node;
-                       }
-               }
-
-               i--;
-               one_slot += sizeof (struct slot_rt);
-       }
-
-       // If all of the following fail, we don't have any resources for
-       // hot plug add
-       rc = 1;
-       rc &= amdshpc_resource_sort_and_combine(&(ctrl->mem_head));
-       dbg("%s -->rc =%d \n",__FUNCTION__, rc);
-       rc &= amdshpc_resource_sort_and_combine(&(ctrl->p_mem_head));
-       dbg("%s -->rc =%d \n",__FUNCTION__, rc);
-       rc &= amdshpc_resource_sort_and_combine(&(ctrl->io_head));
-       dbg("%s -->rc =%d \n",__FUNCTION__, rc);
-       rc &= amdshpc_resource_sort_and_combine(&(ctrl->bus_head));
-       dbg("%s -->rc =%d \n",__FUNCTION__, rc);
-
-       return(rc);
-}
-
-
-
-/*
- * amdshpc_save_config
- *
- * Reads configuration for all slots in a PCI bus and saves info.
- *
- * Note:  For non-hot plug busses, the slot # saved is the device #
- *
- * returns 0 if success
- */
-int amdshpc_save_config(struct controller *ctrl, int busnumber, union SLOT_CONFIG_INFO* is_hot_plug)
- {
-       long rc;
-       u8 class_code;
-       u8 header_type;
-       u32 ID;
-       u8 secondary_bus;
-       struct pci_func *new_slot;
-       int sub_bus;
-       int FirstSupported;
-       int LastSupported;
-       int max_functions;
-       int function;
-       u8 DevError;
-       int device = 0;
-       int cloop = 0;
-       int stop_it;
-       int index;
-
-       //  Decide which slots are supported
-       if (is_hot_plug) {
-               FirstSupported  = ctrl->first_slot;
-               LastSupported = (FirstSupported + is_hot_plug->x.lu_slots_implemented) - 1;
-       } else {
-               FirstSupported = 0;
-               LastSupported = 0x1F;
-       }
-
-       // Save PCI configuration space for all devices in supported slots
-       for (device = FirstSupported; device <= LastSupported; device++) {
-               int devfn = PCI_DEVFN(device, 0);
-
-               ID = 0xFFFFFFFF;
-               rc = pci_bus_read_config_dword(ctrl->pci_bus, devfn, PCI_VENDOR_ID, &ID);
-               if (rc)
-                       return rc;
-
-               if (ID != 0xFFFFFFFF) {   //  device in slot
-                       rc = pci_bus_read_config_byte(ctrl->pci_bus, devfn, 0x0B, &class_code);
-                       if (rc)
-                               return rc;
-
-                       rc = pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_HEADER_TYPE, &header_type);
-                       if (rc)
-                               return rc;
-
-                       // If multi-function device, set max_functions to 8
-                       if (header_type & 0x80)
-                               max_functions = 8;
-                       else
-                               max_functions = 1;
-
-                       function = 0;
-
-                       do {
-                               DevError = 0;
-
-                               if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {   // P-P Bridge
-                                       //  Recurse the subordinate bus
-                                       //  get the subordinate bus number
-                                       rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(device, function), PCI_SECONDARY_BUS, &secondary_bus);
-                                       if (rc) {
-                                               return rc;
-                                       } else {
-                                               sub_bus = (int) secondary_bus;
-
-                                               // Save secondary bus cfg spc
-                                               // with this recursive call.
-                                               rc = amdshpc_save_config(ctrl, sub_bus, 0);
-
-                                               if (rc)
-                                                       return rc;
-                                       }
-                               }
-
-                               index = 0;
-                               new_slot = amdshpc_slot_find(busnumber, device, index++);
-                               while (new_slot &&
-                                      (new_slot->function != (u8) function))
-                                       new_slot = amdshpc_slot_find(busnumber, device, index++);
-
-                               if (!new_slot) {
-                                       // Setup slot structure.
-                                       new_slot = amdshpc_slot_create(busnumber);
-
-                                       if (new_slot == NULL)
-                                               return(1);
-                               }
-
-                               new_slot->bus = (u8) busnumber;
-                               new_slot->device = (u8) device;
-                               new_slot->function = (u8) function;
-                               new_slot->is_a_board = 1;
-                               new_slot->switch_save = 0x10;
-                               // In case of unsupported board
-                               new_slot->status = DevError;
-                               new_slot->pci_dev = pci_find_slot(new_slot->bus, (new_slot->device << 3) | new_slot->function);
-                               dbg("%s EXISTING SLOT", __FUNCTION__);
-                               dbg("%s ns->bus         = %d", __FUNCTION__, new_slot->bus);
-                               dbg("%s ns->device      = %d", __FUNCTION__, new_slot->device);
-                               dbg("%s ns->function    = %d", __FUNCTION__, new_slot->function);
-                               dbg("%s ns->is_a_board  = %d", __FUNCTION__, new_slot->is_a_board);
-                               dbg("%s ns->switch_save = %02x", __FUNCTION__, new_slot->switch_save);
-                               dbg("%s ns->pci_dev     = %p", __FUNCTION__, new_slot->pci_dev);
-
-                               for (cloop = 0; cloop < 0x20; cloop++) {
-                                       rc = pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(device, function), cloop << 2, (u32 *) & (new_slot-> config_space [cloop]));
-                                       if (rc)
-                                               return rc;
-                               }
-
-                               function++;
-                               stop_it = 0;
-
-                               //  this loop skips to the next present function
-                               //  reading in Class Code and Header type.
-                               while ((function < max_functions)&&(!stop_it)) {
-                                       rc = pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(device, function), PCI_VENDOR_ID, &ID);
-                                       if (ID == 0xFFFFFFFF) {  // nothing there.
-                                               function++;
-                                       } else {  // Something there
-                                               rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(device, function), 0x0B, &class_code);
-                                               if (rc)
-                                                       return rc;
-
-                                               rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(device, function), PCI_HEADER_TYPE, &header_type);
-                                               if (rc)
-                                                       return rc;
-
-                                               stop_it++;
-                                       }
-                               }
-
-                       } while (function < max_functions);
-               }               // End of IF (device in slot?)
-               else if (is_hot_plug) {
-                       // Setup slot structure with entry for empty slot
-                       new_slot = amdshpc_slot_create(busnumber);
-
-                       if (new_slot == NULL) {
-                               return(1);
-                       }
-
-                       new_slot->bus = (u8) busnumber;
-                       new_slot->device = (u8) device;
-                       new_slot->function = 0;
-                       new_slot->is_a_board = 0;
-                       new_slot->presence_save = 0;
-                       new_slot->switch_save = 0;
-                       dbg("%s NEW SLOT", __FUNCTION__);
-                       dbg("%s ns->bus         = %d", __FUNCTION__, new_slot->bus);
-                       dbg("%s ns->device      = %d", __FUNCTION__, new_slot->function);
-                       dbg("%s ns->function    = %d", __FUNCTION__, new_slot->function);
-               }
-       }// End of FOR loop
-
-       return 0;
-}
-
-
-/*
- * amdshpc_set_irq
- *
- * @bus_num: bus number of PCI device
- * @dev_num: device number of PCI device
- */
-/*
-int amdshpc_set_irq (u8 bus_num, u8 dev_num, u8 int_pin, u8 irq_num)
-{
-       int rc;
-       u16 temp_word;
-       struct pci_dev fakedev;
-       struct pci_bus fakebus;
-
-       fakedev.devfn = dev_num << 3;
-       fakedev.bus = &fakebus;
-       fakebus.number = bus_num;
-       dbg("%s : dev %d, bus %d, pin %d, num %d\n",__FUNCTION__,
-               dev_num, bus_num, int_pin, irq_num);
-       rc = pcibios_set_irq_routing(&fakedev, int_pin - 0x0a, irq_num);
-       dbg("%s:rc %d\n",__FUNCTION__, rc);
-       if (rc)
-               return rc;
-
-       // set the Edge Level Control Register (ELCR)
-       temp_word = inb(0x4d0);
-       temp_word |= inb(0x4d1) << 8;
-
-       temp_word |= 0x01 << irq_num;
-
-       // This should only be for x86 as it sets the Edge Level Control Register
-       outb((u8) (temp_word & 0xFF), 0x4d0);
-       outb((u8) ((temp_word & 0xFF00) >> 8), 0x4d1);
-
-       return 0;
-}
-*/
-
-/*
- * do_pre_bridge_resource_split
- *
- *     Returns zero or one node of resources that aren't in use
- *
- */
-static struct pci_resource *do_pre_bridge_resource_split (struct pci_resource **head, struct pci_resource **orig_head, u32 alignment) {
-       struct pci_resource *prevnode = NULL;
-       struct pci_resource *node;
-       struct pci_resource *split_node;
-       u32 rc;
-       u32 temp_dword;
-       dbg("%s -->do_pre_bridge_resource_split\n",__FUNCTION__);
-
-       if (!(*head) || !(*orig_head))
-               return(NULL);
-
-       rc = amdshpc_resource_sort_and_combine(head);
-
-       if (rc)
-               return(NULL);
-
-       if ((*head)->base != (*orig_head)->base)
-               return(NULL);
-
-       if ((*head)->length == (*orig_head)->length)
-               return(NULL);
-
-
-       // If we got here, there the bridge requires some of the resource, but
-       // we may be able to split some off of the front
-
-       node = *head;
-
-       if (node->length & (alignment -1)) {
-               // this one isn't an aligned length, so we'll make a new entry
-               // and split it up.
-               split_node = (struct pci_resource*) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-
-               if (!split_node)
-                       return(NULL);
-
-               temp_dword = (node->length | (alignment-1)) + 1 - alignment;
-
-               split_node->base = node->base;
-               split_node->length = temp_dword;
-
-               node->length -= temp_dword;
-               node->base += split_node->length;
-
-               // Put it in the list
-               *head = split_node;
-               split_node->next = node;
-       }
-
-       if (node->length < alignment) {
-               return(NULL);
-       }
-
-       // Now unlink it
-       if (*head == node) {
-               *head = node->next;
-               node->next = NULL;
-       } else {
-               prevnode = *head;
-               while (prevnode->next != node)
-                       prevnode = prevnode->next;
-
-               prevnode->next = node->next;
-               node->next = NULL;
-       }
-
-       return(node);
-}
-
-
-/*
- * do_bridge_resource_split
- *
- *     Returns zero or one node of resources that aren't in use
- *
- */
-static struct pci_resource *do_bridge_resource_split (struct pci_resource **head, u32 alignment) {
-       struct pci_resource *prevnode = NULL;
-       struct pci_resource *node;
-       u32 rc;
-       u32 temp_dword;
-
-       if (!(*head))
-               return(NULL);
-
-       rc = amdshpc_resource_sort_and_combine(head);
-
-       if (rc)
-               return(NULL);
-
-       node = *head;
-
-       while (node->next) {
-               prevnode = node;
-               node = node->next;
-               kfree(prevnode);
-       }
-
-       if (node->length < alignment) {
-               kfree(node);
-               return(NULL);
-       }
-
-       if (node->base & (alignment - 1)) {
-               // Short circuit if adjusted size is too small
-               temp_dword = (node->base | (alignment-1)) + 1;
-               if ((node->length - (temp_dword - node->base)) < alignment) {
-                       kfree(node);
-                       return(NULL);
-               }
-
-               node->length -= (temp_dword - node->base);
-               node->base = temp_dword;
-       }
-
-       if (node->length & (alignment - 1)) {
-               // There's stuff in use after this node
-               kfree(node);
-               return(NULL);
-       }
-
-       return(node);
-}
-
-
-/*
- * sort_by_size
- *
- * Sorts nodes on the list by their length.
- * Smallest first.
- *
- */
-static int sort_by_size(struct pci_resource **head)
-{
-       struct pci_resource *current_res;
-       struct pci_resource *next_res;
-       int out_of_order = 1;
-
-       if (!(*head))
-               return(1);
-
-       if (!((*head)->next))
-               return(0);
-
-       while (out_of_order) {
-               out_of_order = 0;
-
-               // Special case for swapping list head
-               if (((*head)->next) &&
-                       ((*head)->length > (*head)->next->length)) {
-                       out_of_order++;
-                       current_res = *head;
-                       *head = (*head)->next;
-                       current_res->next = (*head)->next;
-                       (*head)->next = current_res;
-               }
-
-               current_res = *head;
-
-               while (current_res->next && current_res->next->next) {
-                       if (current_res->next->length > current_res->next->next->length) {
-                               out_of_order++;
-                               next_res = current_res->next;
-                               current_res->next = current_res->next->next;
-                               current_res = current_res->next;
-                               next_res->next = current_res->next;
-                               current_res->next = next_res;
-                       } else
-                               current_res     = current_res->next;
-               }
-       }  // End of out_of_order loop
-
-       return(0);
-}
-
-/**
- * amdshpc_slot_create - Creates a node and adds it to the proper bus.
- * @busnumber - bus where new node is to be located
- *
- * Returns pointer to the new node or NULL if unsuccessful
- */
-struct pci_func *amdshpc_slot_create(u8 busnumber) {
-       struct pci_func *new_slot;
-       struct pci_func *next;
-
-       dbg("%s  busnumber = %02xh",__FUNCTION__, busnumber);
-       new_slot = (struct pci_func *) kmalloc(sizeof(struct pci_func), GFP_KERNEL);
-
-       if (new_slot == NULL) {
-               // I'm not dead yet!
-               // You will be.
-               return(new_slot);
-       }
-
-       memset(new_slot, 0, sizeof(struct pci_func));
-
-       new_slot->next = NULL;
-       new_slot->configured = 1;
-
-       if (amdshpc_slot_list[busnumber] == NULL) {
-               amdshpc_slot_list[busnumber] = new_slot;
-               dbg("%s   created new slot in amdshpc_slot_list  amdshpc_slot_list[%02X] = %p", __FUNCTION__,
-                                                       busnumber, amdshpc_slot_list[busnumber]);
-       } else {
-               next = amdshpc_slot_list[busnumber];
-               while (next->next != NULL)
-                       next = next->next;
-               next->next = new_slot;
-       }
-       return(new_slot);
-}
-
-
-/*
- * return_resource
- *
- * Puts node back in the resource list pointed to by head
- *
- */
-static inline void return_resource (struct pci_resource **head, struct pci_resource *node)
-{
-       dbg("%s",__FUNCTION__);
-       if (!node || !head)
-               return;
-       node->next = *head;
-       *head = node;
-}
-
-
-/*
- * sort_by_max_size
- *
- * Sorts nodes on the list by their length.
- * Largest first.
- *
- */
-static int sort_by_max_size(struct pci_resource **head)
-{
-       struct pci_resource *current_res;
-       struct pci_resource *next_res;
-       int out_of_order = 1;
-
-       if (!(*head))
-               return(1);
-
-       if (!((*head)->next))
-               return(0);
-
-       while (out_of_order) {
-               out_of_order = 0;
-
-               // Special case for swapping list head
-               if (((*head)->next) &&
-                       ((*head)->length < (*head)->next->length)) {
-                       out_of_order++;
-                       current_res = *head;
-                       *head = (*head)->next;
-                       current_res->next = (*head)->next;
-                       (*head)->next = current_res;
-               }
-
-               current_res = *head;
-
-               while (current_res->next && current_res->next->next) {
-                       if (current_res->next->length < current_res->next->next->length) {
-                               out_of_order++;
-                               next_res = current_res->next;
-                               current_res->next = current_res->next->next;
-                               current_res = current_res->next;
-                               next_res->next = current_res->next;
-                               current_res->next = next_res;
-                       } else
-                               current_res     = current_res->next;
-               }
-       }  // End of out_of_order loop
-
-       return(0);
-}
-
-
-/*
- * get_max_resource
- *
- * Gets the largest node that is at least "size" big from the
- * list pointed to by head.  It aligns the node on top and bottom
- * to "size" alignment before returning it.
- */
-static struct pci_resource *get_max_resource (struct pci_resource **head, u32 size) {
-       struct pci_resource *max;
-       struct pci_resource *temp;
-       struct pci_resource *split_node;
-       u32 temp_dword;
-
-       if (!(*head))
-               return(NULL);
-
-       if (amdshpc_resource_sort_and_combine(head))
-               return(NULL);
-
-       if (sort_by_max_size(head))
-               return(NULL);
-
-       for (max = *head;max; max = max->next) {
-
-               // If not big enough we could probably just bail,
-               // instead we'll continue to the next.
-               if (max->length < size)
-                       continue;
-
-               if (max->base & (size - 1)) {
-                       // this one isn't base aligned properly
-                       // so we'll make a new entry and split it up
-                       temp_dword = (max->base | (size-1)) + 1;
-
-                       // Short circuit if adjusted size is too small
-                       if ((max->length - (temp_dword - max->base)) < size)
-                               continue;
-
-                       split_node = (struct pci_resource*) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-
-                       if (!split_node)
-                               return(NULL);
-
-                       split_node->base = max->base;
-                       split_node->length = temp_dword - max->base;
-                       max->base = temp_dword;
-                       max->length -= split_node->length;
-
-                       // Put it next in the list
-                       split_node->next = max->next;
-                       max->next = split_node;
-               }
-
-               if ((max->base + max->length) & (size - 1)) {
-                       // this one isn't end aligned properly at the top
-                       // so we'll make a new entry and split it up
-                       split_node = (struct pci_resource*) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-
-                       if (!split_node)
-                               return(NULL);
-                       temp_dword = ((max->base + max->length) & ~(size - 1));
-                       split_node->base = temp_dword;
-                       split_node->length = max->length + max->base
-                                                                - split_node->base;
-                       max->length -= split_node->length;
-
-                       // Put it in the list
-                       split_node->next = max->next;
-                       max->next = split_node;
-               }
-
-               // Make sure it didn't shrink too much when we aligned it
-               if (max->length < size)
-                       continue;
-
-               // Now take it out of the list
-               temp = (struct pci_resource*) *head;
-               if (temp == max) {
-                       *head = max->next;
-               } else {
-                       while (temp && temp->next != max) {
-                               temp = temp->next;
-                       }
-
-                       temp->next = max->next;
-               }
-
-               max->next = NULL;
-               return(max);
-       }
-
-       // If we get here, we couldn't find one
-       return(NULL);
-}
-
-
-/*
- * get_io_resource
- *
- * this function sorts the resource list by size and then
- * returns the first node of "size" length that is not in the
- * ISA aliasing window.  If it finds a node larger than "size"
- * it will split it up.
- *
- * size must be a power of two.
- */
-static struct pci_resource *get_io_resource (struct pci_resource **head, u32 size) {
-       struct pci_resource *prevnode;
-       struct pci_resource *node;
-       struct pci_resource *split_node;
-       u32 temp_dword;
-
-       if (!(*head))
-               return(NULL);
-
-       if ( amdshpc_resource_sort_and_combine(head) )
-               return(NULL);
-
-       if ( sort_by_size(head) )
-               return(NULL);
-
-       for (node = *head; node; node = node->next) {
-               if (node->length < size)
-                       continue;
-
-               if (node->base & (size - 1)) {
-                       // this one isn't base aligned properly
-                       // so we'll make a new entry and split it up
-                       temp_dword = (node->base | (size-1)) + 1;
-
-                       // Short circuit if adjusted size is too small
-                       if ((node->length - (temp_dword - node->base)) < size)
-                               continue;
-
-                       split_node = (struct pci_resource*) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-
-                       if (!split_node)
-                               return(NULL);
-
-                       split_node->base = node->base;
-                       split_node->length = temp_dword - node->base;
-                       node->base = temp_dword;
-                       node->length -= split_node->length;
-
-                       // Put it in the list
-                       split_node->next = node->next;
-                       node->next = split_node;
-               } // End of non-aligned base
-
-               // Don't need to check if too small since we already did
-               if (node->length > size) {
-                       // this one is longer than we need
-                       // so we'll make a new entry and split it up
-                       split_node = (struct pci_resource*) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-
-                       if (!split_node)
-                               return(NULL);
-
-                       split_node->base = node->base + size;
-                       split_node->length = node->length - size;
-                       node->length = size;
-
-                       // Put it in the list
-                       split_node->next = node->next;
-                       node->next = split_node;
-               }  // End of too big on top end
-
-               // For IO make sure it's not in the ISA aliasing space
-               if (node->base & 0x300L)
-                       continue;
-
-               // If we got here, then it is the right size
-               // Now take it out of the list
-               if (*head == node) {
-                       *head = node->next;
-               } else {
-                       prevnode = *head;
-                       while (prevnode->next != node)
-                               prevnode = prevnode->next;
-
-                       prevnode->next = node->next;
-               }
-               node->next = NULL;
-               // Stop looping
-               break;
-       }
-
-       return(node);
-}
-
-
-/*
- * get_resource
- *
- * this function sorts the resource list by size and then
- * returns the first node of "size" length.  If it finds a node
- * larger than "size" it will split it up.
- *
- * size must be a power of two.
- */
-static struct pci_resource *get_resource (struct pci_resource **head, u32 size) {
-       struct pci_resource *prevnode;
-       struct pci_resource *node;
-       struct pci_resource *split_node;
-       u32 temp_dword;
-
-       if (!(*head))
-               return(NULL);
-
-       if ( amdshpc_resource_sort_and_combine(head) )
-               return(NULL);
-
-       if ( sort_by_size(head) )
-               return(NULL);
-
-       for (node = *head; node; node = node->next) {
-               dbg("%s: req_size =%x node=%p, base=%x, length=%x\n",__FUNCTION__,
-                       size, node, node->base, node->length);
-               if (node->length < size)
-                       continue;
-
-               if (node->base & (size - 1)) {
-                       dbg("%s: not aligned\n",__FUNCTION__);
-                       // this one isn't base aligned properly
-                       // so we'll make a new entry and split it up
-                       temp_dword = (node->base | (size-1)) + 1;
-
-                       // Short circuit if adjusted size is too small
-                       if ((node->length - (temp_dword - node->base)) < size)
-                               continue;
-
-                       split_node = (struct pci_resource*) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-
-                       if (!split_node)
-                               return(NULL);
-
-                       split_node->base = node->base;
-                       split_node->length = temp_dword - node->base;
-                       node->base = temp_dword;
-                       node->length -= split_node->length;
-
-                       // Put it in the list
-                       split_node->next = node->next;
-                       node->next = split_node;
-               } // End of non-aligned base
-
-               // Don't need to check if too small since we already did
-               if (node->length > size) {
-                       dbg("%s: too big\n",__FUNCTION__);
-                       // this one is longer than we need
-                       // so we'll make a new entry and split it up
-                       split_node = (struct pci_resource*) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-
-                       if (!split_node)
-                               return(NULL);
-
-                       split_node->base = node->base + size;
-                       split_node->length = node->length - size;
-                       node->length = size;
-
-                       // Put it in the list
-                       split_node->next = node->next;
-                       node->next = split_node;
-               }  // End of too big on top end
-
-               dbg("%s: got one!!!\n",__FUNCTION__);
-               // If we got here, then it is the right size
-               // Now take it out of the list
-               if (*head == node) {
-                       *head = node->next;
-               } else {
-                       prevnode = *head;
-                       while (prevnode->next != node)
-                               prevnode = prevnode->next;
-
-                       prevnode->next = node->next;
-               }
-               node->next = NULL;
-               // Stop looping
-               break;
-       }
-       return(node);
-}
-
-/*
- * amdshpc_return_board_resources
- *
- * this routine returns all resources allocated to a board to
- * the available pool.
- *
- * returns 0 if success
- */
-int amdshpc_return_board_resources(struct pci_func * func, struct resource_lists * resources)
-{
-       int rc = 1;
-       struct pci_resource *node;
-       struct pci_resource *t_node;
-       dbg("%s",__FUNCTION__);
-
-       if (!func)
-               return(1);
-
-       node = func->io_head;
-       func->io_head = NULL;
-       while (node) {
-               t_node = node->next;
-               return_resource(&(resources->io_head), node);
-               node = t_node;
-       }
-
-       node = func->mem_head;
-       func->mem_head = NULL;
-       while (node) {
-               t_node = node->next;
-               return_resource(&(resources->mem_head), node);
-               node = t_node;
-       }
-
-       node = func->p_mem_head;
-       func->p_mem_head = NULL;
-       while (node) {
-               t_node = node->next;
-               return_resource(&(resources->p_mem_head), node);
-               node = t_node;
-       }
-
-       node = func->bus_head;
-       func->bus_head = NULL;
-       while (node) {
-               t_node = node->next;
-               return_resource(&(resources->bus_head), node);
-               node = t_node;
-       }
-
-       rc |= amdshpc_resource_sort_and_combine(&(resources->mem_head));
-       rc |= amdshpc_resource_sort_and_combine(&(resources->p_mem_head));
-       rc |= amdshpc_resource_sort_and_combine(&(resources->io_head));
-       rc |= amdshpc_resource_sort_and_combine(&(resources->bus_head));
-
-       return(rc);
-}
-
-
-/*
- * amdshpc_destroy_resource_list
- *
- * Puts node back in the resource list pointed to by head
- */
-void amdshpc_destroy_resource_list (struct resource_lists * resources)
-{
-       struct pci_resource *res, *tres;
-
-       res = resources->io_head;
-       resources->io_head = NULL;
-
-       while (res) {
-               tres = res;
-               res = res->next;
-               kfree(tres);
-       }
-
-       res = resources->mem_head;
-       resources->mem_head = NULL;
-
-       while (res) {
-               tres = res;
-               res = res->next;
-               kfree(tres);
-       }
-
-       res = resources->p_mem_head;
-       resources->p_mem_head = NULL;
-
-       while (res) {
-               tres = res;
-               res = res->next;
-               kfree(tres);
-       }
-
-       res = resources->bus_head;
-       resources->bus_head = NULL;
-
-       while (res) {
-               tres = res;
-               res = res->next;
-               kfree(tres);
-       }
-}
-
-
-/*
- * amdshpc_destroy_board_resources
- *
- * Puts node back in the resource list pointed to by head
- */
-void amdshpc_destroy_board_resources (struct pci_func * func)
-{
-       struct pci_resource *res, *tres;
-
-       res = func->io_head;
-       func->io_head = NULL;
-
-       while (res) {
-               tres = res;
-               res = res->next;
-               kfree(tres);
-       }
-
-       res = func->mem_head;
-       func->mem_head = NULL;
-
-       while (res) {
-               tres = res;
-               res = res->next;
-               kfree(tres);
-       }
-
-       res = func->p_mem_head;
-       func->p_mem_head = NULL;
-
-       while (res) {
-               tres = res;
-               res = res->next;
-               kfree(tres);
-       }
-
-       res = func->bus_head;
-       func->bus_head = NULL;
-
-       while (res) {
-               tres = res;
-               res = res->next;
-               kfree(tres);
-       }
-}
-
-/**
- * configure_new_device - Configures the PCI header information of one board.
- *
- * @ctrl: pointer to controller structure
- * @func: pointer to function structure
- * @behind_bridge: 1 if this is a recursive call, 0 if not
- * @resources: pointer to set of resource lists
- *
- * Returns 0 if success
- *
- */
-static u32 configure_new_device (struct controller * ctrl, struct pci_func * func,
-                                                                u8 behind_bridge, struct resource_lists * resources)
-{
-       u8 temp_byte, function, max_functions, stop_it;
-       int rc;
-       u32 ID;
-       struct pci_func *new_slot;
-       int index;
-
-       new_slot = func;
-
-       dbg("%s",__FUNCTION__);
-       // Check for Multi-function device
-       rc = pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(func->device, func->function), 0x0E, &temp_byte);
-       if (rc) {
-               dbg("%s: rc = %d\n",__FUNCTION__, rc);
-               return rc;
-       }
-
-       if (temp_byte & 0x80)   // Multi-function device
-               max_functions = 8;
-       else
-               max_functions = 1;
-
-       function = 0;
-
-       do {
-               rc = configure_new_function(ctrl, new_slot, behind_bridge, resources);
-
-               if (rc) {
-                       dbg("%s -->configure_new_function failed %d\n",__FUNCTION__,rc);
-                       index = 0;
-
-                       while (new_slot) {
-                               new_slot = amdshpc_slot_find(new_slot->bus, new_slot->device, index++);
-
-                               if (new_slot)
-                                       amdshpc_return_board_resources(new_slot, resources);
-                       }
-
-                       return(rc);
-               }
-
-               function++;
-
-               stop_it = 0;
-
-               //  The following loop skips to the next present function
-               //  and creates a board structure
-
-               while ((function < max_functions) && (!stop_it)) {
-                       pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(func->device, function), 0x00, &ID);
-
-                       if (ID == 0xFFFFFFFF) {   // There's nothing there.
-                               function++;
-                       } else {  // There's something there
-                               // Setup slot structure.
-                               new_slot = amdshpc_slot_create(func->bus);
-
-                               if (new_slot == NULL) {
-                                       // Out of memory
-                                       return(1);
-                               }
-
-                               new_slot->bus = func->bus;
-                               new_slot->device = func->device;
-                               new_slot->function = function;
-                               new_slot->is_a_board = 1;
-                               new_slot->status = 0;
-
-                               stop_it++;
-                       }
-               }
-
-       } while (function < max_functions);
-       dbg("%s -->returning from configure_new_device\n",__FUNCTION__);
-
-       return 0;
-}
-
-
-/*
-  Configuration logic that involves the hotplug data structures and
-  their bookkeeping
- */
-
-
-/**
- * configure_new_function - Configures the PCI header information of one device
- *
- * @ctrl: pointer to controller structure
- * @func: pointer to function structure
- * @behind_bridge: 1 if this is a recursive call, 0 if not
- * @resources: pointer to set of resource lists
- *
- * Calls itself recursively for bridged devices.
- * Returns 0 if success
- *
- */
-static int configure_new_function (struct controller * ctrl, struct pci_func * func,
-                                                                  u8 behind_bridge, struct resource_lists * resources)
-{
-       int cloop;
-       u8 IRQ;
-       u8 temp_byte;
-       u8 device;
-       u8 class_code;
-       u16 command;
-       u16 temp_word;
-       u32 temp_dword;
-       u32 rc;
-       u32 temp_register;
-       u32 base;
-       u32 ID;
-       struct pci_resource *mem_node;
-       struct pci_resource *p_mem_node;
-       struct pci_resource *io_node;
-       struct pci_resource *bus_node;
-       struct pci_resource *hold_mem_node;
-       struct pci_resource *hold_p_mem_node;
-       struct pci_resource *hold_IO_node;
-       struct pci_resource *hold_bus_node;
-       struct irq_mapping irqs;
-       struct pci_func *new_slot;
-       struct resource_lists temp_resources;
-       int devfn = PCI_DEVFN(func->device, func->function);
-
-       dbg("%s", __FUNCTION__);
-       // Check for Bridge
-       rc = pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_HEADER_TYPE, &temp_byte);
-       if (rc)
-               return rc;
-
-       if ((temp_byte & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {     // PCI-PCI Bridge
-               // set Primary bus
-               dbg("%s -->set Primary bus = %d\n",__FUNCTION__, func->bus);
-               rc = pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_PRIMARY_BUS, func->bus);
-               if (rc)
-                       return rc;
-
-               // find range of busses to use
-               dbg("%s -->find ranges of buses to use\n",__FUNCTION__);
-               bus_node = get_max_resource(&resources->bus_head, 1);
-
-               // If we don't have any busses to allocate, we can't continue
-               if (!bus_node)
-                       return -ENOMEM;
-
-               // set Secondary bus
-               temp_byte = bus_node->base;
-               dbg("%s -->set Secondary bus = %d\n",__FUNCTION__, bus_node->base);
-               rc = pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_SECONDARY_BUS, temp_byte);
-               if (rc)
-                       return rc;
-
-               // set subordinate bus
-               temp_byte = bus_node->base + bus_node->length - 1;
-               dbg("%s -->set subordinate bus = %d\n",__FUNCTION__, bus_node->base + bus_node->length - 1);
-               rc = pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_SUBORDINATE_BUS, temp_byte);
-               if (rc)
-                       return rc;
-
-               // set subordinate Latency Timer and base Latency Timer
-               temp_byte = 0x40;
-               rc = pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_SEC_LATENCY_TIMER, temp_byte);
-               if (rc)
-                       return rc;
-               rc = pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_LATENCY_TIMER, temp_byte);
-               if (rc)
-                       return rc;
-
-               // set Cache Line size
-               temp_byte = 0x08;
-               rc = pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_CACHE_LINE_SIZE, temp_byte);
-               if (rc)
-                       return rc;
-
-               // Setup the IO, memory, and prefetchable windows
-
-               io_node = get_max_resource(&(resources->io_head), 0x1000);
-               mem_node = get_max_resource(&(resources->mem_head), 0x100000);
-               p_mem_node = get_max_resource(&(resources->p_mem_head), 0x100000);
-               dbg("%s -->Setup the IO, memory, and prefetchable windows\n",__FUNCTION__);
-               dbg("%s -->io_node\n",__FUNCTION__);
-               dbg("%s -->(base, len, next) (%x, %x, %p)\n",__FUNCTION__, io_node->base, io_node->length, io_node->next);
-               dbg("%s -->mem_node\n",__FUNCTION__);
-               dbg("%s -->(base, len, next) (%x, %x, %p)\n",__FUNCTION__, mem_node->base, mem_node->length, mem_node->next);
-               dbg("%s -->p_mem_node\n",__FUNCTION__);
-               dbg("%s -->(base, len, next) (%x, %x, %p)\n",__FUNCTION__, p_mem_node->base, p_mem_node->length, p_mem_node->next);
-
-               // set up the IRQ info
-               if (!resources->irqs) {
-                       irqs.barber_pole = 0;
-                       irqs.interrupt[0] = 0;
-                       irqs.interrupt[1] = 0;
-                       irqs.interrupt[2] = 0;
-                       irqs.interrupt[3] = 0;
-                       irqs.valid_INT = 0;
-               } else {
-                       irqs.barber_pole = resources->irqs->barber_pole;
-                       irqs.interrupt[0] = resources->irqs->interrupt[0];
-                       irqs.interrupt[1] = resources->irqs->interrupt[1];
-                       irqs.interrupt[2] = resources->irqs->interrupt[2];
-                       irqs.interrupt[3] = resources->irqs->interrupt[3];
-                       irqs.valid_INT = resources->irqs->valid_INT;
-               }
-
-               // set up resource lists that are now aligned on top and bottom
-               // for anything behind the bridge.
-               temp_resources.bus_head = bus_node;
-               temp_resources.io_head = io_node;
-               temp_resources.mem_head = mem_node;
-               temp_resources.p_mem_head = p_mem_node;
-               temp_resources.irqs = &irqs;
-
-               // Make copies of the nodes we are going to pass down so that
-               // if there is a problem,we can just use these to free resources
-               hold_bus_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-               hold_IO_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-               hold_mem_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-               hold_p_mem_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-
-               if (!hold_bus_node || !hold_IO_node || !hold_mem_node || !hold_p_mem_node) {
-                       if (hold_bus_node)
-                               kfree(hold_bus_node);
-                       if (hold_IO_node)
-                               kfree(hold_IO_node);
-                       if (hold_mem_node)
-                               kfree(hold_mem_node);
-                       if (hold_p_mem_node)
-                               kfree(hold_p_mem_node);
-
-                       return(1);
-               }
-
-               memcpy(hold_bus_node, bus_node, sizeof(struct pci_resource));
-
-               bus_node->base += 1;
-               bus_node->length -= 1;
-               bus_node->next = NULL;
-
-               // If we have IO resources copy them and fill in the bridge's
-               // IO range registers
-               if (io_node) {
-                       memcpy(hold_IO_node, io_node, sizeof(struct pci_resource));
-                       io_node->next = NULL;
-
-                       // set IO base and Limit registers
-                       temp_byte = io_node->base >> 8;
-                       rc = pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_IO_BASE, temp_byte);
-
-                       temp_byte = (io_node->base + io_node->length - 1) >> 8;
-                       rc = pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_IO_LIMIT, temp_byte);
-               } else {
-                       kfree(hold_IO_node);
-                       hold_IO_node = NULL;
-               }
-
-               // If we have memory resources copy them and fill in the bridge's
-               // memory range registers.  Otherwise, fill in the range
-               // registers with values that disable them.
-               if (mem_node) {
-                       memcpy(hold_mem_node, mem_node, sizeof(struct pci_resource));
-                       mem_node->next = NULL;
-
-                       // set Mem base and Limit registers
-                       temp_word = mem_node->base >> 16;
-                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_MEMORY_BASE, temp_word);
-
-                       temp_word = (mem_node->base + mem_node->length - 1) >> 16;
-                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_MEMORY_LIMIT, temp_word);
-               } else {
-                       temp_word = 0xFFFF;
-                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_MEMORY_BASE, temp_word);
-
-                       temp_word = 0x0000;
-                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_MEMORY_LIMIT, temp_word);
-
-                       kfree(hold_mem_node);
-                       hold_mem_node = NULL;
-               }
-
-               // If we have prefetchable memory resources copy them and
-               // fill in the bridge's memory range registers.  Otherwise,
-               // fill in the range registers with values that disable them.
-               if (p_mem_node) {
-                       memcpy(hold_p_mem_node, p_mem_node, sizeof(struct pci_resource));
-                       p_mem_node->next = NULL;
-
-                       // set Pre Mem base and Limit registers
-                       temp_word = p_mem_node->base >> 16;
-                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_PREF_MEMORY_BASE, temp_word);
-
-                       temp_word = (p_mem_node->base + p_mem_node->length - 1) >> 16;
-                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, temp_word);
-               } else {
-                       temp_word = 0xFFFF;
-                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_PREF_MEMORY_BASE, temp_word);
-
-                       temp_word = 0x0000;
-                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, temp_word);
-
-                       kfree(hold_p_mem_node);
-                       hold_p_mem_node = NULL;
-               }
-
-               // Adjust this to compensate for extra adjustment in first loop
-               irqs.barber_pole--;
-
-               rc = 0;
-
-               // Here we actually find the devices and configure them
-               for (device = 0; (device <= 0x1F) && !rc; device++) {
-                       irqs.barber_pole = (irqs.barber_pole + 1) & 0x03;
-
-                       ID = 0xFFFFFFFF;
-                       pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(device, 0), 0x00, &ID);
-
-                       if (ID != 0xFFFFFFFF) {   //  device Present
-                               // Setup slot structure.
-                               new_slot = amdshpc_slot_create(hold_bus_node->base);
-
-                               if (new_slot == NULL) {
-                                       // Out of memory
-                                       rc = -ENOMEM;
-                                       continue;
-                               }
-
-                               new_slot->bus = hold_bus_node->base;
-                               new_slot->device = device;
-                               new_slot->function = 0;
-                               new_slot->is_a_board = 1;
-                               new_slot->status = 0;
-
-                               rc = configure_new_device(ctrl, new_slot, 1, &temp_resources);
-                               dbg("%s -->configure_new_device rc=0x%x\n",__FUNCTION__,rc);
-                       }       // End of IF (device in slot?)
-               }               // End of FOR loop
-
-               if (rc) {
-                       amdshpc_destroy_resource_list(&temp_resources);
-
-                       return_resource(&(resources->bus_head), hold_bus_node);
-                       return_resource(&(resources->io_head), hold_IO_node);
-                       return_resource(&(resources->mem_head), hold_mem_node);
-                       return_resource(&(resources->p_mem_head), hold_p_mem_node);
-                       return(rc);
-               }
-               // save the interrupt routing information
-               if (resources->irqs) {
-                       resources->irqs->interrupt[0] = irqs.interrupt[0];
-                       resources->irqs->interrupt[1] = irqs.interrupt[1];
-                       resources->irqs->interrupt[2] = irqs.interrupt[2];
-                       resources->irqs->interrupt[3] = irqs.interrupt[3];
-                       resources->irqs->valid_INT = irqs.valid_INT;
-               } else if (!behind_bridge) {
-                       // We need to hook up the interrupts here
-                       for (cloop = 0; cloop < 4; cloop++) {
-                               if (irqs.valid_INT & (0x01 << cloop)) {
-rc=0;
-//                                     rc = amdshpc_set_irq(func->bus, func->device,
-//                                                                        0x0A + cloop, irqs.interrupt[cloop]);
-                                       if (rc) {
-                                               amdshpc_destroy_resource_list (&temp_resources);
-
-                                               return_resource(&(resources-> bus_head), hold_bus_node);
-                                               return_resource(&(resources-> io_head), hold_IO_node);
-                                               return_resource(&(resources-> mem_head), hold_mem_node);
-                                               return_resource(&(resources-> p_mem_head), hold_p_mem_node);
-                                               return rc;
-                                       }
-                               }
-                       }       // end of for loop
-               }
-               // Return unused bus resources
-               // First use the temporary node to store information for the board
-               if (hold_bus_node && bus_node && temp_resources.bus_head) {
-                       hold_bus_node->length = bus_node->base - hold_bus_node->base;
-
-                       hold_bus_node->next = func->bus_head;
-                       func->bus_head = hold_bus_node;
-
-                       temp_byte = temp_resources.bus_head->base - 1;
-
-                       // set subordinate bus
-                       pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_SUBORDINATE_BUS, temp_byte);
-
-                       if (temp_resources.bus_head->length == 0) {
-                               kfree(temp_resources.bus_head);
-                               temp_resources.bus_head = NULL;
-                       } else {
-                               return_resource(&(resources->bus_head), temp_resources.bus_head);
-                       }
-               }
-
-               // If we have IO space available and there is some left,
-               // return the unused portion
-               if (hold_IO_node && temp_resources.io_head) {
-                       io_node = do_pre_bridge_resource_split(&(temp_resources.io_head),
-                                                                                                  &hold_IO_node, 0x1000);
-
-                       // Check if we were able to split something off
-                       if (io_node) {
-                               hold_IO_node->base = io_node->base + io_node->length;
-
-                               temp_byte = (hold_IO_node->base) >> 8;
-                               pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_IO_BASE, temp_byte);
-
-                               return_resource(&(resources->io_head), io_node);
-                       }
-
-                       io_node = do_bridge_resource_split(&(temp_resources.io_head), 0x1000);
-
-                       // Check if we were able to split something off
-                       if (io_node) {
-                               // First use the temporary node to store information for the board
-                               hold_IO_node->length = io_node->base - hold_IO_node->base;
-
-                               // If we used any, add it to the board's list
-                               if (hold_IO_node->length) {
-                                       hold_IO_node->next = func->io_head;
-                                       func->io_head = hold_IO_node;
-
-                                       temp_byte = (io_node->base - 1) >> 8;
-                                       pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_IO_LIMIT, temp_byte);
-
-                                       return_resource(&(resources->io_head), io_node);
-                               } else {
-                                       // it doesn't need any IO
-                                       temp_word = 0x0000;
-                                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_IO_LIMIT, temp_word);
-
-                                       return_resource(&(resources->io_head), io_node);
-                                       kfree(hold_IO_node);
-                               }
-                       } else {
-                               // it used most of the range
-                               hold_IO_node->next = func->io_head;
-                               func->io_head = hold_IO_node;
-                       }
-               } else if (hold_IO_node) {
-                       // it used the whole range
-                       hold_IO_node->next = func->io_head;
-                       func->io_head = hold_IO_node;
-               }
-               // If we have memory space available and there is some left,
-               // return the unused portion
-               if (hold_mem_node && temp_resources.mem_head) {
-                       mem_node = do_pre_bridge_resource_split(&(temp_resources.  mem_head),
-                                                                                                       &hold_mem_node, 0x100000);
-
-                       // Check if we were able to split something off
-                       if (mem_node) {
-                               hold_mem_node->base = mem_node->base + mem_node->length;
-
-                               temp_word = (hold_mem_node->base) >> 16;
-                               pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_MEMORY_BASE, temp_word);
-
-                               return_resource(&(resources->mem_head), mem_node);
-                       }
-
-                       mem_node = do_bridge_resource_split(&(temp_resources.mem_head), 0x100000);
-
-                       // Check if we were able to split something off
-                       if (mem_node) {
-                               // First use the temporary node to store information for the board
-                               hold_mem_node->length = mem_node->base - hold_mem_node->base;
-
-                               if (hold_mem_node->length) {
-                                       hold_mem_node->next = func->mem_head;
-                                       func->mem_head = hold_mem_node;
-
-                                       // configure end address
-                                       temp_word = (mem_node->base - 1) >> 16;
-                                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_MEMORY_LIMIT, temp_word);
-
-                                       // Return unused resources to the pool
-                                       return_resource(&(resources->mem_head), mem_node);
-                               } else {
-                                       // it doesn't need any Mem
-                                       temp_word = 0x0000;
-                                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_MEMORY_LIMIT, temp_word);
-
-                                       return_resource(&(resources->mem_head), mem_node);
-                                       kfree(hold_mem_node);
-                               }
-                       } else {
-                               // it used most of the range
-                               hold_mem_node->next = func->mem_head;
-                               func->mem_head = hold_mem_node;
-                       }
-               } else if (hold_mem_node) {
-                       // it used the whole range
-                       hold_mem_node->next = func->mem_head;
-                       func->mem_head = hold_mem_node;
-               }
-               // If we have prefetchable memory space available and there is some
-               // left at the end, return the unused portion
-               if (hold_p_mem_node && temp_resources.p_mem_head) {
-                       p_mem_node = do_pre_bridge_resource_split(&(temp_resources.p_mem_head),
-                                                                                                         &hold_p_mem_node, 0x100000);
-
-                       // Check if we were able to split something off
-                       if (p_mem_node) {
-                               hold_p_mem_node->base = p_mem_node->base + p_mem_node->length;
-
-                               temp_word = (hold_p_mem_node->base) >> 16;
-                               pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_PREF_MEMORY_BASE, temp_word);
-
-                               return_resource(&(resources->p_mem_head), p_mem_node);
-                       }
-
-                       p_mem_node = do_bridge_resource_split(&(temp_resources.p_mem_head), 0x100000);
-
-                       // Check if we were able to split something off
-                       if (p_mem_node) {
-                               // First use the temporary node to store information for the board
-                               hold_p_mem_node->length = p_mem_node->base - hold_p_mem_node->base;
-
-                               // If we used any, add it to the board's list
-                               if (hold_p_mem_node->length) {
-                                       hold_p_mem_node->next = func->p_mem_head;
-                                       func->p_mem_head = hold_p_mem_node;
-
-                                       temp_word = (p_mem_node->base - 1) >> 16;
-                                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, temp_word);
-
-                                       return_resource(&(resources->p_mem_head), p_mem_node);
-                               } else {
-                                       // it doesn't need any PMem
-                                       temp_word = 0x0000;
-                                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, temp_word);
-
-                                       return_resource(&(resources->p_mem_head), p_mem_node);
-                                       kfree(hold_p_mem_node);
-                               }
-                       } else {
-                               // it used the most of the range
-                               hold_p_mem_node->next = func->p_mem_head;
-                               func->p_mem_head = hold_p_mem_node;
-                       }
-               } else if (hold_p_mem_node) {
-                       // it used the whole range
-                       hold_p_mem_node->next = func->p_mem_head;
-                       func->p_mem_head = hold_p_mem_node;
-               }
-               // We should be configuring an IRQ and the bridge's base address
-               // registers if it needs them.  Although we have never seen such
-               // a device
-
-               // enable card
-               command = 0x0157;       // = PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |  PCI_COMMAND_INVALIDATE | PCI_COMMAND_PARITY | PCI_COMMAND_SERR
-               pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_COMMAND, command);
-
-               // set Bridge Control Register
-               command = 0x07;         // = PCI_BRIDGE_CTL_PARITY | PCI_BRIDGE_CTL_SERR | PCI_BRIDGE_CTL_NO_ISA
-               pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_BRIDGE_CONTROL, command);
-       } else if ((temp_byte & 0x7F) == PCI_HEADER_TYPE_NORMAL) {
-               // Standard device
-               pci_bus_read_config_byte(ctrl->pci_bus, devfn, 0x0B, &class_code);
-
-               if (class_code == PCI_BASE_CLASS_DISPLAY) {
-                       // Display (video) adapter (not supported)
-                       return(DEVICE_TYPE_NOT_SUPPORTED);
-               }
-               // Figure out IO and memory needs
-               for (cloop = 0x10; cloop <= 0x24; cloop += 4) {
-                       temp_register = 0xFFFFFFFF;
-
-                       dbg("%s -->CND: devfn=%x, offset=%d\n",__FUNCTION__, devfn, cloop);
-                       pci_bus_write_config_dword(ctrl->pci_bus, devfn, cloop, temp_register);
-                       pci_bus_read_config_dword(ctrl->pci_bus, devfn, cloop, &temp_register);
-                       dbg("%s -->CND: base = 0x%x\n",__FUNCTION__, temp_register);
-
-                       if (temp_register) {      // If this register is implemented
-                               if ((temp_register & 0x03L) == 0x01) {
-                                       // Map IO
-
-                                       // set base = amount of IO space
-                                       base = temp_register & 0xFFFFFFFC;
-                                       base = ~base + 1;
-
-                                       dbg("%s -->CND:      length = 0x%x\n",__FUNCTION__, base);
-                                       io_node = get_io_resource(&(resources->io_head), base);
-                                       dbg("%s -->Got io_node start = %8.8x, length = %8.8x next (%p)\n",__FUNCTION__,
-                                               io_node->base, io_node->length, io_node->next);
-                                       dbg("%s -->func (%p) io_head (%p)\n",__FUNCTION__, func, func->io_head);
-
-                                       // allocate the resource to the board
-                                       if (io_node) {
-                                               base = io_node->base;
-
-                                               io_node->next = func->io_head;
-                                               func->io_head = io_node;
-                                       } else
-                                               return -ENOMEM;
-                               } else if ((temp_register & 0x0BL) == 0x08) {
-                                       // Map prefetchable memory
-                                       base = temp_register & 0xFFFFFFF0;
-                                       base = ~base + 1;
-
-                                       dbg("%s -->CND:      length = 0x%x\n",__FUNCTION__, base);
-                                       p_mem_node = get_resource(&(resources->p_mem_head), base);
-
-                                       // allocate the resource to the board
-                                       if (p_mem_node) {
-                                               base = p_mem_node->base;
-
-                                               p_mem_node->next = func->p_mem_head;
-                                               func->p_mem_head = p_mem_node;
-                                       } else
-                                               return -ENOMEM;
-                               } else if ((temp_register & 0x0BL) == 0x00) {
-                                       // Map memory
-                                       base = temp_register & 0xFFFFFFF0;
-                                       base = ~base + 1;
-
-                                       dbg("%s -->CND:      length = 0x%x\n",__FUNCTION__, base);
-                                       mem_node = get_resource(&(resources->mem_head), base);
-
-                                       // allocate the resource to the board
-                                       if (mem_node) {
-                                               base = mem_node->base;
-
-                                               mem_node->next = func->mem_head;
-                                               func->mem_head = mem_node;
-                                       } else
-                                               return -ENOMEM;
-                               } else if ((temp_register & 0x0BL) == 0x04) {
-                                       // Map memory
-                                       base = temp_register & 0xFFFFFFF0;
-                                       base = ~base + 1;
-
-                                       dbg("%s -->CND:      length = 0x%x\n",__FUNCTION__, base);
-                                       mem_node = get_resource(&(resources->mem_head), base);
-
-                                       // allocate the resource to the board
-                                       if (mem_node) {
-                                               base = mem_node->base;
-
-                                               mem_node->next = func->mem_head;
-                                               func->mem_head = mem_node;
-                                       } else
-                                               return -ENOMEM;
-                               } else if ((temp_register & 0x0BL) == 0x06) {
-                                       // Those bits are reserved, we can't handle this
-                                       return(1);
-                               } else {
-                                       // Requesting space below 1M
-                                       return(NOT_ENOUGH_RESOURCES);
-                               }
-
-                               pci_bus_write_config_dword(ctrl->pci_bus, devfn, cloop, base);
-
-                               // Check for 64-bit base
-                               if ((temp_register & 0x07L) == 0x04) {
-                                       cloop += 4;
-
-                                       // Upper 32 bits of address always zero on today's systems
-                                       // FIXME this is probably not true on Alpha and ia64???
-                                       base = 0;
-                                       pci_bus_write_config_dword(ctrl->pci_bus, devfn, cloop, base);
-                               }
-                       }
-               }               // End of base register loop
-
-               // Figure out which interrupt pin this function uses
-               pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_INTERRUPT_PIN, &temp_byte);
-               dbg("%s temp_byte for interrupt pin = %x", __FUNCTION__, temp_byte);
-               // If this function needs an interrupt and we are behind a bridge
-               // and the pin is tied to something that's already mapped,
-               // set this one the same
-               if (temp_byte && resources->irqs &&
-                       (resources->irqs->valid_INT &
-                        (0x01 << ((temp_byte + resources->irqs->barber_pole - 1) & 0x03)))) {
-                       // We have to share with something already set up
-                       IRQ = resources->irqs->interrupt[(temp_byte + resources->irqs->barber_pole - 1) & 0x03];
-                       dbg("%s We're sharing the IRQ from some other device = %02x", __FUNCTION__, IRQ);
-               } else {
-                       // Program IRQ based on card type
-                       pci_bus_read_config_byte(ctrl->pci_bus, devfn, 0x0B, &class_code);
-                       if (class_code == PCI_BASE_CLASS_STORAGE) {
-                               dbg("%s We're sharing the disk IRQ (maybe)", __FUNCTION__);
-                               IRQ = amdshpc_disk_irq;
-                       } else {
-                               dbg("%s We're sharing the NIC IRQ (maybe)", __FUNCTION__);
-                               IRQ = amdshpc_nic_irq;
-                       }
-               }
-
-               // IRQ Line
-               pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_INTERRUPT_LINE, IRQ);
-               if (!behind_bridge) {
-//                     rc = amdshpc_set_irq(func->bus, func->device, temp_byte + 0x09, IRQ);
-//                     rc = amdshpc_set_irq(func->bus, func->device, temp_byte + 20, IRQ);
-                       rc = 0;
-                       if (rc)
-                               return 1;
-               } else {
-                       //TBD - this code may also belong in the other clause of this If statement
-                       resources->irqs->interrupt[(temp_byte + resources->irqs->barber_pole - 1) & 0x03] = IRQ;
-                       resources->irqs->valid_INT |= 0x01 << (temp_byte + resources->irqs->barber_pole - 1) & 0x03;
-               }
-
-               // Latency Timer
-               temp_byte = 0x40;
-               pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_LATENCY_TIMER, temp_byte);
-
-               // Cache Line size
-               temp_byte = 0x08;
-               pci_bus_write_config_byte(ctrl->pci_bus, devfn, PCI_CACHE_LINE_SIZE, temp_byte);
-
-               // disable ROM base Address
-               temp_dword = 0x00L;
-               pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_ROM_ADDRESS, temp_dword);
-
-               // enable card
-               temp_word = 0x0157;     // = PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |  PCI_COMMAND_INVALIDATE | PCI_COMMAND_PARITY | PCI_COMMAND_SERR
-               pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_COMMAND, temp_word);
-       }                       // End of Not-A-Bridge else
-       else {
-               // It's some strange type of PCI adapter (Cardbus?)
-               return DEVICE_TYPE_NOT_SUPPORTED;
-       }
-
-       func->configured = 1;
-
-       return 0;
-}
-
-int amdshpc_configure_device (struct controller * ctrl, struct pci_func* func)
-{
-       unsigned char bus;
-       struct pci_dev dev0;
-       struct pci_bus *child;
-       int num;
-
-       memset(&dev0, 0, sizeof(struct pci_dev));
-       dbg("%s", __FUNCTION__);
-
-       if (func->pci_dev == NULL)
-               func->pci_dev = pci_find_slot(func->bus, PCI_DEVFN(func->device, func->function));
-
-       //Still NULL ? Well then scan for it !
-       if (func->pci_dev == NULL) {
-               num = pci_scan_slot(ctrl->pci_dev->bus, PCI_DEVFN(func->device, func->function));
-               if (num)
-                       pci_bus_add_devices(ctrl->pci_dev->bus);
-
-               func->pci_dev = pci_find_slot(func->bus, PCI_DEVFN(func->device, func->function));
-               if (func->pci_dev == NULL) {
-                       dbg("ERROR: pci_dev still null\n");
-                       return 0;
-               }
-       }
-
-       if (func->pci_dev->hdr_type == PCI_HEADER_TYPE_BRIDGE) {
-               pci_read_config_byte(func->pci_dev, PCI_SECONDARY_BUS, &bus);
-               child = (struct pci_bus*) pci_add_new_bus(func->pci_dev->bus, (func->pci_dev), bus);
-               pci_do_scan_bus(child);
-
-       }
-
-       return 0;
-}
-
-
-int amdshpc_unconfigure_device(struct pci_func* func)
-{
-       int j;
-
-       dbg("%s: bus/dev/func = %x/%x/%x\n",__FUNCTION__,func->bus, func->device, func->function);
-
-       for (j=0; j<8 ; j++) {
-               struct pci_dev* temp = pci_find_slot(func->bus, (func->device << 3) | j);
-               if (temp)
-                       pci_remove_bus_device(temp);
-       }
-       return 0;
-}
-
-/*
-static int PCI_RefinedAccessConfig(struct pci_ops *ops, u8 bus, u8 device, u8 function, u8 offset, u32 *value)
-{
-       u32 vendID = 0;
-
-       dbg("%s", __FUNCTION__);
-       if (pci_read_config_dword_nodev (ops, bus, device, function, PCI_VENDOR_ID, &vendID) == -1)
-               return -1;
-       if (vendID == 0xffffffff)
-               return -1;
-       return pci_read_config_dword_nodev (ops, bus, device, function, offset, value);
-}
-
-
-//
-// WTF??? This function isn't in the code, yet a function calls it, but the
-// compiler optimizes it away?  strange.  Here as a placeholder to keep the
-// compiler happy.
-//
-static int PCI_ScanBusNonBridge (u8 bus, u8 device)
-{
-       return 0;
-}
-
-static int PCI_ScanBusForNonBridge(struct controller  *ctrl, u8 bus_num, u8 * dev_num)
-{
-       u8 tdevice;
-       u32 work;
-       u8 tbus;
-
-       dbg("%s", __FUNCTION__);
-       for (tdevice = 0; tdevice < 0x100; tdevice++) {
-               //Scan for access first
-               if (PCI_RefinedAccessConfig(ctrl->pci_ops, bus_num, tdevice >> 3, tdevice & 0x7, 0x08, &work) == -1)
-                       continue;
-               dbg("Looking for nonbridge bus_num %d dev_num %d\n", bus_num, tdevice);
-               //Yep we got one. Not a bridge ?
-               if ((work >> 8) != PCI_TO_PCI_BRIDGE_CLASS) {
-                       *dev_num = tdevice;
-                       dbg("found it !\n");
-                       return 0;
-               }
-       }
-       for (tdevice = 0; tdevice < 0x100; tdevice++) {
-               //Scan for access first
-               if (PCI_RefinedAccessConfig(ctrl->pci_ops, bus_num, tdevice >> 3, tdevice & 0x7, 0x08, &work) == -1)
-                       continue;
-               dbg("Looking for bridge bus_num %d dev_num %d\n", bus_num, tdevice);
-               //Yep we got one. bridge ?
-               if ((work >> 8) == PCI_TO_PCI_BRIDGE_CLASS) {
-                       pci_read_config_byte_nodev (ctrl->pci_ops, tbus, tdevice, 0, PCI_SECONDARY_BUS, &tbus);
-                       dbg("Recurse on bus_num %d tdevice %d\n", tbus, tdevice);
-                       if (PCI_ScanBusNonBridge(tbus, tdevice) == 0)
-                               return 0;
-               }
-       }
-
-       return -1;
-}
-
-static int PCI_GetBusDevHelper(struct controller  *ctrl, u8 *bus_num, u8 *dev_num, u8 slot, u8 nobridge)
-{
-       struct irq_routing_table *PCIIRQRoutingInfoLength;
-       long len;
-       long loop;
-       u32 work;
-
-       u8 tbus, tdevice, tslot;
-
-       PCIIRQRoutingInfoLength = pcibios_get_irq_routing_table();
-
-       len = (PCIIRQRoutingInfoLength->size -
-              sizeof(struct irq_routing_table)) / sizeof(struct irq_info);
-       dbg("%s  len = %d",__FUNCTION__, (int)len);
-       // Make sure I got at least one entry
-       if (len == 0) {
-               if (PCIIRQRoutingInfoLength != NULL)
-                       kfree(PCIIRQRoutingInfoLength );
-               return -1;
-       }
-
-       for (loop = 0; loop < len; ++loop) {
-               tbus = PCIIRQRoutingInfoLength->slots[loop].bus;
-               tdevice = PCIIRQRoutingInfoLength->slots[loop].devfn;
-               tslot = PCIIRQRoutingInfoLength->slots[loop].slot;
-               dbg("%s  tbus = %02Xh  tdevice = %02Xh  device = %02Xh function = %d  tslot = %d",__FUNCTION__,
-                                                       tbus, tdevice, tdevice >>3, tdevice & 0x7, tslot);
-               if (tslot == slot) {
-                       *bus_num = tbus;
-                       *dev_num = tdevice;
-                       pci_read_config_dword_nodev (ctrl->pci_ops, *bus_num, *dev_num >> 3, *dev_num & 0x7, PCI_VENDOR_ID, &work);
-                       if (!nobridge || (work == 0xffffffff)) {
-                               if (PCIIRQRoutingInfoLength != NULL)
-                                       dbg("%s PCIIRQRoutingInfoLength != NULL  returning 0",__FUNCTION__);
-                                       kfree(PCIIRQRoutingInfoLength );
-                               return 0;
-                       }
-
-                       dbg("bus_num %d dev_num %d func_num %d\n", *bus_num, *dev_num >> 3, *dev_num & 0x7);
-                       pci_read_config_dword_nodev (ctrl->pci_ops, *bus_num, *dev_num >> 3, *dev_num & 0x7, PCI_CLASS_REVISION, &work);
-                       dbg("work >> 8 (%x) = BRIDGE (%x)\n", work >> 8, PCI_TO_PCI_BRIDGE_CLASS);
-
-                       if ((work >> 8) == PCI_TO_PCI_BRIDGE_CLASS) {
-                               pci_read_config_byte_nodev (ctrl->pci_ops, *bus_num, *dev_num >> 3, *dev_num & 0x7, PCI_SECONDARY_BUS, &tbus);
-                               dbg("Scan bus for Non Bridge: bus %d\n", tbus);
-                               if (PCI_ScanBusForNonBridge(ctrl, tbus, dev_num) == 0) {
-                                       *bus_num = tbus;
-                                       if (PCIIRQRoutingInfoLength != NULL)
-                                               kfree(PCIIRQRoutingInfoLength );
-                                       return 0;
-                               }
-                       } else {
-                               if (PCIIRQRoutingInfoLength != NULL)
-                                       kfree(PCIIRQRoutingInfoLength );
-                               return 0;
-                       }
-
-               }
-       }
-       if (PCIIRQRoutingInfoLength != NULL)
-               kfree(PCIIRQRoutingInfoLength );
-       return -1;
-}
-
-
-int amdshpc_get_bus_dev (struct controller  *ctrl, u8 * bus_num, u8 * dev_num, u8 slot)
-{
-       dbg("%s", __FUNCTION__);
-       return PCI_GetBusDevHelper(ctrl, bus_num, dev_num, slot, 0);    //plain (bridges allowed)
-}
-*/
-
-/* More PCI configuration routines; this time centered around hotplug controller */
-
-
-/*
- * amdshpc_save_slot_config
- *
- * Saves configuration info for all PCI devices in a given slot
- * including subordinate busses.
- *
- * returns 0 if success
- */
-int amdshpc_save_slot_config (struct controller  *ctrl, struct pci_func * new_slot)
-{
-       long rc;
-       u8 class_code;
-       u8 header_type;
-       u32 ID;
-       u8 secondary_bus;
-       int sub_bus;
-       int max_functions;
-       int function;
-       int cloop = 0;
-       int stop_it;
-
-       ID = 0xFFFFFFFF;
-
-       dbg("%s", __FUNCTION__);
-       pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(new_slot->device, 0), PCI_VENDOR_ID, &ID);
-
-       if (ID != 0xFFFFFFFF) {   //  device in slot
-               pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, 0), 0x0B, &class_code);
-               pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, 0), PCI_HEADER_TYPE, &header_type);
-
-               if (header_type & 0x80) // Multi-function device
-                       max_functions = 8;
-               else
-                       max_functions = 1;
-
-               function = 0;
-
-               do {
-                       if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {     // PCI-PCI Bridge
-                               //  Recurse the subordinate bus
-                               pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), PCI_SECONDARY_BUS, &secondary_bus);
-
-                               sub_bus = (int) secondary_bus;
-
-                               // Save the config headers for the secondary bus.
-                               rc = amdshpc_save_config(ctrl, sub_bus, 0);
-
-                               if (rc)
-                                       return(rc);
-
-                       }       // End of IF
-
-                       new_slot->status = 0;
-
-                       for (cloop = 0; cloop < 0x20; cloop++) {
-                               pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), cloop << 2, (u32 *) & (new_slot-> config_space [cloop]));
-                       }
-
-                       function++;
-
-                       stop_it = 0;
-
-                       //  this loop skips to the next present function
-                       //  reading in the Class Code and the Header type.
-
-                       while ((function < max_functions) && (!stop_it)) {
-                               pci_bus_read_config_dword(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), PCI_VENDOR_ID, &ID);
-
-                               if (ID == 0xFFFFFFFF) {  // nothing there.
-                                       function++;
-                               } else {  // Something there
-                                       pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), 0x0B, &class_code);
-                                       pci_bus_read_config_byte(ctrl->pci_bus, PCI_DEVFN(new_slot->device, function), PCI_HEADER_TYPE, &header_type);
-
-                                       stop_it++;
-                               }
-                       }
-
-               } while (function < max_functions);
-       }                       // End of IF (device in slot?)
-       else {
-               return(2);
-       }
-
-       return(0);
-}
-
-
-/*
- * amdshpc_save_base_addr_length
- *
- * Saves the length of all base address registers for the
- * specified slot.  this is for hot plug REPLACE
- *
- * returns 0 if success
- */
-int amdshpc_save_base_addr_length(struct controller  *ctrl, struct pci_func * func)
-{
-       u8 cloop;
-       u8 header_type;
-       u8 secondary_bus;
-       u8 type;
-       int sub_bus;
-       u32 temp_register;
-       u32 base;
-       u32 rc;
-       struct pci_func *next;
-       int index = 0;
-
-       dbg("%s", __FUNCTION__);
-       func = amdshpc_slot_find(func->bus, func->device, index++);
-
-       while (func != NULL) {
-               int devfn = PCI_DEVFN(func->device, func->function);
-
-               // Check for Bridge
-               pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_HEADER_TYPE, &header_type);
-
-               if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {
-                       // PCI-PCI Bridge
-                       pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_SECONDARY_BUS, &secondary_bus);
-
-                       sub_bus = (int) secondary_bus;
-
-                       next = amdshpc_slot_list[sub_bus];
-
-                       while (next != NULL) {
-                               rc = amdshpc_save_base_addr_length(ctrl, next);
-
-                               if (rc)
-                                       return(rc);
-
-                               next = next->next;
-                       }
-
-                       //FIXME: this loop is duplicated in the non-bridge case.  The two could be rolled together
-                       // Figure out IO and memory base lengths
-                       for (cloop = 0x10; cloop <= 0x14; cloop += 4) {
-                               temp_register = 0xFFFFFFFF;
-                               pci_bus_write_config_dword(ctrl->pci_bus, devfn, cloop, temp_register);
-                               pci_bus_read_config_dword(ctrl->pci_bus, devfn, cloop, &base);
-
-                               if (base) {  // If this register is implemented
-                                       if (base & 0x01L) {
-                                               // IO base
-                                               // set base = amount of IO space requested
-                                               base = base & 0xFFFFFFFE;
-                                               base = (~base) + 1;
-
-                                               type = 1;
-                                       } else {
-                                               // memory base
-                                               base = base & 0xFFFFFFF0;
-                                               base = (~base) + 1;
-
-                                               type = 0;
-                                       }
-                               } else {
-                                       base = 0x0L;
-                                       type = 0;
-                               }
-
-                               // Save information in slot structure
-                               func->base_length[(cloop - 0x10) >> 2] = base;
-                               func->base_type[(cloop - 0x10) >> 2] = type;
-
-                       }       // End of base register loop
-
-
-               } else if ((header_type & 0x7F) == 0x00) {        // PCI-PCI Bridge
-                       // Figure out IO and memory base lengths
-                       for (cloop = 0x10; cloop <= 0x24; cloop += 4) {
-                               temp_register = 0xFFFFFFFF;
-                               pci_bus_write_config_dword(ctrl->pci_bus, devfn, cloop, temp_register);
-                               pci_bus_read_config_dword(ctrl->pci_bus, devfn, cloop, &base);
-
-                               if (base) {  // If this register is implemented
-                                       if (base & 0x01L) {
-                                               // IO base
-                                               // base = amount of IO space requested
-                                               base = base & 0xFFFFFFFE;
-                                               base = (~base) + 1;
-
-                                               type = 1;
-                                       } else {
-                                               // memory base
-                                               // base = amount of memory space requested
-                                               base = base & 0xFFFFFFF0;
-                                               base = (~base) + 1;
-
-                                               type = 0;
-                                       }
-                               } else {
-                                       base = 0x0L;
-                                       type = 0;
-                               }
-
-                               // Save information in slot structure
-                               func->base_length[(cloop - 0x10) >> 2] = base;
-                               func->base_type[(cloop - 0x10) >> 2] = type;
-
-                       }       // End of base register loop
-
-               } else {          // Some other unknown header type
-               }
-
-               // find the next device in this slot
-               func = amdshpc_slot_find(func->bus, func->device, index++);
-       }
-
-       return(0);
-}
-
-
-/*
- * amdshpc_save_used_resources
- *
- * Stores used resource information for existing boards.  this is
- * for boards that were in the system when this driver was loaded.
- * this function is for hot plug ADD
- *
- * returns 0 if success
- */
-int amdshpc_save_used_resources (struct controller  *ctrl, struct pci_func * func)
-{
-       u8 cloop;
-       u8 header_type;
-       u8 secondary_bus;
-       u8 temp_byte;
-       u8 b_base;
-       u8 b_length;
-       u16 command;
-       u16 save_command;
-       u16 w_base;
-       u16 w_length;
-       u32 temp_register;
-       u32 save_base;
-       u32 base;
-       int index = 0;
-       struct pci_resource *mem_node;
-       struct pci_resource *p_mem_node;
-       struct pci_resource *io_node;
-       struct pci_resource *bus_node;
-
-       dbg("%s", __FUNCTION__);
-       func = amdshpc_slot_find(func->bus, func->device, index++);
-
-       while ((func != NULL) && func->is_a_board) {
-               int devfn = PCI_DEVFN(func->device, func->function);
-
-               // Save the command register
-               pci_bus_read_config_word(ctrl->pci_bus, devfn, PCI_COMMAND, &save_command);
-
-               // disable card
-               command = 0x00;
-               pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_COMMAND, command);
-
-               // Check for Bridge
-               pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_HEADER_TYPE, &header_type);
-
-               if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {     // PCI-PCI Bridge
-                       // Clear Bridge Control Register
-                       command = 0x00;
-                       pci_bus_write_config_word(ctrl->pci_bus, devfn, PCI_BRIDGE_CONTROL, command);
-                       pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_SECONDARY_BUS, &secondary_bus);
-                       pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_SUBORDINATE_BUS, &temp_byte);
-
-                       bus_node =(struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                       if (!bus_node)
-                               return -ENOMEM;
-
-                       bus_node->base = secondary_bus;
-                       bus_node->length = temp_byte - secondary_bus + 1;
-
-                       bus_node->next = func->bus_head;
-                       func->bus_head = bus_node;
-
-                       // Save IO base and Limit registers
-                       pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_IO_BASE, &b_base);
-                       pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_IO_LIMIT, &b_length);
-
-                       if ((b_base <= b_length) && (save_command & 0x01)) {
-                               io_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                               if (!io_node)
-                                       return -ENOMEM;
-
-                               io_node->base = (b_base & 0xF0) << 8;
-                               io_node->length = (b_length - b_base + 0x10) << 8;
-
-                               io_node->next = func->io_head;
-                               func->io_head = io_node;
-                       }
-                       // Save memory base and Limit registers
-                       pci_bus_read_config_word(ctrl->pci_bus, devfn, PCI_MEMORY_BASE, &w_base);
-                       pci_bus_read_config_word(ctrl->pci_bus, devfn, PCI_MEMORY_LIMIT, &w_length);
-
-                       if ((w_base <= w_length) && (save_command & 0x02)) {
-                               mem_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                               if (!mem_node)
-                                       return -ENOMEM;
-
-                               mem_node->base = w_base << 16;
-                               mem_node->length = (w_length - w_base + 0x10) << 16;
-
-                               mem_node->next = func->mem_head;
-                               func->mem_head = mem_node;
-                       }
-                       // Save prefetchable memory base and Limit registers
-                       pci_bus_read_config_word(ctrl->pci_bus, devfn, PCI_PREF_MEMORY_BASE, &w_base);
-                       pci_bus_read_config_word(ctrl->pci_bus, devfn, PCI_PREF_MEMORY_LIMIT, &w_length);
-
-                       if ((w_base <= w_length) && (save_command & 0x02)) {
-                               p_mem_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                               if (!p_mem_node)
-                                       return -ENOMEM;
-
-                               p_mem_node->base = w_base << 16;
-                               p_mem_node->length = (w_length - w_base + 0x10) << 16;
-
-                               p_mem_node->next = func->p_mem_head;
-                               func->p_mem_head = p_mem_node;
-                       }
-                       // Figure out IO and memory base lengths
-                       for (cloop = 0x10; cloop <= 0x14; cloop += 4) {
-                               pci_bus_read_config_dword(ctrl->pci_bus, devfn, cloop, &save_base);
-
-                               temp_register = 0xFFFFFFFF;
-                               pci_bus_write_config_dword(ctrl->pci_bus, devfn, cloop, temp_register);
-                               pci_bus_read_config_dword(ctrl->pci_bus, devfn, cloop, &base);
-
-                               temp_register = base;
-
-                               if (base) {  // If this register is implemented
-                                       if (((base & 0x03L) == 0x01)
-                                           && (save_command & 0x01)) {
-                                               // IO base
-                                               // set temp_register = amount of IO space requested
-                                               temp_register = base & 0xFFFFFFFE;
-                                               temp_register = (~temp_register) + 1;
-
-                                               io_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                                               if (!io_node)
-                                                       return -ENOMEM;
-
-                                               io_node->base =
-                                               save_base & (~0x03L);
-                                               io_node->length = temp_register;
-
-                                               io_node->next = func->io_head;
-                                               func->io_head = io_node;
-                                       } else
-                                               if (((base & 0x0BL) == 0x08)
-                                                   && (save_command & 0x02)) {
-                                               // prefetchable memory base
-                                               temp_register = base & 0xFFFFFFF0;
-                                               temp_register = (~temp_register) + 1;
-
-                                               p_mem_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                                               if (!p_mem_node)
-                                                       return -ENOMEM;
-
-                                               p_mem_node->base = save_base & (~0x0FL);
-                                               p_mem_node->length = temp_register;
-
-                                               p_mem_node->next = func->p_mem_head;
-                                               func->p_mem_head = p_mem_node;
-                                       } else
-                                               if (((base & 0x0BL) == 0x00)
-                                                   && (save_command & 0x02)) {
-                                               // prefetchable memory base
-                                               temp_register = base & 0xFFFFFFF0;
-                                               temp_register = (~temp_register) + 1;
-
-                                               mem_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                                               if (!mem_node)
-                                                       return -ENOMEM;
-
-                                               mem_node->base = save_base & (~0x0FL);
-                                               mem_node->length = temp_register;
-
-                                               mem_node->next = func->mem_head;
-                                               func->mem_head = mem_node;
-                                       } else
-                                               return(1);
-                               }
-                       }       // End of base register loop
-               } else if ((header_type & 0x7F) == 0x00) {        // Standard header
-                       // Figure out IO and memory base lengths
-                       for (cloop = 0x10; cloop <= 0x24; cloop += 4) {
-                               pci_bus_read_config_dword(ctrl->pci_bus, devfn, cloop, &save_base);
-
-                               temp_register = 0xFFFFFFFF;
-                               pci_bus_write_config_dword(ctrl->pci_bus, devfn, cloop, temp_register);
-                               pci_bus_read_config_dword(ctrl->pci_bus, devfn, cloop, &base);
-
-                               temp_register = base;
-
-                               if (base) {       // If this register is implemented
-                                       if (((base & 0x03L) == 0x01)
-                                           && (save_command & 0x01)) {
-                                               // IO base
-                                               // set temp_register = amount of IO space requested
-                                               temp_register = base & 0xFFFFFFFE;
-                                               temp_register = (~temp_register) + 1;
-
-                                               io_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                                               if (!io_node)
-                                                       return -ENOMEM;
-
-                                               io_node->base = save_base & (~0x01L);
-                                               io_node->length = temp_register;
-
-                                               io_node->next = func->io_head;
-                                               func->io_head = io_node;
-                                       } else
-                                               if (((base & 0x0BL) == 0x08)
-                                                   && (save_command & 0x02)) {
-                                               // prefetchable memory base
-                                               temp_register = base & 0xFFFFFFF0;
-                                               temp_register = (~temp_register) + 1;
-
-                                               p_mem_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                                               if (!p_mem_node)
-                                                       return -ENOMEM;
-
-                                               p_mem_node->base = save_base & (~0x0FL);
-                                               p_mem_node->length = temp_register;
-
-                                               p_mem_node->next = func->p_mem_head;
-                                               func->p_mem_head = p_mem_node;
-                                       } else
-                                               if (((base & 0x0BL) == 0x00)
-                                                   && (save_command & 0x02)) {
-                                               // prefetchable memory base
-                                               temp_register = base & 0xFFFFFFF0;
-                                               temp_register = (~temp_register) + 1;
-
-                                               mem_node = (struct pci_resource *) kmalloc(sizeof(struct pci_resource), GFP_KERNEL);
-                                               if (!mem_node)
-                                                       return -ENOMEM;
-
-                                               mem_node->base = save_base & (~0x0FL);
-                                               mem_node->length = temp_register;
-
-                                               mem_node->next = func->mem_head;
-                                               func->mem_head = mem_node;
-                                       } else
-                                               return(1);
-                               }
-                       }       // End of base register loop
-               } else {          // Some other unknown header type
-               }
-
-               // find the next device in this slot
-               func = amdshpc_slot_find(func->bus, func->device, index++);
-       }
-
-       return(0);
-}
-
-
-/*
- * amdshpc_configure_board
- *
- * Copies saved configuration information to one slot.
- * this is called recursively for bridge devices.
- * this is for hot plug REPLACE!
- *
- * returns 0 if success
- */
-int amdshpc_configure_board(struct controller  *ctrl, struct pci_func * func)
-{
-       int cloop;
-       u8 header_type;
-       u8 secondary_bus;
-       int sub_bus;
-       struct pci_func *next;
-       u32 temp;
-       u32 rc;
-       int index = 0;
-
-       dbg("%s", __FUNCTION__);
-       func = amdshpc_slot_find(func->bus, func->device, index++);
-
-       while (func != NULL) {
-               int devfn = PCI_DEVFN(func->device, func->function);
-
-               // Start at the top of config space so that the control
-               // registers are programmed last
-               for (cloop = 0x3C; cloop > 0; cloop -= 4) {
-                       pci_bus_write_config_dword(ctrl->pci_bus, devfn, cloop, func->config_space[cloop >> 2]);
-               }
-
-               pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_HEADER_TYPE, &header_type);
-
-               // If this is a bridge device, restore subordinate devices
-               if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {     // PCI-PCI Bridge
-                       pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_SECONDARY_BUS, &secondary_bus);
-
-                       sub_bus = (int) secondary_bus;
-
-                       next = amdshpc_slot_list[sub_bus];
-
-                       while (next != NULL) {
-                               rc = amdshpc_configure_board(ctrl, next);
-                               if (rc)
-                                       return rc;
-
-                               next = next->next;
-                       }
-               } else {
-                       // Check all the base Address Registers to make sure
-                       // they are the same.  If not, the board is different.
-                       for (cloop = 16; cloop < 40; cloop += 4) {
-                               pci_bus_read_config_dword(ctrl->pci_bus, devfn, cloop, &temp);
-                               if (temp != func->config_space[cloop >> 2]) {
-                                       dbg("Config space compare failure!!! offset = %x\n", cloop);
-                                       dbg("bus = %x, device = %x, function = %x\n", func->bus, func->device, func->function);
-                                       dbg("temp = %x, config space = %x\n\n", temp, func->config_space[cloop]);
-                                       return 1;
-                               }
-                       }
-               }
-
-               func->configured = 1;
-
-               func = amdshpc_slot_find(func->bus, func->device, index++);
-       }
-
-       return 0;
-}
-
-
-/*
- * amdshpc_valid_replace
- *
- * this function checks to see if a board is the same as the
- * one it is replacing.  this check will detect if the device's
- * vendor or device id's are the same
- *
- * returns 0 if the board is the same nonzero otherwise
- */
-int amdshpc_valid_replace(struct controller  *ctrl, struct pci_func * func)
-{
-       u8 cloop;
-       u8 header_type;
-       u8 secondary_bus;
-       u8 type;
-       u32 temp_register = 0;
-       u32 base;
-       u32 rc;
-       struct pci_func *next;
-       int index = 0;
-
-       dbg("%s", __FUNCTION__);
-       if (!func->is_a_board)
-               return(ADD_NOT_SUPPORTED);
-
-       func = amdshpc_slot_find(func->bus, func->device, index++);
-
-       while (func != NULL) {
-               int devfn = PCI_DEVFN(func->device, func->function);
-
-               pci_bus_read_config_dword(ctrl->pci_bus, devfn, PCI_VENDOR_ID, &temp_register);
-
-               // No adapter present
-               if (temp_register == 0xFFFFFFFF)
-                       return(NO_ADAPTER_PRESENT);
-
-               if (temp_register != func->config_space[0])
-                       return(ADAPTER_NOT_SAME);
-
-               // Check for same revision number and class code
-               pci_bus_read_config_dword(ctrl->pci_bus, devfn, PCI_CLASS_REVISION, &temp_register);
-
-               // Adapter not the same
-               if (temp_register != func->config_space[0x08 >> 2])
-                       return(ADAPTER_NOT_SAME);
-
-               // Check for Bridge
-               pci_bus_read_config_byte(ctrl->pci_bus, devfn, PCI_HEADER_TYPE, &header_type);
-
-               if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) {     // PCI-PCI Bridge
-                       // In order to continue checking, we must program the
-                       // bus registers in the bridge to respond to accesses
-                       // for it's subordinate bus(es)
-
-                       temp_register = func->config_space[0x18 >> 2];
-                       pci_bus_write_config_dword(ctrl->pci_bus, devfn, PCI_PRIMARY_BUS, temp_register);
-
-                       secondary_bus = (temp_register >> 8) & 0xFF;
-
-                       next = amdshpc_slot_list[secondary_bus];
-
-                       while (next != NULL) {
-                               rc = amdshpc_valid_replace(ctrl, next);
-                               if (rc)
-                                       return(rc);
-
-                               next = next->next;
-                       }
-
-               }
-               // Check to see if it is a standard config header
-               else if ((header_type & 0x7F) == PCI_HEADER_TYPE_NORMAL) {
-                       // Check subsystem vendor and ID
-                       pci_bus_read_config_dword(ctrl->pci_bus, devfn, PCI_SUBSYSTEM_VENDOR_ID, &temp_register);
-
-                       if (temp_register != func->config_space[0x2C >> 2]) {
-                               // If it's a SMART-2 and the register isn't filled
-                               // in, ignore the difference because
-                               // they just have an old rev of the firmware
-
-                               if (!((func->config_space[0] == 0xAE100E11)
-                                     && (temp_register == 0x00L)))
-                                       return(ADAPTER_NOT_SAME);
-                       }
-                       // Figure out IO and memory base lengths
-                       for (cloop = 0x10; cloop <= 0x24; cloop += 4) {
-                               temp_register = 0xFFFFFFFF;
-                               pci_bus_write_config_dword(ctrl->pci_bus, devfn, cloop, temp_register);
-                               pci_bus_read_config_dword(ctrl->pci_bus, devfn, cloop, &base);
-
-                               if (base) {       // If this register is implemented
-                                       if (base & 0x01L) {
-                                               // IO base
-                                               // set base = amount of IO space requested
-                                               base = base & 0xFFFFFFFE;
-                                               base = (~base) + 1;
-
-                                               type = 1;
-                                       } else {
-                                               // memory base
-                                               base = base & 0xFFFFFFF0;
-                                               base = (~base) + 1;
-
-                                               type = 0;
-                                       }
-                               } else {
-                                       base = 0x0L;
-                                       type = 0;
-                               }
-
-                               // Check information in slot structure
-                               if (func->base_length[(cloop - 0x10) >> 2] != base)
-                                       return(ADAPTER_NOT_SAME);
-
-                               if (func->base_type[(cloop - 0x10) >> 2] != type)
-                                       return(ADAPTER_NOT_SAME);
-
-                       }       // End of base register loop
-
-               }               // End of (type 0 config space) else
-               else {
-                       // this is not a type 0 or 1 config space header so
-                       // we don't know how to do it
-                       return(DEVICE_TYPE_NOT_SUPPORTED);
-               }
-
-               // Get the next function
-               func = amdshpc_slot_find(func->bus, func->device, index++);
-       }
-
-       return(0);
-}
-
-
-
-static int update_slot_info (struct controller  *ctrl, struct slot *slot)
-{
-//     TO_DO_amd_update_slot_info();
-       dbg("%s   THIS FUNCTION IS STUBBED OUT!!!!!!!!!!!",__FUNCTION__);
-       return 0;
-       /*      struct hotplug_slot_info *info;
-       char buffer[SLOT_NAME_SIZE];
-       int result;
-
-       info = kmalloc (sizeof (struct hotplug_slot_info), GFP_KERNEL);
-       if (!info)
-               return -ENOMEM;
-
-       make_slot_name (&buffer[0], SLOT_NAME_SIZE, slot);
-       info->power_status = get_slot_enabled(ctrl, slot);
-       info->attention_status = cpq_get_attention_status(ctrl, slot);
-       info->latch_status = cpq_get_latch_status(ctrl, slot);
-       info->adapter_status = get_presence_status(ctrl, slot);
-       result = pci_hp_change_slot_info(buffer, info);
-       kfree (info);
-       return result;
-*/
-}
-
-
-/*
- * slot_remove - Removes a node from the linked list of slots.
- * @old_slot: slot to remove
- *
- * Returns 0 if successful, !0 otherwise.
- */
-static int slot_remove(struct pci_func * old_slot)
-{
-       struct pci_func *next;
-
-       dbg("%s", __FUNCTION__);
-       if (old_slot == NULL)
-               return(1);
-
-       next = amdshpc_slot_list[old_slot->bus];
-
-       if (next == NULL) {
-               return(1);
-       }
-
-       if (next == old_slot) {
-               amdshpc_slot_list[old_slot->bus] = old_slot->next;
-               amdshpc_destroy_board_resources(old_slot);
-               kfree(old_slot);
-               return(0);
-       }
-
-       while ((next->next != old_slot) && (next->next != NULL)) {
-               next = next->next;
-       }
-
-       if (next->next == old_slot) {
-               next->next = old_slot->next;
-               amdshpc_destroy_board_resources(old_slot);
-               kfree(old_slot);
-               return(0);
-       } else
-               return(2);
-}
-
-// DJZ: I don't think is_bridge will work as is.
-//FIXME
-static int is_bridge(struct pci_func * func)
-{
-       dbg("%s", __FUNCTION__);
-       // Check the header type
-       if (((func->config_space[0x03] >> 16) & 0xFF) == 0x01)
-               return 1;
-       else
-               return 0;
-}
-
-
-/**
- * bridge_slot_remove - Removes a node from the linked list of slots.
- * @bridge: bridge to remove
- *
- * Returns 0 if successful, !0 otherwise.
- */
-static int bridge_slot_remove(struct pci_func *bridge)
-{
-       u8 subordinateBus, secondaryBus;
-       u8 tempBus;
-       struct pci_func *next;
-
-       dbg("%s", __FUNCTION__);
-       if (bridge == NULL)
-               return(1);
-
-       secondaryBus = (bridge->config_space[0x06] >> 8) & 0xFF;
-       subordinateBus = (bridge->config_space[0x06] >> 16) & 0xFF;
-
-       for (tempBus = secondaryBus; tempBus <= subordinateBus; tempBus++) {
-               next = amdshpc_slot_list[tempBus];
-
-               while (!slot_remove(next)) {
-                       next = amdshpc_slot_list[tempBus];
-               }
-       }
-
-       next = amdshpc_slot_list[bridge->bus];
-
-       if (next == NULL) {
-               return(1);
-       }
-
-       if (next == bridge) {
-               amdshpc_slot_list[bridge->bus] = bridge->next;
-               kfree(bridge);
-               return(0);
-       }
-
-       while ((next->next != bridge) && (next->next != NULL)) {
-               next = next->next;
-       }
-
-       if (next->next == bridge) {
-               next->next = bridge->next;
-               kfree(bridge);
-               return(0);
-       } else
-               return(2);
-}
-
-
diff --git a/drivers/pci/hotplug/dummyphp.c b/drivers/pci/hotplug/dummyphp.c
deleted file mode 100644 (file)
index df92e4f..0000000
+++ /dev/null
@@ -1,295 +0,0 @@
-/*
- * Dummy PCI Hot Plug Controller Driver
- *
- * Copyright (C) 1995,2001 Compaq Computer Corporation
- * Copyright (C) 2001,2003 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (C) 2001,2003 IBM Corp.
- * Copyright (C) 2002 Hiroshi Aono (h-aono@ap.jp.nec.com)
- * Copyright (C) 2002 Takayoshi Kochi (t-kouchi@cq.jp.nec.com)
- * Copyright (C) 2002 NEC Corporation
- * Copyright (C) 2002 Vladimir Kondratiev (vladimir.kondratiev@intel.com)
- * Copyright (C) 2003 Rolf Eike Beer (eike-kernel@sf-tec.de)
- *
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Send feedback to <eike-kernel@sf-tec.de>
- *
- */
-
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <linux/init.h>
-#include "pci_hotplug.h"
-#include "../pci.h"
-
-#if !defined(CONFIG_HOTPLUG_PCI_DUMMY_MODULE)
-       #define MY_NAME "dummyphp"
-#else
-       #define MY_NAME THIS_MODULE->name
-#endif
-
-#define dbg(format, arg...)                                    \
-       do {                                                    \
-               if (debug)                                      \
-                       printk(KERN_DEBUG "%s: " format,        \
-                               MY_NAME , ## arg);              \
-       } while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
-
-/* name size which is used for entries in pcihpfs */
-#define SLOT_NAME_SIZE 32              /* DUMMY-{BUS}:{DEV} */
-
-struct dummy_slot {
-       struct pci_bus  *bus;
-       int             devfn;
-};
-
-static int debug;
-
-#define DRIVER_VERSION "0.1"
-#define DRIVER_AUTHOR  "Rolf Eike Beer <eike-kernel@sf-tec.de>"
-#define DRIVER_DESC    "Dummy PCI Hot Plug Controller Driver"
-
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE("GPL");
-MODULE_PARM(debug, "i");
-MODULE_PARM_DESC(debug, "Debugging mode enabled or not");
-
-static int enable_slot         (struct hotplug_slot *slot);
-static int disable_slot                (struct hotplug_slot *slot);
-
-/*
-   This is a dummy driver, so we make us live as easy as possible:
-   -if there is an adapter registered in the linux PCI system, then it is present
-   -if there is an adapter present, the power is on (and vice versa!)
-   -if the power is on, the latch is closed (and vice versa)
-   -the attention LED is always off
-
-   So:
-   => latch_status = adapter_status = power_status
- */
-
-static struct hotplug_slot_ops dummy_hotplug_slot_ops = {
-       .owner                  = THIS_MODULE,
-       .enable_slot            = enable_slot,
-       .disable_slot           = disable_slot,
-};
-
-/**
- * enable_slot - power on and enable a slot
- * @hotplug_slot: slot to enable
- */
-static int
-enable_slot(struct hotplug_slot *hotplug_slot)
-{
-       struct dummy_slot *slot;
-
-       if (!hotplug_slot)
-               return -ENODEV;
-
-       dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
-
-       /* enable the specified slot */
-       slot = (struct dummy_slot *) hotplug_slot->private;
-
-       if (pci_scan_slot(slot->bus, slot->devfn)) {
-               hotplug_slot->info->power_status = 1;
-               hotplug_slot->info->adapter_status = 1;
-               hotplug_slot->info->latch_status = 1;
-               return 0;
-       }
-       return -ENODEV;
-}
-
-
-/**
- * disable_slot - disable any adapter in this slot
- * @hotplug_slot: slot to disable
- */
-static int
-disable_slot(struct hotplug_slot *hotplug_slot)
-{
-       struct pci_dev* old_dev;
-       int func;
-       struct dummy_slot *slot;
-
-       if (!hotplug_slot)
-               return -ENODEV;
-
-       slot = (struct dummy_slot *) hotplug_slot->private;
-
-       dbg("%s - physical_slot = %s\n", __FUNCTION__, hotplug_slot->name);
-
-       /* disable the specified slot */
-
-       for (func=0; func<8; func++) {
-               old_dev = pci_find_slot(slot->bus->number, slot->devfn+func);
-               if (old_dev) {
-                       printk(KERN_INFO "Slot %s removed\n", old_dev->slot_name);
-                       pci_remove_device_safe(old_dev);
-               }
-       }
-       hotplug_slot->info->power_status = 0;
-       hotplug_slot->info->adapter_status = 0;
-       hotplug_slot->info->latch_status = 0;
-
-
-       return 0;
-}
-
-
-/**
- * dummyphp_get_power_status - look if an adapter is configured in this slot
- * @slot: the slot to test
- */
-static int dummyphp_get_power_status(struct dummy_slot *slot)
-{
-       struct pci_dev* old_dev;
-       int func;
-
-       for (func = 0; func < 8; func++) {
-               old_dev = pci_find_slot(slot->bus->number, slot->devfn+func);
-               if (old_dev)
-                       return 1;
-       }
-
-       return 0;
-}
-
-/**
- * scan_pci_bus - add an entry for every slot on this bus
- * @bus: bus to scan
- */
-static int __init
-scan_pci_bus(const struct pci_bus *bus)
-{
-       struct dummy_slot *dslot;
-       struct hotplug_slot *hp;
-       int retval = 0;
-       unsigned int devfn;
-       struct pci_dev dev0;
-
-       memset(&dev0, 0, sizeof(dev0));
-       dev0.bus = (struct pci_bus*)bus;
-       dev0.sysdata = bus->sysdata;
-       for (devfn = 0; devfn < 0x100; devfn += 8) {
-               hp = kmalloc(sizeof(struct hotplug_slot), GFP_KERNEL);
-               if (!hp) {
-                       return -ENOMEM;
-               }
-               memset(hp, 0, sizeof(struct hotplug_slot));
-
-               hp->info = kmalloc(sizeof(struct hotplug_slot_info), GFP_KERNEL);
-               if (!hp->info) {
-                       kfree(hp);
-                       return -ENOMEM;
-               }
-               memset(hp->info, 0, sizeof(struct hotplug_slot_info));
-
-               hp->name = kmalloc(SLOT_NAME_SIZE, GFP_KERNEL);
-               dslot = kmalloc(sizeof(struct dummy_slot), GFP_KERNEL);
-               if ( (!hp->name) || (!dslot) ) {
-                       kfree(hp->info);
-                       kfree(hp->name);
-                       kfree(dslot);
-                       kfree(hp);
-                       return -ENOMEM;
-               }
-               dslot->bus = (struct pci_bus *) bus;
-               dslot->devfn = devfn;
-
-               hp->ops = &dummy_hotplug_slot_ops;
-               hp->private = (void *) dslot;
-
-               hp->info->power_status = dummyphp_get_power_status(dslot);
-               hp->info->latch_status = hp->info->power_status;
-               hp->info->adapter_status = hp->info->power_status;
-
-               /* set fixed values so we do not need callbacks for these */
-               hp->info->attention_status = 0;
-               hp->info->cur_bus_speed = PCI_SPEED_UNKNOWN;
-               hp->info->max_bus_speed = PCI_SPEED_UNKNOWN;
-
-               snprintf(hp->name, SLOT_NAME_SIZE, "DUMMY-%02x:%02x",
-                       dslot->bus->number,
-                       dslot->devfn / 8);
-
-               retval = pci_hp_register(hp);
-               if (retval) {
-                       err("pci_hp_register failed with error %d\n", retval);
-                       kfree(hp->info);
-                       kfree(hp->name);
-                       kfree(hp);
-                       kfree(dslot);
-                       return retval;
-               }
-
-       }
-       return 0;
-}
-
-/**
- * scan_pci_buses - scan this bus and all child buses for slots
- * @list: list of buses to scan
- */
-static int __init
-pci_scan_buses(const struct list_head *list)
-{
-       int retval;
-       const struct list_head *l;
-
-       list_for_each(l,list) {
-               const struct pci_bus *b = pci_bus_b(l);
-               retval = scan_pci_bus(b);
-               if (retval)
-                       return retval;
-               retval = pci_scan_buses(&b->children);
-               if (retval)
-                       return retval;
-       }
-       return 0;
-}
-
-static void __exit
-cleanup_slots (void)
-{
-/*FIXME: look at every hotplug_slot if name begins with "DUMMY-" an kick them*/
-}
-
-
-static int __init
-dummyphp_init(void)
-{
-       info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
-
-       return pci_scan_buses(&pci_root_buses);
-}
-
-
-static void __exit
-dummyphp_exit(void)
-{
-       cleanup_slots();
-}
-
-module_init(dummyphp_init);
-module_exit(dummyphp_exit);
index 0825083..e78d996 100644 (file)
@@ -370,10 +370,10 @@ static int init_slots (void)
                 * Initilize the slot info structure with some known
                 * good values.
                 */
-               info->power_status = get_power_status(slot);
-               info->attention_status = get_attention_status(slot);
-               info->latch_status = get_latch_status(slot);
-               info->adapter_status = get_adapter_status(slot);
+               info->power_status = get_skel_power_status(slot);
+               info->attention_status = get_skel_attention_status(slot);
+               info->latch_status = get_skel_latch_status(slot);
+               info->adapter_status = get_skel_adapter_status(slot);
                
                dbg ("registering slot %d\n", i);
                retval = pci_hp_register (slot->hotplug_slot);
diff --git a/drivers/pci/hotplug/rpadlpar.h b/drivers/pci/hotplug/rpadlpar.h
deleted file mode 100644 (file)
index 5dab767..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Interface for Dynamic Logical Partitioning of I/O Slots
- *
- * John Rose <johnrose@austin.ibm.com>
- * October 2003
- *
- * Copyright (C) 2003 IBM.
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- */
-#ifndef _RPADLPAR_IO_H_
-#define _RPADLPAR_IO_H_
-
-extern int dlpar_sysfs_init(void);
-extern void dlpar_sysfs_exit(void);
-
-extern int dlpar_add_slot(char *drc_name);
-extern int dlpar_remove_slot(char *drc_name);
-
-#endif
diff --git a/drivers/pci/hotplug/rpadlpar_core.c b/drivers/pci/hotplug/rpadlpar_core.c
deleted file mode 100644 (file)
index 092abbf..0000000
+++ /dev/null
@@ -1,317 +0,0 @@
-/*
- * Interface for Dynamic Logical Partitioning of I/O Slots
- *
- * John Rose <johnrose@austin.ibm.com>
- * Linda Xie <lxie@us.ibm.com>
- * 
- * October 2003
- *
- * Copyright (C) 2003 IBM.
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- */
-#include <linux/init.h>
-#include <linux/pci.h>
-#include <asm/pci-bridge.h>
-#include "../pci.h"
-#include "rpaphp.h"
-#include "rpadlpar.h"
-
-#define MODULE_VERSION "1.0"
-#define MODULE_NAME "rpadlpar_io"
-
-static inline int is_hotplug_capable(struct device_node *dn)
-{
-       unsigned char *ptr = get_property(dn, "ibm,fw-pci-hot-plug-ctrl", NULL);
-
-       return (int) (ptr != NULL);
-}
-
-static char *get_node_drc_name(struct device_node *dn)
-{
-       char *ptr = NULL;
-       int *drc_names;
-
-       if ((drc_names = (int *) get_property(dn, "ibm,drc-names", NULL)))
-               ptr = (char *) &drc_names[1];
-
-       return ptr;
-}
-
-static struct device_node *find_php_slot_node(char *drc_name)
-{
-       struct device_node *np = NULL;
-       char *name;
-
-       while ((np = of_find_node_by_type(np, "pci")))
-               if (is_hotplug_capable(np)) {
-                       name = get_node_drc_name(np);
-                       if (name && (!strcmp(drc_name, name)))
-                               break;
-               }
-
-       return np;
-}
-
-static inline struct hotplug_slot *find_php_slot(char *drc_name)
-{
-       struct kobject *k;
-
-       if (!(k = kset_find_obj(&pci_hotplug_slots_subsys.kset, drc_name)))
-               return NULL;
-
-       return to_hotplug_slot(k);
-}
-
-static struct slot *find_slot(char *drc_name)
-{
-       struct hotplug_slot *php_slot;
-
-       if (!(php_slot = find_php_slot(drc_name)))
-               return NULL;
-
-       return (struct slot *) php_slot->private;
-}
-
-static void rpadlpar_claim_one_bus(struct pci_bus *b)
-{
-       struct list_head *ld;
-       struct pci_bus *child_bus;
-
-       for (ld = b->devices.next; ld != &b->devices; ld = ld->next) {
-               struct pci_dev *dev = pci_dev_b(ld);
-               int i;
-
-               for (i = 0; i < PCI_NUM_RESOURCES; i++) {
-                       struct resource *r = &dev->resource[i];
-
-                       if (r->parent || !r->start || !r->flags)
-                               continue;
-                       rpaphp_claim_resource(dev, i);
-               }
-       }
-
-       list_for_each_entry(child_bus, &b->children, node)
-               rpadlpar_claim_one_bus(child_bus);
-}
-
-static int pci_add_secondary_bus(struct device_node *dn,
-               struct pci_dev *bridge_dev)
-{
-       struct pci_controller *hose = dn->phb;
-       struct pci_bus *child;
-       u8 sec_busno;
-
-       /* Get busno of downstream bus */
-       pci_read_config_byte(bridge_dev, PCI_SECONDARY_BUS, &sec_busno);
-
-       /* Allocate and add to children of bridge_dev->bus */
-       child = pci_add_new_bus(bridge_dev->bus, bridge_dev, sec_busno);
-       if (!child) {
-               printk(KERN_ERR "%s: could not add secondary bus\n", __FUNCTION__);
-               return 1;
-       }
-
-       sprintf(child->name, "PCI Bus #%02x", child->number);
-
-       /* Fixup subordinate bridge bases and resources */
-       pcibios_fixup_bus(child);
-
-       /* Claim new bus resources */
-       rpadlpar_claim_one_bus(bridge_dev->bus);
-
-       if (hose->last_busno < child->number)
-               hose->last_busno = child->number;
-
-       dn->bussubno = child->number;
-
-       /* ioremap() for child bus */
-       if (remap_bus_range(child)) {
-               printk(KERN_ERR "%s: could not ioremap() child bus\n",
-                               __FUNCTION__);
-               return 1;
-       }
-
-       return 0;
-}
-
-static struct pci_dev *dlpar_pci_add_bus(struct device_node *dn)
-{
-       struct pci_controller *hose = dn->phb;
-       struct pci_dev *dev = NULL;
-
-       /* Scan phb bus for devices, adding new ones to bus->devices */
-       if (!pci_scan_slot(hose->bus, dn->devfn)) {
-               printk(KERN_ERR "%s: found no devices on bus\n", __FUNCTION__);
-               return NULL;
-       }
-
-       /* Add new devices to global lists.  Register in proc, sysfs. */
-       pci_bus_add_devices(hose->bus);
-
-       /* Confirm new bridge dev was created */
-       if (!(dev = rpaphp_find_pci_dev(dn))) {
-               printk(KERN_ERR "%s: failed to add pci device\n", __FUNCTION__);
-               return NULL;
-       }
-
-       if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE)  {
-               printk(KERN_ERR "%s: unexpected header type %d\n",
-                               __FUNCTION__, dev->hdr_type);
-               return NULL;
-       }
-
-       if (pci_add_secondary_bus(dn, dev))
-               return NULL;
-
-       return dev;
-}
-
-static int dlpar_pci_remove_bus(struct pci_dev *bridge_dev)
-{
-       struct pci_bus *secondary_bus;
-
-       if (!bridge_dev) {
-               printk(KERN_ERR "%s: %s() unexpected null device\n", 
-                               MODULE_NAME, __FUNCTION__);
-               return 1;
-       }
-
-       secondary_bus = bridge_dev->subordinate;
-
-       if (unmap_bus_range(secondary_bus)) {
-               printk(KERN_ERR "%s: failed to unmap bus range\n", 
-                               __FUNCTION__);
-               return 1;
-       }
-
-       pci_remove_bus_device(bridge_dev);
-
-       return 0;
-}
-
-/**
- * dlpar_add_slot - DLPAR add an I/O Slot
- * @drc_name: drc-name of newly added slot
- *
- * Make the hotplug module and the kernel aware
- * of a newly added I/O Slot.
- * Return Codes -
- * 0                   Success
- * -ENODEV             Not a valid drc_name
- * -EINVAL             Slot already added
- * -EIO                        Internal PCI Error
- */
-int dlpar_add_slot(char *drc_name)
-{
-       struct device_node *dn = find_php_slot_node(drc_name);
-       struct pci_dev *dev;
-
-       if (!dn)
-               return -ENODEV;
-
-       /* Check for existing hotplug slot */
-       if (find_slot(drc_name))
-               return -EINVAL;
-
-       /* Add pci bus */
-       dev = dlpar_pci_add_bus(dn);
-       if (!dev) {
-               printk(KERN_ERR "%s: unable to add bus %s\n", __FUNCTION__,
-                               drc_name);
-               return -EIO;
-       }
-
-       /* Add hotplug slot for new bus */
-       if (rpaphp_add_slot(drc_name)) {
-               printk(KERN_ERR "%s: unable to add hotplug slot %s\n",
-                               __FUNCTION__, drc_name);
-               return -EIO;
-       }
-
-       return 0;
-}
-
-/**
- * dlpar_remove_slot - DLPAR remove an I/O Slot
- * @drc_name: drc-name of newly added slot
- *
- * Remove the kernel and hotplug representations
- * of an I/O Slot.
- * Return Codes:
- * 0                   Success
- * -ENODEV             Not a valid drc_name
- * -EINVAL             Slot already removed
- * -EIO                        Internal PCI Error
- */
-int dlpar_remove_slot(char *drc_name)
-{
-       struct device_node *dn = find_php_slot_node(drc_name);
-       struct slot *slot;
-       struct pci_dev *bridge_dev;
-
-       if (!dn)
-               return -ENODEV;
-
-       if (!(slot = find_slot(drc_name)))
-               return -EINVAL;
-
-       bridge_dev = slot->bridge;
-       if (!bridge_dev) {
-               printk(KERN_ERR "%s: %s(): unexpected null bridge device\n",
-                               MODULE_NAME, __FUNCTION__);
-               return -EIO;
-       }
-
-       /* Remove hotplug slot */
-       if (rpaphp_remove_slot(slot)) {
-               printk(KERN_ERR "%s: %s(): unable to remove hotplug slot %s\n",
-                               MODULE_NAME, __FUNCTION__, drc_name);
-               return -EIO;
-       }
-
-       /* Remove pci bus */
-       if (dlpar_pci_remove_bus(bridge_dev)) {
-               printk(KERN_ERR "%s: %s() unable to remove pci bus %s\n",
-                               MODULE_NAME, __FUNCTION__, drc_name);
-               return -EIO;
-       }
-
-       return 0;
-}
-
-static inline int is_dlpar_capable(void)
-{
-       int rc = rtas_token("ibm,configure-connector");
-
-       return (int) (rc != RTAS_UNKNOWN_SERVICE);
-}
-
-int __init rpadlpar_io_init(void)
-{
-       int rc;
-
-       if (!is_dlpar_capable()) {
-               printk(KERN_WARNING "partition not DLPAR capable, exiting %s\n",
-                               MODULE_NAME);
-               return -EPERM;
-       }
-
-       if ((rc = dlpar_sysfs_init()))
-               return rc;
-
-       return 0;
-}
-
-void rpadlpar_io_exit(void)
-{
-       dlpar_sysfs_exit();
-       return;
-}
-
-module_init(rpadlpar_io_init);
-module_exit(rpadlpar_io_exit);
-MODULE_LICENSE("GPL");
diff --git a/drivers/pci/hotplug/rpadlpar_sysfs.c b/drivers/pci/hotplug/rpadlpar_sysfs.c
deleted file mode 100644 (file)
index e3d20b3..0000000
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Interface for Dynamic Logical Partitioning of I/O Slots
- *
- * John Rose <johnrose@austin.ibm.com>
- * October 2003
- *
- * Copyright (C) 2003 IBM.
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- */
-#include <linux/kobject.h>
-#include <linux/string.h>
-#include "pci_hotplug.h"
-#include "rpadlpar.h"
-
-#define DLPAR_KOBJ_NAME       "control"
-#define ADD_SLOT_ATTR_NAME    "add_slot"
-#define REMOVE_SLOT_ATTR_NAME "remove_slot"
-
-#define MAX_DRC_NAME_LEN 64
-
-/* Store return code of dlpar operation in attribute struct */
-struct dlpar_io_attr {
-       int rc;
-       struct attribute attr;
-       ssize_t (*store)(struct dlpar_io_attr *dlpar_attr, const char *buf,
-               size_t nbytes);
-};
-
-/* Common show callback for all attrs, display the return code
- * of the dlpar op */
-static ssize_t
-dlpar_attr_show(struct kobject * kobj, struct attribute * attr, char * buf)
-{
-       struct dlpar_io_attr *dlpar_attr = container_of(attr,
-                                               struct dlpar_io_attr, attr);
-       return sprintf(buf, "%d\n", dlpar_attr->rc);
-}
-
-static ssize_t
-dlpar_attr_store(struct kobject * kobj, struct attribute * attr,
-                const char *buf, size_t nbytes)
-{
-       struct dlpar_io_attr *dlpar_attr = container_of(attr,
-                                               struct dlpar_io_attr, attr);
-       return dlpar_attr->store ?
-               dlpar_attr->store(dlpar_attr, buf, nbytes) : 0;
-}
-
-static struct sysfs_ops dlpar_attr_sysfs_ops = {
-       .show = dlpar_attr_show,
-       .store = dlpar_attr_store,
-};
-
-static ssize_t add_slot_store(struct dlpar_io_attr *dlpar_attr,
-                               const char *buf, size_t nbytes)
-{
-       char drc_name[MAX_DRC_NAME_LEN];
-       char *end;
-
-       if (nbytes > MAX_DRC_NAME_LEN)
-               return 0;
-
-       memcpy(drc_name, buf, nbytes);
-
-       if (!(end = strchr(drc_name, '\n')))
-               end = &drc_name[nbytes];
-       *end = '\0';
-
-       dlpar_attr->rc = dlpar_add_slot(drc_name);
-
-       return nbytes;
-}
-
-static ssize_t remove_slot_store(struct dlpar_io_attr *dlpar_attr,
-                               const char *buf, size_t nbytes)
-{
-       char drc_name[MAX_DRC_NAME_LEN];
-       char *end;
-
-       if (nbytes > MAX_DRC_NAME_LEN)
-               return 0;
-
-       memcpy(drc_name, buf, nbytes);
-
-       if (!(end = strchr(drc_name, '\n')))
-               end = &drc_name[nbytes];
-       *end = '\0';
-
-       dlpar_attr->rc = dlpar_remove_slot(drc_name);
-
-       return nbytes;
-}
-
-static struct dlpar_io_attr add_slot_attr = {
-       .rc = 0,
-       .attr = { .name = ADD_SLOT_ATTR_NAME, .mode = 0644, },
-       .store = add_slot_store,
-};
-
-static struct dlpar_io_attr remove_slot_attr = {
-       .rc = 0,
-       .attr = { .name = REMOVE_SLOT_ATTR_NAME, .mode = 0644},
-       .store = remove_slot_store,
-};
-
-static struct attribute *default_attrs[] = {
-       &add_slot_attr.attr,
-       &remove_slot_attr.attr,
-       NULL,
-};
-
-static void dlpar_io_release(struct kobject *kobj)
-{
-       /* noop */
-       return; 
-}
-
-struct kobj_type ktype_dlpar_io = {
-       .release = dlpar_io_release,
-       .sysfs_ops = &dlpar_attr_sysfs_ops,
-       .default_attrs = default_attrs,
-};
-
-struct kset dlpar_io_kset = {
-       .subsys = &pci_hotplug_slots_subsys,
-       .kobj = {.name = DLPAR_KOBJ_NAME, .ktype=&ktype_dlpar_io,},
-       .ktype = &ktype_dlpar_io,
-};
-
-int dlpar_sysfs_init(void)
-{
-       if (kset_register(&dlpar_io_kset)) {
-               printk(KERN_ERR "rpadlpar_io: cannot register kset for %s\n",
-                               dlpar_io_kset.kobj.name);
-               return -EINVAL;
-       }
-
-       return 0;
-}
-
-void dlpar_sysfs_exit(void)
-{
-       kset_unregister(&dlpar_io_kset);
-}
diff --git a/drivers/pci/hotplug/rpaphp.h b/drivers/pci/hotplug/rpaphp.h
deleted file mode 100644 (file)
index c74aea3..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
- * PPC64 PCI Hot Plug Controller Driver
- *
- * Copyright (c) 2003 Linda Xie <lxie@us.ibm.com>
- *
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Send feedback to <lxie@us.ibm.com>,
- *
- */
-
-#ifndef _PPC64PHP_H
-#define _PPC64PHP_H
-#include "pci_hotplug.h"
-
-#define DR_INDICATOR 9002
-#define DR_ENTITY_SENSE 9003
-
-#define POWER_ON       100
-#define POWER_OFF      0
-
-#define LED_OFF                0 
-#define LED_ON         1       /* continuous on */ 
-#define LED_ID         2       /* slow blinking */
-#define LED_ACTION     3       /* fast blinking */
-
-#define SLOT_NAME_SIZE 12
-
-/* Error status from rtas_get-sensor */
-#define NEED_POWER    -9000     /* slot must be power up and unisolated to get state */
-#define PWR_ONLY      -9001     /* slot must be powerd up to get state, leave isolated */
-#define ERR_SENSE_USE -9002     /* No DR operation will succeed, slot is unusable  */
-
-/* Sensor values from rtas_get-sensor */
-#define EMPTY           0       /* No card in slot */
-#define PRESENT         1       /* Card in slot */
-
-#if !defined(CONFIG_HOTPLUG_PCI_MODULE)
-       #define MY_NAME "rpaphp"
-#else
-       #define MY_NAME THIS_MODULE->name
-#endif
-
-
-#define dbg(format, arg...)                                    \
-       do {                                                    \
-               if (rpaphp_debug)                               \
-                       printk(KERN_DEBUG "%s: " format,        \
-                               MY_NAME , ## arg);              \
-       } while (0)
-#define err(format, arg...) printk(KERN_ERR "%s: " format, MY_NAME , ## arg)
-#define info(format, arg...) printk(KERN_INFO "%s: " format, MY_NAME , ## arg)
-#define warn(format, arg...) printk(KERN_WARNING "%s: " format, MY_NAME , ## arg)
-
-#define SLOT_MAGIC     0x67267322
-
-/* slot states */
-
-#define        NOT_VALID       3
-#define        NOT_CONFIGURED  2
-#define        CONFIGURED      1
-#define        EMPTY           0
-
-/*
- * struct slot - slot information for each *physical* slot
- */
-struct slot {
-       u32     magic;
-        int     state;
-        u32     index;
-        u32     type;
-        u32     power_domain;
-        char    *name;
-       struct  device_node *dn;/* slot's device_node in OFDT           */
-                               /* dn has phb info                      */
-       struct  pci_dev *bridge;/* slot's pci_dev in pci_devices        */
-
-       struct  pci_dev *dev;   /* pci_dev of device in this slot       */
-                               /* it will be used for unconfig         */ 
-                               /* NULL if slot is empty                */
-
-       struct  hotplug_slot    *hotplug_slot;
-       struct list_head        rpaphp_slot_list;
-};
-
-extern struct pci_dev *rpaphp_find_pci_dev(struct device_node *dn);
-extern int rpaphp_add_slot(char *slot_name);
-extern int rpaphp_remove_slot(struct slot *slot);
-extern int rpaphp_claim_resource(struct pci_dev *dev, int resource);
-
-#endif /* _PPC64PHP_H */
diff --git a/drivers/pci/hotplug/rpaphp_core.c b/drivers/pci/hotplug/rpaphp_core.c
deleted file mode 100644 (file)
index d8b40ea..0000000
+++ /dev/null
@@ -1,1040 +0,0 @@
-/*
- * PRA PCI Hot Plug Controller Driver
- * Copyright (c) 2003 Linda Xie <lxie@us.ibm.com>
- *
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Send feedback to <lxie@us.ibm.com>
- *
- */
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/pci.h>
-#include <linux/slab.h>
-#include <linux/smp.h>
-#include <linux/smp_lock.h>
-#include <linux/init.h>
-#include <asm/rtas.h>          /* rtas_call */
-#include <asm/pci-bridge.h>    /* for pci_controller */
-#include "../pci.h"            /* for pci_add_new_bus*/
-                               /* and pci_do_scan_bus*/
-#include "rpaphp.h"
-#include "pci_hotplug.h"
-
-
-static int debug; 
-static struct semaphore rpaphp_sem; 
-static int rpaphp_debug;
-static LIST_HEAD (rpaphp_slot_head);
-static int num_slots = 0;
-
-#define DRIVER_VERSION "0.1"
-#define DRIVER_AUTHOR  "Linda Xie <lxie@us.ibm.com>"
-#define DRIVER_DESC    "RPA HOT Plug PCI Controller Driver"
-
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE("GPL");
-MODULE_PARM(debug, "i");
-MODULE_PARM_DESC(debug, "Debugging mode enabled or not");
-
-static int enable_slot         (struct hotplug_slot *slot);
-static int disable_slot                (struct hotplug_slot *slot);
-static int set_attention_status (struct hotplug_slot *slot, u8 value);
-static int get_power_status    (struct hotplug_slot *slot, u8 *value);
-static int get_attention_status        (struct hotplug_slot *slot, u8 *value);
-static int get_adapter_status  (struct hotplug_slot *slot, u8 *value);
-static int get_max_bus_speed   (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value);
-static int get_cur_bus_speed   (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value);
-
-static struct hotplug_slot_ops rpaphp_hotplug_slot_ops = {
-       .owner                  = THIS_MODULE,
-       .enable_slot            = enable_slot,
-       .disable_slot           = disable_slot,
-       .set_attention_status   = set_attention_status,
-       .get_power_status       = get_power_status,
-       .get_attention_status   = get_attention_status,
-       .get_adapter_status     = get_adapter_status,
-       .get_max_bus_speed      = get_max_bus_speed,
-       .get_cur_bus_speed      = get_cur_bus_speed,
-};
-
-static int rpaphp_get_sensor_state(int index, int *state)
-{
-       int rc;
-
-        rc = rtas_get_sensor(DR_ENTITY_SENSE, index, state);
-                       
-        if (rc) {
-               if (rc ==  NEED_POWER || rc == PWR_ONLY) {
-                       dbg("%s: slot must be power up to get sensor-state\n", 
-                               __FUNCTION__);
-               } else if (rc == ERR_SENSE_USE) 
-                       info("%s: slot is unusable\n", __FUNCTION__);
-                  else err("%s failed to get sensor state\n", __FUNCTION__);
-       }
-       return rc;
-}
-
-static struct pci_dev *rpaphp_find_bridge_pdev(struct slot *slot)
-{
-       struct pci_dev          *retval_dev = NULL;
-                       
-       retval_dev = rpaphp_find_pci_dev(slot->dn);     
-
-       return retval_dev;
-}
-
-static struct pci_dev *rpaphp_find_adapter_pdev(struct slot *slot)
-{
-       struct pci_dev * retval_dev = NULL;
-
-       retval_dev = rpaphp_find_pci_dev(slot->dn->child);      
-
-       return retval_dev;
-}
-
-
-/* Inline functions to check the sanity of a pointer that is passed to us */
-static inline int slot_paranoia_check(struct slot *slot, const char *function)
-{
-       if (!slot) {
-               dbg("%s - slot == NULL\n", function);
-               return -1;
-       }
-       
-       if (!slot->hotplug_slot) {
-               dbg("%s - slot->hotplug_slot == NULL!\n", function);
-               return -1;
-       }
-       return 0;
-}
-
-static inline struct slot *get_slot(struct hotplug_slot *hotplug_slot, const char *function)
-{
-       struct slot *slot;
-
-       if (!hotplug_slot) {
-               dbg("%s - hotplug_slot == NULL\n", function);
-               return NULL;
-       }
-
-       slot = (struct slot *)hotplug_slot->private;
-       if (slot_paranoia_check(slot, function))
-                return NULL;
-       return slot;
-}
-
-static inline int rpaphp_set_attention_status(struct slot *slot, u8 status)
-{
-       int     rc;
-
-       dbg("Entry %s: status=%d\n", __FUNCTION__, status);
-       
-       /* status: LED_OFF or LED_ON */
-       rc = rtas_set_indicator(DR_INDICATOR, slot->index, status);
-       if (rc)
-               err("slot(%s) set attention-status(%d) failed! rc=0x%x\n", 
-                       slot->name, status, rc); 
-
-       dbg("Exit %s, rc=0x%x\n", __FUNCTION__, rc);
-
-       return rc;
-}
-
-static int rpaphp_get_power_status(struct slot *slot, u8 *value)
-{
-       int     rc;
-
-        rc = rtas_get_power_level(slot->power_domain, (int *)value);
-        if (rc) 
-                err("failed to get power-level for slot(%s), rc=0x%x\n", 
-                       slot->name, rc);
-       
-        return rc;
-}
-
-static int rpaphp_get_attention_status(struct slot *slot)
-{
-
-       return slot->hotplug_slot->info->attention_status;
-}
-
-/**
- * set_attention_status - set attention LED
- * echo 0 > attention -- set LED OFF
- * echo 1 > attention -- set LED ON
- * echo 2 > attention -- set LED ID(identify, light is blinking)
- *
- */
-static int set_attention_status (struct hotplug_slot *hotplug_slot, u8 value)
-{
-       int retval = 0;
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       dbg("%s - Entry: slot[%s] value[0x%x]\n", 
-               __FUNCTION__, slot->name, value);
-       down(&rpaphp_sem);
-       switch (value) {
-               case 0:
-                       retval = rpaphp_set_attention_status(slot, LED_OFF);
-                       hotplug_slot->info->attention_status = 0;
-                       break;
-
-               case 1:
-               default:
-                       retval = rpaphp_set_attention_status(slot, LED_ON);
-                       hotplug_slot->info->attention_status = 1;
-                       break;
-
-               case 2:
-                       retval = rpaphp_set_attention_status(slot, LED_ID);
-                       hotplug_slot->info->attention_status = 2;
-                       break;
-
-       }
-       up(&rpaphp_sem);
-
-       dbg("%s - Exit: rc[%d]\n",  __FUNCTION__, retval);
-       return retval;
-}
-
-/**
- * get_power_status - get power status of a slot
- * @hotplug_slot: slot to get status
- * @value: pointer to store status
- *
- *
- */
-static int get_power_status (struct hotplug_slot *hotplug_slot, u8 *value)
-{
-       int retval;
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-       
-       if (slot == NULL)
-               return -ENODEV;
-
-       down(&rpaphp_sem);
-       retval = rpaphp_get_power_status(slot, value);
-       up(&rpaphp_sem);
-
-       return retval;
-}
-
-/**
- * get_attention_status - get attention LED status
- *
- *
- */
-static int get_attention_status (struct hotplug_slot *hotplug_slot, u8 *value)
-{
-       int retval = 0;
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-
-       if (slot == NULL)
-               return -ENODEV;
-
-
-       dbg("%s - Entry: slot[%s]\n",
-               __FUNCTION__, slot->name);
-
-       down(&rpaphp_sem);
-       *value = rpaphp_get_attention_status(slot);
-       up(&rpaphp_sem);
-
-       dbg("%s - Exit: value[0x%x] rc[%d]\n",
-               __FUNCTION__, *value, retval);
-       return retval;
-}
-
-/*
- * get_adapter_status - get  the status of a slot
- * 
- * 0-- slot is empty
- * 1-- adapter is configured
- * 2-- adapter is not configured
- * 3-- not valid
- */
-static int rpaphp_get_adapter_status(struct slot *slot, int is_init, u8 *value)
-{
-       int     state, rc;
-
-       dbg("Entry %s\n", __FUNCTION__);
-
-       *value            = NOT_VALID;  
-
-       rc = rpaphp_get_sensor_state(slot->index, &state);      
-               
-       if (rc) 
-               goto exit;              
-
-       if (state == PRESENT) {
-               dbg("slot is occupied\n");
-          
-               if (!is_init) /* at run-time slot->state can be changed by */
-                         /* config/unconfig adapter                       */
-                       *value = slot->state;
-               else {
-               if (!slot->dn->child) 
-                       dbg("%s: %s is not valid OFDT node\n", 
-                               __FUNCTION__, slot->dn->full_name);
-               else 
-                       if (rpaphp_find_pci_dev(slot->dn->child)) 
-                               *value = CONFIGURED;
-                       else {
-                               dbg("%s: can't find pdev of adapter in slot[%s]\n",
-                                       __FUNCTION__, slot->name);
-                               *value = NOT_CONFIGURED;        
-                               }
-               }
-       }
-       else
-               if (state == EMPTY) {
-               dbg("slot is empty\n");
-                       *value = state;
-               }
-                
-exit:    dbg("Exit %s slot[%s] has adapter-status %d rtas call's rc=0x%x\n",
-               __FUNCTION__, slot->name, *value, rc);
-
-       return rc;
-}
-
-static int get_adapter_status (struct hotplug_slot *hotplug_slot, u8 *value)
-{
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-       int retval = 0;
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       down(&rpaphp_sem);
-
-       /*  have to go through this */
-       retval = rpaphp_get_adapter_status(slot, 0, value);
-
-       up(&rpaphp_sem);
-
-       return retval;
-}
-
-
-static int get_max_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
-{
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-
-       if (slot == NULL)
-               return -ENODEV;
-       
-       dbg("%s - Entry: slot->name[%s] slot->type[%d]\n",
-               __FUNCTION__, slot->name, slot->type);
-
-       down(&rpaphp_sem);      
-
-       switch (slot->type) {
-               case 1: 
-               case 2:
-               case 3:
-               case 4:
-               case 5:
-               case 6:
-                       *value = PCI_SPEED_33MHz;       /* speed for case 1-6 */
-                       break;
-               case 7:
-               case 8:
-                       *value = PCI_SPEED_66MHz;
-                       break;
-               case 11:
-               case 14:
-                       *value = PCI_SPEED_66MHz_PCIX;
-                       break;
-               case 12:
-               case 15:
-                       *value = PCI_SPEED_100MHz_PCIX;
-                       break;
-               case 13:
-               case 16:
-                       *value = PCI_SPEED_133MHz_PCIX;
-                       break;
-               default:
-                       *value = PCI_SPEED_UNKNOWN;
-                       break;
-       }
-
-       up(&rpaphp_sem);        
-
-       return 0;
-}
-
-
-/* return dummy value because not sure if PRA provides any method... */
-static int get_cur_bus_speed (struct hotplug_slot *hotplug_slot, enum pci_bus_speed *value)
-{
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       *value = PCI_SPEED_UNKNOWN;
-
-       return 0;
-}
-
-/* 
- * rpaphp_validate_slot - make sure the name of the slot matches
- *                             the location code , if the slots is not
- *                             empty.
- */
-static int rpaphp_validate_slot(const char *slot_name, const int slot_index)
-{
-       struct device_node      *dn;
-       int                     retval = 0;
-       
-       dbg("Entry %s: (name: %s index: 0x%x\n", 
-               __FUNCTION__, slot_name, slot_index);
-
-       for(dn = find_all_nodes(); dn; dn = dn->next) { 
-
-               int             *index;
-               unsigned char   *loc_code;
-
-               index  = (int *)get_property(dn, "ibm,my-drc-index", NULL);
-
-               if (index && *index == slot_index) {
-               char *slash, tmp_str[128];
-
-                       loc_code = get_property(dn, "ibm,loc-code", NULL);     
-               if (!loc_code) {
-                       retval = -1;
-                       goto exit;
-               }
-
-               dbg("%s: name=%s loc-code=%s index=0x%x\n",
-                       __FUNCTION__, slot_name, loc_code, slot_index);
-               
-               strcpy(tmp_str, loc_code);
-               slash = strrchr(tmp_str, '/');
-               if (slash) {
-                       *slash = '\0';
-               }
-               if (strcmp(slot_name, tmp_str)) 
-                       retval = -1;
-               goto exit;      
-               }
-
-       }
-
-exit:
-       dbg("Exit %s with retval=%d\n", __FUNCTION__, retval);
-
-       return retval;
-}
-
-/* Must be called before pci_bus_add_devices */
-static void rpaphp_fixup_new_devices(struct pci_bus *bus)
-{
-       struct pci_dev *dev;
-       
-       dbg("Enter rpaphp_fixup_new_devices()\n");
-
-       list_for_each_entry(dev, &bus->devices, bus_list) {
-       /*
-        * Skip already-present devices (which are on the
-        * global device list.)
-        */
-               if (list_empty(&dev->global_list)) {
-                       int i;
-                       pcibios_fixup_device_resources(dev, bus);
-                       pci_read_irq_line(dev);
-                       for (i = 0; i < PCI_NUM_RESOURCES; i++) {
-                               struct resource *r = &dev->resource[i];
-                               if (r->parent || !r->start || !r->flags)
-                                       continue;
-                               rpaphp_claim_resource(dev, i);
-                       }
-
-               }
-       }
-}
-
-static struct pci_dev *rpaphp_config_adapter(struct slot *slot) 
-{
-       struct pci_bus          *pci_bus;
-       struct device_node      *dn;
-       int                     num;
-       struct pci_dev          *dev = NULL;
-
-       dbg("Entry %s: slot[%s]\n",
-               __FUNCTION__, slot->name); 
-
-       if (slot->bridge) {
-                               
-               pci_bus = slot->bridge->subordinate;
-               
-               if (!pci_bus) {
-                       err("%s: can't find bus structure\n", __FUNCTION__);
-                       goto exit;
-               }
-
-               for (dn = slot->dn->child; dn; dn = dn->sibling) {
-                       dbg("child dn's devfn=[%x]\n", dn->devfn);
-                               num = pci_scan_slot(pci_bus, 
-                               PCI_DEVFN(PCI_SLOT(dn->devfn),  0));
-
-                               dbg("pci_scan_slot return num=%d\n", num);
-
-                       if (num) {
-                               dbg("%s: calling rpaphp_fixup_new_devices()\n",
-                                       __FUNCTION__);
-                               rpaphp_fixup_new_devices(pci_bus);
-                               pci_bus_add_devices(pci_bus);
-                       }
-               }
-
-               dev = rpaphp_find_pci_dev(slot->dn->child);
-       }
-       else {
-               /* slot is not enabled */
-               err("slot doesn't have pci_dev structure\n");
-               dev = NULL;
-               goto exit;
-       }       
-
-exit:  
-       dbg("Exit %s: pci_dev %s\n", __FUNCTION__, dev? "found":"not found");
-
-       return dev;
-}
-
-static int rpaphp_unconfig_adapter(struct slot *slot) 
-{
-       int                     retval = 0;
-
-       dbg("Entry %s: slot[%s]\n", 
-               __FUNCTION__, slot->name); 
-       if (!slot->dev) {
-               info("%s: no card in slot[%s]\n",
-                       __FUNCTION__, slot->name);
-
-               retval = -EINVAL;
-               goto exit;      
-       }
-
-
-        /* remove the device from the pci core */
-        pci_remove_bus_device(slot->dev);
-
-        pci_dev_put(slot->dev);
-        slot->state = NOT_CONFIGURED;
-       
-       dbg("%s: adapter in slot[%s] unconfigured.\n", __FUNCTION__, slot->name);
-               
-exit:
-       dbg("Exit %s, rc=0x%x\n", __FUNCTION__, retval);
-
-       return retval;
-               
-}
-
-/* free up the memory user be a slot */
-
-static void rpaphp_release_slot(struct hotplug_slot *hotplug_slot)
-{
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-       
-       if (slot == NULL)
-               return;
-
-       dbg("%s - Entry: slot[%s]\n",
-               __FUNCTION__, slot->name);
-       kfree(slot->hotplug_slot->info);
-       kfree(slot->hotplug_slot->name);
-       kfree(slot->hotplug_slot);
-       pci_dev_put(slot->bridge);
-       pci_dev_put(slot->dev);
-       kfree(slot);
-       dbg("%s - Exit\n", __FUNCTION__);
-}
-
-int rpaphp_remove_slot(struct slot *slot)
-{
-       int retval = 0;
-
-       dbg("%s - Entry: slot[%s]\n",
-               __FUNCTION__, slot->name);
-
-       sysfs_remove_link(slot->hotplug_slot->kobj.parent,
-                          slot->bridge->slot_name);
-       
-       list_del(&slot->rpaphp_slot_list);
-       retval = pci_hp_deregister(slot->hotplug_slot);
-       if (retval)
-               err("Problem unregistering a slot %s\n", slot->name);
-       num_slots--;
-
-       dbg("%s - Exit: rc[%d]\n", __FUNCTION__, retval);
-       return retval;  
-}
-
-static int is_php_dn(struct device_node *dn, int **indexes,  int **names, int **types, int **power_domains)
-{
-       *indexes = (int *)get_property(dn, "ibm,drc-indexes", NULL);
-       if (!*indexes)
-               return(0);
-
-       /* &names[1] contains NULL terminated slot names */
-       *names = (int *)get_property(dn, "ibm,drc-names", NULL);
-       if (!*names) 
-               return(0);
-
-       /* &types[1] contains NULL terminated slot types */
-       *types = (int *)get_property(dn, "ibm,drc-types", NULL);
-       if (!*types)
-               return(0);
-
-       /* power_domains[1...n] are the slot power domains */
-       *power_domains = (int *)get_property(dn,
-               "ibm,drc-power-domains", NULL);
-       if (!*power_domains) 
-               return(0);
-
-       if (!get_property(dn, "ibm,fw-pci-hot-plug-ctrl", NULL))
-               return(0);
-
-       return(1);
-}
-
-static struct slot *alloc_slot_struct(void)
-{
-       struct slot *slot;
-
-       slot = kmalloc(sizeof(struct slot), GFP_KERNEL);
-       if (!slot) 
-               return (NULL);
-       memset(slot, 0, sizeof(struct slot));
-       slot->hotplug_slot = kmalloc(sizeof(struct hotplug_slot),       
-               GFP_KERNEL);
-       if (!slot->hotplug_slot) {
-               kfree(slot);
-               return (NULL);
-        }                
-       memset(slot->hotplug_slot, 0, sizeof(struct hotplug_slot));
-       slot->hotplug_slot->info = kmalloc(sizeof(struct hotplug_slot_info), 
-               GFP_KERNEL);
-       if (!slot->hotplug_slot->info) {
-               kfree(slot->hotplug_slot);
-               kfree(slot);
-               return (NULL);
-       }
-       memset(slot->hotplug_slot->info, 0, sizeof(struct hotplug_slot_info));
-       slot->hotplug_slot->name = kmalloc(SLOT_NAME_SIZE, GFP_KERNEL);
-       if (!slot->hotplug_slot->name) {
-               kfree(slot->hotplug_slot->info);
-               kfree(slot->hotplug_slot);
-               kfree(slot);
-               return (NULL);
-       }
-       return (slot);
-}
-
-static int setup_hotplug_slot_info(struct slot *slot)
-{
-       dbg("%s Initilize the slot info structure ...\n",
-               __FUNCTION__);
-
-       rpaphp_get_power_status(slot, 
-               &slot->hotplug_slot->info->power_status);  
-
-       rpaphp_get_adapter_status(slot, 1,
-               &slot->hotplug_slot->info->adapter_status); 
-
-       if (slot->hotplug_slot->info->adapter_status == NOT_VALID) {
-               dbg("%s: NOT_VALID: skip dn->full_name=%s\n", 
-                       __FUNCTION__, slot->dn->full_name);
-                   kfree(slot->hotplug_slot->info);
-                   kfree(slot->hotplug_slot->name);
-                   kfree(slot->hotplug_slot);
-                   kfree(slot);
-               return (-1);
-       }
-       return (0);
-}
-
-static int register_slot(struct slot *slot)
-{
-       int retval; 
-
-       retval = pci_hp_register(slot->hotplug_slot);
-       if (retval) {
-               err("pci_hp_register failed with error %d\n", retval);
-               rpaphp_release_slot(slot->hotplug_slot);
-               return (retval);
-       }
-       /* create symlink between slot->name and it's bus_id */
-       dbg("%s: sysfs_create_link: %s --> %s\n", __FUNCTION__,
-               slot->bridge->slot_name, slot->name);                                   
-       retval = sysfs_create_link(slot->hotplug_slot->kobj.parent,
-                       &slot->hotplug_slot->kobj,
-                       slot->bridge->slot_name);
-       if (retval) {
-               err("sysfs_create_link failed with error %d\n", retval);
-               rpaphp_release_slot(slot->hotplug_slot);
-               return (retval);
-       }
-       /* add slot to our internal list */
-       dbg("%s adding slot[%s] to rpaphp_slot_list\n", 
-               __FUNCTION__, slot->name);
-
-       list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head);
-
-       info("Slot [%s] (bus_id=%s) registered\n", 
-               slot->name, slot->bridge->slot_name);
-       return (0);
-}
-
-/*************************************
- * Add  Hot Plug slot(s) to sysfs
- *
- ************************************/
-int rpaphp_add_slot(char *slot_name)
-{
-       struct slot             *slot;
-       int                     retval = 0;
-       int                     i;
-        struct device_node     *dn;
-        int                    *indexes, *names, *types, *power_domains;
-        char                   *name, *type;
-
-       dbg("Entry %s: %s\n", __FUNCTION__,
-                       slot_name? slot_name: "init");
-
-       for (dn = find_all_nodes(); dn; dn = dn->next) {
-
-               if (dn->name != 0 && strcmp(dn->name, "pci") == 0)      {
-                       if (!is_php_dn(dn, &indexes, &names, &types, &power_domains))
-                               continue;
-                       
-                       dbg("%s : found device_node in OFDT full_name=%s, name=%s\n",
-                               __FUNCTION__, dn->full_name, dn->name);
-
-                       name = (char *)&names[1];
-                       type = (char *)&types[1];
-                       
-                       dbg("%s: indexes=%d\n", __FUNCTION__, indexes[0]);
-
-                       for (i = 0; i < indexes[0]; 
-                               i++, 
-                               name += (strlen(name) + 1),
-                               type += (strlen(type) + 1)) {
-
-                               dbg("%s: name[%s] index[%x]\n",
-                                       __FUNCTION__, name, indexes[i+1]);
-
-                               if (slot_name && strcmp(slot_name, name)) 
-                                       continue;
-               
-                               if (rpaphp_validate_slot(name, indexes[i + 1])) {
-                                       dbg("%s: slot(%s, 0x%x) is invalid.\n",
-                                               __FUNCTION__, name, indexes[i+ 1]);
-                                       continue;
-                               }
-
-                               if (!(slot = alloc_slot_struct())) {
-                                       retval = -ENOMEM;
-                                       goto exit;
-                               }
-
-                               slot->name = slot->hotplug_slot->name;
-                               slot->index = indexes[i + 1];
-                               strcpy(slot->name, name);
-                               slot->type = simple_strtoul(type, NULL, 10);    
-                               if (slot->type < 1  || slot->type > 16)
-                                       slot->type = 0;
-
-                               slot->power_domain = power_domains[i + 1];
-                               slot->magic = SLOT_MAGIC;
-                               slot->hotplug_slot->private = slot;
-                               slot->hotplug_slot->ops = &rpaphp_hotplug_slot_ops;
-                               slot->hotplug_slot->release = &rpaphp_release_slot;
-                               slot->dn = dn;
-
-                               /*
-                               * Initilize the slot info structure with some known 
-                               * good values.
-                               */
-                               if (setup_hotplug_slot_info(slot))
-                                       continue;
-
-                               slot->bridge = rpaphp_find_bridge_pdev(slot);
-                               if (!slot->bridge && slot_name) { /* slot being added doesn't have pci_dev yet*/
-                                       dbg("%s: no pci_dev for bridge dn %s\n", 
-                                                       __FUNCTION__, slot_name);
-                                           kfree(slot->hotplug_slot->info);
-                                           kfree(slot->hotplug_slot->name);
-                                           kfree(slot->hotplug_slot);
-                                           kfree(slot);
-                                       continue;
-                               }
-                               /* find slot's pci_dev if it's not empty*/
-                               if (slot->hotplug_slot->info->adapter_status == EMPTY) {
-                                       slot->state = EMPTY;  /* slot is empty */
-                                       slot->dev = NULL;
-                               }
-                               else {  /* slot is occupied */
-                                       if(!(slot->dn->child)) { /* non-empty slot has to have child */
-                                               err("%s: slot[%s]'s device_node doesn't have child for adapter\n",
-                                               __FUNCTION__, slot->name);
-                                               kfree(slot->hotplug_slot->info);
-                                               kfree(slot->hotplug_slot->name);
-                                               kfree(slot->hotplug_slot);
-                                               kfree(slot);
-                                               continue;
-
-                                       }
-                                       
-                                       slot->dev = rpaphp_find_adapter_pdev(slot);
-
-                                       if (!slot->dev && slot_name) { 
-                                                /* adapter being added doesn't have pci_dev yet */
-                                               slot->dev = rpaphp_config_adapter(slot);
-                                               if (!slot->dev) {
-                                                       err("%s: add new adapter device for slot[%s] failed\n",
-                                                       __FUNCTION__, slot->name);
-                                                       kfree(slot->hotplug_slot->info);
-                                                       kfree(slot->hotplug_slot->name);
-                                                       kfree(slot->hotplug_slot);
-                                                       kfree(slot);
-                                                       pci_dev_put(slot->bridge);
-                                                       continue;
-
-                                               }
-                                       }
-
-                                       if(slot->dev) {
-                                               slot->state = CONFIGURED;
-                                               pci_dev_get(slot->dev);
-                                       }
-                                       else
-                                               slot->state = NOT_CONFIGURED;
-                               }
-                               dbg("%s registering slot:path[%s] index[%x], name[%s] pdomain[%x] type[%d]\n",
-                                       __FUNCTION__, dn->full_name, slot->index, slot->name, 
-                                       slot->power_domain, slot->type);        
-
-                               if ((retval = register_slot(slot)))
-                                       goto exit;
-
-                               num_slots++;
-                       
-                               if (slot_name)  
-                                       goto exit;
-
-                       }/* for indexes */
-               }/* "pci" */
-       }/* find_all_nodes */
-exit:
-       dbg("%s - Exit: num_slots=%d rc[%d]\n", 
-               __FUNCTION__, num_slots, retval);
-       return retval;
-}
-
-/*
- * init_slots - initialize 'struct slot' structures for each slot
- *
- */
-static int init_slots (void)
-{
-       int                     retval = 0;
-
-       dbg("Entry %s\n", __FUNCTION__);
-
-       retval = rpaphp_add_slot(NULL);
-
-       dbg("Exit %s with retval=%d\n", __FUNCTION__, retval);
-
-       return retval;
-}
-
-
-static int init_rpa (void)
-{
-       int                     retval = 0;
-
-       dbg("Entry %s\n", __FUNCTION__);
-
-       init_MUTEX(&rpaphp_sem);
-       
-       /* initialize internal data structure etc. */
-       retval = init_slots();
-       if (!num_slots)
-               retval = -ENODEV;
-       
-       dbg("Exit %s with retval=%d, num_slots=%d\n", 
-               __FUNCTION__, retval, num_slots);
-
-       return retval;
-}
-
-static void cleanup_slots (void)
-{
-       struct list_head *tmp, *n;
-       struct slot *slot;
-
-       /*
-        * Unregister all of our slots with the pci_hotplug subsystem,
-        * and free up all memory that we had allocated.
-        * memory will be freed in release_slot callback. 
-        */
-
-       list_for_each_safe (tmp, n, &rpaphp_slot_head) {
-               slot = list_entry(tmp, struct slot, rpaphp_slot_list);
-               sysfs_remove_link(slot->hotplug_slot->kobj.parent, 
-                       slot->bridge->slot_name);
-               list_del(&slot->rpaphp_slot_list);
-               pci_hp_deregister(slot->hotplug_slot);
-       }
-
-       return;
-}
-
-
-static int __init rpaphp_init(void)
-{
-       int retval = 0;
-
-       dbg("Entry %s\n", __FUNCTION__);
-       info(DRIVER_DESC " version: " DRIVER_VERSION "\n");
-
-       rpaphp_debug = debug;
-
-       /* read all the PRA info from the system */
-       retval = init_rpa();
-
-       dbg("Exit %s with retval=%d\n", __FUNCTION__, retval);
-       return retval;
-}
-
-
-static void __exit rpaphp_exit(void)
-{
-       cleanup_slots();
-}
-
-
-static int enable_slot(struct hotplug_slot *hotplug_slot)
-{
-       int retval = 0, state;
-
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-
-       if (slot == NULL)
-               return -ENODEV;
-
-       dbg("%s - Entry: slot[%s]\n",
-               __FUNCTION__, slot->name);
-       
-       dbg("ENABLING SLOT %s\n", slot->name);
-
-       down(&rpaphp_sem);
-
-       retval = rpaphp_get_sensor_state(slot->index, &state);  
-               
-       if (retval) 
-               goto exit;              
-
-       dbg("%s: sensor state[%d]\n", __FUNCTION__, state);
-
-       /* if slot is not empty, enable the adapter */  
-       if (state == PRESENT) {
-               dbg("%s : slot[%s] is occupid.\n", __FUNCTION__, slot->name);
-
-               if ((slot->dev = rpaphp_config_adapter(slot)) != NULL) {
-                       slot->state = CONFIGURED;
-
-                       dbg("%s: adapter %s in slot[%s] has been configured\n",
-                               __FUNCTION__, slot->dev->slot_name,
-                               slot->name);
-               }
-               else {
-                       slot->state = NOT_CONFIGURED;
-
-                       dbg("%s: no pci_dev struct for adapter in slot[%s]\n",
-                               __FUNCTION__, slot->name);
-               }
-
-       }
-       else if (state == EMPTY) { 
-               dbg("%s : slot[%s] is empty\n", __FUNCTION__, slot->name);
-               slot->state = EMPTY;
-       }
-       else {
-               err("%s: slot[%s] is in invalid state\n", __FUNCTION__, slot->name);
-               slot->state = NOT_VALID;
-               retval = -EINVAL;
-       }
-       
-exit:  
-       if (slot->state != NOT_VALID)
-               rpaphp_set_attention_status(slot, LED_ON);
-       else
-               rpaphp_set_attention_status(slot, LED_ID);
-
-       up(&rpaphp_sem);
-       dbg("%s - Exit: rc[%d]\n",  __FUNCTION__, retval);
-       
-        return retval;
-}
-
-static int disable_slot(struct hotplug_slot *hotplug_slot)
-{
-       int     retval;
-       struct slot *slot = get_slot(hotplug_slot, __FUNCTION__);
-       
-
-       if (slot == NULL)
-               return -ENODEV;
-       
-       dbg("%s - Entry: slot[%s]\n",
-               __FUNCTION__, slot->name);
-       dbg("DISABLING SLOT %s\n", slot->name);
-
-       down(&rpaphp_sem);
-
-       rpaphp_set_attention_status(slot, LED_ID);
-
-       retval = rpaphp_unconfig_adapter(slot);
-                       
-       rpaphp_set_attention_status(slot, LED_OFF);
-
-       up(&rpaphp_sem);
-
-       dbg("%s - Exit: rc[%d]\n",  __FUNCTION__, retval);
-        return retval;
-}
-
-module_init(rpaphp_init);
-module_exit(rpaphp_exit);
-
-EXPORT_SYMBOL_GPL(rpaphp_add_slot);
-EXPORT_SYMBOL_GPL(rpaphp_remove_slot);
diff --git a/drivers/pci/hotplug/rpaphp_pci.c b/drivers/pci/hotplug/rpaphp_pci.c
deleted file mode 100644 (file)
index d75c8c7..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * PRA PCI Hot Plug Controller Driver
- * Copyright (c) 2003 Linda Xie <lxie@us.ibm.com>
- *
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or (at
- * your option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or
- * NON INFRINGEMENT.  See the GNU General Public License for more
- * details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Send feedback to <lxie@us.ibm.com>
- *
- */
-#include <linux/pci.h>
-#include <asm/pci-bridge.h>    /* for pci_controller */
-#include "rpaphp.h"
-
-
-struct pci_dev *rpaphp_find_pci_dev(struct device_node *dn)
-{
-       struct pci_dev          *retval_dev = NULL, *dev = NULL;
-
-       while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev)) != NULL) {
-               if(!dev->bus) 
-                       continue;
-       
-               if (dev->devfn != dn->devfn) 
-                       continue;
-               
-               if (dn->phb->global_number == pci_domain_nr(dev->bus) &&
-                   dn->busno == dev->bus->number) {
-                       retval_dev = dev;
-                       break;
-               }
-       }
-
-       return retval_dev;
-       
-}
-int rpaphp_claim_resource(struct pci_dev *dev, int resource)
-{
-       struct resource *res = &dev->resource[resource];
-       struct resource *root = pci_find_parent_resource(dev, res);
-       char *dtype = resource < PCI_BRIDGE_RESOURCES ? "device" : "bridge";
-       int err;
-
-       err = -EINVAL;
-       if (root != NULL) {
-               err = request_resource(root, res);
-       }
-
-       if (err) {
-               err("PCI: %s region %d of %s %s [%lx:%lx]\n",
-                      root ? "Address space collision on" :
-                             "No parent found for",
-                      resource, dtype, pci_name(dev), res->start, res->end);
-       }
-
-       return err;
-}
-
-EXPORT_SYMBOL_GPL(rpaphp_find_pci_dev);
-EXPORT_SYMBOL_GPL(rpaphp_claim_resource);
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c
new file mode 100644 (file)
index 0000000..43fdb34
--- /dev/null
@@ -0,0 +1,1068 @@
+/*
+ * linux/drivers/pci/msi.c
+ */
+
+#include <linux/mm.h>
+#include <linux/irq.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/config.h>
+#include <linux/ioport.h>
+#include <linux/smp_lock.h>
+#include <linux/pci.h>
+#include <linux/proc_fs.h>
+
+#include <asm/errno.h>
+#include <asm/io.h>
+#include <asm/smp.h>
+#include <asm/desc.h>
+#include <asm/io_apic.h>
+#include <mach_apic.h>
+
+#include <linux/pci_msi.h>
+
+_DEFINE_DBG_BUFFER
+
+static spinlock_t msi_lock = SPIN_LOCK_UNLOCKED;
+static struct msi_desc* msi_desc[NR_IRQS] = { [0 ... NR_IRQS-1] = NULL };
+static kmem_cache_t* msi_cachep;
+
+static int pci_msi_enable = 1;
+static int nr_alloc_vectors = 0;
+static int nr_released_vectors = 0;
+static int nr_reserved_vectors = NR_HP_RESERVED_VECTORS;
+static int nr_msix_devices = 0;
+
+#ifndef CONFIG_X86_IO_APIC
+int vector_irq[NR_IRQS] = { [0 ... NR_IRQS -1] = -1};
+u8 irq_vector[NR_IRQS] = { FIRST_DEVICE_VECTOR , 0 };
+#endif
+
+static void msi_cache_ctor(void *p, kmem_cache_t *cache, unsigned long flags)
+{
+       memset(p, 0, NR_IRQS * sizeof(struct msi_desc));
+}
+
+static int msi_cache_init(void)
+{
+       msi_cachep = kmem_cache_create("msi_cache",
+                       NR_IRQS * sizeof(struct msi_desc),
+                       0, SLAB_HWCACHE_ALIGN, msi_cache_ctor, NULL);
+       if (!msi_cachep)
+               return -ENOMEM;
+
+       return 0;
+}
+
+static void msi_set_mask_bit(unsigned int vector, int flag)
+{
+       struct msi_desc *entry;
+
+       entry = (struct msi_desc *)msi_desc[vector];
+       if (!entry || !entry->dev || !entry->mask_base)
+               return;
+       switch (entry->msi_attrib.type) {
+       case PCI_CAP_ID_MSI:
+       {
+               int             pos;
+               unsigned int    mask_bits;
+
+               pos = entry->mask_base;
+               entry->dev->bus->ops->read(entry->dev->bus, entry->dev->devfn,
+                               pos, 4, &mask_bits);
+               mask_bits &= ~(1);
+               mask_bits |= flag;
+               entry->dev->bus->ops->write(entry->dev->bus, entry->dev->devfn,
+                               pos, 4, mask_bits);
+               break;
+       }
+       case PCI_CAP_ID_MSIX:
+       {
+               int offset = entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE +
+                       PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET;
+               writel(flag, entry->mask_base + offset);
+               break;
+       }
+       default:
+               break;
+       }
+}
+
+#ifdef CONFIG_SMP
+static void set_msi_affinity(unsigned int vector, cpumask_t cpu_mask)
+{
+       struct msi_desc *entry;
+       struct msg_address address;
+       unsigned int dest_id;
+
+       entry = (struct msi_desc *)msi_desc[vector];
+       if (!entry || !entry->dev)
+               return;
+
+       switch (entry->msi_attrib.type) {
+       case PCI_CAP_ID_MSI:
+       {
+               int pos;
+
+               if (!(pos = pci_find_capability(entry->dev, PCI_CAP_ID_MSI)))
+                       return;
+
+               entry->dev->bus->ops->read(entry->dev->bus, entry->dev->devfn,
+                       msi_lower_address_reg(pos), 4,
+                       &address.lo_address.value);
+               dest_id = (address.lo_address.u.dest_id &
+                       MSI_ADDRESS_HEADER_MASK) |
+                       (cpu_mask_to_apicid(cpu_mask) << MSI_TARGET_CPU_SHIFT);
+               address.lo_address.u.dest_id = dest_id;
+               entry->msi_attrib.current_cpu = cpu_mask_to_apicid(cpu_mask);
+               entry->dev->bus->ops->write(entry->dev->bus, entry->dev->devfn,
+                       msi_lower_address_reg(pos), 4,
+                       address.lo_address.value);
+               break;
+       }
+       case PCI_CAP_ID_MSIX:
+       {
+               int offset = entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE +
+                       PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET;
+
+               address.lo_address.value = readl(entry->mask_base + offset);
+               dest_id = (address.lo_address.u.dest_id &
+                       MSI_ADDRESS_HEADER_MASK) |
+                       (cpu_mask_to_apicid(cpu_mask) << MSI_TARGET_CPU_SHIFT);
+               address.lo_address.u.dest_id = dest_id;
+               entry->msi_attrib.current_cpu = cpu_mask_to_apicid(cpu_mask);
+               writel(address.lo_address.value, entry->mask_base + offset);
+               break;
+       }
+       default:
+               break;
+       }
+}
+
+static inline void move_msi(int vector)
+{
+       if (!cpus_empty(pending_irq_balance_cpumask[vector])) {
+               set_msi_affinity(vector, pending_irq_balance_cpumask[vector]);
+               cpus_clear(pending_irq_balance_cpumask[vector]);
+       }
+}
+#endif
+
+static void mask_MSI_irq(unsigned int vector)
+{
+       msi_set_mask_bit(vector, 1);
+}
+
+static void unmask_MSI_irq(unsigned int vector)
+{
+       msi_set_mask_bit(vector, 0);
+}
+
+static unsigned int startup_msi_irq_wo_maskbit(unsigned int vector)
+{
+       return 0;       /* never anything pending */
+}
+
+static void pci_disable_msi(unsigned int vector);
+static void shutdown_msi_irq(unsigned int vector)
+{
+       pci_disable_msi(vector);
+}
+
+#define shutdown_msi_irq_wo_maskbit    shutdown_msi_irq
+static void enable_msi_irq_wo_maskbit(unsigned int vector) {}
+static void disable_msi_irq_wo_maskbit(unsigned int vector) {}
+static void ack_msi_irq_wo_maskbit(unsigned int vector) {}
+static void end_msi_irq_wo_maskbit(unsigned int vector)
+{
+       move_msi(vector);
+       ack_APIC_irq();
+}
+
+static unsigned int startup_msi_irq_w_maskbit(unsigned int vector)
+{
+       unmask_MSI_irq(vector);
+       return 0;       /* never anything pending */
+}
+
+#define shutdown_msi_irq_w_maskbit     shutdown_msi_irq
+#define enable_msi_irq_w_maskbit       unmask_MSI_irq
+#define disable_msi_irq_w_maskbit      mask_MSI_irq
+#define ack_msi_irq_w_maskbit          mask_MSI_irq
+
+static void end_msi_irq_w_maskbit(unsigned int vector)
+{
+       move_msi(vector);
+       unmask_MSI_irq(vector);
+       ack_APIC_irq();
+}
+
+/*
+ * Interrupt Type for MSI-X PCI/PCI-X/PCI-Express Devices,
+ * which implement the MSI-X Capability Structure.
+ */
+static struct hw_interrupt_type msix_irq_type = {
+       .typename       = "PCI MSI-X",
+       .startup        = startup_msi_irq_w_maskbit,
+       .shutdown       = shutdown_msi_irq_w_maskbit,
+       .enable         = enable_msi_irq_w_maskbit,
+       .disable        = disable_msi_irq_w_maskbit,
+       .ack            = ack_msi_irq_w_maskbit,
+       .end            = end_msi_irq_w_maskbit,
+       .set_affinity   = set_msi_irq_affinity
+};
+
+/*
+ * Interrupt Type for MSI PCI/PCI-X/PCI-Express Devices,
+ * which implement the MSI Capability Structure with
+ * Mask-and-Pending Bits.
+ */
+static struct hw_interrupt_type msi_irq_w_maskbit_type = {
+       .typename       = "PCI MSI",
+       .startup        = startup_msi_irq_w_maskbit,
+       .shutdown       = shutdown_msi_irq_w_maskbit,
+       .enable         = enable_msi_irq_w_maskbit,
+       .disable        = disable_msi_irq_w_maskbit,
+       .ack            = ack_msi_irq_w_maskbit,
+       .end            = end_msi_irq_w_maskbit,
+       .set_affinity   = set_msi_irq_affinity
+};
+
+/*
+ * Interrupt Type for MSI PCI/PCI-X/PCI-Express Devices,
+ * which implement the MSI Capability Structure without
+ * Mask-and-Pending Bits.
+ */
+static struct hw_interrupt_type msi_irq_wo_maskbit_type = {
+       .typename       = "PCI MSI",
+       .startup        = startup_msi_irq_wo_maskbit,
+       .shutdown       = shutdown_msi_irq_wo_maskbit,
+       .enable         = enable_msi_irq_wo_maskbit,
+       .disable        = disable_msi_irq_wo_maskbit,
+       .ack            = ack_msi_irq_wo_maskbit,
+       .end            = end_msi_irq_wo_maskbit,
+       .set_affinity   = set_msi_irq_affinity
+};
+
+static void msi_data_init(struct msg_data *msi_data,
+                         unsigned int vector)
+{
+       memset(msi_data, 0, sizeof(struct msg_data));
+       msi_data->vector = (u8)vector;
+       msi_data->delivery_mode = MSI_DELIVERY_MODE;
+       msi_data->level = MSI_LEVEL_MODE;
+       msi_data->trigger = MSI_TRIGGER_MODE;
+}
+
+static void msi_address_init(struct msg_address *msi_address)
+{
+       unsigned int    dest_id;
+
+       memset(msi_address, 0, sizeof(struct msg_address));
+       msi_address->hi_address = (u32)0;
+       dest_id = (MSI_ADDRESS_HEADER << MSI_ADDRESS_HEADER_SHIFT) |
+                (MSI_TARGET_CPU << MSI_TARGET_CPU_SHIFT);
+       msi_address->lo_address.u.dest_mode = MSI_LOGICAL_MODE;
+       msi_address->lo_address.u.redirection_hint = MSI_REDIRECTION_HINT_MODE;
+       msi_address->lo_address.u.dest_id = dest_id;
+}
+
+static int pci_vector_resources(void)
+{
+       static int res = -EINVAL;
+       int nr_free_vectors;
+
+       if (res == -EINVAL) {
+               int i, repeat;
+               for (i = NR_REPEATS; i > 0; i--) {
+                       if ((FIRST_DEVICE_VECTOR + i * 8) > FIRST_SYSTEM_VECTOR)
+                               continue;
+                       break;
+               }
+               i++;
+               repeat = (FIRST_SYSTEM_VECTOR - FIRST_DEVICE_VECTOR)/i;
+               res = i * repeat - NR_RESERVED_VECTORS + 1;
+       }
+
+       nr_free_vectors = res + nr_released_vectors - nr_alloc_vectors;
+
+       return nr_free_vectors;
+}
+
+int assign_irq_vector(int irq)
+{
+       static int current_vector = FIRST_DEVICE_VECTOR, offset = 0;
+
+       if (irq != MSI_AUTO && IO_APIC_VECTOR(irq) > 0)
+               return IO_APIC_VECTOR(irq);
+next:
+       current_vector += 8;
+       if (current_vector == SYSCALL_VECTOR)
+               goto next;
+
+       if (current_vector > FIRST_SYSTEM_VECTOR) {
+               offset++;
+               current_vector = FIRST_DEVICE_VECTOR + offset;
+       }
+
+       if (current_vector == FIRST_SYSTEM_VECTOR)
+               return -ENOSPC;
+
+       vector_irq[current_vector] = irq;
+       if (irq != MSI_AUTO)
+               IO_APIC_VECTOR(irq) = current_vector;
+
+       nr_alloc_vectors++;
+
+       return current_vector;
+}
+
+static int assign_msi_vector(void)
+{
+       static int new_vector_avail = 1;
+       int vector;
+       unsigned long flags;
+
+       /*
+        * msi_lock is provided to ensure that successful allocation of MSI
+        * vector is assigned unique among drivers.
+        */
+       spin_lock_irqsave(&msi_lock, flags);
+       if (!(pci_vector_resources() > 0)) {
+               spin_unlock_irqrestore(&msi_lock, flags);
+               return -EBUSY;
+       }
+
+       if (!new_vector_avail) {
+               /*
+                * vector_irq[] = -1 indicates that this specific vector is:
+                * - assigned for MSI (since MSI have no associated IRQ) or
+                * - assigned for legacy if less than 16, or
+                * - having no corresponding 1:1 vector-to-IOxAPIC IRQ mapping
+                * vector_irq[] = 0 indicates that this vector, previously
+                * assigned for MSI, is freed by hotplug removed operations.
+                * This vector will be reused for any subsequent hotplug added
+                * operations.
+                * vector_irq[] > 0 indicates that this vector is assigned for
+                * IOxAPIC IRQs. This vector and its value provides a 1-to-1
+                * vector-to-IOxAPIC IRQ mapping.
+                */
+               for (vector = FIRST_DEVICE_VECTOR; vector < NR_IRQS; vector++) {
+                       if (vector_irq[vector] != 0)
+                               continue;
+                       vector_irq[vector] = -1;
+                       nr_released_vectors--;
+                       spin_unlock_irqrestore(&msi_lock, flags);
+                       return vector;
+               }
+               spin_unlock_irqrestore(&msi_lock, flags);
+               return -EBUSY;
+       }
+
+       vector = assign_irq_vector(MSI_AUTO);
+       if (vector  == (FIRST_SYSTEM_VECTOR - 8))
+               new_vector_avail = 0;
+
+       spin_unlock_irqrestore(&msi_lock, flags);
+       return vector;
+}
+
+static int get_new_vector(void)
+{
+       int vector;
+
+       if ((vector = assign_msi_vector()) > 0)
+               set_intr_gate(vector, interrupt[vector]);
+
+       return vector;
+}
+
+static int msi_init(void)
+{
+       static int status = -ENOMEM;
+
+       if (!status)
+               return status;
+
+       if ((status = msi_cache_init()) < 0) {
+               pci_msi_enable = 0;
+               printk(KERN_INFO "WARNING: MSI INIT FAILURE\n");
+               return status;
+       }
+       printk(KERN_INFO "MSI INIT SUCCESS\n");
+
+       return status;
+}
+
+static int get_msi_vector(struct pci_dev *dev)
+{
+       return get_new_vector();
+}
+
+static struct msi_desc* alloc_msi_entry(void)
+{
+       struct msi_desc *entry;
+
+       entry = (struct msi_desc*) kmem_cache_alloc(msi_cachep, SLAB_KERNEL);
+       if (!entry)
+               return NULL;
+
+       memset(entry, 0, sizeof(struct msi_desc));
+       entry->link.tail = entry->link.head = 0;        /* single message */
+       entry->dev = NULL;
+
+       return entry;
+}
+
+static void attach_msi_entry(struct msi_desc *entry, int vector)
+{
+       unsigned long flags;
+
+       spin_lock_irqsave(&msi_lock, flags);
+       msi_desc[vector] = entry;
+       spin_unlock_irqrestore(&msi_lock, flags);
+}
+
+static void irq_handler_init(int cap_id, int pos, int mask)
+{
+       spin_lock(&irq_desc[pos].lock);
+       if (cap_id == PCI_CAP_ID_MSIX)
+               irq_desc[pos].handler = &msix_irq_type;
+       else {
+               if (!mask)
+                       irq_desc[pos].handler = &msi_irq_wo_maskbit_type;
+               else
+                       irq_desc[pos].handler = &msi_irq_w_maskbit_type;
+       }
+       spin_unlock(&irq_desc[pos].lock);
+}
+
+static void enable_msi_mode(struct pci_dev *dev, int pos, int type)
+{
+       u32 control;
+
+       dev->bus->ops->read(dev->bus, dev->devfn,
+               msi_control_reg(pos), 2, &control);
+       if (type == PCI_CAP_ID_MSI) {
+               /* Set enabled bits to single MSI & enable MSI_enable bit */
+               msi_enable(control, 1);
+               dev->bus->ops->write(dev->bus, dev->devfn,
+                       msi_control_reg(pos), 2, control);
+       } else {
+               msix_enable(control);
+               dev->bus->ops->write(dev->bus, dev->devfn,
+                       msi_control_reg(pos), 2, control);
+       }
+       if (pci_find_capability(dev, PCI_CAP_ID_EXP)) {
+               /* PCI Express Endpoint device detected */
+               u32 cmd;
+               dev->bus->ops->read(dev->bus, dev->devfn, PCI_COMMAND, 2, &cmd);
+               cmd |= PCI_COMMAND_INTX_DISABLE;
+               dev->bus->ops->write(dev->bus, dev->devfn, PCI_COMMAND, 2, cmd);
+       }
+}
+
+static void disable_msi_mode(struct pci_dev *dev, int pos, int type)
+{
+       u32 control;
+
+       dev->bus->ops->read(dev->bus, dev->devfn,
+               msi_control_reg(pos), 2, &control);
+       if (type == PCI_CAP_ID_MSI) {
+               /* Set enabled bits to single MSI & enable MSI_enable bit */
+               msi_disable(control);
+               dev->bus->ops->write(dev->bus, dev->devfn,
+                       msi_control_reg(pos), 2, control);
+       } else {
+               msix_disable(control);
+               dev->bus->ops->write(dev->bus, dev->devfn,
+                       msi_control_reg(pos), 2, control);
+       }
+       if (pci_find_capability(dev, PCI_CAP_ID_EXP)) {
+               /* PCI Express Endpoint device detected */
+               u32 cmd;
+               dev->bus->ops->read(dev->bus, dev->devfn, PCI_COMMAND, 2, &cmd);
+               cmd &= ~PCI_COMMAND_INTX_DISABLE;
+               dev->bus->ops->write(dev->bus, dev->devfn, PCI_COMMAND, 2, cmd);
+       }
+}
+
+static int msi_lookup_vector(struct pci_dev *dev)
+{
+       int vector;
+       unsigned long flags;
+
+       spin_lock_irqsave(&msi_lock, flags);
+       for (vector = FIRST_DEVICE_VECTOR; vector < NR_IRQS; vector++) {
+               if (!msi_desc[vector] || msi_desc[vector]->dev != dev ||
+                       msi_desc[vector]->msi_attrib.entry_nr ||
+                       msi_desc[vector]->msi_attrib.default_vector != dev->irq)
+                       continue;       /* not entry 0, skip */
+               spin_unlock_irqrestore(&msi_lock, flags);
+               /* This pre-assigned entry-0 MSI vector for this device
+                  already exits. Override dev->irq with this vector */
+               dev->irq = vector;
+               return 0;
+       }
+       spin_unlock_irqrestore(&msi_lock, flags);
+
+       return -EACCES;
+}
+
+void pci_scan_msi_device(struct pci_dev *dev)
+{
+       if (!dev)
+               return;
+
+       if (pci_find_capability(dev, PCI_CAP_ID_MSIX) > 0) {
+               nr_reserved_vectors++;
+               nr_msix_devices++;
+       } else if (pci_find_capability(dev, PCI_CAP_ID_MSI) > 0)
+               nr_reserved_vectors++;
+}
+
+/**
+ * msi_capability_init - configure device's MSI capability structure
+ * @dev: pointer to the pci_dev data structure of MSI device function
+ *
+ * Setup the MSI capability structure of device funtion with a single
+ * MSI vector, regardless of device function is capable of handling
+ * multiple messages. A return of zero indicates the successful setup
+ * of an entry zero with the new MSI vector or non-zero for otherwise.
+ **/
+static int msi_capability_init(struct pci_dev *dev)
+{
+       struct msi_desc *entry;
+       struct msg_address address;
+       struct msg_data data;
+       int pos, vector;
+       u32 control;
+
+       pos = pci_find_capability(dev, PCI_CAP_ID_MSI);
+       if (!pos)
+               return -EINVAL;
+
+       dev->bus->ops->read(dev->bus, dev->devfn, msi_control_reg(pos),
+               2, &control);
+       if (control & PCI_MSI_FLAGS_ENABLE)
+               return 0;
+
+       if (!msi_lookup_vector(dev)) {
+               /* Lookup Sucess */
+               enable_msi_mode(dev, pos, PCI_CAP_ID_MSI);
+               return 0;
+       }
+       /* MSI Entry Initialization */
+       if (!(entry = alloc_msi_entry()))
+               return -ENOMEM;
+
+       if ((vector = get_msi_vector(dev)) < 0) {
+               kmem_cache_free(msi_cachep, entry);
+               return -EBUSY;
+       }
+       entry->msi_attrib.type = PCI_CAP_ID_MSI;
+       entry->msi_attrib.entry_nr = 0;
+       entry->msi_attrib.maskbit = is_mask_bit_support(control);
+       entry->msi_attrib.default_vector = dev->irq;
+       dev->irq = vector;      /* save default pre-assigned ioapic vector */
+       entry->dev = dev;
+       if (is_mask_bit_support(control)) {
+               entry->mask_base = msi_mask_bits_reg(pos,
+                               is_64bit_address(control));
+       }
+       /* Replace with MSI handler */
+       irq_handler_init(PCI_CAP_ID_MSI, vector, entry->msi_attrib.maskbit);
+       /* Configure MSI capability structure */
+       msi_address_init(&address);
+       msi_data_init(&data, vector);
+       entry->msi_attrib.current_cpu = ((address.lo_address.u.dest_id >>
+                               MSI_TARGET_CPU_SHIFT) & MSI_TARGET_CPU_MASK);
+       dev->bus->ops->write(dev->bus, dev->devfn, msi_lower_address_reg(pos),
+                               4, address.lo_address.value);
+       if (is_64bit_address(control)) {
+               dev->bus->ops->write(dev->bus, dev->devfn,
+                       msi_upper_address_reg(pos), 4, address.hi_address);
+               dev->bus->ops->write(dev->bus, dev->devfn,
+                       msi_data_reg(pos, 1), 2, *((u32*)&data));
+       } else
+               dev->bus->ops->write(dev->bus, dev->devfn,
+                       msi_data_reg(pos, 0), 2, *((u32*)&data));
+       if (entry->msi_attrib.maskbit) {
+               unsigned int maskbits, temp;
+               /* All MSIs are unmasked by default, Mask them all */
+               dev->bus->ops->read(dev->bus, dev->devfn,
+                       msi_mask_bits_reg(pos, is_64bit_address(control)), 4,
+                       &maskbits);
+               temp = (1 << multi_msi_capable(control));
+               temp = ((temp - 1) & ~temp);
+               maskbits |= temp;
+               dev->bus->ops->write(dev->bus, dev->devfn,
+                       msi_mask_bits_reg(pos, is_64bit_address(control)), 4,
+                       maskbits);
+       }
+       attach_msi_entry(entry, vector);
+       /* Set MSI enabled bits  */
+       enable_msi_mode(dev, pos, PCI_CAP_ID_MSI);
+
+       return 0;
+}
+
+/**
+ * msix_capability_init - configure device's MSI-X capability
+ * @dev: pointer to the pci_dev data structure of MSI-X device function
+ *
+ * Setup the MSI-X capability structure of device funtion with a
+ * single MSI-X vector. A return of zero indicates the successful setup
+ * of an entry zero with the new MSI-X vector or non-zero for otherwise.
+ * To request for additional MSI-X vectors, the device drivers are
+ * required to utilize the following supported APIs:
+ * 1) msi_alloc_vectors(...) for requesting one or more MSI-X vectors
+ * 2) msi_free_vectors(...) for releasing one or more MSI-X vectors
+ *    back to PCI subsystem before calling free_irq(...)
+ **/
+static int msix_capability_init(struct pci_dev *dev)
+{
+       struct msi_desc *entry;
+       struct msg_address address;
+       struct msg_data data;
+       int vector = 0, pos, dev_msi_cap;
+       u32 phys_addr, table_offset;
+       u32 control;
+       u8 bir;
+       void *base;
+
+       pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
+       if (!pos)
+               return -EINVAL;
+
+       /* Request & Map MSI-X table region */
+       dev->bus->ops->read(dev->bus, dev->devfn, msi_control_reg(pos), 2,
+               &control);
+       if (control & PCI_MSIX_FLAGS_ENABLE)
+               return 0;
+
+       if (!msi_lookup_vector(dev)) {
+               /* Lookup Sucess */
+               enable_msi_mode(dev, pos, PCI_CAP_ID_MSIX);
+               return 0;
+       }
+
+       dev_msi_cap = multi_msix_capable(control);
+       dev->bus->ops->read(dev->bus, dev->devfn,
+               msix_table_offset_reg(pos), 4, &table_offset);
+       bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
+       phys_addr = pci_resource_start (dev, bir);
+       phys_addr += (u32)(table_offset & ~PCI_MSIX_FLAGS_BIRMASK);
+       if (!request_mem_region(phys_addr,
+               dev_msi_cap * PCI_MSIX_ENTRY_SIZE,
+               "MSI-X iomap Failure"))
+               return -ENOMEM;
+       base = ioremap_nocache(phys_addr, dev_msi_cap * PCI_MSIX_ENTRY_SIZE);
+       if (base == NULL)
+               goto free_region;
+       /* MSI Entry Initialization */
+       entry = alloc_msi_entry();
+       if (!entry)
+               goto free_iomap;
+       if ((vector = get_msi_vector(dev)) < 0)
+               goto free_entry;
+
+       entry->msi_attrib.type = PCI_CAP_ID_MSIX;
+       entry->msi_attrib.entry_nr = 0;
+       entry->msi_attrib.maskbit = 1;
+       entry->msi_attrib.default_vector = dev->irq;
+       dev->irq = vector;      /* save default pre-assigned ioapic vector */
+       entry->dev = dev;
+       entry->mask_base = (unsigned long)base;
+       /* Replace with MSI handler */
+       irq_handler_init(PCI_CAP_ID_MSIX, vector, 1);
+       /* Configure MSI-X capability structure */
+       msi_address_init(&address);
+       msi_data_init(&data, vector);
+       entry->msi_attrib.current_cpu = ((address.lo_address.u.dest_id >>
+                               MSI_TARGET_CPU_SHIFT) & MSI_TARGET_CPU_MASK);
+       writel(address.lo_address.value, base + PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET);
+       writel(address.hi_address, base + PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET);
+       writel(*(u32*)&data, base + PCI_MSIX_ENTRY_DATA_OFFSET);
+       /* Initialize all entries from 1 up to 0 */
+       for (pos = 1; pos < dev_msi_cap; pos++) {
+               writel(0, base + pos * PCI_MSIX_ENTRY_SIZE +
+                       PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET);
+               writel(0, base + pos * PCI_MSIX_ENTRY_SIZE +
+                       PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET);
+               writel(0, base + pos * PCI_MSIX_ENTRY_SIZE +
+                       PCI_MSIX_ENTRY_DATA_OFFSET);
+       }
+       attach_msi_entry(entry, vector);
+       /* Set MSI enabled bits  */
+       enable_msi_mode(dev, pos, PCI_CAP_ID_MSIX);
+
+       return 0;
+
+free_entry:
+       kmem_cache_free(msi_cachep, entry);
+free_iomap:
+       iounmap(base);
+free_region:
+       release_mem_region(phys_addr, dev_msi_cap * PCI_MSIX_ENTRY_SIZE);
+
+       return ((vector < 0) ? -EBUSY : -ENOMEM);
+}
+
+/**
+ * pci_enable_msi - configure device's MSI(X) capability structure
+ * @dev: pointer to the pci_dev data structure of MSI(X) device function
+ *
+ * Setup the MSI/MSI-X capability structure of device function with
+ * a single MSI(X) vector upon its software driver call to request for
+ * MSI(X) mode enabled on its hardware device function. A return of zero
+ * indicates the successful setup of an entry zero with the new MSI(X)
+ * vector or non-zero for otherwise.
+ **/
+int pci_enable_msi(struct pci_dev* dev)
+{
+       int status = -EINVAL;
+
+       if (!pci_msi_enable || !dev)
+               return status;
+
+       if (msi_init() < 0)
+               return -ENOMEM;
+
+       if ((status = msix_capability_init(dev)) == -EINVAL)
+               status = msi_capability_init(dev);
+       if (!status)
+               nr_reserved_vectors--;
+
+       return status;
+}
+
+static int msi_free_vector(struct pci_dev* dev, int vector);
+static void pci_disable_msi(unsigned int vector)
+{
+       int head, tail, type, default_vector;
+       struct msi_desc *entry;
+       struct pci_dev *dev;
+       unsigned long flags;
+
+       spin_lock_irqsave(&msi_lock, flags);
+       entry = msi_desc[vector];
+       if (!entry || !entry->dev) {
+               spin_unlock_irqrestore(&msi_lock, flags);
+               return;
+       }
+       dev = entry->dev;
+       type = entry->msi_attrib.type;
+       head = entry->link.head;
+       tail = entry->link.tail;
+       default_vector = entry->msi_attrib.default_vector;
+       spin_unlock_irqrestore(&msi_lock, flags);
+
+       disable_msi_mode(dev, pci_find_capability(dev, type), type);
+       /* Restore dev->irq to its default pin-assertion vector */
+       dev->irq = default_vector;
+       if (type == PCI_CAP_ID_MSIX && head != tail) {
+               /* Bad driver, which do not call msi_free_vectors before exit.
+                  We must do a cleanup here */
+               while (1) {
+                       spin_lock_irqsave(&msi_lock, flags);
+                       entry = msi_desc[vector];
+                       head = entry->link.head;
+                       tail = entry->link.tail;
+                       spin_unlock_irqrestore(&msi_lock, flags);
+                       if (tail == head)
+                               break;
+                       if (msi_free_vector(dev, entry->link.tail))
+                               break;
+               }
+       }
+}
+
+static int msi_alloc_vector(struct pci_dev* dev, int head)
+{
+       struct msi_desc *entry;
+       struct msg_address address;
+       struct msg_data data;
+       int i, offset, pos, dev_msi_cap, vector;
+       u32 low_address, control;
+       unsigned long base = 0L;
+       unsigned long flags;
+
+       spin_lock_irqsave(&msi_lock, flags);
+       entry = msi_desc[dev->irq];
+       if (!entry) {
+               spin_unlock_irqrestore(&msi_lock, flags);
+               return -EINVAL;
+       }
+       base = entry->mask_base;
+       spin_unlock_irqrestore(&msi_lock, flags);
+
+       pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
+       dev->bus->ops->read(dev->bus, dev->devfn, msi_control_reg(pos),
+               2, &control);
+       dev_msi_cap = multi_msix_capable(control);
+       for (i = 1; i < dev_msi_cap; i++) {
+               if (!(low_address = readl(base + i * PCI_MSIX_ENTRY_SIZE)))
+                        break;
+       }
+       if (i >= dev_msi_cap)
+               return -EINVAL;
+
+       /* MSI Entry Initialization */
+       if (!(entry = alloc_msi_entry()))
+               return -ENOMEM;
+
+       if ((vector = get_new_vector()) < 0) {
+               kmem_cache_free(msi_cachep, entry);
+               return vector;
+       }
+       entry->msi_attrib.type = PCI_CAP_ID_MSIX;
+       entry->msi_attrib.entry_nr = i;
+       entry->msi_attrib.maskbit = 1;
+       entry->dev = dev;
+       entry->link.head = head;
+       entry->mask_base = base;
+       irq_handler_init(PCI_CAP_ID_MSIX, vector, 1);
+       /* Configure MSI-X capability structure */
+       msi_address_init(&address);
+       msi_data_init(&data, vector);
+       entry->msi_attrib.current_cpu = ((address.lo_address.u.dest_id >>
+                               MSI_TARGET_CPU_SHIFT) & MSI_TARGET_CPU_MASK);
+       offset = entry->msi_attrib.entry_nr * PCI_MSIX_ENTRY_SIZE;
+       writel(address.lo_address.value, base + offset +
+               PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET);
+       writel(address.hi_address, base + offset +
+               PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET);
+       writel(*(u32*)&data, base + offset + PCI_MSIX_ENTRY_DATA_OFFSET);
+       writel(1, base + offset + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET);
+       attach_msi_entry(entry, vector);
+
+       return vector;
+}
+
+static int msi_free_vector(struct pci_dev* dev, int vector)
+{
+       struct msi_desc *entry;
+       int entry_nr, type;
+       unsigned long base = 0L;
+       unsigned long flags;
+
+       spin_lock_irqsave(&msi_lock, flags);
+       entry = msi_desc[vector];
+       if (!entry || entry->dev != dev) {
+               spin_unlock_irqrestore(&msi_lock, flags);
+               return -EINVAL;
+       }
+       type = entry->msi_attrib.type;
+       entry_nr = entry->msi_attrib.entry_nr;
+       base = entry->mask_base;
+       if (entry->link.tail != entry->link.head) {
+               msi_desc[entry->link.head]->link.tail = entry->link.tail;
+               if (entry->link.tail)
+                       msi_desc[entry->link.tail]->link.head = entry->link.head;
+       }
+       entry->dev = NULL;
+       vector_irq[vector] = 0;
+       nr_released_vectors++;
+       msi_desc[vector] = NULL;
+       spin_unlock_irqrestore(&msi_lock, flags);
+
+       kmem_cache_free(msi_cachep, entry);
+       if (type == PCI_CAP_ID_MSIX) {
+               int offset;
+
+               offset = entry_nr * PCI_MSIX_ENTRY_SIZE;
+               writel(1, base + offset + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET);
+               writel(0, base + offset + PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET);
+       }
+
+       return 0;
+}
+
+/**
+ * msi_alloc_vectors - allocate additional MSI-X vectors
+ * @dev: pointer to the pci_dev data structure of MSI-X device function
+ * @vector: pointer to an array of new allocated MSI-X vectors
+ * @nvec: number of MSI-X vectors requested for allocation by device driver
+ *
+ * Allocate additional MSI-X vectors requested by device driver. A
+ * return of zero indicates the successful setup of MSI-X capability
+ * structure with new allocated MSI-X vectors or non-zero for otherwise.
+ **/
+int msi_alloc_vectors(struct pci_dev* dev, int *vector, int nvec)
+{
+       struct msi_desc *entry;
+       int i, head, pos, vec, free_vectors, alloc_vectors;
+       int *vectors = (int *)vector;
+       u32 control;
+       unsigned long flags;
+
+       if (!pci_msi_enable || !dev)
+               return -EINVAL;
+
+       if (!(pos = pci_find_capability(dev, PCI_CAP_ID_MSIX)))
+               return -EINVAL;
+
+       dev->bus->ops->read(dev->bus, dev->devfn, msi_control_reg(pos),                         2, &control);
+       if (nvec > multi_msix_capable(control))
+               return -EINVAL;
+
+       spin_lock_irqsave(&msi_lock, flags);
+       entry = msi_desc[dev->irq];
+       if (!entry || entry->dev != dev ||              /* legal call */
+          entry->msi_attrib.type != PCI_CAP_ID_MSIX || /* must be MSI-X */
+          entry->link.head != entry->link.tail) {      /* already multi */
+               spin_unlock_irqrestore(&msi_lock, flags);
+               return -EINVAL;
+       }
+       /*
+        * msi_lock is provided to ensure that enough vectors resources are
+        * available before granting.
+        */
+       free_vectors = pci_vector_resources();
+       /* Ensure that each MSI/MSI-X device has one vector reserved by
+          default to avoid any MSI-X driver to take all available
+          resources */
+       free_vectors -= nr_reserved_vectors;
+       /* Find the average of free vectors among MSI-X devices */
+       if (nr_msix_devices > 0)
+               free_vectors /= nr_msix_devices;
+       spin_unlock_irqrestore(&msi_lock, flags);
+
+       if (nvec > free_vectors)
+               return -EBUSY;
+
+       alloc_vectors = 0;
+       head = dev->irq;
+       for (i = 0; i < nvec; i++) {
+               if ((vec = msi_alloc_vector(dev, head)) < 0)
+                       break;
+               *(vectors + i) = vec;
+               head = vec;
+               alloc_vectors++;
+       }
+       if (alloc_vectors != nvec) {
+               for (i = 0; i < alloc_vectors; i++) {
+                       vec = *(vectors + i);
+                       msi_free_vector(dev, vec);
+               }
+               spin_lock_irqsave(&msi_lock, flags);
+               msi_desc[dev->irq]->link.tail = msi_desc[dev->irq]->link.head;
+               spin_unlock_irqrestore(&msi_lock, flags);
+               return -EBUSY;
+       }
+       if (nr_msix_devices > 0)
+               nr_msix_devices--;
+
+       return 0;
+}
+
+/**
+ * msi_free_vectors - reclaim MSI-X vectors to unused state
+ * @dev: pointer to the pci_dev data structure of MSI-X device function
+ * @vector: pointer to an array of released MSI-X vectors
+ * @nvec: number of MSI-X vectors requested for release by device driver
+ *
+ * Reclaim MSI-X vectors released by device driver to unused state,
+ * which may be used later on. A return of zero indicates the
+ * success or non-zero for otherwise. Device driver should call this
+ * before calling function free_irq.
+ **/
+int msi_free_vectors(struct pci_dev* dev, int *vector, int nvec)
+{
+       struct msi_desc *entry;
+       int i;
+       unsigned long flags;
+
+       if (!pci_msi_enable)
+               return -EINVAL;
+
+       spin_lock_irqsave(&msi_lock, flags);
+       entry = msi_desc[dev->irq];
+       if (!entry || entry->dev != dev ||
+               entry->msi_attrib.type != PCI_CAP_ID_MSIX ||
+               entry->link.head == entry->link.tail) { /* Nothing to free */
+               spin_unlock_irqrestore(&msi_lock, flags);
+               return -EINVAL;
+       }
+       spin_unlock_irqrestore(&msi_lock, flags);
+
+       for (i = 0; i < nvec; i++) {
+               if (*(vector + i) == dev->irq)
+                       continue;/* Don't free entry 0 if mistaken by driver */
+               msi_free_vector(dev, *(vector + i));
+       }
+
+       return 0;
+}
+
+/**
+ * msi_remove_pci_irq_vectors - reclaim MSI(X) vectors to unused state
+ * @dev: pointer to the pci_dev data structure of MSI(X) device function
+ *
+ * Being called during hotplug remove, from which the device funciton
+ * is hot-removed. All previous assigned MSI/MSI-X vectors, if
+ * allocated for this device function, are reclaimed to unused state,
+ * which may be used later on.
+ **/
+void msi_remove_pci_irq_vectors(struct pci_dev* dev)
+{
+       struct msi_desc *entry;
+       int type, temp;
+       unsigned long flags;
+
+       if (!pci_msi_enable || !dev)
+               return;
+
+       if (!pci_find_capability(dev, PCI_CAP_ID_MSI)) {
+               if (!pci_find_capability(dev, PCI_CAP_ID_MSIX))
+                       return;
+       }
+       temp = dev->irq;
+       if (msi_lookup_vector(dev))
+               return;
+
+       spin_lock_irqsave(&msi_lock, flags);
+       entry = msi_desc[dev->irq];
+       if (!entry || entry->dev != dev) {
+               spin_unlock_irqrestore(&msi_lock, flags);
+               return;
+       }
+       type = entry->msi_attrib.type;
+       spin_unlock_irqrestore(&msi_lock, flags);
+
+       msi_free_vector(dev, dev->irq);
+       if (type == PCI_CAP_ID_MSIX) {
+               int i, pos, dev_msi_cap;
+               u32 phys_addr, table_offset;
+               u32 control;
+               u8 bir;
+
+               pos = pci_find_capability(dev, PCI_CAP_ID_MSIX);
+               dev->bus->ops->read(dev->bus, dev->devfn, msi_control_reg(pos),                         2, &control);
+               dev_msi_cap = multi_msix_capable(control);
+               dev->bus->ops->read(dev->bus, dev->devfn,
+                       msix_table_offset_reg(pos), 4, &table_offset);
+               bir = (u8)(table_offset & PCI_MSIX_FLAGS_BIRMASK);
+               phys_addr = pci_resource_start (dev, bir);
+               phys_addr += (u32)(table_offset & ~PCI_MSIX_FLAGS_BIRMASK);
+               for (i = FIRST_DEVICE_VECTOR; i < NR_IRQS; i++) {
+                       spin_lock_irqsave(&msi_lock, flags);
+                       if (!msi_desc[i] || msi_desc[i]->dev != dev) {
+                               spin_unlock_irqrestore(&msi_lock, flags);
+                               continue;
+                       }
+                       spin_unlock_irqrestore(&msi_lock, flags);
+                       msi_free_vector(dev, i);
+               }
+               writel(1, entry->mask_base + PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET);
+               iounmap((void*)entry->mask_base);
+               release_mem_region(phys_addr, dev_msi_cap * PCI_MSIX_ENTRY_SIZE);
+       }
+       dev->irq = temp;
+       nr_reserved_vectors++;
+}
+
+EXPORT_SYMBOL(pci_enable_msi);
+EXPORT_SYMBOL(msi_alloc_vectors);
+EXPORT_SYMBOL(msi_free_vectors);
index b8b47e8..f9af11a 100644 (file)
@@ -15,7 +15,6 @@
 
 #include <linux/config.h>
 #include <linux/kernel.h>
-#include <linux/stat.h>
 #include <linux/pci.h>
 #include <linux/stat.h>
 
index 911c20f..24aa2cb 100644 (file)
                10b7 2000  3C998-T Dual Port 10/100/1000 PCI-X
                10b7 3000  3C999-T Quad Port 10/100/1000 PCI-X
                1166 1648  NetXtreme CIOB-E 1000Base-T
+       1649  NetXtreme BCM5704S Gigabit Ethernet
        164d  NetXtreme BCM5702FE Gigabit Ethernet
        1653  NetXtreme BCM5705 Gigabit Ethernet
        1654  NetXtreme BCM5705 Gigabit Ethernet
        165d  NetXtreme BCM5705M Gigabit Ethernet
        165e  NetXtreme BCM5705M Gigabit Ethernet
+       166e  NetXtreme BCM5705F Gigabit Ethernet
        1696  NetXtreme BCM5782 Gigabit Ethernet
                14e4 000d  NetXtreme BCM5782 1000Base-T
        169c  NetXtreme BCM5788 Gigabit Ethernet
index 8354864..9c91eaf 100644 (file)
@@ -25,39 +25,6 @@ EXPORT_SYMBOL(pci_root_buses);
 LIST_HEAD(pci_devices);
 
 /*
- * PCI Bus Class
- */
-static void release_pcibus_dev(struct class_device *class_dev)
-{
-       struct pci_bus *pci_bus = to_pci_bus(class_dev);
-       if (pci_bus->bridge)
-               put_device(pci_bus->bridge);
-       kfree(pci_bus);
-}
-
-static struct class pcibus_class = {
-       .name           = "pci_bus",
-       .release        = &release_pcibus_dev,
-};
-
-static int __init pcibus_class_init(void)
-{
-       return class_register(&pcibus_class);
-}
-postcore_initcall(pcibus_class_init);
-
-/*
- * PCI Bus Class Devices
- */
-static ssize_t pci_bus_show_cpuaffinity(struct class_device *class_dev, char *buf)
-{
-       struct pci_bus *pcibus = to_pci_bus(class_dev);
-
-       return sprintf(buf, "%lx\n", (unsigned long)pcibus_to_cpumask(pcibus->number));
-}
-static CLASS_DEVICE_ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpuaffinity, NULL);
-
-/*
  * Translate the low bits of the PCI base
  * to the resource type
  */
@@ -209,7 +176,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child)
                limit |= (io_limit_hi << 16);
        }
 
-       if (base <= limit) {
+       if (base && base <= limit) {
                res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO;
                res->start = base;
                res->end = limit + 0xfff;
@@ -271,40 +238,37 @@ static struct pci_bus * __devinit
 pci_alloc_child_bus(struct pci_bus *parent, struct pci_dev *bridge, int busnr)
 {
        struct pci_bus *child;
-       int i;
 
        /*
         * Allocate a new bus, and inherit stuff from the parent..
         */
        child = pci_alloc_bus();
-       if (!child)
-               return NULL;
 
-       child->self = bridge;
-       child->parent = parent;
-       child->ops = parent->ops;
-       child->sysdata = parent->sysdata;
-       child->bridge = get_device(&bridge->dev);
+       if (child) {
+               int i;
 
-       child->class_dev.class = &pcibus_class;
-       sprintf(child->class_dev.class_id, "%04x:%02x", pci_domain_nr(child), busnr);
-       class_device_register(&child->class_dev);
-       class_device_create_file(&child->class_dev, &class_device_attr_cpuaffinity);
+               child->self = bridge;
+               child->parent = parent;
+               child->ops = parent->ops;
+               child->sysdata = parent->sysdata;
+               child->dev = &bridge->dev;
 
-       /*
-        * Set up the primary, secondary and subordinate
-        * bus numbers.
-        */
-       child->number = child->secondary = busnr;
-       child->primary = parent->secondary;
-       child->subordinate = 0xff;
-
-       /* Set up default resource pointers and names.. */
-       for (i = 0; i < 4; i++) {
-               child->resource[i] = &bridge->resource[PCI_BRIDGE_RESOURCES+i];
-               child->resource[i]->name = child->name;
+               /*
+                * Set up the primary, secondary and subordinate
+                * bus numbers.
+                */
+               child->number = child->secondary = busnr;
+               child->primary = parent->secondary;
+               child->subordinate = 0xff;
+
+               /* Set up default resource pointers and names.. */
+               for (i = 0; i < 4; i++) {
+                       child->resource[i] = &bridge->resource[PCI_BRIDGE_RESOURCES+i];
+                       child->resource[i]->name = child->name;
+               }
+
+               bridge->subordinate = child;
        }
-       bridge->subordinate = child;
 
        return child;
 }
@@ -343,17 +307,18 @@ int __devinit pci_scan_bridge(struct pci_bus *bus, struct pci_dev * dev, int max
            pci_name(dev), buses & 0xffffff, pass);
 
        if ((buses & 0xffff00) && !pcibios_assign_all_busses() && !is_cardbus) {
-               unsigned int cmax, busnr;
+               unsigned int cmax;
                /*
                 * Bus already configured by firmware, process it in the first
                 * pass and just note the configuration.
                 */
                if (pass)
                        return max;
-               busnr = (buses >> 8) & 0xFF;
-               child = pci_alloc_child_bus(bus, dev, busnr);
+               child = pci_alloc_child_bus(bus, dev, 0);
                child->primary = buses & 0xFF;
+               child->secondary = (buses >> 8) & 0xFF;
                child->subordinate = (buses >> 16) & 0xFF;
+               child->number = child->secondary;
                cmax = pci_scan_child_bus(child);
                if (cmax > max) max = cmax;
        } else {
@@ -543,7 +508,7 @@ pci_scan_device(struct pci_bus *bus, int devfn)
        memset(dev, 0, sizeof(struct pci_dev));
        dev->bus = bus;
        dev->sysdata = bus->sysdata;
-       dev->dev.parent = bus->bridge;
+       dev->dev.parent = bus->dev;
        dev->dev.bus = &pci_bus_type;
        dev->devfn = devfn;
        dev->hdr_type = hdr_type & 0x7f;
@@ -587,6 +552,7 @@ int __devinit pci_scan_slot(struct pci_bus *bus, int devfn)
                struct pci_dev *dev;
 
                dev = pci_scan_device(bus, devfn);
+               pci_scan_msi_device(dev);
                if (func == 0) {
                        if (!dev)
                                break;
@@ -669,14 +635,13 @@ unsigned int __devinit pci_do_scan_bus(struct pci_bus *bus)
 struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata)
 {
        struct pci_bus *b;
-       struct device *dev;
 
        b = pci_alloc_bus();
        if (!b)
                return NULL;
 
-       dev = kmalloc(sizeof(*dev), GFP_KERNEL);
-       if (!dev){
+       b->dev = kmalloc(sizeof(*(b->dev)),GFP_KERNEL);
+       if (!b->dev){
                kfree(b);
                return NULL;
        }
@@ -687,24 +652,17 @@ struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus,
        if (pci_find_bus(pci_domain_nr(b), bus)) {
                /* If we already got to this bus through a different bridge, ignore it */
                DBG("PCI: Bus %02x already known\n", bus);
-               kfree(dev);
+               kfree(b->dev);
                kfree(b);
                return NULL;
        }
-       list_add_tail(&b->node, &pci_root_buses);
-
-       memset(dev, 0, sizeof(*dev));
-       dev->parent = parent;
-       sprintf(dev->bus_id, "pci%04x:%02x", pci_domain_nr(b), bus);
-       device_register(dev);
-       b->bridge = get_device(dev);
 
-       b->class_dev.class = &pcibus_class;
-       sprintf(b->class_dev.class_id, "%04x:%02x", pci_domain_nr(b), bus);
-       class_device_register(&b->class_dev);
-       class_device_create_file(&b->class_dev, &class_device_attr_cpuaffinity);
+       list_add_tail(&b->node, &pci_root_buses);
 
-       sysfs_create_link(&b->class_dev.kobj, &b->bridge->kobj, "bridge");
+       memset(b->dev,0,sizeof(*(b->dev)));
+       b->dev->parent = parent;
+       sprintf(b->dev->bus_id,"pci%04x:%02x", pci_domain_nr(b), bus);
+       device_register(b->dev);
 
        b->number = b->secondary = bus;
        b->resource[0] = &ioport_resource;
index 3518812..f779001 100644 (file)
@@ -25,7 +25,7 @@ proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
 {
        loff_t new = -1;
 
-       lock_kernel();
+       down(&file->f_dentry->d_inode->i_sem);
        switch (whence) {
        case 0:
                new = off;
@@ -37,10 +37,12 @@ proc_bus_pci_lseek(struct file *file, loff_t off, int whence)
                new = PCI_CFG_SPACE_SIZE + off;
                break;
        }
-       unlock_kernel();
        if (new < 0 || new > PCI_CFG_SPACE_SIZE)
-               return -EINVAL;
-       return (file->f_pos = new);
+               new = -EINVAL;
+       else
+               file->f_pos = new;
+       up(&file->f_dentry->d_inode->i_sem);
+       return new;
 }
 
 static ssize_t
index 746e4df..6b847f1 100644 (file)
@@ -14,6 +14,8 @@ static void pci_free_resources(struct pci_dev *dev)
 {
        int i;
 
+       msi_remove_pci_irq_vectors(dev);
+
        for (i = 0; i < PCI_NUM_RESOURCES; i++) {
                struct resource *res = dev->resource + i;
                if (res->parent)
index aa900b1..366f1f1 100644 (file)
@@ -104,41 +104,6 @@ pci_find_slot(unsigned int bus, unsigned int devfn)
 }
 
 /**
- * pci_get_slot - locate PCI device for a given PCI slot
- * @bus: PCI bus on which desired PCI device resides
- * @devfn: encodes number of PCI slot in which the desired PCI 
- * device resides and the logical device number within that slot 
- * in case of multi-function devices.
- *
- * Given a PCI bus and slot/function number, the desired PCI device 
- * is located in the list of PCI devices.
- * If the device is found, its reference count is increased and this
- * function returns a pointer to its data structure.  The caller must
- * decrement the reference count by calling pci_dev_put().
- * If no device is found, %NULL is returned.
- */
-struct pci_dev * pci_get_slot(struct pci_bus *bus, unsigned int devfn)
-{
-       struct list_head *tmp;
-       struct pci_dev *dev;
-
-       WARN_ON(in_interrupt());
-       spin_lock(&pci_bus_lock);
-
-       list_for_each(tmp, &bus->children) {
-               dev = pci_dev_b(tmp);
-               if (dev->devfn == devfn)
-                       goto out;
-       }
-
-       dev = NULL;
- out:
-       pci_dev_get(dev);
-       spin_unlock(&pci_bus_lock);
-       return dev;
-}
-
-/**
  * pci_find_subsys - begin or continue searching for a PCI device by vendor/subvendor/device/subdevice id
  * @vendor: PCI vendor id to match, or %PCI_ANY_ID to match all vendor ids
  * @device: PCI device id to match, or %PCI_ANY_ID to match all device ids
@@ -354,4 +319,3 @@ EXPORT_SYMBOL(pci_find_slot);
 EXPORT_SYMBOL(pci_find_subsys);
 EXPORT_SYMBOL(pci_get_device);
 EXPORT_SYMBOL(pci_get_subsys);
-EXPORT_SYMBOL(pci_get_slot);
index dfd4501..c2b8489 100644 (file)
@@ -84,6 +84,10 @@ pci_update_resource(struct pci_dev *dev, struct resource *res, int resno)
                               pci_name(dev), resno, new, check);
                }
        }
+       res->flags &= ~IORESOURCE_UNSET;
+       DBGC((KERN_INFO "PCI: moved device %s resource %d (%lx) to %x\n",
+               dev->slot_name, resno, res->flags,
+               new & ~PCI_REGION_FLAG_MASK));
 }
 
 int __init
index 0c8e567..49e9498 100644 (file)
@@ -341,8 +341,11 @@ void destroy_cis_cache(struct pcmcia_socket *s)
 int verify_cis_cache(struct pcmcia_socket *s)
 {
        struct cis_cache_entry *cis;
-       char buf[256];
+       char *buf;
 
+       buf = kmalloc(256, GFP_KERNEL);
+       if (buf == NULL)
+               return -1;
        list_for_each_entry(cis, &s->cis_cache, node) {
                int len = cis->len;
 
@@ -355,9 +358,12 @@ int verify_cis_cache(struct pcmcia_socket *s)
 #endif
                        read_cis_mem(s, cis->attr, cis->addr, len, buf);
 
-               if (memcmp(buf, cis->cache, len) != 0)
+               if (memcmp(buf, cis->cache, len) != 0) {
+                       kfree(buf);
                        return -1;
+               }
        }
+       kfree(buf);
        return 0;
 }
 
@@ -1404,19 +1410,24 @@ int pcmcia_parse_tuple(client_handle_t handle, tuple_t *tuple, cisparse_t *parse
 int read_tuple(client_handle_t handle, cisdata_t code, void *parse)
 {
     tuple_t tuple;
-    cisdata_t buf[255];
+    cisdata_t *buf;
     int ret;
-    
+
+    buf = kmalloc(256, GFP_KERNEL);
+    if (buf == NULL)
+       return CS_OUT_OF_RESOURCE;
     tuple.DesiredTuple = code;
     tuple.Attributes = TUPLE_RETURN_COMMON;
     ret = pcmcia_get_first_tuple(handle, &tuple);
-    if (ret != CS_SUCCESS) return ret;
+    if (ret != CS_SUCCESS) goto done;
     tuple.TupleData = buf;
     tuple.TupleOffset = 0;
-    tuple.TupleDataMax = sizeof(buf);
+    tuple.TupleDataMax = 255;
     ret = pcmcia_get_tuple_data(handle, &tuple);
-    if (ret != CS_SUCCESS) return ret;
+    if (ret != CS_SUCCESS) goto done;
     ret = pcmcia_parse_tuple(handle, &tuple, parse);
+done:
+    kfree(buf);
     return ret;
 }
 
@@ -1432,50 +1443,61 @@ int read_tuple(client_handle_t handle, cisdata_t code, void *parse)
 
 int pcmcia_validate_cis(client_handle_t handle, cisinfo_t *info)
 {
-    tuple_t tuple;
-    cisparse_t p;
+    tuple_t *tuple;
+    cisparse_t *p;
     int ret, reserved, dev_ok = 0, ident_ok = 0;
 
     if (CHECK_HANDLE(handle))
        return CS_BAD_HANDLE;
+    tuple = kmalloc(sizeof(*tuple), GFP_KERNEL);
+    if (tuple == NULL)
+       return CS_OUT_OF_RESOURCE;
+    p = kmalloc(sizeof(*p), GFP_KERNEL);
+    if (p == NULL) {
+       kfree(tuple);
+       return CS_OUT_OF_RESOURCE;
+    }
 
     info->Chains = reserved = 0;
-    tuple.DesiredTuple = RETURN_FIRST_TUPLE;
-    tuple.Attributes = TUPLE_RETURN_COMMON;
-    ret = pcmcia_get_first_tuple(handle, &tuple);
+    tuple->DesiredTuple = RETURN_FIRST_TUPLE;
+    tuple->Attributes = TUPLE_RETURN_COMMON;
+    ret = pcmcia_get_first_tuple(handle, tuple);
     if (ret != CS_SUCCESS)
-       return CS_SUCCESS;
+       goto done;
 
     /* First tuple should be DEVICE; we should really have either that
        or a CFTABLE_ENTRY of some sort */
-    if ((tuple.TupleCode == CISTPL_DEVICE) ||
-       (read_tuple(handle, CISTPL_CFTABLE_ENTRY, &p) == CS_SUCCESS) ||
-       (read_tuple(handle, CISTPL_CFTABLE_ENTRY_CB, &p) == CS_SUCCESS))
+    if ((tuple->TupleCode == CISTPL_DEVICE) ||
+       (read_tuple(handle, CISTPL_CFTABLE_ENTRY, p) == CS_SUCCESS) ||
+       (read_tuple(handle, CISTPL_CFTABLE_ENTRY_CB, p) == CS_SUCCESS))
        dev_ok++;
 
     /* All cards should have a MANFID tuple, and/or a VERS_1 or VERS_2
        tuple, for card identification.  Certain old D-Link and Linksys
        cards have only a broken VERS_2 tuple; hence the bogus test. */
-    if ((read_tuple(handle, CISTPL_MANFID, &p) == CS_SUCCESS) ||
-       (read_tuple(handle, CISTPL_VERS_1, &p) == CS_SUCCESS) ||
-       (read_tuple(handle, CISTPL_VERS_2, &p) != CS_NO_MORE_ITEMS))
+    if ((read_tuple(handle, CISTPL_MANFID, p) == CS_SUCCESS) ||
+       (read_tuple(handle, CISTPL_VERS_1, p) == CS_SUCCESS) ||
+       (read_tuple(handle, CISTPL_VERS_2, p) != CS_NO_MORE_ITEMS))
        ident_ok++;
 
     if (!dev_ok && !ident_ok)
-       return CS_SUCCESS;
+       goto done;
 
     for (info->Chains = 1; info->Chains < MAX_TUPLES; info->Chains++) {
-       ret = pcmcia_get_next_tuple(handle, &tuple);
+       ret = pcmcia_get_next_tuple(handle, tuple);
        if (ret != CS_SUCCESS) break;
-       if (((tuple.TupleCode > 0x23) && (tuple.TupleCode < 0x40)) ||
-           ((tuple.TupleCode > 0x47) && (tuple.TupleCode < 0x80)) ||
-           ((tuple.TupleCode > 0x90) && (tuple.TupleCode < 0xff)))
+       if (((tuple->TupleCode > 0x23) && (tuple->TupleCode < 0x40)) ||
+           ((tuple->TupleCode > 0x47) && (tuple->TupleCode < 0x80)) ||
+           ((tuple->TupleCode > 0x90) && (tuple->TupleCode < 0xff)))
            reserved++;
     }
     if ((info->Chains == MAX_TUPLES) || (reserved > 5) ||
        ((!dev_ok || !ident_ok) && (info->Chains > 10)))
        info->Chains = 0;
 
+done:
+    kfree(tuple);
+    kfree(p);
     return CS_SUCCESS;
 }
 
index 3ae9a57..d30ffa7 100644 (file)
@@ -1916,7 +1916,7 @@ int pcmcia_request_irq(client_handle_t handle, irq_req_t *req)
 {
     struct pcmcia_socket *s;
     config_t *c;
-    int ret = 0, irq = 0;
+    int ret = CS_IN_USE, irq = 0;
     
     if (CHECK_HANDLE(handle))
        return CS_BAD_HANDLE;
@@ -1928,13 +1928,9 @@ int pcmcia_request_irq(client_handle_t handle, irq_req_t *req)
        return CS_CONFIGURATION_LOCKED;
     if (c->state & CONFIG_IRQ_REQ)
        return CS_IN_USE;
-    
-    /* Short cut: if there are no ISA interrupts, then it is PCI */
-    if (!s->irq_mask) {
-       irq = s->pci_irq;
-       ret = (irq) ? 0 : CS_IN_USE;
+
 #ifdef CONFIG_PCMCIA_PROBE
-    } else if (s->irq.AssignedIRQ != 0) {
+    if (s->irq.AssignedIRQ != 0) {
        /* If the interrupt is already assigned, it must match */
        irq = s->irq.AssignedIRQ;
        if (req->IRQInfo1 & IRQ_INFO2_VALID) {
@@ -1943,7 +1939,6 @@ int pcmcia_request_irq(client_handle_t handle, irq_req_t *req)
        } else
            ret = ((req->IRQInfo1&IRQ_MASK) == irq) ? 0 : CS_BAD_ARGS;
     } else {
-       ret = CS_IN_USE;
        if (req->IRQInfo1 & IRQ_INFO2_VALID) {
            u_int try, mask = req->IRQInfo2 & s->irq_mask;
            for (try = 0; try < 2; try++) {
@@ -1958,12 +1953,13 @@ int pcmcia_request_irq(client_handle_t handle, irq_req_t *req)
            irq = req->IRQInfo1 & IRQ_MASK;
            ret = try_irq(req->Attributes, irq, 1);
        }
-#else
-    } else {
-       ret = CS_UNSUPPORTED_MODE;
+    }
 #endif
+    if (ret != 0) {
+       if (!s->pci_irq)
+           return ret;
+       irq = s->pci_irq;
     }
-    if (ret != 0) return ret;
 
     if (req->Attributes & IRQ_HANDLE_PRESENT) {
        if (request_irq(irq, req->Handler,
index 40881f3..c1ebe8e 100644 (file)
@@ -42,7 +42,6 @@
 #include <linux/timer.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
-#include <linux/pci.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
 #include <linux/workqueue.h>
@@ -188,10 +187,6 @@ static struct timer_list poll_timer;
 
 /*====================================================================*/
 
-/* Default settings for PCI command configuration register */
-#define CMD_DFLT (PCI_COMMAND_IO|PCI_COMMAND_MEMORY| \
-                 PCI_COMMAND_MASTER|PCI_COMMAND_WAIT)
-
 /* These definitions must match the pcic table! */
 typedef enum pcic_id {
     IS_I82365A, IS_I82365B, IS_I82365DF,
@@ -202,15 +197,10 @@ typedef enum pcic_id {
 /* Flags for classifying groups of controllers */
 #define IS_VADEM       0x0001
 #define IS_CIRRUS      0x0002
-#define IS_TI          0x0004
-#define IS_O2MICRO     0x0008
 #define IS_VIA         0x0010
-#define IS_TOPIC       0x0020
-#define IS_RICOH       0x0040
 #define IS_UNKNOWN     0x0400
 #define IS_VG_PWR      0x0800
 #define IS_DF_PWR      0x1000
-#define IS_PCI         0x2000
 #define IS_ALIVE       0x8000
 
 typedef struct pcic_t {
@@ -351,26 +341,24 @@ static u_int __init cirrus_set_opts(u_short s, char *buf)
     if (has_ring == -1) has_ring = 1;
     flip(p->misc2, PD67_MC2_IRQ15_RI, has_ring);
     flip(p->misc2, PD67_MC2_DYNAMIC_MODE, dynamic_mode);
+    flip(p->misc2, PD67_MC2_FREQ_BYPASS, freq_bypass);
     if (p->misc2 & PD67_MC2_IRQ15_RI)
        strcat(buf, " [ring]");
     if (p->misc2 & PD67_MC2_DYNAMIC_MODE)
        strcat(buf, " [dyn mode]");
+    if (p->misc2 & PD67_MC2_FREQ_BYPASS)
+       strcat(buf, " [freq bypass]");
     if (p->misc1 & PD67_MC1_INPACK_ENA)
        strcat(buf, " [inpack]");
-    if (!(t->flags & IS_PCI)) {
-       if (p->misc2 & PD67_MC2_IRQ15_RI)
-           mask &= ~0x8000;
-       if (has_led > 0) {
-           strcat(buf, " [led]");
-           mask &= ~0x1000;
-       }
-       if (has_dma > 0) {
-           strcat(buf, " [dma]");
-           mask &= ~0x0600;
-       flip(p->misc2, PD67_MC2_FREQ_BYPASS, freq_bypass);
-       if (p->misc2 & PD67_MC2_FREQ_BYPASS)
-           strcat(buf, " [freq bypass]");
-       }
+    if (p->misc2 & PD67_MC2_IRQ15_RI)
+       mask &= ~0x8000;
+    if (has_led > 0) {
+       strcat(buf, " [led]");
+       mask &= ~0x1000;
+    }
+    if (has_dma > 0) {
+       strcat(buf, " [dma]");
+       mask &= ~0x0600;
     }
     if (!(t->flags & IS_VIA)) {
        if (setup_time >= 0)
@@ -540,7 +528,6 @@ static u_int __init test_irq(u_short sock, int irq)
     return (irq_hits != 1);
 }
 
-
 static u_int __init isa_scan(u_short sock, u_int mask0)
 {
     u_int mask1 = 0;
@@ -585,7 +572,6 @@ static u_int __init isa_scan(u_short sock, u_int mask0)
     return mask1;
 }
 
-
 /*====================================================================*/
 
 /* Time conversion functions */
@@ -597,7 +583,6 @@ static int to_cycles(int ns)
 
 /*====================================================================*/
 
-
 static int __init identify(u_short port, u_short sock)
 {
     u_char val;
@@ -700,7 +685,7 @@ static void __init add_socket(u_short port, int psock, int type)
 static void __init add_pcic(int ns, int type)
 {
     u_int mask = 0, i, base;
-    int use_pci = 0, isa_irq = 0;
+    int isa_irq = 0;
     struct i82365_socket *t = &socket[sockets-ns];
 
     base = sockets-ns;
@@ -721,17 +706,16 @@ static void __init add_pcic(int ns, int type)
     mask &= I365_MASK & set_bridge_opts(base, ns);
     /* Scan for ISA interrupts */
     mask = isa_scan(base, mask);
-    printk(KERN_INFO "    PCI card interrupts,");
         
     /* Poll if only two interrupts available */
-    if (!use_pci && !poll_interval) {
+    if (!poll_interval) {
        u_int tmp = (mask & 0xff20);
        tmp = tmp & (tmp-1);
        if ((tmp & (tmp-1)) == 0)
            poll_interval = HZ;
     }
     /* Only try an ISA cs_irq if this is the first controller */
-    if (!use_pci && !grab_irq && (cs_irq || !poll_interval)) {
+    if (!grab_irq && (cs_irq || !poll_interval)) {
        /* Avoid irq 12 unless it is explicitly requested */
        u_int cs_mask = mask & ((cs_irq) ? (1<<cs_irq) : ~(1<<12));
        for (cs_irq = 15; cs_irq > 0; cs_irq--)
@@ -745,7 +729,7 @@ static void __init add_pcic(int ns, int type)
        }
     }
     
-    if (!use_pci && !isa_irq) {
+    if (!isa_irq) {
        if (poll_interval == 0)
            poll_interval = HZ;
        printk(" polling interval = %d ms\n",
@@ -763,10 +747,8 @@ static void __init add_pcic(int ns, int type)
 
 } /* add_pcic */
 
-
 /*====================================================================*/
 
-
 #ifdef CONFIG_PNP
 static struct isapnp_device_id id_table[] __initdata = {
        {       ISAPNP_ANY_ID, ISAPNP_ANY_ID, ISAPNP_VENDOR('P', 'N', 'P'),
@@ -832,7 +814,9 @@ static void __init isa_probe(void)
            }
        }
     } else {
-       for (i = 0; i < (extra_sockets ? 8 : 4); i += 2) {
+       for (i = 0; i < 8; i += 2) {
+           if (sockets && !extra_sockets && (i == 4))
+               break;
            port = i365_base + 2*(i>>2);
            sock = (i & 3);
            id = identify(port, sock);
@@ -856,7 +840,6 @@ static void __init isa_probe(void)
     }
 }
 
-
 /*====================================================================*/
 
 static irqreturn_t pcic_interrupt(int irq, void *dev,
@@ -872,8 +855,7 @@ static irqreturn_t pcic_interrupt(int irq, void *dev,
     for (j = 0; j < 20; j++) {
        active = 0;
        for (i = 0; i < sockets; i++) {
-           if ((socket[i].cs_irq != irq) &&
-               (socket[i].socket.pci_irq != irq))
+           if (socket[i].cs_irq != irq)
                continue;
            handled = 1;
            ISA_LOCK(i, flags);
@@ -911,7 +893,6 @@ static irqreturn_t pcic_interrupt(int irq, void *dev,
 static void pcic_interrupt_wrapper(u_long data)
 {
     pcic_interrupt(0, NULL, NULL);
-    init_timer(&poll_timer);
     poll_timer.expires = jiffies + poll_interval;
     add_timer(&poll_timer);
 }
@@ -1039,7 +1020,7 @@ static int i365_set_socket(u_short sock, socket_state_t *state)
     
     /* IO card, RESET flag, IO interrupt */
     reg = t->intr;
-    if (state->io_irq != t->socket.pci_irq) reg |= state->io_irq;
+    reg |= state->io_irq;
     reg |= (state->flags & SS_RESET) ? 0 : I365_PC_RESET;
     reg |= (state->flags & SS_IOCARD) ? I365_PC_IOCARD : 0;
     i365_set(sock, I365_INTCTL, reg);
@@ -1177,8 +1158,7 @@ static int i365_set_mem_map(u_short sock, struct pccard_mem_map *mem)
     if ((map > 4) || (mem->card_start > 0x3ffffff) ||
        (mem->sys_start > mem->sys_stop) || (mem->speed > 1000))
        return -EINVAL;
-    if (!(socket[sock].flags & IS_PCI) &&
-       ((mem->sys_start > 0xffffff) || (mem->sys_stop > 0xffffff)))
+    if ((mem->sys_start > 0xffffff) || (mem->sys_stop > 0xffffff))
        return -EINVAL;
        
     /* Turn off the window before changing anything */
@@ -1211,6 +1191,7 @@ static int i365_set_mem_map(u_short sock, struct pccard_mem_map *mem)
     return 0;
 } /* i365_set_mem_map */
 
+#if 0 /* driver model ordering issue */
 /*======================================================================
 
     Routines for accessing socket information and register dumps via
@@ -1250,6 +1231,7 @@ static ssize_t show_exca(struct class_device *class_dev, char *buf)
 
 static CLASS_DEVICE_ATTR(exca, S_IRUGO, show_exca, NULL);
 static CLASS_DEVICE_ATTR(info, S_IRUGO, show_info, NULL);
+#endif
 
 /*====================================================================*/
 
@@ -1385,7 +1367,7 @@ static int __init init_i82365(void)
     if (driver_register(&i82365_driver))
        return -1;
 
-    printk(KERN_INFO "Intel PCIC probe: ");
+    printk(KERN_INFO "Intel ISA PCIC probe: ");
     sockets = 0;
 
     isa_probe();
@@ -1414,10 +1396,12 @@ static int __init init_i82365(void)
                            pcmcia_unregister_socket(&socket[i].socket);
                    break;
            }
+#if 0 /* driver model ordering issue */
           class_device_create_file(&socket[i].socket.dev,
                                    &class_device_attr_info);
           class_device_create_file(&socket[i].socket.dev,
                                    &class_device_attr_exca);
+#endif
     }
 
     /* Finally, schedule a polling interrupt */
index c3aa895..f367a8a 100644 (file)
@@ -23,7 +23,6 @@
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/device.h>
-#include <linux/i2c.h>
 
 #include <asm/hardware.h>
 #include <asm/mach-types.h>
index b60080a..ccdf0eb 100644 (file)
@@ -30,7 +30,7 @@
 
 
 #if 0
-#define DEBUG(x,args...)       printk("%s: " x, __FUNCTION__, ##args)
+#define DEBUG(x,args...)       printk(KERN_DEBUG "%s: " x, __FUNCTION__, ##args)
 #else
 #define DEBUG(x,args...)
 #endif
@@ -779,7 +779,7 @@ static void yenta_get_socket_capabilities(struct yenta_socket *socket, u32 isa_i
        socket->socket.irq_mask = yenta_probe_irq(socket, isa_irq_mask);
        socket->socket.cb_dev = socket->dev;
 
-       printk(KERN_INFO "Yenta: ISA IRQ list %04x, PCI irq%d\n",
+       printk(KERN_INFO "Yenta: ISA IRQ mask 0x%04x, PCI irq %d\n",
               socket->socket.irq_mask, socket->cb_irq);
 }
 
@@ -860,7 +860,7 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i
                goto disable;
 
        if (!pci_resource_start(dev, 0)) {
-               printk("No cardbus resource!\n");
+               printk(KERN_ERR "No cardbus resource!\n");
                ret = -ENODEV;
                goto release;
        }
@@ -916,7 +916,7 @@ static int __devinit yenta_probe (struct pci_dev *dev, const struct pci_device_i
 
        /* Figure out what the dang thing can do for the PCMCIA layer... */
        yenta_get_socket_capabilities(socket, isa_interrupts);
-       printk("Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
+       printk(KERN_INFO "Socket status: %08x\n", cb_readl(socket, CB_SOCKET_STATE));
 
        /* Register it with the pcmcia layer.. */
        ret = pcmcia_register_socket(&socket->socket);
index cb53960..3a4a069 100644 (file)
@@ -3462,6 +3462,18 @@ static boolean BusLogic_WriteOutgoingMailbox(BusLogic_HostAdapter_T
   return false;
 }
 
+/* Error Handling (EH) support */
+
+static int BusLogic_host_reset(Scsi_Cmnd *SCpnt)
+{
+       BusLogic_HostAdapter_T *HostAdapter =
+               (BusLogic_HostAdapter_T *) SCpnt->device->host->hostdata;
+
+       /* printk("BusLogic_host_reset\n"); */
+       HostAdapter->HostAdapterExternalReset = 1;
+       BusLogic_ResetHostAdapter(HostAdapter, NULL, 0);
+       return SUCCESS;
+}
 
 /*
   BusLogic_QueueCommand creates a CCB for Command and places it into an
@@ -3538,8 +3550,8 @@ int BusLogic_QueueCommand(SCSI_Command_T *Command,
       CCB->DataLength = Count * sizeof(BusLogic_ScatterGatherSegment_T);
       if (BusLogic_MultiMasterHostAdapterP(HostAdapter))
        CCB->DataPointer = (unsigned int)CCB->DMA_Handle +
-                           ((unsigned int)&CCB->ScatterGatherList - 
-                            (unsigned int)CCB);
+                           ((unsigned long)&CCB->ScatterGatherList - 
+                            (unsigned long)CCB);
       else CCB->DataPointer = Virtual_to_32Bit_Virtual(CCB->ScatterGatherList);
       for (Segment = 0; Segment < Count; Segment++)
        {
@@ -4589,220 +4601,8 @@ static boolean BusLogic_ParseKeyword(char **StringPointer, char *Keyword)
   adapters whereas the remaining options apply individually only to the
   selected host adapter.
 
-  The BusLogic Driver Probing Options comprise the following:
-
-  IO:<integer>
-
-    The "IO:" option specifies an ISA I/O Address to be probed for a non-PCI
-    MultiMaster Host Adapter.  If neither "IO:" nor "NoProbeISA" options are
-    specified, then the standard list of BusLogic MultiMaster ISA I/O Addresses
-    will be probed (0x330, 0x334, 0x230, 0x234, 0x130, and 0x134).  Multiple
-    "IO:" options may be specified to precisely determine the I/O Addresses to
-    be probed, but the probe order will always follow the standard list.
-
-  NoProbe
-
-    The "NoProbe" option disables all probing and therefore no BusLogic Host
-    Adapters will be detected.
-
-  NoProbeISA
-
-    The "NoProbeISA" option disables probing of the standard BusLogic ISA I/O
-    Addresses and therefore only PCI MultiMaster and FlashPoint Host Adapters
-    will be detected.
-
-  NoProbePCI
-
-    The "NoProbePCI" options disables the interrogation of PCI Configuration
-    Space and therefore only ISA Multimaster Host Adapters will be detected, as
-    well as PCI Multimaster Host Adapters that have their ISA Compatible I/O
-    Port set to "Primary" or "Alternate".
-
-  NoSortPCI
-
-    The "NoSortPCI" option forces PCI MultiMaster Host Adapters to be
-    enumerated in the order provided by the PCI BIOS, ignoring any setting of
-    the AutoSCSI "Use Bus And Device # For PCI Scanning Seq." option.
-
-  MultiMasterFirst
-
-    The "MultiMasterFirst" option forces MultiMaster Host Adapters to be probed
-    before FlashPoint Host Adapters.  By default, if both FlashPoint and PCI
-    MultiMaster Host Adapters are present, this driver will probe for
-    FlashPoint Host Adapters first unless the BIOS primary disk is controlled
-    by the first PCI MultiMaster Host Adapter, in which case MultiMaster Host
-    Adapters will be probed first.
-
-  FlashPointFirst
-
-    The "FlashPointFirst" option forces FlashPoint Host Adapters to be probed
-    before MultiMaster Host Adapters.
-
-  The BusLogic Driver Tagged Queuing Options allow for explicitly specifying
-  the Queue Depth and whether Tagged Queuing is permitted for each Target
-  Device (assuming that the Target Device supports Tagged Queuing).  The Queue
-  Depth is the number of SCSI Commands that are allowed to be concurrently
-  presented for execution (either to the Host Adapter or Target Device).  Note
-  that explicitly enabling Tagged Queuing may lead to problems; the option to
-  enable or disable Tagged Queuing is provided primarily to allow disabling
-  Tagged Queuing on Target Devices that do not implement it correctly.  The
-  following options are available:
-
-  QueueDepth:<integer>
-
-    The "QueueDepth:" or QD:" option specifies the Queue Depth to use for all
-    Target Devices that support Tagged Queuing, as well as the maximum Queue
-    Depth for devices that do not support Tagged Queuing.  If no Queue Depth
-    option is provided, the Queue Depth will be determined automatically based
-    on the Host Adapter's Total Queue Depth and the number, type, speed, and
-    capabilities of the detected Target Devices.  For Host Adapters that
-    require ISA Bounce Buffers, the Queue Depth is automatically set by default
-    to BusLogic_TaggedQueueDepthBB or BusLogic_UntaggedQueueDepthBB to avoid
-    excessive preallocation of DMA Bounce Buffer memory.  Target Devices that
-    do not support Tagged Queuing always have their Queue Depth set to
-    BusLogic_UntaggedQueueDepth or BusLogic_UntaggedQueueDepthBB, unless a
-    lower Queue Depth option is provided.  A Queue Depth of 1 automatically
-    disables Tagged Queuing.
-
-  QueueDepth:[<integer>,<integer>...]
-
-    The "QueueDepth:[...]" or "QD:[...]" option specifies the Queue Depth
-    individually for each Target Device.  If an <integer> is omitted, the
-    associated Target Device will have its Queue Depth selected automatically.
-
-  TaggedQueuing:Default
-
-    The "TaggedQueuing:Default" or "TQ:Default" option permits Tagged Queuing
-    based on the firmware version of the BusLogic Host Adapter and based on
-    whether the Queue Depth allows queuing multiple commands.
-
-  TaggedQueuing:Enable
-
-    The "TaggedQueuing:Enable" or "TQ:Enable" option enables Tagged Queuing for
-    all Target Devices on this Host Adapter, overriding any limitation that
-    would otherwise be imposed based on the Host Adapter firmware version.
-
-  TaggedQueuing:Disable
-
-    The "TaggedQueuing:Disable" or "TQ:Disable" option disables Tagged Queuing
-    for all Target Devices on this Host Adapter.
-
-  TaggedQueuing:<Target-Spec>
-
-    The "TaggedQueuing:<Target-Spec>" or "TQ:<Target-Spec>" option controls
-    Tagged Queuing individually for each Target Device.  <Target-Spec> is a
-    sequence of "Y", "N", and "X" characters.  "Y" enables Tagged Queuing, "N"
-    disables Tagged Queuing, and "X" accepts the default based on the firmware
-    version.  The first character refers to Target Device 0, the second to
-    Target Device 1, and so on; if the sequence of "Y", "N", and "X" characters
-    does not cover all the Target Devices, unspecified characters are assumed
-    to be "X".
-
-  The BusLogic Driver Error Recovery Option allows for explicitly specifying
-  the Error Recovery action to be performed when BusLogic_ResetCommand is
-  called due to a SCSI Command failing to complete successfully.  The following
-  options are available:
-
-  ErrorRecovery:Default
-
-    The "ErrorRecovery:Default" or "ER:Default" option selects between the Hard
-    Reset and Bus Device Reset options based on the recommendation of the SCSI
-    Subsystem.
-
-  ErrorRecovery:HardReset
-
-    The "ErrorRecovery:HardReset" or "ER:HardReset" option will initiate a Host
-    Adapter Hard Reset which also causes a SCSI Bus Reset.
-
-  ErrorRecovery:BusDeviceReset
-
-    The "ErrorRecovery:BusDeviceReset" or "ER:BusDeviceReset" option will send
-    a Bus Device Reset message to the individual Target Device causing the
-    error.  If Error Recovery is again initiated for this Target Device and no
-    SCSI Command to this Target Device has completed successfully since the Bus
-    Device Reset message was sent, then a Hard Reset will be attempted.
-
-  ErrorRecovery:None
-
-    The "ErrorRecovery:None" or "ER:None" option suppresses Error Recovery.
-    This option should only be selected if a SCSI Bus Reset or Bus Device Reset
-    will cause the Target Device or a critical operation to suffer a complete
-    and unrecoverable failure.
-
-  ErrorRecovery:<Target-Spec>
-
-    The "ErrorRecovery:<Target-Spec>" or "ER:<Target-Spec>" option controls
-    Error Recovery individually for each Target Device.  <Target-Spec> is a
-    sequence of "D", "H", "B", and "N" characters.  "D" selects Default, "H"
-    selects Hard Reset, "B" selects Bus Device Reset, and "N" selects None.
-    The first character refers to Target Device 0, the second to Target Device
-    1, and so on; if the sequence of "D", "H", "B", and "N" characters does not
-    cover all the possible Target Devices, unspecified characters are assumed
-    to be "D".
-
-  The BusLogic Driver Miscellaneous Options comprise the following:
-
-  BusSettleTime:<seconds>
-
-    The "BusSettleTime:" or "BST:" option specifies the Bus Settle Time in
-    seconds.  The Bus Settle Time is the amount of time to wait between a Host
-    Adapter Hard Reset which initiates a SCSI Bus Reset and issuing any SCSI
-    Commands.  If unspecified, it defaults to BusLogic_DefaultBusSettleTime.
-
-  InhibitTargetInquiry
-
-    The "InhibitTargetInquiry" option inhibits the execution of an Inquire
-    Target Devices or Inquire Installed Devices command on MultiMaster Host
-    Adapters.  This may be necessary with some older Target Devices that do not
-    respond correctly when Logical Units above 0 are addressed.
-
-  The BusLogic Driver Debugging Options comprise the following:
-
-  TraceProbe
-
-    The "TraceProbe" option enables tracing of Host Adapter Probing.
-
-  TraceHardwareReset
-
-    The "TraceHardwareReset" option enables tracing of Host Adapter Hardware
-    Reset.
-
-  TraceConfiguration
-
-    The "TraceConfiguration" option enables tracing of Host Adapter
-    Configuration.
-
-  TraceErrors
-
-    The "TraceErrors" option enables tracing of SCSI Commands that return an
-    error from the Target Device.  The CDB and Sense Data will be printed for
-    each SCSI Command that fails.
-
-  Debug
-
-    The "Debug" option enables all debugging options.
-
-  The following examples demonstrate setting the Queue Depth for Target Devices
-  1 and 2 on the first host adapter to 7 and 15, the Queue Depth for all Target
-  Devices on the second host adapter to 31, and the Bus Settle Time on the
-  second host adapter to 30 seconds.
-
-  Linux Kernel Command Line:
-
-    linux BusLogic=QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30
-
-  LILO Linux Boot Loader (in /etc/lilo.conf):
-
-    append = "BusLogic=QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"
-
-  INSMOD Loadable Kernel Module Installation Facility:
-
-    insmod BusLogic.o \
-       'BusLogic="QueueDepth:[,7,15];QueueDepth:31,BusSettleTime:30"'
-
-  NOTE: Module Utilities 2.1.71 or later is required for correct parsing
-       of driver options containing commas.
-
+  The BusLogic Driver Probing Options are described in
+  <file:Documentation/scsi/BusLogic.txt>.
 */
 
 static int __init BusLogic_ParseDriverOptions(char *OptionsString)
@@ -5126,6 +4926,7 @@ static SCSI_Host_Template_T driver_template = {
        .queuecommand           = BusLogic_QueueCommand,
        .slave_configure        = BusLogic_SlaveConfigure,
        .bios_param             = BusLogic_BIOSDiskParameters,
+       .eh_host_reset_handler  = BusLogic_host_reset,
        .unchecked_isa_dma      = 1,
        .max_sectors            = 128,
        .use_clustering         = ENABLE_CLUSTERING,
index 2cc1c21..b3a579f 100644 (file)
@@ -271,7 +271,7 @@ config SCSI_ACARD
 
 config SCSI_AHA152X
        tristate "Adaptec AHA152X/2825 support"
-       depends on ISA && SCSI
+       depends on ISA && SCSI && !64BIT
        ---help---
          This is a driver for the AHA-1510, AHA-1520, AHA-1522, and AHA-2825
          SCSI host adapters. It also works for the AVA-1505, but the IRQ etc.
@@ -929,37 +929,34 @@ config SCSI_SYM53C8XX_DMA_ADDRESSING_MODE
        depends on SCSI_SYM53C8XX_2
        default "1"
        ---help---
-         This option only applies to PCI-SCSI chip that are PCI DAC capable 
-         (875A, 895A, 896, 1010-33, 1010-66, 1000).
-
-         When set to 0, only PCI 32 bit DMA addressing (SAC) will be performed.
-         When set to 1, 40 bit DMA addressing (with upper 24 bits of address 
-         set to zero) is supported. The addressable range is here 1 TB.
-         When set to 2, full 64 bits of address for DMA are supported, but only
-         16 segments of 4 GB can be addressed. The addressable range is so 
-         limited to 64 GB.
+         This option only applies to PCI-SCSI chips that are PCI DAC
+         capable (875A, 895A, 896, 1010-33, 1010-66, 1000).
 
-         The safest value is 0 (32 bit DMA addressing) that is guessed to still 
-         fit most of real machines.
+         When set to 0, the driver will program the chip to only perform
+         32-bit DMA.  When set to 1, the chip will be able to perform DMA
+         to addresses up to 1TB.  When set to 2, the driver supports the
+         full 64-bit DMA address range, but can only address 16 segments
+         of 4 GB each.  This limits the total addressable range to 64 GB.
 
-         The preferred value 1 (40 bit DMA addressing) should make happy 
-         properly engineered PCI DAC capable host bridges. You may configure
-         this option for Intel platforms with more than 4 GB of memory.
+         Most machines with less than 4GB of memory should use a setting
+         of 0 for best performance.  If your machine has 4GB of memory
+         or more, you should set this option to 1 (the default).
 
-         The still experimental value 2 (64 bit DMA addressing with 16 x 4GB 
-         segments limitation) can be used on systems that require PCI address 
-         bits past bit 39 to be set for the addressing of memory using PCI 
-         DAC cycles.
+         The still experimental value 2 (64 bit DMA addressing with 16
+         x 4GB segments limitation) can be used on systems that require
+         PCI address bits past bit 39 to be set for the addressing of
+         memory using PCI DAC cycles.
 
 config SCSI_SYM53C8XX_DEFAULT_TAGS
        int "default tagged command queue depth"
        depends on SCSI_SYM53C8XX_2
        default "16"
        help
-         This is the default value of the command queue depth the driver will 
-         announce to the generic SCSI layer for devices that support tagged 
-         command queueing. This value can be changed from the boot command line.
-         This is a soft limit that cannot exceed CONFIG_SCSI_SYM53C8XX_MAX_TAGS.
+         This is the default value of the command queue depth the
+         driver will announce to the generic SCSI layer for devices
+         that support tagged command queueing. This value can be changed
+         from the boot command line.  This is a soft limit that cannot
+         exceed CONFIG_SCSI_SYM53C8XX_MAX_TAGS.
 
 config SCSI_SYM53C8XX_MAX_TAGS
        int "maximum number of queued commands"
@@ -972,11 +969,12 @@ config SCSI_SYM53C8XX_MAX_TAGS
          This value is used as a compiled-in hard limit.
 
 config SCSI_SYM53C8XX_IOMAPPED
-       bool "use normal IO"
+       bool "use port IO"
        depends on SCSI_SYM53C8XX_2
        help
-         If you say Y here, the driver will preferently use normal IO rather than 
-         memory mapped IO.
+         If you say Y here, the driver will use port IO to access
+         the card.  This is significantly slower then using memory
+         mapped IO.  Most people should answer N.
 
 config SCSI_ZALON
        tristate "Zalon SCSI support"
@@ -1294,7 +1292,7 @@ config SCSI_DC395x
 
 config SCSI_DC390T
        tristate "Tekram DC390(T) and Am53/79C974 SCSI support"
-       depends on PCI && SCSI && BROKEN
+       depends on PCI && SCSI
        ---help---
          This driver supports PCI SCSI host adapters based on the Am53C974A
          chip, e.g. Tekram DC390(T), DawiControl 2974 and some onboard
index 827c1dd..c5cdb67 100644 (file)
@@ -28,7 +28,8 @@ Supported Cards/Chipsets
 People
 -------------------------
 Alan Cox <alan@redhat.com>
-Christoph Hellwig <hch@infradead.org>  (small cleanups/fixes)
+Christoph Hellwig <hch@infradead.org>  (updates for new-style PCI probing and SCSI host registration,
+                                        small cleanups/fixes)
 Matt Domsch <matt_domsch@dell.com>     (revision ioctl, adapter messages)
 Deanna Bonds <deanna_bonds@adaptec.com> (non-DASD support, PAE fibs and 64 bit, added new adaptec controllers
                                         added new ioctls, changed scsi interface to use new error handler,
index 6fe13d1..fe8dac8 100644 (file)
@@ -4,6 +4,7 @@
  *
  * based on the old aacraid driver that is..
  * Adaptec aacraid device driver for Linux.
+ *
  * Copyright (c) 2000 Adaptec, Inc. (aacraid@adaptec.com)
  *
  * This program is free software; you can redistribute it and/or modify
@@ -22,7 +23,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/spinlock.h>
 #include <linux/slab.h>
 #include <linux/completion.h>
+#include <linux/blkdev.h>
 #include <asm/semaphore.h>
 #include <asm/uaccess.h>
-#include <linux/blkdev.h>
-#include "scsi.h"
-#include "hosts.h"
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
 
 #include "aacraid.h"
 
@@ -194,9 +197,9 @@ struct sense_data {
  
 static struct fsa_scsi_hba *fsa_dev[MAXIMUM_NUM_ADAPTERS];     /*  SCSI Device Instance Pointers */
 static struct sense_data sense_data[MAXIMUM_NUM_CONTAINERS];
-static unsigned long aac_build_sg(Scsi_Cmnd* scsicmd, struct sgmap* sgmap);
-static unsigned long aac_build_sg64(Scsi_Cmnd* scsicmd, struct sgmap64* psg);
-static int aac_send_srb_fib(Scsi_Cmnd* scsicmd);
+static unsigned long aac_build_sg(struct scsi_cmnd* scsicmd, struct sgmap* sgmap);
+static unsigned long aac_build_sg64(struct scsi_cmnd* scsicmd, struct sgmap64* psg);
+static int aac_send_srb_fib(struct scsi_cmnd* scsicmd);
 #ifdef AAC_DETAILED_STATUS_INFO
 static char *aac_get_status_string(u32 status);
 #endif
@@ -444,7 +447,7 @@ void set_sense(u8 *sense_buf, u8 sense_key, u8 sense_code,
        }
 }
 
-static void aac_io_done(Scsi_Cmnd * scsicmd)
+static void aac_io_done(struct scsi_cmnd * scsicmd)
 {
        unsigned long cpu_flags;
        struct Scsi_Host *host = scsicmd->device->host;
@@ -453,7 +456,7 @@ static void aac_io_done(Scsi_Cmnd * scsicmd)
        spin_unlock_irqrestore(host->host_lock, cpu_flags);
 }
 
-static void __aac_io_done(Scsi_Cmnd * scsicmd)
+static void __aac_io_done(struct scsi_cmnd * scsicmd)
 {
        scsicmd->scsi_done(scsicmd);
 }
@@ -538,11 +541,11 @@ static void read_callback(void *context, struct fib * fibptr)
 {
        struct aac_dev *dev;
        struct aac_read_reply *readreply;
-       Scsi_Cmnd *scsicmd;
+       struct scsi_cmnd *scsicmd;
        u32 lba;
        u32 cid;
 
-       scsicmd = (Scsi_Cmnd *) context;
+       scsicmd = (struct scsi_cmnd *) context;
 
        dev = (struct aac_dev *)scsicmd->device->host->hostdata;
        cid =TARGET_LUN_TO_CONTAINER(scsicmd->device->id, scsicmd->device->lun);
@@ -557,11 +560,11 @@ static void read_callback(void *context, struct fib * fibptr)
                pci_unmap_sg(dev->pdev, 
                        (struct scatterlist *)scsicmd->buffer,
                        scsicmd->use_sg,
-                       scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
+                       scsicmd->sc_data_direction);
        else if(scsicmd->request_bufflen)
                pci_unmap_single(dev->pdev, (dma_addr_t)(ulong)scsicmd->SCp.ptr,
                                 scsicmd->request_bufflen,
-                                scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
+                                scsicmd->sc_data_direction);
        readreply = (struct aac_read_reply *)fib_data(fibptr);
        if (le32_to_cpu(readreply->status) == ST_OK)
                scsicmd->result = DID_OK << 16 | COMMAND_COMPLETE << 8 | SAM_STAT_GOOD;
@@ -584,11 +587,11 @@ static void write_callback(void *context, struct fib * fibptr)
 {
        struct aac_dev *dev;
        struct aac_write_reply *writereply;
-       Scsi_Cmnd *scsicmd;
+       struct scsi_cmnd *scsicmd;
        u32 lba;
        u32 cid;
 
-       scsicmd = (Scsi_Cmnd *) context;
+       scsicmd = (struct scsi_cmnd *) context;
        dev = (struct aac_dev *)scsicmd->device->host->hostdata;
        cid = TARGET_LUN_TO_CONTAINER(scsicmd->device->id, scsicmd->device->lun);
 
@@ -601,11 +604,11 @@ static void write_callback(void *context, struct fib * fibptr)
                pci_unmap_sg(dev->pdev, 
                        (struct scatterlist *)scsicmd->buffer,
                        scsicmd->use_sg,
-                       scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
+                       scsicmd->sc_data_direction);
        else if(scsicmd->request_bufflen)
                pci_unmap_single(dev->pdev, (dma_addr_t)(ulong)scsicmd->SCp.ptr,
                                 scsicmd->request_bufflen,
-                                scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
+                                scsicmd->sc_data_direction);
 
        writereply = (struct aac_write_reply *) fib_data(fibptr);
        if (le32_to_cpu(writereply->status) == ST_OK)
@@ -625,7 +628,7 @@ static void write_callback(void *context, struct fib * fibptr)
        aac_io_done(scsicmd);
 }
 
-int aac_read(Scsi_Cmnd * scsicmd, int cid)
+int aac_read(struct scsi_cmnd * scsicmd, int cid)
 {
        u32 lba;
        u32 count;
@@ -736,7 +739,7 @@ int aac_read(Scsi_Cmnd * scsicmd, int cid)
        return -1;
 }
 
-static int aac_write(Scsi_Cmnd * scsicmd, int cid)
+static int aac_write(struct scsi_cmnd * scsicmd, int cid)
 {
        u32 lba;
        u32 count;
@@ -853,7 +856,7 @@ static int aac_write(Scsi_Cmnd * scsicmd, int cid)
  *     aacraid firmware.
  */
  
-int aac_scsi_cmd(Scsi_Cmnd * scsicmd)
+int aac_scsi_cmd(struct scsi_cmnd * scsicmd)
 {
        u32 cid = 0;
        struct fsa_scsi_hba *fsa_dev_ptr;
@@ -1215,9 +1218,9 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
 {
        struct aac_dev *dev;
        struct aac_srb_reply *srbreply;
-       Scsi_Cmnd *scsicmd;
+       struct scsi_cmnd *scsicmd;
 
-       scsicmd = (Scsi_Cmnd *) context;
+       scsicmd = (struct scsi_cmnd *) context;
        dev = (struct aac_dev *)scsicmd->device->host->hostdata;
 
        if (fibptr == NULL)
@@ -1233,10 +1236,10 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
                pci_unmap_sg(dev->pdev, 
                        (struct scatterlist *)scsicmd->buffer,
                        scsicmd->use_sg,
-                       scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
+                       scsicmd->sc_data_direction);
        else if(scsicmd->request_bufflen)
                pci_unmap_single(dev->pdev, (ulong)scsicmd->SCp.ptr, scsicmd->request_bufflen,
-                       scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
+                       scsicmd->sc_data_direction);
 
        /*
         * First check the fib status
@@ -1396,7 +1399,7 @@ static void aac_srb_callback(void *context, struct fib * fibptr)
  * scsicmd passed in.
  */
 
-static int aac_send_srb_fib(Scsi_Cmnd* scsicmd)
+static int aac_send_srb_fib(struct scsi_cmnd* scsicmd)
 {
        struct fib* cmd_fibcontext;
        struct aac_dev* dev;
@@ -1414,17 +1417,16 @@ static int aac_send_srb_fib(Scsi_Cmnd* scsicmd)
 
        dev = (struct aac_dev *)scsicmd->device->host->hostdata;
        switch(scsicmd->sc_data_direction){
-       case SCSI_DATA_WRITE:
+       case DMA_TO_DEVICE:
                flag = SRB_DataOut;
                break;
-       case SCSI_DATA_UNKNOWN:  
+       case DMA_BIDIRECTIONAL:
                flag = SRB_DataIn | SRB_DataOut;
                break;
-       case SCSI_DATA_READ:
+       case DMA_FROM_DEVICE:
                flag = SRB_DataIn;
                break;
-       case SCSI_DATA_NONE: 
-       default:
+       case DMA_NONE:
                flag = SRB_NoDataXfer;
                break;
        }
@@ -1507,7 +1509,7 @@ static int aac_send_srb_fib(Scsi_Cmnd* scsicmd)
        return -1;
 }
 
-static unsigned long aac_build_sg(Scsi_Cmnd* scsicmd, struct sgmap* psg)
+static unsigned long aac_build_sg(struct scsi_cmnd* scsicmd, struct sgmap* psg)
 {
        struct aac_dev *dev;
        unsigned long byte_count = 0;
@@ -1524,7 +1526,7 @@ static unsigned long aac_build_sg(Scsi_Cmnd* scsicmd, struct sgmap* psg)
                sg = (struct scatterlist *) scsicmd->request_buffer;
 
                sg_count = pci_map_sg(dev->pdev, sg, scsicmd->use_sg,
-                       scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
+                       scsicmd->sc_data_direction);
                psg->count = cpu_to_le32(sg_count);
 
                byte_count = 0;
@@ -1551,7 +1553,7 @@ static unsigned long aac_build_sg(Scsi_Cmnd* scsicmd, struct sgmap* psg)
                addr = pci_map_single(dev->pdev,
                                scsicmd->request_buffer,
                                scsicmd->request_bufflen,
-                               scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
+                               scsicmd->sc_data_direction);
                psg->count = cpu_to_le32(1);
                psg->sg[0].addr = cpu_to_le32(addr);
                psg->sg[0].count = cpu_to_le32(scsicmd->request_bufflen);  
@@ -1562,7 +1564,7 @@ static unsigned long aac_build_sg(Scsi_Cmnd* scsicmd, struct sgmap* psg)
 }
 
 
-static unsigned long aac_build_sg64(Scsi_Cmnd* scsicmd, struct sgmap64* psg)
+static unsigned long aac_build_sg64(struct scsi_cmnd* scsicmd, struct sgmap64* psg)
 {
        struct aac_dev *dev;
        unsigned long byte_count = 0;
@@ -1581,7 +1583,7 @@ static unsigned long aac_build_sg64(Scsi_Cmnd* scsicmd, struct sgmap64* psg)
                sg = (struct scatterlist *) scsicmd->request_buffer;
 
                sg_count = pci_map_sg(dev->pdev, sg, scsicmd->use_sg,
-                       scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
+                       scsicmd->sc_data_direction);
                psg->count = cpu_to_le32(sg_count);
 
                byte_count = 0;
@@ -1610,7 +1612,7 @@ static unsigned long aac_build_sg64(Scsi_Cmnd* scsicmd, struct sgmap64* psg)
                addr = pci_map_single(dev->pdev,
                                scsicmd->request_buffer,
                                scsicmd->request_bufflen,
-                               scsi_to_pci_dma_dir(scsicmd->sc_data_direction));
+                               scsicmd->sc_data_direction);
                psg->count = cpu_to_le32(1);
                le_addr = cpu_to_le64(addr);
                psg->sg[0].addr[1] = (u32)(le_addr>>32);
index b6da218..ea2efb9 100644 (file)
@@ -520,10 +520,6 @@ struct adapter_ops
 
 struct aac_driver_ident
 {
-       u16     vendor;
-       u16     device;
-       u16     subsystem_vendor;
-       u16     subsystem_device;
        int     (*init)(struct aac_dev *dev, unsigned long num);
        char *  name;
        char *  vname;
@@ -1466,6 +1462,8 @@ static inline u32 cap_to_cyls(sector_t capacity, u32 divisor)
        return (u32)capacity;
 }
 
+struct scsi_cmnd;
+
 const char *aac_driverinfo(struct Scsi_Host *);
 struct fib *fib_alloc(struct aac_dev *dev);
 int fib_setup(struct aac_dev *dev);
@@ -1480,10 +1478,9 @@ int aac_consumer_avail(struct aac_dev * dev, struct aac_queue * q);
 void aac_consumer_free(struct aac_dev * dev, struct aac_queue * q, u32 qnum);
 int fib_complete(struct fib * context);
 #define fib_data(fibctx) ((void *)(fibctx)->hw_fib->data)
-int aac_detach(struct aac_dev *dev);
 struct aac_dev *aac_init_adapter(struct aac_dev *dev);
 int aac_get_containers(struct aac_dev *dev);
-int aac_scsi_cmd(Scsi_Cmnd *scsi_cmnd_ptr);
+int aac_scsi_cmd(struct scsi_cmnd *cmd);
 int aac_dev_ioctl(struct aac_dev *dev, int cmd, void *arg);
 int aac_do_ioctl(struct aac_dev * dev, int cmd, void *arg);
 int aac_rx_init(struct aac_dev *dev, unsigned long devNumber);
@@ -1495,3 +1492,4 @@ int aac_close_fib_context(struct aac_dev * dev, struct aac_fib_context *fibctx);
 int fib_adapter_complete(struct fib * fibptr, unsigned short size);
 struct aac_driver_ident* aac_get_driver_ident(int devtype);
 int aac_get_adapter_info(struct aac_dev* dev);
+int aac_send_shutdown(struct aac_dev *dev);
index 7e44a68..8ee29ca 100644 (file)
@@ -28,7 +28,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/spinlock.h>
 #include <linux/slab.h>
 #include <linux/completion.h>
+#include <linux/dma-mapping.h>
 #include <linux/blkdev.h>
 #include <asm/semaphore.h>
 #include <asm/uaccess.h>
-#include "scsi.h"
-#include "hosts.h"
 
 #include "aacraid.h"
 
@@ -439,16 +437,16 @@ int aac_send_raw_srb(struct aac_dev* dev, void* arg)
        
        switch(srbcmd->flags){
        case SRB_DataOut:
-               data_dir = SCSI_DATA_WRITE;
+               data_dir = DMA_TO_DEVICE;
                break;
        case (SRB_DataIn | SRB_DataOut):
-               data_dir = SCSI_DATA_UNKNOWN;  
+               data_dir = DMA_BIDIRECTIONAL;
                break;
        case SRB_DataIn:
-               data_dir = SCSI_DATA_READ;
+               data_dir = DMA_FROM_DEVICE;
                break;
        default:
-               data_dir = SCSI_DATA_NONE;
+               data_dir = DMA_NONE;
        }
        if( dev->pae_support ==1 ) {
                struct sgmap64* psg = (struct sgmap64*)&srbcmd->sg;
@@ -484,7 +482,7 @@ int aac_send_raw_srb(struct aac_dev* dev, void* arg)
                                        goto cleanup;
                                }
                        }
-                       addr = pci_map_single(dev->pdev, p, psg->sg[i].count, scsi_to_pci_dma_dir(data_dir));
+                       addr = pci_map_single(dev->pdev, p, psg->sg[i].count, data_dir);
 
                        le_addr = cpu_to_le64(addr);
                        psg->sg[i].addr[1] = (u32)(le_addr>>32);
@@ -526,7 +524,7 @@ int aac_send_raw_srb(struct aac_dev* dev, void* arg)
                                        goto cleanup;
                                }
                        }
-                       addr = pci_map_single(dev->pdev, p, psg->sg[i].count, scsi_to_pci_dma_dir(data_dir));
+                       addr = pci_map_single(dev->pdev, p, psg->sg[i].count, data_dir);
 
                        psg->sg[i].addr = cpu_to_le32(addr);
                        psg->sg[i].count = cpu_to_le32(psg->sg[i].count);  
index 87671a1..32849f2 100644 (file)
@@ -29,7 +29,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/completion.h>
 #include <linux/mm.h>
 #include <asm/semaphore.h>
-#include "scsi.h"
-#include "hosts.h"
 
 #include "aacraid.h"
 
 struct aac_common aac_config;
 
-static struct aac_dev *devices;
-
 static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long commsize, unsigned long commalign)
 {
        unsigned char *base;
@@ -163,7 +158,7 @@ static void aac_queue_init(struct aac_dev * dev, struct aac_queue * q, u32 *mem,
  *     This routine will send a VM_CloseAll (shutdown) request to the adapter.
  */
 
-static int aac_send_shutdown(struct aac_dev * dev)
+int aac_send_shutdown(struct aac_dev * dev)
 {
        struct fib * fibctx;
        struct aac_close *cmd;
@@ -191,35 +186,6 @@ static int aac_send_shutdown(struct aac_dev * dev)
 }
 
 /**
- *     aac_detach      -       detach adapter
- *     @detach: adapter to disconnect
- *
- *     Disconnect and shutdown an AAC based adapter, freeing resources
- *     as we go.
- */
-
-int aac_detach(struct aac_dev *detach)
-{
-       struct aac_dev **dev = &devices;
-       
-       while(*dev)
-       {
-               if(*dev == detach)
-               {
-                       *dev = detach->next;
-                       aac_send_shutdown(detach);
-                       fib_map_free(detach);
-                       pci_free_consistent(detach->pdev, detach->comm_size, detach->comm_addr, detach->comm_phys);
-                       kfree(detach->queues);
-                       return 1;
-               }
-               dev=&((*dev)->next);
-       }
-       BUG();
-       return 0;
-}
-
-/**
  *     aac_comm_init   -       Initialise FSA data structures
  *     @dev:   Adapter to initialise
  *
@@ -344,11 +310,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
                
        INIT_LIST_HEAD(&dev->fib_list);
        init_completion(&dev->aif_completion);
-       /*
-        *      Add this adapter in to our dev List.
-        */
-       dev->next = devices;
-       devices = dev;
+
        return dev;
 }
 
index 85d43ec..0465af2 100644 (file)
@@ -3,7 +3,6 @@
  *     (c) Copyright 2001 Red Hat Inc. <alan@redhat.com>
  *
  * based on the old aacraid driver that is..
-
  * Adaptec aacraid device driver for Linux.
  *
  * Copyright (c) 2000 Adaptec, Inc. (aacraid@adaptec.com)
  * Abstract: Contain all routines that are required for FSA host/adapter
  *    commuication.
  *
- *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
 #include <linux/spinlock.h>
 #include <linux/slab.h>
 #include <linux/completion.h>
-#include <asm/semaphore.h>
 #include <linux/blkdev.h>
-#include "scsi.h"
-#include "hosts.h"
+#include <asm/semaphore.h>
 
 #include "aacraid.h"
 
index e4fdddb..3517d28 100644 (file)
@@ -29,7 +29,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
@@ -40,8 +39,6 @@
 #include <linux/completion.h>
 #include <linux/blkdev.h>
 #include <asm/semaphore.h>
-#include "scsi.h"
-#include "hosts.h"
 
 #include "aacraid.h"
 
index aacadf8..3059bbd 100644 (file)
  *   linit.c
  *
  * Abstract: Linux Driver entry module for Adaptec RAID Array Controller
- *                             
- *     Provides the following driver entry points:
- *             aac_detect()
- *             aac_release()
- *             aac_queuecommand()
- *             aac_resetcommand()
- *             aac_biosparm()
- *     
  */
 
-#define AAC_DRIVER_VERSION             "1.1.2"
+#define AAC_DRIVER_VERSION             "1.1.2-lk1"
 #define AAC_DRIVER_BUILD_DATE          __DATE__
+#define AAC_DRIVERNAME                 "aacraid"
 
-#include <linux/module.h>
-#include <linux/config.h>
-#include <linux/kernel.h>
+#include <linux/blkdev.h>
+#include <linux/completion.h>
 #include <linux/init.h>
-#include <linux/types.h>
-#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/pci.h>
-#include <linux/spinlock.h>
 #include <linux/slab.h>
-#include <linux/completion.h>
-#include <linux/interrupt.h>
+#include <linux/spinlock.h>
 #include <asm/semaphore.h>
-#include <linux/blkdev.h>
-#include "scsi.h"
-#include "hosts.h"
+
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
+#include <scsi/scsi_tcq.h>
 #include <scsi/scsicam.h>
 
 #include "aacraid.h"
 
 
-#define AAC_DRIVERNAME "aacraid"
-
 MODULE_AUTHOR("Red Hat Inc and Adaptec");
-MODULE_DESCRIPTION("Supports Dell PERC2, 2/Si, 3/Si, 3/Di, Adaptec Advanced Raid Products, and HP NetRAID-4M devices. http://domsch.com/linux/ or http://linux.adaptec.com");
+MODULE_DESCRIPTION("Dell PERC2, 2/Si, 3/Si, 3/Di, "
+                  "Adaptec Advanced Raid Products, "
+                  "and HP NetRAID-4M SCSI driver");
 MODULE_LICENSE("GPL");
-MODULE_PARM(nondasd, "i");
+
+
+int nondasd = -1;
+module_param(nondasd, int, S_IRUGO|S_IWUSR);
 MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on");
-MODULE_PARM(paemode, "i");
-MODULE_PARM_DESC(paemode, "Control whether dma addressing is using PAE. 0=off, 1=on");
 
-int nondasd=-1;
-int paemode=-1;
+int paemode = -1;
+module_param(paemode, int, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(paemode, "Control whether dma addressing is using PAE. 0=off, 1=on");
 
 struct aac_dev *aac_devices[MAXIMUM_NUM_ADAPTERS];
-
-static unsigned aac_count = 0;
+static unsigned aac_count;
 static int aac_cfg_major = -1;
 
 /*
  * Because of the way Linux names scsi devices, the order in this table has
  * become important.  Check for on-board Raid first, add-in cards second.
+ *
+ * Note: The last field is used to index into aac_drivers below.
  */
+static struct pci_device_id aac_pci_tbl[] = {
+       { 0x1028, 0x0001, 0x1028, 0x0001, 0, 0, 0 }, /* PERC 2/Si */
+       { 0x1028, 0x0002, 0x1028, 0x0002, 0, 0, 1 }, /* PERC 3/Di */
+       { 0x1028, 0x0003, 0x1028, 0x0003, 0, 0, 2 }, /* PERC 3/Si */
+       { 0x1028, 0x0004, 0x1028, 0x00d0, 0, 0, 3 }, /* PERC 3/Si */
+       { 0x1028, 0x0002, 0x1028, 0x00d1, 0, 0, 4 }, /* PERC 3/Di */
+       { 0x1028, 0x0002, 0x1028, 0x00d9, 0, 0, 5 }, /* PERC 3/Di */
+       { 0x1028, 0x000a, 0x1028, 0x0106, 0, 0, 6 }, /* PERC 3/Di */
+       { 0x1028, 0x000a, 0x1028, 0x011b, 0, 0, 7 }, /* PERC 3/Di */
+       { 0x1028, 0x000a, 0x1028, 0x0121, 0, 0, 8 }, /* PERC 3/Di */
+       { 0x9005, 0x0283, 0x9005, 0x0283, 0, 0, 9 }, /* catapult*/
+       { 0x9005, 0x0284, 0x9005, 0x0284, 0, 0, 10 }, /* tomcat*/
+       { 0x9005, 0x0285, 0x9005, 0x0286, 0, 0, 11 }, /* Adaptec 2120S (Crusader)*/
+       { 0x9005, 0x0285, 0x9005, 0x0285, 0, 0, 12 }, /* Adaptec 2200S (Vulcan)*/
+       { 0x9005, 0x0285, 0x9005, 0x0287, 0, 0, 13 }, /* Adaptec 2200S (Vulcan-2m)*/
+       { 0x9005, 0x0285, 0x17aa, 0x0286, 0, 0, 14 }, /* Legend S220*/
+       { 0x9005, 0x0285, 0x17aa, 0x0287, 0, 0, 15 }, /* Legend S230*/
+
+       { 0x9005, 0x0285, 0x9005, 0x0288, 0, 0, 16 }, /* Adaptec 3230S (Harrier)*/
+       { 0x9005, 0x0285, 0x9005, 0x0289, 0, 0, 17 }, /* Adaptec 3240S (Tornado)*/
+       { 0x9005, 0x0285, 0x9005, 0x028a, 0, 0, 18 }, /* ASR-2020S PCI-X ZCR (Skyhawk)*/
+       { 0x9005, 0x0285, 0x9005, 0x028b, 0, 0, 19 }, /* ASR-2020S SO-DIMM PCI-X ZCR(Terminator)*/
+       { 0x9005, 0x0285, 0x9005, 0x0290, 0, 0, 20 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II)*/
+       { 0x9005, 0x0250, 0x1014, 0x0279, 0, 0, 21 }, /* (Marco)*/
+       { 0x9005, 0x0250, 0x1014, 0x028c, 0, 0, 22 }, /* (Sebring)*/
+
+       { 0x9005, 0x0285, 0x1028, 0x0287, 0, 0, 23 }, /* Perc 320/DC*/
+       { 0x1011, 0x0046, 0x9005, 0x0365, 0, 0, 24 }, /* Adaptec 5400S (Mustang)*/
+       { 0x1011, 0x0046, 0x9005, 0x0364, 0, 0, 25 }, /* Adaptec 5400S (Mustang)*/
+       { 0x1011, 0x0046, 0x9005, 0x1364, 0, 0, 26 }, /* Dell PERC2 "Quad Channel" */
+       { 0x1011, 0x0046, 0x103c, 0x10c2, 0, 0, 27 }, /* HP NetRAID-4M */
+       { 0,}
+};
+MODULE_DEVICE_TABLE(pci, aac_pci_tbl);
+
 /*
  * dmb - For now we add the number of channels to this structure.  
  * In the future we should add a fib that reports the number of channels
  * for the card.  At that time we can remove the channels from here
  */
 static struct aac_driver_ident aac_drivers[] = {
-       { 0x1028, 0x0001, 0x1028, 0x0001, aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 2/Si */
-       { 0x1028, 0x0002, 0x1028, 0x0002, aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
-       { 0x1028, 0x0003, 0x1028, 0x0003, aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Si */
-       { 0x1028, 0x0004, 0x1028, 0x00d0, aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Si */
-       { 0x1028, 0x0002, 0x1028, 0x00d1, aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
-       { 0x1028, 0x0002, 0x1028, 0x00d9, aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
-       { 0x1028, 0x000a, 0x1028, 0x0106, aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
-       { 0x1028, 0x000a, 0x1028, 0x011b, aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
-       { 0x1028, 0x000a, 0x1028, 0x0121, aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
-       { 0x9005, 0x0283, 0x9005, 0x0283, aac_rx_init, "aacraid",  "ADAPTEC ", "catapult        ", 2 }, /* catapult*/
-       { 0x9005, 0x0284, 0x9005, 0x0284, aac_rx_init, "aacraid",  "ADAPTEC ", "tomcat          ", 2 }, /* tomcat*/
-       { 0x9005, 0x0285, 0x9005, 0x0286, aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1 }, /* Adaptec 2120S (Crusader)*/
-       { 0x9005, 0x0285, 0x9005, 0x0285, aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2 }, /* Adaptec 2200S (Vulcan)*/
-       { 0x9005, 0x0285, 0x9005, 0x0287, aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2 }, /* Adaptec 2200S (Vulcan-2m)*/
-       { 0x9005, 0x0285, 0x17aa, 0x0286, aac_rx_init, "aacraid",  "Legend  ", "Legend S220     ", 1 }, /* Legend S220*/
-       { 0x9005, 0x0285, 0x17aa, 0x0287, aac_rx_init, "aacraid",  "Legend  ", "Legend S230     ", 2 }, /* Legend S230*/
-
-       { 0x9005, 0x0285, 0x9005, 0x0288, aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 3230S   ", 2 }, /* Adaptec 3230S (Harrier)*/
-       { 0x9005, 0x0285, 0x9005, 0x0289, aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 3240S   ", 2 }, /* Adaptec 3240S (Tornado)*/
-       { 0x9005, 0x0285, 0x9005, 0x028a, aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2020S PCI-X ", 2 }, /* ASR-2020S PCI-X ZCR (Skyhawk)*/
-       { 0x9005, 0x0285, 0x9005, 0x028b, aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2020S PCI-X ", 2 }, /* ASR-2020S SO-DIMM PCI-X ZCR(Terminator)*/
-       { 0x9005, 0x0285, 0x9005, 0x0290, aac_rx_init, "aacraid",  "ADAPTEC ", "AAR-2410SA SATA ", 2 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II)*/
-       { 0x9005, 0x0250, 0x1014, 0x0279, aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec         ", 2 }, /* (Marco)*/
-       { 0x9005, 0x0250, 0x1014, 0x028c, aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec         ", 2 }, /* (Sebring)*/
-
-       { 0x9005, 0x0285, 0x1028, 0x0287, aac_rx_init, "percraid", "DELL    ", "PERC 320/DC     ", 2 }, /* Perc 320/DC*/
-       { 0x1011, 0x0046, 0x9005, 0x0365, aac_sa_init, "aacraid",  "ADAPTEC ", "Adaptec 5400S   ", 4 }, /* Adaptec 5400S (Mustang)*/
-       { 0x1011, 0x0046, 0x9005, 0x0364, aac_sa_init, "aacraid",  "ADAPTEC ", "AAC-364         ", 4 }, /* Adaptec 5400S (Mustang)*/
-       { 0x1011, 0x0046, 0x9005, 0x1364, aac_sa_init, "percraid", "DELL    ", "PERCRAID        ", 4 }, /* Dell PERC2 "Quad Channel" */
-       { 0x1011, 0x0046, 0x103c, 0x10c2, aac_sa_init, "hpnraid",  "HP      ", "NetRAID         ", 4 }  /* HP NetRAID-4M */
+       { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 2/Si */
+       { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
+       { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Si */
+       { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Si */
+       { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
+       { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
+       { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
+       { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
+       { aac_rx_init, "percraid", "DELL    ", "PERCRAID        ", 2 }, /* PERC 3/Di */
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "catapult        ", 2 }, /* catapult*/
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "tomcat          ", 2 }, /* tomcat*/
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2120S   ", 1 }, /* Adaptec 2120S (Crusader)*/
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2 }, /* Adaptec 2200S (Vulcan)*/
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 2200S   ", 2 }, /* Adaptec 2200S (Vulcan-2m)*/
+       { aac_rx_init, "aacraid",  "Legend  ", "Legend S220     ", 1 }, /* Legend S220*/
+       { aac_rx_init, "aacraid",  "Legend  ", "Legend S230     ", 2 }, /* Legend S230*/
+
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 3230S   ", 2 }, /* Adaptec 3230S (Harrier)*/
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec 3240S   ", 2 }, /* Adaptec 3240S (Tornado)*/
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2020S PCI-X ", 2 }, /* ASR-2020S PCI-X ZCR (Skyhawk)*/
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "ASR-2020S PCI-X ", 2 }, /* ASR-2020S SO-DIMM PCI-X ZCR(Terminator)*/
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "AAR-2410SA SATA ", 2 }, /* AAR-2410SA PCI SATA 4ch (Jaguar II)*/
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec         ", 2 }, /* (Marco)*/
+       { aac_rx_init, "aacraid",  "ADAPTEC ", "Adaptec         ", 2 }, /* (Sebring)*/
+
+       { aac_rx_init, "percraid", "DELL    ", "PERC 320/DC     ", 2 }, /* Perc 320/DC*/
+       { aac_sa_init, "aacraid",  "ADAPTEC ", "Adaptec 5400S   ", 4 }, /* Adaptec 5400S (Mustang)*/
+       { aac_sa_init, "aacraid",  "ADAPTEC ", "AAC-364         ", 4 }, /* Adaptec 5400S (Mustang)*/
+       { aac_sa_init, "percraid", "DELL    ", "PERCRAID        ", 4 }, /* Dell PERC2 "Quad Channel" */
+       { aac_sa_init, "hpnraid",  "HP      ", "NetRAID         ", 4 }  /* HP NetRAID-4M */
 };
 
-#define NUM_AACTYPES   (sizeof(aac_drivers) / sizeof(struct aac_driver_ident))
-static int num_aacdrivers = NUM_AACTYPES;
-
-static int aac_cfg_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg);
-static int aac_cfg_open(struct inode * inode, struct file * file);
-static int aac_cfg_release(struct inode * inode,struct file * file);
-
-static struct file_operations aac_cfg_fops = {
-       .owner          = THIS_MODULE,
-       .ioctl          = aac_cfg_ioctl,
-       .open           = aac_cfg_open,
-       .release        = aac_cfg_release
-};
-
-static int aac_detect(Scsi_Host_Template *);
-static int aac_release(struct Scsi_Host *);
-static int aac_queuecommand(Scsi_Cmnd *, void (*CompletionRoutine)(Scsi_Cmnd *));
-static int aac_biosparm(struct scsi_device *, struct block_device *,
-                       sector_t, int *);
-static int aac_ioctl(Scsi_Device *, int, void *);
-static int aac_eh_abort(Scsi_Cmnd * cmd);
-static int aac_eh_device_reset(Scsi_Cmnd* cmd);
-static int aac_eh_bus_reset(Scsi_Cmnd* cmd);
-static int aac_eh_reset(Scsi_Cmnd* cmd);
-
-static int aac_slave_configure(struct scsi_device *);
-
-/**
- *     aac_detect      -       Probe for aacraid cards
- *     @template: SCSI driver template
- *
- *     Probe for AAC Host Adapters initialize, register, and report the 
- *     configuration of each AAC Host Adapter found.
- *     Returns the number of adapters successfully initialized and 
- *     registered.
- *     Initializes all data necessary for this particular SCSI driver.
- *     Notes:
- *     The detect routine must not call any of the mid level functions 
- *     to queue commands because things are not guaranteed to be set 
- *     up yet. The detect routine can send commands to the host adapter 
- *     as long as the program control will not be passed to scsi.c in 
- *     the processing of the command. Note especially that 
- *     scsi_malloc/scsi_free must not be called.
- *
- */
-static int aac_detect(Scsi_Host_Template *template)
-{
-       int index;
-       int container;
-       u16 vendor_id, device_id;
-       struct Scsi_Host *host_ptr;
-       struct pci_dev *dev = NULL;
-       struct aac_dev *aac;
-       struct fsa_scsi_hba *fsa_dev_ptr;
-       char *name = NULL;
-       
-       printk(KERN_INFO "Red Hat/Adaptec aacraid driver (%s %s)\n", AAC_DRIVER_VERSION, AAC_DRIVER_BUILD_DATE);
-
-       /* setting up the proc directory structure */
-       template->proc_name = "aacraid";
-
-       for( index = 0; index != num_aacdrivers; index++ ) {
-               device_id = aac_drivers[index].device;
-               vendor_id = aac_drivers[index].vendor;
-               name = aac_drivers[index].name;
-               dprintk((KERN_DEBUG "Checking %s %x/%x/%x/%x.\n", 
-                       name, vendor_id, device_id,
-                       aac_drivers[index].subsystem_vendor,
-                       aac_drivers[index].subsystem_device));
-
-               dev = NULL;
-               while((dev = pci_find_device(vendor_id, device_id, dev))) {
-                       if (pci_enable_device(dev))
-                               continue;
-                       pci_set_master(dev);
-                       pci_set_dma_mask(dev, 0xFFFFFFFFULL);
-
-                       if((dev->subsystem_vendor != aac_drivers[index].subsystem_vendor) || 
-                          (dev->subsystem_device != aac_drivers[index].subsystem_device))
-                                       continue;
-
-                       dprintk((KERN_DEBUG "%s device detected.\n", name));
-                       dprintk((KERN_DEBUG "%x/%x/%x/%x.\n", vendor_id, device_id, 
-                               aac_drivers[index].subsystem_vendor, aac_drivers[index].subsystem_device));
-                       /* Increment the host adapter count */
-                       aac_count++;
-                       /*
-                        * scsi_register() allocates memory for a Scsi_Hosts structure and
-                        * links it into the linked list of host adapters. This linked list
-                        * contains the data for all possible <supported> scsi hosts.
-                        * This is similar to the Scsi_Host_Template, except that we have
-                        * one entry for each actual physical host adapter on the system,
-                        * stored as a linked list. If there are two AAC boards, then we
-                        * will need to make two Scsi_Host entries, but there will be only
-                        * one Scsi_Host_Template entry. The second argument to scsi_register()
-                        * specifies the size of the extra memory we want to hold any device 
-                        * specific information.
-                        */
-                       host_ptr = scsi_register( template, sizeof(struct aac_dev) );
-                       /* 
-                        * These three parameters can be used to allow for wide SCSI 
-                        * and for host adapters that support multiple buses.
-                        */
-                       host_ptr->irq = dev->irq;               /* Adapter IRQ number */
-                       /* host_ptr->base = ( char * )(dev->resource[0].start & ~0xff); */
-                       host_ptr->base = dev->resource[0].start;
-                       scsi_set_device(host_ptr, &dev->dev);
-                       dprintk((KERN_DEBUG "Device base address = 0x%lx [0x%lx].\n", host_ptr->base, dev->resource[0].start));
-                       dprintk((KERN_DEBUG "Device irq = 0x%x.\n", dev->irq));
-                       /*
-                        * The unique_id field is a unique identifier that must
-                        * be assigned so that we have some way of identifying
-                        * each host adapter properly and uniquely. For hosts 
-                        * that do not support more than one card in the
-                        * system, this does not need to be set. It is
-                        * initialized to zero in scsi_register(). This is the 
-                        * value returned as aac->id.
-                        */
-                       host_ptr->unique_id = aac_count - 1;
-                       aac = (struct aac_dev *)host_ptr->hostdata;
-                       /* attach a pointer back to Scsi_Host */
-                       aac->scsi_host_ptr = host_ptr;  
-                       aac->pdev = dev;
-                       aac->name = aac->scsi_host_ptr->hostt->name;
-                       aac->id = aac->scsi_host_ptr->unique_id;
-                       aac->cardtype =  index;
-
-                       aac->fibs = (struct fib*) kmalloc(sizeof(struct fib)*AAC_NUM_FIB, GFP_KERNEL);
-                       spin_lock_init(&aac->fib_lock);
-
-                       /* Initialize the ordinal number of the device to -1 */
-                       fsa_dev_ptr = &(aac->fsa_dev);
-                       for( container = 0; container < MAXIMUM_NUM_CONTAINERS; container++ )
-                               fsa_dev_ptr->devname[container][0] = '\0';
-
-                       dprintk((KERN_DEBUG "Initializing Hardware...\n"));
-                       if((*aac_drivers[index].init)(aac , host_ptr->unique_id) != 0)
-                       {
-                               /* device initialization failed */
-                               printk(KERN_WARNING "aacraid: device initialization failed.\n");
-                               scsi_unregister(host_ptr);
-                               aac_count--;
-                               continue;
-                       } 
-                       dprintk((KERN_DEBUG "%s:%d device initialization successful.\n", name, host_ptr->unique_id));
-                       aac_get_adapter_info(aac);
-                       if(aac->nondasd_support == 1){
-                       /*
-                        * max channel will be the physical channels plus 1 virtual channel 
-                        * all containers are on the virtual channel 0
-                        * physical channels are address by their actual physical number+1
-                        */
-                               host_ptr->max_channel = aac_drivers[index].channels+1;
-                       } else {
-                               host_ptr->max_channel = 1;
-                       }
-                       dprintk((KERN_DEBUG "Device has %d logical channels\n",host_ptr->max_channel));
-                       aac_get_containers(aac);
-                       aac_devices[aac_count-1] = aac;
-//                     spin_unlock_irqrestore(&aac->fib_lock, flags);
-
-                       /*
-                        * dmb - we may need to move the setting of these parms somewhere else once
-                        * we get a fib that can report the actual numbers
-                        */
-                       host_ptr->max_id = AAC_MAX_TARGET;
-                       host_ptr->max_lun = AAC_MAX_LUN;
-
-               }
-       }
-
-       if( aac_count ){
-               if((aac_cfg_major = register_chrdev( 0, "aac", &aac_cfg_fops))<0)
-                       printk(KERN_WARNING "aacraid: unable to register \"aac\" device.\n");
-       }
-
-       return aac_count;
-}
-
-/**
- *     aac_release     -       release SCSI host resources
- *     @host_ptr: SCSI host to clean up
- *
- *     Release all resources previously acquired to support a specific Host 
- *     Adapter and unregister the AAC Host Adapter.
- *
- *     BUGS: Does not wait for the thread it kills to die.
- */
-
-static int aac_release(struct Scsi_Host *host_ptr)
-{
-       struct aac_dev *dev;
-       dprintk((KERN_DEBUG "aac_release.\n"));
-       dev = (struct aac_dev *)host_ptr->hostdata;
-       /*
-        *      kill any threads we started
-        */
-       kill_proc(dev->thread_pid, SIGKILL, 0);
-       wait_for_completion(&dev->aif_completion);
-       /*
-        *      Call the comm layer to detach from this adapter
-        */
-       aac_detach(dev);
-       /* Check free orderings... */
-       /* remove interrupt binding */
-       free_irq(host_ptr->irq, dev);
-       iounmap((void * )dev->regs.sa);
-       /* unregister adapter */
-       scsi_unregister(host_ptr);
-       /*
-        *      FIXME: This assumes no hot plugging is going on...
-        */
-       if( aac_cfg_major >= 0 )
-       {
-               unregister_chrdev(aac_cfg_major, "aac");
-               aac_cfg_major = -1;
-       }
-       return 0;
-}
-
 /**
  *     aac_queuecommand        -       queue a SCSI command
- *     @scsi_cmnd_ptr: SCSI command to queue
- *     @CompletionRoutine: Function to call on command completion
+ *     @cmd:           SCSI command to queue
+ *     @done:          Function to call on command completion
  *
  *     Queues a command for execution by the associated Host Adapter.
+ *
+ *     TODO: unify with aac_scsi_cmd().
  */ 
 
-static int aac_queuecommand(Scsi_Cmnd *scsi_cmnd_ptr, void (*CompletionRoutine)(Scsi_Cmnd *))
+static int aac_queuecommand(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
 {
-       int ret;
-
-       scsi_cmnd_ptr->scsi_done = CompletionRoutine;
-       /*
-        *      aac_scsi_cmd() handles command processing, setting the 
-        *      result code and calling completion routine. 
-        */
-       if((ret = aac_scsi_cmd(scsi_cmnd_ptr)) != 0){
-               dprintk((KERN_DEBUG "aac_scsi_cmd failed.\n"));
-               return FAILED;
-       }
-       return ret;
+       cmd->scsi_done = done;
+       return (aac_scsi_cmd(cmd) ? FAILED : 0);
 } 
 
 /**
- *     aac_driverinfo          -       Returns the host adapter name
- *     @host_ptr:      Scsi host to report on
+ *     aac_info                -       Returns the host adapter name
+ *     @shost:         Scsi host to report on
  *
  *     Returns a static string describing the device in question
  */
 
-const char *aac_driverinfo(struct Scsi_Host *host_ptr)
+const char *aac_info(struct Scsi_Host *shost)
 {
-       struct aac_dev *dev = (struct aac_dev *)host_ptr->hostdata;
+       struct aac_dev *dev = (struct aac_dev *)shost->hostdata;
        return aac_drivers[dev->cardtype].name;
 }
 
@@ -382,9 +186,10 @@ const char *aac_driverinfo(struct Scsi_Host *host_ptr)
  *
  *     Returns a pointer to the entry in the driver lookup table.
  */
+
 struct aac_driver_ident* aac_get_driver_ident(int devtype)
 {
-       return  &aac_drivers[devtype];
+       return &aac_drivers[devtype];
 }
 
 /**
@@ -420,66 +225,48 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
        /*
         *      Assuming extended translation is enabled - #REVISIT#
         */
-       if( capacity >= 2 * 1024 * 1024 ) /* 1 GB in 512 byte sectors */
-       {
-               if( capacity >= 4 * 1024 * 1024 ) /* 2 GB in 512 byte sectors */
-               {
+       if (capacity >= 2 * 1024 * 1024) { /* 1 GB in 512 byte sectors */
+               if(capacity >= 4 * 1024 * 1024) { /* 2 GB in 512 byte sectors */
                        param->heads = 255;
                        param->sectors = 63;
-               }
-               else
-               {
+               } else {
                        param->heads = 128;
                        param->sectors = 32;
                }
-       }
-       else
-       {
+       } else {
                param->heads = 64;
                param->sectors = 32;
        }
 
        param->cylinders = cap_to_cyls(capacity, param->heads * param->sectors);
 
-       /*
-        *      Read the first 1024 bytes from the disk device
-        */
-
-       buf = scsi_bios_ptable(bdev);
-
        /* 
-        *      If the boot sector partition table is valid, search for a partition 
-        *      table entry whose end_head matches one of the standard geometry 
+        *      Read the first 1024 bytes from the disk device, if the boot
+        *      sector partition table is valid, search for a partition table
+        *      entry whose end_head matches one of the standard geometry 
         *      translations ( 64/32, 128/32, 255/63 ).
         */
-        
-       if(*(unsigned short *)(buf + 0x40) == cpu_to_le16(0xaa55))
-       {
+       buf = scsi_bios_ptable(bdev);
+       if(*(unsigned short *)(buf + 0x40) == cpu_to_le16(0xaa55)) {
                struct partition *first = (struct partition * )buf;
                struct partition *entry = first;
                int saved_cylinders = param->cylinders;
                int num;
                unsigned char end_head, end_sec;
 
-               for(num = 0; num < 4; num++)
-               {
+               for(num = 0; num < 4; num++) {
                        end_head = entry->end_head;
                        end_sec = entry->end_sector & 0x3f;
 
-                       if(end_head == 63)
-                       {
+                       if(end_head == 63) {
                                param->heads = 64;
                                param->sectors = 32;
                                break;
-                       }
-                       else if(end_head == 127)
-                       {
+                       } else if(end_head == 127) {
                                param->heads = 128;
                                param->sectors = 32;
                                break;
-                       }
-                       else if(end_head == 254) 
-                       {
+                       } else if(end_head == 254) {
                                param->heads = 255;
                                param->sectors = 63;
                                break;
@@ -487,22 +274,17 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
                        entry++;
                }
 
-               if(num == 4)
-               {
+               if (num == 4) {
                        end_head = first->end_head;
                        end_sec = first->end_sector & 0x3f;
                }
 
                param->cylinders = cap_to_cyls(capacity, param->heads * param->sectors);
-
-               if(num < 4 && end_sec == param->sectors)
-               {
-                       if(param->cylinders != saved_cylinders)
+               if (num < 4 && end_sec == param->sectors) {
+                       if (param->cylinders != saved_cylinders)
                                dprintk((KERN_DEBUG "Adopting geometry: heads=%d, sectors=%d from partition table %d.\n",
                                        param->heads, param->sectors, num));
-               }
-               else if(end_head > 0 || end_sec > 0)
-               {
+               } else if (end_head > 0 || end_sec > 0) {
                        dprintk((KERN_DEBUG "Strange geometry: heads=%d, sectors=%d in partition table %d.\n",
                                end_head + 1, end_sec, num));
                        dprintk((KERN_DEBUG "Using geometry: heads=%d, sectors=%d.\n",
@@ -515,42 +297,36 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
 
 /**
  *     aac_queuedepth          -       compute queue depths
- *     @host:  SCSI host in question
- *     @dev:   SCSI device we are considering
+ *     @sdev:  SCSI device we are considering
  *
  *     Selects queue depths for each target device based on the host adapter's
  *     total capacity and the queue depth supported by the target device.
  *     A queue depth of one automatically disables tagged queueing.
  */
 
-static int aac_slave_configure(struct scsi_device * dev )
+static int aac_slave_configure(struct scsi_device *sdev)
 {
-       if(dev->tagged_supported)
-               scsi_adjust_queue_depth(dev, MSG_ORDERED_TAG, 128);
+       if (sdev->tagged_supported)
+               scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, 128);
        else
-               scsi_adjust_queue_depth(dev, 0, 1);
-
-       dprintk((KERN_DEBUG "(scsi%d:%d:%d:%d) Tagged Queue depth %2d, "
-                               "%s\n", dev->host->host_no, dev->channel,
-                               dev->id, dev->lun, dev->queue_depth,
-                               dev->online ? "OnLine" : "OffLine"));
+               scsi_adjust_queue_depth(sdev, 0, 1);
        return 0;
 }
 
-/*------------------------------------------------------------------------------
-       aac_ioctl()
-
-               Handle SCSI ioctls
- *----------------------------------------------------------------------------*/
-static int aac_ioctl(Scsi_Device * scsi_dev_ptr, int cmd, void * arg)
-/*----------------------------------------------------------------------------*/
+static int aac_ioctl(struct scsi_device *sdev, int cmd, void * arg)
 {
-       struct aac_dev *dev;
-       dprintk((KERN_DEBUG "aac_ioctl.\n"));
-       dev = (struct aac_dev *)scsi_dev_ptr->host->hostdata;
+       struct aac_dev *dev = (struct aac_dev *)sdev->host->hostdata;
        return aac_do_ioctl(dev, cmd, arg);
 }
 
+/*
+ * XXX: does aac really need no error handling??
+ */
+static int aac_eh_abort(struct scsi_cmnd *cmd)
+{
+       return FAILED;
+}
+
 /**
  *     aac_cfg_open            -       open a configuration file
  *     @inode: inode being opened
@@ -563,25 +339,13 @@ static int aac_ioctl(Scsi_Device * scsi_dev_ptr, int cmd, void * arg)
  *     so we can support hot plugging, and to ref count adapters.
  */
 
-static int aac_cfg_open(struct inode * inode, struct file * file )
+static int aac_cfg_open(struct inode *inode, struct file *file)
 {
-       unsigned minor_number = iminor(inode);
-       if(minor_number >= aac_count)
-               return -ENODEV;
-       return 0;
-}
+       unsigned minor = iminor(inode);
 
-/**
- *     aac_cfg_release         -       close down an AAC config device
- *     @inode: inode of configuration file
- *     @file: file handle of configuration file
- *     
- *     Called when the last close of the configuration file handle
- *     is performed.
- */
-static int aac_cfg_release(struct inode * inode, struct file * file )
-{
+       if (minor >= aac_count)
+               return -ENODEV;
+       file->private_data = aac_devices[minor];
        return 0;
 }
 
@@ -599,83 +363,205 @@ static int aac_cfg_release(struct inode * inode, struct file * file )
  *     Bugs: Needs to handle hot plugging
  */
  
-static int aac_cfg_ioctl(struct inode * inode,  struct file * file, unsigned int cmd, unsigned long arg )
+static int aac_cfg_ioctl(struct inode *inode,  struct file *file,
+               unsigned int cmd, unsigned long arg)
 {
-       struct aac_dev *dev = aac_devices[iminor(inode)];
-       return aac_do_ioctl(dev, cmd, (void *)arg);
+       return aac_do_ioctl(file->private_data, cmd, (void *)arg);
 }
 
-/*
- *     To use the low level SCSI driver support using the linux kernel loadable 
- *     module interface we should initialize the global variable driver_interface  
- *     (datatype Scsi_Host_Template) and then include the file scsi_module.c.
- */
-static Scsi_Host_Template driver_template = {
+static struct file_operations aac_cfg_fops = {
+       .owner          = THIS_MODULE,
+       .ioctl          = aac_cfg_ioctl,
+       .open           = aac_cfg_open,
+};
+
+static struct scsi_host_template aac_driver_template = {
        .module                         = THIS_MODULE,
        .name                           = "AAC",
-       .detect                         = aac_detect,
-       .release                        = aac_release,
-       .info                           = aac_driverinfo,
+       .proc_name                      = "aacraid",
+       .info                           = aac_info,
        .ioctl                          = aac_ioctl,
        .queuecommand                   = aac_queuecommand,
        .bios_param                     = aac_biosparm, 
        .slave_configure                = aac_slave_configure,
+       .eh_abort_handler               = aac_eh_abort,
        .can_queue                      = AAC_NUM_IO_FIB,       
        .this_id                        = 16,
        .sg_tablesize                   = 16,
        .max_sectors                    = 128,
        .cmd_per_lun                    = AAC_NUM_IO_FIB, 
-       .eh_abort_handler               = aac_eh_abort,
-       .eh_device_reset_handler        = aac_eh_device_reset,
-       .eh_bus_reset_handler           = aac_eh_bus_reset,
-       .eh_host_reset_handler          = aac_eh_reset,
        .use_clustering                 = ENABLE_CLUSTERING,
 };
 
-/*===========================================================================
- * Error Handling routines
- *===========================================================================
- */
 
-
-/*
- *
- * We don't support abortting commands.
- */
-static int aac_eh_abort(Scsi_Cmnd * scsicmd)
+static int __devinit aac_probe_one(struct pci_dev *pdev,
+               const struct pci_device_id *id)
 {
-       printk("aacraid: abort failed\n");
-       return FAILED;
+       unsigned index = id->driver_data;
+       struct Scsi_Host *shost;
+       struct fsa_scsi_hba *fsa_dev_ptr;
+       struct aac_dev *aac;
+       int container;
+       int error = -ENODEV;
+
+       if (pci_enable_device(pdev))
+               goto out;
+
+       if (pci_set_dma_mask(pdev, 0xFFFFFFFFULL))
+               goto out;
+       
+       pci_set_master(pdev);
+
+       /* Increment the host adapter count */
+       aac_count++;
+
+       shost = scsi_host_alloc(&aac_driver_template, sizeof(struct aac_dev));
+       if (!shost)
+               goto out_disable_pdev;
+
+       shost->irq = pdev->irq;
+       shost->base = pci_resource_start(pdev, 0);
+       shost->unique_id = aac_count - 1;
+
+       aac = (struct aac_dev *)shost->hostdata;
+       aac->scsi_host_ptr = shost;     
+       aac->pdev = pdev;
+       aac->name = aac_driver_template.name;
+       aac->id = shost->unique_id;
+       aac->cardtype =  index;
+
+       aac->fibs = kmalloc(sizeof(struct fib) * AAC_NUM_FIB, GFP_KERNEL);
+       if (!aac->fibs)
+               goto out_free_host;
+       spin_lock_init(&aac->fib_lock);
+
+       /* Initialize the ordinal number of the device to -1 */
+       fsa_dev_ptr = &aac->fsa_dev;
+       for (container = 0; container < MAXIMUM_NUM_CONTAINERS; container++)
+               fsa_dev_ptr->devname[container][0] = '\0';
+
+       if ((*aac_drivers[index].init)(aac , shost->unique_id))
+               goto out_free_fibs;
+
+       aac_get_adapter_info(aac);
+
+       /*
+        * max channel will be the physical channels plus 1 virtual channel
+        * all containers are on the virtual channel 0
+        * physical channels are address by their actual physical number+1
+        */
+       if (aac->nondasd_support == 1)
+               shost->max_channel = aac_drivers[index].channels+1;
+       else
+               shost->max_channel = 1;
+
+       aac_get_containers(aac);
+       aac_devices[aac_count-1] = aac;
+
+       /*
+        * dmb - we may need to move the setting of these parms somewhere else once
+        * we get a fib that can report the actual numbers
+        */
+       shost->max_id = AAC_MAX_TARGET;
+       shost->max_lun = AAC_MAX_LUN;
+
+       error = scsi_add_host(shost, &pdev->dev);
+       if (error)
+               goto out_deinit;
+
+       pci_set_drvdata(pdev, shost);
+       scsi_scan_host(shost);
+
+       return 0;
+
+ out_deinit:
+       kill_proc(aac->thread_pid, SIGKILL, 0);
+       wait_for_completion(&aac->aif_completion);
+
+       aac_send_shutdown(aac);
+       fib_map_free(aac);
+       pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys);
+       kfree(aac->queues);
+       free_irq(pdev->irq, aac);
+       iounmap((void * )aac->regs.sa);
+ out_free_fibs:
+       kfree(aac->fibs);
+ out_free_host:
+       scsi_host_put(shost);
+ out_disable_pdev:
+       pci_disable_device(pdev);
+       aac_count--;
+ out:
+       return error;
 }
 
-/*
- * We don't support device resets.
- */
-static int aac_eh_device_reset(Scsi_Cmnd* cmd)
+static void __devexit aac_remove_one(struct pci_dev *pdev)
 {
-       printk("aacraid: device reset failed\n");
-       return FAILED;
-}
+       struct Scsi_Host *shost = pci_get_drvdata(pdev);
+       struct aac_dev *aac = (struct aac_dev *)shost->hostdata;
 
+       scsi_remove_host(shost);
 
-static int aac_eh_bus_reset(Scsi_Cmnd* cmd)
-{
-       printk("aacraid: bus reset failed\n");
-       return FAILED;
+       kill_proc(aac->thread_pid, SIGKILL, 0);
+       wait_for_completion(&aac->aif_completion);
+
+       aac_send_shutdown(aac);
+       fib_map_free(aac);
+       pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr,
+                       aac->comm_phys);
+       kfree(aac->queues);
+
+       free_irq(pdev->irq, aac);
+       iounmap((void * )aac->regs.sa);
+       
+       kfree(aac->fibs);
+       
+       scsi_host_put(shost);
+       pci_disable_device(pdev);
+
+       /*
+        * We don't decrement aac_count here because adapters can be unplugged
+        * in a different order than they were detected.  If we're ever going
+        * to overflow MAXIMUM_NUM_ADAPTERS we'll have to consider using a
+        * bintmap of free aac_devices slots.
+        */
+#if 0
+       aac_count--;
+#endif
 }
 
-static int aac_eh_reset(Scsi_Cmnd* cmd)
+static struct pci_driver aac_pci_driver = {
+       .name           = AAC_DRIVERNAME,
+       .id_table       = aac_pci_tbl,
+       .probe          = aac_probe_one,
+       .remove         = __devexit_p(aac_remove_one),
+};
+
+static int __init aac_init(void)
 {
-       printk("aacraid: hba reset failed\n");
-       return FAILED;
-}
+       int error;
+       
+       printk(KERN_INFO "Red Hat/Adaptec aacraid driver (%s %s)\n",
+                       AAC_DRIVER_VERSION, AAC_DRIVER_BUILD_DATE);
 
+       error = pci_module_init(&aac_pci_driver);
+       if (error)
+               return error;
 
-/*===========================================================================
- * 
- *===========================================================================
- */
+       aac_cfg_major = register_chrdev( 0, "aac", &aac_cfg_fops);
+       if (aac_cfg_major < 0) {
+               printk(KERN_WARNING
+                      "aacraid: unable to register \"aac\" device.\n");
+       }
 
+       return 0;
+}
+
+static void __exit aac_exit(void)
+{
+       unregister_chrdev(aac_cfg_major, "aac");
+       pci_unregister_driver(&aac_pci_driver);
+}
 
-#include "scsi_module.c"
+module_init(aac_init);
+module_exit(aac_exit);
index 531a734..e74ca4a 100644 (file)
@@ -28,7 +28,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
@@ -41,8 +40,8 @@
 #include <linux/completion.h>
 #include <linux/interrupt.h>
 #include <asm/semaphore.h>
-#include "scsi.h"
-#include "hosts.h"
+
+#include <scsi/scsi_host.h>
 
 #include "aacraid.h"
 
index 903a8bf..13560a9 100644 (file)
@@ -28,7 +28,6 @@
  *
  */
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/types.h>
@@ -41,8 +40,8 @@
 #include <linux/completion.h>
 #include <linux/interrupt.h>
 #include <asm/semaphore.h>
-#include "scsi.h"
-#include "hosts.h"
+
+#include <scsi/scsi_host.h>
 
 #include "aacraid.h"
 
index 7dbe1e2..01926d3 100644 (file)
  * General Public License for more details.
  *
  *
- * $Id: aha152x.c,v 2.5 2002/04/14 11:24:53 fischer Exp $
+ * $Id: aha152x.c,v 2.6 2003/10/30 20:52:47 fischer Exp $
  *
  * $Log: aha152x.c,v $
+ * Revision 2.6  2003/10/30 20:52:47  fischer
+ * - interfaces changes for kernel 2.6
+ * - aha152x_probe_one introduced for pcmcia stub
+ * - fixed pnpdev handling
+ * - instead of allocation a new one, reuse command for request sense after check condition and reset
+ * - fixes race in is_complete
+ *
  * Revision 2.5  2002/04/14 11:24:53  fischer
  * - isapnp support
  * - abort fixed
@@ -330,6 +337,7 @@ enum {
        syncneg         = 0x0100,       /* synchronous negotiation in progress */
        aborting        = 0x0200,       /* ABORT is pending */
        resetting       = 0x0400,       /* BUS DEVICE RESET is pending */
+       check_condition = 0x0800,       /* requesting sense after CHECK CONDITION */
 };
 
 MODULE_AUTHOR("Jürgen Fischer");
@@ -450,7 +458,8 @@ struct aha152x_hostdata {
                /* host lock */
 
 #if defined(AHA152X_DEBUG)
-       char *locker;   /* which function has the lock */
+       const char *locker;
+               /* which function has the lock */
        int lockerl;    /* where did it get it */
 
        int debug;      /* current debugging setting */
@@ -516,6 +525,10 @@ struct aha152x_hostdata {
 
        unsigned long io_port0;
        unsigned long io_port1;
+
+#ifdef __ISAPNP__
+       struct pnp_dev *pnpdev;
+#endif
 };
 
 
@@ -525,7 +538,6 @@ struct aha152x_hostdata {
  */
 struct aha152x_scdata {
        Scsi_Cmnd *next;        /* next sc in queue */
-       Scsi_Cmnd *done;        /* done command */
        struct semaphore *sem;  /* semaphore to block on */
 };
 
@@ -578,7 +590,6 @@ struct aha152x_scdata {
 
 #define SCDATA(SCpnt)          ((struct aha152x_scdata *) (SCpnt)->host_scribble)
 #define SCNEXT(SCpnt)          SCDATA(SCpnt)->next
-#define SCDONE(SCpnt)          SCDATA(SCpnt)->done
 #define SCSEM(SCpnt)           SCDATA(SCpnt)->sem
 
 #define SG_ADDRESS(buffer)     ((char *) (page_address((buffer)->page)+(buffer)->offset))
@@ -949,55 +960,47 @@ static irqreturn_t swintr(int irqno, void *dev_id, struct pt_regs *regs)
        return IRQ_HANDLED;
 }
 
-#ifdef __ISAPNP__
-static struct pnp_dev *pnpdev[2];
-static int num_pnpdevs;
-#endif
 
 struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)
 {
-       struct Scsi_Host *shost, *shpnt;
-       struct aha152x_hostdata *aha;
+       struct Scsi_Host *shpnt;
 
-       /* XXX: shpnt is needed for some broken macros */
-       shost = shpnt = scsi_register(&aha152x_driver_template,
-                                       sizeof(struct aha152x_hostdata));
-       if (!shost) {
+       shpnt = scsi_register(&aha152x_driver_template, sizeof(struct aha152x_hostdata));
+       if (!shpnt) {
                printk(KERN_ERR "aha152x: scsi_register failed\n");
                return NULL;
        }
 
-       aha = (struct aha152x_hostdata *)&shost->hostdata;
-       memset(aha, 0, sizeof(*aha));
+       memset(HOSTDATA(shpnt), 0, sizeof *HOSTDATA(shpnt));
 
-       shost->io_port   = setup->io_port;
-       shost->n_io_port = IO_RANGE;
-       shost->irq       = setup->irq;
+       shpnt->io_port   = setup->io_port;
+       shpnt->n_io_port = IO_RANGE;
+       shpnt->irq       = setup->irq;
 
        if (!setup->tc1550) {
-               aha->io_port0 = setup->io_port;
-               aha->io_port1 = setup->io_port;
+               HOSTIOPORT0 = setup->io_port;
+               HOSTIOPORT1 = setup->io_port;
        } else {
-               aha->io_port0 = setup->io_port+0x10;
-               aha->io_port1 = setup->io_port-0x10;
+               HOSTIOPORT0 = setup->io_port+0x10;
+               HOSTIOPORT1 = setup->io_port-0x10;
        }
 
-       spin_lock_init(&aha->lock);
-       aha->reconnect = setup->reconnect;
-       aha->synchronous = setup->synchronous;
-       aha->parity = setup->parity;
-       aha->delay = setup->delay;
-       aha->ext_trans = setup->ext_trans;
+       spin_lock_init(&QLOCK);
+       RECONNECT   = setup->reconnect;
+       SYNCHRONOUS = setup->synchronous;
+       PARITY      = setup->parity;
+       DELAY       = setup->delay;
+       EXT_TRANS   = setup->ext_trans;
 
 #if defined(AHA152X_DEBUG)
-       aha->debug = setup->debug;
+       HOSTDATA(shpnt)->debug = setup->debug;
 #endif
 
        SETPORT(SCSIID, setup->scsiid << 4);
-       shost->this_id = setup->scsiid;
+       shpnt->this_id = setup->scsiid;
 
        if (setup->reconnect)
-               shost->can_queue = AHA152X_MAXQUEUE;
+               shpnt->can_queue = AHA152X_MAXQUEUE;
 
        /* RESET OUT */
        printk("aha152x: resetting bus...\n");
@@ -1006,7 +1009,7 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)
        SETPORT(SCSISEQ, 0);
        mdelay(DELAY);
 
-       reset_ports(shost);
+       reset_ports(shpnt);
 
        printk(KERN_INFO
               "aha152x%d%s: "
@@ -1019,43 +1022,41 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)
               "synchronous=%s, "
               "delay=%d, "
               "extended translation=%s\n",
-              shost->host_no, setup->tc1550 ? " (tc1550 mode)" : "",
+              shpnt->host_no, setup->tc1550 ? " (tc1550 mode)" : "",
               GETPORT(REV) & 0x7,
-              shost->io_port, aha->io_port0, aha->io_port1,
-              shost->irq,
-              shost->this_id,
-              aha->reconnect ? "enabled" : "disabled",
-              aha->parity ? "enabled" : "disabled",
-              aha->synchronous ? "enabled" : "disabled",
-              aha->delay,
-              aha->ext_trans ? "enabled" : "disabled");
-
-       if (!request_region(shost->io_port, IO_RANGE, "aha152x"))
+              shpnt->io_port, HOSTIOPORT0, HOSTIOPORT1,
+              shpnt->irq,
+              shpnt->this_id,
+              RECONNECT ? "enabled" : "disabled",
+              PARITY ? "enabled" : "disabled",
+              SYNCHRONOUS ? "enabled" : "disabled",
+              DELAY,
+              EXT_TRANS ? "enabled" : "disabled");
+
+       if (!request_region(shpnt->io_port, IO_RANGE, "aha152x"))
                goto out_unregister;
 
        /* not expecting any interrupts */
        SETPORT(SIMODE0, 0);
        SETPORT(SIMODE1, 0);
 
-       if (request_irq(shost->irq, swintr, SA_INTERRUPT|SA_SHIRQ,
-                       "aha152x", shost) < 0) {
-               printk(KERN_ERR "aha152x%d: driver needs an IRQ.\n", shost->host_no);
+       if (request_irq(shpnt->irq, swintr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) < 0) {
+               printk(KERN_ERR "aha152x%d: driver needs an IRQ.\n", shpnt->host_no);
                goto out_release_region;
        }
 
-       aha->swint = 0;
+       HOSTDATA(shpnt)->swint = 0;
 
-       printk(KERN_INFO "aha152x%d: trying software interrupt, ",
-                        shost->host_no);
+       printk(KERN_INFO "aha152x%d: trying software interrupt, ", shpnt->host_no);
 
        /* need to have host registered before triggering any interrupt */
-       aha152x_host[registered_count] = shost;
+       aha152x_host[registered_count] = shpnt;
        mb();
        SETPORT(DMACNTRL0, SWINT|INTEN);
        mdelay(1000);
-       free_irq(shost->irq, shost);
+       free_irq(shpnt->irq, shpnt);
 
-       if (!aha->swint) {
+       if (!HOSTDATA(shpnt)->swint) {
                if (TESTHI(DMASTAT, INTSTAT)) {
                        printk("lost.\n");
                } else {
@@ -1065,7 +1066,7 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)
                SETPORT(DMACNTRL0, INTEN);
 
                printk(KERN_ERR "aha152x%d: IRQ %d possibly wrong.  "
-                               "Please verify.\n", shost->host_no, shost->irq);
+                               "Please verify.\n", shpnt->host_no, shpnt->irq);
                goto out_unregister_host;
        }
        printk("ok.\n");
@@ -1075,20 +1076,18 @@ struct Scsi_Host *aha152x_probe_one(struct aha152x_setup *setup)
        SETPORT(SSTAT0, 0x7f);
        SETPORT(SSTAT1, 0xef);
 
-       if (request_irq(shost->irq, intr, SA_INTERRUPT|SA_SHIRQ,
-                               "aha152x", shost) < 0) {
-               printk(KERN_ERR "aha152x%d: failed to reassign interrupt.\n",
-                               shost->host_no);
+       if (request_irq(shpnt->irq, intr, SA_INTERRUPT|SA_SHIRQ, "aha152x", shpnt) < 0) {
+               printk(KERN_ERR "aha152x%d: failed to reassign interrupt.\n", shpnt->host_no);
                goto out_unregister_host;
        }
-       return shost;   /* the pcmcia stub needs the return value; */
+       return shpnt;   /* the pcmcia stub needs the return value; */
 
 out_unregister_host:
        aha152x_host[registered_count] = NULL;
 out_release_region:
-       release_region(shost->io_port, IO_RANGE);
+       release_region(shpnt->io_port, IO_RANGE);
 out_unregister:
-       scsi_unregister(shost);
+       scsi_unregister(shpnt);
        return NULL;
 }
 
@@ -1097,9 +1096,9 @@ static int aha152x_detect(Scsi_Host_Template * tpnt)
        int i, j, ok;
 #if defined(AUTOCONF)
        aha152x_config conf;
-#ifdef __ISAPNP__
-       struct pnp_dev *dev = NULL;
 #endif
+#ifdef __ISAPNP__
+       struct pnp_dev *dev=0, *pnpdev[2] = {0, 0};
 #endif
 
        if (setup_count) {
@@ -1269,7 +1268,7 @@ static int aha152x_detect(Scsi_Host_Template * tpnt)
 #if defined(AHA152X_DEBUG)
                setup[setup_count].debug       = DEBUG_DEFAULT;
 #endif
-               pnpdev[num_pnpdevs++] = dev;
+               pnpdev[setup_count]            = dev;
                printk (KERN_INFO
                        "aha152x: found ISAPnP AVA-1505A at io=0x%03x, irq=%d\n",
                        setup[setup_count].io_port, setup[setup_count].irq);
@@ -1277,7 +1276,6 @@ static int aha152x_detect(Scsi_Host_Template * tpnt)
        }
 #endif
 
-
 #if defined(AUTOCONF)
        if (setup_count<ARRAY_SIZE(setup)) {
 #if !defined(SKIP_BIOSTEST)
@@ -1350,8 +1348,13 @@ static int aha152x_detect(Scsi_Host_Template * tpnt)
 
        for (i=0; i<setup_count; i++) {
                aha152x_probe_one(&setup[i]);
-               if (aha152x_host[registered_count])
+               if (aha152x_host[registered_count]) {
+#ifdef __ISAPNP__
+                       if(pnpdev[i])
+                               HOSTDATA(aha152x_host[registered_count])->pnpdev=pnpdev[i];
+#endif
                        registered_count++;
+               }
        }
 
        return registered_count>0;
@@ -1367,9 +1370,10 @@ static int aha152x_release(struct Scsi_Host *shpnt)
                release_region(shpnt->io_port, IO_RANGE);
 
 #ifdef __ISAPNP__
-       while (num_pnpdevs--)
-               pnp_device_detach(pnpdev[num_pnpdevs]);
+       if (HOSTDATA(shpnt)->pnpdev)
+               pnp_device_detach(HOSTDATA(shpnt)->pnpdev);
 #endif
+
        scsi_unregister(shpnt);
 
        return 0;
@@ -1418,7 +1422,7 @@ static int setup_expected_interrupts(struct Scsi_Host *shpnt)
 /* 
  *  Queue a command and setup interrupts for a free bus.
  */
-static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct semaphore *sem, int phase, Scsi_Cmnd *done_SC, void (*done)(Scsi_Cmnd *))
+static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct semaphore *sem, int phase, void (*done)(Scsi_Cmnd *))
 {
        struct Scsi_Host *shpnt = SCpnt->device->host;
        unsigned long flags;
@@ -1438,14 +1442,21 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct semaphore *sem, int p
        SCpnt->SCp.Message      = 0;
        SCpnt->SCp.have_data_in = 0;
        SCpnt->SCp.sent_command = 0;
-       SCpnt->host_scribble    = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC);
-       if(!SCpnt->host_scribble) {
-               printk(ERR_LEAD "allocation failed\n", CMDINFO(SCpnt));
-               return FAILED;
+
+       if(SCpnt->SCp.phase & (resetting|check_condition)) {
+               if(SCpnt->host_scribble==0 || SCSEM(SCpnt) || SCNEXT(SCpnt)) {
+                       printk(ERR_LEAD "cannot reuse command\n", CMDINFO(SCpnt));
+                       return FAILED;
+               }
+       } else {
+               SCpnt->host_scribble    = kmalloc(sizeof(struct aha152x_scdata), GFP_ATOMIC);
+               if(SCpnt->host_scribble==0) {
+                       printk(ERR_LEAD "allocation failed\n", CMDINFO(SCpnt));
+                       return FAILED;
+               }
        }
 
        SCNEXT(SCpnt)           = 0;
-       SCDONE(SCpnt)           = done_SC;
        SCSEM(SCpnt)            = sem;
 
        /* setup scratch area
@@ -1487,6 +1498,10 @@ static int aha152x_internal_queue(Scsi_Cmnd *SCpnt, struct semaphore *sem, int p
        return 0;
 }
 
+/*
+ *  queue a command
+ *
+ */
 static int aha152x_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
 {
 #if 0
@@ -1498,23 +1513,25 @@ static int aha152x_queue(Scsi_Cmnd *SCpnt, void (*done)(Scsi_Cmnd *))
        }
 #endif
 
-       return aha152x_internal_queue(SCpnt, 0, 0, 0, done);
+       return aha152x_internal_queue(SCpnt, 0, 0, done);
 }
 
 
 /*
- *  run a command
+ *  
  *
  */
-static void internal_done(Scsi_Cmnd *SCpnt)
+static void reset_done(Scsi_Cmnd *SCpnt)
 {
 #if 0
        struct Scsi_Host *shpnt = SCpnt->host;
-
-       DPRINTK(debug_eh, INFO_LEAD "internal_done called\n", CMDINFO(SCpnt));
+       DPRINTK(debug_eh, INFO_LEAD "reset_done called\n", CMDINFO(SCpnt));
 #endif
-       if(SCSEM(SCpnt))
+       if(SCSEM(SCpnt)) {
                up(SCSEM(SCpnt));
+       } else {
+               printk(KERN_ERR "aha152x: reset_done w/o semaphore\n");
+       }
 }
 
 /*
@@ -1600,7 +1617,6 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
        struct Scsi_Host *shpnt = SCpnt->device->host;
        DECLARE_MUTEX_LOCKED(sem);
        struct timer_list timer;
-       Scsi_Cmnd *cmd;
        int ret;
 
 #if defined(AHA152X_DEBUG)
@@ -1615,40 +1631,32 @@ static int aha152x_device_reset(Scsi_Cmnd * SCpnt)
                return FAILED;
        }
 
-       spin_unlock_irq(shpnt->host_lock);
-       cmd = scsi_get_command(SCpnt->device, GFP_ATOMIC);
-       if (!cmd) {
-               spin_lock_irq(shpnt->host_lock);
-               return FAILED;
-       }
-
-       cmd->cmd_len         = 0;
-       cmd->device->host    = SCpnt->device->host;
-       cmd->device->id      = SCpnt->device->id;
-       cmd->device->lun     = SCpnt->device->lun;
-       cmd->use_sg          = 0;
-       cmd->request_buffer  = 0;
-       cmd->request_bufflen = 0;
+       SCpnt->cmd_len         = 0;
+       SCpnt->use_sg          = 0;
+       SCpnt->request_buffer  = 0;
+       SCpnt->request_bufflen = 0;
 
        init_timer(&timer);
        timer.data     = (unsigned long) cmd;
        timer.expires  = jiffies + 100*HZ;   /* 10s */
        timer.function = (void (*)(unsigned long)) timer_expired;
 
-       aha152x_internal_queue(cmd, &sem, resetting, 0, internal_done);
-
+       aha152x_internal_queue(SCpnt, &sem, resetting, reset_done);
        add_timer(&timer);
        down(&sem);
-
        del_timer(&timer);
 
-       if(cmd->SCp.phase & resetted) {
+       SCpnt->cmd_len         = SCpnt->old_cmd_len;
+       SCpnt->use_sg          = SCpnt->old_use_sg;
+       SCpnt->request_buffer  = SCpnt->buffer;
+               SCpnt->request_bufflen = SCpnt->bufflen;
+
+       if(SCpnt->SCp.phase & resetted) {
                ret = SUCCESS;
        } else {
                ret = FAILED;
        }
 
-       scsi_put_command(cmd);
        spin_lock_irq(shpnt->host_lock);
        return ret;
 }
@@ -1975,23 +1983,26 @@ static void busfree_run(struct Scsi_Host *shpnt)
 #if defined(AHA152X_STAT)
                action++;
 #endif
-               if(SCDONE(DONE_SC)) {
-                       Scsi_Cmnd *ptr=DONE_SC;
-                       DONE_SC=SCDONE(DONE_SC);
-
+               if(DONE_SC->SCp.phase & check_condition) {
 #if 0
                        if(HOSTDATA(shpnt)->debug & debug_eh) {
-                               printk(ERR_LEAD "received sense: ", CMDINFO(ptr));
+                               printk(ERR_LEAD "received sense: ", CMDINFO(DONE_SC));
                                print_sense("bh", DONE_SC);
                        }
 #endif
 
+                       /* restore old command */
+                       memcpy((void *) DONE_SC->cmnd, (void *) DONE_SC->data_cmnd, sizeof(DONE_SC->data_cmnd));
+                       DONE_SC->request_buffer  = DONE_SC->buffer;
+                       DONE_SC->request_bufflen = DONE_SC->bufflen;
+                       DONE_SC->use_sg          = DONE_SC->old_use_sg;
+                       DONE_SC->cmd_len         = DONE_SC->old_cmd_len;
+
+                       DONE_SC->SCp.Status = 0x02;
+
                        HOSTDATA(shpnt)->commands--;
                        if (!HOSTDATA(shpnt)->commands)
                                SETPORT(PORTA, 0);      /* turn led off */
-
-                       kfree(ptr->host_scribble);
-                       kfree(ptr);
                } else if(DONE_SC->SCp.Status==0x02) {
 #if defined(AHA152X_STAT)
                        HOSTDATA(shpnt)->busfree_with_check_condition++;
@@ -2001,42 +2012,30 @@ static void busfree_run(struct Scsi_Host *shpnt)
 #endif
 
                        if(!(DONE_SC->SCp.Status & not_issued)) {
-                               Scsi_Cmnd *cmnd = kmalloc(sizeof(Scsi_Cmnd), GFP_ATOMIC);
-
-                               if(cmnd) {
-                                       Scsi_Cmnd *ptr=DONE_SC;
-                                       DONE_SC=0;
-
 #if 0
-                                       DPRINTK(debug_eh, ERR_LEAD "requesting sense\n", CMDINFO(ptr));
-#endif
-
-                                       cmnd->cmnd[0]         = REQUEST_SENSE;
-                                       cmnd->cmnd[1]         = 0;
-                                       cmnd->cmnd[2]         = 0;
-                                       cmnd->cmnd[3]         = 0;
-                                       cmnd->cmnd[4]         = sizeof(ptr->sense_buffer);
-                                       cmnd->cmnd[5]         = 0;
-                                       cmnd->cmd_len         = 6;
-                                       cmnd->device->host    = ptr->device->host;
-                                       cmnd->device->id      = ptr->device->id;
-                                       cmnd->device->lun     = ptr->device->lun;
-                                       cmnd->use_sg          = 0; 
-                                       cmnd->request_buffer  = ptr->sense_buffer;
-                                       cmnd->request_bufflen = sizeof(ptr->sense_buffer);
+                               DPRINTK(debug_eh, ERR_LEAD "requesting sense\n", CMDINFO(DONE_SC));
+#endif
+
+                               DONE_SC->cmnd[0]         = REQUEST_SENSE;
+                               DONE_SC->cmnd[1]         = 0;
+                               DONE_SC->cmnd[2]         = 0;
+                               DONE_SC->cmnd[3]         = 0;
+                               DONE_SC->cmnd[4]         = sizeof(DONE_SC->sense_buffer);
+                               DONE_SC->cmnd[5]         = 0;
+                               DONE_SC->cmd_len         = 6;
+                               DONE_SC->use_sg          = 0; 
+                               DONE_SC->request_buffer  = DONE_SC->sense_buffer;
+                               DONE_SC->request_bufflen = sizeof(DONE_SC->sense_buffer);
                        
-                                       DO_UNLOCK(flags);
-                                       aha152x_internal_queue(cmnd, 0, 0, ptr, internal_done);
-                                       DO_LOCK(flags);
-                               } else {
-                                       printk(ERR_LEAD "allocation failed\n", CMDINFO(CURRENT_SC));
-                                       if(cmnd)
-                                               kfree(cmnd);
-                               }
+                               DO_UNLOCK(flags);
+                               aha152x_internal_queue(DONE_SC, 0, check_condition, DONE_SC->scsi_done);
+                               DO_LOCK(flags);
+
+                               DONE_SC=0;
                        } else {
 #if 0
                                DPRINTK(debug_eh, ERR_LEAD "command not issued - CHECK CONDITION ignored\n", CMDINFO(DONE_SC));
-#endif                         
+#endif
                        }
                }
 
@@ -2946,13 +2945,12 @@ static void is_complete(struct Scsi_Host *shpnt)
        int pending;
 
        DO_LOCK(flags);
-       if(HOSTDATA(shpnt)->in_intr!=0) {
+       if(HOSTDATA(shpnt)->in_intr) {
                DO_UNLOCK(flags);
                /* aha152x_error never returns.. */
                aha152x_error(shpnt, "bottom-half already running!?");
        }
        HOSTDATA(shpnt)->in_intr++;
-       DO_UNLOCK(flags);
 
        /*
         * loop while there are interrupt conditions pending
@@ -2960,6 +2958,8 @@ static void is_complete(struct Scsi_Host *shpnt)
         */
        do {
                unsigned long start = jiffies;
+               DO_UNLOCK(flags);
+
                dataphase=update_state(shpnt);
 
                DPRINTK(debug_phases, LEAD "start %s %s(%s)\n", CMDINFO(CURRENT_SC), states[STATE].name, states[PREVSTATE].name, states[LASTSTATE].name);
@@ -3035,7 +3035,6 @@ static void is_complete(struct Scsi_Host *shpnt)
                        HOSTDATA(shpnt)->count_trans[STATE]++;
                HOSTDATA(shpnt)->time[STATE] += jiffies-start;
 #endif
-               DO_UNLOCK(flags);
 
                DPRINTK(debug_phases, LEAD "end %s %s(%s)\n", CMDINFO(CURRENT_SC), states[STATE].name, states[PREVSTATE].name, states[LASTSTATE].name);
        } while(pending);
@@ -3044,7 +3043,6 @@ static void is_complete(struct Scsi_Host *shpnt)
         * enable interrupts and leave bottom-half
         *
         */
-       DO_LOCK(flags);
        HOSTDATA(shpnt)->in_intr--;
        SETBITS(DMACNTRL0, INTEN);
        DO_UNLOCK(flags);
index 4817476..0a2ea05 100644 (file)
@@ -27,6 +27,9 @@
  * Converted to EISA and generic DMA APIs by Marc Zyngier
  * <maz@wild-wind.fr.eu.org>, 4/2003.
  *
+ * Shared interrupt support added by Rask Ingemann Lambertsen
+ * <rask@sygehus.dk>, 10/2003
+ *
  * For the avoidance of doubt the "preferred form" of this code is one which
  * is in an open non patent encumbered format. Where cryptographic key signing
  * forms part of the process of creating an executable the information
@@ -518,15 +521,17 @@ static int aha1740_queuecommand(Scsi_Cmnd * SCpnt, void (*done)(Scsi_Cmnd *))
        return 0;
 }
 
-/* Query the board for its irq_level.  Nothing else matters
+/* Query the board for its irq_level and irq_type.  Nothing else matters
    in enhanced mode on an EISA bus. */
 
 static void aha1740_getconfig(unsigned int base, unsigned int *irq_level,
+                             unsigned int *irq_type,
                              unsigned int *translation)
 {
        static int intab[] = { 9, 10, 11, 12, 0, 14, 15, 0 };
 
        *irq_level = intab[inb(INTDEF(base)) & 0x7];
+       *irq_type  = (inb(INTDEF(base)) & 0x8) >> 3;
        *translation = inb(RESV1(base)) & 0x1;
        outb(inb(INTDEF(base)) | 0x10, INTDEF(base));
 }
@@ -583,7 +588,7 @@ static Scsi_Host_Template aha1740_template = {
 static int aha1740_probe (struct device *dev)
 {
        int slotbase;
-       unsigned int irq_level, translation;
+       unsigned int irq_level, irq_type, translation;
        struct Scsi_Host *shpnt;
        struct aha1740_hostdata *host;
        struct eisa_device *edev = to_eisa_device (dev);
@@ -595,15 +600,15 @@ static int aha1740_probe (struct device *dev)
                return -EBUSY;
        if (!aha1740_test_port(slotbase))
                goto err_release_region;
-       aha1740_getconfig(slotbase,&irq_level,&translation);
+       aha1740_getconfig(slotbase,&irq_level,&irq_type,&translation);
        if ((inb(G2STAT(slotbase)) &
             (G2STAT_MBXOUT|G2STAT_BUSY)) != G2STAT_MBXOUT) {
                /* If the card isn't ready, hard reset it */
                outb(G2CNTRL_HRST, G2CNTRL(slotbase));
                outb(0, G2CNTRL(slotbase));
        }
-       printk(KERN_INFO "Configuring slot %d at IO:%x, IRQ %d\n",
-              edev->slot, slotbase, irq_level);
+       printk(KERN_INFO "Configuring slot %d at IO:%x, IRQ %u (%s)\n",
+              edev->slot, slotbase, irq_level, irq_type ? "edge" : "level");
        printk(KERN_INFO "aha174x: Extended translation %sabled.\n",
               translation ? "en" : "dis");
        shpnt = scsi_host_alloc(&aha1740_template,
@@ -629,7 +634,8 @@ static int aha1740_probe (struct device *dev)
        }
        
        DEB(printk("aha1740_probe: enable interrupt channel %d\n",irq_level));
-       if (request_irq(irq_level,aha1740_intr_handle,0,"aha1740",shpnt)) {
+       if (request_irq(irq_level,aha1740_intr_handle,irq_type ? 0 : SA_SHIRQ,
+                       "aha1740",shpnt)) {
                printk(KERN_ERR "aha1740_probe: Unable to allocate IRQ %d.\n",
                       irq_level);
                goto err_unmap;
index f5d7601..a88cad2 100644 (file)
@@ -1,9 +1,10 @@
 #
 # AIC7XXX and AIC79XX 2.5.X Kernel configuration File.
-# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic7xxx#6 $
+# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Kconfig.aic7xxx#7 $
 #
 config SCSI_AIC7XXX
        tristate "Adaptec AIC7xxx Fast -> U160 support (New Driver)"
+       depends on PCI || EISA
        ---help---
        This driver supports all of Adaptec's Fast through Ultra 160 PCI
        based SCSI controllers as well as the aic7770 based EISA and VLB
@@ -50,7 +51,7 @@ config AIC7XXX_RESET_DELAY_MS
 
 config AIC7XXX_PROBE_EISA_VL
        bool "Probe for EISA and VL AIC7XXX Adapters"
-       depends on SCSI_AIC7XXX
+       depends on SCSI_AIC7XXX && EISA
        help
        Probe for EISA and VLB Aic7xxx controllers.  In many newer systems,
        the invasive probes necessary to detect these controllers can cause
index 7cf2358..fcb15a7 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Makefile for the Linux aic7xxx SCSI driver.
 #
-# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#6 $
+# $Id: //depot/linux-aic79xx-2.5.0/drivers/scsi/aic7xxx/Makefile#7 $
 #
 
 # Let kbuild descend into aicasm when cleaning
@@ -12,15 +12,15 @@ obj-$(CONFIG_SCSI_AIC79XX)  += aic79xx.o
 
 # Core Fast -> U160 files
 aic7xxx-y                                      += aic7xxx_core.o       \
-                                                  aic7xxx_93cx6.o      \
-                                                  aic7770.o
+                                                  aic7xxx_93cx6.o
+aic7xxx-$(CONFIG_EISA)                         += aic7770.o
 aic7xxx-$(CONFIG_PCI)                          += aic7xxx_pci.o
 aic7xxx-$(CONFIG_AIC7XXX_REG_PRETTY_PRINT)     += aic7xxx_reg_print.o
 
 # Platform Specific Fast -> U160 Files
 aic7xxx-y                                      += aic7xxx_osm.o        \
-                                                  aic7xxx_proc.o       \
-                                                  aic7770_osm.o
+                                                  aic7xxx_proc.o
+aic7xxx-$(CONFIG_EISA)                         += aic7770_osm.o
 aic7xxx-$(CONFIG_PCI)                          += aic7xxx_osm_pci.o
 
 # Core U320 files
@@ -34,6 +34,9 @@ aic79xx-y                                     += aic79xx_osm.o        \
                                                   aic79xx_osm_pci.o
 
 EXTRA_CFLAGS += -Idrivers/scsi
+ifdef WARNINGS_BECOME_ERRORS
+EXTRA_CFLAGS += -Werror
+endif
 #EXTRA_CFLAGS += -g
 
 # Files generated that shall be removed upon make clean
index e62e849..c6ef9b7 100644 (file)
@@ -37,7 +37,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7770.c#30 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7770.c#32 $
  *
  * $FreeBSD$
  */
@@ -67,8 +67,7 @@ static ahc_device_setup_t ahc_aic7770_VL_setup;
 static ahc_device_setup_t ahc_aic7770_EISA_setup;;
 static ahc_device_setup_t ahc_aic7770_setup;
 
-
-struct aic7770_identity aic7770_ident_table [] =
+struct aic7770_identity aic7770_ident_table[] =
 {
        {
                ID_AHA_274x,
@@ -83,6 +82,12 @@ struct aic7770_identity aic7770_ident_table [] =
                ahc_aic7770_VL_setup
        },
        {
+               ID_AHA_284x,
+               0xFFFFFFFE,
+               "Adaptec 284X SCSI adapter (BIOS Disabled)",
+               ahc_aic7770_VL_setup
+       },
+       {
                ID_OLV_274x,
                0xFFFFFFFF,
                "Adaptec (Olivetti OEM) 274X SCSI adapter",
@@ -154,7 +159,7 @@ aic7770_config(struct ahc_softc *ahc, struct aic7770_identity *entry, u_int io)
        ahc->bus_suspend = aic7770_suspend;
        ahc->bus_resume = aic7770_resume;
 
-       error = ahc_reset(ahc);
+       error = ahc_reset(ahc, /*reinit*/FALSE);
        if (error != 0)
                return (error);
 
index a374f84..2eeed5f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Linux driver attachment glue for aic7770 based controllers.
  *
- * Copyright (c) 2000-2001 Adaptec Inc.
+ * Copyright (c) 2000-2003 Adaptec Inc.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7770_osm.c#13 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7770_osm.c#14 $
  */
 
 #include "aic7xxx_osm.h"
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+#include <linux/device.h>
+#include <linux/eisa.h>
+
+#define EISA_MFCTR_CHAR0(ID) (char)(((ID>>26) & 0x1F) | '@')  /* Bits 26-30 */
+#define EISA_MFCTR_CHAR1(ID) (char)(((ID>>21) & 0x1F) | '@')  /* Bits 21-25 */
+#define EISA_MFCTR_CHAR2(ID) (char)(((ID>>16) & 0x1F) | '@')  /* Bits 16-20 */
+#define EISA_PRODUCT_ID(ID)  (short)((ID>>4)  & 0xFFF)        /* Bits  4-15 */
+#define EISA_REVISION_ID(ID) (uint8_t)(ID & 0x0F)             /* Bits  0-3  */
+
+static int aic7770_eisa_dev_probe(struct device *dev);
+static int aic7770_eisa_dev_remove(struct device *dev);
+static struct eisa_driver aic7770_driver = {
+       .driver = {
+               .name   = "aic7xxx",
+               .probe  = aic7770_eisa_dev_probe,
+               .remove = aic7770_eisa_dev_remove,
+       }
+};
+
+typedef  struct device *aic7770_dev_t;
+#else
 #define MINSLOT                        1
 #define NUMSLOTS               16
 #define IDOFFSET               0x80
 
-int
-aic7770_linux_probe(Scsi_Host_Template *template)
+typedef void *aic7770_dev_t;
+#endif
+
+static int aic7770_linux_config(struct aic7770_identity *entry,
+                               aic7770_dev_t dev, u_int eisaBase);
+
+void
+ahc_linux_eisa_init(void)
 {
-#if defined(__i386__) || defined(__alpha__)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+       struct eisa_device_id *eid;
+       struct aic7770_identity *id;
+       int i;
+
+       if (aic7xxx_probe_eisa_vl == 0)
+               return;
+
+       /*
+        * Linux requires the EISA IDs to be specified in
+        * the EISA ID string format.  Perform the conversion
+        * and setup a table with a NUL terminal entry.
+        */
+       aic7770_driver.id_table = malloc(sizeof(struct eisa_device_id) *
+                                        (ahc_num_aic7770_devs + 1),
+                                        M_DEVBUF, M_NOWAIT);
+       if (aic7770_driver.id_table == NULL)
+               return;
+
+       for (eid = (struct eisa_device_id *)aic7770_driver.id_table,
+            id = aic7770_ident_table, i = 0;
+            i < ahc_num_aic7770_devs; eid++, id++, i++) {
+
+               sprintf(eid->sig, "%c%c%c%03X%01X",
+                       EISA_MFCTR_CHAR0(id->full_id),
+                       EISA_MFCTR_CHAR1(id->full_id),
+                       EISA_MFCTR_CHAR2(id->full_id),
+                       EISA_PRODUCT_ID(id->full_id),
+                       EISA_REVISION_ID(id->full_id));
+               eid->driver_data = i;
+       }
+       eid->sig[0] = 0;
+
+       eisa_driver_register(&aic7770_driver);
+#else /* LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) */
        struct aic7770_identity *entry;
-       struct ahc_softc *ahc;
-       int i, slot;
-       int eisaBase;
-       int found;
+       u_int  slot;
+       u_int  eisaBase;
+       u_int  i;
+
+       if (aic7xxx_probe_eisa_vl == 0)
+               return;
 
        eisaBase = 0x1000 + AHC_EISA_SLOT_OFFSET;
-       found = 0;
        for (slot = 1; slot < NUMSLOTS; eisaBase+=0x1000, slot++) {
                uint32_t eisa_id;
                size_t   id_size;
@@ -83,45 +146,64 @@ aic7770_linux_probe(Scsi_Host_Template *template)
                        continue;  /* no EISA card in slot */
 
                entry = aic7770_find_device(eisa_id);
-               if (entry != NULL) {
-                       char     buf[80];
-                       char    *name;
-                       int      error;
-
-                       /*
-                        * Allocate a softc for this card and
-                        * set it up for attachment by our
-                        * common detect routine.
-                        */
-                       sprintf(buf, "ahc_eisa:%d", slot);
-                       name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT);
-                       if (name == NULL)
-                               break;
-                       strcpy(name, buf);
-                       ahc = ahc_alloc(template, name);
-                       if (ahc == NULL) {
-                               /*
-                                * If we can't allocate this one,
-                                * chances are we won't be able to
-                                * allocate future card structures.
-                                */
-                               break;
-                       }
-                       error = aic7770_config(ahc, entry, eisaBase);
-                       if (error != 0) {
-                               ahc->bsh.ioport = 0;
-                               ahc_free(ahc);
-                               continue;
-                       }
-                       found++;
-               }
+               if (entry != NULL)
+                       aic7770_linux_config(entry, NULL, eisaBase);
+       }
+#endif
+}
+
+void
+ahc_linux_eisa_exit(void)
+{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+       if (aic7xxx_probe_eisa_vl == 0)
+               return;
+
+       if (aic7770_driver.id_table != NULL) {
+               eisa_driver_unregister(&aic7770_driver);
+               free(aic7770_driver.id_table, M_DEVBUF);
        }
-       return (found);
-#else
-       return (0);
 #endif
 }
 
+static int
+aic7770_linux_config(struct aic7770_identity *entry, aic7770_dev_t dev,
+                    u_int eisaBase)
+{
+       struct  ahc_softc *ahc;
+       char    buf[80];
+       char   *name;
+       int     error;
+
+       /*
+        * Allocate a softc for this card and
+        * set it up for attachment by our
+        * common detect routine.
+        */
+       sprintf(buf, "ahc_eisa:%d", eisaBase >> 12);
+       name = malloc(strlen(buf) + 1, M_DEVBUF, M_NOWAIT);
+       if (name == NULL)
+               return (ENOMEM);
+       strcpy(name, buf);
+       ahc = ahc_alloc(&aic7xxx_driver_template, name);
+       if (ahc == NULL) {
+               free(name, M_DEVBUF);
+               return (ENOMEM);
+       }
+       error = aic7770_config(ahc, entry, eisaBase);
+       if (error != 0) {
+               ahc->bsh.ioport = 0;
+               ahc_free(ahc);
+               return (error);
+       }
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+       dev->driver_data = (void *)ahc;
+       if (aic7xxx_detect_complete)
+               error = ahc_linux_register_host(ahc, &aic7xxx_driver_template);
+#endif
+       return (error);
+}
+
 int
 aic7770_map_registers(struct ahc_softc *ahc, u_int port)
 {
@@ -129,6 +211,8 @@ aic7770_map_registers(struct ahc_softc *ahc, u_int port)
         * Lock out other contenders for our i/o space.
         */
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0)
+       if (check_region(port, AHC_EISA_IOSIZE) != 0)
+               return (ENOMEM);
        request_region(port, AHC_EISA_IOSIZE, "aic7xxx");
 #else
        if (request_region(port, AHC_EISA_IOSIZE, "aic7xxx") == 0)
@@ -155,3 +239,41 @@ aic7770_map_int(struct ahc_softc *ahc, u_int irq)
        
        return (-error);
 }
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+static int
+aic7770_eisa_dev_probe(struct device *dev)
+{
+       struct eisa_device *edev;
+
+       edev = to_eisa_device(dev);
+       return (aic7770_linux_config(aic7770_ident_table + edev->id.driver_data,
+                                   dev, edev->base_addr+AHC_EISA_SLOT_OFFSET));
+}
+
+static int
+aic7770_eisa_dev_remove(struct device *dev)
+{
+       struct ahc_softc *ahc;
+       u_long l;
+
+       /*
+        * We should be able to just perform
+        * the free directly, but check our
+        * list for extra sanity.
+        */
+       ahc_list_lock(&l);
+       ahc = ahc_find_softc((struct ahc_softc *)dev->driver_data);
+       if (ahc != NULL) {
+               u_long s;
+
+               ahc_lock(ahc, &s);
+               ahc_intr_enable(ahc, FALSE);
+               ahc_unlock(ahc, &s);
+               ahc_free(ahc);
+       }
+       ahc_list_unlock(&l);
+
+       return (0);
+}
+#endif
index 43abefa..be65968 100644 (file)
@@ -37,7 +37,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#90 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.h#95 $
  *
  * $FreeBSD$
  */
@@ -229,8 +229,10 @@ typedef enum {
        AHD_RTI                 = 0x04000,/* Retained Training Support */
        AHD_NEW_IOCELL_OPTS     = 0x08000,/* More Signal knobs in the IOCELL */
        AHD_NEW_DFCNTRL_OPTS    = 0x10000,/* SCSIENWRDIS bit */
+       AHD_FAST_CDB_DELIVERY   = 0x20000,/* CDB acks released to Output Sync */
        AHD_REMOVABLE           = 0x00000,/* Hot-Swap supported - None so far*/
        AHD_AIC7901_FE          = AHD_FENONE,
+       AHD_AIC7901A_FE         = AHD_FENONE,
        AHD_AIC7902_FE          = AHD_MULTI_FUNC
 } ahd_feature;
 
@@ -372,7 +374,8 @@ typedef enum {
        AHD_HP_BOARD          = 0x100000,
        AHD_RESET_POLL_ACTIVE = 0x200000,
        AHD_UPDATE_PEND_CMDS  = 0x400000,
-       AHD_RUNNING_QOUTFIFO  = 0x800000
+       AHD_RUNNING_QOUTFIFO  = 0x800000,
+       AHD_HAD_FIRST_SEL     = 0x1000000
 } ahd_flag;
 
 /************************* Hardware  SCB Definition ***************************/
@@ -494,21 +497,21 @@ struct hardware_scb {
  *       transfer.
  */ 
 #define SG_PTR_MASK    0xFFFFFFF8
-/*16*/ uint64_t dataptr;
-/*24*/ uint32_t datacnt;       /* Byte 3 is spare. */
-/*28*/ uint32_t sgptr;
-/*32*/ uint32_t hscb_busaddr;
-/*36*/ uint32_t next_hscb_busaddr;
-/*40*/ uint8_t  control;       /* See SCB_CONTROL in aic79xx.reg for details */
-/*41*/ uint8_t  scsiid;        /*
+/*16*/ uint16_t tag;           /* Reused by Sequencer. */
+/*18*/ uint8_t  control;       /* See SCB_CONTROL in aic79xx.reg for details */
+/*19*/ uint8_t  scsiid;        /*
                                 * Selection out Id
                                 * Our Id (bits 0-3) Their ID (bits 4-7)
                                 */
-/*42*/ uint8_t  lun;
-/*43*/ uint8_t  task_attribute;
-/*44*/ uint8_t  cdb_len;
-/*45*/ uint8_t  task_management;
-/*46*/ uint16_t tag;           /* Reused by Sequencer. */
+/*20*/ uint8_t  lun;
+/*21*/ uint8_t  task_attribute;
+/*22*/ uint8_t  cdb_len;
+/*23*/ uint8_t  task_management;
+/*24*/ uint64_t dataptr;
+/*32*/ uint32_t datacnt;       /* Byte 3 is spare. */
+/*36*/ uint32_t sgptr;
+/*40*/ uint32_t hscb_busaddr;
+/*44*/ uint32_t next_hscb_busaddr;
 /********** Long lun field only downloaded for full 8 byte lun support ********/
 /*48*/  uint8_t         pkt_long_lun[8];
 /******* Fields below are not Downloaded (Sequencer may use for scratch) ******/
@@ -1379,13 +1382,13 @@ struct scb              *ahd_get_scb(struct ahd_softc *ahd, u_int col_idx);
 void                    ahd_free_scb(struct ahd_softc *ahd, struct scb *scb);
 void                    ahd_alloc_scbs(struct ahd_softc *ahd);
 void                    ahd_free(struct ahd_softc *ahd);
-int                     ahd_reset(struct ahd_softc *ahd);
+int                     ahd_reset(struct ahd_softc *ahd, int reinit);
 void                    ahd_shutdown(void *arg);
-int                    ahd_write_flexport(struct ahd_softc *ahd,
-                                          u_int addr, u_int value);
-int                    ahd_read_flexport(struct ahd_softc *ahd, u_int addr,
-                                         uint8_t *value);
-int                    ahd_wait_flexport(struct ahd_softc *ahd);
+int                     ahd_write_flexport(struct ahd_softc *ahd,
+                                           u_int addr, u_int value);
+int                     ahd_read_flexport(struct ahd_softc *ahd, u_int addr,
+                                          uint8_t *value);
+int                     ahd_wait_flexport(struct ahd_softc *ahd);
 
 /*************************** Interrupt Services *******************************/
 void                   ahd_pci_intr(struct ahd_softc *ahd);
index 2cfdca5..449fe95 100644 (file)
@@ -39,7 +39,7 @@
  *
  * $FreeBSD$
  */
-VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#69 $"
+VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#70 $"
 
 /*
  * This file is processed by the aic7xxx_asm utility for use in assembling
@@ -1377,7 +1377,10 @@ register LUNLEN {
        address                 0x030
        access_mode     RW
        modes           M_CFG
+       mask            ILUNLEN 0x0F
+       mask            TLUNLEN 0xF0
 }
+const LUNLEN_SINGLE_LEVEL_LUN 0xF
 
 /*
  * CDB Limit
@@ -3797,32 +3800,8 @@ scb {
                size    4
                alias   SCB_NEXT_COMPLETE
        }
-       SCB_DATAPTR {
-               size    8
-       }
-       SCB_DATACNT {
-               /*
-                * The last byte is really the high address bits for
-                * the data address.
-                */
-               size    4
-               field   SG_LAST_SEG             0x80    /* In the fourth byte */
-               field   SG_HIGH_ADDR_BITS       0x7F    /* In the fourth byte */
-       }
-       SCB_SGPTR {
-               size    4
-               field   SG_STATUS_VALID 0x04    /* In the first byte */
-               field   SG_FULL_RESID   0x02    /* In the first byte */
-               field   SG_LIST_NULL    0x01    /* In the first byte */
-       }
-       SCB_BUSADDR {
-               size    4
-       }
-       SCB_NEXT {
-               alias   SCB_NEXT_SCB_BUSADDR
-               size    2
-       }
-       SCB_NEXT2 {
+       SCB_TAG {
+               alias   SCB_FIFO_USE_COUNT
                size    2
        }
        SCB_CONTROL {
@@ -3859,8 +3838,32 @@ scb {
        SCB_TASK_MANAGEMENT {
                size    1
        }
-       SCB_TAG {
-               alias   SCB_FIFO_USE_COUNT
+       SCB_DATAPTR {
+               size    8
+       }
+       SCB_DATACNT {
+               /*
+                * The last byte is really the high address bits for
+                * the data address.
+                */
+               size    4
+               field   SG_LAST_SEG             0x80    /* In the fourth byte */
+               field   SG_HIGH_ADDR_BITS       0x7F    /* In the fourth byte */
+       }
+       SCB_SGPTR {
+               size    4
+               field   SG_STATUS_VALID 0x04    /* In the first byte */
+               field   SG_FULL_RESID   0x02    /* In the first byte */
+               field   SG_LIST_NULL    0x01    /* In the first byte */
+       }
+       SCB_BUSADDR {
+               size    4
+       }
+       SCB_NEXT {
+               alias   SCB_NEXT_SCB_BUSADDR
+               size    2
+       }
+       SCB_NEXT2 {
                size    2
        }
        SCB_SPARE {
index 7ac5561..65339bc 100644 (file)
@@ -40,7 +40,7 @@
  * $FreeBSD$
  */
 
-VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#94 $"
+VERSION = "$Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#99 $"
 PATCH_ARG_LIST = "struct ahd_softc *ahd"
 PREFIX = "ahd_"
 
@@ -163,8 +163,8 @@ return:
 idle_loop_cchan:
        SET_MODE(M_CCHAN, M_CCHAN)
        test    QOFF_CTLSTA, HS_MAILBOX_ACT jz  hs_mailbox_empty;
-       mov     LOCAL_HS_MAILBOX, HS_MAILBOX;
        or      QOFF_CTLSTA, HS_MAILBOX_ACT;
+       mov     LOCAL_HS_MAILBOX, HS_MAILBOX;
 hs_mailbox_empty:
 BEGIN_CRITICAL;
        test    CCSCBCTL, CCARREN|CCSCBEN jz scbdma_idle;
@@ -276,7 +276,7 @@ fetch_new_scb_done:
         * knows the correct location to store the SCB.
         * Set it to zero before processing the SCB.
         */
-       mov     SCB_FIFO_USE_COUNT, ALLZEROS;
+       clr     SCB_FIFO_USE_COUNT;
        /* Update the next SCB address to download. */
        bmov    NEXT_QUEUED_SCB_ADDR, SCB_NEXT_SCB_BUSADDR, 4;
        mvi     SCB_NEXT[1], SCB_LIST_NULL;
@@ -492,12 +492,13 @@ SET_DST_MODE      M_SCSI;
 select_in:
        if ((ahd->bugs & AHD_BUSFREEREV_BUG) != 0) {
                /*
-                * This exposes a window whereby a
-                * busfree just after a selection will
-                * be missed, but there is no other safe
-                * way to enable busfree detection if
-                * the busfreerev function is broken.
+                * Test to ensure that the bus has not
+                * already gone free prior to clearing
+                * any stale busfree status.  This avoids
+                * a window whereby a busfree just after
+                * a selection could be missed.
                 */
+               test    SCSISIGI, BSYI jz . + 2;
                mvi     CLRSINT1,CLRBUSFREE;
                or      SIMODE1, ENBUSFREE;
        }
@@ -582,9 +583,6 @@ found_last_sent_scb:
                bmov    CURRSCB, SCBPTR, 2;
 curscb_ww_done:
        } else {
-               /*
-                * Untested - Verify with Rev B.
-                */
                bmov    SCBPTR, CURRSCB, 2;
        }
 
@@ -651,12 +649,13 @@ select_out_non_packetized:
        and     SCSISEQ0, ~ENSELO;
        if ((ahd->bugs & AHD_BUSFREEREV_BUG) != 0) {
                /*
-                * This exposes a window whereby a
-                * busfree just after a selection will
-                * be missed, but there is no other safe
-                * way to enable busfree detection if
-                * the busfreerev function is broken.
+                * Test to ensure that the bus has not
+                * already gone free prior to clearing
+                * any stale busfree status.  This avoids
+                * a window whereby a busfree just after
+                * a selection could be missed.
                 */
+               test    SCSISIGI, BSYI jz . + 2;
                mvi     CLRSINT1,CLRBUSFREE;
                or      SIMODE1, ENBUSFREE;
        }
@@ -729,13 +728,38 @@ p_command_embedded:
        mvi     DFCNTRL, SCSIEN;
 p_command_xfer:
        and     SEQ_FLAGS, ~NO_CDB_SENT;
-       test    DFCNTRL, SCSIEN jnz .;
+       if ((ahd->features & AHD_FAST_CDB_DELIVERY) != 0) {
+               /*
+                * To speed up CDB delivery in Rev B, all CDB acks
+                * are "released" to the output sync as soon as the
+                * command phase starts.  There is only one problem
+                * with this approach.  If the target changes phase
+                * before all data are sent, we have left over acks
+                * that can go out on the bus in a data phase.  Due
+                * to other chip contraints, this only happens if
+                * the target goes to data-in, but if the acks go
+                * out before we can test SDONE, we'll think that
+                * the transfer has completed successfully.  Work
+                * around this by taking advantage of the 400ns or
+                * 800ns dead time between command phase and the REQ
+                * of the new phase.  If the transfer has completed
+                * successfully, SCSIEN should fall *long* before we
+                * see a phase change.  We thus treat any phasemiss
+                * that occurs before SCSIEN falls as an incomplete
+                * transfer.
+                */
+               test    SSTAT1, PHASEMIS jnz p_command_xfer_failed;
+               test    DFCNTRL, SCSIEN jnz . - 1;
+       } else {
+               test    DFCNTRL, SCSIEN jnz .;
+       }
        /*
         * DMA Channel automatically disabled.
         * Don't allow a data phase if the command
         * was not fully transferred.
         */
        test    SSTAT2, SDONE jnz ITloop;
+p_command_xfer_failed:
        or      SEQ_FLAGS, NO_CDB_SENT;
        jmp     ITloop;
 
@@ -1959,12 +1983,14 @@ SET_DST_MODE    M_SCSI;
        test    SSTAT0, SELDO jnz return;
        mvi     SCBPTR[1], SCB_LIST_NULL;
 unexpected_nonpkt_phase:
-       test    MODE_PTR, ~(MK_MODE(M_DFF1, M_DFF1)) jnz . + 3;
+       test    MODE_PTR, ~(MK_MODE(M_DFF1, M_DFF1))
+               jnz unexpected_nonpkt_mode_cleared;
 SET_SRC_MODE   M_DFF0;
 SET_DST_MODE   M_DFF0;
        or      LONGJMP_ADDR[1], INVALID_ADDR;
        dec     SCB_FIFO_USE_COUNT;
        mvi     DFFSXFRCTL, CLRCHN;
+unexpected_nonpkt_mode_cleared:
        mvi     CLRSINT2, CLRNONPACKREQ;
        test    SCSIPHASE, ~(MSG_IN_PHASE|MSG_OUT_PHASE) jnz illegal_phase;
        SET_SEQINTCODE(ENTERING_NONPACK)
index f106606..611d84b 100644 (file)
@@ -37,7 +37,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#194 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.c#202 $
  *
  * $FreeBSD$
  */
@@ -224,6 +224,11 @@ static u_int               ahd_resolve_seqaddr(struct ahd_softc *ahd,
 static void            ahd_download_instr(struct ahd_softc *ahd,
                                           u_int instrptr, uint8_t *dconsts);
 static int             ahd_probe_stack_size(struct ahd_softc *ahd);
+static int             ahd_scb_active_in_fifo(struct ahd_softc *ahd,
+                                              struct scb *scb);
+static void            ahd_run_data_fifo(struct ahd_softc *ahd,
+                                         struct scb *scb);
+
 #ifdef AHD_TARGET_MODE
 static void            ahd_queue_lstate_event(struct ahd_softc *ahd,
                                               struct ahd_tmode_lstate *lstate,
@@ -328,10 +333,7 @@ ahd_restart(struct ahd_softc *ahd)
        /* Always allow reselection */
        ahd_outb(ahd, SCSISEQ1,
                 ahd_inb(ahd, SCSISEQ_TEMPLATE) & (ENSELI|ENRSELI|ENAUTOATNP));
-       /* Ensure that no DMA operations are in progress */
        ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
-       ahd_outb(ahd, SCBHCNT, 0);
-       ahd_outb(ahd, CCSCBCTL, CCSCBRESET);
        ahd_outb(ahd, SEQCTL0, FASTMODE|SEQRESET);
        ahd_unpause(ahd);
 }
@@ -371,14 +373,92 @@ ahd_flush_qoutfifo(struct ahd_softc *ahd)
        u_int           next_scbid;
 
        saved_modes = ahd_save_modes(ahd);
-       ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
+
+       /*
+        * Complete any SCBs that just finished being
+        * DMA'ed into the qoutfifo.
+        */
+       ahd_run_qoutfifo(ahd);
+
+       /*
+        * Flush the good status FIFO for compelted packetized commands.
+        */
+       ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
        saved_scbptr = ahd_get_scbptr(ahd);
+       while ((ahd_inb(ahd, LQISTAT2) & LQIGSAVAIL) != 0) {
+               u_int fifo_mode;
+               u_int i;
+               
+               scbid = (ahd_inb(ahd, GSFIFO+1) << 8)
+                     | ahd_inb(ahd, GSFIFO);
+               scb = ahd_lookup_scb(ahd, scbid);
+               if (scb == NULL) {
+                       printf("%s: Warning - GSFIFO SCB %d invalid\n",
+                              ahd_name(ahd), scbid);
+                       continue;
+               }
+               /*
+                * Determine if this transaction is still active in
+                * any FIFO.  If it is, we must flush that FIFO to
+                * the host before completing the  command.
+                */
+               fifo_mode = 0;
+               for (i = 0; i < 2; i++) {
+                       /* Toggle to the other mode. */
+                       fifo_mode ^= 1;
+                       ahd_set_modes(ahd, fifo_mode, fifo_mode);
+                       if (ahd_scb_active_in_fifo(ahd, scb) == 0)
+                               continue;
+
+                       ahd_run_data_fifo(ahd, scb);
+
+                       /*
+                        * Clearing this transaction in this FIFO may
+                        * cause a CFG4DATA for this same transaction
+                        * to assert in the other FIFO.  Make sure we
+                        * loop one more time and check the other FIFO.
+                        */
+                       i = 0;
+               }
+               ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
+               ahd_set_scbptr(ahd, scbid);
+               if ((ahd_inb_scbram(ahd, SCB_SGPTR) & SG_LIST_NULL) == 0
+                && ((ahd_inb_scbram(ahd, SCB_SGPTR) & SG_FULL_RESID) != 0
+                 || (ahd_inb_scbram(ahd, SCB_RESIDUAL_SGPTR)
+                     & SG_LIST_NULL) != 0)) {
+                       u_int comp_head;
+
+                       /*
+                        * The transfer completed with a residual.
+                        * Place this SCB on the complete DMA list
+                        * so that we Update our in-core copy of the
+                        * SCB before completing the command.
+                        */
+                       ahd_outb(ahd, SCB_SCSI_STATUS, 0);
+                       ahd_outb(ahd, SCB_SGPTR,
+                                ahd_inb_scbram(ahd, SCB_SGPTR)
+                                | SG_STATUS_VALID);
+                       ahd_outw(ahd, SCB_TAG, SCB_GET_TAG(scb));
+                       comp_head = ahd_inw(ahd, COMPLETE_DMA_SCB_HEAD);
+                       ahd_outw(ahd, SCB_NEXT_COMPLETE, comp_head);
+                       if (SCBID_IS_NULL(comp_head))
+                               ahd_outw(ahd, COMPLETE_DMA_SCB_HEAD,
+                                        SCB_GET_TAG(scb));
+               } else
+                       ahd_complete_scb(ahd, scb);
+       }
+       ahd_set_scbptr(ahd, saved_scbptr);
+
+       /*
+        * Setup for command channel portion of flush.
+        */
+       ahd_set_modes(ahd, AHD_MODE_CCHAN, AHD_MODE_CCHAN);
 
        /*
         * Wait for any inprogress DMA to complete and clear DMA state
         * if this if for an SCB in the qinfifo.
         */
-       while ((ccscbctl = ahd_inb(ahd, CCSCBCTL) & (CCARREN|CCSCBEN)) != 0) {
+       while (((ccscbctl = ahd_inb(ahd, CCSCBCTL)) & (CCARREN|CCSCBEN)) != 0) {
 
                if ((ccscbctl & (CCSCBDIR|CCARREN)) == (CCSCBDIR|CCARREN)) {
                        if ((ccscbctl & ARRDONE) != 0)
@@ -390,12 +470,7 @@ ahd_flush_qoutfifo(struct ahd_softc *ahd)
        if ((ccscbctl & CCSCBDIR) != 0)
                ahd_outb(ahd, CCSCBCTL, ccscbctl & ~(CCARREN|CCSCBEN));
 
-       /*
-        * Complete any SCBs that just finished being
-        * DMA'ed into the qoutfifo.
-        */
-       ahd_run_qoutfifo(ahd);
-
+       saved_scbptr = ahd_get_scbptr(ahd);
        /*
         * Manually update/complete any completed SCBs that are waiting to be
         * DMA'ed back up to the host.
@@ -438,29 +513,276 @@ ahd_flush_qoutfifo(struct ahd_softc *ahd)
                scbid = next_scbid;
        }
        ahd_outw(ahd, COMPLETE_SCB_HEAD, SCB_LIST_NULL);
+
+       /*
+        * Restore state.
+        */
        ahd_set_scbptr(ahd, saved_scbptr);
+       ahd_restore_modes(ahd, saved_modes);
+       ahd->flags |= AHD_UPDATE_PEND_CMDS;
+}
+
+/*
+ * Determine if an SCB for a packetized transaction
+ * is active in a FIFO.
+ */
+static int
+ahd_scb_active_in_fifo(struct ahd_softc *ahd, struct scb *scb)
+{
 
        /*
-        * Flush the good status FIFO for compelted packetized commands.
+        * The FIFO is only active for our transaction if
+        * the SCBPTR matches the SCB's ID and the firmware
+        * has installed a handler for the FIFO or we have
+        * a pending SAVEPTRS or CFG4DATA interrupt.
         */
-       ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
-       while ((ahd_inb(ahd, LQISTAT2) & LQIGSAVAIL) != 0) {
-               scbid = (ahd_inb(ahd, GSFIFO+1) << 8)
-                     | ahd_inb(ahd, GSFIFO);
-               scb = ahd_lookup_scb(ahd, scbid);
-               if (scb == NULL) {
-                       printf("%s: Warning - GSFIFO SCB %d invalid\n",
-                              ahd_name(ahd), scbid);
-                       continue;
+       if (ahd_get_scbptr(ahd) != SCB_GET_TAG(scb)
+        || ((ahd_inb(ahd, LONGJMP_ADDR+1) & INVALID_ADDR) != 0
+         && (ahd_inb(ahd, SEQINTSRC) & (CFG4DATA|SAVEPTRS)) == 0))
+               return (0);
+
+       return (1);
+}
+
+/*
+ * Run a data fifo to completion for a transaction we know
+ * has completed across the SCSI bus (good status has been
+ * received).  We are already set to the correct FIFO mode
+ * on entry to this routine.
+ *
+ * This function attempts to operate exactly as the firmware
+ * would when running this FIFO.  Care must be taken to update
+ * this routine any time the firmware's FIFO algorithm is
+ * changed.
+ */
+static void
+ahd_run_data_fifo(struct ahd_softc *ahd, struct scb *scb)
+{
+       u_int seqintsrc;
+
+       while (1) {
+               seqintsrc = ahd_inb(ahd, SEQINTSRC);
+               if ((seqintsrc & CFG4DATA) != 0) {
+                       uint32_t datacnt;
+                       uint32_t sgptr;
+
+                       /*
+                        * Clear full residual flag.
+                        */
+                       sgptr = ahd_inl_scbram(ahd, SCB_SGPTR) & ~SG_FULL_RESID;
+                       ahd_outb(ahd, SCB_SGPTR, sgptr);
+
+                       /*
+                        * Load datacnt and address.
+                        */
+                       datacnt = ahd_inl_scbram(ahd, SCB_DATACNT);
+                       if ((datacnt & AHD_DMA_LAST_SEG) != 0) {
+                               sgptr |= LAST_SEG;
+                               ahd_outb(ahd, SG_STATE, 0);
+                       } else
+                               ahd_outb(ahd, SG_STATE, LOADING_NEEDED);
+                       ahd_outq(ahd, HADDR, ahd_inq_scbram(ahd, SCB_DATAPTR));
+                       ahd_outl(ahd, HCNT, datacnt & AHD_SG_LEN_MASK);
+                       ahd_outb(ahd, SG_CACHE_PRE, sgptr);
+                       ahd_outb(ahd, DFCNTRL, PRELOADEN|SCSIEN|HDMAEN);
+
+                       /*
+                        * Initialize Residual Fields.
+                        */
+                       ahd_outb(ahd, SCB_RESIDUAL_DATACNT+3, datacnt >> 24);
+                       ahd_outl(ahd, SCB_RESIDUAL_SGPTR, sgptr & SG_PTR_MASK);
+
+                       /*
+                        * Mark the SCB as having a FIFO in use.
+                        */
+                       ahd_outb(ahd, SCB_FIFO_USE_COUNT,
+                                ahd_inb_scbram(ahd, SCB_FIFO_USE_COUNT) + 1);
+
+                       /*
+                        * Install a "fake" handler for this FIFO.
+                        */
+                       ahd_outw(ahd, LONGJMP_ADDR, 0);
+
+                       /*
+                        * Notify the hardware that we have satisfied
+                        * this sequencer interrupt.
+                        */
+                       ahd_outb(ahd, CLRSEQINTSRC, CLRCFG4DATA);
+               } else if ((seqintsrc & SAVEPTRS) != 0) {
+                       uint32_t sgptr;
+                       uint32_t resid;
+
+                       if ((ahd_inb(ahd, LONGJMP_ADDR+1)&INVALID_ADDR) != 0) {
+                               /*
+                                * Snapshot Save Pointers.  Clear
+                                * the snapshot and continue.
+                                */
+                               ahd_outb(ahd, DFFSXFRCTL, CLRCHN);
+                               continue;
+                       }
+
+                       /*
+                        * Disable S/G fetch so the DMA engine
+                        * is available to future users.
+                        */
+                       if ((ahd_inb(ahd, SG_STATE) & FETCH_INPROG) != 0)
+                               ahd_outb(ahd, CCSGCTL, 0);
+                       ahd_outb(ahd, SG_STATE, 0);
+
+                       /*
+                        * Flush the data FIFO.  Strickly only
+                        * necessary for Rev A parts.
+                        */
+                       ahd_outb(ahd, DFCNTRL,
+                                ahd_inb(ahd, DFCNTRL) | FIFOFLUSH);
+
+                       /*
+                        * Calculate residual.
+                        */
+                       sgptr = ahd_inl_scbram(ahd, SCB_RESIDUAL_SGPTR);
+                       resid = ahd_inl(ahd, SHCNT);
+                       resid |=
+                           ahd_inb_scbram(ahd, SCB_RESIDUAL_DATACNT+3) << 24;
+                       ahd_outl(ahd, SCB_RESIDUAL_DATACNT, resid);
+                       if ((ahd_inb(ahd, SG_CACHE_SHADOW) & LAST_SEG) == 0) {
+                               /*
+                                * Must back up to the correct S/G element.
+                                * Typically this just means resetting our
+                                * low byte to the offset in the SG_CACHE,
+                                * but if we wrapped, we have to correct
+                                * the other bytes of the sgptr too.
+                                */
+                               if ((ahd_inb(ahd, SG_CACHE_SHADOW) & 0x80) != 0
+                                && (sgptr & 0x80) == 0)
+                                       sgptr -= 0x100;
+                               sgptr &= ~0xFF;
+                               sgptr |= ahd_inb(ahd, SG_CACHE_SHADOW)
+                                      & SG_ADDR_MASK;
+                               ahd_outl(ahd, SCB_RESIDUAL_SGPTR, sgptr);
+                               ahd_outb(ahd, SCB_RESIDUAL_DATACNT + 3, 0);
+                       } else if ((resid & AHD_SG_LEN_MASK) == 0) {
+                               ahd_outb(ahd, SCB_RESIDUAL_SGPTR,
+                                        sgptr | SG_LIST_NULL);
+                       }
+                       /*
+                        * Save Pointers.
+                        */
+                       ahd_outq(ahd, SCB_DATAPTR, ahd_inq(ahd, SHADDR));
+                       ahd_outl(ahd, SCB_DATACNT, resid);
+                       ahd_outl(ahd, SCB_SGPTR, sgptr);
+                       ahd_outb(ahd, CLRSEQINTSRC, CLRSAVEPTRS);
+                       ahd_outb(ahd, SEQIMODE,
+                                ahd_inb(ahd, SEQIMODE) | ENSAVEPTRS);
+                       /*
+                        * If the data is to the SCSI bus, we are
+                        * done, otherwise wait for FIFOEMP.
+                        */
+                       if ((ahd_inb(ahd, DFCNTRL) & DIRECTION) != 0)
+                               break;
+               } else if ((ahd_inb(ahd, SG_STATE) & LOADING_NEEDED) != 0) {
+                       uint32_t sgptr;
+                       uint64_t data_addr;
+                       uint32_t data_len;
+                       u_int    dfcntrl;
+
+                       /*
+                        * Disable S/G fetch so the DMA engine
+                        * is available to future users.
+                        */
+                       if ((ahd_inb(ahd, SG_STATE) & FETCH_INPROG) != 0) {
+                               ahd_outb(ahd, CCSGCTL, 0);
+                               ahd_outb(ahd, SG_STATE, LOADING_NEEDED);
+                       }
+
+                       /*
+                        * Wait for the DMA engine to notice that the
+                        * host transfer is enabled and that there is
+                        * space in the S/G FIFO for new segments before
+                        * loading more segments.
+                        */
+                       if ((ahd_inb(ahd, DFSTATUS) & PRELOAD_AVAIL) == 0)
+                               continue;
+                       if ((ahd_inb(ahd, DFCNTRL) & HDMAENACK) == 0)
+                               continue;
+
+                       /*
+                        * Determine the offset of the next S/G
+                        * element to load.
+                        */
+                       sgptr = ahd_inl_scbram(ahd, SCB_RESIDUAL_SGPTR);
+                       sgptr &= SG_PTR_MASK;
+                       if ((ahd->flags & AHD_64BIT_ADDRESSING) != 0) {
+                               struct ahd_dma64_seg *sg;
+
+                               sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
+                               data_addr = sg->addr;
+                               data_len = sg->len;
+                               sgptr += sizeof(*sg);
+                       } else {
+                               struct  ahd_dma_seg *sg;
+
+                               sg = ahd_sg_bus_to_virt(ahd, scb, sgptr);
+                               data_addr = sg->len & AHD_SG_HIGH_ADDR_MASK;
+                               data_addr <<= 8;
+                               data_addr |= sg->addr;
+                               data_len = sg->len;
+                               sgptr += sizeof(*sg);
+                       }
+
+                       /*
+                        * Update residual information.
+                        */
+                       ahd_outb(ahd, SCB_RESIDUAL_DATACNT+3, data_len >> 24);
+                       ahd_outl(ahd, SCB_RESIDUAL_SGPTR, sgptr);
+
+                       /*
+                        * Load the S/G.
+                        */
+                       if (data_len & AHD_DMA_LAST_SEG) {
+                               sgptr |= LAST_SEG;
+                               ahd_outb(ahd, SG_STATE, 0);
+                       }
+                       ahd_outq(ahd, HADDR, data_addr);
+                       ahd_outl(ahd, HCNT, data_len & AHD_SG_LEN_MASK);
+                       ahd_outb(ahd, SG_CACHE_PRE, sgptr & 0xFF);
+
+                       /*
+                        * Advertise the segment to the hardware.
+                        */
+                       dfcntrl = ahd_inb(ahd, DFCNTRL)|PRELOADEN|HDMAEN;
+                       if ((ahd->features & AHD_NEW_DFCNTRL_OPTS)!=0) {
+                               /*
+                                * Use SCSIENWRDIS so that SCSIEN
+                                * is never modified by this
+                                * operation.
+                                */
+                               dfcntrl |= SCSIENWRDIS;
+                       }
+                       ahd_outb(ahd, DFCNTRL, dfcntrl);
+               } else if ((ahd_inb(ahd, SG_CACHE_SHADOW)
+                        & LAST_SEG_DONE) != 0) {
+
+                       /*
+                        * Transfer completed to the end of SG list
+                        * and has flushed to the host.
+                        */
+                       ahd_outb(ahd, SCB_SGPTR,
+                                ahd_inb_scbram(ahd, SCB_SGPTR) | SG_LIST_NULL);
+                       break;
+               } else if ((ahd_inb(ahd, DFSTATUS) & FIFOEMP) != 0) {
+                       break;
                }
-               ahd_complete_scb(ahd, scb);
+               ahd_delay(200);
        }
-
        /*
-        * Restore state.
+        * Clear any handler for this FIFO, decrement
+        * the FIFO use count for the SCB, and release
+        * the FIFO.
         */
-       ahd_restore_modes(ahd, saved_modes);
-       ahd->flags |= AHD_UPDATE_PEND_CMDS;
+       ahd_outb(ahd, LONGJMP_ADDR + 1, INVALID_ADDR);
+       ahd_outb(ahd, SCB_FIFO_USE_COUNT,
+                ahd_inb_scbram(ahd, SCB_FIFO_USE_COUNT) - 1);
+       ahd_outb(ahd, DFFSXFRCTL, CLRCHN);
 }
 
 void
@@ -589,7 +911,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
                        /*
                         * Somehow need to know if this
                         * is from a selection or reselection.
-                        * From that, we can termine target
+                        * From that, we can determine target
                         * ID so we at least have an I_T nexus.
                         */
                } else {
@@ -796,7 +1118,8 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
                         * attempt to complete this bogus SCB.
                         */
                        ahd_outb(ahd, SCB_CONTROL,
-                                ahd_inb(ahd, SCB_CONTROL) & ~STATUS_RCVD);
+                                ahd_inb_scbram(ahd, SCB_CONTROL)
+                                & ~STATUS_RCVD);
                }
                break;
        }
@@ -1029,7 +1352,7 @@ ahd_handle_seqint(struct ahd_softc *ahd, u_int intstat)
                                           ROLE_INITIATOR, /*status*/0,
                                           SEARCH_REMOVE);
                ahd_outb(ahd, SCB_CONTROL,
-                        ahd_inb(ahd, SCB_CONTROL) & ~MK_MESSAGE);
+                        ahd_inb_scbram(ahd, SCB_CONTROL) & ~MK_MESSAGE);
                break;
        }
        case TASKMGMT_FUNC_COMPLETE:
@@ -1880,21 +2203,32 @@ ahd_handle_nonpkt_busfree(struct ahd_softc *ahd)
                        tinfo->goal.ppr_options = 0;
                        ahd_qinfifo_requeue_tail(ahd, scb);
                        printerror = 0;
-               } else if ((ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_WDTR, FALSE)
-                        || ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_SDTR, FALSE))
+               } else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_WDTR, FALSE)
                        && ppr_busfree == 0) {
                        /*
-                        * Negotiation Rejected.  Go-async and
+                        * Negotiation Rejected.  Go-narrow and
                         * retry command.
                         */
 #ifdef AHD_DEBUG
                        if ((ahd_debug & AHD_SHOW_MESSAGES) != 0)
-                               printf("Negotiation rejected busfree.\n");
+                               printf("WDTR negotiation rejected busfree.\n");
 #endif
                        ahd_set_width(ahd, &devinfo,
                                      MSG_EXT_WDTR_BUS_8_BIT,
                                      AHD_TRANS_CUR|AHD_TRANS_GOAL,
                                      /*paused*/TRUE);
+                       ahd_qinfifo_requeue_tail(ahd, scb);
+                       printerror = 0;
+               } else if (ahd_sent_msg(ahd, AHDMSG_EXT, MSG_EXT_SDTR, FALSE)
+                       && ppr_busfree == 0) {
+                       /*
+                        * Negotiation Rejected.  Go-async and
+                        * retry command.
+                        */
+#ifdef AHD_DEBUG
+                       if ((ahd_debug & AHD_SHOW_MESSAGES) != 0)
+                               printf("SDTR negotiation rejected busfree.\n");
+#endif
                        ahd_set_syncrate(ahd, &devinfo,
                                        /*period*/0, /*offset*/0,
                                        /*ppr_options*/0,
@@ -2187,8 +2521,14 @@ ahd_clear_critical_section(struct ahd_softc *ahd)
                        ahd_outb(ahd, LQOMODE0, 0);
                        ahd_outb(ahd, LQOMODE1, 0);
                        ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
-                       simode1 = ahd_inb(ahd, SIMODE1);
-                       ahd_outb(ahd, SIMODE1, ENBUSFREE);
+                       simode1 = ahd_inb(ahd, SIMODE1);
+                       /*
+                        * We don't clear ENBUSFREE.  Unfortunately
+                        * we cannot re-enable busfree detection within
+                        * the current connection, so we must leave it
+                        * on while single stepping.
+                        */
+                       ahd_outb(ahd, SIMODE1, simode1 & ENBUSFREE);
                        ahd_outb(ahd, SEQCTL0, ahd_inb(ahd, SEQCTL0) | STEP);
                        stepping = TRUE;
                }
@@ -2196,9 +2536,8 @@ ahd_clear_critical_section(struct ahd_softc *ahd)
                ahd_outb(ahd, CLRINT, CLRSCSIINT);
                ahd_set_modes(ahd, ahd->saved_src_mode, ahd->saved_dst_mode);
                ahd_outb(ahd, HCNTRL, ahd->unpause);
-               do {
+               while (!ahd_is_paused(ahd))
                        ahd_delay(200);
-               } while (!ahd_is_paused(ahd));
                ahd_update_modes(ahd);
        }
        if (stepping) {
@@ -2316,7 +2655,7 @@ ahd_dump_sglist(struct scb *scb)
                                len = ahd_le32toh(sg_list[i].len);
                                printf("sg[%d] - Addr 0x%x%x : Length %d%s\n",
                                       i,
-                                      (len >> 24) & SG_HIGH_ADDR_BITS,
+                                      (len & AHD_SG_HIGH_ADDR_MASK) >> 24,
                                       ahd_le32toh(sg_list[i].addr),
                                       len & AHD_SG_LEN_MASK,
                                       len & AHD_DMA_LAST_SEG ? " Last" : "");
@@ -2904,7 +3243,7 @@ ahd_update_pending_scbs(struct ahd_softc *ahd)
 {
        struct          scb *pending_scb;
        int             pending_scb_count;
-       int             i;
+       u_int           scb_tag;
        int             paused;
        u_int           saved_scbptr;
        ahd_mode_state  saved_modes;
@@ -2962,17 +3301,14 @@ ahd_update_pending_scbs(struct ahd_softc *ahd)
        ahd_outb(ahd, SCSISEQ0, ahd_inb(ahd, SCSISEQ0) & ~ENSELO);
        saved_scbptr = ahd_get_scbptr(ahd);
        /* Ensure that the hscbs down on the card match the new information */
-       for (i = 0; i < ahd->scb_data.maxhscbs; i++) {
+       for (scb_tag = 0; scb_tag < ahd->scb_data.maxhscbs; scb_tag++) {
                struct  hardware_scb *pending_hscb;
                u_int   control;
-               u_int   scb_tag;
 
-               ahd_set_scbptr(ahd, i);
-               scb_tag = i;
                pending_scb = ahd_lookup_scb(ahd, scb_tag);
                if (pending_scb == NULL)
                        continue;
-
+               ahd_set_scbptr(ahd, scb_tag);
                pending_hscb = pending_scb->hscb;
                control = ahd_inb_scbram(ahd, SCB_CONTROL);
                control &= ~MK_MESSAGE;
@@ -3187,7 +3523,7 @@ ahd_setup_initiator_msgout(struct ahd_softc *ahd, struct ahd_devinfo *devinfo,
                       devinfo->target_mask);
                panic("SCB = %d, SCB Control = %x:%x, MSG_OUT = %x "
                      "SCB flags = %x", SCB_GET_TAG(scb), scb->hscb->control,
-                     ahd_inb(ahd, SCB_CONTROL), ahd_inb(ahd, MSG_OUT),
+                     ahd_inb_scbram(ahd, SCB_CONTROL), ahd_inb(ahd, MSG_OUT),
                      scb->flags);
        }
 
@@ -3232,6 +3568,7 @@ ahd_build_transfer_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
         * may change.
         */
        period = tinfo->goal.period;
+       offset = tinfo->goal.offset;
        ppr_options = tinfo->goal.ppr_options;
        /* Target initiated PPR is not allowed in the SCSI spec */
        if (devinfo->role == ROLE_TARGET)
@@ -3239,7 +3576,7 @@ ahd_build_transfer_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
        ahd_devlimited_syncrate(ahd, tinfo, &period,
                                &ppr_options, devinfo->role);
        dowide = tinfo->curr.width != tinfo->goal.width;
-       dosync = tinfo->curr.period != period;
+       dosync = tinfo->curr.offset != offset || tinfo->curr.period != period;
        /*
         * Only use PPR if we have options that need it, even if the device
         * claims to support it.  There might be an expander in the way
@@ -3249,7 +3586,7 @@ ahd_build_transfer_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
 
        if (!dowide && !dosync && !doppr) {
                dowide = tinfo->goal.width != MSG_EXT_WDTR_BUS_8_BIT;
-               dosync = tinfo->goal.period != 0;
+               dosync = tinfo->goal.offset != 0;
        }
 
        if (!dowide && !dosync && !doppr) {
@@ -3725,8 +4062,13 @@ reswitch:
                if ((ahd->msg_flags & MSG_FLAG_PACKETIZED) != 0) {
                        printf("%s: Returning to Idle Loop\n",
                               ahd_name(ahd));
-                       ahd_outb(ahd, LASTPHASE, P_BUSFREE);
                        ahd_clear_msg_state(ahd);
+
+                       /*
+                        * Perform the equivalent of a clear_target_state.
+                        */
+                       ahd_outb(ahd, LASTPHASE, P_BUSFREE);
+                       ahd_outb(ahd, SEQ_FLAGS, NOT_IDENTIFIED|NO_CDB_SENT);
                        ahd_outb(ahd, SEQCTL0, FASTMODE|SEQRESET);
                } else {
                        ahd_clear_msg_state(ahd);
@@ -3983,22 +4325,30 @@ ahd_parse_msg(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
                                response = TRUE;
                                sending_reply = TRUE;
                        }
+                       /*
+                        * After a wide message, we are async, but
+                        * some devices don't seem to honor this portion
+                        * of the spec.  Force a renegotiation of the
+                        * sync component of our transfer agreement even
+                        * if our goal is async.  By updating our width
+                        * after forcing the negotiation, we avoid
+                        * renegotiating for width.
+                        */
+                       ahd_update_neg_request(ahd, devinfo, tstate,
+                                              tinfo, AHD_NEG_ALWAYS);
                        ahd_set_width(ahd, devinfo, bus_width,
                                      AHD_TRANS_ACTIVE|AHD_TRANS_GOAL,
                                      /*paused*/TRUE);
-                       /* After a wide message, we are async */
-                       ahd_set_syncrate(ahd, devinfo, /*period*/0,
-                                        /*offset*/0, /*ppr_options*/0,
-                                        AHD_TRANS_ACTIVE, /*paused*/TRUE);
                        if (sending_reply == FALSE && reject == FALSE) {
 
-                               if (tinfo->goal.offset) {
-                                       ahd->msgout_index = 0;
-                                       ahd->msgout_len = 0;
-                                       ahd_build_transfer_msg(ahd, devinfo);
-                                       ahd->msgout_index = 0;
-                                       response = TRUE;
-                               }
+                               /*
+                                * We will always have an SDTR to send.
+                                */
+                               ahd->msgout_index = 0;
+                               ahd->msgout_len = 0;
+                               ahd_build_transfer_msg(ahd, devinfo);
+                               ahd->msgout_index = 0;
+                               response = TRUE;
                        }
                        done = MSGLOOP_MSGCOMPLETE;
                        break;
@@ -4401,7 +4751,8 @@ ahd_handle_ign_wide_residue(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
 
                sgptr = ahd_inb_scbram(ahd, SCB_RESIDUAL_SGPTR);
                if ((sgptr & SG_LIST_NULL) != 0
-                && (ahd_inb(ahd, SCB_TASK_ATTRIBUTE) & SCB_XFERLEN_ODD) != 0) {
+                && (ahd_inb_scbram(ahd, SCB_TASK_ATTRIBUTE)
+                    & SCB_XFERLEN_ODD) != 0) {
                        /*
                         * If the residual occurred on the last
                         * transfer and the transfer request was
@@ -4502,7 +4853,8 @@ ahd_handle_ign_wide_residue(struct ahd_softc *ahd, struct ahd_devinfo *devinfo)
                         * correct for subsequent data transfers.
                         */
                        ahd_outb(ahd, SCB_TASK_ATTRIBUTE,
-                           ahd_inb(ahd, SCB_TASK_ATTRIBUTE) ^ SCB_XFERLEN_ODD);
+                           ahd_inb_scbram(ahd, SCB_TASK_ATTRIBUTE)
+                           ^ SCB_XFERLEN_ODD);
 
                        ahd_outl(ahd, SCB_RESIDUAL_SGPTR, sgptr);
                        ahd_outl(ahd, SCB_RESIDUAL_DATACNT, data_cnt);
@@ -4542,9 +4894,8 @@ ahd_reinitialize_dataptrs(struct ahd_softc *ahd)
         */
        ahd_outb(ahd, DFFSXFRCTL, CLRCHN);
        wait = 1000;
-       do {
+       while (--wait && !(ahd_inb(ahd, MDFFSTAT) & FIFOFREE))
                ahd_delay(100);
-       } while (--wait && !(ahd_inb(ahd, MDFFSTAT) & FIFOFREE));
        if (wait == 0) {
                ahd_print_path(ahd, scb);
                printf("ahd_reinitialize_dataptrs: Forcing FIFO free.\n");
@@ -5000,15 +5351,20 @@ ahd_shutdown(void *arg)
        ahd_timer_stop(&ahd->stat_timer);
 
        /* This will reset most registers to 0, but not all */
-       ahd_reset(ahd);
+       ahd_reset(ahd, /*reinit*/FALSE);
 }
 
 /*
  * Reset the controller and record some information about it
- * that is only available just after a reset.
+ * that is only available just after a reset.  If "reinit" is
+ * non-zero, this reset occured after initial configuration
+ * and the caller requests that the chip be fully reinitialized
+ * to a runable state.  Chip interrupts are *not* enabled after
+ * a reinitialization.  The caller must enable interrupts via
+ * ahd_intr_enable().
  */
 int
-ahd_reset(struct ahd_softc *ahd)
+ahd_reset(struct ahd_softc *ahd, int reinit)
 {
        u_int    sxfrctl1;
        int      wait;
@@ -5101,7 +5457,7 @@ ahd_reset(struct ahd_softc *ahd)
         * If a recovery action has forced a chip reset,
         * re-initialize the chip to our liking.
         */
-       if (ahd->init_level > 0)
+       if (reinit != 0)
                ahd_chip_init(ahd);
 
        return (0);
@@ -5382,6 +5738,7 @@ ahd_setup_iocell_workaround(struct ahd_softc *ahd)
                printf("%s: Setting up iocell workaround\n", ahd_name(ahd));
 #endif
        ahd_restore_modes(ahd, saved_modes);
+       ahd->flags &= ~AHD_HAD_FIRST_SEL;
 }
 
 static void
@@ -5390,6 +5747,8 @@ ahd_iocell_first_selection(struct ahd_softc *ahd)
        ahd_mode_state  saved_modes;
        u_int           sblkctl;
 
+       if ((ahd->flags & AHD_HAD_FIRST_SEL) != 0)
+               return;
        saved_modes = ahd_save_modes(ahd);
        ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
        sblkctl = ahd_inb(ahd, SBLKCTL);
@@ -5409,6 +5768,7 @@ ahd_iocell_first_selection(struct ahd_softc *ahd)
        ahd_outb(ahd, SIMODE0, ahd_inb(ahd, SIMODE0) & ~(ENSELDO|ENSELDI));
        ahd_outb(ahd, CLRINT, CLRSCSIINT);
        ahd_restore_modes(ahd, saved_modes);
+       ahd->flags |= AHD_HAD_FIRST_SEL;
 }
 
 /*************************** SCB Management ***********************************/
@@ -6174,7 +6534,7 @@ ahd_chip_init(struct ahd_softc *ahd)
                ahd_outb(ahd, LUNLEN,
                         sizeof(ahd->next_queued_hscb->pkt_long_lun) - 1);
        } else {
-               ahd_outb(ahd, LUNLEN, sizeof(ahd->next_queued_hscb->lun) - 1);
+               ahd_outb(ahd, LUNLEN, LUNLEN_SINGLE_LEVEL_LUN);
        }
        ahd_outb(ahd, CDBLIMIT, SCB_CDB_LEN_PTR - 1);
        ahd_outb(ahd, MAXCMD, 0xFF);
@@ -6215,6 +6575,7 @@ ahd_chip_init(struct ahd_softc *ahd)
        ahd_outb(ahd, CLRSINT3, NTRAMPERR|OSRAMPERR);
        ahd_outb(ahd, CLRINT, CLRSCSIINT);
 
+#if NEEDS_MORE_TESTING
        /*
         * Always enable abort on incoming L_Qs if this feature is
         * supported.  We use this to catch invalid SCB references.
@@ -6222,6 +6583,7 @@ ahd_chip_init(struct ahd_softc *ahd)
        if ((ahd->bugs & AHD_ABORT_LQI_BUG) == 0)
                ahd_outb(ahd, LQCTL1, ABORTPENDING);
        else
+#endif
                ahd_outb(ahd, LQCTL1, 0);
 
        /* All of our queues are empty */
@@ -6703,141 +7065,24 @@ ahd_pause_and_flushwork(struct ahd_softc *ahd)
 int
 ahd_suspend(struct ahd_softc *ahd)
 {
-#if 0
-       uint8_t *ptr;
-       int      i;
 
        ahd_pause_and_flushwork(ahd);
 
-       if (LIST_FIRST(&ahd->pending_scbs) != NULL)
-               return (EBUSY);
-
-#if AHD_TARGET_MODE
-       /*
-        * XXX What about ATIOs that have not yet been serviced?
-        * Perhaps we should just refuse to be suspended if we
-        * are acting in a target role.
-        */
-       if (ahd->pending_device != NULL)
+       if (LIST_FIRST(&ahd->pending_scbs) != NULL) {
+               ahd_unpause(ahd);
                return (EBUSY);
-#endif
-
-       /* Save volatile registers */
-       ahd->suspend_state.channel[0].scsiseq = ahd_inb(ahd, SCSISEQ0);
-       ahd->suspend_state.channel[0].sxfrctl0 = ahd_inb(ahd, SXFRCTL0);
-       ahd->suspend_state.channel[0].sxfrctl1 = ahd_inb(ahd, SXFRCTL1);
-       ahd->suspend_state.channel[0].simode0 = ahd_inb(ahd, SIMODE0);
-       ahd->suspend_state.channel[0].simode1 = ahd_inb(ahd, SIMODE1);
-       ahd->suspend_state.channel[0].seltimer = ahd_inb(ahd, SELTIMER);
-       ahd->suspend_state.channel[0].seqctl = ahd_inb(ahd, SEQCTL0);
-       ahd->suspend_state.dscommand0 = ahd_inb(ahd, DSCOMMAND0);
-       ahd->suspend_state.dspcistatus = ahd_inb(ahd, DSPCISTATUS);
-
-       if ((ahd->features & AHD_DT) != 0) {
-               u_int sfunct;
-
-               sfunct = ahd_inb(ahd, SFUNCT) & ~ALT_MODE;
-               ahd_outb(ahd, SFUNCT, sfunct | ALT_MODE);
-               ahd->suspend_state.optionmode = ahd_inb(ahd, OPTIONMODE);
-               ahd_outb(ahd, SFUNCT, sfunct);
-               ahd->suspend_state.crccontrol1 = ahd_inb(ahd, CRCCONTROL1);
-       }
-
-       if ((ahd->features & AHD_MULTI_FUNC) != 0)
-               ahd->suspend_state.scbbaddr = ahd_inb(ahd, SCBBADDR);
-
-       if ((ahd->features & AHD_ULTRA2) != 0)
-               ahd->suspend_state.dff_thrsh = ahd_inb(ahd, DFF_THRSH);
-
-       ptr = ahd->suspend_state.scratch_ram;
-       for (i = 0; i < 64; i++)
-               *ptr++ = ahd_inb(ahd, SRAM_BASE + i);
-
-       if ((ahd->features & AHD_MORE_SRAM) != 0) {
-               for (i = 0; i < 16; i++)
-                       *ptr++ = ahd_inb(ahd, TARG_OFFSET + i);
-       }
-
-       ptr = ahd->suspend_state.btt;
-       for (i = 0;i < AHD_NUM_TARGETS; i++) {
-               int j;
-
-               for (j = 0;j < AHD_NUM_LUNS_NONPKT; j++) {
-                       u_int tcl;
-
-                       tcl = BUILD_TCL_RAW(i, 'A', j);
-                       *ptr = ahd_find_busy_tcl(ahd, tcl);
-               }
        }
        ahd_shutdown(ahd);
-#endif
        return (0);
 }
 
 int
 ahd_resume(struct ahd_softc *ahd)
 {
-#if 0
-       uint8_t *ptr;
-       int      i;
-
-       ahd_reset(ahd);
-
-       ahd_build_free_scb_list(ahd);
-
-       /* Restore volatile registers */
-       ahd_outb(ahd, SCSISEQ0, ahd->suspend_state.channel[0].scsiseq);
-       ahd_outb(ahd, SXFRCTL0, ahd->suspend_state.channel[0].sxfrctl0);
-       ahd_outb(ahd, SXFRCTL1, ahd->suspend_state.channel[0].sxfrctl1);
-       ahd_outb(ahd, SIMODE0, ahd->suspend_state.channel[0].simode0);
-       ahd_outb(ahd, SIMODE1, ahd->suspend_state.channel[0].simode1);
-       ahd_outb(ahd, SELTIMER, ahd->suspend_state.channel[0].seltimer);
-       ahd_outb(ahd, SEQCTL0, ahd->suspend_state.channel[0].seqctl);
-       if ((ahd->features & AHD_ULTRA2) != 0)
-               ahd_outb(ahd, SCSIID_ULTRA2, ahd->our_id);
-       else
-               ahd_outb(ahd, SCSIID, ahd->our_id);
-
-       ahd_outb(ahd, DSCOMMAND0, ahd->suspend_state.dscommand0);
-       ahd_outb(ahd, DSPCISTATUS, ahd->suspend_state.dspcistatus);
-
-       if ((ahd->features & AHD_DT) != 0) {
-               u_int sfunct;
-
-               sfunct = ahd_inb(ahd, SFUNCT) & ~ALT_MODE;
-               ahd_outb(ahd, SFUNCT, sfunct | ALT_MODE);
-               ahd_outb(ahd, OPTIONMODE, ahd->suspend_state.optionmode);
-               ahd_outb(ahd, SFUNCT, sfunct);
-               ahd_outb(ahd, CRCCONTROL1, ahd->suspend_state.crccontrol1);
-       }
-
-       if ((ahd->features & AHD_MULTI_FUNC) != 0)
-               ahd_outb(ahd, SCBBADDR, ahd->suspend_state.scbbaddr);
-
-       if ((ahd->features & AHD_ULTRA2) != 0)
-               ahd_outb(ahd, DFF_THRSH, ahd->suspend_state.dff_thrsh);
-
-       ptr = ahd->suspend_state.scratch_ram;
-       for (i = 0; i < 64; i++)
-               ahd_outb(ahd, SRAM_BASE + i, *ptr++);
-
-       if ((ahd->features & AHD_MORE_SRAM) != 0) {
-               for (i = 0; i < 16; i++)
-                       ahd_outb(ahd, TARG_OFFSET + i, *ptr++);
-       }
 
-       ptr = ahd->suspend_state.btt;
-       for (i = 0;i < AHD_NUM_TARGETS; i++) {
-               int j;
-
-               for (j = 0;j < AHD_NUM_LUNS; j++) {
-                       u_int tcl;
-
-                       tcl = BUILD_TCL(i << 4, j);
-                       ahd_busy_tcl(ahd, tcl, *ptr);
-               }
-       }
-#endif
+       ahd_reset(ahd, /*reinit*/TRUE);
+       ahd_intr_enable(ahd, TRUE); 
+       ahd_restart(ahd);
        return (0);
 }
 
@@ -7479,9 +7724,12 @@ ahd_reset_current_bus(struct ahd_softc *ahd)
        ahd_outb(ahd, SIMODE1, ahd_inb(ahd, SIMODE1) & ~ENSCSIRST);
        scsiseq = ahd_inb(ahd, SCSISEQ0) & ~(ENSELO|ENARBO|SCSIRSTO);
        ahd_outb(ahd, SCSISEQ0, scsiseq | SCSIRSTO);
+       ahd_flush_device_writes(ahd);
        ahd_delay(AHD_BUSRESET_DELAY);
        /* Turn off the bus reset */
        ahd_outb(ahd, SCSISEQ0, scsiseq);
+       ahd_flush_device_writes(ahd);
+       ahd_delay(AHD_BUSRESET_DELAY);
        if ((ahd->bugs & AHD_SCSIRST_BUG) != 0) {
                /*
                 * 2A Razor #474
@@ -7489,8 +7737,7 @@ ahd_reset_current_bus(struct ahd_softc *ahd)
                 * SCSI bus resets that we initiate, so
                 * we must reset the chip.
                 */
-               ahd_delay(AHD_BUSRESET_DELAY);
-               ahd_reset(ahd);
+               ahd_reset(ahd, /*reinit*/TRUE);
                ahd_intr_enable(ahd, /*enable*/TRUE);
                AHD_ASSERT_MODES(ahd, AHD_MODE_SCSI_MSK, AHD_MODE_SCSI_MSK);
        }
@@ -8585,6 +8832,10 @@ ahd_dump_card_state(struct ahd_softc *ahd)
                                    ahd->saved_dst_mode));
        if (paused)
                printf("Card was paused\n");
+
+       if (ahd_check_cmdcmpltqueues(ahd))
+               printf("Completions are pending\n");
+
        /*
         * Mode independent registers.
         */
@@ -8634,10 +8885,12 @@ ahd_dump_card_state(struct ahd_softc *ahd)
                if (i++ > AHD_SCB_MAX)
                        break;
                cur_col = printf("\n%3d FIFO_USE[0x%x] ", SCB_GET_TAG(scb),
-                                ahd_inb(ahd, SCB_FIFO_USE_COUNT));
+                                ahd_inb_scbram(ahd, SCB_FIFO_USE_COUNT));
                ahd_set_scbptr(ahd, SCB_GET_TAG(scb));
-               ahd_scb_control_print(ahd_inb(ahd, SCB_CONTROL), &cur_col, 60);
-               ahd_scb_scsiid_print(ahd_inb(ahd, SCB_SCSIID), &cur_col, 60);
+               ahd_scb_control_print(ahd_inb_scbram(ahd, SCB_CONTROL),
+                                     &cur_col, 60);
+               ahd_scb_scsiid_print(ahd_inb_scbram(ahd, SCB_SCSIID),
+                                    &cur_col, 60);
        }
        printf("\nTotal %d\n", i);
 
@@ -8666,7 +8919,7 @@ ahd_dump_card_state(struct ahd_softc *ahd)
        while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) {
                ahd_set_scbptr(ahd, scb_index);
                printf("%d ", scb_index);
-               scb_index = ahd_inw(ahd, SCB_NEXT_COMPLETE);
+               scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
        }
        printf("\n");
 
@@ -8676,7 +8929,7 @@ ahd_dump_card_state(struct ahd_softc *ahd)
        while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) {
                ahd_set_scbptr(ahd, scb_index);
                printf("%d ", scb_index);
-               scb_index = ahd_inw(ahd, SCB_NEXT_COMPLETE);
+               scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
        }
        printf("\n");
 
@@ -8687,7 +8940,7 @@ ahd_dump_card_state(struct ahd_softc *ahd)
        while (!SCBID_IS_NULL(scb_index) && i++ < AHD_SCB_MAX) {
                ahd_set_scbptr(ahd, scb_index);
                printf("%d ", scb_index);
-               scb_index = ahd_inw(ahd, SCB_NEXT_COMPLETE);
+               scb_index = ahd_inw_scbram(ahd, SCB_NEXT_COMPLETE);
        }
        printf("\n");
        ahd_set_scbptr(ahd, saved_scb_index);
@@ -8766,15 +9019,16 @@ ahd_dump_card_state(struct ahd_softc *ahd)
               ahd_name(ahd), ahd_inw(ahd, REG0), ahd_inw(ahd, SINDEX),
               ahd_inw(ahd, DINDEX));
        printf("%s: SCBPTR == 0x%x, SCB_NEXT == 0x%x, SCB_NEXT2 == 0x%x\n",
-              ahd_name(ahd), ahd_get_scbptr(ahd), ahd_inw(ahd, SCB_NEXT),
-              ahd_inw(ahd, SCB_NEXT2));
+              ahd_name(ahd), ahd_get_scbptr(ahd),
+              ahd_inw_scbram(ahd, SCB_NEXT),
+              ahd_inw_scbram(ahd, SCB_NEXT2));
        printf("CDB %x %x %x %x %x %x\n",
-              ahd_inb(ahd, SCB_CDB_STORE),
-              ahd_inb(ahd, SCB_CDB_STORE+1),
-              ahd_inb(ahd, SCB_CDB_STORE+2),
-              ahd_inb(ahd, SCB_CDB_STORE+3),
-              ahd_inb(ahd, SCB_CDB_STORE+4),
-              ahd_inb(ahd, SCB_CDB_STORE+5));
+              ahd_inb_scbram(ahd, SCB_CDB_STORE),
+              ahd_inb_scbram(ahd, SCB_CDB_STORE+1),
+              ahd_inb_scbram(ahd, SCB_CDB_STORE+2),
+              ahd_inb_scbram(ahd, SCB_CDB_STORE+3),
+              ahd_inb_scbram(ahd, SCB_CDB_STORE+4),
+              ahd_inb_scbram(ahd, SCB_CDB_STORE+5));
        printf("STACK:");
        for (i = 0; i < ahd->stack_size; i++) {
                ahd->saved_stack[i] =
@@ -8806,10 +9060,12 @@ ahd_dump_scbs(struct ahd_softc *ahd)
                ahd_set_scbptr(ahd, i);
                printf("%3d", i);
                printf("(CTRL 0x%x ID 0x%x N 0x%x N2 0x%x SG 0x%x, RSG 0x%x)\n",
-                      ahd_inb(ahd, SCB_CONTROL),
-                      ahd_inb(ahd, SCB_SCSIID), ahd_inw(ahd, SCB_NEXT),
-                      ahd_inw(ahd, SCB_NEXT2), ahd_inl(ahd, SCB_SGPTR),
-                      ahd_inl(ahd, SCB_RESIDUAL_SGPTR));
+                      ahd_inb_scbram(ahd, SCB_CONTROL),
+                      ahd_inb_scbram(ahd, SCB_SCSIID),
+                      ahd_inw_scbram(ahd, SCB_NEXT),
+                      ahd_inw_scbram(ahd, SCB_NEXT2),
+                      ahd_inl_scbram(ahd, SCB_SGPTR),
+                      ahd_inl_scbram(ahd, SCB_RESIDUAL_SGPTR));
        }
        printf("\n");
        ahd_set_scbptr(ahd, saved_scb_index);
@@ -9192,6 +9448,7 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb)
                        ahd->flags &= ~AHD_INITIATORROLE;
                ahd_pause(ahd);
                ahd_loadseq(ahd);
+               ahd_restart(ahd);
                ahd_unlock(ahd, &s);
        }
        cel = &ccb->cel;
@@ -9425,6 +9682,11 @@ ahd_handle_en_lun(struct ahd_softc *ahd, struct cam_sim *sim, union ccb *ccb)
                                ahd->flags |= AHD_INITIATORROLE;
                                ahd_pause(ahd);
                                ahd_loadseq(ahd);
+                               ahd_restart(ahd);
+                               /*
+                                * Unpaused.  The extra unpause
+                                * that follows is harmless.
+                                */
                        }
                }
                ahd_unpause(ahd);
index 9346d47..440212a 100644 (file)
@@ -37,7 +37,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#50 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_inline.h#51 $
  *
  * $FreeBSD$
  */
@@ -455,6 +455,8 @@ static __inline u_int       ahd_inb_scbram(struct ahd_softc *ahd, u_int offset);
 static __inline u_int  ahd_inw_scbram(struct ahd_softc *ahd, u_int offset);
 static __inline uint32_t
                        ahd_inl_scbram(struct ahd_softc *ahd, u_int offset);
+static __inline uint64_t
+                       ahd_inq_scbram(struct ahd_softc *ahd, u_int offset);
 static __inline void   ahd_swap_with_next_hscb(struct ahd_softc *ahd,
                                                struct scb *scb);
 static __inline void   ahd_queue_scb(struct ahd_softc *ahd, struct scb *scb);
@@ -697,10 +699,15 @@ ahd_inw_scbram(struct ahd_softc *ahd, u_int offset)
 static __inline uint32_t
 ahd_inl_scbram(struct ahd_softc *ahd, u_int offset)
 {
-       return (ahd_inb_scbram(ahd, offset)
-             | (ahd_inb_scbram(ahd, offset+1) << 8)
-             | (ahd_inb_scbram(ahd, offset+2) << 16)
-             | (ahd_inb_scbram(ahd, offset+3) << 24));
+       return (ahd_inw_scbram(ahd, offset)
+             | (ahd_inw_scbram(ahd, offset+2) << 16));
+}
+
+static __inline uint64_t
+ahd_inq_scbram(struct ahd_softc *ahd, u_int offset)
+{
+       return (ahd_inl_scbram(ahd, offset)
+             | ((uint64_t)ahd_inl_scbram(ahd, offset+4)) << 32);
 }
 
 static __inline struct scb *
index 3857ed2..e75e25d 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Adaptec AIC79xx device driver for Linux.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#169 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.c#171 $
  *
  * --------------------------------------------------------------------------
  * Copyright (c) 1994-2000 Justin T. Gibbs.
@@ -425,7 +425,7 @@ static char *aic79xx = NULL;
 static char dummy_buffer[60] = "Please don't trounce on me insmod!!\n";
 
 MODULE_AUTHOR("Maintainer: Justin T. Gibbs <gibbs@scsiguy.com>");
-MODULE_DESCRIPTION("Adaptec Aic77XX/78XX SCSI Host Bus Adapter driver");
+MODULE_DESCRIPTION("Adaptec Aic790X U320 SCSI Host Bus Adapter driver");
 #ifdef MODULE_LICENSE
 MODULE_LICENSE("Dual BSD/GPL");
 #endif
@@ -4442,6 +4442,16 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
                        }
 #endif
                        ahd_set_transaction_status(scb, CAM_UNCOR_PARITY);
+#ifdef AHD_REPORT_UNDERFLOWS
+               /*
+                * This code is disabled by default as some
+                * clients of the SCSI system do not properly
+                * initialize the underflow parameter.  This
+                * results in spurious termination of commands
+                * that complete as expected (e.g. underflow is
+                * allowed as command can return variable amounts
+                * of data.
+                */
                } else if (amount_xferred < scb->io_ctx->underflow) {
                        u_int i;
 
@@ -4456,6 +4466,7 @@ ahd_done(struct ahd_softc *ahd, struct scb *scb)
                                ahd_get_residual(scb),
                                ahd_get_transfer_length(scb));
                        ahd_set_transaction_status(scb, CAM_DATA_RUN_ERR);
+#endif
                } else {
                        ahd_set_transaction_status(scb, CAM_REQ_CMP);
                }
index 8e98906..9d73eb3 100644 (file)
@@ -36,7 +36,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#133 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm.h#137 $
  *
  */
 #ifndef _AIC79XX_LINUX_H_
@@ -292,7 +292,7 @@ ahd_scb_timer_reset(struct scb *scb, u_int usec)
 #define AHD_SCSI_HAS_HOST_LOCK 0
 #endif
 
-#define AIC79XX_DRIVER_VERSION "1.3.9"
+#define AIC79XX_DRIVER_VERSION "1.3.11"
 
 /**************************** Front End Queues ********************************/
 /*
@@ -590,10 +590,6 @@ ahd_delay(long usec)
 
 
 /***************************** Low Level I/O **********************************/
-#if defined(__powerpc__) || defined(__i386__) || defined(__ia64__)
-#define MMAPIO
-#endif
-
 static __inline uint8_t ahd_inb(struct ahd_softc * ahd, long port);
 static __inline uint16_t ahd_inw_atomic(struct ahd_softc * ahd, long port);
 static __inline void ahd_outb(struct ahd_softc * ahd, long port, uint8_t val);
@@ -608,16 +604,12 @@ static __inline uint8_t
 ahd_inb(struct ahd_softc * ahd, long port)
 {
        uint8_t x;
-#ifdef MMAPIO
 
        if (ahd->tags[0] == BUS_SPACE_MEMIO) {
                x = readb(ahd->bshs[0].maddr + port);
        } else {
                x = inb(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF));
        }
-#else
-       x = inb(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF));
-#endif
        mb();
        return (x);
 }
@@ -626,16 +618,12 @@ static __inline uint16_t
 ahd_inw_atomic(struct ahd_softc * ahd, long port)
 {
        uint8_t x;
-#ifdef MMAPIO
 
        if (ahd->tags[0] == BUS_SPACE_MEMIO) {
                x = readw(ahd->bshs[0].maddr + port);
        } else {
                x = inw(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF));
        }
-#else
-       x = inw(ahd->bshs[(port) >> 8].ioport + ((port) & 0xFF));
-#endif
        mb();
        return (x);
 }
@@ -643,30 +631,22 @@ ahd_inw_atomic(struct ahd_softc * ahd, long port)
 static __inline void
 ahd_outb(struct ahd_softc * ahd, long port, uint8_t val)
 {
-#ifdef MMAPIO
        if (ahd->tags[0] == BUS_SPACE_MEMIO) {
                writeb(val, ahd->bshs[0].maddr + port);
        } else {
                outb(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF));
        }
-#else
-       outb(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF));
-#endif
        mb();
 }
 
 static __inline void
 ahd_outw_atomic(struct ahd_softc * ahd, long port, uint16_t val)
 {
-#ifdef MMAPIO
        if (ahd->tags[0] == BUS_SPACE_MEMIO) {
                writew(val, ahd->bshs[0].maddr + port);
        } else {
                outw(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF));
        }
-#else
-       outw(val, ahd->bshs[(port) >> 8].ioport + (port & 0xFF));
-#endif
        mb();
 }
 
@@ -1005,7 +985,12 @@ ahd_flush_device_writes(struct ahd_softc *ahd)
        (((dev_softc)->dma_mask = mask) && 0)
 #endif
 /**************************** Proc FS Support *********************************/
-int    ahd_linux_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+int    ahd_linux_proc_info(char *, char **, off_t, int, int, int);
+#else
+int    ahd_linux_proc_info(struct Scsi_Host *, char *, char **,
+                           off_t, int, int);
+#endif
 
 /*************************** Domain Validation ********************************/
 #define AHD_DV_CMD(cmd) ((cmd)->scsi_done == ahd_linux_dv_complete)
index e9d4eb1..d30823d 100644 (file)
@@ -36,7 +36,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#23 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_osm_pci.c#25 $
  */
 
 #include "aic79xx_osm.h"
@@ -52,11 +52,9 @@ static int   ahd_linux_pci_dev_probe(struct pci_dev *pdev,
                                        const struct pci_device_id *ent);
 static int     ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd,
                                                 u_long *base, u_long *base2);
-#ifdef MMAPIO
 static int     ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd,
                                                 u_long *bus_addr,
                                                 uint8_t **maddr);
-#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 static void    ahd_linux_pci_dev_remove(struct pci_dev *pdev);
 
@@ -163,8 +161,8 @@ ahd_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                bus_addr_t mask_39bit;
 
                memsize = ahd_linux_get_memsize();
-               mask_64bit = (bus_addr_t)(0xFFFFFFFFFFFFFFFFULL&(bus_addr_t)~0);
-               mask_39bit = (bus_addr_t)(0x7FFFFFFFFFULL&(bus_addr_t)~0);
+               mask_64bit = (bus_addr_t)0xFFFFFFFFFFFFFFFFULL;
+               mask_39bit = (bus_addr_t)0x7FFFFFFFFFULL;
                if (memsize >= 0x8000000000ULL
                 && ahd_pci_set_dma_mask(pdev, mask_64bit) == 0) {
                        ahd->flags |= AHD_64BIT_ADDRESSING;
@@ -273,7 +271,6 @@ ahd_linux_pci_reserve_io_regions(struct ahd_softc *ahd, u_long *base,
        return (0);
 }
 
-#ifdef MMAPIO
 static int
 ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd,
                                 u_long *bus_addr,
@@ -321,7 +318,6 @@ ahd_linux_pci_reserve_mem_region(struct ahd_softc *ahd,
                error = ENOMEM;
        return (error);
 }
-#endif
 
 int
 ahd_pci_map_registers(struct ahd_softc *ahd)
@@ -338,7 +334,6 @@ ahd_pci_map_registers(struct ahd_softc *ahd)
        command &= ~(PCIM_CMD_PORTEN|PCIM_CMD_MEMEN);
        base = 0;
        maddr = NULL;
-#ifdef MMAPIO
        error = ahd_linux_pci_reserve_mem_region(ahd, &base, &maddr);
        if (error == 0) {
                ahd->platform_data->mem_busaddr = base;
@@ -373,7 +368,6 @@ ahd_pci_map_registers(struct ahd_softc *ahd)
                       ahd_get_pci_function(ahd->dev_softc),
                       base);
        }
-#endif
 
        if (maddr == NULL) {
                u_long   base2;
index b4da627..9139845 100644 (file)
@@ -38,7 +38,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#73 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx_pci.c#77 $
  *
  * $FreeBSD$
  */
@@ -117,6 +117,7 @@ ahd_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
 static ahd_device_setup_t ahd_aic7901_setup;
 static ahd_device_setup_t ahd_aic7901A_setup;
 static ahd_device_setup_t ahd_aic7902_setup;
+static ahd_device_setup_t ahd_aic790X_setup;
 
 struct ahd_pci_identity ahd_pci_ident_table [] =
 {
@@ -375,7 +376,7 @@ ahd_pci_config(struct ahd_softc *ahd, struct ahd_pci_identity *entry)
 
        ahd->bus_intr = ahd_pci_intr;
 
-       error = ahd_reset(ahd);
+       error = ahd_reset(ahd, /*reinit*/FALSE);
        if (error != 0)
                return (ENXIO);
 
@@ -418,9 +419,11 @@ ahd_pci_config(struct ahd_softc *ahd, struct ahd_pci_identity *entry)
 int
 ahd_pci_test_register_access(struct ahd_softc *ahd)
 {
-       uint32_t        cmd;
-       int             error;
-       uint8_t         hcntrl;
+       uint32_t cmd;
+       u_int    targpcistat;
+       u_int    pci_status1;
+       int      error;
+       uint8_t  hcntrl;
 
        error = EIO;
 
@@ -454,6 +457,18 @@ ahd_pci_test_register_access(struct ahd_softc *ahd)
        ahd_outb(ahd, HCNTRL, hcntrl|PAUSE);
        while (ahd_is_paused(ahd) == 0)
                ;
+
+       /* Clear any PCI errors that occurred before our driver attached. */
+       ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
+       targpcistat = ahd_inb(ahd, TARGPCISTAT);
+       ahd_outb(ahd, TARGPCISTAT, targpcistat);
+       pci_status1 = ahd_pci_read_config(ahd->dev_softc,
+                                         PCIR_STATUS + 1, /*bytes*/1);
+       ahd_pci_write_config(ahd->dev_softc, PCIR_STATUS + 1,
+                            pci_status1, /*bytes*/1);
+       ahd_set_modes(ahd, AHD_MODE_SCSI, AHD_MODE_SCSI);
+       ahd_outb(ahd, CLRINT, CLRPCIINT);
+
        ahd_outb(ahd, SEQCTL0, PERRORDIS);
        ahd_outl(ahd, SRAM_BASE, 0x5aa555aa);
        if (ahd_inl(ahd, SRAM_BASE) != 0x5aa555aa)
@@ -472,8 +487,6 @@ ahd_pci_test_register_access(struct ahd_softc *ahd)
 
 fail:
        if ((ahd_inb(ahd, INTSTAT) & PCIINT) != 0) {
-               u_int targpcistat;
-               u_int pci_status1;
 
                ahd_set_modes(ahd, AHD_MODE_CFG, AHD_MODE_CFG);
                targpcistat = ahd_inb(ahd, TARGPCISTAT);
@@ -486,7 +499,6 @@ fail:
                                     pci_status1, /*bytes*/1);
                ahd_outb(ahd, CLRINT, CLRPCIINT);
        }
-
        ahd_outb(ahd, SEQCTL0, PERRORDIS|FAILDIS);
        ahd_pci_write_config(ahd->dev_softc, PCIR_COMMAND, cmd, /*bytes*/2);
        return (error);
@@ -903,30 +915,32 @@ ahd_pci_split_intr(struct ahd_softc *ahd, u_int intstat)
 static int
 ahd_aic7901_setup(struct ahd_softc *ahd)
 {
-       int error;
 
-       error = ahd_aic7902_setup(ahd);
-       if (error != 0)
-               return (error);
        ahd->chip = AHD_AIC7901;
-       return (0);
+       ahd->features = AHD_AIC7901_FE;
+       return (ahd_aic790X_setup(ahd));
 }
 
 static int
 ahd_aic7901A_setup(struct ahd_softc *ahd)
 {
-       int error;
 
-       error = ahd_aic7902_setup(ahd);
-       if (error != 0)
-               return (error);
        ahd->chip = AHD_AIC7901A;
-       return (0);
+       ahd->features = AHD_AIC7901A_FE;
+       return (ahd_aic790X_setup(ahd));
 }
 
 static int
 ahd_aic7902_setup(struct ahd_softc *ahd)
 {
+       ahd->chip = AHD_AIC7902;
+       ahd->features = AHD_AIC7902_FE;
+       return (ahd_aic790X_setup(ahd));
+}
+
+static int
+ahd_aic790X_setup(struct ahd_softc *ahd)
+{
        ahd_dev_softc_t pci;
        u_int rev;
 
@@ -939,8 +953,6 @@ ahd_aic7902_setup(struct ahd_softc *ahd)
                return (ENXIO);
        }
        ahd->channel = ahd_get_pci_function(pci) + 'A';
-       ahd->chip = AHD_AIC7902;
-       ahd->features = AHD_AIC7902_FE;
        if (rev < ID_AIC7902_PCI_REV_B0) {
                /*
                 * Enable A series workarounds.
@@ -968,9 +980,14 @@ ahd_aic7902_setup(struct ahd_softc *ahd)
                u_int devconfig1;
 
                ahd->features |= AHD_RTI|AHD_NEW_IOCELL_OPTS
-                             |  AHD_NEW_DFCNTRL_OPTS;
-               ahd->bugs |= AHD_LQOOVERRUN_BUG|AHD_ABORT_LQI_BUG
-                         |  AHD_INTCOLLISION_BUG|AHD_EARLY_REQ_BUG;
+                             |  AHD_NEW_DFCNTRL_OPTS|AHD_FAST_CDB_DELIVERY;
+               ahd->bugs |= AHD_LQOOVERRUN_BUG|AHD_EARLY_REQ_BUG;
+
+               /*
+                * Some issues have been resolved in the 7901B.
+                */
+               if ((ahd->features & AHD_MULTI_FUNC) != 0)
+                       ahd->bugs |= AHD_INTCOLLISION_BUG|AHD_ABORT_LQI_BUG;
 
                /*
                 * IO Cell paramter setup.
index 1c084a0..e01cd61 100644 (file)
@@ -37,7 +37,7 @@
  * String handling code courtesy of Gerard Roudier's <groudier@club-internet.fr>
  * sym driver.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_proc.c#17 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic79xx_proc.c#19 $
  */
 #include "aic79xx_osm.h"
 #include "aic79xx_inline.h"
@@ -278,8 +278,13 @@ done:
  * Return information to handle /proc support for the driver.
  */
 int
-ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, off_t offset,
-                 int length, int inout)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ahd_linux_proc_info(char *buffer, char **start, off_t offset,
+                   int length, int hostno, int inout)
+#else
+ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,
+                   off_t offset, int length, int inout)
+#endif
 {
        struct  ahd_softc *ahd;
        struct  info_str info;
@@ -291,10 +296,14 @@ ahd_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, off_t o
 
        retval = -EINVAL;
        ahd_list_lock(&l);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
        TAILQ_FOREACH(ahd, &ahd_tailq, links) {
-               if (ahd->platform_data->host == shost)
+               if (ahd->platform_data->host->host_no == hostno)
                        break;
        }
+#else
+       ahd = ahd_find_softc(*(struct ahd_softc **)shost->hostdata);
+#endif
 
        if (ahd == NULL)
                goto done;
index a429585..c01ac39 100644 (file)
@@ -3,7 +3,7 @@
  *              from the following source files:
  *
  * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#94 $
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#69 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#70 $
  */
 typedef int (ahd_reg_print_t)(u_int, u_int *, u_int);
 typedef struct ahd_reg_parse_entry {
@@ -2239,94 +2239,94 @@ ahd_reg_print_t ahd_scb_sense_busaddr_print;
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_dataptr_print;
+ahd_reg_print_t ahd_scb_tag_print;
 #else
-#define ahd_scb_dataptr_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_DATAPTR", 0x190, regvalue, cur_col, wrap)
+#define ahd_scb_tag_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_TAG", 0x190, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_datacnt_print;
+ahd_reg_print_t ahd_scb_control_print;
 #else
-#define ahd_scb_datacnt_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_DATACNT", 0x198, regvalue, cur_col, wrap)
+#define ahd_scb_control_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_CONTROL", 0x192, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_sgptr_print;
+ahd_reg_print_t ahd_scb_scsiid_print;
 #else
-#define ahd_scb_sgptr_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_SGPTR", 0x19c, regvalue, cur_col, wrap)
+#define ahd_scb_scsiid_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_SCSIID", 0x193, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_busaddr_print;
+ahd_reg_print_t ahd_scb_lun_print;
 #else
-#define ahd_scb_busaddr_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_BUSADDR", 0x1a0, regvalue, cur_col, wrap)
+#define ahd_scb_lun_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_LUN", 0x194, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_next_print;
+ahd_reg_print_t ahd_scb_task_attribute_print;
 #else
-#define ahd_scb_next_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_NEXT", 0x1a4, regvalue, cur_col, wrap)
+#define ahd_scb_task_attribute_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_TASK_ATTRIBUTE", 0x195, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_next2_print;
+ahd_reg_print_t ahd_scb_cdb_len_print;
 #else
-#define ahd_scb_next2_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_NEXT2", 0x1a6, regvalue, cur_col, wrap)
+#define ahd_scb_cdb_len_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_CDB_LEN", 0x196, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_control_print;
+ahd_reg_print_t ahd_scb_task_management_print;
 #else
-#define ahd_scb_control_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_CONTROL", 0x1a8, regvalue, cur_col, wrap)
+#define ahd_scb_task_management_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_TASK_MANAGEMENT", 0x197, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_scsiid_print;
+ahd_reg_print_t ahd_scb_dataptr_print;
 #else
-#define ahd_scb_scsiid_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_SCSIID", 0x1a9, regvalue, cur_col, wrap)
+#define ahd_scb_dataptr_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_DATAPTR", 0x198, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_lun_print;
+ahd_reg_print_t ahd_scb_datacnt_print;
 #else
-#define ahd_scb_lun_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_LUN", 0x1aa, regvalue, cur_col, wrap)
+#define ahd_scb_datacnt_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_DATACNT", 0x1a0, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_task_attribute_print;
+ahd_reg_print_t ahd_scb_sgptr_print;
 #else
-#define ahd_scb_task_attribute_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_TASK_ATTRIBUTE", 0x1ab, regvalue, cur_col, wrap)
+#define ahd_scb_sgptr_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_SGPTR", 0x1a4, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_cdb_len_print;
+ahd_reg_print_t ahd_scb_busaddr_print;
 #else
-#define ahd_scb_cdb_len_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_CDB_LEN", 0x1ac, regvalue, cur_col, wrap)
+#define ahd_scb_busaddr_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_BUSADDR", 0x1a8, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_task_management_print;
+ahd_reg_print_t ahd_scb_next_print;
 #else
-#define ahd_scb_task_management_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_TASK_MANAGEMENT", 0x1ad, regvalue, cur_col, wrap)
+#define ahd_scb_next_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_NEXT", 0x1ac, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
-ahd_reg_print_t ahd_scb_tag_print;
+ahd_reg_print_t ahd_scb_next2_print;
 #else
-#define ahd_scb_tag_print(regvalue, cur_col, wrap) \
-    ahd_print_register(NULL, 0, "SCB_TAG", 0x1ae, regvalue, cur_col, wrap)
+#define ahd_scb_next2_print(regvalue, cur_col, wrap) \
+    ahd_print_register(NULL, 0, "SCB_NEXT2", 0x1ae, regvalue, cur_col, wrap)
 #endif
 
 #if AIC_DEBUG_REGISTERS
@@ -2557,6 +2557,8 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
 #define        SHORTTHRESH                     0x2f
 
 #define        LUNLEN                          0x30
+#define                TLUNLEN                 0xf0
+#define                ILUNLEN                 0x0f
 
 #define        CDBLIMIT                        0x31
 
@@ -3648,25 +3650,10 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
 #define        SCB_SENSE_BUSADDR               0x18c
 #define        SCB_NEXT_COMPLETE               0x18c
 
-#define        SCB_DATAPTR                     0x190
-
-#define        SCB_DATACNT                     0x198
-#define                SG_LAST_SEG             0x80
-#define                SG_HIGH_ADDR_BITS       0x7f
-
-#define        SCB_SGPTR                       0x19c
-#define                SG_STATUS_VALID         0x04
-#define                SG_FULL_RESID           0x02
-#define                SG_LIST_NULL            0x01
+#define        SCB_TAG                         0x190
+#define        SCB_FIFO_USE_COUNT              0x190
 
-#define        SCB_BUSADDR                     0x1a0
-
-#define        SCB_NEXT                        0x1a4
-#define        SCB_NEXT_SCB_BUSADDR            0x1a4
-
-#define        SCB_NEXT2                       0x1a6
-
-#define        SCB_CONTROL                     0x1a8
+#define        SCB_CONTROL                     0x192
 #define                TARGET_SCB              0x80
 #define                DISCENB                 0x40
 #define                TAG_ENB                 0x20
@@ -3675,23 +3662,38 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
 #define                DISCONNECTED            0x04
 #define                SCB_TAG_TYPE            0x03
 
-#define        SCB_SCSIID                      0x1a9
+#define        SCB_SCSIID                      0x193
 #define                TID                     0xf0
 #define                OID                     0x0f
 
-#define        SCB_LUN                         0x1aa
+#define        SCB_LUN                         0x194
 #define                LID                     0xff
 
-#define        SCB_TASK_ATTRIBUTE              0x1ab
+#define        SCB_TASK_ATTRIBUTE              0x195
 #define                SCB_XFERLEN_ODD         0x01
 
-#define        SCB_CDB_LEN                     0x1ac
+#define        SCB_CDB_LEN                     0x196
 #define                SCB_CDB_LEN_PTR         0x80
 
-#define        SCB_TASK_MANAGEMENT             0x1ad
+#define        SCB_TASK_MANAGEMENT             0x197
+
+#define        SCB_DATAPTR                     0x198
+
+#define        SCB_DATACNT                     0x1a0
+#define                SG_LAST_SEG             0x80
+#define                SG_HIGH_ADDR_BITS       0x7f
+
+#define        SCB_SGPTR                       0x1a4
+#define                SG_STATUS_VALID         0x04
+#define                SG_FULL_RESID           0x02
+#define                SG_LIST_NULL            0x01
+
+#define        SCB_BUSADDR                     0x1a8
+
+#define        SCB_NEXT                        0x1ac
+#define        SCB_NEXT_SCB_BUSADDR            0x1ac
 
-#define        SCB_TAG                         0x1ae
-#define        SCB_FIFO_USE_COUNT              0x1ae
+#define        SCB_NEXT2                       0x1ae
 
 #define        SCB_SPARE                       0x1b0
 #define        SCB_PKT_LUN                     0x1b0
@@ -3720,6 +3722,7 @@ ahd_reg_print_t ahd_scb_disconnected_lists_print;
 #define        AHD_PRECOMP_CUTBACK_29  0x06
 #define        AHD_NUM_PER_DEV_ANNEXCOLS       0x04
 #define        B_CURRFIFO_0    0x02
+#define        LUNLEN_SINGLE_LEVEL_LUN 0x0f
 #define        NVRAM_SCB_OFFSET        0x2c
 #define        AHD_TIMER_MAX_US        0x18ffe7
 #define        AHD_TIMER_MAX_TICKS     0xffff
index 476e846..3098a75 100644 (file)
@@ -2,8 +2,8 @@
  * DO NOT EDIT - This file is automatically generated
  *              from the following source files:
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#93 $
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#68 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#94 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#70 $
  */
 
 #include "aic79xx_osm.h"
@@ -489,10 +489,15 @@ ahd_shortthresh_print(u_int regvalue, u_int *cur_col, u_int wrap)
            0x2f, regvalue, cur_col, wrap));
 }
 
+static ahd_reg_parse_entry_t LUNLEN_parse_table[] = {
+       { "ILUNLEN",            0x0f, 0x0f },
+       { "TLUNLEN",            0xf0, 0xf0 }
+};
+
 int
 ahd_lunlen_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
-       return (ahd_print_register(NULL, 0, "LUNLEN",
+       return (ahd_print_register(LUNLEN_parse_table, 2, "LUNLEN",
            0x30, regvalue, cur_col, wrap));
 }
 
@@ -3486,58 +3491,12 @@ ahd_scb_sense_busaddr_print(u_int regvalue, u_int *cur_col, u_int wrap)
 }
 
 int
-ahd_scb_dataptr_print(u_int regvalue, u_int *cur_col, u_int wrap)
+ahd_scb_tag_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
-       return (ahd_print_register(NULL, 0, "SCB_DATAPTR",
+       return (ahd_print_register(NULL, 0, "SCB_TAG",
            0x190, regvalue, cur_col, wrap));
 }
 
-static ahd_reg_parse_entry_t SCB_DATACNT_parse_table[] = {
-       { "SG_HIGH_ADDR_BITS",  0x7f, 0x7f },
-       { "SG_LAST_SEG",        0x80, 0x80 }
-};
-
-int
-ahd_scb_datacnt_print(u_int regvalue, u_int *cur_col, u_int wrap)
-{
-       return (ahd_print_register(SCB_DATACNT_parse_table, 2, "SCB_DATACNT",
-           0x198, regvalue, cur_col, wrap));
-}
-
-static ahd_reg_parse_entry_t SCB_SGPTR_parse_table[] = {
-       { "SG_LIST_NULL",       0x01, 0x01 },
-       { "SG_FULL_RESID",      0x02, 0x02 },
-       { "SG_STATUS_VALID",    0x04, 0x04 }
-};
-
-int
-ahd_scb_sgptr_print(u_int regvalue, u_int *cur_col, u_int wrap)
-{
-       return (ahd_print_register(SCB_SGPTR_parse_table, 3, "SCB_SGPTR",
-           0x19c, regvalue, cur_col, wrap));
-}
-
-int
-ahd_scb_busaddr_print(u_int regvalue, u_int *cur_col, u_int wrap)
-{
-       return (ahd_print_register(NULL, 0, "SCB_BUSADDR",
-           0x1a0, regvalue, cur_col, wrap));
-}
-
-int
-ahd_scb_next_print(u_int regvalue, u_int *cur_col, u_int wrap)
-{
-       return (ahd_print_register(NULL, 0, "SCB_NEXT",
-           0x1a4, regvalue, cur_col, wrap));
-}
-
-int
-ahd_scb_next2_print(u_int regvalue, u_int *cur_col, u_int wrap)
-{
-       return (ahd_print_register(NULL, 0, "SCB_NEXT2",
-           0x1a6, regvalue, cur_col, wrap));
-}
-
 static ahd_reg_parse_entry_t SCB_CONTROL_parse_table[] = {
        { "SCB_TAG_TYPE",       0x03, 0x03 },
        { "DISCONNECTED",       0x04, 0x04 },
@@ -3552,7 +3511,7 @@ int
 ahd_scb_control_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
        return (ahd_print_register(SCB_CONTROL_parse_table, 7, "SCB_CONTROL",
-           0x1a8, regvalue, cur_col, wrap));
+           0x192, regvalue, cur_col, wrap));
 }
 
 static ahd_reg_parse_entry_t SCB_SCSIID_parse_table[] = {
@@ -3564,7 +3523,7 @@ int
 ahd_scb_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
        return (ahd_print_register(SCB_SCSIID_parse_table, 2, "SCB_SCSIID",
-           0x1a9, regvalue, cur_col, wrap));
+           0x193, regvalue, cur_col, wrap));
 }
 
 static ahd_reg_parse_entry_t SCB_LUN_parse_table[] = {
@@ -3575,14 +3534,18 @@ int
 ahd_scb_lun_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
        return (ahd_print_register(SCB_LUN_parse_table, 1, "SCB_LUN",
-           0x1aa, regvalue, cur_col, wrap));
+           0x194, regvalue, cur_col, wrap));
 }
 
+static ahd_reg_parse_entry_t SCB_TASK_ATTRIBUTE_parse_table[] = {
+       { "SCB_XFERLEN_ODD",    0x01, 0x01 }
+};
+
 int
 ahd_scb_task_attribute_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
-       return (ahd_print_register(NULL, 0, "SCB_TASK_ATTRIBUTE",
-           0x1ab, regvalue, cur_col, wrap));
+       return (ahd_print_register(SCB_TASK_ATTRIBUTE_parse_table, 1, "SCB_TASK_ATTRIBUTE",
+           0x195, regvalue, cur_col, wrap));
 }
 
 static ahd_reg_parse_entry_t SCB_CDB_LEN_parse_table[] = {
@@ -3593,20 +3556,66 @@ int
 ahd_scb_cdb_len_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
        return (ahd_print_register(SCB_CDB_LEN_parse_table, 1, "SCB_CDB_LEN",
-           0x1ac, regvalue, cur_col, wrap));
+           0x196, regvalue, cur_col, wrap));
 }
 
 int
 ahd_scb_task_management_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
        return (ahd_print_register(NULL, 0, "SCB_TASK_MANAGEMENT",
-           0x1ad, regvalue, cur_col, wrap));
+           0x197, regvalue, cur_col, wrap));
 }
 
 int
-ahd_scb_tag_print(u_int regvalue, u_int *cur_col, u_int wrap)
+ahd_scb_dataptr_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
-       return (ahd_print_register(NULL, 0, "SCB_TAG",
+       return (ahd_print_register(NULL, 0, "SCB_DATAPTR",
+           0x198, regvalue, cur_col, wrap));
+}
+
+static ahd_reg_parse_entry_t SCB_DATACNT_parse_table[] = {
+       { "SG_HIGH_ADDR_BITS",  0x7f, 0x7f },
+       { "SG_LAST_SEG",        0x80, 0x80 }
+};
+
+int
+ahd_scb_datacnt_print(u_int regvalue, u_int *cur_col, u_int wrap)
+{
+       return (ahd_print_register(SCB_DATACNT_parse_table, 2, "SCB_DATACNT",
+           0x1a0, regvalue, cur_col, wrap));
+}
+
+static ahd_reg_parse_entry_t SCB_SGPTR_parse_table[] = {
+       { "SG_LIST_NULL",       0x01, 0x01 },
+       { "SG_FULL_RESID",      0x02, 0x02 },
+       { "SG_STATUS_VALID",    0x04, 0x04 }
+};
+
+int
+ahd_scb_sgptr_print(u_int regvalue, u_int *cur_col, u_int wrap)
+{
+       return (ahd_print_register(SCB_SGPTR_parse_table, 3, "SCB_SGPTR",
+           0x1a4, regvalue, cur_col, wrap));
+}
+
+int
+ahd_scb_busaddr_print(u_int regvalue, u_int *cur_col, u_int wrap)
+{
+       return (ahd_print_register(NULL, 0, "SCB_BUSADDR",
+           0x1a8, regvalue, cur_col, wrap));
+}
+
+int
+ahd_scb_next_print(u_int regvalue, u_int *cur_col, u_int wrap)
+{
+       return (ahd_print_register(NULL, 0, "SCB_NEXT",
+           0x1ac, regvalue, cur_col, wrap));
+}
+
+int
+ahd_scb_next2_print(u_int regvalue, u_int *cur_col, u_int wrap)
+{
+       return (ahd_print_register(NULL, 0, "SCB_NEXT2",
            0x1ae, regvalue, cur_col, wrap));
 }
 
index 1c41099..77c471f 100644 (file)
@@ -3,7 +3,7 @@
  *              from the following source files:
  *
  * $Id: //depot/aic7xxx/aic7xxx/aic79xx.seq#94 $
- * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#69 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic79xx.reg#70 $
  */
 static uint8_t seqprog[] = {
        0xff, 0x02, 0x06, 0x78,
@@ -40,13 +40,13 @@ static uint8_t seqprog[] = {
        0x01, 0x52, 0x64, 0x78,
        0x02, 0x58, 0x50, 0x31,
        0xff, 0xea, 0x10, 0x0b,
-       0xff, 0xad, 0x4f, 0x78,
+       0xff, 0x97, 0x4f, 0x78,
        0x50, 0x4b, 0x4a, 0x68,
        0xbf, 0x3a, 0x74, 0x08,
        0x14, 0xea, 0x50, 0x59,
        0x14, 0xea, 0x04, 0x00,
-       0x08, 0xa8, 0x51, 0x03,
-       0xff, 0xae, 0x3f, 0x68,
+       0x08, 0x92, 0x25, 0x03,
+       0xff, 0x90, 0x3f, 0x68,
        0x00, 0xe2, 0x56, 0x5b,
        0x00, 0xe2, 0x3e, 0x40,
        0x00, 0xea, 0x44, 0x59,
@@ -113,24 +113,24 @@ static uint8_t seqprog[] = {
        0xff, 0xea, 0xc0, 0x09,
        0x01, 0x4e, 0x9d, 0x1a,
        0x00, 0x4f, 0x9f, 0x22,
-       0x01, 0xaa, 0x6d, 0x33,
-       0x01, 0xea, 0x5c, 0x33,
-       0x04, 0xa4, 0x49, 0x32,
-       0xff, 0xea, 0x4a, 0x03,
-       0xff, 0xea, 0x4e, 0x03,
+       0x01, 0x94, 0x6d, 0x33,
+       0x01, 0xea, 0x20, 0x33,
+       0x04, 0xac, 0x49, 0x32,
+       0xff, 0xea, 0x5a, 0x03,
+       0xff, 0xea, 0x5e, 0x03,
        0x01, 0x10, 0xd4, 0x31,
-       0x10, 0xa8, 0xf5, 0x68,
-       0x3d, 0xa9, 0xc5, 0x29,
+       0x10, 0x92, 0xf5, 0x68,
+       0x3d, 0x93, 0xc5, 0x29,
        0xfe, 0xe2, 0xc4, 0x09,
        0x01, 0xea, 0xc6, 0x01,
        0x02, 0xe2, 0xc8, 0x31,
        0x02, 0xec, 0x50, 0x31,
        0x02, 0xa0, 0xda, 0x31,
        0xff, 0xa9, 0xf4, 0x70,
-       0x02, 0xa0, 0x48, 0x37,
+       0x02, 0xa0, 0x58, 0x37,
        0xff, 0x21, 0xfd, 0x70,
        0x02, 0x22, 0x51, 0x31,
-       0x02, 0xa0, 0x4c, 0x33,
+       0x02, 0xa0, 0x5c, 0x33,
        0x02, 0xa0, 0x44, 0x36,
        0x02, 0xa0, 0x40, 0x32,
        0x02, 0xa0, 0x44, 0x36,
@@ -161,7 +161,7 @@ static uint8_t seqprog[] = {
        0x04, 0x24, 0xf9, 0x30,
        0x1d, 0xea, 0x3a, 0x41,
        0x02, 0x2c, 0x51, 0x31,
-       0x04, 0xa0, 0xf9, 0x30,
+       0x04, 0xa8, 0xf9, 0x30,
        0x19, 0xea, 0x3a, 0x41,
        0x06, 0xea, 0x08, 0x81,
        0x01, 0xe2, 0x5a, 0x35,
@@ -179,8 +179,8 @@ static uint8_t seqprog[] = {
        0x02, 0x20, 0xbd, 0x30,
        0x02, 0x20, 0xb9, 0x30,
        0x02, 0x20, 0x51, 0x31,
-       0x4c, 0xa9, 0xd7, 0x28,
-       0x10, 0xa8, 0x63, 0x79,
+       0x4c, 0x93, 0xd7, 0x28,
+       0x10, 0x92, 0x63, 0x79,
        0x01, 0x6b, 0xc0, 0x30,
        0x02, 0x64, 0xc8, 0x00,
        0x40, 0x3a, 0x74, 0x04,
@@ -219,42 +219,42 @@ static uint8_t seqprog[] = {
        0xff, 0xea, 0xb2, 0x09,
        0xff, 0xe0, 0xc0, 0x19,
        0xff, 0xe0, 0xb0, 0x79,
-       0x02, 0xa4, 0x51, 0x31,
+       0x02, 0xac, 0x51, 0x31,
        0x00, 0xe2, 0xa6, 0x41,
        0x02, 0x5e, 0x50, 0x31,
        0x02, 0xa8, 0xb8, 0x30,
        0x02, 0x5c, 0x50, 0x31,
-       0xff, 0xa5, 0xc1, 0x71,
-       0x02, 0xa4, 0x41, 0x31,
+       0xff, 0xad, 0xc1, 0x71,
+       0x02, 0xac, 0x41, 0x31,
        0x02, 0x22, 0x51, 0x31,
-       0x02, 0xa0, 0x4c, 0x33,
+       0x02, 0xa0, 0x5c, 0x33,
        0x02, 0xa0, 0x44, 0x32,
        0x00, 0xe2, 0xca, 0x41,
-       0x10, 0xa8, 0xcb, 0x69,
-       0x3d, 0xa9, 0xc9, 0x29,
+       0x10, 0x92, 0xcb, 0x69,
+       0x3d, 0x93, 0xc9, 0x29,
        0x01, 0xe4, 0xc8, 0x01,
        0x01, 0xea, 0xca, 0x01,
        0xff, 0xea, 0xda, 0x01,
        0x02, 0x20, 0x51, 0x31,
-       0x02, 0xa6, 0x41, 0x32,
+       0x02, 0xae, 0x41, 0x32,
        0xff, 0x21, 0xd3, 0x61,
        0xff, 0xea, 0x46, 0x02,
        0x02, 0x5c, 0x50, 0x31,
        0x40, 0xea, 0x96, 0x00,
        0x02, 0x56, 0xcc, 0x6d,
        0x01, 0x55, 0xcc, 0x6d,
-       0x10, 0xa8, 0xdf, 0x79,
+       0x10, 0x92, 0xdf, 0x79,
        0x10, 0x40, 0xe8, 0x69,
        0x01, 0x56, 0xe8, 0x79,
-       0xff, 0xad, 0x07, 0x78,
+       0xff, 0x97, 0x07, 0x78,
        0x13, 0xea, 0x50, 0x59,
        0x13, 0xea, 0x04, 0x00,
        0x00, 0xe2, 0x06, 0x40,
        0xbf, 0x3a, 0x74, 0x08,
        0x08, 0xea, 0x98, 0x00,
        0x08, 0x57, 0xae, 0x00,
-       0x01, 0xa9, 0x69, 0x32,
-       0x01, 0xaa, 0x6b, 0x32,
+       0x01, 0x93, 0x69, 0x32,
+       0x01, 0x94, 0x6b, 0x32,
        0x40, 0xea, 0x66, 0x02,
        0x08, 0x3c, 0x78, 0x00,
        0x80, 0xea, 0x62, 0x02,
@@ -277,13 +277,13 @@ static uint8_t seqprog[] = {
        0x33, 0xea, 0x00, 0x00,
        0x02, 0xa8, 0x90, 0x32,
        0x00, 0xe2, 0x6a, 0x59,
-       0xef, 0xac, 0xd5, 0x19,
+       0xef, 0x96, 0xd5, 0x19,
        0x00, 0xe2, 0x2a, 0x52,
        0x09, 0x80, 0xe1, 0x30,
        0x02, 0xea, 0x36, 0x00,
        0xa8, 0xea, 0x32, 0x00,
        0x00, 0xe2, 0x30, 0x42,
-       0x01, 0xac, 0xd1, 0x30,
+       0x01, 0x96, 0xd1, 0x30,
        0x10, 0x80, 0x89, 0x31,
        0x20, 0xea, 0x32, 0x00,
        0xbf, 0x33, 0x67, 0x0a,
@@ -293,20 +293,20 @@ static uint8_t seqprog[] = {
        0x00, 0xe2, 0xf8, 0x41,
        0x80, 0x33, 0xb5, 0x6a,
        0x01, 0x44, 0x10, 0x33,
-       0x08, 0xa8, 0x51, 0x03,
+       0x08, 0x92, 0x25, 0x03,
        0x00, 0xe2, 0xf8, 0x41,
        0x10, 0xea, 0x80, 0x00,
        0x01, 0x31, 0xc5, 0x31,
        0x80, 0xe2, 0x60, 0x62,
-       0x10, 0xa8, 0x85, 0x6a,
-       0xc0, 0xaa, 0xc5, 0x01,
-       0x40, 0xa8, 0x51, 0x6a,
+       0x10, 0x92, 0x85, 0x6a,
+       0xc0, 0x94, 0xc5, 0x01,
+       0x40, 0x92, 0x51, 0x6a,
        0xbf, 0xe2, 0xc4, 0x09,
-       0x20, 0xa8, 0x65, 0x7a,
+       0x20, 0x92, 0x65, 0x7a,
        0x01, 0xe2, 0x88, 0x30,
        0x00, 0xe2, 0xb8, 0x5b,
        0xa0, 0x36, 0x6d, 0x62,
-       0x23, 0xa8, 0x89, 0x08,
+       0x23, 0x92, 0x89, 0x08,
        0x00, 0xe2, 0xb8, 0x5b,
        0xa0, 0x36, 0x6d, 0x62,
        0x00, 0xa8, 0x64, 0x42,
@@ -348,7 +348,7 @@ static uint8_t seqprog[] = {
        0xa0, 0xea, 0xca, 0x5b,
        0x01, 0xa0, 0xba, 0x62,
        0x01, 0x84, 0xaf, 0x7a,
-       0x01, 0xab, 0xbd, 0x6a,
+       0x01, 0x95, 0xbd, 0x6a,
        0x05, 0xea, 0x50, 0x59,
        0x05, 0xea, 0x04, 0x00,
        0x00, 0xe2, 0xbc, 0x42,
@@ -381,22 +381,22 @@ static uint8_t seqprog[] = {
        0x20, 0x46, 0x12, 0x63,
        0xff, 0xea, 0x52, 0x09,
        0xa8, 0xea, 0xca, 0x5b,
-       0x04, 0xa8, 0xf9, 0x7a,
+       0x04, 0x92, 0xf9, 0x7a,
        0x01, 0x34, 0xc1, 0x31,
-       0x00, 0xa9, 0xf9, 0x62,
+       0x00, 0x93, 0xf9, 0x62,
        0x01, 0x35, 0xc1, 0x31,
-       0x00, 0xaa, 0x03, 0x73,
+       0x00, 0x94, 0x03, 0x73,
        0x01, 0xa9, 0x52, 0x11,
        0xff, 0xa9, 0xee, 0x6a,
        0x00, 0xe2, 0x12, 0x43,
        0x10, 0x33, 0x67, 0x02,
-       0x04, 0xa8, 0x13, 0x7b,
-       0xfb, 0xa8, 0x51, 0x0b,
+       0x04, 0x92, 0x13, 0x7b,
+       0xfb, 0x92, 0x25, 0x0b,
        0xff, 0xea, 0x66, 0x0a,
-       0x01, 0x9c, 0x0d, 0x6b,
+       0x01, 0xa4, 0x0d, 0x6b,
        0x02, 0xa8, 0x90, 0x32,
        0x00, 0xe2, 0x6a, 0x59,
-       0x10, 0xa8, 0xbd, 0x7a,
+       0x10, 0x92, 0xbd, 0x7a,
        0xff, 0xea, 0xdc, 0x5b,
        0x00, 0xe2, 0xbc, 0x42,
        0x04, 0xea, 0x50, 0x59,
@@ -405,12 +405,12 @@ static uint8_t seqprog[] = {
        0x04, 0xea, 0x50, 0x59,
        0x04, 0xea, 0x04, 0x00,
        0x00, 0xe2, 0xf8, 0x41,
-       0x08, 0xa8, 0xb5, 0x7a,
+       0x08, 0x92, 0xb5, 0x7a,
        0xc0, 0x33, 0x29, 0x7b,
        0x80, 0x33, 0xb5, 0x6a,
        0xff, 0x88, 0x29, 0x6b,
        0x40, 0x33, 0xb5, 0x6a,
-       0x10, 0xa8, 0x2f, 0x7b,
+       0x10, 0x92, 0x2f, 0x7b,
        0x0a, 0xea, 0x50, 0x59,
        0x0a, 0xea, 0x04, 0x00,
        0x00, 0xe2, 0x4e, 0x5b,
@@ -428,22 +428,22 @@ static uint8_t seqprog[] = {
        0x33, 0xea, 0x44, 0x59,
        0x33, 0xea, 0x00, 0x00,
        0x02, 0x42, 0x51, 0x31,
-       0xff, 0xae, 0x65, 0x68,
+       0xff, 0x90, 0x65, 0x68,
        0xff, 0x88, 0x5b, 0x6b,
-       0x01, 0x9c, 0x57, 0x6b,
-       0x02, 0x9c, 0x5f, 0x6b,
+       0x01, 0xa4, 0x57, 0x6b,
+       0x02, 0xa4, 0x5f, 0x6b,
        0x01, 0x84, 0x5f, 0x7b,
        0x02, 0x28, 0x19, 0x33,
        0x02, 0xa8, 0x50, 0x36,
        0xff, 0x88, 0x5f, 0x73,
        0x00, 0xe2, 0x32, 0x5b,
-       0x02, 0xa8, 0x5c, 0x33,
+       0x02, 0xa8, 0x20, 0x33,
        0x02, 0x2c, 0x19, 0x33,
        0x02, 0xa8, 0x58, 0x32,
-       0x04, 0x9c, 0x39, 0x07,
+       0x04, 0xa4, 0x49, 0x07,
        0xc0, 0x33, 0xb5, 0x6a,
-       0x04, 0xa8, 0x51, 0x03,
-       0x20, 0xa8, 0x83, 0x6b,
+       0x04, 0x92, 0x25, 0x03,
+       0x20, 0x92, 0x83, 0x6b,
        0x02, 0xa8, 0x40, 0x31,
        0xc0, 0x34, 0xc1, 0x09,
        0x00, 0x35, 0x51, 0x01,
@@ -470,9 +470,9 @@ static uint8_t seqprog[] = {
        0x00, 0xe2, 0x9e, 0x5b,
        0x00, 0xe2, 0xf8, 0x41,
        0x01, 0x84, 0xa3, 0x7b,
-       0x01, 0x9c, 0x39, 0x07,
-       0x08, 0x60, 0x20, 0x33,
-       0x08, 0x80, 0x31, 0x37,
+       0x01, 0xa4, 0x49, 0x07,
+       0x08, 0x60, 0x30, 0x33,
+       0x08, 0x80, 0x41, 0x37,
        0xdf, 0x33, 0x67, 0x0a,
        0xee, 0x00, 0xb0, 0x6b,
        0x05, 0xea, 0xb4, 0x00,
@@ -542,14 +542,14 @@ static uint8_t seqprog[] = {
        0x01, 0xac, 0xd4, 0x99,
        0x00, 0xe2, 0x64, 0x50,
        0xfe, 0xa6, 0x4c, 0x0d,
-       0x0b, 0x90, 0xe1, 0x30,
-       0xfd, 0x9c, 0x49, 0x09,
-       0x80, 0x9b, 0x39, 0x7c,
+       0x0b, 0x98, 0xe1, 0x30,
+       0xfd, 0xa4, 0x49, 0x09,
+       0x80, 0xa3, 0x39, 0x7c,
        0x02, 0xa4, 0x48, 0x01,
        0x01, 0xa4, 0x36, 0x30,
        0xa8, 0xea, 0x32, 0x00,
-       0xfd, 0x9c, 0x39, 0x0b,
-       0x05, 0x9b, 0x07, 0x33,
+       0xfd, 0xa4, 0x49, 0x0b,
+       0x05, 0xa3, 0x07, 0x33,
        0x80, 0x83, 0x45, 0x6c,
        0x02, 0xea, 0x4c, 0x05,
        0xff, 0xea, 0x4c, 0x0d,
@@ -577,7 +577,7 @@ static uint8_t seqprog[] = {
        0x09, 0xea, 0x50, 0x59,
        0x09, 0xea, 0x04, 0x00,
        0x00, 0xe2, 0xf8, 0x41,
-       0x01, 0x9c, 0x5d, 0x6c,
+       0x01, 0xa4, 0x5d, 0x6c,
        0x00, 0xe2, 0x30, 0x5c,
        0x20, 0x33, 0x67, 0x02,
        0x01, 0x00, 0x60, 0x32,
@@ -646,15 +646,15 @@ static uint8_t seqprog[] = {
        0x80, 0xf9, 0xea, 0x6c,
        0xdf, 0x5c, 0xb8, 0x08,
        0x01, 0xd9, 0xb2, 0x05,
-       0x01, 0x9c, 0xe5, 0x6d,
+       0x01, 0xa4, 0xe5, 0x6d,
        0x00, 0xe2, 0x30, 0x5c,
        0x00, 0xe2, 0x34, 0x5d,
-       0x01, 0xae, 0x5d, 0x1b,
+       0x01, 0x90, 0x21, 0x1b,
        0x01, 0xd9, 0xb2, 0x05,
        0x00, 0xe2, 0x32, 0x5b,
-       0xf3, 0xac, 0xd5, 0x19,
+       0xf3, 0x96, 0xd5, 0x19,
        0x00, 0xe2, 0x18, 0x55,
-       0x80, 0xac, 0x19, 0x6d,
+       0x80, 0x96, 0x19, 0x6d,
        0x0f, 0xea, 0x50, 0x59,
        0x0f, 0xea, 0x04, 0x00,
        0x00, 0xe2, 0x20, 0x45,
@@ -662,7 +662,7 @@ static uint8_t seqprog[] = {
        0x01, 0xea, 0xf2, 0x00,
        0x02, 0xea, 0x36, 0x00,
        0xa8, 0xea, 0x32, 0x00,
-       0xff, 0xad, 0x27, 0x7d,
+       0xff, 0x97, 0x27, 0x7d,
        0x14, 0xea, 0x50, 0x59,
        0x14, 0xea, 0x04, 0x00,
        0x00, 0xe2, 0x96, 0x5d,
@@ -700,10 +700,10 @@ static uint8_t seqprog[] = {
        0x01, 0x1a, 0x64, 0x78,
        0x80, 0xf9, 0xf2, 0x01,
        0x20, 0xa0, 0xcc, 0x7d,
-       0xff, 0xae, 0x5d, 0x1b,
-       0x08, 0xa8, 0x43, 0x6b,
+       0xff, 0x90, 0x21, 0x1b,
+       0x08, 0x92, 0x43, 0x6b,
        0x02, 0xea, 0xb4, 0x04,
-       0x01, 0x9c, 0x39, 0x03,
+       0x01, 0xa4, 0x49, 0x03,
        0x40, 0x5b, 0x82, 0x6d,
        0x00, 0xe2, 0x3e, 0x59,
        0x40, 0x5b, 0x82, 0x6d,
@@ -714,8 +714,8 @@ static uint8_t seqprog[] = {
        0x04, 0x5d, 0xe6, 0x7d,
        0x01, 0x1a, 0xe6, 0x7d,
        0x80, 0xf9, 0xf2, 0x01,
-       0xff, 0xae, 0x5d, 0x1b,
-       0x08, 0xa8, 0x43, 0x6b,
+       0xff, 0x90, 0x21, 0x1b,
+       0x08, 0x92, 0x43, 0x6b,
        0x02, 0xea, 0xb4, 0x04,
        0x00, 0xe2, 0x3e, 0x59,
        0x01, 0x1b, 0x64, 0x78,
@@ -729,7 +729,7 @@ static uint8_t seqprog[] = {
        0x01, 0x1a, 0x64, 0x78,
        0x80, 0xf9, 0xf2, 0x01,
        0xff, 0xea, 0x10, 0x03,
-       0x08, 0xa8, 0x51, 0x03,
+       0x08, 0x92, 0x25, 0x03,
        0x00, 0xe2, 0x42, 0x43,
        0x01, 0x1a, 0xb4, 0x7d,
        0x40, 0x5b, 0xb0, 0x7d,
@@ -743,14 +743,14 @@ static uint8_t seqprog[] = {
        0x20, 0x4d, 0x64, 0x78,
        0x40, 0x5b, 0x9e, 0x6d,
        0x01, 0x1a, 0x64, 0x78,
-       0x01, 0xae, 0x5d, 0x1b,
+       0x01, 0x90, 0x21, 0x1b,
        0x30, 0x3f, 0xc0, 0x09,
        0x30, 0xe0, 0x64, 0x60,
        0x40, 0x4b, 0x64, 0x68,
        0xff, 0xea, 0x52, 0x01,
        0xee, 0x00, 0xd2, 0x6d,
        0x80, 0xf9, 0xf2, 0x01,
-       0xff, 0xae, 0x5d, 0x1b,
+       0xff, 0x90, 0x21, 0x1b,
        0x02, 0xea, 0xb4, 0x00,
        0x20, 0xea, 0x9a, 0x00,
        0xf3, 0x42, 0xde, 0x6d,
@@ -760,7 +760,7 @@ static uint8_t seqprog[] = {
        0x0d, 0xea, 0x50, 0x59,
        0x0d, 0xea, 0x04, 0x00,
        0x00, 0xe2, 0xf8, 0x41,
-       0x01, 0xae, 0x5d, 0x1b,
+       0x01, 0x90, 0x21, 0x1b,
        0x11, 0xea, 0x50, 0x59,
        0x11, 0xea, 0x04, 0x00,
        0x00, 0xe2, 0x32, 0x5b,
@@ -776,9 +776,9 @@ static uint8_t seqprog[] = {
        0x20, 0x4d, 0x64, 0x78,
        0x02, 0x84, 0x09, 0x03,
        0x40, 0x5b, 0xcc, 0x7d,
-       0xff, 0xae, 0x5d, 0x1b,
+       0xff, 0x90, 0x21, 0x1b,
        0x80, 0xf9, 0xf2, 0x01,
-       0x08, 0xa8, 0x43, 0x6b,
+       0x08, 0x92, 0x43, 0x6b,
        0x02, 0xea, 0xb4, 0x04,
        0x01, 0x38, 0xe1, 0x30,
        0x05, 0x39, 0xe3, 0x98,
index 13dd811..ef1214c 100644 (file)
@@ -37,7 +37,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#77 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.h#79 $
  *
  * $FreeBSD$
  */
@@ -1143,17 +1143,17 @@ struct ahc_pci_identity {
        char                    *name;
        ahc_device_setup_t      *setup;
 };
-extern struct ahc_pci_identity ahc_pci_ident_table [];
+extern struct ahc_pci_identity ahc_pci_ident_table[];
 extern const u_int ahc_num_pci_devs;
 
 /***************************** VL/EISA Declarations ***************************/
 struct aic7770_identity {
        uint32_t                 full_id;
        uint32_t                 id_mask;
-       char                    *name;
+       const char              *name;
        ahc_device_setup_t      *setup;
 };
-extern struct aic7770_identity aic7770_ident_table [];
+extern struct aic7770_identity aic7770_ident_table[];
 extern const int ahc_num_aic7770_devs;
 
 #define AHC_EISA_SLOT_OFFSET   0xc00
@@ -1205,7 +1205,7 @@ void                       ahc_set_unit(struct ahc_softc *, int);
 void                    ahc_set_name(struct ahc_softc *, char *);
 void                    ahc_alloc_scbs(struct ahc_softc *ahc);
 void                    ahc_free(struct ahc_softc *ahc);
-int                     ahc_reset(struct ahc_softc *ahc);
+int                     ahc_reset(struct ahc_softc *ahc, int reinit);
 void                    ahc_shutdown(void *arg);
 
 /*************************** Interrupt Services *******************************/
index 75f9757..22944e8 100644 (file)
@@ -37,7 +37,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#131 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.c#134 $
  *
  * $FreeBSD$
  */
@@ -1304,17 +1304,23 @@ ahc_handle_scsiint(struct ahc_softc *ahc, u_int intstat)
                                ahc_qinfifo_requeue_tail(ahc, scb);
                                printerror = 0;
                        } else if (ahc_sent_msg(ahc, AHCMSG_EXT,
-                                               MSG_EXT_WDTR, FALSE)
-                               || ahc_sent_msg(ahc, AHCMSG_EXT,
-                                               MSG_EXT_SDTR, FALSE)) {
+                                               MSG_EXT_WDTR, FALSE)) {
                                /*
-                                * Negotiation Rejected.  Go-async and
+                                * Negotiation Rejected.  Go-narrow and
                                 * retry command.
                                 */
                                ahc_set_width(ahc, &devinfo,
                                              MSG_EXT_WDTR_BUS_8_BIT,
                                              AHC_TRANS_CUR|AHC_TRANS_GOAL,
                                              /*paused*/TRUE);
+                               ahc_qinfifo_requeue_tail(ahc, scb);
+                               printerror = 0;
+                       } else if (ahc_sent_msg(ahc, AHCMSG_EXT,
+                                               MSG_EXT_SDTR, FALSE)) {
+                               /*
+                                * Negotiation Rejected.  Go-async and
+                                * retry command.
+                                */
                                ahc_set_syncrate(ahc, &devinfo,
                                                /*syncrate*/NULL,
                                                /*period*/0, /*offset*/0,
@@ -1463,7 +1469,7 @@ ahc_clear_critical_section(struct ahc_softc *ahc)
                                 * current connection, so we must
                                 * leave it on while single stepping.
                                 */
-                               ahc_outb(ahc, SIMODE1, ENBUSFREE);
+                               ahc_outb(ahc, SIMODE1, simode1 & ENBUSFREE);
                        else
                                ahc_outb(ahc, SIMODE1, 0);
                        ahc_outb(ahc, CLRINT, CLRSCSIINT);
@@ -2373,6 +2379,7 @@ ahc_build_transfer_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
         * may change.
         */
        period = tinfo->goal.period;
+       offset = tinfo->goal.offset;
        ppr_options = tinfo->goal.ppr_options;
        /* Target initiated PPR is not allowed in the SCSI spec */
        if (devinfo->role == ROLE_TARGET)
@@ -2380,7 +2387,7 @@ ahc_build_transfer_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
        rate = ahc_devlimited_syncrate(ahc, tinfo, &period,
                                       &ppr_options, devinfo->role);
        dowide = tinfo->curr.width != tinfo->goal.width;
-       dosync = tinfo->curr.period != period;
+       dosync = tinfo->curr.offset != offset || tinfo->curr.period != period;
        /*
         * Only use PPR if we have options that need it, even if the device
         * claims to support it.  There might be an expander in the way
@@ -3176,23 +3183,30 @@ ahc_parse_msg(struct ahc_softc *ahc, struct ahc_devinfo *devinfo)
                                response = TRUE;
                                sending_reply = TRUE;
                        }
+                       /*
+                        * After a wide message, we are async, but
+                        * some devices don't seem to honor this portion
+                        * of the spec.  Force a renegotiation of the
+                        * sync component of our transfer agreement even
+                        * if our goal is async.  By updating our width
+                        * after forcing the negotiation, we avoid
+                        * renegotiating for width.
+                        */
+                       ahc_update_neg_request(ahc, devinfo, tstate,
+                                              tinfo, AHC_NEG_ALWAYS);
                        ahc_set_width(ahc, devinfo, bus_width,
                                      AHC_TRANS_ACTIVE|AHC_TRANS_GOAL,
                                      /*paused*/TRUE);
-                       /* After a wide message, we are async */
-                       ahc_set_syncrate(ahc, devinfo,
-                                        /*syncrate*/NULL, /*period*/0,
-                                        /*offset*/0, /*ppr_options*/0,
-                                        AHC_TRANS_ACTIVE, /*paused*/TRUE);
                        if (sending_reply == FALSE && reject == FALSE) {
 
-                               if (tinfo->goal.offset) {
-                                       ahc->msgout_index = 0;
-                                       ahc->msgout_len = 0;
-                                       ahc_build_transfer_msg(ahc, devinfo);
-                                       ahc->msgout_index = 0;
-                                       response = TRUE;
-                               }
+                               /*
+                                * We will always have an SDTR to send.
+                                */
+                               ahc->msgout_index = 0;
+                               ahc->msgout_len = 0;
+                               ahc_build_transfer_msg(ahc, devinfo);
+                               ahc->msgout_index = 0;
+                               response = TRUE;
                        }
                        done = MSGLOOP_MSGCOMPLETE;
                        break;
@@ -4033,7 +4047,7 @@ ahc_shutdown(void *arg)
        ahc = (struct ahc_softc *)arg;
 
        /* This will reset most registers to 0, but not all */
-       ahc_reset(ahc);
+       ahc_reset(ahc, /*reinit*/FALSE);
        ahc_outb(ahc, SCSISEQ, 0);
        ahc_outb(ahc, SXFRCTL0, 0);
        ahc_outb(ahc, DSPCISTATUS, 0);
@@ -4044,10 +4058,15 @@ ahc_shutdown(void *arg)
 
 /*
  * Reset the controller and record some information about it
- * that is only available just after a reset.
+ * that is only available just after a reset.  If "reinit" is
+ * non-zero, this reset occured after initial configuration
+ * and the caller requests that the chip be fully reinitialized
+ * to a runable state.  Chip interrupts are *not* enabled after
+ * a reinitialization.  The caller must enable interrupts via
+ * ahc_intr_enable().
  */
 int
-ahc_reset(struct ahc_softc *ahc)
+ahc_reset(struct ahc_softc *ahc, int reinit)
 {
        u_int   sblkctl;
        u_int   sxfrctl1_a, sxfrctl1_b;
@@ -4143,7 +4162,7 @@ ahc_reset(struct ahc_softc *ahc)
        ahc_outb(ahc, SXFRCTL1, sxfrctl1_a);
 
        error = 0;
-       if (ahc->init_level > 0)
+       if (reinit != 0)
                /*
                 * If a recovery action has forced a chip reset,
                 * re-initialize the chip to our liking.
@@ -4725,14 +4744,12 @@ ahc_chip_init(struct ahc_softc *ahc)
                 * never settle, so don't complain if we
                 * fail here.
                 */
-               ahc_pause(ahc);
                for (wait = 5000;
                     (ahc_inb(ahc, SBLKCTL) & (ENAB40|ENAB20)) == 0 && wait;
                     wait--)
                        ahc_delay(100);
-               ahc_unpause(ahc);
        }
-
+       ahc_restart(ahc);
        return (0);
 }
 
@@ -5145,7 +5162,9 @@ int
 ahc_resume(struct ahc_softc *ahc)
 {
 
-       ahc_reset(ahc);
+       ahc_reset(ahc, /*reinit*/TRUE);
+       ahc_intr_enable(ahc, TRUE); 
+       ahc_restart(ahc);
        return (0);
 }
 
@@ -6407,7 +6426,6 @@ ahc_loadseq(struct ahc_softc *ahc)
                memcpy(ahc->critical_sections, cs_table, cs_count);
        }
        ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS|FASTMODE);
-       ahc_restart(ahc);
 
        if (bootverbose) {
                printf(" %d instructions downloaded\n", downloaded);
@@ -6968,11 +6986,12 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
                         */
                        ahc->flags = saved_flags;
                        (void)ahc_loadseq(ahc);
-                       ahc_unpause(ahc);
+                       ahc_restart(ahc);
                        ahc_unlock(ahc, &s);
                        ccb->ccb_h.status = CAM_FUNC_NOTAVAIL;
                        return;
                }
+               ahc_restart(ahc);
                ahc_unlock(ahc, &s);
        }
        cel = &ccb->cel;
@@ -7207,12 +7226,16 @@ ahc_handle_en_lun(struct ahc_softc *ahc, struct cam_sim *sim, union ccb *ccb)
                                printf("Configuring Initiator Mode\n");
                                ahc->flags &= ~AHC_TARGETROLE;
                                ahc->flags |= AHC_INITIATORROLE;
-                               ahc_pause(ahc);
                                /*
                                 * Returning to a configuration that
                                 * fit previously will always succeed.
                                 */
                                (void)ahc_loadseq(ahc);
+                               ahc_restart(ahc);
+                               /*
+                                * Unpaused.  The extra unpause
+                                * that follows is harmless.
+                                */
                        }
                }
                ahc_unpause(ahc);
index 599f0e3..75333b4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Adaptec AIC7xxx device driver for Linux.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#232 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.c#235 $
  *
  * Copyright (c) 1994 John Aycock
  *   The University of Calgary Department of Computer Science.
@@ -293,7 +293,7 @@ static adapter_tag_info_t aic7xxx_tag_info[] =
 #define AIC7XXX_CONFIGED_DV -1
 #endif
 
-static uint8_t aic7xxx_dv_settings[] =
+static int8_t aic7xxx_dv_settings[] =
 {
        AIC7XXX_CONFIGED_DV,
        AIC7XXX_CONFIGED_DV,
@@ -391,9 +391,9 @@ static uint32_t aic7xxx_pci_parity = ~0;
  * would result in never finding any devices :)
  */
 #ifndef CONFIG_AIC7XXX_PROBE_EISA_VL
-static uint32_t aic7xxx_probe_eisa_vl;
+uint32_t aic7xxx_probe_eisa_vl;
 #else
-static uint32_t aic7xxx_probe_eisa_vl = ~0;
+uint32_t aic7xxx_probe_eisa_vl = ~0;
 #endif
 
 /*
@@ -752,7 +752,6 @@ ahc_linux_map_seg(struct ahc_softc *ahc, struct scb *scb,
 
 /************************  Host template entry points *************************/
 static int        ahc_linux_detect(Scsi_Host_Template *);
-static int        ahc_linux_release(struct Scsi_Host *);
 static int        ahc_linux_queue(Scsi_Cmnd *, void (*)(Scsi_Cmnd *));
 static const char *ahc_linux_info(struct Scsi_Host *);
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
@@ -765,6 +764,7 @@ static int     ahc_linux_biosparam(struct scsi_device*,
                                       sector_t, int[]);
 #endif
 #else
+static int        ahc_linux_release(struct Scsi_Host *);
 static void       ahc_linux_select_queue_depth(struct Scsi_Host *host,
                                                Scsi_Device *scsi_devs);
 #if defined(__i386__)
@@ -895,8 +895,9 @@ ahc_linux_detect(Scsi_Host_Template *template)
        ahc_linux_pci_init();
 #endif
 
-       if (aic7xxx_probe_eisa_vl != 0)
-               aic7770_linux_probe(template);
+#ifdef CONFIG_EISA
+       ahc_linux_eisa_init();
+#endif
 
        /*
         * Register with the SCSI layer all
@@ -915,6 +916,7 @@ ahc_linux_detect(Scsi_Host_Template *template)
        return (found);
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
 /*
  * Free the passed in Scsi_Host memory structures prior to unloading the
  * module.
@@ -946,6 +948,7 @@ ahc_linux_release(struct Scsi_Host * host)
        ahc_list_unlock(&l);
        return (0);
 }
+#endif
 
 /*
  * Return a string describing the driver.
@@ -4137,6 +4140,16 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
                        }
 #endif
                        ahc_set_transaction_status(scb, CAM_UNCOR_PARITY);
+#ifdef AHC_REPORT_UNDERFLOWS
+               /*
+                * This code is disabled by default as some
+                * clients of the SCSI system do not properly
+                * initialize the underflow parameter.  This
+                * results in spurious termination of commands
+                * that complete as expected (e.g. underflow is
+                * allowed as command can return variable amounts
+                * of data.
+                */
                } else if (amount_xferred < scb->io_ctx->underflow) {
                        u_int i;
 
@@ -4151,6 +4164,7 @@ ahc_done(struct ahc_softc *ahc, struct scb *scb)
                                ahc_get_residual(scb),
                                ahc_get_transfer_length(scb));
                        ahc_set_transaction_status(scb, CAM_DATA_RUN_ERR);
+#endif
                } else {
                        ahc_set_transaction_status(scb, CAM_REQ_CMP);
                }
@@ -5082,27 +5096,21 @@ ahc_linux_exit(void)
                ahc_linux_kill_dv_thread(ahc);
        }
        ahc_list_unlock(&l);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-
-       ahc_linux_pci_exit();
-
-       /*
-        * Get rid of the non-pci devices.  
-        *
-        * XXX(hch): switch over eisa support to new LDM-based API
-        */
-       TAILQ_FOREACH(ahc, &ahc_tailq, links)
-               ahc_linux_release(ahc->platform_data->host);
-#else
-       scsi_unregister_module(MODULE_SCSI_HA, &aic7xxx_driver_template);
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
        /*
         * In 2.4 we have to unregister from the PCI core _after_
         * unregistering from the scsi midlayer to avoid dangling
         * references.
         */
+       scsi_unregister_module(MODULE_SCSI_HA, &aic7xxx_driver_template);
+#endif
+#ifdef CONFIG_PCI
        ahc_linux_pci_exit();
 #endif
+#ifdef CONFIG_EISA
+       ahc_linux_eisa_exit();
+#endif
 }
 
 module_init(ahc_linux_init);
index 76cc447..12f040d 100644 (file)
@@ -53,7 +53,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#147 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm.h#151 $
  *
  */
 #ifndef _AIC7XXX_LINUX_H_
@@ -304,7 +304,7 @@ ahc_scb_timer_reset(struct scb *scb, u_int usec)
 #define AHC_SCSI_HAS_HOST_LOCK 0
 #endif
 
-#define AIC7XXX_DRIVER_VERSION "6.2.35"
+#define AIC7XXX_DRIVER_VERSION "6.2.36"
 
 /**************************** Front End Queues ********************************/
 /*
@@ -595,10 +595,6 @@ ahc_delay(long usec)
 
 
 /***************************** Low Level I/O **********************************/
-#if defined(__powerpc__) || defined(__i386__) || defined(__ia64__)
-#define MMAPIO
-#endif
-
 static __inline uint8_t ahc_inb(struct ahc_softc * ahc, long port);
 static __inline void ahc_outb(struct ahc_softc * ahc, long port, uint8_t val);
 static __inline void ahc_outsb(struct ahc_softc * ahc, long port,
@@ -610,16 +606,12 @@ static __inline uint8_t
 ahc_inb(struct ahc_softc * ahc, long port)
 {
        uint8_t x;
-#ifdef MMAPIO
 
        if (ahc->tag == BUS_SPACE_MEMIO) {
                x = readb(ahc->bsh.maddr + port);
        } else {
                x = inb(ahc->bsh.ioport + port);
        }
-#else
-       x = inb(ahc->bsh.ioport + port);
-#endif
        mb();
        return (x);
 }
@@ -627,15 +619,11 @@ ahc_inb(struct ahc_softc * ahc, long port)
 static __inline void
 ahc_outb(struct ahc_softc * ahc, long port, uint8_t val)
 {
-#ifdef MMAPIO
        if (ahc->tag == BUS_SPACE_MEMIO) {
                writeb(val, ahc->bsh.maddr + port);
        } else {
                outb(val, ahc->bsh.ioport + port);
        }
-#else
-       outb(val, ahc->bsh.ioport + port);
-#endif
        mb();
 }
 
@@ -843,15 +831,26 @@ typedef enum
        AHC_POWER_STATE_D3
 } ahc_power_state;
 
-void ahc_power_state_change(struct ahc_softc *ahc,
-                           ahc_power_state new_state);
 /**************************** VL/EISA Routines ********************************/
-int                     aic7770_linux_probe(Scsi_Host_Template *);
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) \
+  && (defined(__i386__) || defined(__alpha__)) \
+  && (!defined(CONFIG_EISA)))
+#define CONFIG_EISA
+#endif
+
+#ifdef CONFIG_EISA
+extern uint32_t aic7xxx_probe_eisa_vl;
+void                    ahc_linux_eisa_init(void);
+void                    ahc_linux_eisa_exit(void);
 int                     aic7770_map_registers(struct ahc_softc *ahc,
                                               u_int port);
 int                     aic7770_map_int(struct ahc_softc *ahc, u_int irq);
+#endif
 
 /******************************* PCI Routines *********************************/
+#ifdef CONFIG_PCI
+void                    ahc_power_state_change(struct ahc_softc *ahc,
+                                               ahc_power_state new_state);
 int                     ahc_linux_pci_init(void);
 void                    ahc_linux_pci_exit(void);
 int                     ahc_pci_map_registers(struct ahc_softc *ahc);
@@ -933,6 +932,7 @@ ahc_get_pci_bus(ahc_dev_softc_t pci)
 {
        return (pci->bus->number);
 }
+#endif
 
 static __inline void ahc_flush_device_writes(struct ahc_softc *);
 static __inline void
@@ -962,7 +962,12 @@ ahc_flush_device_writes(struct ahc_softc *ahc)
        (((dev_softc)->dma_mask = mask) && 0)
 #endif
 /**************************** Proc FS Support *********************************/
-int    ahc_linux_proc_info(struct Scsi_Host *, char *, char **, off_t, int, int);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+int    ahc_linux_proc_info(char *, char **, off_t, int, int, int);
+#else
+int    ahc_linux_proc_info(struct Scsi_Host *, char *, char **,
+                           off_t, int, int);
+#endif
 
 /*************************** Domain Validation ********************************/
 #define AHC_DV_CMD(cmd) ((cmd)->scsi_done == ahc_linux_dv_complete)
index b361ed9..04195c6 100644 (file)
@@ -36,7 +36,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#45 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_osm_pci.c#47 $
  */
 
 #include "aic7xxx_osm.h"
@@ -51,11 +51,9 @@ static int   ahc_linux_pci_dev_probe(struct pci_dev *pdev,
                                        const struct pci_device_id *ent);
 static int     ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc,
                                                u_long *base);
-#ifdef MMAPIO
 static int     ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc,
                                                 u_long *bus_addr,
                                                 uint8_t **maddr);
-#endif /* MMAPIO */
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
 static void    ahc_linux_pci_dev_remove(struct pci_dev *pdev);
 
@@ -161,7 +159,7 @@ ahc_linux_pci_dev_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        }
        pci_set_master(pdev);
 
-       mask_39bit = (bus_addr_t)(0x7FFFFFFFFFULL & (bus_addr_t)~0);
+       mask_39bit = (bus_addr_t)0x7FFFFFFFFFULL;
        if (sizeof(bus_addr_t) > 4
         && ahc_linux_get_memsize() > 0x80000000
         && ahc_pci_set_dma_mask(pdev, mask_39bit) == 0) {
@@ -254,7 +252,6 @@ ahc_linux_pci_reserve_io_region(struct ahc_softc *ahc, u_long *base)
        return (0);
 }
 
-#ifdef MMAPIO
 static int
 ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc,
                                 u_long *bus_addr,
@@ -296,7 +293,6 @@ ahc_linux_pci_reserve_mem_region(struct ahc_softc *ahc,
                error = ENOMEM;
        return (error);
 }
-#endif /* MMAPIO */
 
 int
 ahc_pci_map_registers(struct ahc_softc *ahc)
@@ -313,7 +309,6 @@ ahc_pci_map_registers(struct ahc_softc *ahc)
        command &= ~(PCIM_CMD_PORTEN|PCIM_CMD_MEMEN);
        base = 0;
        maddr = NULL;
-#ifdef MMAPIO
        error = ahc_linux_pci_reserve_mem_region(ahc, &base, &maddr);
        if (error == 0) {
                ahc->platform_data->mem_busaddr = base;
@@ -350,7 +345,6 @@ ahc_pci_map_registers(struct ahc_softc *ahc)
                       ahc_get_pci_function(ahc->dev_softc),
                       base);
        }
-#endif /* MMAPIO */
 
        /*
         * We always prefer memory mapped access.
index 377307d..01cfab0 100644 (file)
@@ -39,7 +39,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#66 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#69 $
  *
  * $FreeBSD$
  */
@@ -76,7 +76,7 @@ ahc_compose_id(u_int device, u_int vendor, u_int subdevice, u_int subvendor)
 #define ID_9005_SISL_MASK              0x000FFFFF00000000ull
 #define ID_9005_SISL_ID                        0x0005900500000000ull
 #define ID_AIC7850                     0x5078900400000000ull
-#define ID_AHA_2902_04_10_15_20_30C    0x5078900478509004ull
+#define ID_AHA_2902_04_10_15_20C_30C   0x5078900478509004ull
 #define ID_AIC7855                     0x5578900400000000ull
 #define ID_AIC7859                     0x3860900400000000ull
 #define ID_AHA_2930CU                  0x3860900438699004ull
@@ -245,9 +245,9 @@ struct ahc_pci_identity ahc_pci_ident_table [] =
 {
        /* aic7850 based controllers */
        {
-               ID_AHA_2902_04_10_15_20_30C,
+               ID_AHA_2902_04_10_15_20C_30C,
                ID_ALL_MASK,
-               "Adaptec 2902/04/10/15/20/30C SCSI adapter",
+               "Adaptec 2902/04/10/15/20C/30C SCSI adapter",
                ahc_aic785X_setup
        },
        /* aic7860 based controllers */
@@ -877,7 +877,7 @@ ahc_pci_config(struct ahc_softc *ahc, struct ahc_pci_identity *entry)
                scsiseq = 0;
        }
 
-       error = ahc_reset(ahc);
+       error = ahc_reset(ahc, /*reinit*/FALSE);
        if (error != 0)
                return (ENXIO);
 
@@ -1289,6 +1289,14 @@ ahc_pci_test_register_access(struct ahc_softc *ahc)
        ahc_outb(ahc, HCNTRL, hcntrl|PAUSE);
        while (ahc_is_paused(ahc) == 0)
                ;
+
+       /* Clear any PCI errors that occurred before our driver attached. */
+       status1 = ahc_pci_read_config(ahc->dev_softc,
+                                     PCIR_STATUS + 1, /*bytes*/1);
+       ahc_pci_write_config(ahc->dev_softc, PCIR_STATUS + 1,
+                            status1, /*bytes*/1);
+       ahc_outb(ahc, CLRINT, CLRPARERR);
+
        ahc_outb(ahc, SEQCTL, PERRORDIS);
        ahc_outb(ahc, SCBPTR, 0);
        ahc_outl(ahc, SCB_BASE, 0x5aa555aa);
index 1539104..85e80ee 100644 (file)
@@ -37,7 +37,7 @@
  * String handling code courtesy of Gerard Roudier's <groudier@club-internet.fr>
  * sym driver.
  *
- * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_proc.c#27 $
+ * $Id: //depot/aic7xxx/linux/drivers/scsi/aic7xxx/aic7xxx_proc.c#29 $
  */
 #include "aic7xxx_osm.h"
 #include "aic7xxx_inline.h"
@@ -289,8 +289,13 @@ done:
  * Return information to handle /proc support for the driver.
  */
 int
-ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, off_t offset,
-                 int length, int inout)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
+ahc_linux_proc_info(char *buffer, char **start, off_t offset,
+                   int length, int hostno, int inout)
+#else
+ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start,
+                   off_t offset, int length, int inout)
+#endif
 {
        struct  ahc_softc *ahc;
        struct  info_str info;
@@ -302,10 +307,14 @@ ahc_linux_proc_info(struct Scsi_Host *shost, char *buffer, char **start, off_t o
 
        retval = -EINVAL;
        ahc_list_lock(&s);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
        TAILQ_FOREACH(ahc, &ahc_tailq, links) {
-               if (ahc->platform_data->host == shost)
+               if (ahc->platform_data->host->host_no == hostno)
                        break;
        }
+#else
+       ahc = ahc_find_softc(*(struct ahc_softc **)shost->hostdata);
+#endif
 
        if (ahc == NULL)
                goto done;
index b0687b1..9c71377 100644 (file)
@@ -2,8 +2,8 @@
  * DO NOT EDIT - This file is automatically generated
  *              from the following source files:
  *
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#54 $
- * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#38 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.seq#56 $
+ * $Id: //depot/aic7xxx/aic7xxx/aic7xxx.reg#39 $
  */
 
 #include "aic7xxx_osm.h"
@@ -747,13 +747,6 @@ ahc_scsiseq_template_print(u_int regvalue, u_int *cur_col, u_int wrap)
            0x54, regvalue, cur_col, wrap));
 }
 
-int
-ahc_data_count_odd_print(u_int regvalue, u_int *cur_col, u_int wrap)
-{
-       return (ahc_print_register(NULL, 0, "DATA_COUNT_ODD",
-           0x55, regvalue, cur_col, wrap));
-}
-
 static ahc_reg_parse_entry_t HA_274_BIOSGLOBAL_parse_table[] = {
        { "HA_274_EXTENDED_TRANS",0x01, 0x01 }
 };
@@ -1416,13 +1409,14 @@ ahc_scb_scsiid_print(u_int regvalue, u_int *cur_col, u_int wrap)
 }
 
 static ahc_reg_parse_entry_t SCB_LUN_parse_table[] = {
-       { "LID",                0xff, 0xff }
+       { "SCB_XFERLEN_ODD",    0x80, 0x80 },
+       { "LID",                0x3f, 0x3f }
 };
 
 int
 ahc_scb_lun_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
-       return (ahc_print_register(SCB_LUN_parse_table, 1, "SCB_LUN",
+       return (ahc_print_register(SCB_LUN_parse_table, 2, "SCB_LUN",
            0xba, regvalue, cur_col, wrap));
 }
 
@@ -1662,28 +1656,26 @@ ahc_dff_thrsh_print(u_int regvalue, u_int *cur_col, u_int wrap)
 static ahc_reg_parse_entry_t SG_CACHE_SHADOW_parse_table[] = {
        { "LAST_SEG_DONE",      0x01, 0x01 },
        { "LAST_SEG",           0x02, 0x02 },
-       { "ODD_SEG",            0x04, 0x04 },
        { "SG_ADDR_MASK",       0xf8, 0xf8 }
 };
 
 int
 ahc_sg_cache_shadow_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
-       return (ahc_print_register(SG_CACHE_SHADOW_parse_table, 4, "SG_CACHE_SHADOW",
+       return (ahc_print_register(SG_CACHE_SHADOW_parse_table, 3, "SG_CACHE_SHADOW",
            0xfc, regvalue, cur_col, wrap));
 }
 
 static ahc_reg_parse_entry_t SG_CACHE_PRE_parse_table[] = {
        { "LAST_SEG_DONE",      0x01, 0x01 },
        { "LAST_SEG",           0x02, 0x02 },
-       { "ODD_SEG",            0x04, 0x04 },
        { "SG_ADDR_MASK",       0xf8, 0xf8 }
 };
 
 int
 ahc_sg_cache_pre_print(u_int regvalue, u_int *cur_col, u_int wrap)
 {
-       return (ahc_print_register(SG_CACHE_PRE_parse_table, 4, "SG_CACHE_PRE",
+       return (ahc_print_register(SG_CACHE_PRE_parse_table, 3, "SG_CACHE_PRE",
            0xfc, regvalue, cur_col, wrap));
 }
 
index d781443..f06e703 100644 (file)
@@ -38,7 +38,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_macro_scan.l#7 $
+ * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_macro_scan.l#8 $
  *
  * $FreeBSD$
  */
@@ -78,6 +78,7 @@ MCARG         [^(), \t]+
 \n                     {
                                ++yylineno;
                        }
+\r                     ;
 <ARGLIST>{SPACE}       ;
 <ARGLIST>\(            {
                                parren_count++;
index e4dc6fd..45c0b23 100644 (file)
@@ -38,7 +38,7 @@
  * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGES.
  *
- * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_scan.l#18 $
+ * $Id: //depot/aic7xxx/aic7xxx/aicasm/aicasm_scan.l#19 $
  *
  * $FreeBSD$
  */
@@ -87,6 +87,7 @@ MBODY         ((\\[^\n])*[^\n\\]*)+
 
 %%
 \n                     { ++yylineno; }
+\r                     ;
 "/*"                   { BEGIN COMMENT;  /* Enter comment eating state */ }
 <COMMENT>"/*"          { fprintf(stderr, "Warning! Comment within comment."); }
 <COMMENT>\n            { ++yylineno; }
@@ -114,6 +115,7 @@ if[ \t]*\(          {
                                }
                        }
 <CEXPR>\n              { ++yylineno; }
+<CEXPR>\r              ;
 <CEXPR>[^()\n]+        {
                                char *yptr;
 
@@ -359,6 +361,7 @@ else                        { return T_ELSE; }
                                /* Eat escaped newlines. */
                                ++yylineno;
                        }
+<MACROBODY>\r          ;
 <MACROBODY>\n          {
                                /* Macros end on the first unescaped newline. */
                                BEGIN INITIAL;
@@ -369,10 +372,17 @@ else                      { return T_ELSE; }
                        }
 <MACROBODY>{MBODY}     {
                                char *yptr;
+                               char c;
 
                                yptr = yytext;
-                               while (*yptr)
-                                       *string_buf_ptr++ = *yptr++;
+                               while (c = *yptr++) {
+                                       /*
+                                        * Strip carriage returns.
+                                        */
+                                       if (c == '\r')
+                                               continue;
+                                       *string_buf_ptr++ = c;
+                               }
                        }
 {WORD}\(               {
                                char *yptr;
index 22e52f3..ac371f3 100644 (file)
@@ -97,6 +97,7 @@ static Scsi_Host_Template piix_sht = {
        .proc_name              = DRV_NAME,
        .dma_boundary           = ATA_DMA_BOUNDARY,
        .slave_configure        = ata_scsi_slave_config,
+       .bios_param             = ata_std_bios_param,
 };
 
 static struct ata_port_operations piix_pata_ops = {
index d165a3a..06aef96 100644 (file)
@@ -467,6 +467,7 @@ int cpqfcTS_detect(Scsi_Host_Template *ScsiHostTemplate)
   return NumberOfAdapters;
 }
 
+#ifdef SUPPORT_RESET
 static void my_ioctl_done (Scsi_Cmnd * SCpnt)
 {
     struct request * req;
@@ -477,7 +478,7 @@ static void my_ioctl_done (Scsi_Cmnd * SCpnt)
     if (req->CPQFC_WAITING != NULL)
        CPQFC_COMPLETE(req->CPQFC_WAITING);
 }   
-
+#endif
 
 static int cpqfc_alloc_private_data_pool(CPQFCHBA *hba)
 {
@@ -1577,6 +1578,8 @@ Done:
 // See dpANS Fibre Channel Protocol for SCSI
 // X3.269-199X revision 12, pg 25
 
+#ifdef SUPPORT_RESET
+
 int cpqfcTS_TargetDeviceReset( Scsi_Device *ScsiDev, 
                                unsigned int reset_flags)
 {
@@ -1592,8 +1595,7 @@ int cpqfcTS_TargetDeviceReset( Scsi_Device *ScsiDev,
 // around the 2.5.30 kernel.  Scsi_Cmnd replaced with 
 // Scsi_Request, etc.
 // For now, so people don't fall into a hole...
-return -ENOTSUPP;
-/*
+
   // printk("   ENTERING cpqfcTS_TargetDeviceReset() - flag=%d \n",reset_flags);
 
   if (ScsiDev->host->eh_active) return FAILED;
@@ -1647,7 +1649,6 @@ return -ENOTSUPP;
                   SCpnt->sense_buffer[2] & 0xf);
            
       };
-*/    
   result = SCpnt->result;
 
   SDpnt = SCpnt->device;
@@ -1658,6 +1659,14 @@ return -ENOTSUPP;
   return SUCCESS;
 }
 
+#else
+int cpqfcTS_TargetDeviceReset( Scsi_Device *ScsiDev, 
+                               unsigned int reset_flags)
+{
+       return -ENOTSUPP;
+}
+
+#endif /* SUPPORT_RESET */
 
 int cpqfcTS_eh_device_reset(Scsi_Cmnd *Cmnd)
 {
index 5cab7c7..44c9a76 100644 (file)
 extern int DC390_detect(Scsi_Host_Template *psht);
 extern int DC390_queue_command(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *));
 extern int DC390_abort(Scsi_Cmnd *cmd);
-extern int DC390_reset(Scsi_Cmnd *cmd, unsigned int resetFlags);
+extern int DC390_reset(Scsi_Cmnd *cmd);
 extern int DC390_bios_param(struct scsi_device *sdev, struct block_device *dev,
                sector_t capacity, int geom[]);
 
-#ifdef MODULE
 static int DC390_release(struct Scsi_Host *);
-#else
-# define DC390_release NULL
-#endif
 
 #endif /* DC390_H */
index 51b6473..113e58a 100644 (file)
@@ -109,7 +109,7 @@ int scsi_add_host(struct Scsi_Host *shost, struct device *dev)
        }
 
        if (!shost->shost_gendev.parent)
-               shost->shost_gendev.parent = dev ? dev : &legacy_bus;
+               shost->shost_gendev.parent = dev ? dev : &platform_bus;
 
        error = device_add(&shost->shost_gendev);
        if (error)
index 269e68e..03f6862 100644 (file)
@@ -108,9 +108,6 @@ ORC_SCB *orc_alloc_scb(ORC_HCS * hcsp);
 /* ---- EXTERNAL FUNCTIONS ---- */
 extern void inia100SCBPost(BYTE * pHcb, BYTE * pScb);
 
-/* ---- INTERNAL VARIABLES ---- */
-struct inia100_Adpt_Struc *inia100_adpt;
-
 NVRAM nvram, *nvramp = &nvram;
 static UCHAR dftNvRam[64] =
 {
@@ -703,83 +700,6 @@ void orc_release_dma(ORC_HCS * hcsp, Scsi_Cmnd * SCpnt)
 }
 
 /*****************************************************************************
- Function name : Addinia100_into_Adapter_table
- Description   : This function will scan PCI bus to get all Orchid card
- Input         : None.
- Output                : None.
- Return                : SUCCESSFUL    - Successful scan
- ohterwise     - No drives founded
-*****************************************************************************/
-int Addinia100_into_Adapter_table(WORD wBIOS, WORD wBASE, struct pci_dev *pdev,
-               int iAdapters)
-{
-       unsigned int i, j;
-
-       for (i = 0; i < iAdapters; i++) {
-               if (inia100_adpt[i].ADPT_BIOS < wBIOS)
-                       continue;
-               if (inia100_adpt[i].ADPT_BIOS == wBIOS) {
-                       if (inia100_adpt[i].ADPT_BASE == wBASE) {
-                               if (inia100_adpt[i].ADPT_pdev->bus->number != 0xFF)
-                                       return (FAILURE);
-                       } else if (inia100_adpt[i].ADPT_BASE < wBASE)
-                               continue;
-               }
-               for (j = iAdapters - 1; j > i; j--) {
-                       inia100_adpt[j].ADPT_BASE = inia100_adpt[j - 1].ADPT_BASE;
-                       inia100_adpt[j].ADPT_BIOS = inia100_adpt[j - 1].ADPT_BIOS;
-                       inia100_adpt[j].ADPT_pdev = inia100_adpt[j - 1].ADPT_pdev;
-               }
-               inia100_adpt[i].ADPT_BASE = wBASE;
-               inia100_adpt[i].ADPT_BIOS = wBIOS;
-               inia100_adpt[i].ADPT_pdev = pdev;
-               return (SUCCESSFUL);
-       }
-       return (FAILURE);
-}
-
-
-/*****************************************************************************
- Function name : init_inia100Adapter_table
- Description   : This function will scan PCI bus to get all Orchid card
- Input         : None.
- Output                : None.
- Return                : 0 on success, 1 on failure
-*****************************************************************************/
-int init_inia100Adapter_table(int iAdapters)
-{
-       int i;
-
-       inia100_adpt = kmalloc(sizeof(INIA100_ADPT_STRUCT) * iAdapters,
-                       GFP_KERNEL);
-       if(inia100_adpt == NULL)
-               return 1;
-
-       for (i = 0; i < iAdapters; i++) {/* Initialize adapter structure */
-               inia100_adpt[i].ADPT_BIOS = 0xffff;
-               inia100_adpt[i].ADPT_BASE = 0xffff;
-               inia100_adpt[i].ADPT_pdev = NULL;
-       }
-       return 0;
-}
-
-/*****************************************************************************
- Function name  : get_orcPCIConfig
- Description    : 
- Input          : pHCB  -       Pointer to host adapter structure
- Output         : None.
- Return         : pSRB  -       Pointer to SCSI request block.
-*****************************************************************************/
-void get_orcPCIConfig(ORC_HCS * pCurHcb, int ch_idx)
-{
-       pCurHcb->HCS_Base = inia100_adpt[ch_idx].ADPT_BASE;     /* Supply base address  */
-       pCurHcb->HCS_BIOS = inia100_adpt[ch_idx].ADPT_BIOS;     /* Supply BIOS address  */
-       pCurHcb->HCS_Intr = inia100_adpt[ch_idx].ADPT_pdev->irq;        /* Supply interrupt line */
-       return;
-}
-
-
-/*****************************************************************************
  Function name  : abort_SCB
  Description    : Abort a queued command.
                         (commands that are on the bus can't be aborted easily)
index 152e26a..a17c43b 100644 (file)
  *               Now fixed.
  * 05/07/99 bv - v1.03g
  *             - Changed the assumption that HZ = 100
+ * 10/17/03 mc - v1.04
+ *             - added new DMA API support
  **************************************************************************/
 
 #define CVT_LINUX_VERSION(V,P,S)        (V * 65536 + P * 256 + S)
 
-#error Please convert me to Documentation/DMA-mapping.txt
-
 #ifndef LINUX_VERSION_CODE
 #include <linux/version.h>
 #endif
@@ -143,13 +143,12 @@ unsigned int i91u_debug = DEBUG_DEFAULT;
 
 static Scsi_Host_Template driver_template = {
        .proc_name      = "INI9100U",
-       .proc_info      = "INI9100U",
        .name           = i91u_REVID,
        .detect         = i91u_detect,
        .release        = i91u_release,
        .queuecommand   = i91u_queue,
-       .abort          = i91u_abort,
-       .reset          = i91u_reset,
+//     .abort          = i91u_abort,
+//     .reset          = i91u_reset,
        .bios_param     = i91u_biosparam,
        .can_queue      = 1,
        .this_id        = 1,
@@ -162,7 +161,7 @@ static Scsi_Host_Template driver_template = {
 char *i91uCopyright = "Copyright (C) 1996-98";
 char *i91uInitioName = "by Initio Corporation";
 char *i91uProductName = "INI-9X00U/UW";
-char *i91uVersion = "v1.03g";
+char *i91uVersion = "v1.04";
 
 #define TULSZ(sz)     (sizeof(sz) / sizeof(sz[0]))
 #define TUL_RDWORD(x,y)         (short)(inl((int)((ULONG)((ULONG)x+(UCHAR)y)) ))
@@ -238,12 +237,12 @@ static void i91uAppendSRBToQueue(HCS * pHCB, Scsi_Cmnd * pSRB)
        ULONG flags;
        spin_lock_irqsave(&(pHCB->pSRB_lock), flags);
 
-       pSRB->next = NULL;      /* Pointer to next              */
+       pSRB->host_scribble = NULL;     /* Pointer to next */
 
        if (pHCB->pSRB_head == NULL)
                pHCB->pSRB_head = pSRB;
        else
-               pHCB->pSRB_tail->next = pSRB;   /* Pointer to next              */
+               pHCB->pSRB_tail->host_scribble = (char *)pSRB;  /* Pointer to next */
        pHCB->pSRB_tail = pSRB;
 
        spin_unlock_irqrestore(&(pHCB->pSRB_lock), flags);
@@ -265,8 +264,8 @@ static Scsi_Cmnd *i91uPopSRBFromQueue(HCS * pHCB)
        spin_lock_irqsave(&(pHCB->pSRB_lock), flags);
 
        if ((pSRB = pHCB->pSRB_head) != NULL) {
-               pHCB->pSRB_head = pHCB->pSRB_head->next;
-               pSRB->next = NULL;
+               pHCB->pSRB_head = (struct scsi_cmnd *)pHCB->pSRB_head->host_scribble;
+               pSRB->host_scribble = NULL;
        }
        spin_unlock_irqrestore(&(pHCB->pSRB_lock), flags);
 
@@ -308,6 +307,12 @@ int tul_NewReturnNumberOfAdapters(void)
                        if (((dRegValue & 0xFF00) >> 8) == 0xFF)
                                dRegValue = 0;
                        wBIOS = (wBIOS << 8) + ((UWORD) ((dRegValue & 0xFF00) >> 8));
+                       if (pci_set_dma_mask(pDev, 0xffffffff)) {
+                               printk(KERN_WARNING 
+                                      "i91u: Could not set 32 bit DMA mask\n");
+                               continue;
+                       }
+
                        if (Addi91u_into_Adapter_table(wBIOS,
                                                        (pDev->resource[0].start),
                                                        pDev->irq,
@@ -323,7 +328,6 @@ int tul_NewReturnNumberOfAdapters(void)
 
 int i91u_detect(Scsi_Host_Template * tpnt)
 {
-       SCB *pSCB;
        HCS *pHCB;
        struct Scsi_Host *hreg;
        unsigned long i;        /* 01/14/98                     */
@@ -346,12 +350,7 @@ int i91u_detect(Scsi_Host_Template * tpnt)
 #endif
        }
        /* Get total number of adapters in the motherboard */
-#ifdef CONFIG_PCI
        iAdapters = tul_NewReturnNumberOfAdapters();
-#else
-       iAdapters = tul_ReturnNumberOfAdapters();
-#endif
-
        if (iAdapters == 0)     /* If no tulip founded, return */
                return (0);
 
@@ -379,11 +378,6 @@ int i91u_detect(Scsi_Host_Template * tpnt)
        }
        memset((unsigned char *) tul_scb, 0, i);
 
-       pSCB = tul_scb;
-       for (i = 0; i < tul_num_ch * tul_num_scb; i++, pSCB++) {
-               pSCB->SCB_SGPAddr = (U32) VIRT_TO_BUS(&pSCB->SCB_SGList[0]);
-       }
-
        for (i = 0, pHCB = &tul_hcs[0];         /* Get pointer for control block */
             i < tul_num_ch;
             i++, pHCB++) {
@@ -476,6 +470,7 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
        SG *pSG;                /* Pointer to SG list           */
        int i;
        long TotalLen;
+       dma_addr_t dma_addr;
 
        pSCB->SCB_Post = i91uSCBPost;   /* i91u's callback routine      */
        pSCB->SCB_Srb = SCpnt;
@@ -484,11 +479,13 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
        pSCB->SCB_Target = SCpnt->device->id;
        pSCB->SCB_Lun = SCpnt->device->lun;
        pSCB->SCB_Ident = SCpnt->device->lun | DISC_ALLOW;
-       pSCB->SCB_Flags |= SCF_SENSE;   /* Turn on auto request sense   */
-
-       pSCB->SCB_SensePtr = (U32) VIRT_TO_BUS(SCpnt->sense_buffer);
 
+       pSCB->SCB_Flags |= SCF_SENSE;   /* Turn on auto request sense   */
+       dma_addr = dma_map_single(&pHCB->pci_dev->dev, SCpnt->sense_buffer,
+                                 SENSE_SIZE, DMA_FROM_DEVICE);
+       pSCB->SCB_SensePtr = cpu_to_le32((u32)dma_addr);
        pSCB->SCB_SenseLen = SENSE_SIZE;
+       SCpnt->SCp.ptr = (char *)(unsigned long)dma_addr;
 
        pSCB->SCB_CDBLen = SCpnt->cmd_len;
        pSCB->SCB_HaStat = 0;
@@ -500,33 +497,39 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
        } else {
                pSCB->SCB_TagMsg = 0;   /* No tag support               */
        }
-
+       /* todo handle map_sg error */
        if (SCpnt->use_sg) {
+               dma_addr = dma_map_single(&pHCB->pci_dev->dev, &pSCB->SCB_SGList[0],
+                                         sizeof(struct SG_Struc) * TOTAL_SG_ENTRY,
+                                         DMA_BIDIRECTIONAL);
+               pSCB->SCB_BufPtr = dma_addr;
+               SCpnt->SCp.dma_handle = dma_addr;
+
                pSrbSG = (struct scatterlist *) SCpnt->request_buffer;
-               if (SCpnt->use_sg == 1) {       /* If only one entry in the list *//*      treat it as regular I/O */
-                       pSCB->SCB_BufPtr = (U32) VIRT_TO_BUS(pSrbSG->address);
-                       TotalLen = pSrbSG->length;
-                       pSCB->SCB_SGLen = 0;
-               } else {        /* Assign SG physical address   */
-                       pSCB->SCB_BufPtr = pSCB->SCB_SGPAddr;
-                       pSCB->SCB_Flags |= SCF_SG;      /* Turn on SG list flag       */
-                       for (i = 0, TotalLen = 0, pSG = &pSCB->SCB_SGList[0];   /* 1.01g */
-                            i < SCpnt->use_sg;
-                            i++, pSG++, pSrbSG++) {
-                               pSG->SG_Ptr = (U32) VIRT_TO_BUS(pSrbSG->address);
-                               TotalLen += pSG->SG_Len = pSrbSG->length;
-                       }
-                       pSCB->SCB_SGLen = i;
+               pSCB->SCB_SGLen = dma_map_sg(&pHCB->pci_dev->dev, pSrbSG,
+                                            SCpnt->use_sg, SCpnt->sc_data_direction);
+
+               pSCB->SCB_Flags |= SCF_SG;      /* Turn on SG list flag       */
+               for (i = 0, TotalLen = 0, pSG = &pSCB->SCB_SGList[0];   /* 1.01g */
+                    i < pSCB->SCB_SGLen; i++, pSG++, pSrbSG++) {
+                       pSG->SG_Ptr = (u32)sg_dma_address(pSrbSG);
+                       TotalLen += pSG->SG_Len = (u32)sg_dma_len(pSrbSG);
                }
+
                pSCB->SCB_BufLen = (SCpnt->request_bufflen > TotalLen) ?
                    TotalLen : SCpnt->request_bufflen;
-       } else {                /* Non SG                       */
-               pSCB->SCB_BufPtr = (U32) VIRT_TO_BUS(SCpnt->request_buffer);
-               pSCB->SCB_BufLen = SCpnt->request_bufflen;
+       } else if (SCpnt->request_bufflen) {            /* Non SG */
+               dma_addr = dma_map_single(&pHCB->pci_dev->dev, SCpnt->request_buffer,
+                                         SCpnt->request_bufflen,
+                                         SCpnt->sc_data_direction);
+               SCpnt->SCp.dma_handle = dma_addr;
+               pSCB->SCB_BufPtr = (u32)dma_addr;
+               pSCB->SCB_BufLen = (u32)SCpnt->request_bufflen;
+               pSCB->SCB_SGLen = 0;
+       } else {
+               pSCB->SCB_BufLen = 0;
                pSCB->SCB_SGLen = 0;
        }
-
-       return;
 }
 
 /* 
@@ -623,6 +626,32 @@ int i91u_biosparam(struct scsi_device *sdev, struct block_device *dev,
        return 0;
 }
 
+static void i91u_unmap_cmnd(struct pci_dev *pci_dev, struct scsi_cmnd *cmnd)
+{
+       /* auto sense buffer */
+       if (cmnd->SCp.ptr) {
+               dma_unmap_single(&pci_dev->dev,
+                                (dma_addr_t)((unsigned long)cmnd->SCp.ptr),
+                                SENSE_SIZE, SCSI_DATA_READ);
+               cmnd->SCp.ptr = NULL;
+       }
+
+       /* request buffer */
+       if (cmnd->use_sg) {
+               dma_unmap_single(&pci_dev->dev, cmnd->SCp.dma_handle,
+                                sizeof(struct SG_Struc) * TOTAL_SG_ENTRY,
+                                DMA_BIDIRECTIONAL);
+
+               dma_unmap_sg(&pci_dev->dev, cmnd->request_buffer,
+                            cmnd->use_sg,
+                            cmnd->sc_data_direction);
+       } else if (cmnd->request_bufflen) {
+               dma_unmap_single(&pci_dev->dev, cmnd->SCp.dma_handle,
+                                cmnd->request_bufflen,
+                                cmnd->sc_data_direction);
+       }
+}
+
 /*****************************************************************************
  Function name  : i91uSCBPost
  Description    : This is callback routine be called when tulip finish one
@@ -686,6 +715,8 @@ static void i91uSCBPost(BYTE * pHcb, BYTE * pScb)
        if (pSRB == NULL) {
                printk("pSRB is NULL\n");
        }
+
+       i91u_unmap_cmnd(pHCB->pci_dev, pSRB);
        pSRB->scsi_done(pSRB);  /* Notify system DONE           */
        if ((pSRB = i91uPopSRBFromQueue(pHCB)) != NULL)
                /* Find the next pending SRB    */
index 5360de6..583df65 100644 (file)
  *          - Clean up interrupt handler registration
  *          - Fix memory leaks
  *          - Fix allocation of scsi host structs and private data
+ * 18/11/03 Christoph Hellwig <hch@lst.de>
+ *         - Port to new probing API
+ *         - Fix some more leaks in init failure cases
+ * TODO:
+ *         - use list.h macros for SCB queue
+ *       ( - merge with i60uscsi.c )
  **************************************************************************/
 
 #include <linux/module.h>
-
 #include <linux/errno.h>
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/blkdev.h>
 #include <linux/spinlock.h>
-#include <linux/stat.h>
 #include <linux/kernel.h>
 #include <linux/string.h>
 #include <linux/ioport.h>
-//#include <linux/sched.h>
 #include <linux/slab.h>
-#include <linux/proc_fs.h>
-
 #include <asm/io.h>
 #include <asm/irq.h>
 
-#include "scsi.h"
-#include "hosts.h"
-#include "inia100.h"
+#include <scsi/scsi.h>
+#include <scsi/scsi_cmnd.h>
+#include <scsi/scsi_device.h>
+#include <scsi/scsi_host.h>
 
-static Scsi_Host_Template driver_template = {
-       .proc_name      = "inia100",
-       .name           = inia100_REVID,
-       .detect         = inia100_detect,
-       .release        = inia100_release,
-       .queuecommand   = inia100_queue,
-       .eh_abort_handler = inia100_abort,
-       .eh_bus_reset_handler   = inia100_bus_reset,
-       .eh_device_reset_handler = inia100_device_reset,
-       .can_queue      = 1,
-       .this_id        = 1,
-       .sg_tablesize   = SG_ALL,
-       .cmd_per_lun    = 1,
-       .use_clustering = ENABLE_CLUSTERING,
-};
-#include "scsi_module.c"
+#include "inia100.h"
 
 #define ORC_RDWORD(x,y)         (short)(inl((int)((ULONG)((ULONG)x+(UCHAR)y)) ))
 
@@ -115,32 +102,19 @@ char *inia100_InitioName = "by Initio Corporation";
 char *inia100_ProductName = "INI-A100U2W";
 char *inia100_Version = "v1.02d";
 
-/* set by inia100_setup according to the command line */
-static int setup_called = 0;
-
-/* ---- INTERNAL VARIABLES ---- */
-#define NUMBER(arr)     (sizeof(arr) / sizeof(arr[0]))
-static char *setup_str = (char *) NULL;
-
-static irqreturn_t inia100_intr(int, void *, struct pt_regs *);
-static void inia100_panic(char *msg);
-
 /* ---- EXTERNAL FUNCTIONS ---- */
 extern void inia100SCBPost(BYTE * pHcb, BYTE * pScb);
-extern int Addinia100_into_Adapter_table(WORD, WORD, struct pci_dev *, int);
 extern int init_inia100Adapter_table(int);
 extern ORC_SCB *orc_alloc_scb(ORC_HCS * hcsp);
 extern void orc_exec_scb(ORC_HCS * hcsp, ORC_SCB * scbp);
 extern void orc_release_scb(ORC_HCS * hcsp, ORC_SCB * scbp);
-extern void orc_release_dma(ORC_HCS * hcsp, Scsi_Cmnd * cmnd);
+extern void orc_release_dma(ORC_HCS * hcsp, struct scsi_cmnd * cmnd);
 extern void orc_interrupt(ORC_HCS * hcsp);
-extern int orc_device_reset(ORC_HCS * pHCB, Scsi_Cmnd *SCpnt, unsigned int target);
+extern int orc_device_reset(ORC_HCS * pHCB, struct scsi_cmnd *SCpnt, unsigned int target);
 extern int orc_reset_scsi_bus(ORC_HCS * pHCB);
 extern int abort_SCB(ORC_HCS * hcsp, ORC_SCB * pScb);
-extern int orc_abort_srb(ORC_HCS * hcsp, Scsi_Cmnd *SCpnt);
-extern void get_orcPCIConfig(ORC_HCS * pCurHcb, int ch_idx);
+extern int orc_abort_srb(ORC_HCS * hcsp, struct scsi_cmnd *SCpnt);
 extern int init_orchid(ORC_HCS * hcsp);
-extern struct inia100_Adpt_Struc *inia100_adpt;
 
 /*****************************************************************************
  Function name  : inia100AppendSRBToQueue
@@ -150,7 +124,7 @@ extern struct inia100_Adpt_Struc *inia100_adpt;
  Output         : None.
  Return         : None.
 *****************************************************************************/
-static void inia100AppendSRBToQueue(ORC_HCS * pHCB, Scsi_Cmnd * pSRB)
+static void inia100AppendSRBToQueue(ORC_HCS * pHCB, struct scsi_cmnd * pSRB)
 {
        ULONG flags;
 
@@ -173,13 +147,13 @@ static void inia100AppendSRBToQueue(ORC_HCS * pHCB, Scsi_Cmnd * pSRB)
  Output         : None.
  Return         : pSRB  -       Pointer to SCSI request block.
 *****************************************************************************/
-static Scsi_Cmnd *inia100PopSRBFromQueue(ORC_HCS * pHCB)
+static struct scsi_cmnd *inia100PopSRBFromQueue(ORC_HCS * pHCB)
 {
-       Scsi_Cmnd *pSRB;
+       struct scsi_cmnd *pSRB;
        ULONG flags;
        spin_lock_irqsave(&(pHCB->pSRB_lock), flags);
-       if ((pSRB = (Scsi_Cmnd *) pHCB->pSRB_head) != NULL) {
-               pHCB->pSRB_head = (Scsi_Cmnd *) pHCB->pSRB_head->SCp.ptr;
+       if ((pSRB = (struct scsi_cmnd *) pHCB->pSRB_head) != NULL) {
+               pHCB->pSRB_head = (struct scsi_cmnd *) pHCB->pSRB_head->SCp.ptr;
                pSRB->SCp.ptr = NULL;
        }
        spin_unlock_irqrestore(&(pHCB->pSRB_lock), flags);
@@ -187,273 +161,13 @@ static Scsi_Cmnd *inia100PopSRBFromQueue(ORC_HCS * pHCB)
 }
 
 /*****************************************************************************
- Function name  : inia100_setup
- Description    : 
- Input          : pHCB  -       Pointer to host adapter structure
- Output         : None.
- Return         : pSRB  -       Pointer to SCSI request block.
-*****************************************************************************/
-void inia100_setup(char *str, int *ints)
-{
-       if (setup_called)
-               inia100_panic("inia100: inia100_setup called twice.\n");
-
-       setup_called = ints[0];
-       setup_str = str;
-}
-
-/*****************************************************************************
- Function name : orc_ReturnNumberOfAdapters
- Description   : This function will scan PCI bus to get all Orchid card
- Input         : None.
- Output                : None.
- Return                : SUCCESSFUL    - Successful scan
-                 ohterwise     - No drives founded
-*****************************************************************************/
-int orc_ReturnNumberOfAdapters(void)
-{
-       unsigned int iAdapters;
-
-       iAdapters = 0;
-       /*
-        * PCI-bus probe.
-        */
-       {
-               /*
-                * Note: I removed the struct pci_device_list stuff since this
-                * driver only cares about one device ID.  If that changes in
-                * the future it can be added in with only a very moderate
-                * amount of work.  It made the double scan of the device list
-                * for getting a count and allocating the device list easier
-                * to not have the for(i ... ) loop in there....
-                */
-               unsigned int dRegValue;
-               WORD wBIOS, wBASE;
-#ifdef MMAPIO
-               unsigned long page_offset, base;
-#endif
-               struct pci_dev *pdev = NULL;
-
-               /*
-                * Get a count of adapters that we expect to be able to use.
-                * Pass that count to init_inia100Adapter_table() for malloc
-                * reasons.
-                */
-               pdev = NULL;
-               while((pdev=pci_find_device(ORC_VENDOR_ID, ORC_DEVICE_ID, pdev)))
-               {
-                       if (pci_enable_device(pdev))
-                               continue;
-                       if (pci_set_dma_mask(pdev, (u64)0xffffffff)) {
-                               printk(KERN_WARNING "Unable to set 32bit DMA "
-                                       "on inia100 adapter, ignoring.\n");
-                               continue;
-                       }
-                       iAdapters++;
-               }
-               if(init_inia100Adapter_table(iAdapters))
-                       return 0;
-               /*
-                * Now go through the adapters again actually setting them up
-                * and putting them in the table this time.
-                */
-               pdev = NULL;
-               while((pdev=pci_find_device(ORC_VENDOR_ID, ORC_DEVICE_ID, pdev)))
-               {
-                       /*
-                        * Read sundry information from PCI BIOS.
-                        */
-                       dRegValue = pci_resource_start(pdev, 0);
-                       if (dRegValue == -1) {  /* Check return code */
-                               printk("\n\rinia100: orchid read configuration error.\n");
-                               iAdapters--;
-                               continue;       /* Read configuration space error  */
-                       }
-
-                       /* <02> read from base address + 0x50 offset to get the wBIOS balue. */
-                       wBASE = (WORD) dRegValue;
-
-                       /* Now read the interrupt line value */
-                       dRegValue = pdev->irq;
-
-                       wBIOS = ORC_RDWORD(wBASE, 0x50);
-
-                       pci_set_master(pdev);
-
-#ifdef MMAPIO
-                       base = wBASE & PAGE_MASK;
-                       page_offset = wBASE - base;
-
-                       /*
-                        * replace the next line with this one if you are using 2.1.x:
-                        * temp_p->maddr = ioremap(base, page_offset + 256);
-                        */
-                       wBASE = ioremap(base, page_offset + 256);
-                       if (wBASE) {
-                               wBASE += page_offset;
-                       }
-#endif
-
-                       Addinia100_into_Adapter_table(wBIOS, wBASE, pdev, iAdapters);
-               }       /* while(pdev=....) */
-       }                       /* PCI BIOS present */
-       return (iAdapters);
-}
-
-/*****************************************************************************
- Function name  : inia100_detect
- Description    : 
- Input          : pHCB  -       Pointer to host adapter structure
- Output         : None.
- Return         : pSRB  -       Pointer to SCSI request block.
-*****************************************************************************/
-int inia100_detect(Scsi_Host_Template * tpnt)
-{
-       ORC_HCS *pHCB;
-       struct Scsi_Host *hreg;
-       U32 sz;
-       U32 i;                  /* 01/14/98                     */
-       int ok = 0, iAdapters;
-       ULONG dBiosAdr;
-       BYTE *pbBiosAdr;
-       struct pci_dev *pdev;
-
-       tpnt->proc_name = "inia100";
-       if (setup_called) {
-               /* Setup by inia100_setup          */
-               printk("inia100: processing commandline: ");
-       }
-       /* Get total number of adapters in the motherboard */
-       iAdapters = orc_ReturnNumberOfAdapters();
-
-       /* printk("inia100: Total Initio Adapters = %d\n", iAdapters); */
-       if (iAdapters == 0)     /* If no orc founded, return */
-               return (0);
-
-#if 0
-       printk("orc_num_scb= %x orc_num_ch= %x hcsize= %x scbsize= %x escbsize= %x\n",
-              orc_num_scb, orc_num_ch, sizeof(ORC_HCS), sizeof(ORC_SCB), sizeof(ESCB));
-#endif
-
-       for (i = 0; i < iAdapters; i++) {
-               pdev = inia100_adpt[i].ADPT_pdev;
-               hreg = scsi_register(tpnt, sizeof(ORC_HCS));
-               if (hreg == NULL) {
-                       goto out_disable;
-               }
-               pHCB = (ORC_HCS *)hreg->hostdata;
-               pHCB->pdev = pdev;
-               pHCB->pSRB_head = NULL; /* Initial SRB save queue       */
-               pHCB->pSRB_tail = NULL; /* Initial SRB save queue       */
-               pHCB->pSRB_lock = SPIN_LOCK_UNLOCKED; /* SRB save queue lock */
-               pHCB->BitAllocFlagLock = SPIN_LOCK_UNLOCKED;
-               /* Get total memory needed for SCB */
-               sz = ORC_MAXQUEUE * sizeof(ORC_SCB);
-               if ((pHCB->HCS_virScbArray = (PVOID) pci_alloc_consistent(pdev, sz, &pHCB->HCS_physScbArray)) == NULL) {
-                       printk("inia100: SCB memory allocation error\n");
-                       goto out_unregister;
-               }
-               memset((unsigned char *) pHCB->HCS_virScbArray, 0, sz);
-
-               /* Get total memory needed for ESCB */
-               sz = ORC_MAXQUEUE * sizeof(ESCB);
-               if ((pHCB->HCS_virEscbArray = (PVOID) pci_alloc_consistent(pdev, sz, &pHCB->HCS_physEscbArray)) == NULL) {
-                       printk("inia100: ESCB memory allocation error\n");
-                       goto out_unalloc;
-               }
-               memset((unsigned char *) pHCB->HCS_virEscbArray, 0, sz);
-
-               get_orcPCIConfig(pHCB, i);
-
-               dBiosAdr = pHCB->HCS_BIOS;
-               dBiosAdr = (dBiosAdr << 4);
-
-               pbBiosAdr = phys_to_virt(dBiosAdr);
-
-               if (init_orchid(pHCB)) {        /* Initial orchid chip    */
-                       printk("inia100: initial orchid fail!!\n");
-                       goto out_unalloc;
-               }
-               if (!request_region(pHCB->HCS_Base, 256, "inia100")) {
-                       printk(KERN_WARNING "inia100: io port 0x%x, is busy.\n", 
-                              pHCB->HCS_Base);
-                       return (0);
-               }
-
-               hreg->io_port = pHCB->HCS_Base;
-               hreg->n_io_port = 0xff;
-               hreg->can_queue = ORC_MAXQUEUE; /* 03/05/98                   */
-
-               hreg->unique_id = pHCB->HCS_Base;
-               hreg->max_id = pHCB->HCS_MaxTar;
-
-               hreg->max_lun = 16;     /* 10/21/97                     */
-/*
-   hreg->max_lun = 8;
-   hreg->max_channel = 1;
- */
-               hreg->irq = pHCB->HCS_Intr;
-               hreg->this_id = pHCB->HCS_SCSI_ID;      /* Assign HCS index           */
-
-#if 1
-               hreg->sg_tablesize = TOTAL_SG_ENTRY;    /* Maximun support is 32 */
-#else
-               hreg->sg_tablesize = SG_NONE;   /* No SG                        */
-#endif
-
-               /* Initial orc chip           */
-               ok = request_irq(pHCB->HCS_Intr, inia100_intr, SA_SHIRQ, "inia100", hreg);
-               if (ok < 0) {
-                       if (ok == -EINVAL) {
-                               printk("inia100: bad IRQ %d.\n", pHCB->HCS_Intr);
-                               printk("         Contact author.\n");
-                       } else {
-                               if (ok == -EBUSY)
-                                       printk("inia100: IRQ %d already in use. Configure another.\n", pHCB->HCS_Intr);
-                               else {
-                                       printk("\ninia100: Unexpected error code on requesting IRQ %d.\n",
-                                              pHCB->HCS_Intr);
-                                       printk("         Contact author.\n");
-                               }
-                       }
-                       goto out_irq;
-               }
-       }
-
-       tpnt->this_id = -1;
-       tpnt->can_queue = 1;
-       kfree(inia100_adpt);
-       return 1;
-
-out_irq:
-        release_region(pHCB->HCS_Base, 256);
-out_unalloc:
-       if(pHCB->HCS_virEscbArray) {
-               pci_free_consistent(pHCB->pdev, ORC_MAXQUEUE * sizeof(ESCB),
-                       pHCB->HCS_virEscbArray, pHCB->HCS_physEscbArray);
-               pHCB->HCS_virEscbArray = NULL;
-       }
-       if(pHCB->HCS_virScbArray) {
-               pci_free_consistent(pHCB->pdev, ORC_MAXQUEUE * sizeof(ORC_SCB),
-                       pHCB->HCS_virScbArray, pHCB->HCS_physScbArray);
-               pHCB->HCS_virScbArray = NULL;
-       }
-out_unregister:
-       scsi_unregister(hreg);
-out_disable:
-       pci_disable_device(pdev);
-       kfree(inia100_adpt);
-       return i;
-}
-
-/*****************************************************************************
  Function name  : inia100BuildSCB
  Description    : 
  Input          : pHCB  -       Pointer to host adapter structure
  Output         : None.
  Return         : pSRB  -       Pointer to SCSI request block.
 *****************************************************************************/
-static void inia100BuildSCB(ORC_HCS * pHCB, ORC_SCB * pSCB, Scsi_Cmnd * SCpnt)
+static void inia100BuildSCB(ORC_HCS * pHCB, ORC_SCB * pSCB, struct scsi_cmnd * SCpnt)
 {                              /* Create corresponding SCB     */
        struct scatterlist *pSrbSG;
        ORC_SG *pSG;            /* Pointer to SG list           */
@@ -479,7 +193,7 @@ static void inia100BuildSCB(ORC_HCS * pHCB, ORC_SCB * pSCB, Scsi_Cmnd * SCpnt)
                        TotalLen = 0;
                        pSrbSG = (struct scatterlist *) SCpnt->request_buffer;
                        count_sg = pci_map_sg(pHCB->pdev, pSrbSG, SCpnt->use_sg,
-                               scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
+                                       SCpnt->sc_data_direction);
                        pSCB->SCB_SGLen = (U32) (count_sg * 8);
                        for (i = 0; i < count_sg; i++, pSG++, pSrbSG++) {
                                pSG->SG_Ptr = (U32) sg_dma_address(pSrbSG);
@@ -490,7 +204,7 @@ static void inia100BuildSCB(ORC_HCS * pHCB, ORC_SCB * pSCB, Scsi_Cmnd * SCpnt)
                        pSCB->SCB_SGLen = 0x8;
                        pSG->SG_Ptr = (U32) pci_map_single(pHCB->pdev,
                                SCpnt->request_buffer, SCpnt->request_bufflen,
-                               scsi_to_pci_dma_dir(SCpnt->sc_data_direction));
+                               SCpnt->sc_data_direction);
                        SCpnt->host_scribble = (void *)pSG->SG_Ptr;
                        pSG->SG_Len = (U32) SCpnt->request_bufflen;
                } else {
@@ -526,7 +240,7 @@ static void inia100BuildSCB(ORC_HCS * pHCB, ORC_SCB * pSCB, Scsi_Cmnd * SCpnt)
  Output         : None.
  Return         : pSRB  -       Pointer to SCSI request block.
 *****************************************************************************/
-static int inia100_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
+static int inia100_queue(struct scsi_cmnd * SCpnt, void (*done) (struct scsi_cmnd *))
 {
        register ORC_SCB *pSCB;
        ORC_HCS *pHCB;          /* Point to Host adapter control block */
@@ -553,7 +267,7 @@ static int inia100_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
  Output         : None.
  Return         : pSRB  -       Pointer to SCSI request block.
 *****************************************************************************/
-static int inia100_abort(Scsi_Cmnd * SCpnt)
+static int inia100_abort(struct scsi_cmnd * SCpnt)
 {
        ORC_HCS *hcsp;
 
@@ -569,7 +283,7 @@ static int inia100_abort(Scsi_Cmnd * SCpnt)
  Output         : None.
  Return         : pSRB  -       Pointer to SCSI request block.
 *****************************************************************************/
-static int inia100_bus_reset(Scsi_Cmnd * SCpnt)
+static int inia100_bus_reset(struct scsi_cmnd * SCpnt)
 {                              /* I need Host Control Block Information */
        ORC_HCS *pHCB;
        pHCB = (ORC_HCS *) SCpnt->device->host->hostdata;
@@ -583,7 +297,7 @@ static int inia100_bus_reset(Scsi_Cmnd * SCpnt)
  Output         : None.
  Return         : pSRB  -       Pointer to SCSI request block.
 *****************************************************************************/
-static int inia100_device_reset(Scsi_Cmnd * SCpnt)
+static int inia100_device_reset(struct scsi_cmnd * SCpnt)
 {                              /* I need Host Control Block Information */
        ORC_HCS *pHCB;
        pHCB = (ORC_HCS *) SCpnt->device->host->hostdata;
@@ -602,7 +316,7 @@ static int inia100_device_reset(Scsi_Cmnd * SCpnt)
 *****************************************************************************/
 void inia100SCBPost(BYTE * pHcb, BYTE * pScb)
 {
-       Scsi_Cmnd *pSRB;        /* Pointer to SCSI request block */
+       struct scsi_cmnd *pSRB; /* Pointer to SCSI request block */
        ORC_HCS *pHCB;
        ORC_SCB *pSCB;
        ESCB *pEScb;
@@ -610,7 +324,7 @@ void inia100SCBPost(BYTE * pHcb, BYTE * pScb)
        pHCB = (ORC_HCS *) pHcb;
        pSCB = (ORC_SCB *) pScb;
        pEScb = pSCB->SCB_EScb;
-       if ((pSRB = (Scsi_Cmnd *) pEScb->SCB_Srb) == 0) {
+       if ((pSRB = (struct scsi_cmnd *) pEScb->SCB_Srb) == 0) {
                printk("inia100SCBPost: SRB pointer is empty\n");
                orc_release_scb(pHCB, pSCB);    /* Release SCB for current channel */
                return;
@@ -676,47 +390,187 @@ void inia100SCBPost(BYTE * pHcb, BYTE * pScb)
 static irqreturn_t inia100_intr(int irqno, void *devid, struct pt_regs *regs)
 {
        struct Scsi_Host *host = (struct Scsi_Host *)devid;
-       ORC_HCS *pHcb;
+       ORC_HCS *pHcb = (ORC_HCS *)host->hostdata;
        unsigned long flags;
 
-       pHcb = (ORC_HCS *)host->hostdata;       /* Host adapter control block */
        spin_lock_irqsave(host->host_lock, flags);
        orc_interrupt(pHcb);
        spin_unlock_irqrestore(host->host_lock, flags);
+
        return IRQ_HANDLED;
 }
 
-/* 
- * Dump the current driver status and panic...
- */
-static void inia100_panic(char *msg)
+static struct scsi_host_template inia100_template = {
+       .proc_name              = "inia100",
+       .name                   = inia100_REVID,
+       .queuecommand           = inia100_queue,
+       .eh_abort_handler       = inia100_abort,
+       .eh_bus_reset_handler   = inia100_bus_reset,
+       .eh_device_reset_handler = inia100_device_reset,
+       .can_queue              = 1,
+       .this_id                = 1,
+       .sg_tablesize           = SG_ALL,
+       .cmd_per_lun            = 1,
+       .use_clustering         = ENABLE_CLUSTERING,
+};
+
+static int __devinit inia100_probe_one(struct pci_dev *pdev,
+               const struct pci_device_id *id)
 {
-       printk("\ninia100_panic: %s\n", msg);
-       panic("inia100 panic");
+       struct Scsi_Host *shost;
+       ORC_HCS *pHCB;
+       unsigned long port, bios;
+       int ok = -ENODEV;
+       u32 sz;
+       unsigned long dBiosAdr;
+       char *pbBiosAdr;
+
+       if (pci_enable_device(pdev))
+               goto out;
+       if (pci_set_dma_mask(pdev, 0xffffffffULL)) {
+               printk(KERN_WARNING "Unable to set 32bit DMA "
+                                   "on inia100 adapter, ignoring.\n");
+               goto out_disable_device;
+       }
+
+       port = pci_resource_start(pdev, 0);
+       if (!request_region(pHCB->HCS_Base, 256, "inia100")) {
+               printk(KERN_WARNING "inia100: io port 0x%x, is busy.\n", 
+                      pHCB->HCS_Base);
+               goto out_disable_device; /* XXX: undo init_orchid() ?? */
+       }
+
+       /* <02> read from base address + 0x50 offset to get the bios balue. */
+       bios = ORC_RDWORD(port, 0x50);
+
+       pci_set_master(pdev);
+
+       shost = scsi_host_alloc(&inia100_template, sizeof(ORC_HCS));
+       if (!shost)
+               goto out_release_region;
+
+       pHCB = (ORC_HCS *)shost->hostdata;
+       pHCB->pdev = pdev;
+       pHCB->HCS_Base = port;
+       pHCB->HCS_BIOS = bios;
+       pHCB->pSRB_head = NULL; /* Initial SRB save queue       */
+       pHCB->pSRB_tail = NULL; /* Initial SRB save queue       */
+       pHCB->pSRB_lock = SPIN_LOCK_UNLOCKED; /* SRB save queue lock */
+       pHCB->BitAllocFlagLock = SPIN_LOCK_UNLOCKED;
+
+       /* Get total memory needed for SCB */
+       sz = ORC_MAXQUEUE * sizeof(ORC_SCB);
+       pHCB->HCS_virScbArray = pci_alloc_consistent(pdev, sz, &pHCB->HCS_physScbArray);
+       if (!pHCB->HCS_virScbArray) {
+               printk("inia100: SCB memory allocation error\n");
+               goto out_host_put;
+       }
+       memset(pHCB->HCS_virScbArray, 0, sz);
+
+       /* Get total memory needed for ESCB */
+       sz = ORC_MAXQUEUE * sizeof(ESCB);
+       pHCB->HCS_virEscbArray = pci_alloc_consistent(pdev, sz, &pHCB->HCS_physEscbArray);
+       if (!pHCB->HCS_virEscbArray) {
+               printk("inia100: ESCB memory allocation error\n");
+               goto out_free_scb_array;
+       }
+       memset(pHCB->HCS_virEscbArray, 0, sz);
+
+       dBiosAdr = pHCB->HCS_BIOS;
+       dBiosAdr = (dBiosAdr << 4);
+       pbBiosAdr = phys_to_virt(dBiosAdr);
+       if (init_orchid(pHCB)) {        /* Initialize orchid chip */
+               printk("inia100: initial orchid fail!!\n");
+               goto out_free_escb_array;
+       }
+
+       shost->io_port = pHCB->HCS_Base;
+       shost->n_io_port = 0xff;
+       shost->can_queue = ORC_MAXQUEUE;
+       shost->unique_id = shost->io_port;
+       shost->max_id = pHCB->HCS_MaxTar;
+       shost->max_lun = 16;
+       shost->irq = pHCB->HCS_Intr;
+       shost->this_id = pHCB->HCS_SCSI_ID;     /* Assign HCS index */
+       shost->sg_tablesize = TOTAL_SG_ENTRY;
+
+       /* Initial orc chip           */
+       ok = request_irq(pHCB->HCS_Intr, inia100_intr, SA_SHIRQ, "inia100", shost);
+       if (ok < 0) {
+               printk(KERN_WARNING "inia100: unable to get irq %d\n", pHCB->HCS_Intr);
+               goto out_free_escb_array;
+       }
+
+       pci_set_drvdata(pdev, shost);
+
+       ok = scsi_add_host(shost, &pdev->dev);
+       if (!ok)
+               goto out_free_irq;
+
+       scsi_scan_host(shost);
+       return 0;
+
+ out_free_irq:
+        free_irq(shost->irq, shost);
+ out_free_escb_array:
+       pci_free_consistent(pdev, ORC_MAXQUEUE * sizeof(ESCB),
+                       pHCB->HCS_virEscbArray, pHCB->HCS_physEscbArray);
+ out_free_scb_array:
+       pci_free_consistent(pdev, ORC_MAXQUEUE * sizeof(ORC_SCB),
+                       pHCB->HCS_virScbArray, pHCB->HCS_physScbArray);
+ out_host_put:
+       scsi_host_put(shost);
+ out_release_region:
+        release_region(pHCB->HCS_Base, 256);
+ out_disable_device:
+       pci_disable_device(pdev);
+ out:
+       return ok;
 }
 
-/*
- * Release ressources
- */
-static int inia100_release(struct Scsi_Host *hreg)
+static void __devexit inia100_remove_one(struct pci_dev *pdev)
 {
-       ORC_HCS *pHCB = (ORC_HCS *)hreg->hostdata;
+       struct Scsi_Host *shost = pci_get_drvdata(pdev);
+       ORC_HCS *pHCB = (ORC_HCS *)shost->hostdata;
+
+       scsi_remove_host(shost);
 
-        free_irq(hreg->irq, hreg);
-        release_region(hreg->io_port, 256);
-       if(pHCB->HCS_virEscbArray) {
-               pci_free_consistent(pHCB->pdev, ORC_MAXQUEUE * sizeof(ESCB),
+        free_irq(shost->irq, shost);
+       pci_free_consistent(pdev, ORC_MAXQUEUE * sizeof(ESCB),
                        pHCB->HCS_virEscbArray, pHCB->HCS_physEscbArray);
-               pHCB->HCS_virEscbArray = NULL;
-       }
-       if(pHCB->HCS_virScbArray) {
-               pci_free_consistent(pHCB->pdev, ORC_MAXQUEUE * sizeof(ORC_SCB),
+       pci_free_consistent(pdev, ORC_MAXQUEUE * sizeof(ORC_SCB),
                        pHCB->HCS_virScbArray, pHCB->HCS_physScbArray);
-               pHCB->HCS_virScbArray = NULL;
-       }
-       pci_disable_device(pHCB->pdev);
-        return 0;
+        release_region(shost->io_port, 256);
+
+       scsi_host_put(shost);
 } 
 
+static struct pci_device_id inia100_pci_tbl[] = {
+       {ORC_VENDOR_ID, ORC_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {0,}
+};
+MODULE_DEVICE_TABLE(pci, inia100_pci_tbl);
+
+static struct pci_driver inia100_pci_driver = {
+       .name           = "inia100",
+       .id_table       = inia100_pci_tbl,
+       .probe          = inia100_probe_one,
+       .remove         = __devexit_p(inia100_remove_one),
+};
+
+static int __init inia100_init(void)
+{
+       return pci_module_init(&inia100_pci_driver);
+}
+
+static void __exit inia100_exit(void)
+{
+       pci_unregister_driver(&inia100_pci_driver);
+}
+
+MODULE_DESCRIPTION("Initio A100U2W SCSI driver");
+MODULE_AUTHOR("Initio Corporation");
 MODULE_LICENSE("Dual BSD/GPL");
-/*#include "inia100scsi.c" */
+
+module_init(inia100_init);
+module_exit(inia100_exit);
index 1364a2e..c58c792 100644 (file)
 #include <linux/types.h>
 #include <linux/pci.h>
 
-static int inia100_detect(Scsi_Host_Template *);
-static int inia100_release(struct Scsi_Host *);
-static int inia100_queue(Scsi_Cmnd *, void (*done) (Scsi_Cmnd *));
-static int inia100_abort(Scsi_Cmnd *);
-static int inia100_device_reset(Scsi_Cmnd *);
-static int inia100_bus_reset(Scsi_Cmnd *);
-
 #define inia100_REVID "Initio INI-A100U2W SCSI device driver; Revision: 1.02d"
 
 #define ULONG   unsigned long
@@ -115,13 +108,6 @@ typedef struct ORC_SG_Struc {
        U32 SG_Len;             /* Data Length */
 } ORC_SG;
 
-typedef struct inia100_Adpt_Struc {
-        UWORD ADPT_BIOS;        /* 0 */
-        UWORD ADPT_BASE;        /* 1 */
-        struct pci_dev *ADPT_pdev;      /* 2 */
-} INIA100_ADPT_STRUCT;
-
-
 /* SCSI related definition                                              */
 #define DISC_NOT_ALLOW          0x80   /* Disconnect is not allowed    */
 #define DISC_ALLOW              0xC0   /* Disconnect is allowed        */
@@ -211,7 +197,7 @@ typedef struct inia100_Adpt_Struc {
 
 typedef struct orc_extended_scb {      /* Extended SCB                 */
        ORC_SG ESCB_SGList[TOTAL_SG_ENTRY];     /*0 Start of SG list              */
-       Scsi_Cmnd *SCB_Srb;     /*50 SRB Pointer */
+       struct scsi_cmnd *SCB_Srb;      /*50 SRB Pointer */
 } ESCB;
 
 /***********************************************************************
@@ -344,8 +330,8 @@ typedef struct ORC_Ha_Ctrl_Struc {
        ORC_TCS HCS_Tcs[16];    /* 28 */
        U32 BitAllocFlag[MAX_CHANNELS][8];      /* Max STB is 256, So 256/32 */
        spinlock_t BitAllocFlagLock;
-       Scsi_Cmnd *pSRB_head;
-       Scsi_Cmnd *pSRB_tail;
+       struct scsi_cmnd *pSRB_head;
+       struct scsi_cmnd *pSRB_tail;
        spinlock_t pSRB_lock;
        struct pci_dev *pdev;
 } ORC_HCS;
index 82ab160..5980973 100644 (file)
@@ -1619,7 +1619,7 @@ static void ata_dev_set_pio(struct ata_port *ap, unsigned int device)
 static void ata_sg_clean(struct ata_queued_cmd *qc)
 {
        struct ata_port *ap = qc->ap;
-       Scsi_Cmnd *cmd = qc->scsicmd;
+       struct scsi_cmnd *cmd = qc->scsicmd;
        struct scatterlist *sg = qc->sg;
        int dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
 
@@ -1635,8 +1635,8 @@ static void ata_sg_clean(struct ata_queued_cmd *qc)
        if (cmd->use_sg)
                pci_unmap_sg(ap->host_set->pdev, sg, qc->n_elem, dir);
        else
-               pci_unmap_single(ap->host_set->pdev, sg[0].dma_address,
-                                sg[0].length, dir);
+               pci_unmap_single(ap->host_set->pdev, sg_dma_address(&sg[0]),
+                                sg_dma_len(&sg[0]), dir);
 
        qc->flags &= ~ATA_QCFLAG_SG;
        qc->sg = NULL;
@@ -1659,8 +1659,8 @@ void ata_fill_sg(struct ata_queued_cmd *qc)
        assert(qc->n_elem > 0);
 
        for (i = 0; i < qc->n_elem; i++) {
-               ap->prd[i].addr = cpu_to_le32(sg[i].dma_address);
-               ap->prd[i].flags_len = cpu_to_le32(sg[i].length);
+               ap->prd[i].addr = cpu_to_le32(sg_dma_address(&sg[i]));
+               ap->prd[i].flags_len = cpu_to_le32(sg_dma_len(&sg[i]));
                VPRINTK("PRD[%u] = (0x%X, 0x%X)\n",
                        i, le32_to_cpu(ap->prd[i].addr), le32_to_cpu(ap->prd[i].flags_len));
        }
@@ -1681,7 +1681,7 @@ void ata_fill_sg(struct ata_queued_cmd *qc)
 static int ata_sg_setup_one(struct ata_queued_cmd *qc)
 {
        struct ata_port *ap = qc->ap;
-       Scsi_Cmnd *cmd = qc->scsicmd;
+       struct scsi_cmnd *cmd = qc->scsicmd;
        int dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
        struct scatterlist *sg = qc->sg;
        unsigned int have_sg = (qc->flags & ATA_QCFLAG_SG);
@@ -1691,12 +1691,12 @@ static int ata_sg_setup_one(struct ata_queued_cmd *qc)
 
        sg->page = virt_to_page(cmd->request_buffer);
        sg->offset = (unsigned long) cmd->request_buffer & ~PAGE_MASK;
-       sg->length = cmd->request_bufflen;
+       sg_dma_len(sg) = cmd->request_bufflen;
 
        if (!have_sg)
                return 0;
 
-       sg->dma_address = pci_map_single(ap->host_set->pdev,
+       sg_dma_address(sg) = pci_map_single(ap->host_set->pdev,
                                         cmd->request_buffer,
                                         cmd->request_bufflen, dir);
 
@@ -1720,7 +1720,7 @@ static int ata_sg_setup_one(struct ata_queued_cmd *qc)
 static int ata_sg_setup(struct ata_queued_cmd *qc)
 {
        struct ata_port *ap = qc->ap;
-       Scsi_Cmnd *cmd = qc->scsicmd;
+       struct scsi_cmnd *cmd = qc->scsicmd;
        struct scatterlist *sg;
        int n_elem;
        unsigned int have_sg = (qc->flags & ATA_QCFLAG_SG);
@@ -1872,7 +1872,7 @@ static void ata_pio_sector(struct ata_port *ap)
 {
        struct ata_queued_cmd *qc;
        struct scatterlist *sg;
-       Scsi_Cmnd *cmd;
+       struct scsi_cmnd *cmd;
        unsigned char *buf;
        u8 status;
 
@@ -1917,7 +1917,7 @@ static void ata_pio_sector(struct ata_port *ap)
        qc->cursg_ofs++;
 
        if (cmd->use_sg)
-               if ((qc->cursg_ofs * ATA_SECT_SIZE) == sg[qc->cursg].length) {
+               if ((qc->cursg_ofs * ATA_SECT_SIZE) == sg_dma_len(&sg[qc->cursg])) {
                        qc->cursg++;
                        qc->cursg_ofs = 0;
                }
@@ -2092,7 +2092,7 @@ struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
 void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat, unsigned int done_late)
 {
        struct ata_port *ap = qc->ap;
-       Scsi_Cmnd *cmd = qc->scsicmd;
+       struct scsi_cmnd *cmd = qc->scsicmd;
        unsigned int tag, do_clear = 0;
 
        assert(qc != NULL);     /* ata_qc_from_tag _might_ return NULL */
@@ -2163,7 +2163,7 @@ static void ata_qc_push (struct ata_queued_cmd *qc, unsigned int append)
 int ata_qc_issue(struct ata_queued_cmd *qc)
 {
        struct ata_port *ap = qc->ap;
-       Scsi_Cmnd *cmd = qc->scsicmd;
+       struct scsi_cmnd *cmd = qc->scsicmd;
        unsigned int dma = qc->flags & ATA_QCFLAG_DMA;
 
        ata_dev_select(ap, qc->dev->devno, 1, 0);
@@ -2719,7 +2719,7 @@ static void ata_host_remove(struct ata_port *ap, unsigned int do_unregister)
        DPRINTK("ENTER\n");
 
        if (do_unregister)
-               scsi_remove_host(sh); /* FIXME: check return val */
+               scsi_remove_host(sh);
 
        ata_thread_kill(ap);    /* FIXME: check return val */
 
@@ -3204,7 +3204,6 @@ void ata_pci_remove_one (struct pci_dev *pdev)
        for (i = 0; i < host_set->n_ports; i++) {
                ap = host_set->ports[i];
 
-               /* FIXME: check return val */
                scsi_remove_host(ap->host);
        }
 
@@ -3215,13 +3214,10 @@ void ata_pci_remove_one (struct pci_dev *pdev)
                host_set->ports[0]->ops->host_stop(host_set);
 
        for (i = 0; i < host_set->n_ports; i++) {
-               Scsi_Host_Template *sht;
-
                ap = host_set->ports[i];
-               sht = ap->host->hostt;
 
                ata_scsi_release(ap->host);
-               scsi_host_put(ap->host); /* FIXME: check return val */
+               scsi_host_put(ap->host);
        }
 
        pci_release_regions(pdev);
@@ -3279,6 +3275,7 @@ int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits)
        return (tmp == bits->val) ? 1 : 0;
 }
 
+
 /**
  *     ata_init -
  *
@@ -3304,6 +3301,7 @@ module_init(ata_init);
  */
 
 EXPORT_SYMBOL_GPL(pci_test_config_bits);
+EXPORT_SYMBOL_GPL(ata_std_bios_param);
 EXPORT_SYMBOL_GPL(ata_std_ports);
 EXPORT_SYMBOL_GPL(ata_device_add);
 EXPORT_SYMBOL_GPL(ata_qc_complete);
index 8722412..5fc2f2f 100644 (file)
 
 #include "libata.h"
 
+
+/**
+ *     ata_std_bios_param - generic bios head/sector/cylinder calculator
+ *         used by sd. Most BIOSes nowadays expect a XXX/255/16  (CHS) 
+ *         mapping. Some situations may arise where the disk is not 
+ *         bootable if this is not used.
+ *
+ *     LOCKING:
+ *
+ *     RETURNS:
+ *
+ */
+int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev,
+                      sector_t capacity, int geom[]) 
+{
+       geom[0] = 255;
+       geom[1] = 63;
+       sector_div(capacity, 255*63);
+       geom[2] = capacity;
+
+       return 0;
+}
+
+
 struct ata_queued_cmd *ata_scsi_qc_new(struct ata_port *ap,
                                       struct ata_device *dev,
-                                      Scsi_Cmnd *cmd,
-                                      void (*done)(Scsi_Cmnd *))
+                                      struct scsi_cmnd *cmd,
+                                      void (*done)(struct scsi_cmnd *))
 {
        struct ata_queued_cmd *qc;
 
@@ -69,7 +93,7 @@ struct ata_queued_cmd *ata_scsi_qc_new(struct ata_port *ap,
 
 void ata_to_sense_error(struct ata_queued_cmd *qc)
 {
-       Scsi_Cmnd *cmd = qc->scsicmd;
+       struct scsi_cmnd *cmd = qc->scsicmd;
 
        cmd->result = SAM_STAT_CHECK_CONDITION;
 
@@ -282,7 +306,7 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, u8 *scsicmd,
  */
 
 void ata_scsi_rw_queue(struct ata_port *ap, struct ata_device *dev,
-                     Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *),
+                     struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *),
                      unsigned int cmd_size)
 {
        struct ata_queued_cmd *qc;
@@ -332,7 +356,7 @@ err_out:
  *     Length of response buffer.
  */
 
-static unsigned int ata_scsi_rbuf_get(Scsi_Cmnd *cmd, u8 **buf_out)
+static unsigned int ata_scsi_rbuf_get(struct scsi_cmnd *cmd, u8 **buf_out)
 {
        u8 *buf;
        unsigned int buflen;
@@ -363,7 +387,7 @@ static unsigned int ata_scsi_rbuf_get(Scsi_Cmnd *cmd, u8 **buf_out)
  *     spin_lock_irqsave(host_set lock)
  */
 
-static inline void ata_scsi_rbuf_put(Scsi_Cmnd *cmd)
+static inline void ata_scsi_rbuf_put(struct scsi_cmnd *cmd)
 {
        if (cmd->use_sg) {
                struct scatterlist *sg;
@@ -394,7 +418,7 @@ void ata_scsi_rbuf_fill(struct ata_scsi_args *args,
 {
        u8 *rbuf;
        unsigned int buflen, rc;
-       Scsi_Cmnd *cmd = args->cmd;
+       struct scsi_cmnd *cmd = args->cmd;
 
        buflen = ata_scsi_rbuf_get(cmd, &rbuf);
        rc = actor(args, rbuf, buflen);
@@ -817,7 +841,7 @@ unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args, u8 *rbuf,
  *     spin_lock_irqsave(host_set lock)
  */
 
-void ata_scsi_badcmd(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *), u8 asc, u8 ascq)
+void ata_scsi_badcmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), u8 asc, u8 ascq)
 {
        DPRINTK("ENTER\n");
        cmd->result = SAM_STAT_CHECK_CONDITION;
@@ -847,7 +871,7 @@ void ata_scsi_badcmd(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *), u8 asc, u8 ascq)
  */
 
 static void atapi_scsi_queuecmd(struct ata_port *ap, struct ata_device *dev,
-                              Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
+                              struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
 {
        struct ata_queued_cmd *qc;
        u8 *scsicmd = cmd->cmnd, status;
@@ -958,7 +982,7 @@ err_out:
  *     Zero.
  */
 
-int ata_scsi_queuecmd(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
+int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
 {
        u8 *scsicmd = cmd->cmnd;
        struct ata_port *ap;
index 7f07181..e21e582 100644 (file)
@@ -31,8 +31,8 @@
 struct ata_scsi_args {
        struct ata_port         *ap;
        struct ata_device       *dev;
-       Scsi_Cmnd               *cmd;
-       void                    (*done)(Scsi_Cmnd *);
+       struct scsi_cmnd                *cmd;
+       void                    (*done)(struct scsi_cmnd *);
 };
 
 
@@ -51,7 +51,7 @@ extern void ata_thread_wake(struct ata_port *ap, unsigned int thr_state);
 /* libata-scsi.c */
 extern void ata_to_sense_error(struct ata_queued_cmd *qc);
 extern void ata_scsi_rw_queue(struct ata_port *ap, struct ata_device *dev,
-                     Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *),
+                     struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *),
                      unsigned int cmd_size);
 extern int ata_scsi_error(struct Scsi_Host *host);
 extern unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf,
@@ -74,19 +74,19 @@ extern unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf,
                                unsigned int buflen);
 extern unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args, u8 *rbuf,
                                   unsigned int buflen);
-extern void ata_scsi_badcmd(Scsi_Cmnd *cmd,
-                           void (*done)(Scsi_Cmnd *),
+extern void ata_scsi_badcmd(struct scsi_cmnd *cmd,
+                           void (*done)(struct scsi_cmnd *),
                            u8 asc, u8 ascq);
 extern void ata_scsi_rbuf_fill(struct ata_scsi_args *args, 
                         unsigned int (*actor) (struct ata_scsi_args *args,
                                            u8 *rbuf, unsigned int buflen));
 
-static inline void ata_bad_scsiop(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
+static inline void ata_bad_scsiop(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
 {
        ata_scsi_badcmd(cmd, done, 0x20, 0x00);
 }
 
-static inline void ata_bad_cdb(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *))
+static inline void ata_bad_cdb(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *))
 {
        ata_scsi_badcmd(cmd, done, 0x24, 0x00);
 }
index 1d211a1..8c3228e 100644 (file)
@@ -14,6 +14,9 @@
  *       - speed-ups (list handling fixes, issued_list, optimizations.)
  *       - lots of cleanups.
  *
+ * Copyright (c) 2003  Christoph Hellwig  <hch@lst.de>
+ *       - new-style, hotplug-aware pci probing and scsi registration
+ *
  * Version : v2.00.3 (Feb 19, 2003) - Atul Mukker <Atul.Mukker@lsil.com>
  *
  * Description: Linux device driver for LSI Logic MegaRAID controller
@@ -42,6 +45,7 @@
 #include <linux/list.h>
 #include <linux/interrupt.h>
 #include <linux/pci.h>
+#include <linux/init.h>
 #include <scsi/scsicam.h>
 
 #include "scsi.h"
@@ -79,10 +83,6 @@ static int hba_count;
 static adapter_t *hba_soft_state[MAX_CONTROLLERS];
 static struct proc_dir_entry *mega_proc_dir_entry;
 
-static struct notifier_block mega_notifier = {
-       .notifier_call = megaraid_reboot_notify
-};
-
 /* For controller re-ordering */
 static struct mega_hbas mega_hbas[MAX_CONTROLLERS];
 
@@ -116,548 +116,6 @@ static int major;
  */
 static int trace_level;
 
-/*
- * megaraid_validate_parms()
- *
- * Validate that any module parms passed in
- * have proper values.
- */
-static void
-megaraid_validate_parms(void)
-{
-       if( (max_cmd_per_lun <= 0) || (max_cmd_per_lun > MAX_CMD_PER_LUN) )
-               max_cmd_per_lun = MAX_CMD_PER_LUN;
-       if( max_mbox_busy_wait > MBOX_BUSY_WAIT )
-               max_mbox_busy_wait = MBOX_BUSY_WAIT;
-}
-
-
-/**
- * megaraid_detect()
- * @host_template - Our soft state maintained by mid-layer
- *
- * the detect entry point for the mid-layer.
- * We scan the PCI bus for our controllers and start them.
- *
- * Note: PCI_DEVICE_ID_PERC4_DI below represents the PERC4/Di class of
- * products. All of them share the same vendor id, device id, and subsystem
- * vendor id but different subsystem ids. As of now, driver does not use the
- * subsystem id.
- */
-static int
-megaraid_detect(Scsi_Host_Template *host_template)
-{
-       int     i;
-       u16     dev_sw_table[] = {      /* Table of all supported
-                                          vendor/device ids */
-
-               PCI_VENDOR_ID_DELL,             PCI_DEVICE_ID_DISCOVERY, 
-               PCI_VENDOR_ID_DELL,             PCI_DEVICE_ID_PERC4_DI, 
-               PCI_VENDOR_ID_LSI_LOGIC,        PCI_DEVICE_ID_PERC4_QC_VERDE, 
-               PCI_VENDOR_ID_AMI,              PCI_DEVICE_ID_AMI_MEGARAID, 
-               PCI_VENDOR_ID_AMI,              PCI_DEVICE_ID_AMI_MEGARAID2, 
-               PCI_VENDOR_ID_AMI,              PCI_DEVICE_ID_AMI_MEGARAID3, 
-               PCI_VENDOR_ID_INTEL,            PCI_DEVICE_ID_AMI_MEGARAID3, 
-               PCI_VENDOR_ID_LSI_LOGIC,        PCI_DEVICE_ID_AMI_MEGARAID3 };
-
-       host_template->proc_name = "megaraid";
-
-       printk(KERN_NOTICE "megaraid: " MEGARAID_VERSION);
-
-       megaraid_validate_parms();
-
-       memset(mega_hbas, 0, sizeof (mega_hbas));
-
-       hba_count = 0;
-
-       /*
-        * Scan PCI bus for our all devices.
-        */
-       for( i = 0; i < sizeof(dev_sw_table)/sizeof(u16); i += 2 ) {
-
-               mega_find_card(host_template, dev_sw_table[i],
-                               dev_sw_table[i+1]);
-       }
-
-       if(hba_count) {
-               /*
-                * re-order hosts so that one with bootable logical drive
-                * comes first
-                */
-#ifdef CONFIG_PROC_FS
-               mega_proc_dir_entry = proc_mkdir("megaraid", &proc_root);
-
-               if(!mega_proc_dir_entry) {
-                       printk(KERN_WARNING
-                               "megaraid: failed to create megaraid root\n");
-               }
-               else {
-                       for(i = 0; i < hba_count; i++) {
-                               mega_create_proc_entry(i, mega_proc_dir_entry);
-                       }
-               }
-#endif
-
-               /*
-                * Register the driver as a character device, for applications
-                * to access it for ioctls.
-                * First argument (major) to register_chrdev implies a dynamic
-                * major number allocation.
-                */
-               major = register_chrdev(0, "megadev", &megadev_fops);
-
-               /*
-                * Register the Shutdown Notification hook in kernel
-                */
-               if(register_reboot_notifier(&mega_notifier)) {
-                       printk(KERN_WARNING
-                               "MegaRAID Shutdown routine not registered!!\n");
-               }
-
-       }
-
-       return hba_count;
-}
-
-
-
-/**
- * mega_find_card() - find and start this controller
- * @host_template - Our soft state maintained by mid-layer
- * @pci_vendor - pci vendor id for this controller
- * @pci_device - pci device id for this controller
- *
- * Scans the PCI bus for this vendor and device id combination, setup the
- * resources, and register ourselves as a SCSI HBA driver, and setup all
- * parameters for our soft state.
- *
- * This routine also checks for some buggy firmware and ajust the flags
- * accordingly.
- */
-static void
-mega_find_card(Scsi_Host_Template *host_template, u16 pci_vendor,
-       u16 pci_device)
-{
-       struct Scsi_Host        *host = NULL;
-       adapter_t       *adapter = NULL;
-       u32     magic64;
-       unsigned long   mega_baseport;
-       u16     subsysid, subsysvid;
-       u8      pci_bus;
-       u8      pci_dev_func;
-       u8      irq;
-       struct pci_dev  *pdev = NULL;
-       u8      did_ioremap_f = 0;
-       u8      did_req_region_f = 0;
-       u8      did_scsi_reg_f = 0;
-       u8      alloc_int_buf_f = 0;
-       u8      alloc_scb_f = 0;
-       u8      got_irq_f = 0;
-       u8      did_setup_mbox_f = 0;
-       unsigned long   tbase;
-       unsigned long   flag = 0;
-       int     i, j;
-
-       while((pdev = pci_find_device(pci_vendor, pci_device, pdev))) {
-
-               if(pci_enable_device (pdev)) continue;
-
-               pci_bus = pdev->bus->number;
-               pci_dev_func = pdev->devfn;
-
-               /*
-                * For these vendor and device ids, signature offsets are not
-                * valid and 64 bit is implicit
-                */
-               if( (pci_vendor == PCI_VENDOR_ID_DELL &&
-                       pci_device == PCI_DEVICE_ID_PERC4_DI) ||
-                       (pci_vendor == PCI_VENDOR_ID_LSI_LOGIC &&
-                       pci_device == PCI_DEVICE_ID_PERC4_QC_VERDE) ) {
-
-                       flag |= BOARD_64BIT;
-               }
-               else {
-                       pci_read_config_dword(pdev, PCI_CONF_AMISIG64,
-                                       &magic64);
-
-                       if (magic64 == HBA_SIGNATURE_64BIT)
-                               flag |= BOARD_64BIT;
-               }
-
-               subsysvid = pdev->subsystem_vendor;
-               subsysid = pdev->subsystem_device;
-
-               /*
-                * If we do not find the valid subsys vendor id, refuse to
-                * load the driver. This is part of PCI200X compliance
-                * We load the driver if subsysvid is 0.
-                */
-               if( subsysvid && (subsysvid != AMI_SUBSYS_VID) &&
-                               (subsysvid != DELL_SUBSYS_VID) &&
-                               (subsysvid != HP_SUBSYS_VID) &&
-                               (subsysvid != INTEL_SUBSYS_VID) &&
-                               (subsysvid != LSI_SUBSYS_VID) ) continue;
-
-
-               printk(KERN_NOTICE "megaraid: found 0x%4.04x:0x%4.04x:bus %d:",
-                       pci_vendor, pci_device, pci_bus);
-
-               printk("slot %d:func %d\n",
-                       PCI_SLOT(pci_dev_func), PCI_FUNC(pci_dev_func));
-
-               /* Read the base port and IRQ from PCI */
-               mega_baseport = pci_resource_start(pdev, 0);
-               irq = pdev->irq;
-
-               tbase = mega_baseport;
-
-               if( pci_resource_flags(pdev, 0) & IORESOURCE_MEM ) {
-
-                       if (!request_mem_region(mega_baseport, 128,
-                                       "MegaRAID: LSI Logic Corporation.")) {
-                               printk(KERN_WARNING
-                                       "megaraid: mem region busy!\n");
-                               continue;
-                       }
-
-                       mega_baseport =
-                               (unsigned long)ioremap(mega_baseport, 128);
-
-                       if( !mega_baseport ) {
-                               printk(KERN_WARNING
-                                       "megaraid: could not map hba memory\n");
-
-                               release_mem_region(tbase, 128);
-
-                               continue;
-                       }
-
-                       flag |= BOARD_MEMMAP;
-
-                       did_ioremap_f = 1;
-               }
-               else {
-                       mega_baseport += 0x10;
-
-                       if( !request_region(mega_baseport, 16, "megaraid") )
-                               goto fail_attach;
-
-                       flag |= BOARD_IOMAP;
-
-                       did_req_region_f = 1;
-               }
-
-               /* Initialize SCSI Host structure */
-               host = scsi_register(host_template, sizeof(adapter_t));
-
-               if(!host) goto fail_attach;
-
-               did_scsi_reg_f = 1;
-
-               scsi_set_device(host, &pdev->dev);
-
-               adapter = (adapter_t *)host->hostdata;
-               memset(adapter, 0, sizeof(adapter_t));
-
-               printk(KERN_NOTICE
-                       "scsi%d:Found MegaRAID controller at 0x%lx, IRQ:%d\n",
-                       host->host_no, mega_baseport, irq);
-
-               adapter->base = mega_baseport;
-
-               /* Copy resource info into structure */
-               INIT_LIST_HEAD(&adapter->free_list);
-               INIT_LIST_HEAD(&adapter->pending_list);
-               INIT_LIST_HEAD(&adapter->completed_list);
-
-               adapter->flag = flag;
-               spin_lock_init(&adapter->lock);
-               scsi_assign_lock(host, &adapter->lock);
-
-               host->cmd_per_lun = max_cmd_per_lun;
-               host->max_sectors = max_sectors_per_io;
-
-               adapter->dev = pdev;
-               adapter->host = host;
-
-               adapter->host->irq = irq;
-
-               if( flag & BOARD_MEMMAP ) {
-                       adapter->host->base = tbase;
-               }
-               else {
-                       adapter->host->io_port = tbase;
-                       adapter->host->n_io_port = 16;
-               }
-
-               adapter->host->unique_id = (pci_bus << 8) | pci_dev_func;
-
-               /*
-                * Allocate buffer to issue internal commands.
-                */
-               adapter->mega_buffer = pci_alloc_consistent(adapter->dev,
-                       MEGA_BUFFER_SIZE, &adapter->buf_dma_handle);
-
-               if( !adapter->mega_buffer ) {
-                       printk(KERN_WARNING "megaraid: out of RAM.\n");
-                       goto fail_attach;
-               }
-               alloc_int_buf_f = 1;
-
-               adapter->scb_list = kmalloc(sizeof(scb_t)*MAX_COMMANDS,
-                               GFP_KERNEL);
-
-               if(!adapter->scb_list) {
-                       printk(KERN_WARNING "megaraid: out of RAM.\n");
-                       goto fail_attach;
-               }
-
-               alloc_scb_f = 1;
-
-               /* Request our IRQ */
-               if( adapter->flag & BOARD_MEMMAP ) {
-                       if(request_irq(irq, megaraid_isr_memmapped, SA_SHIRQ,
-                                               "megaraid", adapter)) {
-                               printk(KERN_WARNING
-                                       "megaraid: Couldn't register IRQ %d!\n",
-                                       irq);
-                               goto fail_attach;
-                       }
-               }
-               else {
-                       if(request_irq(irq, megaraid_isr_iomapped, SA_SHIRQ,
-                                               "megaraid", adapter)) {
-                               printk(KERN_WARNING
-                                       "megaraid: Couldn't register IRQ %d!\n",
-                                       irq);
-                               goto fail_attach;
-                       }
-               }
-               got_irq_f = 1;
-
-               if( mega_setup_mailbox(adapter) != 0 )
-                       goto fail_attach;
-
-               did_setup_mbox_f = 1;
-
-               if( mega_query_adapter(adapter) != 0 )
-                       goto fail_attach;
-
-               /*
-                * Have checks for some buggy f/w
-                */
-               if((subsysid == 0x1111) && (subsysvid == 0x1111)) {
-                       /*
-                        * Which firmware
-                        */
-                       if (!strcmp(adapter->fw_version, "3.00") ||
-                                       !strcmp(adapter->fw_version, "3.01")) {
-
-                               printk( KERN_WARNING
-                                       "megaraid: Your  card is a Dell PERC "
-                                       "2/SC RAID controller with  "
-                                       "firmware\nmegaraid: 3.00 or 3.01.  "
-                                       "This driver is known to have "
-                                       "corruption issues\nmegaraid: with "
-                                       "those firmware versions on this "
-                                       "specific card.  In order\nmegaraid: "
-                                       "to protect your data, please upgrade "
-                                       "your firmware to version\nmegaraid: "
-                                       "3.10 or later, available from the "
-                                       "Dell Technical Support web\n"
-                                       "megaraid: site at\nhttp://support."
-                                       "dell.com/us/en/filelib/download/"
-                                       "index.asp?fileid=2940\n"
-                               );
-                       }
-               }
-
-               /*
-                * If we have a HP 1M(0x60E7)/2M(0x60E8) controller with
-                * firmware H.01.07, H.01.08, and H.01.09 disable 64 bit
-                * support, since this firmware cannot handle 64 bit
-                * addressing
-                */
-
-               if((subsysvid == HP_SUBSYS_VID) &&
-                               ((subsysid == 0x60E7)||(subsysid == 0x60E8))) {
-
-                       /*
-                        * which firmware
-                        */
-                       if( !strcmp(adapter->fw_version, "H01.07") ||
-                               !strcmp(adapter->fw_version, "H01.08") ||
-                               !strcmp(adapter->fw_version, "H01.09") ) {
-
-                               printk(KERN_WARNING
-                                       "megaraid: Firmware H.01.07, "
-                                       "H.01.08, and H.01.09 on 1M/2M "
-                                       "controllers\n"
-                                       "megaraid: do not support 64 bit "
-                                       "addressing.\nmegaraid: DISABLING "
-                                       "64 bit support.\n");
-                               adapter->flag &= ~BOARD_64BIT;
-                       }
-               }
-
-
-               if(mega_is_bios_enabled(adapter)) {
-                       mega_hbas[hba_count].is_bios_enabled = 1;
-               }
-               mega_hbas[hba_count].hostdata_addr = adapter;
-
-               /*
-                * Find out which channel is raid and which is scsi. This is
-                * for ROMB support.
-                */
-               mega_enum_raid_scsi(adapter);
-
-               /*
-                * Find out if a logical drive is set as the boot drive. If
-                * there is one, will make that as the first logical drive.
-                * ROMB: Do we have to boot from a physical drive. Then all
-                * the physical drives would appear before the logical disks.
-                * Else, all the physical drives would be exported to the mid
-                * layer after logical drives.
-                */
-               mega_get_boot_drv(adapter);
-
-               if( ! adapter->boot_pdrv_enabled ) {
-                       for( i = 0; i < NVIRT_CHAN; i++ )
-                               adapter->logdrv_chan[i] = 1;
-
-                       for( i = NVIRT_CHAN; i<MAX_CHANNELS+NVIRT_CHAN; i++ )
-                               adapter->logdrv_chan[i] = 0;
-
-                       adapter->mega_ch_class <<= NVIRT_CHAN;
-               }
-               else {
-                       j = adapter->product_info.nchannels;
-                       for( i = 0; i < j; i++ )
-                               adapter->logdrv_chan[i] = 0;
-
-                       for( i = j; i < NVIRT_CHAN + j; i++ )
-                               adapter->logdrv_chan[i] = 1;
-               }
-
-
-               /*
-                * Do we support random deletion and addition of logical
-                * drives
-                */
-               adapter->read_ldidmap = 0;      /* set it after first logdrv
-                                                  delete cmd */
-               adapter->support_random_del = mega_support_random_del(adapter);
-
-               /* Initialize SCBs */
-               if(mega_init_scb(adapter)) {
-                       goto fail_attach;
-               }
-
-               /*
-                * Reset the pending commands counter
-                */
-               atomic_set(&adapter->pend_cmds, 0);
-
-               /*
-                * Reset the adapter quiescent flag
-                */
-               atomic_set(&adapter->quiescent, 0);
-
-               hba_soft_state[hba_count] = adapter;
-
-               /*
-                * Fill in the structure which needs to be passed back to the
-                * application when it does an ioctl() for controller related
-                * information.
-                */
-               i = hba_count;
-
-               mcontroller[i].base = mega_baseport;
-               mcontroller[i].irq = irq;
-               mcontroller[i].numldrv = adapter->numldrv;
-               mcontroller[i].pcibus = pci_bus;
-               mcontroller[i].pcidev = pci_device;
-               mcontroller[i].pcifun = PCI_FUNC (pci_dev_func);
-               mcontroller[i].pciid = -1;
-               mcontroller[i].pcivendor = pci_vendor;
-               mcontroller[i].pcislot = PCI_SLOT (pci_dev_func);
-               mcontroller[i].uid = (pci_bus << 8) | pci_dev_func;
-
-
-               /* Set the Mode of addressing to 64 bit if we can */
-               if((adapter->flag & BOARD_64BIT)&&(sizeof(dma_addr_t) == 8)) {
-                       pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
-                       adapter->has_64bit_addr = 1;
-               }
-               else  {
-                       pci_set_dma_mask(pdev, 0xffffffff);
-                       adapter->has_64bit_addr = 0;
-               }
-               
-               init_MUTEX(&adapter->int_mtx);
-               init_waitqueue_head(&adapter->int_waitq);
-
-               adapter->this_id = DEFAULT_INITIATOR_ID;
-               adapter->host->this_id = DEFAULT_INITIATOR_ID;
-
-#if MEGA_HAVE_CLUSTERING
-               /*
-                * Is cluster support enabled on this controller
-                * Note: In a cluster the HBAs ( the initiators ) will have
-                * different target IDs and we cannot assume it to be 7. Call
-                * to mega_support_cluster() will get the target ids also if
-                * the cluster support is available
-                */
-               adapter->has_cluster = mega_support_cluster(adapter);
-
-               if( adapter->has_cluster ) {
-                       printk(KERN_NOTICE
-                               "megaraid: Cluster driver, initiator id:%d\n",
-                               adapter->this_id);
-               }
-#endif
-
-               hba_count++;
-               continue;
-
-fail_attach:
-               if( did_setup_mbox_f ) {
-                       pci_free_consistent(adapter->dev, sizeof(mbox64_t),
-                                       (void *)adapter->una_mbox64,
-                                       adapter->una_mbox64_dma);
-               }
-
-               if( got_irq_f ) {
-                       irq_disable(adapter);
-                       free_irq(adapter->host->irq, adapter);
-               }
-
-               if( alloc_scb_f ) {
-                       kfree(adapter->scb_list);
-               }
-
-               if( alloc_int_buf_f ) {
-                       pci_free_consistent(adapter->dev, MEGA_BUFFER_SIZE,
-                                       (void *)adapter->mega_buffer,
-                                       adapter->buf_dma_handle);
-               }
-
-               if( did_scsi_reg_f ) scsi_unregister(host);
-
-               if( did_ioremap_f ) {
-                       iounmap((void *)mega_baseport);
-                       release_mem_region(tbase, 128);
-               }
-
-               if( did_req_region_f )
-                       release_region(mega_baseport, 16);
-       }
-
-       return;
-}
-
-
 /**
  * mega_setup_mailbox()
  * @adapter - pointer to our soft state
@@ -2396,148 +1854,28 @@ mega_8_to_40ld(mraid_inquiry *inquiry, mega_inquiry3 *enquiry3,
                enquiry3->pdrv_state[i] = inquiry->pdrv_info.pdrv_state[i];
 }
 
-/*
- * Release the controller's resources
- */
-static int
-megaraid_release(struct Scsi_Host *host)
+static inline void
+mega_free_sgl(adapter_t *adapter)
 {
-       adapter_t       *adapter;
-       mbox_t  *mbox;
-       u_char  raw_mbox[sizeof(struct mbox_out)];
-       char    buf[12] = { 0 };
+       scb_t   *scb;
+       int     i;
 
-       adapter = (adapter_t *)host->hostdata;
-       mbox = (mbox_t *)raw_mbox;
+       for(i = 0; i < adapter->max_cmds; i++) {
 
-       printk(KERN_NOTICE "megaraid: being unloaded...");
+               scb = &adapter->scb_list[i];
 
-       /* Flush adapter cache */
-       memset(&mbox->m_out, 0, sizeof(raw_mbox));
-       raw_mbox[0] = FLUSH_ADAPTER;
+               if( scb->sgl64 ) {
+                       pci_free_consistent(adapter->dev,
+                               sizeof(mega_sgl64) * adapter->sglen,
+                               scb->sgl64,
+                               scb->sgl_dma_addr);
 
-       irq_disable(adapter);
-       free_irq(adapter->host->irq, adapter);
+                       scb->sgl64 = NULL;
+               }
 
-       /* Issue a blocking (interrupts disabled) command to the card */
-       issue_scb_block(adapter, raw_mbox);
-
-       /* Flush disks cache */
-       memset(&mbox->m_out, 0, sizeof(raw_mbox));
-       raw_mbox[0] = FLUSH_SYSTEM;
-
-       /* Issue a blocking (interrupts disabled) command to the card */
-       issue_scb_block(adapter, raw_mbox);
-
-
-       /* Free our resources */
-       if( adapter->flag & BOARD_MEMMAP ) {
-               iounmap((void *)adapter->base);
-               release_mem_region(adapter->host->base, 128);
-       }
-       else {
-               release_region(adapter->base, 16);
-       }
-
-       mega_free_sgl(adapter);
-
-#ifdef CONFIG_PROC_FS
-       if( adapter->controller_proc_dir_entry ) {
-               remove_proc_entry("stat", adapter->controller_proc_dir_entry);
-               remove_proc_entry("config",
-                               adapter->controller_proc_dir_entry);
-               remove_proc_entry("mailbox",
-                               adapter->controller_proc_dir_entry);
-#if MEGA_HAVE_ENH_PROC
-               remove_proc_entry("rebuild-rate",
-                               adapter->controller_proc_dir_entry);
-               remove_proc_entry("battery-status",
-                               adapter->controller_proc_dir_entry);
-
-               remove_proc_entry("diskdrives-ch0",
-                               adapter->controller_proc_dir_entry);
-               remove_proc_entry("diskdrives-ch1",
-                               adapter->controller_proc_dir_entry);
-               remove_proc_entry("diskdrives-ch2",
-                               adapter->controller_proc_dir_entry);
-               remove_proc_entry("diskdrives-ch3",
-                               adapter->controller_proc_dir_entry);
-
-               remove_proc_entry("raiddrives-0-9",
-                               adapter->controller_proc_dir_entry);
-               remove_proc_entry("raiddrives-10-19",
-                               adapter->controller_proc_dir_entry);
-               remove_proc_entry("raiddrives-20-29",
-                               adapter->controller_proc_dir_entry);
-               remove_proc_entry("raiddrives-30-39",
-                               adapter->controller_proc_dir_entry);
-#endif
-
-               sprintf(buf, "hba%d", adapter->host->host_no);
-               remove_proc_entry(buf, mega_proc_dir_entry);
-       }
-#endif
-
-       pci_free_consistent(adapter->dev, MEGA_BUFFER_SIZE,
-                       adapter->mega_buffer, adapter->buf_dma_handle);
-       kfree(adapter->scb_list);
-       pci_free_consistent(adapter->dev, sizeof(mbox64_t),
-                       (void *)adapter->una_mbox64, adapter->una_mbox64_dma);
-
-       hba_count--;
-
-       if( hba_count == 0 ) {
-
-               /*
-                * Unregister the character device interface to the driver.
-                */
-               unregister_chrdev(major, "megadev");
-
-               unregister_reboot_notifier(&mega_notifier);
-
-#ifdef CONFIG_PROC_FS
-               if( adapter->controller_proc_dir_entry ) {
-                       remove_proc_entry ("megaraid", &proc_root);
-               }
-#endif
-
-       }
-
-       /*
-        * Release the controller memory. A word of warning this frees
-        * hostdata and that includes adapter-> so be careful what you
-        * dereference beyond this point
-        */
-       scsi_unregister(host);
-
-
-       printk("ok.\n");
-
-       return 0;
-}
-
-static inline void
-mega_free_sgl(adapter_t *adapter)
-{
-       scb_t   *scb;
-       int     i;
-
-       for(i = 0; i < adapter->max_cmds; i++) {
-
-               scb = &adapter->scb_list[i];
-
-               if( scb->sgl64 ) {
-                       pci_free_consistent(adapter->dev,
-                               sizeof(mega_sgl64) * adapter->sglen,
-                               scb->sgl64,
-                               scb->sgl_dma_addr);
-
-                       scb->sgl64 = NULL;
-               }
-
-               if( scb->pthru ) {
-                       pci_free_consistent(adapter->dev, sizeof(mega_passthru),
-                               scb->pthru, scb->pthru_dma_addr);
+               if( scb->pthru ) {
+                       pci_free_consistent(adapter->dev, sizeof(mega_passthru),
+                               scb->pthru, scb->pthru_dma_addr);
 
                        scb->pthru = NULL;
                }
@@ -3850,76 +3188,6 @@ megaraid_biosparam(struct scsi_device *sdev, struct block_device *bdev,
 }
 
 /**
- * megaraid_reboot_notify()
- * @this - unused
- * @code - shutdown code
- * @unused - unused
- *
- * This routine will be called when the use has done a forced shutdown on the
- * system. Flush the Adapter and disks cache.
- */
-static int
-megaraid_reboot_notify (struct notifier_block *this, unsigned long code,
-               void *unused)
-{
-       adapter_t *adapter;
-       struct Scsi_Host *host;
-       u8 raw_mbox[sizeof(struct mbox_out)];
-       mbox_t *mbox;
-       int i,j;
-
-       /*
-        * Flush the controller's cache irrespective of the codes coming down.
-        * SYS_DOWN, SYS_HALT, SYS_RESTART, SYS_POWER_OFF
-        */
-       for( i = 0; i < hba_count; i++ ) {
-               printk(KERN_INFO "megaraid: flushing adapter %d..", i);
-               host = hba_soft_state[i]->host;
-
-               adapter = (adapter_t *)host->hostdata;
-               mbox = (mbox_t *)raw_mbox;
-
-               /* Flush adapter cache */
-               memset(&mbox->m_out, 0, sizeof(raw_mbox));
-               raw_mbox[0] = FLUSH_ADAPTER;
-
-               irq_disable(adapter);
-               free_irq(adapter->host->irq, adapter);
-
-               /*
-                * Issue a blocking (interrupts disabled) command to
-                * the card
-                */
-               issue_scb_block(adapter, raw_mbox);
-
-               /* Flush disks cache */
-               memset(&mbox->m_out, 0, sizeof(raw_mbox));
-               raw_mbox[0] = FLUSH_SYSTEM;
-
-               issue_scb_block(adapter, raw_mbox);
-
-               printk("Done.\n");
-
-               if( atomic_read(&adapter->pend_cmds) > 0 ) {
-                       printk(KERN_WARNING "megaraid: pending commands!!\n");
-               }
-       }
-
-       /*
-        * Have a delibrate delay to make sure all the caches are
-        * actually flushed.
-        */
-       printk("megaraid: cache flush delay: ");
-       for( j = 10; j >= 0; j-- ) {
-               printk("[%d] ", j);
-               mdelay(1000);
-       }
-       printk("\n");
-
-       return NOTIFY_DONE;
-}
-
-/**
  * mega_init_scb()
  * @adapter - pointer to our soft state
  *
@@ -5345,24 +4613,553 @@ free_local_pdev(struct pci_dev *pdev)
        kfree(pdev);
 }
 
-static Scsi_Host_Template driver_template = {
-       .name =                         "MegaRAID",
-       .detect =                       megaraid_detect,
-       .release =                      megaraid_release,
-       .info =                         megaraid_info,
-       .queuecommand =                 megaraid_queue, 
-       .bios_param =                   megaraid_biosparam,
-       .max_sectors =                  MAX_SECTORS_PER_IO,
-       .can_queue =                    MAX_COMMANDS,
-       .this_id =                      DEFAULT_INITIATOR_ID,
-       .sg_tablesize =                 MAX_SGLIST,
-       .cmd_per_lun =                  DEF_CMD_PER_LUN,
-       .use_clustering =               ENABLE_CLUSTERING,
-       .eh_abort_handler =             megaraid_abort,
-       .eh_device_reset_handler =      megaraid_reset,
-       .eh_bus_reset_handler =         megaraid_reset,
-       .eh_host_reset_handler =        megaraid_reset,
+static struct scsi_host_template megaraid_template = {
+       .name                           = "MegaRAID",
+       .proc_name                      = "megaraid",
+       .info                           = megaraid_info,
+       .queuecommand                   = megaraid_queue,       
+       .bios_param                     = megaraid_biosparam,
+       .max_sectors                    = MAX_SECTORS_PER_IO,
+       .can_queue                      = MAX_COMMANDS,
+       .this_id                        = DEFAULT_INITIATOR_ID,
+       .sg_tablesize                   = MAX_SGLIST,
+       .cmd_per_lun                    = DEF_CMD_PER_LUN,
+       .use_clustering                 = ENABLE_CLUSTERING,
+       .eh_abort_handler               = megaraid_abort,
+       .eh_device_reset_handler        = megaraid_reset,
+       .eh_bus_reset_handler           = megaraid_reset,
+       .eh_host_reset_handler          = megaraid_reset,
+};
+
+static int __devinit
+megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
+{
+       struct Scsi_Host *host;
+       adapter_t *adapter;
+       unsigned long mega_baseport, tbase, flag = 0;
+       u16 subsysid, subsysvid;
+       u8 pci_bus, pci_dev_func;
+       int irq, i, j;
+       int error = -ENODEV;
+
+       if (pci_enable_device(pdev))
+               goto out;
+
+       pci_bus = pdev->bus->number;
+       pci_dev_func = pdev->devfn;
+
+       /*
+        * For these vendor and device ids, signature offsets are not
+        * valid and 64 bit is implicit
+        */
+       if (id->driver_data & BOARD_64BIT)
+               flag |= BOARD_64BIT;
+       else {
+               u32 magic64;
+
+               pci_read_config_dword(pdev, PCI_CONF_AMISIG64, &magic64);
+               if (magic64 == HBA_SIGNATURE_64BIT)
+                       flag |= BOARD_64BIT;
+       }
+
+       subsysvid = pdev->subsystem_vendor;
+       subsysid = pdev->subsystem_device;
+
+       printk(KERN_NOTICE "megaraid: found 0x%4.04x:0x%4.04x:bus %d:",
+               id->vendor, id->device, pci_bus);
+
+       printk("slot %d:func %d\n",
+               PCI_SLOT(pci_dev_func), PCI_FUNC(pci_dev_func));
+
+       /* Read the base port and IRQ from PCI */
+       mega_baseport = pci_resource_start(pdev, 0);
+       irq = pdev->irq;
+
+       tbase = mega_baseport;
+       if (pci_resource_flags(pdev, 0) & IORESOURCE_MEM) {
+               flag |= BOARD_MEMMAP;
+
+               if (!request_mem_region(mega_baseport, 128, "megaraid")) {
+                       printk(KERN_WARNING "megaraid: mem region busy!\n");
+                       goto out_disable_device;
+               }
+
+               mega_baseport = (unsigned long)ioremap(mega_baseport, 128);
+               if (!mega_baseport) {
+                       printk(KERN_WARNING
+                              "megaraid: could not map hba memory\n");
+                       goto out_release_region;
+               }
+       } else {
+               flag |= BOARD_IOMAP;
+               mega_baseport += 0x10;
+
+               if (!request_region(mega_baseport, 16, "megaraid"))
+                       goto out_disable_device;
+       }
+
+       /* Initialize SCSI Host structure */
+       host = scsi_host_alloc(&megaraid_template, sizeof(adapter_t));
+       if (!host)
+               goto out_iounmap;
+
+       adapter = (adapter_t *)host->hostdata;
+       memset(adapter, 0, sizeof(adapter_t));
+
+       printk(KERN_NOTICE
+               "scsi%d:Found MegaRAID controller at 0x%lx, IRQ:%d\n",
+               host->host_no, mega_baseport, irq);
+
+       adapter->base = mega_baseport;
+
+       INIT_LIST_HEAD(&adapter->free_list);
+       INIT_LIST_HEAD(&adapter->pending_list);
+       INIT_LIST_HEAD(&adapter->completed_list);
+
+       adapter->flag = flag;
+       spin_lock_init(&adapter->lock);
+       scsi_assign_lock(host, &adapter->lock);
+
+       host->cmd_per_lun = max_cmd_per_lun;
+       host->max_sectors = max_sectors_per_io;
+
+       adapter->dev = pdev;
+       adapter->host = host;
+
+       adapter->host->irq = irq;
+
+       if (flag & BOARD_MEMMAP)
+               adapter->host->base = tbase;
+       else {
+               adapter->host->io_port = tbase;
+               adapter->host->n_io_port = 16;
+       }
+
+       adapter->host->unique_id = (pci_bus << 8) | pci_dev_func;
+
+       /*
+        * Allocate buffer to issue internal commands.
+        */
+       adapter->mega_buffer = pci_alloc_consistent(adapter->dev,
+               MEGA_BUFFER_SIZE, &adapter->buf_dma_handle);
+       if (!adapter->mega_buffer) {
+               printk(KERN_WARNING "megaraid: out of RAM.\n");
+               goto out_host_put;
+       }
+
+       adapter->scb_list = kmalloc(sizeof(scb_t) * MAX_COMMANDS, GFP_KERNEL);
+       if (!adapter->scb_list) {
+               printk(KERN_WARNING "megaraid: out of RAM.\n");
+               goto out_free_cmd_buffer;
+       }
+
+       if (request_irq(irq, (adapter->flag & BOARD_MEMMAP) ?
+                               megaraid_isr_memmapped : megaraid_isr_iomapped,
+                                       SA_SHIRQ, "megaraid", adapter)) {
+               printk(KERN_WARNING
+                       "megaraid: Couldn't register IRQ %d!\n", irq);
+               goto out_free_scb_list;
+       }
+
+       if (mega_setup_mailbox(adapter))
+               goto out_free_irq;
+
+       if (mega_query_adapter(adapter))
+               goto out_free_mbox;
+
+       /*
+        * Have checks for some buggy f/w
+        */
+       if ((subsysid == 0x1111) && (subsysvid == 0x1111)) {
+               /*
+                * Which firmware
+                */
+               if (!strcmp(adapter->fw_version, "3.00") ||
+                               !strcmp(adapter->fw_version, "3.01")) {
+
+                       printk( KERN_WARNING
+                               "megaraid: Your  card is a Dell PERC "
+                               "2/SC RAID controller with  "
+                               "firmware\nmegaraid: 3.00 or 3.01.  "
+                               "This driver is known to have "
+                               "corruption issues\nmegaraid: with "
+                               "those firmware versions on this "
+                               "specific card.  In order\nmegaraid: "
+                               "to protect your data, please upgrade "
+                               "your firmware to version\nmegaraid: "
+                               "3.10 or later, available from the "
+                               "Dell Technical Support web\n"
+                               "megaraid: site at\nhttp://support."
+                               "dell.com/us/en/filelib/download/"
+                               "index.asp?fileid=2940\n"
+                       );
+               }
+       }
+
+       /*
+        * If we have a HP 1M(0x60E7)/2M(0x60E8) controller with
+        * firmware H.01.07, H.01.08, and H.01.09 disable 64 bit
+        * support, since this firmware cannot handle 64 bit
+        * addressing
+        */
+       if ((subsysvid == HP_SUBSYS_VID) &&
+           ((subsysid == 0x60E7) || (subsysid == 0x60E8))) {
+               /*
+                * which firmware
+                */
+               if (!strcmp(adapter->fw_version, "H01.07") ||
+                   !strcmp(adapter->fw_version, "H01.08") ||
+                   !strcmp(adapter->fw_version, "H01.09") ) {
+                       printk(KERN_WARNING
+                               "megaraid: Firmware H.01.07, "
+                               "H.01.08, and H.01.09 on 1M/2M "
+                               "controllers\n"
+                               "megaraid: do not support 64 bit "
+                               "addressing.\nmegaraid: DISABLING "
+                               "64 bit support.\n");
+                       adapter->flag &= ~BOARD_64BIT;
+               }
+       }
+
+       if (mega_is_bios_enabled(adapter))
+               mega_hbas[hba_count].is_bios_enabled = 1;
+       mega_hbas[hba_count].hostdata_addr = adapter;
+
+       /*
+        * Find out which channel is raid and which is scsi. This is
+        * for ROMB support.
+        */
+       mega_enum_raid_scsi(adapter);
+
+       /*
+        * Find out if a logical drive is set as the boot drive. If
+        * there is one, will make that as the first logical drive.
+        * ROMB: Do we have to boot from a physical drive. Then all
+        * the physical drives would appear before the logical disks.
+        * Else, all the physical drives would be exported to the mid
+        * layer after logical drives.
+        */
+       mega_get_boot_drv(adapter);
+
+       if (adapter->boot_pdrv_enabled) {
+               j = adapter->product_info.nchannels;
+               for( i = 0; i < j; i++ )
+                       adapter->logdrv_chan[i] = 0;
+               for( i = j; i < NVIRT_CHAN + j; i++ )
+                       adapter->logdrv_chan[i] = 1;
+       } else {
+               for (i = 0; i < NVIRT_CHAN; i++)
+                       adapter->logdrv_chan[i] = 1;
+               for (i = NVIRT_CHAN; i < MAX_CHANNELS+NVIRT_CHAN; i++)
+                       adapter->logdrv_chan[i] = 0;
+               adapter->mega_ch_class <<= NVIRT_CHAN;
+       }
+
+       /*
+        * Do we support random deletion and addition of logical
+        * drives
+        */
+       adapter->read_ldidmap = 0;      /* set it after first logdrv
+                                                  delete cmd */
+       adapter->support_random_del = mega_support_random_del(adapter);
+
+       /* Initialize SCBs */
+       if (mega_init_scb(adapter))
+               goto out_free_mbox;
+
+       /*
+        * Reset the pending commands counter
+        */
+       atomic_set(&adapter->pend_cmds, 0);
+
+       /*
+        * Reset the adapter quiescent flag
+        */
+       atomic_set(&adapter->quiescent, 0);
+
+       hba_soft_state[hba_count] = adapter;
+
+       /*
+        * Fill in the structure which needs to be passed back to the
+        * application when it does an ioctl() for controller related
+        * information.
+        */
+       i = hba_count;
+
+       mcontroller[i].base = mega_baseport;
+       mcontroller[i].irq = irq;
+       mcontroller[i].numldrv = adapter->numldrv;
+       mcontroller[i].pcibus = pci_bus;
+       mcontroller[i].pcidev = id->device;
+       mcontroller[i].pcifun = PCI_FUNC (pci_dev_func);
+       mcontroller[i].pciid = -1;
+       mcontroller[i].pcivendor = id->vendor;
+       mcontroller[i].pcislot = PCI_SLOT(pci_dev_func);
+       mcontroller[i].uid = (pci_bus << 8) | pci_dev_func;
+
+
+       /* Set the Mode of addressing to 64 bit if we can */
+       if ((adapter->flag & BOARD_64BIT) && (sizeof(dma_addr_t) == 8)) {
+               pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
+               adapter->has_64bit_addr = 1;
+       } else  {
+               pci_set_dma_mask(pdev, 0xffffffff);
+               adapter->has_64bit_addr = 0;
+       }
+               
+       init_MUTEX(&adapter->int_mtx);
+       init_waitqueue_head(&adapter->int_waitq);
+
+       adapter->this_id = DEFAULT_INITIATOR_ID;
+       adapter->host->this_id = DEFAULT_INITIATOR_ID;
+
+#if MEGA_HAVE_CLUSTERING
+       /*
+        * Is cluster support enabled on this controller
+        * Note: In a cluster the HBAs ( the initiators ) will have
+        * different target IDs and we cannot assume it to be 7. Call
+        * to mega_support_cluster() will get the target ids also if
+        * the cluster support is available
+        */
+       adapter->has_cluster = mega_support_cluster(adapter);
+       if (adapter->has_cluster) {
+               printk(KERN_NOTICE
+                       "megaraid: Cluster driver, initiator id:%d\n",
+                       adapter->this_id);
+       }
+#endif
+
+       pci_set_drvdata(pdev, host);
+
+       mega_create_proc_entry(hba_count, mega_proc_dir_entry);
+
+       error = scsi_add_host(host, &pdev->dev);
+       if (error)
+               goto out_free_mbox;
+
+       scsi_scan_host(host);
+       hba_count++;
+       return 0;
+
+ out_free_mbox:
+       pci_free_consistent(adapter->dev, sizeof(mbox64_t),
+                       adapter->una_mbox64, adapter->una_mbox64_dma);
+ out_free_irq:
+       free_irq(adapter->host->irq, adapter);
+ out_free_scb_list:
+       kfree(adapter->scb_list);
+ out_free_cmd_buffer:
+       pci_free_consistent(adapter->dev, MEGA_BUFFER_SIZE,
+                       adapter->mega_buffer, adapter->buf_dma_handle);
+ out_host_put:
+       scsi_host_put(host);
+ out_iounmap:
+       if (flag & BOARD_MEMMAP)
+               iounmap((void *)mega_baseport);
+ out_release_region:
+       if (flag & BOARD_MEMMAP)
+               release_mem_region(tbase, 128);
+       else
+               release_region(mega_baseport, 16);
+ out_disable_device:
+       pci_disable_device(pdev);
+ out:
+       return error;
+}
+
+static void
+__megaraid_shutdown(adapter_t *adapter)
+{
+       u_char  raw_mbox[sizeof(struct mbox_out)];
+       mbox_t  *mbox = (mbox_t *)raw_mbox;
+       int     i;
+
+       /* Flush adapter cache */
+       memset(&mbox->m_out, 0, sizeof(raw_mbox));
+       raw_mbox[0] = FLUSH_ADAPTER;
+
+       free_irq(adapter->host->irq, adapter);
+
+       /* Issue a blocking (interrupts disabled) command to the card */
+       issue_scb_block(adapter, raw_mbox);
+
+       /* Flush disks cache */
+       memset(&mbox->m_out, 0, sizeof(raw_mbox));
+       raw_mbox[0] = FLUSH_SYSTEM;
+
+       /* Issue a blocking (interrupts disabled) command to the card */
+       issue_scb_block(adapter, raw_mbox);
+       
+       if (atomic_read(&adapter->pend_cmds) > 0)
+               printk(KERN_WARNING "megaraid: pending commands!!\n");
+
+       /*
+        * Have a delibrate delay to make sure all the caches are
+        * actually flushed.
+        */
+       for (i = 0; i <= 10; i++)
+               mdelay(1000);
+}
+
+static void
+megaraid_remove_one(struct pci_dev *pdev)
+{
+       struct Scsi_Host *host = pci_get_drvdata(pdev);
+       adapter_t *adapter = (adapter_t *)host->hostdata;
+       char    buf[12] = { 0 };
+
+       scsi_remove_host(host);
+
+       __megaraid_shutdown(adapter);
+
+       /* Free our resources */
+       if (adapter->flag & BOARD_MEMMAP) {
+               iounmap((void *)adapter->base);
+               release_mem_region(adapter->host->base, 128);
+       } else
+               release_region(adapter->base, 16);
+
+       mega_free_sgl(adapter);
+
+#ifdef CONFIG_PROC_FS
+       if (adapter->controller_proc_dir_entry) {
+               remove_proc_entry("stat", adapter->controller_proc_dir_entry);
+               remove_proc_entry("config",
+                               adapter->controller_proc_dir_entry);
+               remove_proc_entry("mailbox",
+                               adapter->controller_proc_dir_entry);
+#if MEGA_HAVE_ENH_PROC
+               remove_proc_entry("rebuild-rate",
+                               adapter->controller_proc_dir_entry);
+               remove_proc_entry("battery-status",
+                               adapter->controller_proc_dir_entry);
+
+               remove_proc_entry("diskdrives-ch0",
+                               adapter->controller_proc_dir_entry);
+               remove_proc_entry("diskdrives-ch1",
+                               adapter->controller_proc_dir_entry);
+               remove_proc_entry("diskdrives-ch2",
+                               adapter->controller_proc_dir_entry);
+               remove_proc_entry("diskdrives-ch3",
+                               adapter->controller_proc_dir_entry);
+
+               remove_proc_entry("raiddrives-0-9",
+                               adapter->controller_proc_dir_entry);
+               remove_proc_entry("raiddrives-10-19",
+                               adapter->controller_proc_dir_entry);
+               remove_proc_entry("raiddrives-20-29",
+                               adapter->controller_proc_dir_entry);
+               remove_proc_entry("raiddrives-30-39",
+                               adapter->controller_proc_dir_entry);
+#endif
+               sprintf(buf, "hba%d", adapter->host->host_no);
+               remove_proc_entry(buf, mega_proc_dir_entry);
+       }
+#endif
+
+       pci_free_consistent(adapter->dev, MEGA_BUFFER_SIZE,
+                       adapter->mega_buffer, adapter->buf_dma_handle);
+       kfree(adapter->scb_list);
+       pci_free_consistent(adapter->dev, sizeof(mbox64_t),
+                       adapter->una_mbox64, adapter->una_mbox64_dma);
+
+       scsi_host_put(host);
+       pci_disable_device(pdev);
+
+       hba_count--;
+}
+
+static void
+megaraid_shutdown(struct device *dev)
+{
+       struct Scsi_Host *host = pci_get_drvdata(to_pci_dev(dev));
+       adapter_t *adapter = (adapter_t *)host->hostdata;
+
+       __megaraid_shutdown(adapter);
+}
+
+static struct pci_device_id megaraid_pci_tbl[] = {
+       {PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DISCOVERY,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_PERC4_DI,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT},
+       {PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_PERC4_QC_VERDE,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0, BOARD_64BIT},
+       {PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID2,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_AMI_MEGARAID3,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_AMI_MEGARAID,
+               PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0},
+       {0,}
+};
+MODULE_DEVICE_TABLE(pci, megaraid_pci_tbl);
+
+static struct pci_driver megaraid_pci_driver = {
+       .name           = "megaraid",
+       .id_table       = megaraid_pci_tbl,
+       .probe          = megaraid_probe_one,
+       .remove         = __devexit_p(megaraid_remove_one),
+       .driver         = {
+               .shutdown = megaraid_shutdown,
+       },
 };
-#include "scsi_module.c"
+
+static int __init megaraid_init(void)
+{
+       int error;
+
+       if ((max_cmd_per_lun <= 0) || (max_cmd_per_lun > MAX_CMD_PER_LUN))
+               max_cmd_per_lun = MAX_CMD_PER_LUN;
+       if (max_mbox_busy_wait > MBOX_BUSY_WAIT)
+               max_mbox_busy_wait = MBOX_BUSY_WAIT;
+
+       error = pci_module_init(&megaraid_pci_driver);
+       if (error) 
+               return error;
+       
+#ifdef CONFIG_PROC_FS
+       mega_proc_dir_entry = proc_mkdir("megaraid", &proc_root);
+       if (!mega_proc_dir_entry) {
+               printk(KERN_WARNING
+                               "megaraid: failed to create megaraid root\n");
+       }
+#endif
+
+       /*
+        * Register the driver as a character device, for applications
+        * to access it for ioctls.
+        * First argument (major) to register_chrdev implies a dynamic
+        * major number allocation.
+        */
+       major = register_chrdev(0, "megadev", &megadev_fops);
+       if (!major) {
+               printk(KERN_WARNING
+                               "megaraid: failed to register char device\n");
+       }
+
+       return 0;
+}
+
+static void __exit megaraid_exit(void)
+{
+       /*
+        * Unregister the character device interface to the driver.
+        */
+       unregister_chrdev(major, "megadev");
+
+#ifdef CONFIG_PROC_FS
+       remove_proc_entry("megaraid", &proc_root);
+#endif
+
+       pci_unregister_driver(&megaraid_pci_driver);
+}
+
+module_init(megaraid_init);
+module_exit(megaraid_exit);
 
 /* vi: set ts=8 sw=8 tw=78: */
index 3c1b6f7..268e9a7 100644 (file)
@@ -989,8 +989,6 @@ typedef enum { LOCK_INT, LOCK_EXT } lockscope_t;
 
 const char *megaraid_info (struct Scsi_Host *);
 
-static int megaraid_detect(Scsi_Host_Template *);
-static void mega_find_card(Scsi_Host_Template *, u16, u16);
 static int mega_query_adapter(adapter_t *);
 static inline int issue_scb(adapter_t *, scb_t *);
 static int mega_setup_mailbox(adapter_t *);
@@ -1007,7 +1005,6 @@ static irqreturn_t megaraid_isr_iomapped(int, void *, struct pt_regs *);
 
 static void mega_free_scb(adapter_t *, scb_t *);
 
-static int megaraid_release (struct Scsi_Host *);
 static int megaraid_abort(Scsi_Cmnd *);
 static int megaraid_reset(Scsi_Cmnd *);
 static int megaraid_abort_and_reset(adapter_t *, Scsi_Cmnd *, int);
@@ -1025,8 +1022,6 @@ static inline void mega_free_sgl (adapter_t *adapter);
 static void mega_8_to_40ld (mraid_inquiry *inquiry,
                mega_inquiry3 *enquiry3, mega_product_info *);
 
-static int megaraid_reboot_notify (struct notifier_block *,
-                                  unsigned long, void *);
 static int megadev_open (struct inode *, struct file *);
 static int megadev_ioctl (struct inode *, struct file *, unsigned int,
                unsigned long);
index 6f31649..3c793cb 100644 (file)
   Copyright 1992 - 2002 Kai Makisara / Willem Riede
         email Kai.Makisara@metla.fi / osst@riede.org
 
-  $Header: /home/cvsroot/Driver/osst.c,v 1.68 2002/12/23 16:33:36 riede Exp $
+  $Header: /cvsroot/osst/Driver/osst.c,v 1.70 2003/12/23 14:22:12 wriede Exp $
 
   Microscopic alterations - Rik Ling, 2000/12/21
   Last st.c sync: Tue Oct 15 22:01:04 2002 by makisara
   Some small formal changes - aeb, 950809
 */
 
-static const char * cvsid = "$Id: osst.c,v 1.68 2002/12/23 16:33:36 riede Exp $";
-const char * osst_version = "0.99.0";
+static const char * cvsid = "$Id: osst.c,v 1.70 2003/12/23 14:22:12 wriede Exp $";
+const char * osst_version = "0.99.1";
 
 /* The "failure to reconnect" firmware bug */
 #define OSST_FW_NEED_POLL_MIN 10601 /*(107A)*/
@@ -846,9 +846,6 @@ static int osst_read_frame(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, int timeo
        /* TODO: Error handling */
        if (STp->poll)
                retval = osst_wait_frame (STp, aSRpnt, STp->first_frame_position, 0, timeout);
-#if 0// DEBUG
-       printk ("osst_read: wait for frame returned %i\n", retval);
-#endif
        
        memset(cmd, 0, MAX_COMMAND_SIZE);
        cmd[0] = READ_6;
@@ -1279,14 +1276,14 @@ static int osst_read_back_buffer_and_rewrite(OS_Scsi_Tape * STp, Scsi_Request **
        Scsi_Request  * SRpnt = * aSRpnt;
        unsigned char * buffer, * p;
        unsigned char   cmd[MAX_COMMAND_SIZE];
-       int             flag, new_frame, i;
-       int             nframes          = STp->cur_frames;
-       int             blks_per_frame   = ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt);
-       int             frame_seq_number = ntohl(STp->buffer->aux->frame_seq_num)
+       int             flag, new_frame, i;
+       int             nframes          = STp->cur_frames;
+       int             blks_per_frame   = ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt);
+       int             frame_seq_number = ntohl(STp->buffer->aux->frame_seq_num)
                                                - (nframes + pending - 1);
-       int             logical_blk_num  = ntohl(STp->buffer->aux->logical_blk_num) 
+       int             logical_blk_num  = ntohl(STp->buffer->aux->logical_blk_num) 
                                                - (nframes + pending - 1) * blks_per_frame;
-       char          * name             = tape_name(STp);
+       char          * name             = tape_name(STp);
        unsigned long   startwait        = jiffies;
 #if DEBUG
        int             dbg              = debugging;
@@ -1472,7 +1469,7 @@ static int osst_reposition_and_retry(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt,
 {
        unsigned char   cmd[MAX_COMMAND_SIZE];
        Scsi_Request  * SRpnt;
-       char          * name      = tape_name(STp);
+       char          * name      = tape_name(STp);
        int             expected  = 0;
        int             attempts  = 1000 / skip;
        int             flag      = 1;
@@ -2189,6 +2186,7 @@ static int __osst_analyze_headers(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, in
        if (ppos == 5 || ppos == 0xbae || STp->buffer->syscall_result) {
                if (osst_set_frame_position(STp, aSRpnt, ppos, 0))
                        printk(KERN_WARNING "%s:W: Couldn't position tape\n", name);
+               osst_wait_ready(STp, aSRpnt, 60 * 15, 0);
                if (osst_initiate_read (STp, aSRpnt)) {
                        printk(KERN_WARNING "%s:W: Couldn't initiate read\n", name);
                        return 0;
@@ -2817,7 +2815,29 @@ static int osst_set_frame_position(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt, in
        return result;
 }
 
+static int osst_write_trailer(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt, int leave_at_EOT)
+{
+       ST_partstat * STps = &(STp->ps[STp->partition]);
+       int result = 0;
+
+       if (STp->write_type != OS_WRITE_NEW_MARK) {
+               /* true unless the user wrote the filemark for us */
+               result = osst_flush_drive_buffer(STp, aSRpnt);
+               if (result < 0) goto out;
+               result = osst_write_filemark(STp, aSRpnt);
+               if (result < 0) goto out;
 
+               if (STps->drv_file >= 0)
+                       STps->drv_file++ ;
+               STps->drv_block = 0;
+       }
+       result = osst_write_eod(STp, aSRpnt);
+       osst_write_header(STp, aSRpnt, leave_at_EOT);
+
+       STps->eof = ST_FM;
+out:
+       return result;
+}
 \f
 /* osst versions of st functions - augmented and stripped to suit OnStream only */
 
@@ -2935,7 +2955,7 @@ static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Request ** aSRpnt)
                                        result = (-EIO);
                                }
                        }
-                       STps->drv_block = (-1);
+                       STps->drv_block = (-1);         /* FIXME - even if write recovery succeeds? */
                }
                else {
                        STp->first_frame_position++;
@@ -3628,7 +3648,7 @@ static ssize_t osst_read(struct file * filp, char * buf, size_t count, loff_t *p
        /* Change the eof state if no data from tape or buffer */
        if (total == 0) {
                if (STps->eof == ST_FM_HIT) {
-                       STps->eof = (STp->first_frame_position >= STp->eod_frame_ppos)?ST_EOD:ST_FM;
+                       STps->eof = (STp->first_frame_position >= STp->eod_frame_ppos)?ST_EOD_2:ST_FM;
                        STps->drv_block = 0;
                        if (STps->drv_file >= 0)
                                STps->drv_file++;
@@ -4037,8 +4057,8 @@ static int osst_int_ioctl(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, unsigned i
                if (debugging)
                   printk(OSST_DEB_MSG "%s:D: Spacing to end of recorded medium.\n", name);
 #endif
-               osst_set_frame_position(STp, &SRpnt, STp->eod_frame_ppos, 0);
-       if (osst_get_logical_frame(STp, &SRpnt, -1, 0) < 0) {
+               if ((osst_position_tape_and_confirm(STp, &SRpnt, STp->eod_frame_ppos) < 0) ||
+                           (osst_get_logical_frame(STp, &SRpnt, -1, 0)               < 0)) {
                   ioctl_result = -EIO;
                   goto os_bypass;
                }
@@ -4076,6 +4096,23 @@ static int osst_int_ioctl(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, unsigned i
                break;
 
         case MTSETBLK:           /* Set block length */
+                if ((STps->drv_block == 0 )                      &&
+                    !STp->dirty                                  &&
+                    ((STp->buffer)->buffer_bytes == 0)           &&
+                    ((arg & MT_ST_BLKSIZE_MASK) >= 512 )         && 
+                    ((arg & MT_ST_BLKSIZE_MASK) <= OS_DATA_SIZE) &&
+                    !(OS_DATA_SIZE % (arg & MT_ST_BLKSIZE_MASK))  ) {
+                        /*
+                         * Only allowed to change the block size if you opened the
+                         * device at the beginning of a file before writing anything.
+                         * Note, that when reading, changing block_size is futile,
+                         * as the size used when writing overrides it.
+                         */
+                        STp->block_size = (arg & MT_ST_BLKSIZE_MASK);
+                        printk(KERN_INFO "%s:I: Block size set to %d bytes.\n",
+                                          name, STp->block_size);
+                        return 0;
+                }
         case MTSETDENSITY:       /* Set tape density */
         case MTSETDRVBUFFER:     /* Set drive buffering */
         case SET_DENS_AND_BLK:   /* Set density and block size */
@@ -4083,11 +4120,11 @@ static int osst_int_ioctl(OS_Scsi_Tape * STp, Scsi_Request ** aSRpnt, unsigned i
                 if (STp->dirty || (STp->buffer)->buffer_bytes != 0)
                         return (-EIO);       /* Not allowed if data in buffer */
                 if ((cmd_in == MTSETBLK || cmd_in == SET_DENS_AND_BLK) &&
-                  (arg & MT_ST_BLKSIZE_MASK) != 0 &&
-                  ((arg & MT_ST_BLKSIZE_MASK) < STp->min_block ||
-                   (arg & MT_ST_BLKSIZE_MASK) > STp->max_block ||
-                   (arg & MT_ST_BLKSIZE_MASK) > osst_buffer_size)) {
-                        printk(KERN_WARNING "%s:W: Illegal block size.\n", name);
+                    (arg & MT_ST_BLKSIZE_MASK) != 0                    &&
+                    (arg & MT_ST_BLKSIZE_MASK) != STp->block_size       ) {
+                        printk(KERN_WARNING "%s:W: Illegal to set block size to %d%s.\n",
+                                               name, (int)(arg & MT_ST_BLKSIZE_MASK),
+                                               (OS_DATA_SIZE % (arg & MT_ST_BLKSIZE_MASK))?"":" now");
                         return (-EINVAL);
                 }
                 return 0;  /* FIXME silently ignore if block size didn't change */
@@ -4592,22 +4629,7 @@ static int os_scsi_tape_flush(struct file * filp)
                                               name, STp->nbr_waits, STp->nbr_finished);
                }
 #endif
-               if (STp->write_type != OS_WRITE_NEW_MARK) {
-                       /* true unless the user wrote the filemark for us */
-                       result = osst_flush_drive_buffer(STp, &SRpnt);
-                       if (result < 0) goto out;
-                       result = osst_write_filemark(STp, &SRpnt);
-                       if (result < 0) goto out;
-
-                       if (STps->drv_file >= 0)
-                               STps->drv_file++ ;
-                       STps->drv_block = 0;
-               }
-               result = osst_write_eod(STp, &SRpnt);
-               osst_write_header(STp, &SRpnt, !(STp->rew_at_close));
-
-               STps->eof = ST_FM;
-
+               result = osst_write_trailer(STp, &SRpnt, !(STp->rew_at_close));
 #if DEBUG
                if (debugging)
                        printk(OSST_DEB_MSG "%s:D: Buffer flushed, %d EOF(s) written\n",
@@ -4618,7 +4640,7 @@ static int os_scsi_tape_flush(struct file * filp)
                STps = &(STp->ps[STp->partition]);
                if (!STm->sysv || STps->rw != ST_READING) {
                        if (STp->can_bsr)
-               result = osst_flush_buffer(STp, &SRpnt, 0);     /* this is the default path */
+                               result = osst_flush_buffer(STp, &SRpnt, 0); /* this is the default path */
                        else if (STps->eof == ST_FM_HIT) {
                                result = cross_eof(STp, &SRpnt, FALSE);
                                        if (result) {
@@ -4633,7 +4655,7 @@ static int os_scsi_tape_flush(struct file * filp)
                }
                else if ((STps->eof == ST_NOEOF &&
                          !(result = cross_eof(STp, &SRpnt, TRUE))) ||
-                         STps->eof == ST_FM_HIT) {
+                        STps->eof == ST_FM_HIT) {
                        if (STps->drv_file >= 0)
                                STps->drv_file++;
                        STps->drv_block = 0;
@@ -4736,6 +4758,7 @@ static int osst_ioctl(struct inode * inode,struct file * file,
 #endif
        if (cmd_type == _IOC_TYPE(MTIOCTOP) && cmd_nr == _IOC_NR(MTIOCTOP)) {
                struct mtop mtc;
+               int    auto_weof = 0;
 
                if (_IOC_SIZE(cmd_in) != sizeof(mtc)) {
                        retval = (-EINVAL);
@@ -4812,10 +4835,41 @@ static int osst_ioctl(struct inode * inode,struct file * file,
                        STp->device->was_reset = 0;
                }
 
-               if (mtc.mt_op != MTNOP && mtc.mt_op != MTWEOF && mtc.mt_op != MTWSM &&
-                   mtc.mt_op != MTSETDENSITY && mtc.mt_op != MTSETBLK &&
-                   mtc.mt_op != MTSETDRVBUFFER && mtc.mt_op != MTSETPART)
-                       STps->rw = ST_IDLE;  /* Prevent automatic WEOF and fsf */
+               if (mtc.mt_op != MTCOMPRESSION  && mtc.mt_op != MTLOCK         &&
+                   mtc.mt_op != MTNOP          && mtc.mt_op != MTSETBLK       &&
+                   mtc.mt_op != MTSETDENSITY   && mtc.mt_op != MTSETDRVBUFFER && 
+                   mtc.mt_op != MTMKPART       && mtc.mt_op != MTSETPART      &&
+                   mtc.mt_op != MTWEOF         && mtc.mt_op != MTWSM           ) {
+
+                       /*
+                        * The user tells us to move to another position on the tape.
+                        * If we were appending to the tape content, that would leave
+                        * the tape without proper end, in that case write EOD and
+                        * update the header to reflect its position.
+                        */
+#if DEBUG
+                       printk(KERN_WARNING "%s:D: auto_weod %s at ffp=%d,efp=%d,fsn=%d,lbn=%d,fn=%d,bn=%d\n", name,
+                                       STps->rw >= ST_WRITING ? "write" : STps->rw == ST_READING ? "read" : "idle",
+                                       STp->first_frame_position, STp->eod_frame_ppos, STp->frame_seq_number,
+                                       STp->logical_blk_num, STps->drv_file, STps->drv_block );
+#endif
+                       if (STps->rw >= ST_WRITING && STp->first_frame_position >= STp->eod_frame_ppos) {
+                               auto_weof = ((STp->write_type != OS_WRITE_NEW_MARK) &&
+                                                       !(mtc.mt_op == MTREW || mtc.mt_op == MTOFFL));
+                               i = osst_write_trailer(STp, &SRpnt,
+                                                       !(mtc.mt_op == MTREW || mtc.mt_op == MTOFFL));
+#if DEBUG
+                               printk(KERN_WARNING "%s:D: post trailer xeof=%d,ffp=%d,efp=%d,fsn=%d,lbn=%d,fn=%d,bn=%d\n",
+                                               name, auto_weof, STp->first_frame_position, STp->eod_frame_ppos,
+                                               STp->frame_seq_number, STp->logical_blk_num, STps->drv_file, STps->drv_block );
+#endif
+                               if (i < 0) {
+                                       retval = i;
+                                       goto out;
+                               }
+                       }
+                       STps->rw = ST_IDLE;
+               }
 
                if (mtc.mt_op == MTOFFL && STp->door_locked != ST_UNLOCKED)
                        do_door_lock(STp, 0);  /* Ignore result! */
@@ -4873,11 +4927,15 @@ static int osst_ioctl(struct inode * inode,struct file * file,
                        retval = do_door_lock(STp, (mtc.mt_op == MTLOCK));
                        goto out;
                }
-                       
+
+               if (auto_weof)
+                       cross_eof(STp, &SRpnt, FALSE);
+
                if (mtc.mt_op == MTCOMPRESSION)
-                       retval = -EINVAL /*osst_compression(STp, (mtc.mt_count & 1))*/;
+                       retval = -EINVAL;       /* OnStream drives don't have compression hardware */
                else
-
+                       /* MTBSF MTBSFM MTBSR MTBSS MTEOM MTERASE MTFSF MTFSFB MTFSR MTFSS
+                        * MTLOAD MTOFFL MTRESET MTRETEN MTREW MTUNLOAD MTWEOF MTWSM */
                        retval = osst_int_ioctl(STp, &SRpnt, mtc.mt_op, mtc.mt_count);
                goto out;
        }
@@ -5527,37 +5585,37 @@ out_put_disk:
 
 static int osst_remove(struct device *dev)
 {
-  Scsi_Device * SDp = to_scsi_device(dev);
-  OS_Scsi_Tape * tpnt;
-  int i, mode;
-
-  if ((SDp->type != TYPE_TAPE) || (osst_nr_dev <= 0))
-         return 0;
-
-  write_lock(&os_scsi_tapes_lock);
-  for(i=0; i < osst_max_dev; i++) {
-       if((tpnt = os_scsi_tapes[i]) && (tpnt->device == SDp)) {
-               tpnt->device = NULL;
-               for (mode = 0; mode < ST_NBR_MODES; ++mode) {
-                       devfs_remove("%s/ot%s", SDp->devfs_name, osst_formats[mode]);
-                       devfs_remove("%s/ot%sn", SDp->devfs_name, osst_formats[mode]);
-               }
-               devfs_unregister_tape(tpnt->drive->number);
-               put_disk(tpnt->drive);
-               os_scsi_tapes[i] = NULL;
-               osst_nr_dev--;
-               write_unlock(&os_scsi_tapes_lock);
-               if (tpnt->header_cache != NULL) vfree(tpnt->header_cache);
-               if (tpnt->buffer) {
-                       normalize_buffer(tpnt->buffer);
-                       kfree(tpnt->buffer);
-               }
-               kfree(tpnt);
+       Scsi_Device  * SDp = to_scsi_device(dev);
+       OS_Scsi_Tape * tpnt;
+       int i, mode;
+
+       if ((SDp->type != TYPE_TAPE) || (osst_nr_dev <= 0))
                return 0;
+
+       write_lock(&os_scsi_tapes_lock);
+       for(i=0; i < osst_max_dev; i++) {
+               if((tpnt = os_scsi_tapes[i]) && (tpnt->device == SDp)) {
+                       tpnt->device = NULL;
+                       for (mode = 0; mode < ST_NBR_MODES; ++mode) {
+                               devfs_remove("%s/ot%s", SDp->devfs_name, osst_formats[mode]);
+                               devfs_remove("%s/ot%sn", SDp->devfs_name, osst_formats[mode]);
+                       }
+                       devfs_unregister_tape(tpnt->drive->number);
+                       put_disk(tpnt->drive);
+                       os_scsi_tapes[i] = NULL;
+                       osst_nr_dev--;
+                       write_unlock(&os_scsi_tapes_lock);
+                       if (tpnt->header_cache != NULL) vfree(tpnt->header_cache);
+                       if (tpnt->buffer) {
+                               normalize_buffer(tpnt->buffer);
+                               kfree(tpnt->buffer);
+                       }
+                       kfree(tpnt);
+                       return 0;
+               }
        }
-  }
-  write_unlock(&os_scsi_tapes_lock);
-  return 0;
+       write_unlock(&os_scsi_tapes_lock);
+       return 0;
 }
 
 static int __init init_osst(void) 
index 79c7e3a..7e8e7fb 100644 (file)
@@ -1,12 +1,11 @@
 /*
- *     $Header: /home/cvsroot/Driver/osst.h,v 1.12 2001/10/11 00:30:15 riede Exp $
+ *     $Header: /cvsroot/osst/Driver/osst.h,v 1.14 2003/12/14 14:34:38 wriede Exp $
  */
 
 #include <asm/byteorder.h>
 #include <linux/config.h>
 #include <linux/completion.h>
 
-
 /*     FIXME - rename and use the following two types or delete them!
  *              and the types really should go to st.h anyway...
  *     INQUIRY packet command - Data Format (From Table 6-8 of QIC-157C)
index f829120..ff1e610 100644 (file)
@@ -8,7 +8,7 @@
    Changed (and renamed) for OnStream SCSI drives garloff@suse.de
    2000-06-21
 
-   $Header: /home/cvsroot/Driver/osst_options.h,v 1.5 2001/01/07 22:19:15 riede Exp $
+   $Header: /cvsroot/osst/Driver/osst_options.h,v 1.6 2003/12/23 14:22:12 wriede Exp $
 */
 
 #ifndef _OSST_OPTIONS_H
index 516014a..74c1c09 100644 (file)
@@ -7,7 +7,7 @@ menu "PCMCIA SCSI adapter support"
 
 config PCMCIA_AHA152X
        tristate "Adaptec AHA152X PCMCIA support"
-       depends on m
+       depends on m && !64BIT
        help
          Say Y here if you intend to attach this type of PCMCIA SCSI host
          adapter to your computer.
@@ -27,7 +27,7 @@ config PCMCIA_FDOMAIN
 
 config PCMCIA_NINJA_SCSI
        tristate "NinjaSCSI-3 / NinjaSCSI-32Bi (16bit) PCMCIA support"
-       depends on m
+       depends on m && !64BIT
        help
          If you intend to attach this type of PCMCIA SCSI host adapter to
          your computer, say Y here and read
index 12f33ed..ce2efa5 100644 (file)
 #include <linux/libata.h>
 #include <asm/io.h>
 
-#undef DIRECT_HDMA
-
 #define DRV_NAME       "sata_promise"
-#define DRV_VERSION    "0.86"
+#define DRV_VERSION    "0.89"
 
 
 enum {
@@ -82,6 +80,42 @@ enum {
 
        PDC_FLAG_20621          = (1 << 30), /* we have a 20621 */
        PDC_HDMA_RESET          = (1 << 11), /* HDMA reset */
+
+       PDC_MAX_HDMA            = 32,
+       PDC_HDMA_Q_MASK         = (PDC_MAX_HDMA - 1),
+
+       PDC_DIMM0_SPD_DEV_ADDRESS     = 0x50,
+       PDC_DIMM1_SPD_DEV_ADDRESS     = 0x51,
+       PDC_MAX_DIMM_MODULE           = 0x02,
+       PDC_I2C_CONTROL_OFFSET        = 0x48,
+       PDC_I2C_ADDR_DATA_OFFSET      = 0x4C,
+       PDC_DIMM0_CONTROL_OFFSET      = 0x80,
+       PDC_DIMM1_CONTROL_OFFSET      = 0x84,
+       PDC_SDRAM_CONTROL_OFFSET      = 0x88,
+       PDC_I2C_WRITE                 = 0x00000000,
+       PDC_I2C_READ                  = 0x00000040,     
+       PDC_I2C_START                 = 0x00000080,
+       PDC_I2C_MASK_INT              = 0x00000020,
+       PDC_I2C_COMPLETE              = 0x00010000,
+       PDC_I2C_NO_ACK                = 0x00100000,
+       PDC_DIMM_SPD_SUBADDRESS_START = 0x00,
+       PDC_DIMM_SPD_SUBADDRESS_END   = 0x7F,
+       PDC_DIMM_SPD_ROW_NUM          = 3,
+       PDC_DIMM_SPD_COLUMN_NUM       = 4,
+       PDC_DIMM_SPD_MODULE_ROW       = 5,
+       PDC_DIMM_SPD_TYPE             = 11,
+       PDC_DIMM_SPD_FRESH_RATE       = 12,         
+       PDC_DIMM_SPD_BANK_NUM         = 17,     
+       PDC_DIMM_SPD_CAS_LATENCY      = 18,
+       PDC_DIMM_SPD_ATTRIBUTE        = 21,    
+       PDC_DIMM_SPD_ROW_PRE_CHARGE   = 27,
+       PDC_DIMM_SPD_ROW_ACTIVE_DELAY = 28,      
+       PDC_DIMM_SPD_RAS_CAS_DELAY    = 29,
+       PDC_DIMM_SPD_ACTIVE_PRECHARGE = 30,
+       PDC_DIMM_SPD_SYSTEM_FREQ      = 126,
+       PDC_CTL_STATUS                = 0x08,   
+       PDC_DIMM_WINDOW_CTLR          = 0x0C,
+       PDC_GENERAL_CTLR              = 0x484,
 };
 
 
@@ -91,6 +125,19 @@ struct pdc_port_priv {
        dma_addr_t              pkt_dma;
 };
 
+struct pdc_host_priv {
+       void                    *dimm_mmio;
+
+       unsigned int            doing_hdma;
+       unsigned int            hdma_prod;
+       unsigned int            hdma_cons;
+       struct {
+               struct ata_queued_cmd *qc;
+               unsigned int    seq;
+               unsigned long   pkt_ofs;
+       } hdma[32];
+};
+
 
 static u32 pdc_sata_scr_read (struct ata_port *ap, unsigned int sc_reg);
 static void pdc_sata_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val);
@@ -114,6 +161,18 @@ static void pdc_exec_command_mmio(struct ata_port *ap, struct ata_taskfile *tf);
 static void pdc20621_host_stop(struct ata_host_set *host_set);
 static inline void pdc_dma_complete (struct ata_port *ap,
                                      struct ata_queued_cmd *qc);
+static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe);
+static int pdc20621_detect_dimm(struct ata_probe_ent *pe);
+static unsigned int pdc20621_i2c_read(struct ata_probe_ent *pe, 
+                                     u32 device, u32 subaddr, u32 *pdata);
+static int pdc20621_prog_dimm0(struct ata_probe_ent *pe);
+static unsigned int pdc20621_prog_dimm_global(struct ata_probe_ent *pe);
+#ifdef ATA_VERBOSE_DEBUG
+static void pdc20621_get_from_dimm(struct ata_probe_ent *pe, 
+                                  void *psource, u32 offset, u32 size);
+#endif
+static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, 
+                                void *psource, u32 offset, u32 size);
 
 
 static Scsi_Host_Template pdc_sata_sht = {
@@ -131,6 +190,7 @@ static Scsi_Host_Template pdc_sata_sht = {
        .proc_name              = DRV_NAME,
        .dma_boundary           = ATA_DMA_BOUNDARY,
        .slave_configure        = ata_scsi_slave_config,
+       .bios_param             = ata_std_bios_param,
 };
 
 static struct ata_port_operations pdc_sata_ops = {
@@ -235,10 +295,11 @@ static struct pci_driver pdc_sata_pci_driver = {
 
 static void pdc20621_host_stop(struct ata_host_set *host_set)
 {
-       void *mmio = host_set->private_data;
+       struct pdc_host_priv *hpriv = host_set->private_data;
+       void *dimm_mmio = hpriv->dimm_mmio;
 
-       assert(mmio != NULL);
-       iounmap(mmio);
+       iounmap(dimm_mmio);
+       kfree(hpriv);
 }
 
 static int pdc_port_start(struct ata_port *ap)
@@ -256,6 +317,7 @@ static int pdc_port_start(struct ata_port *ap)
                rc = -ENOMEM;
                goto err_out;
        }
+       memset(pp, 0, sizeof(*pp));
 
        pp->pkt = pci_alloc_consistent(pdev, 128, &pp->pkt_dma);
        if (!pp->pkt) {
@@ -589,7 +651,8 @@ static void pdc20621_fill_sg(struct ata_queued_cmd *qc)
        struct ata_port *ap = qc->ap;
        struct pdc_port_priv *pp = ap->private_data;
        void *mmio = ap->host_set->mmio_base;
-       void *dimm_mmio = ap->host_set->private_data;
+       struct pdc_host_priv *hpriv = ap->host_set->private_data;
+       void *dimm_mmio = hpriv->dimm_mmio;
        unsigned int portno = ap->port_no;
        unsigned int i, last, idx, total_len = 0, sgt_len;
        u32 *buf = (u32 *) &pp->dimm_buf[PDC_DIMM_HEADER_SZ];
@@ -605,8 +668,8 @@ static void pdc20621_fill_sg(struct ata_queued_cmd *qc)
        last = qc->n_elem;
        idx = 0;
        for (i = 0; i < last; i++) {
-               buf[idx++] = cpu_to_le32(sg[i].dma_address);
-               buf[idx++] = cpu_to_le32(sg[i].length);
+               buf[idx++] = cpu_to_le32(sg_dma_address(&sg[i]));
+               buf[idx++] = cpu_to_le32(sg_dma_len(&sg[i]));
                total_len += sg[i].length;
        }
        buf[idx - 1] |= cpu_to_le32(ATA_PRD_EOT);
@@ -643,49 +706,68 @@ static void pdc20621_fill_sg(struct ata_queued_cmd *qc)
        VPRINTK("ata pkt buf ofs %u, prd size %u, mmio copied\n", i, sgt_len);
 }
 
-#ifdef DIRECT_HDMA
-static void pdc20621_push_hdma(struct ata_queued_cmd *qc)
+static void __pdc20621_push_hdma(struct ata_queued_cmd *qc,
+                                unsigned int seq,
+                                u32 pkt_ofs)
 {
        struct ata_port *ap = qc->ap;
        struct ata_host_set *host_set = ap->host_set;
-       unsigned int port_no = ap->port_no;
        void *mmio = host_set->mmio_base;
-       unsigned int rw = (qc->flags & ATA_QCFLAG_WRITE);
-       u32 tmp;
-
-       unsigned int host_sg = PDC_20621_DIMM_BASE +
-                              (PDC_DIMM_WINDOW_STEP * port_no) +
-                              PDC_DIMM_HOST_PRD;
-       unsigned int dimm_sg = PDC_20621_DIMM_BASE +
-                              (PDC_DIMM_WINDOW_STEP * port_no) +
-                              PDC_DIMM_HPKT_PRD;
 
        /* hard-code chip #0 */
        mmio += PDC_CHIP0_OFS;
 
-       tmp = readl(mmio + PDC_HDMA_CTLSTAT) & 0xffffff00;
-       tmp |= port_no + 1 + 4;         /* seq. ID */
-       if (!rw)
-               tmp |= (1 << 6);        /* hdma data direction */
-       writel(tmp, mmio + PDC_HDMA_CTLSTAT); /* note: stops DMA, if active */
-       readl(mmio + PDC_HDMA_CTLSTAT); /* flush */
+       writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4));
+       readl(mmio + PDC_20621_SEQCTL + (seq * 4));     /* flush */
+
+       writel(pkt_ofs, mmio + PDC_HDMA_PKT_SUBMIT);
+       readl(mmio + PDC_HDMA_PKT_SUBMIT);      /* flush */
+}
+
+static void pdc20621_push_hdma(struct ata_queued_cmd *qc,
+                               unsigned int seq,
+                               u32 pkt_ofs)
+{
+       struct ata_port *ap = qc->ap;
+       struct pdc_host_priv *pp = ap->host_set->private_data;
+       unsigned int idx = pp->hdma_prod & PDC_HDMA_Q_MASK;
 
-       writel(host_sg, mmio + 0x108);
-       writel(dimm_sg, mmio + 0x10C);
-       writel(0, mmio + 0x128);
+       if (!pp->doing_hdma) {
+               __pdc20621_push_hdma(qc, seq, pkt_ofs);
+               pp->doing_hdma = 1;
+               return;
+       }
 
-       tmp |= (1 << 7);
-       writel(tmp, mmio + PDC_HDMA_CTLSTAT);
-       readl(mmio + PDC_HDMA_CTLSTAT); /* flush */
+       pp->hdma[idx].qc = qc;
+       pp->hdma[idx].seq = seq;
+       pp->hdma[idx].pkt_ofs = pkt_ofs;
+       pp->hdma_prod++;
+}
+
+static void pdc20621_pop_hdma(struct ata_queued_cmd *qc)
+{
+       struct ata_port *ap = qc->ap;
+       struct pdc_host_priv *pp = ap->host_set->private_data;
+       unsigned int idx = pp->hdma_cons & PDC_HDMA_Q_MASK;
+
+       /* if nothing on queue, we're done */
+       if (pp->hdma_prod == pp->hdma_cons) {
+               pp->doing_hdma = 0;
+               return;
+       }
+
+       __pdc20621_push_hdma(pp->hdma[idx].qc, pp->hdma[idx].seq,
+                            pp->hdma[idx].pkt_ofs);
+       pp->hdma_cons++;
 }
-#endif
 
 #ifdef ATA_VERBOSE_DEBUG
 static void pdc20621_dump_hdma(struct ata_queued_cmd *qc)
 {
        struct ata_port *ap = qc->ap;
        unsigned int port_no = ap->port_no;
-       void *dimm_mmio = ap->host_set->private_data;
+       struct pdc_host_priv *hpriv = ap->host_set->private_data;
+       void *dimm_mmio = hpriv->dimm_mmio;
 
        dimm_mmio += (port_no * PDC_DIMM_WINDOW_STEP);
        dimm_mmio += PDC_DIMM_HOST_PKT;
@@ -724,23 +806,17 @@ static void pdc20621_dma_start(struct ata_queued_cmd *qc)
 
        wmb();                  /* flush PRD, pkt writes */
 
-       writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4));
-       readl(mmio + PDC_20621_SEQCTL + (seq * 4));     /* flush */
-
        if (doing_hdma) {
                pdc20621_dump_hdma(qc);
-#ifdef DIRECT_HDMA
-               pdc20621_push_hdma(qc);
-#else
-               writel(port_ofs + PDC_DIMM_HOST_PKT,
-                      mmio + PDC_HDMA_PKT_SUBMIT);
-               readl(mmio + PDC_HDMA_PKT_SUBMIT);      /* flush */
-#endif
-               VPRINTK("submitted ofs 0x%x (%u), seq %u\n",
-               port_ofs + PDC_DIMM_HOST_PKT,
-               port_ofs + PDC_DIMM_HOST_PKT,
-               seq);
+               pdc20621_push_hdma(qc, seq, port_ofs + PDC_DIMM_HOST_PKT);
+               VPRINTK("queued ofs 0x%x (%u), seq %u\n",
+                       port_ofs + PDC_DIMM_HOST_PKT,
+                       port_ofs + PDC_DIMM_HOST_PKT,
+                       seq);
        } else {
+               writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4));
+               readl(mmio + PDC_20621_SEQCTL + (seq * 4));     /* flush */
+
                writel(port_ofs + PDC_DIMM_ATA_PKT,
                       (void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT);
                readl((void *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT);
@@ -771,6 +847,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap,
                        VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->id,
                                readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
                        pdc_dma_complete(ap, qc);
+                       pdc20621_pop_hdma(qc);
                }
 
                /* step one - exec ATA command */
@@ -781,15 +858,8 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap,
 
                        /* submit hdma pkt */
                        pdc20621_dump_hdma(qc);
-                       writel(0x00000001, mmio + PDC_20621_SEQCTL + (seq * 4));
-                       readl(mmio + PDC_20621_SEQCTL + (seq * 4));
-#ifdef DIRECT_HDMA
-                       pdc20621_push_hdma(qc);
-#else
-                       writel(port_ofs + PDC_DIMM_HOST_PKT,
-                              mmio + PDC_HDMA_PKT_SUBMIT);
-                       readl(mmio + PDC_HDMA_PKT_SUBMIT);
-#endif
+                       pdc20621_push_hdma(qc, seq,
+                                          port_ofs + PDC_DIMM_HOST_PKT);
                }
                handled = 1;
                break;
@@ -814,6 +884,7 @@ static inline unsigned int pdc20621_host_intr( struct ata_port *ap,
                        VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->id,
                                readl(mmio + 0x104), readl(mmio + PDC_HDMA_CTLSTAT));
                        pdc_dma_complete(ap, qc);
+                       pdc20621_pop_hdma(qc);
                }
                handled = 1;
                break;
@@ -1098,11 +1169,373 @@ static void pdc_sata_setup_port(struct ata_ioports *port, unsigned long base)
        port->ctl_addr          = base + 0x38;
 }
 
+
+#ifdef ATA_VERBOSE_DEBUG
+static void pdc20621_get_from_dimm(struct ata_probe_ent *pe, void *psource, 
+                                  u32 offset, u32 size)
+{
+       u32 window_size;
+       u16 idx;
+       u8 page_mask;
+       long dist;
+       void *mmio = pe->mmio_base;
+       struct pdc_host_priv *hpriv = pe->private_data;
+       void *dimm_mmio = hpriv->dimm_mmio;
+
+       /* hard-code chip #0 */
+       mmio += PDC_CHIP0_OFS;
+
+       page_mask = 0x00;       
+       window_size = 0x2000 * 4; /* 32K byte uchar size */  
+       idx = (u16) (offset / window_size); 
+
+       writel(0x01, mmio + PDC_GENERAL_CTLR);
+       readl(mmio + PDC_GENERAL_CTLR);
+       writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
+       readl(mmio + PDC_DIMM_WINDOW_CTLR);
+
+       offset -= (idx * window_size);
+       idx++;
+       dist = ((long) (window_size - (offset + size))) >= 0 ? size : 
+               (long) (window_size - offset);
+       memcpy_fromio((char *) psource, (char *) (dimm_mmio + offset / 4), 
+                     dist);
+
+       psource += dist;    
+       size -= dist;
+       for (; (long) size >= (long) window_size ;) {
+               writel(0x01, mmio + PDC_GENERAL_CTLR);
+               readl(mmio + PDC_GENERAL_CTLR);
+               writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
+               readl(mmio + PDC_DIMM_WINDOW_CTLR);
+               memcpy_fromio((char *) psource, (char *) (dimm_mmio), 
+                             window_size / 4);
+               psource += window_size;
+               size -= window_size;
+               idx ++;
+       }
+
+       if (size) {
+               writel(0x01, mmio + PDC_GENERAL_CTLR);
+               readl(mmio + PDC_GENERAL_CTLR);
+               writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
+               readl(mmio + PDC_DIMM_WINDOW_CTLR);
+               memcpy_fromio((char *) psource, (char *) (dimm_mmio), 
+                             size / 4);
+       }
+}
+#endif
+
+
+static void pdc20621_put_to_dimm(struct ata_probe_ent *pe, void *psource, 
+                                u32 offset, u32 size)
+{
+       u32 window_size;
+       u16 idx;
+       u8 page_mask;
+       long dist;
+       void *mmio = pe->mmio_base;
+       struct pdc_host_priv *hpriv = pe->private_data;
+       void *dimm_mmio = hpriv->dimm_mmio;
+
+       /* hard-code chip #0 */   
+       mmio += PDC_CHIP0_OFS;
+
+       page_mask = 0x00;       
+       window_size = 0x2000 * 4;       /* 32K byte uchar size */  
+       idx = (u16) (offset / window_size);
+
+       writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
+       readl(mmio + PDC_DIMM_WINDOW_CTLR);
+       offset -= (idx * window_size); 
+       idx++;
+       dist = ((long) (window_size - (offset + size))) >= 0 ? size : 
+               (long) (window_size - offset);
+       memcpy_toio((char *) (dimm_mmio + offset / 4), (char *) psource, dist);
+       writel(0x01, mmio + PDC_GENERAL_CTLR);
+       readl(mmio + PDC_GENERAL_CTLR);
+
+       psource += dist;    
+       size -= dist;
+       for (; (long) size >= (long) window_size ;) {
+               writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
+               readl(mmio + PDC_DIMM_WINDOW_CTLR);
+               memcpy_toio((char *) (dimm_mmio), (char *) psource, 
+                           window_size / 4);
+               writel(0x01, mmio + PDC_GENERAL_CTLR);
+               readl(mmio + PDC_GENERAL_CTLR);
+               psource += window_size;
+               size -= window_size;
+               idx ++;
+       }
+    
+       if (size) {
+               writel(((idx) << page_mask), mmio + PDC_DIMM_WINDOW_CTLR);
+               readl(mmio + PDC_DIMM_WINDOW_CTLR);
+               memcpy_toio((char *) (dimm_mmio), (char *) psource, size / 4);
+               writel(0x01, mmio + PDC_GENERAL_CTLR);
+               readl(mmio + PDC_GENERAL_CTLR);
+       }
+}
+
+
+static unsigned int pdc20621_i2c_read(struct ata_probe_ent *pe, u32 device, 
+                                     u32 subaddr, u32 *pdata)
+{
+       void *mmio = pe->mmio_base;
+       u32 i2creg  = 0;
+       u32 status;     
+       u32 count =0;
+
+       /* hard-code chip #0 */
+       mmio += PDC_CHIP0_OFS;
+
+       i2creg |= device << 24;
+       i2creg |= subaddr << 16;
+
+       /* Set the device and subaddress */
+       writel(i2creg, mmio + PDC_I2C_ADDR_DATA_OFFSET);
+       readl(mmio + PDC_I2C_ADDR_DATA_OFFSET);
+
+       /* Write Control to perform read operation, mask int */
+       writel(PDC_I2C_READ | PDC_I2C_START | PDC_I2C_MASK_INT, 
+              mmio + PDC_I2C_CONTROL_OFFSET);
+
+       for (count = 0; count <= 1000; count ++) {
+               status = readl(mmio + PDC_I2C_CONTROL_OFFSET);
+               if (status & PDC_I2C_COMPLETE) {
+                       status = readl(mmio + PDC_I2C_ADDR_DATA_OFFSET);
+                       break;
+               } else if (count == 1000)
+                       return 0;
+       }
+
+       *pdata = (status >> 8) & 0x000000ff;
+       return 1;           
+}
+
+
+static int pdc20621_detect_dimm(struct ata_probe_ent *pe)
+{
+       u32 data=0 ;
+       if (pdc20621_i2c_read(pe, PDC_DIMM0_SPD_DEV_ADDRESS, 
+                            PDC_DIMM_SPD_SYSTEM_FREQ, &data)) {
+               if (data == 100)
+                       return 100;
+       } else
+               return 0;
+       
+       if (pdc20621_i2c_read(pe, PDC_DIMM0_SPD_DEV_ADDRESS, 9, &data)) {
+               if(data <= 0x75) 
+                       return 133;
+       } else
+               return 0;
+       
+       return 0;
+}
+
+
+static int pdc20621_prog_dimm0(struct ata_probe_ent *pe)
+{
+       u32 spd0[50];
+       u32 data = 0;
+       int size, i;
+       u8 bdimmsize; 
+       void *mmio = pe->mmio_base;
+       static const struct {
+               unsigned int reg;
+               unsigned int ofs;
+       } pdc_i2c_read_data [] = {
+               { PDC_DIMM_SPD_TYPE, 11 },              
+               { PDC_DIMM_SPD_FRESH_RATE, 12 },
+               { PDC_DIMM_SPD_COLUMN_NUM, 4 }, 
+               { PDC_DIMM_SPD_ATTRIBUTE, 21 },
+               { PDC_DIMM_SPD_ROW_NUM, 3 },
+               { PDC_DIMM_SPD_BANK_NUM, 17 },
+               { PDC_DIMM_SPD_MODULE_ROW, 5 },
+               { PDC_DIMM_SPD_ROW_PRE_CHARGE, 27 },
+               { PDC_DIMM_SPD_ROW_ACTIVE_DELAY, 28 },
+               { PDC_DIMM_SPD_RAS_CAS_DELAY, 29 },
+               { PDC_DIMM_SPD_ACTIVE_PRECHARGE, 30 },
+               { PDC_DIMM_SPD_CAS_LATENCY, 18 },       
+       };
+
+       /* hard-code chip #0 */
+       mmio += PDC_CHIP0_OFS;
+
+       for(i=0; i<ARRAY_SIZE(pdc_i2c_read_data); i++)
+               pdc20621_i2c_read(pe, PDC_DIMM0_SPD_DEV_ADDRESS,
+                                 pdc_i2c_read_data[i].reg, 
+                                 &spd0[pdc_i2c_read_data[i].ofs]);
+  
+       data |= (spd0[4] - 8) | ((spd0[21] != 0) << 3) | ((spd0[3]-11) << 4);
+       data |= ((spd0[17] / 4) << 6) | ((spd0[5] / 2) << 7) | 
+               ((((spd0[27] + 9) / 10) - 1) << 8) ;
+       data |= (((((spd0[29] > spd0[28]) 
+                   ? spd0[29] : spd0[28]) + 9) / 10) - 1) << 10; 
+       data |= ((spd0[30] - spd0[29] + 9) / 10 - 2) << 12;
+   
+       if (spd0[18] & 0x08) 
+               data |= ((0x03) << 14);
+       else if (spd0[18] & 0x04)
+               data |= ((0x02) << 14);
+       else if (spd0[18] & 0x01)
+               data |= ((0x01) << 14);
+       else
+               data |= (0 << 14);
+
+       /* 
+          Calculate the size of bDIMMSize (power of 2) and
+          merge the DIMM size by program start/end address.
+       */
+
+       bdimmsize = spd0[4] + (spd0[5] / 2) + spd0[3] + (spd0[17] / 2) + 3;
+       size = (1 << bdimmsize) >> 20;  /* size = xxx(MB) */
+       data |= (((size / 16) - 1) << 16);
+       data |= (0 << 23);
+       data |= 8;
+       writel(data, mmio + PDC_DIMM0_CONTROL_OFFSET); 
+       readl(mmio + PDC_DIMM0_CONTROL_OFFSET);
+       return size;                          
+}
+
+
+static unsigned int pdc20621_prog_dimm_global(struct ata_probe_ent *pe)
+{
+       u32 data, spd0;
+       int error, i;
+       void *mmio = pe->mmio_base;
+
+       /* hard-code chip #0 */
+       mmio += PDC_CHIP0_OFS;
+
+       /*
+         Set To Default : DIMM Module Global Control Register (0x022259F1)
+         DIMM Arbitration Disable (bit 20)
+         DIMM Data/Control Output Driving Selection (bit12 - bit15)
+         Refresh Enable (bit 17)
+       */
+
+       data = 0x022259F1;   
+       writel(data, mmio + PDC_SDRAM_CONTROL_OFFSET);
+       readl(mmio + PDC_SDRAM_CONTROL_OFFSET);
+
+       /* Turn on for ECC */
+       pdc20621_i2c_read(pe, PDC_DIMM0_SPD_DEV_ADDRESS, 
+                         PDC_DIMM_SPD_TYPE, &spd0);
+       if (spd0 == 0x02) {
+               data |= (0x01 << 16);
+               writel(data, mmio + PDC_SDRAM_CONTROL_OFFSET);
+               readl(mmio + PDC_SDRAM_CONTROL_OFFSET);
+               printk(KERN_ERR "Local DIMM ECC Enabled\n");
+       }
+
+       /* DIMM Initialization Select/Enable (bit 18/19) */
+       data &= (~(1<<18));
+       data |= (1<<19);
+       writel(data, mmio + PDC_SDRAM_CONTROL_OFFSET);
+
+       error = 1;                     
+       for (i = 1; i <= 10; i++) {   /* polling ~5 secs */
+               data = readl(mmio + PDC_SDRAM_CONTROL_OFFSET);
+               if (!(data & (1<<19))) {
+                       error = 0;
+                       break;     
+               }
+               set_current_state(TASK_INTERRUPTIBLE);
+               schedule_timeout((i * 100) * HZ / 1000);
+       }
+       return error;
+}
+       
+
+static unsigned int pdc20621_dimm_init(struct ata_probe_ent *pe)
+{
+       int speed, size, length; 
+       u32 addr,spd0,pci_status;
+       u32 tmp=0;
+       void *mmio = pe->mmio_base;
+
+       /* hard-code chip #0 */
+       mmio += PDC_CHIP0_OFS;
+
+       /* Initialize PLL. */
+       pci_status = 0x8a531824;
+       writel(pci_status, mmio + PDC_CTL_STATUS);
+       readl(mmio + PDC_CTL_STATUS);
+
+       /* 
+          Read SPD of DIMM by I2C interface,
+          and program the DIMM Module Controller.
+       */
+       if (!(speed = pdc20621_detect_dimm(pe))) {
+               printk(KERN_ERR "Detect Local DIMM Fail\n");  
+               return 1;       /* DIMM error */
+       }
+       VPRINTK("Local DIMM Speed = %d\n", speed);
+
+       /* Programming DIMM0 Module Control Register (index_CID0:80h) */ 
+       size = pdc20621_prog_dimm0(pe);
+       VPRINTK("Local DIMM Size = %dMB\n",size);
+
+       /* Programming DIMM Module Global Control Register (index_CID0:88h) */ 
+       if (pdc20621_prog_dimm_global(pe)) {
+               printk(KERN_ERR "Programming DIMM Module Global Control Register Fail\n");
+               return 1;
+       }
+
+#ifdef ATA_VERBOSE_DEBUG
+       {
+               u8 test_parttern1[40] = {0x55,0xAA,'P','r','o','m','i','s','e',' ',
+                               'N','o','t',' ','Y','e','t',' ','D','e','f','i','n','e','d',' ',
+                                '1','.','1','0',
+                               '9','8','0','3','1','6','1','2',0,0};
+               u8 test_parttern2[40] = {0};
+
+               pdc20621_put_to_dimm(pe, (void *) test_parttern2, 0x10040, 40);
+               pdc20621_put_to_dimm(pe, (void *) test_parttern2, 0x40, 40);
+
+               pdc20621_put_to_dimm(pe, (void *) test_parttern1, 0x10040, 40);
+               pdc20621_get_from_dimm(pe, (void *) test_parttern2, 0x40, 40);
+               printk(KERN_ERR "%x, %x, %s\n", test_parttern2[0], 
+                      test_parttern2[1], &(test_parttern2[2]));
+               pdc20621_get_from_dimm(pe, (void *) test_parttern2, 0x10040, 
+                                      40);
+               printk(KERN_ERR "%x, %x, %s\n", test_parttern2[0], 
+                      test_parttern2[1], &(test_parttern2[2]));
+
+               pdc20621_put_to_dimm(pe, (void *) test_parttern1, 0x40, 40);
+               pdc20621_get_from_dimm(pe, (void *) test_parttern2, 0x40, 40);
+               printk(KERN_ERR "%x, %x, %s\n", test_parttern2[0], 
+                      test_parttern2[1], &(test_parttern2[2]));
+       }
+#endif
+
+       /* ECC initiliazation. */
+
+       pdc20621_i2c_read(pe, PDC_DIMM0_SPD_DEV_ADDRESS, 
+                         PDC_DIMM_SPD_TYPE, &spd0);
+       if (spd0 == 0x02) {
+               VPRINTK("Start ECC initialization\n");
+               addr = 0;
+               length = size * 1024 * 1024;
+               while (addr < length) {
+                       pdc20621_put_to_dimm(pe, (void *) &tmp, addr, 
+                                            sizeof(u32));
+                       addr += sizeof(u32);
+               }
+               VPRINTK("Finish ECC initialization\n");
+       }
+       return 0;
+}
+
+
 static void pdc_20621_init(struct ata_probe_ent *pe)
 {
        u32 tmp;
        void *mmio = pe->mmio_base;
 
+       /* hard-code chip #0 */
        mmio += PDC_CHIP0_OFS;
 
        /*
@@ -1170,6 +1603,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *
        struct ata_probe_ent *probe_ent = NULL;
        unsigned long base;
        void *mmio_base, *dimm_mmio = NULL;
+       struct pdc_host_priv *hpriv = NULL;
        unsigned int board_idx = (unsigned int) ent->driver_data;
        unsigned int have_20621 = (board_idx == board_20621);
        int rc;
@@ -1212,12 +1646,22 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *
        base = (unsigned long) mmio_base;
 
        if (have_20621) {
+               hpriv = kmalloc(sizeof(*hpriv), GFP_KERNEL);
+               if (!hpriv) {
+                       rc = -ENOMEM;
+                       goto err_out_iounmap;
+               }
+               memset(hpriv, 0, sizeof(*hpriv));
+
                dimm_mmio = ioremap(pci_resource_start(pdev, 4),
                                    pci_resource_len(pdev, 4));
                if (!dimm_mmio) {
+                       kfree(hpriv);
                        rc = -ENOMEM;
                        goto err_out_iounmap;
                }
+
+               hpriv->dimm_mmio = dimm_mmio;
        }
 
        probe_ent->sht          = pdc_port_info[board_idx].sht;
@@ -1231,7 +1675,7 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *
        probe_ent->mmio_base = mmio_base;
 
        if (have_20621) {
-               probe_ent->private_data = dimm_mmio;
+               probe_ent->private_data = hpriv;
                base += PDC_CHIP0_OFS;
        }
 
@@ -1268,9 +1712,14 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *
        pci_set_master(pdev);
 
        /* initialize adapter */
-       if (have_20621)
+       if (have_20621) {
+               /* initialize local dimm */
+               if (pdc20621_dimm_init(probe_ent)) {
+                       rc = -ENOMEM;
+                       goto err_out_iounmap_dimm;
+               }
                pdc_20621_init(probe_ent);
-       else
+       } else
                pdc_host_init(board_idx, probe_ent);
 
        /* FIXME: check ata_device_add return value */
@@ -1279,6 +1728,9 @@ static int pdc_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *
 
        return 0;
 
+err_out_iounmap_dimm:          /* only get to this label if 20621 */
+       kfree(hpriv);
+       iounmap(dimm_mmio);
 err_out_iounmap:
        iounmap(mmio_base);
 err_out_free_ent:
index ce80f62..c513fea 100644 (file)
@@ -87,6 +87,7 @@ static Scsi_Host_Template sil_sht = {
        .proc_name              = DRV_NAME,
        .dma_boundary           = ATA_DMA_BOUNDARY,
        .slave_configure        = ata_scsi_slave_config,
+       .bios_param             = ata_std_bios_param,
 };
 
 static struct ata_port_operations sil_ops = {
index 075bacf..7ff5dd7 100644 (file)
@@ -219,6 +219,7 @@ static Scsi_Host_Template k2_sata_sht = {
 #ifdef CONFIG_ALL_PPC
        .proc_info              = k2_sata_proc_info
 #endif
+       .bios_param             = ata_std_bios_param,
 };
 
 
index 97a341e..7eb858c 100644 (file)
@@ -78,6 +78,7 @@ static Scsi_Host_Template svia_sht = {
        .proc_name              = DRV_NAME,
        .dma_boundary           = ATA_DMA_BOUNDARY,
        .slave_configure        = ata_scsi_slave_config,
+       .bios_param             = ata_std_bios_param,
 };
 
 static struct ata_port_operations svia_sata_ops = {
index fc4f6f3..7ebb7fd 100644 (file)
@@ -351,6 +351,124 @@ void scsi_destroy_command_freelist(struct Scsi_Host *shost)
        up(&host_cmd_pool_mutex);
 }
 
+#ifdef CONFIG_SCSI_LOGGING
+void scsi_log_send(struct scsi_cmnd *cmd)
+{
+       unsigned int level;
+       struct scsi_device *sdev;
+
+       /*
+        * If ML QUEUE log level is greater than or equal to:
+        *
+        * 1: nothing (match completion)
+        *
+        * 2: log opcode + command of all commands
+        *
+        * 3: same as 2 plus dump cmd address
+        *
+        * 4: same as 3 plus dump extra junk
+        */
+       if (unlikely(scsi_logging_level)) {
+               level = SCSI_LOG_LEVEL(SCSI_LOG_MLQUEUE_SHIFT,
+                                      SCSI_LOG_MLQUEUE_BITS);
+               if (level > 1) {
+                       sdev = cmd->device;
+                       printk(KERN_INFO "scsi <%d:%d:%d:%d> send ",
+                              sdev->host->host_no, sdev->channel, sdev->id,
+                              sdev->lun);
+                       if (level > 2)
+                               printk("0x%p ", cmd);
+                       /*
+                        * spaces to match disposition and cmd->result
+                        * output in scsi_log_completion.
+                        */
+                       printk("                 ");
+                       print_command(cmd->cmnd);
+                       if (level > 3) {
+                               printk(KERN_INFO "buffer = 0x%p, bufflen = %d,"
+                                      " done = 0x%p, queuecommand 0x%p\n",
+                                       cmd->buffer, cmd->bufflen,
+                                       cmd->done,
+                                       sdev->host->hostt->queuecommand);
+
+                       }
+               }
+       }
+}
+
+void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
+{
+       unsigned int level;
+       struct scsi_device *sdev;
+
+       /*
+        * If ML COMPLETE log level is greater than or equal to:
+        *
+        * 1: log disposition, result, opcode + command, and conditionally
+        * sense data for failures or non SUCCESS dispositions.
+        *
+        * 2: same as 1 but for all command completions.
+        *
+        * 3: same as 2 plus dump cmd address
+        *
+        * 4: same as 3 plus dump extra junk
+        */
+       if (unlikely(scsi_logging_level)) {
+               level = SCSI_LOG_LEVEL(SCSI_LOG_MLCOMPLETE_SHIFT,
+                                      SCSI_LOG_MLCOMPLETE_BITS);
+               if (((level > 0) && (cmd->result || disposition != SUCCESS)) ||
+                   (level > 1)) {
+                       sdev = cmd->device;
+                       printk(KERN_INFO "scsi <%d:%d:%d:%d> done ",
+                              sdev->host->host_no, sdev->channel, sdev->id,
+                              sdev->lun);
+                       if (level > 2)
+                               printk("0x%p ", cmd);
+                       /*
+                        * Dump truncated values, so we usually fit within
+                        * 80 chars.
+                        */
+                       switch (disposition) {
+                       case SUCCESS:
+                               printk("SUCCESS");
+                               break;
+                       case NEEDS_RETRY:
+                               printk("RETRY  ");
+                               break;
+                       case ADD_TO_MLQUEUE:
+                               printk("MLQUEUE");
+                               break;
+                       case FAILED:
+                               printk("FAILED ");
+                               break;
+                       case TIMEOUT:
+                               /* 
+                                * If called via scsi_times_out.
+                                */
+                               printk("TIMEOUT");
+                               break;
+                       default:
+                               printk("UNKNOWN");
+                       }
+                       printk(" %8x ", cmd->result);
+                       print_command(cmd->cmnd);
+                       if (status_byte(cmd->result) & CHECK_CONDITION) {
+                               /*
+                                * XXX The print_sense formatting/prefix
+                                * doesn't match this function.
+                                */
+                               print_sense("", cmd);
+                       }
+                       if (level > 3) {
+                               printk(KERN_INFO "scsi host busy %d failed %d\n",
+                                      sdev->host->host_busy,
+                                      sdev->host->host_failed);
+                       }
+               }
+       }
+}
+#endif
+
 /*
  * Function:    scsi_dispatch_command
  *
@@ -416,16 +534,12 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
 
        scsi_add_timer(cmd, cmd->timeout_per_command, scsi_times_out);
 
+       scsi_log_send(cmd);
+
        /*
         * We will use a queued command if possible, otherwise we will
         * emulate the queuing and calling of completion function ourselves.
         */
-       SCSI_LOG_MLQUEUE(3, printk("scsi_dispatch_cmnd (host = %d, "
-                               "channel = %d, target = %d, command = %p, "
-                               "buffer = %p, \nbufflen = %d, done = %p)\n",
-                               host->host_no, cmd->device->channel,
-                               cmd->device->id, cmd->cmnd, cmd->buffer,
-                               cmd->bufflen, cmd->done));
 
        cmd->state = SCSI_STATE_QUEUED;
        cmd->owner = SCSI_OWNER_LOWLEVEL;
@@ -445,9 +559,6 @@ int scsi_dispatch_cmd(struct scsi_cmnd *cmd)
                goto out;
        }
 
-       SCSI_LOG_MLQUEUE(3, printk("queuecommand : routine at %p\n",
-                                  host->hostt->queuecommand));
-
        spin_lock_irqsave(host->host_lock, flags);
        if (unlikely(test_bit(SHOST_CANCEL, &host->shost_state))) {
                cmd->result = (DID_NO_CONNECT << 16);
@@ -604,6 +715,7 @@ void scsi_done(struct scsi_cmnd *cmd)
  */
 static void scsi_softirq(struct softirq_action *h)
 {
+       int disposition;
        LIST_HEAD(local_q);
 
        local_irq_disable();
@@ -615,75 +727,19 @@ static void scsi_softirq(struct softirq_action *h)
                                                   struct scsi_cmnd, eh_entry);
                list_del_init(&cmd->eh_entry);
 
-               switch (scsi_decide_disposition(cmd)) {
+               disposition = scsi_decide_disposition(cmd);
+               scsi_log_completion(cmd, disposition);
+               switch (disposition) {
                case SUCCESS:
-                       /*
-                        * Add to BH queue.
-                        */
-                       SCSI_LOG_MLCOMPLETE(3,
-                                           printk("Command finished %d %d "
-                                                  "0x%x\n",
-                                          cmd->device->host->host_busy,
-                                          cmd->device->host->host_failed,
-                                                  cmd->result));
-
                        scsi_finish_command(cmd);
                        break;
                case NEEDS_RETRY:
-                       /*
-                        * We only come in here if we want to retry a
-                        * command.  The test to see whether the
-                        * command should be retried should be keeping
-                        * track of the number of tries, so we don't
-                        * end up looping, of course.
-                        */
-                       SCSI_LOG_MLCOMPLETE(3, printk("Command needs retry "
-                                                     "%d %d 0x%x\n",
-                                             cmd->device->host->host_busy,
-                                             cmd->device->host->host_failed,
-                                                     cmd->result));
-
                        scsi_retry_command(cmd);
                        break;
                case ADD_TO_MLQUEUE:
-                       /* 
-                        * This typically happens for a QUEUE_FULL
-                        * message - typically only when the queue
-                        * depth is only approximate for a given
-                        * device.  Adding a command to the queue for
-                        * the device will prevent further commands
-                        * from being sent to the device, so we
-                        * shouldn't end up with tons of things being
-                        * sent down that shouldn't be.
-                        */
-                       SCSI_LOG_MLCOMPLETE(3, printk("Command rejected as "
-                                                     "device queue full, "
-                                                     "put on ml queue %p\n",
-                                                     cmd));
                        scsi_queue_insert(cmd, SCSI_MLQUEUE_DEVICE_BUSY);
                        break;
                default:
-                       /*
-                        * Here we have a fatal error of some sort.
-                        * Turn it over to the error handler.
-                        */
-                       SCSI_LOG_MLCOMPLETE(3,
-                                           printk("Command failed %p %x "
-                                                  "busy=%d failed=%d\n",
-                                                  cmd, cmd->result,
-                                          cmd->device->host->host_busy,
-                                          cmd->device->host->host_failed));
-
-                       /*
-                        * Dump the sense information too.
-                        */
-                       if (status_byte(cmd->result) & CHECK_CONDITION)
-                               SCSI_LOG_MLCOMPLETE(3, print_sense("bh", cmd));
-
-                       /*
-                        * We only fail here if the error recovery thread
-                        * has died.
-                        */
                        if (!scsi_eh_scmd_add(cmd, 0))
                                scsi_finish_command(cmd);
                }
@@ -749,7 +805,7 @@ void scsi_finish_command(struct scsi_cmnd *cmd)
        if (SCSI_SENSE_VALID(cmd))
                cmd->result |= (DRIVER_SENSE << 24);
 
-       SCSI_LOG_MLCOMPLETE(3, printk("Notifying upper driver of completion "
+       SCSI_LOG_MLCOMPLETE(4, printk("Notifying upper driver of completion "
                                "for device %d %x\n", sdev->id, cmd->result));
 
        cmd->owner = SCSI_OWNER_HIGHLEVEL;
index 870808c..10b6e2c 100644 (file)
@@ -55,7 +55,7 @@
 #include "scsi_logging.h"
 #include "scsi_debug.h"
 
-static const char * scsi_debug_version_str = "Version: 1.70 (20030507)";
+static const char * scsi_debug_version_str = "Version: 1.71 (20031007)";
 
 /* Additional Sense Code (ASC) used */
 #define NO_ADDED_SENSE 0x0
@@ -1541,7 +1541,7 @@ static int __init scsi_debug_init(void)
         }
 
        if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts) {
-               printk(KERN_INFO "scsi_debug: ... built %d host(s)\n",
+               printk(KERN_INFO "scsi_debug_init: built %d host(s)\n",
                       scsi_debug_add_host);
        }
        return 0;
@@ -1565,8 +1565,15 @@ static void __exit scsi_debug_exit(void)
 device_initcall(scsi_debug_init);
 module_exit(scsi_debug_exit);
 
+void pseudo_0_release(struct device * dev)
+{
+       if (SCSI_DEBUG_OPT_NOISE & scsi_debug_opts)
+               printk(KERN_INFO "scsi_debug: pseudo_0_release() called\n");
+}
+
 static struct device pseudo_primary = {
        .bus_id         = "pseudo_0",
+       .release        = pseudo_0_release,
 };
 
 static int pseudo_lld_bus_match(struct device *dev, 
index 9458bb4..b547f6b 100644 (file)
@@ -164,14 +164,11 @@ int scsi_delete_timer(struct scsi_cmnd *scmd)
  **/
 void scsi_times_out(struct scsi_cmnd *scmd)
 {
+       scsi_log_completion(scmd, TIMEOUT);
        if (unlikely(!scsi_eh_scmd_add(scmd, SCSI_EH_CANCEL_CMD))) {
                panic("Error handler thread not present at %p %p %s %d",
                      scmd, scmd->device->host, __FILE__, __LINE__);
        }
-
-       SCSI_LOG_TIMEOUT(3, printk("Command timed out busy=%d failed=%d\n",
-                                  scmd->device->host->host_busy,
-                                  scmd->device->host->host_failed));
 }
 
 /**
@@ -446,10 +443,12 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, int timeout)
        scmd->request->rq_status = RQ_SCSI_BUSY;
 
        spin_lock_irqsave(scmd->device->host->host_lock, flags);
+       scsi_log_send(scmd);
        host->hostt->queuecommand(scmd, scsi_eh_done);
        spin_unlock_irqrestore(scmd->device->host->host_lock, flags);
 
        down(&sem);
+       scsi_log_completion(scmd, SUCCESS);
 
        scmd->device->host->eh_action = NULL;
 
index b0a31a1..56589d7 100644 (file)
 extern unsigned int scsi_logging_level;
 
 #ifdef CONFIG_SCSI_LOGGING
+
+#define SCSI_LOG_LEVEL(SHIFT, BITS)                            \
+        ((scsi_logging_level >> (SHIFT)) & ((1 << (BITS)) - 1))
+
 #define SCSI_CHECK_LOGGING(SHIFT, BITS, LEVEL, CMD)            \
 {                                                              \
-        unsigned int mask = (1 << (BITS)) - 1;                 \
-        if (((scsi_logging_level >> (SHIFT)) & mask) > (LEVEL))        \
+        if ((SCSI_LOG_LEVEL(SHIFT, BITS)) > (LEVEL))           \
                (CMD);                                          \
 }
 #else
index 3292092..b7077a4 100644 (file)
@@ -83,6 +83,15 @@ extern int scsi_insert_special_req(struct scsi_request *sreq, int);
 extern void scsi_init_cmd_from_req(struct scsi_cmnd *cmd,
                struct scsi_request *sreq);
 extern void __scsi_release_request(struct scsi_request *sreq);
+#ifdef CONFIG_SCSI_LOGGING
+void scsi_log_send(struct scsi_cmnd *cmd);
+void scsi_log_completion(struct scsi_cmnd *cmd, int disposition);
+#else
+static inline void scsi_log_send(struct scsi_cmnd *cmd) 
+       { };
+static inline void scsi_log_completion(struct scsi_cmnd *cmd, int disposition)
+       { };
+#endif
 
 /* scsi_devinfo.c */
 extern int scsi_get_device_flags(struct scsi_device *sdev,
index 1d5a16d..af6bbf8 100644 (file)
@@ -5,9 +5,6 @@
  *                  Bus Master Host Adapter                           *
  ***********************************************************************/
 /* $Id: scsiiom.c,v 2.55.2.17 2000/12/20 00:39:37 garloff Exp $ */
-
-#error Please convert me to Documentation/DMA-mapping.txt
-
 static void __inline__
 dc390_freetag (PDCB pDCB, PSRB pSRB)
 {
@@ -36,9 +33,12 @@ dc390_StartSCSI( PACB pACB, PDCB pDCB, PSRB pSRB )
     }
     if (time_before (jiffies, pACB->pScsiHost->last_reset))
     {
-       DEBUG0(printk ("DC390: We were just reset and don't accept commands yet!\n");)
+       DEBUG0(printk ("DC390: We were just reset and don't accept commands yet!\n"));
        return 1;
     }
+    /* KG: Moved pci mapping here */
+    dc390_pci_map(pSRB);
+    /* TODO: error handling */
     DC390_write8 (Scsi_Dest_ID, pDCB->TargetID);
     DC390_write8 (Sync_Period, pDCB->SyncPeriod);
     DC390_write8 (Sync_Offset, pDCB->SyncOffset);
@@ -47,8 +47,9 @@ dc390_StartSCSI( PACB pACB, PDCB pDCB, PSRB pSRB )
     DC390_write8 (CtrlReg4, pDCB->CtrlR4);
     DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);            /* Flush FIFO */
     DEBUG1(printk (KERN_INFO "DC390: Start SCSI command: %02x (Sync:%02x)\n",\
-           pSRB->pcmd->cmnd[0], pDCB->SyncMode);)
-    disc_allowed = pDCB->DevMode & EN_DISCONNECT_; try_sync_nego = 0;
+           pSRB->pcmd->cmnd[0], pDCB->SyncMode));
+    disc_allowed = pDCB->DevMode & EN_DISCONNECT_;
+    try_sync_nego = 0;
     /* Don't disconnect on AUTO_REQSENSE, cause it might be an
      * Contingent Allegiance Condition (6.6), where no tags should be used.
      * All other have to be allowed to disconnect to prevent Incorrect 
@@ -78,13 +79,13 @@ dc390_StartSCSI( PACB pACB, PDCB pDCB, PSRB pSRB )
        DC390_write8 (ScsiFifo, SIMPLE_QUEUE_TAG);
        pDCB->TagMask |= (1 << tag_no); pSRB->TagNumber = tag_no;
        DC390_write8 (ScsiFifo, tag_no);
-       DEBUG1(printk (KERN_DEBUG "DC390: Select w/DisCn for Cmd %li (SRB %p), Using Tag %02x\n", pSRB->pcmd->pid, pSRB, tag_no);)
+       DEBUG1(printk (KERN_DEBUG "DC390: Select w/DisCn for Cmd %li (SRB %p), Using Tag %02x\n", pSRB->pcmd->pid, pSRB, tag_no));
        cmd = SEL_W_ATN3;
       }
     else       /* No TagQ */
       {
 //      no_tag:
-       DEBUG1(printk (KERN_DEBUG "DC390: Select w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", (disc_allowed?"":"o"), pSRB->pcmd->pid, pSRB);) 
+       DEBUG1(printk (KERN_DEBUG "DC390: Select w%s/DisCn for Cmd %li (SRB %p), No TagQ\n", (disc_allowed?"":"o"), pSRB->pcmd->pid, pSRB));
       };
 
     pSRB->SRBState = SRB_START_;
@@ -92,7 +93,7 @@ dc390_StartSCSI( PACB pACB, PDCB pDCB, PSRB pSRB )
     if (try_sync_nego)
       { 
        UCHAR Sync_Off = pDCB->SyncOffset;
-        DEBUG0(printk (KERN_INFO "DC390: NEW Sync Nego code triggered (%i %i)\n", pDCB->TargetID, pDCB->TargetLUN);)
+        DEBUG0(printk (KERN_INFO "DC390: NEW Sync Nego code triggered (%i %i)\n", pDCB->TargetID, pDCB->TargetLUN));
        pSRB->MsgOutBuf[0] = EXTENDED_MESSAGE;
        pSRB->MsgOutBuf[1] = 3;
        pSRB->MsgOutBuf[2] = EXTENDED_SDTR;
@@ -116,7 +117,7 @@ dc390_StartSCSI( PACB pACB, PDCB pDCB, PSRB pSRB )
            DC390_write8 (ScsiFifo, 0);
            DC390_write8 (ScsiFifo, sizeof(pSRB->pcmd->sense_buffer));
            DC390_write8 (ScsiFifo, 0);
-           DEBUG1(printk (KERN_DEBUG "DC390: AutoReqSense !\n");)
+           DEBUG1(printk (KERN_DEBUG "DC390: AutoReqSense !\n"));
          }
        else    /* write cmnd to bus */ 
          {
@@ -127,15 +128,15 @@ dc390_StartSCSI( PACB pACB, PDCB pDCB, PSRB pSRB )
          };
       }
     DEBUG0(if (pACB->pActiveDCB)       \
-          printk (KERN_WARNING "DC390: ActiveDCB != 0\n");)
+          printk (KERN_WARNING "DC390: ActiveDCB != 0\n"));
     DEBUG0(if (pDCB->pActiveSRB)       \
-          printk (KERN_WARNING "DC390: ActiveSRB != 0\n");)
+          printk (KERN_WARNING "DC390: ActiveSRB != 0\n"));
     //DC390_write8 (DMA_Cmd, DMA_IDLE_CMD);
     if (DC390_read8 (Scsi_Status) & INTERRUPT)
     {
        dc390_freetag (pDCB, pSRB);
        DEBUG0(printk ("DC390: Interrupt during Start SCSI (pid %li, target %02i-%02i)\n",
-               pSRB->pcmd->pid, pSRB->pcmd->target, pSRB->pcmd->lun);)
+               pSRB->pcmd->pid, pSRB->pcmd->device->id, pSRB->pcmd->device->lun));
        pSRB->SRBState = SRB_READY;
        //DC390_write8 (ScsiCmd, CLEAR_FIFO_CMD);
        pACB->SelLost++;
@@ -158,13 +159,13 @@ dc390_dma_intr (PACB pACB)
 {
   PSRB pSRB;
   UCHAR dstate;
-  DEBUG0(USHORT pstate;PDEVDECL1;)
+  DEBUG0(USHORT pstate;PDEVDECL1);
   
-  DEBUG0(PDEVSET1;)
-  DEBUG0(PCI_READ_CONFIG_WORD (PDEV, PCI_STATUS, &pstate);)
+  DEBUG0(PDEVSET1);
+  DEBUG0(PCI_READ_CONFIG_WORD (PDEV, PCI_STATUS, &pstate));
   DEBUG0(if (pstate & (PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY))\
        { printk(KERN_WARNING "DC390: PCI state = %04x!\n", pstate); \
-         PCI_WRITE_CONFIG_WORD (PDEV, PCI_STATUS, (PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY));};)
+         PCI_WRITE_CONFIG_WORD (PDEV, PCI_STATUS, (PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY));});
 
   dstate = DC390_read8 (DMA_Status); 
 
@@ -183,7 +184,7 @@ dc390_dma_intr (PACB pACB)
          {
            do
              {
-               DEBUG1(printk (KERN_DEBUG "DC390: read residual bytes ... \n");)
+               DEBUG1(printk (KERN_DEBUG "DC390: read residual bytes ... \n"));
                dstate = DC390_read8 (DMA_Status);
                residual = DC390_read8 (CtcReg_Low) | DC390_read8 (CtcReg_Mid) << 8 |
                  DC390_read8 (CtcReg_High) << 16;
@@ -210,10 +211,10 @@ dc390_dma_intr (PACB pACB)
     }
   dc390_laststatus &= ~0xff000000; dc390_laststatus |= dstate << 24;
   return dstate;
-};
+}
 #endif
 
-void __inline__
+static irqreturn_t __inline__
 DC390_Interrupt( int irq, void *dev_id, struct pt_regs *regs)
 {
     PACB   pACB, pACB2;
@@ -226,37 +227,37 @@ DC390_Interrupt( int irq, void *dev_id, struct pt_regs *regs)
 #if DMA_INT
     UCHAR  dstatus;
 #endif
-    DC390_AFLAGS DC390_IFLAGS //DC390_DFLAGS
+    DC390_AFLAGS DC390_IFLAGS; //DC390_DFLAGS
 
     pACB = (PACB)dev_id;
     for (pACB2 = dc390_pACB_start; (pACB2 && pACB2 != pACB); pACB2 = pACB2->pNextACB);
     if (!pACB2)
     {
        printk ("DC390: IRQ called with foreign dev_id %p!\n", pACB);
-       return;
+       return IRQ_NONE;
     }
     
     //DC390_LOCK_DRV;
 
     sstatus = DC390_read8 (Scsi_Status);
     if( !(sstatus & INTERRUPT) )
-       { /*DC390_UNLOCK_DRV;*/ return; };
+       { /*DC390_UNLOCK_DRV;*/ return IRQ_NONE; };
 
-    DEBUG1(printk (KERN_DEBUG "sstatus=%02x,", sstatus);)
+    DEBUG1(printk (KERN_DEBUG "sstatus=%02x,", sstatus));
 
 #if DMA_INT
-    DC390_LOCK_IO;
+    DC390_LOCK_IO(pACB->pScsiHost);
     DC390_LOCK_ACB;
     dstatus = dc390_dma_intr (pACB);
     DC390_UNLOCK_ACB;
-    DC390_UNLOCK_IO;
+    DC390_UNLOCK_IO(pACB->pScsiHost);
 
-    DEBUG1(printk (KERN_DEBUG "dstatus=%02x,", dstatus);)
+    DEBUG1(printk (KERN_DEBUG "dstatus=%02x,", dstatus));
     if (! (dstatus & SCSI_INTERRUPT))
       {
-       DEBUG0(printk (KERN_WARNING "DC390 Int w/o SCSI actions (only DMA?)\n");)
+       DEBUG0(printk (KERN_WARNING "DC390 Int w/o SCSI actions (only DMA?)\n"));
        //DC390_UNLOCK_DRV;
-       return;
+       return IRQ_NONE;
       };
 #else
     //DC390_write32 (DMA_ScsiBusCtrl, WRT_ERASE_DMA_STAT | EN_INT_ON_PCI_ABORT);
@@ -264,14 +265,14 @@ DC390_Interrupt( int irq, void *dev_id, struct pt_regs *regs)
     //DC390_write32 (DMA_ScsiBusCtrl, EN_INT_ON_PCI_ABORT);
 #endif
 
-    DC390_LOCK_IO;
+    DC390_LOCK_IO(pACB->pScsiHost);
     DC390_LOCK_ACB;
     //DC390_UNLOCK_DRV_NI; /* Allow _other_ CPUs to process IRQ (useful for shared IRQs) */
 
     istate = DC390_read8 (Intern_State);
     istatus = DC390_read8 (INT_Status); /* This clears Scsi_Status, Intern_State and INT_Status ! */
 
-    DEBUG1(printk (KERN_INFO "Istatus(Res,Inv,Dis,Serv,Succ,ReS,SelA,Sel)=%02x,",istatus);)
+    DEBUG1(printk (KERN_INFO "Istatus(Res,Inv,Dis,Serv,Succ,ReS,SelA,Sel)=%02x,",istatus));
     dc390_laststatus &= ~0x00ffffff;
     dc390_laststatus |= /* dstatus<<24 | */ sstatus<<16 | istate<<8 | istatus;
 
@@ -325,13 +326,13 @@ DC390_Interrupt( int irq, void *dev_id, struct pt_regs *regs)
          dc390_EnableMsgOut_Abort (pACB, pSRB);
 
        phase = pSRB->ScsiPhase;
-       DEBUG1(printk (KERN_INFO "DC390: [%i]%s(0) (%02x)\n", phase, dc390_p0_str[phase], sstatus);)
+       DEBUG1(printk (KERN_INFO "DC390: [%i]%s(0) (%02x)\n", phase, dc390_p0_str[phase], sstatus));
        stateV = (void *) dc390_phase0[phase];
        ( *stateV )( pACB, pSRB, &sstatus );
 
        pSRB->ScsiPhase = sstatus & 7;
        phase = (UCHAR) sstatus & 7;
-       DEBUG1(printk (KERN_INFO "DC390: [%i]%s(1) (%02x)\n", phase, dc390_p1_str[phase], sstatus);)
+       DEBUG1(printk (KERN_INFO "DC390: [%i]%s(1) (%02x)\n", phase, dc390_p1_str[phase], sstatus));
        stateV = (void *) dc390_phase1[phase];
        ( *stateV )( pACB, pSRB, &sstatus );
        goto unlock;
@@ -340,17 +341,19 @@ DC390_Interrupt( int irq, void *dev_id, struct pt_regs *regs)
  unlock:
     //DC390_LOCK_DRV_NI;
     DC390_UNLOCK_ACB;
-    DC390_UNLOCK_IO;
+    DC390_UNLOCK_IO(pACB->pScsiHost);
     //DC390_UNLOCK_DRV; /* Restore initial flags */
+    return IRQ_HANDLED;
 }
 
-void
-do_DC390_Interrupt( int irq, void *dev_id, struct pt_regs *regs)
+irqreturn_t do_DC390_Interrupt( int irq, void *dev_id, struct pt_regs *regs)
 {
-    DEBUG1(printk (KERN_INFO "DC390: Irq (%i) caught: ", irq);)
+    irqreturn_t ret;
+    DEBUG1(printk (KERN_INFO "DC390: Irq (%i) caught: ", irq));
     /* Locking is done in DC390_Interrupt */
-    DC390_Interrupt(irq, dev_id, regs);
-    DEBUG1(printk (".. IRQ returned\n");)
+    ret = DC390_Interrupt(irq, dev_id, regs);
+    DEBUG1(printk (".. IRQ returned\n"));
+    return ret;
 }
 
 void
@@ -381,8 +384,8 @@ dc390_DataOut_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
                pSRB->pSegmentList++;
                psgl = pSRB->pSegmentList;
 
-               pSRB->SGBusAddr = virt_to_bus( psgl->address );
-               pSRB->SGToBeXferLen = (ULONG) psgl->length;
+               pSRB->SGBusAddr = cpu_to_le32(pci_dma_lo32(sg_dma_address(psgl)));
+               pSRB->SGToBeXferLen = cpu_to_le32(sg_dma_len(psgl));
            }
            else
                pSRB->SGToBeXferLen = 0;
@@ -433,8 +436,8 @@ dc390_DataIn_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
            dc390_laststatus &= ~0xff000000; dc390_laststatus |= dstate << 24;
            DEBUG1(ResidCnt = ((ULONG) DC390_read8 (CtcReg_High) << 16) \
                + ((ULONG) DC390_read8 (CtcReg_Mid) << 8)               \
-               + ((ULONG) DC390_read8 (CtcReg_Low));)
-           DEBUG1(printk (KERN_DEBUG "Count_2_Zero (ResidCnt=%i,ToBeXfer=%li),", ResidCnt, pSRB->SGToBeXferLen);)
+               + ((ULONG) DC390_read8 (CtcReg_Low)));
+           DEBUG1(printk (KERN_DEBUG "Count_2_Zero (ResidCnt=%i,ToBeXfer=%li),", ResidCnt, pSRB->SGToBeXferLen));
 
            DC390_write8 (DMA_Cmd, READ_DIRECTION+DMA_IDLE_CMD); /* | DMA_INT */
 
@@ -445,8 +448,8 @@ dc390_DataIn_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
                pSRB->pSegmentList++;
                psgl = pSRB->pSegmentList;
 
-               pSRB->SGBusAddr = virt_to_bus( psgl->address );
-               pSRB->SGToBeXferLen = (ULONG) psgl->length;
+               pSRB->SGBusAddr = cpu_to_le32(pci_dma_lo32(sg_dma_address(psgl)));
+               pSRB->SGToBeXferLen = cpu_to_le32(sg_dma_len(psgl));
            }
            else
                pSRB->SGToBeXferLen = 0;
@@ -457,7 +460,7 @@ dc390_DataIn_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
            bval = DC390_read8 (Current_Fifo);
            while( bval & 0x1f )
            {
-               DEBUG1(printk (KERN_DEBUG "Check for residuals,");)
+               DEBUG1(printk (KERN_DEBUG "Check for residuals,"));
                if( (bval & 0x1f) == 1 )
                {
                    for(i=0; i < 0x100; i++)
@@ -488,7 +491,7 @@ din_1:
            //DC390_write8 (DMA_Cmd, READ_DIRECTION+DMA_IDLE_CMD); /* | DMA_INT */
            dc390_laststatus &= ~0xff000000; dc390_laststatus |= bval << 24;
 
-           DEBUG1(printk (KERN_DEBUG "Blast: Read %i times DMA_Status %02x", 0xa000-i, bval);)
+           DEBUG1(printk (KERN_DEBUG "Blast: Read %i times DMA_Status %02x", 0xa000-i, bval));
            ResidCnt = (UINT) DC390_read8 (CtcReg_High);
            ResidCnt <<= 8;
            ResidCnt |= (UINT) DC390_read8 (CtcReg_Mid);
@@ -510,7 +513,7 @@ din_1:
                pSRB->SGToBeXferLen--;
            }
            DEBUG1(printk (KERN_DEBUG "Xfered: %li, Total: %li, Remaining: %li\n", xferCnt,\
-                          pSRB->TotalXferredLen, pSRB->SGToBeXferLen);)
+                          pSRB->TotalXferredLen, pSRB->SGToBeXferLen));
 
        }
     }
@@ -579,7 +582,7 @@ dc390_MsgIn_reject (PACB pACB, PSRB pSRB)
 {
   pSRB->MsgOutBuf[0] = MESSAGE_REJECT;
   pSRB->MsgCnt = 1; DC390_ENABLE_MSGOUT;
-  DEBUG0 (printk (KERN_INFO "DC390: Reject message\n");)
+  DEBUG0 (printk (KERN_INFO "DC390: Reject message\n"));
 }
 
 /* abort command */
@@ -724,57 +727,55 @@ dc390_MsgIn_set_sync (PACB pACB, PSRB pSRB)
 
 
 /* handle RESTORE_PTR */
+/* I presume, this command is already mapped, so, have to remap. */
 static void 
 dc390_restore_ptr (PACB pACB, PSRB pSRB)
 {
-  PSGL psgl;
-  pSRB->TotalXferredLen = 0;
-  pSRB->SGIndex = 0;
-  if( pSRB->pcmd->use_sg )
-    {
-      pSRB->SGcount = (UCHAR) pSRB->pcmd->use_sg;
-      pSRB->pSegmentList = (PSGL) pSRB->pcmd->request_buffer;
-      psgl = pSRB->pSegmentList;
-      while (pSRB->TotalXferredLen + (ULONG) psgl->length < pSRB->Saved_Ptr)
+    Scsi_Cmnd* pcmd = pSRB->pcmd;
+    PSGL psgl;
+    pSRB->TotalXferredLen = 0;
+    pSRB->SGIndex = 0;
+    if (pcmd->use_sg) {
+       pSRB->pSegmentList = (PSGL) pcmd->request_buffer;
+       psgl = pSRB->pSegmentList;
+       //dc390_pci_sync(pSRB);
+
+       while (pSRB->TotalXferredLen + (ULONG) psgl->length < pSRB->Saved_Ptr)
        {
-         pSRB->TotalXferredLen += (ULONG) psgl->length;
-         pSRB->SGIndex++;
-         if( pSRB->SGIndex < pSRB->SGcount )
+           pSRB->TotalXferredLen += (ULONG) psgl->length;
+           pSRB->SGIndex++;
+           if( pSRB->SGIndex < pSRB->SGcount )
            {
-             pSRB->pSegmentList++;
-             psgl = pSRB->pSegmentList;
-             
-             pSRB->SGBusAddr = virt_to_bus( psgl->address );
-             pSRB->SGToBeXferLen = (ULONG) psgl->length;
+               pSRB->pSegmentList++;
+               psgl = pSRB->pSegmentList;
+               pSRB->SGBusAddr = cpu_to_le32(pci_dma_lo32(sg_dma_address(psgl)));
+               pSRB->SGToBeXferLen = cpu_to_le32(sg_dma_len(psgl));
            }
-         else
-           pSRB->SGToBeXferLen = 0;
+           else
+               pSRB->SGToBeXferLen = 0;
        }
-      pSRB->SGToBeXferLen -= (pSRB->Saved_Ptr - pSRB->TotalXferredLen);
-      pSRB->SGBusAddr += (pSRB->Saved_Ptr - pSRB->TotalXferredLen);
-      printk (KERN_INFO "DC390: Pointer restored. Segment %i, Total %li, Bus %08lx\n", pSRB->SGIndex, pSRB->Saved_Ptr, pSRB->SGBusAddr);
-    }
-    else if( pSRB->pcmd->request_buffer )
-    {
+       pSRB->SGToBeXferLen -= (pSRB->Saved_Ptr - pSRB->TotalXferredLen);
+       pSRB->SGBusAddr += (pSRB->Saved_Ptr - pSRB->TotalXferredLen);
+       printk (KERN_INFO "DC390: Pointer restored. Segment %i, Total %li, Bus %08lx\n",
+               pSRB->SGIndex, pSRB->Saved_Ptr, pSRB->SGBusAddr);
+
+    } else if(pcmd->request_buffer) {
+       //dc390_pci_sync(pSRB);
+
+       pSRB->Segmentx.length = pcmd->request_bufflen - pSRB->Saved_Ptr;
        pSRB->SGcount = 1;
        pSRB->pSegmentList = (PSGL) &pSRB->Segmentx;
-       pSRB->Segmentx.address = (PUCHAR) pSRB->pcmd->request_buffer + pSRB->Saved_Ptr;
-       pSRB->Segmentx.length = pSRB->pcmd->request_bufflen - pSRB->Saved_Ptr;
-       printk (KERN_INFO "DC390: Pointer restored. Total %li, Bus %p\n",
-               pSRB->Saved_Ptr, pSRB->Segmentx.address);
-    }
-     else
-       {
+    } else {
         pSRB->SGcount = 0;
         printk (KERN_INFO "DC390: RESTORE_PTR message for Transfer without Scatter-Gather ??\n");
-       };
+    }
 
   pSRB->TotalXferredLen = pSRB->Saved_Ptr;
 };
 
 
 /* According to the docs, the AM53C974 reads the message and 
- * generates a Succesful Operation IRQ before asserting ACK for
+ * generates a Successful Operation IRQ before asserting ACK for
  * the last byte (how does it know whether it's the last ?) */
 /* The old code handled it in another way, indicating, that on
  * every message byte an IRQ is generated and every byte has to
@@ -811,7 +812,7 @@ dc390_MsgIn_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
     /* Msg complete ? */
     if (dc390_MsgIn_complete (pSRB->MsgInBuf, pACB->MsgLen))
       {
-       DEBUG0 (printk (KERN_INFO "DC390: MsgIn:"); dc390_printMsg (pSRB->MsgInBuf, pACB->MsgLen);)
+       DEBUG0 (printk (KERN_INFO "DC390: MsgIn:"); dc390_printMsg (pSRB->MsgInBuf, pACB->MsgLen));
        /* Now eval the msg */
        switch (pSRB->MsgInBuf[0]) 
          {
@@ -853,7 +854,7 @@ dc390_MsgIn_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
            break;
            // The device might want to restart transfer with a RESTORE
          case RESTORE_POINTERS:
-           DEBUG0(printk ("DC390: RESTORE POINTER message received ... try to handle\n");)
+           DEBUG0(printk ("DC390: RESTORE POINTER message received ... try to handle\n"));
            dc390_restore_ptr (pACB, pSRB);
            break;
 
@@ -864,7 +865,7 @@ dc390_MsgIn_0( PACB pACB, PSRB pSRB, PUCHAR psstatus)
        /* Clear counter and MsgIn state */
        pSRB->SRBState &= ~SRB_MSGIN;
        pACB->MsgLen = 0;
-      };
+      }
 
     *psstatus = SCSI_NOP0;
     DC390_write8 (ScsiCmd, MSG_ACCEPTED_CMD);
@@ -895,12 +896,12 @@ dc390_DataIO_Comm( PACB pACB, PSRB pSRB, UCHAR ioDir)
        if( !pSRB->SGToBeXferLen )
        {
            psgl = pSRB->pSegmentList;
-           pSRB->SGBusAddr = virt_to_bus( psgl->address );
-           pSRB->SGToBeXferLen = (ULONG) psgl->length;
-           DEBUG1(printk (KERN_DEBUG " DC390: Next SG segment.");)
+           pSRB->SGBusAddr = cpu_to_le32(pci_dma_lo32(sg_dma_address(psgl)));
+           pSRB->SGToBeXferLen = cpu_to_le32(sg_dma_len(psgl));
+           DEBUG1(printk (KERN_DEBUG " DC390: Next SG segment."));
        }
        lval = pSRB->SGToBeXferLen;
-       DEBUG1(printk (KERN_DEBUG " DC390: Start transfer: %li bytes (address %08lx)\n", lval, pSRB->SGBusAddr);)
+       DEBUG1(printk (KERN_DEBUG " DC390: Start transfer: %li bytes (address %08lx)\n", lval, pSRB->SGBusAddr));
        DC390_write8 (CtcReg_Low, (UCHAR) lval);
        lval >>= 8;
        DC390_write8 (CtcReg_Mid, (UCHAR) lval);
@@ -916,9 +917,9 @@ dc390_DataIO_Comm( PACB pACB, PSRB pSRB, UCHAR ioDir)
        DC390_write8 (ScsiCmd, DMA_COMMAND+INFO_XFER_CMD);
 
        DC390_write8 (DMA_Cmd, DMA_START_CMD | ioDir | DMA_INT);
-       //DEBUG1(DC390_write32 (DMA_ScsiBusCtrl, WRT_ERASE_DMA_STAT | EN_INT_ON_PCI_ABORT);)
-       //DEBUG1(printk (KERN_DEBUG "DC390: DMA_Status: %02x\n", DC390_read8 (DMA_Status));)
-       //DEBUG1(DC390_write32 (DMA_ScsiBusCtrl, EN_INT_ON_PCI_ABORT);)
+       //DEBUG1(DC390_write32 (DMA_ScsiBusCtrl, WRT_ERASE_DMA_STAT | EN_INT_ON_PCI_ABORT));
+       //DEBUG1(printk (KERN_DEBUG "DC390: DMA_Status: %02x\n", DC390_read8 (DMA_Status)));
+       //DEBUG1(DC390_write32 (DMA_ScsiBusCtrl, EN_INT_ON_PCI_ABORT));
     }
     else    /* xfer pad */
     {
@@ -926,9 +927,9 @@ dc390_DataIO_Comm( PACB pACB, PSRB pSRB, UCHAR ioDir)
        {
            pSRB->AdaptStatus = H_OVER_UNDER_RUN;
            pSRB->SRBStatus |= OVER_RUN;
-           DEBUG0(printk (KERN_WARNING " DC390: Overrun -");)
+           DEBUG0(printk (KERN_WARNING " DC390: Overrun -"));
        }
-       DEBUG0(printk (KERN_WARNING " Clear transfer pad \n");)
+       DEBUG0(printk (KERN_WARNING " Clear transfer pad \n"));
        DC390_write8 (CtcReg_Low, 0);
        DC390_write8 (CtcReg_Mid, 0);
        DC390_write8 (CtcReg_High, 0);
@@ -981,7 +982,7 @@ dc390_CommandPhase( PACB pACB, PSRB pSRB, PUCHAR psstatus)
        DC390_write8 (ScsiFifo, bval);
        DC390_write8 (ScsiFifo, sizeof(pSRB->pcmd->sense_buffer));
        DC390_write8 (ScsiFifo, bval);
-       DEBUG0(printk(KERN_DEBUG "DC390: AutoReqSense (CmndPhase)!\n");)
+       DEBUG0(printk(KERN_DEBUG "DC390: AutoReqSense (CmndPhase)!\n"));
     }
     pSRB->SRBState = SRB_COMMAND;
     DC390_write8 (ScsiCmd, INFO_XFER_CMD);
@@ -1111,7 +1112,7 @@ dc390_Disconnect( PACB pACB )
     PSRB   pSRB, psrb;
     UCHAR  i, cnt;
 
-    DEBUG0(printk(KERN_INFO "DISC,");)
+    DEBUG0(printk(KERN_INFO "DISC,"));
 
     if (!pACB->Connected) printk(KERN_ERR "DC390: Disconnect not-connected bus?\n");
     pACB->Connected = 0;
@@ -1120,7 +1121,7 @@ dc390_Disconnect( PACB pACB )
      {
        int j = 400;
        DEBUG0(printk(KERN_ERR "ACB:%p->ActiveDCB:%p IOPort:%04x IRQ:%02x !\n",\
-              pACB, pDCB, pACB->IOPortBase, pACB->IRQLevel);)
+              pACB, pDCB, pACB->IOPortBase, pACB->IRQLevel));
        while (--j) udelay (1000);
        DC390_read8 (INT_Status);       /* Reset Pending INT */
        DC390_write8 (ScsiCmd, EN_SEL_RESEL);
@@ -1194,12 +1195,12 @@ dc390_Reselect( PACB pACB )
     PSRB   pSRB;
     UCHAR  id, lun;
 
-    DEBUG0(printk(KERN_INFO "RSEL,");)
+    DEBUG0(printk(KERN_INFO "RSEL,"));
     pACB->Connected = 1;
     pDCB = pACB->pActiveDCB;
     if( pDCB )
     {  /* Arbitration lost but Reselection won */
-       DEBUG0(printk ("DC390: (ActiveDCB != 0: Arb. lost but resel. won)!\n");)
+       DEBUG0(printk ("DC390: (ActiveDCB != 0: Arb. lost but resel. won)!\n"));
        pSRB = pDCB->pActiveSRB;
        if( !( pACB->scan_devices ) )
        {
@@ -1211,7 +1212,7 @@ dc390_Reselect( PACB pACB )
     }
     /* Get ID */
     lun = DC390_read8 (ScsiFifo);
-    DEBUG0(printk ("Dev %02x,", lun);)
+    DEBUG0(printk ("Dev %02x,", lun));
     if (!(lun & (1 << pACB->pScsiHost->this_id)))
       printk (KERN_ERR "DC390: Reselection must select host adapter: %02x!\n", lun);
     else
@@ -1221,7 +1222,7 @@ dc390_Reselect( PACB pACB )
     lun = DC390_read8 (ScsiFifo);
     if (!(lun & IDENTIFY_BASE)) printk (KERN_ERR "DC390: Resel: Expect identify message!\n");
     lun &= 7;
-    DEBUG0(printk ("(%02i-%i),", id, lun);)
+    DEBUG0(printk ("(%02i-%i),", id, lun));
     pDCB = dc390_findDCB (pACB, id, lun);
     if (!pDCB)
     {
@@ -1262,7 +1263,7 @@ dc390_Reselect( PACB pACB )
        }
     }
 
-    DEBUG1(printk (KERN_DEBUG "Resel SRB(%p): TagNum (%02x)\n", pSRB, pSRB->TagNumber);)
+    DEBUG1(printk (KERN_DEBUG "Resel SRB(%p): TagNum (%02x)\n", pSRB, pSRB->TagNumber));
     pSRB->ScsiPhase = SCSI_NOP0;
     DC390_write8 (Scsi_Dest_ID, pDCB->TargetID);
     DC390_write8 (Sync_Period, pDCB->SyncPeriod);
@@ -1282,7 +1283,7 @@ dc390_remove_dev (PACB pACB, PDCB pDCB)
    if (pDCB->GoingSRBCnt > 1)
      {
        DCBDEBUG(printk (KERN_INFO "DC390: Driver won't free DCB (ID %i, LUN %i): 0x%08x because of SRBCnt %i\n",\
-               pDCB->TargetID, pDCB->TargetLUN, (int)pDCB, pDCB->GoingSRBCnt);)
+               pDCB->TargetID, pDCB->TargetLUN, (int)pDCB, pDCB->GoingSRBCnt));
        return;
      };
    pACB->DCBmap[pDCB->TargetID] &= ~(1 << pDCB->TargetLUN);
@@ -1304,7 +1305,7 @@ dc390_remove_dev (PACB pACB, PDCB pDCB)
    }
 
    DCBDEBUG(printk (KERN_INFO "DC390: Driver about to free DCB (ID %i, LUN %i): %p\n",\
-          pDCB->TargetID, pDCB->TargetLUN, pDCB);)
+          pDCB->TargetID, pDCB->TargetLUN, pDCB));
    if (pDCB == pACB->pActiveDCB) pACB->pActiveDCB = 0;
    if (pDCB == pACB->pLinkDCB) pACB->pLinkDCB = pDCB->pNextDCB;
    if (pDCB == pACB->pDCBRunRobin) pACB->pDCBRunRobin = pDCB->pNextDCB;
@@ -1366,14 +1367,18 @@ dc390_SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB )
     PSGL   ptr2;
     ULONG  swlval;
 
-    pcmd = pSRB->pcmd; DCB_removed = 0;
+    pcmd = pSRB->pcmd;
+    /* KG: Moved pci_unmap here */
+    dc390_pci_unmap(pSRB);
+
+    DCB_removed = 0;
     status = pSRB->TargetStatus;
     ptr = (PSCSI_INQDATA) (pcmd->request_buffer);
     if( pcmd->use_sg )
-       ptr = (PSCSI_INQDATA) (((PSGL) ptr)->address);
+       ptr = (PSCSI_INQDATA) sg_dma_address((PSGL) ptr);
        
     DEBUG0(printk (" SRBdone (%02x,%08x), SRB %p, pid %li\n", status, pcmd->result,\
-               pSRB, pcmd->pid);)
+               pSRB, pcmd->pid));
     if(pSRB->SRBFlag & AUTO_REQSENSE)
     {  /* Last command was a Request Sense */
        pSRB->SRBFlag &= ~AUTO_REQSENSE;
@@ -1415,7 +1420,7 @@ dc390_SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB )
            else
                  pcmd->result = MK_RES_LNX(DRIVER_SENSE,DID_OK,0,CHECK_CONDITION);
                  REMOVABLEDEBUG(printk(KERN_INFO "Cmd=%02x,Result=%08x,XferL=%08x\n",pSRB->pcmd->cmnd[0],\
-                       (UINT) pcmd->result, (UINT) pSRB->TotalXferredLen);)
+                       (UINT) pcmd->result, (UINT) pSRB->TotalXferredLen));
            goto ckc_e;
        }
        else /* Retry */
@@ -1430,24 +1435,17 @@ dc390_SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB )
            {
                pcmd->result = MK_RES_LNX(DRIVER_SENSE,DID_OK,0,CHECK_CONDITION);
                REMOVABLEDEBUG(printk(KERN_INFO "Cmd=%02x, Result=%08x, XferL=%08x\n",pSRB->pcmd->cmnd[0],\
-                      (UINT) pcmd->result, (UINT) pSRB->TotalXferredLen);)
+                      (UINT) pcmd->result, (UINT) pSRB->TotalXferredLen));
                goto ckc_e;
            }
            SET_RES_DRV(pcmd->result,DRIVER_SENSE);
-           pSRB->SGcount        = (UCHAR) pSRB->SavedSGCount;
+           pcmd->use_sg         = pSRB->SavedSGCount;
            //pSRB->ScsiCmdLen   = (UCHAR) (pSRB->Segment1[0] >> 8);
-           DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->target, pcmd->lun);)
+           DEBUG0 (printk ("DC390: RETRY pid %li (%02x), target %02i-%02i\n", pcmd->pid, pcmd->cmnd[0], pcmd->device->id, pcmd->device->lun));
            pSRB->SGIndex = 0;
            pSRB->TotalXferredLen = 0;
            pSRB->SGToBeXferLen = 0;
-           if( pcmd->use_sg )
-               pSRB->pSegmentList = (PSGL) pcmd->request_buffer;
-           else if( pcmd->request_buffer )
-           {
-               pSRB->pSegmentList = (PSGL) &pSRB->Segmentx;
-               pSRB->Segmentx.address = (PUCHAR) pcmd->request_buffer;
-               pSRB->Segmentx.length = pcmd->request_bufflen;
-           }
+
            if( dc390_StartSCSI( pACB, pDCB, pSRB ) ) {
                dc390_Going_to_Waiting ( pDCB, pSRB );
                dc390_waiting_timer (pACB, HZ/5);
@@ -1460,7 +1458,7 @@ dc390_SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB )
        if( status_byte(status) == CHECK_CONDITION )
        {
            REMOVABLEDEBUG(printk (KERN_INFO "DC390: Check_Condition (Cmd %02x, Id %02x, LUN %02x)\n",\
-                   pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN);)
+                   pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN));
            if( (pSRB->SGIndex < pSRB->SGcount) && (pSRB->SGcount) && (pSRB->SGToBeXferLen) )
            {
                bval = pSRB->SGcount;
@@ -1472,7 +1470,7 @@ dc390_SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB )
                    ptr2++;
                }
                REMOVABLEDEBUG(printk(KERN_INFO "XferredLen=%08x,NotXferLen=%08x\n",\
-                       (UINT) pSRB->TotalXferredLen, (UINT) swlval);)
+                       (UINT) pSRB->TotalXferredLen, (UINT) swlval));
            }
            dc390_RequestSense( pACB, pDCB, pSRB );
            return;
@@ -1515,14 +1513,6 @@ dc390_SRBdone( PACB pACB, PDCB pDCB, PSRB pSRB )
                pSRB->SGIndex = 0;
                pSRB->TotalXferredLen = 0;
                pSRB->SGToBeXferLen = 0;
-               if( pcmd->use_sg )
-                   pSRB->pSegmentList = (PSGL) pcmd->request_buffer;
-               else if( pcmd->request_buffer )
-               {
-                   pSRB->pSegmentList = (PSGL) &pSRB->Segmentx;
-                   pSRB->Segmentx.address = (PUCHAR) pcmd->request_buffer;
-                   pSRB->Segmentx.length = pcmd->request_bufflen;
-               }
                if( dc390_StartSCSI( pACB, pDCB, pSRB ) ) {
                    dc390_Going_to_Waiting ( pDCB, pSRB );
                    dc390_waiting_timer (pACB, HZ/5);
@@ -1637,7 +1627,7 @@ ckc_e:
     /* Add to free list */
     dc390_Free_insert (pACB, pSRB);
 
-    DEBUG0(printk (KERN_DEBUG "DC390: SRBdone: done pid %li\n", pcmd->pid);)
+    DEBUG0(printk (KERN_DEBUG "DC390: SRBdone: done pid %li\n", pcmd->pid));
     DC390_UNLOCK_ACB_NI;
     pcmd->scsi_done (pcmd);
     DC390_LOCK_ACB_NI;
@@ -1677,7 +1667,7 @@ dc390_DoingSRB_Done( PACB pACB, PSCSICMD cmd )
 
 /*         ReleaseSRB( pDCB, pSRB ); */
 
-           DEBUG0(printk (KERN_DEBUG "DC390: DoingSRB_Done: done pid %li\n", pcmd->pid);)
+           DEBUG0(printk (KERN_DEBUG "DC390: DoingSRB_Done: done pid %li\n", pcmd->pid));
            DC390_UNLOCK_ACB_NI;
            pcmd->scsi_done( pcmd );
            DC390_LOCK_ACB_NI;
@@ -1712,7 +1702,7 @@ static void
 dc390_ScsiRstDetect( PACB pACB )
 {
     printk ("DC390: Rst_Detect: laststat = %08x\n", dc390_laststatus);
-    //DEBUG0(printk(KERN_INFO "RST_DETECT,");)
+    //DEBUG0(printk(KERN_INFO "RST_DETECT,"));
 
     if (timer_pending (&pACB->Waiting_Timer)) del_timer (&pACB->Waiting_Timer);
     DC390_write8 (DMA_Cmd, DMA_IDLE_CMD);
@@ -1746,25 +1736,23 @@ dc390_RequestSense( PACB pACB, PDCB pDCB, PSRB pSRB )
 {
     PSCSICMD  pcmd;
 
+    pcmd = pSRB->pcmd;
+
     REMOVABLEDEBUG(printk (KERN_INFO "DC390: RequestSense (Cmd %02x, Id %02x, LUN %02x)\n",\
-           pSRB->pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN);)
+           pcmd->cmnd[0], pDCB->TargetID, pDCB->TargetLUN));
 
     pSRB->SRBFlag |= AUTO_REQSENSE;
     //pSRB->Segment0[0] = (UINT) pSRB->CmdBlock[0];
     //pSRB->Segment0[1] = (UINT) pSRB->CmdBlock[4];
-    //pSRB->Segment1[0] = ((UINT)(pSRB->pcmd->cmd_len) << 8) + pSRB->SGcount;
+    //pSRB->Segment1[0] = ((UINT)(pcmd->cmd_len) << 8) + pSRB->SGcount;
     //pSRB->Segment1[1] = pSRB->TotalXferredLen;
-    pSRB->SavedSGCount = pSRB->SGcount;
+    pSRB->SavedSGCount = pcmd->use_sg;
     pSRB->SavedTotXLen = pSRB->TotalXferredLen;
     pSRB->AdaptStatus = 0;
     pSRB->TargetStatus = 0; /* CHECK_CONDITION<<1; */
 
-    pcmd = pSRB->pcmd;
-
-    pSRB->Segmentx.address = (PUCHAR) &(pcmd->sense_buffer);
-    pSRB->Segmentx.length = sizeof(pcmd->sense_buffer);
-    pSRB->pSegmentList = &pSRB->Segmentx;
-    pSRB->SGcount = 1;
+    /* We are called from SRBdone, original PCI mapping has been removed
+     * already, new one is set up from StartSCSI */
     pSRB->SGIndex = 0;
 
     //pSRB->CmdBlock[0] = REQUEST_SENSE;
index d4b4330..4c9f0d4 100644 (file)
@@ -18,8 +18,7 @@
  *
  */
 #include <linux/config.h>
-static char *sg_version_str = "3.5.29 [20030529]";
-static int sg_version_num = 30529;     /* 2 digits for each component */
+static int sg_version_num = 30530;     /* 2 digits for each component */
 /*
  *  D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au), notes:
  *      - scsi logging is available via SCSI_LOG_TIMEOUT macros. First
@@ -56,6 +55,8 @@ static int sg_version_num = 30529;    /* 2 digits for each component */
 #include <linux/smp_lock.h>
 #include <linux/moduleparam.h>
 #include <linux/devfs_fs_kernel.h>
+#include <linux/cdev.h>
+#include <linux/seq_file.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
@@ -72,6 +73,8 @@ static int sg_version_num = 30529;    /* 2 digits for each component */
 
 #ifdef CONFIG_SCSI_PROC_FS
 #include <linux/proc_fs.h>
+static char *sg_version_str = "3.5.30 [20031010]";
+
 static int sg_proc_init(void);
 static void sg_proc_cleanup(void);
 #endif
@@ -83,7 +86,7 @@ static void sg_proc_cleanup(void);
 #define SG_ALLOW_DIO_DEF 0
 #define SG_ALLOW_DIO_CODE /* compile out by commenting this define */
 
-#define SG_MAX_DEVS_MASK (256 - 1)
+#define SG_MAX_DEVS 8192
 
 /*
  * Suppose you want to calculate the formula muldiv(x,m,d)=int(x * m / d)
@@ -182,6 +185,7 @@ typedef struct sg_device { /* holds the state of each scsi generic device */
        volatile char exclude;  /* opened for exclusive access */
        char sgdebug;           /* 0->off, 1->sense, 9->dump dev, 10-> all devs */
        struct gendisk *disk;
+       struct cdev * cdev;     /* char_dev [sysfs: /sys/cdev/major/sg<n>] */
 } Sg_device;
 
 static int sg_fasync(int fd, struct file *filp, int mode);
@@ -219,7 +223,6 @@ static int sg_ms_to_jif(unsigned int msecs);
 static inline unsigned sg_jif_to_ms(int jifs);
 static int sg_allow_access(unsigned char opcode, char dev_type);
 static int sg_build_direct(Sg_request * srp, Sg_fd * sfp, int dxfer_len);
-// static void sg_unmap_and(Sg_scatter_hold * schp, int free_also);
 static Sg_device *sg_get_dev(int dev);
 static inline unsigned char *sg_scatg2virt(const struct scatterlist *sclp);
 #ifdef CONFIG_SCSI_PROC_FS
@@ -243,7 +246,7 @@ sg_open(struct inode *inode, struct file *filp)
        Sg_device *sdp;
        Sg_fd *sfp;
        int res;
-       int retval = -EBUSY;
+       int retval;
 
        SCSI_LOG_TIMEOUT(3, printk("sg_open: dev=%d, flags=0x%x\n", dev, flags));
        sdp = sg_get_dev(dev);
@@ -270,8 +273,10 @@ sg_open(struct inode *inode, struct file *filp)
                        retval = -EPERM; /* Can't lock it with read only access */
                        goto error_out;
                }
-               if (sdp->headfp && (flags & O_NONBLOCK))
+               if (sdp->headfp && (flags & O_NONBLOCK)) {
+                       retval = -EBUSY;
                        goto error_out;
+               }
                res = 0;
                __wait_event_interruptible(sdp->o_excl_wait,
                        ((sdp->headfp || sdp->exclude) ? 0 : (sdp->exclude = 1)), res);
@@ -280,8 +285,10 @@ sg_open(struct inode *inode, struct file *filp)
                        goto error_out;
                }
        } else if (sdp->exclude) {      /* some other fd has an exclusive lock on dev */
-               if (flags & O_NONBLOCK)
+               if (flags & O_NONBLOCK) {
+                       retval = -EBUSY;
                        goto error_out;
+               }
                res = 0;
                __wait_event_interruptible(sdp->o_excl_wait, (!sdp->exclude),
                                           res);
@@ -877,8 +884,8 @@ sg_ioctl(struct inode *inode, struct file *filp,
                result = get_user(val, (int *) arg);
                if (result)
                        return result;
-               if (val < 0)
-                       return -EINVAL;
+                if (val < 0)
+                        return -EINVAL;
                if (val != sfp->reserve.bufflen) {
                        if (sg_res_in_use(sfp) || sfp->mmap_called)
                                return -EBUSY;
@@ -1118,7 +1125,7 @@ sg_rb_correct4mmap(Sg_scatter_hold * rsv_schp, int startFinish)
 }
 
 static struct page *
-sg_vma_nopage(struct vm_area_struct *vma, unsigned long addr, int unused)
+sg_vma_nopage(struct vm_area_struct *vma, unsigned long addr, int *type)
 {
        Sg_fd *sfp;
        struct page *page = NOPAGE_SIGBUS;
@@ -1158,6 +1165,8 @@ sg_vma_nopage(struct vm_area_struct *vma, unsigned long addr, int unused)
                page = virt_to_page(page_ptr);
                get_page(page); /* increment page count */
        }
+       if (type)
+               *type = VM_FAULT_MINOR;
        return page;
 }
 
@@ -1325,18 +1334,22 @@ static struct file_operations sg_fops = {
 };
 
 static int
-sg_add(struct class_device *cdev)
+sg_add(struct class_device *cl_dev)
 {
-       struct scsi_device *scsidp = to_scsi_device(cdev->dev);
+       struct scsi_device *scsidp = to_scsi_device(cl_dev->dev);
        struct gendisk *disk;
        Sg_device *sdp = NULL;
        unsigned long iflags;
+       struct cdev * cdev = NULL;
        int k, error;
 
        disk = alloc_disk(1);
        if (!disk)
                return -ENOMEM;
 
+       cdev = cdev_alloc();
+       if (! cdev)
+               return -ENOMEM;
        write_lock_irqsave(&sg_dev_arr_lock, iflags);
        if (sg_nr_dev >= sg_dev_max) {  /* try to resize */
                Sg_device **tmp_da;
@@ -1364,13 +1377,13 @@ find_empty_slot:
        for (k = 0; k < sg_dev_max; k++)
                if (!sg_dev_arr[k])
                        break;
-       if (k > SG_MAX_DEVS_MASK) {
+       if (k >= SG_MAX_DEVS) {
                write_unlock_irqrestore(&sg_dev_arr_lock, iflags);
                printk(KERN_WARNING
                       "Unable to attach sg device <%d, %d, %d, %d>"
-                      " type=%d, minor number exceed %d\n",
+                      " type=%d, minor number exceeds %d\n",
                       scsidp->host->host_no, scsidp->channel, scsidp->id,
-                      scsidp->lun, scsidp->type, SG_MAX_DEVS_MASK);
+                      scsidp->lun, scsidp->type, SG_MAX_DEVS - 1);
                if (NULL != sdp)
                        vfree((char *) sdp);
                error = -ENODEV;
@@ -1396,15 +1409,14 @@ find_empty_slot:
        SCSI_LOG_TIMEOUT(3, printk("sg_attach: dev=%d \n", k));
        memset(sdp, 0, sizeof(*sdp));
        sprintf(disk->disk_name, "sg%d", k);
+       strncpy(cdev->kobj.name, disk->disk_name, KOBJ_NAME_LEN);
+       cdev->owner = THIS_MODULE;
+       cdev->ops = &sg_fops;
        disk->major = SCSI_GENERIC_MAJOR;
        disk->first_minor = k;
        sdp->disk = disk;
        sdp->device = scsidp;
        init_waitqueue_head(&sdp->o_excl_wait);
-       sdp->headfp = NULL;
-       sdp->exclude = 0;
-       sdp->sgdebug = 0;
-       sdp->detached = 0;
        sdp->sg_tablesize = scsidp->host ? scsidp->host->sg_tablesize : 0;
 
        sg_nr_dev++;
@@ -1414,6 +1426,22 @@ find_empty_slot:
        devfs_mk_cdev(MKDEV(SCSI_GENERIC_MAJOR, k),
                        S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP,
                        "%s/generic", scsidp->devfs_name);
+       error = cdev_add(cdev, MKDEV(SCSI_GENERIC_MAJOR, k), 1);
+       if (error) {
+               devfs_remove("%s/generic", scsidp->devfs_name);
+               goto out;
+       }
+       sdp->cdev = cdev;
+       error = sysfs_create_link(&cdev->kobj, &scsidp->sdev_gendev.kobj, 
+                                 "device");
+       if (error)
+               printk(KERN_ERR "sg_attach: unable to make symlink 'device'"
+                      " for sg%d\n", k);
+       error = sysfs_create_link(&scsidp->sdev_gendev.kobj, &cdev->kobj, 
+                                 "generic");
+       if (error)
+               printk(KERN_ERR "sg_attach: unable to make symlink 'generic'"
+                      " back to sg%d\n", k);
 
        printk(KERN_NOTICE
               "Attached scsi generic sg%d at scsi%d, channel"
@@ -1425,13 +1453,15 @@ find_empty_slot:
 
 out:
        put_disk(disk);
+       if (cdev)
+               kobject_put(&cdev->kobj);
        return error;
 }
 
 static void
-sg_remove(struct class_device *cdev)
+sg_remove(struct class_device *cl_dev)
 {
-       struct scsi_device *scsidp = to_scsi_device(cdev->dev);
+       struct scsi_device *scsidp = to_scsi_device(cl_dev->dev);
        Sg_device *sdp = NULL;
        unsigned long iflags;
        Sg_fd *sfp;
@@ -1481,6 +1511,10 @@ sg_remove(struct class_device *cdev)
        write_unlock_irqrestore(&sg_dev_arr_lock, iflags);
 
        if (sdp) {
+               sysfs_remove_link(&scsidp->sdev_gendev.kobj, "generic");
+               sysfs_remove_link(&sdp->cdev->kobj, "device");
+               cdev_del(sdp->cdev);
+               sdp->cdev = NULL;
                devfs_remove("%s/generic", scsidp->devfs_name);
                put_disk(sdp->disk);
                sdp->disk = NULL;
@@ -1513,12 +1547,14 @@ init_sg(void)
        if (def_reserved_size >= 0)
                sg_big_buff = def_reserved_size;
 
-       rc = register_chrdev(SCSI_GENERIC_MAJOR, "sg", &sg_fops);
+       rc = register_chrdev_region(MKDEV(SCSI_GENERIC_MAJOR, 0), 
+                                   SG_MAX_DEVS, "sg");
        if (rc)
                return rc;
        rc = scsi_register_interface(&sg_interface);
        if (rc) {
-               unregister_chrdev(SCSI_GENERIC_MAJOR, "sg");
+               unregister_chrdev_region(MKDEV(SCSI_GENERIC_MAJOR, 0),
+                                        SG_MAX_DEVS);
                return rc;
        }
 #ifdef CONFIG_SCSI_PROC_FS
@@ -1534,7 +1570,8 @@ exit_sg(void)
        sg_proc_cleanup();
 #endif                         /* CONFIG_SCSI_PROC_FS */
        scsi_unregister_interface(&sg_interface);
-       unregister_chrdev(SCSI_GENERIC_MAJOR, "sg");
+       unregister_chrdev_region(MKDEV(SCSI_GENERIC_MAJOR, 0),
+                                SG_MAX_DEVS);
        if (sg_dev_arr != NULL) {
                vfree((char *) sg_dev_arr);
                sg_dev_arr = NULL;
@@ -1582,7 +1619,6 @@ sg_finish_rem_req(Sg_request * srp)
        Sg_scatter_hold *req_schp = &srp->data;
 
        SCSI_LOG_TIMEOUT(4, printk("sg_finish_rem_req: res_used=%d\n", (int) srp->res_used));
-       // sg_unmap_and(&srp->data, 1);
        if (srp->res_used)
                sg_unlink_reserve(sfp, srp);
        else
@@ -2590,78 +2626,99 @@ static struct proc_dir_entry *sg_proc_sgp = NULL;
 
 static char sg_proc_sg_dirname[] = "scsi/sg";
 
-static int sg_proc_adio_read(char *buffer, char **start, off_t offset,
-                            int size, int *eof, void *data);
-static int sg_proc_adio_info(char *buffer, int *len, off_t * begin,
-                            off_t offset, int size);
-static int sg_proc_adio_write(struct file *filp, const char *buffer,
-                             unsigned long count, void *data);
-static int sg_proc_dressz_read(char *buffer, char **start, off_t offset,
-                              int size, int *eof, void *data);
-static int sg_proc_dressz_info(char *buffer, int *len, off_t * begin,
-                              off_t offset, int size);
-static int sg_proc_dressz_write(struct file *filp, const char *buffer,
-                               unsigned long count, void *data);
-static int sg_proc_debug_read(char *buffer, char **start, off_t offset,
-                             int size, int *eof, void *data);
-static int sg_proc_debug_info(char *buffer, int *len, off_t * begin,
-                             off_t offset, int size);
-static int sg_proc_dev_read(char *buffer, char **start, off_t offset,
-                           int size, int *eof, void *data);
-static int sg_proc_dev_info(char *buffer, int *len, off_t * begin,
-                           off_t offset, int size);
-static int sg_proc_devhdr_read(char *buffer, char **start, off_t offset,
-                              int size, int *eof, void *data);
-static int sg_proc_devhdr_info(char *buffer, int *len, off_t * begin,
-                              off_t offset, int size);
-static int sg_proc_devstrs_read(char *buffer, char **start, off_t offset,
-                               int size, int *eof, void *data);
-static int sg_proc_devstrs_info(char *buffer, int *len, off_t * begin,
-                               off_t offset, int size);
-static int sg_proc_version_read(char *buffer, char **start, off_t offset,
-                               int size, int *eof, void *data);
-static int sg_proc_version_info(char *buffer, int *len, off_t * begin,
-                               off_t offset, int size);
+static int sg_proc_seq_show_int(struct seq_file *s, void *v);
+
+static int sg_proc_single_open_adio(struct inode *inode, struct file *file);
+static ssize_t sg_proc_write_adio(struct file *filp, const char __user *buffer,
+                                 size_t count, loff_t *off);
+static struct file_operations adio_fops = {
+       /* .owner, .read and .llseek added in sg_proc_init() */
+       .open = sg_proc_single_open_adio,
+       .write = sg_proc_write_adio,
+       .release = single_release,
+};
+
+static int sg_proc_single_open_dressz(struct inode *inode, struct file *file);
+static ssize_t sg_proc_write_dressz(struct file *filp, 
+               const char __user *buffer, size_t count, loff_t *off);
+static struct file_operations dressz_fops = {
+       .open = sg_proc_single_open_dressz,
+       .write = sg_proc_write_dressz,
+       .release = single_release,
+};
+
+static int sg_proc_seq_show_version(struct seq_file *s, void *v);
+static int sg_proc_single_open_version(struct inode *inode, struct file *file);
+static struct file_operations version_fops = {
+       .open = sg_proc_single_open_version,
+       .release = single_release,
+};
+
+static int sg_proc_seq_show_devhdr(struct seq_file *s, void *v);
+static int sg_proc_single_open_devhdr(struct inode *inode, struct file *file);
+static struct file_operations devhdr_fops = {
+       .open = sg_proc_single_open_devhdr,
+       .release = single_release,
+};
+
+static int sg_proc_seq_show_dev(struct seq_file *s, void *v);
+static int sg_proc_open_dev(struct inode *inode, struct file *file);
+static void * dev_seq_start(struct seq_file *s, loff_t *pos);
+static void * dev_seq_next(struct seq_file *s, void *v, loff_t *pos);
+static void dev_seq_stop(struct seq_file *s, void *v);
+static struct file_operations dev_fops = {
+       .open = sg_proc_open_dev,
+       .release = seq_release,
+};
+static struct seq_operations dev_seq_ops = {
+       .start = dev_seq_start,
+       .next  = dev_seq_next,
+       .stop  = dev_seq_stop,
+       .show  = sg_proc_seq_show_dev,
+};
+
+static int sg_proc_seq_show_devstrs(struct seq_file *s, void *v);
+static int sg_proc_open_devstrs(struct inode *inode, struct file *file);
+static struct file_operations devstrs_fops = {
+       .open = sg_proc_open_devstrs,
+       .release = seq_release,
+};
+static struct seq_operations devstrs_seq_ops = {
+       .start = dev_seq_start,
+       .next  = dev_seq_next,
+       .stop  = dev_seq_stop,
+       .show  = sg_proc_seq_show_devstrs,
+};
+
+static int sg_proc_seq_show_debug(struct seq_file *s, void *v);
+static int sg_proc_open_debug(struct inode *inode, struct file *file);
+static struct file_operations debug_fops = {
+       .open = sg_proc_open_debug,
+       .release = seq_release,
+};
+static struct seq_operations debug_seq_ops = {
+       .start = dev_seq_start,
+       .next  = dev_seq_next,
+       .stop  = dev_seq_stop,
+       .show  = sg_proc_seq_show_debug,
+};
+
 
 struct sg_proc_leaf {
        const char * name;
-       read_proc_t * rf;
-       write_proc_t * wf;
+       struct file_operations * fops;
 };
 
 static struct sg_proc_leaf sg_proc_leaf_arr[] = {
-       {"allow_dio", sg_proc_adio_read, sg_proc_adio_write},
-       {"def_reserved_size", sg_proc_dressz_read, sg_proc_dressz_write},
-       {"debug", sg_proc_debug_read, NULL},
-       {"devices", sg_proc_dev_read, NULL},
-       {"device_hdr", sg_proc_devhdr_read, NULL},
-       {"device_strs", sg_proc_devstrs_read, NULL},
-       {"version", sg_proc_version_read, NULL}
+       {"allow_dio", &adio_fops},
+       {"debug", &debug_fops},
+       {"def_reserved_size", &dressz_fops},
+       {"device_hdr", &devhdr_fops},
+       {"devices", &dev_fops},
+       {"device_strs", &devstrs_fops},
+       {"version", &version_fops}
 };
 
-#define PRINT_PROC(fmt,args...)                                 \
-    do {                                                        \
-       *len += sprintf(buffer + *len, fmt, ##args);            \
-       if (*begin + *len > offset + size)                      \
-           return 0;                                           \
-       if (*begin + *len < offset) {                           \
-           *begin += *len;                                     \
-           *len = 0;                                           \
-       }                                                       \
-    } while(0)
-
-#define SG_PROC_READ_FN(infofp)                                 \
-    do {                                                        \
-       int len = 0;                                            \
-       off_t begin = 0;                                        \
-       *eof = infofp(buffer, &len, &begin, offset, size);      \
-       if (offset >= (begin + len))                            \
-           return 0;                                           \
-       *start = buffer + offset - begin;                       \
-       return (size < (begin + len - offset)) ?                \
-                               size : begin + len - offset;    \
-    } while(0)
-
 static int
 sg_proc_init(void)
 {
@@ -2677,12 +2734,13 @@ sg_proc_init(void)
                return 1;
        for (k = 0; k < num_leaves; ++k) {
                leaf = &sg_proc_leaf_arr[k];
-               mask = leaf->wf ? S_IRUGO | S_IWUSR : S_IRUGO;
+               mask = leaf->fops->write ? S_IRUGO | S_IWUSR : S_IRUGO;
                pdep = create_proc_entry(leaf->name, mask, sg_proc_sgp);
                if (pdep) {
-                       pdep->read_proc = leaf->rf;
-                       if (leaf->wf)
-                               pdep->write_proc = leaf->wf;
+                       leaf->fops->owner = THIS_MODULE,
+                       leaf->fops->read = seq_read,
+                       leaf->fops->llseek = seq_lseek,
+                       pdep->proc_fops = leaf->fops;
                }
        }
        return 0;
@@ -2702,23 +2760,21 @@ sg_proc_cleanup(void)
        remove_proc_entry(sg_proc_sg_dirname, NULL);
 }
 
-static int
-sg_proc_adio_read(char *buffer, char **start, off_t offset,
-                 int size, int *eof, void *data)
+
+static int sg_proc_seq_show_int(struct seq_file *s, void *v)
 {
-       SG_PROC_READ_FN(sg_proc_adio_info);
+       seq_printf(s, "%d\n", *((int *)s->private));
+       return 0;
 }
 
-static int
-sg_proc_adio_info(char *buffer, int *len, off_t * begin, off_t offset, int size)
+static int sg_proc_single_open_adio(struct inode *inode, struct file *file)
 {
-       PRINT_PROC("%d\n", sg_allow_dio);
-       return 1;
+       return single_open(file, sg_proc_seq_show_int, &sg_allow_dio);
 }
 
-static int
-sg_proc_adio_write(struct file *filp, const char *buffer,
-                  unsigned long count, void *data)
+static ssize_t 
+sg_proc_write_adio(struct file *filp, const char __user *buffer,
+                  size_t count, loff_t *off)
 {
        int num;
        char buff[11];
@@ -2733,24 +2789,14 @@ sg_proc_adio_write(struct file *filp, const char *buffer,
        return count;
 }
 
-static int
-sg_proc_dressz_read(char *buffer, char **start, off_t offset,
-                   int size, int *eof, void *data)
+static int sg_proc_single_open_dressz(struct inode *inode, struct file *file)
 {
-       SG_PROC_READ_FN(sg_proc_dressz_info);
+       return single_open(file, sg_proc_seq_show_int, &sg_big_buff);
 }
 
-static int
-sg_proc_dressz_info(char *buffer, int *len, off_t * begin,
-                   off_t offset, int size)
-{
-       PRINT_PROC("%d\n", sg_big_buff);
-       return 1;
-}
-
-static int
-sg_proc_dressz_write(struct file *filp, const char *buffer,
-                    unsigned long count, void *data)
+static ssize_t 
+sg_proc_write_dressz(struct file *filp, const char __user *buffer,
+                    size_t count, loff_t *off)
 {
        int num;
        unsigned long k = ULONG_MAX;
@@ -2770,15 +2816,111 @@ sg_proc_dressz_write(struct file *filp, const char *buffer,
        return -ERANGE;
 }
 
-static int
-sg_proc_debug_read(char *buffer, char **start, off_t offset,
-                  int size, int *eof, void *data)
+static int sg_proc_seq_show_version(struct seq_file *s, void *v)
 {
-       SG_PROC_READ_FN(sg_proc_debug_info);
+       seq_printf(s, "%d\t%s\n", sg_version_num, sg_version_str);
+       return 0;
 }
 
-static int sg_proc_debug_helper(char *buffer, int *len, off_t * begin,
-                               off_t offset, int size, Sg_device * sdp)
+static int sg_proc_single_open_version(struct inode *inode, struct file *file)
+{
+       return single_open(file, sg_proc_seq_show_version, NULL);
+}
+
+static int sg_proc_seq_show_devhdr(struct seq_file *s, void *v)
+{
+       seq_printf(s, "host\tchan\tid\tlun\ttype\topens\tqdepth\tbusy\t"
+                  "online\n");
+       return 0;
+}
+
+static int sg_proc_single_open_devhdr(struct inode *inode, struct file *file)
+{
+       return single_open(file, sg_proc_seq_show_devhdr, NULL);
+}
+
+struct sg_proc_deviter {
+       loff_t  index;
+       size_t  max;
+};
+
+static void * dev_seq_start(struct seq_file *s, loff_t *pos)
+{
+       struct sg_proc_deviter * it = kmalloc(sizeof(*it), GFP_KERNEL);
+
+       if (! it)
+               return NULL;
+       if (NULL == sg_dev_arr)
+               goto err1;
+       it->index = *pos;
+       it->max = sg_last_dev();
+       if (it->index >= it->max)
+               goto err1;
+       return it;
+err1:
+       kfree(it);
+       return NULL;
+}
+
+static void * dev_seq_next(struct seq_file *s, void *v, loff_t *pos)
+{
+       struct sg_proc_deviter * it = (struct sg_proc_deviter *) v;
+
+       *pos = ++it->index;
+       return (it->index < it->max) ? it : NULL;
+}
+
+static void dev_seq_stop(struct seq_file *s, void *v)
+{
+       kfree (v);
+}
+
+static int sg_proc_open_dev(struct inode *inode, struct file *file)
+{
+        return seq_open(file, &dev_seq_ops);
+}
+
+static int sg_proc_seq_show_dev(struct seq_file *s, void *v)
+{
+       struct sg_proc_deviter * it = (struct sg_proc_deviter *) v;
+       Sg_device *sdp;
+       struct scsi_device *scsidp;
+
+       sdp = it ? sg_get_dev(it->index) : NULL;
+       if (sdp && (scsidp = sdp->device) && (!sdp->detached))
+               seq_printf(s, "%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
+                             scsidp->host->host_no, scsidp->channel,
+                             scsidp->id, scsidp->lun, (int) scsidp->type,
+                             1,
+                             (int) scsidp->queue_depth,
+                             (int) scsidp->device_busy,
+                             (int) scsidp->online);
+       else
+               seq_printf(s, "-1\t-1\t-1\t-1\t-1\t-1\t-1\t-1\t-1\n");
+       return 0;
+}
+
+static int sg_proc_open_devstrs(struct inode *inode, struct file *file)
+{
+        return seq_open(file, &devstrs_seq_ops);
+}
+
+static int sg_proc_seq_show_devstrs(struct seq_file *s, void *v)
+{
+       struct sg_proc_deviter * it = (struct sg_proc_deviter *) v;
+       Sg_device *sdp;
+       struct scsi_device *scsidp;
+
+       sdp = it ? sg_get_dev(it->index) : NULL;
+       if (sdp && (scsidp = sdp->device) && (!sdp->detached))
+               seq_printf(s, "%8.8s\t%16.16s\t%4.4s\n",
+                          scsidp->vendor, scsidp->model, scsidp->rev);
+       else
+               seq_printf(s, "<no active device>\n");
+       return 0;
+}
+
+static void sg_proc_debug_helper(struct seq_file *s, Sg_device * sdp)
 {
        int k, m, new_interface, blen, usg;
        Sg_request *srp;
@@ -2787,13 +2929,13 @@ static int sg_proc_debug_helper(char *buffer, int *len, off_t * begin,
        const char * cp;
 
        for (k = 0; (fp = sg_get_nth_sfp(sdp, k)); ++k) {
-               PRINT_PROC("   FD(%d): timeout=%dms bufflen=%d "
+               seq_printf(s, "   FD(%d): timeout=%dms bufflen=%d "
                           "(res)sgat=%d low_dma=%d\n", k + 1,
                           sg_jif_to_ms(fp->timeout),
                           fp->reserve.bufflen,
                           (int) fp->reserve.k_use_sg,
                           (int) fp->low_dma);
-               PRINT_PROC("   cmd_q=%d f_packid=%d k_orphan=%d closed=%d\n",
+               seq_printf(s, "   cmd_q=%d f_packid=%d k_orphan=%d closed=%d\n",
                           (int) fp->cmd_q, (int) fp->force_packid,
                           (int) fp->keep_orphan, (int) fp->closed);
                for (m = 0; (srp = sg_get_nth_request(fp, m)); ++m) {
@@ -2811,166 +2953,77 @@ static int sg_proc_debug_helper(char *buffer, int *len, off_t * begin,
                                else
                                        cp = "     ";
                        }
-                       PRINT_PROC(cp);
+                       seq_printf(s, cp);
                        blen = srp->my_cmdp ? 
                                srp->my_cmdp->sr_bufflen : srp->data.bufflen;
                        usg = srp->my_cmdp ? 
                                srp->my_cmdp->sr_use_sg : srp->data.k_use_sg;
-                       PRINT_PROC(srp->done ? 
+                       seq_printf(s, srp->done ? 
                                   ((1 == srp->done) ?  "rcv:" : "fin:")
                                   : (srp->my_cmdp ? "act:" : "prior:"));
-                       PRINT_PROC(" id=%d blen=%d",
+                       seq_printf(s, " id=%d blen=%d",
                                   srp->header.pack_id, blen);
                        if (srp->done)
-                               PRINT_PROC(" dur=%d", hp->duration);
+                               seq_printf(s, " dur=%d", hp->duration);
                        else
-                               PRINT_PROC(" t_o/elap=%d/%d",
+                               seq_printf(s, " t_o/elap=%d/%d",
                                  new_interface ? hp->timeout : sg_jif_to_ms(fp->timeout),
                                  sg_jif_to_ms(hp->duration ? (jiffies - hp->duration) : 0));
-                       PRINT_PROC("ms sgat=%d op=0x%02x\n", usg,
+                       seq_printf(s, "ms sgat=%d op=0x%02x\n", usg,
                                   (int) srp->data.cmd_opcode);
                }
                if (0 == m)
-                       PRINT_PROC("     No requests active\n");
+                       seq_printf(s, "     No requests active\n");
        }
-       return 1;
 }
 
-static int
-sg_proc_debug_info(char *buffer, int *len, off_t * begin,
-                  off_t offset, int size)
+static int sg_proc_open_debug(struct inode *inode, struct file *file)
 {
-       Sg_device *sdp;
-       int j, max_dev;
-
-       if (NULL == sg_dev_arr) {
-               PRINT_PROC("sg_dev_arr NULL, driver not initialized\n");
-               return 1;
-       }
-       max_dev = sg_last_dev();
-       PRINT_PROC("dev_max(currently)=%d max_active_device=%d (origin 1)\n",
-                  sg_dev_max, max_dev);
-       PRINT_PROC(" def_reserved_size=%d\n", sg_big_buff);
-       for (j = 0; j < max_dev; ++j) {
-               if ((sdp = sg_get_dev(j))) {
-                       struct scsi_device *scsidp = sdp->device;
-
-                       if (NULL == scsidp) {
-                               PRINT_PROC("device %d detached ??\n", j);
-                               continue;
-                       }
-
-                       if (sg_get_nth_sfp(sdp, 0)) {
-                               PRINT_PROC(" >>> device=%s ",
-                                       sdp->disk->disk_name);
-                               if (sdp->detached)
-                                       PRINT_PROC("detached pending close ");
-                               else
-                                       PRINT_PROC
-                                           ("scsi%d chan=%d id=%d lun=%d   em=%d",
-                                            scsidp->host->host_no,
-                                            scsidp->channel, scsidp->id,
-                                            scsidp->lun,
-                                            scsidp->host->hostt->emulated);
-                               PRINT_PROC(" sg_tablesize=%d excl=%d\n",
-                                          sdp->sg_tablesize, sdp->exclude);
-                       }
-                       if (0 == sg_proc_debug_helper(buffer, len, begin,
-                                                     offset, size, sdp))
-                               return 0;
-               }
-       }
-       return 1;
+        return seq_open(file, &debug_seq_ops);
 }
 
-static int
-sg_proc_dev_read(char *buffer, char **start, off_t offset,
-                int size, int *eof, void *data)
-{
-       SG_PROC_READ_FN(sg_proc_dev_info);
-}
-
-static int
-sg_proc_dev_info(char *buffer, int *len, off_t * begin, off_t offset, int size)
+static int sg_proc_seq_show_debug(struct seq_file *s, void *v)
 {
+       struct sg_proc_deviter * it = (struct sg_proc_deviter *) v;
        Sg_device *sdp;
-       int j, max_dev;
-       struct scsi_device *scsidp;
 
-       max_dev = sg_last_dev();
-       for (j = 0; j < max_dev; ++j) {
-               sdp = sg_get_dev(j);
-               if (sdp && (scsidp = sdp->device) && (!sdp->detached))
-                       PRINT_PROC("%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\t%d\n",
-                                  scsidp->host->host_no, scsidp->channel,
-                                  scsidp->id, scsidp->lun, (int) scsidp->type,
-                                  1,
-                                  (int) scsidp->queue_depth,
-                                  (int) scsidp->device_busy,
-                                  (int) scsidp->online);
-               else
-                       PRINT_PROC("-1\t-1\t-1\t-1\t-1\t-1\t-1\t-1\t-1\n");
+       if (it && (0 == it->index)) {
+               seq_printf(s, "dev_max(currently)=%d max_active_device=%d "
+                          "(origin 1)\n", sg_dev_max, (int)it->max);
+               seq_printf(s, " def_reserved_size=%d\n", sg_big_buff);
        }
-       return 1;
-}
-
-static int
-sg_proc_devhdr_read(char *buffer, char **start, off_t offset,
-                   int size, int *eof, void *data)
-{
-       SG_PROC_READ_FN(sg_proc_devhdr_info);
-}
-
-static int
-sg_proc_devhdr_info(char *buffer, int *len, off_t * begin,
-                   off_t offset, int size)
-{
-       PRINT_PROC("host\tchan\tid\tlun\ttype\topens\tqdepth\tbusy\tonline\n");
-       return 1;
-}
-
-static int
-sg_proc_devstrs_read(char *buffer, char **start, off_t offset,
-                    int size, int *eof, void *data)
-{
-       SG_PROC_READ_FN(sg_proc_devstrs_info);
-}
+       sdp = it ? sg_get_dev(it->index) : NULL;
+       if (sdp) {
+               struct scsi_device *scsidp = sdp->device;
 
-static int
-sg_proc_devstrs_info(char *buffer, int *len, off_t * begin,
-                    off_t offset, int size)
-{
-       Sg_device *sdp;
-       int j, max_dev;
-       struct scsi_device *scsidp;
+               if (NULL == scsidp) {
+                       seq_printf(s, "device %d detached ??\n", 
+                                  (int)it->index);
+                       return 0;
+               }
 
-       max_dev = sg_last_dev();
-       for (j = 0; j < max_dev; ++j) {
-               sdp = sg_get_dev(j);
-               if (sdp && (scsidp = sdp->device) && (!sdp->detached))
-                       PRINT_PROC("%8.8s\t%16.16s\t%4.4s\n",
-                                  scsidp->vendor, scsidp->model, scsidp->rev);
-               else
-                       PRINT_PROC("<no active device>\n");
+               if (sg_get_nth_sfp(sdp, 0)) {
+                       seq_printf(s, " >>> device=%s ",
+                               sdp->disk->disk_name);
+                       if (sdp->detached)
+                               seq_printf(s, "detached pending close ");
+                       else
+                               seq_printf
+                                   (s, "scsi%d chan=%d id=%d lun=%d   em=%d",
+                                    scsidp->host->host_no,
+                                    scsidp->channel, scsidp->id,
+                                    scsidp->lun,
+                                    scsidp->host->hostt->emulated);
+                       seq_printf(s, " sg_tablesize=%d excl=%d\n",
+                                  sdp->sg_tablesize, sdp->exclude);
+               }
+               sg_proc_debug_helper(s, sdp);
        }
-       return 1;
-}
-
-static int
-sg_proc_version_read(char *buffer, char **start, off_t offset,
-                    int size, int *eof, void *data)
-{
-       SG_PROC_READ_FN(sg_proc_version_info);
+       return 0;
 }
 
-static int
-sg_proc_version_info(char *buffer, int *len, off_t * begin,
-                    off_t offset, int size)
-{
-       PRINT_PROC("%d\t%s\n", sg_version_num, sg_version_str);
-       return 1;
-}
 #endif                         /* CONFIG_SCSI_PROC_FS */
 
 module_init(init_sg);
 module_exit(exit_sg);
+MODULE_ALIAS_CHARDEV_MAJOR(SCSI_GENERIC_MAJOR);
index a64e43a..76de0e2 100644 (file)
@@ -17,7 +17,7 @@
    Last modified: 18-JAN-1998 Richard Gooch <rgooch@atnf.csiro.au> Devfs support
  */
 
-static char *verstr = "20030811";
+static char *verstr = "20031228";
 
 #include <linux/module.h>
 
@@ -35,6 +35,7 @@ static char *verstr = "20030811";
 #include <linux/blkdev.h>
 #include <linux/moduleparam.h>
 #include <linux/devfs_fs_kernel.h>
+#include <linux/cdev.h>
 #include <asm/uaccess.h>
 #include <asm/dma.h>
 #include <asm/system.h>
@@ -140,14 +141,19 @@ DEB( static int debugging = DEBUG; )
 #define ST_TIMEOUT (900 * HZ)
 #define ST_LONG_TIMEOUT (14000 * HZ)
 
-#define TAPE_NR(x) (iminor(x) & ~(-1 << ST_MODE_SHIFT))
+/* Remove mode bits and auto-rewind bit (7) */
+#define TAPE_NR(x) ( ((iminor(x) & ~255) >> (ST_NBR_MODE_BITS + 1)) | \
+    (iminor(x) & ~(-1 << ST_MODE_SHIFT)) )
 #define TAPE_MODE(x) ((iminor(x) & ST_MODE_MASK) >> ST_MODE_SHIFT)
 
+/* Construct the minor number from the device (d), mode (m), and non-rewind (n) data */
+#define TAPE_MINOR(d, m, n) (((d & ~(255 >> (ST_NBR_MODE_BITS + 1))) << (ST_NBR_MODE_BITS + 1)) | \
+  (d & (255 >> (ST_NBR_MODE_BITS + 1))) | (m << ST_MODE_SHIFT) | ((n != 0) << 7) )
+
 /* Internal ioctl to set both density (uppermost 8 bits) and blocksize (lower
    24 bits) */
 #define SET_DENS_AND_BLK 0x10001
 
-#define ST_DEV_ARR_LUMP  6
 static rwlock_t st_dev_arr_lock = RW_LOCK_UNLOCKED;
 
 static int st_fixed_buffer_size = ST_FIXED_BUFFER_SIZE;
@@ -1006,7 +1012,6 @@ static int st_open(struct inode *inode, struct file *filp)
        write_unlock(&st_dev_arr_lock);
        STp->rew_at_close = STp->autorew_dev = (iminor(inode) & 0x80) == 0;
 
-
        if (!scsi_block_when_processing_errors(STp->device)) {
                retval = (-ENXIO);
                goto err_out;
@@ -1970,10 +1975,13 @@ static int st_set_options(Scsi_Tape *STp, long options)
        long code;
        ST_mode *STm;
        char *name = tape_name(STp);
+       struct cdev *cd0, *cd1;
 
        STm = &(STp->modes[STp->current_mode]);
        if (!STm->defined) {
+               cd0 = STm->cdevs[0]; cd1 = STm->cdevs[1];
                memcpy(STm, &(STp->modes[0]), sizeof(ST_mode));
+               STm->cdevs[0] = cd0; STm->cdevs[1] = cd1;
                modes_defined = TRUE;
                 DEBC(printk(ST_DEB_MSG
                             "%s: Initialized mode %d definition from mode 0\n",
@@ -3704,12 +3712,13 @@ static struct file_operations st_fops =
 static int st_probe(struct device *dev)
 {
        struct scsi_device *SDp = to_scsi_device(dev);
-       struct gendisk *disk;
-       Scsi_Tape *tpnt;
+       struct gendisk *disk = NULL;
+       struct cdev *cdev = NULL;
+       Scsi_Tape *tpnt = NULL;
        ST_mode *STm;
        ST_partstat *STps;
        ST_buffer *buffer;
-       int i, mode, dev_num;
+       int i, j, mode, dev_num, error;
        char *stp;
        u64 bounce_limit;
 
@@ -3743,7 +3752,7 @@ static int st_probe(struct device *dev)
                Scsi_Tape **tmp_da;
                int tmp_dev_max;
 
-               tmp_dev_max = st_nr_dev + ST_DEV_ARR_LUMP;
+               tmp_dev_max = max(st_nr_dev * 2, 8);
                if (tmp_dev_max > ST_MAX_TAPES)
                        tmp_dev_max = ST_MAX_TAPES;
                if (tmp_dev_max <= st_nr_dev) {
@@ -3837,6 +3846,42 @@ static int st_probe(struct device *dev)
                STm->default_compression = ST_DONT_TOUCH;
                STm->default_blksize = (-1);    /* No forced size */
                STm->default_density = (-1);    /* No forced density */
+
+               for (j=0; j < 2; j++) {
+                       cdev = cdev_alloc();
+                       if (!cdev) {
+                               printk(KERN_ERR
+                                      "st: out of memory. Device not attached.\n");
+                               goto out_put_disk;
+                       }
+                       snprintf(cdev->kobj.name, KOBJ_NAME_LEN, "%sm%d%s", disk->disk_name,
+                                i, j ? "n" : "");
+                       cdev->owner = THIS_MODULE;
+                       cdev->ops = &st_fops;
+                       STm->cdevs[j] = cdev;
+
+                       error = cdev_add(STm->cdevs[j],
+                                        MKDEV(SCSI_TAPE_MAJOR, TAPE_MINOR(dev_num, i, j)),
+                                        1);
+                       if (error) {
+                               printk(KERN_ERR "st%d: Can't add %s-rewind mode %d\n",
+                                      dev_num, j ? "non" : "auto", i);
+                       }
+
+                       error = sysfs_create_link(&STm->cdevs[j]->kobj, &SDp->sdev_gendev.kobj,
+                                                 "device");
+                       if (error) {
+                               printk(KERN_ERR
+                                      "st%d: Can't create sysfs link from SCSI device.\n",
+                                      dev_num);
+                       }
+               }
+       }
+       error = sysfs_create_link(&SDp->sdev_gendev.kobj, &tpnt->modes[0].cdevs[0]->kobj,
+                                 "tape");
+       if (error) {
+               printk(KERN_ERR "st%d: Can't create sysfs link from SCSI device.\n",
+                      dev_num);
        }
 
        for (i = 0; i < ST_NBR_PARTITIONS; i++) {
@@ -3881,17 +3926,28 @@ static int st_probe(struct device *dev)
 
 out_put_disk:
        put_disk(disk);
+       if (tpnt) {
+               for (i=0; i < ST_NBR_MODES; i++) {
+                       STm = &(tpnt->modes[i]);
+                       if (STm->cdevs[0])
+                               kobject_put(&STm->cdevs[0]->kobj);
+                       if (STm->cdevs[1])
+                               kobject_put(&STm->cdevs[1]->kobj);
+               }
+               kfree(tpnt);
+       }
 out_buffer_free:
        kfree(buffer);
 out:
        return -ENODEV;
 };
 
+
 static int st_remove(struct device *dev)
 {
        Scsi_Device *SDp = to_scsi_device(dev);
        Scsi_Tape *tpnt;
-       int i, mode;
+       int i, j, mode;
 
        write_lock(&st_dev_arr_lock);
        for (i = 0; i < st_dev_max; i++) {
@@ -3901,9 +3957,16 @@ static int st_remove(struct device *dev)
                        st_nr_dev--;
                        write_unlock(&st_dev_arr_lock);
                        devfs_unregister_tape(tpnt->disk->number);
+                       sysfs_remove_link(&SDp->sdev_gendev.kobj, "tape");
                        for (mode = 0; mode < ST_NBR_MODES; ++mode) {
                                devfs_remove("%s/mt%s", SDp->devfs_name, st_formats[mode]);
                                devfs_remove("%s/mt%sn", SDp->devfs_name, st_formats[mode]);
+                               for (j=0; j < 2; j++) {
+                                       sysfs_remove_link(&tpnt->modes[mode].cdevs[j]->kobj,
+                                                         "device");
+                                       cdev_del(tpnt->modes[mode].cdevs[j]);
+                                       tpnt->modes[mode].cdevs[j] = NULL;
+                               }
                        }
                        tpnt->device = NULL;
 
@@ -3930,12 +3993,14 @@ static int __init init_st(void)
                "st: Version %s, fixed bufsize %d, s/g segs %d\n",
                verstr, st_fixed_buffer_size, st_max_sg_segs);
 
-       if (register_chrdev(SCSI_TAPE_MAJOR, "st", &st_fops) >= 0) {
+       if (!register_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0),
+                                   ST_MAX_TAPE_ENTRIES, "st")) {
                if (scsi_register_driver(&st_template.gendrv) == 0) {
                        do_create_driverfs_files();
                        return 0;
                }
-               unregister_chrdev(SCSI_TAPE_MAJOR, "st");
+               unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0),
+                                        ST_MAX_TAPE_ENTRIES);
        }
 
        printk(KERN_ERR "Unable to get major %d for SCSI tapes\n", SCSI_TAPE_MAJOR);
@@ -3946,7 +4011,8 @@ static void __exit exit_st(void)
 {
        do_remove_driverfs_files();
        scsi_unregister_driver(&st_template.gendrv);
-       unregister_chrdev(SCSI_TAPE_MAJOR, "st");
+       unregister_chrdev_region(MKDEV(SCSI_TAPE_MAJOR, 0),
+                                ST_MAX_TAPE_ENTRIES);
        kfree(scsi_tapes);
        printk(KERN_INFO "st: Unloaded.\n");
 }
index 80a0f39..10690f9 100644 (file)
@@ -47,13 +47,16 @@ typedef struct {
        unsigned char default_compression;      /* 0 = don't touch, etc */
        short default_density;  /* Forced density, -1 = no value */
        int default_blksize;    /* Forced blocksize, -1 = no value */
+       struct cdev *cdevs[2];  /* Auto-rewind and non-rewind devices */
 } ST_mode;
 
 #define ST_NBR_MODE_BITS 2
 #define ST_NBR_MODES (1 << ST_NBR_MODE_BITS)
 #define ST_MODE_SHIFT (7 - ST_NBR_MODE_BITS)
 #define ST_MODE_MASK ((ST_NBR_MODES - 1) << ST_MODE_SHIFT)
-#define ST_MAX_TAPES (1 << ST_MODE_SHIFT)
+
+#define ST_MAX_TAPES 128
+#define ST_MAX_TAPE_ENTRIES  (ST_MAX_TAPES << (ST_NBR_MODE_BITS + 1))
 
 /* The status related to each partition */
 typedef struct {
index 26cf48c..c18008e 100644 (file)
 
 #include <linux/config.h>
 
-/*
- *  Use normal IO if configured.
- *  Normal IO forced for alpha.
- *  Forced to MMIO for sparc.
- */
-#if defined(__alpha__)
-#define        SYM_CONF_IOMAPPED
-#elif defined(__sparc__)
-#undef SYM_CONF_IOMAPPED
-/* #elif defined(__powerpc__) */
-/* #define     SYM_CONF_IOMAPPED */
-/* #define SYM_OPT_NO_BUS_MEMORY_MAPPING */
-#elif defined(CONFIG_SCSI_SYM53C8XX_IOMAPPED)
+#ifdef CONFIG_SCSI_SYM53C8XX_IOMAPPED
 #define        SYM_CONF_IOMAPPED
 #endif
 
@@ -93,8 +81,6 @@
  */
 #if 1
 #define SYM_CONF_NVRAM_SUPPORT         (1)
-#define SYM_SETUP_SYMBIOS_NVRAM                (1)
-#define SYM_SETUP_TEKRAM_NVRAM         (1)
 #endif
 
 /*
index 5b24d1f..40c0361 100644 (file)
@@ -89,9 +89,6 @@ static struct sym_fwb_ofs sym_fw1b_ofs = {
 };
 static struct sym_fwz_ofs sym_fw1z_ofs = {
        SYM_GEN_FW_Z(struct SYM_FWZ_SCR)
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       SYM_GEN_Z(struct SYM_FWZ_SCR, start_ram)
-#endif
 };
 #undef SYM_FWA_SCR
 #undef SYM_FWB_SCR
@@ -122,10 +119,6 @@ static struct sym_fwb_ofs sym_fw2b_ofs = {
 };
 static struct sym_fwz_ofs sym_fw2z_ofs = {
        SYM_GEN_FW_Z(struct SYM_FWZ_SCR)
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       SYM_GEN_Z(struct SYM_FWZ_SCR, start_ram)
-       SYM_GEN_Z(struct SYM_FWZ_SCR, start_ram64)
-#endif
 };
 #undef SYM_FWA_SCR
 #undef SYM_FWB_SCR
@@ -146,22 +139,10 @@ sym_fw1_patch(hcb_p np)
 {
        struct sym_fw1a_scr *scripta0;
        struct sym_fw1b_scr *scriptb0;
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       struct sym_fw1z_scr *scriptz0 = 
-               (struct sym_fw1z_scr *) np->scriptz0;
-#endif
 
        scripta0 = (struct sym_fw1a_scr *) np->scripta0;
        scriptb0 = (struct sym_fw1b_scr *) np->scriptb0;
 
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       /*
-        *  Set up BUS physical address of SCRIPTS that is to 
-        *  be copied to on-chip RAM by the SCRIPTS processor.
-        */
-       scriptz0->scripta0_ba[0]        = cpu_to_scr(vtobus(scripta0));
-#endif
-
        /*
         *  Remove LED support if not needed.
         */
@@ -199,25 +180,10 @@ sym_fw2_patch(hcb_p np)
 {
        struct sym_fw2a_scr *scripta0;
        struct sym_fw2b_scr *scriptb0;
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       struct sym_fw2z_scr *scriptz0 = 
-               (struct sym_fw2z_scr *) np->scriptz0;
-#endif
 
        scripta0 = (struct sym_fw2a_scr *) np->scripta0;
        scriptb0 = (struct sym_fw2b_scr *) np->scriptb0;
 
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       /*
-        *  Set up BUS physical address of SCRIPTS that is to 
-        *  be copied to on-chip RAM by the SCRIPTS processor.
-        */
-       scriptz0->scripta0_ba64[0]      = /* Nothing is missing here */
-       scriptz0->scripta0_ba[0]        = cpu_to_scr(vtobus(scripta0));
-       scriptz0->scriptb0_ba64[0]      = cpu_to_scr(vtobus(scriptb0));
-       scriptz0->ram_seg64[0]          = np->scr_ram_seg;
-#endif
-
        /*
         *  Remove LED support if not needed.
         */
index 993b08c..59333f4 100644 (file)
@@ -113,10 +113,6 @@ struct sym_fwb_ofs {
 };
 struct sym_fwz_ofs {
        SYM_GEN_FW_Z(u_short)
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       SYM_GEN_Z(u_short, start_ram)
-       SYM_GEN_Z(u_short, start_ram64)
-#endif
 };
 
 /*
@@ -136,10 +132,6 @@ struct sym_fwb_ba {
 };
 struct sym_fwz_ba {
        SYM_GEN_FW_Z(u32)
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       SYM_GEN_Z(u32, start_ram)
-       SYM_GEN_Z(u32, start_ram64)
-#endif
 };
 #undef SYM_GEN_A
 #undef SYM_GEN_B
index 52df93b..afb3309 100644 (file)
@@ -234,10 +234,6 @@ struct SYM_FWB_SCR {
 struct SYM_FWZ_SCR {
        u32 snooptest           [  9];
        u32 snoopend            [  2];
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       u32 start_ram           [  1];
-       u32 scripta0_ba         [  4];
-#endif
 };
 
 static struct SYM_FWA_SCR SYM_FWA_SCR = {
@@ -1851,24 +1847,5 @@ static struct SYM_FWZ_SCR SYM_FWZ_SCR = {
         */
        SCR_INT,
                99,
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       /*
-        *  We may use MEMORY MOVE instructions to load the on chip-RAM,
-        *  if it happens that mapping PCI memory is not possible.
-        *  But writing the RAM from the CPU is the preferred method, 
-        *  since PCI 2.2 seems to disallow PCI self-mastering.
-        */
-}/*-------------------------< START_RAM >------------------------*/,{
-       /*
-        *  Load the script into on-chip RAM, 
-        *  and jump to start point.
-        */
-       SCR_COPY (sizeof(struct SYM_FWA_SCR)),
-}/*-------------------------< SCRIPTA0_BA >----------------------*/,{
-               0,
-               PADDR_A (start),
-       SCR_JUMP,
-               PADDR_A (init),
-#endif /* SYM_OPT_NO_BUS_MEMORY_MAPPING */
 }/*--------------------------<>----------------------------------*/
 };
index a6fbc2a..025f266 100644 (file)
@@ -228,14 +228,6 @@ struct SYM_FWB_SCR {
 struct SYM_FWZ_SCR {
        u32 snooptest           [  6];
        u32 snoopend            [  2];
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       u32 start_ram           [  1];
-       u32 scripta0_ba         [  4];
-       u32 start_ram64         [  3];
-       u32 scripta0_ba64       [  3];
-       u32 scriptb0_ba64       [  6];
-       u32 ram_seg64           [  1];
-#endif
 };
 
 static struct SYM_FWA_SCR SYM_FWA_SCR = {
@@ -1944,51 +1936,5 @@ static struct SYM_FWZ_SCR SYM_FWZ_SCR = {
         */
        SCR_INT,
                99,
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-       /*
-        *  We may use MEMORY MOVE instructions to load the on chip-RAM,
-        *  if it happens that mapping PCI memory is not possible.
-        *  But writing the RAM from the CPU is the preferred method, 
-        *  since PCI 2.2 seems to disallow PCI self-mastering.
-        */
-}/*-------------------------< START_RAM >------------------------*/,{
-       /*
-        *  Load the script into on-chip RAM, 
-        *  and jump to start point.
-        */
-       SCR_COPY (sizeof(struct SYM_FWA_SCR)),
-}/*-------------------------< SCRIPTA0_BA >----------------------*/,{
-               0,
-               PADDR_A (start),
-       SCR_JUMP,
-               PADDR_A (init),
-}/*-------------------------< START_RAM64 >----------------------*/,{
-       /*
-        *  Load the RAM and start for 64 bit PCI (895A,896).
-        *  Both scripts (script and scripth) are loaded into 
-        *  the RAM which is 8K (4K for 825A/875/895).
-        *  We also need to load some 32-63 bit segments 
-        *  address of the SCRIPTS processor.
-        *  LOAD/STORE ABSOLUTE always refers to on-chip RAM 
-        *  in our implementation. The main memory is 
-        *  accessed using LOAD/STORE DSA RELATIVE.
-        */
-       SCR_LOAD_REL (mmws, 4),
-               offsetof (struct sym_hcb, scr_ram_seg),
-       SCR_COPY (sizeof(struct SYM_FWA_SCR)),
-}/*-------------------------< SCRIPTA0_BA64 >--------------------*/,{
-               0,
-               PADDR_A (start),
-       SCR_COPY (sizeof(struct SYM_FWB_SCR)),
-}/*-------------------------< SCRIPTB0_BA64 >--------------------*/,{
-               0,
-               PADDR_B  (start64),
-       SCR_LOAD_REL (mmrs, 4),
-               offsetof (struct sym_hcb, scr_ram_seg),
-       SCR_JUMP64,
-               PADDR_B (start64),
-}/*-------------------------< RAM_SEG64 >------------------------*/,{
-               0,
-#endif /* SYM_OPT_NO_BUS_MEMORY_MAPPING */
 }/*-------------------------<>-----------------------------------*/
 };
index 22311fc..70b9cb9 100644 (file)
@@ -167,34 +167,16 @@ struct sym_ucmd {         /* Override the SCSI pointer structure */
 #define SYM_SCMD_PTR(ucmd) sym_que_entry(ucmd, struct scsi_cmnd, SCp)
 #define SYM_SOFTC_PTR(cmd) (((struct host_data *)cmd->device->host->hostdata)->ncb)
 
-/*
- *  Deal with DMA mapping/unmapping.
- */
-#define        bus_unmap_sg(pdev, sgptr, sgcnt, dir)           \
-       pci_unmap_sg(pdev, sgptr, sgcnt, dir)
-#define        bus_unmap_single(pdev, mapping, bufptr, dir)    \
-       pci_unmap_single(pdev, mapping, bufptr, dir)
-#define        bus_map_single(pdev, bufptr, bufsiz, dir)       \
-       pci_map_single(pdev, bufptr, bufsiz, dir)
-#define        bus_map_sg(pdev, sgptr, sgcnt, dir)             \
-       pci_map_sg(pdev, sgptr, sgcnt, dir)
-#define        bus_dma_sync_sg(pdev, sgptr, sgcnt, dir)        \
-       pci_dma_sync_sg(pdev, sgptr, sgcnt, dir)
-#define        bus_dma_sync_single(pdev, mapping, bufsiz, dir) \
-       pci_dma_sync_single(pdev, mapping, bufsiz, dir)
-#define bus_sg_dma_address(sc) sg_dma_address(sc)
-#define bus_sg_dma_len(sc)     sg_dma_len(sc)
-
 static void __unmap_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
 {
        int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
 
        switch(SYM_UCMD_PTR(cmd)->data_mapped) {
        case 2:
-               bus_unmap_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
+               pci_unmap_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
                break;
        case 1:
-               bus_unmap_single(pdev, SYM_UCMD_PTR(cmd)->data_mapping,
+               pci_unmap_single(pdev, SYM_UCMD_PTR(cmd)->data_mapping,
                                 cmd->request_bufflen, dma_dir);
                break;
        }
@@ -206,7 +188,7 @@ static dma_addr_t __map_scsi_single_data(struct pci_dev *pdev, struct scsi_cmnd
        dma_addr_t mapping;
        int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
 
-       mapping = bus_map_single(pdev, cmd->request_buffer,
+       mapping = pci_map_single(pdev, cmd->request_buffer,
                                 cmd->request_bufflen, dma_dir);
        if (mapping) {
                SYM_UCMD_PTR(cmd)->data_mapped  = 1;
@@ -221,7 +203,7 @@ static int __map_scsi_sg_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
        int use_sg;
        int dma_dir = scsi_to_pci_dma_dir(cmd->sc_data_direction);
 
-       use_sg = bus_map_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
+       use_sg = pci_map_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
        if (use_sg > 0) {
                SYM_UCMD_PTR(cmd)->data_mapped  = 2;
                SYM_UCMD_PTR(cmd)->data_mapping = use_sg;
@@ -236,10 +218,10 @@ static void __sync_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
 
        switch(SYM_UCMD_PTR(cmd)->data_mapped) {
        case 2:
-               bus_dma_sync_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
+               pci_dma_sync_sg(pdev, cmd->buffer, cmd->use_sg, dma_dir);
                break;
        case 1:
-               bus_dma_sync_single(pdev, SYM_UCMD_PTR(cmd)->data_mapping,
+               pci_dma_sync_single(pdev, SYM_UCMD_PTR(cmd)->data_mapping,
                                    cmd->request_bufflen, dma_dir);
                break;
        }
@@ -469,8 +451,8 @@ static int sym_scatter(struct sym_hcb *np, struct sym_ccb *cp, struct scsi_cmnd
                data = &cp->phys.data[SYM_CONF_MAX_SG - use_sg];
 
                for (segment = 0; segment < use_sg; segment++) {
-                       dma_addr_t baddr = bus_sg_dma_address(&scatter[segment]);
-                       unsigned int len = bus_sg_dma_len(&scatter[segment]);
+                       dma_addr_t baddr = sg_dma_address(&scatter[segment]);
+                       unsigned int len = sg_dma_len(&scatter[segment]);
 
                        sym_build_sge(np, &data[segment], baddr, len);
                        cp->data_len += len;
@@ -1595,10 +1577,8 @@ static void sym_free_resources(struct sym_hcb *np)
        if (np->s.mmio_va)
                iounmap(np->s.mmio_va);
 #endif
-#ifndef SYM_OPT_NO_BUS_MEMORY_MAPPING
        if (np->s.ram_va)
                iounmap(np->s.ram_va);
-#endif
        /*
         *  Free O/S independent resources.
         */
@@ -1650,14 +1630,13 @@ out_err32:
  *  If all is OK, install interrupt handling and
  *  start the timer daemon.
  */
-static int __devinit 
-sym_attach (struct scsi_host_template *tpnt, int unit, struct sym_device *dev)
+static struct Scsi_Host * __devinit sym_attach(struct scsi_host_template *tpnt,
+               int unit, struct sym_device *dev)
 {
        struct host_data *host_data;
        struct sym_hcb *np = NULL;
        struct Scsi_Host *instance = NULL;
        unsigned long flags;
-       struct sym_nvram *nvram = dev->nvram;
        struct sym_fw *fw;
 
        printk(KERN_INFO
@@ -1762,20 +1741,18 @@ sym_attach (struct scsi_host_template *tpnt, int unit, struct sym_device *dev)
                        np->ram_ws = 8192;
                else
                        np->ram_ws = 4096;
-#ifndef SYM_OPT_NO_BUS_MEMORY_MAPPING
                np->s.ram_va = ioremap(dev->s.base_2_c, np->ram_ws);
                if (!np->s.ram_va) {
                        printf_err("%s: can't map PCI MEMORY region\n",
                                sym_name(np));
                        goto attach_failed;
                }
-#endif
        }
 
        /*
         *  Perform O/S independent stuff.
         */
-       if (sym_hcb_attach(np, fw, nvram))
+       if (sym_hcb_attach(np, fw, dev->nvram))
                goto attach_failed;
 
 
@@ -1843,13 +1820,7 @@ sym_attach (struct scsi_host_template *tpnt, int unit, struct sym_device *dev)
 
        spin_unlock_irqrestore(instance->host_lock, flags);
 
-       /*
-        *  Now let the generic SCSI driver
-        *  look for the SCSI devices on the bus ..
-        */
-       scsi_add_host(instance, &dev->pdev->dev); /* XXX: handle failure */
-       scsi_scan_host(instance);
-       return 0;
+       return instance;
 
  reset_failed:
        printf_err("%s: FATAL ERROR: CHECK SCSI BUS - CABLES, "
@@ -1857,13 +1828,13 @@ sym_attach (struct scsi_host_template *tpnt, int unit, struct sym_device *dev)
        spin_unlock_irqrestore(instance->host_lock, flags);
  attach_failed:
        if (!instance)
-               return -1;
+               return NULL;
        printf_info("%s: giving up ...\n", sym_name(np));
        if (np)
                sym_free_resources(np);
        scsi_host_put(instance);
 
-       return -1;
+       return NULL;
  }
 
 
@@ -2115,7 +2086,7 @@ sym53c8xx_pci_init(struct pci_dev *pdev, struct sym_device *device)
         *  Ignore Symbios chips controlled by various RAID controllers.
         *  These controllers set value 0x52414944 at RAM end - 16.
         */
-#if defined(__i386__) && !defined(SYM_OPT_NO_BUS_MEMORY_MAPPING)
+#if defined(__i386__)
        if (base_2_c) {
                unsigned int ram_size, ram_val;
                void *ram_ptr;
@@ -2202,12 +2173,9 @@ sym53c8xx_pci_init(struct pci_dev *pdev, struct sym_device *device)
 
 
 /*
- *  Linux release module stuff.
- *
  *  Called before unloading the module.
  *  Detach the host.
  *  We have to free resources and halt the NCR chip.
- *
  */
 static int __devexit sym_detach(struct sym_hcb *np)
 {
@@ -2216,18 +2184,15 @@ static int __devexit sym_detach(struct sym_hcb *np)
        del_timer_sync(&np->s.timer);
 
        /*
-        *  Reset NCR chip.
-        *  We should use sym_soft_reset(), but we donnot want to do 
-        *  so, since we may not be safe if interrupts occur.
+        * Reset NCR chip.
+        * We should use sym_soft_reset(), but we don't want to do 
+        * so, since we may not be safe if interrupts occur.
         */
        printk("%s: resetting chip\n", sym_name(np));
        OUTB (nc_istat, SRST);
        UDELAY (10);
        OUTB (nc_istat, 0);
 
-       /*
-        *  Free host resources
-        */
        sym_free_resources(np);
 
        return 1;
@@ -2336,6 +2301,7 @@ static int __devinit sym2_probe(struct pci_dev *pdev,
 {
        struct sym_device sym_dev;
        struct sym_nvram nvram;
+       struct Scsi_Host *instance;
 
        memset(&sym_dev, 0, sizeof(sym_dev));
        memset(&nvram, 0, sizeof(nvram));
@@ -2354,12 +2320,20 @@ static int __devinit sym2_probe(struct pci_dev *pdev,
 
        sym_get_nvram(&sym_dev, &nvram);
 
-       if (sym_attach(&sym2_template, attach_count, &sym_dev))
+       instance = sym_attach(&sym2_template, attach_count, &sym_dev);
+       if (!instance)
                goto free;
 
+       if (scsi_add_host(instance, &pdev->dev))
+               goto detach;
+       scsi_scan_host(instance);
+
        attach_count++;
+
        return 0;
 
+ detach:
+       sym_detach(pci_get_drvdata(pdev));
  free:
        pci_release_regions(pdev);
  disable:
@@ -2369,7 +2343,13 @@ static int __devinit sym2_probe(struct pci_dev *pdev,
 
 static void __devexit sym2_remove(struct pci_dev *pdev)
 {
-       sym_detach(pci_get_drvdata(pdev));
+       struct sym_hcb *np = pci_get_drvdata(pdev);
+       struct Scsi_Host *host = np->s.host;
+
+       scsi_remove_host(host);
+       scsi_host_put(host);
+
+       sym_detach(np);
 
        pci_release_regions(pdev);
        pci_disable_device(pdev);
index 2be7a9e..463282d 100644 (file)
 #define bzero(d, n)    memset((d), 0, (n))
 #endif
 
-#ifndef bcmp
-#define bcmp(a, b, n)  memcmp((a), (b), (n))
-#endif
-
 /*
  *  General driver includes.
  */
@@ -96,7 +92,6 @@
 #define SYM_OPT_SNIFF_INQUIRY
 #define SYM_OPT_LIMIT_COMMAND_REORDERING
 #define        SYM_OPT_ANNOUNCE_TRANSFER_RATE
-#define        SYM_OPT_BUS_DMA_ABSTRACTION
 
 /*
  *  Print a message with severity.
index db7b4a4..97b4069 100644 (file)
@@ -50,7 +50,7 @@
  * SUCH DAMAGE.
  */
 
-#define SYM_DRIVER_NAME        "sym-2.1.18b"
+#define SYM_DRIVER_NAME        "sym-2.1.18f"
 
 #ifdef __FreeBSD__
 #include <dev/sym/sym_glue.h>
@@ -751,8 +751,6 @@ static u32 parisc_setup_hcb(hcb_p np, u32 period)
                                &np->maxwide, &scsi_mode))
                return period;
 
-       printk("scsi_mode = %d, period = %ld\n", scsi_mode, pdc_period);
-
        if (scsi_mode >= 0) {
                /* C3000 PDC reports period/mode */
                SYM_SETUP_SCSI_DIFF = 0;
@@ -1962,13 +1960,6 @@ void sym_start_up (hcb_p np, int reason)
                if (sym_verbose >= 2)
                        printf ("%s: Downloading SCSI SCRIPTS.\n",
                                sym_name(np));
-#ifdef SYM_OPT_NO_BUS_MEMORY_MAPPING
-               np->fw_patch(np);
-               if (np->ram_ws == 8192)
-                       phys = SCRIPTZ_BA (np, start_ram64);
-               else
-                       phys = SCRIPTZ_BA (np, start_ram);
-#else
                if (np->ram_ws == 8192) {
                        OUTRAM_OFF(4096, np->scriptb0, np->scriptb_sz);
                        phys =  scr_to_cpu(np->scr_ram_seg);
@@ -1980,7 +1971,6 @@ void sym_start_up (hcb_p np, int reason)
                else
                        phys = SCRIPTA_BA (np, init);
                OUTRAM_OFF(0, np->scripta0, np->scripta_sz);
-#endif
        }
        else
                phys = SCRIPTA_BA (np, init);
@@ -4151,8 +4141,10 @@ sym_ppr_nego_check(hcb_p np, int req, int target)
        /*
         *  Check values against our limits.
         */
-       if (wide > np->maxwide)
-               {chg = 1; wide = np->maxwide;}
+       if (wide > np->maxwide) {
+               chg = 1;
+               wide = np->maxwide;
+       }
        if (!wide || !(np->features & FE_ULTRA3))
                dt &= ~PPR_OPT_DT;
        if (req) {
@@ -4306,8 +4298,10 @@ sym_wide_nego_check(hcb_p np, int req, int target)
        /*
         *  Check values against our limits.
         */
-       if (wide > np->maxwide)
-               {chg = 1; wide = np->maxwide;}
+       if (wide > np->maxwide) {
+               chg = 1;
+               wide = np->maxwide;
+       }
        if (req) {
                if (wide > tp->tinfo.user.width)
                        {chg = 1; wide = tp->tinfo.user.width;}
index 8857270..546f54c 100644 (file)
  *  They may be defined in platform specific headers, if they 
  *  are useful.
  *
- *    SYM_OPT_NO_BUS_MEMORY_MAPPING
- *        When this option is set, the driver will not load the 
- *        on-chip RAM using MMIO, but let the SCRIPTS processor 
- *        do the work using MOVE MEMORY instructions.
- *        (set for Linux/PPC)
- *
  *    SYM_OPT_HANDLE_DIR_UNKNOWN
  *        When this option is set, the SCRIPTS used by the driver 
  *        are able to handle SCSI transfers with direction not 
  *        When this option is set, the driver will use a queue per 
  *        device and handle QUEUE FULL status requeuing internally.
  *
- *    SYM_OPT_BUS_DMA_ABSTRACTION
- *        When this option is set, the driver allocator is responsible 
- *        of maintaining bus physical addresses and so provides virtual 
- *        to bus physical address translation of driver data structures.
- *        (set for FreeBSD-4 and Linux 2.3)
- *
  *    SYM_OPT_SNIFF_INQUIRY
  *        When this option is set, the driver sniff out successful 
  *        INQUIRY response and performs negotiations accordingly.
  *        (set for Linux)
  */
 #if 0
-#define SYM_OPT_NO_BUS_MEMORY_MAPPING
 #define SYM_OPT_HANDLE_DIR_UNKNOWN
 #define SYM_OPT_HANDLE_DEVICE_QUEUEING
-#define SYM_OPT_BUS_DMA_ABSTRACTION
 #define SYM_OPT_SNIFF_INQUIRY
 #define SYM_OPT_LIMIT_COMMAND_REORDERING
 #endif
@@ -958,9 +944,7 @@ struct sym_hcb {
        /*
         *  DMA pool handle for this HBA.
         */
-#ifdef SYM_OPT_BUS_DMA_ABSTRACTION
        m_pool_ident_t  bus_dmat;
-#endif
 
        /*
         *  O/S specific data structure
@@ -1133,9 +1117,20 @@ struct sym_hcb {
 /*
  *  NVRAM reading (sym_nvram.c).
  */
+#if SYM_CONF_NVRAM_SUPPORT
 void sym_nvram_setup_host (hcb_p np, struct sym_nvram *nvram);
 void sym_nvram_setup_target (hcb_p np, int target, struct sym_nvram *nvp);
 int sym_read_nvram (sdev_p np, struct sym_nvram *nvp);
+#else
+static inline void sym_nvram_setup_host(hcb_p np, struct sym_nvram *nvram) { }
+static inline void sym_nvram_setup_target(hcb_p np, struct sym_nvram *nvram) { }
+static inline int sym_read_nvram(sdev_p np, struct sym_nvram *nvp)
+{
+       nvp->type = 0;
+       return 0;
+}
+#endif
+
 
 /*
  *  FIRMWARES (sym_fw.c)
@@ -1347,7 +1342,6 @@ typedef struct sym_m_link {
  *  Virtual to bus physical translation for a given cluster.
  *  Such a structure is only useful with DMA abstraction.
  */
-#ifdef SYM_OPT_BUS_DMA_ABSTRACTION
 typedef struct sym_m_vtob {    /* Virtual to Bus address translation */
        struct sym_m_vtob *next;
 #ifdef SYM_HAVE_M_SVTOB
@@ -1363,7 +1357,6 @@ typedef struct sym_m_vtob {       /* Virtual to Bus address translation */
 #define VTOB_HASH_MASK         (VTOB_HASH_SIZE-1)
 #define VTOB_HASH_CODE(m)      \
        ((((m_addr_t) (m)) >> SYM_MEM_CLUSTER_SHIFT) & VTOB_HASH_MASK)
-#endif /* SYM_OPT_BUS_DMA_ABSTRACTION */
 
 /*
  *  Memory pool of a given kind.
@@ -1375,7 +1368,6 @@ typedef struct sym_m_vtob {       /* Virtual to Bus address translation */
  *     method are expected to tell the driver about.
  */
 typedef struct sym_m_pool {
-#ifdef SYM_OPT_BUS_DMA_ABSTRACTION
        m_pool_ident_t  dev_dmat;       /* Identifies the pool (see above) */
        m_addr_t (*get_mem_cluster)(struct sym_m_pool *);
 #ifdef SYM_MEM_FREE_UNUSED
@@ -1389,10 +1381,6 @@ typedef struct sym_m_pool {
        int nump;
        m_vtob_p vtob[VTOB_HASH_SIZE];
        struct sym_m_pool *next;
-#else
-#define M_GET_MEM_CLUSTER()            sym_get_mem_cluster()
-#define M_FREE_MEM_CLUSTER(p)          sym_free_mem_cluster(p)
-#endif /* SYM_OPT_BUS_DMA_ABSTRACTION */
        struct sym_m_link h[SYM_MEM_CLUSTER_SHIFT - SYM_MEM_SHIFT + 1];
 } *m_pool_p;
 
@@ -1406,12 +1394,10 @@ void *sym_calloc_unlocked(int size, char *name);
  *  Alloc, free and translate addresses to bus physical 
  *  for DMAable memory.
  */
-#ifdef SYM_OPT_BUS_DMA_ABSTRACTION
 void *__sym_calloc_dma_unlocked(m_pool_ident_t dev_dmat, int size, char *name);
 void 
 __sym_mfree_dma_unlocked(m_pool_ident_t dev_dmat, void *m,int size, char *name);
 u32 __vtobus_unlocked(m_pool_ident_t dev_dmat, void *m);
-#endif
 
 /*
  * Verbs used by the driver code for DMAable memory handling.
index 7f32ed4..6641f35 100644 (file)
@@ -204,18 +204,9 @@ static void __sym_mfree(m_pool_p mp, void *ptr, int size, char *name)
 /*
  *  Default memory pool we donnot need to involve in DMA.
  *
- *  If DMA abtraction is not needed, the generic allocator 
- *  calls directly some kernel allocator.
- *
  *  With DMA abstraction, we use functions (methods), to 
  *  distinguish between non DMAable memory and DMAable memory.
  */
-#ifndef        SYM_OPT_BUS_DMA_ABSTRACTION
-
-static struct sym_m_pool mp0;
-
-#else
-
 static m_addr_t ___mp0_get_mem_cluster(m_pool_p mp)
 {
        m_addr_t m = (m_addr_t) sym_get_mem_cluster();
@@ -240,8 +231,6 @@ static struct sym_m_pool mp0 =
        {0, ___mp0_get_mem_cluster};
 #endif
 
-#endif /* SYM_OPT_BUS_DMA_ABSTRACTION */
-
 /*
  * Actual memory allocation routine for non-DMAed memory.
  */
@@ -260,7 +249,6 @@ void sym_mfree_unlocked(void *ptr, int size, char *name)
        __sym_mfree(&mp0, ptr, size, name);
 }
 
-#ifdef SYM_OPT_BUS_DMA_ABSTRACTION
 /*
  *  Methods that maintains DMAable pools according to user allocations.
  *  New pools are created on the fly when a new pool id is provided.
@@ -417,5 +405,3 @@ u32 __vtobus_unlocked(m_pool_ident_t dev_dmat, void *m)
                panic("sym: VTOBUS FAILED!\n");
        return (u32)(vp ? vp->baddr + (((m_addr_t) m) - a) : 0);
 }
-
-#endif /* SYM_OPT_BUS_DMA_ABSTRACTION */
index 4c75662..5c56167 100644 (file)
 /*
  *  Some poor and bogus sync table that refers to Tekram NVRAM layout.
  */
-#if SYM_CONF_NVRAM_SUPPORT
 static u_char Tekram_sync[16] =
        {25,31,37,43, 50,62,75,125, 12,15,18,21, 6,7,9,10};
 #ifdef SYM_CONF_DEBUG_NVRAM
 static u_char Tekram_boot_delay[7] = {3, 5, 10, 20, 30, 60, 120};
 #endif
-#endif
 
 /*
  *  Get host setup from NVRAM.
  */
-void sym_nvram_setup_host (hcb_p np, struct sym_nvram *nvram)
+void sym_nvram_setup_host(struct sym_hcb *np, struct sym_nvram *nvram)
 {
-#if SYM_CONF_NVRAM_SUPPORT
        /*
         *  Get parity checking, host ID, verbose mode 
         *  and miscellaneous host flags from NVRAM.
         */
-       switch(nvram->type) {
+       switch (nvram->type) {
        case SYM_SYMBIOS_NVRAM:
                if (!(nvram->data.Symbios.flags & SYMBIOS_PARITY_ENABLE))
                        np->rv_scntl0  &= ~0x0a;
@@ -95,41 +92,15 @@ void sym_nvram_setup_host (hcb_p np, struct sym_nvram *nvram)
        default:
                break;
        }
-#endif
-}
-
-/*
- *  Get target setup from NVRAM.
- */
-#if SYM_CONF_NVRAM_SUPPORT
-static void sym_Symbios_setup_target(hcb_p np,int target, Symbios_nvram *nvram);
-static void sym_Tekram_setup_target(hcb_p np,int target, Tekram_nvram *nvram);
-#endif
-
-void sym_nvram_setup_target (hcb_p np, int target, struct sym_nvram *nvp)
-{
-#if SYM_CONF_NVRAM_SUPPORT
-       switch(nvp->type) {
-       case SYM_SYMBIOS_NVRAM:
-               sym_Symbios_setup_target (np, target, &nvp->data.Symbios);
-               break;
-       case SYM_TEKRAM_NVRAM:
-               sym_Tekram_setup_target (np, target, &nvp->data.Tekram);
-               break;
-       default:
-               break;
-       }
-#endif
 }
 
-#if SYM_CONF_NVRAM_SUPPORT
 /*
  *  Get target set-up from Symbios format NVRAM.
  */
 static void
-sym_Symbios_setup_target(hcb_p np, int target, Symbios_nvram *nvram)
+sym_Symbios_setup_target(struct sym_hcb *np, int target, Symbios_nvram *nvram)
 {
-       tcb_p tp = &np->target[target];
+       struct sym_tcb *tp = &np->target[target];
        Symbios_target *tn = &nvram->target[target];
 
        tp->tinfo.user.period = tn->sync_period ? (tn->sync_period + 3) / 4 : 0;
@@ -149,9 +120,9 @@ sym_Symbios_setup_target(hcb_p np, int target, Symbios_nvram *nvram)
  *  Get target set-up from Tekram format NVRAM.
  */
 static void
-sym_Tekram_setup_target(hcb_p np, int target, Tekram_nvram *nvram)
+sym_Tekram_setup_target(struct sym_hcb *np, int target, Tekram_nvram *nvram)
 {
-       tcb_p tp = &np->target[target];
+       struct sym_tcb *tp = &np->target[target];
        struct Tekram_target *tn = &nvram->target[target];
        int i;
 
@@ -160,8 +131,8 @@ sym_Tekram_setup_target(hcb_p np, int target, Tekram_nvram *nvram)
                tp->tinfo.user.period = Tekram_sync[i];
        }
 
-       tp->tinfo.user.width =
-               (tn->flags & TEKRAM_WIDE_NEGO) ? BUS_16_BIT : BUS_8_BIT;
+       tp->tinfo.user.width = (tn->flags & TEKRAM_WIDE_NEGO) ?
+               BUS_16_BIT : BUS_8_BIT;
 
        if (tn->flags & TEKRAM_TAGGED_COMMANDS) {
                tp->usrtags = 2 << nvram->max_tags_index;
@@ -175,11 +146,28 @@ sym_Tekram_setup_target(hcb_p np, int target, Tekram_nvram *nvram)
                np->rv_scntl0  &= ~0x0a; /* SCSI parity checking disabled */
 }
 
+/*
+ *  Get target setup from NVRAM.
+ */
+void sym_nvram_setup_target(struct sym_hcb *np, int target, struct sym_nvram *nvp)
+{
+       switch (nvp->type) {
+       case SYM_SYMBIOS_NVRAM:
+               sym_Symbios_setup_target(np, target, &nvp->data.Symbios);
+               break;
+       case SYM_TEKRAM_NVRAM:
+               sym_Tekram_setup_target(np, target, &nvp->data.Tekram);
+               break;
+       default:
+               break;
+       }
+}
+
 #ifdef SYM_CONF_DEBUG_NVRAM
 /*
  *  Dump Symbios format NVRAM for debugging purpose.
  */
-static void sym_display_Symbios_nvram(sdev_p np, Symbios_nvram *nvram)
+static void sym_display_Symbios_nvram(struct sym_device *np, Symbios_nvram *nvram)
 {
        int i;
 
@@ -211,7 +199,7 @@ static void sym_display_Symbios_nvram(sdev_p np, Symbios_nvram *nvram)
 /*
  *  Dump TEKRAM format NVRAM for debugging purpose.
  */
-static void sym_display_Tekram_nvram(sdev_p np, Tekram_nvram *nvram)
+static void sym_display_Tekram_nvram(struct sym_device *np, Tekram_nvram *nvram)
 {
        int i, tags, boot_delay;
        char *rem;
@@ -221,7 +209,7 @@ static void sym_display_Tekram_nvram(sdev_p np, Tekram_nvram *nvram)
        boot_delay = 0;
        if (nvram->boot_delay_index < 6)
                boot_delay = Tekram_boot_delay[nvram->boot_delay_index];
-       switch((nvram->flags & TEKRAM_REMOVABLE_FLAGS) >> 6) {
+       switch ((nvram->flags & TEKRAM_REMOVABLE_FLAGS) >> 6) {
        default:
        case 0: rem = "";                       break;
        case 1: rem = " REMOVABLE=boot device"; break;
@@ -257,49 +245,12 @@ static void sym_display_Tekram_nvram(sdev_p np, Tekram_nvram *nvram)
                sync);
        }
 }
-#endif /* SYM_CONF_DEBUG_NVRAM */
-#endif /* SYM_CONF_NVRAM_SUPPORT */
-
-
-/*
- *  Try reading Symbios or Tekram NVRAM
- */
-#if SYM_CONF_NVRAM_SUPPORT
-static int sym_read_Symbios_nvram (sdev_p np, Symbios_nvram *nvram);
-static int sym_read_Tekram_nvram  (sdev_p np, Tekram_nvram *nvram);
-#endif
-
-int sym_read_nvram (sdev_p np, struct sym_nvram *nvp)
-{
-#if SYM_CONF_NVRAM_SUPPORT
-       /*
-        *  Try to read SYMBIOS nvram.
-        *  Try to read TEKRAM nvram if Symbios nvram not found.
-        */
-       if      (SYM_SETUP_SYMBIOS_NVRAM &&
-                !sym_read_Symbios_nvram (np, &nvp->data.Symbios)) {
-               nvp->type = SYM_SYMBIOS_NVRAM;
-#ifdef SYM_CONF_DEBUG_NVRAM
-               sym_display_Symbios_nvram(np, &nvp->data.Symbios);
-#endif
-       }
-       else if (SYM_SETUP_TEKRAM_NVRAM &&
-                !sym_read_Tekram_nvram (np, &nvp->data.Tekram)) {
-               nvp->type = SYM_TEKRAM_NVRAM;
-#ifdef SYM_CONF_DEBUG_NVRAM
-               sym_display_Tekram_nvram(np, &nvp->data.Tekram);
-#endif
-       }
-       else
-               nvp->type = 0;
 #else
-       nvp->type = 0;
-#endif
-       return nvp->type;
-}
+static void sym_display_Symbios_nvram(struct sym_device *np, Symbios_nvram *nvram) { }
+static void sym_display_Tekram_nvram(struct sym_device *np, Tekram_nvram *nvram) { }
+#endif /* SYM_CONF_DEBUG_NVRAM */
 
 
-#if SYM_CONF_NVRAM_SUPPORT
 /*
  *  24C16 EEPROM reading.
  *
@@ -316,11 +267,11 @@ int sym_read_nvram (sdev_p np, struct sym_nvram *nvp)
 /*
  *  Set/clear data/clock bit in GPIO0
  */
-static void S24C16_set_bit(sdev_p np, u_char write_bit, u_char *gpreg, 
+static void S24C16_set_bit(struct sym_device *np, u_char write_bit, u_char *gpreg, 
                          int bit_mode)
 {
        UDELAY (5);
-       switch (bit_mode){
+       switch (bit_mode) {
        case SET_BIT:
                *gpreg |= write_bit;
                break;
@@ -342,7 +293,7 @@ static void S24C16_set_bit(sdev_p np, u_char write_bit, u_char *gpreg,
 /*
  *  Send START condition to NVRAM to wake it up.
  */
-static void S24C16_start(sdev_p np, u_char *gpreg)
+static void S24C16_start(struct sym_device *np, u_char *gpreg)
 {
        S24C16_set_bit(np, 1, gpreg, SET_BIT);
        S24C16_set_bit(np, 0, gpreg, SET_CLK);
@@ -353,7 +304,7 @@ static void S24C16_start(sdev_p np, u_char *gpreg)
 /*
  *  Send STOP condition to NVRAM - puts NVRAM to sleep... ZZzzzz!!
  */
-static void S24C16_stop(sdev_p np, u_char *gpreg)
+static void S24C16_stop(struct sym_device *np, u_char *gpreg)
 {
        S24C16_set_bit(np, 0, gpreg, SET_CLK);
        S24C16_set_bit(np, 1, gpreg, SET_BIT);
@@ -363,7 +314,7 @@ static void S24C16_stop(sdev_p np, u_char *gpreg)
  *  Read or write a bit to the NVRAM,
  *  read if GPIO0 input else write if GPIO0 output
  */
-static void S24C16_do_bit(sdev_p np, u_char *read_bit, u_char write_bit, 
+static void S24C16_do_bit(struct sym_device *np, u_char *read_bit, u_char write_bit, 
                         u_char *gpreg)
 {
        S24C16_set_bit(np, write_bit, gpreg, SET_BIT);
@@ -378,7 +329,7 @@ static void S24C16_do_bit(sdev_p np, u_char *read_bit, u_char write_bit,
  *  Output an ACK to the NVRAM after reading,
  *  change GPIO0 to output and when done back to an input
  */
-static void S24C16_write_ack(sdev_p np, u_char write_bit, u_char *gpreg, 
+static void S24C16_write_ack(struct sym_device *np, u_char write_bit, u_char *gpreg, 
                            u_char *gpcntl)
 {
        OUTB (nc_gpcntl, *gpcntl & 0xfe);
@@ -390,7 +341,7 @@ static void S24C16_write_ack(sdev_p np, u_char write_bit, u_char *gpreg,
  *  Input an ACK from NVRAM after writing,
  *  change GPIO0 to input and when done back to an output
  */
-static void S24C16_read_ack(sdev_p np, u_char *read_bit, u_char *gpreg, 
+static void S24C16_read_ack(struct sym_device *np, u_char *read_bit, u_char *gpreg, 
                           u_char *gpcntl)
 {
        OUTB (nc_gpcntl, *gpcntl | 0x01);
@@ -402,7 +353,7 @@ static void S24C16_read_ack(sdev_p np, u_char *read_bit, u_char *gpreg,
  *  WRITE a byte to the NVRAM and then get an ACK to see it was accepted OK,
  *  GPIO0 must already be set as an output
  */
-static void S24C16_write_byte(sdev_p np, u_char *ack_data, u_char write_data, 
+static void S24C16_write_byte(struct sym_device *np, u_char *ack_data, u_char write_data, 
                             u_char *gpreg, u_char *gpcntl)
 {
        int x;
@@ -417,7 +368,7 @@ static void S24C16_write_byte(sdev_p np, u_char *ack_data, u_char write_data,
  *  READ a byte from the NVRAM and then send an ACK to say we have got it,
  *  GPIO0 must already be set as an input
  */
-static void S24C16_read_byte(sdev_p np, u_char *read_data, u_char ack_data, 
+static void S24C16_read_byte(struct sym_device *np, u_char *read_data, u_char ack_data, 
                            u_char *gpreg, u_char *gpcntl)
 {
        int x;
@@ -435,7 +386,7 @@ static void S24C16_read_byte(sdev_p np, u_char *read_data, u_char ack_data,
 /*
  *  Read 'len' bytes starting at 'offset'.
  */
-static int sym_read_S24C16_nvram (sdev_p np, int offset, u_char *data, int len)
+static int sym_read_S24C16_nvram(struct sym_device *np, int offset, u_char *data, int len)
 {
        u_char  gpcntl, gpreg;
        u_char  old_gpcntl, old_gpreg;
@@ -514,7 +465,7 @@ out:
  *  Try reading Symbios NVRAM.
  *  Return 0 if OK.
  */
-static int sym_read_Symbios_nvram (sdev_p np, Symbios_nvram *nvram)
+static int sym_read_Symbios_nvram(struct sym_device *np, Symbios_nvram *nvram)
 {
        static u_char Symbios_trailer[6] = {0xfe, 0xfe, 0, 0, 0, 0};
        u_char *data = (u_char *) nvram;
@@ -528,7 +479,7 @@ static int sym_read_Symbios_nvram (sdev_p np, Symbios_nvram *nvram)
 
        /* check valid NVRAM signature, verify byte count and checksum */
        if (nvram->type != 0 ||
-           bcmp(nvram->trailer, Symbios_trailer, 6) ||
+           memcmp(nvram->trailer, Symbios_trailer, 6) ||
            nvram->byte_count != len - 12)
                return 1;
 
@@ -555,7 +506,7 @@ static int sym_read_Symbios_nvram (sdev_p np, Symbios_nvram *nvram)
 /*
  *  Pulse clock bit in GPIO0
  */
-static void T93C46_Clk(sdev_p np, u_char *gpreg)
+static void T93C46_Clk(struct sym_device *np, u_char *gpreg)
 {
        OUTB (nc_gpreg, *gpreg | 0x04);
        UDELAY (2);
@@ -565,7 +516,7 @@ static void T93C46_Clk(sdev_p np, u_char *gpreg)
 /* 
  *  Read bit from NVRAM
  */
-static void T93C46_Read_Bit(sdev_p np, u_char *read_bit, u_char *gpreg)
+static void T93C46_Read_Bit(struct sym_device *np, u_char *read_bit, u_char *gpreg)
 {
        UDELAY (2);
        T93C46_Clk(np, gpreg);
@@ -575,7 +526,7 @@ static void T93C46_Read_Bit(sdev_p np, u_char *read_bit, u_char *gpreg)
 /*
  *  Write bit to GPIO0
  */
-static void T93C46_Write_Bit(sdev_p np, u_char write_bit, u_char *gpreg)
+static void T93C46_Write_Bit(struct sym_device *np, u_char write_bit, u_char *gpreg)
 {
        if (write_bit & 0x01)
                *gpreg |= 0x02;
@@ -593,7 +544,7 @@ static void T93C46_Write_Bit(sdev_p np, u_char write_bit, u_char *gpreg)
 /*
  *  Send STOP condition to NVRAM - puts NVRAM to sleep... ZZZzzz!!
  */
-static void T93C46_Stop(sdev_p np, u_char *gpreg)
+static void T93C46_Stop(struct sym_device *np, u_char *gpreg)
 {
        *gpreg &= 0xef;
        OUTB (nc_gpreg, *gpreg);
@@ -605,7 +556,7 @@ static void T93C46_Stop(sdev_p np, u_char *gpreg)
 /*
  *  Send read command and address to NVRAM
  */
-static void T93C46_Send_Command(sdev_p np, u_short write_data, 
+static void T93C46_Send_Command(struct sym_device *np, u_short write_data, 
                                u_char *read_bit, u_char *gpreg)
 {
        int x;
@@ -620,7 +571,8 @@ static void T93C46_Send_Command(sdev_p np, u_short write_data,
 /*
  *  READ 2 bytes from the NVRAM
  */
-static void T93C46_Read_Word(sdev_p np, u_short *nvram_data, u_char *gpreg)
+static void T93C46_Read_Word(struct sym_device *np,
+               unsigned short *nvram_data, unsigned char *gpreg)
 {
        int x;
        u_char read_bit;
@@ -639,13 +591,13 @@ static void T93C46_Read_Word(sdev_p np, u_short *nvram_data, u_char *gpreg)
 /*
  *  Read Tekram NvRAM data.
  */
-static int T93C46_Read_Data(sdev_p np, u_short *data,int len,u_char *gpreg)
+static int T93C46_Read_Data(struct sym_device *np, unsigned short *data,
+               int len, unsigned char *gpreg)
 {
-       u_char  read_bit;
-       int     x;
+       int x;
 
        for (x = 0; x < len; x++)  {
-
+               unsigned char read_bit;
                /* output read command and address */
                T93C46_Send_Command(np, 0x180 | x, &read_bit, gpreg);
                if (read_bit & 0x01)
@@ -660,7 +612,7 @@ static int T93C46_Read_Data(sdev_p np, u_short *data,int len,u_char *gpreg)
 /*
  *  Try reading 93C46 Tekram NVRAM.
  */
-static int sym_read_T93C46_nvram (sdev_p np, Tekram_nvram *nvram)
+static int sym_read_T93C46_nvram(struct sym_device *np, Tekram_nvram *nvram)
 {
        u_char gpcntl, gpreg;
        u_char old_gpcntl, old_gpreg;
@@ -692,7 +644,7 @@ static int sym_read_T93C46_nvram (sdev_p np, Tekram_nvram *nvram)
  *  Try reading Tekram NVRAM.
  *  Return 0 if OK.
  */
-static int sym_read_Tekram_nvram (sdev_p np, Tekram_nvram *nvram)
+static int sym_read_Tekram_nvram (struct sym_device *np, Tekram_nvram *nvram)
 {
        u_char *data = (u_char *) nvram;
        int len = sizeof(*nvram);
@@ -700,13 +652,13 @@ static int sym_read_Tekram_nvram (sdev_p np, Tekram_nvram *nvram)
        int x;
 
        switch (np->device_id) {
-       case PCI_ID_SYM53C885:
-       case PCI_ID_SYM53C895:
-       case PCI_ID_SYM53C896:
+       case PCI_DEVICE_ID_NCR_53C885:
+       case PCI_DEVICE_ID_NCR_53C895:
+       case PCI_DEVICE_ID_NCR_53C896:
                x = sym_read_S24C16_nvram(np, TEKRAM_24C16_NVRAM_ADDRESS,
                                          data, len);
                break;
-       case PCI_ID_SYM53C875:
+       case PCI_DEVICE_ID_NCR_53C875:
                x = sym_read_S24C16_nvram(np, TEKRAM_24C16_NVRAM_ADDRESS,
                                          data, len);
                if (!x)
@@ -727,4 +679,19 @@ static int sym_read_Tekram_nvram (sdev_p np, Tekram_nvram *nvram)
        return 0;
 }
 
-#endif /* SYM_CONF_NVRAM_SUPPORT */
+/*
+ *  Try reading Symbios or Tekram NVRAM
+ */
+int sym_read_nvram(struct sym_device *np, struct sym_nvram *nvp)
+{
+       if (!sym_read_Symbios_nvram(np, &nvp->data.Symbios)) {
+               nvp->type = SYM_SYMBIOS_NVRAM;
+               sym_display_Symbios_nvram(np, &nvp->data.Symbios);
+       } else if (!sym_read_Tekram_nvram(np, &nvp->data.Tekram)) {
+               nvp->type = SYM_TEKRAM_NVRAM;
+               sym_display_Tekram_nvram(np, &nvp->data.Tekram);
+       } else {
+               nvp->type = 0;
+       }
+       return nvp->type;
+}
index 230c152..5d79598 100644 (file)
  *                             2.4 PCI device table (Thx to A.Richter) *
  *     2.0e7 00/11/28  KG      Allow overriding of BIOS settings       *
  *     2.0f  00/12/20  KG      Handle failed INQUIRYs during scan      *
+ *     2.1a  03/11/29  GL, KG  Initial fixing for 2.6. Convert to      *
+ *                             use the current PCI-mapping API, update *
+ *                             command-queuing.                        *
  ***********************************************************************/
 
 /* Uncomment SA_INTERRUPT, if the driver refuses to share its IRQ with other devices */
 //#define DC390_REMOVABLEDEBUG
 //#define DC390_LOCKDEBUG
 
+//#define NOP do{}while(0)
+#define C_NOP
+
 /* Debug definitions */
 #ifdef DC390_DEBUG0
-# define DEBUG0(x) x;
+# define DEBUG0(x) x
 #else
-# define DEBUG0(x)
+# define DEBUG0(x) C_NOP
 #endif
 #ifdef DC390_DEBUG1
-# define DEBUG1(x) x;
+# define DEBUG1(x) x
 #else
-# define DEBUG1(x)
+# define DEBUG1(x) C_NOP
 #endif
 #ifdef DC390_DCBDEBUG
-# define DCBDEBUG(x) x;
+# define DCBDEBUG(x) x
 #else
-# define DCBDEBUG(x)
+# define DCBDEBUG(x) C_NOP
 #endif
 #ifdef DC390_PARSEDEBUG
-# define PARSEDEBUG(x) x;
+# define PARSEDEBUG(x) x
 #else
-# define PARSEDEBUG(x)
+# define PARSEDEBUG(x) C_NOP
 #endif
 #ifdef DC390_REMOVABLEDEBUG
-# define REMOVABLEDEBUG(x) x;
+# define REMOVABLEDEBUG(x) x
 #else
-# define REMOVABLEDEBUG(x)
+# define REMOVABLEDEBUG(x) C_NOP
 #endif
-#define DCBDEBUG1(x)
+#define DCBDEBUG1(x) C_NOP
 
 /* Includes */
 #include <linux/module.h>
 #include <linux/version.h>
 #include <linux/blkdev.h>
 #include <linux/timer.h>
+#include <linux/interrupt.h>
 
 #include "scsi.h"
 #include "hosts.h"
 #endif
 #endif
 
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,93) 
-# define USE_SPINLOCKS 1
-# define NEW_PCI 1
-#else
-# undef NEW_PCI
-# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,30)
-#  define USE_SPINLOCKS 2
-# endif
-#endif
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,99)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,99) && defined(MODULE)
 static struct pci_device_id tmscsim_pci_tbl[] = {
        {
                .vendor         = PCI_VENDOR_ID_AMD,
@@ -286,143 +282,42 @@ static struct pci_device_id tmscsim_pci_tbl[] = {
 MODULE_DEVICE_TABLE(pci, tmscsim_pci_tbl);
 #endif
        
-#ifdef USE_SPINLOCKS
-
-# if USE_SPINLOCKS == 3 /* both */
-
-#  if defined (CONFIG_SMP)
-#   define DC390_LOCKA_INIT { spinlock_t __unlocked = SPIN_LOCK_UNLOCKED; pACB->lock = __unlocked; };
-#  else
-#   define DC390_LOCKA_INIT
-#  endif
-   spinlock_t dc390_drvlock = SPIN_LOCK_UNLOCKED;
-
-#  define DC390_AFLAGS unsigned long aflags;
-#  define DC390_IFLAGS unsigned long iflags;
-#  define DC390_DFLAGS unsigned long dflags; 
-
-#  define DC390_LOCK_IO spin_lock_irqsave (((struct Scsi_Host *)dev)->host_lock, iflags)
-#  define DC390_UNLOCK_IO spin_unlock_irqrestore (((struct Scsi_Host *)dev)->host_lock, iflags)
-
-#  define DC390_LOCK_DRV spin_lock_irqsave (&dc390_drvlock, dflags)
-#  define DC390_UNLOCK_DRV spin_unlock_irqrestore (&dc390_drvlock, dflags)
-#  define DC390_LOCK_DRV_NI spin_lock (&dc390_drvlock)
-#  define DC390_UNLOCK_DRV_NI spin_unlock (&dc390_drvlock)
-
-#  define DC390_LOCK_ACB spin_lock_irqsave (&(pACB->lock), aflags)
-#  define DC390_UNLOCK_ACB spin_unlock_irqrestore (&(pACB->lock), aflags)
-#  define DC390_LOCK_ACB_NI spin_lock (&(pACB->lock))
-#  define DC390_UNLOCK_ACB_NI spin_unlock (&(pACB->lock))
-//#  define DC390_LOCKA_INIT spin_lock_init (&(pACB->lock))
-
-# else
-
-#  if USE_SPINLOCKS == 2 /* adapter specific locks */
-
-#   if defined (CONFIG_SMP)
-#    define DC390_LOCKA_INIT { spinlock_t __unlocked = SPIN_LOCK_UNLOCKED; pACB->lock = __unlocked; };
-#   else
-#    define DC390_LOCKA_INIT
-#   endif
-    spinlock_t dc390_drvlock = SPIN_LOCK_UNLOCKED;
-#   define DC390_AFLAGS unsigned long aflags;
-#   define DC390_IFLAGS 
-#  define DC390_DFLAGS unsigned long dflags; 
-#   define DC390_LOCK_IO(dev) /* spin_lock_irqsave (&io_request_lock, iflags) */
-#   define DC390_UNLOCK_IO(dev) /* spin_unlock_irqrestore (&io_request_lock, iflags) */
-#   define DC390_LOCK_DRV spin_lock_irqsave (&dc390_drvlock, dflags)
-#   define DC390_UNLOCK_DRV spin_unlock_irqrestore (&dc390_drvlock, dflags)
-#   define DC390_LOCK_DRV_NI spin_lock (&dc390_drvlock)
-#   define DC390_UNLOCK_DRV_NI spin_unlock (&dc390_drvlock)
-#   define DC390_LOCK_ACB spin_lock_irqsave (&(pACB->lock), aflags)
-#   define DC390_UNLOCK_ACB spin_unlock_irqrestore (&(pACB->lock), aflags)
-#   define DC390_LOCK_ACB_NI spin_lock (&(pACB->lock))
-#   define DC390_UNLOCK_ACB_NI spin_unlock (&(pACB->lock))
-//#   define DC390_LOCKA_INIT spin_lock_init (&(pACB->lock))
-
-#  else /* USE_SPINLOCKS == 1: global lock io_request_lock */
-
-#   define DC390_AFLAGS 
-#   define DC390_IFLAGS unsigned long iflags;
-#   define DC390_DFLAGS unsigned long dflags; 
-    spinlock_t dc390_drvlock = SPIN_LOCK_UNLOCKED;
-#   define DC390_LOCK_IO(dev) spin_lock_irqsave (((struct Scsi_Host *)dev)->host_lock, iflags)
-#   define DC390_UNLOCK_IO(dev) spin_unlock_irqrestore (((struct Scsi_Host *)dev)->host_lock, iflags)
-#   define DC390_LOCK_DRV spin_lock_irqsave (&dc390_drvlock, dflags)
-#   define DC390_UNLOCK_DRV spin_unlock_irqrestore (&dc390_drvlock, dflags)
-#   define DC390_LOCK_DRV_NI spin_lock (&dc390_drvlock)
-#   define DC390_UNLOCK_DRV_NI spin_unlock (&dc390_drvlock)
-#   define DC390_LOCK_ACB /* DC390_LOCK_IO */
-#   define DC390_UNLOCK_ACB /* DC390_UNLOCK_IO */
-#   define DC390_LOCK_ACB_NI /* spin_lock (&(pACB->lock)) */
-#   define DC390_UNLOCK_ACB_NI /* spin_unlock (&(pACB->lock)) */
-#   define DC390_LOCKA_INIT /* DC390_LOCKA_INIT */
-
-#  endif /* 2 */
-# endif /* 3 */
-
-#else /* USE_SPINLOCKS undefined */
-
-# define DC390_AFLAGS unsigned long aflags;
-# define DC390_IFLAGS unsigned long iflags;
-# define DC390_DFLAGS unsigned long dflags; 
-# define DC390_LOCK_IO save_flags (iflags); cli ()
-# define DC390_UNLOCK_IO restore_flags (iflags)
-# define DC390_LOCK_DRV save_flags (dflags); cli ()
-# define DC390_UNLOCK_DRV restore_flags (dflags)
-# define DC390_LOCK_DRV_NI
-# define DC390_UNLOCK_DRV_NI
-# define DC390_LOCK_ACB save_flags (aflags); cli ()
-# define DC390_UNLOCK_ACB restore_flags (aflags)
-# define DC390_LOCK_ACB_NI
-# define DC390_UNLOCK_ACB_NI
-# define DC390_LOCKA_INIT
-#endif /* def */
-
+#define USE_SPINLOCKS 1
+#define NEW_PCI 1
+
+#define DC390_AFLAGS 
+#define DC390_IFLAGS unsigned long iflags
+#define DC390_DFLAGS unsigned long dflags
+spinlock_t dc390_drvlock = SPIN_LOCK_UNLOCKED;
+#define DC390_LOCK_IO(dev) spin_lock_irqsave (((struct Scsi_Host *)dev)->host_lock, iflags)
+#define DC390_UNLOCK_IO(dev) spin_unlock_irqrestore (((struct Scsi_Host *)dev)->host_lock, iflags)
+#define DC390_LOCK_DRV spin_lock_irqsave (&dc390_drvlock, dflags)
+#define DC390_UNLOCK_DRV spin_unlock_irqrestore (&dc390_drvlock, dflags)
+#define DC390_LOCK_DRV_NI spin_lock (&dc390_drvlock)
+#define DC390_UNLOCK_DRV_NI spin_unlock (&dc390_drvlock)
+#define DC390_LOCK_ACB /* DC390_LOCK_IO */
+#define DC390_UNLOCK_ACB /* DC390_UNLOCK_IO */
+#define DC390_LOCK_ACB_NI /* spin_lock (&(pACB->lock)) */
+#define DC390_UNLOCK_ACB_NI /* spin_unlock (&(pACB->lock)) */
+#define DC390_LOCKA_INIT /* DC390_LOCKA_INIT */
 
 /* These macros are used for uniform access to 2.0.x and 2.1.x PCI config space*/
 
-#ifdef NEW_PCI
-# define PDEV pdev
-# define PDEVDECL struct pci_dev *pdev
-# define PDEVDECL0 struct pci_dev *pdev = NULL
-# define PDEVDECL1 struct pci_dev *pdev
-# define PDEVSET pACB->pdev=pdev
-# define PDEVSET1 pdev=pACB->pdev
-# define PCI_WRITE_CONFIG_BYTE(pd, rv, bv) pci_write_config_byte (pd, rv, bv)
-# define PCI_READ_CONFIG_BYTE(pd, rv, bv) pci_read_config_byte (pd, rv, bv)
-# define PCI_WRITE_CONFIG_WORD(pd, rv, bv) pci_write_config_word (pd, rv, bv)
-# define PCI_READ_CONFIG_WORD(pd, rv, bv) pci_read_config_word (pd, rv, bv)
-# define PCI_BUS_DEV pdev->bus->number, pdev->devfn
-# define PCI_PRESENT (1)
-# define PCI_SET_MASTER pci_set_master (pdev)
-# define PCI_FIND_DEVICE(vend, id) (pdev = pci_find_device (vend, id, pdev))
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,10)
-# define PCI_GET_IO_AND_IRQ io_port = pci_resource_start (pdev, 0); irq = pdev->irq
-#else
-# define PCI_GET_IO_AND_IRQ io_port = pdev->base_address[0] & PCI_BASE_ADDRESS_IO_MASK; irq = pdev->irq
-#endif
-#else
-# include <linux/bios32.h>
-# define PDEV pbus, pdevfn
-# define PDEVDECL UCHAR pbus, UCHAR pdevfn
-# define PDEVDECL0 UCHAR pbus = 0; UCHAR pdevfn = 0; USHORT pci_index = 0; int error
-# define PDEVDECL1 UCHAR pbus; UCHAR pdevfn /*; USHORT pci_index */
-# define PDEVSET pACB->pbus=pbus; pACB->pdevfn=pdevfn /*; pACB->pci_index=pci_index */
-# define PDEVSET1 pbus=pACB->pbus; pdevfn=pACB->pdevfn /*; pci_index=pACB->pci_index */
-# define PCI_WRITE_CONFIG_BYTE(pd, rv, bv) pcibios_write_config_byte (pd, rv, bv)
-# define PCI_READ_CONFIG_BYTE(pd, rv, bv) pcibios_read_config_byte (pd, rv, bv)
-# define PCI_WRITE_CONFIG_WORD(pd, rv, bv) pcibios_write_config_word (pd, rv, bv)
-# define PCI_READ_CONFIG_WORD(pd, rv, bv) pcibios_read_config_word (pd, rv, bv)
-# define PCI_BUS_DEV pbus, pdevfn
-# define PCI_PRESENT pcibios_present ()
-# define PCI_SET_MASTER dc390_set_master (pbus, pdevfn)
-# define PCI_FIND_DEVICE(vend, id) (!pcibios_find_device (vend, id, pci_index++, &pbus, &pdevfn))
-# define PCI_GET_IO_AND_IRQ error = pcibios_read_config_dword (pbus, pdevfn, PCI_BASE_ADDRESS_0, &io_port);    \
- error |= pcibios_read_config_byte (pbus, pdevfn, PCI_INTERRUPT_LINE, &irq);   \
- io_port &= 0xfffe;    \
- if (error) { printk (KERN_ERR "DC390_detect: Error reading PCI config registers!\n"); continue; }
-#endif 
+#define PDEV pdev
+#define PDEVDECL struct pci_dev *pdev
+#define PDEVDECL0 struct pci_dev *pdev = NULL
+#define PDEVDECL1 struct pci_dev *pdev
+#define PDEVSET pACB->pdev=pdev
+#define PDEVSET1 pdev=pACB->pdev
+#define PCI_WRITE_CONFIG_BYTE(pd, rv, bv) pci_write_config_byte (pd, rv, bv)
+#define PCI_READ_CONFIG_BYTE(pd, rv, bv) pci_read_config_byte (pd, rv, bv)
+#define PCI_WRITE_CONFIG_WORD(pd, rv, bv) pci_write_config_word (pd, rv, bv)
+#define PCI_READ_CONFIG_WORD(pd, rv, bv) pci_read_config_word (pd, rv, bv)
+#define PCI_BUS_DEV pdev->bus->number, pdev->devfn
+#define PCI_PRESENT (1)
+#define PCI_SET_MASTER pci_set_master (pdev)
+#define PCI_FIND_DEVICE(vend, id) (pdev = pci_find_device (vend, id, pdev))
+#define PCI_GET_IO_AND_IRQ do{io_port = pci_resource_start (pdev, 0); irq = pdev->irq;} while(0)
 
 #include "tmscsim.h"
 
@@ -457,16 +352,14 @@ static void __inline__ dc390_RequestSense( PACB pACB, PDCB pDCB, PSRB pSRB );
 static void __inline__ dc390_InvalidCmd( PACB pACB );
 static void __inline__ dc390_EnableMsgOut_Abort (PACB, PSRB);
 static void dc390_remove_dev (PACB pACB, PDCB pDCB);
-void do_DC390_Interrupt( int, void *, struct pt_regs *);
+irqreturn_t do_DC390_Interrupt( int, void *, struct pt_regs *);
 
 int    dc390_initAdapter( PSH psh, ULONG io_port, UCHAR Irq, UCHAR index );
 void   dc390_initDCB( PACB pACB, PDCB *ppDCB, UCHAR id, UCHAR lun);
 void   dc390_updateDCB (PACB pACB, PDCB pDCB);
 
-#ifdef MODULE
- static int DC390_release(struct Scsi_Host *host);
- static int dc390_shutdown (struct Scsi_Host *host);
-#endif
+static int DC390_release(struct Scsi_Host *host);
+static int dc390_shutdown (struct Scsi_Host *host);
 
 
 //static PSHT  dc390_pSHT_start = NULL;
@@ -609,7 +502,7 @@ static void __init dc390_EEprom_Override (UCHAR index)
                ptr[id<<2] = (UCHAR)tmscsim[2];         /* EE_MODE1 */
        if (tmscsim[1] != -2)
                ptr[(id<<2) + 1] = (UCHAR)tmscsim[1];   /* EE_Speed */
-    };
+    }
 }
 
 /* Handle "-1" case */
@@ -641,7 +534,7 @@ static void __init dc390_fill_with_defaults (void)
 {
        int i;
        PARSEDEBUG(printk(KERN_INFO "DC390: setup %08x %08x %08x %08x %08x %08x\n", tmscsim[0],\
-                     tmscsim[1], tmscsim[2], tmscsim[3], tmscsim[4], tmscsim[5]);)
+                         tmscsim[1], tmscsim[2], tmscsim[3], tmscsim[4], tmscsim[5]));
        for (i = 0; i < 6; i++)
        {
                if (tmscsim[i] < 0 || tmscsim[i] > 255)
@@ -652,7 +545,7 @@ static void __init dc390_fill_with_defaults (void)
        if (tmscsim[1] >   7) tmscsim[1] =   4;
        if (tmscsim[4] >   5) tmscsim[4] =   4;
        if (tmscsim[5] > 180) tmscsim[5] = 180;
-};
+}
 #endif
 
 /* Override defaults on cmdline:
@@ -669,12 +562,12 @@ int __init dc390_setup (char *str)
        {
                printk (KERN_NOTICE "DC390: ignore extra params!\n");
                im = 6;
-       };
+       }
        for (i = 0; i < im; i++)
                tmscsim[i] = ints[i+1];
        /* dc390_checkparams (); */
        return 1;
-};
+}
 #ifndef MODULE
 __setup("tmscsim=", dc390_setup);
 #endif
@@ -688,11 +581,11 @@ void __init dc390_setup (char *str, int *ints)
        {
                printk (KERN_NOTICE "DC390: ignore extra params!\n");
                im = 6;
-       };
+       }
        for (i = 0; i < im; i++)
                tmscsim[i] = ints[i+1];
        /* dc390_checkparams (); */
-};
+}
 #endif
 
 
@@ -787,7 +680,7 @@ static void __init dc390_interpret_delay (UCHAR index)
 {
     char interpd [] = {1,3,5,10,16,30,60,120};
     dc390_eepromBuf[index][EE_DELAY] = interpd [dc390_eepromBuf[index][EE_DELAY]];
-};
+}
 
 static UCHAR __init dc390_CheckEEpromCheckSum( PDEVDECL, UCHAR index )
 {
@@ -822,14 +715,14 @@ static PDCB __inline__ dc390_findDCB ( PACB pACB, UCHAR id, UCHAR lun)
        if (pDCB == pACB->pLinkDCB)
          {
             DCBDEBUG(printk (KERN_WARNING "DC390: DCB not found (DCB=%p, DCBmap[%2x]=%2x)\n",
-                    pDCB, id, pACB->DCBmap[id]);)
+                             pDCB, id, pACB->DCBmap[id]));
             return 0;
          }
-     };
+     }
    DCBDEBUG1( printk (KERN_DEBUG "DCB %p (%02x,%02x) found.\n",        \
-                     pDCB, pDCB->TargetID, pDCB->TargetLUN);)
+                     pDCB, pDCB->TargetID, pDCB->TargetLUN));
    return pDCB;
-};
+}
 
 /* Queueing philosphy:
  * There are a couple of lists:
@@ -858,39 +751,37 @@ static PSRB dc390_find_cmd_in_SRBq (PSCSICMD cmd, PSRB queue)
        if (q == queue) return 0;
     }
     return q;
-};
+}
 #endif
     
 
 /* Append to Query List */
 static void dc390_Query_append( PSCSICMD cmd, PACB pACB )
 {
-    DEBUG0(printk ("DC390: Append cmd %li to Query\n", cmd->pid);)
-    if( !pACB->QueryCnt )
-       pACB->pQueryHead = cmd;
-    else
-       pACB->pQueryTail->next = cmd;
+       dc390_cmd_scp_t *cmdq = (dc390_cmd_scp_t *)&cmd->SCp;
 
-    pACB->pQueryTail = cmd;
-    pACB->QueryCnt++;
-    pACB->CmdOutOfSRB++;
-    cmd->next = NULL;
+       DEBUG0(printk ("DC390: Append cmd %li to Query\n", cmd->pid));
+
+       list_add_tail(&cmdq->list, &pACB->cmdq);
+       pACB->QueryCnt++;
+       pACB->CmdOutOfSRB++;
 }
 
 
 /* Return next cmd from Query list */
 static PSCSICMD dc390_Query_get ( PACB pACB )
 {
-    PSCSICMD  pcmd;
-
-    pcmd = pACB->pQueryHead;
-    if (!pcmd) return pcmd;
-    DEBUG0(printk ("DC390: Get cmd %li from Query\n", pcmd->pid);)
-    pACB->pQueryHead = pcmd->next;
-    pcmd->next = NULL;
-    if (!pACB->pQueryHead) pACB->pQueryTail = NULL;
-    pACB->QueryCnt--;
-    return( pcmd );
+       PSCSICMD  pcmd;
+       dc390_cmd_scp_t *cmdq;
+       if (list_empty(&pACB->cmdq))
+               return NULL;
+
+       pcmd = (PSCSICMD) list_entry(pACB->cmdq.next, struct scsi_cmnd_list, scp.list);
+       DEBUG0(printk ("DC390: Get cmd %li from Query\n", pcmd->pid));
+       cmdq = (dc390_cmd_scp_t *)&pcmd->SCp;
+       list_del(&cmdq->list);
+       pACB->QueryCnt--;
+       return pcmd;
 }
 
 
@@ -900,7 +791,7 @@ static __inline__ PSRB dc390_Free_get ( PACB pACB )
     PSRB   pSRB;
 
     pSRB = pACB->pFreeSRB;
-    DEBUG0(printk ("DC390: Get Free SRB %p\n", pSRB);)
+    DEBUG0(printk ("DC390: Get Free SRB %p\n", pSRB));
     if( pSRB )
     {
        pACB->pFreeSRB = pSRB->pNextSRB;
@@ -913,7 +804,7 @@ static __inline__ PSRB dc390_Free_get ( PACB pACB )
 /* Insert SRB oin top of free list */
 static __inline__ void dc390_Free_insert (PACB pACB, PSRB pSRB)
 {
-    DEBUG0(printk ("DC390: Free SRB %p\n", pSRB);)
+    DEBUG0(printk ("DC390: Free SRB %p\n", pSRB));
     pSRB->pNextSRB = pACB->pFreeSRB;
     pACB->pFreeSRB = pSRB;
 }
@@ -922,7 +813,7 @@ static __inline__ void dc390_Free_insert (PACB pACB, PSRB pSRB)
 /* Inserts a SRB to the top of the Waiting list */
 static __inline__ void dc390_Waiting_insert ( PDCB pDCB, PSRB pSRB )
 {
-    DEBUG0(printk ("DC390: Insert pSRB %p cmd %li to Waiting\n", pSRB, pSRB->pcmd->pid);)
+    DEBUG0(printk ("DC390: Insert pSRB %p cmd %li to Waiting\n", pSRB, pSRB->pcmd->pid));
     pSRB->pNextSRB = pDCB->pWaitingSRB;
     if (!pDCB->pWaitingSRB)
        pDCB->pWaitLast = pSRB;
@@ -934,7 +825,7 @@ static __inline__ void dc390_Waiting_insert ( PDCB pDCB, PSRB pSRB )
 /* Queue SRB to waiting list */
 static __inline__ void dc390_Waiting_append ( PDCB pDCB, PSRB pSRB)
 {
-    DEBUG0(printk ("DC390: Append pSRB %p cmd %li to Waiting\n", pSRB, pSRB->pcmd->pid);)
+       DEBUG0(printk ("DC390: Append pSRB %p cmd %li to Waiting\n", pSRB, pSRB->pcmd->pid));
     if( pDCB->pWaitingSRB )
        pDCB->pWaitLast->pNextSRB = pSRB;
     else
@@ -949,7 +840,7 @@ static __inline__ void dc390_Waiting_append ( PDCB pDCB, PSRB pSRB)
 static __inline__ void dc390_Going_append (PDCB pDCB, PSRB pSRB)
 {
     pDCB->GoingSRBCnt++;
-    DEBUG0(printk("DC390: Append SRB %p to Going\n", pSRB);)
+    DEBUG0(printk("DC390: Append SRB %p to Going\n", pSRB));
     /* Append to the list of Going commands */
     if( pDCB->pGoingSRB )
        pDCB->pGoingLast->pNextSRB = pSRB;
@@ -959,11 +850,11 @@ static __inline__ void dc390_Going_append (PDCB pDCB, PSRB pSRB)
     pDCB->pGoingLast = pSRB;
     /* No next one in sent list */
     pSRB->pNextSRB = NULL;
-};
+}
 
 static __inline__ void dc390_Going_remove (PDCB pDCB, PSRB pSRB)
 {
-   DEBUG0(printk("DC390: Remove SRB %p from Going\n", pSRB);)
+       DEBUG0(printk("DC390: Remove SRB %p from Going\n", pSRB));
    if (pSRB == pDCB->pGoingSRB)
        pDCB->pGoingSRB = pSRB->pNextSRB;
    else
@@ -978,12 +869,12 @@ static __inline__ void dc390_Going_remove (PDCB pDCB, PSRB pSRB)
          pDCB->pGoingLast = psrb;
      }
    pDCB->GoingSRBCnt--;
-};
+}
 
 /* Moves SRB from Going list to the top of Waiting list */
 static void dc390_Going_to_Waiting ( PDCB pDCB, PSRB pSRB )
 {
-    DEBUG0(printk(KERN_INFO "DC390: Going_to_Waiting (SRB %p) pid = %li\n", pSRB, pSRB->pcmd->pid);)
+    DEBUG0(printk(KERN_INFO "DC390: Going_to_Waiting (SRB %p) pid = %li\n", pSRB, pSRB->pcmd->pid));
     /* Remove SRB from Going */
     dc390_Going_remove (pDCB, pSRB);
     /* Insert on top of Waiting */
@@ -995,7 +886,7 @@ static void dc390_Going_to_Waiting ( PDCB pDCB, PSRB pSRB )
 static __inline__ void dc390_Waiting_to_Going ( PDCB pDCB, PSRB pSRB )
 {      
        /* Remove from waiting list */
-       DEBUG0(printk("DC390: Remove SRB %p from head of Waiting\n", pSRB);)
+       DEBUG0(printk("DC390: Remove SRB %p from head of Waiting\n", pSRB));
        pDCB->pWaitingSRB = pSRB->pNextSRB;
        if( !pDCB->pWaitingSRB ) pDCB->pWaitLast = NULL;
        pDCB->WaitSRBCnt--;
@@ -1068,14 +959,14 @@ static void dc390_Waiting_process ( PACB pACB )
 void DC390_waiting_timed_out (unsigned long ptr)
 {
        PACB pACB = (PACB)ptr;
-       DC390_IFLAGS
-       DC390_AFLAGS
-       DEBUG0(printk ("DC390: Debug: Waiting queue woken up by timer!\n");)
-       DC390_LOCK_IO(pACB.pScsiHost);
+       DC390_IFLAGS;
+       DC390_AFLAGS;
+       DEBUG0(printk ("DC390: Debug: Waiting queue woken up by timer!\n"));
+       DC390_LOCK_IO(pACB->pScsiHost);
        DC390_LOCK_ACB;
        dc390_Waiting_process (pACB);
        DC390_UNLOCK_ACB;
-       DC390_UNLOCK_IO(pACB.pScsiHost);
+       DC390_UNLOCK_IO(pACB->pScsiHost);
 }
 
 /***********************************************************************
@@ -1116,9 +1007,79 @@ static void dc390_SendSRB( PACB pACB, PSRB pSRB )
     else {
        dc390_Waiting_insert (pDCB, pSRB);
        dc390_waiting_timer (pACB, HZ/5);
-    };
+    }
+}
+
+
+/* Create pci mapping */
+static int dc390_pci_map (PSRB pSRB)
+{
+       int error = 0;
+       Scsi_Cmnd *pcmd = pSRB->pcmd;
+       struct pci_dev *pdev = pSRB->pSRBDCB->pDCBACB->pdev;
+       dc390_cmd_scp_t* cmdp = ((dc390_cmd_scp_t*)(&pcmd->SCp));
+       /* Map sense buffer */
+       if (pSRB->SRBFlag & AUTO_REQSENSE) {
+               sg_dma_address(&pSRB->Segmentx) = cmdp->saved_dma_handle = 
+                       pci_map_page(pdev, virt_to_page(pcmd->sense_buffer),
+                                    (unsigned long)pcmd->sense_buffer & ~PAGE_MASK, sizeof(pcmd->sense_buffer),
+                                    DMA_FROM_DEVICE);
+               pSRB->Segmentx.length = sizeof(pcmd->sense_buffer);
+               pSRB->SGcount = 1;
+               pSRB->pSegmentList = (PSGL) &pSRB->Segmentx;
+               DEBUG1(printk("%s(): Mapped sense buffer %p at %x\n", __FUNCTION__, pcmd->sense_buffer, cmdp->saved_dma_handle));
+       /* Make SG list */      
+       } else if (pcmd->use_sg) {
+               pSRB->pSegmentList = (PSGL) pcmd->request_buffer;
+               pSRB->SGcount = pci_map_sg(pdev, pSRB->pSegmentList,
+                                          pcmd->use_sg,
+                                          scsi_to_pci_dma_dir(pcmd->sc_data_direction));
+               /* TODO: error handling */
+               if (!pSRB->SGcount)
+                       error = 1;
+               DEBUG1(printk("%s(): Mapped SG %p with %d (%d) elements\n", __FUNCTION__, pcmd->request_buffer, pSRB->SGcount, pcmd->use_sg));
+       /* Map single segment */
+       } else if (pcmd->request_buffer && pcmd->request_bufflen) {
+               sg_dma_address(&pSRB->Segmentx) = cmdp->saved_dma_handle =
+                       pci_map_page(pdev, virt_to_page(pcmd->request_buffer),
+                                    (unsigned long)pcmd->request_buffer & ~PAGE_MASK,
+                                    pcmd->request_bufflen, scsi_to_pci_dma_dir(pcmd->sc_data_direction));
+               /* TODO: error handling */
+               pSRB->Segmentx.length = pcmd->request_bufflen;
+               pSRB->SGcount = 1;
+               pSRB->pSegmentList = (PSGL) &pSRB->Segmentx;
+               DEBUG1(printk("%s(): Mapped request buffer %p at %x\n", __FUNCTION__, pcmd->request_buffer, cmdp->saved_dma_handle));
+       /* No mapping !? */     
+       } else
+               pSRB->SGcount = 0;
+       return error;
 }
 
+/* Remove pci mapping */
+static void dc390_pci_unmap (PSRB pSRB)
+{
+       Scsi_Cmnd* pcmd = pSRB->pcmd;
+       struct pci_dev *pdev = pSRB->pSRBDCB->pDCBACB->pdev;
+       dc390_cmd_scp_t* cmdp = ((dc390_cmd_scp_t*)(&pcmd->SCp));
+
+       if (pSRB->SRBFlag) {
+               pci_unmap_page(pdev, cmdp->saved_dma_handle,
+                              sizeof(pcmd->sense_buffer), DMA_FROM_DEVICE);
+               DEBUG1(printk("%s(): Unmapped sense buffer at %x\n", __FUNCTION__, cmdp->saved_dma_handle));
+       } else if (pcmd->use_sg) {
+               pci_unmap_sg(pdev, pcmd->request_buffer, pcmd->use_sg,
+                            scsi_to_pci_dma_dir(pcmd->sc_data_direction));
+               DEBUG1(printk("%s(): Unmapped SG at %p with %d elements\n", __FUNCTION__, pcmd->request_buffer, pcmd->use_sg));
+       } else if (pcmd->request_buffer && pcmd->request_bufflen) {
+               pci_unmap_page(pdev,
+                              cmdp->saved_dma_handle,
+                              pcmd->request_bufflen,
+                              scsi_to_pci_dma_dir(pcmd->sc_data_direction));
+               DEBUG1(printk("%s(): Unmapped request buffer at %x\n", __FUNCTION__, cmdp->saved_dma_handle));
+       }
+}
+
+
 /***********************************************************************
  * Function: static void dc390_BuildSRB (Scsi_Cmd *pcmd, PDCB pDCB, 
  *                                      PSRB pSRB)
@@ -1134,21 +1095,6 @@ static void dc390_BuildSRB (Scsi_Cmnd* pcmd, PDCB pDCB, PSRB pSRB)
     //pSRB->ScsiCmdLen = pcmd->cmd_len;
     //memcpy (pSRB->CmdBlock, pcmd->cmnd, pcmd->cmd_len);
     
-    if( pcmd->use_sg )
-    {
-       pSRB->SGcount = (UCHAR) pcmd->use_sg;
-       pSRB->pSegmentList = (PSGL) pcmd->request_buffer;
-    }
-    else if( pcmd->request_buffer )
-    {
-       pSRB->SGcount = 1;
-       pSRB->pSegmentList = (PSGL) &pSRB->Segmentx;
-       pSRB->Segmentx.address = (PUCHAR) pcmd->request_buffer;
-       pSRB->Segmentx.length = pcmd->request_bufflen;
-    }
-    else
-       pSRB->SGcount = 0;
-
     pSRB->SGIndex = 0;
     pSRB->AdaptStatus = 0;
     pSRB->TargetStatus = 0;
@@ -1166,7 +1112,8 @@ static void dc390_BuildSRB (Scsi_Cmnd* pcmd, PDCB pDCB, PSRB pSRB)
     pSRB->ScsiPhase = 0;
     pSRB->EndMessage = 0;
     pSRB->TagNumber = 255;
-};
+    /* KG: deferred PCI mapping to dc390_StartSCSI */
+}
 
 /* Put cmnd from Query to Waiting list and send next Waiting cmnd */
 static void dc390_Query_to_Waiting (PACB pACB)
@@ -1183,7 +1130,7 @@ static void dc390_Query_to_Waiting (PACB pACB)
        pSRB = dc390_Free_get ( pACB );
        if (!pSRB) return;
        pcmd = dc390_Query_get ( pACB );
-       if (!pcmd) { dc390_Free_insert (pACB, pSRB); return; }; /* should not happen */
+       if (!pcmd) { dc390_Free_insert (pACB, pSRB); return; } /* should not happen */
        pDCB = dc390_findDCB (pACB, pcmd->device->id, pcmd->device->lun);
        if (!pDCB) 
        { 
@@ -1193,7 +1140,7 @@ static void dc390_Query_to_Waiting (PACB pACB)
                DC390_UNLOCK_ACB_NI;
                pcmd->done (pcmd);
                DC390_LOCK_ACB_NI;
-       };
+       }
        dc390_BuildSRB (pcmd, pDCB, pSRB);
        dc390_Waiting_append ( pDCB, pSRB );
     }
@@ -1222,13 +1169,13 @@ int DC390_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *))
 {
     PDCB   pDCB;
     PSRB   pSRB;
-    DC390_AFLAGS
     PACB   pACB = (PACB) cmd->device->host->hostdata;
+    DC390_AFLAGS;
 
 
     DEBUG0(/*  if(pACB->scan_devices) */       \
-       printk(KERN_INFO "DC390: Queue Cmd=%02x,Tgt=%d,LUN=%d (pid=%li)\n",\
-               cmd->cmnd[0],cmd->device->id,cmd->device->lun,cmd->pid);)
+       printk(KERN_INFO "DC390: Queue Cmd=%02x,Tgt=%d,LUN=%d (pid=%li), buffer=%p\n",\
+              cmd->cmnd[0],cmd->device->id,cmd->device->lun,cmd->pid, cmd->buffer));
 
     DC390_LOCK_ACB;
     
@@ -1274,7 +1221,7 @@ int DC390_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *))
            done (cmd);
            return (0);
 #endif
-         };
+         }
             
     }
     else if( !(pACB->scan_devices) && !(pACB->DCBmap[cmd->device->id] & (1 << cmd->device->lun)) )
@@ -1301,7 +1248,7 @@ int DC390_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *))
            done (cmd);
            return (0);
 #endif
-        };
+        }
     }
 
     pACB->Cmds++;
@@ -1312,14 +1259,14 @@ int DC390_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *))
 
     if( pACB->QueryCnt ) /* Unsent commands ? */
     {
-       DEBUG0(printk ("DC390: QueryCnt != 0\n");)
+       DEBUG0(printk ("DC390: QueryCnt != 0\n"));
        dc390_Query_append ( cmd, pACB );
        dc390_Waiting_process (pACB);
     }
     else if (pDCB->pWaitingSRB)
     {
        pSRB = dc390_Free_get ( pACB );
-       DEBUG0(if (!pSRB) printk ("DC390: No free SRB but Waiting\n"); else printk ("DC390: Free SRB w/ Waiting\n");)
+       DEBUG0(if (!pSRB) printk ("DC390: No free SRB but Waiting\n"); else printk ("DC390: Free SRB w/ Waiting\n"));
        if (!pSRB) dc390_Query_append (cmd, pACB);
        else 
          {
@@ -1331,7 +1278,7 @@ int DC390_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *))
     else
     {
        pSRB = dc390_Free_get ( pACB );
-       DEBUG0(if (!pSRB) printk ("DC390: No free SRB w/o Waiting\n"); else printk ("DC390: Free SRB w/o Waiting\n");)
+       DEBUG0(if (!pSRB) printk ("DC390: No free SRB w/o Waiting\n"); else printk ("DC390: Free SRB w/o Waiting\n"));
        if (!pSRB)
        {
            dc390_Query_append (cmd, pACB);
@@ -1341,11 +1288,11 @@ int DC390_queue_command (Scsi_Cmnd *cmd, void (* done)(Scsi_Cmnd *))
        {
            dc390_BuildSRB (cmd, pDCB, pSRB);
            dc390_SendSRB (pACB, pSRB);
-       };
-    };
+       }
+    }
 
     DC390_UNLOCK_ACB;
-    DEBUG1(printk (KERN_DEBUG " ... command (pid %li) queued successfully.\n", cmd->pid);)
+    DEBUG1(printk (KERN_DEBUG " ... command (pid %li) queued successfully.\n", cmd->pid));
     return(0);
 }
 
@@ -1480,7 +1427,7 @@ int DC390_bios_param (struct scsi_device *sdev, struct block_device *bdev,
                sector_t capacity, int geom[])
 {
     return scsicam_bios_param (bdev, capacity, geom);
-};
+}
 #endif
 
 
@@ -1496,7 +1443,7 @@ void dc390_dumpinfo (PACB pACB, PDCB pDCB, PSRB pSRB)
                pSRB->TotalXferredLen, pSRB->SGToBeXferLen, pSRB->SRBState,
                pSRB->ScsiPhase);
        printk ("DC390: AdpaterStatus: %02x, SRB Status %02x\n", pSRB->AdaptStatus, pSRB->SRBStatus);
-    };
+    }
     printk ("DC390: Status of last IRQ (DMA/SC/Int/IRQ): %08x\n", dc390_laststatus);
     printk ("DC390: Register dump: SCSI block:\n");
     printk ("DC390: XferCnt  Cmd Stat IntS IRQS FFIS Ctl1 Ctl2 Ctl3 Ctl4\n");
@@ -1512,7 +1459,7 @@ void dc390_dumpinfo (PACB pACB, PDCB pDCB, PSRB pSRB)
        printk ("DC390: FIFO:");
        while (DC390_read8(Current_Fifo) & 0x1f) printk (" %02x", DC390_read8(ScsiFifo));
        printk ("\n");
-      };
+      }
     printk ("DC390: Register dump: DMA engine:\n");
     printk ("DC390: Cmd   STrCnt    SBusA    WrkBC    WrkAC Stat SBusCtrl\n");
     printk ("DC390:  %02x %08x %08x %08x %08x   %02x %08x\n",
@@ -1523,7 +1470,7 @@ void dc390_dumpinfo (PACB pACB, PDCB pDCB, PSRB pSRB)
     PDEVSET1; PCI_READ_CONFIG_WORD(PDEV, PCI_STATUS, &pstat);
     printk ("DC390: Register dump: PCI Status: %04x\n", pstat);
     printk ("DC390: In case of driver trouble read linux/Documentation/scsi/tmscsim.txt\n");
-};
+}
 
 
 /***********************************************************************
@@ -1543,11 +1490,10 @@ int DC390_abort (Scsi_Cmnd *cmd)
     PDCB  pDCB;
     PSRB  pSRB, psrb;
     UINT  count, i;
-    PSCSICMD  pcmd;
     int   status;
     //ULONG sbac;
-    DC390_AFLAGS
     PACB  pACB = (PACB) cmd->device->host->hostdata;
+    DC390_AFLAGS;
 
     DC390_LOCK_ACB;
 
@@ -1557,33 +1503,16 @@ int DC390_abort (Scsi_Cmnd *cmd)
     /* First scan Query list */
     if( pACB->QueryCnt )
     {
-       pcmd = pACB->pQueryHead;
-       if( pcmd == cmd )
-       {
-           /* Found: Dequeue */
-           pACB->pQueryHead = pcmd->next;
-           pcmd->next = NULL;
-           if (cmd == pACB->pQueryTail) pACB->pQueryTail = NULL;
-           pACB->QueryCnt--;
-           status = SCSI_ABORT_SUCCESS;
-           goto  ABO_X;
-       }
-       for( count = pACB->QueryCnt, i=0; i<count-1; i++)
-       {
-           if( pcmd->next == cmd )
-           {
-               pcmd->next = cmd->next;
-               cmd->next = NULL;
-               if (cmd == pACB->pQueryTail) pACB->pQueryTail = NULL;
-               pACB->QueryCnt--;
-               status = SCSI_ABORT_SUCCESS;
-               goto  ABO_X;
-           }
-           else
-           {
-               pcmd = pcmd->next;
-           }
-       }
+       struct scsi_cmnd_list *t, *pcmd_l;
+       list_for_each_entry_safe(pcmd_l, t, &pACB->cmdq, scp.list)
+               if( (struct scsi_cmnd*)pcmd_l == cmd )
+               {
+                       /* Found: Dequeue */
+                       list_del(&pcmd_l->scp.list);
+                       pACB->QueryCnt--;
+                       status = SCSI_ABORT_SUCCESS;
+                       goto  ABO_X;
+               }
     }
        
     pDCB = dc390_findDCB (pACB, cmd->device->id, cmd->device->lun);
@@ -1624,7 +1553,7 @@ int DC390_abort (Scsi_Cmnd *cmd)
 IN_WAIT:
        dc390_Free_insert (pACB, pSRB);
        pDCB->WaitSRBCnt--;
-       cmd->next = NULL;
+       INIT_LIST_HEAD((struct list_head*)&cmd->SCp);
        status = SCSI_ABORT_SUCCESS;
        goto  ABO_X;
     }
@@ -1677,7 +1606,7 @@ ABO_X:
                //udelay (10000);
                //DC390_read8 (INT_Status);
                //DC390_write8 (ScsiCmd, EN_SEL_RESEL);
-       };
+       }
     sbac = DC390_read32 (DMA_ScsiBusCtrl);
     if (sbac & SCSI_BUSY)
     {  /* clear BSY, SEL and ATN */
@@ -1695,7 +1624,7 @@ ABO_X:
        DC390_write8 (ScsiCmd, NOP_CMD);
        sbac = DC390_read32 (DMA_ScsiBusCtrl);
        printk ("%08lx\n", sbac);
-    };
+    }
 #endif
     dc390_lastabortedpid = cmd->pid;
     DC390_UNLOCK_ACB;
@@ -1781,11 +1710,11 @@ static void dc390_RecoverSRB( PACB pACB )
  * Returns : 0 on success.
  ***********************************************************************/
 
-int DC390_reset (Scsi_Cmnd *cmd, unsigned int resetFlags)
+int DC390_reset (Scsi_Cmnd *cmd)
 {
     UCHAR   bval;
-    DC390_AFLAGS
     PACB    pACB = (PACB) cmd->device->host->hostdata;
+    DC390_AFLAGS;
 
     printk(KERN_INFO "DC390: RESET ... ");
 
@@ -1841,10 +1770,11 @@ void dc390_initDCB( PACB pACB, PDCB *ppDCB, UCHAR id, UCHAR lun )
 
     pDCB = kmalloc (sizeof(DC390_DCB), GFP_ATOMIC);
     DCBDEBUG(printk (KERN_INFO "DC390: alloc mem for DCB (ID %i, LUN %i): %p\n"        \
-           id, lun, pDCB);)
+                    id, lun, pDCB));
  
-    *ppDCB = pDCB; pDCB2 = 0;
+    *ppDCB = pDCB;
     if (!pDCB) return;
+    pDCB2 = 0;
     if( pACB->DCBCnt == 0 )
     {
        pACB->pLinkDCB = pDCB;
@@ -1853,7 +1783,7 @@ void dc390_initDCB( PACB pACB, PDCB *ppDCB, UCHAR id, UCHAR lun )
     else
     {
        pACB->pLastDCB->pNextDCB = pDCB;
-    };
+    }
    
     pACB->DCBCnt++;
    
@@ -1925,21 +1855,21 @@ void dc390_updateDCB (PACB pACB, PDCB pDCB)
   } else {
        pDCB->SyncMode &= ~EN_TAG_QUEUEING;
        pDCB->MaxCommand = 1;
-  };
+  }
 
   if( pDCB->DevMode & SYNC_NEGO_ )
        pDCB->SyncMode |= SYNC_ENABLE;
   else {
        pDCB->SyncMode &= ~(SYNC_NEGO_DONE | SYNC_ENABLE);
        pDCB->SyncOffset &= ~0x0f;
-  };
+  }
 
   //if (! (pDCB->DevMode & EN_DISCONNECT_)) pDCB->SyncMode &= ~EN_ATN_STOP; 
 
   pDCB->CtrlR1 = pACB->pScsiHost->this_id;
   if( pDCB->DevMode & PARITY_CHK_ )
        pDCB->CtrlR1 |= PARITY_ERR_REPO;
-};  
+}  
 
 
 /***********************************************************************
@@ -1956,8 +1886,8 @@ static void dc390_updateDCBs (PACB pACB)
     {
       dc390_updateDCB (pACB, pDCB);
       pDCB = pDCB->pNextDCB;
-    };
-};
+    }
+}
   
 
 /***********************************************************************
@@ -2003,7 +1933,7 @@ void __init dc390_initACB (PSH psh, ULONG io_port, UCHAR Irq, UCHAR index)
 {
     PACB    pACB;
     UCHAR   i;
-    DC390_AFLAGS
+    DC390_AFLAGS;
 
     psh->can_queue = MAX_CMD_QUEUE;
     psh->cmd_per_lun = MAX_CMD_PER_LUN;
@@ -2021,15 +1951,13 @@ void __init dc390_initACB (PSH psh, ULONG io_port, UCHAR Irq, UCHAR index)
     psh->last_reset = jiffies;
        
     pACB = (PACB) psh->hostdata;
-    DC390_LOCKA_INIT;
-    DC390_LOCK_ACB;
 
     pACB->pScsiHost = psh;
     pACB->IOPortBase = (USHORT) io_port;
     pACB->IRQLevel = Irq;
 
     DEBUG0(printk (KERN_INFO "DC390: Adapter index %i, ID %i, IO 0x%08x, IRQ 0x%02x\n",        \
-           index, psh->this_id, (int)io_port, Irq);)
+                  index, psh->this_id, (int)io_port, Irq));
    
     psh->max_id = 8;
 
@@ -2045,7 +1973,7 @@ void __init dc390_initACB (PSH psh, ULONG io_port, UCHAR Irq, UCHAR index)
     pACB->pFreeSRB = pACB->SRB_array;
     pACB->SRBCount = MAX_SRB_CNT;
     pACB->QueryCnt = 0;
-    pACB->pQueryHead = NULL;
+    INIT_LIST_HEAD(&pACB->cmdq);
     pACB->AdapterIndex = index;
     pACB->status = 0;
     psh->this_id = dc390_eepromBuf[index][EE_ADAPT_SCSI_ID];
@@ -2088,14 +2016,11 @@ int __init dc390_initAdapter (PSH psh, ULONG io_port, UCHAR Irq, UCHAR index)
     int    i;
     
     pACB = (PACB) psh->hostdata;
-    
-    if (check_region (io_port, psh->n_io_port))
-       {
-           printk(KERN_ERR "DC390: register IO ports error!\n");
-           return( -1 );
-       }
-    else
-       request_region (io_port, psh->n_io_port, "tmscsim");
+
+    if (request_region (io_port, psh->n_io_port, "tmscsim") == NULL) {
+       printk(KERN_ERR "DC390: register IO ports error!\n");
+       return( -1 );
+    }
 
     DC390_read8_ (INT_Status, io_port);                /* Reset Pending INT */
 
@@ -2119,7 +2044,7 @@ int __init dc390_initAdapter (PSH psh, ULONG io_port, UCHAR Irq, UCHAR index)
        dc390_pACB_current->pNextACB = pACB;
        dc390_pACB_current = pACB;
        pACB->pNextACB = NULL;
-      };
+      }
 
     DC390_write8 (CtrlReg1, DIS_INT_ON_SCSI_RST | psh->this_id);       /* Disable SCSI bus reset interrupt */
 
@@ -2133,7 +2058,7 @@ int __init dc390_initAdapter (PSH psh, ULONG io_port, UCHAR Irq, UCHAR index)
        for( i=0; i<(500 + 1000*dc390_eepromBuf[pACB->AdapterIndex][EE_DELAY]); i++ )
                udelay(1000);
         */
-    };
+    }
     pACB->ACBFlag = 0;
     DC390_read8 (INT_Status);                          /* Reset Pending INT */
     
@@ -2176,7 +2101,7 @@ static int __init DC390_init (PSHT psht, ULONG io_port, UCHAR Irq, PDEVDECL, UCH
 {
     PSH   psh;
     PACB  pACB;
-    DC390_AFLAGS
+    DC390_AFLAGS;
     
     if (dc390_CheckEEpromCheckSum (PDEV, index))
     {
@@ -2224,20 +2149,18 @@ static int __init DC390_init (PSHT psht, ULONG io_port, UCHAR Irq, PDEVDECL, UCH
     }
 #endif
 
-    DEBUG0(printk(KERN_INFO "DC390: pSH = %8x,", (UINT) psh);)
-    DEBUG0(printk(" Index %02i,", index);)
+    DEBUG0(printk(KERN_INFO "DC390: pSH = %8x, Index %02i\n", (UINT) psh, index));
 
     dc390_initACB( psh, io_port, Irq, index );
-    pACB = (PACB) psh->hostdata;
         
     PDEVSET;
 
     if( !dc390_initAdapter( psh, io_port, Irq, index ) )
     {
-       DEBUG0(printk("\nDC390: pACB = %8x, pDCBmap = %8x, pSRB_array = %8x\n",\
-               (UINT) pACB, (UINT) pACB->DCBmap, (UINT) pACB->SRB_array);)
+       DEBUG0(printk("DC390: pACB = %8x, pDCBmap = %8x, pSRB_array = %8x\n",\
+                     (UINT) pACB, (UINT) pACB->DCBmap, (UINT) pACB->SRB_array));
        DEBUG0(printk("DC390: ACB size= %4x, DCB size= %4x, SRB size= %4x\n",\
-               sizeof(DC390_ACB), sizeof(DC390_DCB), sizeof(DC390_SRB) );)
+                     sizeof(DC390_ACB), sizeof(DC390_DCB), sizeof(DC390_SRB) ));
 
        DC390_UNLOCK_ACB;
         return (0);
@@ -2288,7 +2211,7 @@ static void __init dc390_set_master (PDEVDECL)
                PCI_WRITE_CONFIG_BYTE(PDEV, PCI_LATENCY_TIMER, 64);
        }
        
-};
+}
 #endif /* ! NEW_PCI */
 
 static void __init dc390_set_pci_cfg (PDEVDECL)
@@ -2298,7 +2221,7 @@ static void __init dc390_set_pci_cfg (PDEVDECL)
        cmd |= PCI_COMMAND_SERR | PCI_COMMAND_PARITY | PCI_COMMAND_IO;
        PCI_WRITE_CONFIG_WORD (PDEV, PCI_COMMAND, cmd);
        PCI_WRITE_CONFIG_WORD (PDEV, PCI_STATUS, (PCI_STATUS_SIG_SYSTEM_ERROR | PCI_STATUS_DETECTED_PARITY));
-};
+}
        
 
 int __init DC390_detect (Scsi_Host_Template *psht)
@@ -2306,10 +2229,7 @@ int __init DC390_detect (Scsi_Host_Template *psht)
     PDEVDECL0;
     UCHAR   irq;
     UINT    io_port;
-    //DC390_IFLAGS
-    DC390_DFLAGS
 
-    DC390_LOCK_DRV;
     //dc390_pSHT_start = psht;
     dc390_pACB_start = NULL;
 
@@ -2320,17 +2240,15 @@ int __init DC390_detect (Scsi_Host_Template *psht)
            if (pci_enable_device (pdev))
                continue;
 #endif
-           //DC390_LOCK_IO;            /* Remove this when going to new eh */
            PCI_GET_IO_AND_IRQ;
-           DEBUG0(printk(KERN_INFO "DC390(%i): IO_PORT=%04x,IRQ=%x\n", dc390_adapterCnt, (UINT) io_port, irq);)
+           DEBUG0(printk(KERN_INFO "DC390(%i): IO_PORT=%04x,IRQ=%x\n", dc390_adapterCnt, (UINT) io_port, irq));
 
            if( !DC390_init(psht, io_port, irq, PDEV, dc390_adapterCnt))
            {
                PCI_SET_MASTER;
                dc390_set_pci_cfg (PDEV);
                dc390_adapterCnt++;
-           };
-           //DC390_UNLOCK_IO;          /* Remove when going to new eh */
+           }
        }
     else
        printk (KERN_ERR "DC390: No PCI BIOS found!\n");
@@ -2342,7 +2260,6 @@ int __init DC390_detect (Scsi_Host_Template *psht)
        psht->proc_dir = &DC390_proc_scsi_tmscsim;
 #endif
     printk(KERN_INFO "DC390: %i adapters found\n", dc390_adapterCnt);
-    DC390_UNLOCK_DRV;
     return( dc390_adapterCnt );
 }
 
@@ -2368,17 +2285,17 @@ static void dc390_inquiry_done (Scsi_Cmnd* cmd)
        {
                pDCB->DevMode &= ~(SYNC_NEGO_ | TAG_QUEUEING_ | EN_DISCONNECT_ );
                dc390_updateDCB (pACB, pDCB);
-       };
-   };
+       }
+   }
    kfree (cmd);
-};
+}
 
 void dc390_inquiry (PACB pACB, PDCB pDCB)
 {
    char* buffer;
    Scsi_Cmnd* cmd;
    cmd = kmalloc (sizeof(Scsi_Cmnd) + 256, GFP_ATOMIC);
-   if (!cmd) { printk ("DC390: kmalloc failed in inquiry!\n"); return; };
+   if (!cmd) { printk ("DC390: kmalloc failed in inquiry!\n"); return; }
    buffer = (char*)cmd + sizeof(Scsi_Cmnd);
 
    memset (cmd, 0, sizeof(Scsi_Cmnd) + 256);
@@ -2401,13 +2318,13 @@ void dc390_inquiry (PACB pACB, PDCB pDCB)
    cmd->scsi_done = dc390_inquiry_done;
    cmd->timeout_per_command = HZ;
 
-   cmd->request.rq_status = RQ_SCSI_BUSY;
+   cmd->request->rq_status = RQ_SCSI_BUSY;
 
    pDCB->SyncMode &= ~SYNC_NEGO_DONE;
    printk (KERN_INFO "DC390: Queue INQUIRY command to dev ID %02x LUN %02x\n",
           pDCB->TargetID, pDCB->TargetLUN);
    DC390_queue_command (cmd, dc390_inquiry_done);
-};
+}
 
 /***********************************************************************
  * Functions: dc390_sendstart(), dc390_sendstart_done()
@@ -2422,14 +2339,14 @@ static void dc390_sendstart_done (Scsi_Cmnd* cmd)
    printk (KERN_INFO "DC390: SENDSTART (ID %02x LUN %02x) returned %08x\n",
           cmd->device->id, cmd->device->lun, cmd->result);
    kfree (cmd);
-};
+}
 
 void dc390_sendstart (PACB pACB, PDCB pDCB)
 {
    char* buffer;
    Scsi_Cmnd* cmd;
    cmd = kmalloc (sizeof(Scsi_Cmnd) + 256, GFP_ATOMIC);
-   if (!cmd) { printk ("DC390: kmalloc failed in sendstart!\n"); return; };
+   if (!cmd) { printk ("DC390: kmalloc failed in sendstart!\n"); return; }
    buffer = (char*)cmd + sizeof(Scsi_Cmnd);
 
    memset (cmd, 0, sizeof(Scsi_Cmnd) + 256);
@@ -2452,13 +2369,13 @@ void dc390_sendstart (PACB pACB, PDCB pDCB)
    cmd->scsi_done = dc390_sendstart_done;
    cmd->timeout_per_command = 5*HZ;
 
-   cmd->request.rq_status = RQ_SCSI_BUSY;
+   cmd->request->rq_status = RQ_SCSI_BUSY;
 
    pDCB->SyncMode &= ~SYNC_NEGO_DONE;
    printk (KERN_INFO "DC390: Queue SEND_START command to dev ID %02x LUN %02x\n",
           pDCB->TargetID, pDCB->TargetLUN);
    DC390_queue_command (cmd, dc390_sendstart_done);
-};
+}
 
 /********************************************************************
  * Function: dc390_set_info()
@@ -2476,7 +2393,7 @@ static int dc390_scanf (char** buffer, char** pos, char** p0, int* var)
    if (*p0 == *pos) return -1;
    *pos = strsep (buffer, " \t\n:=,;.");
    return 0;
-};
+}
 
 #define SCANF(buffer, pos, p0, var, min, max)          \
 if (dc390_scanf (&buffer, &pos, &p0, &var)) goto einv; \
@@ -2493,12 +2410,12 @@ static int dc390_yesno (char** buffer, char** pos, char* var, char bmask)
      }
    *pos = strsep (buffer, " \t\n:=,;");
    return 0;
-};
+}
 
-#define YESNO(buffer, pos, var, bmask)                 \
-if (dc390_yesno (&buffer, &pos, &var, bmask)) goto einv;       \
-else dc390_updateDCB (pACB, pDCB);             \
-if (!p) goto ok
+#define YESNO(buffer, pos, var, bmask)                                 \
+       if (dc390_yesno (&buffer, &pos, &var, bmask)) goto einv;        \
+       else dc390_updateDCB (pACB, pDCB);                              \
+       if (!pos) goto ok
 
 static int dc390_search (char** buffer, char** pos, char** p0, char* var, char* txt, int max, int scale, char* ign)
 {
@@ -2519,7 +2436,7 @@ static int dc390_search (char** buffer, char** pos, char** p0, char* var, char*
 
      }
    return 0;
-};
+}
 
 #define SEARCH(buffer, pos, p0, var, txt, max)                                         \
 if (dc390_search (&buffer, &pos, &p0, (PUCHAR)(&var), txt, max, 100, "")) goto einv2;  \
@@ -2545,7 +2462,7 @@ char* prstr (char* p, char* e)
      else *c++ = *p++;
    *c = 0;
    return _prstr;
-};
+}
 #endif
 
 int dc390_set_info (char *buffer, int length, PACB pACB)
@@ -2555,16 +2472,16 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
   int dum = 0;
   char dev;
   PDCB pDCB = pACB->pLinkDCB;
-  DC390_IFLAGS
-  DC390_AFLAGS 
+  DC390_IFLAGS;
+  DC390_AFLAGS;
   pos[length] = 0;
 
-  DC390_LOCK_IO(pACB.pScsiHost);
+  DC390_LOCK_IO(pACB->pScsiHost);
   DC390_LOCK_ACB;
   /* UPPERCASE */ 
   /* Don't use kernel toupper, because of 2.0.x bug: ctmp unexported */
   while (*pos) 
-    { if (*pos >='a' && *pos <= 'z') *pos = *pos + 'A' - 'a'; pos++; };
+    { if (*pos >='a' && *pos <= 'z') *pos = *pos + 'A' - 'a'; pos++; }
   
   /* Remove WS */
   pos = strsep (&buffer, " \t:\n=,;");
@@ -2589,7 +2506,7 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
       if (*pos) { SCANF (buffer, pos, p0, lun, 0, 7); } else goto einv;
       if (!*pos) goto einv;
       
-      PARSEDEBUG(printk (KERN_INFO "DC390: config line %i %i %i:\"%s\"\n", dev, id, lun, prstr (pos, &buffer[length]));)
+      PARSEDEBUG(printk (KERN_INFO "DC390: config line %i %i %i:\"%s\"\n", dev, id, lun, prstr (pos, &buffer[length])));
       pDCB = pACB->pLinkDCB;
       for (dum = 0; dum < dev; dum++) pDCB = pDCB->pNextDCB;
       /* Sanity Check */
@@ -2598,14 +2515,14 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
            printk (KERN_ERR "DC390: no such device: Idx=%02i ID=%02i LUN=%02i\n",
                    dev, id, lun);
            goto einv2;
-        };
+        }
 
       if (pDCB->pWaitingSRB || pDCB->pGoingSRB)
       {
          printk ("DC390: Cannot change dev (%i-%i) cfg: Pending requests\n",
                  pDCB->TargetID, pDCB->TargetLUN);
          goto einv;
-      };
+      }
          
       olddevmode = pDCB->DevMode;
       YESNO (buffer, pos, pDCB->DevMode, PARITY_CHK_);
@@ -2634,9 +2551,9 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
          pDCB->NegoPeriod = dum >> 2;
          if (pDCB->NegoPeriod != olddevmode) needs_inquiry++;
          if (!pos) goto ok;
-         if (memcmp (pos, "NS", 2) == 0) pos = strsep (*pos, " \t\n:=,;.");
+         if (memcmp (pos, "NS", 2) == 0) pos = strsep (&pos, " \t\n:=,;.");
        }
-      else pos = strsep (*pos, " \t\n:=,;.");
+      else pos = strsep (&pos, " \t\n:=,;.");
       if (!*pos) goto ok;
       
       /* Sync Speed in MHz */
@@ -2654,13 +2571,13 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
                for (; p0-pos > 1; p0--) dum /= 10;
                pDCB->NegoPeriod = (100000/(100*dumold + dum)) >> 2;
                if (pDCB->NegoPeriod < 19) pDCB->NegoPeriod = 19;
-               pos = strsep (*pos, " \t\n:=,;");
+               pos = strsep (&pos, " \t\n:=,;");
                if (!*pos) goto ok;
-            };
-         if (*pos == 'M') pos = strsep (*pos, " \t\n:=,;");
+            }
+         if (*pos == 'M') pos = strsep (&pos, " \t\n:=,;");
          if (pDCB->NegoPeriod != olddevmode) needs_inquiry++;
        }
-      else pos = strsep (*pos, " \t\n:=,;");
+      else pos = strsep (&pos, " \t\n:=,;");
       /* dc390_updateDCB (pACB, pDCB); */
       if (!*pos) goto ok;
 
@@ -2672,7 +2589,7 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
          pDCB->SyncOffset = dum;
          if (pDCB->SyncOffset > olddevmode) needs_inquiry++;
        }
-      else pos = strsep (*pos, " \t\n:=,;");
+      else pos = strsep (&pos, " \t\n:=,;");
       if (!*pos) goto ok;
       dc390_updateDCB (pACB, pDCB);
 
@@ -2685,13 +2602,13 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
                pDCB->MaxCommand = dum;
          else printk (KERN_INFO "DC390: Can't set MaxCmd larger than one without Tag Queueing!\n");
        }
-      else pos = strsep (*pos, " \t\n:=,;");
+      else pos = strsep (&pos, " \t\n:=,;");
 
     }
   else
     {
       char* p1 = pos; UCHAR dum, newadaptid;
-      PARSEDEBUG(printk (KERN_INFO "DC390: chg adapt cfg \"%s\"\n", prstr (pos, &buffer[length]));)
+      PARSEDEBUG(printk (KERN_INFO "DC390: chg adapt cfg \"%s\"\n", prstr (pos, &buffer[length])));
       dum = GLITCH_TO_NS (pACB->glitch_cfg);
       /* Adapter setting */
       SEARCH (buffer, pos, p0, pACB->pScsiHost->max_id, "MAXID", 8); 
@@ -2722,15 +2639,15 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
  ok:
   DC390_UNLOCK_ACB;
   if (needs_inquiry) 
-     { dc390_updateDCB (pACB, pDCB); dc390_inquiry (pACB, pDCB); };
-  DC390_UNLOCK_IO(pACB.pScsiHost);
+     { dc390_updateDCB (pACB, pDCB); dc390_inquiry (pACB, pDCB); }
+  DC390_UNLOCK_IO(pACB->pScsiHost);
   return (length);
 
  einv2:
   pos = p0;
  einv:
   DC390_UNLOCK_ACB;
-  DC390_UNLOCK_IO(pACB.pScsiHost);
+  DC390_UNLOCK_IO(pACB->pScsiHost);
   printk (KERN_WARNING "DC390: parse error near \"%s\"\n", (pos? pos: "NULL"));
   return (-EINVAL);
    
@@ -2741,22 +2658,22 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
        /* cmd.host = pACB->pScsiHost; */
        printk (KERN_WARNING "DC390: Driver reset requested!\n");
        DC390_UNLOCK_ACB;
-       DC390_reset (&cmd, 0);
-       DC390_UNLOCK_IO(pACB.pScsiHost);
-     };
+       DC390_reset (&cmd);
+       DC390_UNLOCK_IO(pACB->pScsiHost);
+     }
   return (length);
 
  dump:
      {
        dc390_dumpinfo (pACB, 0, 0);
        DC390_UNLOCK_ACB;
-       DC390_UNLOCK_IO(pACB.pScsiHost);       
+       DC390_UNLOCK_IO(pACB->pScsiHost);       
      }
   return (length);
        
  inquiry:
      {
-       pos = strsep (*pos, " \t\n.:;="); if (!*pos) goto einv;
+       pos = strsep (&pos, " \t\n.:;="); if (!*pos) goto einv;
        dev = simple_strtoul (pos, &p0, 10);
        if (dev >= pACB->DCBCnt) goto einv_dev;
        for (dum = 0; dum < dev; dum++) pDCB = pDCB->pNextDCB;
@@ -2764,13 +2681,13 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
                dev, pDCB->TargetID, pDCB->TargetLUN);
        DC390_UNLOCK_ACB;
        dc390_inquiry (pACB, pDCB);
-       DC390_UNLOCK_IO(pACB.pScsiHost);
-     };
+       DC390_UNLOCK_IO(pACB->pScsiHost);
+     }
    return (length);
 
  remove:
      {
-       pos = strsep (*pos, " \t\n.:;="); if (!*pos) goto einv;
+       pos = strsep (&pos, " \t\n.:;="); if (!*pos) goto einv;
        dev = simple_strtoul (pos, &p0, 10);
        if (dev >= pACB->DCBCnt) goto einv_dev;
        for (dum = 0; dum < dev; dum++) pDCB = pDCB->pNextDCB;
@@ -2779,29 +2696,29 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
        /* TO DO: We should make sure no pending commands are left */
        dc390_remove_dev (pACB, pDCB);
        DC390_UNLOCK_ACB;
-       DC390_UNLOCK_IO(pACB.pScsiHost);
-     };
+       DC390_UNLOCK_IO(pACB->pScsiHost);
+     }
    return (length);
 
  add:
      {
        int id, lun;
-       pos = strsep (*pos, " \t\n.:;=");
+       pos = strsep (&pos, " \t\n.:;=");
        if (*pos) { SCANF (buffer, pos, p0, id, 0, 7); } else goto einv;
        if (*pos) { SCANF (buffer, pos, p0, lun, 0, 7); } else goto einv;
        pDCB = dc390_findDCB (pACB, id, lun);
-       if (pDCB) { printk ("DC390: ADD: Device already existing\n"); goto einv; };
+       if (pDCB) { printk ("DC390: ADD: Device already existing\n"); goto einv; }
        dc390_initDCB (pACB, &pDCB, id, lun);
        DC390_UNLOCK_ACB;
        dc390_inquiry (pACB, pDCB);
-       DC390_UNLOCK_IO(pACB.pScsiHost);
-     };
+       DC390_UNLOCK_IO(pACB->pScsiHost);
+     }
    return (length);
 
  start:
      {
        int id, lun;
-       pos = strsep (*pos, " \t\n.:;=");
+       pos = strsep (&pos, " \t\n.:;=");
        if (*pos) { SCANF (buffer, pos, p0, id, 0, 7); } else goto einv;
        if (*pos) { SCANF (buffer, pos, p0, lun, 0, 7); } else goto einv;
        pDCB = dc390_findDCB (pACB, id, lun);
@@ -2810,18 +2727,16 @@ int dc390_set_info (char *buffer, int length, PACB pACB)
        DC390_UNLOCK_ACB;
        dc390_sendstart (pACB, pDCB);
        dc390_inquiry (pACB, pDCB);
-       DC390_UNLOCK_IO(pACB.pScsiHost);
-     };
+       DC390_UNLOCK_IO(pACB->pScsiHost);
+     }
    return (length);
 
  einv_dev:
    printk (KERN_WARNING "DC390: Ignore cmnd to invalid Dev(Idx) %i. Valid range: 0 - %i.\n", 
           dev, pACB->DCBCnt - 1);
    DC390_UNLOCK_ACB;
-   DC390_UNLOCK_IO(pACB.pScsiHost);
+   DC390_UNLOCK_IO(pACB->pScsiHost);
    return (-EINVAL);
-            
-            
 }
 
 #undef SEARCH
@@ -2860,10 +2775,10 @@ int DC390_proc_info (struct Scsi_Host *shpnt, char *buffer, char **start,
 {
   int dev, spd, spd1;
   char *pos = buffer;
+  struct scsi_cmnd_list *cl;
   PACB pACB;
   PDCB pDCB;
-  PSCSICMD pcmd;
-  DC390_AFLAGS
+  DC390_AFLAGS;
 
   pACB = dc390_pACB_start;
 
@@ -2932,8 +2847,8 @@ int DC390_proc_info (struct Scsi_Host *shpnt, char *buffer, char **start,
       pDCB = pDCB->pNextDCB;
      }
     SPRINTF ("Commands in Queues: Query: %li:", pACB->QueryCnt);
-    for (pcmd = pACB->pQueryHead; pcmd; pcmd = pcmd->next)
-       SPRINTF (" %li", pcmd->pid);
+    list_for_each_entry(cl, &pACB->cmdq, scp.list)
+       SPRINTF (" %li", ((struct scsi_cmnd*)cl)->pid);
     if (timer_pending(&pACB->Waiting_Timer)) SPRINTF ("Waiting queue timer running\n");
     else SPRINTF ("\n");
     pDCB = pACB->pLinkDCB;
@@ -2983,8 +2898,6 @@ int DC390_proc_info (struct Scsi_Host *shpnt, char *buffer, char **start,
 #undef YESNO
 #undef SPRINTF
 
-#ifdef MODULE
-
 /***********************************************************************
  * Function : static int dc390_shutdown (struct Scsi_Host *host)
  *
@@ -3024,17 +2937,17 @@ void dc390_freeDCBs (struct Scsi_Host *host)
     {
        nDCB = pDCB->pNextDCB;
        DCBDEBUG(printk (KERN_INFO "DC390: Free DCB (ID %i, LUN %i): %p\n",\
-               pDCB->TargetID, pDCB->TargetLUN, pDCB);)
+                        pDCB->TargetID, pDCB->TargetLUN, pDCB));
        //kfree (pDCB);
        dc390_remove_dev (pACB, pDCB);
        pDCB = nDCB;
     } while (pDCB && pACB->pLinkDCB);
 
-};
+}
 
 int DC390_release (struct Scsi_Host *host)
 {
-    DC390_AFLAGS DC390_IFLAGS
+    DC390_AFLAGS DC390_IFLAGS;
     PACB pACB = (PACB)(host->hostdata);
 
     DC390_LOCK_IO(host);
@@ -3045,7 +2958,7 @@ int DC390_release (struct Scsi_Host *host)
 
     if (host->irq != SCSI_IRQ_NONE)
     {
-       DEBUG0(printk(KERN_INFO "DC390: Free IRQ %i\n",host->irq);)
+       DEBUG0(printk(KERN_INFO "DC390: Free IRQ %i\n",host->irq));
        free_irq (host->irq, pACB);
     }
 
@@ -3053,19 +2966,19 @@ int DC390_release (struct Scsi_Host *host)
     dc390_freeDCBs (host);
     DC390_UNLOCK_ACB;
     DC390_UNLOCK_IO(host);
+    scsi_unregister(host);
     return( 1 );
 }
-#endif /* def MODULE */
 
-static Scsi_Host_Template driver_template = DC390_T;
+static Scsi_Host_Template driver_template = {
    .proc_name      = "tmscsim", 
    .proc_info      = DC390_proc_info,
    .name           = DC390_BANNER " V" DC390_VERSION,
    .detect         = DC390_detect,
    .release        = DC390_release,
    .queuecommand   = DC390_queue_command,
-   .abort          = DC390_abort,
-   .reset          = DC390_reset,
+   .eh_abort_handler           = DC390_abort,
+   .eh_bus_reset_handler       = DC390_reset,
    .bios_param     = DC390_bios_param,
    .can_queue      = 42,
    .this_id        = 7,
index ba9329b..cda7716 100644 (file)
@@ -24,6 +24,8 @@
 
 #define END_SCAN               2
 
+#define pci_dma_lo32(a)                        (a & 0xffffffff)
+
 typedef u8             UCHAR;  /*  8 bits */
 typedef u16            USHORT; /* 16 bits */
 typedef u32            UINT;   /* 32 bits */
@@ -213,8 +215,7 @@ PSRB                pTmpSRB;
 
 /* 0x2c: */
 ULONG          QueryCnt;
-PSCSICMD       pQueryHead;
-PSCSICMD       pQueryTail;
+struct list_head       cmdq;
 
 /* 0x38: */
 UCHAR          msgin123[4];
@@ -402,6 +403,20 @@ typedef  struct  _ACB       DC390_ACB, *PACB;
 #define ABORT_TAG      0x0d
 
 /*
+ *     SISC query queue
+ */
+typedef struct {
+       struct list_head        list;
+       dma_addr_t              saved_dma_handle;
+} dc390_cmd_scp_t;
+
+struct scsi_cmnd_list
+{
+       char dummy[offsetof(struct scsi_cmnd, SCp)];
+       dc390_cmd_scp_t scp;
+};
+
+/*
 **  Inquiry Data format
 */
 
index 44370ac..729b93a 100644 (file)
@@ -534,10 +534,10 @@ static void autoconfig_16550a(struct uart_8250_port *up)
                        status1 |= 0x10;  /* 1.625 divisor for baud_base --> 921600 */
                        serial_outp(up, 0x04, status1);
                        serial_outp(up, UART_LCR, 0);
+                       up->port.uartclk = 921600*16;
 #endif
 
                        up->port.type = PORT_NS16550A;
-                       up->port.uartclk = 921600*16;
                        return;
                }
        }
@@ -730,13 +730,6 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags)
  out:  
        spin_unlock_irqrestore(&up->port.lock, flags);
 //     restore_flags(flags);
-#ifdef CONFIG_SERIAL_8250_RSA
-       if (up->port.iobase && up->port.type == PORT_RSA) {
-               release_region(up->port.iobase, 8);
-               request_region(up->port.iobase + UART_RSA_BASE, 16,
-                              "serial_rsa");
-       }
-#endif
        DEBUG_AUTOCONF("type=%s\n", uart_config[up->port.type].name);
 }
 
index deb1ebe..27d4bf4 100644 (file)
@@ -42,6 +42,8 @@ static const struct pnp_device_id pnp_dev_table[] = {
        {       "ADC0001",              0       },
        /* SXPro 288 External Data Fax Modem Plug & Play */
        {       "ADC0002",              0       },
+       /* PROLiNK 1456VH ISA PnP K56flex Fax Modem */
+       {       "AEI0250",              0       },
        /* Actiontec ISA PNP 56K X2 Fax Modem */
        {       "AEI1240",              0       },
        /* Rockwell 56K ACF II Fax+Data+Voice Modem */
@@ -74,6 +76,9 @@ static const struct pnp_device_id pnp_dev_table[] = {
        {       "DMB1032",              0       },
        /* Creative Modem Blaster V.90 DI5660 */
        {       "DMB2001",              0       },
+       /* E-Tech */
+       /* E-Tech CyberBULLET PC56RVP */
+       {       "ETT0002",              0       },
        /* FUJITSU */
        /* Fujitsu 33600 PnP-I2 R Plug & Play */
        {       "FUJ0202",              0       },
index 5e43757..33ec4a1 100644 (file)
@@ -852,6 +852,7 @@ static struct uart_driver sa1100_reg = {
        .owner                  = THIS_MODULE,
        .driver_name            = "ttySA",
        .dev_name               = "ttySA",
+       .devfs_name             = "ttySA",
        .major                  = SERIAL_SA1100_MAJOR,
        .minor                  = MINOR_START,
        .nr                     = NR_PORTS,
index 957fa97..89bc311 100644 (file)
@@ -1863,7 +1863,7 @@ uart_set_options(struct uart_port *port, struct console *co,
                termios.c_cflag |= CRTSCTS;
 
        if (!port->ops)
-               return 0;
+               return 0;       /* "console=" on ia64 */
 
        port->ops->set_termios(port, &termios, NULL);
        co->cflag = termios.c_cflag;
index 7640bb7..4d4c7bb 100644 (file)
@@ -97,9 +97,6 @@ struct uart_sunsu_port {
        int                     port_node;
        unsigned int            irq;
 
-       /* L1-A keyboard break state.  */
-       int                     kbd_id;
-       int                     l1_down;
 #ifdef CONFIG_SERIO
        struct serio            serio;
        int                     serio_open;
@@ -508,25 +505,8 @@ static void receive_kbd_ms_chars(struct uart_sunsu_port *up, struct pt_regs *reg
        do {
                unsigned char ch = serial_inp(up, UART_RX);
 
+               /* Stop-A is handled by drivers/char/keyboard.c now. */
                if (up->su_type == SU_PORT_KBD) {
-                       if (ch == SUNKBD_RESET) {
-                               up->kbd_id = 1;
-                               up->l1_down = 0;
-                       } else if (up->kbd_id) {
-                               up->kbd_id = 0;
-                       } else if (ch == SUNKBD_L1) {
-                               up->l1_down = 1;
-                       } else if (ch == (SUNKBD_L1|SUNKBD_UP)) {
-                               up->l1_down = 0;
-                       } else if (ch == SUNKBD_A && up->l1_down) {
-                               /* whee... */
-                               sun_do_break();
-
-                               /* Continue execution... */
-                               up->l1_down = 0;
-                               up->kbd_id = 0;
-                               return;
-                       }
 #ifdef CONFIG_SERIO
                        serio_interrupt(&up->serio, ch, 0, regs);
 #endif
index 61f63f0..30835db 100644 (file)
@@ -103,10 +103,6 @@ struct uart_sunzilog_port {
 
        unsigned int cflag;
 
-       /* L1-A keyboard break state.  */
-       int                             kbd_id;
-       int                             l1_down;
-
        unsigned char                   parity_mask;
        unsigned char                   prev_status;
 
@@ -292,23 +288,10 @@ static void sunzilog_kbdms_receive_chars(struct uart_sunzilog_port *up,
                                         struct pt_regs *regs)
 {
        if (ZS_IS_KEYB(up)) {
-               if (ch == SUNKBD_RESET) {
-                       up->kbd_id = 1;
-                       up->l1_down = 0;
-               } else if (up->kbd_id) {
-                       up->kbd_id = 0;
-               } else if (ch == SUNKBD_L1) {
-                       up->l1_down = 1;
-               } else if (ch == (SUNKBD_L1 | SUNKBD_UP)) {
-                       up->l1_down = 0;
-               } else if (ch == SUNKBD_A && up->l1_down) {
-                       sun_do_break();
-                       up->l1_down = 0;
-                       up->kbd_id = 0;
-                       return;
-               }
+               /* Stop-A is handled by drivers/char/keyboard.c now. */
 #ifdef CONFIG_SERIO
-               serio_interrupt(&up->serio, ch, 0, regs);
+               if (up->serio_open)
+                       serio_interrupt(&up->serio, ch, 0, regs);
 #endif
        } else if (ZS_IS_MOUSE(up)) {
                int ret = suncore_mouse_baud_detection(ch, is_break);
@@ -322,7 +305,8 @@ static void sunzilog_kbdms_receive_chars(struct uart_sunzilog_port *up,
 
                case 0:
 #ifdef CONFIG_SERIO
-                       serio_interrupt(&up->serio, ch, 0, regs);
+                       if (up->serio_open)
+                               serio_interrupt(&up->serio, ch, 0, regs);
 #endif
                        break;
                };
@@ -333,16 +317,15 @@ static void sunzilog_receive_chars(struct uart_sunzilog_port *up,
                                   struct zilog_channel *channel,
                                   struct pt_regs *regs)
 {
-       struct tty_struct *tty = up->port.info->tty;    /* XXX info==NULL? */
+       struct tty_struct *tty;
+       unsigned char ch, r1;
 
-       while (1) {
-               unsigned char ch, r1;
+       tty = NULL;
+       if (up->port.info != NULL &&            /* Unopened serial console */
+           up->port.info->tty != NULL)         /* Keyboard || mouse */
+               tty = up->port.info->tty;
 
-               if (unlikely(tty->flip.count >= TTY_FLIPBUF_SIZE)) {
-                       tty->flip.work.func((void *)tty);
-                       if (tty->flip.count >= TTY_FLIPBUF_SIZE)
-                               return;         /* XXX Ignores SysRq when we need it most. Fix. */
-               }
+       for (;;) {
 
                r1 = read_zsreg(channel, R1);
                if (r1 & (PAR_ERR | Rx_OVR | CRC_ERR)) {
@@ -360,6 +343,9 @@ static void sunzilog_receive_chars(struct uart_sunzilog_port *up,
                if (ch & BRK_ABRT)
                        r1 |= BRK_ABRT;
 
+               if (!(ch & Rx_CH_AV))
+                       break;
+
                ch = sbus_readb(&channel->data);
                ZSDELAY();
 
@@ -367,21 +353,22 @@ static void sunzilog_receive_chars(struct uart_sunzilog_port *up,
 
                if (unlikely(ZS_IS_KEYB(up)) || unlikely(ZS_IS_MOUSE(up))) {
                        sunzilog_kbdms_receive_chars(up, ch, 0, regs);
-                       goto next_char;
+                       continue;
                }
 
-               if (ZS_IS_CONS(up) && (r1 & BRK_ABRT)) {
-                       /* Wait for BREAK to deassert to avoid potentially
-                        * confusing the PROM.
+               if (tty == NULL) {
+                       uart_handle_sysrq_char(&up->port, ch, regs);
+                       continue;
+               }
+
+               if (unlikely(tty->flip.count >= TTY_FLIPBUF_SIZE)) {
+                       tty->flip.work.func((void *)tty);
+                       /*
+                        * The 8250 bails out of the loop here,
+                        * but we need to read everything, or die.
                         */
-                       while (1) {
-                               ch = sbus_readb(&channel->control);
-                               ZSDELAY();
-                               if (!(ch & BRK_ABRT))
-                                       break;
-                       }
-                       sun_do_break();
-                       return;
+                       if (tty->flip.count >= TTY_FLIPBUF_SIZE)
+                               continue;
                }
 
                /* A real serial line, record the character and status.  */
@@ -393,7 +380,7 @@ static void sunzilog_receive_chars(struct uart_sunzilog_port *up,
                                r1 &= ~(PAR_ERR | CRC_ERR);
                                up->port.icount.brk++;
                                if (uart_handle_break(&up->port))
-                                       goto next_char;
+                                       continue;
                        }
                        else if (r1 & PAR_ERR)
                                up->port.icount.parity++;
@@ -410,7 +397,7 @@ static void sunzilog_receive_chars(struct uart_sunzilog_port *up,
                                *tty->flip.flag_buf_ptr = TTY_FRAME;
                }
                if (uart_handle_sysrq_char(&up->port, ch, regs))
-                       goto next_char;
+                       continue;
 
                if (up->port.ignore_status_mask == 0xff ||
                    (r1 & up->port.ignore_status_mask) == 0) {
@@ -425,14 +412,10 @@ static void sunzilog_receive_chars(struct uart_sunzilog_port *up,
                        tty->flip.char_buf_ptr++;
                        tty->flip.count++;
                }
-       next_char:
-               ch = sbus_readb(&channel->control);
-               ZSDELAY();
-               if (!(ch & Rx_CH_AV))
-                       break;
        }
 
-       tty_flip_buffer_push(tty);
+       if (tty)
+               tty_flip_buffer_push(tty);
 }
 
 static void sunzilog_status_handle(struct uart_sunzilog_port *up,
@@ -448,8 +431,23 @@ static void sunzilog_status_handle(struct uart_sunzilog_port *up,
        ZSDELAY();
        ZS_WSYNC(channel);
 
-       if ((status & BRK_ABRT) && ZS_IS_MOUSE(up))
-               sunzilog_kbdms_receive_chars(up, 0, 1, regs);
+       if (status & BRK_ABRT) {
+               if (ZS_IS_MOUSE(up))
+                       sunzilog_kbdms_receive_chars(up, 0, 1, regs);
+               if (ZS_IS_CONS(up)) {
+                       /* Wait for BREAK to deassert to avoid potentially
+                        * confusing the PROM.
+                        */
+                       while (1) {
+                               status = sbus_readb(&channel->control);
+                               ZSDELAY();
+                               if (!(status & BRK_ABRT))
+                                       break;
+                       }
+                       sun_do_break();
+                       return;
+               }
+       }
 
        if (ZS_WANTS_MODEM_STATUS(up)) {
                if (status & SYNC)
@@ -1364,8 +1362,8 @@ static int __init sunzilog_console_setup(struct console *con, char *options)
        unsigned long flags;
        int baud, brg;
 
-       printk("Console: ttyS%d (SunZilog)\n",
-              (sunzilog_reg.minor - 64) + con->index);
+       printk(KERN_INFO "Console: ttyS%d (SunZilog zs%d)\n",
+              (sunzilog_reg.minor - 64) + con->index, con->index);
 
        /* Get firmware console settings.  */
        sunserial_console_termios(con);
@@ -1596,6 +1594,8 @@ static void __init sunzilog_init_hw(void)
 
                if (i == KEYBOARD_LINE || i == MOUSE_LINE) {
                        sunzilog_init_kbdms(up, i);
+                       up->curregs[R9] |= (NV | MIE);
+                       write_zsreg(channel, R9, up->curregs[R9]);
                } else {
                        /* Normal serial TTY. */
                        up->parity_mask = 0xff;
@@ -1632,7 +1632,7 @@ static int __init sunzilog_ports_init(void)
        struct zs_probe_scan scan;
        int ret;
 
-       printk(KERN_INFO "Serial: Sun Zilog driver (%d chips).\n", NUM_SUNZILOG);
+       printk(KERN_DEBUG "SunZilog: %d chips.\n", NUM_SUNZILOG);
 
        scan.scanner = sunzilog_scan_probe;
        scan.depth = 0;
@@ -1668,7 +1668,10 @@ static int __init sunzilog_ports_init(void)
                        if (ZS_IS_KEYB(up) || ZS_IS_MOUSE(up))
                                continue;
 
-                       uart_add_one_port(&sunzilog_reg, &up->port);
+                       if (uart_add_one_port(&sunzilog_reg, &up->port)) {
+                               printk(KERN_ERR
+                                   "SunZilog: failed to add port zs%d\n", i);
+                       }
                }
        }
 
index 3d60c39..718891f 100644 (file)
@@ -59,4 +59,3 @@ obj-$(CONFIG_USB_SPEEDTOUCH)  += misc/
 obj-$(CONFIG_USB_TEST)         += misc/
 obj-$(CONFIG_USB_TIGL)         += misc/
 obj-$(CONFIG_USB_USS720)       += misc/
-obj-$(CONFIG_USB_LEGOTOWER)    += misc/
index 77a7eef..21d573c 100644 (file)
@@ -177,27 +177,6 @@ config USB_GADGETFS_PXA2XX
        depends on USB_GADGETFS && USB_PXA2XX
        default y
 
-config USB_G_SERIAL
-       tristate "serial Gadget"
-       depends on USB_GADGET && (USB_DUMMY_HCD || USB_NET2280 || USB_PXA2XX || USB_SA1100)
-
-config USB_G_SERIAL_NET2280
-       bool
-       # for now, treat the "dummy" hcd as if it were a net2280
-       depends on USB_G_SERIAL && (USB_NET2280 || USB_DUMMY_HCD)
-       default y
-
-config USB_G_SERIAL_PXA2XX
-       bool
-       depends on USB_G_SERIAL && USB_PXA2XX
-       default y
-
-config USB_G_SERIAL_SA1100
-       bool
-       depends on USB_G_SERIAL && USB_SA1100
-       default y
-
-
 endchoice
 
 # endmenuconfig
index dca74c3..6bf13ff 100644 (file)
@@ -8,10 +8,9 @@ obj-$(CONFIG_USB_NET2280)      += net2280.o
 #
 g_zero-objs                    := zero.o usbstring.o
 g_ether-objs                   := ether.o usbstring.o
-g_serial-objs                  := serial.o usbstring.o
 gadgetfs-objs                  := inode.o usbstring.o
  
 obj-$(CONFIG_USB_ZERO)         += g_zero.o
 obj-$(CONFIG_USB_ETH)          += g_ether.o
 obj-$(CONFIG_USB_GADGETFS)     += gadgetfs.o
-obj-$(CONFIG_USB_G_SERIAL)     += g_serial.o
+
index cdec8e8..131ee14 100644 (file)
@@ -226,6 +226,27 @@ static const char EP_IN_NAME [] = "ep2in-bulk";
 #define hw_optimize(g) do {} while (0)
 #endif
 
+/*
+ * Toshiba TC86C001 ("Goku-S") UDC
+ *
+ * This has three semi-configurable full speed bulk/interrupt endpoints.
+ */
+#ifdef CONFIG_USB_ETH_GOKU
+#define CHIP                   "goku"
+#define DRIVER_VERSION_NUM     0x0106
+#define EP0_MAXPACKET          8
+static const char EP_OUT_NAME [] = "ep1-bulk";
+#define EP_OUT_NUM     1
+static const char EP_IN_NAME [] = "ep2-bulk";
+#define EP_IN_NUM      2
+static const char EP_STATUS_NAME [] = "ep3-bulk";
+#define EP_STATUS_NUM  3
+#define SELFPOWER USB_CONFIG_ATT_SELFPOWER
+/* doesn't support remote wakeup */
+
+#define hw_optimize(g) do {} while (0)
+#endif
+
 /*-------------------------------------------------------------------------*/
 
 #ifndef EP0_MAXPACKET
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
deleted file mode 100644 (file)
index 0385a00..0000000
+++ /dev/null
@@ -1,2329 +0,0 @@
-/*
- * g_serial.c -- USB gadget serial driver
- *
- * $Id: gserial.c,v 1.17 2003/10/01 06:31:57 borchers Exp $
- *
- * Copyright 2003 (c) Al Borchers (alborchers@steinerpoint.com)
- *
- * This code is based in part on the Gadget Zero driver, which
- * is Copyright (C) 2003 by David Brownell, all rights reserved.
- *
- * This code also borrows from usbserial.c, which is
- * Copyright (C) 1999 - 2002 Greg Kroah-Hartman (greg@kroah.com)
- * Copyright (c) 2000 Peter Berger (pberger@brimson.com)
- * Copyright (c) 2000 Al Borchers (alborchers@steinerpoint.com)
- *
- * This software is distributed under the terms of the GNU General
- * Public License ("GPL") as published by the Free Software Foundation,
- * either version 2 of that License or (at your option) any later version.
- *
- */
-
-/* Includes */
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/delay.h>
-#include <linux/ioport.h>
-#include <linux/sched.h>
-#include <linux/slab.h>
-#include <linux/smp_lock.h>
-#include <linux/errno.h>
-#include <linux/init.h>
-#include <linux/timer.h>
-#include <linux/list.h>
-#include <linux/interrupt.h>
-#include <linux/uts.h>
-#include <linux/version.h>
-#include <linux/wait.h>
-#include <linux/list.h>
-#include <linux/proc_fs.h>
-#include <linux/device.h>
-#include <linux/tty.h>
-#include <linux/tty_flip.h>
-
-#include <asm/byteorder.h>
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/system.h>
-#include <asm/unaligned.h>
-#include <asm/uaccess.h>
-
-#include <linux/usb_ch9.h>
-#include <linux/usb_gadget.h>
-
-
-/* Wait Cond */
-
-#define __wait_cond_interruptible(wq, condition, lock, flags, ret)     \
-do {                                                                   \
-       wait_queue_t __wait;                                            \
-       init_waitqueue_entry(&__wait, current);                         \
-                                                                       \
-       add_wait_queue(&wq, &__wait);                                   \
-       for (;;) {                                                      \
-               set_current_state(TASK_INTERRUPTIBLE);                  \
-               if (condition)                                          \
-                       break;                                          \
-               if (!signal_pending(current)) {                         \
-                       spin_unlock_irqrestore(lock, flags);            \
-                       schedule();                                     \
-                       spin_lock_irqsave(lock, flags);                 \
-                       continue;                                       \
-               }                                                       \
-               ret = -ERESTARTSYS;                                     \
-               break;                                                  \
-       }                                                               \
-       current->state = TASK_RUNNING;                                  \
-       remove_wait_queue(&wq, &__wait);                                \
-} while (0)
-       
-#define wait_cond_interruptible(wq, condition, lock, flags)            \
-({                                                                     \
-       int __ret = 0;                                                  \
-       if (!(condition))                                               \
-               __wait_cond_interruptible(wq, condition, lock, flags,   \
-                                               __ret);                 \
-       __ret;                                                          \
-})
-
-#define __wait_cond_interruptible_timeout(wq, condition, lock, flags,  \
-                                               timeout, ret)           \
-do {                                                                   \
-       signed long __timeout = timeout;                                \
-       wait_queue_t __wait;                                            \
-       init_waitqueue_entry(&__wait, current);                         \
-                                                                       \
-       add_wait_queue(&wq, &__wait);                                   \
-       for (;;) {                                                      \
-               set_current_state(TASK_INTERRUPTIBLE);                  \
-               if (__timeout == 0)                                     \
-                       break;                                          \
-               if (condition)                                          \
-                       break;                                          \
-               if (!signal_pending(current)) {                         \
-                       spin_unlock_irqrestore(lock, flags);            \
-                       __timeout = schedule_timeout(__timeout);        \
-                       spin_lock_irqsave(lock, flags);                 \
-                       continue;                                       \
-               }                                                       \
-               ret = -ERESTARTSYS;                                     \
-               break;                                                  \
-       }                                                               \
-       current->state = TASK_RUNNING;                                  \
-       remove_wait_queue(&wq, &__wait);                                \
-} while (0)
-       
-#define wait_cond_interruptible_timeout(wq, condition, lock, flags,    \
-                                               timeout)                \
-({                                                                     \
-       int __ret = 0;                                                  \
-       if (!(condition))                                               \
-               __wait_cond_interruptible_timeout(wq, condition, lock,  \
-                                               flags, timeout, __ret); \
-       __ret;                                                          \
-})
-
-
-/* Defines */
-
-#define GS_VERSION_STR                 "v0.1"
-#define GS_VERSION_NUM                 0x0001
-
-#define GS_LONG_NAME                   "Gadget Serial"
-#define GS_SHORT_NAME                  "g_serial"
-
-#define GS_MAJOR                       127
-#define GS_MINOR_START                 0
-
-#define GS_NUM_PORTS                   16
-
-#define GS_VENDOR_ID                   0x05F9
-#define GS_PRODUCT_ID                  0xFFFF
-
-#define GS_NUM_CONFIGS                 1
-#define GS_NO_CONFIG_ID                        0
-#define GS_BULK_CONFIG_ID              2
-
-#define GS_NUM_INTERFACES              1
-#define GS_INTERFACE_ID                        0
-#define GS_ALT_INTERFACE_ID            0
-
-#define GS_NUM_ENDPOINTS               2
-
-#define GS_MAX_DESC_LEN                        256
-
-#define GS_DEFAULT_READ_Q_SIZE         32
-#define GS_DEFAULT_WRITE_Q_SIZE                32
-
-#define GS_DEFAULT_WRITE_BUF_SIZE      8192
-#define GS_TMP_BUF_SIZE                        8192
-
-#define GS_CLOSE_TIMEOUT               15
-
-/* debug macro */
-#if G_SERIAL_DEBUG
-
-static int debug = G_SERIAL_DEBUG;
-
-#define gs_debug(format, arg...) \
-       do { if(debug) printk( KERN_DEBUG format, ## arg ); } while(0)
-#define gs_debug_level(level, format, arg...) \
-       do { if(debug>=level) printk( KERN_DEBUG format, ## arg ); } while(0)
-
-#else
-
-#define gs_debug(format, arg...) \
-       do { } while(0)
-#define gs_debug_level(level, format, arg...) \
-       do { } while(0)
-
-#endif /* G_SERIAL_DEBUG */
-
-
-/* USB Controllers */
-
-/*
- * NetChip 2280, PCI based.
- *
- * This has half a dozen configurable endpoints, four with dedicated
- * DMA channels to manage their FIFOs.  It supports high speed.
- * Those endpoints can be arranged in any desired configuration.
- */
-#ifdef CONFIG_USB_G_SERIAL_NET2280
-#define CHIP                           "net2280"
-#define EP0_MAXPACKET                  64
-static const char EP_OUT_NAME[] =      "ep-a";
-#define EP_OUT_NUM                     2
-static const char EP_IN_NAME[] =       "ep-b";
-#define EP_IN_NUM                      2
-#define HIGHSPEED
-#define SELFPOWER                      USB_CONFIG_ATT_SELFPOWER
-
-extern int net2280_set_fifo_mode( struct usb_gadget *gadget, int mode );
-
-static inline void hw_optimize( struct usb_gadget *gadget )
-{
-       /* we can have bigger ep-a/ep-b fifos (2KB each, 4 packets
-        * for highspeed bulk) because we're not using ep-c/ep-d.
-        */
-       net2280_set_fifo_mode (gadget, 1);
-}
-#endif
-
-
-/*
- * PXA-2xx UDC:  widely used in second gen Linux-capable PDAs.
- *
- * This has fifteen fixed-function full speed endpoints, and it
- * can support all USB transfer types.
- *
- * These supports three or four configurations, with fixed numbers.
- * The hardware interprets SET_INTERFACE, net effect is that you
- * can't use altsettings or reset the interfaces independently.
- * So stick to a single interface.
- */
-#ifdef CONFIG_USB_G_SERIAL_PXA2XX
-#define CHIP                           "pxa2xx"
-#define EP0_MAXPACKET                  16
-static const char EP_OUT_NAME[] =      "ep12out-bulk";
-#define EP_OUT_NUM                     12
-static const char EP_IN_NAME[] =       "ep11in-bulk";
-#define EP_IN_NUM                      11
-#define SELFPOWER                      USB_CONFIG_ATT_SELFPOWER
-
-/* no hw optimizations to apply */
-#define hw_optimize(g)                 do {} while (0)
-#endif
-
-
-/*
- * SA-1100 UDC:  widely used in first gen Linux-capable PDAs.
- *
- * This has only two fixed function endpoints, which can only
- * be used for bulk (or interrupt) transfers.  (Plus control.)
- *
- * Since it can't flush its TX fifos without disabling the UDC,
- * the current configuration or altsettings can't change except
- * in special situations.  So this is a case of "choose it right
- * during enumeration" ...
- */
-#ifdef CONFIG_USB_G_SERIAL_SA1100
-#define CHIP                           "sa1100"
-#define EP0_MAXPACKET                  8
-static const char EP_OUT_NAME[] =      "ep1out-bulk";
-#define EP_OUT_NUM                     1
-static const char EP_IN_NAME [] =      "ep2in-bulk";
-#define EP_IN_NUM                      2
-#define SELFPOWER                      USB_CONFIG_ATT_SELFPOWER
-
-/* no hw optimizations to apply */
-#define hw_optimize(g)                 do {} while (0)
-#endif
-
-
-/*
- * Toshiba TC86C001 ("Goku-S") UDC
- *
- * This has three semi-configurable full speed bulk/interrupt endpoints.
- */
-#ifdef CONFIG_USB_G_SERIAL_GOKU
-#define CHIP                           "goku"
-#define DRIVER_VERSION_NUM             0x0116
-#define EP0_MAXPACKET                  8
-static const char EP_OUT_NAME [] =     "ep1-bulk";
-#define EP_OUT_NUM                     1
-static const char EP_IN_NAME [] =      "ep2-bulk";
-#define EP_IN_NUM                      2
-#define SELFPOWER                      USB_CONFIG_ATT_SELFPOWER
-
-/* no hw optimizations to apply */
-#define hw_optimize(g)                 do {} while (0)
-#endif
-
-/*
- * USB Controller Defaults
- */
-#ifndef EP0_MAXPACKET
-#error Configure some USB peripheral controller for g_serial!
-#endif
-
-#ifndef SELFPOWER
-/* default: say we rely on bus power */
-#define SELFPOWER                      0
-/* else value must be USB_CONFIG_ATT_SELFPOWER */
-#endif
-
-#ifndef        MAX_USB_POWER
-/* any hub supports this steady state bus power consumption */
-#define MAX_USB_POWER                  100     /* mA */
-#endif
-
-#ifndef        WAKEUP
-/* default: this driver won't do remote wakeup */
-#define WAKEUP                         0
-/* else value must be USB_CONFIG_ATT_WAKEUP */
-#endif
-
-
-/* Structures */
-
-struct gs_dev;
-
-/* circular buffer */
-struct gs_buf {
-       unsigned int            buf_size;
-       char                    *buf_buf;
-       char                    *buf_get;
-       char                    *buf_put;
-};
-
-/* list of requests */
-struct gs_req_entry {
-       struct list_head        re_entry;
-       struct usb_request      *re_req;
-};
-
-/* the port structure holds info for each port, one for each minor number */
-struct gs_port {
-       struct gs_dev           *port_dev;      /* pointer to device struct */
-       struct tty_struct       *port_tty;      /* pointer to tty struct */
-       spinlock_t              port_lock;
-       int                     port_num;
-       int                     port_open_count;
-       int                     port_in_use;    /* open/close in progress */
-       wait_queue_head_t       port_write_wait;/* waiting to write */
-       struct gs_buf           *port_write_buf;
-};
-
-/* the device structure holds info for the USB device */
-struct gs_dev {
-       struct usb_gadget       *dev_gadget;    /* gadget device pointer */
-       spinlock_t              dev_lock;       /* lock for set/reset config */
-       int                     dev_config;     /* configuration number */
-       struct usb_ep           *dev_in_ep;     /* address of in endpoint */
-       struct usb_ep           *dev_out_ep;    /* address of out endpoint */
-       struct usb_request      *dev_ctrl_req;  /* control request */
-       struct list_head        dev_req_list;   /* list of write requests */
-       int                     dev_sched_port; /* round robin port scheduled */
-       struct gs_port          *dev_port[GS_NUM_PORTS]; /* the ports */
-};
-
-
-/* Functions */
-
-/* module */
-static int __init gs_module_init( void );
-static void __exit gs_module_exit( void );
-
-/* tty driver */
-static int gs_open( struct tty_struct *tty, struct file *file );
-static void gs_close( struct tty_struct *tty, struct file *file );
-static int gs_write( struct tty_struct *tty, int from_user,
-       const unsigned char *buf, int count );
-static void gs_put_char( struct tty_struct *tty, unsigned char ch );
-static void gs_flush_chars( struct tty_struct *tty );
-static int gs_write_room( struct tty_struct *tty );
-static int gs_chars_in_buffer( struct tty_struct *tty );
-static void gs_throttle( struct tty_struct * tty );
-static void gs_unthrottle( struct tty_struct * tty );
-static void gs_break( struct tty_struct *tty, int break_state );
-static int  gs_ioctl( struct tty_struct *tty, struct file *file,
-       unsigned int cmd, unsigned long arg );
-static void gs_set_termios( struct tty_struct *tty, struct termios *old );
-static int gs_read_proc( char *page, char **start, off_t off, int count,
-       int *eof, void *data );
-
-static int gs_send( struct gs_dev *dev );
-static int gs_send_packet( struct gs_dev *dev, char *packet,
-       unsigned int size );
-static int gs_recv_packet( struct gs_dev *dev, char *packet,
-       unsigned int size );
-static void gs_read_complete( struct usb_ep *ep, struct usb_request *req );
-static void gs_write_complete( struct usb_ep *ep, struct usb_request *req );
-
-/* gadget driver */
-static int gs_bind( struct usb_gadget *gadget );
-static void gs_unbind( struct usb_gadget *gadget );
-static int gs_setup( struct usb_gadget *gadget,
-       const struct usb_ctrlrequest *ctrl );
-static void gs_setup_complete( struct usb_ep *ep, struct usb_request *req );
-static void gs_disconnect( struct usb_gadget *gadget );
-static int gs_set_config( struct gs_dev *dev, unsigned config );
-static void gs_reset_config( struct gs_dev *dev );
-static int gs_build_config_desc( u8 *buf, enum usb_device_speed speed,
-               u8 type, unsigned int index );
-
-static struct usb_request *gs_alloc_req( struct usb_ep *ep, unsigned int len,
-       int kmalloc_flags );
-static void gs_free_req( struct usb_ep *ep, struct usb_request *req );
-
-static struct gs_req_entry *gs_alloc_req_entry( struct usb_ep *ep, unsigned len,
-       int kmalloc_flags );
-static void gs_free_req_entry( struct usb_ep *ep, struct gs_req_entry *req );
-
-static int gs_alloc_ports( struct gs_dev *dev, int kmalloc_flags );
-static void gs_free_ports( struct gs_dev *dev );
-
-/* circular buffer */
-static struct gs_buf *gs_buf_alloc( unsigned int size, int kmalloc_flags );
-static void gs_buf_free( struct gs_buf *gb );
-static void gs_buf_clear( struct gs_buf *gb );
-static unsigned int gs_buf_data_avail( struct gs_buf *gb );
-static unsigned int gs_buf_space_avail( struct gs_buf *gb );
-static unsigned int gs_buf_put( struct gs_buf *gb, const char *buf,
-       unsigned int count );
-static unsigned int gs_buf_get( struct gs_buf *gb, char *buf,
-       unsigned int count );
-
-
-/* Globals */
-
-static struct gs_dev *gs_device;
-
-static struct semaphore        gs_open_close_sem[GS_NUM_PORTS];
-
-static unsigned int read_q_size = GS_DEFAULT_READ_Q_SIZE;
-static unsigned int write_q_size = GS_DEFAULT_WRITE_Q_SIZE;
-
-static unsigned int write_buf_size = GS_DEFAULT_WRITE_BUF_SIZE;
-
-static unsigned char gs_tmp_buf[GS_TMP_BUF_SIZE];
-static struct semaphore        gs_tmp_buf_sem;
-
-/* tty driver struct */
-static struct tty_operations gs_tty_ops = {
-       .open =                 gs_open,
-       .close =                gs_close,
-       .write =                gs_write,
-       .put_char =             gs_put_char,
-       .flush_chars =          gs_flush_chars,
-       .write_room =           gs_write_room,
-       .ioctl =                gs_ioctl,
-       .set_termios =          gs_set_termios,
-       .throttle =             gs_throttle,
-       .unthrottle =           gs_unthrottle,
-       .break_ctl =            gs_break,
-       .chars_in_buffer =      gs_chars_in_buffer,
-       .read_proc =            gs_read_proc,
-};
-static struct tty_driver *gs_tty_driver;
-
-/* gadget driver struct */
-static struct usb_gadget_driver gs_gadget_driver = {
-#ifdef HIGHSPEED
-       .speed =                USB_SPEED_HIGH,
-#else
-       .speed =                USB_SPEED_FULL,
-#endif
-       .function =             GS_LONG_NAME,
-       .bind =                 gs_bind,
-       .unbind =               gs_unbind,
-       .setup =                gs_setup,
-       .disconnect =           gs_disconnect,
-       .driver = {
-               .name =         GS_SHORT_NAME,
-               /* .shutdown = ... */
-               /* .suspend = ...  */
-               /* .resume = ...   */
-       },
-};
-
-
-/* USB descriptors */
-
-#define GS_MANUFACTURER_STR_ID 1
-#define GS_PRODUCT_STR_ID      2
-#define GS_SERIAL_STR_ID       3
-#define GS_CONFIG_STR_ID       4
-
-/* static strings, in iso 8859/1 */
-static struct usb_string gs_strings[] = {
-       { GS_MANUFACTURER_STR_ID, UTS_SYSNAME " " UTS_RELEASE " with " CHIP },
-       { GS_PRODUCT_STR_ID, GS_LONG_NAME },
-       { GS_SERIAL_STR_ID, "0" },
-       { GS_CONFIG_STR_ID, "Bulk" },
-       {  } /* end of list */
-};
-
-static struct usb_gadget_strings gs_string_table = {
-       .language =             0x0409, /* en-us */
-       .strings =              gs_strings,
-};
-
-static const struct usb_device_descriptor gs_device_desc = {
-       .bLength =              USB_DT_DEVICE_SIZE,
-       .bDescriptorType =      USB_DT_DEVICE,
-       .bcdUSB =               __constant_cpu_to_le16(0x0200),
-       .bDeviceClass =         USB_CLASS_VENDOR_SPEC,
-       .bMaxPacketSize0 =      EP0_MAXPACKET,
-       .idVendor =             __constant_cpu_to_le16(GS_VENDOR_ID),
-       .idProduct =            __constant_cpu_to_le16(GS_PRODUCT_ID),
-       .bcdDevice =            __constant_cpu_to_le16(GS_VERSION_NUM),
-       .iManufacturer =        GS_MANUFACTURER_STR_ID,
-       .iProduct =             GS_PRODUCT_STR_ID,
-       .iSerialNumber =        GS_SERIAL_STR_ID,
-       .bNumConfigurations =   GS_NUM_CONFIGS,
-};
-
-static const struct usb_config_descriptor gs_config_desc = {
-       .bLength =              USB_DT_CONFIG_SIZE,
-       .bDescriptorType =      USB_DT_CONFIG,
-       /* .wTotalLength set by gs_build_config_desc */
-       .bNumInterfaces =       GS_NUM_INTERFACES,
-       .bConfigurationValue =  GS_BULK_CONFIG_ID,
-       .iConfiguration =       GS_CONFIG_STR_ID,
-       .bmAttributes =         USB_CONFIG_ATT_ONE | SELFPOWER | WAKEUP,
-       .bMaxPower =            (MAX_USB_POWER + 1) / 2,
-};
-
-static const struct usb_interface_descriptor gs_interface_desc = {
-       .bLength =              USB_DT_INTERFACE_SIZE,
-       .bDescriptorType =      USB_DT_INTERFACE,
-       .bNumEndpoints =        GS_NUM_ENDPOINTS,
-       .bInterfaceClass =      USB_CLASS_VENDOR_SPEC,
-       .iInterface =           GS_CONFIG_STR_ID,
-};
-
-static const struct usb_endpoint_descriptor gs_fullspeed_in_desc = {
-       .bLength =              USB_DT_ENDPOINT_SIZE,
-       .bDescriptorType =      USB_DT_ENDPOINT,
-       .bEndpointAddress =     EP_IN_NUM | USB_DIR_IN,
-       .bmAttributes =         USB_ENDPOINT_XFER_BULK,
-       .wMaxPacketSize =       __constant_cpu_to_le16(64),
-};
-
-static const struct usb_endpoint_descriptor gs_fullspeed_out_desc = {
-       .bLength =              USB_DT_ENDPOINT_SIZE,
-       .bDescriptorType =      USB_DT_ENDPOINT,
-       .bEndpointAddress =     EP_OUT_NUM | USB_DIR_OUT,
-       .bmAttributes =         USB_ENDPOINT_XFER_BULK,
-       .wMaxPacketSize =       __constant_cpu_to_le16(64),
-};
-
-static const struct usb_endpoint_descriptor gs_highspeed_in_desc = {
-       .bLength =              USB_DT_ENDPOINT_SIZE,
-       .bDescriptorType =      USB_DT_ENDPOINT,
-       .bEndpointAddress =     EP_IN_NUM | USB_DIR_IN,
-       .bmAttributes =         USB_ENDPOINT_XFER_BULK,
-       .wMaxPacketSize =       __constant_cpu_to_le16(512),
-};
-
-static const struct usb_endpoint_descriptor gs_highspeed_out_desc = {
-       .bLength =              USB_DT_ENDPOINT_SIZE,
-       .bDescriptorType =      USB_DT_ENDPOINT,
-       .bEndpointAddress =     EP_OUT_NUM | USB_DIR_OUT,
-       .bmAttributes =         USB_ENDPOINT_XFER_BULK,
-       .wMaxPacketSize =       __constant_cpu_to_le16(512),
-};
-
-#ifdef HIGHSPEED
-static const struct usb_qualifier_descriptor gs_qualifier_desc = {
-       .bLength =              sizeof(struct usb_qualifier_descriptor),
-       .bDescriptorType =      USB_DT_DEVICE_QUALIFIER,
-       .bcdUSB =               __constant_cpu_to_le16 (0x0200),
-       .bDeviceClass =         USB_CLASS_VENDOR_SPEC,
-       /* assumes ep0 uses the same value for both speeds ... */
-       .bMaxPacketSize0 =      EP0_MAXPACKET,
-       .bNumConfigurations =   GS_NUM_CONFIGS,
-};
-#endif
-
-
-/* Module */
-
-MODULE_DESCRIPTION( GS_LONG_NAME );
-MODULE_AUTHOR( "Al Borchers" );
-MODULE_LICENSE( "GPL" );
-
-MODULE_PARM( debug, "i" );
-MODULE_PARM_DESC( debug, "Enable debugging, 0=off, 1=on" );
-
-MODULE_PARM( read_q_size, "i" );
-MODULE_PARM_DESC( read_q_size, "Read request queue size, default=32" );
-
-MODULE_PARM( write_q_size, "i" );
-MODULE_PARM_DESC( write_q_size, "Write request queue size, default=32" );
-
-MODULE_PARM( write_buf_size, "i" );
-MODULE_PARM_DESC( write_buf_size, "Write buffer size, default=8192" );
-
-module_init( gs_module_init );
-module_exit( gs_module_exit );
-
-/*
-*  gs_module_init
-*
-*  Register as a USB gadget driver and a tty driver.
-*/
-
-static int __init gs_module_init(void)
-{
-       int i;
-       int retval;
-
-       retval = usb_gadget_register_driver(&gs_gadget_driver);
-       if (retval) {
-               printk(KERN_ERR "gs_module_init: cannot register gadget driver, ret=%d\n", retval);
-               return retval;
-       }
-
-       gs_tty_driver = alloc_tty_driver(GS_NUM_PORTS);
-       if (!gs_tty_driver)
-               return -ENOMEM;
-       gs_tty_driver->owner = THIS_MODULE;
-       gs_tty_driver->driver_name = GS_SHORT_NAME;
-       gs_tty_driver->name = "ttygs";
-       gs_tty_driver->devfs_name = "usb/ttygs/";
-       gs_tty_driver->major = GS_MAJOR;
-       gs_tty_driver->minor_start = GS_MINOR_START;
-       gs_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;
-       gs_tty_driver->subtype = SERIAL_TYPE_NORMAL;
-       gs_tty_driver->flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
-       gs_tty_driver->init_termios = tty_std_termios;
-       gs_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-       tty_set_operations(gs_tty_driver, &gs_tty_ops);
-
-       for (i=0; i < GS_NUM_PORTS; i++)
-               sema_init(&gs_open_close_sem[i], 1);
-
-       sema_init(&gs_tmp_buf_sem, 1);
-
-       retval = tty_register_driver(gs_tty_driver);
-       if (retval) {
-               usb_gadget_unregister_driver(&gs_gadget_driver);
-               put_tty_driver(gs_tty_driver);
-               printk(KERN_ERR "gs_module_init: cannot register tty driver, ret=%d\n", retval);
-               return retval;
-       }
-
-       printk(KERN_INFO "gs_module_init: %s %s loaded\n", GS_LONG_NAME, GS_VERSION_STR);
-       return 0;
-}
-
-
-/*
-* gs_module_exit
-*
-* Unregister as a tty driver and a USB gadget driver.
-*/
-
-static void __exit gs_module_exit(void)
-{
-       tty_unregister_driver(gs_tty_driver);
-       put_tty_driver(gs_tty_driver);
-       usb_gadget_unregister_driver(&gs_gadget_driver);
-
-       printk(KERN_INFO "gs_module_exit: %s %s unloaded\n", GS_LONG_NAME, GS_VERSION_STR);
-}
-
-
-/* TTY Driver */
-
-/*
- * gs_open
- */
-
-static int gs_open( struct tty_struct *tty, struct file *file )
-{
-
-       int port_num;
-       unsigned long flags;
-       struct gs_port *port;
-       struct gs_dev *dev;
-       struct gs_buf *buf;
-       struct semaphore *sem;
-
-
-       port_num = tty->index;
-
-       gs_debug( "gs_open: (%d,%p,%p)\n", port_num, tty, file );
-
-       tty->driver_data = NULL;
-
-       if( port_num < 0 || port_num >= GS_NUM_PORTS ) {
-               printk( KERN_ERR "gs_open: (%d,%p,%p) invalid port number\n",
-                       port_num, tty, file );
-               return( -ENODEV );
-       }
-
-       dev = gs_device;
-
-       if( dev == NULL ) {
-               printk( KERN_ERR "gs_open: (%d,%p,%p) NULL device pointer\n",
-                       port_num, tty, file );
-               return( -ENODEV );
-       }
-
-       sem = &gs_open_close_sem[port_num];
-       if( down_interruptible( sem ) ) {
-               printk( KERN_ERR
-               "gs_open: (%d,%p,%p) interrupted waiting for semaphore\n",
-                       port_num, tty, file );
-               return( -ERESTARTSYS );
-       }
-
-       spin_lock_irqsave(&dev->dev_lock, flags );
-
-       if( dev->dev_config == GS_NO_CONFIG_ID ) {
-               printk( KERN_ERR
-                       "gs_open: (%d,%p,%p) device is not connected\n",
-                       port_num, tty, file );
-               spin_unlock_irqrestore( &dev->dev_lock, flags );
-               up( sem );
-               return( -ENODEV );
-       }
-
-       port = dev->dev_port[port_num];
-
-       if( port == NULL ) {
-               printk( KERN_ERR "gs_open: (%d,%p,%p) NULL port pointer\n",
-                       port_num, tty, file );
-               spin_unlock_irqrestore( &dev->dev_lock, flags );
-               up( sem );
-               return( -ENODEV );
-       }
-
-       spin_lock( &port->port_lock );
-       spin_unlock( &dev->dev_lock );
-
-       if( port->port_dev == NULL ) {
-               printk( KERN_ERR "gs_open: (%d,%p,%p) port disconnected (1)\n",
-                       port_num, tty, file );
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               up( sem );
-               return( -EIO );
-       }
-
-       if( port->port_open_count > 0 ) {
-               ++port->port_open_count;
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               gs_debug( "gs_open: (%d,%p,%p) already open\n",
-                       port_num, tty, file );
-               up( sem );
-               return( 0 );
-       }
-
-       /* mark port as in use, we can drop port lock and sleep if necessary */
-       port->port_in_use = 1;
-
-       /* allocate write buffer on first open */
-       if( port->port_write_buf == NULL ) {
-
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               buf = gs_buf_alloc( write_buf_size, GFP_KERNEL );
-               spin_lock_irqsave( &port->port_lock, flags );
-
-               /* might have been disconnected while asleep, check */
-               if( port->port_dev == NULL ) {
-                       printk( KERN_ERR
-                               "gs_open: (%d,%p,%p) port disconnected (2)\n",
-                               port_num, tty, file );
-                       port->port_in_use = 0;
-                       spin_unlock_irqrestore( &port->port_lock, flags );
-                       up( sem );
-                       return( -EIO );
-               }
-
-               if( (port->port_write_buf=buf) == NULL ) {
-                       printk( KERN_ERR "gs_open: (%d,%p,%p) cannot allocate port write buffer\n",
-                               port_num, tty, file );
-                       port->port_in_use = 0;
-                       spin_unlock_irqrestore( &port->port_lock, flags );
-                       up( sem );
-                       return( -ENOMEM );
-               }
-
-       }
-
-       /* wait for carrier detect (not implemented) */
-
-       /* might have been disconnected while asleep, check */
-       if( port->port_dev == NULL ) {
-               printk( KERN_ERR "gs_open: (%d,%p,%p) port disconnected (3)\n",
-                       port_num, tty, file );
-               port->port_in_use = 0;
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               up( sem );
-               return( -EIO );
-       }
-
-       tty->driver_data = port;
-       port->port_tty = tty;
-       port->port_open_count = 1;
-       port->port_in_use = 0;
-
-       spin_unlock_irqrestore( &port->port_lock, flags );
-       up( sem );
-
-       gs_debug( "gs_open: (%d,%p,%p) completed\n", port_num, tty, file );
-
-       return( 0 ); 
-
-}
-
-
-/*
- * gs_close
- */
-
-static void gs_close( struct tty_struct *tty, struct file *file )
-{
-
-       unsigned long flags;
-       struct gs_port *port = tty->driver_data;
-       struct semaphore *sem;
-
-
-       if( port == NULL ) {
-               printk( KERN_ERR "gs_close: NULL port pointer\n" );
-               return;
-       }
-
-       gs_debug( "gs_close: (%d,%p,%p)\n", port->port_num, tty, file );
-
-       sem = &gs_open_close_sem[port->port_num];
-       down( sem );
-
-       spin_lock_irqsave( &port->port_lock, flags );
-
-       if( port->port_open_count == 0 ) {
-               printk( KERN_ERR
-                       "gs_close: (%d,%p,%p) port is already closed\n",
-                       port->port_num, tty, file );
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               up( sem );
-               return;
-       }
-
-       if( port->port_open_count > 0 ) {
-               --port->port_open_count;
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               up( sem );
-               return;
-       }
-
-       /* free disconnected port on final close */
-       if( port->port_dev == NULL ) {
-               kfree( port );
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               up( sem );
-               return;
-       }
-
-       /* mark port as closed but in use, we can drop port lock */
-       /* and sleep if necessary */
-       port->port_in_use = 1;
-       port->port_open_count = 0;
-
-       /* wait for write buffer to drain, or */
-       /* at most GS_CLOSE_TIMEOUT seconds */
-       if( gs_buf_data_avail( port->port_write_buf ) > 0 ) {
-               wait_cond_interruptible_timeout( port->port_write_wait,
-               port->port_dev == NULL
-               || gs_buf_data_avail(port->port_write_buf) == 0,
-               &port->port_lock, flags, GS_CLOSE_TIMEOUT * HZ );
-       }
-
-       /* free disconnected port on final close */
-       /* (might have happened during the above sleep) */
-       if( port->port_dev == NULL ) {
-               kfree( port );
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               up( sem );
-               return;
-       }
-
-       gs_buf_clear( port->port_write_buf );
-
-       tty->driver_data = NULL;
-       port->port_tty = NULL;
-       port->port_in_use = 0;
-
-       spin_unlock_irqrestore( &port->port_lock, flags );
-       up( sem );
-
-       gs_debug( "gs_close: (%d,%p,%p) completed\n",
-               port->port_num, tty, file );
-
-}
-
-
-/*
- * gs_write
- */
-
-static int gs_write( struct tty_struct *tty, int from_user,
-       const unsigned char *buf, int count )
-{
-
-       unsigned long flags;
-       struct gs_port *port = tty->driver_data;
-
-
-       if( port == NULL ) {
-               printk( KERN_ERR "gs_write: NULL port pointer\n" );
-               return( -EIO );
-       }
-
-       gs_debug( "gs_write: (%d,%p) writing %d bytes\n", port->port_num, tty,
-               count );
-
-       if( count == 0 )
-               return( 0 );
-
-       /* copy from user into tmp buffer, get tmp_buf semaphore */
-       if( from_user ) {
-               if( count > GS_TMP_BUF_SIZE )
-                       count = GS_TMP_BUF_SIZE;
-               down( &gs_tmp_buf_sem );
-               if( copy_from_user( gs_tmp_buf, buf, count ) != 0 ) {
-                       up( &gs_tmp_buf_sem );
-                       printk( KERN_ERR
-                       "gs_write: (%d,%p) cannot copy from user space\n",
-                               port->port_num, tty );
-                       return( -EFAULT );
-               }
-               buf = gs_tmp_buf;
-       }
-
-       spin_lock_irqsave( &port->port_lock, flags );
-
-       if( port->port_dev == NULL ) {
-               printk( KERN_ERR "gs_write: (%d,%p) port is not connected\n",
-                       port->port_num, tty );
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               if( from_user )
-                       up( &gs_tmp_buf_sem );
-               return( -EIO );
-       }
-
-       if( port->port_open_count == 0 ) {
-               printk( KERN_ERR "gs_write: (%d,%p) port is closed\n",
-                       port->port_num, tty );
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               if( from_user )
-                       up( &gs_tmp_buf_sem );
-               return( -EBADF );
-       }
-
-       count = gs_buf_put( port->port_write_buf, buf, count );
-
-       spin_unlock_irqrestore( &port->port_lock, flags );
-
-       if( from_user )
-               up( &gs_tmp_buf_sem );
-
-       gs_send( gs_device );
-
-       gs_debug( "gs_write: (%d,%p) wrote %d bytes\n", port->port_num, tty,
-               count );
-
-       return( count );
-
-}
-
-
-/*
- * gs_put_char
- */
-
-static void gs_put_char( struct tty_struct *tty, unsigned char ch )
-{
-
-       unsigned long flags;
-       struct gs_port *port = tty->driver_data;
-
-
-       if( port == NULL ) {
-               printk( KERN_ERR "gs_put_char: NULL port pointer\n" );
-               return;
-       }
-
-       gs_debug( "gs_put_char: (%d,%p) char=0x%x, called from %p, %p, %p\n", port->port_num, tty, ch, __builtin_return_address(0), __builtin_return_address(1), __builtin_return_address(2) );
-
-       spin_lock_irqsave( &port->port_lock, flags );
-
-       if( port->port_dev == NULL ) {
-               printk( KERN_ERR "gs_put_char: (%d,%p) port is not connected\n",
-                       port->port_num, tty );
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               return;
-       }
-
-       if( port->port_open_count == 0 ) {
-               printk( KERN_ERR "gs_put_char: (%d,%p) port is closed\n",
-                       port->port_num, tty );
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               return;
-       }
-
-       gs_buf_put( port->port_write_buf, &ch, 1 );
-
-       spin_unlock_irqrestore( &port->port_lock, flags );
-
-}
-
-
-/*
- * gs_flush_chars
- */
-
-static void gs_flush_chars( struct tty_struct *tty )
-{
-
-       unsigned long flags;
-       struct gs_port *port = tty->driver_data;
-
-
-       if( port == NULL ) {
-               printk( KERN_ERR "gs_flush_chars: NULL port pointer\n" );
-               return;
-       }
-
-       gs_debug( "gs_flush_chars: (%d,%p)\n", port->port_num, tty );
-
-       spin_lock_irqsave( &port->port_lock, flags );
-
-       if( port->port_dev == NULL ) {
-               printk( KERN_ERR
-                       "gs_flush_chars: (%d,%p) port is not connected\n",
-                       port->port_num, tty );
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               return;
-       }
-
-       if( port->port_open_count == 0 ) {
-               printk( KERN_ERR "gs_flush_chars: (%d,%p) port is closed\n",
-                       port->port_num, tty );
-               spin_unlock_irqrestore( &port->port_lock, flags );
-               return;
-       }
-
-       spin_unlock_irqrestore( &port->port_lock, flags );
-
-       gs_send( gs_device );
-
-}
-
-
-/*
- * gs_write_room
- */
-
-static int gs_write_room( struct tty_struct *tty )
-{
-
-       int room = 0;
-       unsigned long flags;
-       struct gs_port *port = tty->driver_data;
-
-
-       if( port == NULL )
-               return( 0 );
-
-       spin_lock_irqsave( &port->port_lock, flags );
-
-       if( port->port_dev != NULL && port->port_open_count > 0
-       && port->port_write_buf != NULL )
-               room = gs_buf_space_avail( port->port_write_buf );
-
-       spin_unlock_irqrestore( &port->port_lock, flags );
-
-       gs_debug( "gs_write_room: (%d,%p) room=%d\n",
-               port->port_num, tty, room );
-
-       return( room );
-
-}
-
-
-/*
- * gs_chars_in_buffer
- */
-
-static int gs_chars_in_buffer( struct tty_struct *tty )
-{
-
-       int chars = 0;
-       unsigned long flags;
-       struct gs_port *port = tty->driver_data;
-
-
-       if( port == NULL )
-               return( 0 );
-
-       spin_lock_irqsave( &port->port_lock, flags );
-
-       if( port->port_dev != NULL && port->port_open_count > 0
-       && port->port_write_buf != NULL )
-               chars = gs_buf_data_avail( port->port_write_buf );
-
-       spin_unlock_irqrestore( &port->port_lock, flags );
-
-       gs_debug( "gs_chars_in_buffer: (%d,%p) chars=%d\n",
-               port->port_num, tty, chars );
-
-       return( chars );
-
-}
-
-
-/*
- * gs_throttle
- */
-
-static void gs_throttle( struct tty_struct *tty )
-{
-
-}
-
-
-/*
- * gs_unthrottle
- */
-
-static void gs_unthrottle( struct tty_struct *tty )
-{
-
-}
-
-
-/*
- * gs_break
- */
-
-static void gs_break( struct tty_struct *tty, int break_state )
-{
-
-}
-
-
-/*
- * gs_ioctl
- */
-
-static int  gs_ioctl( struct tty_struct *tty, struct file *file,
-       unsigned int cmd, unsigned long arg )
-{
-
-       struct gs_port *port = tty->driver_data;
-
-
-       if( port == NULL ) {
-               printk( KERN_ERR "gs_ioctl: NULL port pointer\n" );
-               return( -EIO );
-       }
-
-       gs_debug( "gs_ioctl: (%d,%p,%p) cmd=0x%4.4x, arg=%lu\n",
-               port->port_num, tty, file, cmd, arg );
-
-       /* handle ioctls */
-
-       /* could not handle ioctl */
-       return( -ENOIOCTLCMD );
-
-}
-
-
-/*
- * gs_set_termios
- */
-
-static void gs_set_termios( struct tty_struct *tty, struct termios *old )
-{
-
-}
-
-
-/*
- * gs_read_proc
- */
-
-static int gs_read_proc( char *page, char **start, off_t off, int count,
-       int *eof, void *data )
-{
-
-       return( 0 );
-
-}
-
-
-/*
-* gs_send
-*
-* This function finds available write requests, calls
-* gs_send_packet to fill these packets with data, and
-* continues until either there are no more write requests
-* available or no more data to send.  This function is
-* run whenever data arrives or write requests are available.
-*/
-
-static int gs_send( struct gs_dev *dev )
-{
-
-       int ret,len;
-       unsigned long flags;
-       struct usb_ep *ep;
-       struct usb_request *req;
-       struct gs_req_entry *req_entry;
-
-
-       if( dev == NULL ) {
-               printk( KERN_ERR "gs_send: NULL device pointer\n" );
-               return( -ENODEV );
-       }
-
-       spin_lock_irqsave( &dev->dev_lock, flags );
-
-       ep = dev->dev_in_ep;
-
-       while( !list_empty( &dev->dev_req_list ) ) {
-
-               req_entry = list_entry( dev->dev_req_list.next,
-                       struct gs_req_entry, re_entry );
-
-               req = req_entry->re_req;
-
-               len = gs_send_packet( dev, req->buf, ep->maxpacket );
-
-               if( len > 0 ) {
-gs_debug_level( 3, "gs_send: len=%d, 0x%2.2x 0x%2.2x 0x%2.2x ...\n", len, *((unsigned char *)req->buf), *((unsigned char *)req->buf+1), *((unsigned char *)req->buf+2) );
-                       list_del( &req_entry->re_entry );
-                       req->length = len;
-                       if( (ret=usb_ep_queue( ep, req, GFP_ATOMIC )) ) {
-                               printk( KERN_ERR
-                               "gs_send: cannot queue read request, ret=%d\n",
-                                       ret );
-                               break;
-                       }
-               } else {
-                       break;
-               }
-
-       }
-
-       spin_unlock_irqrestore( &dev->dev_lock, flags );
-
-       return( 0 );
-
-}
-
-
-/*
- * gs_send_packet
- *
- * If there is data to send, a packet is built in the given
- * buffer and the size is returned.  If there is no data to
- * send, 0 is returned.  If there is any error a negative
- * error number is returned.
- *
- * Called during USB completion routine, on interrupt time.
- *
- * We assume that disconnect will not happen until all completion
- * routines have completed, so we can assume that the dev_port
- * array does not change during the lifetime of this function.
- */
-
-static int gs_send_packet( struct gs_dev *dev, char *packet, unsigned int size )
-{
-
-       unsigned int len;
-       struct gs_port *port;
-
-
-       /* TEMPORARY -- only port 0 is supported right now */
-       port = dev->dev_port[0];
-
-       if( port == NULL ) {
-               printk( KERN_ERR
-                       "gs_send_packet: port=%d, NULL port pointer\n",
-                       0 );
-               return( -EIO );
-       }
-
-       spin_lock( &port->port_lock );
-
-       len = gs_buf_data_avail( port->port_write_buf );
-       if( len < size )
-               size = len;
-
-       if( size == 0 ) {
-               spin_unlock( &port->port_lock );
-               return( 0 );
-       }
-
-       size = gs_buf_get( port->port_write_buf, packet, size );
-
-       wake_up_interruptible( &port->port_tty->write_wait );
-
-       spin_unlock( &port->port_lock );
-
-       return( size );
-
-}
-
-
-/*
- * gs_recv_packet
- *
- * Called for each USB packet received.  Reads the packet
- * header and stuffs the data in the appropriate tty buffer.
- * Returns 0 if successful, or a negative error number.
- *
- * Called during USB completion routine, on interrupt time.
- *
- * We assume that disconnect will not happen until all completion
- * routines have completed, so we can assume that the dev_port
- * array does not change during the lifetime of this function.
- */
-
-static int gs_recv_packet( struct gs_dev *dev, char *packet, unsigned int size )
-{
-
-       unsigned int len;
-       struct gs_port *port;
-
-
-       /* TEMPORARY -- only port 0 is supported right now */
-       port = dev->dev_port[0];
-
-       if( port == NULL ) {
-               printk( KERN_ERR "gs_recv_packet: port=%d, NULL port pointer\n",
-                       port->port_num );
-               return( -EIO );
-       }
-
-       spin_lock( &port->port_lock );
-
-       if( port->port_tty == NULL ) {
-               printk( KERN_ERR "gs_recv_packet: port=%d, NULL tty pointer\n",
-                       port->port_num );
-               spin_unlock( &port->port_lock );
-               return( -EIO );
-       }
-
-       if( port->port_tty->magic != TTY_MAGIC ) {
-               printk( KERN_ERR "gs_recv_packet: port=%d, bad tty magic\n",
-                       port->port_num );
-               spin_unlock( &port->port_lock );
-               return( -EIO );
-       }
-
-       len = (unsigned int)(TTY_FLIPBUF_SIZE - port->port_tty->flip.count);
-       if( len < size )
-               size = len;
-
-       if( size > 0 ) {
-               memcpy( port->port_tty->flip.char_buf_ptr, packet, size );
-               port->port_tty->flip.char_buf_ptr += size;
-               port->port_tty->flip.count += size;
-               tty_flip_buffer_push( port->port_tty );
-               wake_up_interruptible( &port->port_tty->read_wait );
-       }
-
-       spin_unlock( &port->port_lock );
-
-       return( 0 );
-
-}
-
-
-/*
-* gs_read_complete
-*/
-
-static void gs_read_complete( struct usb_ep *ep, struct usb_request *req )
-{
-
-       int ret;
-       struct gs_dev *dev = ep->driver_data;
-
-
-       if( dev == NULL ) {
-               printk( KERN_ERR "gs_read_complete: NULL device pointer\n" );
-               return;
-       }
-
-       switch( req->status ) {
-
-       case 0:
-               /* normal completion */
-               gs_recv_packet( dev, req->buf, req->actual );
-requeue:
-               req->length = ep->maxpacket;
-               if( (ret=usb_ep_queue( ep, req, GFP_ATOMIC )) ) {
-                       printk( KERN_ERR
-                       "gs_read_complete: cannot queue read request, ret=%d\n",
-                               ret );
-               }
-               break;
-
-       case -ESHUTDOWN:
-               /* disconnect */
-               gs_debug( "gs_read_complete: shutdown\n" );
-               gs_free_req( ep, req );
-               break;
-
-       default:
-               /* unexpected */
-               printk( KERN_ERR
-               "gs_read_complete: unexpected status error, status=%d\n",
-                       req->status );
-               goto requeue;
-               break;
-
-       }
-
-}
-
-
-/*
-* gs_write_complete
-*/
-
-static void gs_write_complete( struct usb_ep *ep, struct usb_request *req )
-{
-
-       struct gs_dev *dev = ep->driver_data;
-       struct gs_req_entry *gs_req = req->context;
-
-
-       if( dev == NULL ) {
-               printk( KERN_ERR "gs_write_complete: NULL device pointer\n" );
-               return;
-       }
-
-       switch( req->status ) {
-
-       case 0:
-               /* normal completion */
-requeue:
-               if( gs_req == NULL ) {
-                       printk( KERN_ERR
-                               "gs_write_complete: NULL request pointer\n" );
-                       return;
-               }
-
-               spin_lock( &dev->dev_lock );
-               list_add( &gs_req->re_entry, &dev->dev_req_list );
-               spin_unlock( &dev->dev_lock );
-
-               gs_send( dev );
-
-               break;
-
-       case -ESHUTDOWN:
-               /* disconnect */
-               gs_debug( "gs_write_complete: shutdown\n" );
-               gs_free_req( ep, req );
-               break;
-
-       default:
-               printk( KERN_ERR
-               "gs_write_complete: unexpected status error, status=%d\n",
-                       req->status );
-               goto requeue;
-               break;
-
-       }
-
-}
-
-
-/* Gadget Driver */
-
-/*
- * gs_bind
- *
- * Called on module load.  Allocates and initializes the device
- * structure and a control request.
- */
-
-static int gs_bind( struct usb_gadget *gadget )
-{
-
-       int ret;
-       struct gs_dev *dev;
-
-
-       gs_device = dev = kmalloc( sizeof(struct gs_dev), GFP_KERNEL );
-       if( dev == NULL )
-               return( -ENOMEM );
-
-       set_gadget_data( gadget, dev );
-
-       memset( dev, 0, sizeof(struct gs_dev) );
-       dev->dev_gadget = gadget;
-       spin_lock_init( &dev->dev_lock );
-    INIT_LIST_HEAD( &dev->dev_req_list );
-
-       if( (ret=gs_alloc_ports( dev, GFP_KERNEL )) != 0 ) {
-               printk( KERN_ERR "gs_bind: cannot allocate ports\n" );
-               gs_unbind( gadget );
-               return( ret );
-       }
-
-       /* preallocate control response and buffer */
-       dev->dev_ctrl_req = gs_alloc_req( gadget->ep0, GS_MAX_DESC_LEN,
-               GFP_KERNEL );
-       if( dev->dev_ctrl_req == NULL ) {
-               gs_unbind( gadget );
-               return( -ENOMEM );
-       }
-       dev->dev_ctrl_req->complete = gs_setup_complete;
-
-       gadget->ep0->driver_data = dev;
-
-       printk( KERN_INFO "gs_bind: %s %s bound\n",
-               GS_LONG_NAME, GS_VERSION_STR );
-
-       return( 0 );
-
-}
-
-
-/*
- * gs_unbind
- *
- * Called on module unload.  Frees the control request and device
- * structure.
- */
-
-static void gs_unbind( struct usb_gadget *gadget )
-{
-
-       struct gs_dev *dev = get_gadget_data( gadget );
-
-
-       gs_device = NULL;
-
-       /* read/write requests already freed, only control request remains */
-       if( dev != NULL ) {
-               if( dev->dev_ctrl_req != NULL )
-                       gs_free_req( gadget->ep0, dev->dev_ctrl_req );
-               gs_free_ports( dev );
-               kfree( dev );
-               set_gadget_data( gadget, NULL );
-       }
-
-       printk( KERN_INFO "gs_unbind: %s %s unbound\n", GS_LONG_NAME,
-               GS_VERSION_STR );
-
-}
-
-
-/*
- * gs_setup
- *
- * Implements all the control endpoint functionality that's not
- * handled in hardware or the hardware driver.
- *
- * Returns the size of the data sent to the host, or a negative
- * error number.
- */
-
-static int gs_setup( struct usb_gadget *gadget,
-       const struct usb_ctrlrequest *ctrl )
-{
-
-       int ret = -EOPNOTSUPP;
-       unsigned int sv_config;
-       struct gs_dev *dev = get_gadget_data( gadget );
-       struct usb_request *req = dev->dev_ctrl_req;
-
-
-       switch (ctrl->bRequest) {
-
-       case USB_REQ_GET_DESCRIPTOR:
-
-               if( ctrl->bRequestType != USB_DIR_IN )
-                       break;
-
-               switch (ctrl->wValue >> 8) {
-
-               case USB_DT_DEVICE:
-                       ret = min( ctrl->wLength,
-                               (u16)sizeof(struct usb_device_descriptor) );
-                       memcpy( req->buf, &gs_device_desc, ret );
-                       break;
-
-#ifdef HIGHSPEED
-               case USB_DT_DEVICE_QUALIFIER:
-                       ret = min( ctrl->wLength,
-                               (u16)sizeof(struct usb_qualifier_descriptor) );
-                       memcpy( req->buf, &gs_qualifier_desc, ret );
-                       break;
-
-               case USB_DT_OTHER_SPEED_CONFIG:
-#endif /* HIGHSPEED */
-               case USB_DT_CONFIG:
-                       ret = gs_build_config_desc( req->buf, gadget->speed,
-                               ctrl->wValue >> 8, ctrl->wValue & 0xff );
-                       if( ret >= 0 )
-                               ret = min( ctrl->wLength, (u16)ret );
-                       break;
-
-               case USB_DT_STRING:
-                       /* wIndex == language code. */
-                       ret = usb_gadget_get_string( &gs_string_table,
-                               ctrl->wValue & 0xff, req->buf );
-                       if( ret >= 0 )
-                               ret = min( ctrl->wLength, (u16)ret );
-                       break;
-               }
-               break;
-
-       case USB_REQ_SET_CONFIGURATION:
-               if( ctrl->bRequestType != 0 )
-                       break;
-               spin_lock( &dev->dev_lock );
-               ret = gs_set_config( dev, ctrl->wValue );
-               spin_unlock( &dev->dev_lock );
-               break;
-
-       case USB_REQ_GET_CONFIGURATION:
-               if( ctrl->bRequestType != USB_DIR_IN )
-                       break;
-               *(u8 *)req->buf = dev->dev_config;
-               ret = min( ctrl->wLength, (u16)1 );
-               break;
-
-       case USB_REQ_SET_INTERFACE:
-               if( ctrl->bRequestType != USB_RECIP_INTERFACE )
-                       break;
-               spin_lock( &dev->dev_lock );
-               if( dev->dev_config == GS_BULK_CONFIG_ID
-               && ctrl->wIndex == GS_INTERFACE_ID
-               && ctrl->wValue == GS_ALT_INTERFACE_ID ) {
-                       sv_config = dev->dev_config;
-                       /* since there is only one interface, setting the */
-                       /* interface is equivalent to setting the config */
-                       gs_reset_config( dev );
-                       gs_set_config( dev, sv_config );
-                       ret = 0;
-               }
-               spin_unlock( &dev->dev_lock );
-               break;
-
-       case USB_REQ_GET_INTERFACE:
-               if( ctrl->bRequestType != (USB_DIR_IN|USB_RECIP_INTERFACE) )
-                       break;
-               if( dev->dev_config == GS_NO_CONFIG_ID )
-                       break;
-               if( ctrl->wIndex != GS_INTERFACE_ID ) {
-                       ret = -EDOM;
-                       break;
-               }
-               *(u8 *)req->buf = GS_ALT_INTERFACE_ID;
-               ret = min( ctrl->wLength, (u16)1 );
-               break;
-
-       default:
-               printk( KERN_ERR "gs_setup: unknown request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n",
-                       ctrl->bRequestType, ctrl->bRequest, ctrl->wValue,
-                       ctrl->wIndex, ctrl->wLength );
-               break;
-
-       }
-
-       /* respond with data transfer before status phase? */
-       if( ret >= 0 ) {
-               req->length = ret;
-               ret = usb_ep_queue( gadget->ep0, req, GFP_ATOMIC );
-               if( ret < 0 ) {
-                       printk( KERN_ERR
-                               "gs_setup: cannot queue response, ret=%d\n",
-                               ret );
-                       req->status = 0;
-                       gs_setup_complete( gadget->ep0, req );
-               }
-       }
-
-       /* device either stalls (ret < 0) or reports success */
-       return( ret );
-
-}
-
-
-/*
- * gs_setup_complete
- */
-
-static void gs_setup_complete( struct usb_ep *ep, struct usb_request *req )
-{
-       if( req->status || req->actual != req->length ) {
-               printk( KERN_ERR "gs_setup_complete: status error, status=%d, actual=%d, length=%d\n",
-                       req->status, req->actual, req->length );
-       }
-}
-
-
-/*
- * gs_disconnect
- *
- * Called when the device is disconnected.  Frees the closed
- * ports and disconnects open ports.  Open ports will be freed
- * on close.  Then reallocates the ports for the next connection.
- */
-
-static void gs_disconnect( struct usb_gadget *gadget )
-{
-
-       unsigned long flags;
-       struct gs_dev *dev = get_gadget_data( gadget );
-
-
-       spin_lock_irqsave( &dev->dev_lock, flags );
-
-       gs_reset_config( dev );
-
-       /* free closed ports and disconnect open ports */
-       /* (open ports will be freed when closed) */
-       gs_free_ports( dev );
-
-       /* re-allocate ports for the next connection */
-       if( gs_alloc_ports( dev, GFP_ATOMIC ) != 0 )
-               printk( KERN_ERR "gs_disconnect: cannot re-allocate ports\n" );
-
-       spin_unlock_irqrestore( &dev->dev_lock, flags );
-
-       printk( KERN_INFO "gs_disconnect: %s disconnected\n", GS_LONG_NAME );
-
-}
-
-
-/*
- * gs_set_config
- *
- * Configures the device by enabling device specific
- * optimizations, setting up the endpoints, allocating
- * read and write requests and queuing read requests.
- *
- * The device lock must be held when calling this function.
- */
-
-static int gs_set_config( struct gs_dev *dev, unsigned config )
-{
-
-       int i;
-       int ret = 0;
-       struct usb_gadget *gadget = dev->dev_gadget;
-       struct usb_ep *ep;
-       struct usb_request *req;
-       struct gs_req_entry *req_entry;
-
-
-       if( dev == NULL ) {
-               printk( KERN_ERR "gs_set_config: NULL device pointer\n" );
-               return( 0 );
-       }
-
-       if( config == dev->dev_config )
-               return( 0 );
-
-       gs_reset_config( dev );
-
-       if( config == GS_NO_CONFIG_ID )
-               return( 0 );
-
-       if( config != GS_BULK_CONFIG_ID )
-               return( -EINVAL );
-
-       hw_optimize( gadget );
-
-       gadget_for_each_ep( ep, gadget ) {
-
-               if( strcmp( ep->name, EP_IN_NAME ) == 0 ) {
-                       ret = usb_ep_enable( ep,
-                               gadget->speed == USB_SPEED_HIGH ?
-                               &gs_highspeed_in_desc : &gs_fullspeed_in_desc );
-                       if( ret == 0 ) {
-                               ep->driver_data = dev;
-                               dev->dev_in_ep = ep;
-                       } else {
-                               printk( KERN_ERR "gs_set_config: cannot enable in endpoint %s, ret=%d\n",
-                                       ep->name, ret );
-                               gs_reset_config( dev );
-                               return( ret );
-                       }
-               }
-
-               else if( strcmp( ep->name, EP_OUT_NAME ) == 0 ) {
-                       ret = usb_ep_enable( ep,
-                               gadget->speed == USB_SPEED_HIGH ?
-                               &gs_highspeed_out_desc :
-                               &gs_fullspeed_out_desc );
-                       if( ret == 0 ) {
-                               ep->driver_data = dev;
-                               dev->dev_out_ep = ep;
-                       } else {
-                               printk( KERN_ERR "gs_set_config: cannot enable out endpoint %s, ret=%d\n",
-                                       ep->name, ret );
-                               gs_reset_config( dev );
-                               return( ret );
-                       }
-               }
-
-       }
-
-       if( dev->dev_in_ep == NULL || dev->dev_out_ep == NULL ) {
-               gs_reset_config( dev );
-               printk( KERN_ERR "gs_set_config: cannot find endpoints\n" );
-               return( -ENODEV );
-       }
-
-       /* allocate and queue read requests */
-       ep = dev->dev_out_ep;
-       for( i=0; i<read_q_size && ret == 0; i++ ) {
-               if( (req=gs_alloc_req( ep, ep->maxpacket, GFP_ATOMIC )) ) {
-                       req->complete = gs_read_complete;
-                       if( (ret=usb_ep_queue( ep, req, GFP_ATOMIC )) ) {
-                               printk( KERN_ERR "gs_set_config: cannot queue read request, ret=%d\n",
-                                       ret );
-                       }
-               } else {
-                       gs_reset_config( dev );
-                       printk( KERN_ERR
-                       "gs_set_config: cannot allocate read requests\n" );
-                       return( -ENOMEM );
-               }
-       }
-
-       /* allocate write requests, and put on free list */
-       ep = dev->dev_in_ep;
-       for( i=0; i<write_q_size; i++ ) {
-               if( (req_entry=gs_alloc_req_entry( ep, ep->maxpacket,
-               GFP_ATOMIC )) ) {
-                       req_entry->re_req->complete = gs_write_complete;
-                       list_add( &req_entry->re_entry, &dev->dev_req_list );
-               } else {
-                       gs_reset_config( dev );
-                       printk( KERN_ERR
-                       "gs_set_config: cannot allocate write requests\n" );
-                       return( -ENOMEM );
-               }
-       }
-
-       dev->dev_config = config;
-
-       printk( KERN_INFO "gs_set_config: %s configured for %s speed\n",
-               GS_LONG_NAME,
-               gadget->speed == USB_SPEED_HIGH ? "high" : "full" );
-
-       return( 0 );
-
-}
-
-
-/*
- * gs_reset_config
- *
- * Mark the device as not configured, disable all endpoints,
- * which forces completion of pending I/O and frees queued
- * requests, and free the remaining write requests on the
- * free list.
- *
- * The device lock must be held when calling this function.
- */
-
-static void gs_reset_config( struct gs_dev *dev )
-{
-
-       struct gs_req_entry *req_entry;
-
-
-       if( dev == NULL ) {
-               printk( KERN_ERR "gs_reset_config: NULL device pointer\n" );
-               return;
-       }
-
-       if( dev->dev_config == GS_NO_CONFIG_ID )
-               return;
-
-       dev->dev_config = GS_NO_CONFIG_ID;
-
-       /* free write requests on the free list */
-       while( !list_empty( &dev->dev_req_list ) ) {
-               req_entry = list_entry( dev->dev_req_list.next,
-                       struct gs_req_entry, re_entry );
-               list_del( &req_entry->re_entry );
-               gs_free_req_entry( dev->dev_in_ep, req_entry );
-       }
-
-       /* disable endpoints, forcing completion of pending i/o; */
-       /* completion handlers free their requests in this case */
-       if( dev->dev_in_ep ) {
-               usb_ep_disable( dev->dev_in_ep );
-               dev->dev_in_ep = NULL;
-       }
-       if( dev->dev_out_ep ) {
-               usb_ep_disable( dev->dev_out_ep );
-               dev->dev_out_ep = NULL;
-       }
-
-}
-
-
-/*
- * gs_build_config_desc
- *
- * Builds a config descriptor in the given buffer and returns the
- * length, or a negative error number.
- */
-
-static int gs_build_config_desc( u8 *buf, enum usb_device_speed speed,
-               u8 type, unsigned int index )
-{
-
-       int high_speed;
-       int len = USB_DT_CONFIG_SIZE + USB_DT_INTERFACE_SIZE
-                               + GS_NUM_ENDPOINTS * USB_DT_ENDPOINT_SIZE;
-
-
-       /* only one config */
-       if( index != 0 )
-               return( -EINVAL );
-
-       memcpy( buf, &gs_config_desc, USB_DT_CONFIG_SIZE );
-       ((struct usb_config_descriptor *)buf)->bDescriptorType = type;
-       ((struct usb_config_descriptor *)buf)->wTotalLength =
-               __constant_cpu_to_le16( len );
-       buf += USB_DT_CONFIG_SIZE;
-
-       memcpy( buf, &gs_interface_desc, USB_DT_INTERFACE_SIZE );
-       buf += USB_DT_INTERFACE_SIZE;
-
-       /* other speed switches high and full speed */
-       high_speed = (speed == USB_SPEED_HIGH);
-       if( type == USB_DT_OTHER_SPEED_CONFIG )
-               high_speed = !high_speed;
-
-       memcpy( buf,
-               high_speed ? &gs_highspeed_in_desc : &gs_fullspeed_in_desc,
-               USB_DT_ENDPOINT_SIZE );
-       buf += USB_DT_ENDPOINT_SIZE;
-       memcpy( buf,
-               high_speed ? &gs_highspeed_out_desc : &gs_fullspeed_out_desc,
-               USB_DT_ENDPOINT_SIZE );
-
-       return( len );
-
-}
-
-
-/*
- * gs_alloc_req
- *
- * Allocate a usb_request and its buffer.  Returns a pointer to the
- * usb_request or NULL if there is an error.
- */
-
-static struct usb_request *gs_alloc_req( struct usb_ep *ep, unsigned int len,
-       int kmalloc_flags )
-{
-
-       struct usb_request *req;
-
-
-       if( ep == NULL )
-               return( NULL );
-
-       req = usb_ep_alloc_request( ep, kmalloc_flags );
-
-       if( req != NULL ) {
-               req->length = len;
-               req->buf = usb_ep_alloc_buffer( ep, len, &req->dma,
-                       kmalloc_flags );
-               if( req->buf == NULL ) {
-                       usb_ep_free_request( ep, req );
-                       return( NULL );
-               }
-       }
-
-       return( req );
-
-}
-
-
-/*
- * gs_free_req
- *
- * Free a usb_request and its buffer.
- */
-
-static void gs_free_req( struct usb_ep *ep, struct usb_request *req )
-{
-       if( ep != NULL && req != NULL ) {
-               if( req->buf != NULL )
-                       usb_ep_free_buffer( ep, req->buf, req->dma,
-                               req->length );
-               usb_ep_free_request( ep, req );
-       }
-}
-
-
-/*
- * gs_alloc_req_entry
- *
- * Allocates a request and its buffer, using the given
- * endpoint, buffer len, and kmalloc flags.
- */
-
-static struct gs_req_entry *gs_alloc_req_entry( struct usb_ep *ep,
-       unsigned len, int kmalloc_flags )
-{
-
-       struct gs_req_entry     *req;
-
-
-       req = kmalloc( sizeof(struct gs_req_entry), kmalloc_flags );
-       if( req == NULL )
-               return( NULL );
-
-       req->re_req = gs_alloc_req( ep, len, kmalloc_flags );
-       if( req->re_req == NULL ) {
-               kfree( req );
-               return( NULL );
-       }
-
-       req->re_req->context = req;
-
-       return( req );
-
-}
-
-
-/*
- * gs_free_req_entry
- *
- * Frees a request and its buffer.
- */
-
-static void gs_free_req_entry( struct usb_ep *ep, struct gs_req_entry *req )
-{
-       if( ep != NULL && req != NULL ) {
-               if( req->re_req != NULL )
-                       gs_free_req( ep, req->re_req );
-               kfree( req );
-       }
-}
-
-
-/*
- * gs_alloc_ports
- *
- * Allocate all ports and set the gs_dev struct to point to them.
- * Return 0 if successful, or a negative error number.
- *
- * The device lock is normally held when calling this function.
- */
-
-static int gs_alloc_ports( struct gs_dev *dev, int kmalloc_flags )
-{
-
-       int i;
-       struct gs_port *port;
-
-
-       if( dev == NULL )
-               return( -EIO );
-
-       for( i=0; i<GS_NUM_PORTS; i++ ) {
-
-               if( (port=(struct gs_port *)kmalloc( sizeof(struct gs_port),
-               kmalloc_flags )) == NULL )
-                       return( -ENOMEM );
-
-               memset( port, 0, sizeof( struct gs_port ) );
-               port->port_dev = dev;
-               port->port_num = i;
-               spin_lock_init( &port->port_lock );
-       init_waitqueue_head( &port->port_write_wait );
-
-               dev->dev_port[i] = port;
-
-       }
-
-       return( 0 );
-
-}
-
-
-/*
- * gs_free_ports
- *
- * Free all closed ports.  Open ports are disconnected by
- * freeing their write buffers, setting their device pointers
- * and the pointers to them in the device to NULL.  These
- * ports will be freed when closed.
- *
- * The device lock is normally held when calling this function.
- */
-
-static void gs_free_ports( struct gs_dev *dev )
-{
-
-       int i;
-       unsigned long flags;
-       struct gs_port *port;
-
-
-       if( dev == NULL )
-               return;
-
-       for( i=0; i<GS_NUM_PORTS; i++ ) {
-
-               if( (port=dev->dev_port[i]) != NULL ) {
-
-                       dev->dev_port[i] = NULL;
-
-                       spin_lock_irqsave( &port->port_lock, flags );
-
-                       if( port->port_write_buf != NULL ) {
-                               gs_buf_free( port->port_write_buf );
-                               port->port_write_buf = NULL;
-                       }
-
-                       if( port->port_open_count > 0 || port->port_in_use ) {
-                               port->port_dev = NULL;
-                               wake_up_interruptible( &port->port_write_wait );
-                               wake_up_interruptible( &port->port_tty->read_wait );
-                               wake_up_interruptible( &port->port_tty->write_wait );
-                       } else {
-                               kfree( port );
-                       }
-
-                       spin_unlock_irqrestore( &port->port_lock, flags );
-
-               }
-
-       }
-
-}
-
-
-/* Circular Buffer */
-
-/*
- * gs_buf_alloc
- *
- * Allocate a circular buffer and all associated memory.
- */
-
-static struct gs_buf *gs_buf_alloc( unsigned int size, int kmalloc_flags )
-{
-
-       struct gs_buf *gb;
-
-
-       if( size == 0 )
-               return( NULL );
-
-       gb = (struct gs_buf *)kmalloc( sizeof(struct gs_buf), kmalloc_flags );
-       if( gb == NULL )
-               return( NULL );
-
-       gb->buf_buf = kmalloc( size, kmalloc_flags );
-       if( gb->buf_buf == NULL ) {
-               kfree( gb );
-               return( NULL );
-       }
-
-       gb->buf_size = size;
-       gb->buf_get = gb->buf_put = gb->buf_buf;
-
-       return( gb );
-
-}
-
-
-/*
- * gs_buf_free
- *
- * Free the buffer and all associated memory.
- */
-
-void gs_buf_free( struct gs_buf *gb )
-{
-       if( gb != NULL ) {
-               if( gb->buf_buf != NULL )
-                       kfree( gb->buf_buf );
-               kfree( gb );
-       }
-}
-
-
-/*
- * gs_buf_clear
- *
- * Clear out all data in the circular buffer.
- */
-
-void gs_buf_clear( struct gs_buf *gb )
-{
-       if( gb != NULL )
-               gb->buf_get = gb->buf_put;
-               /* equivalent to a get of all data available */
-}
-
-
-/*
- * gs_buf_data_avail
- *
- * Return the number of bytes of data available in the circular
- * buffer.
- */
-
-unsigned int gs_buf_data_avail( struct gs_buf *gb )
-{
-       if( gb != NULL )
-               return( (gb->buf_size + gb->buf_put - gb->buf_get)
-                       % gb->buf_size );
-       else
-               return( 0 );
-}
-
-
-/*
- * gs_buf_space_avail
- *
- * Return the number of bytes of space available in the circular
- * buffer.
- */
-
-unsigned int gs_buf_space_avail( struct gs_buf *gb )
-{
-       if( gb != NULL )
-               return( (gb->buf_size + gb->buf_get - gb->buf_put - 1)
-                       % gb->buf_size );
-       else
-               return( 0 );
-}
-
-
-/*
- * gs_buf_put
- *
- * Copy data data from a user buffer and put it into the circular buffer.
- * Restrict to the amount of space available.
- *
- * Return the number of bytes copied.
- */
-
-unsigned int gs_buf_put( struct gs_buf *gb, const char *buf,
-       unsigned int count )
-{
-
-       unsigned int len;
-
-
-       if( gb == NULL )
-               return( 0 );
-
-       len  = gs_buf_space_avail( gb );
-       if( count > len )
-               count = len;
-
-       if( count == 0 )
-               return( 0 );
-
-       len = gb->buf_buf + gb->buf_size - gb->buf_put;
-       if( count > len ) {
-               memcpy( gb->buf_put, buf, len );
-               memcpy( gb->buf_buf, buf+len, count - len );
-               gb->buf_put = gb->buf_buf + count - len;
-       } else {
-               memcpy( gb->buf_put, buf, count );
-               if( count < len )
-                       gb->buf_put += count;
-               else /* count == len */
-                       gb->buf_put = gb->buf_buf;
-       }
-
-       return( count );
-
-}
-
-
-/*
- * gs_buf_get
- *
- * Get data from the circular buffer and copy to the given buffer.
- * Restrict to the amount of data available.
- *
- * Return the number of bytes copied.
- */
-
-unsigned int gs_buf_get( struct gs_buf *gb, char *buf, unsigned int count )
-{
-
-       unsigned int len;
-
-
-       if( gb == NULL )
-               return( 0 );
-
-       len = gs_buf_data_avail( gb );
-       if( count > len )
-               count = len;
-
-       if( count == 0 )
-               return( 0 );
-
-       len = gb->buf_buf + gb->buf_size - gb->buf_get;
-       if( count > len ) {
-               memcpy( buf, gb->buf_get, len );
-               memcpy( buf+len, gb->buf_buf, count - len );
-               gb->buf_get = gb->buf_buf + count - len;
-       } else {
-               memcpy( buf, gb->buf_get, count );
-               if( count < len )
-                       gb->buf_get += count;
-               else /* count == len */
-                       gb->buf_get = gb->buf_buf;
-       }
-
-       return( count );
-
-}
index 2d61ad5..e5e6f4b 100644 (file)
@@ -108,18 +108,14 @@ static const char loopback [] = "loop input to output";
  *
  * CHIP ... hardware identifier
  * DRIVER_VERSION_NUM ... alerts the host side driver to differences
- * EP0_MAXPACKET ... controls packetization of control requests
  * EP_*_NAME ... which endpoints do we use for which purpose?
  * EP_*_NUM ... numbers for them (often limited by hardware)
  * HIGHSPEED ... define if ep0 and descriptors need high speed support
  * MAX_USB_POWER ... define if we use other than 100 mA bus current
- * SELFPOWER ... unless we can run on bus power, USB_CONFIG_ATT_SELFPOWER
+ * SELFPOWER ... if we can run on bus power, zero
  * WAKEUP ... if hardware supports remote wakeup AND we will issue the
  *     usb_gadget_wakeup() call to initiate it, USB_CONFIG_ATT_WAKEUP
  *
- * hw_optimize(gadget) ... for any hardware tweaks we want to kick in
- *     before we enable our endpoints
- *
  * add other defines for other portability issues, like hardware that
  * for some reason doesn't handle full speed bulk maxpacket of 64.
  */
@@ -138,25 +134,13 @@ static const char loopback [] = "loop input to output";
 #ifdef CONFIG_USB_ZERO_NET2280
 #define CHIP                   "net2280"
 #define DRIVER_VERSION_NUM     0x0101
-#define EP0_MAXPACKET          64
 static const char EP_OUT_NAME [] = "ep-a";
 #define EP_OUT_NUM     2
 static const char EP_IN_NAME [] = "ep-b";
 #define EP_IN_NUM      2
 #define HIGHSPEED
 /* specific hardware configs could be bus-powered */
-#define SELFPOWER USB_CONFIG_ATT_SELFPOWER
 /* supports remote wakeup, but this driver doesn't */
-
-extern int net2280_set_fifo_mode (struct usb_gadget *gadget, int mode);
-
-static inline void hw_optimize (struct usb_gadget *gadget)
-{
-       /* we can have bigger ep-a/ep-b fifos (2KB each, 4 packets
-        * for highspeed bulk) because we're not using ep-c/ep-d.
-        */
-       net2280_set_fifo_mode (gadget, 1);
-}
 #endif
 
 /*
@@ -173,17 +157,12 @@ static inline void hw_optimize (struct usb_gadget *gadget)
 #ifdef CONFIG_USB_ZERO_PXA2XX
 #define CHIP                   "pxa2xx"
 #define DRIVER_VERSION_NUM     0x0103
-#define EP0_MAXPACKET          16
 static const char EP_OUT_NAME [] = "ep12out-bulk";
 #define EP_OUT_NUM     12
 static const char EP_IN_NAME [] = "ep11in-bulk";
 #define EP_IN_NUM      11
 /* doesn't support bus-powered operation */
-#define SELFPOWER USB_CONFIG_ATT_SELFPOWER
 /* supports remote wakeup, but this driver doesn't */
-
-/* no hw optimizations to apply */
-#define hw_optimize(g) do {} while (0);
 #endif
 
 /*
@@ -200,22 +179,32 @@ static const char EP_IN_NAME [] = "ep11in-bulk";
 #ifdef CONFIG_USB_ZERO_SA1100
 #define CHIP                   "sa1100"
 #define DRIVER_VERSION_NUM     0x0105
-#define EP0_MAXPACKET          8
 static const char EP_OUT_NAME [] = "ep1out-bulk";
 #define EP_OUT_NUM     1
 static const char EP_IN_NAME [] = "ep2in-bulk";
 #define EP_IN_NUM      2
 /* doesn't support bus-powered operation */
-#define SELFPOWER USB_CONFIG_ATT_SELFPOWER
 /* doesn't support remote wakeup? */
+#endif
 
-/* no hw optimizations to apply */
-#define hw_optimize(g) do {} while (0);
+/*
+ * Toshiba TC86C001 ("Goku-S") UDC
+ *
+ * This has three semi-configurable full speed bulk/interrupt endpoints.
+ */
+#ifdef CONFIG_USB_ZERO_GOKU
+#define CHIP                   "goku"
+#define DRIVER_VERSION_NUM     0x0106
+static const char EP_OUT_NAME [] = "ep1-bulk";
+#define EP_OUT_NUM     1
+static const char EP_IN_NAME [] = "ep2-bulk";
+#define EP_IN_NUM      2
+/* doesn't support remote wakeup */
 #endif
 
 /*-------------------------------------------------------------------------*/
 
-#ifndef EP0_MAXPACKET
+#ifndef EP_OUT_NUM
 #      error Configure some USB peripheral controller driver!
 #endif
 
@@ -224,10 +213,10 @@ static const char EP_IN_NAME [] = "ep2in-bulk";
  */
 
 #ifndef        SELFPOWER
-/* default: say we rely on bus power */
-#define SELFPOWER      0
+/* default: say we're self-powered */
+#define SELFPOWER USB_CONFIG_ATT_SELFPOWER
 /* else:
- * - SELFPOWER value must be USB_CONFIG_ATT_SELFPOWER
+ * - SELFPOWER value must be zero
  * - MAX_USB_POWER may be nonzero.
  */
 #endif
@@ -338,14 +327,13 @@ module_param (loopdefault, bool, S_IRUGO|S_IWUSR);
 #define        CONFIG_SOURCE_SINK      3
 #define        CONFIG_LOOPBACK         2
 
-static const struct usb_device_descriptor
+static struct usb_device_descriptor
 device_desc = {
        .bLength =              sizeof device_desc,
        .bDescriptorType =      USB_DT_DEVICE,
 
        .bcdUSB =               __constant_cpu_to_le16 (0x0200),
        .bDeviceClass =         USB_CLASS_VENDOR_SPEC,
-       .bMaxPacketSize0 =      EP0_MAXPACKET,
 
        .idVendor =             __constant_cpu_to_le16 (DRIVER_VENDOR_NUM),
        .idProduct =            __constant_cpu_to_le16 (DRIVER_PRODUCT_NUM),
@@ -457,7 +445,7 @@ hs_sink_desc = {
        .wMaxPacketSize =       __constant_cpu_to_le16 (512),
 };
 
-static const struct usb_qualifier_descriptor
+static struct usb_qualifier_descriptor
 dev_qualifier = {
        .bLength =              sizeof dev_qualifier,
        .bDescriptorType =      USB_DT_DEVICE_QUALIFIER,
@@ -465,9 +453,6 @@ dev_qualifier = {
        .bcdUSB =               __constant_cpu_to_le16 (0x0200),
        .bDeviceClass =         USB_CLASS_VENDOR_SPEC,
 
-       /* assumes ep0 uses the same value for both speeds ... */
-       .bMaxPacketSize0 =      EP0_MAXPACKET,
-
        .bNumConfigurations =   2,
 };
 
@@ -959,7 +944,6 @@ zero_set_config (struct zero_dev *dev, unsigned number, int gfp_flags)
        }
 #endif
        zero_reset_config (dev);
-       hw_optimize (gadget);
 
        switch (number) {
        case CONFIG_SOURCE_SINK:
@@ -1028,7 +1012,7 @@ zero_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
 
        case USB_REQ_GET_DESCRIPTOR:
                if (ctrl->bRequestType != USB_DIR_IN)
-                       break;
+                       goto unknown;
                switch (ctrl->wValue >> 8) {
 
                case USB_DT_DEVICE:
@@ -1068,14 +1052,14 @@ zero_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
        /* currently two configs, two speeds */
        case USB_REQ_SET_CONFIGURATION:
                if (ctrl->bRequestType != 0)
-                       break;
+                       goto unknown;
                spin_lock (&dev->lock);
                value = zero_set_config (dev, ctrl->wValue, GFP_ATOMIC);
                spin_unlock (&dev->lock);
                break;
        case USB_REQ_GET_CONFIGURATION:
                if (ctrl->bRequestType != USB_DIR_IN)
-                       break;
+                       goto unknown;
                *(u8 *)req->buf = dev->config;
                value = min (ctrl->wLength, (u16) 1);
                break;
@@ -1086,7 +1070,7 @@ zero_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
         */
        case USB_REQ_SET_INTERFACE:
                if (ctrl->bRequestType != USB_RECIP_INTERFACE)
-                       break;
+                       goto unknown;
                spin_lock (&dev->lock);
                if (dev->config && ctrl->wIndex == 0 && ctrl->wValue == 0) {
                        u8              config = dev->config;
@@ -1106,7 +1090,7 @@ zero_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
                break;
        case USB_REQ_GET_INTERFACE:
                if (ctrl->bRequestType != (USB_DIR_IN|USB_RECIP_INTERFACE))
-                       break;
+                       goto unknown;
                if (!dev->config)
                        break;
                if (ctrl->wIndex != 0) {
@@ -1117,7 +1101,35 @@ zero_setup (struct usb_gadget *gadget, const struct usb_ctrlrequest *ctrl)
                value = min (ctrl->wLength, (u16) 1);
                break;
 
+       /*
+        * These are the same vendor-specific requests supported by
+        * Intel's USB 2.0 compliance test devices.  We exceed that
+        * device spec by allowing multiple-packet requests.
+        */
+       case 0x5b:      /* control WRITE test -- fill the buffer */
+               if (ctrl->bRequestType != (USB_DIR_OUT|USB_TYPE_VENDOR))
+                       goto unknown;
+               if (ctrl->wValue || ctrl->wIndex)
+                       break;
+               /* just read that many bytes into the buffer */
+               if (ctrl->wLength > USB_BUFSIZ)
+                       break;
+               value = ctrl->wLength;
+               break;
+       case 0x5c:      /* control READ test -- return the buffer */
+               if (ctrl->bRequestType != (USB_DIR_IN|USB_TYPE_VENDOR))
+                       goto unknown;
+               if (ctrl->wValue || ctrl->wIndex)
+                       break;
+               /* expect those bytes are still in the buffer; send back */
+               if (ctrl->wLength > USB_BUFSIZ
+                               || ctrl->wLength != req->length)
+                       break;
+               value = ctrl->wLength;
+               break;
+
        default:
+unknown:
                VDEBUG (dev,
                        "unknown control req%02x.%02x v%04x i%04x l%d\n",
                        ctrl->bRequestType, ctrl->bRequest,
@@ -1199,6 +1211,12 @@ zero_bind (struct usb_gadget *gadget)
 
        dev->req->complete = zero_setup_complete;
 
+       device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket;
+#ifdef HIGHSPEED
+       /* assume ep0 uses the same value for both speeds ... */
+       dev_qualifier.bMaxPacketSize0 = device_desc.bMaxPacketSize0;
+#endif
+
        gadget->ep0->driver_data = dev;
 
        INFO (dev, "%s, version: " DRIVER_VERSION "\n", longname);
index fd8bc78..41d3171 100644 (file)
@@ -2182,6 +2182,9 @@ static int uhci_reset(struct usb_hcd *hcd)
 
        uhci->io_addr = (unsigned long) hcd->regs;
 
+       /* Turn off all interrupts */
+       outw(0, uhci->io_addr + USBINTR);
+
        /* Maybe kick BIOS off this hardware.  Then reset, so we won't get
         * interrupts from any previous setup.
         */
index 3e914d6..1ddfec5 100644 (file)
  *      for common error messages rather than the maintainer.
  *
  * 0.4.7  11/28/2001
- *    - Fixed typo in Documentation/scanner.txt.  Thanks to
+ *    - Fixed typo in Documentation/usb/scanner.txt.  Thanks to
  *      Karel <karel.vervaeke@pandora.be> for pointing it out.
  *    - Added ID's for a Memorex 6136u. Thanks to Álvaro Gaspar de
  *      Valenzuela" <agaspard@utsi.edu>.
index c7e8833..bde3364 100644 (file)
@@ -1354,6 +1354,9 @@ void hid_init_reports(struct hid_device *hid)
 #define USB_VENDOR_ID_A4TECH           0x09DA
 #define USB_DEVICE_ID_A4TECH_WCP32PU   0x0006
 
+#define USB_VENDOR_ID_BERKSHIRE                0x0c98
+#define USB_DEVICE_ID_BERKSHIRE_PCWD   0x1140
+
 struct hid_blacklist {
        __u16 idVendor;
        __u16 idProduct;
@@ -1388,8 +1391,8 @@ struct hid_blacklist {
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_2PORTKVM, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET },
-       { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_HIDDEV },
-       { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS1, HID_QUIRK_HIDDEV },
+       { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_MGE, USB_DEVICE_ID_MGE_UPS1, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD, HID_QUIRK_BADPAD },
        { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_DRIVING, HID_QUIRK_BADPAD|HID_QUIRK_MULTI_INPUT },
        { USB_VENDOR_ID_HAPP, USB_DEVICE_ID_UGCI_FLYING, HID_QUIRK_BADPAD|HID_QUIRK_MULTI_INPUT },
@@ -1403,6 +1406,7 @@ struct hid_blacklist {
        { USB_VENDOR_ID_TANGTOP, USB_DEVICE_ID_TANGTOP_USBPS2, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ESSENTIAL_REALITY, USB_DEVICE_ID_ESSENTIAL_REALITY_P5, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK },
+       { USB_VENDOR_ID_BERKSHIRE, USB_DEVICE_ID_BERKSHIRE_PCWD, HID_QUIRK_IGNORE },
        { 0, 0 }
 };
 
index aa28a15..a63cf4a 100644 (file)
@@ -213,6 +213,7 @@ void hiddev_report_event(struct hid_device *hid, struct hid_report *report)
          ((type == HID_OUTPUT_REPORT) ? HID_REPORT_TYPE_OUTPUT : 
           ((type == HID_FEATURE_REPORT) ? HID_REPORT_TYPE_FEATURE:0));
        uref.report_id = report->id;
+       uref.field_index = HID_FIELD_INDEX_NONE;
 
        hiddev_send_event(hid, &uref);
 }
index 512281d..cf90955 100644 (file)
@@ -69,7 +69,7 @@ config USB_KAWETH
 
 config USB_PEGASUS
        tristate "USB Pegasus/Pegasus-II based ethernet device support"
-       depends on USB && NET
+       depends on USB && NET_ETHERNET
        select MII
        ---help---
          Say Y here if you know you have Pegasus or Pegasus-II based adapter.
@@ -96,8 +96,6 @@ config USB_RTL8150
 config USB_USBNET
        tristate "Multi-purpose USB Networking Framework"
        depends on USB && NET
-       select CRC32
-       select MII
        ---help---
          This driver supports several kinds of network links over USB,
          with "minidrivers" built around a common network driver core
@@ -206,6 +204,7 @@ config USB_EPSON2888
 config USB_ZAURUS
        boolean "Sharp Zaurus (stock ROMs)"
        depends on USB_USBNET
+       select CRC32
        default y
        help
          Choose this option to support the usb networking links used by
@@ -217,9 +216,7 @@ config USB_ZAURUS
 
 config USB_CDCETHER
        boolean "CDC Ethernet support (smart devices such as cable modems)"
-       # experimental primarily because cdc-ether was.
-       # make it non-experimental after more interop testing
-       depends on USB_USBNET && EXPERIMENTAL
+       depends on USB_USBNET
        default y
        help
          This option supports devices conforming to the Communication Device
@@ -247,7 +244,9 @@ comment "USB Network Adapters"
 
 config USB_AX8817X
        boolean "ASIX AX88172 Based USB 2.0 Ethernet Devices"
-       depends on USB_USBNET
+       depends on USB_USBNET && NET_ETHERNET
+       select CRC32
+       select MII
        default y
        help
 
index 2c68bea..e3447d0 100644 (file)
@@ -637,6 +637,27 @@ static void ax8817x_get_drvinfo (struct net_device *net,
        info->eedump_len = 0x3e;
 }
 
+static u32 ax8817x_get_link (struct net_device *net)
+{
+       struct usbnet *dev = (struct usbnet *)net->priv;
+
+       return (u32)mii_link_ok(&dev->mii);
+}
+
+static int ax8817x_get_settings(struct net_device *net, struct ethtool_cmd *cmd)
+{
+       struct usbnet *dev = (struct usbnet *)net->priv;
+
+       return mii_ethtool_gset(&dev->mii,cmd);
+}
+
+static int ax8817x_set_settings(struct net_device *net, struct ethtool_cmd *cmd)
+{
+       struct usbnet *dev = (struct usbnet *)net->priv;
+
+       return mii_ethtool_sset(&dev->mii,cmd);
+}
+
 static int ax8817x_bind(struct usbnet *dev, struct usb_interface *intf)
 {
        int ret;
@@ -670,16 +691,6 @@ static int ax8817x_bind(struct usbnet *dev, struct usb_interface *intf)
        }
        memcpy(dev->net->dev_addr, buf, ETH_ALEN);
 
-       /* Get IPG values */
-       if ((ret = ax8817x_read_cmd(dev, AX_CMD_READ_IPG012, 0, 0, 3, buf)) < 0) {
-               dbg("Error reading IPG values: %d", ret);
-               return ret;
-       }
-
-       for(i = 0;i < 3;i++) {
-               ax8817x_write_cmd(dev, AX_CMD_WRITE_IPG0 + i, 0, 0, 1, &buf[i]);
-       }
-
        /* Get the PHY id */
        if ((ret = ax8817x_read_cmd(dev, AX_CMD_READ_PHY_ID, 0, 0, 2, buf)) < 0) {
                dbg("error on read AX_CMD_READ_PHY_ID: %02x", ret);
@@ -735,9 +746,12 @@ static int ax8817x_bind(struct usbnet *dev, struct usb_interface *intf)
        dev->net->set_multicast_list = ax8817x_set_multicast;
 
        usbnet_ethtool_ops.get_drvinfo = &ax8817x_get_drvinfo;
+       usbnet_ethtool_ops.get_link = &ax8817x_get_link;
        usbnet_ethtool_ops.get_wol = &ax8817x_get_wol;
        usbnet_ethtool_ops.set_wol = &ax8817x_set_wol;
        usbnet_ethtool_ops.get_eeprom = &ax8817x_get_eeprom;
+       usbnet_ethtool_ops.get_settings = &ax8817x_get_settings;
+       usbnet_ethtool_ops.set_settings = &ax8817x_set_settings;
 
        return 0;
 }
index 9efedb6..3798e3c 100644 (file)
@@ -222,7 +222,7 @@ static int ipaq_open(struct usb_serial_port *port, struct file *filp)
         * discipline instead of queueing.
         */
 
-       port->tty->low_latency = 0;
+       port->tty->low_latency = 1;
        port->tty->raw = 1;
        port->tty->real_raw = 1;
 
index 2264cf6..2a37da3 100644 (file)
  *   Basic tests have been performed with minicom/zmodem transfers and
  *   modem dialing under Linux 2.4.0-test10 (for me it works fine).
  *
+ * 04-Nov-2003 Bill Marr <marr at flex dot com>
+ *   - Mimic Windows driver by sending 2 USB 'device request' messages
+ *     following normal 'baud rate change' message.  This allows data to be
+ *     transmitted to RS-232 devices which don't assert the 'CTS' signal.
+ *
  * 10-Nov-2001 Wolfgang Grandegger
  *   - Fixed an endianess problem with the baudrate selection for PowerPC.
  *
@@ -85,7 +90,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v1.1"
+#define DRIVER_VERSION "v1.2"
 #define DRIVER_AUTHOR "Wolfgang Grandegger <wolfgang@ces.ch>"
 #define DRIVER_DESC "Magic Control Technology USB-RS232 converter driver"
 
@@ -216,6 +221,7 @@ static int mct_u232_set_baud_rate(struct usb_serial *serial, int value)
 {
        unsigned int divisor;
         int rc;
+        unsigned char zero_byte = 0;
        divisor = cpu_to_le32(mct_u232_calculate_baud_rate(serial, value));
         rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
                              MCT_U232_SET_BAUD_RATE_REQUEST,
@@ -225,6 +231,35 @@ static int mct_u232_set_baud_rate(struct usb_serial *serial, int value)
        if (rc < 0)
                err("Set BAUD RATE %d failed (error = %d)", value, rc);
        dbg("set_baud_rate: value: %d, divisor: 0x%x", value, divisor);
+
+       /* Mimic the MCT-supplied Windows driver (version 1.21P.0104), which
+          always sends two extra USB 'device request' messages after the
+          'baud rate change' message.  The actual functionality of the
+          request codes in these messages is not fully understood but these
+          particular codes are never seen in any operation besides a baud
+          rate change.  Both of these messages send a single byte of data
+          whose value is always zero.  The second of these two extra messages
+          is required in order for data to be properly written to an RS-232
+          device which does not assert the 'CTS' signal. */
+
+       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                            MCT_U232_SET_UNKNOWN1_REQUEST, 
+                            MCT_U232_SET_REQUEST_TYPE,
+                            0, 0, &zero_byte, MCT_U232_SET_UNKNOWN1_SIZE, 
+                            WDR_TIMEOUT);
+       if (rc < 0)
+               err("Sending USB device request code %d failed (error = %d)", 
+                   MCT_U232_SET_UNKNOWN1_REQUEST, rc);
+
+       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                            MCT_U232_SET_UNKNOWN2_REQUEST, 
+                            MCT_U232_SET_REQUEST_TYPE,
+                            0, 0, &zero_byte, MCT_U232_SET_UNKNOWN2_SIZE, 
+                            WDR_TIMEOUT);
+       if (rc < 0)
+               err("Sending USB device request code %d failed (error = %d)", 
+                   MCT_U232_SET_UNKNOWN2_REQUEST, rc);
+
         return rc;
 } /* mct_u232_set_baud_rate */
 
index 06ca30b..b78a687 100644 (file)
 #define MCT_U232_SET_MODEM_CTRL_REQUEST        10 /* Set Modem Control Register (MCR) */
 #define MCT_U232_SET_MODEM_CTRL_SIZE    1
 
+/* This USB device request code is not well understood.  It is transmitted by
+   the MCT-supplied Windows driver whenever the baud rate changes. 
+*/
+#define MCT_U232_SET_UNKNOWN1_REQUEST   11  /* Unknown functionality */
+#define MCT_U232_SET_UNKNOWN1_SIZE       1
+
+/* This USB device request code is not well understood.  It is transmitted by
+   the MCT-supplied Windows driver whenever the baud rate changes. 
+   
+   Without this USB device request, the USB/RS-232 adapter will not write to
+   RS-232 devices which do not assert the 'CTS' signal.
+*/
+#define MCT_U232_SET_UNKNOWN2_REQUEST   12  /* Unknown functionality */
+#define MCT_U232_SET_UNKNOWN2_SIZE       1
+
 /*
  * Baud rate (divisor)
  */
  * Baud rate (divisor)
  * -------------------
  *
- *   BmRequestType:  0x4 (0100 0000B)
- *   bRequest:       0x5
- *   wValue:         0x0
- *   wIndex:         0x0
- *   wLength:        0x4
+ *   BmRequestType:  0x40 (0100 0000B)
+ *   bRequest:       0x05
+ *   wValue:         0x0000
+ *   wIndex:         0x0000
+ *   wLength:        0x0004
  *   Data:           divisor = 115200 / baud_rate
  *
+ *   SniffUSB observations (Nov 2003): Contrary to the 'wLength' value of 4
+ *   shown above, observations with a Belkin F5U109 adapter, using the
+ *   MCT-supplied Windows98 driver (U2SPORT.VXD, "File version: 1.21P.0104 for
+ *   Win98/Me"), show this request has a length of 1 byte, presumably because
+ *   of the fact that the Belkin adapter and the 'Sitecom U232-P25' adapter
+ *   use a baud-rate code instead of a conventional RS-232 baud rate divisor.
+ *   The current source code for this driver does not reflect this fact, but
+ *   the driver works fine with this adapter/driver combination nonetheless.
+ *
  *
  * Line Control Register (LCR)
  * ---------------------------
  *
- *  BmRequestType:  0x4 (0100 0000B)    0xc (1100 0000B)
- *  bRequest:       0x7                 0x6
- *  wValue:         0x0
- *  wIndex:         0x0
- *  wLength:        0x1
+ *  BmRequestType:  0x40 (0100 0000B)    0xc0 (1100 0000B)
+ *  bRequest:       0x07                 0x06
+ *  wValue:         0x0000
+ *  wIndex:         0x0000
+ *  wLength:        0x0001
  *  Data:           LCR (see below)
  *
  *  Bit 7: Divisor Latch Access Bit (DLAB). When set, access to the data
  *
  *  SniffUSB observations: Bit 7 seems not to be used. There seem to be two bugs
  *  in the Win98 driver: the break does not work (bit 6 is not asserted) and the
- *  sticky parity bit is not cleared when set once. The LCR can also be read
+ *  stick parity bit is not cleared when set once. The LCR can also be read
  *  back with USB request 6 but this has never been observed with SniffUSB.
  *
  *
  * Modem Control Register (MCR)
  * ----------------------------
  *
- *  BmRequestType:  0x4  (0100 0000B)
- *  bRequest:       0xa
- *  wValue:         0x0
- *  wIndex:         0x0
- *  wLength:        0x1
+ *  BmRequestType:  0x40  (0100 0000B)
+ *  bRequest:       0x0a
+ *  wValue:         0x0000
+ *  wIndex:         0x0000
+ *  wLength:        0x0001
  *  Data:           MCR (Bit 4..7, see below)
  *
  *  Bit 7: Reserved, always 0.
  * Modem Status Register (MSR)
  * ---------------------------
  *
- *  BmRequestType:  0xc  (1100 0000B)
- *  bRequest:       0x2
- *  wValue:         0x0
- *  wIndex:         0x0
- *  wLength:        0x1
+ *  BmRequestType:  0xc0  (1100 0000B)
+ *  bRequest:       0x02
+ *  wValue:         0x0000
+ *  wIndex:         0x0000
+ *  wLength:        0x0001
  *  Data:           MSR (see below)
  *
  *  Bit 7: Data Carrier Detect (CD). Reflects the state of the DCD line on the
  *  minicom/zmodem transfers (CRC errors).
  *
  *
+ * Unknown #1
+ * -------------------
+ *
+ *   BmRequestType:  0x40 (0100 0000B)
+ *   bRequest:       0x0b
+ *   wValue:         0x0000
+ *   wIndex:         0x0000
+ *   wLength:        0x0001
+ *   Data:           0x00
+ *
+ *   SniffUSB observations (Nov 2003): With the MCT-supplied Windows98 driver
+ *   (U2SPORT.VXD, "File version: 1.21P.0104 for Win98/Me"), this request
+ *   occurs immediately after a "Baud rate (divisor)" message.  It was not
+ *   observed at any other time.  It is unclear what purpose this message
+ *   serves.
+ *
+ *
+ * Unknown #2
+ * -------------------
+ *
+ *   BmRequestType:  0x40 (0100 0000B)
+ *   bRequest:       0x0c
+ *   wValue:         0x0000
+ *   wIndex:         0x0000
+ *   wLength:        0x0001
+ *   Data:           0x00
+ *
+ *   SniffUSB observations (Nov 2003): With the MCT-supplied Windows98 driver
+ *   (U2SPORT.VXD, "File version: 1.21P.0104 for Win98/Me"), this request
+ *   occurs immediately after the 'Unknown #1' message (see above).  It was
+ *   not observed at any other time.  It is unclear what other purpose (if
+ *   any) this message might serve, but without it, the USB/RS-232 adapter
+ *   will not write to RS-232 devices which do not assert the 'CTS' signal.
+ *
+ *
  * Flow control
  * ------------
  *
index bda1303..7d3cfa1 100644 (file)
@@ -79,7 +79,6 @@ static struct usb_device_id id_table [] = {
        { USB_DEVICE(TRIPP_VENDOR_ID, TRIPP_PRODUCT_ID) },
        { USB_DEVICE(RADIOSHACK_VENDOR_ID, RADIOSHACK_PRODUCT_ID) },
        { USB_DEVICE(DCU10_VENDOR_ID, DCU10_PRODUCT_ID) },
-       { USB_DEVICE(SITECOM_VENDOR_ID, SITECOM_PRODUCT_ID) },
        { }                                     /* Terminating entry */
 };
 
index 971c5bb..c7a99fb 100644 (file)
@@ -38,6 +38,3 @@
 
 #define DCU10_VENDOR_ID                0x0731
 #define DCU10_PRODUCT_ID       0x0528
-
-#define SITECOM_VENDOR_ID      0x6189
-#define SITECOM_PRODUCT_ID     0x2068
index 3599d29..15c8d0f 100644 (file)
@@ -311,6 +311,12 @@ UNUSUAL_DEV(  0x057b, 0x0000, 0x0300, 0x9999,
                US_SC_DEVICE,  US_PR_DEVICE, NULL,
                US_FL_SINGLE_LUN),
 
+/* Fabrizio Fellini <fello@libero.it> */
+UNUSUAL_DEV(  0x0595, 0x4343, 0x0000, 0x2210,
+               "Fujifilm",
+               "Digital Camera EX-20 DSC",
+               US_SC_8070, US_PR_CBI, NULL, 0 ),
+
 UNUSUAL_DEV(  0x059f, 0xa601, 0x0200, 0x0200, 
                "LaCie",
                "USB Hard Disk",
index 33f857c..d604780 100644 (file)
@@ -906,9 +906,5 @@ if FB || SGI_NEWPORT_CONSOLE
        source "drivers/video/logo/Kconfig"
 endif
 
-if FB
-       source "drivers/video/bootsplash/Kconfig"
-endif
-
 endmenu
 
index 8a5129f..b6efa93 100644 (file)
@@ -6,7 +6,6 @@
 
 obj-$(CONFIG_VT)                 += console/
 obj-$(CONFIG_LOGO)               += logo/
-obj-$(CONFIG_BOOTSPLASH)         += bootsplash/
 
 obj-$(CONFIG_FB)                  += fbmem.o fbmon.o fbcmap.o modedb.o softcursor.o
 # Only include macmodes.o if we have FB support and are PPC
index 9323e54..2b728ed 100644 (file)
@@ -1536,7 +1536,6 @@ aty128_init(struct pci_dev *pdev, const struct pci_device_id *ent)
        /* fill in info */
        info->fbops = &aty128fb_ops;
        info->flags = FBINFO_FLAG_DEFAULT;
-       info->dev = &pdev->dev;
 
 #ifdef CONFIG_PMAC_PBOOK
        par->lcd_on = default_lcd_on;
diff --git a/drivers/video/bootsplash/Kconfig b/drivers/video/bootsplash/Kconfig
deleted file mode 100644 (file)
index a3bb558..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#
-# Bootsplash configuration
-#
-
-menu "Bootsplash configuration"
-
-config BOOTSPLASH
-       bool "Bootup splash screen"
-       depends on FRAMEBUFFER_CONSOLE
-       default n
-        ---help---
-          This option enables the Linux bootsplash screen. For more 
-          information on the bootsplash screen have a look at 
-          http://www.bootsplash.org/.
-          If you are unsure, say N
-endmenu
-
diff --git a/drivers/video/bootsplash/Makefile b/drivers/video/bootsplash/Makefile
deleted file mode 100644 (file)
index 8ba1c08..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-# Makefile for the Linux bootsplash
-
-obj-$(CONFIG_BOOTSPLASH)               += bootsplash.o
-obj-$(CONFIG_BOOTSPLASH)               += decode-jpg.o
-obj-$(CONFIG_BOOTSPLASH)               += render.o
diff --git a/drivers/video/bootsplash/bootsplash.c b/drivers/video/bootsplash/bootsplash.c
deleted file mode 100644 (file)
index 5a865ed..0000000
+++ /dev/null
@@ -1,909 +0,0 @@
-/* 
- *           linux/drivers/video/bootsplash/bootsplash.c - 
- *                 splash screen handling functions.
- *     
- *     (w) 2001-2003 by Volker Poplawski, <volker@poplawski.de>,
- *                 Stefan Reinauer, <stepan@suse.de>,
- *                 Steffen Winterfeldt, <snwint@suse.de>,
- *                  Michael Schroeder <mls@suse.de>
- *                 
- *        Ideas & SuSE screen work by Ken Wimer, <wimer@suse.de>
- *
- *  For more information on this code check http://www.bootsplash.org/
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/fb.h>
-#include <linux/vt_kern.h>
-#include <linux/vmalloc.h>
-#include <linux/unistd.h>
-
-#include <asm/irq.h>
-#include <asm/system.h>
-
-#include "../console/fbcon.h"
-#include "bootsplash.h"
-#include "decode-jpg.h"
-
-extern struct fb_ops vesafb_ops;
-
-#define SPLASH_VERSION "3.1.3-2003/11/14"
-
-/* These errors have to match fbcon-jpegdec.h */
-static unsigned char *jpg_errors[] = {
-       "no SOI found", 
-       "not 8 bit", 
-       "height mismatch", 
-       "width mismatch",
-       "bad width or height", 
-       "too many COMPPs", 
-       "illegal HV", 
-       "quant table selector",
-       "picture is not YCBCR 221111",
-       "unknow CID in scan",
-       "dct not sequential",
-       "wrong marker",
-       "no EOI",
-       "bad tables",
-       "depth mismatch"
-};
-
-static struct jpeg_decdata *decdata = 0; /* private decoder data */
-
-static int splash_registered = 0;
-static int splash_usesilent = 0;       /* shall we display the silentjpeg? */
-int splash_default = 0xf01;
-
-static int splash_check_jpeg(unsigned char *jpeg, int width, int height, int depth);
-
-static int __init splash_setup(char *options)
-{
-       if(!strncmp("silent", options, 6)) {
-               printk(KERN_INFO "bootsplash: silent mode.\n");
-               splash_usesilent = 1;
-               /* skip "silent," */
-               if (strlen(options) == 6)
-                       return 0;
-               options += 7;
-       }
-       if(!strncmp("verbose", options, 7)) {
-               printk(KERN_INFO "bootsplash: verbose mode.\n");
-               splash_usesilent = 0;
-               return 0;
-       }
-       splash_default = simple_strtoul(options, NULL, 0);
-       return 0;
-}
-
-__setup("splash=", splash_setup);
-
-
-static int splash_hasinter(unsigned char *buf, int num)
-{
-    unsigned char *bufend = buf + num * 12;
-    while(buf < bufend) {
-       if (buf[1] > 127)               /* inter? */
-           return 1;
-       buf += buf[3] > 127 ? 24 : 12;  /* blend? */
-    }
-    return 0;
-}
-
-static int boxextract(unsigned char *buf, unsigned short *dp, unsigned char *cols, int *blendp)
-{
-    dp[0] = buf[0] | buf[1] << 8;
-    dp[1] = buf[2] | buf[3] << 8;
-    dp[2] = buf[4] | buf[5] << 8;
-    dp[3] = buf[6] | buf[7] << 8;
-    *(unsigned int *)(cols + 0) =
-       *(unsigned int *)(cols + 4) =
-       *(unsigned int *)(cols + 8) =
-       *(unsigned int *)(cols + 12) = *(unsigned int *)(buf + 8);
-    if (dp[1] > 32767) {
-       dp[1] = ~dp[1];
-       *(unsigned int *)(cols + 4) = *(unsigned int *)(buf + 12);
-       *(unsigned int *)(cols + 8) = *(unsigned int *)(buf + 16);
-       *(unsigned int *)(cols + 12) = *(unsigned int *)(buf + 20);
-       *blendp = 1;
-       return 24;
-    }
-    return 12;
-}
-
-static void boxit(unsigned char *pic, int bytes, unsigned char *buf, int num, int percent, int overpaint)
-{
-    int x, y, i, p, doblend, r, g, b, a, add;
-    unsigned short data1[4];
-    unsigned char cols1[16];
-    unsigned short data2[4];
-    unsigned char cols2[16];
-    unsigned char *bufend;
-    unsigned short *picp;
-    unsigned int stipple[32], sti, stin, stinn, stixs, stixe, stiys, stiye;
-    int xs, xe, ys, ye, xo, yo;
-
-    if (num == 0)
-       return;
-    bufend = buf + num * 12;
-    stipple[0] = 0xffffffff;
-    stin = 1;
-    stinn = 0;
-    stixs = stixe = 0;
-    stiys = stiye = 0;
-    while(buf < bufend) {
-       doblend = 0;
-       buf += boxextract(buf, data1, cols1, &doblend);
-       if (data1[0] == 32767 && data1[1] == 32767) {
-           /* box stipple */
-           if (stinn == 32)
-               continue;
-           if (stinn == 0) {
-               stixs = data1[2];
-               stixe = data1[3];
-               stiys = stiye = 0;
-           } else if (stinn == 4) {
-               stiys = data1[2];
-               stiye = data1[3];
-           }
-           stipple[stinn++] = (cols1[ 0] << 24) | (cols1[ 1] << 16) | (cols1[ 2] << 8) | cols1[ 3] ;
-           stipple[stinn++] = (cols1[ 4] << 24) | (cols1[ 5] << 16) | (cols1[ 6] << 8) | cols1[ 7] ;
-           stipple[stinn++] = (cols1[ 8] << 24) | (cols1[ 9] << 16) | (cols1[10] << 8) | cols1[11] ;
-           stipple[stinn++] = (cols1[12] << 24) | (cols1[13] << 16) | (cols1[14] << 8) | cols1[15] ;
-           stin = stinn;
-           continue;
-       }
-       stinn = 0;
-       if (data1[0] > 32767)
-           buf += boxextract(buf, data2, cols2, &doblend);
-       if (data1[0] == 32767 && data1[1] == 32766) {
-           /* box copy */
-           i = 12 * (short)data1[3];
-           doblend = 0;
-           i += boxextract(buf + i, data1, cols1, &doblend);
-           if (data1[0] > 32767)
-               boxextract(buf + i, data2, cols2, &doblend);
-       }
-       if (data1[0] == 32767)
-           continue;
-       if (data1[2] > 32767) {
-           if (overpaint)
-               continue;
-           data1[2] = ~data1[2];
-       }
-       if (data1[3] > 32767) {
-           if (percent == 65536)
-               continue;
-           data1[3] = ~data1[3];
-       }
-       if (data1[0] > 32767) {
-           data1[0] = ~data1[0];
-           for (i = 0; i < 4; i++)
-               data1[i] = (data1[i] * (65536 - percent) + data2[i] * percent) >> 16;
-           for (i = 0; i < 16; i++)
-               cols1[i] = (cols1[i] * (65536 - percent) + cols2[i] * percent) >> 16;
-       }
-       *(unsigned int *)cols2 = *(unsigned int *)cols1;
-       a = cols2[3];
-       if (a == 0 && !doblend)
-           continue;
-
-       if (stixs >= 32768) {
-           xo = xs = (stixs ^ 65535) + data1[0];
-           xe = stixe ? stixe + data1[0] : data1[2];
-       } else if (stixe >= 32768) {
-           xs = stixs ? data1[2] - stixs : data1[0];
-           xe = data1[2] - (stixe ^ 65535);
-           xo = xe + 1;
-       } else {
-           xo = xs = stixs;
-           xe = stixe ? stixe : data1[2];
-       }
-       if (stiys >= 32768) {
-           yo = ys = (stiys ^ 65535) + data1[1];
-           ye = stiye ? stiye + data1[1] : data1[3];
-       } else if (stiye >= 32768) {
-           ys = stiys ? data1[3] - stiys : data1[1];
-           ye = data1[3] - (stiye ^ 65535);
-           yo = ye + 1;
-       } else {
-           yo = ys = stiys;
-           ye = stiye ? stiye : data1[3];
-       }
-       xo = 32 - (xo & 31);
-       yo = stin - (yo % stin);
-       if (xs < data1[0])
-           xs = data1[0];
-       if (xe > data1[2])
-           xe = data1[2];
-       if (ys < data1[1])
-           ys = data1[1];
-       if (ye > data1[3])
-           ye = data1[3];
-
-       for (y = ys; y <= ye; y++) {
-           sti = stipple[(y + yo) % stin];
-           x = (xs + xo) & 31;
-           if (x)
-               sti = (sti << x) | (sti >> (32 - x));
-           if (doblend) {
-               if ((p = data1[3] - data1[1]) != 0)
-                   p = ((y - data1[1]) << 16) / p;
-               for (i = 0; i < 8; i++)
-                   cols2[i + 8] = (cols1[i] * (65536 - p) + cols1[i + 8] * p) >> 16;
-           }
-           add = (xs & 1);
-           add ^= (add ^ y) & 1 ? 1 : 3;               /* 2x2 ordered dithering */
-           picp = (unsigned short *)(pic + xs * 2 + y * bytes);
-           for (x = xs; x <= xe; x++) {
-               if (!(sti & 0x80000000)) {
-                   sti <<= 1;
-                   picp++;
-                   add ^= 3;
-                   continue;
-               }
-               sti = (sti << 1) | 1;
-               if (doblend) {
-                   if ((p = data1[2] - data1[0]) != 0)
-                       p = ((x - data1[0]) << 16) / p;
-                   for (i = 0; i < 4; i++)
-                       cols2[i] = (cols2[i + 8] * (65536 - p) + cols2[i + 12] * p) >> 16;
-                   a = cols2[3];
-               }
-               r = cols2[0];
-               g = cols2[1];
-               b = cols2[2];
-               if (a != 255) {
-                   i = *picp;
-                   r = ((i >> 8 & 0xf8) * (255 - a) + r * a) / 255;
-                   g = ((i >> 3 & 0xfc) * (255 - a) + g * a) / 255;
-                   b = ((i << 3 & 0xf8) * (255 - a) + b * a) / 255;
-               }
-  #define CLAMP(x) ((x) >= 256 ? 255 : (x))
-               i = ((CLAMP(r + add*2+1) & 0xf8) <<  8) |
-                   ((CLAMP(g + add    ) & 0xfc) <<  3) |
-                   ((CLAMP(b + add*2+1)       ) >>  3);
-               *picp++ = i;
-               add ^= 3;
-           }
-       }
-    }
-}
-
-static int splash_check_jpeg(unsigned char *jpeg, int width, int height, int depth)
-{
-    int size, err;
-    unsigned char *mem;
-
-    size = ((width + 15) & ~15) * ((height + 15) & ~15) * (depth >> 3);
-    mem = vmalloc(size);
-    if (!mem) {
-       printk(KERN_INFO "bootsplash: no memory for decoded picture.\n");
-       return -1;
-    }
-    if (!decdata)
-       decdata = vmalloc(sizeof(*decdata));
-    if ((err = jpeg_decode(jpeg, mem, ((width + 15) & ~15), ((height + 15) & ~15), depth, decdata)))
-         printk(KERN_INFO "bootsplash: error while decompressing picture: %s (%d)\n",jpg_errors[err - 1], err);
-    vfree(mem);
-    return err ? -1 : 0;
-}
-
-static void splash_free(struct vc_data *vc, struct fb_info *info)
-{
-    if (!vc->vc_splash_data)
-       return;
-    if (info->silent_screen_base)
-           info->screen_base = info->silent_screen_base;
-    info->silent_screen_base = 0;
-    if (vc->vc_splash_data->splash_silentjpeg)
-           vfree(vc->vc_splash_data->splash_sboxes);
-    vfree(vc->vc_splash_data);
-    vc->vc_splash_data = 0;
-    info->splash_data = 0;
-}
-
-static int splash_mkpenguin(struct splash_data *data, int pxo, int pyo, int pwi, int phe, int pr, int pg, int pb)
-{
-    unsigned char *buf;
-    int i;
-
-    if (pwi ==0 || phe == 0)
-       return 0;
-    buf = (unsigned char *)data + sizeof(*data);
-    pwi += pxo - 1;
-    phe += pyo - 1;
-    *buf++ = pxo;
-    *buf++ = pxo >> 8;
-    *buf++ = pyo;
-    *buf++ = pyo >> 8;
-    *buf++ = pwi;
-    *buf++ = pwi >> 8;
-    *buf++ = phe;
-    *buf++ = phe >> 8;
-    *buf++ = pr;
-    *buf++ = pg;
-    *buf++ = pb;
-    *buf++ = 0;
-    for (i = 0; i < 12; i++, buf++)
-       *buf = buf[-12];
-    buf[-24] ^= 0xff;
-    buf[-23] ^= 0xff;
-    buf[-1] = 0xff;
-    return 2;
-}
-
-static const int splash_offsets[3][16] = {
-    /* len, unit, size, state, fgcol, col, xo, yo, wi, he
-       boxcnt, ssize, sboxcnt, percent, overok, palcnt */
-    /* V1 */
-    {   20,   -1,   16,    -1,    -1,  -1,  8, 10, 12, 14,
-           -1,    -1,      -1,      -1,     -1,     -1 },
-    /* V2 */
-    {   35,    8,   12,     9,    10,  11, 16, 18, 20, 22,
-           -1,    -1,      -1,      -1,     -1,     -1 },
-    /* V3 */
-    {   38,    8,   12,     9,    10,  11, 16, 18, 20, 22,
-           24,    28,      32,      34,     36,     37 },
-};
-
-#define SPLASH_OFF_LEN     offsets[0]
-#define SPLASH_OFF_UNIT    offsets[1]
-#define SPLASH_OFF_SIZE    offsets[2]
-#define SPLASH_OFF_STATE   offsets[3]
-#define SPLASH_OFF_FGCOL   offsets[4]
-#define SPLASH_OFF_COL     offsets[5]
-#define SPLASH_OFF_XO      offsets[6]
-#define SPLASH_OFF_YO      offsets[7]
-#define SPLASH_OFF_WI      offsets[8]
-#define SPLASH_OFF_HE      offsets[9]
-#define SPLASH_OFF_BOXCNT  offsets[10]
-#define SPLASH_OFF_SSIZE   offsets[11]
-#define SPLASH_OFF_SBOXCNT offsets[12]
-#define SPLASH_OFF_PERCENT offsets[13]
-#define SPLASH_OFF_OVEROK  offsets[14]
-#define SPLASH_OFF_PALCNT  offsets[15]
-
-static inline int splash_getb(unsigned char *pos, int off)
-{
-    return off == -1 ? 0 : pos[off];
-}
-
-static inline int splash_gets(unsigned char *pos, int off)
-{
-    return off == -1 ? 0 : pos[off] | pos[off + 1] << 8;
-}
-
-static inline int splash_geti(unsigned char *pos, int off)
-{
-    return off == -1 ? 0 :
-           pos[off] | pos[off + 1] << 8 | pos[off + 2] << 16 | pos[off + 3] << 24;
-}
-
-static int splash_getraw(unsigned char *start, unsigned char *end)
-{
-    unsigned char *ndata;
-    int version;
-    int splash_size;
-    int unit;
-    int width, height;
-    int silentsize;
-    int boxcnt;
-    int sboxcnt;
-    int palcnt;
-    int i, len;
-    const int *offsets;
-    struct vc_data *vc;
-    struct fb_info *info;
-    struct splash_data *sd;
-
-    printk(KERN_INFO "bootsplash %s: looking for picture...", SPLASH_VERSION);
-
-    for (ndata = start; ndata < end; ndata++) {
-       if (ndata[0] != 'B' || ndata[1] != 'O' || ndata[2] != 'O' || ndata[3] != 'T')
-           continue;
-       if (ndata[4] != 'S' || ndata[5] != 'P' || ndata[6] != 'L' || ndata[7] < '1' || ndata[7] > '3')
-           continue;
-       printk(".");
-       version = ndata[7] - '0';
-       offsets = splash_offsets[version - 1];
-       len = SPLASH_OFF_LEN;
-       unit = splash_getb(ndata, SPLASH_OFF_UNIT);
-       if (unit >= MAX_NR_CONSOLES)
-           continue;
-       if (unit)
-           vc_allocate(unit);
-       vc = vc_cons[unit].d;
-       info = registered_fb[(int)con2fb_map[unit]];
-       width = info->var.xres;
-       height = info->var.yres;
-       splash_size = splash_geti(ndata, SPLASH_OFF_SIZE);
-       if (splash_size == (int)0xffffffff && version > 1) {
-           printk(" found, updating values.\n");
-           if ((sd = vc->vc_splash_data) != 0) {
-               i = splash_getb(ndata, SPLASH_OFF_STATE);
-               if (i != 255)
-                   sd->splash_state = i;
-               i = splash_getb(ndata, SPLASH_OFF_FGCOL);
-               if (i != 255)
-                   sd->splash_fg_color = i;
-               i = splash_getb(ndata, SPLASH_OFF_COL);
-               if (i != 255)
-                   sd->splash_color = i;
-           }
-           return unit;
-       }
-       if (splash_size == 0) {
-           printk(" found, freeing memory.\n");
-           if (vc->vc_splash_data)
-               splash_free(vc, info);
-           return unit;
-       }
-       boxcnt = splash_gets(ndata, SPLASH_OFF_BOXCNT);
-       palcnt = 3 * splash_getb(ndata, SPLASH_OFF_PALCNT);
-       if (ndata + len + splash_size > end) {
-           printk(" found, but truncated!\n");
-           return -1;
-       }
-       if (!jpeg_check_size(ndata + len + boxcnt * 12 + palcnt, width, height)) {
-           ndata += len + splash_size - 1;
-           continue;
-       }
-       if (splash_check_jpeg(ndata + len + boxcnt * 12 + palcnt, width, height, info->var.bits_per_pixel))
-           return -1;
-       silentsize = splash_geti(ndata, SPLASH_OFF_SSIZE);
-       if (silentsize)
-           printk(" silentjpeg size %d bytes,", silentsize);
-       if (silentsize >= splash_size) {
-           printk(" bigger than splashsize!\n");
-           return -1;
-       }
-       splash_size -= silentsize;
-       if (!splash_usesilent)
-           silentsize = 0;
-       else if (height * 2 * info->fix.line_length > info->fix.smem_len) {
-           printk(" does not fit into framebuffer.\n");
-           silentsize = 0;
-       }
-       sboxcnt = splash_gets(ndata, SPLASH_OFF_SBOXCNT);
-       if (silentsize) {
-           unsigned char *simage = ndata + len + splash_size + 12 * sboxcnt;
-           if (!jpeg_check_size(simage, width, height) ||
-               splash_check_jpeg(simage, width, height, info->var.bits_per_pixel)) {
-                   printk(" error in silent jpeg.\n");
-                   silentsize = 0;
-               }
-       }
-       if (vc->vc_splash_data)
-           splash_free(vc, info);
-       vc->vc_splash_data = sd = vmalloc(sizeof(*sd) + splash_size + (version < 3 ? 2 * 12 : 0));
-       if (!sd)
-           break;
-       sd->splash_silentjpeg = 0;
-       sd->splash_sboxes = 0;
-       sd->splash_sboxcount = 0;
-       if (silentsize) {
-           sd->splash_silentjpeg = vmalloc(silentsize);
-           if (sd->splash_silentjpeg) {
-               memcpy(sd->splash_silentjpeg, ndata + len + splash_size, silentsize);
-               sd->splash_sboxes = vc->vc_splash_data->splash_silentjpeg;
-               sd->splash_silentjpeg += 12 * sboxcnt;
-               sd->splash_sboxcount = sboxcnt;
-           }
-       }
-       sd->splash_state = splash_getb(ndata, SPLASH_OFF_STATE);
-       sd->splash_fg_color = splash_getb(ndata, SPLASH_OFF_FGCOL);
-       sd->splash_color = splash_getb(ndata, SPLASH_OFF_COL);
-       sd->splash_overpaintok = splash_getb(ndata, SPLASH_OFF_OVEROK);
-       sd->splash_text_xo = splash_gets(ndata, SPLASH_OFF_XO);
-       sd->splash_text_yo = splash_gets(ndata, SPLASH_OFF_YO);
-       sd->splash_text_wi = splash_gets(ndata, SPLASH_OFF_WI);
-       sd->splash_text_he = splash_gets(ndata, SPLASH_OFF_HE);
-       sd->splash_percent = splash_gets(ndata, SPLASH_OFF_PERCENT);
-       if (version == 1) {
-           sd->splash_text_xo *= 8;
-           sd->splash_text_wi *= 8;
-           sd->splash_text_yo *= 16;
-           sd->splash_text_he *= 16;
-           sd->splash_color    = (splash_default >> 8) & 0x0f;
-           sd->splash_fg_color = (splash_default >> 4) & 0x0f;
-           sd->splash_state    = splash_default & 1;
-       }
-       if (sd->splash_text_xo + sd->splash_text_wi > width || sd->splash_text_yo + sd->splash_text_he > height) {
-           splash_free(vc, info);
-           printk(" found, but has oversized text area!\n");
-           return -1;
-       }
-       if (!vc_cons[unit].d || info->fbops != &vesafb_ops) {
-           splash_free(vc, info);
-           printk(" found, but framebuffer can't handle it!\n");
-           return -1;
-       }
-       printk(" found (%dx%d, %d bytes, v%d).\n", width, height, splash_size, version);
-       if (version == 1) {
-           printk(KERN_WARNING "bootsplash: Using deprecated v1 header. Updating your splash utility recommended.\n");
-           printk(KERN_INFO    "bootsplash: Find the latest version at http://www.bootsplash.org/\n");
-       }
-
-       /* fake penguin box for older formats */
-       if (version == 1)
-           boxcnt = splash_mkpenguin(sd, sd->splash_text_xo + 10, sd->splash_text_yo + 10, sd->splash_text_wi - 20, sd->splash_text_he - 20, 0xf0, 0xf0, 0xf0);
-       else if (version == 2)
-           boxcnt = splash_mkpenguin(sd, splash_gets(ndata, 24), splash_gets(ndata, 26), splash_gets(ndata, 28), splash_gets(ndata, 30), splash_getb(ndata, 32), splash_getb(ndata, 33), splash_getb(ndata, 34));
-
-       memcpy((char *)sd + sizeof(*sd) + (version < 3 ? boxcnt * 12 : 0), ndata + len, splash_size);
-       sd->splash_boxcount = boxcnt;
-       sd->splash_boxes = (unsigned char *)sd + sizeof(*sd);
-       sd->splash_palette = sd->splash_boxes + boxcnt * 12;
-       sd->splash_jpeg = sd->splash_palette + palcnt;
-       sd->splash_palcnt = palcnt / 3;
-       sd->splash_dosilent = sd->splash_silentjpeg != 0;
-       return unit;
-    }
-    printk(" no good signature found.\n");
-    return -1;
-}
-
-int splash_verbose(void) 
-{
-    struct vc_data *vc;
-    struct fb_info *info;
-
-    if (!splash_usesilent)
-        return 0;
-
-    vc = vc_cons[0].d;
-
-    if (!vc || !vc->vc_splash_data || !vc->vc_splash_data->splash_state)
-       return 0;
-    if (fg_console != vc->vc_num)
-       return 0;
-    if (!vc->vc_splash_data->splash_silentjpeg || !vc->vc_splash_data->splash_dosilent)
-       return 0;
-    vc->vc_splash_data->splash_dosilent = 0;
-    info = registered_fb[(int)con2fb_map[0]];
-    if (!info->silent_screen_base)
-       return 0;
-    splashcopy(info->silent_screen_base, info->screen_base, info->var.yres, info->var.xres, info->fix.line_length, info->fix.line_length);
-    info->screen_base = info->silent_screen_base;
-    info->silent_screen_base = 0;
-    return 1;
-}
-
-static void splash_off(struct fb_info *info)
-{
-       if (info->silent_screen_base)
-               info->screen_base = info->silent_screen_base;
-       info->silent_screen_base = 0;
-       info->splash_data = 0;
-       if (info->splash_pic)
-               vfree(info->splash_pic);
-       info->splash_pic = 0;
-       info->splash_pic_size = 0;
-}
-
-int splash_prepare(struct vc_data *vc, struct fb_info *info)
-{
-       int err;
-        int width, height, depth, size, sbytes;
-
-       if (!vc->vc_splash_data || !vc->vc_splash_data->splash_state) {
-               if (decdata)
-                       vfree(decdata);
-               decdata = 0;
-               splash_off(info);
-               return -1;
-       }
-
-        width = info->var.xres;
-        height = info->var.yres;
-        depth = info->var.bits_per_pixel;
-       if (depth != 16) {      /* Other targets might need fixing */
-               splash_off(info);
-               return -2;
-       }
-
-       sbytes = ((width + 15) & ~15) * (depth >> 3);
-       size = sbytes * ((height + 15) & ~15);
-       if (size != info->splash_pic_size)
-               splash_off(info);
-       if (!info->splash_pic)
-               info->splash_pic = vmalloc(size);
-
-       if (!info->splash_pic) {
-               printk(KERN_INFO "bootsplash: not enough memory.\n");
-               splash_off(info);
-               return -3;
-       }
-
-       if (!decdata)
-               decdata = vmalloc(sizeof(*decdata));
-
-       if (vc->vc_splash_data->splash_silentjpeg && vc->vc_splash_data->splash_dosilent) {
-               /* fill area after framebuffer with other jpeg */
-               if ((err = jpeg_decode(vc->vc_splash_data->splash_silentjpeg, info->splash_pic, 
-                        ((width + 15) & ~15), ((height + 15) & ~15), depth, decdata))) {
-                       printk(KERN_INFO "bootsplash: error while decompressing silent picture: %s (%d)\n", jpg_errors[err - 1], err);
-                       if (info->silent_screen_base)
-                               info->screen_base = info->silent_screen_base;
-                       vc->vc_splash_data->splash_dosilent = 0;
-               } else {
-                       if (vc->vc_splash_data->splash_sboxcount)
-                               boxit(info->splash_pic, sbytes, vc->vc_splash_data->splash_sboxes, 
-                                       vc->vc_splash_data->splash_sboxcount, vc->vc_splash_data->splash_percent, 0);
-
-                       if (!info->silent_screen_base)
-                               info->silent_screen_base = info->screen_base;
-                       splashcopy(info->silent_screen_base, info->splash_pic, info->var.yres, info->var.xres, info->fix.line_length, sbytes);
-                       info->screen_base = info->silent_screen_base + info->fix.line_length * info->var.yres;
-               }
-       } else if (info->silent_screen_base)
-               info->screen_base = info->silent_screen_base;
-
-       if ((err = jpeg_decode(vc->vc_splash_data->splash_jpeg, info->splash_pic, 
-                ((width + 15) & ~15), ((height + 15) & ~15), depth, decdata))) {
-               printk(KERN_INFO "bootsplash: error while decompressing picture: %s (%d) .\n", jpg_errors[err - 1], err);
-               splash_off(info);
-               return -4;
-       }
-       info->splash_pic_size = size;
-       info->splash_bytes = sbytes;
-       if (vc->vc_splash_data->splash_boxcount)
-               boxit(info->splash_pic, sbytes, vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount, vc->vc_splash_data->splash_percent, 0);
-       if (vc->vc_splash_data->splash_state)
-               info->splash_data = vc->vc_splash_data;
-       else
-               splash_off(info);
-       return 0;
-}
-
-
-#ifdef CONFIG_PROC_FS
-
-#include <linux/proc_fs.h>
-
-static int splash_read_proc(char *buffer, char **start, off_t offset, int size,
-                       int *eof, void *data);
-static int splash_write_proc(struct file *file, const char *buffer,
-                       unsigned long count, void *data);
-static int splash_status(struct vc_data *vc);
-static int splash_recolor(struct vc_data *vc);
-static int splash_proc_register(void);
-
-static struct proc_dir_entry *proc_splash;
-
-static int splash_recolor(struct vc_data *vc)
-{
-       if (!vc->vc_splash_data)
-           return -1;
-       if (!vc->vc_splash_data->splash_state)
-           return 0;
-       con_remap_def_color(vc->vc_num, vc->vc_splash_data->splash_color << 4 | vc->vc_splash_data->splash_fg_color);
-       if (fg_console == vc->vc_num) {
-               update_region(fg_console,
-                             vc->vc_origin + vc->vc_size_row * vc->vc_top,
-                             vc->vc_size_row * (vc->vc_bottom - vc->vc_top) / 2);
-       }
-       return 0;
-}
-
-static int splash_status(struct vc_data *vc)
-{
-       struct fb_info *info;
-       printk(KERN_INFO "bootsplash: status on console %d changed to %s\n", vc->vc_num, vc->vc_splash_data && vc->vc_splash_data->splash_state ? "on" : "off");
-
-       info = registered_fb[(int) con2fb_map[vc->vc_num]];
-       if (fg_console == vc->vc_num)
-               splash_prepare(vc, info);
-       if (vc->vc_splash_data && vc->vc_splash_data->splash_state) {
-               con_remap_def_color(vc->vc_num, vc->vc_splash_data->splash_color << 4 | vc->vc_splash_data->splash_fg_color);
-               /* vc_resize also calls con_switch which resets yscroll */
-               vc_resize(vc->vc_num, vc->vc_splash_data->splash_text_wi / vc->vc_font.width, vc->vc_splash_data->splash_text_he / vc->vc_font.height);
-               if (fg_console == vc->vc_num) {
-                       update_region(fg_console,
-                                     vc->vc_origin + vc->vc_size_row * vc->vc_top,
-                                     vc->vc_size_row * (vc->vc_bottom - vc->vc_top) / 2);
-                       splash_clear_margins(vc->vc_splash_data, vc, info, 0);
-               }
-       } else {
-               /* Switch bootsplash off */
-               con_remap_def_color(vc->vc_num, 0x07);
-               vc_resize(vc->vc_num, info->var.xres / vc->vc_font.width, info->var.yres / vc->vc_font.height);
-       }
-       return 0;
-}
-
-static int splash_read_proc(char *buffer, char **start, off_t offset, int size,
-                       int *eof, void *data)
-{
-       int len = 0;
-       off_t begin = 0;
-       struct vc_data *vc = vc_cons[0].d;
-       struct fb_info *info = registered_fb[(int)con2fb_map[0]];
-       int color = vc->vc_splash_data ? vc->vc_splash_data->splash_color << 4 |
-                       vc->vc_splash_data->splash_fg_color : splash_default >> 4;
-       int status = vc->vc_splash_data ? vc->vc_splash_data->splash_state & 1 : 0;
-       len += sprintf(buffer + len, "Splash screen v%s (0x%02x, %dx%d%s): %s\n",
-                       SPLASH_VERSION, color, info->var.xres, info->var.yres,
-                       (vc->vc_splash_data ?  vc->vc_splash_data->splash_dosilent : 0)? ", silent" : "",
-                                       status ? "on" : "off");
-       if (offset >= begin + len)
-               return 0;
-
-       *start = buffer + (begin - offset);
-
-       return (size < begin + len - offset ? size : begin + len - offset);
-}
-
-static int splash_write_proc(struct file *file, const char *buffer,
-                     unsigned long count, void *data)
-{
-        int new, unit;
-       struct vc_data *vc;
-       
-       if (!buffer || !splash_default)
-               return count;
-
-       if (!strncmp(buffer, "show", 4) || !strncmp(buffer, "hide", 4)) {
-               int pe, oldpe;
-
-               vc = vc_cons[0].d;
-               if (buffer[4] == ' ' && buffer[5] == 'p')
-                       pe = 0;
-               else if (buffer[4] == '\n')
-                       pe = 65535;
-               else
-                       pe = simple_strtoul(buffer + 5, NULL, 0);
-               if (pe < 0)
-                       pe = 0;
-               if (pe > 65535)
-                       pe = 65535;
-               if (*buffer == 'h')
-                       pe = 65535 - pe;
-               pe += pe > 32767;
-               if (vc->vc_splash_data && vc->vc_splash_data->splash_percent != pe) {
-                       struct fb_info *info;
-
-                       oldpe = vc->vc_splash_data->splash_percent;
-                       vc->vc_splash_data->splash_percent = pe;
-                       if (fg_console != 0 || !vc->vc_splash_data->splash_state)
-                           return count;
-                       info = registered_fb[(int) con2fb_map[vc->vc_num]];
-                       if (!vc->vc_splash_data->splash_overpaintok || pe == 65536 || pe < oldpe) {
-                               if (splash_hasinter(vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount))
-                                       splash_status(vc);
-                               else
-                                       splash_prepare(vc, info);
-                       } else {
-                               if (vc->vc_splash_data->splash_silentjpeg && vc->vc_splash_data->splash_dosilent && info->silent_screen_base)
-                                       boxit(info->silent_screen_base, info->fix.line_length, vc->vc_splash_data->splash_sboxes, vc->vc_splash_data->splash_sboxcount, vc->vc_splash_data->splash_percent, 1);
-                               boxit(info->screen_base, info->fix.line_length, vc->vc_splash_data->splash_boxes, vc->vc_splash_data->splash_boxcount, vc->vc_splash_data->splash_percent, 1);
-                       }
-               }
-               return count;
-       }
-       if (!strncmp(buffer,"silent\n",7) || !strncmp(buffer,"verbose\n",8)) {
-               vc = vc_cons[0].d;
-               if (vc->vc_splash_data && vc->vc_splash_data->splash_silentjpeg) {
-                   if (vc->vc_splash_data->splash_dosilent != (buffer[0] == 's')) {
-                       vc->vc_splash_data->splash_dosilent = buffer[0] == 's';
-                       splash_status(vc);
-                   }
-               }
-               return count;
-       }
-       if (!strncmp(buffer,"freesilent\n",11)) {
-               vc = vc_cons[0].d;
-               if (vc->vc_splash_data && vc->vc_splash_data->splash_silentjpeg) {
-                   printk(KERN_INFO "bootsplash: freeing silent jpeg\n");
-                   vc->vc_splash_data->splash_silentjpeg = 0;
-                   vfree(vc->vc_splash_data->splash_sboxes);
-                   vc->vc_splash_data->splash_sboxes = 0;
-                   vc->vc_splash_data->splash_sboxcount = 0;
-                   if (vc->vc_splash_data->splash_dosilent)
-                       splash_status(vc);
-                   vc->vc_splash_data->splash_dosilent = 0;
-               }
-               return count;
-       }
-
-       if (!strncmp(buffer, "BOOTSPL", 7)) {
-           unit = splash_getraw((unsigned char *)buffer, (unsigned char *)buffer + count);
-           if (unit >= 0) {
-               vc = vc_cons[unit].d;
-               splash_status(vc);
-           }
-           return count;
-       }
-       vc = vc_cons[0].d;
-       if (!vc->vc_splash_data)
-               return count;
-       if (buffer[0] == 't') {
-               vc->vc_splash_data->splash_state ^= 1;
-               splash_status(vc);
-               return count;
-       }
-       new = simple_strtoul(buffer, NULL, 0);
-       if (new > 1) {
-               /* expert user */
-               vc->vc_splash_data->splash_color    = new >> 8 & 0xff;
-               vc->vc_splash_data->splash_fg_color = new >> 4 & 0x0f;
-       }
-       if ((new & 1) == vc->vc_splash_data->splash_state)
-               splash_recolor(vc);
-       else {
-               vc->vc_splash_data->splash_state = new & 1;
-               splash_status(vc);
-       }
-       return count;
-}
-
-static int splash_proc_register(void)
-{
-       if ((proc_splash = create_proc_entry("splash", 0, 0))) {
-               proc_splash->read_proc = splash_read_proc;
-               proc_splash->write_proc = splash_write_proc;
-               return 0;
-       }
-       return 1;
-}
-
-# if 0
-static int splash_proc_unregister(void)
-{
-       if (proc_splash)
-               remove_proc_entry("splash", 0);
-       return 0;
-}
-# endif
-#endif /* CONFIG_PROC_FS */
-
-asmlinkage long sys_lseek(int fd, off_t offset, unsigned int origin);
-asmlinkage long sys_read(int fd, char *buf, size_t count);
-asmlinkage long sys_unlink(const char *name);
-
-void splash_init(void)
-{
-       struct fb_info *info;
-       struct vc_data *vc;
-       int isramfs = 1;
-       int fd;
-       int len;
-       char *mem;
-
-       if (splash_registered)
-               return;
-       vc = vc_cons[0].d;
-       info = registered_fb[0];
-       if (!vc || !info || info->var.bits_per_pixel != 16)
-               return;
-#ifdef CONFIG_PROC_FS
-       splash_proc_register();
-#endif
-       splash_registered = 1;
-       if (vc->vc_splash_data)
-               return;
-       if ((fd = sys_open("/bootsplash", O_RDONLY, 0)) < 0) {
-               isramfs = 0;
-               fd = sys_open("/initrd.image", O_RDONLY, 0);
-       }
-       if (fd < 0)
-               return;
-       if ((len = (int)sys_lseek(fd, (off_t)0, 2)) <= 0) {
-               sys_close(fd);
-               return;
-       }
-       sys_lseek(fd, (off_t)0, 0);
-       mem = vmalloc(len);
-       if (mem) {
-               if ((int)sys_read(fd, mem, len) == len && splash_getraw((unsigned char *)mem, (unsigned char *)mem + len) == 0 && vc->vc_splash_data)
-                       vc->vc_splash_data->splash_state = splash_default & 1;
-               vfree(mem);
-       }
-       sys_close(fd);
-       if (isramfs)
-               sys_unlink("/bootsplash");
-       return;
-}
-
diff --git a/drivers/video/bootsplash/bootsplash.h b/drivers/video/bootsplash/bootsplash.h
deleted file mode 100644 (file)
index be741cc..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-/* 
- *    linux/drivers/video/bootsplash/bootsplash.h - splash screen definition.
- *     
- *     (w) 2001-2003 by Volker Poplawski, <volker@poplawski.de>
- *                 Stefan Reinauer, <stepan@suse.de>
- *                 
- *                 
- *     idea and SuSE screen work by Ken Wimer, <wimer@suse.de>
- */
-
-#ifndef __BOOTSPLASH_H
-#define __BOOTSPLASH_H
-
-struct fb_info;
-
-/* splash.c */
-extern int splash_prepare(struct vc_data *, struct fb_info *);
-extern void splash_init(void);
-
-/* splash_render.c */
-extern void splash_putcs(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
-                       const unsigned short *s, int count, int ypos, int xpos);
-extern void splash_putc(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
-                       int c, int ypos, int xpos);
-extern void splashcopy(u8 *dst, u8 *src, int height, int width, int dstbytes, int srcbytes);
-extern void splash_clear(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy,
-                       int sx, int height, int width);
-extern void splash_bmove(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy, 
-                       int sx, int dy, int dx, int height, int width);
-extern void splash_clear_margins(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
-                       int bottom_only);
-extern void splash_cursor(struct splash_data *sd, struct fb_info *info, struct fb_cursor *cursor);
-extern void splash_bmove_redraw(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
-                       int y, int sx, int dx, int width);
-extern void splash_blank(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
-                       int blank);
-
-/* vt.c */
-extern void con_remap_def_color(int currcons, int new_color);
-
-#endif
diff --git a/drivers/video/bootsplash/decode-jpg.c b/drivers/video/bootsplash/decode-jpg.c
deleted file mode 100644 (file)
index 5f38085..0000000
+++ /dev/null
@@ -1,958 +0,0 @@
-/* 
- *    linux/drivers/video/bootsplash/decode-jpg.c - a tiny jpeg decoder.
- *      
- *      (w) August 2001 by Michael Schroeder, <mls@suse.de>
- *                  
- */
-
-#include <linux/config.h>
-#include <linux/string.h>
-#include <asm/byteorder.h>
-
-#include "decode-jpg.h"
-
-#define ISHIFT 11
-
-#define IFIX(a) ((int)((a) * (1 << ISHIFT) + .5))
-#define IMULT(a, b) (((a) * (b)) >> ISHIFT)
-#define ITOINT(a) ((a) >> ISHIFT)
-
-#ifndef __P
-# define __P(x) x
-#endif
-
-/* special markers */
-#define M_BADHUFF      -1
-#define M_EOF          0x80
-
-struct in {
-       unsigned char *p;
-       unsigned int bits;
-       int left;
-       int marker;
-
-       int (*func) __P((void *));
-       void *data;
-};
-
-/*********************************/
-struct dec_hufftbl;
-struct enc_hufftbl;
-
-union hufftblp {
-       struct dec_hufftbl *dhuff;
-       struct enc_hufftbl *ehuff;
-};
-
-struct scan {
-       int dc;                 /* old dc value */
-
-       union hufftblp hudc;
-       union hufftblp huac;
-       int next;               /* when to switch to next scan */
-
-       int cid;                /* component id */
-       int hv;                 /* horiz/vert, copied from comp */
-       int tq;                 /* quant tbl, copied from comp */
-};
-
-/*********************************/
-
-#define DECBITS 10             /* seems to be the optimum */
-
-struct dec_hufftbl {
-       int maxcode[17];
-       int valptr[16];
-       unsigned char vals[256];
-       unsigned int llvals[1 << DECBITS];
-};
-
-static void decode_mcus __P((struct in *, int *, int, struct scan *, int *));
-static int dec_readmarker __P((struct in *));
-static void dec_makehuff __P((struct dec_hufftbl *, int *, unsigned char *));
-
-static void setinput __P((struct in *, unsigned char *));
-/*********************************/
-
-#undef PREC
-#define PREC int
-
-static void idctqtab __P((unsigned char *, PREC *));
-static void idct __P((int *, int *, PREC *, PREC, int));
-static void scaleidctqtab __P((PREC *, PREC));
-
-/*********************************/
-
-static void initcol __P((PREC[][64]));
-
-static void col221111 __P((int *, unsigned char *, int));
-static void col221111_16 __P((int *, unsigned char *, int));
-
-/*********************************/
-
-#define M_SOI  0xd8
-#define M_APP0 0xe0
-#define M_DQT  0xdb
-#define M_SOF0 0xc0
-#define M_DHT   0xc4
-#define M_DRI  0xdd
-#define M_SOS  0xda
-#define M_RST0 0xd0
-#define M_EOI  0xd9
-#define M_COM  0xfe
-
-static unsigned char *datap;
-
-static int getbyte(void)
-{
-       return *datap++;
-}
-
-static int getword(void)
-{
-       int c1, c2;
-       c1 = *datap++;
-       c2 = *datap++;
-       return c1 << 8 | c2;
-}
-
-struct comp {
-       int cid;
-       int hv;
-       int tq;
-};
-
-#define MAXCOMP 4
-struct jpginfo {
-       int nc;                 /* number of components */
-       int ns;                 /* number of scans */
-       int dri;                /* restart interval */
-       int nm;                 /* mcus til next marker */
-       int rm;                 /* next restart marker */
-};
-
-static struct jpginfo info;
-static struct comp comps[MAXCOMP];
-
-static struct scan dscans[MAXCOMP];
-
-static unsigned char quant[4][64];
-
-static struct dec_hufftbl dhuff[4];
-
-#define dec_huffdc (dhuff + 0)
-#define dec_huffac (dhuff + 2)
-
-static struct in in;
-
-static int readtables(int till)
-{
-       int m, l, i, j, lq, pq, tq;
-       int tc, th, tt;
-
-       for (;;) {
-               if (getbyte() != 0xff)
-                       return -1;
-               if ((m = getbyte()) == till)
-                       break;
-
-               switch (m) {
-               case 0xc2:
-                       return 0;
-
-               case M_DQT:
-                       lq = getword();
-                       while (lq > 2) {
-                               pq = getbyte();
-                               tq = pq & 15;
-                               if (tq > 3)
-                                       return -1;
-                               pq >>= 4;
-                               if (pq != 0)
-                                       return -1;
-                               for (i = 0; i < 64; i++)
-                                       quant[tq][i] = getbyte();
-                               lq -= 64 + 1;
-                       }
-                       break;
-
-               case M_DHT:
-                       l = getword();
-                       while (l > 2) {
-                               int hufflen[16], k;
-                               unsigned char huffvals[256];
-
-                               tc = getbyte();
-                               th = tc & 15;
-                               tc >>= 4;
-                               tt = tc * 2 + th;
-                               if (tc > 1 || th > 1)
-                                       return -1;
-                               for (i = 0; i < 16; i++)
-                                       hufflen[i] = getbyte();
-                               l -= 1 + 16;
-                               k = 0;
-                               for (i = 0; i < 16; i++) {
-                                       for (j = 0; j < hufflen[i]; j++)
-                                               huffvals[k++] = getbyte();
-                                       l -= hufflen[i];
-                               }
-                               dec_makehuff(dhuff + tt, hufflen,
-                                            huffvals);
-                       }
-                       break;
-
-               case M_DRI:
-                       l = getword();
-                       info.dri = getword();
-                       break;
-
-               default:
-                       l = getword();
-                       while (l-- > 2)
-                               getbyte();
-                       break;
-               }
-       }
-       return 0;
-}
-
-static void dec_initscans(void)
-{
-       int i;
-
-       info.nm = info.dri + 1;
-       info.rm = M_RST0;
-       for (i = 0; i < info.ns; i++)
-               dscans[i].dc = 0;
-}
-
-static int dec_checkmarker(void)
-{
-       int i;
-
-       if (dec_readmarker(&in) != info.rm)
-               return -1;
-       info.nm = info.dri;
-       info.rm = (info.rm + 1) & ~0x08;
-       for (i = 0; i < info.ns; i++)
-               dscans[i].dc = 0;
-       return 0;
-}
-
-int jpeg_check_size(unsigned char *buf, int width, int height)
-{
-       datap = buf;
-       getbyte(); 
-       getbyte(); 
-       readtables(M_SOF0);
-       getword();
-       getbyte();
-        if (height != getword() || width != getword())
-               return 0;
-        return 1;
-}
-
-int jpeg_decode(buf, pic, width, height, depth, decdata)
-unsigned char *buf, *pic;
-int width, height, depth;
-struct jpeg_decdata *decdata;
-{
-       int i, j, m, tac, tdc;
-       int mcusx, mcusy, mx, my;
-       int max[6];
-
-       if (!decdata)
-               return -1;
-       datap = buf;
-       if (getbyte() != 0xff)
-               return ERR_NO_SOI;
-       if (getbyte() != M_SOI)
-               return ERR_NO_SOI;
-       if (readtables(M_SOF0))
-               return ERR_BAD_TABLES;
-       getword();
-       i = getbyte();
-       if (i != 8)
-               return ERR_NOT_8BIT;
-       if (((getword() + 15) & ~15) != height)
-               return ERR_HEIGHT_MISMATCH;
-       if (((getword() + 15) & ~15) != width)
-               return ERR_WIDTH_MISMATCH;
-       if ((height & 15) || (width & 15))
-               return ERR_BAD_WIDTH_OR_HEIGHT;
-       info.nc = getbyte();
-       if (info.nc > MAXCOMP)
-               return ERR_TOO_MANY_COMPPS;
-       for (i = 0; i < info.nc; i++) {
-               int h, v;
-               comps[i].cid = getbyte();
-               comps[i].hv = getbyte();
-               v = comps[i].hv & 15;
-               h = comps[i].hv >> 4;
-               comps[i].tq = getbyte();
-               if (h > 3 || v > 3)
-                       return ERR_ILLEGAL_HV;
-               if (comps[i].tq > 3)
-                       return ERR_QUANT_TABLE_SELECTOR;
-       }
-       if (readtables(M_SOS))
-               return ERR_BAD_TABLES;
-       getword();
-       info.ns = getbyte();
-       if (info.ns != 3)
-               return ERR_NOT_YCBCR_221111;
-       for (i = 0; i < 3; i++) {
-               dscans[i].cid = getbyte();
-               tdc = getbyte();
-               tac = tdc & 15;
-               tdc >>= 4;
-               if (tdc > 1 || tac > 1)
-                       return ERR_QUANT_TABLE_SELECTOR;
-               for (j = 0; j < info.nc; j++)
-                       if (comps[j].cid == dscans[i].cid)
-                               break;
-               if (j == info.nc)
-                       return ERR_UNKNOWN_CID_IN_SCAN;
-               dscans[i].hv = comps[j].hv;
-               dscans[i].tq = comps[j].tq;
-               dscans[i].hudc.dhuff = dec_huffdc + tdc;
-               dscans[i].huac.dhuff = dec_huffac + tac;
-       }
-       
-       i = getbyte();
-       j = getbyte();
-       m = getbyte();
-       
-       if (i != 0 || j != 63 || m != 0)
-               return ERR_NOT_SEQUENTIAL_DCT;
-       
-       if (dscans[0].cid != 1 || dscans[1].cid != 2 || dscans[2].cid != 3)
-               return ERR_NOT_YCBCR_221111;
-
-       if (dscans[0].hv != 0x22 || dscans[1].hv != 0x11 || dscans[2].hv != 0x11)
-               return ERR_NOT_YCBCR_221111;
-
-       mcusx = width >> 4;
-       mcusy = height >> 4;
-
-
-       idctqtab(quant[dscans[0].tq], decdata->dquant[0]);
-       idctqtab(quant[dscans[1].tq], decdata->dquant[1]);
-       idctqtab(quant[dscans[2].tq], decdata->dquant[2]);
-       initcol(decdata->dquant);
-       setinput(&in, datap);
-
-#if 0
-       /* landing zone */
-       img[len] = 0;
-       img[len + 1] = 0xff;
-       img[len + 2] = M_EOF;
-#endif
-
-       dec_initscans();
-
-       dscans[0].next = 6 - 4;
-       dscans[1].next = 6 - 4 - 1;
-       dscans[2].next = 6 - 4 - 1 - 1; /* 411 encoding */
-       for (my = 0; my < mcusy; my++) {
-               for (mx = 0; mx < mcusx; mx++) {
-                       if (info.dri && !--info.nm)
-                               if (dec_checkmarker())
-                                       return ERR_WRONG_MARKER;
-                       
-                       decode_mcus(&in, decdata->dcts, 6, dscans, max);
-                       idct(decdata->dcts, decdata->out, decdata->dquant[0], IFIX(128.5), max[0]);
-                       idct(decdata->dcts + 64, decdata->out + 64, decdata->dquant[0], IFIX(128.5), max[1]);
-                       idct(decdata->dcts + 128, decdata->out + 128, decdata->dquant[0], IFIX(128.5), max[2]);
-                       idct(decdata->dcts + 192, decdata->out + 192, decdata->dquant[0], IFIX(128.5), max[3]);
-                       idct(decdata->dcts + 256, decdata->out + 256, decdata->dquant[1], IFIX(0.5), max[4]);
-                       idct(decdata->dcts + 320, decdata->out + 320, decdata->dquant[2], IFIX(0.5), max[5]);
-
-                       switch (depth) {
-                       case 24:
-                               col221111(decdata->out, pic + (my * 16 * mcusx + mx) * 16 * 3, mcusx * 16 * 3);
-                               break;
-                       case 16:
-                               col221111_16(decdata->out, pic + (my * 16 * mcusx + mx) * (16 * 2), mcusx * (16 * 2));
-                               break;
-                       default:
-                               return ERR_DEPTH_MISMATCH;
-                               break;
-                       }
-               }
-       }
-       
-       m = dec_readmarker(&in);
-       if (m != M_EOI)
-               return ERR_NO_EOI;
-
-       return 0;
-}
-
-/****************************************************************/
-/**************       huffman decoder             ***************/
-/****************************************************************/
-
-static int fillbits __P((struct in *, int, unsigned int));
-static int dec_rec2
-__P((struct in *, struct dec_hufftbl *, int *, int, int));
-
-static void setinput(in, p)
-struct in *in;
-unsigned char *p;
-{
-       in->p = p;
-       in->left = 0;
-       in->bits = 0;
-       in->marker = 0;
-}
-
-static int fillbits(in, le, bi)
-struct in *in;
-int le;
-unsigned int bi;
-{
-       int b, m;
-
-       if (in->marker) {
-               if (le <= 16)
-                       in->bits = bi << 16, le += 16;
-               return le;
-       }
-       while (le <= 24) {
-               b = *in->p++;
-               if (b == 0xff && (m = *in->p++) != 0) {
-                       if (m == M_EOF) {
-                               if (in->func && (m = in->func(in->data)) == 0)
-                                       continue;
-                       }
-                       in->marker = m;
-                       if (le <= 16)
-                               bi = bi << 16, le += 16;
-                       break;
-               }
-               bi = bi << 8 | b;
-               le += 8;
-       }
-       in->bits = bi;          /* tmp... 2 return values needed */
-       return le;
-}
-
-static int dec_readmarker(in)
-struct in *in;
-{
-       int m;
-
-       in->left = fillbits(in, in->left, in->bits);
-       if ((m = in->marker) == 0)
-               return 0;
-       in->left = 0;
-       in->marker = 0;
-       return m;
-}
-
-#define LEBI_DCL       int le, bi
-#define LEBI_GET(in)   (le = in->left, bi = in->bits)
-#define LEBI_PUT(in)   (in->left = le, in->bits = bi)
-
-#define GETBITS(in, n) (                                       \
-  (le < (n) ? le = fillbits(in, le, bi), bi = in->bits : 0),   \
-  (le -= (n)),                                                 \
-  bi >> le & ((1 << (n)) - 1)                                  \
-)
-
-#define UNGETBITS(in, n) (     \
-  le += (n)                    \
-)
-
-
-static int dec_rec2(in, hu, runp, c, i)
-struct in *in;
-struct dec_hufftbl *hu;
-int *runp;
-int c, i;
-{
-       LEBI_DCL;
-
-       LEBI_GET(in);
-       if (i) {
-               UNGETBITS(in, i & 127);
-               *runp = i >> 8 & 15;
-               i >>= 16;
-       } else {
-               for (i = DECBITS; (c = ((c << 1) | GETBITS(in, 1))) >= (hu->maxcode[i]); i++);
-               if (i >= 16) {
-                       in->marker = M_BADHUFF;
-                       return 0;
-               }
-               i = hu->vals[hu->valptr[i] + c - hu->maxcode[i - 1] * 2];
-               *runp = i >> 4;
-               i &= 15;
-       }
-       if (i == 0) {           /* sigh, 0xf0 is 11 bit */
-               LEBI_PUT(in);
-               return 0;
-       }
-       /* receive part */
-       c = GETBITS(in, i);
-       if (c < (1 << (i - 1)))
-               c += (-1 << i) + 1;
-       LEBI_PUT(in);
-       return c;
-}
-
-#define DEC_REC(in, hu, r, i)   (      \
-  r = GETBITS(in, DECBITS),            \
-  i = hu->llvals[r],                   \
-  i & 128 ?                            \
-    (                                  \
-      UNGETBITS(in, i & 127),          \
-      r = i >> 8 & 15,                 \
-      i >> 16                          \
-    )                                  \
-  :                                    \
-    (                                  \
-      LEBI_PUT(in),                    \
-      i = dec_rec2(in, hu, &r, r, i),  \
-      LEBI_GET(in),                    \
-      i                                        \
-    )                                  \
-)
-
-static void decode_mcus(in, dct, n, sc, maxp)
-struct in *in;
-int *dct;
-int n;
-struct scan *sc;
-int *maxp;
-{
-       struct dec_hufftbl *hu;
-       int i, r, t;
-       LEBI_DCL;
-
-       memset(dct, 0, n * 64 * sizeof(*dct));
-       LEBI_GET(in);
-       while (n-- > 0) {
-               hu = sc->hudc.dhuff;
-               *dct++ = (sc->dc += DEC_REC(in, hu, r, t));
-
-               hu = sc->huac.dhuff;
-               i = 63;
-               while (i > 0) {
-                       t = DEC_REC(in, hu, r, t);
-                       if (t == 0 && r == 0) {
-                               dct += i;
-                               break;
-                       }
-                       dct += r;
-                       *dct++ = t;
-                       i -= r + 1;
-               }
-               *maxp++ = 64 - i;
-               if (n == sc->next)
-                       sc++;
-       }
-       LEBI_PUT(in);
-}
-
-static void dec_makehuff(hu, hufflen, huffvals)
-struct dec_hufftbl *hu;
-int *hufflen;
-unsigned char *huffvals;
-{
-       int code, k, i, j, d, x, c, v;
-       for (i = 0; i < (1 << DECBITS); i++)
-               hu->llvals[i] = 0;
-
-/*
- * llvals layout:
- *
- * value v already known, run r, backup u bits:
- *  vvvvvvvvvvvvvvvv 0000 rrrr 1 uuuuuuu
- * value unknown, size b bits, run r, backup u bits:
- *  000000000000bbbb 0000 rrrr 0 uuuuuuu
- * value and size unknown:
- *  0000000000000000 0000 0000 0 0000000
- */
-       code = 0;
-       k = 0;
-       for (i = 0; i < 16; i++, code <<= 1) {  /* sizes */
-               hu->valptr[i] = k;
-               for (j = 0; j < hufflen[i]; j++) {
-                       hu->vals[k] = *huffvals++;
-                       if (i < DECBITS) {
-                               c = code << (DECBITS - 1 - i);
-                               v = hu->vals[k] & 0x0f; /* size */
-                               for (d = 1 << (DECBITS - 1 - i); --d >= 0;) {
-                                       if (v + i < DECBITS) {  /* both fit in table */
-                                               x = d >> (DECBITS - 1 - v -
-                                                         i);
-                                               if (v && x < (1 << (v - 1)))
-                                                       x += (-1 << v) + 1;
-                                               x = x << 16 | (hu-> vals[k] & 0xf0) << 4 |
-                                                       (DECBITS - (i + 1 + v)) | 128;
-                                       } else
-                                               x = v << 16 | (hu-> vals[k] & 0xf0) << 4 |
-                                                       (DECBITS - (i + 1));
-                                       hu->llvals[c | d] = x;
-                               }
-                       }
-                       code++;
-                       k++;
-               }
-               hu->maxcode[i] = code;
-       }
-       hu->maxcode[16] = 0x20000;      /* always terminate decode */
-}
-
-/****************************************************************/
-/**************             idct                  ***************/
-/****************************************************************/
-
-#define ONE ((PREC)IFIX(1.))
-#define S2  ((PREC)IFIX(0.382683432))
-#define C2  ((PREC)IFIX(0.923879532))
-#define C4  ((PREC)IFIX(0.707106781))
-
-#define S22 ((PREC)IFIX(2 * 0.382683432))
-#define C22 ((PREC)IFIX(2 * 0.923879532))
-#define IC4 ((PREC)IFIX(1 / 0.707106781))
-
-#define C3IC1 ((PREC)IFIX(0.847759065))        /* c3/c1 */
-#define C5IC1 ((PREC)IFIX(0.566454497))        /* c5/c1 */
-#define C7IC1 ((PREC)IFIX(0.198912367))        /* c7/c1 */
-
-#define XPP(a,b) (t = a + b, b = a - b, a = t)
-#define XMP(a,b) (t = a - b, b = a + b, a = t)
-#define XPM(a,b) (t = a + b, b = b - a, a = t)
-
-#define ROT(a,b,s,c) ( t = IMULT(a + b, s),    \
-                       a = IMULT(a, c - s) + t,        \
-                       b = IMULT(b, c + s) - t)
-
-#define IDCT           \
-(                      \
-  XPP(t0, t1),         \
-  XMP(t2, t3),         \
-  t2 = IMULT(t2, IC4) - t3,    \
-  XPP(t0, t3),         \
-  XPP(t1, t2),         \
-  XMP(t4, t7),         \
-  XPP(t5, t6),         \
-  XMP(t5, t7),         \
-  t5 = IMULT(t5, IC4), \
-  ROT(t4, t6, S22, C22),\
-  t6 -= t7,            \
-  t5 -= t6,            \
-  t4 -= t5,            \
-  XPP(t0, t7),         \
-  XPP(t1, t6),         \
-  XPP(t2, t5),         \
-  XPP(t3, t4)          \
-)
-
-static unsigned char zig2[64] = {
-       0, 2, 3, 9, 10, 20, 21, 35,
-       14, 16, 25, 31, 39, 46, 50, 57,
-       5, 7, 12, 18, 23, 33, 37, 48,
-       27, 29, 41, 44, 52, 55, 59, 62,
-       15, 26, 30, 40, 45, 51, 56, 58,
-       1, 4, 8, 11, 19, 22, 34, 36,
-       28, 42, 43, 53, 54, 60, 61, 63,
-       6, 13, 17, 24, 32, 38, 47, 49
-};
-
-void idct(in, out, quant, off, max)
-int *in;
-int *out;
-PREC *quant;
-PREC off;
-int max;
-{
-       PREC t0, t1, t2, t3, t4, t5, t6, t7, t;
-       PREC tmp[64], *tmpp;
-       int i, j;
-       unsigned char *zig2p;
-
-       t0 = off;
-       if (max == 1) {
-               t0 += in[0] * quant[0];
-               for (i = 0; i < 64; i++)
-                       out[i] = ITOINT(t0);
-               return;
-       }
-       zig2p = zig2;
-       tmpp = tmp;
-       for (i = 0; i < 8; i++) {
-               j = *zig2p++;
-               t0 += in[j] * quant[j];
-               j = *zig2p++;
-               t5 = in[j] * quant[j];
-               j = *zig2p++;
-               t2 = in[j] * quant[j];
-               j = *zig2p++;
-               t7 = in[j] * quant[j];
-               j = *zig2p++;
-               t1 = in[j] * quant[j];
-               j = *zig2p++;
-               t4 = in[j] * quant[j];
-               j = *zig2p++;
-               t3 = in[j] * quant[j];
-               j = *zig2p++;
-               t6 = in[j] * quant[j];
-               IDCT;
-               tmpp[0 * 8] = t0;
-               tmpp[1 * 8] = t1;
-               tmpp[2 * 8] = t2;
-               tmpp[3 * 8] = t3;
-               tmpp[4 * 8] = t4;
-               tmpp[5 * 8] = t5;
-               tmpp[6 * 8] = t6;
-               tmpp[7 * 8] = t7;
-               tmpp++;
-               t0 = 0;
-       }
-       for (i = 0; i < 8; i++) {
-               t0 = tmp[8 * i + 0];
-               t1 = tmp[8 * i + 1];
-               t2 = tmp[8 * i + 2];
-               t3 = tmp[8 * i + 3];
-               t4 = tmp[8 * i + 4];
-               t5 = tmp[8 * i + 5];
-               t6 = tmp[8 * i + 6];
-               t7 = tmp[8 * i + 7];
-               IDCT;
-               out[8 * i + 0] = ITOINT(t0);
-               out[8 * i + 1] = ITOINT(t1);
-               out[8 * i + 2] = ITOINT(t2);
-               out[8 * i + 3] = ITOINT(t3);
-               out[8 * i + 4] = ITOINT(t4);
-               out[8 * i + 5] = ITOINT(t5);
-               out[8 * i + 6] = ITOINT(t6);
-               out[8 * i + 7] = ITOINT(t7);
-       }
-}
-
-static unsigned char zig[64] = {
-       0, 1, 5, 6, 14, 15, 27, 28,
-       2, 4, 7, 13, 16, 26, 29, 42,
-       3, 8, 12, 17, 25, 30, 41, 43,
-       9, 11, 18, 24, 31, 40, 44, 53,
-       10, 19, 23, 32, 39, 45, 52, 54,
-       20, 22, 33, 38, 46, 51, 55, 60,
-       21, 34, 37, 47, 50, 56, 59, 61,
-       35, 36, 48, 49, 57, 58, 62, 63
-};
-
-static PREC aaidct[8] = {
-       IFIX(0.3535533906), IFIX(0.4903926402),
-       IFIX(0.4619397663), IFIX(0.4157348062),
-       IFIX(0.3535533906), IFIX(0.2777851165),
-       IFIX(0.1913417162), IFIX(0.0975451610)
-};
-
-
-static void idctqtab(qin, qout)
-unsigned char *qin;
-PREC *qout;
-{
-       int i, j;
-
-       for (i = 0; i < 8; i++)
-               for (j = 0; j < 8; j++)
-                       qout[zig[i * 8 + j]] = qin[zig[i * 8 + j]] * 
-                                               IMULT(aaidct[i], aaidct[j]);
-}
-
-static void scaleidctqtab(q, sc)
-PREC *q;
-PREC sc;
-{
-       int i;
-
-       for (i = 0; i < 64; i++)
-               q[i] = IMULT(q[i], sc);
-}
-
-/****************************************************************/
-/**************          color decoder            ***************/
-/****************************************************************/
-
-#define ROUND
-
-/*
- * YCbCr Color transformation:
- *
- * y:0..255   Cb:-128..127   Cr:-128..127
- *
- *      R = Y                + 1.40200 * Cr
- *      G = Y - 0.34414 * Cb - 0.71414 * Cr
- *      B = Y + 1.77200 * Cb
- *
- * =>
- *      Cr *= 1.40200;
- *      Cb *= 1.77200;
- *      Cg = 0.19421 * Cb + .50937 * Cr;
- *      R = Y + Cr;
- *      G = Y - Cg;
- *      B = Y + Cb;
- *
- * =>
- *      Cg = (50 * Cb + 130 * Cr + 128) >> 8;
- */
-
-static void initcol(q)
-PREC q[][64];
-{
-       scaleidctqtab(q[1], IFIX(1.77200));
-       scaleidctqtab(q[2], IFIX(1.40200));
-}
-
-/* This is optimized for the stupid sun SUNWspro compiler. */
-#define STORECLAMP(a,x)                                \
-(                                              \
-  (a) = (x),                                   \
-  (unsigned int)(x) >= 256 ?                   \
-    ((a) = (x) < 0 ? 0 : 255)                  \
-  :                                            \
-    0                                          \
-)
-
-#define CLAMP(x) ((unsigned int)(x) >= 256 ? ((x) < 0 ? 0 : 255) : (x))
-
-#ifdef ROUND
-
-#define CBCRCG(yin, xin)                       \
-(                                              \
-  cb = outc[0 +yin*8+xin],                     \
-  cr = outc[64+yin*8+xin],                     \
-  cg = (50 * cb + 130 * cr + 128) >> 8         \
-)
-
-#else
-
-#define CBCRCG(yin, xin)                       \
-(                                              \
-  cb = outc[0 +yin*8+xin],                     \
-  cr = outc[64+yin*8+xin],                     \
-  cg = (3 * cb + 8 * cr) >> 4                  \
-)
-
-#endif
-
-#define PIC(yin, xin, p, xout)                 \
-(                                              \
-  y = outy[(yin) * 8 + xin],                   \
-  STORECLAMP(p[(xout) * 3 + 0], y + cr),       \
-  STORECLAMP(p[(xout) * 3 + 1], y - cg),       \
-  STORECLAMP(p[(xout) * 3 + 2], y + cb)                \
-)
-
-#ifdef __LITTLE_ENDIAN
-#define PIC_16(yin, xin, p, xout, add)          \
-(                                                \
-  y = outy[(yin) * 8 + xin],                     \
-  y = ((CLAMP(y + cr + add*2+1) & 0xf8) <<  8) | \
-      ((CLAMP(y - cg + add    ) & 0xfc) <<  3) | \
-      ((CLAMP(y + cb + add*2+1)       ) >>  3),  \
-  p[(xout) * 2 + 0] = y & 0xff,                  \
-  p[(xout) * 2 + 1] = y >> 8                     \
-)
-#else
-#ifdef CONFIG_PPC
-#define PIC_16(yin, xin, p, xout, add)          \
-(                                                \
-  y = outy[(yin) * 8 + xin],                     \
-  y = ((CLAMP(y + cr + add*2+1) & 0xf8) <<  7) | \
-      ((CLAMP(y - cg + add*2+1) & 0xf8) <<  2) | \
-      ((CLAMP(y + cb + add*2+1)       ) >>  3),  \
-  p[(xout) * 2 + 0] = y >> 8,                    \
-  p[(xout) * 2 + 1] = y & 0xff                   \
-)
-#else
-#define PIC_16(yin, xin, p, xout, add)          \
-(                                                \
-  y = outy[(yin) * 8 + xin],                     \
-  y = ((CLAMP(y + cr + add*2+1) & 0xf8) <<  8) | \
-      ((CLAMP(y - cg + add    ) & 0xfc) <<  3) | \
-      ((CLAMP(y + cb + add*2+1)       ) >>  3),  \
-  p[(xout) * 2 + 0] = y >> 8,                    \
-  p[(xout) * 2 + 1] = y & 0xff                   \
-)
-#endif
-#endif
-
-#define PIC221111(xin)                                         \
-(                                                              \
-  CBCRCG(0, xin),                                              \
-  PIC(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0),  \
-  PIC(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1),  \
-  PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0),  \
-  PIC(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1)   \
-)
-
-#define PIC221111_16(xin)                                               \
-(                                                                      \
-  CBCRCG(0, xin),                                                      \
-  PIC_16(xin / 4 * 8 + 0, (xin & 3) * 2 + 0, pic0, xin * 2 + 0, 3),     \
-  PIC_16(xin / 4 * 8 + 0, (xin & 3) * 2 + 1, pic0, xin * 2 + 1, 0),     \
-  PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 0, pic1, xin * 2 + 0, 1),     \
-  PIC_16(xin / 4 * 8 + 1, (xin & 3) * 2 + 1, pic1, xin * 2 + 1, 2)      \
-)
-
-static void col221111(out, pic, width)
-int *out;
-unsigned char *pic;
-int width;
-{
-       int i, j, k;
-       unsigned char *pic0, *pic1;
-       int *outy, *outc;
-       int cr, cg, cb, y;
-
-       pic0 = pic;
-       pic1 = pic + width;
-       outy = out;
-       outc = out + 64 * 4;
-       for (i = 2; i > 0; i--) {
-               for (j = 4; j > 0; j--) {
-                       for (k = 0; k < 8; k++) {
-                               PIC221111(k);
-                       }
-                       outc += 8;
-                       outy += 16;
-                       pic0 += 2 * width;
-                       pic1 += 2 * width;
-               }
-               outy += 64 * 2 - 16 * 4;
-       }
-}
-
-static void col221111_16(out, pic, width)
-int *out;
-unsigned char *pic;
-int width;
-{
-       int i, j, k;
-       unsigned char *pic0, *pic1;
-       int *outy, *outc;
-       int cr, cg, cb, y;
-
-       pic0 = pic;
-       pic1 = pic + width;
-       outy = out;
-       outc = out + 64 * 4;
-       for (i = 2; i > 0; i--) {
-               for (j = 4; j > 0; j--) {
-                       for (k = 0; k < 8; k++) {
-                           PIC221111_16(k);
-                       }
-                       outc += 8;
-                       outy += 16;
-                       pic0 += 2 * width;
-                       pic1 += 2 * width;
-               }
-               outy += 64 * 2 - 16 * 4;
-       }
-}
diff --git a/drivers/video/bootsplash/decode-jpg.h b/drivers/video/bootsplash/decode-jpg.h
deleted file mode 100644 (file)
index 1a191eb..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- *    linux/drivers/video/bootsplash/decode-jpg.h - a tiny jpeg decoder.
- *
- *      (w) August 2001 by Michael Schroeder, <mls@suse.de>
- */
-
-#ifndef __DECODE_JPG_H
-#define __DECODE_JPG_H
-
-#define ERR_NO_SOI 1
-#define ERR_NOT_8BIT 2
-#define ERR_HEIGHT_MISMATCH 3
-#define ERR_WIDTH_MISMATCH 4
-#define ERR_BAD_WIDTH_OR_HEIGHT 5
-#define ERR_TOO_MANY_COMPPS 6
-#define ERR_ILLEGAL_HV 7
-#define ERR_QUANT_TABLE_SELECTOR 8
-#define ERR_NOT_YCBCR_221111 9
-#define ERR_UNKNOWN_CID_IN_SCAN 10
-#define ERR_NOT_SEQUENTIAL_DCT 11
-#define ERR_WRONG_MARKER 12
-#define ERR_NO_EOI 13
-#define ERR_BAD_TABLES 14
-#define ERR_DEPTH_MISMATCH 15
-
-struct jpeg_decdata {
-       int dcts[6 * 64 + 16];
-       int out[64 * 6];
-       int dquant[3][64];
-};
-
-extern int jpeg_decode(unsigned char *, unsigned char *, int, int, int, struct jpeg_decdata *);
-extern int jpeg_check_size(unsigned char *, int, int);
-
-#endif
diff --git a/drivers/video/bootsplash/render.c b/drivers/video/bootsplash/render.c
deleted file mode 100644 (file)
index 73bae83..0000000
+++ /dev/null
@@ -1,330 +0,0 @@
-/* 
- *    linux/drivers/video/bootsplash/render.c - splash screen render functions.
- */
-
-#include <linux/config.h>
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/fb.h>
-#include <linux/vt_kern.h>
-#include <asm/irq.h>
-#include <asm/system.h>
-
-#include "../console/fbcon.h"
-#include "bootsplash.h"
-
-void splash_putcs(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
-                       const unsigned short *s, int count, int ypos, int xpos)
-{
-       unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
-       int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
-       int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
-       u8 *src;
-        u8 *dst, *splashsrc;
-       unsigned int d, x, y;
-       u32 dd, fgx, bgx;
-       u16 c = scr_readw(s);
-
-       int fg_color, bg_color, transparent;
-        fg_color = attr_fgcol(fgshift, c);
-        bg_color = attr_bgcol(bgshift, c);
-       transparent = sd->splash_color == bg_color;
-       xpos = xpos * vc->vc_font.width + sd->splash_text_xo;
-       ypos = ypos * vc->vc_font.height + sd->splash_text_yo;
-        splashsrc = (u8 *)(info->splash_pic + ypos * info->splash_bytes + xpos * 2);
-        dst = (u8 *)(info->screen_base + ypos * info->fix.line_length + xpos * 2);
-
-       fgx = ((u32 *)info->pseudo_palette)[fg_color];
-       if (transparent && sd->splash_color == 15) {
-           if (fgx == 0xffea)
-               fgx = 0xfe4a;
-           else if (fgx == 0x57ea)
-               fgx = 0x0540;
-           else if (fgx == 0xffff)
-               fgx = 0x52aa;
-       }
-       bgx = ((u32 *)info->pseudo_palette)[bg_color];
-       d = 0;
-
-       while (count--) {
-           c = scr_readw(s++);
-           src = vc->vc_font.data + (c & charmask) * vc->vc_font.height * ((vc->vc_font.width + 7) >> 3);
-
-           for (y = 0; y < vc->vc_font.height; y++) {
-               for (x = 0; x < vc->vc_font.width; x += 2) {
-                   if ((x & 7) == 0)
-                       d = *src++;
-                   if (d & 0x80)
-                       dd = fgx;
-                   else
-                       dd = transparent ? *(u16 *)splashsrc : bgx;
-                   splashsrc += 2;
-                   if (d & 0x40)
-                       dd |= fgx << 16;
-                   else
-                       dd |= (transparent ? *(u16 *)splashsrc : bgx) << 16;
-                   splashsrc += 2;
-                   d <<= 2;
-                   fb_writel(dd, dst);
-                   dst += 4;
-               }
-               dst += info->fix.line_length - vc->vc_font.width * 2;
-               splashsrc += info->splash_bytes - vc->vc_font.width * 2;
-           }
-           dst -= info->fix.line_length * vc->vc_font.height - vc->vc_font.width * 2;
-           splashsrc -= info->splash_bytes * vc->vc_font.height - vc->vc_font.width * 2;
-       }
-}
-
-static void splash_renderc(struct splash_data *sd, struct fb_info *info, int fg_color, int bg_color, u8 *src, int ypos, int xpos, int height, int width)
-{
-       int transparent = sd->splash_color == bg_color;
-       u32 dd, fgx, bgx;
-       u8 *dst, *splashsrc;
-       unsigned int d, x, y;
-
-       splashsrc = (u8 *)(info->splash_pic + ypos * info->splash_bytes + xpos * 2);
-       dst = (u8 *)(info->screen_base + ypos * info->fix.line_length + xpos * 2);
-       fgx = ((u32 *)info->pseudo_palette)[fg_color];
-       if (transparent && sd->splash_color == 15) {
-           if (fgx == 0xffea)
-               fgx = 0xfe4a;
-           else if (fgx == 0x57ea)
-               fgx = 0x0540;
-           else if (fgx == 0xffff)
-               fgx = 0x52aa;
-       }
-       bgx = ((u32 *)info->pseudo_palette)[bg_color];
-       d = 0;
-       for (y = 0; y < height; y++) {
-           for (x = 0; x < width; x += 2) {
-               if ((x & 7) == 0)
-                   d = *src++;
-               if (d & 0x80)
-                   dd = fgx;
-               else
-                   dd = transparent ? *(u16 *)splashsrc : bgx;
-               splashsrc += 2;
-               if (d & 0x40)
-                   dd |= fgx << 16;
-               else
-                   dd |= (transparent ? *(u16 *)splashsrc : bgx) << 16;
-               splashsrc += 2;
-               d <<= 2;
-               fb_writel(dd, dst);
-               dst += 4;
-           }
-           dst += info->fix.line_length - width * 2;
-           splashsrc += info->splash_bytes - width * 2;
-       }
-}
-
-void splash_putc(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
-                      int c, int ypos, int xpos)
-{
-       unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff;
-       int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
-       int fgshift = (vc->vc_hi_font_mask) ? 9 : 8;
-       u8 *src = vc->vc_font.data + (c & charmask) * vc->vc_font.height * ((vc->vc_font.width + 7) >> 3);
-       xpos = xpos * vc->vc_font.width + sd->splash_text_xo;
-       ypos = ypos * vc->vc_font.height + sd->splash_text_yo;
-       splash_renderc(sd, info, attr_fgcol(fgshift, c), attr_bgcol(bgshift, c), src, ypos, xpos, vc->vc_font.height, vc->vc_font.width);
-}
-
-void splashcopy(u8 *dst, u8 *src, int height, int width, int dstbytes, int srcbytes)
-{
-       int i;
-
-       while (height-- > 0) {
-           u32 *p = (u32 *)dst;
-           u32 *q = (u32 *)src;
-           for (i=0; i < width/4; i++) {
-               fb_writel(*q++,p++);
-               fb_writel(*q++,p++);
-           }
-           if (width & 2)
-               fb_writel(*q++,p++);
-           if (width & 1)
-               fb_writew(*(u16*)q,(u16*)p);
-           dst += dstbytes;
-           src += srcbytes;
-       }
-}
-
-static void splashset(u8 *dst, int height, int width, int dstbytes, u32 bgx) {
-       int i;
-
-       bgx |= bgx << 16;
-       while (height-- > 0) {
-           u32 *p = (u32 *)dst;
-           for (i=0; i < width/4; i++) {
-               fb_writel(bgx,p++);
-               fb_writel(bgx,p++);
-           }
-           if (width & 2)
-               fb_writel(bgx,p++);
-           if (width & 1)
-               fb_writew(bgx,(u16*)p);
-           dst += dstbytes;
-       }
-}
-
-static void splashfill(struct fb_info *info, int sy, int sx, int height, int width) {
-       splashcopy((u8 *)(info->screen_base + sy * info->fix.line_length + sx * 2), (u8 *)(info->splash_pic + sy * info->splash_bytes + sx * 2), height, width, info->fix.line_length, info->splash_bytes);
-}
-
-void splash_clear(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy,
-                       int sx, int height, int width)
-{
-       int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
-       int bg_color = attr_bgcol_ec(bgshift, vc);
-       int transparent = sd->splash_color == bg_color;
-       u32 bgx;
-       u8 *dst;
-
-       sy = sy * vc->vc_font.height + sd->splash_text_yo;
-       sx = sx * vc->vc_font.width + sd->splash_text_xo;
-       height *= vc->vc_font.height;
-       width *= vc->vc_font.width;
-       if (transparent) {
-               splashfill(info, sy, sx, height, width);
-               return;
-       }
-        dst = (u8 *)(info->screen_base + sy * info->fix.line_length + sx * 2);
-       bgx = ((u32 *)info->pseudo_palette)[bg_color];
-       splashset(dst, height, width, info->fix.line_length, bgx);
-}
-
-void splash_bmove(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int sy, 
-               int sx, int dy, int dx, int height, int width)
-{
-       struct fb_copyarea area;
-
-       area.sx = sx * vc->vc_font.width;
-       area.sy = sy * vc->vc_font.height;
-       area.dx = dx * vc->vc_font.width;
-       area.dy = dy * vc->vc_font.height;
-       area.sx += sd->splash_text_xo;
-       area.sy += sd->splash_text_yo;
-       area.dx += sd->splash_text_xo;
-       area.dy += sd->splash_text_yo;
-       area.height = height * vc->vc_font.height;
-       area.width = width * vc->vc_font.width;
-
-       info->fbops->fb_copyarea(info, &area);
-}
-
-void splash_clear_margins(struct splash_data *sd, struct vc_data *vc, struct fb_info *info,
-                               int bottom_only)
-{
-       unsigned int tw = vc->vc_cols*vc->vc_font.width;
-       unsigned int th = vc->vc_rows*vc->vc_font.height;
-       
-       if (!bottom_only) {
-               /* top margin */
-               splashfill(info, 0, 0, sd->splash_text_yo, info->var.xres);
-               /* left margin */
-               splashfill(info, sd->splash_text_yo, 0, th, sd->splash_text_xo);
-               /* right margin */
-               splashfill(info, sd->splash_text_yo, sd->splash_text_xo + tw, th, info->var.xres - sd->splash_text_xo - tw);
-
-       }
-       splashfill(info, sd->splash_text_yo + th, 0, info->var.yres - sd->splash_text_yo - th, info->var.xres);
-}
-
-void splash_cursor(struct splash_data *sd, struct fb_info *info, struct fb_cursor *cursor)
-{
-       int i;
-       unsigned int dsize, s_pitch;
-
-       if (cursor->set & FB_CUR_SETSIZE) {
-                info->cursor.image.height = cursor->image.height;
-                info->cursor.image.width = cursor->image.width;
-        }
-        if (cursor->set & FB_CUR_SETPOS) {
-                info->cursor.image.dx = cursor->image.dx;
-                info->cursor.image.dy = cursor->image.dy;
-        }
-        if (cursor->set & FB_CUR_SETHOT)
-                info->cursor.hot = cursor->hot;
-        if (cursor->set & FB_CUR_SETCMAP) {
-                if (cursor->image.depth == 1) {
-                        info->cursor.image.bg_color = cursor->image.bg_color;
-                        info->cursor.image.fg_color = cursor->image.fg_color;
-                } else {
-                        if (cursor->image.cmap.len)
-                                fb_copy_cmap(&cursor->image.cmap, &info->cursor.image.cmap, 0);
-                }
-                info->cursor.image.depth = cursor->image.depth;
-        }
-       s_pitch = (info->cursor.image.width + 7) >> 3;
-        dsize = s_pitch * info->cursor.image.height;
-        if (info->cursor.enable) {
-                switch (info->cursor.rop) {
-                case ROP_XOR:
-                        for (i = 0; i < dsize; i++)
-                                info->fb_cursordata[i] = cursor->image.data[i] ^ info->cursor.mask[i];
-                        break;
-                case ROP_COPY:
-                default:
-                        for (i = 0; i < dsize; i++)
-                                info->fb_cursordata[i] = cursor->image.data[i] & info->cursor.mask[i];
-                        break;
-                }
-        } else if (info->fb_cursordata != cursor->image.data)
-                memcpy(info->fb_cursordata, cursor->image.data, dsize);
-       info->cursor.image.data = info->fb_cursordata;
-       splash_renderc(sd, info, info->cursor.image.fg_color, info->cursor.image.bg_color, (u8 *)info->fb_cursordata, info->cursor.image.dy + sd->splash_text_yo, info->cursor.image.dx + sd->splash_text_xo, info->cursor.image.height, info->cursor.image.width);
-}
-
-void splash_bmove_redraw(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int y, int sx, int dx, int width)
-{
-       unsigned short *d = (unsigned short *) (vc->vc_origin + vc->vc_size_row * y + dx * 2);
-       unsigned short *s = d + (dx - sx);
-       unsigned short *start = d;
-       unsigned short *ls = d;
-       unsigned short *le = d + width;
-       unsigned short c;
-       int x = dx;
-       unsigned short attr = 1;
-
-       do {
-               c = scr_readw(d);
-               if (attr != (c & 0xff00)) {
-                       attr = c & 0xff00;
-                       if (d > start) {
-                               splash_putcs(sd, vc, info, start, d - start, y, x);
-                               x += d - start;
-                               start = d;
-                       }
-               }
-               if (s >= ls && s < le && c == scr_readw(s)) {
-                       if (d > start) {
-                               splash_putcs(sd, vc, info, start, d - start, y, x);
-                               x += d - start + 1;
-                               start = d + 1;
-                       } else {
-                               x++;
-                               start++;
-                       }
-               }
-               s++;
-               d++;
-       } while (d < le);
-       if (d > start)
-               splash_putcs(sd, vc, info, start, d - start, y, x);
-}
-
-void splash_blank(struct splash_data *sd, struct vc_data *vc, struct fb_info *info, int blank)
-{
-       if (blank) {
-               if (info->silent_screen_base)
-                   splashset((u8 *)info->silent_screen_base, info->var.yres, info->var.xres, info->fix.line_length, 0);
-               splashset((u8 *)info->screen_base, info->var.yres, info->var.xres, info->fix.line_length, 0);
-       } else {
-               if (info->silent_screen_base)
-                       splash_prepare(vc, info);
-               update_screen(vc->vc_num);
-               splash_clear_margins(vc->vc_splash_data, vc, info, 0);
-       }
-}
index 369ab07..ec9e0a7 100644 (file)
@@ -2528,7 +2528,7 @@ static int __init clgen_pci_setup (struct clgenfb_info *info,
 
        pdev = clgen_pci_dev_get (btype);
        if (!pdev) {
-               printk (KERN_ERR " Couldn't find PCI device\n");
+               printk (KERN_INFO "cirrusfb: couldn't find Cirrus Logic PCI device\n");
                DPRINTK ("EXIT, returning 1\n");
                return 1;
        }
@@ -2787,7 +2787,6 @@ int __init clgenfb_init(void)
        fb_info->gen.info.switch_con = &fbgen_switch;
        fb_info->gen.info.updatevar = &fbgen_update_var;
        fb_info->gen.info.flags = FBINFO_FLAG_DEFAULT;
-       fb_info->gen.info.dev = fb_info->pdev;
 
        for (j = 0; j < 256; j++) {
                if (j < 16) {
index 12435fd..dff229f 100644 (file)
@@ -93,9 +93,6 @@
 #endif
 
 #include "fbcon.h"
-#ifdef CONFIG_BOOTSPLASH
-#include "../bootsplash/bootsplash.h"
-#endif
 
 #ifdef FBCONDEBUG
 #  define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args)
@@ -202,12 +199,6 @@ static void fb_flashcursor(void *private)
        if (!info || (info->cursor.rop == ROP_COPY))
                return;
        info->cursor.enable ^= 1;
-#ifdef CONFIG_BOOTSPLASH
-       if (info->splash_data) {
-               splash_cursor(info->splash_data, info, &info->cursor);
-               return;
-       }
-#endif
        info->fbops->fb_cursor(info, &info->cursor);
 }
 
@@ -415,14 +406,6 @@ void accel_bmove(struct vc_data *vc, struct fb_info *info, int sy,
 {
        struct fb_copyarea area;
 
-#ifdef CONFIG_BOOTSPLASH
-       if (info->splash_data) {
-               splash_bmove(info->splash_data, vc, info, 
-                               sy, sx, dy, dx, height, width);
-               return;
-       }
-#endif
-
        area.sx = sx * vc->vc_font.width;
        area.sy = sy * vc->vc_font.height;
        area.dx = dx * vc->vc_font.width;
@@ -439,13 +422,6 @@ void accel_clear(struct vc_data *vc, struct fb_info *info, int sy,
        int bgshift = (vc->vc_hi_font_mask) ? 13 : 12;
        struct fb_fillrect region;
 
-#ifdef CONFIG_BOOTSPLASH
-       if (info->splash_data) {
-               splash_clear(info->splash_data, vc, info,
-                                        sy, sx, height, width);
-               return;
-       }
-#endif
        region.color = attr_bgcol_ec(bgshift, vc);
        region.dx = sx * vc->vc_font.width;
        region.dy = sy * vc->vc_font.height;
@@ -469,12 +445,6 @@ static void accel_putc(struct vc_data *vc, struct fb_info *info,
        struct fb_image image;
        u8 *src, *dst;
 
-#ifdef CONFIG_BOOTSPLASH
-       if (info->splash_data) {
-               splash_putc(info->splash_data, vc, info, c, ypos, xpos);
-               return;
-       }
-#endif
        image.dx = xpos * vc->vc_font.width;
        image.dy = ypos * vc->vc_font.height;
        image.width = vc->vc_font.width;
@@ -507,13 +477,6 @@ void accel_putcs(struct vc_data *vc, struct fb_info *info,
        struct fb_image image;
        u16 c = scr_readw(s);
 
-#ifdef CONFIG_BOOTSPLASH
-       if (info->splash_data) {
-               splash_putcs(info->splash_data, vc, info, s, count, yy, xx);
-               return;
-       }
-#endif
-
        image.fg_color = attr_fgcol(fgshift, c);
        image.bg_color = attr_bgcol(bgshift, c);
        image.dx = xx * vc->vc_font.width;
@@ -539,13 +502,6 @@ void accel_clear_margins(struct vc_data *vc, struct fb_info *info,
        unsigned int bs = info->var.yres - bh;
        struct fb_fillrect region;
 
-#ifdef CONFIG_BOOTSPLASH
-       if (info->splash_data) {
-               splash_clear_margins(info->splash_data, vc, info, bottom_only);
-               return;
-       }
-#endif
-
        region.color = attr_bgcol_ec(bgshift, vc);
        region.rop = ROP_COPY;
 
@@ -826,14 +782,6 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
        nr_cols = info->var.xres / vc->vc_font.width;
        nr_rows = info->var.yres / vc->vc_font.height;
 
-#ifdef CONFIG_BOOTSPLASH
-       if (vc->vc_splash_data && vc->vc_splash_data->splash_state) {
-               nr_cols = vc->vc_splash_data->splash_text_wi / vc->vc_font.width;
-               nr_rows = vc->vc_splash_data->splash_text_he / vc->vc_font.height;
-               logo = 0;
-       }
-#endif
-
        if (logo) {
                /* Need to make room for the logo */
                int cnt;
@@ -909,12 +857,6 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo)
                        vc->vc_complement_mask <<= 1;
        }
 
-#ifdef CONFIG_BOOTSPLASH
-       if(vc->vc_splash_data && vc->vc_splash_data->splash_state) {
-               con_remap_def_color(vc->vc_num, vc->vc_splash_data->splash_color << 4 | vc->vc_splash_data->splash_fg_color);
-       }
-#endif 
-
        if (!init) {
                if (vc->vc_cols != nr_cols || vc->vc_rows != nr_rows)
                        vc_resize(vc->vc_num, nr_cols, nr_rows);
@@ -1081,12 +1023,6 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
                if (info->cursor.rop == ROP_XOR) {
                        info->cursor.enable = 0;
                        info->cursor.rop = ROP_COPY;
-#ifdef CONFIG_BOOTSPLASH
-                       if (info->splash_data) {
-                               splash_cursor(info->splash_data, info, &cursor);
-                               break;
-                       }
-#endif
                        info->fbops->fb_cursor(info, &cursor);
                }       
                break;
@@ -1162,13 +1098,6 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
                                mask[i++] = 0xff;
                }
                info->cursor.rop = ROP_XOR;
-#ifdef CONFIG_BOOTSPLASH
-               if (info->splash_data) {
-                       splash_cursor(info->splash_data, info, &cursor);
-                       vbl_cursor_cnt = CURSOR_DRAW_DELAY;
-                       break;
-               }
-#endif
                info->fbops->fb_cursor(info, &cursor);
                vbl_cursor_cnt = CURSOR_DRAW_DELAY;
                break;
@@ -1472,10 +1401,6 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
                        fbcon_softback_note(vc, t, count);
                if (logo_shown >= 0)
                        goto redraw_up;
-#ifdef CONFIG_BOOTSPLASH
-               if (info->splash_data)
-                       goto redraw_up;
-#endif
                switch (p->scrollmode & __SCROLL_YMASK) {
                case __SCROLL_YMOVE:
                        accel_bmove(vc, info, t + count, 0, t, 0,
@@ -1543,10 +1468,6 @@ static int fbcon_scroll(struct vc_data *vc, int t, int b, int dir,
        case SM_DOWN:
                if (count > vc->vc_rows)        /* Maximum realistic size */
                        count = vc->vc_rows;
-#ifdef CONFIG_BOOTSPLASH
-               if (info->splash_data)
-                       goto redraw_down;
-#endif
                switch (p->scrollmode & __SCROLL_YMASK) {
                case __SCROLL_YMOVE:
                        accel_bmove(vc, info, t, 0, t + count, 0,
@@ -1672,13 +1593,6 @@ static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int s
                }
                return;
        }
-#ifdef CONFIG_BOOTSPLASH
-       if (info->splash_data && sy == dy && height == 1) {
-               /* must use slower redraw bmove to keep background pic intact */
-               splash_bmove_redraw(info->splash_data, vc, info, sy, sx, dx, width);
-               return;
-       }
-#endif
        accel_bmove(vc, info, real_y(p, sy), sx, real_y(p, dy), dx,
                        height, width);
 }
@@ -1719,10 +1633,6 @@ static int fbcon_switch(struct vc_data *vc)
        struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]];
        struct display *p = &fb_display[vc->vc_num];
 
-#ifdef CONFIG_BOOTSPLASH
-       splash_prepare(vc, info);
-#endif
-
        if (softback_top) {
                int l = fbcon_softback_size / vc->vc_size_row;
                if (softback_lines)
@@ -1797,12 +1707,6 @@ static int fbcon_blank(struct vc_data *vc, int blank)
        fbcon_cursor(vc, blank ? CM_ERASE : CM_DRAW);
 
        if (!info->fbops->fb_blank) {
-#ifdef CONFIG_BOOTSPLASH
-               if (info->splash_data) {
-                       splash_blank(info->splash_data, vc, info, blank);
-                       return 0;
-               }
-#endif
                if (blank) {
                        unsigned short oldc;
                        u_int height;
@@ -1975,26 +1879,19 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op,
        }
 
        if (resize) {
-               u32 xres = info->var.xres, yres = info->var.yres;
                /* reset wrap/pan */
                info->var.xoffset = info->var.yoffset = p->yscroll = 0;
                p->vrows = info->var.yres_virtual / h;
 
-#ifdef CONFIG_BOOTSPLASH
-               if (info->splash_data) {
-                       xres = info->splash_data->splash_text_wi;
-                       yres = info->splash_data->splash_text_he;
-               }
-#endif
 #if 0          /* INCOMPLETE - let the console gurus handle this */
-               if(yres > (h * (vc->vc_rows + 1))
-                       p->vrows -= (yres - (h * vc->vc_rows)) / h;
+               if(info->var.yres > (h * (vc->vc_rows + 1))
+                       p->vrows -= (info->var.yres - (h * vc->vc_rows)) / h;
 #endif
-               if ((yres % h)
+               if ((info->var.yres % h)
                    && (info->var.yres_virtual % h < info->var.yres % h))
                        p->vrows--;
                updatescrollmode(p, vc);
-               vc_resize(vc->vc_num, xres / w, yres / h);
+               vc_resize(vc->vc_num, info->var.xres / w, info->var.yres / h);
                if (CON_IS_VISIBLE(vc) && softback_buf) {
                        int l = fbcon_softback_size / vc->vc_size_row;
                        if (l > 5)
@@ -2392,9 +2289,6 @@ int __init fb_console_init(void)
 {
        if (!num_registered_fb)
                return -ENODEV;
-#ifdef CONFIG_BOOTSPLASH
-       splash_init();
-#endif
        take_over_console(&fb_con, first_fb_vc, last_fb_vc, fbcon_is_default);
        return 0;
 }
index 2f9f863..ac19e9c 100644 (file)
     *    low-level frame buffer device
     */
 
-#ifdef CONFIG_BOOTSPLASH
-struct splash_data {
-    int splash_state;                  /* show splash? */
-    int splash_color;                  /* transparent color */
-    int splash_fg_color;               /* foreground color */
-    int splash_width;                  /* width of image */
-    int splash_height;                 /* height of image */
-    int splash_text_xo;                        /* text area origin */
-    int splash_text_yo;
-    int splash_text_wi;                        /* text area size */ 
-    int splash_text_he;
-    int splash_showtext;               /* silent/verbose mode */
-    int splash_boxcount;
-    int splash_percent;
-    int splash_overpaintok;            /* is it ok to overpaint boxes */
-    int splash_palcnt;
-    char *oldscreen_base;              /* pointer to top of virtual screen */
-    unsigned char *splash_boxes;
-    unsigned char *splash_jpeg;                /* jpeg */
-    unsigned char *splash_palette;     /* palette for 8-bit */
-
-    int splash_dosilent;               /* show silent jpeg */
-    unsigned char *splash_silentjpeg;
-    unsigned char *splash_sboxes;
-    int splash_sboxcount;
-};
-#endif
-
 struct display {
     /* Filled in by the frame buffer device */
     u_short inverse;                /* != 0 text black on white as default */
index 64fa60e..ecdd31f 100644 (file)
@@ -1366,7 +1366,6 @@ static int __devinit cyberpro_common_probe(struct cfb_info *cfb)
        cfb->fb.fix.smem_len   = smem_size;
        cfb->fb.fix.mmio_len   = MMIO_SIZE;
        cfb->fb.screen_base    = cfb->region;
-       cfb->fb.dev            = &cfb->dev->dev;
 
        err = -EINVAL;
        if (!fb_find_mode(&cfb->fb.var, &cfb->fb, NULL, NULL, 0,
index 3140310..a89dbc7 100644 (file)
@@ -31,7 +31,6 @@
 #include <linux/kmod.h>
 #endif
 #include <linux/devfs_fs_kernel.h>
-#include <linux/device.h>
 
 #if defined(__mc68000__) || defined(CONFIG_APUS)
 #include <asm/setup.h>
@@ -1200,83 +1199,6 @@ static struct file_operations fb_fops = {
 #endif
 };
 
-struct fb_dev {
-       struct list_head node;
-       dev_t dev;
-       struct class_device class_dev;
-};
-#define to_fb_dev(d) container_of(d, struct fb_dev, class_dev)
-
-static void release_fb_dev(struct class_device *class_dev)
-{
-       struct fb_dev *fb_dev = to_fb_dev(class_dev);
-       kfree(fb_dev);
-}
-
-static struct class fb_class = {
-       .name           = "video",
-       .release        = &release_fb_dev,
-};
-
-static LIST_HEAD(fb_dev_list);
-static spinlock_t fb_dev_list_lock = SPIN_LOCK_UNLOCKED;
-
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
-       struct fb_dev *fb_dev = to_fb_dev(class_dev);
-       return print_dev_t(buf, fb_dev->dev);
-}
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-
-static void fb_add_class_device(int minor, struct device *device)
-{
-       struct fb_dev *fb_dev = NULL;
-       int retval;
-
-       fb_dev = kmalloc(sizeof(*fb_dev), GFP_KERNEL);
-       if (!fb_dev)
-               return;
-       memset(fb_dev, 0x00, sizeof(*fb_dev));
-
-       fb_dev->dev = MKDEV(FB_MAJOR, minor);
-       fb_dev->class_dev.dev = device;
-       fb_dev->class_dev.class = &fb_class;
-       snprintf(fb_dev->class_dev.class_id, BUS_ID_SIZE, "fb%d", minor);
-       retval = class_device_register(&fb_dev->class_dev);
-       if (retval)
-               goto error;
-       class_device_create_file(&fb_dev->class_dev, &class_device_attr_dev);
-       spin_lock(&fb_dev_list_lock);
-       list_add(&fb_dev->node, &fb_dev_list);
-       spin_unlock(&fb_dev_list_lock);
-       return;
-error:
-       kfree(fb_dev);
-}
-
-void fb_remove_class_device(int minor)
-{
-       struct fb_dev *fb_dev = NULL;
-       struct list_head *tmp;
-       int found = 0;
-
-       spin_lock(&fb_dev_list_lock);
-       list_for_each(tmp, &fb_dev_list) {
-               fb_dev = list_entry(tmp, struct fb_dev, node);
-               if ((MINOR(fb_dev->dev) == minor)) {
-                       found = 1;
-                       break;
-               }
-       }
-       if (found) {
-               list_del(&fb_dev->node);
-               spin_unlock(&fb_dev_list_lock);
-               class_device_unregister(&fb_dev->class_dev);
-       } else {
-               spin_unlock(&fb_dev_list_lock);
-       }
-}
-
 /**
  *     register_framebuffer - registers a frame buffer device
  *     @fb_info: frame buffer info structure
@@ -1320,8 +1242,6 @@ register_framebuffer(struct fb_info *fb_info)
 
        devfs_mk_cdev(MKDEV(FB_MAJOR, i),
                        S_IFCHR | S_IRUGO | S_IWUGO, "fb/%d", i);
-
-       fb_add_class_device(i, fb_info->dev);
        return 0;
 }
 
@@ -1350,7 +1270,6 @@ unregister_framebuffer(struct fb_info *fb_info)
                kfree(fb_info->pixmap.addr);
        registered_fb[i]=NULL;
        num_registered_fb--;
-       fb_remove_class_device(i);
        return 0;
 }
 
@@ -1375,8 +1294,6 @@ fbmem_init(void)
        if (register_chrdev(FB_MAJOR,"fb",&fb_fops))
                printk("unable to get major %d for fb devs\n", FB_MAJOR);
 
-       class_register(&fb_class);
-
 #ifdef CONFIG_FB_OF
        if (ofonly) {
                offb_init();
index 59533c4..bf839fd 100644 (file)
@@ -890,30 +890,6 @@ struct __fb_timings {
        u32 vtotal;
 };
 
-/*
- * a simple function to get the square root of integers 
- */
-static u32 fb_sqrt(int x)
-{
-       register int op, res, one;
-
-       op = x;
-       res = 0;
-
-       one = 1 << 30;
-       while (one > op) one >>= 2;
-
-       while (one != 0) {
-               if (op >= res + one) {
-                       op = op - (res + one);
-                       res = res +  2 * one;
-               }
-               res /= 2;
-               one /= 4;
-       }
-       return((u32) res);
-}
-
 /**
  * fb_get_vblank - get vertical blank time
  * @hfreq: horizontal freq
@@ -1002,7 +978,7 @@ static u32 fb_get_hblank_by_dclk(u32 dclk, u32 xres)
        h_period += (M_VAL * xres * 2 * 1000)/(5 * dclk);
        h_period *=10000; 
 
-       h_period = fb_sqrt((int) h_period);
+       h_period = int_sqrt(h_period);
        h_period -= (100 - C_VAL) * 100;
        h_period *= 1000; 
        h_period /= 2 * M_VAL;
index 79e5e86..617734e 100644 (file)
@@ -539,7 +539,7 @@ static struct fb_ops hgafb_ops = {
 int __init hgafb_init(void)
 {
        if (! hga_card_detect()) {
-               printk(KERN_ERR "hgafb: HGA card not detected.\n");
+               printk(KERN_INFO "hgafb: HGA card not detected.\n");
                return -EINVAL;
        }
 
index 8f8566d..451e1a4 100644 (file)
@@ -1880,7 +1880,6 @@ static int __devinit i810fb_init_pci (struct pci_dev *dev,
        info->fbops = &par->i810fb_ops;
        info->pseudo_palette = par->pseudo_palette;
        info->flags = FBINFO_FLAG_DEFAULT;
-       info->dev = &dev->dev;
        
        fb_alloc_cmap(&info->cmap, 256, 0);
 
index 0295696..7e0353a 100644 (file)
@@ -332,7 +332,7 @@ static struct fb_ops igafb_ops = {
 #endif
 };
 
-static int __init iga_init(struct fb_info *info, struct iga_par *par, struct pci_dev *dev)
+static int __init iga_init(struct fb_info *info, struct iga_par *par)
 {
         char vramsz = iga_inb(par, IGA_EXT_CNTRL, IGA_IDX_EXT_BUS_CNTL) 
                                                         & MEM_SIZE_ALIAS;
@@ -358,7 +358,6 @@ static int __init iga_init(struct fb_info *info, struct iga_par *par, struct pci
 
        info->fbops = &igafb_ops;
        info->flags = FBINFO_FLAG_DEFAULT;
-       info->dev = &dev->dev;
 
        fb_alloc_cmap(&info->cmap, video_cmap_len, 0);
 
@@ -530,7 +529,7 @@ int __init igafb_init(void)
        info->fix = igafb_fix;
        info->pseudo_palette = (void *)(par + 1);
 
-       if (!iga_init(info, par, pdev)) {
+       if (!iga_init(info, par)) {
                iounmap((void *)par->io_base);
                iounmap(info->screen_base);
                if (par->mmap_map)
index ae22e11..3c7c422 100644 (file)
@@ -1348,7 +1348,7 @@ static struct fb_ops imsttfb_ops = {
 };
 
 static void __init 
-init_imstt(struct fb_info *info, struct pci_dev *pdev)
+init_imstt(struct fb_info *info)
 {
        struct imstt_par *par = (struct imstt_par *) info->par;
        __u32 i, tmp, *ip, *end;
@@ -1442,7 +1442,6 @@ init_imstt(struct fb_info *info, struct pci_dev *pdev)
 
        info->fbops = &imsttfb_ops;
        info->flags = FBINFO_FLAG_DEFAULT;
-       info->dev = &pdev->dev;
 
        fb_alloc_cmap(&info->cmap, 0, 0);
 
@@ -1521,7 +1520,7 @@ imsttfb_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        par->cmap_regs = (__u8 *)ioremap(addr + 0x840000, 0x1000);
        info->par = par;
        info->pseudo_palette = (void *) (par + 1);
-       init_imstt(info, pdev);
+       init_imstt(info);
 
        pci_set_drvdata(pdev, info);
        return 0;
index a38123e..27221ec 100644 (file)
@@ -605,7 +605,6 @@ static int matroxfb_dh_regit(CPMINFO struct matroxfb_dh_fb_info* m2info) {
        m2info->fbcon.flags = FBINFO_FLAG_DEFAULT;
        m2info->fbcon.currcon = -1;
        m2info->fbcon.pseudo_palette = m2info->cmap;
-       m2info->fbcon.dev = &m2info->primary_dev->pcidev->dev;
        fb_alloc_cmap(&m2info->fbcon.cmap, 256, 1);
 
        if (mem < 64)
index ae37adb..de02f51 100644 (file)
@@ -1943,7 +1943,6 @@ static struct fb_info *__devinit neo_alloc_fb_info(struct pci_dev *dev, const st
        info->flags = FBINFO_FLAG_DEFAULT;
        info->par = par;
        info->pseudo_palette = (void *) (par + 1);
-       info->dev = &dev->dev;
 
        fb_alloc_cmap(&info->cmap, NR_PALETTE, 0);
 
index 9e40393..af1a7fa 100644 (file)
@@ -3582,7 +3582,6 @@ static int radeonfb_pci_register (struct pci_dev *pdev,
        pci_set_drvdata(pdev, rinfo);
        rinfo->next = board_list;
        board_list = rinfo;
-       rinfo->info.dev = &pdev->dev;
 
        if (register_framebuffer ((struct fb_info *) rinfo) < 0) {
                printk ("radeonfb: could not register framebuffer\n");
index e6df08b..a53cad9 100644 (file)
@@ -1751,7 +1751,6 @@ static int __devinit rivafb_probe(struct pci_dev *pd,
        if (info->pixmap.addr == NULL)
                goto err_out_kfree1;
        memset(info->pixmap.addr, 0, 64 * 1024);
-       info->dev = &pd->dev;
 
        strcat(rivafb_fix.id, rci->name);
        default_par->riva.Architecture = rci->arch_rev;
index f664bf8..bb9c50d 100644 (file)
@@ -11712,7 +11712,7 @@ SetOEMLCDData(SiS_Private *SiS_Pr, PSIS_HW_DEVICE_INFO HwDeviceExtension,USHORT
   }
 
   temp = GetOEMLCDPtr(SiS_Pr,HwDeviceExtension, ROMAddr, 1);
-  if(temp = 0xFFFF) return;
+  if(temp == 0xFFFF) return;
 
   index = SiS_Pr->SiS_VBModeIDTable[ModeIdIndex]._VB_LCDHIndex;
   for(i=0x14, j=0; i<=0x17; i++, j++) {
index 4354f7f..3866b83 100644 (file)
@@ -4507,7 +4507,6 @@ int __init sisfb_init(void)
                sis_fb_info.par = &ivideo;
                sis_fb_info.screen_base = ivideo.video_vbase;
                sis_fb_info.fbops = &sisfb_ops;
-               sis_fb_info.dev = &pdev->dev;
                sisfb_get_fix(&sis_fb_info.fix, -1, &sis_fb_info);
                sis_fb_info.pseudo_palette = pseudo_palette;
                
index 3c69b05..d08d459 100644 (file)
@@ -1477,7 +1477,6 @@ static int __devinit sstfb_probe(struct pci_dev *pdev,
        info->fbops     = &sstfb_ops;
        info->currcon   = -1;
        info->pseudo_palette = &all->pseudo_palette;
-       info->dev       = &pdev->dev;
 
        fix->type       = FB_TYPE_PACKED_PIXELS;
        fix->visual     = FB_VISUAL_TRUECOLOR;
index 0690b61..8936d55 100644 (file)
@@ -1248,7 +1248,6 @@ static int __devinit tdfxfb_probe(struct pci_dev *pdev,
        info->par               = default_par;
        info->pseudo_palette    = (void *)(default_par + 1); 
        info->flags             = FBINFO_FLAG_DEFAULT;
-       info->dev               = &pdev->dev;
 
 #ifndef MODULE
        if (!mode_option)
@@ -1358,5 +1357,3 @@ void tdfxfb_setup(char *options, int *ints)
 }
 #endif
 
-
-
index 6090844..2d13c0c 100644 (file)
@@ -1430,7 +1430,6 @@ tgafb_pci_register(struct pci_dev *pdev, const struct pci_device_id *ent)
        all->info.currcon = -1;
        all->info.par = &all->par;
        all->info.pseudo_palette = all->pseudo_palette;
-       all->info.dev = &pdev->dev;
 
        /* This should give a reasonable default video mode.  */
 
index fe3214f..ae6d3c9 100644 (file)
@@ -1156,7 +1156,6 @@ static int __devinit trident_pci_probe(struct pci_dev * dev, const struct pci_de
                default_var.accel_flags &= ~FB_ACCELF_TEXT;
        default_var.activate |= FB_ACTIVATE_NOW;
        fb_info.var = default_var;
-       fb_info.dev = &dev->dev;
        if (register_framebuffer(&fb_info) < 0) {
                output("Could not register Trident framebuffer\n");
                return -EINVAL;
index f82ec92..88571b3 100644 (file)
@@ -174,10 +174,7 @@ static int vesafb_setcolreg(unsigned regno, unsigned red, unsigned green,
     return 0;
 }
 
-#ifndef CONFIG_BOOTSPLASH
-static
-#endif
-struct fb_ops vesafb_ops = {
+static struct fb_ops vesafb_ops = {
        .owner          = THIS_MODULE,
        .fb_setcolreg   = vesafb_setcolreg,
        .fb_pan_display = vesafb_pan_display,
index e6e1e58..66da6aa 100644 (file)
@@ -280,6 +280,7 @@ config REISERFS_FS_SECURITY
 
 config JFS_FS
        tristate "JFS filesystem support"
+       select NLS
        help
          This is a port of IBM's Journaled Filesystem .  More information is
          available in the file Documentation/filesystems/jfs.txt.
@@ -519,6 +520,7 @@ config ISO9660_FS
 config JOLIET
        bool "Microsoft Joliet CDROM extensions"
        depends on ISO9660_FS
+       select NLS
        help
          Joliet is a Microsoft extension for the ISO 9660 CD-ROM file system
          which allows for long filenames in unicode format (unicode is the
@@ -564,6 +566,7 @@ menu "DOS/FAT/NT Filesystems"
 
 config FAT_FS
        tristate "DOS FAT fs support"
+       select NLS
        help
          If you want to use one of the FAT-based file systems (the MS-DOS,
          VFAT (Windows 95) and UMSDOS (used to run Linux on top of an
@@ -685,6 +688,7 @@ config UMSDOS_FS
 
 config NTFS_FS
        tristate "NTFS file system support"
+       select NLS
        help
          NTFS is the file system of Microsoft Windows NT, 2000, XP and 2003.
 
@@ -996,6 +1000,7 @@ config HFS_FS
 config BEFS_FS
        tristate "BeOS file systemv(BeFS) support (read only) (EXPERIMENTAL)"
        depends on EXPERIMENTAL
+       select NLS
        help
          The BeOS File System (BeFS) is the native file system of Be, Inc's
          BeOS. Notable features include support for arbitrary attributes
@@ -1495,6 +1500,7 @@ config RPCSEC_GSS_KRB5
 config SMB_FS
        tristate "SMB file system support (to mount Windows shares etc.)"
        depends on INET
+       select NLS
        help
          SMB (Server Message Block) is the protocol Windows for Workgroups
          (WfW), Windows 95/98, Windows NT and OS/2 Lan Manager use to share
@@ -1550,6 +1556,7 @@ config SMB_NLS_REMOTE
 config CIFS
        tristate "CIFS support (advanced network filesystem for Samba, Window and other CIFS compliant servers)(EXPERIMENTAL)"
        depends on INET
+       select NLS
        help
          This is the client VFS module for the Common Internet File System
          (CIFS) protocol which is the successor to the Server Message Block 
index ddf4ea1..8718b26 100644 (file)
@@ -23,10 +23,6 @@ config BINFMT_ELF
          ld.so (check the file <file:Documentation/Changes> for location and
          latest version).
 
-         To compile this as a module, choose M here: the module will be called
-         binfmt_elf. Saying M or N here is dangerous because some crucial
-         programs on your system might be in ELF format.
-
 config BINFMT_FLAT
        tristate "Kernel support for flat binaries"
        depends on !MMU || SUPERH
index c538b49..75a6d7a 100644 (file)
@@ -93,5 +93,3 @@ obj-$(CONFIG_JFS_FS)          += jfs/
 obj-$(CONFIG_XFS_FS)           += xfs/
 obj-$(CONFIG_AFS_FS)           += afs/
 obj-$(CONFIG_BEFS_FS)          += befs/
-obj-$(CONFIG_HOSTFS)           += hostfs/
-obj-$(CONFIG_HPPFS)            += hppfs/
index 2d2a739..f7e998e 100644 (file)
@@ -82,13 +82,17 @@ static struct linux_binfmt elf_format = {
 
 #define BAD_ADDR(x)    ((unsigned long)(x) > TASK_SIZE)
 
-static void set_brk(unsigned long start, unsigned long end)
+static int set_brk(unsigned long start, unsigned long end)
 {
        start = ELF_PAGEALIGN(start);
        end = ELF_PAGEALIGN(end);
-       if (end > start)
-               do_brk(start, end - start);
+       if (end > start) {
+               unsigned long addr = do_brk(start, end - start);
+               if (BAD_ADDR(addr))
+                       return addr;
+       }
        current->mm->start_brk = current->mm->brk = end;
+       return 0;
 }
 
 
@@ -381,8 +385,11 @@ static unsigned long load_elf_interp(struct elfhdr * interp_elf_ex,
        elf_bss = ELF_PAGESTART(elf_bss + ELF_MIN_ALIGN - 1);   /* What we have mapped so far */
 
        /* Map the last of the bss segment */
-       if (last_bss > elf_bss)
-               do_brk(elf_bss, last_bss - elf_bss);
+       if (last_bss > elf_bss) {
+               error = do_brk(elf_bss, last_bss - elf_bss);
+               if (BAD_ADDR(error))
+                       goto out_close;
+       }
 
        *interp_load_addr = load_addr;
        error = ((unsigned long) interp_elf_ex->e_entry) + load_addr;
@@ -466,6 +473,7 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
        struct elfhdr interp_elf_ex;
        struct exec interp_ex;
        char passed_fileno[6];
+       struct files_struct *files;
        
        /* Get the exec-header */
        elf_ex = *((struct elfhdr *) bprm->buf);
@@ -498,9 +506,20 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
        if (retval < 0)
                goto out_free_ph;
 
+       files = current->files;         /* Refcounted so ok */
+       if(unshare_files() < 0)
+               goto out_free_ph;
+       if (files == current->files) {
+               put_files_struct(files);
+               files = NULL;
+       }
+
+       /* exec will make our files private anyway, but for the a.out
+          loader stuff we need to do it earlier */
+
        retval = get_unused_fd();
        if (retval < 0)
-               goto out_free_ph;
+               goto out_free_fh;
        get_file(bprm->file);
        fd_install(elf_exec_fileno = retval, bprm->file);
 
@@ -631,6 +650,13 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
        if (retval)
                goto out_free_dentry;
 
+       /* Discard our unneeded old files struct */
+       if (files) {
+               steal_locks(files);
+               put_files_struct(files);
+               files = NULL;
+       }
+
        /* OK, This is the point of no return */
        current->mm->start_data = 0;
        current->mm->end_data = 0;
@@ -672,7 +698,12 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
                        /* There was a PT_LOAD segment with p_memsz > p_filesz
                           before this one. Map anonymous pages, if needed,
                           and clear the area.  */
-                       set_brk (elf_bss + load_bias, elf_brk + load_bias);
+                       retval = set_brk (elf_bss + load_bias,
+                                         elf_brk + load_bias);
+                       if (retval) {
+                               send_sig(SIGKILL, current, 0);
+                               goto out_free_dentry;
+                       }
                        nbyte = ELF_PAGEOFFSET(elf_bss);
                        if (nbyte) {
                                nbyte = ELF_MIN_ALIGN - nbyte;
@@ -737,6 +768,18 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
        start_data += load_bias;
        end_data += load_bias;
 
+       /* Calling set_brk effectively mmaps the pages that we need
+        * for the bss and break sections.  We must do this before
+        * mapping in the interpreter, to make sure it doesn't wind
+        * up getting placed where the bss needs to go.
+        */
+       retval = set_brk(elf_bss, elf_brk);
+       if (retval) {
+               send_sig(SIGKILL, current, 0);
+               goto out_free_dentry;
+       }
+       padzero(elf_bss);
+
        if (elf_interpreter) {
                if (interpreter_type == INTERPRETER_AOUT)
                        elf_entry = load_aout_interp(&interp_ex,
@@ -745,19 +788,17 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
                        elf_entry = load_elf_interp(&interp_elf_ex,
                                                    interpreter,
                                                    &interp_load_addr);
-
-               allow_write_access(interpreter);
-               fput(interpreter);
-               kfree(elf_interpreter);
-
                if (BAD_ADDR(elf_entry)) {
                        printk(KERN_ERR "Unable to load interpreter\n");
-                       kfree(elf_phdata);
                        send_sig(SIGSEGV, current, 0);
                        retval = -ENOEXEC; /* Nobody gets to see this, but.. */
-                       goto out;
+                       goto out_free_dentry;
                }
                reloc_func_desc = interp_load_addr;
+
+               allow_write_access(interpreter);
+               fput(interpreter);
+               kfree(elf_interpreter);
        } else {
                elf_entry = elf_ex.e_entry;
        }
@@ -782,13 +823,6 @@ static int load_elf_binary(struct linux_binprm * bprm, struct pt_regs * regs)
        current->mm->end_data = end_data;
        current->mm->start_stack = bprm->p;
 
-       /* Calling set_brk effectively mmaps the pages that we need
-        * for the bss and break sections
-        */
-       set_brk(elf_bss, elf_brk);
-
-       padzero(elf_bss);
-
        if (current->personality & MMAP_PAGE_ZERO) {
                /* Why this, you ask???  Well SVr4 maps page 0 as read-only,
                   and some applications "depend" upon this behavior.
@@ -835,6 +869,11 @@ out_free_interp:
                kfree(elf_interpreter);
 out_free_file:
        sys_close(elf_exec_fileno);
+out_free_fh:
+       if (files) {
+               put_files_struct(current->files);
+               current->files = files;
+       }
 out_free_ph:
        kfree(elf_phdata);
        goto out;
index 3c9e596..a4e7b03 100644 (file)
@@ -217,7 +217,7 @@ load_som_binary(struct linux_binprm * bprm, struct pt_regs * regs)
                        (char *) hpuxhdr, size);
        if (retval < 0)
                goto out_free;
-
+#error "Fix security hole before enabling me"
        retval = get_unused_fd();
        if (retval < 0)
                goto out_free;
index 5247132..e186204 100644 (file)
@@ -2823,7 +2823,7 @@ drop_buffers(struct page *page, struct buffer_head **buffers_to_free)
                bh = bh->b_this_page;
        } while (bh != head);
 
-       if (!was_uptodate && PageUptodate(page))
+       if (!was_uptodate && PageUptodate(page) && !PageError(page))
                buffer_error();
 
        do {
index 5f4ab3a..50ab4cf 100644 (file)
@@ -434,7 +434,9 @@ void cdev_init(struct cdev *cdev, struct file_operations *fops)
 
 static struct kobject *base_probe(dev_t dev, int *part, void *data)
 {
-       request_module("char-major-%d-%d", MAJOR(dev), MINOR(dev));
+       if (request_module("char-major-%d-%d", MAJOR(dev), MINOR(dev)) > 0)
+               /* Make old-style 2.4 aliases work */
+               request_module("char-major-%d", MAJOR(dev));
        return NULL;
 }
 
index 2859b2d..432c063 100644 (file)
@@ -588,10 +588,10 @@ extern asmlinkage long sys_io_getevents(aio_context_t ctx_id,
 
 asmlinkage long
 compat_sys_io_getevents(aio_context_t ctx_id,
-               unsigned long min_nr,
-               unsigned long nr,
-               struct io_event *events,
-               struct compat_timespec *timeout)
+                                unsigned long min_nr,
+                                unsigned long nr,
+                                struct io_event *events,
+                                struct compat_timespec *timeout)
 {
        long ret;
        struct timespec t;
index 5ce8012..bfd4938 100644 (file)
@@ -63,6 +63,8 @@
 #include <linux/ctype.h>
 #include <linux/ioctl32.h>
 #include <linux/ncp_fs.h>
+#include <linux/i2c.h>
+#include <linux/i2c-dev.h>
 
 #include <net/sock.h>          /* siocdevprivate_ioctl */
 #include <net/bluetooth/bluetooth.h>
@@ -136,15 +138,16 @@ static int w_long(unsigned int fd, unsigned int cmd, unsigned long arg)
 static int rw_long(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
        mm_segment_t old_fs = get_fs();
+       u32 *argptr = compat_ptr(arg);
        int err;
        unsigned long val;
        
-       if(get_user(val, (u32 *) compat_ptr(arg)))
+       if(get_user(val, argptr))
                return -EFAULT;
        set_fs (KERNEL_DS);
        err = sys_ioctl(fd, cmd, (unsigned long)&val);
        set_fs (old_fs);
-       if (!err && put_user(val, (u32 *) compat_ptr(arg)))
+       if (!err && put_user(val, argptr))
                return -EFAULT;
        return err;
 }
@@ -158,9 +161,9 @@ static int do_ext2_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
        case EXT2_IOC32_GETVERSION: cmd = EXT2_IOC_GETVERSION; break;
        case EXT2_IOC32_SETVERSION: cmd = EXT2_IOC_SETVERSION; break;
        }
-       return sys_ioctl(fd, cmd, (unsigned long)compat_ptr(arg));
+       return sys_ioctl(fd, cmd, arg);
 }
-
 struct video_tuner32 {
        compat_int_t tuner;
        char name[32];
@@ -212,7 +215,7 @@ static int get_video_buffer32(struct video_buffer *kp, struct video_buffer32 *up
 
        if(get_user(tmp, &up->base))
                return -EFAULT;
-       kp->base = compat_ptr(tmp);
+       kp->base = (void *) ((unsigned long)tmp);
        __get_user(kp->height, &up->height);
        __get_user(kp->width, &up->width);
        __get_user(kp->depth, &up->depth);
@@ -336,7 +339,7 @@ static int do_video_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
                unsigned long vx;
        } karg;
        mm_segment_t old_fs = get_fs();
-       void *up = compat_ptr(arg);
+       void *up = (void *)arg;
        int err = 0;
 
        /* First, convert the command. */
@@ -404,7 +407,7 @@ out:
 
 static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
-       struct compat_timeval *up = compat_ptr(arg);
+       struct compat_timeval *up = (struct compat_timeval *)arg;
        struct timeval ktv;
        mm_segment_t old_fs = get_fs();
        int err;
@@ -463,7 +466,7 @@ static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg)
        struct ifreq32 ifr32;
        int err;
 
-       if (copy_from_user(&ifr32, compat_ptr(arg), sizeof(ifr32)))
+       if (copy_from_user(&ifr32, (struct ifreq32 *)arg, sizeof(struct ifreq32)))
                return -EFAULT;
 
        dev = dev_get_by_index(ifr32.ifr_ifindex);
@@ -473,7 +476,7 @@ static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg)
        strlcpy(ifr32.ifr_name, dev->name, sizeof(ifr32.ifr_name));
        dev_put(dev);
        
-       err = copy_to_user(compat_ptr(arg), &ifr32, sizeof(ifr32));
+       err = copy_to_user((struct ifreq32 *)arg, &ifr32, sizeof(struct ifreq32));
        return (err ? -EFAULT : 0);
 }
 #endif
@@ -488,7 +491,7 @@ static int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg)
        unsigned int i, j;
        int err;
 
-       if (copy_from_user(&ifc32, compat_ptr(arg), sizeof(struct ifconf32)))
+       if (copy_from_user(&ifc32, (struct ifconf32 *)arg, sizeof(struct ifconf32)))
                return -EFAULT;
 
        if(ifc32.ifcbuf == 0) {
@@ -498,7 +501,6 @@ static int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg)
        } else {
                ifc.ifc_len = ((ifc32.ifc_len / sizeof (struct ifreq32)) + 1) *
                        sizeof (struct ifreq);
-               /* should the size be limited? -arnd */
                ifc.ifc_buf = kmalloc (ifc.ifc_len, GFP_KERNEL);
                if (!ifc.ifc_buf)
                        return -ENOMEM;
@@ -544,7 +546,7 @@ static int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg)
                                else
                                        ifc32.ifc_len = i - sizeof (struct ifreq32);
                        }
-                       if (copy_to_user(compat_ptr(arg), &ifc32, sizeof(struct ifconf32)))
+                       if (copy_to_user((struct ifconf32 *)arg, &ifc32, sizeof(struct ifconf32)))
                                err = -EFAULT;
                }
        }
@@ -561,7 +563,7 @@ static int ethtool_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
        void *datap;
        
        ifr = compat_alloc_user_space(sizeof(*ifr));
-       ifr32 = compat_ptr(arg);
+       ifr32 = (struct ifreq32 *) arg;
 
        if (copy_in_user(&ifr->ifr_name, &ifr32->ifr_name, IFNAMSIZ))
                return -EFAULT;
@@ -569,18 +571,18 @@ static int ethtool_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
        if (get_user(data, &ifr32->ifr_ifru.ifru_data))
                return -EFAULT;
 
-       datap = compat_ptr(data);
+       datap = (void *) (unsigned long) data;
        if (put_user(datap, &ifr->ifr_ifru.ifru_data))
                return -EFAULT;
 
        return sys_ioctl(fd, cmd, (unsigned long) ifr);
 }
 
-static int bond_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+static int bond_ioctl(unsigned long fd, unsigned int cmd, unsigned long arg)
 {
        struct ifreq kifr;
        struct ifreq *uifr;
-       struct ifreq32 *ifr32 = compat_ptr(arg);
+       struct ifreq32 *ifr32 = (struct ifreq32 *) arg;
        mm_segment_t old_fs;
        int err;
        u32 data;
@@ -622,7 +624,7 @@ static int bond_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
 int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
        struct ifreq *u_ifreq64;
-       struct ifreq32 *u_ifreq32 = compat_ptr(arg);
+       struct ifreq32 *u_ifreq32 = (struct ifreq32 *) arg;
        char tmp_buf[IFNAMSIZ];
        void *data64;
        u32 data32;
@@ -648,27 +650,23 @@ int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
 static int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
        struct ifreq ifr;
-       struct ifreq32 *uifr32;
-       struct ifmap32 *uifmap32;
        mm_segment_t old_fs;
        int err;
        
-       uifr32 = compat_ptr(arg);
-       uifmap32 = &uifr32->ifr_ifru.ifru_map;
        switch (cmd) {
        case SIOCSIFMAP:
-               err = copy_from_user(&ifr, uifr32, sizeof(ifr.ifr_name));
-               err |= __get_user(ifr.ifr_map.mem_start, &uifmap32->mem_start);
-               err |= __get_user(ifr.ifr_map.mem_end, &uifmap32->mem_end);
-               err |= __get_user(ifr.ifr_map.base_addr, &uifmap32->base_addr);
-               err |= __get_user(ifr.ifr_map.irq, &uifmap32->irq);
-               err |= __get_user(ifr.ifr_map.dma, &uifmap32->dma);
-               err |= __get_user(ifr.ifr_map.port, &uifmap32->port);
+               err = copy_from_user(&ifr, (struct ifreq32 *)arg, sizeof(ifr.ifr_name));
+               err |= __get_user(ifr.ifr_map.mem_start, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_start));
+               err |= __get_user(ifr.ifr_map.mem_end, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_end));
+               err |= __get_user(ifr.ifr_map.base_addr, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.base_addr));
+               err |= __get_user(ifr.ifr_map.irq, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.irq));
+               err |= __get_user(ifr.ifr_map.dma, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.dma));
+               err |= __get_user(ifr.ifr_map.port, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.port));
                if (err)
                        return -EFAULT;
                break;
        default:
-               if (copy_from_user(&ifr, uifr32, sizeof(*uifr32)))
+               if (copy_from_user(&ifr, (struct ifreq32 *)arg, sizeof(struct ifreq32)))
                        return -EFAULT;
                break;
        }
@@ -689,17 +687,17 @@ static int dev_ifsioc(unsigned int fd, unsigned int cmd, unsigned long arg)
                case SIOCGIFDSTADDR:
                case SIOCGIFNETMASK:
                case SIOCGIFTXQLEN:
-                       if (copy_to_user(uifr32, &ifr, sizeof(*uifr32)))
+                       if (copy_to_user((struct ifreq32 *)arg, &ifr, sizeof(struct ifreq32)))
                                return -EFAULT;
                        break;
                case SIOCGIFMAP:
-                       err = copy_to_user(uifr32, &ifr, sizeof(ifr.ifr_name));
-                       err |= __put_user(ifr.ifr_map.mem_start, &uifmap32->mem_start);
-                       err |= __put_user(ifr.ifr_map.mem_end, &uifmap32->mem_end);
-                       err |= __put_user(ifr.ifr_map.base_addr, &uifmap32->base_addr);
-                       err |= __put_user(ifr.ifr_map.irq, &uifmap32->irq);
-                       err |= __put_user(ifr.ifr_map.dma, &uifmap32->dma);
-                       err |= __put_user(ifr.ifr_map.port, &uifmap32->port);
+                       err = copy_to_user((struct ifreq32 *)arg, &ifr, sizeof(ifr.ifr_name));
+                       err |= __put_user(ifr.ifr_map.mem_start, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_start));
+                       err |= __put_user(ifr.ifr_map.mem_end, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.mem_end));
+                       err |= __put_user(ifr.ifr_map.base_addr, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.base_addr));
+                       err |= __put_user(ifr.ifr_map.irq, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.irq));
+                       err |= __put_user(ifr.ifr_map.dma, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.dma));
+                       err |= __put_user(ifr.ifr_map.port, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_map.port));
                        if (err)
                                err = -EFAULT;
                        break;
@@ -753,28 +751,25 @@ static int routing_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
        struct socket *mysock = sockfd_lookup(fd, &ret);
 
        if (mysock && mysock->sk && mysock->sk->sk_family == AF_INET6) { /* ipv6 */
-               struct in6_rtmsg32 *ur6 = compat_ptr(arg);
-               ret = copy_from_user (&r6.rtmsg_dst, &(ur6->rtmsg_dst),
+               ret = copy_from_user (&r6.rtmsg_dst, &(((struct in6_rtmsg32 *)arg)->rtmsg_dst),
                        3 * sizeof(struct in6_addr));
-               ret |= __get_user (r6.rtmsg_type, &(ur6->rtmsg_type));
-               ret |= __get_user (r6.rtmsg_dst_len, &(ur6->rtmsg_dst_len));
-               ret |= __get_user (r6.rtmsg_src_len, &(ur6->rtmsg_src_len));
-               ret |= __get_user (r6.rtmsg_metric, &(ur6->rtmsg_metric));
-               ret |= __get_user (r6.rtmsg_info, &(ur6->rtmsg_info));
-               ret |= __get_user (r6.rtmsg_flags, &(ur6->rtmsg_flags));
-               ret |= __get_user (r6.rtmsg_ifindex, &(ur6->rtmsg_ifindex));
+               ret |= __get_user (r6.rtmsg_type, &(((struct in6_rtmsg32 *)arg)->rtmsg_type));
+               ret |= __get_user (r6.rtmsg_dst_len, &(((struct in6_rtmsg32 *)arg)->rtmsg_dst_len));
+               ret |= __get_user (r6.rtmsg_src_len, &(((struct in6_rtmsg32 *)arg)->rtmsg_src_len));
+               ret |= __get_user (r6.rtmsg_metric, &(((struct in6_rtmsg32 *)arg)->rtmsg_metric));
+               ret |= __get_user (r6.rtmsg_info, &(((struct in6_rtmsg32 *)arg)->rtmsg_info));
+               ret |= __get_user (r6.rtmsg_flags, &(((struct in6_rtmsg32 *)arg)->rtmsg_flags));
+               ret |= __get_user (r6.rtmsg_ifindex, &(((struct in6_rtmsg32 *)arg)->rtmsg_ifindex));
                
                r = (void *) &r6;
        } else { /* ipv4 */
-               struct rtentry32 *ur4 = compat_ptr(arg);
-               ret = copy_from_user (&r4.rt_dst, &(ur4->rt_dst),
-                                       3 * sizeof(struct sockaddr));
-               ret |= __get_user (r4.rt_flags, &(ur4->rt_flags));
-               ret |= __get_user (r4.rt_metric, &(ur4->rt_metric));
-               ret |= __get_user (r4.rt_mtu, &(ur4->rt_mtu));
-               ret |= __get_user (r4.rt_window, &(ur4->rt_window));
-               ret |= __get_user (r4.rt_irtt, &(ur4->rt_irtt));
-               ret |= __get_user (rtdev, &(ur4->rt_dev));
+               ret = copy_from_user (&r4.rt_dst, &(((struct rtentry32 *)arg)->rt_dst), 3 * sizeof(struct sockaddr));
+               ret |= __get_user (r4.rt_flags, &(((struct rtentry32 *)arg)->rt_flags));
+               ret |= __get_user (r4.rt_metric, &(((struct rtentry32 *)arg)->rt_metric));
+               ret |= __get_user (r4.rt_mtu, &(((struct rtentry32 *)arg)->rt_mtu));
+               ret |= __get_user (r4.rt_window, &(((struct rtentry32 *)arg)->rt_window));
+               ret |= __get_user (r4.rt_irtt, &(((struct rtentry32 *)arg)->rt_irtt));
+               ret |= __get_user (rtdev, &(((struct rtentry32 *)arg)->rt_dev));
                if (rtdev) {
                        ret |= copy_from_user (devname, compat_ptr(rtdev), 15);
                        r4.rt_dev = devname; devname[15] = 0;
@@ -788,7 +783,7 @@ static int routing_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
                return -EFAULT;
 
        set_fs (KERNEL_DS);
-       ret = sys_ioctl (fd, cmd, (unsigned long) r);
+       ret = sys_ioctl (fd, cmd, (long) r);
        set_fs (old_fs);
 
        if (mysock)
@@ -808,16 +803,14 @@ static int hdio_getgeo(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
        mm_segment_t old_fs = get_fs();
        struct hd_geometry geo;
-       struct hd_geometry32 *ugeo;
        int err;
        
        set_fs (KERNEL_DS);
        err = sys_ioctl(fd, HDIO_GETGEO, (unsigned long)&geo);
        set_fs (old_fs);
-       ugeo = compat_ptr(arg);
        if (!err) {
-               err = copy_to_user (ugeo, &geo, 4);
-               err |= __put_user (geo.start, &ugeo->start);
+               err = copy_to_user ((struct hd_geometry32 *)arg, &geo, 4);
+               err |= __put_user (geo.start, &(((struct hd_geometry32 *)arg)->start));
        }
        return err ? -EFAULT : 0;
 }
@@ -855,7 +848,7 @@ static int do_cmap_ptr(__u16 **ptr64, __u32 *ptr32)
 
        if (get_user(data, ptr32))
                return -EFAULT;
-       datap = compat_ptr(data);
+       datap = (void *) (unsigned long) data;
        if (put_user(datap, ptr64))
                return -EFAULT;
        return 0;
@@ -868,7 +861,7 @@ static int fb_getput_cmap(unsigned int fd, unsigned int cmd, unsigned long arg)
        int err;
 
        cmap = compat_alloc_user_space(sizeof(*cmap));
-       cmap32 = compat_ptr(arg);
+       cmap32 = (struct fb_cmap32 *) arg;
 
        if (copy_in_user(&cmap->start, &cmap32->start, 2 * sizeof(__u32)))
                return -EFAULT;
@@ -928,7 +921,7 @@ static int fb_get_fscreeninfo(unsigned int fd, unsigned int cmd, unsigned long a
        struct fb_fix_screeninfo32 *fix32;
        int err;
 
-       fix32 = compat_ptr(arg);
+       fix32 = (struct fb_fix_screeninfo32 *) arg;
 
        old_fs = get_fs();
        set_fs(KERNEL_DS);
@@ -982,7 +975,7 @@ static int hdio_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg
        set_fs(old_fs);
 
        if(error == 0) {
-               uvp = compat_ptr(arg);
+               uvp = (unsigned int *)arg;
                if(put_user(kval, uvp))
                        error = -EFAULT;
        }
@@ -1032,12 +1025,12 @@ static int sg_build_iovec(sg_io_hdr_t *sgio, void *dxferp, u16 iovec_count)
 
                if (get_user(base, &iov32[i].iov_base) ||
                    get_user(len, &iov32[i].iov_len) ||
-                   put_user(compat_ptr(base), &iov[i].iov_base) ||
+                   put_user((void *)(unsigned long)base, &iov[i].iov_base) ||
                    put_user(len, &iov[i].iov_len))
                        return -EFAULT;
        }
 
-       sgio->dxferp = iov; /* FIXME: dereferencing user pointer? */
+       sgio->dxferp = iov;
        return 0;
 }
 
@@ -1050,7 +1043,7 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
        void *dxferp;
        int err;
 
-       sgio32 = compat_ptr(arg);
+       sgio32 = (sg_io_hdr32_t *) arg;
        if (get_user(iovec_count, &sgio32->iovec_count))
                return -EFAULT;
 
@@ -1077,7 +1070,7 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
 
        if (get_user(data, &sgio32->dxferp))
                return -EFAULT;
-       dxferp = compat_ptr(data);
+       dxferp = (void *) (unsigned long) data;
        if (iovec_count) {
                if (sg_build_iovec(sgio, dxferp, iovec_count))
                        return -EFAULT;
@@ -1091,11 +1084,11 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
 
                if (get_user(data, &sgio32->cmdp))
                        return -EFAULT;
-               cmdp = compat_ptr(data);
+               cmdp = (unsigned char *) (unsigned long) data;
 
                if (get_user(data, &sgio32->sbp))
                        return -EFAULT;
-               sbp = compat_ptr(data);
+               sbp = (unsigned char *) (unsigned long) data;
 
                if (put_user(cmdp, &sgio->cmdp) ||
                    put_user(sbp, &sgio->sbp))
@@ -1108,7 +1101,7 @@ static int sg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
 
        if (get_user(data, &sgio32->usr_ptr))
                return -EFAULT;
-       if (put_user(compat_ptr(data), &sgio->usr_ptr))
+       if (put_user((void *)(unsigned long)data, &sgio->usr_ptr))
                return -EFAULT;
 
        if (copy_in_user(&sgio->status, &sgio32->status,
@@ -1147,7 +1140,7 @@ struct sock_fprog32 {
 
 static int ppp_sock_fprog_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
-       struct sock_fprog32 *u_fprog32 = compat_ptr(arg);
+       struct sock_fprog32 *u_fprog32 = (struct sock_fprog32 *) arg;
        struct sock_fprog *u_fprog64 = compat_alloc_user_space(sizeof(struct sock_fprog));
        void *fptr64;
        u32 fptr32;
@@ -1192,7 +1185,7 @@ static int ppp_gidle(unsigned int fd, unsigned int cmd, unsigned long arg)
        int err;
 
        idle = compat_alloc_user_space(sizeof(*idle));
-       idle32 = compat_ptr(arg);
+       idle32 = (struct ppp_idle32 *) arg;
 
        err = sys_ioctl(fd, PPPIOCGIDLE, (unsigned long) idle);
 
@@ -1214,12 +1207,12 @@ static int ppp_scompress(unsigned int fd, unsigned int cmd, unsigned long arg)
        void *datap;
 
        odata = compat_alloc_user_space(sizeof(*odata));
-       odata32 = compat_ptr(arg);
+       odata32 = (struct ppp_option_data32 *) arg;
 
        if (get_user(data, &odata32->ptr))
                return -EFAULT;
 
-       datap = compat_ptr(data);
+       datap = (void *) (unsigned long) data;
        if (put_user(datap, &odata->ptr))
                return -EFAULT;
 
@@ -1303,11 +1296,8 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
        mm_segment_t old_fs = get_fs();
        struct mtconfiginfo info;
-       struct mtconfiginfo32 *uinfo32;
        struct mtget get;
-       struct mtget32 *umget32;
        struct mtpos pos;
-       struct mtpos32 *upos32;
        unsigned long kcmd;
        void *karg;
        int err = 0;
@@ -1328,17 +1318,15 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
        case MTIOCSETCONFIG32:
                kcmd = MTIOCSETCONFIG;
                karg = &info;
-               uinfo32 = compat_ptr(arg);
-               err = __get_user(info.mt_type, &uinfo32->mt_type);
-               err |= __get_user(info.ifc_type, &uinfo32->ifc_type);
-               err |= __get_user(info.irqnr, &uinfo32->irqnr);
-               err |= __get_user(info.dmanr, &uinfo32->dmanr);
-               err |= __get_user(info.port, &uinfo32->port);
-               err |= __get_user(info.debug, &uinfo32->debug);
-               err |= __copy_from_user((char *)&info.debug
-                                    + sizeof(info.debug),
-                                    (char *)&uinfo32->debug
-                                    + sizeof(uinfo32->debug), sizeof(__u32));
+               err = __get_user(info.mt_type, &((struct mtconfiginfo32 *)arg)->mt_type);
+               err |= __get_user(info.ifc_type, &((struct mtconfiginfo32 *)arg)->ifc_type);
+               err |= __get_user(info.irqnr, &((struct mtconfiginfo32 *)arg)->irqnr);
+               err |= __get_user(info.dmanr, &((struct mtconfiginfo32 *)arg)->dmanr);
+               err |= __get_user(info.port, &((struct mtconfiginfo32 *)arg)->port);
+               err |= __get_user(info.debug, &((struct mtconfiginfo32 *)arg)->debug);
+               err |= __copy_from_user((char *)&info.debug + sizeof(info.debug),
+                                    (char *)&((struct mtconfiginfo32 *)arg)->debug
+                                    + sizeof(((struct mtconfiginfo32 *)arg)->debug), sizeof(__u32));
                if (err)
                        return -EFAULT;
                break;
@@ -1359,29 +1347,26 @@ static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
                return err;
        switch (cmd) {
        case MTIOCPOS32:
-               upos32 = compat_ptr(arg);
-               err = __put_user(pos.mt_blkno, &upos32->mt_blkno);
+               err = __put_user(pos.mt_blkno, &((struct mtpos32 *)arg)->mt_blkno);
                break;
        case MTIOCGET32:
-               umget32 = compat_ptr(arg);
-               err = __put_user(get.mt_type, &umget32->mt_type);
-               err |= __put_user(get.mt_resid, &umget32->mt_resid);
-               err |= __put_user(get.mt_dsreg, &umget32->mt_dsreg);
-               err |= __put_user(get.mt_gstat, &umget32->mt_gstat);
-               err |= __put_user(get.mt_erreg, &umget32->mt_erreg);
-               err |= __put_user(get.mt_fileno, &umget32->mt_fileno);
-               err |= __put_user(get.mt_blkno, &umget32->mt_blkno);
+               err = __put_user(get.mt_type, &((struct mtget32 *)arg)->mt_type);
+               err |= __put_user(get.mt_resid, &((struct mtget32 *)arg)->mt_resid);
+               err |= __put_user(get.mt_dsreg, &((struct mtget32 *)arg)->mt_dsreg);
+               err |= __put_user(get.mt_gstat, &((struct mtget32 *)arg)->mt_gstat);
+               err |= __put_user(get.mt_erreg, &((struct mtget32 *)arg)->mt_erreg);
+               err |= __put_user(get.mt_fileno, &((struct mtget32 *)arg)->mt_fileno);
+               err |= __put_user(get.mt_blkno, &((struct mtget32 *)arg)->mt_blkno);
                break;
        case MTIOCGETCONFIG32:
-               uinfo32 = compat_ptr(arg);
-               err = __put_user(info.mt_type, &uinfo32->mt_type);
-               err |= __put_user(info.ifc_type, &uinfo32->ifc_type);
-               err |= __put_user(info.irqnr, &uinfo32->irqnr);
-               err |= __put_user(info.dmanr, &uinfo32->dmanr);
-               err |= __put_user(info.port, &uinfo32->port);
-               err |= __put_user(info.debug, &uinfo32->debug);
-               err |= __copy_to_user((char *)&uinfo32->debug
-                                          + sizeof(uinfo32->debug),
+               err = __put_user(info.mt_type, &((struct mtconfiginfo32 *)arg)->mt_type);
+               err |= __put_user(info.ifc_type, &((struct mtconfiginfo32 *)arg)->ifc_type);
+               err |= __put_user(info.irqnr, &((struct mtconfiginfo32 *)arg)->irqnr);
+               err |= __put_user(info.dmanr, &((struct mtconfiginfo32 *)arg)->dmanr);
+               err |= __put_user(info.port, &((struct mtconfiginfo32 *)arg)->port);
+               err |= __put_user(info.debug, &((struct mtconfiginfo32 *)arg)->debug);
+               err |= __copy_to_user((char *)&((struct mtconfiginfo32 *)arg)->debug
+                                          + sizeof(((struct mtconfiginfo32 *)arg)->debug),
                                           (char *)&info.debug + sizeof(info.debug), sizeof(__u32));
                break;
        case MTIOCSETCONFIG32:
@@ -1417,7 +1402,7 @@ static int cdrom_do_read_audio(unsigned int fd, unsigned int cmd, unsigned long
        void *datap;
 
        cdread_audio = compat_alloc_user_space(sizeof(*cdread_audio));
-       cdread_audio32 = compat_ptr(arg);
+       cdread_audio32 = (struct cdrom_read_audio32 *) arg;
 
        if (copy_in_user(&cdread_audio->addr,
                         &cdread_audio32->addr,
@@ -1427,7 +1412,7 @@ static int cdrom_do_read_audio(unsigned int fd, unsigned int cmd, unsigned long
 
        if (get_user(data, &cdread_audio32->buf))
                return -EFAULT;
-       datap = compat_ptr(data);
+       datap = (void *) (unsigned long) data;
        if (put_user(datap, &cdread_audio->buf))
                return -EFAULT;
 
@@ -1441,7 +1426,7 @@ static int __cgc_do_ptr(void **ptr64, __u32 *ptr32)
 
        if (get_user(data, ptr32))
                return -EFAULT;
-       datap = compat_ptr(data);
+       datap = (void *) (unsigned long) data;
        if (put_user(datap, ptr64))
                return -EFAULT;
 
@@ -1455,7 +1440,7 @@ static int cdrom_do_generic_command(unsigned int fd, unsigned int cmd, unsigned
        unsigned char dir;
 
        cgc = compat_alloc_user_space(sizeof(*cgc));
-       cgc32 = compat_ptr(arg);
+       cgc32 = (struct cdrom_generic_command32 *) arg;
 
        if (copy_in_user(&cgc->cmd, &cgc32->cmd, sizeof(cgc->cmd)) ||
            __cgc_do_ptr((void **) &cgc->buffer, &cgc32->buffer) ||
@@ -1525,18 +1510,16 @@ static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
        mm_segment_t old_fs = get_fs();
        struct loop_info l;
-       struct loop_info32 *ul;
        int err = -EINVAL;
 
-       ul = compat_ptr(arg);
        switch(cmd) {
        case LOOP_SET_STATUS:
-               err = get_user(l.lo_number, &ul->lo_number);
-               err |= __get_user(l.lo_device, &ul->lo_device);
-               err |= __get_user(l.lo_inode, &ul->lo_inode);
-               err |= __get_user(l.lo_rdevice, &ul->lo_rdevice);
-               err |= __copy_from_user(&l.lo_offset, &ul->lo_offset,
-                       8 + (unsigned long)l.lo_init - (unsigned long)&l.lo_offset);
+               err = get_user(l.lo_number, &((struct loop_info32 *)arg)->lo_number);
+               err |= __get_user(l.lo_device, &((struct loop_info32 *)arg)->lo_device);
+               err |= __get_user(l.lo_inode, &((struct loop_info32 *)arg)->lo_inode);
+               err |= __get_user(l.lo_rdevice, &((struct loop_info32 *)arg)->lo_rdevice);
+               err |= __copy_from_user((char *)&l.lo_offset, (char *)&((struct loop_info32 *)arg)->lo_offset,
+                                          8 + (unsigned long)l.lo_init - (unsigned long)&l.lo_offset);
                if (err) {
                        err = -EFAULT;
                } else {
@@ -1550,12 +1533,12 @@ static int loop_status(unsigned int fd, unsigned int cmd, unsigned long arg)
                err = sys_ioctl (fd, cmd, (unsigned long)&l);
                set_fs (old_fs);
                if (!err) {
-                       err = put_user(l.lo_number, &ul->lo_number);
-                       err |= __put_user(l.lo_device, &ul->lo_device);
-                       err |= __put_user(l.lo_inode, &ul->lo_inode);
-                       err |= __put_user(l.lo_rdevice, &ul->lo_rdevice);
-                       err |= __copy_to_user(&ul->lo_offset, &l.lo_offset,
-                               (unsigned long)l.lo_init - (unsigned long)&l.lo_offset);
+                       err = put_user(l.lo_number, &((struct loop_info32 *)arg)->lo_number);
+                       err |= __put_user(l.lo_device, &((struct loop_info32 *)arg)->lo_device);
+                       err |= __put_user(l.lo_inode, &((struct loop_info32 *)arg)->lo_inode);
+                       err |= __put_user(l.lo_rdevice, &((struct loop_info32 *)arg)->lo_rdevice);
+                       err |= __copy_to_user((char *)&((struct loop_info32 *)arg)->lo_offset,
+                                          (char *)&l.lo_offset, (unsigned long)l.lo_init - (unsigned long)&l.lo_offset);
                        if (err)
                                err = -EFAULT;
                }
@@ -1605,11 +1588,10 @@ struct consolefontdesc32 {
        compat_caddr_t chardata;        /* font data in expanded form */
 };
 
-static int do_fontx_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file)
+static int do_fontx_ioctl(unsigned int fd, int cmd, struct consolefontdesc32 *user_cfd, struct file *file)
 {
        struct consolefontdesc cfdarg;
        struct console_font_op op;
-       struct consolefontdesc32 *user_cfd = compat_ptr(arg);
        int i, perm;
 
        perm = vt_check(file);
@@ -1661,10 +1643,9 @@ struct console_font_op32 {
        compat_caddr_t data;    /* font data with height fixed to 32 */
 };
                                         
-static int do_kdfontop_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file)
+static int do_kdfontop_ioctl(unsigned int fd, unsigned int cmd, struct console_font_op32 *fontop, struct file *file)
 {
        struct console_font_op op;
-       struct console_font_op32 *fontop = compat_ptr(arg);
        int perm = vt_check(file), i;
        struct vt_struct *vt;
        
@@ -1690,10 +1671,9 @@ struct unimapdesc32 {
        compat_caddr_t entries;
 };
 
-static int do_unimap_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file)
+static int do_unimap_ioctl(unsigned int fd, unsigned int cmd, struct unimapdesc32 *user_ud, struct file *file)
 {
        struct unimapdesc32 tmp;
-       struct unimapdesc32 *user_ud = compat_ptr(arg);
        int perm = vt_check(file);
        
        if (perm < 0) return perm;
@@ -1724,7 +1704,7 @@ static int do_smb_getmountuid(unsigned int fd, unsigned int cmd, unsigned long a
        set_fs(old_fs);
 
        if (err >= 0)
-               err = put_user(kuid, (compat_pid_t *)compat_ptr(arg));
+               err = put_user(kuid, (compat_uid_t *)arg);
 
        return err;
 }
@@ -1793,12 +1773,12 @@ static int do_atm_iobuf(unsigned int fd, unsigned int cmd, unsigned long arg)
        int len, err;
 
        iobuf = compat_alloc_user_space(sizeof(*iobuf));
-       iobuf32 = compat_ptr(arg);
+       iobuf32 = (struct atm_iobuf32 *) arg;
 
        if (get_user(len, &iobuf32->length) ||
            get_user(data, &iobuf32->buffer))
                return -EFAULT;
-       datap = compat_ptr(data);
+       datap = (void *) (unsigned long) data;
        if (put_user(len, &iobuf->length) ||
            put_user(datap, &iobuf->buffer))
                return -EFAULT;
@@ -1823,12 +1803,12 @@ static int do_atmif_sioc(unsigned int fd, unsigned int cmd, unsigned long arg)
        int err;
         
        sioc = compat_alloc_user_space(sizeof(*sioc));
-       sioc32 = compat_ptr(arg);
+       sioc32 = (struct atmif_sioc32 *) arg;
 
        if (copy_in_user(&sioc->number, &sioc32->number, 2 * sizeof(int)) ||
            get_user(data, &sioc32->arg))
                return -EFAULT;
-       datap = compat_ptr(data);
+       datap = (void *) (unsigned long) data;
        if (put_user(datap, &sioc->arg))
                return -EFAULT;
 
@@ -1911,32 +1891,25 @@ struct blkpg_ioctl_arg32 {
        compat_int_t datalen;
        compat_caddr_t data;
 };
-
-static int blkpg_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
+                                
+static int blkpg_ioctl_trans(unsigned int fd, unsigned int cmd, struct blkpg_ioctl_arg32 *arg)
 {
        struct blkpg_ioctl_arg a;
-       struct blkpg_ioctl_arg32 *ua32;
        struct blkpg_partition p;
-       struct blkpg_partition *up32;
-       compat_caddr_t udata;
        int err;
        mm_segment_t old_fs = get_fs();
        
-       ua32 = compat_ptr(arg);
-       err = get_user(a.op, &ua32->op);
-       err |= __get_user(a.flags, &ua32->flags);
-       err |= __get_user(a.datalen, &ua32->datalen);
-       err |= __get_user(udata, &ua32->data);
-       up32 = compat_ptr(udata);
-       if (err)
-               return err;
-
+       err = get_user(a.op, &arg->op);
+       err |= __get_user(a.flags, &arg->flags);
+       err |= __get_user(a.datalen, &arg->datalen);
+       err |= __get_user((long)a.data, &arg->data);
+       if (err) return err;
        switch (a.op) {
        case BLKPG_ADD_PARTITION:
        case BLKPG_DEL_PARTITION:
                if (a.datalen < sizeof(struct blkpg_partition))
                        return -EINVAL;
-                if (copy_from_user(&p, up32, sizeof(struct blkpg_partition)))
+                if (copy_from_user(&p, a.data, sizeof(struct blkpg_partition)))
                        return -EFAULT;
                a.data = &p;
                set_fs (KERNEL_DS);
@@ -1960,18 +1933,18 @@ static int ioc_settimeout(unsigned int fd, unsigned int cmd, unsigned long arg)
 
 static int do_blkbszget(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
-       return sys_ioctl(fd, BLKBSZGET, (unsigned long)compat_ptr(arg));
+       return sys_ioctl(fd, BLKBSZGET, arg);
 }
 
 static int do_blkbszset(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
-       return sys_ioctl(fd, BLKBSZSET, (unsigned long)compat_ptr(arg));
+       return sys_ioctl(fd, BLKBSZSET, arg);
 }
 
 static int do_blkgetsize64(unsigned int fd, unsigned int cmd,
                           unsigned long arg)
 {
-       return sys_ioctl(fd, BLKGETSIZE64, (unsigned long)compat_ptr(arg));
+       return sys_ioctl(fd, BLKGETSIZE64, arg);
 }
 
 /* Bluetooth ioctls */
@@ -2108,25 +2081,23 @@ static int fd_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
                case FDDEFPRM32:
                case FDGETPRM32:
                {
-                       struct floppy_struct32 *uf;
                        struct floppy_struct *f;
 
-                       uf = compat_ptr(arg);
                        f = karg = kmalloc(sizeof(struct floppy_struct), GFP_KERNEL);
                        if (!karg)
                                return -ENOMEM;
                        if (cmd == FDGETPRM32)
                                break;
-                       err = __get_user(f->size, &uf->size);
-                       err |= __get_user(f->sect, &uf->sect);
-                       err |= __get_user(f->head, &uf->head);
-                       err |= __get_user(f->track, &uf->track);
-                       err |= __get_user(f->stretch, &uf->stretch);
-                       err |= __get_user(f->gap, &uf->gap);
-                       err |= __get_user(f->rate, &uf->rate);
-                       err |= __get_user(f->spec1, &uf->spec1);
-                       err |= __get_user(f->fmt_gap, &uf->fmt_gap);
-                       err |= __get_user((u64)f->name, &uf->name);
+                       err = __get_user(f->size, &((struct floppy_struct32 *)arg)->size);
+                       err |= __get_user(f->sect, &((struct floppy_struct32 *)arg)->sect);
+                       err |= __get_user(f->head, &((struct floppy_struct32 *)arg)->head);
+                       err |= __get_user(f->track, &((struct floppy_struct32 *)arg)->track);
+                       err |= __get_user(f->stretch, &((struct floppy_struct32 *)arg)->stretch);
+                       err |= __get_user(f->gap, &((struct floppy_struct32 *)arg)->gap);
+                       err |= __get_user(f->rate, &((struct floppy_struct32 *)arg)->rate);
+                       err |= __get_user(f->spec1, &((struct floppy_struct32 *)arg)->spec1);
+                       err |= __get_user(f->fmt_gap, &((struct floppy_struct32 *)arg)->fmt_gap);
+                       err |= __get_user((u64)f->name, &((struct floppy_struct32 *)arg)->name);
                        if (err) {
                                err = -EFAULT;
                                goto out;
@@ -2136,34 +2107,32 @@ static int fd_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
                case FDSETDRVPRM32:
                case FDGETDRVPRM32:
                {
-                       struct floppy_drive_params32 *uf;
                        struct floppy_drive_params *f;
 
-                       uf = compat_ptr(arg);
                        f = karg = kmalloc(sizeof(struct floppy_drive_params), GFP_KERNEL);
                        if (!karg)
                                return -ENOMEM;
                        if (cmd == FDGETDRVPRM32)
                                break;
-                       err = __get_user(f->cmos, &uf->cmos);
-                       err |= __get_user(f->max_dtr, &uf->max_dtr);
-                       err |= __get_user(f->hlt, &uf->hlt);
-                       err |= __get_user(f->hut, &uf->hut);
-                       err |= __get_user(f->srt, &uf->srt);
-                       err |= __get_user(f->spinup, &uf->spinup);
-                       err |= __get_user(f->spindown, &uf->spindown);
-                       err |= __get_user(f->spindown_offset, &uf->spindown_offset);
-                       err |= __get_user(f->select_delay, &uf->select_delay);
-                       err |= __get_user(f->rps, &uf->rps);
-                       err |= __get_user(f->tracks, &uf->tracks);
-                       err |= __get_user(f->timeout, &uf->timeout);
-                       err |= __get_user(f->interleave_sect, &uf->interleave_sect);
-                       err |= __copy_from_user(&f->max_errors, &uf->max_errors, sizeof(f->max_errors));
-                       err |= __get_user(f->flags, &uf->flags);
-                       err |= __get_user(f->read_track, &uf->read_track);
-                       err |= __copy_from_user(f->autodetect, uf->autodetect, sizeof(f->autodetect));
-                       err |= __get_user(f->checkfreq, &uf->checkfreq);
-                       err |= __get_user(f->native_format, &uf->native_format);
+                       err = __get_user(f->cmos, &((struct floppy_drive_params32 *)arg)->cmos);
+                       err |= __get_user(f->max_dtr, &((struct floppy_drive_params32 *)arg)->max_dtr);
+                       err |= __get_user(f->hlt, &((struct floppy_drive_params32 *)arg)->hlt);
+                       err |= __get_user(f->hut, &((struct floppy_drive_params32 *)arg)->hut);
+                       err |= __get_user(f->srt, &((struct floppy_drive_params32 *)arg)->srt);
+                       err |= __get_user(f->spinup, &((struct floppy_drive_params32 *)arg)->spinup);
+                       err |= __get_user(f->spindown, &((struct floppy_drive_params32 *)arg)->spindown);
+                       err |= __get_user(f->spindown_offset, &((struct floppy_drive_params32 *)arg)->spindown_offset);
+                       err |= __get_user(f->select_delay, &((struct floppy_drive_params32 *)arg)->select_delay);
+                       err |= __get_user(f->rps, &((struct floppy_drive_params32 *)arg)->rps);
+                       err |= __get_user(f->tracks, &((struct floppy_drive_params32 *)arg)->tracks);
+                       err |= __get_user(f->timeout, &((struct floppy_drive_params32 *)arg)->timeout);
+                       err |= __get_user(f->interleave_sect, &((struct floppy_drive_params32 *)arg)->interleave_sect);
+                       err |= __copy_from_user(&f->max_errors, &((struct floppy_drive_params32 *)arg)->max_errors, sizeof(f->max_errors));
+                       err |= __get_user(f->flags, &((struct floppy_drive_params32 *)arg)->flags);
+                       err |= __get_user(f->read_track, &((struct floppy_drive_params32 *)arg)->read_track);
+                       err |= __copy_from_user(f->autodetect, ((struct floppy_drive_params32 *)arg)->autodetect, sizeof(f->autodetect));
+                       err |= __get_user(f->checkfreq, &((struct floppy_drive_params32 *)arg)->checkfreq);
+                       err |= __get_user(f->native_format, &((struct floppy_drive_params32 *)arg)->native_format);
                        if (err) {
                                err = -EFAULT;
                                goto out;
@@ -2208,90 +2177,83 @@ static int fd_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg)
                        err |= __put_user(f->rate, &((struct floppy_struct32 *)arg)->rate);
                        err |= __put_user(f->spec1, &((struct floppy_struct32 *)arg)->spec1);
                        err |= __put_user(f->fmt_gap, &((struct floppy_struct32 *)arg)->fmt_gap);
-                       err |= __put_user((u64)f->name, (compat_caddr_t*)&((struct floppy_struct32 *)arg)->name);
+                       err |= __put_user((u64)f->name, &((struct floppy_struct32 *)arg)->name);
                        break;
                }
                case FDGETDRVPRM32:
                {
-                       struct floppy_drive_params32 *uf;
                        struct floppy_drive_params *f = karg;
 
-                       uf = compat_ptr(arg);
-                       err = __put_user(f->cmos, &uf->cmos);
-                       err |= __put_user(f->max_dtr, &uf->max_dtr);
-                       err |= __put_user(f->hlt, &uf->hlt);
-                       err |= __put_user(f->hut, &uf->hut);
-                       err |= __put_user(f->srt, &uf->srt);
-                       err |= __put_user(f->spinup, &uf->spinup);
-                       err |= __put_user(f->spindown, &uf->spindown);
-                       err |= __put_user(f->spindown_offset, &uf->spindown_offset);
-                       err |= __put_user(f->select_delay, &uf->select_delay);
-                       err |= __put_user(f->rps, &uf->rps);
-                       err |= __put_user(f->tracks, &uf->tracks);
-                       err |= __put_user(f->timeout, &uf->timeout);
-                       err |= __put_user(f->interleave_sect, &uf->interleave_sect);
-                       err |= __copy_to_user(&uf->max_errors, &f->max_errors, sizeof(f->max_errors));
-                       err |= __put_user(f->flags, &uf->flags);
-                       err |= __put_user(f->read_track, &uf->read_track);
-                       err |= __copy_to_user(uf->autodetect, f->autodetect, sizeof(f->autodetect));
-                       err |= __put_user(f->checkfreq, &uf->checkfreq);
-                       err |= __put_user(f->native_format, &uf->native_format);
+                       err = __put_user(f->cmos, &((struct floppy_drive_params32 *)arg)->cmos);
+                       err |= __put_user(f->max_dtr, &((struct floppy_drive_params32 *)arg)->max_dtr);
+                       err |= __put_user(f->hlt, &((struct floppy_drive_params32 *)arg)->hlt);
+                       err |= __put_user(f->hut, &((struct floppy_drive_params32 *)arg)->hut);
+                       err |= __put_user(f->srt, &((struct floppy_drive_params32 *)arg)->srt);
+                       err |= __put_user(f->spinup, &((struct floppy_drive_params32 *)arg)->spinup);
+                       err |= __put_user(f->spindown, &((struct floppy_drive_params32 *)arg)->spindown);
+                       err |= __put_user(f->spindown_offset, &((struct floppy_drive_params32 *)arg)->spindown_offset);
+                       err |= __put_user(f->select_delay, &((struct floppy_drive_params32 *)arg)->select_delay);
+                       err |= __put_user(f->rps, &((struct floppy_drive_params32 *)arg)->rps);
+                       err |= __put_user(f->tracks, &((struct floppy_drive_params32 *)arg)->tracks);
+                       err |= __put_user(f->timeout, &((struct floppy_drive_params32 *)arg)->timeout);
+                       err |= __put_user(f->interleave_sect, &((struct floppy_drive_params32 *)arg)->interleave_sect);
+                       err |= __copy_to_user(&((struct floppy_drive_params32 *)arg)->max_errors, &f->max_errors, sizeof(f->max_errors));
+                       err |= __put_user(f->flags, &((struct floppy_drive_params32 *)arg)->flags);
+                       err |= __put_user(f->read_track, &((struct floppy_drive_params32 *)arg)->read_track);
+                       err |= __copy_to_user(((struct floppy_drive_params32 *)arg)->autodetect, f->autodetect, sizeof(f->autodetect));
+                       err |= __put_user(f->checkfreq, &((struct floppy_drive_params32 *)arg)->checkfreq);
+                       err |= __put_user(f->native_format, &((struct floppy_drive_params32 *)arg)->native_format);
                        break;
                }
                case FDGETDRVSTAT32:
                case FDPOLLDRVSTAT32:
                {
-                       struct floppy_drive_struct32 *uf;
                        struct floppy_drive_struct *f = karg;
 
-                       uf = compat_ptr(arg);
-                       err = __put_user(f->flags, &uf->flags);
-                       err |= __put_user(f->spinup_date, &uf->spinup_date);
-                       err |= __put_user(f->select_date, &uf->select_date);
-                       err |= __put_user(f->first_read_date, &uf->first_read_date);
-                       err |= __put_user(f->probed_format, &uf->probed_format);
-                       err |= __put_user(f->track, &uf->track);
-                       err |= __put_user(f->maxblock, &uf->maxblock);
-                       err |= __put_user(f->maxtrack, &uf->maxtrack);
-                       err |= __put_user(f->generation, &uf->generation);
-                       err |= __put_user(f->keep_data, &uf->keep_data);
-                       err |= __put_user(f->fd_ref, &uf->fd_ref);
-                       err |= __put_user(f->fd_device, &uf->fd_device);
-                       err |= __put_user(f->last_checked, &uf->last_checked);
-                       err |= __put_user((u64)f->dmabuf, &uf->dmabuf);
-                       err |= __put_user((u64)f->bufblocks, &uf->bufblocks);
+                       err = __put_user(f->flags, &((struct floppy_drive_struct32 *)arg)->flags);
+                       err |= __put_user(f->spinup_date, &((struct floppy_drive_struct32 *)arg)->spinup_date);
+                       err |= __put_user(f->select_date, &((struct floppy_drive_struct32 *)arg)->select_date);
+                       err |= __put_user(f->first_read_date, &((struct floppy_drive_struct32 *)arg)->first_read_date);
+                       err |= __put_user(f->probed_format, &((struct floppy_drive_struct32 *)arg)->probed_format);
+                       err |= __put_user(f->track, &((struct floppy_drive_struct32 *)arg)->track);
+                       err |= __put_user(f->maxblock, &((struct floppy_drive_struct32 *)arg)->maxblock);
+                       err |= __put_user(f->maxtrack, &((struct floppy_drive_struct32 *)arg)->maxtrack);
+                       err |= __put_user(f->generation, &((struct floppy_drive_struct32 *)arg)->generation);
+                       err |= __put_user(f->keep_data, &((struct floppy_drive_struct32 *)arg)->keep_data);
+                       err |= __put_user(f->fd_ref, &((struct floppy_drive_struct32 *)arg)->fd_ref);
+                       err |= __put_user(f->fd_device, &((struct floppy_drive_struct32 *)arg)->fd_device);
+                       err |= __put_user(f->last_checked, &((struct floppy_drive_struct32 *)arg)->last_checked);
+                       err |= __put_user((u64)f->dmabuf, &((struct floppy_drive_struct32 *)arg)->dmabuf);
+                       err |= __put_user((u64)f->bufblocks, &((struct floppy_drive_struct32 *)arg)->bufblocks);
                        break;
                }
                case FDGETFDCSTAT32:
                {
-                       struct floppy_fdc_state32 *uf;
                        struct floppy_fdc_state *f = karg;
 
-                       uf = compat_ptr(arg);
-                       err = __put_user(f->spec1, &uf->spec1);
-                       err |= __put_user(f->spec2, &uf->spec2);
-                       err |= __put_user(f->dtr, &uf->dtr);
-                       err |= __put_user(f->version, &uf->version);
-                       err |= __put_user(f->dor, &uf->dor);
-                       err |= __put_user(f->address, &uf->address);
-                       err |= __copy_to_user((char *)&uf->address + sizeof(uf->address),
+                       err = __put_user(f->spec1, &((struct floppy_fdc_state32 *)arg)->spec1);
+                       err |= __put_user(f->spec2, &((struct floppy_fdc_state32 *)arg)->spec2);
+                       err |= __put_user(f->dtr, &((struct floppy_fdc_state32 *)arg)->dtr);
+                       err |= __put_user(f->version, &((struct floppy_fdc_state32 *)arg)->version);
+                       err |= __put_user(f->dor, &((struct floppy_fdc_state32 *)arg)->dor);
+                       err |= __put_user(f->address, &((struct floppy_fdc_state32 *)arg)->address);
+                       err |= __copy_to_user((char *)&((struct floppy_fdc_state32 *)arg)->address
+                                          + sizeof(((struct floppy_fdc_state32 *)arg)->address),
                                           (char *)&f->address + sizeof(f->address), sizeof(int));
-                       err |= __put_user(f->driver_version, &uf->driver_version);
-                       err |= __copy_to_user(uf->track, f->track, sizeof(f->track));
+                       err |= __put_user(f->driver_version, &((struct floppy_fdc_state32 *)arg)->driver_version);
+                       err |= __copy_to_user(((struct floppy_fdc_state32 *)arg)->track, f->track, sizeof(f->track));
                        break;
                }
                case FDWERRORGET32:
                {
-                       struct floppy_write_errors32 *uf;
                        struct floppy_write_errors *f = karg;
 
-                       uf = compat_ptr(arg);
-                       err = __put_user(f->write_errors, &uf->write_errors);
-                       err |= __put_user(f->first_error_sector, &uf->first_error_sector);
-                       err |= __put_user(f->first_error_generation, &uf->first_error_generation);
-                       err |= __put_user(f->last_error_sector, &uf->last_error_sector);
-                       err |= __put_user(f->last_error_generation, &uf->last_error_generation);
-                       err |= __put_user(f->badness, &uf->badness);
+                       err = __put_user(f->write_errors, &((struct floppy_write_errors32 *)arg)->write_errors);
+                       err |= __put_user(f->first_error_sector, &((struct floppy_write_errors32 *)arg)->first_error_sector);
+                       err |= __put_user(f->first_error_generation, &((struct floppy_write_errors32 *)arg)->first_error_generation);
+                       err |= __put_user(f->last_error_sector, &((struct floppy_write_errors32 *)arg)->last_error_sector);
+                       err |= __put_user(f->last_error_generation, &((struct floppy_write_errors32 *)arg)->last_error_generation);
+                       err |= __put_user(f->badness, &((struct floppy_write_errors32 *)arg)->badness);
                        break;
                }
                default:
@@ -2316,7 +2278,7 @@ struct mtd_oob_buf32 {
 static int mtd_rw_oob(unsigned int fd, unsigned int cmd, unsigned long arg)
 {
        struct mtd_oob_buf      *buf = compat_alloc_user_space(sizeof(*buf));
-       struct mtd_oob_buf32    *buf32 = compat_ptr(arg);
+       struct mtd_oob_buf32    *buf32 = (struct mtd_oob_buf32 *) arg;
        u32 data;
        char *datap;
        unsigned int real_cmd;
@@ -2329,7 +2291,7 @@ static int mtd_rw_oob(unsigned int fd, unsigned int cmd, unsigned long arg)
                         2 * sizeof(u32)) ||
            get_user(data, &buf32->ptr))
                return -EFAULT;
-       datap = compat_ptr(data);
+       datap = (void *) (unsigned long) data;
        if (put_user(datap, &buf->ptr))
                return -EFAULT;
 
@@ -2363,7 +2325,7 @@ put_dirent32 (struct dirent *d, struct compat_dirent *d32)
         return ret;
 }
 
-static int vfat_ioctl32(unsigned fd, unsigned cmd, unsigned long arg)
+static int vfat_ioctl32(unsigned fd, unsigned cmd,  void *ptr)
 {
        int ret;
        mm_segment_t oldfs = get_fs();
@@ -2383,8 +2345,8 @@ static int vfat_ioctl32(unsigned fd, unsigned cmd, unsigned long arg)
        ret = sys_ioctl(fd,cmd,(unsigned long)&d);
        set_fs(oldfs);
        if (ret >= 0) {
-               ret |= put_dirent32(&d[0], (struct compat_dirent *)compat_ptr(arg));
-               ret |= put_dirent32(&d[1], ((struct compat_dirent *)compat_ptr(arg)) + 1);
+               ret |= put_dirent32(&d[0], (struct compat_dirent *)ptr);
+               ret |= put_dirent32(&d[1], ((struct compat_dirent *)ptr) + 1);
        }
        return ret;
 }
@@ -2444,7 +2406,7 @@ static int set_raw32_request(struct raw_config_request *req, struct raw32_config
         return ret;
 }
 
-static int raw_ioctl(unsigned fd, unsigned cmd, unsigned long arg)
+static int raw_ioctl(unsigned fd, unsigned cmd,  void *ptr)
 {
         int ret;
 
@@ -2452,7 +2414,7 @@ static int raw_ioctl(unsigned fd, unsigned cmd, unsigned long arg)
         case RAW_SETBIND:
         case RAW_GETBIND: {
                 struct raw_config_request req;
-                struct raw32_config_request *user_req = compat_ptr(arg);
+                struct raw32_config_request *user_req = ptr;
                 mm_segment_t oldfs = get_fs();
 
                 if ((ret = get_raw32_request(&req, user_req)))
@@ -2468,7 +2430,7 @@ static int raw_ioctl(unsigned fd, unsigned cmd, unsigned long arg)
                 break;
         }
         default:
-                ret = sys_ioctl(fd, cmd, arg);
+                ret = sys_ioctl(fd,cmd,(unsigned long)ptr);
                 break;
         }
         return ret;
@@ -2492,15 +2454,14 @@ struct serial_struct32 {
         compat_uint_t   iomem_base;
         unsigned short  iomem_reg_shift;
         unsigned int    port_high;
-     /* compat_ulong_t  iomap_base FIXME */
         compat_int_t    reserved[1];
 };
 
-static int serial_struct_ioctl(unsigned fd, unsigned cmd, unsigned long arg)
+static int serial_struct_ioctl(unsigned fd, unsigned cmd,  void *ptr)
 {
         typedef struct serial_struct SS;
         typedef struct serial_struct32 SS32;
-        struct serial_struct32 *ss32 = compat_ptr(arg);
+        struct serial_struct32 *ss32 = ptr;
         int err;
         struct serial_struct ss;
         mm_segment_t oldseg = get_fs();
@@ -2554,7 +2515,7 @@ static int do_usbdevfs_control(unsigned int fd, unsigned int cmd, unsigned long
         void *uptr, *kptr;
         int err;
 
-        uctrl = compat_ptr(arg);
+        uctrl = (struct usbdevfs_ctrltransfer32 *) arg;
 
         if (copy_from_user(&kctrl, uctrl,
                            (sizeof(struct usbdevfs_ctrltransfer32) -
@@ -2615,7 +2576,7 @@ static int do_usbdevfs_bulk(unsigned int fd, unsigned int cmd, unsigned long arg
         void *uptr, *kptr;
         int err;
 
-       ubulk = compat_ptr(arg);
+       ubulk = (struct usbdevfs_bulktransfer32 *) arg;
 
         if (get_user(kbulk.ep, &ubulk->ep) ||
             get_user(kbulk.len, &ubulk->len) ||
@@ -2810,7 +2771,7 @@ static int do_usbdevfs_urb(unsigned int fd, unsigned int cmd, unsigned long arg)
        unsigned int buflen;
        int err;
 
-       uurb = compat_ptr(arg);
+       uurb = (struct usbdevfs_urb32 *) arg;
 
        err = -ENOMEM;
        kurb = kmalloc(sizeof(struct usbdevfs_urb) +
@@ -2875,7 +2836,7 @@ static int do_usbdevfs_reapurb(unsigned int fd, unsigned int cmd, unsigned long
         set_fs(old_fs);
 
         if (err >= 0 &&
-            put_user((u32)(u64)kptr, (u32 *)compat_ptr(arg)))
+            put_user((u32)(u64)kptr, (u32 *)arg))
                 err = -EFAULT;
 
         return err;
@@ -2896,13 +2857,13 @@ static int do_usbdevfs_discsignal(unsigned int fd, unsigned int cmd, unsigned lo
         u32 uctx;
         int err;
 
-        udis = compat_ptr(arg);
+        udis = (struct usbdevfs_disconnectsignal32 *) arg;
 
         if (get_user(kdis.signr, &udis->signr) ||
             __get_user(uctx, &udis->context))
                 return -EFAULT;
 
-        kdis.context = compat_ptr(uctx);
+        kdis.context = (void *) (long)uctx;
 
         old_fs = get_fs();
         set_fs(KERNEL_DS);
@@ -2911,6 +2872,105 @@ static int do_usbdevfs_discsignal(unsigned int fd, unsigned int cmd, unsigned lo
 
         return err;
 }
+
+/*
+ * I2C layer ioctls
+ */
+
+struct i2c_msg32 {
+       u16 addr;
+       u16 flags;
+       u16 len;
+       compat_caddr_t buf;
+};
+
+struct i2c_rdwr_ioctl_data32 {
+       compat_caddr_t msgs; /* struct i2c_msg __user *msgs */
+       u32 nmsgs;
+};
+
+struct i2c_smbus_ioctl_data32 {
+       u8 read_write;
+       u8 command;
+       u32 size;
+       compat_caddr_t data; /* union i2c_smbus_data *data */
+};
+
+static int do_i2c_rdwr_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+       struct i2c_rdwr_ioctl_data      *tdata;
+       struct i2c_rdwr_ioctl_data32    *udata;
+       struct i2c_msg                  *tmsgs;
+       struct i2c_msg32                *umsgs;
+       compat_caddr_t                  datap;
+       int                             nmsgs, i;
+
+       tdata = compat_alloc_user_space(sizeof(*tdata));
+       if (tdata == NULL)
+               return -ENOMEM;
+       if (verify_area(VERIFY_WRITE, tdata, sizeof(*tdata)))
+               return -EFAULT;
+
+       udata = (struct i2c_rdwr_ioctl_data32 *)compat_ptr(arg);
+       if (verify_area(VERIFY_READ, udata, sizeof(*udata)))
+               return -EFAULT;
+       if (__get_user(nmsgs, &udata->nmsgs) || __put_user(nmsgs, &tdata->nmsgs))
+               return -EFAULT;
+       if (nmsgs > I2C_RDRW_IOCTL_MAX_MSGS)
+               return -EINVAL;
+       if (__get_user(datap, &udata->msgs))
+               return -EFAULT;
+       umsgs = (struct i2c_msg32 *)compat_ptr(datap);
+       if (verify_area(VERIFY_READ, umsgs, sizeof(struct i2c_msg) * nmsgs))
+               return -EFAULT;
+
+       tmsgs = compat_alloc_user_space(sizeof(struct i2c_msg) * nmsgs);
+       if (tmsgs == NULL)
+               return -ENOMEM;
+       if (verify_area(VERIFY_WRITE, tmsgs, sizeof(struct i2c_msg) * nmsgs))
+               return -EFAULT;
+       if (__put_user(tmsgs, &tdata->msgs))
+               return -ENOMEM;
+       for (i = 0; i < nmsgs; i++) {
+               if (__copy_in_user(&tmsgs[i].addr,
+                                  &umsgs[i].addr,
+                                  3 * sizeof(u16)))
+                       return -EFAULT;
+               if (__get_user(datap, &umsgs[i].buf) ||
+                   __put_user(compat_ptr(datap), &tmsgs[i].buf))
+                       return -EFAULT;
+       }
+       return sys_ioctl(fd, cmd, (unsigned long)tdata);
+}
+
+static int do_i2c_smbus_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
+{
+       struct i2c_smbus_ioctl_data     *tdata;
+       struct i2c_smbus_ioctl_data32   *udata;
+       compat_caddr_t                  datap;
+
+       tdata = compat_alloc_user_space(sizeof(*tdata));
+       if (tdata == NULL)
+               return -ENOMEM;
+       if (verify_area(VERIFY_WRITE, tdata, sizeof(*tdata)))
+               return -EFAULT;
+
+       udata = (struct i2c_smbus_ioctl_data32 *)compat_ptr(arg);
+       if (verify_area(VERIFY_READ, udata, sizeof(*udata)))
+               return -EFAULT;
+
+       if (__copy_in_user(&tdata->read_write, &udata->read_write, 2 * sizeof(u8)))
+               return -EFAULT;
+       if (__copy_in_user(&tdata->size, &udata->size, 2 * sizeof(u32)))
+               return -EFAULT;
+       if (__get_user(datap, &udata->data) ||
+           __put_user(compat_ptr(datap), &tdata->data))
+               return -EFAULT;
+
+       return sys_ioctl(fd, cmd, (unsigned long)tdata);
+}
+
+
 #undef CODE
 #endif
 
@@ -3021,7 +3081,7 @@ HANDLE_IOCTL(VIDIOCSFBUF32, do_video_ioctl)
 HANDLE_IOCTL(VIDIOCGFREQ32, do_video_ioctl)
 HANDLE_IOCTL(VIDIOCSFREQ32, do_video_ioctl)
 /* One SMB ioctl needs translations. */
-#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_pid_t)
+#define SMB_IOC_GETMOUNTUID_32 _IOR('u', 1, compat_uid_t)
 HANDLE_IOCTL(SMB_IOC_GETMOUNTUID_32, do_smb_getmountuid)
 HANDLE_IOCTL(ATM_GETLINKRATE32, do_atm_ioctl)
 HANDLE_IOCTL(ATM_GETNAMES32, do_atm_ioctl)
@@ -3069,5 +3129,10 @@ HANDLE_IOCTL(USBDEVFS_BULK32, do_usbdevfs_bulk)
 HANDLE_IOCTL(USBDEVFS_REAPURB32, do_usbdevfs_reapurb)
 HANDLE_IOCTL(USBDEVFS_REAPURBNDELAY32, do_usbdevfs_reapurb)
 HANDLE_IOCTL(USBDEVFS_DISCSIGNAL32, do_usbdevfs_discsignal)
+/* i2c */
+HANDLE_IOCTL(I2C_FUNCS, w_long)
+HANDLE_IOCTL(I2C_RDWR, do_i2c_rdwr_ioctl)
+HANDLE_IOCTL(I2C_SMBUS, do_i2c_smbus_ioctl)
+
 #undef DECLARES
 #endif
index 6f59460..b6d266f 100644 (file)
@@ -639,24 +639,9 @@ void shrink_dcache_anon(struct hlist_head *head)
 
 /*
  * This is called from kswapd when we think we need some more memory.
- *
- * We don't want the VM to steal _all_ unused dcache.  Because that leads to
- * the VM stealing all unused inodes, which shoots down recently-used
- * pagecache.  So what we do is to tell fibs to the VM about how many reapable
- * objects there are in this cache.   If the number of unused dentries is
- * less than half of the total dentry count then return zero.  The net effect
- * is that the number of unused dentries will be, at a minimum, equal to the
- * number of used ones.
- *
- * If unused_ratio is set to 5, the number of unused dentries will not fall
- * below 5* the number of used ones.
  */
 static int shrink_dcache_memory(int nr, unsigned int gfp_mask)
 {
-       int nr_used;
-       int nr_unused;
-       const int unused_ratio = 1;
-
        if (nr) {
                /*
                 * Nasty deadlock avoidance.
@@ -672,11 +657,7 @@ static int shrink_dcache_memory(int nr, unsigned int gfp_mask)
                if (gfp_mask & __GFP_FS)
                        prune_dcache(nr);
        }
-       nr_unused = dentry_stat.nr_unused;
-       nr_used = dentry_stat.nr_dentry - nr_unused;
-       if (nr_unused < nr_used * unused_ratio)
-               return 0;
-       return nr_unused - nr_used * unused_ratio;
+       return dentry_stat.nr_unused;
 }
 
 #define NAME_ALLOC_LEN(len)    ((len+16) & ~15)
index 4ee142a..4711d13 100644 (file)
@@ -947,6 +947,12 @@ direct_io_worker(int rw, struct kiocb *iocb, struct inode *inode,
                dio_bio_submit(dio);
 
        /*
+        * It is possible that, we return short IO due to end of file.
+        * In that case, we need to release all the pages we got hold on.
+        */
+       dio_cleanup(dio);
+
+       /*
         * OK, all BIOs are submitted, so we can decrement bio_count to truly
         * reflect the number of to-be-processed BIOs.
         */
index 64a5a98..b210808 100644 (file)
@@ -192,6 +192,8 @@ static struct list_head dquot_hash[NR_DQHASH];
 
 struct dqstats dqstats;
 
+static void dqput(struct dquot *dquot);
+
 static inline int const hashfn(struct super_block *sb, unsigned int id, int type)
 {
        return((((unsigned long)sb>>L1_CACHE_SHIFT) ^ id) * (MAXQUOTAS - type)) % NR_DQHASH;
@@ -339,8 +341,11 @@ restart:
                        continue;
                if (!dquot_dirty(dquot))
                        continue;
+               atomic_inc(&dquot->dq_count);
+               dqstats.lookups++;
                spin_unlock(&dq_list_lock);
-               sb->dq_op->sync_dquot(dquot);
+               sb->dq_op->write_dquot(dquot);
+               dqput(dquot);
                goto restart;
        }
        spin_unlock(&dq_list_lock);
@@ -427,7 +432,7 @@ we_slept:
        }
        if (dquot_dirty(dquot)) {
                spin_unlock(&dq_list_lock);
-               commit_dqblk(dquot);
+               dquot->dq_sb->dq_op->write_dquot(dquot);
                goto we_slept;
        }
        atomic_dec(&dquot->dq_count);
@@ -1083,7 +1088,7 @@ struct dquot_operations dquot_operations = {
        .free_space     = dquot_free_space,
        .free_inode     = dquot_free_inode,
        .transfer       = dquot_transfer,
-       .sync_dquot     = commit_dqblk
+       .write_dquot    = commit_dqblk
 };
 
 /* Function used by filesystems for initializing the dquot_operations structure */
@@ -1207,9 +1212,9 @@ int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path)
        error = -EINVAL;
        if (!fmt->qf_ops->check_quota_file(sb, type))
                goto out_file_init;
-       /* We don't want quota on quota files */
+       /* We don't want quota and atime on quota files (deadlocks possible) */
        dquot_drop_nolock(inode);
-       inode->i_flags |= S_NOQUOTA;
+       inode->i_flags |= S_NOQUOTA | S_NOATIME;
 
        dqopt->ops[type] = fmt->qf_ops;
        dqopt->info[type].dqi_format = fmt;
index 84d224e..a0e769a 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -779,6 +779,7 @@ int flush_old_exec(struct linux_binprm * bprm)
 {
        char * name;
        int i, ch, retval;
+       struct files_struct *files;
 
        /*
         * Make sure we have a private signal table and that
@@ -789,15 +790,26 @@ int flush_old_exec(struct linux_binprm * bprm)
                goto out;
 
        /*
+        * Make sure we have private file handles. Ask the
+        * fork helper to do the work for us and the exit
+        * helper to do the cleanup of the old one.
+        */
+       files = current->files;         /* refcounted so safe to hold */
+       retval = unshare_files();
+       if (retval)
+               goto out;
+       /*
         * Release all of the old mmap stuff
         */
        retval = exec_mmap(bprm->mm);
        if (retval)
-               goto out;
+               goto mmap_failed;
 
        bprm->mm = NULL;                /* We're using it now */
 
        /* This is the point of no return */
+       steal_locks(files);
+       put_files_struct(files);
 
        current->sas_ss_sp = current->sas_ss_size = 0;
 
@@ -830,6 +842,9 @@ int flush_old_exec(struct linux_binprm * bprm)
 
        return 0;
 
+mmap_failed:
+       put_files_struct(current->files);
+       current->files = files;
 out:
        return retval;
 }
@@ -1070,6 +1085,7 @@ int do_execve(char * filename,
        struct linux_binprm bprm;
        struct file *file;
        int retval;
+       int i;
 
        sched_balance_exec();
 
@@ -1138,7 +1154,11 @@ int do_execve(char * filename,
 
 out:
        /* Something went wrong, return the inode and free the argument pages*/
-       free_arg_pages(&bprm);
+       for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
+               struct page * page = bprm.page[i];
+               if (page)
+                       __free_page(page);
+       }
 
        if (bprm.security)
                security_bprm_free(&bprm);
index c11a92f..e195de8 100644 (file)
@@ -517,7 +517,7 @@ ext3_new_block(handle_t *handle, struct inode *inode, unsigned long goal,
                sbi->s_resuid != current->fsuid &&
                (sbi->s_resgid == 0 || !in_group_p (sbi->s_resgid))) {
                *errp = -ENOSPC;
-               return 0;
+               goto out;
        }
 
        /*
index 94b10ec..e2b4a68 100644 (file)
@@ -340,6 +340,7 @@ fail:
  */
 static int ext3_blkdev_put(struct block_device *bdev)
 {
+       bd_release(bdev);
        return blkdev_put(bdev, BDEV_FS);
 }
 
@@ -1480,6 +1481,13 @@ static journal_t *ext3_get_dev_journal(struct super_block *sb,
        if (bdev == NULL)
                return NULL;
 
+       if (bd_claim(bdev, sb)) {
+               printk(KERN_ERR
+                       "EXT3: failed to claim external journal device.\n");
+               blkdev_put(bdev, BDEV_FS);
+               return NULL;
+       }
+
        blocksize = sb->s_blocksize;
        hblock = bdev_hardsect_size(bdev);
        if (blocksize < hblock) {
@@ -1944,9 +1952,9 @@ int ext3_statfs (struct super_block * sb, struct kstatfs * buf)
 /* Blocks: quota info + (4 pointer blocks + 1 entry block) * (3 indirect + 1 descriptor + 1 bitmap) + superblock */
 #define EXT3_V0_QFMT_BLOCKS 27
 
-static int (*old_sync_dquot)(struct dquot *dquot);
+static int (*old_write_dquot)(struct dquot *dquot);
 
-static int ext3_sync_dquot(struct dquot *dquot)
+static int ext3_write_dquot(struct dquot *dquot)
 {
        int nblocks;
        int ret;
@@ -1971,7 +1979,7 @@ static int ext3_sync_dquot(struct dquot *dquot)
                ret = PTR_ERR(handle);
                goto out;
        }
-       ret = old_sync_dquot(dquot);
+       ret = old_write_dquot(dquot);
        err = ext3_journal_stop(handle);
        if (ret == 0)
                ret = err;
@@ -2004,8 +2012,8 @@ static int __init init_ext3_fs(void)
                goto out1;
 #ifdef CONFIG_QUOTA
        init_dquot_operations(&ext3_qops);
-       old_sync_dquot = ext3_qops.sync_dquot;
-       ext3_qops.sync_dquot = ext3_sync_dquot;
+       old_write_dquot = ext3_qops.write_dquot;
+       ext3_qops.write_dquot = ext3_write_dquot;
 #endif
         err = register_filesystem(&ext3_fs_type);
        if (err)
index 7e16d8d..9c5691d 100644 (file)
@@ -20,6 +20,8 @@ struct file_operations fat_file_operations = {
        .write          = fat_file_write,
        .mmap           = generic_file_mmap,
        .fsync          = file_fsync,
+       .readv          = generic_file_readv,
+       .writev         = generic_file_writev,
        .sendfile       = generic_file_sendfile,
 };
 
index 11f6440..e5930b4 100644 (file)
@@ -191,9 +191,9 @@ static int fat_show_options(struct seq_file *m, struct vfsmount *mnt)
        int isvfat = opts->isvfat;
 
        if (opts->fs_uid != 0)
-               seq_printf(m, ",uid=%d", opts->fs_uid);
+               seq_printf(m, ",uid=%u", opts->fs_uid);
        if (opts->fs_gid != 0)
-               seq_printf(m, ",gid=%d", opts->fs_gid);
+               seq_printf(m, ",gid=%u", opts->fs_gid);
        seq_printf(m, ",fmask=%04o", opts->fs_fmask);
        seq_printf(m, ",dmask=%04o", opts->fs_dmask);
        if (sbi->nls_disk)
@@ -765,8 +765,9 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
        struct buffer_head *bh;
        struct fat_boot_sector *b;
        struct msdos_sb_info *sbi;
-       int logical_sector_size, fat_clusters, debug, cp, first;
-       unsigned int total_sectors, rootdir_sectors;
+       u16 logical_sector_size;
+       u32 total_sectors, total_clusters, fat_clusters, rootdir_sectors;
+       int debug, cp, first;
        unsigned int media;
        long error;
        char buf[50];
@@ -831,14 +832,13 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
                brelse(bh);
                goto out_invalid;
        }
-       logical_sector_size =
-               CF_LE_W(get_unaligned((unsigned short *) &b->sector_size));
+       logical_sector_size = CF_LE_W(get_unaligned((u16 *)&b->sector_size));
        if (!logical_sector_size
            || (logical_sector_size & (logical_sector_size - 1))
            || (logical_sector_size < 512)
            || (PAGE_CACHE_SIZE < logical_sector_size)) {
                if (!silent)
-                       printk(KERN_ERR "FAT: bogus logical sector size %d\n",
+                       printk(KERN_ERR "FAT: bogus logical sector size %u\n",
                               logical_sector_size);
                brelse(bh);
                goto out_invalid;
@@ -847,7 +847,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
        if (!sbi->sec_per_clus
            || (sbi->sec_per_clus & (sbi->sec_per_clus - 1))) {
                if (!silent)
-                       printk(KERN_ERR "FAT: bogus sectors per cluster %d\n",
+                       printk(KERN_ERR "FAT: bogus sectors per cluster %u\n",
                               sbi->sec_per_clus);
                brelse(bh);
                goto out_invalid;
@@ -855,7 +855,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
 
        if (logical_sector_size < sb->s_blocksize) {
                printk(KERN_ERR "FAT: logical sector size too small for device"
-                      " (logical sector size = %d)\n", logical_sector_size);
+                      " (logical sector size = %u)\n", logical_sector_size);
                brelse(bh);
                goto out_fail;
        }
@@ -863,7 +863,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
                brelse(bh);
 
                if (!sb_set_blocksize(sb, logical_sector_size)) {
-                       printk(KERN_ERR "FAT: unable to set blocksize %d\n",
+                       printk(KERN_ERR "FAT: unable to set blocksize %u\n",
                               logical_sector_size);
                        goto out_fail;
                }
@@ -885,7 +885,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
        sbi->fat_length = CF_LE_W(b->fat_length);
        sbi->root_cluster = 0;
        sbi->free_clusters = -1;        /* Don't know yet */
-       sbi->prev_free = 0;
+       sbi->prev_free = -1;
 
        if (!sbi->fat_length && b->fat32_length) {
                struct fat_boot_fsinfo *fsinfo;
@@ -932,10 +932,11 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
        sbi->dir_per_block_bits = ffs(sbi->dir_per_block) - 1;
 
        sbi->dir_start = sbi->fat_start + sbi->fats * sbi->fat_length;
-       sbi->dir_entries =
-               CF_LE_W(get_unaligned((unsigned short *)&b->dir_entries));
+       sbi->dir_entries = CF_LE_W(get_unaligned((u16 *)&b->dir_entries));
        if (sbi->dir_entries & (sbi->dir_per_block - 1)) {
-               printk(KERN_ERR "FAT: bogus directroy-entries per block\n");
+               if (!silent)
+                       printk(KERN_ERR "FAT: bogus directroy-entries per block"
+                              " (%u)\n", sbi->dir_entries);
                brelse(bh);
                goto out_invalid;
        }
@@ -943,18 +944,27 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
        rootdir_sectors = sbi->dir_entries
                * sizeof(struct msdos_dir_entry) / sb->s_blocksize;
        sbi->data_start = sbi->dir_start + rootdir_sectors;
-       total_sectors = CF_LE_W(get_unaligned((unsigned short *)&b->sectors));
+       total_sectors = CF_LE_W(get_unaligned((u16 *)&b->sectors));
        if (total_sectors == 0)
                total_sectors = CF_LE_L(b->total_sect);
-       sbi->clusters = (total_sectors - sbi->data_start) / sbi->sec_per_clus;
+
+       total_clusters = (total_sectors - sbi->data_start) / sbi->sec_per_clus;
 
        if (sbi->fat_bits != 32)
-               sbi->fat_bits = (sbi->clusters > MSDOS_FAT12) ? 16 : 12;
+               sbi->fat_bits = (total_clusters > MAX_FAT12) ? 16 : 12;
 
        /* check that FAT table does not overflow */
        fat_clusters = sbi->fat_length * sb->s_blocksize * 8 / sbi->fat_bits;
-       if (sbi->clusters > fat_clusters - 2)
-               sbi->clusters = fat_clusters - 2;
+       total_clusters = min(total_clusters, fat_clusters - 2);
+       if (total_clusters > MAX_FAT(sb)) {
+               if (!silent)
+                       printk(KERN_ERR "FAT: count of clusters too big (%u)\n",
+                              total_clusters);
+               brelse(bh);
+               goto out_invalid;
+       }
+
+       sbi->clusters = total_clusters;
 
        brelse(bh);
 
@@ -968,6 +978,8 @@ int fat_fill_super(struct super_block *sb, void *data, int silent,
                /* all is as it should be */
        } else if (media == 0xf8 && FAT_FIRST_ENT(sb, 0xfe) == first) {
                /* bad, reported on pc9800 */
+       } else if (media == 0xf0 && FAT_FIRST_ENT(sb, 0xf8) == first) {
+               /* bad, reported with a MO disk on win95/me */
        } else if (first == 0) {
                /* bad, reported with a SmartMedia card */
        } else {
@@ -1047,7 +1059,7 @@ out_fail:
 
 int fat_statfs(struct super_block *sb, struct kstatfs *buf)
 {
-       int free, nr;
+       int free, nr, ret;
        
        if (MSDOS_SB(sb)->free_clusters != -1)
                free = MSDOS_SB(sb)->free_clusters;
@@ -1057,9 +1069,14 @@ int fat_statfs(struct super_block *sb, struct kstatfs *buf)
                        free = MSDOS_SB(sb)->free_clusters;
                else {
                        free = 0;
-                       for (nr = 2; nr < MSDOS_SB(sb)->clusters + 2; nr++)
-                               if (fat_access(sb, nr, -1) == FAT_ENT_FREE)
+                       for (nr = 2; nr < MSDOS_SB(sb)->clusters + 2; nr++) {
+                               ret = fat_access(sb, nr, -1);
+                               if (ret < 0) {
+                                       unlock_fat(sb);
+                                       return ret;
+                               } else if (ret == FAT_ENT_FREE)
                                        free++;
+                       }
                        MSDOS_SB(sb)->free_clusters = free;
                }
                unlock_fat(sb);
@@ -1209,10 +1226,10 @@ retry:
        }
        lock_kernel();
        if (!(bh = sb_bread(sb, i_pos >> MSDOS_SB(sb)->dir_per_block_bits))) {
-               fat_fs_panic(sb, "unable to read i-node block (i_pos %lld)",
-                            i_pos);
+               printk(KERN_ERR "FAT: unable to read inode block "
+                      "for updating (i_pos %lld)", i_pos);
                unlock_kernel();
-               return;
+               return /* -EIO */;
        }
        spin_lock(&fat_inode_lock);
        if (i_pos != MSDOS_I(inode)->i_pos) {
index b50f423..ab74435 100644 (file)
@@ -74,7 +74,7 @@ void fat_clusters_flush(struct super_block *sb)
        } else {
                if (sbi->free_clusters != -1)
                        fsinfo->free_clusters = CF_LE_L(sbi->free_clusters);
-               if (sbi->prev_free)
+               if (sbi->prev_free != -1)
                        fsinfo->next_cluster = CF_LE_L(sbi->prev_free);
                mark_buffer_dirty(bh);
        }
@@ -88,7 +88,7 @@ void fat_clusters_flush(struct super_block *sb)
 int fat_add_cluster(struct inode *inode)
 {
        struct super_block *sb = inode->i_sb;
-       int count, limit, new_dclus, new_fclus, last;
+       int ret, count, limit, new_dclus, new_fclus, last;
        int cluster_bits = MSDOS_SB(sb)->cluster_bits;
        
        /* 
@@ -123,7 +123,12 @@ int fat_add_cluster(struct inode *inode)
                new_dclus = new_dclus % limit;
                if (new_dclus < 2)
                        new_dclus = 2;
-               if (fat_access(sb, new_dclus, -1) == FAT_ENT_FREE)
+
+               ret = fat_access(sb, new_dclus, -1);
+               if (ret < 0) {
+                       unlock_fat(sb);
+                       return ret;
+               } else if (ret == FAT_ENT_FREE)
                        break;
        }
        if (count >= MSDOS_SB(sb)->clusters) {
@@ -131,9 +136,14 @@ int fat_add_cluster(struct inode *inode)
                unlock_fat(sb);
                return -ENOSPC;
        }
-       MSDOS_SB(sb)->prev_free = new_dclus;
 
-       fat_access(sb, new_dclus, FAT_ENT_EOF);
+       ret = fat_access(sb, new_dclus, FAT_ENT_EOF);
+       if (ret < 0) {
+               unlock_fat(sb);
+               return ret;
+       }
+
+       MSDOS_SB(sb)->prev_free = new_dclus;
        if (MSDOS_SB(sb)->free_clusters != -1)
                MSDOS_SB(sb)->free_clusters--;
        fat_clusters_flush(sb);
@@ -142,7 +152,9 @@ int fat_add_cluster(struct inode *inode)
 
        /* add new one to the last of the cluster chain */
        if (last) {
-               fat_access(sb, last, new_dclus);
+               ret = fat_access(sb, last, new_dclus);
+               if (ret < 0)
+                       return ret;
                fat_cache_add(inode, new_fclus, new_dclus);
        } else {
                MSDOS_I(inode)->i_start = new_dclus;
index 0af7dc1..9509cfe 100644 (file)
@@ -183,9 +183,9 @@ void __fput(struct file *file)
        fops_put(file->f_op);
        if (file->f_mode & FMODE_WRITE)
                put_write_access(inode);
+       file_kill(file);
        file->f_dentry = NULL;
        file->f_vfsmnt = NULL;
-       file_kill(file);
        file_free(file);
        dput(dentry);
        mntput(mnt);
diff --git a/fs/hostfs/Makefile b/fs/hostfs/Makefile
deleted file mode 100644 (file)
index 17ba718..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-# 
-# Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
-# Licensed under the GPL
-#
-
-# struct stat64 changed the inode field name between 2.2 and 2.4 from st_ino
-# to __st_ino.  It stayed in the same place, so as long as the correct name
-# is used, hostfs compiled on 2.2 should work on 2.4 and vice versa.
-
-STAT64_INO_FIELD := $(shell grep -q __st_ino /usr/include/bits/stat.h && \
-                               echo __)st_ino
-
-hostfs-objs := hostfs_kern.o hostfs_user.o
-
-obj-y = 
-obj-$(CONFIG_HOSTFS) += hostfs.o
-
-SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) $(obj-m)),$($(f)-objs))
-
-USER_OBJS := $(filter %_user.o,$(obj-y) $(obj-m) $(SINGLE_OBJS))
-USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
-
-USER_CFLAGS += -DSTAT64_INO_FIELD=$(STAT64_INO_FIELD)
-
-$(USER_OBJS) : %.o: %.c
-       $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<
-
-clean:
-
-modules:
-
-fastdep:
-
-dep:
-
-archmrproper: clean
diff --git a/fs/hostfs/hostfs.h b/fs/hostfs/hostfs.h
deleted file mode 100644 (file)
index d1f6c33..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-#ifndef __UM_FS_HOSTFS
-#define __UM_FS_HOSTFS
-
-#include "os.h"
-
-/* These are exactly the same definitions as in fs.h, but the names are 
- * changed so that this file can be included in both kernel and user files.
- */
-
-#define HOSTFS_ATTR_MODE       1
-#define HOSTFS_ATTR_UID        2
-#define HOSTFS_ATTR_GID        4
-#define HOSTFS_ATTR_SIZE       8
-#define HOSTFS_ATTR_ATIME      16
-#define HOSTFS_ATTR_MTIME      32
-#define HOSTFS_ATTR_CTIME      64
-#define HOSTFS_ATTR_ATIME_SET  128
-#define HOSTFS_ATTR_MTIME_SET  256
-#define HOSTFS_ATTR_FORCE      512     /* Not a change, but a change it */
-#define HOSTFS_ATTR_ATTR_FLAG  1024
-
-struct hostfs_iattr {
-       unsigned int    ia_valid;
-       mode_t          ia_mode;
-       uid_t           ia_uid;
-       gid_t           ia_gid;
-       loff_t          ia_size;
-       struct timespec ia_atime;
-       struct timespec ia_mtime;
-       struct timespec ia_ctime;
-       unsigned int    ia_attr_flags;
-};
-
-extern int stat_file(const char *path, unsigned long long *inode_out, 
-                    int *mode_out, int *nlink_out, int *uid_out, int *gid_out,
-                    unsigned long long *size_out, struct timespec *atime_out, 
-                    struct timespec *mtime_out, struct timespec *ctime_out, 
-                    int *blksize_out, unsigned long long *blocks_out);
-extern int access_file(char *path, int r, int w, int x);
-extern int open_file(char *path, int r, int w, int append);
-extern int file_type(const char *path, int *rdev);
-extern void *open_dir(char *path, int *err_out);
-extern char *read_dir(void *stream, unsigned long long *pos, 
-                     unsigned long long *ino_out, int *len_out);
-extern void close_file(void *stream);
-extern void close_dir(void *stream);
-extern int read_file(int fd, unsigned long long *offset, char *buf, int len);
-extern int write_file(int fd, unsigned long long *offset, const char *buf,
-                     int len);
-extern int lseek_file(int fd, long long offset, int whence);
-extern int file_create(char *name, int ur, int uw, int ux, int gr, 
-                      int gw, int gx, int or, int ow, int ox);
-extern int set_attr(const char *file, struct hostfs_iattr *attrs);
-extern int make_symlink(const char *from, const char *to);
-extern int unlink_file(const char *file);
-extern int do_mkdir(const char *file, int mode);
-extern int do_rmdir(const char *file);
-extern int do_mknod(const char *file, int mode, int dev);
-extern int link_file(const char *from, const char *to);
-extern int do_readlink(char *file, char *buf, int size);
-extern int rename_file(char *from, char *to);
-extern int do_statfs(char *root, long *bsize_out, long long *blocks_out, 
-                    long long *bfree_out, long long *bavail_out, 
-                    long long *files_out, long long *ffree_out, 
-                    void *fsid_out, int fsid_size, long *namelen_out, 
-                    long *spare_out);
-
-#endif
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff --git a/fs/hostfs/hostfs_kern.c b/fs/hostfs/hostfs_kern.c
deleted file mode 100644 (file)
index ef5d5d1..0000000
+++ /dev/null
@@ -1,1008 +0,0 @@
-/* 
- * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- *
- * Ported the filesystem routines to 2.5.
- * 2003-02-10 Petr Baudis <pasky@ucw.cz>
- */
-
-#include <linux/stddef.h>
-#include <linux/fs.h>
-#include <linux/version.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/slab.h>
-#include <linux/pagemap.h>
-#include <linux/blkdev.h>
-#include <linux/list.h>
-#include <linux/buffer_head.h>
-#include <linux/root_dev.h>
-#include <linux/statfs.h>
-#include <asm/uaccess.h>
-#include "hostfs.h"
-#include "kern_util.h"
-#include "kern.h"
-#include "user_util.h"
-#include "2_5compat.h"
-#include "init.h"
-
-struct hostfs_inode_info {
-       char *host_filename;
-       int fd;
-       int mode;
-       struct inode vfs_inode;
-};
-
-static inline struct hostfs_inode_info *HOSTFS_I(struct inode *inode)
-{
-       return(list_entry(inode, struct hostfs_inode_info, vfs_inode));
-}
-
-#define FILE_HOSTFS_I(file) HOSTFS_I((file)->f_dentry->d_inode)
-
-int hostfs_d_delete(struct dentry *dentry)
-{
-       return(1);
-}
-
-struct dentry_operations hostfs_dentry_ops = {
-       .d_delete               = hostfs_d_delete,
-};
-
-/* Changed in hostfs_args before the kernel starts running */
-static char *root_ino = "/";
-static int append = 0;
-
-#define HOSTFS_SUPER_MAGIC 0x00c0ffee
-
-static struct inode_operations hostfs_iops;
-static struct inode_operations hostfs_dir_iops;
-static struct address_space_operations hostfs_link_aops;
-
-static int __init hostfs_args(char *options, int *add)
-{
-       char *ptr;
-
-       ptr = strchr(options, ',');
-       if(ptr != NULL)
-               *ptr++ = '\0';
-       if(*options != '\0')
-               root_ino = options;
-
-       options = ptr;
-       while(options){
-               ptr = strchr(options, ',');
-               if(ptr != NULL)
-                       *ptr++ = '\0';
-               if(*options != '\0'){
-                       if(!strcmp(options, "append"))
-                               append = 1;
-                       else printf("hostfs_args - unsupported option - %s\n",
-                                   options);
-               }
-               options = ptr;
-       }
-       return(0);
-}
-
-__uml_setup("hostfs=", hostfs_args,
-"hostfs=<root dir>,<flags>,...\n"
-"    This is used to set hostfs parameters.  The root directory argument\n"
-"    is used to confine all hostfs mounts to within the specified directory\n"
-"    tree on the host.  If this isn't specified, then a user inside UML can\n"
-"    mount anything on the host that's accessible to the user that's running\n"
-"    it.\n"
-"    The only flag currently supported is 'append', which specifies that all\n"
-"    files opened by hostfs will be opened in append mode.\n\n"
-);
-
-static char *dentry_name(struct dentry *dentry, int extra)
-{
-       struct dentry *parent;
-       char *root, *name;
-       int len;
-
-       len = 0;
-       parent = dentry;
-       while(parent->d_parent != parent){
-               len += parent->d_name.len + 1;
-               parent = parent->d_parent;
-       }
-       
-       root = HOSTFS_I(parent->d_inode)->host_filename;
-       len += strlen(root);
-       name = kmalloc(len + extra + 1, GFP_KERNEL);
-       if(name == NULL) return(NULL);
-
-       name[len] = '\0';
-       parent = dentry;
-       while(parent->d_parent != parent){
-               len -= parent->d_name.len + 1;
-               name[len] = '/';
-               strncpy(&name[len + 1], parent->d_name.name, 
-                       parent->d_name.len);
-               parent = parent->d_parent;
-       }
-       strncpy(name, root, strlen(root));
-       return(name);
-}
-
-static char *inode_name(struct inode *ino, int extra)
-{
-       struct dentry *dentry;
-
-       dentry = list_entry(ino->i_dentry.next, struct dentry, d_alias);
-       return(dentry_name(dentry, extra));
-}
-
-static int read_name(struct inode *ino, char *name)
-{
-       /* The non-int inode fields are copied into ints by stat_file and
-        * then copied into the inode because passing the actual pointers
-        * in and having them treated as int * breaks on big-endian machines
-        */
-       int err;
-       int i_mode, i_nlink, i_blksize;
-       unsigned long long i_size;
-       unsigned long long i_ino;
-       unsigned long long i_blocks;
-
-       err = stat_file(name, &i_ino, &i_mode, &i_nlink, &ino->i_uid, 
-                       &ino->i_gid, &i_size, &ino->i_atime, &ino->i_mtime, 
-                       &ino->i_ctime, &i_blksize, &i_blocks);
-       if(err) 
-               return(err);
-
-       ino->i_ino = i_ino;
-       ino->i_mode = i_mode;
-       ino->i_nlink = i_nlink;
-       ino->i_size = i_size;
-       ino->i_blksize = i_blksize;
-       ino->i_blocks = i_blocks;
-       if((ino->i_sb->s_dev == ROOT_DEV) && (ino->i_uid == getuid()))
-               ino->i_uid = 0;
-       return(0);
-}
-
-static char *follow_link(char *link)
-{
-       int len, n;
-       char *name, *resolved, *end;
-
-       len = 64;
-       while(1){
-               n = -ENOMEM;
-               name = kmalloc(len, GFP_KERNEL);
-               if(name == NULL)
-                       goto out;
-
-               n = do_readlink(link, name, len);
-               if(n < len)
-                       break;
-               len *= 2;
-               kfree(name);
-       }
-       if(n < 0)
-               goto out_free;
-
-       if(*name == '/')
-               return(name);
-
-       end = strrchr(link, '/');
-       if(end == NULL)
-               return(name);
-
-       *(end + 1) = '\0';
-       len = strlen(link) + strlen(name) + 1;
-
-       resolved = kmalloc(len, GFP_KERNEL);
-       if(resolved == NULL){
-               n = -ENOMEM;
-               goto out_free;
-       }
-
-       sprintf(resolved, "%s%s", link, name);
-       kfree(name);
-       kfree(link);
-       return(resolved);
-
- out_free:
-       kfree(name);
- out:
-       return(ERR_PTR(n));
-}
-
-static int read_inode(struct inode *ino)
-{
-       char *name;
-       int err = 0;
-
-       /* Unfortunately, we are called from iget() when we don't have a dentry
-        * allocated yet.
-        */
-       if(list_empty(&ino->i_dentry))
-               goto out;
-       err = -ENOMEM;
-       name = inode_name(ino, 0);
-       if(name == NULL) 
-               goto out;
-
-       if(file_type(name, NULL) == OS_TYPE_SYMLINK){
-               name = follow_link(name);
-               if(IS_ERR(name)){
-                       err = PTR_ERR(name);
-                       goto out;
-               }
-       }
-       
-       err = read_name(ino, name);
-       kfree(name);
- out:
-       return(err);
-}
-
-int hostfs_statfs(struct super_block *sb, struct kstatfs *sf)
-{
-       /* do_statfs uses struct statfs64 internally, but the linux kernel
-        * struct statfs still has 32-bit versions for most of these fields,
-        * so we convert them here
-        */
-       int err;
-       long long f_blocks;
-       long long f_bfree;
-       long long f_bavail;
-       long long f_files;
-       long long f_ffree;
-
-       err = do_statfs(HOSTFS_I(sb->s_root->d_inode)->host_filename,
-                       &sf->f_bsize, &f_blocks, &f_bfree, &f_bavail, &f_files,
-                       &f_ffree, &sf->f_fsid, sizeof(sf->f_fsid), 
-                       &sf->f_namelen, sf->f_spare);
-       if(err) return(err);
-       sf->f_blocks = f_blocks;
-       sf->f_bfree = f_bfree;
-       sf->f_bavail = f_bavail;
-       sf->f_files = f_files;
-       sf->f_ffree = f_ffree;
-       sf->f_type = HOSTFS_SUPER_MAGIC;
-       return(0);
-}
-
-static struct inode *hostfs_alloc_inode(struct super_block *sb)
-{
-       struct hostfs_inode_info *hi;
-
-       hi = kmalloc(sizeof(*hi), GFP_KERNEL);
-       if(hi == NULL) 
-               return(NULL);
-
-       *hi = ((struct hostfs_inode_info) { .host_filename      = NULL,
-                                           .fd                 = -1,
-                                           .mode               = 0 });
-       inode_init_once(&hi->vfs_inode);
-       return(&hi->vfs_inode);
-}
-
-static void hostfs_destroy_inode(struct inode *inode)
-{
-       if(HOSTFS_I(inode)->host_filename) 
-               kfree(HOSTFS_I(inode)->host_filename);
-
-       if(HOSTFS_I(inode)->fd != -1) 
-               close_file(&HOSTFS_I(inode)->fd);
-
-       kfree(HOSTFS_I(inode));
-}
-
-static void hostfs_read_inode(struct inode *inode)
-{
-       read_inode(inode);
-}
-
-static struct super_operations hostfs_sbops = { 
-       .alloc_inode    = hostfs_alloc_inode,
-       .destroy_inode  = hostfs_destroy_inode,
-       .read_inode     = hostfs_read_inode,
-       .statfs         = hostfs_statfs,
-};
-
-int hostfs_readdir(struct file *file, void *ent, filldir_t filldir)
-{
-       void *dir;
-       char *name;
-       unsigned long long next, ino;
-       int error, len;
-
-       name = dentry_name(file->f_dentry, 0);
-       if(name == NULL) return(-ENOMEM);
-       dir = open_dir(name, &error);
-       kfree(name);
-       if(dir == NULL) return(-error);
-       next = file->f_pos;
-       while((name = read_dir(dir, &next, &ino, &len)) != NULL){
-               error = (*filldir)(ent, name, len, file->f_pos, 
-                                  ino, DT_UNKNOWN);
-               if(error) break;
-               file->f_pos = next;
-       }
-       close_dir(dir);
-       return(0);
-}
-
-int hostfs_file_open(struct inode *ino, struct file *file)
-{
-       char *name;
-       int mode = 0, r = 0, w = 0, fd;
-
-       mode = file->f_mode & (FMODE_READ | FMODE_WRITE);
-       if((mode & HOSTFS_I(ino)->mode) == mode)
-               return(0);
-
-       /* The file may already have been opened, but with the wrong access,
-        * so this resets things and reopens the file with the new access.
-        */
-       if(HOSTFS_I(ino)->fd != -1){
-               close_file(&HOSTFS_I(ino)->fd);
-               HOSTFS_I(ino)->fd = -1;
-       }
-
-       HOSTFS_I(ino)->mode |= mode;
-       if(HOSTFS_I(ino)->mode & FMODE_READ) 
-               r = 1;
-       if(HOSTFS_I(ino)->mode & FMODE_WRITE) 
-               w = 1;
-       if(w) 
-               r = 1;
-
-       name = dentry_name(file->f_dentry, 0);
-       if(name == NULL) 
-               return(-ENOMEM);
-
-       fd = open_file(name, r, w, append);
-       kfree(name);
-       if(fd < 0) return(fd);
-       FILE_HOSTFS_I(file)->fd = fd;
-
-       return(0);
-}
-
-int hostfs_fsync(struct file *file, struct dentry *dentry, int datasync)
-{
-       return(0);
-}
-
-static struct file_operations hostfs_file_fops = {
-       .llseek         = generic_file_llseek,
-       .read           = generic_file_read,
-       .write          = generic_file_write,
-       .mmap           = generic_file_mmap,
-       .open           = hostfs_file_open,
-       .release        = NULL,
-       .fsync          = hostfs_fsync,
-};
-
-static struct file_operations hostfs_dir_fops = {
-       .readdir        = hostfs_readdir,
-       .read           = generic_read_dir,
-};
-
-int hostfs_writepage(struct page *page, struct writeback_control *wbc)
-{
-       struct address_space *mapping = page->mapping;
-       struct inode *inode = mapping->host;
-       char *buffer;
-       unsigned long long base;
-       int count = PAGE_CACHE_SIZE;
-       int end_index = inode->i_size >> PAGE_CACHE_SHIFT;
-       int err;
-
-       if (page->index >= end_index)
-               count = inode->i_size & (PAGE_CACHE_SIZE-1);
-
-       buffer = kmap(page);
-       base = ((unsigned long long) page->index) << PAGE_CACHE_SHIFT;
-
-       err = write_file(HOSTFS_I(inode)->fd, &base, buffer, count);
-       if(err != count){
-               ClearPageUptodate(page);
-               goto out;
-       }
-
-       if (base > inode->i_size)
-               inode->i_size = base;
-
-       if (PageError(page))
-               ClearPageError(page);   
-       err = 0;
-
- out:  
-       kunmap(page);
-
-       unlock_page(page);
-       return err; 
-}
-
-int hostfs_readpage(struct file *file, struct page *page)
-{
-       char *buffer;
-       long long start;
-       int err = 0;
-
-       start = (long long) page->index << PAGE_CACHE_SHIFT;
-       buffer = kmap(page);
-       err = read_file(FILE_HOSTFS_I(file)->fd, &start, buffer,
-                       PAGE_CACHE_SIZE);
-       if(err < 0) goto out;
-
-       memset(&buffer[err], 0, PAGE_CACHE_SIZE - err);
-
-       flush_dcache_page(page);
-       SetPageUptodate(page);
-       if (PageError(page)) ClearPageError(page);
-       err = 0;
- out:
-       kunmap(page);
-       unlock_page(page);
-       return(err);
-}
-
-int hostfs_prepare_write(struct file *file, struct page *page, 
-                        unsigned int from, unsigned int to)
-{
-       char *buffer;
-       long long start, tmp;
-       int err;
-
-       start = (long long) page->index << PAGE_CACHE_SHIFT;
-       buffer = kmap(page);
-       if(from != 0){
-               tmp = start;
-               err = read_file(FILE_HOSTFS_I(file)->fd, &tmp, buffer,
-                               from);
-               if(err < 0) goto out;
-       }
-       if(to != PAGE_CACHE_SIZE){
-               start += to;
-               err = read_file(FILE_HOSTFS_I(file)->fd, &start, buffer + to,
-                               PAGE_CACHE_SIZE - to);
-               if(err < 0) goto out;           
-       }
-       err = 0;
- out:
-       kunmap(page);
-       return(err);
-}
-
-int hostfs_commit_write(struct file *file, struct page *page, unsigned from,
-                unsigned to)
-{
-       struct address_space *mapping = page->mapping;
-       struct inode *inode = mapping->host;
-       char *buffer;
-       long long start;
-       int err = 0;
-
-       start = (long long) (page->index << PAGE_CACHE_SHIFT) + from;
-       buffer = kmap(page);
-       err = write_file(FILE_HOSTFS_I(file)->fd, &start, buffer + from, 
-                        to - from);
-       if(err > 0) err = 0;
-       if(!err && (start > inode->i_size))
-               inode->i_size = start;
-
-       kunmap(page);
-       return(err);
-}
-
-static struct address_space_operations hostfs_aops = {
-       .writepage      = hostfs_writepage,
-       .readpage       = hostfs_readpage,
-/*     .set_page_dirty = __set_page_dirty_nobuffers, */
-       .prepare_write  = hostfs_prepare_write,
-       .commit_write   = hostfs_commit_write
-};
-
-static int init_inode(struct inode *inode, struct dentry *dentry)
-{
-       char *name;
-       int type, err = -ENOMEM, rdev;
-
-       if(dentry){
-               name = dentry_name(dentry, 0);
-               if(name == NULL)
-                       goto out;
-               type = file_type(name, &rdev);
-               kfree(name);
-       }
-       else type = OS_TYPE_DIR;
-
-       err = 0;
-       if(type == OS_TYPE_SYMLINK)
-               inode->i_op = &page_symlink_inode_operations;
-       else if(type == OS_TYPE_DIR)
-               inode->i_op = &hostfs_dir_iops;
-       else inode->i_op = &hostfs_iops;
-
-       if(type == OS_TYPE_DIR) inode->i_fop = &hostfs_dir_fops;
-       else inode->i_fop = &hostfs_file_fops;
-
-       if(type == OS_TYPE_SYMLINK) 
-               inode->i_mapping->a_ops = &hostfs_link_aops;
-       else inode->i_mapping->a_ops = &hostfs_aops;
-
-       switch (type) {
-       case OS_TYPE_CHARDEV:
-               init_special_inode(inode, S_IFCHR, rdev);
-               break;
-       case OS_TYPE_BLOCKDEV:
-               init_special_inode(inode, S_IFBLK, rdev);
-               break;
-       case OS_TYPE_FIFO:
-               init_special_inode(inode, S_IFIFO, 0);
-               break;
-       case OS_TYPE_SOCK:
-               init_special_inode(inode, S_IFSOCK, 0);
-               break;
-       }
- out:
-       return(err);
-}
-
-int hostfs_create(struct inode *dir, struct dentry *dentry, int mode, 
-                 struct nameidata *nd)
-{
-       struct inode *inode;
-       char *name;
-       int error, fd;
-
-       error = -ENOMEM;
-       inode = iget(dir->i_sb, 0);
-       if(inode == NULL) goto out;
-
-       error = init_inode(inode, dentry);
-       if(error) 
-               goto out_put;
-       
-       error = -ENOMEM;
-       name = dentry_name(dentry, 0);
-       if(name == NULL)
-               goto out_put;
-
-       fd = file_create(name, 
-                        mode & S_IRUSR, mode & S_IWUSR, mode & S_IXUSR, 
-                        mode & S_IRGRP, mode & S_IWGRP, mode & S_IXGRP, 
-                        mode & S_IROTH, mode & S_IWOTH, mode & S_IXOTH);
-       if(fd < 0) 
-               error = fd;
-       else error = read_name(inode, name);
-
-       kfree(name);
-       if(error)
-               goto out_put;
-
-       HOSTFS_I(inode)->fd = fd;
-       HOSTFS_I(inode)->mode = FMODE_READ | FMODE_WRITE;
-       d_instantiate(dentry, inode);
-       return(0);
-
- out_put:
-       iput(inode);
- out:
-       return(error);
-}
-
-struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry, 
-                            struct nameidata *nd)
-{
-       struct inode *inode;
-       char *name;
-       int err;
-
-       err = -ENOMEM;
-       inode = iget(ino->i_sb, 0);
-       if(inode == NULL) 
-               goto out;
-       err = init_inode(inode, dentry);
-       if(err) 
-               goto out_put;
-
-       err = -ENOMEM;
-       name = dentry_name(dentry, 0);
-       if(name == NULL)
-               goto out_put;
-
-       err = read_name(inode, name);
-       kfree(name);
-       if(err == -ENOENT){
-               iput(inode);
-               inode = NULL;
-       }
-       else if(err)
-               goto out_put;
-
-       d_add(dentry, inode);
-       dentry->d_op = &hostfs_dentry_ops;
-       return(NULL);
-
- out_put:
-       iput(inode);
- out:
-       return(ERR_PTR(err));
-}
-
-static char *inode_dentry_name(struct inode *ino, struct dentry *dentry)
-{
-        char *file;
-       int len;
-
-       file = inode_name(ino, dentry->d_name.len + 1);
-       if(file == NULL) return(NULL);
-        strcat(file, "/");
-       len = strlen(file);
-        strncat(file, dentry->d_name.name, dentry->d_name.len);
-       file[len + dentry->d_name.len] = '\0';
-        return(file);
-}
-
-int hostfs_link(struct dentry *to, struct inode *ino, struct dentry *from)
-{
-        char *from_name, *to_name;
-        int err;
-
-        if((from_name = inode_dentry_name(ino, from)) == NULL) 
-                return(-ENOMEM);
-        to_name = dentry_name(to, 0);
-       if(to_name == NULL){
-               kfree(from_name);
-               return(-ENOMEM);
-       }
-        err = link_file(to_name, from_name);
-        kfree(from_name);
-        kfree(to_name);
-        return(err);
-}
-
-int hostfs_unlink(struct inode *ino, struct dentry *dentry)
-{
-       char *file;
-       int err;
-
-       if((file = inode_dentry_name(ino, dentry)) == NULL) return(-ENOMEM);
-       if(append)
-               return(-EPERM);
-
-       err = unlink_file(file);
-       kfree(file);
-       return(err);
-}
-
-int hostfs_symlink(struct inode *ino, struct dentry *dentry, const char *to)
-{
-       char *file;
-       int err;
-
-       if((file = inode_dentry_name(ino, dentry)) == NULL) return(-ENOMEM);
-       err = make_symlink(file, to);
-       kfree(file);
-       return(err);
-}
-
-int hostfs_mkdir(struct inode *ino, struct dentry *dentry, int mode)
-{
-       char *file;
-       int err;
-
-       if((file = inode_dentry_name(ino, dentry)) == NULL) return(-ENOMEM);
-       err = do_mkdir(file, mode);
-       kfree(file);
-       return(err);
-}
-
-int hostfs_rmdir(struct inode *ino, struct dentry *dentry)
-{
-       char *file;
-       int err;
-
-       if((file = inode_dentry_name(ino, dentry)) == NULL) return(-ENOMEM);
-       err = do_rmdir(file);
-       kfree(file);
-       return(err);
-}
-
-int hostfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev)
-{
-       struct inode *inode;
-       char *name;
-       int err = -ENOMEM;
-       inode = iget(dir->i_sb, 0);
-       if(inode == NULL) 
-               goto out;
-
-       err = init_inode(inode, dentry);
-       if(err) 
-               goto out_put;
-
-       err = -ENOMEM;
-       name = dentry_name(dentry, 0);
-       if(name == NULL)
-               goto out_put;
-
-       init_special_inode(inode, mode, dev);
-       err = do_mknod(name, mode, dev);
-       if(err)
-               goto out_free;
-
-       err = read_name(inode, name);
-       kfree(name);
-       if(err)
-               goto out_put;
-
-       d_instantiate(dentry, inode);
-       return(0);
-
- out_free:
-       kfree(name);
- out_put:
-       iput(inode);
- out:
-       return(err);
-}
-
-int hostfs_rename(struct inode *from_ino, struct dentry *from,
-                 struct inode *to_ino, struct dentry *to)
-{
-       char *from_name, *to_name;
-       int err;
-
-       if((from_name = inode_dentry_name(from_ino, from)) == NULL)
-               return(-ENOMEM);
-       if((to_name = inode_dentry_name(to_ino, to)) == NULL){
-               kfree(from_name);
-               return(-ENOMEM);
-       }
-       err = rename_file(from_name, to_name);
-       kfree(from_name);
-       kfree(to_name);
-       return(err);
-}
-
-void hostfs_truncate(struct inode *ino)
-{
-       not_implemented();
-}
-
-int hostfs_permission(struct inode *ino, int desired, struct nameidata *nd)
-{
-       char *name;
-       int r = 0, w = 0, x = 0, err;
-
-       if(desired & MAY_READ) r = 1;
-       if(desired & MAY_WRITE) w = 1;
-       if(desired & MAY_EXEC) x = 1;
-       name = inode_name(ino, 0);
-       if(name == NULL) return(-ENOMEM);
-       err = access_file(name, r, w, x);
-       kfree(name);
-       if(!err) err = vfs_permission(ino, desired);
-       return(err);
-}
-
-int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
-{
-       struct hostfs_iattr attrs;
-       char *name;
-       int err;
-       
-       if(append) 
-               attr->ia_valid &= ~ATTR_SIZE;
-
-       attrs.ia_valid = 0;
-       if(attr->ia_valid & ATTR_MODE){
-               attrs.ia_valid |= HOSTFS_ATTR_MODE;
-               attrs.ia_mode = attr->ia_mode;
-       }
-       if(attr->ia_valid & ATTR_UID){
-               if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) && 
-                  (attr->ia_uid == 0))
-                       attr->ia_uid = getuid();
-               attrs.ia_valid |= HOSTFS_ATTR_UID;
-               attrs.ia_uid = attr->ia_uid;
-       }
-       if(attr->ia_valid & ATTR_GID){
-               if((dentry->d_inode->i_sb->s_dev == ROOT_DEV) && 
-                  (attr->ia_gid == 0))
-                       attr->ia_gid = getuid();
-               attrs.ia_valid |= HOSTFS_ATTR_GID;
-               attrs.ia_gid = attr->ia_gid;
-       }
-       if(attr->ia_valid & ATTR_SIZE){
-               attrs.ia_valid |= HOSTFS_ATTR_SIZE;
-               attrs.ia_size = attr->ia_size;
-       }
-       if(attr->ia_valid & ATTR_ATIME){
-               attrs.ia_valid |= HOSTFS_ATTR_ATIME;
-               attrs.ia_atime = attr->ia_atime;
-       }
-       if(attr->ia_valid & ATTR_MTIME){
-               attrs.ia_valid |= HOSTFS_ATTR_MTIME;
-               attrs.ia_mtime = attr->ia_mtime;
-       }
-       if(attr->ia_valid & ATTR_CTIME){
-               attrs.ia_valid |= HOSTFS_ATTR_CTIME;
-               attrs.ia_ctime = attr->ia_ctime;
-       }
-       if(attr->ia_valid & ATTR_ATIME_SET){
-               attrs.ia_valid |= HOSTFS_ATTR_ATIME_SET;
-       }
-       if(attr->ia_valid & ATTR_MTIME_SET){
-               attrs.ia_valid |= HOSTFS_ATTR_MTIME_SET;
-       }
-       name = dentry_name(dentry, 0);
-       if(name == NULL) return(-ENOMEM);
-       err = set_attr(name, &attrs);
-       kfree(name);
-       if(err)
-               return(err);
-
-       return(inode_setattr(dentry->d_inode, attr));
-}
-
-int hostfs_getattr(struct vfsmount *mnt, struct dentry *dentry, 
-          struct kstat *stat)
-{
-       generic_fillattr(dentry->d_inode, stat);
-       return(0);
-}
-
-static struct inode_operations hostfs_iops = {
-       .create         = hostfs_create,
-       .link           = hostfs_link,
-       .unlink         = hostfs_unlink,
-       .symlink        = hostfs_symlink,
-       .mkdir          = hostfs_mkdir,
-       .rmdir          = hostfs_rmdir,
-       .mknod          = hostfs_mknod,
-       .rename         = hostfs_rename,
-       .truncate       = hostfs_truncate,
-       .permission     = hostfs_permission,
-       .setattr        = hostfs_setattr,
-       .getattr        = hostfs_getattr,
-};
-
-static struct inode_operations hostfs_dir_iops = {
-       .create         = hostfs_create,
-       .lookup         = hostfs_lookup,
-       .link           = hostfs_link,
-       .unlink         = hostfs_unlink,
-       .symlink        = hostfs_symlink,
-       .mkdir          = hostfs_mkdir,
-       .rmdir          = hostfs_rmdir,
-       .mknod          = hostfs_mknod,
-       .rename         = hostfs_rename,
-       .truncate       = hostfs_truncate,
-       .permission     = hostfs_permission,
-       .setattr        = hostfs_setattr,
-       .getattr        = hostfs_getattr,
-};
-
-int hostfs_link_readpage(struct file *file, struct page *page)
-{
-       char *buffer, *name;
-       long long start;
-       int err;
-
-       start = page->index << PAGE_CACHE_SHIFT;
-       buffer = kmap(page);
-       name = inode_name(page->mapping->host, 0);
-       if(name == NULL) return(-ENOMEM);
-       err = do_readlink(name, buffer, PAGE_CACHE_SIZE);
-       kfree(name);
-       if(err == PAGE_CACHE_SIZE)
-               err = -E2BIG;
-       else if(err > 0){
-               flush_dcache_page(page);
-               SetPageUptodate(page);
-               if (PageError(page)) ClearPageError(page);
-               err = 0;
-       }
-       kunmap(page);
-       unlock_page(page);
-       return(err);
-}
-
-static struct address_space_operations hostfs_link_aops = {
-       .readpage       = hostfs_link_readpage,
-};
-
-static int hostfs_fill_sb_common(struct super_block *sb, void *d, int silent)
-{
-       struct inode *root_inode;
-       char *name, *data = d;
-       int err;
-
-       sb->s_blocksize = 1024;
-       sb->s_blocksize_bits = 10;
-       sb->s_magic = HOSTFS_SUPER_MAGIC;
-       sb->s_op = &hostfs_sbops;
-
-       if((data == NULL) || (*data == '\0')) 
-               data = root_ino;
-
-       err = -ENOMEM;
-       name = kmalloc(strlen(data) + 1, GFP_KERNEL);
-       if(name == NULL) 
-               goto out;
-
-       strcpy(name, data);
-
-       root_inode = iget(sb, 0);
-       if(root_inode == NULL)
-               goto out_free;
-
-       err = init_inode(root_inode, NULL);
-       if(err)
-               goto out_put;
-
-       HOSTFS_I(root_inode)->host_filename = name;
-
-       err = -ENOMEM;
-       sb->s_root = d_alloc_root(root_inode);
-       if(sb->s_root == NULL)
-               goto out_put;
-
-       err = read_inode(root_inode);
-       if(err)
-               goto out_put;
-
-       return(0);
-
- out_put:
-       iput(root_inode);
- out_free:
-       kfree(name);
- out:
-       return(err);
-}
-
-static struct super_block *hostfs_read_sb(struct file_system_type *type,
-                                            int flags, const char *dev_name,
-                                            void *data)
-{
-       return(get_sb_nodev(type, flags, data, hostfs_fill_sb_common));
-}
-
-static struct file_system_type hostfs_type = {
-       .owner          = THIS_MODULE,
-       .name           = "hostfs",
-       .get_sb         = hostfs_read_sb,
-       .kill_sb        = kill_anon_super,
-       .fs_flags       = 0,
-};
-
-static int __init init_hostfs(void)
-{
-       return(register_filesystem(&hostfs_type));
-}
-
-static void __exit exit_hostfs(void)
-{
-       unregister_filesystem(&hostfs_type);
-}
-
-module_init(init_hostfs)
-module_exit(exit_hostfs)
-MODULE_LICENSE("GPL");
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff --git a/fs/hostfs/hostfs_user.c b/fs/hostfs/hostfs_user.c
deleted file mode 100644 (file)
index c406266..0000000
+++ /dev/null
@@ -1,361 +0,0 @@
-/* 
- * Copyright (C) 2000 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <errno.h>
-#include <utime.h>
-#include <string.h>
-#include <sys/stat.h>
-#include <sys/time.h>
-#include <sys/vfs.h>
-#include "hostfs.h"
-#include "kern_util.h"
-#include "user.h"
-
-int stat_file(const char *path, unsigned long long *inode_out, int *mode_out,
-             int *nlink_out, int *uid_out, int *gid_out, 
-             unsigned long long *size_out, struct timespec *atime_out,
-             struct timespec *mtime_out, struct timespec *ctime_out,
-             int *blksize_out, unsigned long long *blocks_out)
-{
-       struct stat64 buf;
-
-       if(lstat64(path, &buf) < 0) 
-               return(-errno);
-
-       /* See the Makefile for why STAT64_INO_FIELD is passed in
-        * by the build
-        */
-       if(inode_out != NULL) *inode_out = buf.STAT64_INO_FIELD;
-       if(mode_out != NULL) *mode_out = buf.st_mode;
-       if(nlink_out != NULL) *nlink_out = buf.st_nlink;
-       if(uid_out != NULL) *uid_out = buf.st_uid;
-       if(gid_out != NULL) *gid_out = buf.st_gid;
-       if(size_out != NULL) *size_out = buf.st_size;
-       if(atime_out != NULL) {
-               atime_out->tv_sec = buf.st_atime;
-               atime_out->tv_nsec = 0;
-       }
-       if(mtime_out != NULL) {
-               mtime_out->tv_sec = buf.st_mtime;
-               mtime_out->tv_nsec = 0;
-       }
-       if(ctime_out != NULL) {
-               ctime_out->tv_sec = buf.st_ctime;
-               ctime_out->tv_nsec = 0;
-       }
-       if(blksize_out != NULL) *blksize_out = buf.st_blksize;
-       if(blocks_out != NULL) *blocks_out = buf.st_blocks;
-       return(0);
-}
-
-int file_type(const char *path, int *rdev)
-{
-       struct stat64 buf;
-
-       if(lstat64(path, &buf) < 0) 
-               return(-errno);
-       if(rdev != NULL) 
-               *rdev = buf.st_rdev;
-
-       if(S_ISDIR(buf.st_mode)) return(OS_TYPE_DIR);
-       else if(S_ISLNK(buf.st_mode)) return(OS_TYPE_SYMLINK);
-       else if(S_ISCHR(buf.st_mode)) return(OS_TYPE_CHARDEV);
-       else if(S_ISBLK(buf.st_mode)) return(OS_TYPE_BLOCKDEV);
-       else if(S_ISFIFO(buf.st_mode))return(OS_TYPE_FIFO);
-       else if(S_ISSOCK(buf.st_mode))return(OS_TYPE_SOCK);
-       else return(OS_TYPE_FILE);
-}
-
-int access_file(char *path, int r, int w, int x)
-{
-       int mode = 0;
-
-       if(r) mode = R_OK;
-       if(w) mode |= W_OK;
-       if(x) mode |= X_OK;
-       if(access(path, mode) != 0) return(-errno);
-       else return(0);
-}
-
-int open_file(char *path, int r, int w, int append)
-{
-       int mode = 0, fd;
-
-       if(r && !w) 
-               mode = O_RDONLY;
-       else if(!r && w) 
-               mode = O_WRONLY;
-       else if(r && w) 
-               mode = O_RDWR;
-       else panic("Impossible mode in open_file");
-
-       if(append)
-               mode |= O_APPEND;
-       fd = open64(path, mode);
-       if(fd < 0) return(-errno);
-       else return(fd);
-}
-
-void *open_dir(char *path, int *err_out)
-{
-       DIR *dir;
-
-       dir = opendir(path);
-       *err_out = errno;
-       if(dir == NULL) return(NULL);
-       return(dir);
-}
-
-char *read_dir(void *stream, unsigned long long *pos, 
-              unsigned long long *ino_out, int *len_out)
-{
-       DIR *dir = stream;
-       struct dirent *ent;
-
-       seekdir(dir, *pos);
-       ent = readdir(dir);
-       if(ent == NULL) return(NULL);
-       *len_out = strlen(ent->d_name);
-       *ino_out = ent->d_ino;
-       *pos = telldir(dir);
-       return(ent->d_name);
-}
-
-int read_file(int fd, unsigned long long *offset, char *buf, int len)
-{
-       int n;
-
-       n = pread64(fd, buf, len, *offset);
-       if(n < 0) return(-errno);
-       *offset += n;
-       return(n);
-}
-
-int write_file(int fd, unsigned long long *offset, const char *buf, int len)
-{
-       int n;
-
-       n = pwrite64(fd, buf, len, *offset);
-       if(n < 0) return(-errno);
-       *offset += n;
-       return(n);
-}
-
-int lseek_file(int fd, long long offset, int whence)
-{
-       int ret;
-
-       ret = lseek64(fd, offset, whence);
-       if(ret < 0) return(-errno);
-       return(0);
-}
-
-void close_file(void *stream)
-{
-       close(*((int *) stream));
-}
-
-void close_dir(void *stream)
-{
-       closedir(stream);
-}
-
-int file_create(char *name, int ur, int uw, int ux, int gr, 
-               int gw, int gx, int or, int ow, int ox)
-{
-       int mode, fd;
-
-       mode = 0;
-       mode |= ur ? S_IRUSR : 0;
-       mode |= uw ? S_IWUSR : 0;
-       mode |= ux ? S_IXUSR : 0;
-       mode |= gr ? S_IRGRP : 0;
-       mode |= gw ? S_IWGRP : 0;
-       mode |= gx ? S_IXGRP : 0;
-       mode |= or ? S_IROTH : 0;
-       mode |= ow ? S_IWOTH : 0;
-       mode |= ox ? S_IXOTH : 0;
-       fd = open64(name, O_CREAT | O_RDWR, mode);
-       if(fd < 0) 
-               return(-errno);
-       return(fd);
-}
-
-int set_attr(const char *file, struct hostfs_iattr *attrs)
-{
-       struct utimbuf buf;
-       int err, ma;
-
-       if(attrs->ia_valid & HOSTFS_ATTR_MODE){
-               if(chmod(file, attrs->ia_mode) != 0) return(-errno);
-       }
-       if(attrs->ia_valid & HOSTFS_ATTR_UID){
-               if(chown(file, attrs->ia_uid, -1)) return(-errno);
-       }
-       if(attrs->ia_valid & HOSTFS_ATTR_GID){
-               if(chown(file, -1, attrs->ia_gid)) return(-errno);
-       }
-       if(attrs->ia_valid & HOSTFS_ATTR_SIZE){
-               if(truncate(file, attrs->ia_size)) return(-errno);
-       }
-       ma = HOSTFS_ATTR_ATIME_SET | HOSTFS_ATTR_MTIME_SET;
-       if((attrs->ia_valid & ma) == ma){
-               buf.actime = attrs->ia_atime.tv_sec;
-               buf.modtime = attrs->ia_mtime.tv_sec;
-               if(utime(file, &buf) != 0) return(-errno);
-       }
-       else {
-               struct timespec ts;
-
-               if(attrs->ia_valid & HOSTFS_ATTR_ATIME_SET){
-                       err = stat_file(file, NULL, NULL, NULL, NULL, NULL, 
-                                       NULL, NULL, &ts, NULL, NULL, NULL);
-                       if(err != 0) 
-                               return(err);
-                       buf.actime = attrs->ia_atime.tv_sec;
-                       buf.modtime = ts.tv_sec;
-                       if(utime(file, &buf) != 0) 
-                               return(-errno);
-               }
-               if(attrs->ia_valid & HOSTFS_ATTR_MTIME_SET){
-                       err = stat_file(file, NULL, NULL, NULL, NULL, NULL, 
-                                       NULL, &ts, NULL, NULL, NULL, NULL);
-                       if(err != 0) 
-                               return(err);
-                       buf.actime = ts.tv_sec;
-                       buf.modtime = attrs->ia_mtime.tv_sec;
-                       if(utime(file, &buf) != 0) 
-                               return(-errno);
-               }
-       }
-       if(attrs->ia_valid & HOSTFS_ATTR_CTIME) ;
-       if(attrs->ia_valid & (HOSTFS_ATTR_ATIME | HOSTFS_ATTR_MTIME)){
-               err = stat_file(file, NULL, NULL, NULL, NULL, NULL, NULL, 
-                               &attrs->ia_atime, &attrs->ia_mtime, NULL, 
-                               NULL, NULL);
-               if(err != 0) return(err);
-       }
-       return(0);
-}
-
-int make_symlink(const char *from, const char *to)
-{
-       int err;
-
-       err = symlink(to, from);
-       if(err) return(-errno);
-       return(0);
-}
-
-int unlink_file(const char *file)
-{
-       int err;
-
-       err = unlink(file);
-       if(err) return(-errno);
-       return(0);
-}
-
-int do_mkdir(const char *file, int mode)
-{
-       int err;
-
-       err = mkdir(file, mode);
-       if(err) return(-errno);
-       return(0);
-}
-
-int do_rmdir(const char *file)
-{
-       int err;
-
-       err = rmdir(file);
-       if(err) return(-errno);
-       return(0);
-}
-
-int do_mknod(const char *file, int mode, int dev)
-{
-       int err;
-
-       err = mknod(file, mode, dev);
-       if(err) return(-errno);
-       return(0);
-}
-
-int link_file(const char *to, const char *from)
-{
-       int err;
-
-       err = link(to, from);
-       if(err) return(-errno);
-       return(0);
-}
-
-int do_readlink(char *file, char *buf, int size)
-{
-       int n;
-
-       n = readlink(file, buf, size);
-       if(n < 0) 
-               return(-errno);
-       if(n < size) 
-               buf[n] = '\0';
-       return(n);
-}
-
-int rename_file(char *from, char *to)
-{
-       int err;
-
-       err = rename(from, to);
-       if(err < 0) return(-errno);
-       return(0);      
-}
-
-int do_statfs(char *root, long *bsize_out, long long *blocks_out, 
-             long long *bfree_out, long long *bavail_out, 
-             long long *files_out, long long *ffree_out,
-             void *fsid_out, int fsid_size, long *namelen_out, 
-             long *spare_out)
-{
-       struct statfs64 buf;
-       int err;
-
-       err = statfs64(root, &buf);
-       if(err < 0) return(-errno);
-       *bsize_out = buf.f_bsize;
-       *blocks_out = buf.f_blocks;
-       *bfree_out = buf.f_bfree;
-       *bavail_out = buf.f_bavail;
-       *files_out = buf.f_files;
-       *ffree_out = buf.f_ffree;
-       memcpy(fsid_out, &buf.f_fsid, 
-              sizeof(buf.f_fsid) > fsid_size ? fsid_size : 
-              sizeof(buf.f_fsid));
-       *namelen_out = buf.f_namelen;
-       spare_out[0] = buf.f_spare[0];
-       spare_out[1] = buf.f_spare[1];
-       spare_out[2] = buf.f_spare[2];
-       spare_out[3] = buf.f_spare[3];
-       spare_out[4] = buf.f_spare[4];
-       spare_out[5] = buf.f_spare[5];
-       return(0);
-}
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
diff --git a/fs/hppfs/Makefile b/fs/hppfs/Makefile
deleted file mode 100644 (file)
index e67f038..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-# 
-# Copyright (C) 2002, 2003 Jeff Dike (jdike@karaya.com)
-# Licensed under the GPL
-#
-
-hppfs-objs := hppfs_kern.o
-
-obj-y = 
-obj-$(CONFIG_HPPFS) += hppfs.o
-
-clean:
-
-modules:
-
-fastdep:
-
-dep:
-
-archmrproper: clean
diff --git a/fs/hppfs/hppfs_kern.c b/fs/hppfs/hppfs_kern.c
deleted file mode 100644 (file)
index ebf08cb..0000000
+++ /dev/null
@@ -1,811 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include <linux/fs.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/slab.h>
-#include <linux/list.h>
-#include <linux/kernel.h>
-#include <linux/ctype.h>
-#include <linux/dcache.h>
-#include <linux/statfs.h>
-#include <asm/uaccess.h>
-#include <asm/fcntl.h>
-#include "os.h"
-
-static int init_inode(struct inode *inode, struct dentry *dentry);
-
-struct hppfs_data {
-       struct list_head list;
-       char contents[PAGE_SIZE - sizeof(struct list_head)];
-};
-
-struct hppfs_private {
-       struct file proc_file;
-       int host_fd;
-       loff_t len;
-       struct hppfs_data *contents;
-};
-
-struct hppfs_inode_info {
-        struct dentry *proc_dentry;
-       struct inode vfs_inode;
-};
-
-static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode)
-{
-       return(list_entry(inode, struct hppfs_inode_info, vfs_inode));
-}
-
-#define HPPFS_SUPER_MAGIC 0xb00000ee
-
-static struct super_operations hppfs_sbops;
-
-static int is_pid(struct dentry *dentry)
-{
-       struct super_block *sb;
-       int i;
-
-       sb = dentry->d_sb;
-       if((sb->s_op != &hppfs_sbops) || (dentry->d_parent != sb->s_root))
-               return(0);
-
-       for(i = 0; i < dentry->d_name.len; i++){
-               if(!isdigit(dentry->d_name.name[i]))
-                       return(0);
-       }
-       return(1);
-}
-
-static char *dentry_name(struct dentry *dentry, int extra)
-{
-       struct dentry *parent;
-       char *root, *name;
-       const char *seg_name;
-       int len, seg_len;
-
-       len = 0;
-       parent = dentry;
-       while(parent->d_parent != parent){
-               if(is_pid(parent))
-                       len += strlen("pid") + 1;
-               else len += parent->d_name.len + 1;
-               parent = parent->d_parent;
-       }
-       
-       root = "proc";
-       len += strlen(root);
-       name = kmalloc(len + extra + 1, GFP_KERNEL);
-       if(name == NULL) return(NULL);
-
-       name[len] = '\0';
-       parent = dentry;
-       while(parent->d_parent != parent){
-               if(is_pid(parent)){
-                       seg_name = "pid";
-                       seg_len = strlen("pid");
-               }
-               else {
-                       seg_name = parent->d_name.name;
-                       seg_len = parent->d_name.len;
-               }
-
-               len -= seg_len + 1;
-               name[len] = '/';
-               strncpy(&name[len + 1], seg_name, seg_len);
-               parent = parent->d_parent;
-       }
-       strncpy(name, root, strlen(root));
-       return(name);
-}
-
-struct dentry_operations hppfs_dentry_ops = {
-};
-
-static int file_removed(struct dentry *dentry, const char *file)
-{
-       char *host_file;
-       int extra, fd;
-
-       extra = 0;
-       if(file != NULL) extra += strlen(file) + 1;
-
-       host_file = dentry_name(dentry, extra + strlen("/remove"));
-       if(host_file == NULL){
-               printk("file_removed : allocation failed\n");
-               return(-ENOMEM);
-       }
-
-       if(file != NULL){
-               strcat(host_file, "/");
-               strcat(host_file, file);
-       }
-       strcat(host_file, "/remove");
-
-       fd = os_open_file(host_file, of_read(OPENFLAGS()), 0);
-       kfree(host_file);
-       if(fd > 0){
-               os_close_file(fd);
-               return(1);
-       }
-       return(0);
-}
-
-static void hppfs_read_inode(struct inode *ino)
-{
-       struct inode *proc_ino;
-
-       if(HPPFS_I(ino)->proc_dentry == NULL)
-               return;
-
-       proc_ino = HPPFS_I(ino)->proc_dentry->d_inode;
-       ino->i_uid = proc_ino->i_uid;
-       ino->i_gid = proc_ino->i_gid;
-       ino->i_atime = proc_ino->i_atime;
-       ino->i_mtime = proc_ino->i_mtime;
-       ino->i_ctime = proc_ino->i_ctime;
-       ino->i_ino = proc_ino->i_ino;
-       ino->i_mode = proc_ino->i_mode;
-       ino->i_nlink = proc_ino->i_nlink;
-       ino->i_size = proc_ino->i_size;
-       ino->i_blksize = proc_ino->i_blksize;
-       ino->i_blocks = proc_ino->i_blocks;
-}
-
-static struct dentry *hppfs_lookup(struct inode *ino, struct dentry *dentry, 
-                                  struct nameidata *nd)
-{
-       struct dentry *proc_dentry, *new, *parent;
-       struct inode *inode;
-       int err, deleted;
-
-       deleted = file_removed(dentry, NULL);
-       if(deleted < 0)
-               return(ERR_PTR(deleted));
-       else if(deleted)
-               return(ERR_PTR(-ENOENT));
-
-       err = -ENOMEM;
-       parent = HPPFS_I(ino)->proc_dentry;
-       down(&parent->d_inode->i_sem);
-       proc_dentry = d_lookup(parent, &dentry->d_name);
-       if(proc_dentry == NULL){
-               proc_dentry = d_alloc(parent, &dentry->d_name);
-               if(proc_dentry == NULL){
-                       up(&parent->d_inode->i_sem);
-                       goto out;
-               }
-               new = (*parent->d_inode->i_op->lookup)(parent->d_inode, 
-                                                      proc_dentry, NULL);
-               if(new){
-                       dput(proc_dentry);
-                       proc_dentry = new;
-               }
-       }
-       up(&parent->d_inode->i_sem);
-
-       if(IS_ERR(proc_dentry))
-               return(proc_dentry);
-
-       inode = iget(ino->i_sb, 0);
-       if(inode == NULL) 
-               goto out_dput;
-
-       err = init_inode(inode, proc_dentry);
-       if(err) 
-               goto out_put;
-       
-       hppfs_read_inode(inode);
-
-       d_add(dentry, inode);
-       dentry->d_op = &hppfs_dentry_ops;
-       return(NULL);
-
- out_put:
-       iput(inode);
- out_dput:
-       dput(proc_dentry);
- out:
-       return(ERR_PTR(err));
-}
-
-static struct inode_operations hppfs_file_iops = {
-};
-
-static ssize_t read_proc(struct file *file, char *buf, ssize_t count, 
-                        loff_t *ppos, int is_user)
-{
-       ssize_t (*read)(struct file *, char *, size_t, loff_t *);
-       ssize_t n;
-
-       read = file->f_dentry->d_inode->i_fop->read;
-
-       if(!is_user)
-               set_fs(KERNEL_DS);
-               
-       n = (*read)(file, buf, count, &file->f_pos);
-
-       if(!is_user)
-               set_fs(USER_DS);
-
-       if(ppos) *ppos = file->f_pos;
-       return(n);
-}
-
-static ssize_t hppfs_read_file(int fd, char *buf, ssize_t count)
-{
-       ssize_t n;
-       int cur, err;
-       char *new_buf;
-
-       n = -ENOMEM;
-       new_buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
-       if(new_buf == NULL){
-               printk("hppfs_read_file : kmalloc failed\n");
-               goto out;
-       }
-       n = 0;
-       while(count > 0){
-               cur = min_t(ssize_t, count, PAGE_SIZE);
-               err = os_read_file(fd, new_buf, cur);
-               if(err < 0){
-                       printk("hppfs_read : read failed, errno = %d\n",
-                              count);
-                       n = err;
-                       goto out_free;
-               }
-               else if(err == 0)
-                       break;
-
-               if(copy_to_user(buf, new_buf, err)){
-                       n = -EFAULT;
-                       goto out_free;
-               }
-               n += err;
-               count -= err;
-       }
- out_free:
-       kfree(new_buf);
- out:
-       return(n);
-}
-
-static ssize_t hppfs_read(struct file *file, char *buf, size_t count, 
-                         loff_t *ppos)
-{
-       struct hppfs_private *hppfs = file->private_data;
-       struct hppfs_data *data;
-       loff_t off;
-       int err;
-
-       if(hppfs->contents != NULL){
-               if(*ppos >= hppfs->len) return(0);
-
-               data = hppfs->contents;
-               off = *ppos;
-               while(off >= sizeof(data->contents)){
-                       data = list_entry(data->list.next, struct hppfs_data,
-                                         list);
-                       off -= sizeof(data->contents);
-               }
-
-               if(off + count > hppfs->len)
-                       count = hppfs->len - off;
-               copy_to_user(buf, &data->contents[off], count);
-               *ppos += count;
-       }
-       else if(hppfs->host_fd != -1){
-               err = os_seek_file(hppfs->host_fd, *ppos);
-               if(err){
-                       printk("hppfs_read : seek failed, errno = %d\n", err);
-                       return(err);
-               }
-               count = hppfs_read_file(hppfs->host_fd, buf, count);
-               if(count > 0)
-                       *ppos += count;
-       }
-       else count = read_proc(&hppfs->proc_file, buf, count, ppos, 1);
-
-       return(count);
-}
-
-static ssize_t hppfs_write(struct file *file, const char *buf, size_t len, 
-                          loff_t *ppos)
-{
-       struct hppfs_private *data = file->private_data;
-       struct file *proc_file = &data->proc_file;
-       ssize_t (*write)(struct file *, const char *, size_t, loff_t *);
-       int err;
-
-       write = proc_file->f_dentry->d_inode->i_fop->write;
-
-       proc_file->f_pos = file->f_pos;
-       err = (*write)(proc_file, buf, len, &proc_file->f_pos);
-       file->f_pos = proc_file->f_pos;
-
-       return(err);
-}
-
-static int open_host_sock(char *host_file, int *filter_out)
-{
-       char *end;
-       int fd;
-
-       end = &host_file[strlen(host_file)];
-       strcpy(end, "/rw");
-       *filter_out = 1;
-       fd = os_connect_socket(host_file);
-       if(fd > 0)
-               return(fd);
-
-       strcpy(end, "/r");
-       *filter_out = 0;
-       fd = os_connect_socket(host_file);
-       return(fd);
-}
-
-static void free_contents(struct hppfs_data *head)
-{
-       struct hppfs_data *data;
-       struct list_head *ele, *next;
-
-       if(head == NULL) return;
-
-       list_for_each_safe(ele, next, &head->list){
-               data = list_entry(ele, struct hppfs_data, list);
-               kfree(data);
-       }
-       kfree(head);
-}
-
-static struct hppfs_data *hppfs_get_data(int fd, int filter, 
-                                        struct file *proc_file, 
-                                        struct file *hppfs_file, 
-                                        loff_t *size_out)
-{
-       struct hppfs_data *data, *new, *head;
-       int n, err;
-
-       err = -ENOMEM;
-       data = kmalloc(sizeof(*data), GFP_KERNEL);
-       if(data == NULL){
-               printk("hppfs_get_data : head allocation failed\n");
-               goto failed;
-       }
-
-       INIT_LIST_HEAD(&data->list);
-
-       head = data;
-       *size_out = 0;
-
-       if(filter){
-               while((n = read_proc(proc_file, data->contents,
-                                    sizeof(data->contents), NULL, 0)) > 0)
-                       os_write_file(fd, data->contents, n);
-               err = os_shutdown_socket(fd, 0, 1);
-               if(err){
-                       printk("hppfs_get_data : failed to shut down "
-                              "socket\n");
-                       goto failed_free;
-               }
-       }
-       while(1){
-               n = os_read_file(fd, data->contents, sizeof(data->contents));
-               if(n < 0){
-                       err = n;
-                       printk("hppfs_get_data : read failed, errno = %d\n",
-                              err);
-                       goto failed_free;
-               }
-               else if(n == 0)
-                       break;
-
-               *size_out += n;
-
-               if(n < sizeof(data->contents))
-                       break;
-
-               new = kmalloc(sizeof(*data), GFP_KERNEL);
-               if(new == 0){
-                       printk("hppfs_get_data : data allocation failed\n");
-                       err = -ENOMEM;
-                       goto failed_free;
-               }
-       
-               INIT_LIST_HEAD(&new->list);
-               list_add(&new->list, &data->list);
-               data = new;
-       }
-       return(head);
-
- failed_free:
-       free_contents(head);
- failed:               
-       return(ERR_PTR(err));
-}
-
-static struct hppfs_private *hppfs_data(void)
-{
-       struct hppfs_private *data;
-
-       data = kmalloc(sizeof(*data), GFP_KERNEL);
-       if(data == NULL)
-               return(data);
-
-       *data = ((struct hppfs_private ) { .host_fd             = -1,
-                                          .len                 = -1,
-                                          .contents            = NULL } );
-       return(data);
-}
-
-static int file_mode(int fmode)
-{
-       if(fmode == (FMODE_READ | FMODE_WRITE))
-               return(O_RDWR);
-       if(fmode == FMODE_READ)
-               return(O_RDONLY);
-       if(fmode == FMODE_WRITE)
-               return(O_WRONLY);
-       return(0);
-}
-
-static int hppfs_open(struct inode *inode, struct file *file)
-{
-       struct hppfs_private *data;
-       struct dentry *proc_dentry;
-       char *host_file;
-       int err, fd, type, filter;
-
-       err = -ENOMEM;
-       data = hppfs_data();
-       if(data == NULL)
-               goto out;
-
-       host_file = dentry_name(file->f_dentry, strlen("/rw"));
-       if(host_file == NULL)
-               goto out_free2;
-
-       proc_dentry = HPPFS_I(inode)->proc_dentry;
-
-       /* XXX This isn't closed anywhere */
-       err = open_private_file(&data->proc_file, proc_dentry, 
-                               file_mode(file->f_mode));
-       if(err)
-               goto out_free1;
-
-       type = os_file_type(host_file);
-       if(type == OS_TYPE_FILE){
-               fd = os_open_file(host_file, of_read(OPENFLAGS()), 0);
-               if(fd >= 0) 
-                       data->host_fd = fd;
-               else printk("hppfs_open : failed to open '%s', errno = %d\n",
-                           host_file, -fd);
-
-               data->contents = NULL;
-       }
-       else if(type == OS_TYPE_DIR){
-               fd = open_host_sock(host_file, &filter);
-               if(fd > 0){
-                       data->contents = hppfs_get_data(fd, filter, 
-                                                       &data->proc_file, 
-                                                       file, &data->len);
-                       if(!IS_ERR(data->contents))
-                               data->host_fd = fd;
-               }
-               else printk("hppfs_open : failed to open a socket in "
-                           "'%s', errno = %d\n", host_file, -fd);
-       }
-       kfree(host_file);
-
-       file->private_data = data;
-       return(0);
-
- out_free1:
-       kfree(host_file);
- out_free2:
-       free_contents(data->contents);
-       kfree(data);
- out:
-       return(err);
-}
-
-static int hppfs_dir_open(struct inode *inode, struct file *file)
-{
-       struct hppfs_private *data;
-       struct dentry *proc_dentry;
-       int err;
-
-       err = -ENOMEM;
-       data = hppfs_data();
-       if(data == NULL)
-               goto out;
-
-       proc_dentry = HPPFS_I(inode)->proc_dentry;
-       err = open_private_file(&data->proc_file, proc_dentry, 
-                               file_mode(file->f_mode));
-       if(err)
-               goto out_free;
-
-       file->private_data = data;
-       return(0);
-
- out_free:
-       kfree(data);
- out:
-       return(err);
-}
-
-static loff_t hppfs_llseek(struct file *file, loff_t off, int where)
-{
-       struct hppfs_private *data = file->private_data;
-       struct file *proc_file = &data->proc_file;
-       loff_t (*llseek)(struct file *, loff_t, int);
-       loff_t ret;
-
-       llseek = proc_file->f_dentry->d_inode->i_fop->llseek;
-       if(llseek != NULL){
-               ret = (*llseek)(proc_file, off, where);
-               if(ret < 0)
-                       return(ret);
-       }
-
-       return(default_llseek(file, off, where));
-}
-
-static struct file_operations hppfs_file_fops = {
-       .owner          = NULL,
-       .llseek         = hppfs_llseek,
-       .read           = hppfs_read,
-       .write          = hppfs_write,
-       .open           = hppfs_open,
-};
-
-struct hppfs_dirent {
-       void *vfs_dirent;
-       filldir_t filldir;
-       struct dentry *dentry;
-};
-
-static int hppfs_filldir(void *d, const char *name, int size, 
-                        loff_t offset, ino_t inode, unsigned int type)
-{
-       struct hppfs_dirent *dirent = d;
-
-       if(file_removed(dirent->dentry, name))
-               return(0);
-
-       return((*dirent->filldir)(dirent->vfs_dirent, name, size, offset, 
-                                 inode, type));
-}
-
-static int hppfs_readdir(struct file *file, void *ent, filldir_t filldir)
-{
-       struct hppfs_private *data = file->private_data;
-       struct file *proc_file = &data->proc_file;
-       int (*readdir)(struct file *, void *, filldir_t);
-       struct hppfs_dirent dirent = ((struct hppfs_dirent)
-                                     { .vfs_dirent     = ent,
-                                       .filldir        = filldir,
-                                       .dentry         = file->f_dentry } );
-       int err;
-
-       readdir = proc_file->f_dentry->d_inode->i_fop->readdir;
-
-       proc_file->f_pos = file->f_pos;
-       err = (*readdir)(proc_file, &dirent, hppfs_filldir);
-       file->f_pos = proc_file->f_pos;
-
-       return(err);
-}
-
-static int hppfs_fsync(struct file *file, struct dentry *dentry, int datasync)
-{
-       return(0);
-}
-
-static struct file_operations hppfs_dir_fops = {
-       .owner          = NULL,
-       .readdir        = hppfs_readdir,
-       .open           = hppfs_dir_open,
-       .fsync          = hppfs_fsync,
-};
-
-static int hppfs_statfs(struct super_block *sb, struct kstatfs *sf)
-{
-       sf->f_blocks = 0;
-       sf->f_bfree = 0;
-       sf->f_bavail = 0;
-       sf->f_files = 0;
-       sf->f_ffree = 0;
-       sf->f_type = HPPFS_SUPER_MAGIC;
-       return(0);
-}
-
-static struct inode *hppfs_alloc_inode(struct super_block *sb)
-{
-       struct hppfs_inode_info *hi;
-
-       hi = kmalloc(sizeof(*hi), GFP_KERNEL);
-       if(hi == NULL) 
-               return(NULL);
-
-       *hi = ((struct hppfs_inode_info) { .proc_dentry = NULL });
-       inode_init_once(&hi->vfs_inode);
-       return(&hi->vfs_inode);
-}
-
-void hppfs_delete_inode(struct inode *ino)
-{
-       clear_inode(ino);
-}
-
-static void hppfs_destroy_inode(struct inode *inode)
-{
-       kfree(HPPFS_I(inode));
-}
-
-static struct super_operations hppfs_sbops = { 
-       .alloc_inode    = hppfs_alloc_inode,
-       .destroy_inode  = hppfs_destroy_inode,
-       .read_inode     = hppfs_read_inode,
-       .delete_inode   = hppfs_delete_inode,
-       .statfs         = hppfs_statfs,
-};
-
-static int hppfs_readlink(struct dentry *dentry, char *buffer, int buflen)
-{
-       struct file proc_file;
-       struct dentry *proc_dentry;
-       int (*readlink)(struct dentry *, char *, int);
-       int err, n;
-
-       proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry;
-       err = open_private_file(&proc_file, proc_dentry, O_RDONLY);
-       if(err) 
-               return(err);
-
-       readlink = proc_dentry->d_inode->i_op->readlink;
-       n = (*readlink)(proc_dentry, buffer, buflen);
-
-       close_private_file(&proc_file);
-       
-       return(n);
-}
-
-static int hppfs_follow_link(struct dentry *dentry, struct nameidata *nd)
-{
-       struct file proc_file;
-       struct dentry *proc_dentry;
-       int (*follow_link)(struct dentry *, struct nameidata *);
-       int err, n;
-
-       proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry;
-       err = open_private_file(&proc_file, proc_dentry, O_RDONLY);
-       if(err) 
-               return(err);
-
-       follow_link = proc_dentry->d_inode->i_op->follow_link;
-       n = (*follow_link)(proc_dentry, nd);
-
-       close_private_file(&proc_file);
-       
-       return(n);
-}
-
-static struct inode_operations hppfs_dir_iops = {
-       .lookup         = hppfs_lookup,
-};
-
-static struct inode_operations hppfs_link_iops = {
-       .readlink       = hppfs_readlink,
-       .follow_link    = hppfs_follow_link,
-};
-
-static int init_inode(struct inode *inode, struct dentry *dentry)
-{
-       if(S_ISDIR(dentry->d_inode->i_mode)){
-               inode->i_op = &hppfs_dir_iops;
-               inode->i_fop = &hppfs_dir_fops;
-       }
-       else if(S_ISLNK(dentry->d_inode->i_mode)){
-               inode->i_op = &hppfs_link_iops;
-               inode->i_fop = &hppfs_file_fops;
-       }
-       else {
-               inode->i_op = &hppfs_file_iops;
-               inode->i_fop = &hppfs_file_fops;
-       }
-
-       HPPFS_I(inode)->proc_dentry = dentry;
-
-       return(0);
-}
-
-static int hppfs_fill_super(struct super_block *sb, void *d, int silent)
-{
-       struct inode *root_inode;
-       struct file_system_type *procfs;
-       struct super_block *proc_sb;
-       int err;
-
-       err = -ENOENT;
-       procfs = get_fs_type("proc");
-       if(procfs == NULL) 
-               goto out;
-
-       if(list_empty(&procfs->fs_supers))
-               goto out;
-
-       proc_sb = list_entry(procfs->fs_supers.next, struct super_block,
-                            s_instances);
-       
-       sb->s_blocksize = 1024;
-       sb->s_blocksize_bits = 10;
-       sb->s_magic = HPPFS_SUPER_MAGIC;
-       sb->s_op = &hppfs_sbops;
-
-       root_inode = iget(sb, 0);
-       if(root_inode == NULL)
-               goto out;
-
-       err = init_inode(root_inode, proc_sb->s_root);
-       if(err)
-               goto out_put;
-
-       err = -ENOMEM;
-       sb->s_root = d_alloc_root(root_inode);
-       if(sb->s_root == NULL)
-               goto out_put;
-
-       hppfs_read_inode(root_inode);
-
-       return(0);
-
- out_put:
-       iput(root_inode);
- out:
-       return(err);
-}
-
-static struct super_block *hppfs_read_super(struct file_system_type *type,
-                                            int flags, const char *dev_name,
-                                            void *data)
-{
-       return(get_sb_nodev(type, flags, data, hppfs_fill_super));
-}
-
-static struct file_system_type hppfs_type = {
-       .owner          = THIS_MODULE,
-       .name           = "hppfs",
-       .get_sb         = hppfs_read_super,
-       .kill_sb        = kill_anon_super,
-       .fs_flags       = 0,
-};
-
-static int __init init_hppfs(void)
-{
-       return(register_filesystem(&hppfs_type));
-}
-
-static void __exit exit_hppfs(void)
-{
-       unregister_filesystem(&hppfs_type);
-}
-
-module_init(init_hppfs)
-module_exit(exit_hppfs)
-MODULE_LICENSE("GPL");
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 28fa42c..0c21ca8 100644 (file)
@@ -447,10 +447,7 @@ static int parse_options(char *options, struct iso9660_options * popt)
                case Opt_sb:
                        if (match_int(&args[0], &option))
                                return 0;
-                       n = option;
-                       if (n > 660 * 512)
-                               return 0;
-                       popt->sbsector = n;
+                       popt->sbsector = option;
                        break;
                case Opt_check_r:
                        popt->check = 'r';
@@ -1463,4 +1460,5 @@ static void __exit exit_iso9660_fs(void)
 module_init(init_iso9660_fs)
 module_exit(exit_iso9660_fs)
 MODULE_LICENSE("GPL");
-
+/* Actual filesystem name is iso9660, as requested in filesystems.c */
+MODULE_ALIAS("iso9660");
index 4ee3c3e..77365a0 100644 (file)
@@ -177,8 +177,14 @@ void journal_commit_transaction(journal_t *journal)
                 * leave undo-committed data.
                 */
                if (jh->b_committed_data) {
-                       kfree(jh->b_committed_data);
-                       jh->b_committed_data = NULL;
+                       struct buffer_head *bh = jh2bh(jh);
+
+                       jbd_lock_bh_state(bh);
+                       if (jh->b_committed_data) {
+                               kfree(jh->b_committed_data);
+                               jh->b_committed_data = NULL;
+                       }
+                       jbd_unlock_bh_state(bh);
                }
                journal_refile_buffer(journal, jh);
        }
@@ -264,6 +270,16 @@ write_out_data_locked:
                                jbd_unlock_bh_state(bh);
                                journal_remove_journal_head(bh);
                                __brelse(bh);
+                               if (need_resched() && commit_transaction->
+                                                       t_sync_datalist) {
+                                       commit_transaction->t_sync_datalist =
+                                                               next_jh;
+                                       if (bufs)
+                                               break;
+                                       spin_unlock(&journal->j_list_lock);
+                                       cond_resched();
+                                       goto write_out_data;
+                               }
                        }
                }
                if (bufs == ARRAY_SIZE(wbuf)) {
@@ -284,8 +300,7 @@ write_out_data_locked:
                cond_resched();
                journal_brelse_array(wbuf, bufs);
                spin_lock(&journal->j_list_lock);
-               if (bufs)
-                       goto write_out_data_locked;
+               goto write_out_data_locked;
        }
 
        /*
index 6ba8af8..e7bd3ff 100644 (file)
@@ -1983,6 +1983,24 @@ int lock_may_write(struct inode *inode, loff_t start, unsigned long len)
 
 EXPORT_SYMBOL(lock_may_write);
 
+void steal_locks(fl_owner_t from)
+{
+       struct list_head *tmp;
+
+       if (from == current->files)
+               return;
+
+       lock_kernel();
+       list_for_each(tmp, &file_lock_list) {
+               struct file_lock *fl = list_entry(tmp, struct file_lock, fl_link);
+               if (fl->fl_owner == from)
+                       fl->fl_owner = current->files;
+       }
+       unlock_kernel();
+}
+
+EXPORT_SYMBOL(steal_locks);
+
 static int __init filelock_init(void)
 {
        filelock_cache = kmem_cache_create("file_lock_cache",
index 690fc68..62a24f6 100644 (file)
@@ -244,13 +244,14 @@ static int msdos_add_entry(struct inode *dir, const unsigned char *name,
         */
        dir->i_ctime = dir->i_mtime = CURRENT_TIME;
        mark_inode_dirty(dir);
-       memcpy((*de)->name,name,MSDOS_NAME);
+
+       memcpy((*de)->name, name, MSDOS_NAME);
        (*de)->attr = is_dir ? ATTR_DIR : ATTR_ARCH;
        if (is_hid)
                (*de)->attr |= ATTR_HIDDEN;
        (*de)->start = 0;
        (*de)->starthi = 0;
-       fat_date_unix2dos(dir->i_mtime.tv_sec,&(*de)->time,&(*de)->date);
+       fat_date_unix2dos(dir->i_mtime.tv_sec, &(*de)->time, &(*de)->date);
        (*de)->size = 0;
        mark_buffer_dirty(*bh);
        return 0;
@@ -393,7 +394,6 @@ out_unlock:
        return res;
 
 mkdir_error:
-       printk(KERN_WARNING "msdos_mkdir: error=%d, attempting cleanup\n", res);
        inode->i_nlink = 0;
        inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
        dir->i_nlink--;
@@ -468,13 +468,9 @@ static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name,
                        if (error)
                                goto out;
                }
-               error = fat_scan(old_inode, MSDOS_DOTDOT, &dotdot_bh,
-                               &dotdot_de, &dotdot_i_pos);
-               if (error < 0) {
-                       printk(KERN_WARNING
-                               "MSDOS: %s/%s, get dotdot failed, ret=%d\n",
-                               old_dentry->d_parent->d_name.name,
-                               old_dentry->d_name.name, error);
+               if (fat_scan(old_inode, MSDOS_DOTDOT, &dotdot_bh,
+                            &dotdot_de, &dotdot_i_pos) < 0) {
+                       error = -EIO;
                        goto out;
                }
        }
index fe2f2dc..1428084 100644 (file)
@@ -65,6 +65,7 @@ config NCPFS_SMALLDOS
 config NCPFS_NLS
        bool "Use Native Language Support"
        depends on NCP_FS
+       select NLS
        help
          Allows you to use codepages and I/O charsets for file name
          translation between the server file system and input/output. This
index 6c067d6..5fb8e87 100644 (file)
@@ -26,7 +26,7 @@
  * Fill in the supplied page for mmap
  */
 static struct page* ncp_file_mmap_nopage(struct vm_area_struct *area,
-                                    unsigned long address, int write_access)
+                                    unsigned long address, int *type)
 {
        struct file *file = area->vm_file;
        struct dentry *dentry = file->f_dentry;
@@ -85,6 +85,15 @@ static struct page* ncp_file_mmap_nopage(struct vm_area_struct *area,
                memset(pg_addr + already_read, 0, PAGE_SIZE - already_read);
        flush_dcache_page(page);
        kunmap(page);
+
+       /*
+        * If I understand ncp_read_kernel() properly, the above always
+        * fetches from the network, here the analogue of disk.
+        * -- wli
+        */
+       if (type)
+               *type = VM_FAULT_MAJOR;
+       inc_page_state(pgmajfault);
        return page;
 }
 
index 074a9a9..21c2559 100644 (file)
@@ -1,24 +1,25 @@
 #
 # Native language support configuration
 #
-# smb wants NLS
-config SMB_NLS
-       bool
-       depends on SMB_FS
-       default y
 
-# msdos and Joliet want NLS
+menu "Native Language Support"
+
 config NLS
-       bool
-       depends on JOLIET || FAT_FS || NTFS_FS || NCPFS_NLS || SMB_NLS || JFS_FS || CIFS || BEFS_FS
-       default y
+       tristate "Base native language support"
+       ---help---
+         The base Native Language Support. A number of filesystems
+         depend on it (e.g. FAT, JOLIET, NT, BEOS filesystems), as well
+         as the ability of some filesystems to use native languages
+         (NCP, SMB).
 
+         If unsure, say Y.
 
-menu "Native Language Support"
-       depends on NLS
+         To compile this code as a module, choose M here: the module
+         will be called nls_base.
 
 config NLS_DEFAULT
        string "Default NLS Option"
+       depends on NLS
        default "iso8859-1"
        ---help---
          The default NLS used when mounting file system. Note, that this is
@@ -38,6 +39,7 @@ config NLS_DEFAULT
 
 config NLS_CODEPAGE_437
        tristate "Codepage 437 (United States, Canada)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored
@@ -50,6 +52,7 @@ config NLS_CODEPAGE_437
 
 config NLS_CODEPAGE_737
        tristate "Codepage 737 (Greek)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored
@@ -62,6 +65,7 @@ config NLS_CODEPAGE_737
 
 config NLS_CODEPAGE_775
        tristate "Codepage 775 (Baltic Rim)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored
@@ -75,6 +79,7 @@ config NLS_CODEPAGE_775
 
 config NLS_CODEPAGE_850
        tristate "Codepage 850 (Europe)"
+       depends on NLS
        ---help---
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -91,6 +96,7 @@ config NLS_CODEPAGE_850
 
 config NLS_CODEPAGE_852
        tristate "Codepage 852 (Central/Eastern Europe)"
+       depends on NLS
        ---help---
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -106,6 +112,7 @@ config NLS_CODEPAGE_852
 
 config NLS_CODEPAGE_855
        tristate "Codepage 855 (Cyrillic)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -117,6 +124,7 @@ config NLS_CODEPAGE_855
 
 config NLS_CODEPAGE_857
        tristate "Codepage 857 (Turkish)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -128,6 +136,7 @@ config NLS_CODEPAGE_857
 
 config NLS_CODEPAGE_860
        tristate "Codepage 860 (Portuguese)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -139,6 +148,7 @@ config NLS_CODEPAGE_860
 
 config NLS_CODEPAGE_861
        tristate "Codepage 861 (Icelandic)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -150,6 +160,7 @@ config NLS_CODEPAGE_861
 
 config NLS_CODEPAGE_862
        tristate "Codepage 862 (Hebrew)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -161,6 +172,7 @@ config NLS_CODEPAGE_862
 
 config NLS_CODEPAGE_863
        tristate "Codepage 863 (Canadian French)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -173,6 +185,7 @@ config NLS_CODEPAGE_863
 
 config NLS_CODEPAGE_864
        tristate "Codepage 864 (Arabic)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -184,6 +197,7 @@ config NLS_CODEPAGE_864
 
 config NLS_CODEPAGE_865
        tristate "Codepage 865 (Norwegian, Danish)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -196,6 +210,7 @@ config NLS_CODEPAGE_865
 
 config NLS_CODEPAGE_866
        tristate "Codepage 866 (Cyrillic/Russian)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -208,6 +223,7 @@ config NLS_CODEPAGE_866
 
 config NLS_CODEPAGE_869
        tristate "Codepage 869 (Greek)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -219,6 +235,7 @@ config NLS_CODEPAGE_869
 
 config NLS_CODEPAGE_936
        tristate "Simplified Chinese charset (CP936, GB2312)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -231,6 +248,7 @@ config NLS_CODEPAGE_936
 
 config NLS_CODEPAGE_950
        tristate "Traditional Chinese charset (Big5)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -243,6 +261,7 @@ config NLS_CODEPAGE_950
 
 config NLS_CODEPAGE_932
        tristate "Japanese charsets (Shift-JIS, EUC-JP)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -256,6 +275,7 @@ config NLS_CODEPAGE_932
 
 config NLS_CODEPAGE_949
        tristate "Korean charset (CP949, EUC-KR)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -267,6 +287,7 @@ config NLS_CODEPAGE_949
 
 config NLS_CODEPAGE_874
        tristate "Thai charset (CP874, TIS-620)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -278,6 +299,7 @@ config NLS_CODEPAGE_874
 
 config NLS_ISO8859_8
        tristate "Hebrew charsets (ISO-8859-8, CP1255)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -287,6 +309,7 @@ config NLS_ISO8859_8
 
 config NLS_CODEPAGE_1250
        tristate "Windows CP1250 (Slavic/Central European Languages)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CDROMs
@@ -298,6 +321,7 @@ config NLS_CODEPAGE_1250
 
 config NLS_CODEPAGE_1251
        tristate "Windows CP1251 (Bulgarian, Belarusian)"
+       depends on NLS
        help
          The Microsoft FAT file system family can deal with filenames in
          native language character sets. These character sets are stored in
@@ -310,6 +334,7 @@ config NLS_CODEPAGE_1251
 
 config NLS_ISO8859_1
        tristate "NLS ISO 8859-1  (Latin 1; Western European Languages)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -322,6 +347,7 @@ config NLS_ISO8859_1
 
 config NLS_ISO8859_2
        tristate "NLS ISO 8859-2  (Latin 2; Slavic/Central European Languages)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -333,6 +359,7 @@ config NLS_ISO8859_2
 
 config NLS_ISO8859_3
        tristate "NLS ISO 8859-3  (Latin 3; Esperanto, Galician, Maltese, Turkish)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -343,6 +370,7 @@ config NLS_ISO8859_3
 
 config NLS_ISO8859_4
        tristate "NLS ISO 8859-4  (Latin 4; old Baltic charset)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -353,6 +381,7 @@ config NLS_ISO8859_4
 
 config NLS_ISO8859_5
        tristate "NLS ISO 8859-5  (Cyrillic)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -364,6 +393,7 @@ config NLS_ISO8859_5
 
 config NLS_ISO8859_6
        tristate "NLS ISO 8859-6  (Arabic)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -373,6 +403,7 @@ config NLS_ISO8859_6
 
 config NLS_ISO8859_7
        tristate "NLS ISO 8859-7  (Modern Greek)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -382,6 +413,7 @@ config NLS_ISO8859_7
 
 config NLS_ISO8859_9
        tristate "NLS ISO 8859-9  (Latin 5; Turkish)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -392,6 +424,7 @@ config NLS_ISO8859_9
 
 config NLS_ISO8859_13
        tristate "NLS ISO 8859-13 (Latin 7; Baltic)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -402,6 +435,7 @@ config NLS_ISO8859_13
 
 config NLS_ISO8859_14
        tristate "NLS ISO 8859-14 (Latin 8; Celtic)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -413,6 +447,7 @@ config NLS_ISO8859_14
 
 config NLS_ISO8859_15
        tristate "NLS ISO 8859-15 (Latin 9; Western European Languages with Euro)"
+       depends on NLS
        ---help---
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -429,6 +464,7 @@ config NLS_ISO8859_15
 
 config NLS_KOI8_R
        tristate "NLS KOI8-R (Russian)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -438,6 +474,7 @@ config NLS_KOI8_R
 
 config NLS_KOI8_U
        tristate "NLS KOI8-U/RU (Ukrainian, Belarusian)"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
@@ -447,6 +484,7 @@ config NLS_KOI8_U
 
 config NLS_UTF8
        tristate "NLS UTF8"
+       depends on NLS
        help
          If you want to display filenames with native language characters
          from the Microsoft FAT file system family or from JOLIET CD-ROMs
index d0904e1..07b8bea 100644 (file)
@@ -99,6 +99,7 @@ utf8_mbstowcs(wchar_t *pwcs, const __u8 *s, int n)
                        }
                } else {
                        *op++ = *ip++;
+                       n--;
                }
        }
        return (op - pwcs);
@@ -480,7 +481,7 @@ struct nls_table *load_nls_default(void)
        if (default_nls != NULL)
                return default_nls;
        else
-               return &default_table;
+               return &default_table;
 }
 
 EXPORT_SYMBOL(register_nls);
@@ -492,3 +493,5 @@ EXPORT_SYMBOL(utf8_mbtowc);
 EXPORT_SYMBOL(utf8_mbstowcs);
 EXPORT_SYMBOL(utf8_wctomb);
 EXPORT_SYMBOL(utf8_wcstombs);
+
+MODULE_LICENSE("Dual BSD/GPL");
index e75a087..6caa029 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -13,6 +13,7 @@
 #include <linux/fs.h>
 #include <linux/mount.h>
 #include <linux/pipe_fs_i.h>
+#include <linux/uio.h>
 #include <asm/uaccess.h>
 #include <asm/ioctls.h>
 
@@ -43,19 +44,63 @@ void pipe_wait(struct inode * inode)
        down(PIPE_SEM(*inode));
 }
 
+static inline int
+pipe_iov_copy_from_user(void *to, struct iovec *iov, unsigned long len)
+{
+       unsigned long copy;
+
+       while (len > 0) {
+               while (!iov->iov_len)
+                       iov++;
+               copy = min_t(unsigned long, len, iov->iov_len);
+
+               if (copy_from_user(to, iov->iov_base, copy))
+                       return -EFAULT;
+               to += copy;
+               len -= copy;
+               iov->iov_base += copy;
+               iov->iov_len -= copy;
+       }
+       return 0;
+}
+
+static inline int
+pipe_iov_copy_to_user(struct iovec *iov, const void *from, unsigned long len)
+{
+       unsigned long copy;
+
+       while (len > 0) {
+               while (!iov->iov_len)
+                       iov++;
+               copy = min_t(unsigned long, len, iov->iov_len);
+
+               if (copy_to_user(iov->iov_base, from, copy))
+                       return -EFAULT;
+               from += copy;
+               len -= copy;
+               iov->iov_base += copy;
+               iov->iov_len -= copy;
+       }
+       return 0;
+}
+
 static ssize_t
-pipe_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos)
+pipe_readv(struct file *filp, const struct iovec *_iov,
+          unsigned long nr_segs, loff_t *ppos)
 {
        struct inode *inode = filp->f_dentry->d_inode;
        int do_wakeup;
        ssize_t ret;
+       struct iovec *iov = (struct iovec *)_iov;
+       size_t total_len;
 
        /* pread is not allowed on pipes. */
        if (unlikely(ppos != &filp->f_pos))
                return -ESPIPE;
-       
+
+       total_len = iov_length(iov, nr_segs);
        /* Null read succeeds. */
-       if (unlikely(count == 0))
+       if (unlikely(total_len == 0))
                return 0;
 
        do_wakeup = 0;
@@ -67,12 +112,12 @@ pipe_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos)
                        char *pipebuf = PIPE_BASE(*inode) + PIPE_START(*inode);
                        ssize_t chars = PIPE_MAX_RCHUNK(*inode);
 
-                       if (chars > count)
-                               chars = count;
+                       if (chars > total_len)
+                               chars = total_len;
                        if (chars > size)
                                chars = size;
 
-                       if (copy_to_user(buf, pipebuf, chars)) {
+                       if (pipe_iov_copy_to_user(iov, pipebuf, chars)) {
                                if (!ret) ret = -EFAULT;
                                break;
                        }
@@ -81,12 +126,11 @@ pipe_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos)
                        PIPE_START(*inode) += chars;
                        PIPE_START(*inode) &= (PIPE_SIZE - 1);
                        PIPE_LEN(*inode) -= chars;
-                       count -= chars;
-                       buf += chars;
+                       total_len -= chars;
                        do_wakeup = 1;
+                       if (!total_len)
+                               break;  /* common path: read succeeded */
                }
-               if (!count)
-                       break;  /* common path: read succeeded */
                if (PIPE_LEN(*inode)) /* test for cyclic buffers */
                        continue;
                if (!PIPE_WRITERS(*inode))
@@ -126,24 +170,35 @@ pipe_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos)
 }
 
 static ssize_t
-pipe_write(struct file *filp, const char __user *buf, size_t count, loff_t *ppos)
+pipe_read(struct file *filp, char __user *buf, size_t count, loff_t *ppos)
+{
+       struct iovec iov = { .iov_base = buf, .iov_len = count };
+       return pipe_readv(filp, &iov, 1, ppos);
+}
+
+static ssize_t
+pipe_writev(struct file *filp, const struct iovec *_iov,
+           unsigned long nr_segs, loff_t *ppos)
 {
        struct inode *inode = filp->f_dentry->d_inode;
        ssize_t ret;
        size_t min;
        int do_wakeup;
+       struct iovec *iov = (struct iovec *)_iov;
+       size_t total_len;
 
        /* pwrite is not allowed on pipes. */
        if (unlikely(ppos != &filp->f_pos))
                return -ESPIPE;
-       
+
+       total_len = iov_length(iov, nr_segs);
        /* Null write succeeds. */
-       if (unlikely(count == 0))
+       if (unlikely(total_len == 0))
                return 0;
 
        do_wakeup = 0;
        ret = 0;
-       min = count;
+       min = total_len;
        if (min > PIPE_BUF)
                min = 1;
        down(PIPE_SEM(*inode));
@@ -164,23 +219,22 @@ pipe_write(struct file *filp, const char __user *buf, size_t count, loff_t *ppos
                         * syscall merging.
                         */
                        do_wakeup = 1;
-                       if (chars > count)
-                               chars = count;
+                       if (chars > total_len)
+                               chars = total_len;
                        if (chars > free)
                                chars = free;
 
-                       if (copy_from_user(pipebuf, buf, chars)) {
+                       if (pipe_iov_copy_from_user(pipebuf, iov, chars)) {
                                if (!ret) ret = -EFAULT;
                                break;
                        }
-
                        ret += chars;
+
                        PIPE_LEN(*inode) += chars;
-                       count -= chars;
-                       buf += chars;
+                       total_len -= chars;
+                       if (!total_len)
+                               break;
                }
-               if (!count)
-                       break;
                if (PIPE_FREE(*inode) && ret) {
                        /* handle cyclic data buffers */
                        min = 1;
@@ -214,6 +268,14 @@ pipe_write(struct file *filp, const char __user *buf, size_t count, loff_t *ppos
 }
 
 static ssize_t
+pipe_write(struct file *filp, const char __user *buf,
+          size_t count, loff_t *ppos)
+{
+       struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = count };
+       return pipe_writev(filp, &iov, 1, ppos);
+}
+
+static ssize_t
 bad_pipe_r(struct file *filp, char __user *buf, size_t count, loff_t *ppos)
 {
        return -EBADF;
@@ -405,6 +467,7 @@ pipe_rdwr_open(struct inode *inode, struct file *filp)
 struct file_operations read_fifo_fops = {
        .llseek         = no_llseek,
        .read           = pipe_read,
+       .readv          = pipe_readv,
        .write          = bad_pipe_w,
        .poll           = fifo_poll,
        .ioctl          = pipe_ioctl,
@@ -417,6 +480,7 @@ struct file_operations write_fifo_fops = {
        .llseek         = no_llseek,
        .read           = bad_pipe_r,
        .write          = pipe_write,
+       .writev         = pipe_writev,
        .poll           = fifo_poll,
        .ioctl          = pipe_ioctl,
        .open           = pipe_write_open,
@@ -427,7 +491,9 @@ struct file_operations write_fifo_fops = {
 struct file_operations rdwr_fifo_fops = {
        .llseek         = no_llseek,
        .read           = pipe_read,
+       .readv          = pipe_readv,
        .write          = pipe_write,
+       .writev         = pipe_writev,
        .poll           = fifo_poll,
        .ioctl          = pipe_ioctl,
        .open           = pipe_rdwr_open,
@@ -438,6 +504,7 @@ struct file_operations rdwr_fifo_fops = {
 struct file_operations read_pipe_fops = {
        .llseek         = no_llseek,
        .read           = pipe_read,
+       .readv          = pipe_readv,
        .write          = bad_pipe_w,
        .poll           = pipe_poll,
        .ioctl          = pipe_ioctl,
@@ -450,6 +517,7 @@ struct file_operations write_pipe_fops = {
        .llseek         = no_llseek,
        .read           = bad_pipe_r,
        .write          = pipe_write,
+       .writev         = pipe_writev,
        .poll           = pipe_poll,
        .ioctl          = pipe_ioctl,
        .open           = pipe_write_open,
@@ -460,7 +528,9 @@ struct file_operations write_pipe_fops = {
 struct file_operations rdwr_pipe_fops = {
        .llseek         = no_llseek,
        .read           = pipe_read,
+       .readv          = pipe_readv,
        .write          = pipe_write,
+       .writev         = pipe_writev,
        .poll           = pipe_poll,
        .ioctl          = pipe_ioctl,
        .open           = pipe_rdwr_open,
index 9da127f..f16a555 100644 (file)
@@ -277,15 +277,50 @@ static int proc_root_link(struct inode *inode, struct dentry **dentry, struct vf
        return result;
 }
 
+#define MAY_PTRACE(task) \
+       (task == current || \
+       (task->parent == current && \
+       (task->ptrace & PT_PTRACED) &&  task->state == TASK_STOPPED && \
+        security_ptrace(current,task) == 0))
+
+static int may_ptrace_attach(struct task_struct *task)
+{
+       int retval = 0;
+
+       task_lock(task);
+
+       if (!task->mm)
+               goto out;
+       if (((current->uid != task->euid) ||
+            (current->uid != task->suid) ||
+            (current->uid != task->uid) ||
+            (current->gid != task->egid) ||
+            (current->gid != task->sgid) ||
+            (current->gid != task->gid)) && !capable(CAP_SYS_PTRACE))
+               goto out;
+       rmb();
+       if (!task->mm->dumpable && !capable(CAP_SYS_PTRACE))
+               goto out;
+       if (security_ptrace(current, task))
+               goto out;
+
+       retval = 1;
+out:
+       task_unlock(task);
+       return retval;
+}
+
 static int proc_pid_environ(struct task_struct *task, char * buffer)
 {
        int res = 0;
        struct mm_struct *mm = get_task_mm(task);
        if (mm) {
-               int len = mm->env_end - mm->env_start;
+               unsigned int len = mm->env_end - mm->env_start;
                if (len > PAGE_SIZE)
                        len = PAGE_SIZE;
                res = access_process_vm(task, mm->env_start, buffer, len, 0);
+               if (!may_ptrace_attach(task))
+                       res = -ESRCH;
                mmput(mm);
        }
        return res;
@@ -294,7 +329,7 @@ static int proc_pid_environ(struct task_struct *task, char * buffer)
 static int proc_pid_cmdline(struct task_struct *task, char * buffer)
 {
        int res = 0;
-       int len;
+       unsigned int len;
        struct mm_struct *mm = get_task_mm(task);
        if (!mm)
                goto out;
@@ -521,10 +556,6 @@ static struct file_operations proc_info_file_operations = {
        .read           = proc_info_read,
 };
 
-#define MAY_PTRACE(p) \
-(p==current||(p->parent==current&&(p->ptrace & PT_PTRACED)&&p->state==TASK_STOPPED&&security_ptrace(current,p)==0))
-
-
 static int mem_open(struct inode* inode, struct file* file)
 {
        file->private_data = (void*)((long)current->self_exec_id);
@@ -540,7 +571,7 @@ static ssize_t mem_read(struct file * file, char * buf,
        int ret = -ESRCH;
        struct mm_struct *mm;
 
-       if (!MAY_PTRACE(task))
+       if (!MAY_PTRACE(task) || !may_ptrace_attach(task))
                goto out;
 
        ret = -ENOMEM;
@@ -566,7 +597,7 @@ static ssize_t mem_read(struct file * file, char * buf,
 
                this_len = (count > PAGE_SIZE) ? PAGE_SIZE : count;
                retval = access_process_vm(task, src, page, this_len, 0);
-               if (!retval) {
+               if (!retval || !MAY_PTRACE(task) || !may_ptrace_attach(task)) {
                        if (!ret)
                                ret = -EIO;
                        break;
@@ -604,7 +635,7 @@ static ssize_t mem_write(struct file * file, const char * buf,
        struct task_struct *task = proc_task(file->f_dentry->d_inode);
        unsigned long dst = *ppos;
 
-       if (!MAY_PTRACE(task))
+       if (!MAY_PTRACE(task) || !may_ptrace_attach(task))
                return -ESRCH;
 
        page = (char *)__get_free_page(GFP_USER);
@@ -1524,6 +1555,7 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct
        struct inode *inode;
        struct proc_inode *ei;
        unsigned tgid;
+       int died;
 
        if (dentry->d_name.len == 4 && !memcmp(dentry->d_name.name,"self",4)) {
                inode = new_inode(dir->i_sb);
@@ -1567,12 +1599,21 @@ struct dentry *proc_pid_lookup(struct inode *dir, struct dentry * dentry, struct
 
        dentry->d_op = &pid_base_dentry_operations;
 
+       died = 0;
+       d_add(dentry, inode);
        spin_lock(&task->proc_lock);
        task->proc_dentry = dentry;
-       d_add(dentry, inode);
+       if (!pid_alive(task)) {
+               dentry = proc_pid_unhash(task);
+               died = 1;
+       }
        spin_unlock(&task->proc_lock);
 
        put_task_struct(task);
+       if (died) {
+               proc_pid_flush(dentry);
+               goto out;
+       }
        return NULL;
 out:
        return ERR_PTR(-ENOENT);
@@ -1612,10 +1653,7 @@ static struct dentry *proc_task_lookup(struct inode *dir, struct dentry * dentry
 
        dentry->d_op = &pid_base_dentry_operations;
 
-       spin_lock(&task->proc_lock);
-       task->proc_dentry = dentry;
        d_add(dentry, inode);
-       spin_unlock(&task->proc_lock);
 
        put_task_struct(task);
        return NULL;
index d23db32..9234866 100644 (file)
@@ -567,12 +567,12 @@ struct proc_dir_entry *proc_symlink(const char *name,
        return ent;
 }
 
-struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *parent)
+struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode,
+               struct proc_dir_entry *parent)
 {
        struct proc_dir_entry *ent;
 
-       ent = proc_create(&parent,name,
-                         (S_IFDIR | S_IRUGO | S_IXUGO),2);
+       ent = proc_create(&parent, name, S_IFDIR | mode, 2);
        if (ent) {
                ent->proc_fops = &proc_dir_operations;
                ent->proc_iops = &proc_dir_inode_operations;
@@ -585,6 +585,12 @@ struct proc_dir_entry *proc_mkdir(const char *name, struct proc_dir_entry *paren
        return ent;
 }
 
+struct proc_dir_entry *proc_mkdir(const char *name,
+               struct proc_dir_entry *parent)
+{
+       return proc_mkdir_mode(name, S_IRUGO | S_IXUGO, parent);
+}
+
 struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode,
                                         struct proc_dir_entry *parent)
 {
index e7c813c..bc62cac 100644 (file)
 #include <asm/prom.h>
 #include <asm/uaccess.h>
 
-#ifndef HAVE_ARCH_DEVTREE_FIXUPS
-static inline void set_node_proc_entry(struct device_node *np, struct proc_dir_entry *de)
-{
-}
-
-static void inline set_node_name_link(struct device_node *np, struct proc_dir_entry *de)
-{
-}
-
-static void inline set_node_addr_link(struct device_node *np, struct proc_dir_entry *de)
-{
-}
-#endif
-
 static struct proc_dir_entry *proc_device_tree;
 
 /*
@@ -58,7 +44,7 @@ static int property_read_proc(char *page, char **start, off_t off,
 /*
  * Process a node, adding entries for its children and its properties.
  */
-void proc_device_tree_add_node(struct device_node *np, struct proc_dir_entry *de)
+static void add_node(struct device_node *np, struct proc_dir_entry *de)
 {
        struct property *pp;
        struct proc_dir_entry *ent;
@@ -67,7 +53,6 @@ void proc_device_tree_add_node(struct device_node *np, struct proc_dir_entry *de
        int l;
        struct proc_dir_entry *list, **lastp, *al;
 
-       set_node_proc_entry(np, de);
        lastp = &list;
        for (pp = np->properties; pp != 0; pp = pp->next) {
                /*
@@ -85,8 +70,7 @@ void proc_device_tree_add_node(struct device_node *np, struct proc_dir_entry *de
                *lastp = ent;
                lastp = &ent->next;
        }
-       child = NULL;
-       while ((child = of_get_next_child(np, child))) {
+       for (child = np->child; child != 0; child = child->sibling) {
                p = strrchr(child->full_name, '/');
                if (p == 0)
                        p = child->full_name;
@@ -101,7 +85,7 @@ void proc_device_tree_add_node(struct device_node *np, struct proc_dir_entry *de
                        break;
                *lastp = ent;
                lastp = &ent->next;
-               proc_device_tree_add_node(child, ent);
+               add_node(child, ent);
 
                /*
                 * If we left the address part on the name, consider
@@ -114,32 +98,26 @@ void proc_device_tree_add_node(struct device_node *np, struct proc_dir_entry *de
                 * If this is the first node with a given name property,
                 * add a symlink with the name property as its name.
                 */
-               sib = NULL;
-               while ((sib = of_get_next_child(np, sib)) && sib != child)
+               for (sib = np->child; sib != child; sib = sib->sibling)
                        if (sib->name && strcmp(sib->name, child->name) == 0)
                                break;
                if (sib == child && strncmp(p, child->name, l) != 0) {
                        al = proc_symlink(child->name, de, ent->name);
-                       if (al == 0) {
-                               of_node_put(sib);
+                       if (al == 0)
                                break;
-                       }
-                       set_node_name_link(child, al);
                        *lastp = al;
                        lastp = &al->next;
                }
-               of_node_put(sib);
+
                /*
                 * Add another directory with the @address part as its name.
                 */
                al = proc_symlink(at, de, ent->name);
                if (al == 0)
                        break;
-               set_node_addr_link(child, al);
                *lastp = al;
                lastp = &al->next;
        }
-       of_node_put(child);
        *lastp = 0;
        de->subdir = list;
 }
@@ -155,11 +133,10 @@ void proc_device_tree_init(void)
        proc_device_tree = proc_mkdir("device-tree", 0);
        if (proc_device_tree == 0)
                return;
-       root = of_find_node_by_path("/");
+       root = find_path_device("/");
        if (root == 0) {
                printk(KERN_ERR "/proc/device-tree: can't find root\n");
                return;
        }
-       proc_device_tree_add_node(root, proc_device_tree);
-       of_node_put(root);
+       add_node(root, proc_device_tree);
 }
index adcb82d..6de505b 100644 (file)
@@ -473,30 +473,46 @@ static int devices_read_proc(char *page, char **start, off_t off,
        return proc_calc_metrics(page, start, off, count, eof, len);
 }
 
-extern int show_interrupts(struct seq_file *p, void *v);
-static int interrupts_open(struct inode *inode, struct file *file)
+/*
+ * /proc/interrupts
+ */
+static void *int_seq_start(struct seq_file *f, loff_t *pos)
 {
-       unsigned size = 4096 * (1 + num_online_cpus() / 8);
-       char *buf = kmalloc(size, GFP_KERNEL);
-       struct seq_file *m;
-       int res;
+       return (*pos <= NR_IRQS) ? pos : NULL;
+}
 
-       if (!buf)
-               return -ENOMEM;
-       res = single_open(file, show_interrupts, NULL);
-       if (!res) {
-               m = file->private_data;
-               m->buf = buf;
-               m->size = size;
-       } else
-               kfree(buf);
-       return res;
+static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos)
+{
+       (*pos)++;
+       if (*pos > NR_IRQS)
+               return NULL;
+       return pos;
+}
+
+static void int_seq_stop(struct seq_file *f, void *v)
+{
+       /* Nothing to do */
 }
+
+
+extern int show_interrupts(struct seq_file *f, void *v); /* In arch code */
+static struct seq_operations int_seq_ops = {
+       .start = int_seq_start,
+       .next  = int_seq_next,
+       .stop  = int_seq_stop,
+       .show  = show_interrupts
+};
+
+int interrupts_open(struct inode *inode, struct file *filp)
+{
+       return seq_open(filp, &int_seq_ops);
+}
+
 static struct file_operations proc_interrupts_operations = {
        .open           = interrupts_open,
        .read           = seq_read,
        .llseek         = seq_lseek,
-       .release        = single_release,
+       .release        = seq_release,
 };
 
 static int filesystems_read_proc(char *page, char **start, off_t off,
index df25a6a..e7aa0ff 100644 (file)
@@ -229,7 +229,13 @@ void __init proc_tty_init(void)
        if (!proc_mkdir("tty", 0))
                return;
        proc_tty_ldisc = proc_mkdir("tty/ldisc", 0);
-       proc_tty_driver = proc_mkdir("tty/driver", 0);
+       /*
+        * /proc/tty/driver/serial reveals the exact character counts for
+        * serial links which is just too easy to abuse for inferring
+        * password lengths and inter-keystroke timings during password
+        * entry.
+        */
+       proc_tty_driver = proc_mkdir_mode("tty/driver", S_IRUSR | S_IXUSR, 0);
 
        create_proc_read_entry("tty/ldiscs", 0, 0, tty_ldiscs_read_proc,NULL);
        entry = create_proc_entry("tty/drivers", 0, NULL);
index e69eac7..739ca9f 100644 (file)
@@ -122,7 +122,7 @@ static int show_map(struct seq_file *m, void *v)
                if (len < 1)
                        len = 1;
                seq_printf(m, "%*c", len, ' ');
-               seq_path(m, file->f_vfsmnt, file->f_dentry, " \t\n\\");
+               seq_path(m, file->f_vfsmnt, file->f_dentry, "");
        }
        seq_putc(m, '\n');
        return 0;
index c24c155..ade58e5 100644 (file)
@@ -1967,7 +1967,7 @@ static int journal_init_dev( struct super_block *super,
 /*
 ** must be called once on fs mount.  calls journal_read for you
 */
-int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_format) {
+int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_format, unsigned int commit_max_age) {
     int num_cnodes = SB_ONDISK_JOURNAL_SIZE(p_s_sb) * 2 ;
     struct buffer_head *bhjh;
     struct reiserfs_super_block * rs;
@@ -2032,7 +2032,11 @@ int journal_init(struct super_block *p_s_sb, const char * j_dev_name, int old_fo
      
   SB_JOURNAL_TRANS_MAX(p_s_sb)      = le32_to_cpu (jh->jh_journal.jp_journal_trans_max);
   SB_JOURNAL_MAX_BATCH(p_s_sb)      = le32_to_cpu (jh->jh_journal.jp_journal_max_batch);
+  if (commit_max_age != 0) {
+         SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb) = commit_max_age;
+  } else {
   SB_JOURNAL_MAX_COMMIT_AGE(p_s_sb) = le32_to_cpu (jh->jh_journal.jp_journal_max_commit_age);
+  }
   SB_JOURNAL_MAX_TRANS_AGE(p_s_sb)  = JOURNAL_MAX_TRANS_AGE;
 
   if (SB_JOURNAL_TRANS_MAX(p_s_sb)) {
index 72bb983..721d61d 100644 (file)
@@ -1132,11 +1132,16 @@ static int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry,
     int jbegin_count ; 
     umode_t old_inode_mode;
     unsigned long savelink = 1;
+    struct timespec ctime;
 
-    /* two balancings: old name removal, new name insertion or "save" link,
-       stat data updates: old directory and new directory and maybe block
-       containing ".." of renamed directory */
-    jbegin_count = JOURNAL_PER_BALANCE_CNT * 3 + 3;
+    /* three balancings: (1) old name removal, (2) new name insertion
+       and (3) maybe "save" link insertion
+       stat data updates: (1) old directory,
+       (2) new directory and (3) maybe old object stat data (when it is
+       directory) and (4) maybe stat data of object to which new entry
+       pointed initially and (5) maybe block containing ".." of
+       renamed directory */
+    jbegin_count = JOURNAL_PER_BALANCE_CNT * 3 + 5;
 
     old_inode = old_dentry->d_inode;
     new_dentry_inode = new_dentry->d_inode;
@@ -1299,8 +1304,12 @@ static int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry,
 
     mark_de_hidden (old_de.de_deh + old_de.de_entry_num);
     journal_mark_dirty (&th, old_dir->i_sb, old_de.de_bh);
-    old_dir->i_ctime = old_dir->i_mtime = 
-    new_dir->i_ctime = new_dir->i_mtime = CURRENT_TIME;
+    ctime = CURRENT_TIME;
+    old_dir->i_ctime = old_dir->i_mtime = ctime;
+    new_dir->i_ctime = new_dir->i_mtime = ctime;
+    /* thanks to Alex Adriaanse <alex_a@caltech.edu> for patch which adds ctime update of
+       renamed object */
+    old_inode->i_ctime = ctime;
 
     if (new_dentry_inode) {
        // adjust link number of the victim
@@ -1309,7 +1318,7 @@ static int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry,
        } else {
            new_dentry_inode->i_nlink--;
        }
-       new_dentry_inode->i_ctime = new_dir->i_ctime;
+       new_dentry_inode->i_ctime = ctime;
        savelink = new_dentry_inode->i_nlink;
     }
 
@@ -1342,6 +1351,7 @@ static int reiserfs_rename (struct inode * old_dir, struct dentry *old_dentry,
 
     reiserfs_update_sd (&th, old_dir);
     reiserfs_update_sd (&th, new_dir);
+    reiserfs_update_sd (&th, old_inode);
 
     if (new_dentry_inode) {
        if (savelink == 0)
index 377d120..0b4db27 100644 (file)
@@ -401,7 +401,7 @@ static int show_journal(struct seq_file *m, struct super_block *sb)
                         DJP( jp_journal_trans_max ),
                         DJP( jp_journal_magic ),
                         DJP( jp_journal_max_batch ),
-                        DJP( jp_journal_max_commit_age ),
+                        SB_JOURNAL_MAX_COMMIT_AGE(sb),
                         DJP( jp_journal_max_trans_age ),
 
                        JF( j_1st_reserved_block ),                     
index 3ca520a..7aaff4c 100644 (file)
@@ -671,7 +671,8 @@ static int reiserfs_parse_options (struct super_block * s, char * options, /* st
                                      collection of bitflags defining what
                                      mount options were selected. */
                                   unsigned long * blocks, /* strtol-ed from NNN of resize=NNN */
-                                  char ** jdev_name)
+                                  char ** jdev_name,
+                                  unsigned int * commit_max_age)
 {
     int c;
     char * arg = NULL;
@@ -694,6 +695,7 @@ static int reiserfs_parse_options (struct super_block * s, char * options, /* st
        {"resize", 'r', 0, 0, 0},
        {"jdev", 'j', 0, 0, 0},
        {"nolargeio", 'w', 0, 0, 0},
+       {"commit", 'c', 0, 0, 0},
        {NULL, 0, 0, 0, 0}
     };
        
@@ -722,6 +724,19 @@ static int reiserfs_parse_options (struct super_block * s, char * options, /* st
            }
        }
 
+       if ( c == 'c' ) {
+               char *p = 0;
+               int val = simple_strtoul (arg, &p, 0);
+               /* commit=NNN (time in seconds) */
+               if ( *p != '\0' || val == 0) {
+                       printk ("reiserfs_parse_options: bad value %s\n", arg);
+                       return 0;
+               }
+               if ( val > 0 ) {
+                       *commit_max_age = val;
+               }
+       }
+
        if ( c == 'w' ) {
                char *p=0;
                int val = simple_strtoul (arg, &p, 0);
@@ -775,10 +790,11 @@ static int reiserfs_remount (struct super_block * s, int * mount_flags, char * a
   unsigned long blocks;
   unsigned long mount_options = REISERFS_SB(s)->s_mount_opt;
   unsigned long safe_mask = 0;
+  unsigned int commit_max_age = 0;
 
   rs = SB_DISK_SUPER_BLOCK (s);
 
-  if (!reiserfs_parse_options(s, arg, &mount_options, &blocks, NULL))
+  if (!reiserfs_parse_options(s, arg, &mount_options, &blocks, NULL, &commit_max_age))
     return -EINVAL;
   
   handle_attrs(s);
@@ -798,6 +814,10 @@ static int reiserfs_remount (struct super_block * s, int * mount_flags, char * a
    * the bits we're not allowed to change here */
   REISERFS_SB(s)->s_mount_opt = (REISERFS_SB(s)->s_mount_opt & ~safe_mask) |  (mount_options & safe_mask);
 
+  if(commit_max_age != 0) {
+         SB_JOURNAL_MAX_COMMIT_AGE(s) = commit_max_age;
+  }
+
   if(blocks) {
     int rc = reiserfs_resize(s, blocks);
     if (rc != 0)
@@ -1240,11 +1260,15 @@ int function2code (hashf_t func)
     if (func == r5_hash)
        return R5_HASH;
 
-    BUG() ; // should never happen 
+    BUG() ; // should never happen
 
     return 0;
 }
 
+#define SPRINTK(silent, ...)                   \
+       if (!(silent))                          \
+               printk(__VA_ARGS__)
+
 static int reiserfs_fill_super (struct super_block * s, void * data, int silent)
 {
     struct inode *root_inode;
@@ -1252,6 +1276,7 @@ static int reiserfs_fill_super (struct super_block * s, void * data, int silent)
     struct reiserfs_transaction_handle th ;
     int old_format = 0;
     unsigned long blocks;
+       unsigned int commit_max_age = 0;
     int jinit_done = 0 ;
     struct reiserfs_iget_args args ;
     struct reiserfs_super_block * rs;
@@ -1278,58 +1303,58 @@ static int reiserfs_fill_super (struct super_block * s, void * data, int silent)
     init_rwsem(&REISERFS_SB(s)->xattr_dir_sem);
 
     jdev_name = NULL;
-    if (reiserfs_parse_options (s, (char *) data, &(sbi->s_mount_opt), &blocks, &jdev_name) == 0) {
+    if (reiserfs_parse_options (s, (char *) data, &(sbi->s_mount_opt), &blocks, &jdev_name, &commit_max_age) == 0) {
        goto error;
     }
 
     if (blocks) {
-       printk("jmacd-7: reiserfs_fill_super: resize option for remount only\n");
+       SPRINTK(silent, "jmacd-7: reiserfs_fill_super: resize option for remount only\n");
        goto error;
     }  
 
     /* try old format (undistributed bitmap, super block in 8-th 1k block of a device) */
-    if (!read_super_block (s, REISERFS_OLD_DISK_OFFSET_IN_BYTES)) 
+    if (!read_super_block (s, REISERFS_OLD_DISK_OFFSET_IN_BYTES))
       old_format = 1;
     /* try new format (64-th 1k block), which can contain reiserfs super block */
     else if (read_super_block (s, REISERFS_DISK_OFFSET_IN_BYTES)) {
-      printk("sh-2021: reiserfs_fill_super: can not find reiserfs on %s\n", reiserfs_bdevname (s));
-      goto error;    
+      SPRINTK(silent, "sh-2021: reiserfs_fill_super: can not find reiserfs on %s\n", reiserfs_bdevname (s));
+      goto error;
     }
 
     rs = SB_DISK_SUPER_BLOCK (s);
     /* Let's do basic sanity check to verify that underlying device is not
        smaller than the filesystem. If the check fails then abort and scream,
        because bad stuff will happen otherwise. */
-    if ( s->s_bdev && s->s_bdev->bd_inode && i_size_read(s->s_bdev->bd_inode) < sb_block_count(rs)*sb_blocksize(rs) ) {
-       printk("Filesystem on %s cannot be mounted because it is bigger than the device\n", reiserfs_bdevname(s));
-       printk("You may need to run fsck or increase size of your LVM partition\n");
-       printk("Or may be you forgot to reboot after fdisk when it told you to\n");
+    if ( s->s_bdev && s->s_bdev->bd_inode && i_size_read(s->s_bdev->bd_inode) < sb_block_count(rs)*sb_blocksize(rs)) {
+       SPRINTK(silent, "Filesystem on %s cannot be mounted because it is bigger than the device\n", reiserfs_bdevname(s));
+       SPRINTK(silent, "You may need to run fsck or increase size of your LVM partition\n");
+       SPRINTK(silent, "Or may be you forgot to reboot after fdisk when it told you to\n");
        goto error;
     }
 
     sbi->s_mount_state = SB_REISERFS_STATE(s);
     sbi->s_mount_state = REISERFS_VALID_FS ;
 
-    if (old_format ? read_old_bitmaps(s) : read_bitmaps(s)) { 
-       printk ("jmacd-8: reiserfs_fill_super: unable to read bitmap\n");
+    if (old_format ? read_old_bitmaps(s) : read_bitmaps(s)) {
+       SPRINTK(silent, "jmacd-8: reiserfs_fill_super: unable to read bitmap\n");
        goto error;
     }
 #ifdef CONFIG_REISERFS_CHECK
-    printk("reiserfs:warning: CONFIG_REISERFS_CHECK is set ON\n");
-    printk("reiserfs:warning: - it is slow mode for debugging.\n");
+    SPRINTK(silent, "reiserfs:warning: CONFIG_REISERFS_CHECK is set ON\n");
+    SPRINTK(silent, "reiserfs:warning: - it is slow mode for debugging.\n");
 #endif
 
     // set_device_ro(s->s_dev, 1) ;
-    if( journal_init(s, jdev_name, old_format) ) {
-       printk("sh-2022: reiserfs_fill_super: unable to initialize journal space\n") ;
+    if( journal_init(s, jdev_name, old_format, commit_max_age) ) {
+       SPRINTK(silent, "sh-2022: reiserfs_fill_super: unable to initialize journal space\n") ;
        goto error ;
     } else {
        jinit_done = 1 ; /* once this is set, journal_release must be called
-                        ** if we error out of the mount 
+                        ** if we error out of the mount
                         */
     }
     if (reread_meta_blocks(s)) {
-       printk("jmacd-9: reiserfs_fill_super: unable to reread meta blocks after journal init\n") ;
+       SPRINTK(silent, "jmacd-9: reiserfs_fill_super: unable to reread meta blocks after journal init\n") ;
        goto error ;
     }
 
@@ -1337,14 +1362,14 @@ static int reiserfs_fill_super (struct super_block * s, void * data, int silent)
        goto error;
 
     if (bdev_read_only(s->s_bdev) && !(s->s_flags & MS_RDONLY)) {
-        printk("clm-7000: Detected readonly device, marking FS readonly\n") ;
+        SPRINTK(silent, "clm-7000: Detected readonly device, marking FS readonly\n") ;
        s->s_flags |= MS_RDONLY ;
     }
     args.objectid = REISERFS_ROOT_OBJECTID ;
     args.dirid = REISERFS_ROOT_PARENT_OBJECTID ;
     root_inode = iget5_locked (s, REISERFS_ROOT_OBJECTID, reiserfs_find_actor, reiserfs_init_locked_inode, (void *)(&args));
     if (!root_inode) {
-       printk ("jmacd-10: reiserfs_fill_super: get root inode failed\n");
+       SPRINTK(silent, "jmacd-10: reiserfs_fill_super: get root inode failed\n");
        goto error;
     }
 
@@ -1382,22 +1407,23 @@ static int reiserfs_fill_super (struct super_block * s, void * data, int silent)
        
        if (old_format_only(s)) {
          /* filesystem of format 3.5 either with standard or non-standard
-            journal */       
+            journal */
          if (convert_reiserfs (s)) {
-           /* and -o conv is given */ 
-           reiserfs_warning ("reiserfs: converting 3.5 filesystem to the 3.6 format\n") ;
-           
+           /* and -o conv is given */
+           if(!silent)
+             reiserfs_warning ("reiserfs: converting 3.5 filesystem to the 3.6 format\n") ;
+
            if (is_reiserfs_3_5 (rs))
              /* put magic string of 3.6 format. 2.2 will not be able to
                 mount this filesystem anymore */
-             memcpy (rs->s_v1.s_magic, reiserfs_3_6_magic_string, 
+             memcpy (rs->s_v1.s_magic, reiserfs_3_6_magic_string,
                      sizeof (reiserfs_3_6_magic_string));
-           
+
            set_sb_version(rs,REISERFS_VERSION_2);
            reiserfs_convert_objectid_map_v1(s) ;
            set_bit(REISERFS_3_6, &(sbi->s_properties));
            clear_bit(REISERFS_3_5, &(sbi->s_properties));
-         } else {
+         } else if (!silent){
            reiserfs_warning("reiserfs: using 3.5.x disk format\n") ;
          }
        }
@@ -1416,7 +1442,7 @@ static int reiserfs_fill_super (struct super_block * s, void * data, int silent)
 
        s->s_dirt = 0;
     } else {
-       if ( old_format_only(s) ) {
+       if ( old_format_only(s) && !silent) {
            reiserfs_warning("reiserfs: using 3.5.x disk format\n") ;
        }
 
index 26cdf65..8549e1d 100644 (file)
--- a/fs/stat.c
+++ b/fs/stat.c
@@ -106,7 +106,7 @@ int vfs_fstat(unsigned int fd, struct kstat *stat)
 EXPORT_SYMBOL(vfs_fstat);
 
 #if !defined(__alpha__) && !defined(__sparc__) && !defined(__ia64__) \
-  && !defined(CONFIG_ARCH_S390) && !defined(__hppa__) && !defined(__x86_64__) \
+  && !defined(CONFIG_ARCH_S390) && !defined(__hppa__) \
   && !defined(__arm__) && !defined(CONFIG_V850) && !defined(__powerpc64__)
 
 /*
index ebaf6c4..3cea188 100644 (file)
@@ -83,8 +83,7 @@ static void remove_dir(struct dentry * d)
        struct dentry * parent = dget(d->d_parent);
        down(&parent->d_inode->i_sem);
        d_delete(d);
-       if (d->d_inode)
-               simple_rmdir(parent->d_inode,d);
+       simple_rmdir(parent->d_inode,d);
 
        pr_debug(" o %s removing done (%d)\n",d->d_name.name,
                 atomic_read(&d->d_count));
index 692920c..584833b 100644 (file)
@@ -414,7 +414,7 @@ udf_parse_options(char *options, struct udf_options *uopt)
                case Opt_utf8:
                        uopt->flags |= (1 << UDF_FLAG_UTF8);
                        break;
-#ifdef CONFIG_NLS
+#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE)
                case Opt_iocharset:
                        uopt->nls_map = load_nls(args[0].from);
                        uopt->flags |= (1 << UDF_FLAG_NLS_MAP);
@@ -1510,7 +1510,7 @@ static int udf_fill_super(struct super_block *sb, void *options, int silent)
                        "utf8 cannot be combined with iocharset\n");
                goto error_out;
        }
-#ifdef CONFIG_NLS
+#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE)
        if ((uopt.flags & (1 << UDF_FLAG_NLS_MAP)) && !uopt.nls_map)
        {
                uopt.nls_map = load_nls_default();
@@ -1674,7 +1674,7 @@ error_out:
                                udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]);
                }
        }
-#ifdef CONFIG_NLS
+#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE)
        if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP))
                unload_nls(UDF_SB(sb)->s_nls_map);
 #endif
@@ -1766,7 +1766,7 @@ udf_put_super(struct super_block *sb)
                                udf_release_data(UDF_SB_TYPESPAR(sb, UDF_SB_PARTITION(sb)).s_spar_map[i]);
                }
        }
-#ifdef CONFIG_NLS
+#if defined(CONFIG_NLS) || defined(CONFIG_NLS_MODULE)
        if (UDF_QUERY_FLAG(sb, UDF_FLAG_NLS_MAP))
                unload_nls(UDF_SB(sb)->s_nls_map);
 #endif
index d610af5..e363da8 100644 (file)
 #include <linux/buffer_head.h>
 #include <linux/namei.h>
 
-#define DEBUG_LEVEL 0
-#if (DEBUG_LEVEL >= 1)
-#  define PRINTK1(x) printk x
-#else
-#  define PRINTK1(x)
-#endif
-#if (DEBUG_LEVEL >= 2)
-#  define PRINTK2(x) printk x
-#else
-#  define PRINTK2(x)
-#endif
-#if (DEBUG_LEVEL >= 3)
-#  define PRINTK3(x) printk x
-#else
-#  define PRINTK3(x)
-#endif
-
 static int vfat_hashi(struct dentry *parent, struct qstr *qstr);
 static int vfat_hash(struct dentry *parent, struct qstr *qstr);
 static int vfat_cmpi(struct dentry *dentry, struct qstr *a, struct qstr *b);
@@ -573,13 +556,18 @@ xlate_to_uni(const unsigned char *name, int len, unsigned char *outname,
        int charlen;
 
        if (utf8) {
+               int name_len = strlen(name);
+
                *outlen = utf8_mbstowcs((wchar_t *)outname, name, PAGE_SIZE);
-               if (name[len-1] == '.')
-                       *outlen-=2;
+
+               /*
+                * We stripped '.'s before and set len appropriately,
+                * but utf8_mbstowcs doesn't care about len
+                */
+               *outlen -= (name_len-len);
+
                op = &outname[*outlen * sizeof(wchar_t)];
        } else {
-               if (name[len-1] == '.') 
-                       len--;
                if (nls) {
                        for (i = 0, ip = name, op = outname, *outlen = 0;
                             i < len && *outlen <= 260; *outlen += 1)
@@ -694,7 +682,6 @@ static int vfat_build_slots(struct inode *dir, const unsigned char *name,
        for (cksum = i = 0; i < 11; i++) {
                cksum = (((cksum&1)<<7)|((cksum&0xfe)>>1)) + msdos_name[i];
        }
-       PRINTK3(("vfat_fill_slots 3: slots=%d\n",*slots));
 
        for (ps = ds, slot = *slots; slot > 0; slot--, ps++) {
                ps->id = slot;
@@ -711,7 +698,6 @@ static int vfat_build_slots(struct inode *dir, const unsigned char *name,
        de = (struct msdos_dir_entry *) ps;
 
 shortname:
-       PRINTK3(("vfat_fill_slots 9\n"));
        /* build the entry of 8.3 alias name */
        (*slots)++;
        memcpy(de->name, msdos_name, MSDOS_NAME);
@@ -734,18 +720,22 @@ static int vfat_add_entry(struct inode *dir,struct qstr* qname,
 {
        struct msdos_dir_slot *dir_slots;
        loff_t offset;
-       int slots, slot;
-       int res;
+       int res, slots, slot;
+       unsigned int len;
        struct msdos_dir_entry *dummy_de;
        struct buffer_head *dummy_bh;
        loff_t dummy_i_pos;
 
-       dir_slots = (struct msdos_dir_slot *)
+       len = vfat_striptail_len(qname);
+       if (len == 0)
+               return -ENOENT;
+
+       dir_slots =
               kmalloc(sizeof(struct msdos_dir_slot) * MSDOS_SLOTS, GFP_KERNEL);
        if (dir_slots == NULL)
                return -ENOMEM;
 
-       res = vfat_build_slots(dir, qname->name, vfat_striptail_len(qname),
+       res = vfat_build_slots(dir, qname->name, len,
                               dir_slots, &slots, is_dir);
        if (res < 0)
                goto cleanup;
@@ -796,11 +786,16 @@ static int vfat_find(struct inode *dir,struct qstr* qname,
 {
        struct super_block *sb = dir->i_sb;
        loff_t offset;
+       unsigned int len;
        int res;
 
-       res = fat_search_long(dir, qname->name, vfat_striptail_len(qname),
-                       (MSDOS_SB(sb)->options.name_check != 's'),
-                       &offset,&sinfo->longname_offset);
+       len = vfat_striptail_len(qname);
+       if (len == 0)
+               return -ENOENT;
+
+       res = fat_search_long(dir, qname->name, len,
+                             (MSDOS_SB(sb)->options.name_check != 's'),
+                             &offset, &sinfo->longname_offset);
        if (res>0) {
                sinfo->long_slots = res-1;
                if (fat_get_entry(dir,&offset,last_bh,last_de,&sinfo->i_pos)>=0)
@@ -820,9 +815,6 @@ struct dentry *vfat_lookup(struct inode *dir,struct dentry *dentry, struct namei
        struct msdos_dir_entry *de;
        int table;
        
-       PRINTK2(("vfat_lookup: name=%s, len=%d\n", 
-                dentry->d_name.name, dentry->d_name.len));
-
        lock_kernel();
        table = (MSDOS_SB(dir->i_sb)->options.name_check == 's') ? 2 : 0;
        dentry->d_op = &vfat_dentry_ops[table];
@@ -955,7 +947,6 @@ int vfat_unlink(struct inode *dir, struct dentry* dentry)
        struct buffer_head *bh = NULL;
        struct msdos_dir_entry *de;
 
-       PRINTK1(("vfat_unlink: %s\n", dentry->d_name.name));
        lock_kernel();
        res = vfat_find(dir,&dentry->d_name,&sinfo,&bh,&de);
        if (res < 0) {
@@ -1036,14 +1027,18 @@ int vfat_rename(struct inode *old_dir,struct dentry *old_dentry,
        new_inode = new_dentry->d_inode;
        lock_kernel();
        res = vfat_find(old_dir,&old_dentry->d_name,&old_sinfo,&old_bh,&old_de);
-       PRINTK3(("vfat_rename 2\n"));
-       if (res < 0) goto rename_done;
+       if (res < 0)
+               goto rename_done;
 
        is_dir = S_ISDIR(old_inode->i_mode);
 
-       if (is_dir && (res = fat_scan(old_inode,MSDOS_DOTDOT,&dotdot_bh,
-                               &dotdot_de,&dotdot_i_pos)) < 0)
-               goto rename_done;
+       if (is_dir) {
+               if (fat_scan(old_inode, MSDOS_DOTDOT, &dotdot_bh,
+                            &dotdot_de, &dotdot_i_pos) < 0) {
+                       res = -EIO;
+                       goto rename_done;
+               }
+       }
 
        if (new_dentry->d_inode) {
                res = vfat_find(new_dir,&new_dentry->d_name,&sinfo,&new_bh,
diff --git a/include/asm-alpha/cpumask.h b/include/asm-alpha/cpumask.h
new file mode 100644 (file)
index 0000000..bc3381a
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_ALPHA_CPUMASK_H
+#define _ASM_ALPHA_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_ALPHA_CPUMASK_H */
index a3b012a..f651eeb 100644 (file)
@@ -243,6 +243,7 @@ void __init time_init(void)
 
                if ((CMOS_READ(RTC_REG_A) & 0x7f) == RTC_REF_CLCK_32KHZ &&
                    CMOS_READ(RTC_REG_B) == reg_b) {
+                       struct timespec tv;
 
                        /*
                         * We have a RTC.  Check the battery
@@ -250,7 +251,9 @@ void __init time_init(void)
                        if ((reg_d & 0x80) == 0)
                                printk(KERN_WARNING "RTC: *** warning: CMOS battery bad\n");
 
-                       xtime.tv_sec = get_isa_cmos_time();
+                       tv.tv_nsec = 0;
+                       tv.tv_sec = get_isa_cmos_time();
+                       do_settimeofday(&tv);
                        set_rtc = set_isa_cmos_time;
                } else
                        rtc_base = 0;
index 91865bd..bc9437a 100644 (file)
@@ -33,7 +33,7 @@ static int pxa_set_rtc(void)
 /* IRQs are disabled before entering here from do_gettimeofday() */
 static unsigned long pxa_gettimeoffset (void)
 {
-       unsigned long ticks_to_match, elapsed, usec;
+       long ticks_to_match, elapsed, usec;
 
        /* Get ticks before next timer match */
        ticks_to_match = OSMR0 - OSCR;
@@ -41,6 +41,10 @@ static unsigned long pxa_gettimeoffset (void)
        /* We need elapsed ticks since last match */
        elapsed = LATCH - ticks_to_match;
 
+       /* don't get fooled by the workaround in pxa_timer_interrupt() */
+       if (elapsed <= 0)
+               return 0;
+
        /* Now convert them to usec */
        usec = (unsigned long)(elapsed * (tick_nsec / 1000))/LATCH;
 
@@ -59,6 +63,15 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
         * IRQs are disabled inside the loop to ensure coherence between
         * lost_ticks (updated in do_timer()) and the match reg value, so we
         * can use do_gettimeofday() from interrupt handlers.
+        *
+        * HACK ALERT: it seems that the PXA timer regs aren't updated right
+        * away in all cases when a write occurs.  We therefore compare with
+        * 8 instead of 0 in the while() condition below to avoid missing a
+        * match if OSCR has already reached the next OSMR value.
+        * Experience has shown that up to 6 ticks are needed to work around
+        * this problem, but let's use 8 to be conservative.  Note that this
+        * affect things only when the timer IRQ has been delayed by nearly
+        * exactly one tick period which should be a pretty rare event.
         */
        do {
                do_leds();
@@ -66,16 +79,22 @@ pxa_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
                do_timer(regs);
                OSSR = OSSR_M0;  /* Clear match on timer 0 */
                next_match = (OSMR0 += LATCH);
-       } while( (signed long)(next_match - OSCR) <= 0 );
+       } while( (signed long)(next_match - OSCR) <= 8 );
 
        return IRQ_HANDLED;
 }
 
 void __init time_init(void)
 {
+       struct timespec tv;
+
        gettimeoffset = pxa_gettimeoffset;
        set_rtc = pxa_set_rtc;
-       xtime.tv_sec = pxa_get_rtc_time();
+
+       tv.tv_nsec = 0;
+       tv.tv_sec = pxa_get_rtc_time();
+       do_settimeofday(&tv);
+
        timer_irq.handler = pxa_timer_interrupt;
        OSMR0 = 0;              /* set initial match at 0 */
        OSSR = 0xf;             /* clear status on all timers */
index a7c9849..d962626 100644 (file)
@@ -92,9 +92,15 @@ sa1100_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 
 void __init time_init(void)
 {
+       struct timespec tv;
+
        gettimeoffset = sa1100_gettimeoffset;
        set_rtc = sa1100_set_rtc;
-       xtime.tv_sec = sa1100_get_rtc_time();
+
+       tv.tv_nsec = 0;
+       tv.tv_sec = sa1100_get_rtc_time();
+       do_settimeofday(&tv);
+
        timer_irq.handler = sa1100_timer_interrupt;
        OSMR0 = 0;              /* set initial match at 0 */
        OSSR = 0xf;             /* clear status on all timers */
index 86a9bde..66e4525 100644 (file)
@@ -34,8 +34,6 @@ void __init time_init(void)
        outb(HZ_TIME & 0xff, 0x40);     /* LSB of count */
        outb(HZ_TIME >> 8, 0x40);
 
-       xtime.tv_sec = 0;
-
        timer_irq.handler = timer_interrupt;
        setup_irq(IRQ_TIMER, &timer_irq);
 }
diff --git a/include/asm-arm/cpumask.h b/include/asm-arm/cpumask.h
new file mode 100644 (file)
index 0000000..e3cf01f
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_ARM_CPUMASK_H
+#define _ASM_ARM_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_ARM_CPUMASK_H */
index 3e3bdb7..4957da3 100644 (file)
@@ -1,18 +1,42 @@
 #ifndef __ASM_ARM_DIV64
 #define __ASM_ARM_DIV64
 
-/* We're not 64-bit, but... */
+/*
+ * The semantics of do_div() are:
+ *
+ * uint32_t do_div(uint64_t *n, uint32_t base)
+ * {
+ *     uint32_t remainder = *n % base;
+ *     *n = *n / base;
+ *     return remainder;
+ * }
+ *
+ * In other words, a 64-bit dividend with a 32-bit divisor producing
+ * a 64-bit result and a 32-bit remainder.  To accomplish this optimally
+ * we call a special __do_div64 helper with completely non standard
+ * calling convention for arguments and results (beware).
+ */
+
+#ifdef __ARMEB__
+#define __xh "r0"
+#define __xl "r1"
+#else
+#define __xl "r0"
+#define __xh "r1"
+#endif
+
 #define do_div(n,base)                                         \
 ({                                                             \
-       register int __res asm("r2") = base;                    \
-       register unsigned long long __n asm("r0") = n;          \
-       asm("bl do_div64"                                       \
-               : "=r" (__n), "=r" (__res)                      \
-               : "0" (__n), "1" (__res)                        \
-               : "r3", "ip", "lr", "cc");                      \
-       n = __n;                                                \
-       __res;                                                  \
+       register unsigned int __base      asm("r4") = base;     \
+       register unsigned long long __n   asm("r0") = n;        \
+       register unsigned long long __res asm("r2");            \
+       register unsigned int __rem       asm(__xh);            \
+       asm("bl __do_div64"                                     \
+               : "=r" (__rem), "=r" (__res)                    \
+               : "r" (__n), "r" (__base)                       \
+               : "ip", "lr", "cc");                            \
+       n = __res;                                              \
+       __rem;                                                  \
 })
 
 #endif
-
index 9ed6c33..69d9679 100644 (file)
@@ -5,8 +5,21 @@
  * This is the "bare minimum".  AIO seems to require this.
  */
 enum km_type {
+       KM_BOUNCE_READ,
+       KM_SKB_SUNRPC_DATA,
+       KM_SKB_DATA_SOFTIRQ,
+       KM_USER0,
+       KM_USER1,
+       KM_BIO_SRC_IRQ,
+       KM_BIO_DST_IRQ,
+       KM_PTE0,
+       KM_PTE1,
+       KM_PTE2,
        KM_IRQ0,
-       KM_USER1
+       KM_IRQ1,
+       KM_SOFTIRQ0,
+       KM_SOFTIRQ1,
+       KM_TYPE_NR
 };
 
 #endif
index 9a09fb1..9452258 100644 (file)
@@ -152,16 +152,16 @@ extern void __pgd_error(const char *file, int line, unsigned long val);
 /*
  * The following macros handle the cache and bufferable bits...
  */
-#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG
-#define _L_PTE_READ    L_PTE_USER | L_PTE_EXEC | L_PTE_CACHEABLE | L_PTE_BUFFERABLE
+#define _L_PTE_DEFAULT L_PTE_PRESENT | L_PTE_YOUNG | L_PTE_CACHEABLE | L_PTE_BUFFERABLE
+#define _L_PTE_READ    L_PTE_USER | L_PTE_EXEC
+
+extern pgprot_t                pgprot_kernel;
 
 #define PAGE_NONE       __pgprot(_L_PTE_DEFAULT)
 #define PAGE_COPY       __pgprot(_L_PTE_DEFAULT | _L_PTE_READ)
 #define PAGE_SHARED     __pgprot(_L_PTE_DEFAULT | _L_PTE_READ | L_PTE_WRITE)
 #define PAGE_READONLY   __pgprot(_L_PTE_DEFAULT | _L_PTE_READ)
-#define PAGE_KERNEL     __pgprot(_L_PTE_DEFAULT | L_PTE_CACHEABLE | L_PTE_BUFFERABLE | L_PTE_DIRTY | L_PTE_WRITE | L_PTE_EXEC)
-
-#define _PAGE_CHG_MASK (PAGE_MASK | L_PTE_DIRTY | L_PTE_YOUNG)
+#define PAGE_KERNEL    pgprot_kernel
 
 #endif /* __ASSEMBLY__ */
 
@@ -323,7 +323,8 @@ static inline pte_t *pmd_page_kernel(pmd_t pmd)
 
 static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 {
-       pte_val(pte) = (pte_val(pte) & _PAGE_CHG_MASK) | pgprot_val(newprot);
+       const unsigned long mask = L_PTE_EXEC | L_PTE_WRITE | L_PTE_USER;
+       pte_val(pte) = (pte_val(pte) & ~mask) | (pgprot_val(newprot) & mask);
        return pte;
 }
 
index a5f2abf..1b39c2f 100644 (file)
@@ -159,7 +159,7 @@ static inline void __put_unaligned_8_be(const unsigned long long __v, register _
                (void) 0;                                       \
        })
 
-#define put_unaligned_be(val,ptr)                                      \
+#define __put_unaligned_be(val,ptr)                                    \
        ({                                                      \
                switch (sizeof(*(ptr))) {                       \
                case 1:                                         \
index 825c98b..4affa93 100644 (file)
                                        /* 254 for set_thread_area */
                                        /* 255 for get_thread_area */
                                        /* 256 for set_tid_address */
+#define __NR_timer_create              (__NR_SYSCALL_BASE+257)
+#define __NR_timer_settime             (__NR_SYSCALL_BASE+258)
+#define __NR_timer_gettime             (__NR_SYSCALL_BASE+259)
+#define __NR_timer_getoverrun          (__NR_SYSCALL_BASE+260)
+#define __NR_timer_delete              (__NR_SYSCALL_BASE+261)
+#define __NR_clock_settime             (__NR_SYSCALL_BASE+262)
+#define __NR_clock_gettime             (__NR_SYSCALL_BASE+263)
+#define __NR_clock_getres              (__NR_SYSCALL_BASE+264)
+#define __NR_clock_nanosleep           (__NR_SYSCALL_BASE+265)
+#define __NR_statfs64                  (__NR_SYSCALL_BASE+266)
+#define __NR_fstatfs64                 (__NR_SYSCALL_BASE+267)
+#define __NR_tgkill                    (__NR_SYSCALL_BASE+268)
+#define __NR_utimes                    (__NR_SYSCALL_BASE+269)
+#define __NR_fadvise64_64              (__NR_SYSCALL_BASE+270)
 
 /*
  * The following SWIs are ARM private.
diff --git a/include/asm-arm26/cpumask.h b/include/asm-arm26/cpumask.h
new file mode 100644 (file)
index 0000000..d181df4
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_ARM26_CPUMASK_H
+#define _ASM_ARM26_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_ARM26_CPUMASK_H */
diff --git a/include/asm-arm26/keyboard.h.old b/include/asm-arm26/keyboard.h.old
deleted file mode 100644 (file)
index dc5c9fc..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- *  linux/include/asm-arm/keyboard.h
- *
- *  Copyright (C) 1998 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Keyboard driver definitions for ARM
- */
-#ifndef __ASM_ARM_KEYBOARD_H
-#define __ASM_ARM_KEYBOARD_H
-
-#include <linux/kd.h>
-#include <linux/pm.h>
-
-/*
- * We provide a unified keyboard interface when in VC_MEDIUMRAW
- * mode.  This means that all keycodes must be common between
- * all supported keyboards.  This unfortunately puts us at odds
- * with the PC keyboard interface chip... but we can't do anything
- * about that now.
- */
-#ifdef __KERNEL__
-
-extern int  (*k_setkeycode)(unsigned int, unsigned int);
-extern int  (*k_getkeycode)(unsigned int);
-extern int  (*k_translate)(unsigned char, unsigned char *, char);
-extern char (*k_unexpected_up)(unsigned char);
-extern void (*k_leds)(unsigned char);
-
-
-static inline int kbd_setkeycode(unsigned int sc, unsigned int kc)
-{
-       int ret = -EINVAL;
-
-       if (k_setkeycode)
-               ret = k_setkeycode(sc, kc);
-
-       return ret;
-}
-
-static inline int kbd_getkeycode(unsigned int sc)
-{
-       int ret = -EINVAL;
-
-       if (k_getkeycode)
-               ret = k_getkeycode(sc);
-
-       return ret;
-}
-
-static inline void kbd_leds(unsigned char leds)
-{
-       if (k_leds)
-               k_leds(leds);
-}
-
-extern int k_sysrq_key;
-extern unsigned char *k_sysrq_xlate;
-
-#define SYSRQ_KEY              k_sysrq_key
-#define kbd_sysrq_xlate                k_sysrq_xlate
-#define kbd_translate          k_translate
-#define kbd_unexpected_up      k_unexpected_up
-
-#define NR_SCANCODES 128
-
-extern int a5kkbd_init_hw(void);
-
-#define kbd_disable_irq()       disable_irq(IRQ_KEYBOARDRX)
-#define kbd_enable_irq()        enable_irq(IRQ_KEYBOARDRX)
-#define kbd_init_hw()           a5kkbd_init_hw()
-
-#endif /* __KERNEL__ */
-
-#endif /* __ASM_ARM_KEYBOARD_H */
diff --git a/include/asm-cris/cpumask.h b/include/asm-cris/cpumask.h
new file mode 100644 (file)
index 0000000..123b032
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_CRIS_CPUMASK_H
+#define _ASM_CRIS_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_CRIS_CPUMASK_H */
diff --git a/include/asm-generic/cpumask.h b/include/asm-generic/cpumask.h
new file mode 100644 (file)
index 0000000..a510325
--- /dev/null
@@ -0,0 +1,40 @@
+#ifndef __ASM_GENERIC_CPUMASK_H
+#define __ASM_GENERIC_CPUMASK_H
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/threads.h>
+#include <linux/types.h>
+#include <linux/bitmap.h>
+
+#if NR_CPUS > BITS_PER_LONG && NR_CPUS != 1
+#define CPU_ARRAY_SIZE         BITS_TO_LONGS(NR_CPUS)
+
+struct cpumask
+{
+       unsigned long mask[CPU_ARRAY_SIZE];
+};
+
+typedef struct cpumask cpumask_t;
+
+#else
+typedef unsigned long cpumask_t;
+#endif
+
+#ifdef CONFIG_SMP
+#if NR_CPUS > BITS_PER_LONG
+#include <asm-generic/cpumask_array.h>
+#else
+#include <asm-generic/cpumask_arith.h>
+#endif
+#else
+#include <asm-generic/cpumask_up.h>
+#endif
+
+#if NR_CPUS <= 4*BITS_PER_LONG
+#include <asm-generic/cpumask_const_value.h>
+#else
+#include <asm-generic/cpumask_const_reference.h>
+#endif
+
+#endif /* __ASM_GENERIC_CPUMASK_H */
index c19a0a6..7325284 100644 (file)
@@ -17,6 +17,7 @@
 #define cpus_complement(map)           do { map = ~(map); } while (0)
 #define cpus_equal(map1, map2)         ((map1) == (map2))
 #define cpus_empty(map)                        ((map) == 0)
+#define cpus_addr(map)                 (&(map))
 
 #if BITS_PER_LONG == 32
 #define cpus_weight(map)               hweight32(map)
index 60c955d..bd5c491 100644 (file)
@@ -20,6 +20,7 @@
 #define cpus_complement(map)   bitmap_complement((map).mask, NR_CPUS)
 #define cpus_equal(map1, map2) bitmap_equal((map1).mask, (map2).mask, NR_CPUS)
 #define cpus_empty(map)                bitmap_empty(map.mask, NR_CPUS)
+#define cpus_addr(map)         ((map).mask)
 #define cpus_weight(map)               bitmap_weight((map).mask, NR_CPUS)
 #define cpus_shift_right(d, s, n)      bitmap_shift_right((d).mask, (s).mask, n, NR_CPUS)
 #define cpus_shift_left(d, s, n)       bitmap_shift_left((d).mask, (s).mask, n, NR_CPUS)
index 7a4caef..16ca16d 100644 (file)
@@ -3,7 +3,7 @@
 
 typedef const cpumask_t cpumask_const_t;
 
-#define mk_cpumask_const(map)          ((cpumask_const_t)(map))
+#define mk_cpumask_const(map)          (map)
 #define cpu_isset_const(cpu, map)      cpu_isset(cpu, map)
 #define cpus_and_const(dst,src1,src2)  cpus_and(dst, src1, src2)
 #define cpus_or_const(dst,src1,src2)   cpus_or(dst, src1, src2)
index a486c34..f55c265 100644 (file)
@@ -33,6 +33,7 @@
 
 #define cpus_equal(map1, map2)         (cpus_coerce(map1) == cpus_coerce(map2))
 #define cpus_empty(map)                        (cpus_coerce(map) == 0UL)
+#define cpus_addr(map)                 (&(map))
 #define cpus_weight(map)               (cpus_coerce(map) ? 1UL : 0UL)
 #define cpus_shift_right(d, s, n)      do { cpus_coerce(d) = 0UL; } while (0)
 #define cpus_shift_left(d, s, n)       do { cpus_coerce(d) = 0UL; } while (0)
index 87068f2..30288d3 100644 (file)
  */
 static __inline__ unsigned long ffz(unsigned long word)
 {
-       register unsigned long result asm("er0");
-       register unsigned long _word asm("er1");
-
-       _word = word;
-       __asm__("sub.l %0,%0\n\t"
-               "dec.l #1,%0\n"
-               "1:\n\t"
-               "shlr.l %1\n\t"
+       unsigned long result;
+
+       result = -1;
+       __asm__("1:\n\t"
+               "shlr.l %2\n\t"
                "adds #1,%0\n\t"
                "bcs 1b"
-               : "=r" (result) : "r" (_word));
+               : "=r" (result)
+               : "0"  (result),"r" (word));
        return result;
 }
 
 static __inline__ void set_bit(int nr, volatile unsigned long* addr)
 {
        volatile unsigned char *b_addr;
-       b_addr = &(((volatile unsigned char *) addr)
-                 [((nr >> 3) & ~3) + 3 - ((nr >> 3) & 3)]);
+       b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3);
        __asm__("mov.l %1,er0\n\t"
                "bset r0l,%0"
                :"+m"(*b_addr)
@@ -61,8 +58,7 @@ static __inline__ void set_bit(int nr, volatile unsigned long* addr)
 static __inline__ void clear_bit(int nr, volatile unsigned long* addr)
 {
        volatile unsigned char *b_addr;
-       b_addr = &(((volatile unsigned char *) addr)
-                 [((nr >> 3) & ~3) + 3 - ((nr >> 3) & 3)]);
+       b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3);
        __asm__("mov.l %1,er0\n\t"
                "bclr r0l,%0"
                :"+m"(*b_addr)
@@ -75,8 +71,7 @@ static __inline__ void clear_bit(int nr, volatile unsigned long* addr)
 static __inline__ void change_bit(int nr, volatile unsigned long* addr)
 {
        volatile unsigned char *b_addr;
-       b_addr = &(((volatile unsigned char *) addr)
-                 [((nr >> 3) & ~3) + 3 - ((nr >> 3) & 3)]);
+       b_addr = (volatile unsigned char *)addr + ((nr >> 3) ^ 3);
        __asm__("mov.l %1,er0\n\t"
                "bnot r0l,%0"
                :"+m"(*b_addr)
@@ -88,22 +83,18 @@ static __inline__ void change_bit(int nr, volatile unsigned long* addr)
 
 static __inline__ int test_bit(int nr, const unsigned long* addr)
 {
-       return ((1UL << (nr & 7)) & 
-               (((const volatile unsigned char *) addr)
-               [((nr >> 3) & ~3) + 3 - ((nr >> 3) & 3)])) != 0;
+       return (*((volatile unsigned char *)addr + ((nr >> 3) ^ 3)) & (1UL << (nr & 7))) != 0;
 }
 
 #define __test_bit(nr, addr) test_bit(nr, addr)
 
 static __inline__ int test_and_set_bit(int nr, volatile unsigned long* addr)
 {
-       register int retval __asm__("er0");
+       int retval = 0;
        volatile unsigned char *a;
-       a = (volatile unsigned char *)addr;
 
-       a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
-       __asm__("mov.l %2,er3\n\t"
-               "sub.l %0,%0\n\t"
+       a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3);             \
+       __asm__("mov.l %4,er3\n\t"
                "stc ccr,r3h\n\t"
                "orc #0x80,ccr\n\t"
                "btst r3l,%1\n\t"
@@ -112,37 +103,35 @@ static __inline__ int test_and_set_bit(int nr, volatile unsigned long* addr)
                "inc.l #1,%0\n\t"
                "1:"
                "ldc r3h,ccr"
-               : "=r"(retval),"+m"(*a) :"g"(nr & 7):"er3","memory");
+               : "=r"(retval),"+m"(*a)
+               : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
        return retval;
 }
 
 static __inline__ int __test_and_set_bit(int nr, volatile unsigned long* addr)
 {
-       register int retval __asm__("er0");
+       int retval = 0;
        volatile unsigned char *a;
-       a = (volatile unsigned char *)addr;
 
-       a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
-       __asm__("mov.l %2,er3\n\t"
-               "sub.l %0,%0\n\t"
+       a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3);             \
+       __asm__("mov.l %4,er3\n\t"
                "btst r3l,%1\n\t"
                "bset r3l,%1\n\t"
                "beq 1f\n\t"
                "inc.l #1,%0\n\t"
                "1:"
-               : "=r"(retval),"+m"(*a) :"g"(nr & 7):"er3","memory");
+               : "=r"(retval),"+m"(*a)
+               : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
        return retval;
 }
 
 static __inline__ int test_and_clear_bit(int nr, volatile unsigned long* addr)
 {
-       register int retval __asm__("er0");
+       int retval = 0;
        volatile unsigned char *a;
-       a = (volatile unsigned char *)addr;
 
-       a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
-       __asm__("mov.l %2,er3\n\t"
-               "sub.l %0,%0\n\t"
+       a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3);             \
+       __asm__("mov.l %4,er3\n\t"
                "stc ccr,r3h\n\t"
                "orc #0x80,ccr\n\t"
                "btst r3l,%1\n\t"
@@ -151,37 +140,35 @@ static __inline__ int test_and_clear_bit(int nr, volatile unsigned long* addr)
                "inc.l #1,%0\n\t"
                "1:"
                "ldc r3h,ccr"
-               : "=r"(retval),"=m"(*a) :"g"(nr & 7):"er3","memory");
+               : "=r"(retval),"+m"(*a)
+               : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
        return retval;
 }
 
 static __inline__ int __test_and_clear_bit(int nr, volatile unsigned long* addr)
 {
-       register int retval __asm__("er0");
+       int retval = 0;
        volatile unsigned char *a;
-       a = (volatile unsigned char *)addr;
 
-       a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
-       __asm__("mov.l %2,er3\n\t"
-               "sub.l %0,%0\n\t"
+       a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3);             \
+       __asm__("mov.l %4,er3\n\t"
                "btst r3l,%1\n\t"
                "bclr r3l,%1\n\t"
                "beq 1f\n\t"
                "inc.l #1,%0\n\t"
                "1:"
-               : "=r"(retval),"+m"(*a) :"g"(nr & 7):"er3","memory");
+               : "=r"(retval),"+m"(*a)
+               : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
        return retval;
 }
 
 static __inline__ int test_and_change_bit(int nr, volatile unsigned long* addr)
 {
-       register int retval __asm__("er0");
+       int retval = 0;
        volatile unsigned char *a;
-       a = (volatile unsigned char *)addr;
 
-       a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
-       __asm__("mov.l %2,er3\n\t"
-               "sub.l %0,%0\n\t"
+       a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3);             \
+       __asm__("mov.l %4,er3\n\t"
                "stc ccr,r3h\n\t"
                "orc #0x80,ccr\n\t"
                "btst r3l,%1\n\t"
@@ -190,25 +177,25 @@ static __inline__ int test_and_change_bit(int nr, volatile unsigned long* addr)
                "inc.l #1,%0\n\t"
                "1:"
                "ldc r3h,ccr"
-               : "=r"(retval),"+m"(*a) :"g"(nr & 7):"er3","memory");
+               : "=r"(retval),"+m"(*a)
+               : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
        return retval;
 }
 
 static __inline__ int __test_and_change_bit(int nr, volatile unsigned long* addr)
 {
-       register int retval __asm__("er0");
+       int retval = 0;
        volatile unsigned char *a;
-       a = (volatile unsigned char *)addr;
 
-       a += ((nr >> 3) & ~3) + (3 - ((nr >> 3) & 3));
-       __asm__("mov.l %2,er3\n\t"
-               "sub.l %0,%0\n\t"
+       a = (volatile unsigned char *)addr += ((nr >> 3) ^ 3);             \
+       __asm__("mov.l %4,er3\n\t"
                "btst r3l,%1\n\t"
                "bnot r3l,%1\n\t"
                "beq 1f\n\t"
                "inc.l #1,%0\n\t"
                "1:"
-               : "=r"(retval),"+m"(*a) :"g"(nr & 7):"er3","memory");
+               : "=r"(retval),"+m"(*a)
+               : "0" (retval),"m" (*a),"g"(nr & 7):"er3","memory");
        return retval;
 }
 
@@ -251,27 +238,21 @@ found_middle:
        return result + ffz(tmp);
 }
 
-static __inline__ unsigned long ffs(unsigned long word)
+static __inline__ unsigned long __ffs(unsigned long word)
 {
-       register unsigned long result asm("er0");
-       register unsigned long _word asm("er1");
-
-       _word = word;
-       __asm__("sub.l %0,%0\n\t"
-               "dec.l #1,%0\n"
-               "1:\n\t"
-               "shlr.l %1\n\t"
+       unsigned long result;
+
+       result = -1;
+       __asm__("1:\n\t"
+               "shlr.l %2\n\t"
                "adds #1,%0\n\t"
                "bcc 1b"
-               : "=r" (result) : "r"(_word));
+               : "=r" (result)
+               : "0"(result),"r"(word));
        return result;
 }
 
-#define __ffs(x) ffs(x)
-
-/*
- * fls: find last bit set.
- */
+#define ffs(x) generic_ffs(x)
 #define fls(x) generic_fls(x)
 
 /*
@@ -316,6 +297,7 @@ static __inline__ int ext2_set_bit(int nr, volatile void * addr)
        local_irq_restore(flags);
        return retval;
 }
+#define ext2_set_bit_atomic(lock, nr, addr) ext2_set_bit(nr, addr)
 
 static __inline__ int ext2_clear_bit(int nr, volatile void * addr)
 {
@@ -331,6 +313,7 @@ static __inline__ int ext2_clear_bit(int nr, volatile void * addr)
        local_irq_restore(flags);
        return retval;
 }
+#define ext2_clear_bit_atomic(lock, nr, addr) ext2_set_bit(nr, addr)
 
 static __inline__ int ext2_test_bit(int nr, const volatile void * addr)
 {
@@ -402,17 +385,6 @@ found_middle:
 #define minix_test_bit(nr,addr) test_bit(nr,addr)
 #define minix_find_first_zero_bit(addr,size) find_first_zero_bit(addr,size)
 
-/**
- * hweightN - returns the hamming weight of a N-bit word
- * @x: the word to weigh
- *
- * The Hamming Weight of a number is the total number of bits set in it.
- */
-
-#define hweight32(x) generic_hweight32(x)
-#define hweight16(x) generic_hweight16(x)
-#define hweight8(x) generic_hweight8(x)
-
 #endif /* __KERNEL__ */
 
 #endif /* _H8300_BITOPS_H */
diff --git a/include/asm-h8300/cpumask.h b/include/asm-h8300/cpumask.h
new file mode 100644 (file)
index 0000000..3b40385
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_H8300_CPUMASK_H
+#define _ASM_H8300_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_H8300_CPUMASK_H */
diff --git a/include/asm-i386/cpumask.h b/include/asm-i386/cpumask.h
new file mode 100644 (file)
index 0000000..8bf5a82
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_I386_CPUMASK_H
+#define _ASM_I386_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_I386_CPUMASK_H */
index 2255391..9b3b8bf 100644 (file)
@@ -41,6 +41,7 @@ asmlinkage void apic_timer_interrupt(void);
 asmlinkage void error_interrupt(void);
 asmlinkage void spurious_interrupt(void);
 asmlinkage void thermal_interrupt(struct pt_regs);
+#define platform_legacy_irq(irq)       ((irq) < 16)
 #endif
 
 void mask_irq(unsigned int irq);
index 3b973c8..861ecee 100644 (file)
 
 #ifdef CONFIG_X86_IO_APIC
 
+#ifdef CONFIG_PCI_USE_VECTOR
+static inline int use_pci_vector(void) {return 1;}
+static inline void disable_edge_ioapic_vector(unsigned int vector) { }
+static inline void mask_and_ack_level_ioapic_vector(unsigned int vector) { }
+static inline void end_edge_ioapic_vector (unsigned int vector) { }
+#define startup_level_ioapic   startup_level_ioapic_vector
+#define shutdown_level_ioapic  mask_IO_APIC_vector
+#define enable_level_ioapic    unmask_IO_APIC_vector
+#define disable_level_ioapic   mask_IO_APIC_vector
+#define mask_and_ack_level_ioapic mask_and_ack_level_ioapic_vector
+#define end_level_ioapic       end_level_ioapic_vector
+#define set_ioapic_affinity    set_ioapic_affinity_vector
+
+#define startup_edge_ioapic    startup_edge_ioapic_vector
+#define shutdown_edge_ioapic   disable_edge_ioapic_vector
+#define enable_edge_ioapic     unmask_IO_APIC_vector
+#define disable_edge_ioapic    disable_edge_ioapic_vector
+#define ack_edge_ioapic        ack_edge_ioapic_vector
+#define end_edge_ioapic        end_edge_ioapic_vector
+#else
+static inline int use_pci_vector(void) {return 0;}
+static inline void disable_edge_ioapic_irq(unsigned int irq) { }
+static inline void mask_and_ack_level_ioapic_irq(unsigned int irq) { }
+static inline void end_edge_ioapic_irq (unsigned int irq) { }
+#define startup_level_ioapic   startup_level_ioapic_irq
+#define shutdown_level_ioapic  mask_IO_APIC_irq
+#define enable_level_ioapic    unmask_IO_APIC_irq
+#define disable_level_ioapic   mask_IO_APIC_irq
+#define mask_and_ack_level_ioapic mask_and_ack_level_ioapic_irq
+#define end_level_ioapic       end_level_ioapic_irq
+#define set_ioapic_affinity    set_ioapic_affinity_irq
+
+#define startup_edge_ioapic    startup_edge_ioapic_irq
+#define shutdown_edge_ioapic   disable_edge_ioapic_irq
+#define enable_edge_ioapic     unmask_IO_APIC_irq
+#define disable_edge_ioapic    disable_edge_ioapic_irq
+#define ack_edge_ioapic        ack_edge_ioapic_irq
+#define end_edge_ioapic        end_edge_ioapic_irq
+#endif
+
 #define APIC_MISMATCH_DEBUG
 
 #define IO_APIC_BASE(idx) \
@@ -177,4 +217,6 @@ extern int io_apic_set_pci_routing (int ioapic, int pin, int irq, int edge_level
 #define io_apic_assign_pci_irqs 0
 #endif
 
+extern int assign_irq_vector(int irq);
+
 #endif
index 2e98645..543f784 100644 (file)
@@ -53,7 +53,7 @@
         ((size) << _IOC_SIZESHIFT))
 
 /* provoke compile error for invalid uses of size argument */
-extern int __invalid_size_argument_for_IOC;
+extern unsigned int __invalid_size_argument_for_IOC;
 #define _IOC_TYPECHECK(t) \
        ((sizeof(t) == sizeof(t[1]) && \
          sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
index f7d17d2..69cb661 100644 (file)
@@ -24,6 +24,7 @@ extern void disable_irq(unsigned int);
 extern void disable_irq_nosync(unsigned int);
 extern void enable_irq(unsigned int);
 extern void release_x86_irqs(struct task_struct *);
+extern int can_request_irq(unsigned int, unsigned long flags);
 
 #ifdef CONFIG_X86_LOCAL_APIC
 #define ARCH_HAS_NMI_WATCHDOG          /* See include/linux/nmi.h */
index a0371dc..8381e7e 100644 (file)
  * Since vectors 0x00-0x1f are used/reserved for the CPU,
  * the usable vector space is 0x20-0xff (224 vectors)
  */
+
+/*
+ * The maximum number of vectors supported by i386 processors
+ * is limited to 256. For processors other than i386, NR_VECTORS
+ * should be changed accordingly.
+ */
+#define NR_VECTORS 256
+
+#ifdef CONFIG_PCI_USE_VECTOR
+#define NR_IRQS FIRST_SYSTEM_VECTOR
+#define NR_IRQ_VECTORS NR_IRQS
+#else
 #ifdef CONFIG_X86_IO_APIC
 #define NR_IRQS 224
 # if (224 >= 32 * NR_CPUS)
@@ -87,6 +99,7 @@
 #define NR_IRQS 16
 #define NR_IRQ_VECTORS NR_IRQS
 #endif
+#endif
 
 #define FPU_IRQ                        13
 
index 8875f34..1d427aa 100644 (file)
@@ -5,12 +5,12 @@
 
 #define APIC_DFR_VALUE (APIC_DFR_FLAT)
 
-static inline cpumask_t target_cpus(void)
+static inline cpumask_const_t target_cpus(void)
 { 
 #ifdef CONFIG_SMP
-       return cpu_online_map;
+       return mk_cpumask_const(cpu_online_map);
 #else
-       return cpumask_of_cpu(0);
+       return mk_cpumask_const(cpumask_of_cpu(0));
 #endif
 } 
 #define TARGET_CPUS (target_cpus())
index b744ac2..e15b73c 100644 (file)
@@ -39,6 +39,7 @@ static inline cpumask_t target_cpus(void)
 #endif
 
 #define APIC_BROADCAST_ID      (0xff)
+#define NO_IOAPIC_CHECK (0)
 
 static inline unsigned long check_apicid_used(physid_mask_t bitmap, int apicid)
 { 
index 88d215a..1cce2b9 100644 (file)
@@ -5,11 +5,11 @@
 
 extern int use_cyclone;
 
-#ifdef CONFIG_NUMA
+#ifdef CONFIG_X86_SUMMIT_NUMA
 extern void setup_summit(void);
-#else /* !CONFIG_NUMA */
+#else
 #define setup_summit() {}
-#endif /* CONFIG_NUMA */
+#endif
 
 static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name, 
                                struct mpc_config_translation *translation)
@@ -110,9 +110,9 @@ typedef enum {
        LookOutBWPEG  = 7,  /* LookOut WPEG                        */
 } node_type;
 
-static inline int is_WPEG(node_type type){
-       return (type == CompatWPEG || type == AltWPEG ||
-               type == LookOutAWPEG || type == LookOutBWPEG);
+static inline int is_WPEG(struct rio_detail *rio){
+       return (rio->type == CompatWPEG || rio->type == AltWPEG ||
+               rio->type == LookOutAWPEG || rio->type == LookOutBWPEG);
 }
 
 #endif /* __ASM_MACH_MPPARSE_H */
index e0121b8..165421f 100644 (file)
@@ -55,6 +55,7 @@
 #define VIC_CPU_BOOT_CPI               VIC_CPI_LEVEL0
 #define VIC_CPU_BOOT_ERRATA_CPI                (VIC_CPI_LEVEL0 + 8)
 
+#define NR_VECTORS 256
 #define NR_IRQS 224
 #define NR_IRQ_VECTORS NR_IRQS
 
index a4ee37c..55bd307 100644 (file)
@@ -27,10 +27,6 @@ extern unsigned long mp_lapic_addr;
 extern int pic_mode;
 extern int using_apic_timer;
 
-#ifdef CONFIG_X86_SUMMIT
-extern void setup_summit (void);
-#endif
-
 #ifdef CONFIG_ACPI_BOOT
 extern void mp_register_lapic (u8 id, u8 enabled);
 extern void mp_register_lapic_address (u64 address);
index b9998ad..5534044 100644 (file)
@@ -407,6 +407,7 @@ struct thread_struct {
 /* cached TLS descriptors. */
        struct desc_struct tls_array[GDT_ENTRY_TLS_ENTRIES];
        unsigned long   esp0;
+       unsigned long   sysenter_cs;
        unsigned long   eip;
        unsigned long   esp;
        unsigned long   fs;
@@ -428,6 +429,7 @@ struct thread_struct {
 
 #define INIT_THREAD  {                                                 \
        .vm86_info = NULL,                                              \
+       .sysenter_cs = __KERNEL_CS,                                     \
        .io_bitmap_ptr = NULL,                                          \
 }
 
@@ -447,21 +449,13 @@ struct thread_struct {
        .io_bitmap      = { [ 0 ... IO_BITMAP_LONGS] = ~0 },            \
 }
 
-static inline void load_esp0(struct tss_struct *tss, unsigned long esp0)
+static inline void load_esp0(struct tss_struct *tss, struct thread_struct *thread)
 {
-       tss->esp0 = esp0;
+       tss->esp0 = thread->esp0;
        /* This can only happen when SEP is enabled, no need to test "SEP"arately */
-       if ((unlikely(tss->ss1 != __KERNEL_CS))) {
-               tss->ss1 = __KERNEL_CS;
-               wrmsr(MSR_IA32_SYSENTER_CS, __KERNEL_CS, 0);
-       }
-}
-
-static inline void disable_sysenter(struct tss_struct *tss)
-{
-       if (cpu_has_sep)  {
-               tss->ss1 = 0;
-               wrmsr(MSR_IA32_SYSENTER_CS, 0, 0);
+       if (unlikely(tss->ss1 != thread->sysenter_cs)) {
+               tss->ss1 = thread->sysenter_cs;
+               wrmsr(MSR_IA32_SYSENTER_CS, thread->sysenter_cs, 0);
        }
 }
 
index 9198a37..bead49e 100644 (file)
 #define IST_INFO   (*(struct ist_info *) (PARAM+0x60))
 #define DRIVE_INFO (*(struct drive_info_struct *) (PARAM+0x80))
 #define SYS_DESC_TABLE (*(struct sys_desc_table_struct*)(PARAM+0xa0))
+#define EFI_SYSTAB ((efi_system_table_t *) *((unsigned long *)(PARAM+0x1c4)))
+#define EFI_MEMDESC_SIZE (*((unsigned long *) (PARAM+0x1c8)))
+#define EFI_MEMDESC_VERSION (*((unsigned long *) (PARAM+0x1cc)))
+#define EFI_MEMMAP ((efi_memory_desc_t *) *((unsigned long *)(PARAM+0x1d0)))
+#define EFI_MEMMAP_SIZE (*((unsigned long *) (PARAM+0x1d4)))
 #define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2))
 #define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8))
 #define VIDEO_MODE (*(unsigned short *) (PARAM+0x1FA))
index 3a90a9e..daecfc4 100644 (file)
@@ -291,7 +291,7 @@ extern void __struct_cpy_bug (void);
 #define struct_cpy(x,y)                        \
 ({                                             \
        if (sizeof(*(x)) != sizeof(*(y)))       \
-               __struct_cpy_bug;               \
+               __struct_cpy_bug();             \
        memcpy(x, y, sizeof(*(x)));             \
 })
 
@@ -299,14 +299,9 @@ extern void __struct_cpy_bug (void);
 static inline void * memmove(void * dest,const void * src, size_t n)
 {
 int d0, d1, d2;
-if (dest<src)
-__asm__ __volatile__(
-       "rep\n\t"
-       "movsb"
-       : "=&c" (d0), "=&S" (d1), "=&D" (d2)
-       :"0" (n),"1" (src),"2" (dest)
-       : "memory");
-else
+if (dest<src) {
+       memcpy(dest,src,n);
+} else
 __asm__ __volatile__(
        "std\n\t"
        "rep\n\t"
index 21044fa..1727153 100644 (file)
@@ -11,6 +11,7 @@
  *     last timer intruupt.
  */
 struct timer_opts{
+       char* name;
        int (*init)(char *override);
        void (*mark_offset)(void);
        unsigned long (*get_offset)(void);
diff --git a/include/asm-ia64/cpumask.h b/include/asm-ia64/cpumask.h
new file mode 100644 (file)
index 0000000..7764aef
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_IA64_CPUMASK_H
+#define _ASM_IA64_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_IA64_CPUMASK_H */
index 4c8fd32..afabca9 100644 (file)
@@ -6,7 +6,11 @@
 #include <asm/ptrace.h>
 #include <asm/signal.h>
 
-#ifdef CONFIG_IA32_SUPPORT
+#define IA32_NR_syscalls               275 /* length of syscall table */
+
+#ifndef __ASSEMBLY__
+
+# ifdef CONFIG_IA32_SUPPORT
 
 extern void ia32_cpu_init (void);
 extern void ia32_boot_gdt_init (void);
@@ -15,10 +19,12 @@ extern int ia32_exception (struct pt_regs *regs, unsigned long isr);
 extern int ia32_intercept (struct pt_regs *regs, unsigned long isr);
 extern int ia32_clone_tls (struct task_struct *child, struct pt_regs *childregs);
 
-#endif /* !CONFIG_IA32_SUPPORT */
+# endif /* !CONFIG_IA32_SUPPORT */
 
 /* Declare this unconditionally, so we don't get warnings for unreachable code.  */
 extern int ia32_setup_frame1 (int sig, struct k_sigaction *ka, siginfo_t *info,
                              sigset_t *set, struct pt_regs *regs);
 
+#endif /* !__ASSEMBLY__ */
+
 #endif /* _ASM_IA64_IA32_H */
index 0255260..3a3ea55 100644 (file)
@@ -95,12 +95,13 @@ delayed_tlb_flush (void)
 static inline mm_context_t
 get_mmu_context (struct mm_struct *mm)
 {
+       unsigned long flags;
        mm_context_t context = mm->context;
 
        if (context)
                return context;
 
-       spin_lock(&ia64_ctx.lock);
+       spin_lock_irqsave(&ia64_ctx.lock, flags);
        {
                /* re-check, now that we've got the lock: */
                context = mm->context;
@@ -110,7 +111,7 @@ get_mmu_context (struct mm_struct *mm)
                        mm->context = context = ia64_ctx.next++;
                }
        }
-       spin_unlock(&ia64_ctx.lock);
+       spin_unlock_irqrestore(&ia64_ctx.lock, flags);
        return context;
 }
 
index 15b81b2..7aa1624 100644 (file)
@@ -63,7 +63,7 @@
 # define HPAGE_SIZE    (__IA64_UL_CONST(1) << HPAGE_SHIFT)
 # define HPAGE_MASK    (~(HPAGE_SIZE - 1))
 # define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
-# define ARCH_HAS_VALID_HUGEPAGE_RANGE
+# define ARCH_HAS_HUGEPAGE_ONLY_RANGE
 #endif /* CONFIG_HUGETLB_PAGE */
 
 #ifdef __ASSEMBLY__
@@ -137,7 +137,9 @@ typedef union ia64_va {
 # define htlbpage_to_page(x)   ((REGION_NUMBER(x) << 61)                               \
                                 | (REGION_OFFSET(x) >> (HPAGE_SHIFT-PAGE_SHIFT)))
 # define HUGETLB_PAGE_ORDER    (HPAGE_SHIFT - PAGE_SHIFT)
-extern int  check_valid_hugepage_range(unsigned long addr, unsigned long len);
+# define is_hugepage_only_range(addr, len)             \
+        (REGION_NUMBER(addr) == REGION_HPAGE &&        \
+         REGION_NUMBER((addr)+(len)) == REGION_HPAGE)
 #endif
 
 static __inline__ int
index 1497672..7561d3d 100644 (file)
@@ -459,6 +459,15 @@ extern struct page *zero_page_memmap_ptr;
 /* We provide our own get_unmapped_area to cope with VA holes for userland */
 #define HAVE_ARCH_UNMAPPED_AREA
 
+#ifdef CONFIG_HUGETLB_PAGE
+#define HUGETLB_PGDIR_SHIFT    (HPAGE_SHIFT + 2*(PAGE_SHIFT-3))
+#define HUGETLB_PGDIR_SIZE     (__IA64_UL(1) << HUGETLB_PGDIR_SHIFT)
+#define HUGETLB_PGDIR_MASK     (~(HUGETLB_PGDIR_SIZE-1))
+struct mmu_gather;
+extern void hugetlb_free_pgtables(struct mmu_gather *tlb,
+       struct vm_area_struct * prev, unsigned long start, unsigned long end);
+#endif
+
 typedef pte_t *pte_addr_t;
 
 /*
index 5948902..91ca5ec 100644 (file)
@@ -64,7 +64,7 @@
 #define IA64_THREAD_PM_VALID   (__IA64_UL(1) << 2)     /* performance registers valid? */
 #define IA64_THREAD_UAC_NOPRINT        (__IA64_UL(1) << 3)     /* don't log unaligned accesses */
 #define IA64_THREAD_UAC_SIGBUS (__IA64_UL(1) << 4)     /* generate SIGBUS on unaligned acc. */
-#define IA64_THREAD_KRBS_SYNCED        (__IA64_UL(1) << 5)     /* krbs synced with process vm? */
+                                                       /* bit 5 is currently unused */
 #define IA64_THREAD_FPEMU_NOPRINT (__IA64_UL(1) << 6)  /* don't log any fpswa faults */
 #define IA64_THREAD_FPEMU_SIGFPE  (__IA64_UL(1) << 7)  /* send a SIGFPE for fpswa faults */
 #define IA64_THREAD_XSTACK     (__IA64_UL(1) << 8)     /* stack executable by default? */
index 18f9954..f4fa946 100644 (file)
@@ -55,6 +55,6 @@ struct compat_statfs64 {
        __u32 f_namelen;
        __u32 f_frsize;
        __u32 f_spare[5];
-};
+} __attribute__((packed));
 
 #endif /* _ASM_IA64_STATFS_H */
diff --git a/include/asm-m68k/cpumask.h b/include/asm-m68k/cpumask.h
new file mode 100644 (file)
index 0000000..b124503
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_M68K_CPUMASK_H
+#define _ASM_M68K_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_M68K_CPUMASK_H */
diff --git a/include/asm-m68knommu/cpumask.h b/include/asm-m68knommu/cpumask.h
new file mode 100644 (file)
index 0000000..cd9cc78
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_M68KNOMMU_CPUMASK_H
+#define _ASM_M68KNOMMU_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_M68KNOMMU_CPUMASK_H */
diff --git a/include/asm-mips/cpumask.h b/include/asm-mips/cpumask.h
new file mode 100644 (file)
index 0000000..cf562af
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_MIPS_CPUMASK_H
+#define _ASM_MIPS_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_MIPS_CPUMASK_H */
diff --git a/include/asm-parisc/cpumask.h b/include/asm-parisc/cpumask.h
new file mode 100644 (file)
index 0000000..27f4f17
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_PARISC_CPUMASK_H
+#define _ASM_PARISC_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_PARISC_CPUMASK_H */
index 3c7a490..189f864 100644 (file)
@@ -5,9 +5,7 @@
 #include <linux/config.h>
 #include <asm/cacheflush.h>
 
-/*
-** See Documentation/DMA-mapping.txt
-*/
+/* See Documentation/DMA-mapping.txt */
 struct hppa_dma_ops {
        int  (*dma_supported)(struct device *dev, u64 mask);
        void *(*alloc_consistent)(struct device *dev, size_t size, dma_addr_t *iova, int flag);
@@ -208,15 +206,13 @@ int ccio_request_resource(const struct parisc_device *dev,
                struct resource *res);
 int ccio_allocate_resource(const struct parisc_device *dev,
                struct resource *res, unsigned long size,
-               unsigned long min, unsigned long max, unsigned long align,
-               void (*alignf)(void *, struct resource *, unsigned long, unsigned long),
-               void *alignf_data);
+               unsigned long min, unsigned long max, unsigned long align);
 #else /* !CONFIG_IOMMU_CCIO */
 #define ccio_get_iommu(dev) NULL
 #define ccio_request_resource(dev, res) request_resource(&iomem_resource, res)
-#define ccio_allocate_resource(dev, res, size, min, max, align, alignf, data) \
+#define ccio_allocate_resource(dev, res, size, min, max, align) \
                allocate_resource(&iomem_resource, res, size, min, max, \
-                               align, alignf, data)
+                               align, NULL, NULL)
 #endif /* !CONFIG_IOMMU_CCIO */
 
 #ifdef CONFIG_IOMMU_SBA
index 75dc3e9..95dd787 100644 (file)
@@ -45,7 +45,7 @@
         ((size) << _IOC_SIZESHIFT))
 
 /* provoke compile error for invalid uses of size argument */
-extern int __invalid_size_argument_for_IOC;
+extern unsigned int __invalid_size_argument_for_IOC;
 #define _IOC_TYPECHECK(t) \
        ((sizeof(t) == sizeof(t[1]) && \
          sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
index cc9e311..66510fd 100644 (file)
@@ -40,10 +40,10 @@ extern int __put_user_bad(void);
 #define get_user __get_user
 
 #if BITS_PER_LONG == 32
-#define LDD_KERNEL(ptr) __get_kernel_bad();
-#define LDD_USER(ptr) __get_user_bad();
-#define STD_KERNEL(x, ptr) __put_kernel_asm64((u32)x,ptr)
-#define STD_USER(x, ptr) __put_user_asm64((u32)x,ptr)
+#define LDD_KERNEL(ptr)                __get_kernel_bad();
+#define LDD_USER(ptr)          __get_user_bad();
+#define STD_KERNEL(x, ptr)     __put_kernel_asm64(x,ptr)
+#define STD_USER(x, ptr)       __put_user_asm64(x,ptr)
 #else
 #define LDD_KERNEL(ptr) __get_kernel_asm("ldd",ptr)
 #define LDD_USER(ptr) __get_user_asm("ldd",ptr)
@@ -256,11 +256,12 @@ static inline void __put_user_asm64(u64 x, void *ptr)
  * Complex access routines -- external declarations
  */
 
-extern unsigned long lcopy_to_user(void *, const void *, unsigned long);
-extern unsigned long lcopy_from_user(void *, const void *, unsigned long);
-extern long lstrncpy_from_user(char *, const char *, long);
-extern unsigned lclear_user(void *,unsigned long);
-extern long lstrnlen_user(const char *,long);
+extern unsigned long lcopy_to_user(void __user *, const void *, unsigned long);
+extern unsigned long lcopy_from_user(void *, const void __user *, unsigned long);
+extern unsigned long lcopy_in_user(void __user *, const void __user *, unsigned long);
+extern long lstrncpy_from_user(char *, const char __user *, long);
+extern unsigned lclear_user(void __user *,unsigned long);
+extern long lstrnlen_user(const char __user *,long);
 
 /*
  * Complex access routines -- macros
@@ -276,5 +277,7 @@ extern long lstrnlen_user(const char *,long);
 #define __copy_from_user lcopy_from_user
 #define copy_to_user lcopy_to_user
 #define __copy_to_user lcopy_to_user
+#define copy_in_user lcopy_in_user
+#define __copy_in_user lcopy_in_user
 
 #endif /* __PARISC_UACCESS_H */
index f2e5904..6c8883e 100644 (file)
@@ -1,12 +1,12 @@
-#ifndef _ASMPARISC_UCONTEXT_H
-#define _ASMPARISC_UCONTEXT_H
+#ifndef _ASM_PARISC_UCONTEXT_H
+#define _ASM_PARISC_UCONTEXT_H
 
 struct ucontext {
-       unsigned long     uc_flags;
+       unsigned int      uc_flags;
        struct ucontext  *uc_link;
        stack_t           uc_stack;
        struct sigcontext uc_mcontext;
        sigset_t          uc_sigmask;   /* mask last for extensibility */
 };
 
-#endif /* !_ASMPARISC_UCONTEXT_H */
+#endif /* !_ASM_PARISC_UCONTEXT_H */
index 410a871..88e4343 100644 (file)
  */
 
 #define __NR_Linux                0
-#define __NR_syscall              (__NR_Linux + 0)
+#define __NR_restart_syscall      (__NR_Linux + 0)
 #define __NR_exit                 (__NR_Linux + 1)
 #define __NR_fork                 (__NR_Linux + 2)
 #define __NR_read                 (__NR_Linux + 3)
diff --git a/include/asm-ppc/cpumask.h b/include/asm-ppc/cpumask.h
new file mode 100644 (file)
index 0000000..3090108
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_PPC_CPUMASK_H
+#define _ASM_PPC_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_PPC_CPUMASK_H */
index a4aac1a..c13b4e4 100644 (file)
@@ -81,6 +81,7 @@ static inline void *kmap_atomic(struct page *page, enum km_type type)
        unsigned int idx;
        unsigned long vaddr;
 
+       /* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
        inc_preempt_count();
        if (page < highmem_start_page)
                return page_address(page);
@@ -105,6 +106,7 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type)
 
        if (vaddr < KMAP_FIX_BEGIN) { // FIXME
                dec_preempt_count();
+               preempt_check_resched();
                return;
        }
 
@@ -119,6 +121,7 @@ static inline void kunmap_atomic(void *kvaddr, enum km_type type)
        flush_tlb_page(0, vaddr);
 #endif
        dec_preempt_count();
+       preempt_check_resched();
 }
 
 static inline struct page *kmap_atomic_to_page(void *ptr)
index 8d8cb7e..93c6acf 100644 (file)
@@ -38,7 +38,7 @@
         ((size) << _IOC_SIZESHIFT))
 
 /* provoke compile error for invalid uses of size argument */
-extern int __invalid_size_argument_for_IOC;
+extern unsigned int __invalid_size_argument_for_IOC;
 #define _IOC_TYPECHECK(t) \
        ((sizeof(t) == sizeof(t[1]) && \
          sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
index a48329b..bf1df39 100644 (file)
 #define __NR_statfs64          252
 #define __NR_fstatfs64         253
 #define __NR_fadvise64_64      254
-#define __NR_rtas              255
 
-#define __NR_syscalls          256
+#define __NR_syscalls          255
 
 #define __NR(n)        #n
 
                register unsigned long __sc_5  __asm__ ("r5");          \
                register unsigned long __sc_6  __asm__ ("r6");          \
                register unsigned long __sc_7  __asm__ ("r7");          \
-               register unsigned long __sc_8  __asm__ ("r8");          \
                                                                        \
                __sc_loadargs_##nr(name, args);                         \
                __asm__ __volatile__                                    \
                        : "=&r" (__sc_0),                               \
                          "=&r" (__sc_3),  "=&r" (__sc_4),              \
                          "=&r" (__sc_5),  "=&r" (__sc_6),              \
-                         "=&r" (__sc_7),  "=&r" (__sc_8)               \
+                         "=&r" (__sc_7)                                \
                        : __sc_asm_input_##nr                           \
                        : "cr0", "ctr", "memory",                       \
-                         "r9", "r10","r11", "r12");                    \
+                         "r8", "r9", "r10","r11", "r12");              \
                __sc_ret = __sc_3;                                      \
                __sc_err = __sc_0;                                      \
        }                                                               \
 #define __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5)            \
        __sc_loadargs_4(name, arg1, arg2, arg3, arg4);                  \
        __sc_7 = (unsigned long) (arg5)
-#define __sc_loadargs_6(name, arg1, arg2, arg3, arg4, arg5, arg6)      \
-       __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5);            \
-       __sc_8 = (unsigned long) (arg6)
 
 #define __sc_asm_input_0 "0" (__sc_0)
 #define __sc_asm_input_1 __sc_asm_input_0, "1" (__sc_3)
 #define __sc_asm_input_3 __sc_asm_input_2, "3" (__sc_5)
 #define __sc_asm_input_4 __sc_asm_input_3, "4" (__sc_6)
 #define __sc_asm_input_5 __sc_asm_input_4, "5" (__sc_7)
-#define __sc_asm_input_6 __sc_asm_input_5, "6" (__sc_8)
 
 #define _syscall0(type,name)                                           \
 type name(void)                                                                \
@@ -368,12 +362,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5)      \
        __syscall_nr(5, type, name, arg1, arg2, arg3, arg4, arg5);      \
 }
 
-#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6) \
-{                                                                      \
-       __syscall_nr(6, type, name, arg1, arg2, arg3, arg4, arg5, arg6); \
-}
-
 #ifdef __KERNEL__
 
 #define __NR__exit __NR_exit
index 78220c7..f55e7cb 100644 (file)
@@ -17,8 +17,6 @@
 
 #include <asm/types.h>
 
-#define CMD_LINE_SIZE 512
-
 /* We use a u32 for the type of the fields since they're written by
  * the bootloader which is a 32-bit process and read by the kernel
  * which is a 64-bit process.  This way they can both agree on the
diff --git a/include/asm-ppc64/cpumask.h b/include/asm-ppc64/cpumask.h
new file mode 100644 (file)
index 0000000..0914511
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_PPC64_CPUMASK_H
+#define _ASM_PPC64_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_PPC64_CPUMASK_H */
index 15206be..c885ff5 100644 (file)
@@ -74,20 +74,10 @@ extern struct cpu_spec              *cur_cpu_spec;
 #define FW_FEATURE_COPY                (1UL<<4)        
 #define FW_FEATURE_ASR         (1UL<<5)        
 #define FW_FEATURE_DEBUG       (1UL<<6)        
-#define FW_FEATURE_TERM                (1UL<<7)        
-#define FW_FEATURE_PERF                (1UL<<8)        
-#define FW_FEATURE_DUMP                (1UL<<9)        
-#define FW_FEATURE_INTERRUPT   (1UL<<10)       
-#define FW_FEATURE_MIGRATE     (1UL<<11)       
-#define FW_FEATURE_PERFMON     (1UL<<12)       
-#define FW_FEATURE_CRQ         (1UL<<13)       
-#define FW_FEATURE_VIO         (1UL<<14)       
-#define FW_FEATURE_RDMA        (1UL<<15)       
-#define FW_FEATURE_LLAN        (1UL<<16)       
-#define FW_FEATURE_BULK        (1UL<<17)       
-#define FW_FEATURE_XDABR       (1UL<<18)       
-#define FW_FEATURE_MULTITCE    (1UL<<19)       
-#define FW_FEATURE_SPLPAR      (1UL<<20)       
+#define FW_FEATURE_PERF                (1UL<<7)        
+#define FW_FEATURE_DUMP                (1UL<<8)        
+#define FW_FEATURE_INTERRUPT   (1UL<<9)        
+#define FW_FEATURE_MIGRATE     (1UL<<10)       
 
 typedef struct {
     unsigned long val;
@@ -154,24 +144,11 @@ extern firmware_feature_t firmware_features_table[];
        .llong 99b;                             \
        .previous
 
-#else
-
-#define BEGIN_FTR_SECTION              "98:\n"
-#define END_FTR_SECTION(msk, val)              \
-"99:\n"                                                \
-"      .section __ftr_fixup,\"a\";\n"          \
-"      .align 3;\n"                            \
-"      .llong "#msk";\n"                       \
-"      .llong "#val";\n"                       \
-"      .llong 98b;\n"                          \
-"      .llong 99b;\n"                          \
-"      .previous\n"
-
-#endif /* __ASSEMBLY__ */
-
 #define END_FTR_SECTION_IFSET(msk)     END_FTR_SECTION((msk), (msk))
 #define END_FTR_SECTION_IFCLR(msk)     END_FTR_SECTION((msk), 0)
 
+#endif /* __ASSEMBLY__ */
+
 #endif /* __ASM_PPC_CPUTABLE_H */
 #endif /* __KERNEL__ */
 
index b753072..1272c89 100644 (file)
@@ -1,10 +1,6 @@
 #ifndef __PPC64_ELF_H
 #define __PPC64_ELF_H
 
-#include <asm/types.h>
-#include <asm/ptrace.h>
-#include <asm/cputable.h>
-
 /* PowerPC relocations defined by the ABIs */
 #define R_PPC_NONE             0
 #define R_PPC_ADDR32           1       /* 32bit absolute address */
 #define R_PPC_SECTOFF_LO       34
 #define R_PPC_SECTOFF_HI       35
 #define R_PPC_SECTOFF_HA       36
-
-/* PowerPC relocations defined for the TLS access ABI.  */
-#define R_PPC_TLS              67 /* none      (sym+add)@tls */
-#define R_PPC_DTPMOD32         68 /* word32    (sym+add)@dtpmod */
-#define R_PPC_TPREL16          69 /* half16*   (sym+add)@tprel */
-#define R_PPC_TPREL16_LO       70 /* half16    (sym+add)@tprel@l */
-#define R_PPC_TPREL16_HI       71 /* half16    (sym+add)@tprel@h */
-#define R_PPC_TPREL16_HA       72 /* half16    (sym+add)@tprel@ha */
-#define R_PPC_TPREL32          73 /* word32    (sym+add)@tprel */
-#define R_PPC_DTPREL16         74 /* half16*   (sym+add)@dtprel */
-#define R_PPC_DTPREL16_LO      75 /* half16    (sym+add)@dtprel@l */
-#define R_PPC_DTPREL16_HI      76 /* half16    (sym+add)@dtprel@h */
-#define R_PPC_DTPREL16_HA      77 /* half16    (sym+add)@dtprel@ha */
-#define R_PPC_DTPREL32         78 /* word32    (sym+add)@dtprel */
-#define R_PPC_GOT_TLSGD16      79 /* half16*   (sym+add)@got@tlsgd */
-#define R_PPC_GOT_TLSGD16_LO   80 /* half16    (sym+add)@got@tlsgd@l */
-#define R_PPC_GOT_TLSGD16_HI   81 /* half16    (sym+add)@got@tlsgd@h */
-#define R_PPC_GOT_TLSGD16_HA   82 /* half16    (sym+add)@got@tlsgd@ha */
-#define R_PPC_GOT_TLSLD16      83 /* half16*   (sym+add)@got@tlsld */
-#define R_PPC_GOT_TLSLD16_LO   84 /* half16    (sym+add)@got@tlsld@l */
-#define R_PPC_GOT_TLSLD16_HI   85 /* half16    (sym+add)@got@tlsld@h */
-#define R_PPC_GOT_TLSLD16_HA   86 /* half16    (sym+add)@got@tlsld@ha */
-#define R_PPC_GOT_TPREL16      87 /* half16*   (sym+add)@got@tprel */
-#define R_PPC_GOT_TPREL16_LO   88 /* half16    (sym+add)@got@tprel@l */
-#define R_PPC_GOT_TPREL16_HI   89 /* half16    (sym+add)@got@tprel@h */
-#define R_PPC_GOT_TPREL16_HA   90 /* half16    (sym+add)@got@tprel@ha */
-#define R_PPC_GOT_DTPREL16     91 /* half16*   (sym+add)@got@dtprel */
-#define R_PPC_GOT_DTPREL16_LO  92 /* half16*   (sym+add)@got@dtprel@l */
-#define R_PPC_GOT_DTPREL16_HI  93 /* half16*   (sym+add)@got@dtprel@h */
-#define R_PPC_GOT_DTPREL16_HA  94 /* half16*   (sym+add)@got@dtprel@ha */
-
 /* Keep this the last entry.  */
-#define R_PPC_NUM              95
+#define R_PPC_NUM              37
 
 /*
  * ELF register definitions..
@@ -89,8 +54,7 @@
 
 #define ELF_NGREG      48      /* includes nip, msr, lr, etc. */
 #define ELF_NFPREG     33      /* includes fpscr */
-#define ELF_NVRREG32   33      /* includes vscr & vrsave stuffed together */
-#define ELF_NVRREG     34      /* includes vscr & vrsave in split vectors */
+#define ELF_NVRREG     33      /* includes vscr */
 
 typedef unsigned long elf_greg_t64;
 typedef elf_greg_t64 elf_gregset_t64[ELF_NGREG];
@@ -118,27 +82,6 @@ typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG];
 typedef double elf_fpreg_t;
 typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
 
-/* Altivec registers */
-/*
- * The entries with indexes 0-31 contain the corresponding vector registers. 
- * The entry with index 32 contains the vscr as the last word (offset 12) 
- * within the quadword.  This allows the vscr to be stored as either a 
- * quadword (since it must be copied via a vector register to/from storage) 
- * or as a word.  The entry with index 33 contains the vrsave as the first 
- * word (offset 0) within the quadword.
- *
- * This definition of the VMX state is compatible with the current PPC32 
- * ptrace interface.  This allows signal handling and ptrace to use the same 
- * structures.  This also simplifies the implementation of a bi-arch 
- * (combined (32- and 64-bit) gdb.
- *
- * Note that it's _not_ compatible with 32 bits ucontext which stuffs the
- * vrsave along with vscr and so only uses 33 vectors for the register set
- */
-typedef __vector128 elf_vrreg_t;
-typedef elf_vrreg_t elf_vrregset_t[ELF_NVRREG];
-typedef elf_vrreg_t elf_vrregset_t32[ELF_NVRREG32];
-
 /*
  * This is used to ensure we don't load something for the wrong architecture.
  */
@@ -185,15 +128,13 @@ static inline int dump_task_regs(struct task_struct *tsk,
 extern int dump_task_fpu(struct task_struct *, elf_fpregset_t *); 
 #define ELF_CORE_COPY_FPREGS(tsk, elf_fpregs) dump_task_fpu(tsk, elf_fpregs)
 
-/* XXX Should we define the XFPREGS using altivec ??? */
-
 #endif
 
 /* This yields a mask that user programs can use to figure out what
    instruction set this cpu supports.  This could be done in userspace,
    but it's not easy, and we've already done it here.  */
 
-#define ELF_HWCAP      (cur_cpu_spec->cpu_user_features)
+#define ELF_HWCAP      (0)
 
 /* This yields a string that ld.so will use to load implementation
    specific libraries for optimization.  This is more specific in
@@ -331,50 +272,7 @@ do {                                                                       \
 #define R_PPC64_TOC16_LO_DS    64 /* half16ds  #lo(S + A - .TOC.) >> 2.  */
 #define R_PPC64_PLTGOT16_DS    65 /* half16ds* (M + A) >> 2.  */
 #define R_PPC64_PLTGOT16_LO_DS 66 /* half16ds  #lo(M + A) >> 2.  */
-
-/* PowerPC64 relocations defined for the TLS access ABI.  */
-#define R_PPC64_TLS            67 /* none      (sym+add)@tls */
-#define R_PPC64_DTPMOD64       68 /* doubleword64 (sym+add)@dtpmod */
-#define R_PPC64_TPREL16                69 /* half16*   (sym+add)@tprel */
-#define R_PPC64_TPREL16_LO     70 /* half16    (sym+add)@tprel@l */
-#define R_PPC64_TPREL16_HI     71 /* half16    (sym+add)@tprel@h */
-#define R_PPC64_TPREL16_HA     72 /* half16    (sym+add)@tprel@ha */
-#define R_PPC64_TPREL64                73 /* doubleword64 (sym+add)@tprel */
-#define R_PPC64_DTPREL16       74 /* half16*   (sym+add)@dtprel */
-#define R_PPC64_DTPREL16_LO    75 /* half16    (sym+add)@dtprel@l */
-#define R_PPC64_DTPREL16_HI    76 /* half16    (sym+add)@dtprel@h */
-#define R_PPC64_DTPREL16_HA    77 /* half16    (sym+add)@dtprel@ha */
-#define R_PPC64_DTPREL64       78 /* doubleword64 (sym+add)@dtprel */
-#define R_PPC64_GOT_TLSGD16    79 /* half16*   (sym+add)@got@tlsgd */
-#define R_PPC64_GOT_TLSGD16_LO 80 /* half16    (sym+add)@got@tlsgd@l */
-#define R_PPC64_GOT_TLSGD16_HI 81 /* half16    (sym+add)@got@tlsgd@h */
-#define R_PPC64_GOT_TLSGD16_HA 82 /* half16    (sym+add)@got@tlsgd@ha */
-#define R_PPC64_GOT_TLSLD16    83 /* half16*   (sym+add)@got@tlsld */
-#define R_PPC64_GOT_TLSLD16_LO 84 /* half16    (sym+add)@got@tlsld@l */
-#define R_PPC64_GOT_TLSLD16_HI 85 /* half16    (sym+add)@got@tlsld@h */
-#define R_PPC64_GOT_TLSLD16_HA 86 /* half16    (sym+add)@got@tlsld@ha */
-#define R_PPC64_GOT_TPREL16_DS 87 /* half16ds* (sym+add)@got@tprel */
-#define R_PPC64_GOT_TPREL16_LO_DS 88 /* half16ds (sym+add)@got@tprel@l */
-#define R_PPC64_GOT_TPREL16_HI 89 /* half16    (sym+add)@got@tprel@h */
-#define R_PPC64_GOT_TPREL16_HA 90 /* half16    (sym+add)@got@tprel@ha */
-#define R_PPC64_GOT_DTPREL16_DS        91 /* half16ds* (sym+add)@got@dtprel */
-#define R_PPC64_GOT_DTPREL16_LO_DS 92 /* half16ds (sym+add)@got@dtprel@l */
-#define R_PPC64_GOT_DTPREL16_HI        93 /* half16    (sym+add)@got@dtprel@h */
-#define R_PPC64_GOT_DTPREL16_HA        94 /* half16    (sym+add)@got@dtprel@ha */
-#define R_PPC64_TPREL16_DS     95 /* half16ds* (sym+add)@tprel */
-#define R_PPC64_TPREL16_LO_DS  96 /* half16ds  (sym+add)@tprel@l */
-#define R_PPC64_TPREL16_HIGHER 97 /* half16    (sym+add)@tprel@higher */
-#define R_PPC64_TPREL16_HIGHERA        98 /* half16    (sym+add)@tprel@highera */
-#define R_PPC64_TPREL16_HIGHEST        99 /* half16    (sym+add)@tprel@highest */
-#define R_PPC64_TPREL16_HIGHESTA 100 /* half16 (sym+add)@tprel@highesta */
-#define R_PPC64_DTPREL16_DS    101 /* half16ds* (sym+add)@dtprel */
-#define R_PPC64_DTPREL16_LO_DS 102 /* half16ds (sym+add)@dtprel@l */
-#define R_PPC64_DTPREL16_HIGHER        103 /* half16   (sym+add)@dtprel@higher */
-#define R_PPC64_DTPREL16_HIGHERA 104 /* half16 (sym+add)@dtprel@highera */
-#define R_PPC64_DTPREL16_HIGHEST 105 /* half16 (sym+add)@dtprel@highest */
-#define R_PPC64_DTPREL16_HIGHESTA 106 /* half16        (sym+add)@dtprel@highesta */
-
 /* Keep this the last entry.  */
-#define R_PPC64_NUM            107
+#define R_PPC64_NUM            67
 
 #endif /* __PPC64_ELF_H */
index 79ca95e..9b138b1 100644 (file)
@@ -9,14 +9,6 @@
 #define H_PTEG_Full    -6      /* PTEG is full */
 #define H_Not_Found    -7      /* PTE was not found" */
 #define H_Reserved_DABR        -8      /* DABR address is reserved by the hypervisor on this processor" */
-#define H_NoMem                 -9
-#define H_Authority            -10
-#define H_Permission           -11
-#define H_Dropped              -12
-#define H_SourceParm           -13
-#define H_DestParm             -14
-#define H_RemoteParm           -15
-#define H_Resource             -16
 
 /* Flags */
 #define H_LARGE_PAGE           (1UL<<(63-16))
 #define H_IPOLL                        0x70
 #define H_XIRR                 0x74
 #define H_PERFMON              0x7c
-#define H_MIGRATE_DMA          0x78
-#define H_REGISTER_VPA         0xDC
-#define H_CEDE                 0xE0
-#define H_CONFER               0xE4
-#define H_PROD                 0xE8
-#define H_GET_PPP              0xEC
-#define H_SET_PPP              0xF0
-#define H_SET_PURR             0xF4
-#define H_PIC                  0xF8
-#define H_REG_CRQ              0xFC
-#define H_FREE_CRQ             0x100
-#define H_VIO_SIGNAL           0x104
-#define H_SEND_CRQ             0x108
-#define H_COPY_RDMA             0x110
-#define H_POLL_PENDING         0x1D8
 
 /* plpar_hcall() -- Generic call interface using above opcodes
  *
@@ -99,44 +76,7 @@ long plpar_hcall(unsigned long opcode,
                 unsigned long *out2,
                 unsigned long *out3);
 
-#define HVSC                   ".long 0x44000022\n"
-
 /* Same as plpar_hcall but for those opcodes that return no values
  * other than status.  Slightly more efficient.
  */
 long plpar_hcall_norets(unsigned long opcode, ...);
-
-/* 
- * Special hcall interface for ibmveth support.
- * Takes 8 input parms. Returns a rc and stores the
- * R4 return value in *out1.
- */
-long plpar_hcall_8arg_2ret(unsigned long opcode,
-                          unsigned long arg1,
-                          unsigned long arg2,
-                          unsigned long arg3,
-                          unsigned long arg4,
-                          unsigned long arg5,
-                          unsigned long arg6,
-                          unsigned long arg7,
-                          unsigned long arg8,
-                          unsigned long *out1);
-
-
-/* plpar_hcall_4out()
- *
- * same as plpar_hcall except with 4 output arguments.  
- * 
- */
-long plpar_hcall_4out(unsigned long opcode,
-                     unsigned long arg1,
-                     unsigned long arg2,
-                     unsigned long arg3,
-                     unsigned long arg4,
-                     unsigned long *out1,
-                     unsigned long *out2,
-                     unsigned long *out3,
-                     unsigned long *out4);
-
index baea40e..9b4ad1f 100644 (file)
@@ -21,15 +21,18 @@ extern void ppc_irq_dispatch_handler(struct pt_regs *regs, int irq);
 
 #ifdef CONFIG_PPC_ISERIES
 
-extern unsigned long local_get_flags(void);
-extern unsigned long local_irq_disable(void);
-extern void local_irq_restore(unsigned long);
-
-#define local_irq_enable()     local_irq_restore(1)
-#define local_save_flags(flags)        ((flags) = local_get_flags())
-#define local_irq_save(flags)  ((flags) = local_irq_disable())
-
-#define irqs_disabled()                (local_get_flags() == 0)
+extern void __no_use_sti(void);
+extern void __no_use_cli(void);
+extern void __no_use_restore_flags(unsigned long);
+extern unsigned long __no_use_save_flags(void);
+extern void __no_use_set_lost(unsigned long);
+extern void __no_lpq_restore_flags(unsigned long);
+
+#define local_irq_disable()                    __no_use_cli()
+#define local_irq_enable()                     __no_use_sti()
+#define local_save_flags(flags)        ((flags) = __no_use_save_flags())
+#define local_irq_restore(flags)       __no_use_restore_flags((unsigned long)flags)
+#define local_irq_save(flags)  ({local_save_flags(flags);local_irq_disable();})
 
 #else
 
@@ -66,33 +69,11 @@ static inline void __do_save_and_cli(unsigned long *flags)
 
 #define local_irq_save(flags)          __do_save_and_cli(&flags)
 
-#define irqs_disabled()                                \
-({                                             \
-       unsigned long flags;                    \
-       local_save_flags(flags);                \
-       !(flags & MSR_EE);                      \
-})
-
 #endif /* CONFIG_PPC_ISERIES */
 
-#define mask_irq(irq)                                          \
-       ({                                                      \
-               irq_desc_t *desc = get_irq_desc(irq);           \
-               if (desc->handler && desc->handler->disable)    \
-                       desc->handler->disable(irq);            \
-       })
-#define unmask_irq(irq)                                                \
-       ({                                                      \
-               irq_desc_t *desc = get_irq_desc(irq);           \
-               if (desc->handler && desc->handler->enable)     \
-                       desc->handler->enable(irq);             \
-       })
-#define ack_irq(irq)                                           \
-       ({                                                      \
-               irq_desc_t *desc = get_irq_desc(irq);           \
-               if (desc->handler && desc->handler->ack)        \
-                       desc->handler->ack(irq);                \
-       })
+#define mask_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->disable) irq_desc[irq].handler->disable(irq);})
+#define unmask_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->enable) irq_desc[irq].handler->enable(irq);})
+#define ack_irq(irq) ({if (irq_desc[irq].handler && irq_desc[irq].handler->ack) irq_desc[irq].handler->ack(irq);})
 
 /* Should we handle this via lost interrupts and IPIs or should we don't care like
  * we do now ? --BenH.
index d91eaa2..824bf53 100644 (file)
 //     drive the hypervisor from the OS.
 //
 //===========================================================================
-#ifndef _HVCALL_H
-#define _HVCALL_H
 
 //-------------------------------------------------------------------
 // Standard Includes
 //-------------------------------------------------------------------
-#include <asm/iSeries/HvCallSc.h>
+#ifndef  _HVCALLSC_H
+#include "HvCallSc.h"
+#endif
+
+#ifndef  _HVTYPES_H
 #include <asm/iSeries/HvTypes.h>
+#endif
+
 #include <asm/paca.h>
 
+//-------------------------------------------------------------------
+// Constants
+//-------------------------------------------------------------------
+#ifndef _HVCALL_H
+#define _HVCALL_H
 /*
 enum HvCall_ReturnCode
 {
@@ -202,4 +211,5 @@ static inline void HvCall_setDebugBus(unsigned long val)
        HvCall1(HvCallBaseSetDebugBus, val);
 }
 
-#endif /* _HVCALL_H */
+#endif // _HVCALL_H
+
index 9f40f16..f60dda6 100644 (file)
 //     drive the hypervisor from the OS.
 //
 //=====================================================================================
-#ifndef _HVCALLCFG_H
-#define _HVCALLCFG_H
 
 //-------------------------------------------------------------------
 // Standard Includes
 //-------------------------------------------------------------------
-#include <asm/iSeries/HvCallSc.h>
+#ifndef  _HVCALLSC_H
+#include "HvCallSc.h"
+#endif
+
+#ifndef  _HVTYPES_H
 #include <asm/iSeries/HvTypes.h>
+#endif
 
 //-------------------------------------------------------------------------------------
 // Constants
 //-------------------------------------------------------------------------------------
+#ifndef _HVCALLCFG_H
+#define _HVCALLCFG_H
 
 enum HvCallCfg_ReqQual
 {
@@ -210,4 +215,5 @@ static inline HvLpIndex     HvCallCfg_getHostingLpIndex(HvLpIndex lp)
 
 }
 
-#endif /* _HVCALLCFG_H */
+#endif // _HVCALLCFG_H
+
index 947800e..2dd887a 100644 (file)
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
 
-/*
- *     This file contains the "hypervisor call" interface which is used to
- *     drive the hypervisor from the OS.
- */
-#ifndef _HVCALLEVENT_H
-#define _HVCALLEVENT_H
-
-/*
- * Standard Includes
- */
+//==================================================================
+//
+//     This file contains the "hypervisor call" interface which is used to
+//     drive the hypervisor from the OS.
+//
+//==================================================================
+
+//-------------------------------------------------------------------
+// Standard Includes
+//-------------------------------------------------------------------
+#ifndef  _HVCALLSC_H
 #include <asm/iSeries/HvCallSc.h>
+#endif
+
+#ifndef  _HVTYPES_H
 #include <asm/iSeries/HvTypes.h>
+#endif
+
 #include <asm/abs_addr.h>
 
+//-------------------------------------------------------------------
+// Other Includes
+//-------------------------------------------------------------------
+
+//-------------------------------------------------------------------
+// Constants
+//-------------------------------------------------------------------
+#ifndef _HVCALLEVENT_H
+#define _HVCALLEVENT_H
+
 struct HvLpEvent;
 
 typedef u8 HvLpEvent_Type;
 typedef u8 HvLpEvent_AckInd;
 typedef u8 HvLpEvent_AckType;
 
-struct HvCallEvent_PackedParms {
+struct HvCallEvent_PackedParms
+{
        u8              xAckType:1;
        u8              xAckInd:1;
        u8              xRsvd:1;
@@ -51,7 +68,8 @@ struct        HvCallEvent_PackedParms {
 typedef u8 HvLpDma_Direction;
 typedef u8 HvLpDma_AddressType;
 
-struct HvCallEvent_PackedDmaParms {
+struct HvCallEvent_PackedDmaParms
+{
        u8              xDirection:1;
        u8              xLocalAddrType:1;
        u8              xRemoteAddrType:1;
@@ -83,63 +101,69 @@ typedef u64 HvLpDma_Rc;
 #define HvCallEventSetLpEventQueueInterruptProc                HvCallEvent + 14
 #define HvCallEventRouter15                            HvCallEvent + 15
 
-static inline void HvCallEvent_getOverflowLpEvents(u8 queueIndex)
+//======================================================================
+static inline void             HvCallEvent_getOverflowLpEvents(u8 queueIndex)
 {
        HvCall1(HvCallEventGetOverflowLpEvents,queueIndex);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
 }
-
-static inline void HvCallEvent_setInterLpQueueIndex(u8 queueIndex)
+//======================================================================
+static inline void             HvCallEvent_setInterLpQueueIndex(u8 queueIndex)
 {
        HvCall1(HvCallEventSetInterLpQueueIndex,queueIndex);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
 }
-
-static inline void HvCallEvent_setLpEventStack(u8 queueIndex,
-               char *eventStackAddr, u32 eventStackSize)
+//======================================================================
+static inline void             HvCallEvent_setLpEventStack(u8 queueIndex,
+                                            char * eventStackAddr,
+                                            u32 eventStackSize)
 {
        u64 abs_addr;
+       abs_addr = virt_to_absolute( (unsigned long) eventStackAddr );
 
-       abs_addr = virt_to_absolute((unsigned long)eventStackAddr);
-       HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr,
-                       eventStackSize);
+       HvCall3(HvCallEventSetLpEventStack, queueIndex, abs_addr, eventStackSize);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
 }
-
-static inline void HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
-               u16 lpLogicalProcIndex)
+//======================================================================
+static inline void             HvCallEvent_setLpEventQueueInterruptProc(u8 queueIndex,
+                                                         u16 lpLogicalProcIndex)
 {
-       HvCall2(HvCallEventSetLpEventQueueInterruptProc, queueIndex,
-                       lpLogicalProcIndex);
+       HvCall2(HvCallEventSetLpEventQueueInterruptProc,queueIndex,lpLogicalProcIndex);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
 }
-
-static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent *event)
+//=====================================================================
+static inline HvLpEvent_Rc HvCallEvent_signalLpEvent(struct HvLpEvent* event)
 {
        u64 abs_addr;
        HvLpEvent_Rc retVal;
-
 #ifdef DEBUG_SENDEVENT
-       printk("HvCallEvent_signalLpEvent: *event = %016lx\n ",
-                       (unsigned long)event);
+       printk("HvCallEvent_signalLpEvent: *event = %016lx\n ", (unsigned long)event);
 #endif
-       abs_addr = virt_to_absolute((unsigned long)event);
+       abs_addr = virt_to_absolute( (unsigned long) event );
        retVal = (HvLpEvent_Rc)HvCall1(HvCallEventSignalLpEvent, abs_addr);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
        return retVal;
 }
-
-static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
-               HvLpEvent_Type type, u16 subtype, HvLpEvent_AckInd ackInd,
-               HvLpEvent_AckType ackType, HvLpInstanceId sourceInstanceId,
-               HvLpInstanceId targetInstanceId, u64 correlationToken,
-               u64 eventData1, u64 eventData2, u64 eventData3,
-               u64 eventData4, u64 eventData5)
+//=====================================================================
+static inline HvLpEvent_Rc  HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
+                                          HvLpEvent_Type type,
+                                          u16 subtype,
+                                          HvLpEvent_AckInd ackInd,
+                                          HvLpEvent_AckType ackType,
+                                          HvLpInstanceId sourceInstanceId,
+                                          HvLpInstanceId targetInstanceId,
+                                          u64 correlationToken,
+                                          u64 eventData1,
+                                          u64 eventData2,
+                                          u64 eventData3,
+                                          u64 eventData4,
+                                          u64 eventData5)
 {
        HvLpEvent_Rc retVal;
 
        // Pack the misc bits into a single Dword to pass to PLIC
-       union {
+       union
+       {
                struct HvCallEvent_PackedParms  parms;
                u64             dword;
        } packed;
@@ -153,84 +177,88 @@ static inline HvLpEvent_Rc HvCallEvent_signalLpEventFast(HvLpIndex targetLp,
        packed.parms.xTargetInstId      = targetInstanceId;
 
        retVal = (HvLpEvent_Rc)HvCall7(HvCallEventSignalLpEventParms,
-                       packed.dword, correlationToken, eventData1,eventData2,
-                       eventData3,eventData4, eventData5);
+                                      packed.dword,
+                                      correlationToken,
+                                      eventData1,eventData2,
+                                      eventData3,eventData4,
+                                      eventData5);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
        return retVal;
 }
-
-static inline HvLpEvent_Rc HvCallEvent_ackLpEvent(struct HvLpEvent *event)
+//====================================================================
+static inline HvLpEvent_Rc     HvCallEvent_ackLpEvent(struct HvLpEvent* event)
 {
        u64 abs_addr;
        HvLpEvent_Rc retVal;
+       abs_addr = virt_to_absolute( (unsigned long) event );
 
-       abs_addr = virt_to_absolute((unsigned long)event);
        retVal = (HvLpEvent_Rc)HvCall1(HvCallEventAckLpEvent, abs_addr);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
        return retVal;
 }
-
-static inline HvLpEvent_Rc HvCallEvent_cancelLpEvent(struct HvLpEvent *event)
+//====================================================================
+static inline HvLpEvent_Rc   HvCallEvent_cancelLpEvent(struct HvLpEvent* event)
 {
        u64 abs_addr;
        HvLpEvent_Rc retVal;
+       abs_addr = virt_to_absolute( (unsigned long) event );
 
-       abs_addr = virt_to_absolute((unsigned long)event);
        retVal = (HvLpEvent_Rc)HvCall1(HvCallEventCancelLpEvent, abs_addr);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
        return retVal;
 }
-
-static inline HvLpInstanceId HvCallEvent_getSourceLpInstanceId(
-               HvLpIndex targetLp, HvLpEvent_Type type)
+//===================================================================
+static inline HvLpInstanceId   HvCallEvent_getSourceLpInstanceId(HvLpIndex targetLp, HvLpEvent_Type type)
 {
        HvLpInstanceId retVal;  
-
-       retVal = HvCall2(HvCallEventGetSourceLpInstanceId, targetLp, type);
+       retVal = HvCall2(HvCallEventGetSourceLpInstanceId,targetLp,type);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
        return retVal;
 }
-
-static inline HvLpInstanceId HvCallEvent_getTargetLpInstanceId(
-               HvLpIndex targetLp, HvLpEvent_Type type)
+//===================================================================
+static inline HvLpInstanceId   HvCallEvent_getTargetLpInstanceId(HvLpIndex targetLp, HvLpEvent_Type type)
 {
        HvLpInstanceId retVal;  
-
-       retVal = HvCall2(HvCallEventGetTargetLpInstanceId, targetLp, type);
+       retVal = HvCall2(HvCallEventGetTargetLpInstanceId,targetLp,type);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
        return retVal;
 }
-
-static inline void HvCallEvent_openLpEventPath(HvLpIndex targetLp,
-               HvLpEvent_Type type)
+//===================================================================
+static inline void             HvCallEvent_openLpEventPath(HvLpIndex targetLp,
+                                            HvLpEvent_Type type)
 {
-       HvCall2(HvCallEventOpenLpEventPath, targetLp, type);
+       HvCall2(HvCallEventOpenLpEventPath,targetLp,type);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
 }
-
-static inline void HvCallEvent_closeLpEventPath(HvLpIndex targetLp,
-               HvLpEvent_Type type)
+//===================================================================
+static inline void             HvCallEvent_closeLpEventPath(HvLpIndex targetLp,
+                                             HvLpEvent_Type type)
 {
-       HvCall2(HvCallEventCloseLpEventPath, targetLp, type);
+       HvCall2(HvCallEventCloseLpEventPath,targetLp,type);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
 }
-
-static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
-               HvLpIndex remoteLp, HvLpDma_Direction direction,
-               HvLpInstanceId localInstanceId,
-               HvLpInstanceId remoteInstanceId,
-               HvLpDma_AddressType localAddressType,
-               HvLpDma_AddressType remoteAddressType,
-               /* Do these need to be converted to absolute addresses? */
-               u64 localBufList, u64 remoteBufList, u32 transferLength)
+//===================================================================
+static inline HvLpDma_Rc       HvCallEvent_dmaBufList(HvLpEvent_Type type,
+                                       HvLpIndex remoteLp,
+                                       HvLpDma_Direction direction,
+                                       HvLpInstanceId localInstanceId,
+                                       HvLpInstanceId remoteInstanceId,
+                                       HvLpDma_AddressType localAddressType,
+                                       HvLpDma_AddressType remoteAddressType,
+                                       // Do these need to be converted to
+                                       // absolute addresses?
+                                       u64 localBufList,
+                                       u64 remoteBufList,
+
+                                       u32 transferLength)
 {
-       HvLpDma_Rc retVal;
+       HvLpDma_Rc retVal;      
        // Pack the misc bits into a single Dword to pass to PLIC
-       union {
+       union
+       {
                struct HvCallEvent_PackedDmaParms       parms;
                u64             dword;
        } packed;
-
        packed.parms.xDirection         = direction;
        packed.parms.xLocalAddrType     = localAddressType;
        packed.parms.xRemoteAddrType    = remoteAddressType;
@@ -242,27 +270,32 @@ static inline HvLpDma_Rc HvCallEvent_dmaBufList(HvLpEvent_Type type,
        packed.parms.xRemoteInstId      = remoteInstanceId;
 
        retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaBufList,
-                       packed.dword, localBufList, remoteBufList,
-                       transferLength);
+                                    packed.dword,
+                                    localBufList,
+                                    remoteBufList,
+                                    transferLength);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
        return retVal;
 }
-
-static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
-               HvLpIndex remoteLp, HvLpDma_Direction direction,
-               HvLpInstanceId localInstanceId,
-               HvLpInstanceId remoteInstanceId,
-               HvLpDma_AddressType localAddressType,
-               HvLpDma_AddressType remoteAddressType,
-               u64 localAddrOrTce, u64 remoteAddrOrTce, u32 transferLength)
+//=================================================================
+static inline HvLpDma_Rc       HvCallEvent_dmaSingle(HvLpEvent_Type type,
+                                      HvLpIndex remoteLp,
+                                      HvLpDma_Direction direction,
+                                      HvLpInstanceId localInstanceId,
+                                      HvLpInstanceId remoteInstanceId,
+                                      HvLpDma_AddressType localAddressType,
+                                      HvLpDma_AddressType remoteAddressType,
+                                      u64 localAddrOrTce,
+                                      u64 remoteAddrOrTce,
+                                      u32 transferLength)
 {
-       HvLpDma_Rc retVal;
+       HvLpDma_Rc retVal;      
        // Pack the misc bits into a single Dword to pass to PLIC
-       union {
+       union
+       {
                struct HvCallEvent_PackedDmaParms       parms;
                u64             dword;
        } packed;
-
        packed.parms.xDirection         = direction;
        packed.parms.xLocalAddrType     = localAddressType;
        packed.parms.xRemoteAddrType    = remoteAddressType;
@@ -274,24 +307,29 @@ static inline HvLpDma_Rc HvCallEvent_dmaSingle(HvLpEvent_Type type,
        packed.parms.xRemoteInstId      = remoteInstanceId;
 
        retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaSingle,
-                       packed.dword, localAddrOrTce, remoteAddrOrTce,
-                       transferLength);
+                                    packed.dword,
+                                    localAddrOrTce,
+                                    remoteAddrOrTce,
+                                    transferLength);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
        return retVal;
 }
-
-static inline HvLpDma_Rc HvCallEvent_dmaToSp(void* local, u32 remote,
-               u32 length, HvLpDma_Direction dir)
+//=================================================================
+static inline HvLpDma_Rc       HvCallEvent_dmaToSp(void* local, u32 remote, u32 length, HvLpDma_Direction dir)
 {
        u64 abs_addr;
        HvLpDma_Rc retVal;
-
-       abs_addr = virt_to_absolute((unsigned long)local);
-       retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaToSp, abs_addr, remote,
-                       length, dir);
+       abs_addr = virt_to_absolute( (unsigned long) local );
+    
+       retVal = (HvLpDma_Rc)HvCall4(HvCallEventDmaToSp, 
+                                    abs_addr,
+                                    remote,
+                                    length,
+                                    dir);
        // getPaca()->adjustHmtForNoOfSpinLocksHeld();
        return retVal;
 }
+//================================================================
 
+#endif // _HVCALLEVENT_H
 
-#endif /* _HVCALLEVENT_H */
index da76987..ac93fa2 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _HVCALLHPT_H
-#define _HVCALLHPT_H
 
 //============================================================================
 //
 //
 //============================================================================
 
-#include <asm/iSeries/HvCallSc.h>
+//-------------------------------------------------------------------
+// Standard Includes
+//-------------------------------------------------------------------
+#ifndef  _HVCALLSC_H
+#include "HvCallSc.h"
+#endif
+
+#ifndef  _HVTYPES_H
 #include <asm/iSeries/HvTypes.h>
+#endif
+
+//-------------------------------------------------------------------
+// Other Includes
+//-------------------------------------------------------------------
+
+#ifndef _PPC_MMU_H
 #include <asm/mmu.h>
+#endif
 
 //-----------------------------------------------------------------------------
 // Constants
 //-----------------------------------------------------------------------------
+#ifndef _HVCALLHPT_H
+#define _HVCALLHPT_H
 
 #define HvCallHptGetHptAddress         HvCallHpt +  0
 #define HvCallHptGetHptPages           HvCallHpt +  1
@@ -124,4 +139,5 @@ static inline void          HvCallHpt_addValidate( u32 hpteIndex,
 
 //=============================================================================
 
-#endif /* _HVCALLHPT_H */
+#endif // _HVCALLHPT_H
+
index 6887b61..c1d8a9c 100644 (file)
@@ -1,6 +1,6 @@
 /************************************************************************/
 /* Provides the Hypervisor PCI calls for iSeries Linux Parition.        */
-/* Copyright (C) 2001  <Wayne G Holm> <IBM Corporation>                 */
+/* Copyright (C) 20yy  <Wayne G Holm> <IBM Corporation>                 */
 /*                                                                      */
 /* This program is free software; you can redistribute it and/or modify */
 /* it under the terms of the GNU General Public License as published by */
 /* Change Activity:                                                     */
 /*   Created, Jan 9, 2001                                               */
 /************************************************************************/
+//============================================================================
+//                                                      Header File Id
+// Name______________: HvCallPci.H
+//
+// Description_______:
+//
+//     This file contains the "hypervisor call" interface which is used to
+//     drive the hypervisor from SLIC.
+//
+//============================================================================
 
-#ifndef _HVCALLPCI_H
-#define _HVCALLPCI_H
+//-------------------------------------------------------------------
+// Forward declarations 
+//-------------------------------------------------------------------
 
-#include <asm/iSeries/HvCallSc.h>
+//-------------------------------------------------------------------
+// Standard Includes
+//-------------------------------------------------------------------
+#ifndef  _HVCALLSC_H
+#include "HvCallSc.h"
+#endif
+
+#ifndef  _HVTYPES_H
 #include <asm/iSeries/HvTypes.h>
+#endif
+
+//-------------------------------------------------------------------
+// Other Includes
+//-------------------------------------------------------------------
+
 
-/*
- * DSA == Direct Select Address
- * this struct must be 64 bits in total
- */
-struct HvCallPci_DsaAddr {
-       u16             busNumber;              /* PHB index? */
-       u8              subBusNumber;           /* PCI bus number? */
-       u8              deviceId;               /* device and function? */
+//-----------------------------------------------------------------------------
+// Constants
+//-----------------------------------------------------------------------------
+#ifndef _HVCALLPCI_H
+#define _HVCALLPCI_H
+
+struct HvCallPci_DsaAddr { // make sure this struct size is 64-bits total
+       u16             busNumber;
+       u8              subBusNumber; 
+       u8              deviceId;     
        u8              barNumber;
        u8              reserved[3];
 };
-
 union HvDsaMap {
        u64     DsaAddr;
        struct HvCallPci_DsaAddr Dsa;
@@ -50,13 +75,12 @@ struct HvCallPci_LoadReturn {
        u64             value;
 };
 
-enum HvCallPci_DeviceType {
-       HvCallPci_NodeDevice    = 1,
-       HvCallPci_SpDevice      = 2,    
-       HvCallPci_IopDevice     = 3,    
-       HvCallPci_BridgeDevice  = 4,    
-       HvCallPci_MultiFunctionDevice = 5,      
-       HvCallPci_IoaDevice     = 6     
+enum HvCallPci_DeviceType {HvCallPci_NodeDevice        = 1,
+                        HvCallPci_SpDevice     = 2,    
+                        HvCallPci_IopDevice     = 3,   
+                        HvCallPci_BridgeDevice = 4,    
+                        HvCallPci_MultiFunctionDevice = 5,     
+                        HvCallPci_IoaDevice    = 6     
 };
 
 
@@ -124,9 +148,9 @@ enum HvCallPci_VpdType {
 #define HvCallPciGetBusUnitInfo                HvCallPci + 50
 
 //============================================================================
-static inline u64 HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber,
-                                       u8 deviceId, u32 offset,
-                                       u8 *value)
+static inline u64      HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber,
+                                             u8 deviceId, u32 offset,
+                                             u8 *value)
 {
        struct HvCallPci_DsaAddr dsa;
        struct HvCallPci_LoadReturn retVal;
@@ -146,9 +170,9 @@ static inline u64 HvCallPci_configLoad8(u16 busNumber, u8 subBusNumber,
        return retVal.rc;
 }
 //============================================================================
-static inline u64 HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber,
-                                        u8 deviceId, u32 offset,
-                                        u16 *value)
+static inline u64      HvCallPci_configLoad16(u16 busNumber, u8 subBusNumber,
+                                             u8 deviceId, u32 offset,
+                                             u16 *value)
 {
        struct HvCallPci_DsaAddr dsa;
        struct HvCallPci_LoadReturn retVal;
@@ -670,4 +694,4 @@ static inline int HvCallPci_getBusAdapterVpd(u16 busNumParm, u64 destParm, u16 s
        return xRetSize;
 }
 //============================================================================
-#endif /* _HVCALLPCI_H */
+#endif // _HVCALLPCI_H
index 3b77eb0..9a2692e 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _HVCALLSC_H
-#define _HVCALLSC_H
 
+#ifndef  _HVTYPES_H
 #include <asm/iSeries/HvTypes.h>
+#endif
+
+#ifndef _HVCALLSC_H
+#define _HVCALLSC_H
 
 #define HvCallBase             0x8000000000000000
 #define HvCallCc               0x8001000000000000
index 9050c94..7b5baa2 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _HVCALLSM_H
-#define _HVCALLSM_H
 
 //============================================================================
 //
 //-------------------------------------------------------------------
 // Standard Includes
 //-------------------------------------------------------------------
-#include <asm/iSeries/HvCallSc.h>
+#ifndef  _HVCALLSC_H
+#include "HvCallSc.h"
+#endif
+
+#ifndef  _HVTYPES_H
 #include <asm/iSeries/HvTypes.h>
+#endif
 
 //-----------------------------------------------------------------------------
 // Constants
 //-----------------------------------------------------------------------------
+#ifndef _HVCALLSM_H
+#define _HVCALLSM_H
 
 #define HvCallSmGet64BitsOfAccessMap   HvCallSm  + 11
 
@@ -49,4 +54,5 @@ static inline u64             HvCallSm_get64BitsOfAccessMap(
        return retval;
 }
 //============================================================================
-#endif /* _HVCALLSM_H */
+#endif // _HVCALLSM_H
+
index bfb898f..175546f 100644 (file)
@@ -8,8 +8,6 @@
 //     drive the hypervisor from SLIC.
 //
 //============================================================================
-#ifndef _HVCALLXM_H
-#define _HVCALLXM_H
 
 //-------------------------------------------------------------------
 // Forward declarations 
 //-------------------------------------------------------------------
 // Standard Includes
 //-------------------------------------------------------------------
-#include <asm/iSeries/HvCallSc.h>
+#ifndef  _HVCALLSC_H
+#include "HvCallSc.h"
+#endif
+
+#ifndef  _HVTYPES_H
 #include <asm/iSeries/HvTypes.h>
+#endif
+
+//-------------------------------------------------------------------
+// Other Includes
+//-------------------------------------------------------------------
+
 
 //-----------------------------------------------------------------------------
 // Constants
 //-----------------------------------------------------------------------------
+#ifndef _HVCALLXM_H
+#define _HVCALLXM_H
 
 #define HvCallXmGetTceTableParms       HvCallXm +  0
 #define HvCallXmTestBus                        HvCallXm +  1
@@ -92,4 +102,5 @@ static inline u64    HvCallXm_loadTod(void)
 }
 //=====================================================================================
 
-#endif /* _HVCALLXM_H */
+#endif // _HVCALLXM_H
+
index bdbd70f..f508aee 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _HVLPCONFIG_H
-#define _HVLPCONFIG_H
 
 //===========================================================================
 //
 //
 //===========================================================================
 
-#include <asm/iSeries/HvCallCfg.h>
+#ifndef  _HVCALLCFG_H
+#include "HvCallCfg.h"
+#endif
+
+#ifndef  _HVTYPES_H
 #include <asm/iSeries/HvTypes.h>
+#endif
+
+#ifndef  _ITLPNACA_H
 #include <asm/iSeries/ItLpNaca.h>
+#endif
+
+#ifndef  _LPARDATA_H
 #include <asm/iSeries/LparData.h>
+#endif
+
+#ifndef _HVLPCONFIG_H
+#define _HVLPCONFIG_H
 
 //-------------------------------------------------------------------
 // Constants
@@ -277,4 +289,4 @@ static inline HvLpIndex             HvLpConfig_getHostingLpIndex(HvLpIndex lp)
 }
 //================================================================
 
-#endif /* _HVLPCONFIG_H */
+#endif // _HVLPCONFIG_H
index 669106f..9f54eb7 100644 (file)
 #include <asm/types.h>
 #include <asm/ptrace.h>
 #include <asm/iSeries/HvTypes.h>
+#ifndef _HVCALLEVENT_H
 #include <asm/iSeries/HvCallEvent.h>
+#endif
+
 
 //=====================================================================
 //
index 146ab4c..f986b18 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _HVRELEASEDATA_H
-#define _HVRELEASEDATA_H
 
 //=============================================================================
 //
 //   release so that it can be changed in the future (ie, the virtual 
 //   address of the OS's NACA).
 //
-#include <asm/types.h>
+//-----------------------------------------------------------------------------
+// Standard Includes
+//-----------------------------------------------------------------------------
+#ifndef        _PPC64_TYPES_H
+#include       <asm/types.h>
+#endif
+
+#ifndef _HVRELEASEDATA_H
+#define _HVRELEASEDATA_H
 
 //=============================================================================
 //
@@ -61,4 +67,4 @@ struct        HvReleaseData
        char    xRsvd3[20];             // Reserved                     x2C-x3F
 };
 
-#endif /* _HVRELEASEDATA_H */
+#endif // _HVRELEASEDATA_H
index bdaaa2c..1d953c2 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _HVTYPES_H
-#define _HVTYPES_H
 
 //===========================================================================
 //                                                             Header File Id
 //
 //===========================================================================
 
-#include <asm/types.h>
+#ifndef _PPC_TYPES_H
+#include        <asm/types.h>
+#endif
+
+
+#ifndef _HVTYPES_H
+#define _HVTYPES_H
 
 //-------------------------------------------------------------------
 // Typedefs
@@ -120,4 +124,4 @@ struct HvLpBufferList {
        u64 len;
 };
 
-#endif /* _HVTYPES_H */
+#endif // _HVTYPES_H
index 9654338..3436d75 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _IOHRIPROCESSORVPD_H
-#define _IOHRIPROCESSORVPD_H
 
 //===================================================================
 //
 //     This struct maps Processor Vpd that is DMAd to SLIC by CSP 
 //
 
+#ifndef        _TYPES_H
 #include <asm/types.h>
+#endif
+
+#ifndef _IOHRIPROCESSORVPD_H
+#define _IOHRIPROCESSORVPD_H
 
 struct IoHriProcessorVpd
 {
@@ -84,5 +87,4 @@ struct IoHriProcessorVpd
 
        char xProcSrc[72];              // CSP format SRC               xB8-xFF
 };
-
-#endif /* _IOHRIPROCESSORVPD_H */
+#endif // _IOHRIPROCESSORVPD_H
index dee6b12..7458119 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _ITEXTVPDPANEL_H
-#define _ITEXTVPDPANEL_H
 
 /*
  *
  * Standard Includes
  *------------------------------------------------------------------- 
 */
-#include <asm/types.h>
+#ifndef        _PPC_TYPES_H
+#include       <asm/types.h>
+#endif
 
+#ifndef _ITEXTVPDPANEL_H
+#define _ITEXTVPDPANEL_H
 struct ItExtVpdPanel
 {
   // Definition of the Extended Vpd On Panel Data Area
index 4d8b430..12aabb3 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _ITIPLPARMSREAL_H
-#define _ITIPLPARMSREAL_H
 
 //==============================================================================
 //
 //-------------------------------------------------------------------
 // Standard Includes
 //-------------------------------------------------------------------
-#include <asm/types.h>
+#ifndef        _PPC_TYPES_H
+#include       <asm/types.h>
+#endif
+
+#ifndef _ITIPLPARMSREAL_H
+#define _ITIPLPARMSREAL_H
 
 struct ItIplParmsReal
 {
@@ -72,5 +75,4 @@ struct ItIplParmsReal
        u64     xRsvd12;                // Reserved                             x30-x37
        u64     xRsvd13;                // Reserved                             x38-x3F
 };
-
-#endif /* _ITIPLPARMSREAL_H */
+#endif // _ITIPLPARMSREAL_H
index 5baffdd..f99f568 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _ITLPNACA_H
-#define _ITLPNACA_H
 
 //=============================================================================
 //
 //
 //=============================================================================
 
+
+#ifndef _ITLPNACA_H
+#define _ITLPNACA_H
+
 struct ItLpNaca
 {
 //=============================================================================
@@ -85,4 +87,4 @@ struct ItLpNaca
 
 //=============================================================================
 
-#endif /* _ITLPNACA_H */
+#endif // _ITLPNACA_H
index bb0acf2..bed4210 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _ITLPPACA_H
-#define _ITLPPACA_H
 
 //=============================================================================
 //                                   
 //    
 //
 //----------------------------------------------------------------------------
+#ifndef  _PPC_TYPES_H
 #include <asm/types.h>
+#endif
+
+#ifndef _ITLPPACA_H
+#define _ITLPPACA_H
+
 
 struct ItLpPaca
 {
@@ -106,10 +110,7 @@ struct ItLpPaca
        u64     xPDCSavedSPRG1;         // Saved SPRG1 for PMC int      x68-x6F
        u64     xPDCSavedSRR0;          // Saved SRR0 for PMC int       x70-x77
        volatile u32 xVirtualDecr;      // Virtual DECR for shared procsx78-x7B
-       u16     xSLBCount;              // # of SLBs to maintain        x7C-x7D
-       u8      xIdle;                  // Indicate OS is idle          x7E
-       u8      xRsvd2_2;               // Reserved                     x7F
-
+       u32         xRsvd2_2;           // Reserved                     x7C-x7F
 
 //=============================================================================
 // CACHE_LINE_3 0x0100 - 0x007F: This line is shared with other processors
@@ -130,5 +131,4 @@ struct ItLpPaca
 
 
 };
-
-#endif /* _ITLPPACA_H */
+#endif // _ITLPPACA_H
index 4f4dde2..b592ab5 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _ITLPQUEUE_H
-#define _ITLPQUEUE_H
 
 //=============================================================================
 //
 //     events to an LP.  
 //    
 
+#ifndef _PPC_TYPES_H
 #include <asm/types.h>
+#endif
 #include <asm/ptrace.h>
 
+
 struct HvLpEvent;
 
+
+#ifndef _ITLPQUEUE_H
+#define _ITLPQUEUE_H
+
 #define ITMaxLpQueues 8
 
 #define NotUsed                0       // Queue will not be used by PLIC
@@ -89,4 +94,6 @@ static __inline__ void process_iSeries_events( void )
        : : : "r0", "r3" );     
 }
 
-#endif /* _ITLPQUEUE_H */
+
+//=============================================================================
+#endif // _ITLPQUEUE_H
index dafc4c8..9143f4f 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _ITLPREGSAVE_H
-#define _ITLPREGSAVE_H
 
 //=====================================================================================
 //
@@ -26,6 +24,9 @@
 //    
 //
 
+#ifndef _ITLPREGSAVE_H
+#define _ITLPREGSAVE_H
+
 struct ItLpRegSave
 {
        u32     xDesc;          // Eye catcher  "LpRS" ebcdic   000-003
@@ -83,5 +84,4 @@ struct ItLpRegSave
 
        u8      xRsvd3[176];    // Reserved                     350-3FF
 };
-
-#endif /* _ITLPREGSAVE_H */
+#endif // _ITLPREGSAVE_H
index d120439..ee71993 100644 (file)
@@ -16,8 +16,6 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
-#ifndef _ITVPDAREAS_H
-#define _ITVPDAREAS_H
 
 //=====================================================================================
 //
 //     the OS from PLIC (most of which start from the SP).
 //
 
-#include <asm/types.h>
+#ifndef _PPC_TYPES_H
+#include        <asm/types.h>
+#endif
+
+
+#ifndef _ITVPDAREAS_H
+#define _ITVPDAREAS_H
 
 // VPD Entry index is carved in stone - cannot be changed (easily).
 #define ItVpdCecVpd                               0
@@ -93,4 +97,4 @@ struct        ItVpdAreas
        void * xSlicVpdAdrs[ItVpdMaxEntries];// Array of VPD buffers    130-1EF
 };
 
-#endif /* _ITVPDAREAS_H */
+#endif // _ITVPDAREAS_H
index 075205b..f09b4b7 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
+
+#ifndef        _PPC_TYPES_H
+#include       <asm/types.h>
+#endif
+
 #ifndef _LPARMAP_H
 #define _LPARMAP_H
 
-#include <asm/types.h>
-
 /* The iSeries hypervisor will set up mapping for one or more 
  * ESID/VSID pairs (in SLB/segment registers) and will set up
  * mappings of one or more ranges of pages to VAs.
index 7c0b572..30a0eed 100644 (file)
@@ -21,7 +21,9 @@
 #define _ISERIES_DMA_H
 
 #include <asm/types.h>
+#ifndef __LINUX_SPINLOCK_H
 #include <linux/spinlock.h>
+#endif
 
 // NUM_TCE_LEVELS defines the largest contiguous block
 // of dma (tce) space we can get.  NUM_TCE_LEVELS = 10 
@@ -92,4 +94,4 @@ extern void              create_virtual_bus_tce_table( void );
 
 extern void             create_pci_bus_tce_table( unsigned busNumber );
 
-#endif /* _ISERIES_DMA_H */
+#endif // _ISERIES_DMA_H
index 96b07b1..85e0c2e 100644 (file)
@@ -1,9 +1,8 @@
-#ifndef _ISERIES_IO_H
-#define _ISERIES_IO_H
-
 #include <linux/config.h>
 
 #ifdef CONFIG_PPC_ISERIES
+#ifndef _ISERIES_IO_H
+#define _ISERIES_IO_H
 #include <linux/types.h>
 /************************************************************************/
 /* File iSeries_io.h created by Allan Trautman on Thu Dec 28 2000.      */
@@ -42,5 +41,6 @@ extern void* iSeries_memset_io(void *dest, char x, size_t n);
 extern void* iSeries_memcpy_toio(void *dest, void *source, size_t n);
 extern void* iSeries_memcpy_fromio(void *dest, void *source, size_t n);
 
-#endif /* CONFIG_PPC_ISERIES */
-#endif /* _ISERIES_IO_H */
+#endif /*  _ISERIES_IO_H         */
+#endif /*  CONFIG_PPC_ISERIES  */
+
index ff8dded..dde5f33 100644 (file)
@@ -1,11 +1,19 @@
+
 #ifndef        __ISERIES_IRQ_H__
 #define        __ISERIES_IRQ_H__
 
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+unsigned int iSeries_startup_IRQ(unsigned int);
+void iSeries_shutdown_IRQ(unsigned int);
+void iSeries_enable_IRQ(unsigned int);
+void iSeries_disable_IRQ(unsigned int);
+void iSeries_end_IRQ(unsigned int);
 void iSeries_init_IRQ(void);
+void iSeries_init_irqMap(int);
 int  iSeries_allocate_IRQ(HvBusNumber, HvSubBusNumber, HvAgentId);
 int  iSeries_assign_IRQ(int, HvBusNumber, HvSubBusNumber, HvAgentId);
 void iSeries_activate_IRQs(void);
index 652a0c6..a526d76 100644 (file)
@@ -1,11 +1,10 @@
 #ifndef _ISERIES_64_PCI_H
 #define _ISERIES_64_PCI_H
-
 /************************************************************************/
 /* File iSeries_pci.h created by Allan Trautman on Tue Feb 20, 2001.    */
 /************************************************************************/
 /* Define some useful macros for the iSeries pci routines.              */
-/* Copyright (C) 2001  Allan H Trautman, IBM Corporation                */
+/* Copyright (C) 20yy  Allan H Trautman, IBM Corporation                */
 /*                                                                      */
 /* This program is free software; you can redistribute it and/or modify */
 /* it under the terms of the GNU General Public License as published by */
 /*   Ported to ppc64, May 25, 2001                                      */
 /* End Change Activity                                                  */
 /************************************************************************/
-
 #include <asm/iSeries/HvCallPci.h>
 
 struct pci_dev;                                /* For Forward Reference        */
 struct iSeries_Device_Node;
-
 /************************************************************************/
-/* Gets iSeries Bus, SubBus, DevFn using iSeries_Device_Node structure */
+/* Gets iSeries Bus, SubBus, of DevFn using pci_dev* structure          */
 /************************************************************************/
-
-#define ISERIES_BUS(DevPtr)    DevPtr->DsaAddr.Dsa.busNumber
-#define ISERIES_SUBBUS(DevPtr) DevPtr->DsaAddr.Dsa.subBusNumber
-#define ISERIES_DEVICE(DevPtr) DevPtr->DsaAddr.Dsa.deviceId
-#define ISERIES_DSA(DevPtr)    DevPtr->DsaAddr.DsaAddr
-#define ISERIES_DEVFUN(DevPtr) DevPtr->DevFn
+#define ISERIES_BUS(DevPtr)    DevPtr->DsaAddr.busNumber
+#define ISERIES_SUBBUS(DevPtr) DevPtr->DsaAddr.subBusNumber
+#define ISERIES_DEVICE(DevPtr) DevPtr->DsaAddr.deviceId
+#define ISERIES_DEVFUN(DevPtr) DevPtr->DevFn
+#define ISERIES_DSA(DevPtr)   (*(u64*)&DevPtr->DsaAddr)
 #define ISERIES_DEVNODE(PciDev) ((struct iSeries_Device_Node*)PciDev->sysdata)
 
 #define EADsMaxAgents 7
-
-/************************************************************************/
-/* Decodes Linux DevFn to iSeries DevFn, bridge device, or function.    */
-/* For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h          */
-/************************************************************************/
-
-#define ISERIES_PCI_AGENTID(idsel,func)        ((idsel & 0x0F) << 4) | (func  & 0x07)
-#define ISERIES_ENCODE_DEVICE(agentid) ((0x10) | ((agentid&0x20)>>2) | (agentid&07))
-
-#define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus)   ((subbus >> 5) & 0x7)
-#define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7)
-
-/*
- * N.B. the ISERIES_DECODE_* macros are not used anywhere, and I think
- * the 0x71 (at least) must be wrong - 0x78 maybe?  -- paulus.
- */
+/************************************************************************************/
+/* Decodes Linux DevFn to iSeries DevFn, bridge device, or function.                */
+/* For Linux, see PCI_SLOT and PCI_FUNC in include/linux/pci.h                      */
+/************************************************************************************/
 #define ISERIES_DECODE_DEVFN(linuxdevfn)  (((linuxdevfn & 0x71) << 1) | (linuxdevfn & 0x07))
 #define ISERIES_DECODE_DEVICE(linuxdevfn) (((linuxdevfn & 0x38) >> 3) |(((linuxdevfn & 0x40) >> 2) + 0x10))
 #define ISERIES_DECODE_FUNCTION(linuxdevfn) (linuxdevfn & 0x07)
+#define ISERIES_PCI_AGENTID(idsel,func)        ((idsel & 0x0F) << 4) | (func  & 0x07)
 
-/************************************************************************/
-/* Converts Virtual Address to Real Address for Hypervisor calls        */
-/************************************************************************/
+#define ISERIES_GET_DEVICE_FROM_SUBBUS(subbus)   ((subbus >> 5) & 0x7)
+#define ISERIES_GET_FUNCTION_FROM_SUBBUS(subbus) ((subbus >> 2) & 0x7)
 
+#define ISERIES_ENCODE_DEVICE(agentid) ((0x10) | ((agentid&0x20)>>2) | (agentid&07))
+/************************************************************************************/
+/* Converts Virtual Address to Real Address for Hypervisor calls                    */
+/************************************************************************************/
 #define REALADDR(virtaddr)  (0x8000000000000000 | (virt_to_absolute((u64)virtaddr) ))
 
+/************************************************************************************/
+/* Define TRUE and FALSE Values for Al                                              */
+/************************************************************************************/
+#ifndef TRUE
+#define TRUE 1
+#endif
+#ifndef FALSE
+#define FALSE 0
+#endif
+
 /************************************************************************/
 /* iSeries Device Information                                           */
 /************************************************************************/
-
 struct iSeries_Device_Node {
-       struct list_head Device_List;
-       struct pci_dev* PciDev;         /* Pointer to pci_dev structure*/
-        union HvDsaMap DsaAddr;        /* Direct Select Address       */
-                                        /* busNumber,subBusNumber,     */ 
-                                       /* deviceId, barNumber         */
-       HvAgentId       AgentId;        /* Hypervisor DevFn            */
-       int             DevFn;          /* Linux devfn                 */
-       int             BarOffset;
-       int             Irq;            /* Assigned IRQ                */
-       int             ReturnCode;     /* Return Code Holder          */
-       int             IoRetry;        /* Current Retry Count         */
-       int             Flags;          /* Possible flags(disable/bist)*/
-       u16             Vendor;         /* Vendor ID                   */
-       u8              LogicalSlot;    /* Hv Slot Index for Tces      */
-       struct TceTable* DevTceTable;   /* Device TCE Table            */ 
-       u8              PhbId;          /* Phb Card is on.             */
-       u16             Board;          /* Board Number                */
-       u8              FrameId;        /* iSeries spcn Frame Id       */
-       char            CardLocation[4];/* Char format of planar vpd   */
-       char            Location[20];   /* Frame  1, Card C10          */
+       struct list_head Device_List;    /* Must be first for cast to wo*/
+       struct pci_dev*  PciDev;         /* Pointer to pci_dev structure*/
+        struct HvCallPci_DsaAddr DsaAddr;/* Direct Select Address       */
+                                         /* busNumber,subBusNumber,     */ 
+                                        /* deviceId, barNumber         */
+       HvAgentId        AgentId;        /* Hypervisor DevFn            */
+       int              DevFn;          /* Linux devfn                 */
+       int              BarOffset;
+       int              Irq;            /* Assigned IRQ                */
+       int              ReturnCode;     /* Return Code Holder          */
+       int              IoRetry;        /* Current Retry Count         */
+       int              Flags;          /* Possible flags(disable/bist)*/
+       u16              Vendor;         /* Vendor ID                   */
+       u8               LogicalSlot;    /* Hv Slot Index for Tces      */
+       struct TceTable* DevTceTable;    /* Device TCE Table            */ 
+       u8               PhbId;          /* Phb Card is on.             */
+       u16              Board;          /* Board Number                */
+       u8               FrameId;        /* iSeries spcn Frame Id       */
+       char             CardLocation[4];/* Char format of planar vpd   */
+       char             Location[20];   /* Frame  1, Card C10          */
 };
-
 /************************************************************************/
 /* Location Data extracted from the VPD list and device info.           */
 /************************************************************************/
-
 struct LocationDataStruct {    /* Location data structure for device  */
        u16  Bus;               /* iSeries Bus Number              0x00*/
        u16  Board;             /* iSeries Board                   0x02*/
@@ -113,14 +108,17 @@ struct LocationDataStruct {       /* Location data structure for device  */
        u8   Card;
        char CardLocation[4];      
 };
-
 typedef struct LocationDataStruct  LocationData;
 #define LOCATION_DATA_SIZE      48
+/************************************************************************/
+/* Flight Recorder tracing                                              */
+/************************************************************************/
+extern int  iSeries_Set_PciTraceFlag(int TraceFlag);
+extern int  iSeries_Get_PciTraceFlag(void);
 
 /************************************************************************/
 /* Functions                                                            */
 /************************************************************************/
-
 extern LocationData* iSeries_GetLocationData(struct pci_dev* PciDev);
 extern int           iSeries_Device_Information(struct pci_dev*,char*, int);
 extern void          iSeries_Get_Location_Code(struct iSeries_Device_Node*);
index 3cf1d11..a1e146c 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
+
+
+/* Change Activity: */
+/* End Change Activity */
+
 #ifndef _ISERIES_PROC_H
 #define _ISERIES_PROC_H
 
 #include <linux/proc_fs.h>
 
 extern void iSeries_proc_early_init(void);
+extern void iSeries_proc_create(void);
 
 typedef void (*iSeriesProcFunction)(struct proc_dir_entry *iSeries_proc);
 
 extern void iSeries_proc_callback(iSeriesProcFunction initFunction);
 
 #endif /* _iSeries_PROC_H */
+
index ccd13bf..f4a0591 100644 (file)
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
  */
+
 #ifndef MF_H_INCLUDED
 #define MF_H_INCLUDED
 
-#include <linux/proc_fs.h>
-
 #include <asm/iSeries/HvTypes.h>
 #include <asm/iSeries/HvLpEvent.h>
 
 struct rtc_time;
 
-typedef void (*MFCompleteHandler)(void *clientToken, int returnCode);
+typedef void (*MFCompleteHandler)( void * clientToken, int returnCode );
+
+extern void mf_allocateLpEvents( HvLpIndex targetLp,
+                                HvLpEvent_Type type,
+                                unsigned size,
+                                unsigned amount,
+                                MFCompleteHandler hdlr,
+                                void * userToken );
 
-extern void mf_allocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type,
-               unsigned size, unsigned amount, MFCompleteHandler hdlr,
-               void *userToken);
-extern void mf_deallocateLpEvents(HvLpIndex targetLp, HvLpEvent_Type type,
-               unsigned count, MFCompleteHandler hdlr, void *userToken);
+extern void mf_deallocateLpEvents( HvLpIndex targetLp,
+                                  HvLpEvent_Type type,
+                                  unsigned count,
+                                  MFCompleteHandler hdlr,
+                                  void * userToken );
 
-extern void mf_powerOff(void);
-extern void mf_reboot(void);
+extern void mf_powerOff( void );
 
-extern void mf_displaySrc(u32 word);
-extern void mf_displayProgress(u16 value);
-extern void mf_clearSrc(void);
+extern void mf_reboot( void );
 
-extern void mf_init(void);
+extern void mf_displaySrc( u32 word );
+extern void mf_displayProgress( u16 value );
+
+extern void mf_clearSrc( void );
+
+extern void mf_init( void );
 
 extern void mf_setSide(char side);
+
 extern char mf_getSide(void);
 
 extern void mf_setCmdLine(const char *cmdline, int size, u64 side);
+
 extern int  mf_getCmdLine(char *cmdline, int *size, u64 side);
 
 extern void mf_getSrcHistory(char *buffer, int size);
 
-extern int mf_setVmlinuxChunk(const char *buffer, int size, int offset,
-               u64 side);
+extern int mf_setVmlinuxChunk(const char *buffer, int size, int offset, u64 side);
+
 extern int mf_getVmlinuxChunk(char *buffer, int *size, int offset, u64 side);
 
 extern int mf_setRtcTime(unsigned long time);
+
 extern int mf_getRtcTime(unsigned long *time);
+
 extern int mf_getRtc( struct rtc_time * tm );
-extern int mf_setRtc( struct rtc_time * tm );
 
-extern void mf_proc_init(struct proc_dir_entry *iSeries_proc);
+extern int mf_setRtc( struct rtc_time * tm );
 
 #endif /* MF_H_INCLUDED */
diff --git a/include/asm-ppc64/iSeries/mf_proc.h b/include/asm-ppc64/iSeries/mf_proc.h
new file mode 100644 (file)
index 0000000..1e205cf
--- /dev/null
@@ -0,0 +1,33 @@
+/*
+ * mf_proc.h
+ * Copyright (C) 2001  Kyle A. Lucke IBM Corporation
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+
+/* Change Activity: */
+/* End Change Activity */
+
+#ifndef _MF_PROC_H
+#define _MF_PROC_H
+
+#include <linux/proc_fs.h>
+
+void mf_proc_init(struct proc_dir_entry *iSeries_proc);
+
+
+#endif /* _MF_PROC_H */
+
diff --git a/include/asm-ppc64/iSeries/veth-proc.h b/include/asm-ppc64/iSeries/veth-proc.h
new file mode 100644 (file)
index 0000000..c019ffd
--- /dev/null
@@ -0,0 +1,32 @@
+/*
+ * veth-proc.h
+ * Copyright (C) 2001  Kyle A. Lucke IBM Corporation
+ * 
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+ */
+
+
+/* Change Activity: */
+/* End Change Activity */
+
+#ifndef _VETH_PROC_H
+#define _VETH_PROC_H
+
+#include <linux/proc_fs.h>
+
+void veth_proc_init(struct proc_dir_entry *iSeries_proc);
+
+#endif /* _VETH-PROC_H */
+
diff --git a/include/asm-ppc64/iSeries/vio.h b/include/asm-ppc64/iSeries/vio.h
deleted file mode 100644 (file)
index 779c566..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/* -*- linux-c -*-
- *  drivers/char/vio.h
- *
- *  iSeries Virtual I/O Message Path header
- *
- *  Authors: Dave Boutcher <boutcher@us.ibm.com>
- *           Ryan Arnold <ryanarn@us.ibm.com>
- *           Colin Devilbiss <devilbis@us.ibm.com>
- *
- * (C) Copyright 2000 IBM Corporation
- * 
- * This header file is used by the iSeries virtual I/O device
- * drivers.  It defines the interfaces to the common functions
- * (implemented in drivers/char/viopath.h) as well as defining
- * common functions and structures.  Currently (at the time I 
- * wrote this comment) the iSeries virtual I/O device drivers
- * that use this are 
- *   drivers/block/viodasd.c 
- *   drivers/char/viocons.c
- *   drivers/char/viotape.c
- *   drivers/cdrom/viocd.c
- *
- * The iSeries virtual ethernet support (veth.c) uses a whole
- * different set of functions.
- * 
- * This program is free software;  you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) anyu later version.
- *
- * This program is distributed in the hope that it will be useful, but
- * WITHOUT ANY WARRANTY; without even the implied warranty of 
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- * General Public License for more details.  
- *
- * You should have received a copy of the GNU General Public License 
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- */
-#ifndef _VIO_H
-#define _VIO_H
-
-#include <asm/iSeries/HvTypes.h>
-#include <asm/iSeries/HvLpEvent.h>
-
-/* iSeries virtual I/O events use the subtype field in
- * HvLpEvent to figure out what kind of vio event is coming
- * in.  We use a table to route these, and this defines
- * the maximum number of distinct subtypes
- */
-#define VIO_MAX_SUBTYPES 7
-
-/* Each subtype can register a handler to process their events.
- * The handler must have this interface.
- */
-typedef void (vio_event_handler_t) (struct HvLpEvent * event);
-
-int viopath_open(HvLpIndex remoteLp, int subtype, int numReq);
-int viopath_close(HvLpIndex remoteLp, int subtype, int numReq);
-int vio_setHandler(int subtype, vio_event_handler_t * beh);
-int vio_clearHandler(int subtype);
-int viopath_isactive(HvLpIndex lp);
-HvLpInstanceId viopath_sourceinst(HvLpIndex lp);
-HvLpInstanceId viopath_targetinst(HvLpIndex lp);
-void vio_set_hostlp(void);
-void *vio_get_event_buffer(int subtype);
-void vio_free_event_buffer(int subtype, void *buffer);
-
-extern HvLpIndex viopath_hostLp;
-extern HvLpIndex viopath_ourLp;
-
-#define VIO_MESSAGE "iSeries virtual I/O: "
-#define KERN_DEBUG_VIO KERN_DEBUG VIO_MESSAGE
-#define KERN_INFO_VIO KERN_INFO VIO_MESSAGE
-#define KERN_WARNING_VIO KERN_WARNING VIO_MESSAGE
-
-#define VIOCHAR_MAX_DATA 200
-
-#define VIOMAJOR_SUBTYPE_MASK 0xff00
-#define VIOMINOR_SUBTYPE_MASK 0x00ff
-#define VIOMAJOR_SUBTYPE_SHIFT 8
-
-#define VIOVERSION            0x0101
-
-/*
-This is the general structure for VIO errors; each module should have a table
-of them, and each table should be terminated by an entry of { 0, 0, NULL }.
-Then, to find a specific error message, a module should pass its local table
-and the return code.
-*/
-struct vio_error_entry {
-       u16 rc;
-       int errno;
-       const char *msg;
-};
-const struct vio_error_entry *vio_lookup_rc(const struct vio_error_entry
-                                           *local_table, u16 rc);
-
-enum viosubtypes {
-       viomajorsubtype_monitor = 0x0100,
-       viomajorsubtype_blockio = 0x0200,
-       viomajorsubtype_chario = 0x0300,
-       viomajorsubtype_config = 0x0400,
-       viomajorsubtype_cdio = 0x0500,
-       viomajorsubtype_tape = 0x0600
-};
-
-
-enum vioconfigsubtype {
-       vioconfigget = 0x0001,
-};
-
-enum viorc {
-       viorc_good = 0x0000,
-       viorc_noConnection = 0x0001,
-       viorc_noReceiver = 0x0002,
-       viorc_noBufferAvailable = 0x0003,
-       viorc_invalidMessageType = 0x0004,
-       viorc_invalidRange = 0x0201,
-       viorc_invalidToken = 0x0202,
-       viorc_DMAError = 0x0203,
-       viorc_useError = 0x0204,
-       viorc_releaseError = 0x0205,
-       viorc_invalidDisk = 0x0206,
-       viorc_openRejected = 0x0301
-};
-
-#endif /* _VIO_H */
index 389d813..68b8e47 100644 (file)
@@ -120,15 +120,11 @@ extern void _outsl_ns(volatile u32 *port, const void *buf, int nl);
  * Map in an area of physical address space, for accessing
  * I/O devices etc.
  */
-extern int __ioremap_explicit(unsigned long p_addr, unsigned long v_addr,
-                             unsigned long size, unsigned long flags);
 extern void *__ioremap(unsigned long address, unsigned long size,
                       unsigned long flags);
 extern void *ioremap(unsigned long address, unsigned long size);
 #define ioremap_nocache(addr, size)    ioremap((addr), (size))
-extern int iounmap_explicit(void *addr, unsigned long size);
 extern void iounmap(void *addr);
-extern void * reserve_phb_iospace(unsigned long size);
 
 /*
  * Change virtual addresses to physical addresses and vv, for
index b639b83..42b8c5d 100644 (file)
@@ -43,7 +43,7 @@
         ((size) << _IOC_SIZESHIFT))
 
 /* provoke compile error for invalid uses of size argument */
-extern int __invalid_size_argument_for_IOC;
+extern unsigned int __invalid_size_argument_for_IOC;
 #define _IOC_TYPECHECK(t) \
        ((sizeof(t) == sizeof(t[1]) && \
          sizeof(t) < (1 << _IOC_SIZEBITS)) ? \
index 1e760c5..5de0cf6 100644 (file)
 
 #include <asm/atomic.h>
 
-/*
- * This definition means virtually nothing now and could/should go away.
- */
-#define NR_IRQS                512
-
 extern void disable_irq(unsigned int);
 extern void disable_irq_nosync(unsigned int);
 extern void enable_irq(unsigned int);
 
 /*
- * Valid interrupt numbers are from 0 to MAX_IRQS - 1.
+ * this is the maximum number of virtual irqs we will use.
  */
-#define MAX_IRQS       (1<<24)
+#define NR_IRQS                        512
 
-extern void *_get_irq_desc(unsigned int irq);
-extern void *_get_real_irq_desc(unsigned int irq);
-#define get_irq_desc(irq) ((irq_desc_t *)_get_irq_desc(irq))
-#define get_real_irq_desc(irq) ((irq_desc_t *)_get_real_irq_desc(irq))
+#define NUM_8259_INTERRUPTS    16
 
-/* Define a way to iterate across irqs fairly efficiently. */
-#define for_each_irq(i) \
-       for ((i) = 0; (i) < MAX_IRQS; (i) = _next_irq(i))
-unsigned int _next_irq(unsigned int irq);
+/* Interrupt numbers are virtual in case they are sparsely
+ * distributed by the hardware.
+ */
+#define NR_HW_IRQS             8192
+extern unsigned short real_irq_to_virt_map[NR_HW_IRQS];
+extern unsigned short virt_irq_to_real_map[NR_IRQS];
+/* Create a mapping for a real_irq if it doesn't already exist.
+ * Return the virtual irq as a convenience.
+ */
+unsigned long virt_irq_create_mapping(unsigned long real_irq);
 
-static __inline__ int irq_canonicalize(int irq)
-{
-       return irq;
+/* These funcs map irqs between real and virtual */
+static inline unsigned long real_irq_to_virt(unsigned long real_irq) {
+       return real_irq_to_virt_map[real_irq];
+}
+static inline unsigned long virt_irq_to_real(unsigned long virt_irq) {
+       return virt_irq_to_real_map[virt_irq];
 }
 
 /*
- * Because many systems have two overlapping names spaces for
- * interrupts (ISA and XICS for example), and the ISA interrupts
- * have historically not been easy to renumber, we allow ISA
- * interrupts to take values 0 - 15, and shift up the remaining 
- * interrupts by 0x10.  
- *
- * This would be nice to remove at some point as it adds confusion
- * and adds a nasty end case if any platform native interrupts have 
- * values within 0x10 of the end of that namespace.
+ * This gets called from serial.c, which is now used on
+ * powermacs as well as prep/chrp boxes.
+ * Prep and chrp both have cascaded 8259 PICs.
  */
-
-#define NUM_ISA_INTERRUPTS     0x10
-
-extern inline int irq_offset_up(int irq)
-{
-       return(irq + NUM_ISA_INTERRUPTS);
-}
-
-extern inline int irq_offset_down(int irq)
+static __inline__ int irq_canonicalize(int irq)
 {
-       return(irq - NUM_ISA_INTERRUPTS);
+       return irq;
 }
 
-extern inline int irq_offset_value(void)
-{
-       return NUM_ISA_INTERRUPTS;
-}
+#define NR_MASK_WORDS  ((NR_IRQS + 63) / 64)
 
 #endif /* _ASM_IRQ_H */
 #endif /* __KERNEL__ */
diff --git a/include/asm-ppc64/kdb.h b/include/asm-ppc64/kdb.h
deleted file mode 100644 (file)
index 2e429ee..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Minimalist Kernel Debugger
- *
- * Copyright (C) 1999 Silicon Graphics, Inc.
- * Copyright (C) Scott Lurndal (slurn@engr.sgi.com)
- * Copyright (C) Scott Foehner (sfoehner@engr.sgi.com)
- * Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
- *
- * See the file LIA-COPYRIGHT for additional information.
- *
- * Written March 1999 by Scott Lurndal at Silicon Graphics, Inc.
- *
- * Modifications from:
- *      Richard Bass                    1999/07/20
- *              Many bug fixes and enhancements.
- *      Scott Foehner
- *              Port to ia64
- *     Scott Lurndal                   1999/12/12
- *             v1.0 restructuring.
- */
-#if !defined(_ASM_KDB_H)
-#define _ASM_KDB_H
-       /*
-        * KDB_ENTER() is a macro which causes entry into the kernel
-        * debugger from any point in the kernel code stream.  If it 
-        * is intended to be used from interrupt level, it must  use
-        * a non-maskable entry method.
-        */
-#define KDB_ENTER()    kdb(KDB_REASON_CALL,0,0);
-
-#ifndef ElfW
-# if ELFCLASSM == ELFCLASS32
-#  define ElfW(x)  Elf32_ ## x
-#  define ELFW(x)  ELF32_ ## x
-# else
-#  define ElfW(x)  Elf64_ ## x
-#  define ELFW(x)  ELF64_ ## x
-# endif
-#endif
-
-       /*
-        * Define the exception frame for this architecture
-        */
-struct pt_regs;
-typedef struct pt_regs *kdb_eframe_t;
-
-       /*
-        * Needed for exported symbols.
-        */
-typedef unsigned long kdb_machreg_t;
-
-#define kdb_machreg_fmt                "0x%016lx"
-#define kdb_machreg_fmt0       "0x%016lx"
-#define kdb_bfd_vma_fmt                "0x%016lx"
-#define kdb_bfd_vma_fmt0       "0x%016lx"
-#define kdb_elfw_addr_fmt      "0x%016lx"
-#define kdb_elfw_addr_fmt0     "0x%016lx"
-
-       /*
-        * Per cpu arch specific kdb state.  Must be in range 0xff000000.
-        */
-#define KDB_STATE_A_IF         0x01000000      /* Saved IF flag */
-
-        /*
-         * Interface from kernel trap handling code to kernel debugger.
-         */
-extern int     kdba_callback_die(struct pt_regs *, int, long, void*);
-extern int     kdba_callback_bp(struct pt_regs *, int, long, void*);
-extern int     kdba_callback_debug(struct pt_regs *, int, long, void *);
-
-#include <linux/types.h>
-extern int kdba_putarea_size(unsigned long to_xxx, void *from, size_t size);
-extern int kdba_getarea_size(void *to, unsigned long from_xxx, size_t size);
-
-static inline int
-kdba_verify_rw(unsigned long addr, size_t size)
-{
-       unsigned char data[size];
-       return(kdba_getarea_size(data, addr, size) || kdba_putarea_size(addr, data, size));
-}
-
-#endif /* ASM_KDB_H */
diff --git a/include/asm-ppc64/kdbprivate.h b/include/asm-ppc64/kdbprivate.h
deleted file mode 100644 (file)
index 54cbab6..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-/*
- * Minimalist Kernel Debugger
- *
- * Copyright (C) 1999 Silicon Graphics, Inc.
- * Copyright (C) Scott Lurndal (slurn@engr.sgi.com)
- * Copyright (C) Scott Foehner (sfoehner@engr.sgi.com)
- * Copyright (C) Srinivasa Thirumalachar (sprasad@engr.sgi.com)
- *
- * See the file LIA-COPYRIGHT for additional information.
- *
- * Written March 1999 by Scott Lurndal at Silicon Graphics, Inc.
- *
- * Modifications from:
- *      Richard Bass                    1999/07/20
- *              Many bug fixes and enhancements.
- *      Scott Foehner
- *              Port to ia64
- *     Scott Lurndal                   1999/12/12
- *             v1.0 restructuring.
- *     Keith Owens                     2000/05/23
- *             KDB v1.2
- */
-#if !defined(_ASM_KDBPRIVATE_H)
-#define _ASM_KDBPRIVATE_H
-
-typedef unsigned long kdb_machinst_t;
-
-       /*
-        * KDB_MAXBPT describes the total number of breakpoints
-        * supported by this architecure.  
-        */
-#define KDB_MAXBPT     4
-       /*
-        * KDB_MAXHARDBPT describes the total number of hardware
-        * breakpoint registers that exist.
-        */
-#define KDB_MAXHARDBPT  1
-        /*
-         * Provide space for KDB_MAX_COMMANDS commands.
-         */
-#define KDB_MAX_COMMANDS        125
-
-       /*
-        * Platform specific environment entries
-        */
-#define KDB_PLATFORM_ENV       "IDMODE=PPC64", "BYTESPERWORD=8", "IDCOUNT=16"
-
-       /*
-        * Define the direction that the stack grows
-        */
-#define KDB_STACK_DIRECTION    -1      /* Stack grows down */
-
-       /*
-        * Support for ia32 debug registers 
-        */
-typedef struct _kdbhard_bp {
-       kdb_machreg_t   bph_reg;        /* Register this breakpoint uses */
-
-       unsigned int    bph_free:1;     /* Register available for use */
-       unsigned int    bph_data:1;     /* Data Access breakpoint */
-
-       unsigned int    bph_write:1;    /* Write Data breakpoint */
-       unsigned int    bph_mode:2;     /* 0=inst, 1=write, 2=io, 3=read */
-       unsigned int    bph_length:2;   /* 0=1, 1=2, 2=BAD, 3=4 (bytes) */
-} kdbhard_bp_t;
-
-extern kdbhard_bp_t    kdb_hardbreaks[/* KDB_MAXHARDBPT */];
-
-#define PPC64_BREAKPOINT_INSTRUCTION 0x7fe00008    
-#define PPC64_ADJUST_OFFSET 0x00   
-
-#define KDB_HAVE_LONGJMP 
-#ifdef KDB_HAVE_LONGJMP
-typedef struct __kdb_jmp_buf {
-       unsigned int regs[100];
-} kdb_jmp_buf;
-extern int kdb_setjmp(kdb_jmp_buf *);
-extern void kdba_longjmp(kdb_jmp_buf *, int);
-extern kdb_jmp_buf  kdbjmpbuf[];
-#endif /* KDB_HAVE_LONGJMP */
-
-
-/*
- A traceback table typically follows each function.
- The find_tb_table() func will fill in this struct.  Note that the struct
- is not an exact match with the encoded table defined by the ABI.  It is
- defined here more for programming convenience.
- */
-typedef struct {
-    unsigned long      flags;          /* flags: */
-#define KDBTBTAB_FLAGSGLOBALLINK       (1L<<47)
-#define KDBTBTAB_FLAGSISEPROL          (1L<<46)
-#define KDBTBTAB_FLAGSHASTBOFF         (1L<<45)
-#define KDBTBTAB_FLAGSINTPROC          (1L<<44)
-#define KDBTBTAB_FLAGSHASCTL           (1L<<43)
-#define KDBTBTAB_FLAGSTOCLESS          (1L<<42)
-#define KDBTBTAB_FLAGSFPPRESENT                (1L<<41)
-#define KDBTBTAB_FLAGSNAMEPRESENT      (1L<<38)
-#define KDBTBTAB_FLAGSUSESALLOCA       (1L<<37)
-#define KDBTBTAB_FLAGSSAVESCR          (1L<<33)
-#define KDBTBTAB_FLAGSSAVESLR          (1L<<32)
-#define KDBTBTAB_FLAGSSTORESBC         (1L<<31)
-#define KDBTBTAB_FLAGSFIXUP            (1L<<30)
-#define KDBTBTAB_FLAGSPARMSONSTK       (1L<<0)
-    unsigned char      fp_saved;       /* num fp regs saved f(32-n)..f31 */
-    unsigned char      gpr_saved;      /* num gpr's saved */
-    unsigned char      fixedparms;     /* num fixed point parms */
-    unsigned char      floatparms;     /* num float parms */
-    unsigned char      parminfo[32];   /* types of args.  null terminated */
-#define KDBTBTAB_PARMFIXED 1
-#define KDBTBTAB_PARMSFLOAT 2
-#define KDBTBTAB_PARMDFLOAT 3
-    unsigned int       tb_offset;      /* offset from start of func */
-    unsigned long      funcstart;      /* addr of start of function */
-    char               name[64];       /* name of function (null terminated)*/
-    kdb_symtab_t       symtab;         /* fake symtab entry */
-} kdbtbtable_t;
-int kdba_find_tb_table(kdb_machreg_t eip, kdbtbtable_t *tab);
-
-#endif /* !_ASM_KDBPRIVATE_H */
index 4610e53..eaf9b05 100644 (file)
@@ -11,7 +11,6 @@
 
 #include <linux/config.h>
 #include <linux/seq_file.h>
-#include <linux/irq.h>
 
 struct pt_regs;
 struct pci_bus;        
@@ -68,7 +67,6 @@ struct machdep_calls {
        void            (*get_cpuinfo)(struct seq_file *m);
 
        void            (*init_IRQ)(void);
-       void            (*init_irq_desc)(irq_desc_t *desc);
        int             (*get_irq)(struct pt_regs *);
 
        /* Optional, may be NULL. */
@@ -91,12 +89,6 @@ struct machdep_calls {
        unsigned char   (*udbg_getc)(void);
        int             (*udbg_getc_poll)(void);
 
-       /* Interface for platform error logging */
-       void            (*log_error)(char *buf, unsigned int err_type, int fatal);
-
-       ssize_t         (*nvram_write)(char *buf, size_t count, loff_t *index);
-       ssize_t         (*nvram_read)(char *buf, size_t count, loff_t *index);  
-
 #ifdef CONFIG_SMP
        /* functions for dealing with other cpus */
        struct smp_ops_t smp_ops;
@@ -121,11 +113,5 @@ void ppc64_attention_msg(unsigned int src, const char *msg);
 /* Print a dump progress message. */
 void ppc64_dump_msg(unsigned int src, const char *msg);
 
-static inline void log_error(char *buf, unsigned int err_type, int fatal)
-{
-       if (ppc_md.log_error)
-               ppc_md.log_error(buf, err_type, fatal);
-}
-
 #endif /* _PPC64_MACHDEP_H */
 #endif /* __KERNEL__ */
index 40c4a6e..82824fe 100644 (file)
@@ -42,28 +42,23 @@ static inline void isync(void)
 #endif
 
 /* Macros for adjusting thread priority (hardware multi-threading) */
-#define HMT_very_low()    asm volatile("or 31,31,31   # very low priority")
+
+#if defined(CONFIG_PPC_ISERIES) || defined(CONFIG_HMT)
 #define HMT_low()      asm volatile("or 1,1,1          # low priority")
-#define HMT_medium_low()  asm volatile("or 6,6,6      # medium low priority")
 #define HMT_medium()   asm volatile("or 2,2,2          # medium priority")
-#define HMT_medium_high() asm volatile("or 5,5,5      # medium high priority")
 #define HMT_high()     asm volatile("or 3,3,3          # high priority")
 
-#define HMT_VERY_LOW    "\tor   31,31,31        # very low priority\n"
 #define HMT_LOW                "\tor   1,1,1           # low priority\n"
-#define HMT_MEDIUM_LOW  "\tor   6,6,6           # medium low priority\n"
 #define HMT_MEDIUM     "\tor   2,2,2           # medium priority\n"
-#define HMT_MEDIUM_HIGH "\tor   5,5,5           # medium high priority\n"
 #define HMT_HIGH       "\tor   3,3,3           # high priority\n"
+#else
+#define HMT_low()      do { } while(0)
+#define HMT_medium()   do { } while(0)
+#define HMT_high()     do { } while(0)
 
-/* 
- * Various operational modes for SMT
- * Off    : never run threaded
- * On     : always run threaded
- * Dynamic: Allow the system to switch modes as needed
- */
-#define SMT_OFF      0
-#define SMT_ON       1
-#define SMT_DYNAMIC  2
+#define HMT_LOW
+#define HMT_MEDIUM
+#define HMT_HIGH
+#endif
 
 #endif
index 659e500..0a6b77e 100644 (file)
@@ -202,51 +202,29 @@ static inline unsigned long hpt_hash(unsigned long vpn, int large)
        return (vsid & 0x7fffffffff) ^ page;
 }
 
-static inline void __tlbie(unsigned long va, int large)
+static inline void _tlbie(unsigned long va, int large)
 {
-       /* clear top 16 bits, non SLS segment */
-       va &= ~(0xffffULL << 48);
+       asm volatile("ptesync": : :"memory");
 
-       if (large)
-               asm volatile("tlbie %0,1" : : "r"(va) : "memory");
-       else
-               asm volatile("tlbie %0,0" : : "r"(va) : "memory");
-}
+       if (large) {
+               asm volatile("clrldi    %0,%0,16\n\
+                             tlbie     %0,1" : : "r"(va) : "memory");
+       } else {
+               asm volatile("clrldi    %0,%0,16\n\
+                             tlbie     %0,0" : : "r"(va) : "memory");
+       }
 
-static inline void tlbie(unsigned long va, int large)
-{
-       asm volatile("ptesync": : :"memory");
-       __tlbie(va, large);
        asm volatile("eieio; tlbsync; ptesync": : :"memory");
 }
 
-static inline void __tlbiel(unsigned long va)
-{
-       /* clear top 16 bits, non SLS segment */
-       va &= ~(0xffffULL << 48);
-
-       /* 
-        * Thanks to Alan Modra we are now able to use machine specific 
-        * assembly instructions (like tlbiel) by using the gas -many flag.
-        * However we have to support older toolchains so for the moment 
-        * we hardwire it.
-        */
-#if 0
-       asm volatile("tlbiel %0" : : "r"(va) : "memory");
-#else
-       asm volatile(".long 0x7c000224 | (%0 << 11)" : : "r"(va) : "memory");
-#endif
-}
-
-static inline void tlbiel(unsigned long va)
+static inline void _tlbiel(unsigned long va)
 {
        asm volatile("ptesync": : :"memory");
-       __tlbiel(va);
+       asm volatile("clrldi    %0,%0,16\n\
+                     tlbiel    %0" : : "r"(va) : "memory");
        asm volatile("ptesync": : :"memory");
 }
 
-extern void htab_finish_init(void);
-
 #endif /* __ASSEMBLY__ */
 
 /*
index e43cdf5..41b73ee 100644 (file)
@@ -6,7 +6,6 @@
 #include <linux/mm.h>  
 #include <asm/mmu.h>   
 #include <asm/ppcdebug.h>      
-#include <asm/cputable.h>
 
 /*
  * Copyright (C) 2001 PPC 64 Team, IBM Corp
@@ -140,16 +139,10 @@ extern void flush_stab(struct task_struct *tsk, struct mm_struct *mm);
  * switch_mm is the entry point called from the architecture independent
  * code in kernel/sched.c
  */
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
-                            struct task_struct *tsk)
+static inline void
+switch_mm(struct mm_struct *prev, struct mm_struct *next,
+         struct task_struct *tsk)
 {
-#ifdef CONFIG_ALTIVEC
-       asm volatile (
- BEGIN_FTR_SECTION
-       "dssall;\n"
- END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
-        : : );
-#endif /* CONFIG_ALTIVEC */
        flush_stab(tsk, next);
        cpu_set(smp_processor_id(), next->cpu_vm_mask);
 }
index b93cdf1..fdefd38 100644 (file)
@@ -37,12 +37,7 @@ struct naca_struct {
        u32 dCacheL1LinesPerPage;       /* L1 d-cache lines / page   0x64 */
        u32 iCacheL1LogLineSize;        /* L1 i-cache line size Log2 0x68 */
        u32 iCacheL1LinesPerPage;       /* L1 i-cache lines / page   0x6c */
-       u64 smt_snooze_delay;           /* Delay (in usec) before    0x70 */
-                                        /* entering ST mode               */
-       u8  smt_state;                  /* 0 = SMT off               0x78 */
-                                       /* 1 = SMT on                     */
-                                       /* 2 = SMT dynamic                */
-       u8  resv0[7];                   /* Reserved           0x70 - 0x7F */
+       u64 resv0[2];                   /* Reserved           0x70 - 0x7F */
 };
 
 extern struct naca_struct *naca;
index 93b1686..1c30435 100644 (file)
 #ifndef _PPC64_NVRAM_H
 #define _PPC64_NVRAM_H
 
-#define NVRW_CNT 0x20
-#define NVRAM_HEADER_LEN 16 /* sizeof(struct nvram_header) */
-#define NVRAM_BLOCK_LEN 16
-#define NVRAM_MAX_REQ (2080/NVRAM_BLOCK_LEN)
-#define NVRAM_MIN_REQ (1056/NVRAM_BLOCK_LEN)
-
 #define NVRAM_AS0  0x74
 #define NVRAM_AS1  0x75
 #define NVRAM_DATA 0x77
 #define MOTO_RTC_CONTROLA       0x1FF8
 #define MOTO_RTC_CONTROLB       0x1FF9
 
-#define NVRAM_SIG_SP   0x02    /* support processor */
-#define NVRAM_SIG_OF   0x50    /* open firmware config */
-#define NVRAM_SIG_FW   0x51    /* general firmware */
-#define NVRAM_SIG_HW   0x52    /* hardware (VPD) */
-#define NVRAM_SIG_SYS  0x70    /* system env vars */
-#define NVRAM_SIG_CFG  0x71    /* config data */
-#define NVRAM_SIG_ELOG 0x72    /* error log */
-#define NVRAM_SIG_VEND 0x7e    /* vendor defined */
-#define NVRAM_SIG_FREE 0x7f    /* Free space */
-#define NVRAM_SIG_OS   0xa0    /* OS defined */
-
-/* If change this size, then change the size of NVNAME_LEN */
-struct nvram_header {
-       unsigned char signature;
-       unsigned char checksum;
-       unsigned short length;
-       char name[12];
-};
-
-struct nvram_partition {
-       struct list_head partition;
-       struct nvram_header header;
-       unsigned int index;
-};
-
-
-ssize_t pSeries_nvram_read(char *buf, size_t count, loff_t *index);
-ssize_t pSeries_nvram_write(char *buf, size_t count, loff_t *index);
-int nvram_write_error_log(char * buff, int length, unsigned int err_type);
-int nvram_read_error_log(char * buff, int length, unsigned int * err_type);
-int nvram_clear_error_log(void);
-void nvram_print_partitions(char * label);
-
 #endif /* _PPC64_NVRAM_H */
index d41818a..cf58822 100644 (file)
@@ -61,7 +61,7 @@ struct paca_struct {
        struct ItLpRegSave *xLpRegSavePtr; /* Pointer to LpRegSave for PLIC     0x08 */
        u64 xCurrent;                   /* Pointer to current                   0x10 */
        u16 xPacaIndex;                 /* Logical processor number             0x18 */
-        u16 xHwProcNum;                 /* Physical processor number            0x1A */
+       u16 active;                     /* Is this cpu active?                  0x1a */
        u32 default_decr;               /* Default decrementer value            0x1c */ 
        u64 unused1;
        u64 xKsave;                     /* Saved Kernel stack addr or zero      0x28 */
@@ -94,9 +94,7 @@ struct paca_struct {
        u32 *prof_buffer;               /* iSeries profiling buffer             0x38 */
        u32 *prof_stext;                /* iSeries start of kernel text         0x40 */
        u32 prof_len;                   /* iSeries length of profile buffer -1  0x48 */
-       u8  yielded;                    /* 0 = this processor is running        0x4c */
-                                       /* 1 = this processor is yielded             */
-       u8  rsvd2[128-77];              /*                                      0x49 */
+       u8  rsvd2[128-76];              /*                                      0x4C */
 
 /*=====================================================================================
  * CACHE_LINE_3 0x0100 - 0x017F
@@ -119,7 +117,7 @@ struct paca_struct {
        struct ItLpRegSave xRegSav;     /* Register save for proc */
 
 /*=====================================================================================
- * CACHE_LINE_17-18 0x0800 - 0x08FF Reserved
+ * CACHE_LINE_17-18 0x0800 - 0x0EFF Reserved
  *=====================================================================================
  */
        struct rtas_args xRtas;         /* Per processor RTAS struct */
@@ -128,12 +126,10 @@ struct paca_struct {
        u8 rsvd5[256-16-sizeof(struct rtas_args)];
 
 /*=====================================================================================
- * CACHE_LINE_19-30 0x0900 - 0x0EFF Reserved
+ * CACHE_LINE_19-30 0x0800 - 0x0EFF Reserved
  *=====================================================================================
  */
-       u64 slb_shadow[0x20];
-       u64 dispatch_log;
-       u8  rsvd6[0x500 - 0x8];
+       u8 rsvd6[0x600];
 
 /*=====================================================================================
  * CACHE_LINE_31 0x0F00 - 0x0F7F Exception stack
index 29e5738..5674054 100644 (file)
@@ -41,6 +41,7 @@
        ( ((addr > (TASK_HPAGE_BASE-len)) && (addr < TASK_HPAGE_END)) || \
          ((current->mm->context & CONTEXT_LOW_HPAGES) && \
           (addr > (TASK_HPAGE_BASE_32-len)) && (addr < TASK_HPAGE_END_32)) )
+#define hugetlb_free_pgtables free_pgtables
 #define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
 
 #define in_hugepage_area(context, addr) \
index 5c3515a..da09c77 100644 (file)
@@ -135,17 +135,6 @@ extern void
 pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region,
                        struct resource *res);
 
-extern int
-unmap_bus_range(struct pci_bus *bus);
-
-extern int
-remap_bus_range(struct pci_bus *bus);
-
-extern void
-pcibios_fixup_device_resources(struct pci_dev *dev, struct pci_bus *bus);
-
-extern int pci_read_irq_line(struct pci_dev *dev);
-
 #endif /* __KERNEL__ */
 
 #endif /* __PPC64_PCI_H */
index 43c70d2..23b0cde 100644 (file)
@@ -3,10 +3,7 @@
 
 #include <linux/mm.h>
 #include <linux/slab.h>
-#include <linux/cpumask.h>
-#include <linux/percpu.h>
 #include <asm/processor.h>
-#include <asm/tlb.h>
 
 extern kmem_cache_t *zero_cache;
 
@@ -43,6 +40,8 @@ pmd_free(pmd_t *pmd)
        kmem_cache_free(zero_cache, pmd);
 }
 
+#define __pmd_free_tlb(tlb, pmd)       pmd_free(pmd)
+
 #define pmd_populate_kernel(mm, pmd, pte) pmd_set(pmd, pte)
 #define pmd_populate(mm, pmd, pte_page) \
        pmd_populate_kernel(mm, pmd, page_address(pte_page))
@@ -63,57 +62,15 @@ pte_alloc_one(struct mm_struct *mm, unsigned long address)
 
        return NULL;
 }
-               
-static inline void pte_free_kernel(pte_t *pte)
+
+static inline void
+pte_free_kernel(pte_t *pte)
 {
        kmem_cache_free(zero_cache, pte);
 }
 
 #define pte_free(pte_page)     pte_free_kernel(page_address(pte_page))
-
-struct pte_freelist_batch
-{
-       struct rcu_head rcu;
-       unsigned int    index;
-       struct page *   pages[0];
-};
-
-#define PTE_FREELIST_SIZE      ((PAGE_SIZE - sizeof(struct pte_freelist_batch) / \
-                                 sizeof(struct page *)))
-
-extern void pte_free_now(struct page *ptepage);
-extern void pte_free_submit(struct pte_freelist_batch *batch);
-
-DECLARE_PER_CPU(struct pte_freelist_batch *, pte_freelist_cur);
-
-static inline void __pte_free_tlb(struct mmu_gather *tlb, struct page *ptepage)
-{
-       /* This is safe as we are holding page_table_lock */
-        cpumask_t local_cpumask = cpumask_of_cpu(smp_processor_id());
-       struct pte_freelist_batch **batchp = &__get_cpu_var(pte_freelist_cur);
-
-       if (atomic_read(&tlb->mm->mm_users) < 2 ||
-           cpus_equal(tlb->mm->cpu_vm_mask, local_cpumask)) {
-               pte_free(ptepage);
-               return;
-       }
-
-       if (*batchp == NULL) {
-               *batchp = (struct pte_freelist_batch *)__get_free_page(GFP_ATOMIC);
-               if (*batchp == NULL) {
-                       pte_free_now(ptepage);
-                       return;
-               }
-               (*batchp)->index = 0;
-       }
-       (*batchp)->pages[(*batchp)->index++] = ptepage;
-       if ((*batchp)->index == PTE_FREELIST_SIZE) {
-               pte_free_submit(*batchp);
-               *batchp = NULL;
-       }
-}
-
-#define __pmd_free_tlb(tlb, pmd)       __pte_free_tlb(tlb, virt_to_page(pmd))
+#define __pte_free_tlb(tlb, pte)       pte_free(pte)
 
 #define check_pgt_cache()      do { } while (0)
 
index 719c653..8564ebb 100644 (file)
@@ -7,7 +7,6 @@
  */
 
 #ifndef __ASSEMBLY__
-#include <linux/stddef.h>
 #include <asm/processor.h>             /* For TASK_SIZE */
 #include <asm/mmu.h>
 #include <asm/page.h>
  * Define the address range of the imalloc VM area.
  * (used for ioremap)
  */
-#define IMALLOC_START     (ioremap_bot)
+#define IMALLOC_START (ioremap_bot)
 #define IMALLOC_VMADDR(x) ((unsigned long)(x))
-#define PHBS_IO_BASE     (0xE000000000000000)  /* Reserve 2 gigs for PHBs */
-#define IMALLOC_BASE      (0xE000000080000000)  
-#define IMALLOC_END       (IMALLOC_BASE + VALID_EA_BITS)
+#define IMALLOC_BASE  (0xE000000000000000)
+#define IMALLOC_END   (IMALLOC_BASE + VALID_EA_BITS)
 
 /*
  * Define the address range mapped virt <-> physical
  * Bits in a linux-style PTE.  These match the bits in the
  * (hardware-defined) PowerPC PTE as closely as possible.
  */
-#define _PAGE_PRESENT  0x0001 /* software: pte contains a translation */
-#define _PAGE_USER     0x0002 /* matches one of the PP bits */
-#define _PAGE_FILE     0x0002 /* (!present only) software: pte holds file offset */
-#define _PAGE_RW       0x0004 /* software: user write access allowed */
-#define _PAGE_GUARDED  0x0008
-#define _PAGE_COHERENT 0x0010 /* M: enforce memory coherence (SMP systems) */
-#define _PAGE_NO_CACHE 0x0020 /* I: cache inhibit */
-#define _PAGE_WRITETHRU        0x0040 /* W: cache write-through */
-#define _PAGE_DIRTY    0x0080 /* C: page changed */
-#define _PAGE_ACCESSED 0x0100 /* R: page referenced */
-#define _PAGE_EXEC     0x0200 /* software: i-cache coherence required */
-#define _PAGE_HASHPTE  0x0400 /* software: pte has an associated HPTE */
-#define _PAGE_BUSY     0x0800 /* software: PTE & hash are busy */ 
-#define _PAGE_SECONDARY 0x8000 /* software: HPTE is in secondary group */
-#define _PAGE_GROUP_IX  0x7000 /* software: HPTE index within group */
+#define _PAGE_PRESENT  0x001UL /* software: pte contains a translation */
+#define _PAGE_USER     0x002UL /* matches one of the PP bits */
+#define _PAGE_RW       0x004UL /* software: user write access allowed */
+#define _PAGE_GUARDED  0x008UL
+#define _PAGE_COHERENT 0x010UL /* M: enforce memory coherence (SMP systems) */
+#define _PAGE_NO_CACHE 0x020UL /* I: cache inhibit */
+#define _PAGE_WRITETHRU        0x040UL /* W: cache write-through */
+#define _PAGE_DIRTY    0x080UL /* C: page changed */
+#define _PAGE_ACCESSED 0x100UL /* R: page referenced */
+#define _PAGE_FILE     0x200UL /* software: pte holds file offset */
+#define _PAGE_HASHPTE  0x400UL /* software: pte has an associated HPTE */
+#define _PAGE_EXEC     0x800UL /* software: i-cache coherence required */
+#define _PAGE_SECONDARY 0x8000UL /* software: HPTE is in secondary group */
+#define _PAGE_GROUP_IX  0x7000UL /* software: HPTE index within group */
 /* Bits 0x7000 identify the index within an HPT Group */
-#define _PAGE_HPTEFLAGS (_PAGE_BUSY | _PAGE_HASHPTE | _PAGE_SECONDARY | _PAGE_GROUP_IX)
+#define _PAGE_HPTEFLAGS (_PAGE_HASHPTE | _PAGE_SECONDARY | _PAGE_GROUP_IX)
 /* PAGE_MASK gives the right answer below, but only by accident */
 /* It should be preserving the high 48 bits and then specifically */
 /* preserving _PAGE_SECONDARY | _PAGE_GROUP_IX */
@@ -159,10 +156,8 @@ extern unsigned long empty_zero_page[PAGE_SIZE/sizeof(unsigned long)];
 #define _PMD_HUGEPAGE  0x00000001U
 #define HUGEPTE_BATCH_SIZE (1<<(HPAGE_SHIFT-PMD_SHIFT))
 
-#ifndef __ASSEMBLY__
 int hash_huge_page(struct mm_struct *mm, unsigned long access,
                   unsigned long ea, unsigned long vsid, int local);
-#endif /* __ASSEMBLY__ */
 
 #define HAVE_ARCH_UNMAPPED_AREA
 #else
@@ -292,17 +287,15 @@ static inline unsigned long pte_update( pte_t *p, unsigned long clr,
                                        unsigned long set )
 {
        unsigned long old, tmp;
-       
+
        __asm__ __volatile__(
        "1:     ldarx   %0,0,%3         # pte_update\n\
-       andi.   %1,%0,%7\n\
-       bne-    1b \n\
        andc    %1,%0,%4 \n\
        or      %1,%1,%5 \n\
        stdcx.  %1,0,%3 \n\
        bne-    1b"
        : "=&r" (old), "=&r" (tmp), "=m" (*p)
-       : "r" (p), "r" (clr), "r" (set), "m" (*p), "i" (_PAGE_BUSY)
+       : "r" (p), "r" (clr), "r" (set), "m" (*p)
        : "cc" );
        return old;
 }
@@ -406,17 +399,6 @@ void pgtable_cache_init(void);
 extern void hpte_init_pSeries(void);
 extern void hpte_init_iSeries(void);
 
-/* imalloc region types */
-#define IM_REGION_UNUSED       0x1
-#define IM_REGION_SUBSET       0x2
-#define IM_REGION_EXISTS       0x4
-#define IM_REGION_OVERLAP      0x8
-
-extern struct vm_struct * im_get_free_area(unsigned long size);
-extern struct vm_struct * im_get_area(unsigned long v_addr, unsigned long size,
-                       int region_type);
-unsigned long im_free(void *addr);
-
 typedef pte_t *pte_addr_t;
 
 long pSeries_lpar_hpte_insert(unsigned long hpte_group,
@@ -428,31 +410,5 @@ long pSeries_hpte_insert(unsigned long hpte_group, unsigned long va,
                         unsigned long prpn, int secondary,
                         unsigned long hpteflags, int bolted, int large);
 
-/*
- * find_linux_pte returns the address of a linux pte for a given 
- * effective address and directory.  If not found, it returns zero.
- */
-static inline pte_t *find_linux_pte(pgd_t *pgdir, unsigned long ea)
-{
-       pgd_t *pg;
-       pmd_t *pm;
-       pte_t *pt = NULL;
-       pte_t pte;
-
-       pg = pgdir + pgd_index(ea);
-       if (!pgd_none(*pg)) {
-
-               pm = pmd_offset(pg, ea);
-               if (pmd_present(*pm)) { 
-                       pt = pte_offset_kernel(pm, ea);
-                       pte = *pt;
-                       if (!pte_present(pte))
-                               pt = NULL;
-               }
-       }
-
-       return pt;
-}
-
 #endif /* __ASSEMBLY__ */
 #endif /* _PPC64_PGTABLE_H */
index 53865a8..54c9d99 100644 (file)
 
 /* These are here to support 32-bit syscalls on a 64-bit kernel. */
 
-typedef struct compat_siginfo {
+typedef union sigval32 {
+       int sival_int;
+       unsigned int sival_ptr;
+} sigval_t32;
+
+typedef struct siginfo32 {
        int si_signo;
        int si_errno;
        int si_code;
@@ -64,7 +69,7 @@ typedef struct compat_siginfo {
                struct {
                        compat_pid_t _pid;              /* sender's pid */
                        compat_uid_t _uid;              /* sender's uid */
-                       compat_sigval_t _sigval;
+                       sigval_t32 _sigval;
                } _rt;
 
                /* SIGCHLD */
@@ -87,7 +92,7 @@ typedef struct compat_siginfo {
                        int _fd;
                } _sigpoll;
        } _sifields;
-} compat_siginfo_t;
+} siginfo_t32;
 
 #define __old_sigaction32      old_sigaction32
 
@@ -121,40 +126,14 @@ struct sigcontext32 {
        u32 regs;  /* 4 byte pointer to the pt_regs32 structure. */
 };
 
-struct mcontext32 {
-       elf_gregset_t32         mc_gregs;
-       elf_fpregset_t          mc_fregs;
-       unsigned int            mc_pad[2];
-       elf_vrregset_t32        mc_vregs __attribute__((__aligned__(16)));
-};
-
 struct ucontext32 { 
-       unsigned int            uc_flags;
-       unsigned int            uc_link;
-       stack_32_t              uc_stack;
-       int                     uc_pad[7];
-       u32                     uc_regs;        /* points to uc_mcontext field */
-       compat_sigset_t         uc_sigmask;     /* mask last for extensibility */
-       /* glibc has 1024-bit signal masks, ours are 64-bit */
-       int                     uc_maskext[30];
-       int                     uc_pad2[3];
-       struct mcontext32       uc_mcontext;
+       unsigned int      uc_flags;
+       unsigned int      uc_link;
+       stack_32_t        uc_stack;
+       struct sigcontext32 uc_mcontext;
+       sigset_t          uc_sigmask;   /* mask last for extensibility */
 };
 
-typedef struct compat_sigevent {
-       compat_sigval_t sigev_value;
-       int sigev_signo;
-       int sigev_notify;
-       union {
-               int _pad[SIGEV_PAD_SIZE];
-               int _tid;
-               struct {
-                       compat_uptr_t _function;
-                       compat_uptr_t _attribute;
-               } _sigev_thread;
-       } _sigev_un;
-} compat_sigevent_t;
-
 struct ipc_kludge_32 {
        unsigned int msgp;
        int msgtyp;
index a33d634..82ba494 100644 (file)
 #define REST_16FPRS(n, base)   REST_8FPRS(n, base); REST_8FPRS(n+8, base)
 #define REST_32FPRS(n, base)   REST_16FPRS(n, base); REST_16FPRS(n+16, base)
 
-#define SAVE_VR(n,b,base)      li b,THREAD_VR0+(16*(n));  stvx n,b,base
-#define SAVE_2VRS(n,b,base)    SAVE_VR(n,b,base); SAVE_VR(n+1,b,base)
-#define SAVE_4VRS(n,b,base)    SAVE_2VRS(n,b,base); SAVE_2VRS(n+2,b,base)
-#define SAVE_8VRS(n,b,base)    SAVE_4VRS(n,b,base); SAVE_4VRS(n+4,b,base)
-#define SAVE_16VRS(n,b,base)   SAVE_8VRS(n,b,base); SAVE_8VRS(n+8,b,base)
-#define SAVE_32VRS(n,b,base)   SAVE_16VRS(n,b,base); SAVE_16VRS(n+16,b,base)
-#define REST_VR(n,b,base)      li b,THREAD_VR0+(16*(n)); lvx n,b,base
-#define REST_2VRS(n,b,base)    REST_VR(n,b,base); REST_VR(n+1,b,base)
-#define REST_4VRS(n,b,base)    REST_2VRS(n,b,base); REST_2VRS(n+2,b,base)
-#define REST_8VRS(n,b,base)    REST_4VRS(n,b,base); REST_4VRS(n+4,b,base)
-#define REST_16VRS(n,b,base)   REST_8VRS(n,b,base); REST_8VRS(n+8,b,base)
-#define REST_32VRS(n,b,base)   REST_16VRS(n,b,base); REST_16VRS(n+16,b,base)
-
 #define CHECKANYINT(ra,rb)                     \
        mfspr   rb,SPRG3;               /* Get Paca address */\
        ld      ra,PACALPPACA+LPPACAANYINT(rb); /* Get pending interrupt flags */\
index 05317fc..aff9577 100644 (file)
@@ -34,6 +34,5 @@ struct proc_ppc64_t {
 };
 
 extern struct proc_ppc64_t proc_ppc64;
-extern int proc_ppc64_init(void);
 
 #endif /* _PPC64_PROC_FS_H */
index 9ec883b..0bfd426 100644 (file)
 #define        SPRN_USIA       0x3AB   /* User Sampled Instruction Address Register */
 #define        SPRN_XER        0x001   /* Fixed Point Exception Register */
 #define        SPRN_ZPR        0x3B0   /* Zone Protection Register */
-#define SPRN_VRSAVE     0x100   /* Vector save */
 
 /* Short-hand versions for a number of the above SPRNs */
 
 #define        PV_ICESTAR      0x0036
 #define        PV_SSTAR        0x0037
 #define        PV_POWER4p      0x0038
-#define        PV_POWER5       0x003A
 #define        PV_630          0x0040
 #define        PV_630p         0x0041
 
 #define PLATFORM_PSERIES      0x0100
 #define PLATFORM_PSERIES_LPAR 0x0101
 #define PLATFORM_ISERIES_LPAR 0x0201
-#define PLATFORM_LPAR         0x0001
        
 /*
  * List of interrupt controllers.
@@ -465,9 +462,11 @@ void start_thread(struct pt_regs *regs, unsigned long fdptr, unsigned long sp);
 void release_thread(struct task_struct *);
 
 /* Prepare to copy thread state - unlazy all lazy status */
-extern void prepare_to_copy(struct task_struct *tsk);
+#define prepare_to_copy(tsk)   do { } while (0)
 
-/* Create a new kernel thread. */
+/*
+ * Create a new kernel thread.
+ */
 extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
 
 /*
@@ -478,7 +477,6 @@ extern long kernel_thread(int (*fn)(void *), void *arg, unsigned long flags);
 
 /* Lazy FPU handling on uni-processor */
 extern struct task_struct *last_task_used_math;
-extern struct task_struct *last_task_used_altivec;
 
 
 #ifdef __KERNEL__
@@ -518,14 +516,6 @@ struct thread_struct {
        unsigned long   fpexc_mode;     /* Floating-point exception mode */
        unsigned long   saved_msr;      /* Save MSR across signal handlers */
        unsigned long   saved_softe;    /* Ditto for Soft Enable/Disable */
-#ifdef CONFIG_ALTIVEC
-       /* Complete AltiVec register set */
-       vector128       vr[32] __attribute((aligned(16)));
-       /* AltiVec status */
-       vector128       vscr __attribute((aligned(16)));
-       unsigned long   vrsave;
-       int             used_vr;        /* set if process has used altivec */
-#endif /* CONFIG_ALTIVEC */
 };
 
 #define INIT_SP                (sizeof(init_stack) + (unsigned long) &init_stack)
index 988f5a2..0c6939f 100644 (file)
@@ -14,8 +14,6 @@
  * as published by the Free Software Foundation; either version
  * 2 of the License, or (at your option) any later version.
  */
-#include <linux/proc_fs.h>
-#include <asm/atomic.h>
 
 #define PTRRELOC(x)     ((typeof(x))((unsigned long)(x) - offset))
 #define PTRUNRELOC(x)   ((typeof(x))((unsigned long)(x) + offset))
@@ -49,17 +47,6 @@ struct pci_address {
        u32 a_lo;
 };
 
-struct isa_address {
-       u32 a_hi;
-       u32 a_lo;
-};
-
-struct isa_range {
-       struct isa_address isa_addr;
-       struct pci_address pci_addr;
-       unsigned int size;
-};
-
 struct pci_range32 {
        struct pci_address child_addr;
        unsigned int  parent_addr;
@@ -133,7 +120,6 @@ struct device_node {
        char    *name;
        char    *type;
        phandle node;
-       phandle linux_phandle;
        int     n_addrs;
        struct  address_range *addrs;
        int     n_intrs;
@@ -157,44 +143,8 @@ struct device_node {
        struct  device_node *sibling;
        struct  device_node *next;      /* next device of same type */
        struct  device_node *allnext;   /* next in list of all nodes */
-       struct  proc_dir_entry *pde;       /* this node's proc directory */
-       struct  proc_dir_entry *name_link; /* name symlink */
-       struct  proc_dir_entry *addr_link; /* addr symlink */
-       atomic_t _users;                 /* reference count */
-       unsigned long _flags;
 };
 
-/* flag descriptions */
-#define OF_STALE   0 /* node is slated for deletion */
-#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */
-
-#define OF_IS_STALE(x) test_bit(OF_STALE, &x->_flags)
-#define OF_MARK_STALE(x) set_bit(OF_STALE, &x->_flags)
-#define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)
-#define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags)
-
-/*
- * Until 32-bit ppc can add proc_dir_entries to its device_node
- * definition, we cannot refer to pde, name_link, and addr_link
- * in arch-independent code.
- */
-#define HAVE_ARCH_DEVTREE_FIXUPS
-
-static inline void set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
-{
-       dn->pde = de;
-}
-
-static void inline set_node_name_link(struct device_node *dn, struct proc_dir_entry *de)
-{
-       dn->name_link = de;
-}
-
-static void inline set_node_addr_link(struct device_node *dn, struct proc_dir_entry *de)
-{
-       dn->addr_link = de;
-}
-
 typedef u32 prom_arg_t;
 
 struct prom_args {
@@ -218,43 +168,22 @@ struct prom_t {
 };
 
 extern struct prom_t prom;
-extern char *of_stdout_device;
 
 extern int boot_cpuid;
 
-/* OBSOLETE: Old stlye node lookup */
+/* Prototypes */
+extern void abort(void);
+extern unsigned long prom_init(unsigned long, unsigned long, unsigned long,
+    unsigned long, unsigned long);
+extern void prom_print(const char *msg);
+extern void relocate_nodes(void);
+extern void finish_device_tree(void);
 extern struct device_node *find_devices(const char *name);
 extern struct device_node *find_type_devices(const char *type);
 extern struct device_node *find_path_device(const char *path);
 extern struct device_node *find_compatible_devices(const char *type,
                                                   const char *compat);
 extern struct device_node *find_all_nodes(void);
-
-/* New style node lookup */
-extern struct device_node *of_find_node_by_name(struct device_node *from,
-       const char *name);
-extern struct device_node *of_find_node_by_type(struct device_node *from,
-       const char *type);
-extern struct device_node *of_find_compatible_node(struct device_node *from,
-       const char *type, const char *compat);
-extern struct device_node *of_find_node_by_path(const char *path);
-extern struct device_node *of_find_all_nodes(struct device_node *prev);
-extern struct device_node *of_get_parent(const struct device_node *node);
-extern struct device_node *of_get_next_child(const struct device_node *node,
-                                            struct device_node *prev);
-extern struct device_node *of_node_get(struct device_node *node);
-extern void of_node_put(struct device_node *node);
-
-/* For updating the device tree at runtime */
-extern int of_add_node(const char *path, struct property *proplist);
-extern int of_remove_node(struct device_node *np);
-
-/* Other Prototypes */
-extern unsigned long prom_init(unsigned long, unsigned long, unsigned long,
-       unsigned long, unsigned long);
-extern void prom_print(const char *msg);
-extern void relocate_nodes(void);
-extern void finish_device_tree(void);
 extern int device_is_compatible(struct device_node *device, const char *);
 extern int machine_is_compatible(const char *compat);
 extern unsigned char *get_property(struct device_node *node, const char *name,
index 1b5b1ba..0fc245b 100644 (file)
@@ -16,7 +16,7 @@
  * that the overall structure is a multiple of 16 bytes in length.
  *
  * Note that the offsets of the fields in this struct correspond with
- * the PT_* values below.  This simplifies arch/ppc64/kernel/ptrace.c.
+ * the PT_* values below.  This simplifies arch/ppc/kernel/ptrace.c.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -120,41 +120,13 @@ struct pt_regs32 {
 #define PT_RESULT 43
 
 #define PT_FPR0        48
-
-/* Kernel and userspace will both use this PT_FPSCR value.  32-bit apps will have
- * visibility to the asm-ppc/ptrace.h header instead of this one.
- */
-#define PT_FPSCR (PT_FPR0 + 32 + 1)      /* each FP reg occupies 1 slot in 64-bit space */
-
 #ifdef __KERNEL__
-#define PT_FPSCR32 (PT_FPR0 + 2*32 + 1)          /* each FP reg occupies 2 32-bit userspace slots */
+#define PT_FPSCR (PT_FPR0 + 32 + 1)      /* each FP reg occupies 1 slot in this space */
+#define PT_FPSCR32 (PT_FPR0 + 2*32 + 1)          /* To the 32-bit user - each FP reg occupies 2 slots in this space */
+#else
+#define PT_FPSCR (PT_FPR0 + 2*32 + 1)  /* each FP reg occupies 2 slots in this space -- Fix when 64-bit apps. */
 #endif
 
-#define PT_VR0 82      /* each Vector reg occupies 2 slots in 64-bit */
-#define PT_VSCR (PT_VR0 + 32*2 + 1)
-#define PT_VRSAVE (PT_VR0 + 33*2)
-
-#ifdef __KERNEL__
-#define PT_VR0_32 164  /* each Vector reg occupies 4 slots in 32-bit */
-#define PT_VSCR_32 (PT_VR0 + 32*4 + 3)
-#define PT_VRSAVE_32 (PT_VR0 + 33*4)
-#endif
-
-/*
- * Get/set all the altivec registers vr0..vr31, vscr, vrsave, in one go. 
- * The transfer totals 34 quadword.  Quadwords 0-31 contain the 
- * corresponding vector registers.  Quadword 32 contains the vscr as the 
- * last word (offset 12) within that quadword.  Quadword 33 contains the 
- * vrsave as the first word (offset 0) within the quadword.
- *
- * This definition of the VMX state is compatible with the current PPC32 
- * ptrace interface.  This allows signal handling and ptrace to use the same 
- * structures.  This also simplifies the implementation of a bi-arch 
- * (combined (32- and 64-bit) gdb.
- */
-#define PTRACE_GETVRREGS       18
-#define PTRACE_SETVRREGS       19
-
 /* Additional PTRACE requests implemented on PowerPC. */
 #define PPC_PTRACE_GETREGS           0x99  /* Get GPRs 0 - 31 */
 #define PPC_PTRACE_SETREGS           0x98  /* Set GPRs 0 - 31 */
index 7adc4ad..adc212d 100644 (file)
 #define RTAS_UNKNOWN_SERVICE (-1)
 #define RTAS_INSTANTIATE_MAX (1UL<<30) /* Don't instantiate rtas at/above this value */
 
-/* Buffer size for ppc_rtas system call. */
-#define RTAS_RMOBUF_MAX (64 * 1024)
-
-/* RTAS return codes */
-#define RTAS_BUSY              -2      /* RTAS Return Status - Busy */
-#define RTAS_EXTENDED_DELAY_MIN 9900
-#define RTAS_EXTENDED_DELAY_MAX 9905
-
-#define RTAS_UNKNOWN_OP                -1099   /* Return Status - Unknown RTAS Token */
-
 /*
  * In general to call RTAS use rtas_token("string") to lookup
  * an RTAS token for the given string (e.g. "event-scan").
@@ -67,11 +57,11 @@ struct rtas_t {
 };
 
 /* Event classes */
-#define RTAS_INTERNAL_ERROR            0x80000000 /* set bit 0 */
-#define RTAS_EPOW_WARNING              0x40000000 /* set bit 1 */
-#define RTAS_POWERMGM_EVENTS           0x20000000 /* set bit 2 */
-#define RTAS_HOTPLUG_EVENTS            0x10000000 /* set bit 3 */
-#define RTAS_EVENT_SCAN_ALL_EVENTS     0xf0000000
+#define INTERNAL_ERROR         0x80000000 /* set bit 0 */
+#define EPOW_WARNING           0x40000000 /* set bit 1 */
+#define POWERMGM_EVENTS                0x20000000 /* set bit 2 */
+#define HOTPLUG_EVENTS         0x10000000 /* set bit 3 */
+#define EVENT_SCAN_ALL_EVENTS  0xf0000000
 
 /* event-scan returns */
 #define SEVERITY_FATAL         0x5
@@ -175,9 +165,6 @@ extern void call_rtas_display_status(char);
 extern void rtas_restart(char *cmd);
 extern void rtas_power_off(void);
 extern void rtas_halt(void);
-extern int rtas_get_sensor(int sensor, int index, int *state);
-extern int rtas_get_power_level(int powerdomain, int *level);
-extern int rtas_set_indicator(int indicator, int index, int new_value);
 
 /* Given an RTAS status code of 9900..9905 compute the hinted delay */
 unsigned int rtas_extended_busy_delay_time(int status);
@@ -186,39 +173,13 @@ static inline int rtas_is_extended_busy(int status)
        return status >= 9900 && status <= 9909;
 }
 
-extern void pSeries_log_error(char *buf, unsigned int err_type, int fatal);
-
-/* Error types logged.  */
-#define ERR_FLAG_ALREADY_LOGGED        0x0
-#define ERR_FLAG_BOOT          0x1     /* log was pulled from NVRAM on boot */
-#define ERR_TYPE_RTAS_LOG      0x2     /* from rtas event-scan */
-#define ERR_TYPE_KERNEL_PANIC  0x4     /* from panic() */
-
-/* All the types and not flags */
-#define ERR_TYPE_MASK  (ERR_TYPE_RTAS_LOG | ERR_TYPE_KERNEL_PANIC)
-
-#define RTAS_ERR KERN_ERR "RTAS: "
-#define RTAS_ERROR_LOG_MAX 2048
-/* Event Scan Parameters */
-#define EVENT_SCAN_ALL_EVENTS  0xf0000000
-#define SURVEILLANCE_TOKEN     9000
-#define LOG_NUMBER             64              /* must be a power of two */
-#define LOG_NUMBER_MASK                (LOG_NUMBER-1)
-
 /* Some RTAS ops require a data buffer and that buffer must be < 4G.
  * Rather than having a memory allocator, just use this buffer
  * (get the lock first), make the RTAS call.  Copy the data instead
  * of holding the buffer for long.
  */
-
-#define RTAS_DATA_BUF_SIZE 4096
+#define RTAS_DATA_BUF_SIZE 1024
 extern spinlock_t rtas_data_buf_lock;
 extern char rtas_data_buf[RTAS_DATA_BUF_SIZE];
 
-/* RMO buffer reserved for user-space RTAS use */
-extern unsigned long rtas_rmo_buf;
-
 #endif /* _PPC64_RTAS_H */
index 86cd525..2ea36ea 100644 (file)
@@ -21,27 +21,6 @@ struct sigcontext {
        struct pt_regs  *regs;
        elf_gregset_t   gp_regs;
        elf_fpregset_t  fp_regs;
-/*
- * To maintain compatibility with current implementations the sigcontext is 
- * extended by appending a pointer (v_regs) to a quadword type (elf_vrreg_t) 
- * followed by an unstructured (vmx_reserve) field of 69 doublewords.  This 
- * allows the array of vector registers to be quadword aligned independent of 
- * the alignment of the containing sigcontext or ucontext. It is the 
- * responsibility of the code setting the sigcontext to set this pointer to 
- * either NULL (if this processor does not support the VMX feature) or the 
- * address of the first quadword within the allocated (vmx_reserve) area.
- *
- * The pointer (v_regs) of vector type (elf_vrreg_t) is type compatible with 
- * an array of 34 quadword entries (elf_vrregset_t).  The entries with 
- * indexes 0-31 contain the corresponding vector registers.  The entry with 
- * index 32 contains the vscr as the last word (offset 12) within the 
- * quadword.  This allows the vscr to be stored as either a quadword (since 
- * it must be copied via a vector register to/from storage) or as a word.  
- * The entry with index 33 contains the vrsave as the first word (offset 0) 
- * within the quadword.
- */
-       elf_vrreg_t     *v_regs;
-       long            vmx_reserve[ELF_NVRREG+ELF_NVRREG+1];
 };
 
 #endif /* _ASM_PPC64_SIGCONTEXT_H */
index c54f858..467e8cf 100644 (file)
 #include <linux/cpumask.h>
 #include <linux/kernel.h>
 
+#ifdef CONFIG_SMP
+
 #ifndef __ASSEMBLY__
 
 #include <asm/paca.h>
 
-#ifdef CONFIG_SMP
-
 extern void smp_message_pass(int target, int msg, unsigned long data, int wait);
 extern void smp_send_tlb_invalidate(int);
 extern void smp_send_xmon_break(int cpu);
 struct pt_regs;
 extern void smp_message_recv(int, struct pt_regs *);
 
+#define cpu_possible(cpu)      paca[cpu].active
 
 #define smp_processor_id() (get_paca()->xPacaIndex)
-#define hard_smp_processor_id() (get_paca()->xHwProcNum)
-
-/*
- * Retrieve the state of a CPU:
- * online:          CPU is in a normal run state
- * possible:        CPU is a candidate to be made online
- * available:       CPU is candidate for the 'possible' pool
- *                  Used to get SMT threads started at boot time.
- * present_at_boot: CPU was available at boot time.  Used in DLPAR
- *                  code to handle special cases for processor start up.
- */
-extern cpumask_t cpu_present_at_boot;
-extern cpumask_t cpu_online_map;
-extern cpumask_t cpu_possible_map;
-extern cpumask_t cpu_available_map;
-
-#define cpu_present_at_boot(cpu) cpu_isset(cpu, cpu_present_at_boot)
-#define cpu_online(cpu)          cpu_isset(cpu, cpu_online_map) 
-#define cpu_possible(cpu)        cpu_isset(cpu, cpu_possible_map) 
-#define cpu_available(cpu)       cpu_isset(cpu, cpu_available_map) 
 
 /* Since OpenPIC has only 4 IPIs, we use slightly different message numbers.
  *
@@ -69,11 +50,7 @@ extern cpumask_t cpu_available_map;
 void smp_init_iSeries(void);
 void smp_init_pSeries(void);
 
-#endif /* !(CONFIG_SMP) */
 #endif /* __ASSEMBLY__ */
-
-#define get_hard_smp_processor_id(CPU) (paca[(CPU)].xHwProcNum)
-#define set_hard_smp_processor_id(CPU, VAL) do { (paca[(CPU)].xHwProcNum = VAL); } while (0)
-
+#endif /* !(CONFIG_SMP) */
 #endif /* !(_PPC64_SMP_H) */
 #endif /* __KERNEL__ */
index 41376b5..4181bd2 100644 (file)
@@ -6,27 +6,16 @@
  *
  * Copyright (C) 2001 Paul Mackerras <paulus@au.ibm.com>, IBM
  * Copyright (C) 2001 Anton Blanchard <anton@au.ibm.com>, IBM
- * Copyright (C) 2002 Dave Engebretsen <engebret@us.ibm.com>, IBM
- *   Rework to support virtual processors
+ *
+ * Type of int is used as a full 64b word is not necessary.
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
  * as published by the Free Software Foundation; either version
  * 2 of the License, or (at your option) any later version.
  */
-
-#include <asm/hvcall.h>
-
-/*
- * The following define is being used to select basic or shared processor
- * locking when running on an RPA platform.  As we do more performance
- * tuning, I would expect this selection mechanism to change.  Dave E. 
- */
-#define SPLPAR_LOCKS
-#define HVSC                   ".long 0x44000022\n"
-
 typedef struct {
-       volatile unsigned long lock;
+       volatile unsigned int lock;
 } spinlock_t;
 
 #ifdef __KERNEL__
@@ -36,15 +25,15 @@ typedef struct {
 
 static __inline__ int _raw_spin_trylock(spinlock_t *lock)
 {
-       unsigned long tmp;
+       unsigned int tmp;
 
        __asm__ __volatile__(
-"1:    ldarx           %0,0,%1         # spin_trylock\n\
-       cmpdi           0,%0,0\n\
+"1:    lwarx           %0,0,%1         # spin_trylock\n\
+       cmpwi           0,%0,0\n\
        li              %0,0\n\
        bne-            2f\n\
        li              %0,1\n\
-       stdcx.          13,0,%1\n\
+       stwcx.          %0,0,%1\n\
        bne-            1b\n\
        isync\n\
 2:"    : "=&r"(tmp)
@@ -54,115 +43,28 @@ static __inline__ int _raw_spin_trylock(spinlock_t *lock)
        return tmp;
 }
 
-/*
- * Spin lock states:
- *   0        : Unlocked
- *   Negative : Locked.  Value is paca pointer (0xc...0) of holder
- */
-#ifdef CONFIG_PPC_ISERIES
-static __inline__ void _raw_spin_lock(spinlock_t *lock)
-{
-       unsigned long tmp, tmp2;
-
-       __asm__ __volatile__(
-       "b              2f              # spin_lock\n\
-1:"
-       HMT_LOW
-"       ldx            %0,0,%2         # load the lock value\n\
-       cmpdi           0,%0,0          # if not locked, try to acquire\n\
-       beq-            2f\n\
-        lwz             5,0x280(%0)     # load yield counter\n\
-        andi.           %1,5,1          # if even then spin\n\
-        beq             1b\n\
-        lwsync                          # if odd, give up cycles\n\
-        ldx             %1,0,%2         # reverify the lock holder\n\
-        cmpd            %0,%1\n\
-        bne             1b              # new holder so restart\n\
-        li              3,0x25          # yield hcall 0x8-12 \n\
-        rotrdi          3,3,1           #   put the bits in the right spot\n\
-        lhz             4,0x18(%0)      # processor number\n\
-        sldi            4,4,32          #   move into top half of word\n\
-        or              5,5,4           # r5 has yield cnt - or it in\n\
-        li              4,2             # yield to processor\n\
-        li              0,-1            # indicate an hcall\n\
-        sc                              # do the hcall \n\
-        b               1b\n\
-2: \n"
-       HMT_MEDIUM
-"      ldarx           %0,0,%2\n\
-       cmpdi           0,%0,0\n\
-       bne-            1b\n\
-       stdcx.          13,0,%2\n\
-       bne-            2b\n\
-       isync"
-       : "=&r"(tmp), "=&r"(tmp2)
-       : "r"(&lock->lock)
-       : "r0", "r3", "r4", "r5", "ctr", "cr0", "cr1", "cr2", "cr3", "cr4", 
-         "xer", "memory");
-}
-#else
-#ifdef SPLPAR_LOCKS
 static __inline__ void _raw_spin_lock(spinlock_t *lock)
 {
-       unsigned long tmp, tmp2;
+       unsigned int tmp;
 
        __asm__ __volatile__(
        "b              2f              # spin_lock\n\
 1:"
        HMT_LOW
-"       ldx            %0,0,%2         # load the lock value\n\
-       cmpdi           0,%0,0          # if not locked, try to acquire\n\
-       beq-            2f\n\
-        lwz             5,0x280(%0)     # load dispatch counter\n\
-        andi.           %1,5,1          # if even then spin\n\
-        beq             1b\n\
-        lwsync                          # if odd, give up cycles\n\
-        ldx             %1,0,%2         # reverify the lock holder\n\
-        cmpd            %0,%1\n\
-        bne             1b              # new holder so restart\n\
-        li              3,0xE4          # give up the cycles H_CONFER\n\
-        lhz             4,0x18(%0)      # processor number\n\
-                                        # r5 has dispatch cnt already\n"
-       HVSC
-"        b               1b\n\
-2: \n"
+"      lwzx            %0,0,%1\n\
+       cmpwi           0,%0,0\n\
+       bne+            1b\n"
        HMT_MEDIUM
-"      ldarx           %0,0,%2\n\
-       cmpdi           0,%0,0\n\
+"2:    lwarx           %0,0,%1\n\
+       cmpwi           0,%0,0\n\
        bne-            1b\n\
-       stdcx.          13,0,%2\n\
-       bne-            2b\n\
-       isync"
-       : "=&r"(tmp), "=&r"(tmp2)
-       : "r"(&lock->lock)
-       : "r3", "r4", "r5", "cr0", "cr1", "ctr", "xer", "memory");
-}
-#else
-static __inline__ void _raw_spin_lock(spinlock_t *lock)
-{
-       unsigned long tmp;
-
-       __asm__ __volatile__(
-       "b              2f              # spin_lock\n\
-1:"
-       HMT_LOW
-"       ldx            %0,0,%1         # load the lock value\n\
-       cmpdi           0,%0,0          # if not locked, try to acquire\n\
-       bne+            1b\n\
-2: \n"
-       HMT_MEDIUM
-"      ldarx           %0,0,%1\n\
-       cmpdi           0,%0,0\n\
-       bne-            1b\n\
-       stdcx.          13,0,%1\n\
+       stwcx.          %2,0,%1\n\
        bne-            2b\n\
        isync"
        : "=&r"(tmp)
-       : "r"(&lock->lock)
+       : "r"(&lock->lock), "r"(1)
        : "cr0", "memory");
 }
-#endif
-#endif
 
 static __inline__ void _raw_spin_unlock(spinlock_t *lock)
 {
@@ -179,35 +81,25 @@ static __inline__ void _raw_spin_unlock(spinlock_t *lock)
  * can "mix" irq-safe locks - any writer needs to get a
  * irq-safe write-lock, but readers can get non-irqsafe
  * read-locks.
- *
- * Write lock states:
- *   0        : Unlocked
- *   Positive : Reader count
- *   Negative : Writer locked.  Value is paca pointer (0xc...0) of holder
- *
- * If lock is not held, try to acquire.
- * If lock is held by a writer, confer cycles to the holder.
- * If lock is help by reader(s), spin.  Need to experiment with confer all
- *   option.  This is likely a pretty weak optimization and may not be 
- *   worth the additional path length.
  */
 typedef struct {
-       volatile signed long lock;
+       volatile signed int lock;
 } rwlock_t;
 
 #define RW_LOCK_UNLOCKED (rwlock_t) { 0 }
 
 static __inline__ int _raw_read_trylock(rwlock_t *rw)
 {
-       unsigned long tmp;
-       unsigned long ret;
+       unsigned int tmp;
+       unsigned int ret;
 
        __asm__ __volatile__(
-"1:    ldarx           %0,0,%2         # read_trylock\n\
+"1:    lwarx           %0,0,%2         # read_trylock\n\
        li              %1,0\n\
+       extsw           %0,%0\n\
        addic.          %0,%0,1\n\
        ble-            2f\n\
-       stdcx.          %0,0,%2\n\
+       stwcx.          %0,0,%2\n\
        bne-            1b\n\
        li              %1,1\n\
        isync\n\
@@ -218,118 +110,39 @@ static __inline__ int _raw_read_trylock(rwlock_t *rw)
        return ret;
 }
 
-#ifdef CONFIG_PPC_ISERIES
 static __inline__ void _raw_read_lock(rwlock_t *rw)
 {
-       unsigned long tmp, tmp2;
+       unsigned int tmp;
 
        __asm__ __volatile__(
        "b              2f              # read_lock\n\
 1:"
        HMT_LOW
-"      ldx             %0,0,%2\n\
-       cmpdi           0,%0,0\n\
-       bge-            2f\n\
-        lwz             5,0x280(%0)     # load yield counter\n\
-        andi.           %1,5,1          # if even then spin\n\
-        beq             1b\n\
-        lwsync                          # if odd, give up cycles\n\
-        ldx             %1,0,%2         # reverify the lock holder\n\
-        cmpd            %0,%1\n\
-        bne             1b              # new holder so restart\n\
-        li              3,0x25          # yield hcall 0x8-12 \n\
-        rotrdi          3,3,1           #   put the bits in the right spot\n\
-        lhz             4,0x18(%0)      # processor number\n\
-        sldi            4,4,32          #   move into top half of word\n\
-        or              5,5,4           # r5 has yield cnt - or it in\n\
-        li              4,2             # yield to processor\n\
-        li              0,-1            # indicate an hcall\n\
-        sc                              # do the hcall \n\
-2: \n"
+"      lwax            %0,0,%1\n\
+       cmpwi           0,%0,0\n\
+       blt+            1b\n"
        HMT_MEDIUM
-"      ldarx           %0,0,%2\n\
+"2:    lwarx           %0,0,%1\n\
+       extsw           %0,%0\n\
        addic.          %0,%0,1\n\
        ble-            1b\n\
-       stdcx.          %0,0,%2\n\
-       bne-            2b\n\
-       isync"
-       : "=&r"(tmp), "=&r"(tmp2)
-       : "r"(&rw->lock)
-       : "r0", "r3", "r4", "r5", "ctr", "cr0", "cr1", "cr2", "cr3", "cr4", 
-         "xer", "memory");
-}
-#else
-#ifdef SPLPAR_LOCKS
-static __inline__ void _raw_read_lock(rwlock_t *rw)
-{
-       unsigned long tmp, tmp2;
-
-       __asm__ __volatile__(
-       "b              2f              # read_lock\n\
-1:"
-       HMT_LOW
-"      ldx             %0,0,%2\n\
-       cmpdi           0,%0,0\n\
-       bge-            2f\n\
-        lwz             5,0x280(%0)     # load dispatch counter\n\
-        andi.           %1,5,1          # if even then spin\n\
-        beq             1b\n\
-        lwsync                          # if odd, give up cycles\n\
-        ldx             %1,0,%2         # reverify the lock holder\n\
-        cmpd            %0,%1\n\
-        bne             1b              # new holder so restart\n\
-        li              3,0xE4          # give up the cycles H_CONFER\n\
-        lhz             4,0x18(%0)      # processor number\n\
-                                        # r5 has dispatch cnt already\n"
-       HVSC
-"2: \n"
-       HMT_MEDIUM
-"      ldarx           %0,0,%2\n\
-       addic.          %0,%0,1\n\
-       ble-            1b\n\
-       stdcx.          %0,0,%2\n\
-       bne-            2b\n\
-       isync"
-       : "=&r"(tmp), "=&r"(tmp2)
-       : "r"(&rw->lock)
-       : "r3", "r4", "r5", "cr0", "cr1", "ctr", "xer", "memory");
-}
-#else
-static __inline__ void _raw_read_lock(rwlock_t *rw)
-{
-       unsigned long tmp;
-
-       __asm__ __volatile__(
-       "b              2f              # read_lock\n\
-1:"
-       HMT_LOW
-"      ldx             %0,0,%1\n\
-       cmpdi           0,%0,0\n\
-       blt+            1b\n\
-2: \n"
-       HMT_MEDIUM
-"      ldarx           %0,0,%1\n\
-       addic.          %0,%0,1\n\
-       ble-            1b\n\
-       stdcx.          %0,0,%1\n\
+       stwcx.          %0,0,%1\n\
        bne-            2b\n\
        isync"
        : "=&r"(tmp)
        : "r"(&rw->lock)
        : "cr0", "memory");
 }
-#endif
-#endif
 
 static __inline__ void _raw_read_unlock(rwlock_t *rw)
 {
-       unsigned long tmp;
+       unsigned int tmp;
 
        __asm__ __volatile__(
        "eieio                          # read_unlock\n\
-1:     ldarx           %0,0,%1\n\
+1:     lwarx           %0,0,%1\n\
        addic           %0,%0,-1\n\
-       stdcx.          %0,0,%1\n\
+       stwcx.          %0,0,%1\n\
        bne-            1b"
        : "=&r"(tmp)
        : "r"(&rw->lock)
@@ -338,15 +151,15 @@ static __inline__ void _raw_read_unlock(rwlock_t *rw)
 
 static __inline__ int _raw_write_trylock(rwlock_t *rw)
 {
-       unsigned long tmp;
-       unsigned long ret;
+       unsigned int tmp;
+       unsigned int ret;
 
        __asm__ __volatile__(
-"1:    ldarx           %0,0,%2         # write_trylock\n\
-       cmpdi           0,%0,0\n\
+"1:    lwarx           %0,0,%2         # write_trylock\n\
+       cmpwi           0,%0,0\n\
        li              %1,0\n\
        bne-            2f\n\
-       stdcx.          13,0,%2\n\
+       stwcx.          %3,0,%2\n\
        bne-            1b\n\
        li              %1,1\n\
        isync\n\
@@ -357,112 +170,28 @@ static __inline__ int _raw_write_trylock(rwlock_t *rw)
        return ret;
 }
 
-#ifdef CONFIG_PPC_ISERIES
-static __inline__ void _raw_write_lock(rwlock_t *rw)
-{
-       unsigned long tmp, tmp2;
-
-       __asm__ __volatile__(
-       "b              2f              # spin_lock\n\
-1:"
-       HMT_LOW
-"       ldx            %0,0,%2         # load the lock value\n\
-       cmpdi           0,%0,0          # if not locked(0), try to acquire\n\
-       beq-            2f\n\
-        bgt             1b              # negative(0xc..)->cycles to holder\n"
-"3:     lwz             5,0x280(%0)     # load yield counter\n\
-        andi.           %1,5,1          # if even then spin\n\
-        beq             1b\n\
-        lwsync                          # if odd, give up cycles\n\
-        ldx             %1,0,%2         # reverify the lock holder\n\
-        cmpd            %0,%1\n\
-        bne             1b              # new holder so restart\n\
-        lhz             4,0x18(%0)      # processor number\n\
-        sldi            4,4,32          #   move into top half of word\n\
-        or              5,5,4           # r5 has yield cnt - or it in\n\
-        li              3,0x25          # yield hcall 0x8-12 \n\
-        rotrdi          3,3,1           #   put the bits in the right spot\n\
-        li              4,2             # yield to processor\n\
-        li              0,-1            # indicate an hcall\n\
-        sc                              # do the hcall \n\
-2: \n"
-       HMT_MEDIUM
-"      ldarx           %0,0,%2\n\
-       cmpdi           0,%0,0\n\
-       bne-            1b\n\
-       stdcx.          13,0,%2\n\
-       bne-            2b\n\
-       isync"
-       : "=&r"(tmp), "=&r"(tmp2)
-       : "r"(&rw->lock)
-       : "r0", "r3", "r4", "r5", "ctr", "cr0", "cr1", "cr2", "cr3", "cr4", 
-         "xer", "memory");
-}
-#else
-#ifdef SPLPAR_LOCKS
-static __inline__ void _raw_write_lock(rwlock_t *rw)
-{
-       unsigned long tmp, tmp2;
-
-       __asm__ __volatile__(
-       "b              2f              # spin_lock\n\
-1:"
-       HMT_LOW
-"       ldx            %0,0,%2         # load the lock value\n\
-        li              3,0xE4          # give up the cycles H_CONFER\n\
-       cmpdi           0,%0,0          # if not locked(0), try to acquire\n\
-       beq-            2f\n\
-        blt             3f              # negative(0xc..)->confer to holder\n\
-        b               1b\n"
-"3:      lwz             5,0x280(%0)     # load dispatch counter\n\
-        andi.           %1,5,1          # if even then spin\n\
-        beq             1b\n\
-        lwsync                          # if odd, give up cycles\n\
-        ldx             %1,0,%2         # reverify the lock holder\n\
-        cmpd            %0,%1\n\
-        bne             1b              # new holder so restart\n\
-        lhz             4,0x18(%0)      # processor number\n\
-                                        # r5 has dispatch cnt already\n"
-       HVSC
-"        b               1b\n\
-2: \n"
-       HMT_MEDIUM
-"      ldarx           %0,0,%2\n\
-       cmpdi           0,%0,0\n\
-       bne-            1b\n\
-       stdcx.          13,0,%2\n\
-       bne-            2b\n\
-       isync"
-       : "=&r"(tmp), "=&r"(tmp2)
-       : "r"(&rw->lock)
-       : "r3", "r4", "r5", "cr0", "cr1", "ctr", "xer", "memory");
-}
-#else
 static __inline__ void _raw_write_lock(rwlock_t *rw)
 {
-       unsigned long tmp;
+       unsigned int tmp;
 
        __asm__ __volatile__(
-       "b              2f              # spin_lock\n\
+       "b              2f              # write_lock\n\
 1:"
        HMT_LOW
-"       ldx            %0,0,%1         # load the lock value\n\
-       cmpdi           0,%0,0          # if not locked(0), try to acquire\n\
-       bne+            1b\n\
-2: \n"
+       "lwax           %0,0,%1\n\
+       cmpwi           0,%0,0\n\
+       bne+            1b\n"
        HMT_MEDIUM
-"      ldarx           %0,0,%1\n\
-       cmpdi           0,%0,0\n\
+"2:    lwarx           %0,0,%1\n\
+       cmpwi           0,%0,0\n\
        bne-            1b\n\
-       stdcx.          13,0,%1\n\
+       stwcx.          %2,0,%1\n\
        bne-            2b\n\
        isync"
        : "=&r"(tmp)
-       : "r"(&rw->lock)
+       : "r"(&rw->lock), "r"(-1)
        : "cr0", "memory");
 }
-#endif
-#endif
 
 static __inline__ void _raw_write_unlock(rwlock_t *rw)
 {
@@ -485,7 +214,7 @@ static __inline__ int is_write_locked(rwlock_t *rw)
 
 #define rwlock_init(x)         do { *(x) = RW_LOCK_UNLOCKED; } while(0)
 
-#define rwlock_is_locked(x) ((x)->lock != 0)
+#define rwlock_is_locked(x)    ((x)->lock)
 
 #endif /* __KERNEL__ */
 #endif /* __ASM_SPINLOCK_H */
index 2a88765..77970df 100644 (file)
@@ -85,9 +85,6 @@ extern int _get_PVR(void);
 extern void giveup_fpu(struct task_struct *);
 extern void disable_kernel_fp(void);
 extern void enable_kernel_fp(void);
-extern void giveup_altivec(struct task_struct *);
-extern void disable_kernel_altivec(void);
-extern void enable_kernel_altivec(void);
 extern void cvt_fd(float *from, double *to, unsigned long *fpscr);
 extern void cvt_df(double *from, float *to, unsigned long *fpscr);
 extern int abs(int);
@@ -104,6 +101,13 @@ extern struct task_struct * _switch(struct thread_struct *prev,
 struct pt_regs;
 extern void dump_regs(struct pt_regs *);
 
+#define irqs_disabled()                                \
+({                                             \
+       unsigned long flags;                    \
+       local_save_flags(flags);                \
+       !(flags & MSR_EE);                      \
+})
+
 static inline int __is_processor(unsigned long pv)
 {
        unsigned long pvr;
index 42c0122..0a63e28 100644 (file)
@@ -74,8 +74,6 @@ static inline void __tlb_remove_tlb_entry(struct mmu_gather *tlb, pte_t *ptep,
        batch->index = i;
 }
 
-extern void pte_free_finish(void);
-
 static inline void tlb_flush(struct mmu_gather *tlb)
 {
        int cpu = smp_processor_id();
@@ -88,8 +86,6 @@ static inline void tlb_flush(struct mmu_gather *tlb)
 
        flush_hash_range(tlb->mm->context, batch->index, local);
        batch->index = 0;
-
-       pte_free_finish();
 }
 
 #endif /* _PPC64_TLB_H */
index fe85200..7687182 100644 (file)
 #define __NR_utimes            251
 #define __NR_statfs64          252
 #define __NR_fstatfs64         253
-#define __NR_fadvise64_64      254
-#define __NR_rtas              255
 
-#define __NR_syscalls          256
+#define __NR_syscalls          254
 #ifdef __KERNEL__
 #define NR_syscalls    __NR_syscalls
 #endif
                register unsigned long __sc_5  __asm__ ("r5");          \
                register unsigned long __sc_6  __asm__ ("r6");          \
                register unsigned long __sc_7  __asm__ ("r7");          \
-               register unsigned long __sc_8  __asm__ ("r8");          \
                                                                        \
                __sc_loadargs_##nr(name, args);                         \
                __asm__ __volatile__                                    \
                        : "=&r" (__sc_0),                               \
                          "=&r" (__sc_3),  "=&r" (__sc_4),              \
                          "=&r" (__sc_5),  "=&r" (__sc_6),              \
-                         "=&r" (__sc_7),  "=&r" (__sc_8)               \
+                         "=&r" (__sc_7)                                \
                        : __sc_asm_input_##nr                           \
                        : "cr0", "ctr", "memory",                       \
-                               "r9", "r10","r11", "r12");              \
+                         "r8", "r9", "r10","r11", "r12");              \
                __sc_ret = __sc_3;                                      \
                __sc_err = __sc_0;                                      \
        }                                                               \
 #define __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5)            \
        __sc_loadargs_4(name, arg1, arg2, arg3, arg4);                  \
        __sc_7 = (unsigned long) (arg5)
-#define __sc_loadargs_6(name, arg1, arg2, arg3, arg4, arg5, arg6)      \
-       __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5);            \
-       __sc_8 = (unsigned long) (arg6)
 
 #define __sc_asm_input_0 "0" (__sc_0)
 #define __sc_asm_input_1 __sc_asm_input_0, "1" (__sc_3)
 #define __sc_asm_input_3 __sc_asm_input_2, "3" (__sc_5)
 #define __sc_asm_input_4 __sc_asm_input_3, "4" (__sc_6)
 #define __sc_asm_input_5 __sc_asm_input_4, "5" (__sc_7)
-#define __sc_asm_input_6 __sc_asm_input_5, "6" (__sc_8)
 
 #define _syscall0(type,name)                                           \
 type name(void)                                                                \
@@ -376,11 +369,6 @@ type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5)      \
 {                                                                      \
        __syscall_nr(5, type, name, arg1, arg2, arg3, arg4, arg5);      \
 }
-#define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5,type6,arg6) \
-type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5, type6 arg6)      \
-{                                                                      \
-       __syscall_nr(6, type, name, arg1, arg2, arg3, arg4, arg5, arg6);        \
-}
 
 #ifdef __KERNEL_SYSCALLS__
 
diff --git a/include/asm-ppc64/vio.h b/include/asm-ppc64/vio.h
deleted file mode 100644 (file)
index 7ee1250..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * IBM PowerPC Virtual I/O Infrastructure Support.
- *
- *    Copyright (c) 2003 IBM Corp.
- *     Dave Engebretsen engebret@us.ibm.com
- *     Santiago Leon santil@us.ibm.com
- *
- *      This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- */
-
-#ifndef _VIO_H
-#define _VIO_H
-
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <asm/hvcall.h>
-#include <asm/prom.h>
-#include <asm/scatterlist.h>
-/* 
- * Architecture-specific constants for drivers to
- * extract attributes of the device using vio_get_attribute()
-*/
-#define VETH_MAC_ADDR "local-mac-address"
-#define VETH_MCAST_FILTER_SIZE "ibm,mac-address-filters"
-
-/* End architecture-specific constants */
-
-#define h_vio_signal(ua, mode) \
-  plpar_hcall_norets(H_VIO_SIGNAL, ua, mode)
-
-#define VIO_IRQ_DISABLE                0UL
-#define VIO_IRQ_ENABLE         1UL
-
-struct vio_dev;
-struct vio_driver;
-struct vio_device_id;
-struct TceTable;
-
-int vio_register_driver(struct vio_driver *drv);
-int vio_unregister_driver(struct vio_driver *drv);
-const struct vio_device_id * vio_match_device(const struct vio_device_id *ids, 
-                                               const struct vio_dev *dev);
-struct vio_dev * __devinit vio_register_device(struct device_node *node_vdev);
-int __devinit vio_unregister_device(struct vio_dev *dev);
-const void * vio_get_attribute(struct vio_dev *vdev, void* which, int* length);
-int vio_get_irq(struct vio_dev *dev);
-struct TceTable * vio_build_tce_table(struct vio_dev *dev);
-int vio_enable_interrupts(struct vio_dev *dev);
-int vio_disable_interrupts(struct vio_dev *dev);
-
-dma_addr_t vio_map_single(struct vio_dev *dev, void *vaddr, 
-                         size_t size, int direction);
-void vio_unmap_single(struct vio_dev *dev, dma_addr_t dma_handle, 
-                     size_t size, int direction);
-int vio_map_sg(struct vio_dev *vdev, struct scatterlist *sglist, 
-              int nelems, int direction);
-void vio_unmap_sg(struct vio_dev *vdev, struct scatterlist *sglist, 
-                 int nelems, int direction);
-void *vio_alloc_consistent(struct vio_dev *dev, size_t size, 
-                          dma_addr_t *dma_handle);
-void vio_free_consistent(struct vio_dev *dev, size_t size, void *vaddr, 
-                        dma_addr_t dma_handle);
-
-struct vio_device_id {
-       char *type;
-       char *compat;
-/* I don't think we need this
-       unsigned long driver_data;      */ /* Data private to the driver */
-};
-
-struct vio_driver {
-       struct list_head node;
-       char *name;
-       const struct vio_device_id *id_table;   /* NULL if wants all devices */
-       int  (*probe)  (struct vio_dev *dev, const struct vio_device_id *id);   /* New device inserted */
-       void (*remove) (struct vio_dev *dev);   /* Device removed (NULL if not a hot-plug capable driver) */
-       unsigned long driver_data;
-};
-
-struct vio_bus;
-/*
- * The vio_dev structure is used to describe virtual I/O devices.
- */
-struct vio_dev {
-       struct list_head devices_list;   /* node in list of all vio devices */
-       struct device_node *archdata;    /* Open Firmware node */
-       struct vio_bus *bus;            /* bus this device is on */
-       struct vio_driver *driver;      /* owning driver */
-       void *driver_data;              /* data private to the driver */
-       unsigned long unit_address;     
-
-       struct TceTable *tce_table; /* vio_map_* uses this */
-       unsigned int irq;
-       struct proc_dir_entry *procent; /* device entry in /proc/bus/vio */
-};
-
-struct vio_bus {
-       struct list_head devices;       /* list of virtual devices */
-};
-
-
-static inline int vio_module_init(struct vio_driver *drv)
-{
-        int rc = vio_register_driver (drv);
-
-        if (rc > 0)
-                return 0;
-
-        /* iff CONFIG_HOTPLUG and built into kernel, we should
-         * leave the driver around for future hotplug events.
-         * For the module case, a hotplug daemon of some sort
-         * should load a module in response to an insert event. */
-#if defined(CONFIG_HOTPLUG) && !defined(MODULE)
-        if (rc == 0)
-                return 0;
-#else
-        if (rc == 0)
-                rc = -ENODEV;
-#endif
-
-        /* if we get here, we need to clean up vio driver instance
-         * and return some sort of error */
-
-        return rc;
-}
-
-#endif /* _PHYP_H */
index 29a6461..fc103ce 100644 (file)
@@ -15,7 +15,6 @@
 #include <linux/cache.h>
 
 void xics_init_IRQ(void);
-void xics_init_irq_desc(irq_desc_t *);
 int xics_get_irq(struct pt_regs *);
 void xics_setup_cpu(void);
 void xics_cause_IPI(int cpu);
index f2a1b0b..5f00be7 100644 (file)
@@ -69,7 +69,7 @@ ccw_device_id_match(const struct ccw_device_id *array,
 /* The struct ccw device is our replacement for the globally accessible
  * ioinfo array. ioinfo will mutate into a subchannel device later.
  *
- * Reference: Documentation/driver-model.txt */
+ * Reference: Documentation/s390/driver-model.txt */
 struct ccw_device {
        spinlock_t *ccwlock;
        struct ccw_device_private *private;     /* cio private information */
diff --git a/include/asm-s390/cpumask.h b/include/asm-s390/cpumask.h
new file mode 100644 (file)
index 0000000..4deef16
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_S390_CPUMASK_H
+#define _ASM_S390_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_S390_CPUMASK_H */
index e6a3259..44ce8f8 100644 (file)
@@ -389,26 +389,6 @@ extern long __copy_from_user_asm(void *to, long n, const void *from);
         err;                                                    \
 })
 
-extern long __copy_in_user_asm(const void *from, long n, void *to);
-
-#define __copy_in_user(to, from, n)                            \
-({                                                             \
-       __copy_in_user_asm(from, n, to);                        \
-})
-
-#define copy_in_user(to, from, n)                              \
-({                                                             \
-       long err = 0;                                           \
-       __typeof__(n) __n = (n);                                \
-       might_sleep();                                          \
-       if (__access_ok(from,__n) && __access_ok(to,__n)) {     \
-               err = __copy_in_user_asm(from, __n, to);        \
-       }                                                       \
-       else                                                    \
-               err = __n;                                      \
-       err;                                                    \
-})
-
 /*
  * Copy a null terminated string from userspace.
  */
@@ -614,4 +594,5 @@ clear_user(void *to, unsigned long n)
        return n;
 }
 
-#endif /* __S390_UACCESS_H */
+
+#endif                                /* _S390_UACCESS_H                  */
diff --git a/include/asm-sh/cpumask.h b/include/asm-sh/cpumask.h
new file mode 100644 (file)
index 0000000..deaf3bb
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_SH_CPUMASK_H
+#define _ASM_SH_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_SH_CPUMASK_H */
diff --git a/include/asm-sparc/cpumask.h b/include/asm-sparc/cpumask.h
new file mode 100644 (file)
index 0000000..272f31d
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_SPARC_CPUMASK_H
+#define _ASM_SPARC_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_SPARC_CPUMASK_H */
index 2ae0e6b..b0c5a0d 100644 (file)
@@ -56,19 +56,12 @@ typedef struct {
 /* The Sparc processor specific thread struct. */
 struct thread_struct {
        struct pt_regs *kregs;
+       unsigned int _pad1;
 
        /* Special child fork kpsr/kwim values. */
        unsigned long fork_kpsr __attribute__ ((aligned (8)));
        unsigned long fork_kwim;
 
-       /* A place to store user windows and stack pointers
-        * when the stack needs inspection.
-        */
-#define NSWINS 8
-       struct reg_window reg_window[NSWINS] __attribute__ ((aligned (8)));
-       unsigned long rwbuf_stkptrs[NSWINS] __attribute__ ((aligned (8)));
-       unsigned long w_saved;
-
        /* Floating point regs */
        unsigned long   float_regs[32] __attribute__ ((aligned (8)));
        unsigned long   fsr;
@@ -78,23 +71,16 @@ struct thread_struct {
        mm_segment_t current_ds;
        struct exec core_exec;     /* just what it says. */
        int new_signal;
-       atomic_t refcount;      /* used for sun4c only */
 };
 
 #define SPARC_FLAG_KTHREAD      0x1    /* task is a kernel thread */
 #define SPARC_FLAG_UNALIGNED    0x2    /* is allowed to do unaligned accesses */
 
 #define INIT_THREAD  { \
-/* kregs, */ \
-   0,  \
+/* kregs, _pad1, */ \
+   0, 0,  \
 /* fork_kpsr, fork_kwim */ \
    0,         0, \
-/* reg_window */  \
-{ { { 0, }, { 0, } }, }, \
-/* rwbuf_stkptrs */  \
-{ 0, 0, 0, 0, 0, 0, 0, 0, }, \
-/* w_saved */ \
-   0, \
 /* FPU regs */   { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, \
                    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, \
 /* FPU status, FPU qdepth, FPU queue */ \
index 94ef106..56296b5 100644 (file)
 #ifndef __ASSEMBLY__
 
 #include <asm/btfixup.h>
+#include <asm/ptrace.h>
 
 /*
  * Low level task data.
  *
- * If you change this, change the TI_* offsets below to match. XXX check_asm.
- *
- * The uwinmask is a first class citizen among w_saved and friends.
- * XXX Is this a good idea? wof.S/wuf.S have to use w_saved anyway,
- *     so they waste a register on current, and an ld on fetching it.
+ * If you change this, change the TI_* offsets below to match.
  */
+#define NSWINS 8
 struct thread_info {
        unsigned long           uwinmask;
        struct task_struct      *task;          /* main task structure */
@@ -43,6 +41,13 @@ struct thread_info {
        unsigned long kpsr;
        unsigned long kwim;
 
+       /* A place to store user windows and stack pointers
+        * when the stack needs inspection.
+        */
+       struct reg_window       reg_window[NSWINS];     /* align for ldd! */
+       unsigned long           rwbuf_stkptrs[NSWINS];
+       unsigned long           w_saved;
+
        struct restart_block    restart_block;
 };
 
@@ -100,6 +105,7 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
 
 /*
  * Offsets in thread_info structure, used in assembly code
+ * The "#define REGWIN_SZ 0x40" was abolished, so no multiplications.
  */
 #define TI_UWINMASK    0x00    /* uwinmask */
 #define TI_TASK                0x04
@@ -113,7 +119,10 @@ BTFIXUPDEF_CALL(void, free_thread_info, struct thread_info *)
 #define TI_KPC         0x24    /* kpc (ldd'ed with kpc) */
 #define TI_KPSR                0x28    /* kpsr */
 #define TI_KWIM                0x2c    /* kwim (ldd'ed with kpsr) */
-#define TI_RESTART_BLOCK 0x30
+#define TI_REG_WINDOW  0x30
+#define TI_RWIN_SPTRS  0x230
+#define TI_W_SAVED     0x250
+/* #define TI_RESTART_BLOCK 0x25n */ /* Nobody cares */
 
 #define PREEMPT_ACTIVE         0x4000000
 
index 7fc9169..6490815 100644 (file)
@@ -9,7 +9,6 @@
 
 #include <linux/config.h>
 #include <asm/ptrace.h>
-#include <asm/psr.h>
 
 /* Store the register window onto the 8-byte aligned area starting
  * at %reg.  It might be %sp, it might not, we don't care.
         STORE_PT_INS(base_reg)
 
 #define SAVE_BOLIXED_USER_STACK(cur_reg, scratch) \
-        ld       [%cur_reg + AOFF_task_thread + AOFF_thread_w_saved], %scratch; \
+        ld       [%cur_reg + TI_W_SAVED], %scratch; \
         sll      %scratch, 2, %scratch; \
         add      %scratch, %cur_reg, %scratch; \
-        st       %sp, [%scratch + AOFF_task_thread + AOFF_thread_rwbuf_stkptrs]; \
+        st       %sp, [%scratch + TI_RWIN_SPTRS]; \
         sub      %scratch, %cur_reg, %scratch; \
         sll      %scratch, 4, %scratch; \
         add      %scratch, %cur_reg, %scratch; \
-        STORE_WINDOW(scratch + AOFF_task_thread + AOFF_thread_reg_window); \
+        STORE_WINDOW(scratch + TI_REG_WINDOW); \
         sub      %scratch, %cur_reg, %scratch; \
         srl      %scratch, 6, %scratch; \
         add      %scratch, 1, %scratch; \
-        st       %scratch, [%cur_reg + AOFF_task_thread + AOFF_thread_w_saved];
+        st       %scratch, [%cur_reg + TI_W_SAVED];
 
 #ifdef CONFIG_SMP
 #define LOAD_CURRENT4M(dest_reg, idreg) \
diff --git a/include/asm-sparc64/cpumask.h b/include/asm-sparc64/cpumask.h
new file mode 100644 (file)
index 0000000..ee60cae
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_SPARC64_CPUMASK_H
+#define _ASM_SPARC64_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_SPARC64_CPUMASK_H */
index 2890469..3cb8a2b 100644 (file)
 #if defined(CONFIG_HUGETLB_PAGE_SIZE_4MB)
 #define _PAGE_SZHUGE   _PAGE_SZ4MB
 #elif defined(CONFIG_HUGETLB_PAGE_SIZE_512K)
-#define _PAGE_SZHUGE   _PAGE_512K
+#define _PAGE_SZHUGE   _PAGE_SZ512K
 #elif defined(CONFIG_HUGETLB_PAGE_SIZE_64K)
-#define _PAGE_SZHUGE   _PAGE_64K
+#define _PAGE_SZHUGE   _PAGE_SZ64K
 #endif
 
 #define _PAGE_CACHE    (_PAGE_CP | _PAGE_CV)
index c50f9bb..a23261b 100644 (file)
@@ -56,65 +56,6 @@ typedef elf_greg_t elf_gregset_t[ELF_NGREG];
        pr_reg[16] = PT_REGS_SS(regs);          \
 } while(0);
 
-#define VSYSCALL_BASE  (__fix_to_virt(FIX_VSYSCALL))
-#define VSYSCALL_EHDR  ((const struct elfhdr *) VSYSCALL_BASE)
-#define VSYSCALL_ENTRY ((unsigned long) &__kernel_vsyscall)
-extern void *__kernel_vsyscall;
-
-/*
- * Architecture-neutral AT_ values in 0-17, leave some room
- * for more of them, start the x86-specific ones at 32.
- */
-#define AT_SYSINFO             32
-#define AT_SYSINFO_EHDR                33
-
-#define ARCH_DLINFO                                            \
-do {                                                           \
-               NEW_AUX_ENT(AT_SYSINFO, VSYSCALL_ENTRY);        \
-               NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE);    \
-} while (0)
-
-/*
- * These macros parameterize elf_core_dump in fs/binfmt_elf.c to write out
- * extra segments containing the vsyscall DSO contents.  Dumping its
- * contents makes post-mortem fully interpretable later without matching up
- * the same kernel and hardware config to see what PC values meant.
- * Dumping its extra ELF program headers includes all the other information
- * a debugger needs to easily find how the vsyscall DSO was being used.
- */
-#define ELF_CORE_EXTRA_PHDRS           (VSYSCALL_EHDR->e_phnum)
-#define ELF_CORE_WRITE_EXTRA_PHDRS                                           \
-do {                                                                         \
-       const struct elf_phdr *const vsyscall_phdrs =                         \
-               (const struct elf_phdr *) (VSYSCALL_BASE                      \
-                                          + VSYSCALL_EHDR->e_phoff);         \
-       int i;                                                                \
-       Elf32_Off ofs = 0;                                                    \
-       for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) {                        \
-               struct elf_phdr phdr = vsyscall_phdrs[i];                     \
-               if (phdr.p_type == PT_LOAD) {                                 \
-                       ofs = phdr.p_offset = offset;                         \
-                       offset += phdr.p_filesz;                              \
-               }                                                             \
-               else                                                          \
-                       phdr.p_offset += ofs;                                 \
-               phdr.p_paddr = 0; /* match other core phdrs */                \
-               DUMP_WRITE(&phdr, sizeof(phdr));                              \
-       }                                                                     \
-} while (0)
-#define ELF_CORE_WRITE_EXTRA_DATA                                            \
-do {                                                                         \
-       const struct elf_phdr *const vsyscall_phdrs =                         \
-               (const struct elf_phdr *) (VSYSCALL_BASE                      \
-                                          + VSYSCALL_EHDR->e_phoff);         \
-       int i;                                                                \
-       for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) {                        \
-               if (vsyscall_phdrs[i].p_type == PT_LOAD)                      \
-                       DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr,        \
-                                  vsyscall_phdrs[i].p_filesz);               \
-       }                                                                     \
-} while (0)
-
 /********* Bits for asm-um/delay.h **********/
 
 typedef unsigned long um_udelay_t;
index 74fb778..d2517a0 100644 (file)
@@ -1,5 +1,3 @@
-#include <asm-generic/vmlinux.lds.h>
-
   .fini      : { *(.fini)    } =0x9090
   _etext = .;
   PROVIDE (etext = .);
   }
   __initcall_end = .;
 
-  __con_initcall_start = .;
-  .con_initcall.init : { *(.con_initcall.init) }
-  __con_initcall_end = .;
-
   __uml_initcall_start = .;
   .uml.initcall.init : { *(.uml.initcall.init) }
   __uml_initcall_end = .;
   .uml.exitcall : { *(.uml.exitcall.exit) }
   __uml_exitcall_end = .;
 
-  . = ALIGN(4);
-  __alt_instructions = .;
-  .altinstructions : { *(.altinstructions) } 
-  __alt_instructions_end = .; 
-  .altinstr_replacement : { *(.altinstr_replacement) } 
-  /* .exit.text is discard at runtime, not link time, to deal with references
-     from .altinstructions and .eh_frame */
-  .exit.text : { *(.exit.text) }
-  .exit.data : { *(.exit.data) }
-  __preinit_array_start = .;
-  .preinit_array : { *(.preinit_array) }
-  __preinit_array_end = .;
-  __init_array_start = .;
-  .init_array : { *(.init_array) }
-  __init_array_end = .;
-  __fini_array_start = .;
-  .fini_array : { *(.fini_array) }
-  __fini_array_end = .;
-
-   . = ALIGN(4096);
+  . = ALIGN(4096);
   __initramfs_start = .;
   .init.ramfs : { *(.init.ramfs) }
   __initramfs_end = .;
-
-  /* Sections to be discarded */
-  /DISCARD/ : {
-       *(.exitcall.exit)
-  }
diff --git a/include/asm-um/cpufeature.h b/include/asm-um/cpufeature.h
deleted file mode 100644 (file)
index fb7bd42..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __UM_CPUFEATURE_H
-#define __UM_CPUFEATURE_H
-
-#include "asm/arch/cpufeature.h"
-
-#endif
diff --git a/include/asm-um/cpumask.h b/include/asm-um/cpumask.h
new file mode 100644 (file)
index 0000000..90f0d00
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_UM_CPUMASK_H
+#define _ASM_UM_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_UM_CPUMASK_H */
index 72a4cbd..adfe568 100644 (file)
@@ -16,10 +16,8 @@ struct thread_info;
 #define CURRENT_THREAD(dummy) (((unsigned long) &dummy) & \
                                (PAGE_MASK << CONFIG_KERNEL_STACK_ORDER))
 
-#define current_thread \
-       ({ int dummy; ((struct thread_info *) CURRENT_THREAD(dummy)); })
-
-#define current (current_thread->task)
+#define current ({ int dummy; \
+                   ((struct thread_info *) CURRENT_THREAD(dummy))->task; })
 
 #endif /* __ASSEMBLY__ */
 
index ef4890b..0e8a4c1 100644 (file)
@@ -34,7 +34,6 @@ enum fixed_addresses {
        FIX_KMAP_BEGIN, /* reserved pte's for temporary kernel mappings */
        FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
 #endif
-       FIX_VSYSCALL,
        __end_of_fixed_addresses
 };
 
@@ -64,13 +63,6 @@ extern unsigned long get_kmem_end(void);
 #define __fix_to_virt(x)       (FIXADDR_TOP - ((x) << PAGE_SHIFT))
 #define __virt_to_fix(x)      ((FIXADDR_TOP - ((x)&PAGE_MASK)) >> PAGE_SHIFT)
 
-/*
- * This is the range that is readable by user mode, and things
- * acting like user mode such as get_user_pages.
- */
-#define FIXADDR_USER_START     (__fix_to_virt(FIX_VSYSCALL))
-#define FIXADDR_USER_END       (FIXADDR_USER_START + PAGE_SIZE)
-
 extern void __this_fixmap_does_not_exist(void);
 
 /*
index de389a4..cd580ac 100644 (file)
@@ -1,6 +1,15 @@
 #ifndef __UM_IRQ_H
 #define __UM_IRQ_H
 
+/* The i386 irq.h has a struct task_struct in a prototype without including
+ * sched.h.  This forward declaration kills the resulting warning.
+ */
+struct task_struct;
+
+#include "asm/ptrace.h"
+
+#undef NR_IRQS
+
 #define TIMER_IRQ              0
 #define UMN_IRQ                        1
 #define CONSOLE_IRQ            2
@@ -19,4 +28,8 @@
 #define LAST_IRQ XTERM_IRQ
 #define NR_IRQS (LAST_IRQ + 1)
 
+extern int um_request_irq(unsigned int irq, int fd, int type,
+                         void (*handler)(int, void *, struct pt_regs *),
+                         unsigned long irqflags,  const char * devname,
+                         void *dev_id);
 #endif
diff --git a/include/asm-um/local.h b/include/asm-um/local.h
deleted file mode 100644 (file)
index 9a280c5..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __UM_LOCAL_H
-#define __UM_LOCAL_H
-
-#include "asm/arch/local.h"
-
-#endif
diff --git a/include/asm-um/module-generic.h b/include/asm-um/module-generic.h
deleted file mode 100644 (file)
index 5a265f5..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#ifndef __UM_MODULE_GENERIC_H
-#define __UM_MODULE_GENERIC_H
-
-#include "asm/arch/module.h"
-
-#endif
diff --git a/include/asm-um/module-i386.h b/include/asm-um/module-i386.h
deleted file mode 100644 (file)
index 5ead4a0..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef __UM_MODULE_I386_H
-#define __UM_MODULE_I386_H
-
-/* UML is simple */
-struct mod_arch_specific
-{
-};
-
-#define Elf_Shdr Elf32_Shdr
-#define Elf_Sym Elf32_Sym
-#define Elf_Ehdr Elf32_Ehdr
-
-#endif
index 7f35318..ad97bc0 100644 (file)
@@ -4,6 +4,7 @@
 struct page;
 
 #include "asm/arch/page.h"
+#include "asm/bug.h"
 
 #undef __pa
 #undef __va
index ef43b00..2d7896d 100644 (file)
@@ -78,13 +78,12 @@ extern unsigned long high_physmem;
 
 #define _PAGE_PRESENT  0x001
 #define _PAGE_NEWPAGE  0x002
-#define _PAGE_NEWPROT   0x004
-#define _PAGE_FILE     0x008   /* set:pagecache unset:swap */
-#define _PAGE_PROTNONE 0x010   /* If not present */
-#define _PAGE_RW       0x020
-#define _PAGE_USER     0x040
-#define _PAGE_ACCESSED 0x080
-#define _PAGE_DIRTY    0x100
+#define _PAGE_PROTNONE 0x004   /* If not present */
+#define _PAGE_RW       0x008
+#define _PAGE_USER     0x010
+#define _PAGE_ACCESSED 0x020
+#define _PAGE_DIRTY    0x040
+#define _PAGE_NEWPROT   0x080
 
 #define REGION_MASK    0xf0000000
 #define REGION_SHIFT   28
@@ -203,16 +202,6 @@ extern unsigned long pfn_to_phys(unsigned long pfn);
 #define pfn_pte(pfn, prot) __pte(pfn_to_phys(pfn) | pgprot_val(prot))
 #define pfn_pmd(pfn, prot) __pmd(pfn_to_phys(pfn) | pgprot_val(prot))
 
-/*
- * Bits 0 through 3 are taken
- */
-#define PTE_FILE_MAX_BITS      28
-
-#define pte_to_pgoff(pte) ((pte).pte_low >> 4)
-
-#define pgoff_to_pte(off) \
-       ((pte_t) { ((off) << 4) + _PAGE_FILE })
-
 static inline pte_t pte_mknewprot(pte_t pte)
 {
        pte_val(pte) |= _PAGE_NEWPROT;
@@ -246,12 +235,6 @@ static inline void set_pte(pte_t *pteptr, pte_t pteval)
  * The following only work if pte_present() is true.
  * Undefined behaviour if not..
  */
-static inline int pte_user(pte_t pte)
-{ 
-       return((pte_val(pte) & _PAGE_USER) && 
-              !(pte_val(pte) & _PAGE_PROTNONE));
-}
-
 static inline int pte_read(pte_t pte)
 { 
        return((pte_val(pte) & _PAGE_USER) && 
@@ -269,14 +252,6 @@ static inline int pte_write(pte_t pte)
               !(pte_val(pte) & _PAGE_PROTNONE));
 }
 
-/*
- * The following only works if pte_present() is not true.
- */
-static inline int pte_file(pte_t pte)
-{ 
-       return (pte).pte_low & _PAGE_FILE; 
-}
-
 static inline int pte_dirty(pte_t pte) { return pte_val(pte) & _PAGE_DIRTY; }
 static inline int pte_young(pte_t pte) { return pte_val(pte) & _PAGE_ACCESSED; }
 static inline int pte_newpage(pte_t pte) { return pte_val(pte) & _PAGE_NEWPAGE; }
@@ -379,26 +354,14 @@ static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 #define pmd_page(pmd) (phys_mem_map(pmd_val(pmd) & PAGE_MASK) + \
                       ((phys_addr(pmd_val(pmd)) >> PAGE_SHIFT)))
 
-/*
- * the pgd page can be thought of an array like this: pgd_t[PTRS_PER_PGD]
- *
- * this macro returns the index of the entry in the pgd page which would
- * control the given virtual address
- */
+/* to find an entry in a page-table-directory. */
 #define pgd_index(address) ((address >> PGDIR_SHIFT) & (PTRS_PER_PGD-1))
 
-/*
- * pgd_offset() returns a (pgd_t *)
- * pgd_index() is used get the offset into the pgd page's array of pgd_t's;
- */
+/* to find an entry in a page-table-directory */
 #define pgd_offset(mm, address) \
 ((mm)->pgd + ((address) >> PGDIR_SHIFT))
 
-
-/*
- * a shortcut which implies the use of the kernel's pgd, instead
- * of a process's
- */
+/* to find an entry in a kernel page-table-directory */
 #define pgd_offset_k(address) pgd_offset(&init_mm, address)
 
 #define pmd_index(address) \
@@ -410,12 +373,7 @@ static inline pmd_t * pmd_offset(pgd_t * dir, unsigned long address)
        return (pmd_t *) dir;
 }
 
-/*
- * the pte page can be thought of an array like this: pte_t[PTRS_PER_PTE]
- *
- * this macro returns the index of the entry in the pte page which would
- * control the given virtual address
- */
+/* Find an entry in the third-level page table.. */ 
 #define pte_index(address) (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1))
 #define pte_offset_kernel(dir, address) \
        ((pte_t *) pmd_page_kernel(*(dir)) +  pte_index(address))
@@ -441,11 +399,11 @@ typedef pte_t *pte_addr_t;
 #define update_mmu_cache(vma,address,pte) do ; while (0)
 
 /* Encode and de-code a swap entry */
-#define __swp_type(x)                  (((x).val >> 4) & 0x3f)
-#define __swp_offset(x)                        ((x).val >> 11)
+#define __swp_type(x)                  (((x).val >> 3) & 0x7f)
+#define __swp_offset(x)                        ((x).val >> 10)
 
 #define __swp_entry(type, offset) \
-       ((swp_entry_t) { ((type) << 4) | ((offset) << 11) })
+       ((swp_entry_t) { ((type) << 3) | ((offset) << 10) })
 #define __pte_to_swp_entry(pte) \
        ((swp_entry_t) { pte_val(pte_mkuptodate(pte)) })
 #define __swp_entry_to_pte(x)          ((pte_t) { (x).val })
index 07e5c61..61860dc 100644 (file)
@@ -11,7 +11,9 @@ struct pt_regs;
 struct task_struct;
 
 #include "linux/config.h"
+#include "linux/signal.h"
 #include "asm/ptrace.h"
+#include "asm/siginfo.h"
 #include "choose-mode.h"
 
 struct mm_struct;
@@ -99,19 +101,14 @@ typedef struct {
 } mm_segment_t;
 
 extern struct task_struct *alloc_task_struct(void);
+extern void free_task_struct(struct task_struct *task);
 
 extern void release_thread(struct task_struct *);
 extern int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
 extern void dump_thread(struct pt_regs *regs, struct user *u);
-extern void prepare_to_copy(struct task_struct *tsk);
 
 extern unsigned long thread_saved_pc(struct task_struct *t);
 
-static inline void mm_copy_segments(struct mm_struct *from_mm, 
-                                   struct mm_struct *new_mm)
-{
-}
-
 #define init_stack     (init_thread_union.stack)
 
 /*
index 0f08c02..02decdc 100644 (file)
@@ -6,8 +6,8 @@
 #ifndef __UM_PROCESSOR_I386_H
 #define __UM_PROCESSOR_I386_H
 
-extern int host_has_xmm;
-extern int host_has_cmov;
+extern int cpu_has_xmm;
+extern int cpu_has_cmov;
 
 struct arch_thread {
        unsigned long debugregs[8];
diff --git a/include/asm-um/sections.h b/include/asm-um/sections.h
deleted file mode 100644 (file)
index 6b0231e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _UM_SECTIONS_H
-#define _UM_SECTIONS_H
-
-/* nothing to see, move along */
-#include <asm-generic/sections.h>
-
-#endif
index fca2730..8464612 100644 (file)
@@ -10,7 +10,7 @@
 
 extern cpumask_t cpu_online_map;
 
-#define smp_processor_id() (current_thread->cpu)
+#define smp_processor_id() (current->thread_info->cpu)
 #define cpu_logical_map(n) (n)
 #define cpu_number_map(n) (n)
 #define PROC_CHANGE_PENALTY    15 /* Pick a number, any number */
index 5bcfa35..80b24a3 100644 (file)
@@ -23,10 +23,8 @@ extern int get_signals(void);
 extern void block_signals(void);
 extern void unblock_signals(void);
 
-#define local_save_flags(flags) do { typecheck(unsigned long, flags); \
-                                    (flags) = get_signals(); } while(0)
-#define local_irq_restore(flags) do { typecheck(unsigned long, flags); \
-                                     set_signals(flags); } while(0)
+#define local_save_flags(flags) do { (flags) = get_signals(); } while(0)
+#define local_irq_restore(flags) do { set_signals(flags); } while(0)
 
 #define local_irq_save(flags) do { local_save_flags(flags); \
                                    local_irq_disable(); } while(0)
@@ -41,7 +39,4 @@ extern void unblock_signals(void);
         (flags == 0);                   \
 })
 
-extern void *_switch_to(void *prev, void *next, void *last);
-#define switch_to(prev, next, last) prev = _switch_to(prev, next, last)
-
 #endif
index bb1bc2d..6a606bf 100644 (file)
@@ -9,7 +9,6 @@
 #ifndef __ASSEMBLY__
 
 #include <asm/processor.h>
-#include <asm/types.h>
 
 struct thread_info {
        struct task_struct      *task;          /* main task structure */
@@ -44,18 +43,15 @@ struct thread_info {
 static inline struct thread_info *current_thread_info(void)
 {
        struct thread_info *ti;
-       unsigned long mask = PAGE_SIZE * 
-               (1 << CONFIG_KERNEL_STACK_ORDER) - 1;
-       __asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~mask));
+       __asm__("andl %%esp,%0; ":"=r" (ti) : "0" (~16383UL));
        return ti;
 }
 
 /* thread information allocation */
-#define THREAD_SIZE ((1 << CONFIG_KERNEL_STACK_ORDER) * PAGE_SIZE)
-#define alloc_thread_info(tsk) \
-       ((struct thread_info *) kmalloc(THREAD_SIZE, GFP_KERNEL))
-#define free_thread_info(ti) kfree(ti)
-       
+#define THREAD_SIZE (4*PAGE_SIZE)
+#define alloc_thread_info(tsk) ((struct thread_info *) \
+       __get_free_pages(GFP_KERNEL,2))
+#define free_thread_info(ti) free_pages((unsigned long) (ti), 2)
 #define get_thread_info(ti) get_task_struct((ti)->task)
 #define put_thread_info(ti) put_task_struct((ti)->task)
 
@@ -69,13 +65,11 @@ static inline struct thread_info *current_thread_info(void)
 #define TIF_POLLING_NRFLAG      3       /* true if poll_idle() is polling 
                                         * TIF_NEED_RESCHED 
                                         */
-#define TIF_RESTART_BLOCK      4
 
 #define _TIF_SYSCALL_TRACE     (1 << TIF_SYSCALL_TRACE)
 #define _TIF_SIGPENDING                (1 << TIF_SIGPENDING)
 #define _TIF_NEED_RESCHED      (1 << TIF_NEED_RESCHED)
 #define _TIF_POLLING_NRFLAG     (1 << TIF_POLLING_NRFLAG)
-#define _TIF_RESTART_BLOCK     (1 << TIF_RESTART_BLOCK)
 
 #endif
 
index 5805811..6a87313 100644 (file)
@@ -1,6 +1,8 @@
 #ifndef __UM_TIMEX_H
 #define __UM_TIMEX_H
 
+#include "linux/time.h"
+
 typedef unsigned long cycles_t;
 
 #define cacheflush_time (0)
diff --git a/include/asm-v850/cpumask.h b/include/asm-v850/cpumask.h
new file mode 100644 (file)
index 0000000..09aebd0
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_V850_CPUMASK_H
+#define _ASM_V850_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_V850_CPUMASK_H */
index 83c98f8..5c89a5f 100644 (file)
@@ -1,13 +1,11 @@
 #ifndef __X8664_A_OUT_H__
 #define __X8664_A_OUT_H__
 
-
-/* Note: a.out is not supported in 64bit mode. This is just here to 
-   still let some old things compile. */ 
+/* 32bit a.out */
 
 struct exec
 {
-  unsigned long a_info;                /* Use macros N_MAGIC, etc for access */
+  unsigned int a_info;         /* Use macros N_MAGIC, etc for access */
   unsigned a_text;             /* length of text, in bytes */
   unsigned a_data;             /* length of data, in bytes */
   unsigned a_bss;              /* length of uninitialized data area for file, in bytes */
@@ -23,7 +21,7 @@ struct exec
 
 #ifdef __KERNEL__
 
-#define STACK_TOP      TASK_SIZE
+#define STACK_TOP      0xc0000000
 
 #endif
 
index c7b58c9..cea3a65 100644 (file)
@@ -79,7 +79,7 @@ extern void disable_lapic_nmi_watchdog(void);
 extern void enable_lapic_nmi_watchdog(void);
 extern void disable_timer_nmi_watchdog(void);
 extern void enable_timer_nmi_watchdog(void);
-extern void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
+extern inline void nmi_watchdog_tick (struct pt_regs * regs, unsigned reason);
 extern int APIC_init_uniprocessor (void);
 extern void disable_APIC_timer(void);
 extern void enable_APIC_timer(void);
index fffada4..e5d85ff 100644 (file)
@@ -7,14 +7,6 @@
 
 #include <linux/config.h>
 
-/*
- * These have to be done with inline assembly: that way the bit-setting
- * is guaranteed to be atomic. All bit operations return 0 if the bit
- * was cleared before the operation and != 0 if it was not.
- *
- * bit 0 is the LSB of addr; bit 32 is the LSB of (addr+1).
- */
-
 #ifdef CONFIG_SMP
 #define LOCK_PREFIX "lock ; "
 #else
@@ -363,26 +355,26 @@ static __inline__ int find_first_bit(const unsigned long * addr, unsigned size)
  */
 static __inline__ int find_next_bit(const unsigned long * addr, int size, int offset)
 {
-       unsigned int * p = ((unsigned int *) addr) + (offset >> 5);
-       int set = 0, bit = offset & 31, res;
+       const unsigned long * p = addr + (offset >> 6);
+       unsigned long set = 0, bit = offset & 63, res;
        
        if (bit) {
                /*
-                * Look for nonzero in the first 32 bits:
+                * Look for nonzero in the first 64 bits:
                 */
-               __asm__("bsfl %1,%0\n\t"
-                       "cmovel %2,%0\n\t"
+               __asm__("bsfq %1,%0\n\t"
+                       "cmoveq %2,%0\n\t"
                        : "=r" (set)
-                       : "r" (*p >> bit), "r" (32));
-               if (set < (32 - bit))
+                       : "r" (*p >> bit), "r" (64L));
+               if (set < (64 - bit))
                        return set + offset;
-               set = 32 - bit;
+               set = 64 - bit;
                p++;
        }
        /*
         * No set bit yet, search remaining full words for a bit
         */
-       res = find_first_bit ((const unsigned long *)p, size - 32 * (p - (unsigned int *) addr));
+       res = find_first_bit (p, size - 64 * (p - addr));
        return (offset + set + res);
 }
 
diff --git a/include/asm-x86_64/cpumask.h b/include/asm-x86_64/cpumask.h
new file mode 100644 (file)
index 0000000..d9ea497
--- /dev/null
@@ -0,0 +1,6 @@
+#ifndef _ASM_X86_64_CPUMASK_H
+#define _ASM_X86_64_CPUMASK_H
+
+#include <asm-generic/cpumask.h>
+
+#endif /* _ASM_X86_64_CPUMASK_H */
index 45eed1a..f127092 100644 (file)
@@ -190,7 +190,7 @@ static inline void load_TLS(struct thread_struct *t, unsigned int cpu)
 /*
  * load one particular LDT into the current CPU
  */
-static inline void load_LDT_nolock (mm_context_t *pc, int cpu)
+extern inline void load_LDT_nolock (mm_context_t *pc, int cpu)
 {
        int count = pc->size;
 
index a582cfc..cf8b16c 100644 (file)
@@ -76,7 +76,7 @@ extern void __this_fixmap_does_not_exist(void);
  * directly without translation, we catch the bug with a NULL-deference
  * kernel oops. Illegal ranges of incoming indices are caught too.
  */
-static inline unsigned long fix_to_virt(const unsigned int idx)
+extern inline unsigned long fix_to_virt(const unsigned int idx)
 {
        /*
         * this branch gets completely eliminated after inlining,
index e1423be..931aa2b 100644 (file)
@@ -72,7 +72,7 @@ struct hw_interrupt_type;
  * levels. (0x80 is the syscall vector)
  */
 #define FIRST_DEVICE_VECTOR    0x31
-#define FIRST_SYSTEM_VECTOR    0xef
+#define FIRST_SYSTEM_VECTOR    0xef   /* duplicated in irq.h */
 
 
 #ifndef __ASSEMBLY__
@@ -173,6 +173,8 @@ static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {
 static inline void hw_resend_irq(struct hw_interrupt_type *h, unsigned int i) {}
 #endif
 
+#define platform_legacy_irq(irq)       ((irq) < 16)
+
 #endif
 
 #endif /* _ASM_HW_IRQ_H */
index 35b9287..7d37aa7 100644 (file)
@@ -52,7 +52,7 @@
  * Talk about misusing macros..
  */
 #define __OUT1(s,x) \
-static inline void out##s(unsigned x value, unsigned short port) {
+extern inline void out##s(unsigned x value, unsigned short port) {
 
 #define __OUT2(s,s1,s2) \
 __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
@@ -62,7 +62,7 @@ __OUT1(s,x) __OUT2(s,s1,"w") : : "a" (value), "Nd" (port)); } \
 __OUT1(s##_p,x) __OUT2(s,s1,"w") __FULL_SLOW_DOWN_IO : : "a" (value), "Nd" (port));} \
 
 #define __IN1(s) \
-static inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v;
+extern inline RETURN_TYPE in##s(unsigned short port) { RETURN_TYPE _v;
 
 #define __IN2(s,s1,s2) \
 __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
@@ -72,12 +72,12 @@ __IN1(s) __IN2(s,s1,"w") : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \
 __IN1(s##_p) __IN2(s,s1,"w") __FULL_SLOW_DOWN_IO : "=a" (_v) : "Nd" (port) ,##i ); return _v; } \
 
 #define __INS(s) \
-static inline void ins##s(unsigned short port, void * addr, unsigned long count) \
+extern inline void ins##s(unsigned short port, void * addr, unsigned long count) \
 { __asm__ __volatile__ ("rep ; ins" #s \
 : "=D" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }
 
 #define __OUTS(s) \
-static inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
+extern inline void outs##s(unsigned short port, const void * addr, unsigned long count) \
 { __asm__ __volatile__ ("rep ; outs" #s \
 : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }
 
@@ -125,12 +125,12 @@ __OUTS(l)
  * Change virtual addresses to physical addresses and vv.
  * These are pretty trivial
  */
-static inline unsigned long virt_to_phys(volatile void * address)
+extern inline unsigned long virt_to_phys(volatile void * address)
 {
        return __pa(address);
 }
 
-static inline void * phys_to_virt(unsigned long address)
+extern inline void * phys_to_virt(unsigned long address)
 {
        return __va(address);
 }
@@ -148,7 +148,7 @@ static inline void * phys_to_virt(unsigned long address)
 
 extern void * __ioremap(unsigned long offset, unsigned long size, unsigned long flags);
 
-static inline void * ioremap (unsigned long offset, unsigned long size)
+extern inline void * ioremap (unsigned long offset, unsigned long size)
 {
        return __ioremap(offset, size, 0);
 }
index d24f536..5f31a27 100644 (file)
 
 #ifdef CONFIG_X86_IO_APIC
 
+#ifdef CONFIG_PCI_USE_VECTOR
+static inline int use_pci_vector(void) {return 1;}
+static inline void disable_edge_ioapic_vector(unsigned int vector) { }
+static inline void mask_and_ack_level_ioapic_vector(unsigned int vector) { }
+static inline void end_edge_ioapic_vector (unsigned int vector) { }
+#define startup_level_ioapic   startup_level_ioapic_vector
+#define shutdown_level_ioapic  mask_IO_APIC_vector
+#define enable_level_ioapic    unmask_IO_APIC_vector
+#define disable_level_ioapic   mask_IO_APIC_vector
+#define mask_and_ack_level_ioapic mask_and_ack_level_ioapic_vector
+#define end_level_ioapic       end_level_ioapic_vector
+#define set_ioapic_affinity    set_ioapic_affinity_vector
+
+#define startup_edge_ioapic    startup_edge_ioapic_vector
+#define shutdown_edge_ioapic   disable_edge_ioapic_vector
+#define enable_edge_ioapic     unmask_IO_APIC_vector
+#define disable_edge_ioapic    disable_edge_ioapic_vector
+#define ack_edge_ioapic        ack_edge_ioapic_vector
+#define end_edge_ioapic        end_edge_ioapic_vector
+#else
+static inline int use_pci_vector(void) {return 0;}
+static inline void disable_edge_ioapic_irq(unsigned int irq) { }
+static inline void mask_and_ack_level_ioapic_irq(unsigned int irq) { }
+static inline void end_edge_ioapic_irq (unsigned int irq) { }
+#define startup_level_ioapic   startup_level_ioapic_irq
+#define shutdown_level_ioapic  mask_IO_APIC_irq
+#define enable_level_ioapic    unmask_IO_APIC_irq
+#define disable_level_ioapic   mask_IO_APIC_irq
+#define mask_and_ack_level_ioapic mask_and_ack_level_ioapic_irq
+#define end_level_ioapic       end_level_ioapic_irq
+#define set_ioapic_affinity    set_ioapic_affinity_irq
+
+#define startup_edge_ioapic    startup_edge_ioapic_irq
+#define shutdown_edge_ioapic   disable_edge_ioapic_irq
+#define enable_edge_ioapic     unmask_IO_APIC_irq
+#define disable_edge_ioapic    disable_edge_ioapic_irq
+#define ack_edge_ioapic        ack_edge_ioapic_irq
+#define end_edge_ioapic        end_edge_ioapic_irq
+#endif
+
 #define APIC_MISMATCH_DEBUG
 
 #define IO_APIC_BASE(idx) \
@@ -174,6 +214,8 @@ extern int sis_apic_bug; /* dummy */
 #define io_apic_assign_pci_irqs 0
 #endif
 
+extern int assign_irq_vector(int irq);
+
 void enable_NMI_through_LVT0 (void * dummy);
 
 #endif
index f7512e0..ad5445e 100644 (file)
  * Since vectors 0x00-0x1f are used/reserved for the CPU,
  * the usable vector space is 0x20-0xff (224 vectors)
  */
+
+/*
+ * The maximum number of vectors supported by x86_64 processors
+ * is limited to 256. For processors other than x86_64, NR_VECTORS
+ * should be changed accordingly.
+ */
+#define NR_VECTORS 256
+
+#define FIRST_SYSTEM_VECTOR    0xef   /* duplicated in hw_irq.h */
+
+#ifdef CONFIG_PCI_USE_VECTOR
+#define NR_IRQS FIRST_SYSTEM_VECTOR
+#define NR_IRQ_VECTORS NR_IRQS
+#else
 #define NR_IRQS 224
 #define NR_IRQ_VECTORS NR_IRQS
+#endif
 
 static __inline__ int irq_canonicalize(int irq)
 {
@@ -32,6 +47,7 @@ static __inline__ int irq_canonicalize(int irq)
 extern void disable_irq(unsigned int);
 extern void disable_irq_nosync(unsigned int);
 extern void enable_irq(unsigned int);
+extern int can_request_irq(unsigned int, unsigned long flags);
 
 #ifdef CONFIG_X86_LOCAL_APIC
 #define ARCH_HAS_NMI_WATCHDOG          /* See include/linux/nmi.h */
index 5d08052..342b468 100644 (file)
@@ -67,7 +67,7 @@
                          : "=a" (low), "=d" (high) \
                          : "c" (counter))
 
-static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
+extern inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
 {
        __asm__("cpuid"
                : "=a" (*eax),
@@ -80,7 +80,7 @@ static inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
 /*
  * CPUID functions returning a single datum
  */
-static inline unsigned int cpuid_eax(unsigned int op)
+extern inline unsigned int cpuid_eax(unsigned int op)
 {
        unsigned int eax;
 
@@ -90,7 +90,7 @@ static inline unsigned int cpuid_eax(unsigned int op)
                : "bx", "cx", "dx");
        return eax;
 }
-static inline unsigned int cpuid_ebx(unsigned int op)
+extern inline unsigned int cpuid_ebx(unsigned int op)
 {
        unsigned int eax, ebx;
 
@@ -100,7 +100,7 @@ static inline unsigned int cpuid_ebx(unsigned int op)
                : "cx", "dx" );
        return ebx;
 }
-static inline unsigned int cpuid_ecx(unsigned int op)
+extern inline unsigned int cpuid_ecx(unsigned int op)
 {
        unsigned int eax, ecx;
 
@@ -110,7 +110,7 @@ static inline unsigned int cpuid_ecx(unsigned int op)
                : "bx", "dx" );
        return ecx;
 }
-static inline unsigned int cpuid_edx(unsigned int op)
+extern inline unsigned int cpuid_edx(unsigned int op)
 {
        unsigned int eax, edx;
 
index 5cc77b7..e15895c 100644 (file)
@@ -69,7 +69,7 @@ extern __inline__ void pte_free_kernel(pte_t *pte)
        free_page((unsigned long)pte); 
 }
 
-static inline void pte_free(struct page *pte)
+extern inline void pte_free(struct page *pte)
 {
        __free_page(pte);
 } 
index f1e777e..e48a738 100644 (file)
@@ -71,7 +71,7 @@ extern unsigned long empty_zero_page[1024];
 #define pml4_none(x)   (!pml4_val(x))
 #define pgd_none(x)    (!pgd_val(x))
 
-static inline int pgd_present(pgd_t pgd)       { return !pgd_none(pgd); }
+extern inline int pgd_present(pgd_t pgd)       { return !pgd_none(pgd); }
 
 static inline void set_pte(pte_t *dst, pte_t val)
 {
@@ -88,7 +88,7 @@ static inline void set_pgd(pgd_t *dst, pgd_t val)
        pgd_val(*dst) = pgd_val(val); 
 } 
 
-static inline void pgd_clear (pgd_t * pgd)
+extern inline void pgd_clear (pgd_t * pgd)
 {
        set_pgd(pgd, __pgd(0));
 }
@@ -245,23 +245,23 @@ static inline pte_t pfn_pte(unsigned long page_nr, pgprot_t pgprot)
  * Undefined behaviour if not..
  */
 static inline int pte_user(pte_t pte)          { return pte_val(pte) & _PAGE_USER; }
-static inline int pte_read(pte_t pte)          { return pte_val(pte) & _PAGE_USER; }
-static inline int pte_exec(pte_t pte)          { return pte_val(pte) & _PAGE_USER; }
-static inline int pte_dirty(pte_t pte)         { return pte_val(pte) & _PAGE_DIRTY; }
-static inline int pte_young(pte_t pte)         { return pte_val(pte) & _PAGE_ACCESSED; }
-static inline int pte_write(pte_t pte)         { return pte_val(pte) & _PAGE_RW; }
+extern inline int pte_read(pte_t pte)          { return pte_val(pte) & _PAGE_USER; }
+extern inline int pte_exec(pte_t pte)          { return pte_val(pte) & _PAGE_USER; }
+extern inline int pte_dirty(pte_t pte)         { return pte_val(pte) & _PAGE_DIRTY; }
+extern inline int pte_young(pte_t pte)         { return pte_val(pte) & _PAGE_ACCESSED; }
+extern inline int pte_write(pte_t pte)         { return pte_val(pte) & _PAGE_RW; }
 static inline int pte_file(pte_t pte)          { return pte_val(pte) & _PAGE_FILE; }
 
-static inline pte_t pte_rdprotect(pte_t pte)   { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; }
-static inline pte_t pte_exprotect(pte_t pte)   { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; }
-static inline pte_t pte_mkclean(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; }
-static inline pte_t pte_mkold(pte_t pte)       { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; }
-static inline pte_t pte_wrprotect(pte_t pte)   { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); return pte; }
-static inline pte_t pte_mkread(pte_t pte)      { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; }
-static inline pte_t pte_mkexec(pte_t pte)      { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; }
-static inline pte_t pte_mkdirty(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; }
-static inline pte_t pte_mkyoung(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; }
-static inline pte_t pte_mkwrite(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; }
+extern inline pte_t pte_rdprotect(pte_t pte)   { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; }
+extern inline pte_t pte_exprotect(pte_t pte)   { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_USER)); return pte; }
+extern inline pte_t pte_mkclean(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_DIRTY)); return pte; }
+extern inline pte_t pte_mkold(pte_t pte)       { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_ACCESSED)); return pte; }
+extern inline pte_t pte_wrprotect(pte_t pte)   { set_pte(&pte, __pte(pte_val(pte) & ~_PAGE_RW)); return pte; }
+extern inline pte_t pte_mkread(pte_t pte)      { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; }
+extern inline pte_t pte_mkexec(pte_t pte)      { set_pte(&pte, __pte(pte_val(pte) | _PAGE_USER)); return pte; }
+extern inline pte_t pte_mkdirty(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) | _PAGE_DIRTY)); return pte; }
+extern inline pte_t pte_mkyoung(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) | _PAGE_ACCESSED)); return pte; }
+extern inline pte_t pte_mkwrite(pte_t pte)     { set_pte(&pte, __pte(pte_val(pte) | _PAGE_RW)); return pte; }
 static inline  int ptep_test_and_clear_dirty(pte_t *ptep)      { return test_and_clear_bit(_PAGE_BIT_DIRTY, ptep); }
 static inline  int ptep_test_and_clear_young(pte_t *ptep)      { return test_and_clear_bit(_PAGE_BIT_ACCESSED, ptep); }
 static inline void ptep_set_wrprotect(pte_t *ptep)             { clear_bit(_PAGE_BIT_RW, ptep); }
@@ -362,7 +362,7 @@ static inline pte_t mk_pte_phys(unsigned long physpage, pgprot_t pgprot)
 }
  
 /* Change flags of a PTE */
-static inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
+extern inline pte_t pte_modify(pte_t pte, pgprot_t newprot)
 { 
        pte_val(pte) &= _PAGE_CHG_MASK;
        pte_val(pte) |= pgprot_val(newprot);
index c430244..f468b68 100644 (file)
@@ -304,13 +304,13 @@ extern unsigned long get_wchan(struct task_struct *p);
 #define KSTK_ESP(tsk) -1 /* sorry. doesn't work for syscall. */
 
 /* REP NOP (PAUSE) is a good thing to insert into busy-wait loops. */
-static inline void rep_nop(void)
+extern inline void rep_nop(void)
 {
        __asm__ __volatile__("rep;nop": : :"memory");
 }
 
 /* Stop speculative execution */
-static inline void sync_core(void)
+extern inline void sync_core(void)
 { 
        int tmp;
        asm volatile("cpuid" : "=a" (tmp) : "0" (1) : "ebx","ecx","edx","memory");
index 2976716..fd9f00d 100644 (file)
@@ -26,4 +26,19 @@ struct stat {
        long            __unused[3];
 };
 
+/* For 32bit emulation */
+struct __old_kernel_stat {
+       unsigned short st_dev;
+       unsigned short st_ino;
+       unsigned short st_mode;
+       unsigned short st_nlink;
+       unsigned short st_uid;
+       unsigned short st_gid;
+       unsigned short st_rdev;
+       unsigned int  st_size;
+       unsigned int  st_atime;
+       unsigned int  st_mtime;
+       unsigned int  st_ctime;
+};
+
 #endif
index b631ed6..5acc4a7 100644 (file)
@@ -188,7 +188,7 @@ static inline void write_cr4(unsigned long val)
 
 #define __xg(x) ((volatile long *)(x))
 
-static inline void set_64bit(volatile unsigned long *ptr, unsigned long val)
+extern inline void set_64bit(volatile unsigned long *ptr, unsigned long val)
 {
        *ptr = val;
 }
index 68c7204..d9a5a22 100644 (file)
@@ -60,7 +60,4 @@ extern unsigned int cpu_khz;
 
 extern struct vxtime_data vxtime;
 
-#define ARCH_HAS_TIMEVARS 1
-
-
 #endif
index ce7f999..1a614e8 100644 (file)
@@ -23,7 +23,6 @@ extern unsigned long cpu_online_map;
 
 static inline unsigned long pcibus_to_cpumask(int bus)
 {
-       BUG_ON(bus >= MAX_MP_BUSSES);
        return mp_bus_to_cpumask[bus] & cpu_online_map; 
 }
 
index 112d388..9b4c018 100644 (file)
@@ -48,7 +48,7 @@
 
 #define access_ok(type,addr,size) (__range_not_ok(addr,size) == 0)
 
-static inline int verify_area(int type, const void * addr, unsigned long size)
+extern inline int verify_area(int type, const void * addr, unsigned long size)
 {
        return access_ok(type,addr,size) ? 0 : -EFAULT;
 }
index 62fe4a3..b78e931 100644 (file)
@@ -15,8 +15,6 @@ enum vsyscall_num {
 
 #ifdef __KERNEL__
 
-/* FIXME: put all this into a single section */ 
-
 #define __section_vxtime __attribute__ ((unused, __section__ (".vxtime"), aligned(16)))
 #define __section_wall_jiffies __attribute__ ((unused, __section__ (".wall_jiffies"), aligned(16)))
 #define __section_jiffies __attribute__ ((unused, __section__ (".jiffies"), aligned(16)))
@@ -24,8 +22,6 @@ enum vsyscall_num {
 #define __section_sysctl_vsyscall __attribute__ ((unused, __section__ (".sysctl_vsyscall"), aligned(16)))
 #define __section_xtime __attribute__ ((unused, __section__ (".xtime"), aligned(16)))
 #define __section_xtime_lock __attribute__ ((unused, __section__ (".xtime_lock"), aligned(L1_CACHE_BYTES)))
-#define __section_time_adjust __attribute__ ((unused, __section__ (".time_adjust"), aligned(16)))
-#define __section_tick_usec __attribute__ ((unused, __section__ (".tick_usec"), aligned(16)))
 
 #define VXTIME_TSC     1
 #define VXTIME_HPET    2
@@ -50,8 +46,6 @@ extern volatile unsigned long __jiffies;
 extern unsigned long __wall_jiffies;
 extern struct timezone __sys_tz;
 extern seqlock_t __xtime_lock;
-extern long __time_adjust;
-extern long __tick_usec;
 
 /* kernel space (writeable) */
 extern struct vxtime_data vxtime;
@@ -59,8 +53,6 @@ extern unsigned long wall_jiffies;
 extern struct timezone sys_tz;
 extern int sysctl_vsyscall;
 extern seqlock_t xtime_lock;
-extern long time_adjust;
-extern unsigned long tick_usec;
 
 #define ARCH_HAVE_XTIME_LOCK 1
 
index 0ac6a27..4f09005 100644 (file)
@@ -162,7 +162,7 @@ struct bio {
  */
 
 #define __BVEC_END(bio)                bio_iovec_idx((bio), (bio)->bi_vcnt - 1)
-#define __BVEC_START(bio)      bio_iovec_idx((bio), 0)
+#define __BVEC_START(bio)      bio_iovec_idx((bio), (bio)->bi_idx)
 #define BIOVEC_PHYS_MERGEABLE(vec1, vec2)      \
        ((bvec_to_phys((vec1)) + (vec1)->bv_len) == bvec_to_phys((vec2)))
 #define BIOVEC_VIRT_MERGEABLE(vec1, vec2)      \
index 58d6d35..6bcfa56 100644 (file)
@@ -44,8 +44,8 @@ typedef struct {
 } compat_sigset_t;
 
 extern int cp_compat_stat(struct kstat *, struct compat_stat *);
-extern int get_compat_timespec(struct timespec *, struct compat_timespec *);
-extern int put_compat_timespec(struct timespec *, struct compat_timespec *);
+extern int get_compat_timespec(struct timespec *, const struct compat_timespec *);
+extern int put_compat_timespec(struct timespec *, const struct compat_timespec *);
 
 struct compat_iovec {
        compat_uptr_t   iov_base;
@@ -83,10 +83,5 @@ struct compat_dirent {
        char            d_name[256];
 };
 
-typedef union compat_sigval {
-       compat_int_t    sival_int;
-       compat_uptr_t   sival_ptr;
-} compat_sigval_t;
-
 #endif /* CONFIG_COMPAT */
 #endif /* _LINUX_COMPAT_H */
index 313c764..d87c417 100644 (file)
@@ -2,14 +2,6 @@
  * compatible types passed or none at all... Please include
  * only stuff that is compatible on *all architectures*.
  */
-#ifndef COMPATIBLE_IOCTL /* pointer to compatible structure or no argument */
-#define COMPATIBLE_IOCTL(cmd)  HANDLE_IOCTL((cmd),(ioctl_trans_handler_t)sys_ioctl)
-#endif
-
-#ifndef ULONG_IOCTL /* argument is an unsigned long integer, not a pointer */
-#define ULONG_IOCTL(cmd)  HANDLE_IOCTL((cmd),(ioctl_trans_handler_t)sys_ioctl)
-#endif
-
 /* Big T */
 COMPATIBLE_IOCTL(TCGETA)
 COMPATIBLE_IOCTL(TCSETA)
@@ -43,16 +35,18 @@ COMPATIBLE_IOCTL(TIOCSTI)
 COMPATIBLE_IOCTL(TIOCOUTQ)
 COMPATIBLE_IOCTL(TIOCSPGRP)
 COMPATIBLE_IOCTL(TIOCGPGRP)
-ULONG_IOCTL(TIOCSCTTY)
+COMPATIBLE_IOCTL(TIOCSCTTY)
 COMPATIBLE_IOCTL(TIOCGPTN)
 COMPATIBLE_IOCTL(TIOCSPTLCK)
 COMPATIBLE_IOCTL(TIOCSERGETLSR)
+#ifdef CONFIG_FB
 /* Big F */
 COMPATIBLE_IOCTL(FBIOGET_VSCREENINFO)
 COMPATIBLE_IOCTL(FBIOPUT_VSCREENINFO)
 COMPATIBLE_IOCTL(FBIOPAN_DISPLAY)
 COMPATIBLE_IOCTL(FBIOGET_CON2FBMAP)
 COMPATIBLE_IOCTL(FBIOPUT_CON2FBMAP)
+#endif
 /* Little f */
 COMPATIBLE_IOCTL(FIOCLEX)
 COMPATIBLE_IOCTL(FIONCLEX)
@@ -74,6 +68,7 @@ COMPATIBLE_IOCTL(HDIO_SET_MULTCOUNT)
 COMPATIBLE_IOCTL(HDIO_DRIVE_CMD)
 COMPATIBLE_IOCTL(HDIO_SET_PIO_MODE)
 COMPATIBLE_IOCTL(HDIO_SET_NICE)
+#ifdef CONFIG_BLK_DEV_FD
 /* 0x02 -- Floppy ioctls */
 COMPATIBLE_IOCTL(FDMSGON)
 COMPATIBLE_IOCTL(FDMSGOFF)
@@ -91,6 +86,7 @@ COMPATIBLE_IOCTL(FDRESET)
 COMPATIBLE_IOCTL(FDTWADDLE)
 COMPATIBLE_IOCTL(FDFMTTRK)
 COMPATIBLE_IOCTL(FDRAWCMD)
+#endif
 /* 0x12 */
 COMPATIBLE_IOCTL(BLKROSET)
 COMPATIBLE_IOCTL(BLKROGET)
@@ -98,8 +94,8 @@ COMPATIBLE_IOCTL(BLKRRPART)
 COMPATIBLE_IOCTL(BLKFLSBUF)
 COMPATIBLE_IOCTL(BLKSECTSET)
 COMPATIBLE_IOCTL(BLKSSZGET)
-ULONG_IOCTL(BLKRASET)
-ULONG_IOCTL(BLKFRASET)
+COMPATIBLE_IOCTL(BLKRASET)
+COMPATIBLE_IOCTL(BLKFRASET)
 /* RAID */
 COMPATIBLE_IOCTL(RAID_VERSION)
 COMPATIBLE_IOCTL(GET_ARRAY_INFO)
@@ -108,19 +104,20 @@ COMPATIBLE_IOCTL(PRINT_RAID_DEBUG)
 COMPATIBLE_IOCTL(RAID_AUTORUN)
 COMPATIBLE_IOCTL(CLEAR_ARRAY)
 COMPATIBLE_IOCTL(ADD_NEW_DISK)
-ULONG_IOCTL(HOT_REMOVE_DISK)
+COMPATIBLE_IOCTL(HOT_REMOVE_DISK)
 COMPATIBLE_IOCTL(SET_ARRAY_INFO)
 COMPATIBLE_IOCTL(SET_DISK_INFO)
 COMPATIBLE_IOCTL(WRITE_RAID_INFO)
 COMPATIBLE_IOCTL(UNPROTECT_ARRAY)
 COMPATIBLE_IOCTL(PROTECT_ARRAY)
-ULONG_IOCTL(HOT_ADD_DISK)
-ULONG_IOCTL(SET_DISK_FAULTY)
+COMPATIBLE_IOCTL(HOT_ADD_DISK)
+COMPATIBLE_IOCTL(SET_DISK_FAULTY)
 COMPATIBLE_IOCTL(RUN_ARRAY)
-ULONG_IOCTL(START_ARRAY)
+COMPATIBLE_IOCTL(START_ARRAY)
 COMPATIBLE_IOCTL(STOP_ARRAY)
 COMPATIBLE_IOCTL(STOP_ARRAY_RO)
 COMPATIBLE_IOCTL(RESTART_ARRAY_RW)
+#ifdef CONFIG_BLK_DEV_DM
 /* DM */
 #ifdef CONFIG_DM_IOCTL_V4
 COMPATIBLE_IOCTL(DM_VERSION)
@@ -148,20 +145,21 @@ COMPATIBLE_IOCTL(DM_DEV_STATUS)
 COMPATIBLE_IOCTL(DM_TARGET_STATUS)
 COMPATIBLE_IOCTL(DM_TARGET_WAIT)
 #endif
+#endif
 /* Big K */
 COMPATIBLE_IOCTL(PIO_FONT)
 COMPATIBLE_IOCTL(GIO_FONT)
-ULONG_IOCTL(KDSIGACCEPT)
+COMPATIBLE_IOCTL(KDSIGACCEPT)
 COMPATIBLE_IOCTL(KDGETKEYCODE)
 COMPATIBLE_IOCTL(KDSETKEYCODE)
-ULONG_IOCTL(KIOCSOUND)
-ULONG_IOCTL(KDMKTONE)
+COMPATIBLE_IOCTL(KIOCSOUND)
+COMPATIBLE_IOCTL(KDMKTONE)
 COMPATIBLE_IOCTL(KDGKBTYPE)
-ULONG_IOCTL(KDSETMODE)
+COMPATIBLE_IOCTL(KDSETMODE)
 COMPATIBLE_IOCTL(KDGETMODE)
-ULONG_IOCTL(KDSKBMODE)
+COMPATIBLE_IOCTL(KDSKBMODE)
 COMPATIBLE_IOCTL(KDGKBMODE)
-ULONG_IOCTL(KDSKBMETA)
+COMPATIBLE_IOCTL(KDSKBMETA)
 COMPATIBLE_IOCTL(KDGKBMETA)
 COMPATIBLE_IOCTL(KDGKBENT)
 COMPATIBLE_IOCTL(KDSKBENT)
@@ -171,9 +169,9 @@ COMPATIBLE_IOCTL(KDGKBDIACR)
 COMPATIBLE_IOCTL(KDSKBDIACR)
 COMPATIBLE_IOCTL(KDKBDREP)
 COMPATIBLE_IOCTL(KDGKBLED)
-ULONG_IOCTL(KDSKBLED)
+COMPATIBLE_IOCTL(KDSKBLED)
 COMPATIBLE_IOCTL(KDGETLED)
-ULONG_IOCTL(KDSETLED)
+COMPATIBLE_IOCTL(KDSETLED)
 COMPATIBLE_IOCTL(GIO_SCRNMAP)
 COMPATIBLE_IOCTL(PIO_SCRNMAP)
 COMPATIBLE_IOCTL(GIO_UNISCRNMAP)
@@ -200,14 +198,15 @@ COMPATIBLE_IOCTL(VT_SETMODE)
 COMPATIBLE_IOCTL(VT_GETMODE)
 COMPATIBLE_IOCTL(VT_GETSTATE)
 COMPATIBLE_IOCTL(VT_OPENQRY)
-ULONG_IOCTL(VT_ACTIVATE)
-ULONG_IOCTL(VT_WAITACTIVE)
-ULONG_IOCTL(VT_RELDISP)
-ULONG_IOCTL(VT_DISALLOCATE)
+COMPATIBLE_IOCTL(VT_ACTIVATE)
+COMPATIBLE_IOCTL(VT_WAITACTIVE)
+COMPATIBLE_IOCTL(VT_RELDISP)
+COMPATIBLE_IOCTL(VT_DISALLOCATE)
 COMPATIBLE_IOCTL(VT_RESIZE)
 COMPATIBLE_IOCTL(VT_RESIZEX)
 COMPATIBLE_IOCTL(VT_LOCKSWITCH)
 COMPATIBLE_IOCTL(VT_UNLOCKSWITCH)
+#if defined(CONFIG_VIDEO_DEV) || defined(CONFIG_VIDEO_DEV_MODULE)
 /* Little v */
 /* Little v, the video4linux ioctls (conflict?) */
 COMPATIBLE_IOCTL(VIDIOCGCAP)
@@ -234,6 +233,7 @@ COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+4, int))
 COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+5, int))
 COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+6, int))
 COMPATIBLE_IOCTL(_IOR('v' , BASE_VIDIOCPRIVATE+7, int))
+#endif
 /* Little p (/dev/rtc, /dev/envctrl, etc.) */
 COMPATIBLE_IOCTL(RTC_AIE_ON)
 COMPATIBLE_IOCTL(RTC_AIE_OFF)
@@ -260,11 +260,8 @@ COMPATIBLE_IOCTL(SIOCATMARK)
 COMPATIBLE_IOCTL(SIOCSIFLINK)
 COMPATIBLE_IOCTL(SIOCSIFENCAP)
 COMPATIBLE_IOCTL(SIOCGIFENCAP)
-COMPATIBLE_IOCTL(SIOCSIFNAME)
-/* FIXME: not compatible
 COMPATIBLE_IOCTL(SIOCSIFBR)
 COMPATIBLE_IOCTL(SIOCGIFBR)
-*/
 COMPATIBLE_IOCTL(SIOCSARP)
 COMPATIBLE_IOCTL(SIOCGARP)
 COMPATIBLE_IOCTL(SIOCDARP)
@@ -282,7 +279,7 @@ COMPATIBLE_IOCTL(SIOCSIFVLAN)
 COMPATIBLE_IOCTL(SG_SET_TIMEOUT)
 COMPATIBLE_IOCTL(SG_GET_TIMEOUT)
 COMPATIBLE_IOCTL(SG_EMULATED_HOST)
-ULONG_IOCTL(SG_SET_TRANSFORM)
+COMPATIBLE_IOCTL(SG_SET_TRANSFORM)
 COMPATIBLE_IOCTL(SG_GET_TRANSFORM)
 COMPATIBLE_IOCTL(SG_SET_RESERVED_SIZE)
 COMPATIBLE_IOCTL(SG_GET_RESERVED_SIZE)
@@ -302,6 +299,7 @@ COMPATIBLE_IOCTL(SG_SCSI_RESET)
 COMPATIBLE_IOCTL(SG_GET_REQUEST_TABLE)
 COMPATIBLE_IOCTL(SG_SET_KEEP_ORPHAN)
 COMPATIBLE_IOCTL(SG_GET_KEEP_ORPHAN)
+#if defined(CONFIG_PPP) || defined(CONFIG_PPP_MODULE)
 /* PPP stuff */
 COMPATIBLE_IOCTL(PPPIOCGFLAGS)
 COMPATIBLE_IOCTL(PPPIOCSFLAGS)
@@ -335,6 +333,7 @@ COMPATIBLE_IOCTL(PPPIOCGCHAN)
 /* PPPOX */
 COMPATIBLE_IOCTL(PPPOEIOCSFWD)
 COMPATIBLE_IOCTL(PPPOEIOCDFWD)
+#endif
 /* LP */
 COMPATIBLE_IOCTL(LPGETSTATUS)
 /* CDROM stuff */
@@ -349,7 +348,7 @@ COMPATIBLE_IOCTL(CDROMSTART)
 COMPATIBLE_IOCTL(CDROMEJECT)
 COMPATIBLE_IOCTL(CDROMVOLCTRL)
 COMPATIBLE_IOCTL(CDROMSUBCHNL)
-ULONG_IOCTL(CDROMEJECT_SW)
+COMPATIBLE_IOCTL(CDROMEJECT_SW)
 COMPATIBLE_IOCTL(CDROMMULTISESSION)
 COMPATIBLE_IOCTL(CDROM_GET_MCN)
 COMPATIBLE_IOCTL(CDROMRESET)
@@ -357,16 +356,16 @@ COMPATIBLE_IOCTL(CDROMVOLREAD)
 COMPATIBLE_IOCTL(CDROMSEEK)
 COMPATIBLE_IOCTL(CDROMPLAYBLK)
 COMPATIBLE_IOCTL(CDROMCLOSETRAY)
-ULONG_IOCTL(CDROM_SET_OPTIONS)
-ULONG_IOCTL(CDROM_CLEAR_OPTIONS)
-ULONG_IOCTL(CDROM_SELECT_SPEED)
-ULONG_IOCTL(CDROM_SELECT_DISC)
-ULONG_IOCTL(CDROM_MEDIA_CHANGED)
-ULONG_IOCTL(CDROM_DRIVE_STATUS)
+COMPATIBLE_IOCTL(CDROM_SET_OPTIONS)
+COMPATIBLE_IOCTL(CDROM_CLEAR_OPTIONS)
+COMPATIBLE_IOCTL(CDROM_SELECT_SPEED)
+COMPATIBLE_IOCTL(CDROM_SELECT_DISC)
+COMPATIBLE_IOCTL(CDROM_MEDIA_CHANGED)
+COMPATIBLE_IOCTL(CDROM_DRIVE_STATUS)
 COMPATIBLE_IOCTL(CDROM_DISC_STATUS)
 COMPATIBLE_IOCTL(CDROM_CHANGER_NSLOTS)
-ULONG_IOCTL(CDROM_LOCKDOOR)
-ULONG_IOCTL(CDROM_DEBUG)
+COMPATIBLE_IOCTL(CDROM_LOCKDOOR)
+COMPATIBLE_IOCTL(CDROM_DEBUG)
 COMPATIBLE_IOCTL(CDROM_GET_CAPABILITY)
 /* Ignore cdrom.h about these next 5 ioctls, they absolutely do
  * not take a struct cdrom_read, instead they take a struct cdrom_msf
@@ -382,12 +381,13 @@ COMPATIBLE_IOCTL(DVD_READ_STRUCT)
 COMPATIBLE_IOCTL(DVD_WRITE_STRUCT)
 COMPATIBLE_IOCTL(DVD_AUTH)
 /* Big L */
-ULONG_IOCTL(LOOP_SET_FD)
+COMPATIBLE_IOCTL(LOOP_SET_FD)
 COMPATIBLE_IOCTL(LOOP_CLR_FD)
 COMPATIBLE_IOCTL(LOOP_GET_STATUS64)
 COMPATIBLE_IOCTL(LOOP_SET_STATUS64)
 /* Big A */
 /* sparc only */
+#if defined(CONFIG_SOUND) || defined (CONFIG_SOUND_MODULE)
 /* Big Q for sound/OSS */
 COMPATIBLE_IOCTL(SNDCTL_SEQ_RESET)
 COMPATIBLE_IOCTL(SNDCTL_SEQ_SYNC)
@@ -542,9 +542,10 @@ COMPATIBLE_IOCTL(SOUND_MIXER_PRIVATE5)
 COMPATIBLE_IOCTL(SOUND_MIXER_GETLEVELS)
 COMPATIBLE_IOCTL(SOUND_MIXER_SETLEVELS)
 COMPATIBLE_IOCTL(OSS_GETVERSION)
+#endif
 /* AUTOFS */
-ULONG_IOCTL(AUTOFS_IOC_READY)
-ULONG_IOCTL(AUTOFS_IOC_FAIL)
+COMPATIBLE_IOCTL(AUTOFS_IOC_READY)
+COMPATIBLE_IOCTL(AUTOFS_IOC_FAIL)
 COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC)
 COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
@@ -571,6 +572,7 @@ COMPATIBLE_IOCTL(NCP_IOC_GETCHARSETS)
 COMPATIBLE_IOCTL(NCP_IOC_SETCHARSETS)
 COMPATIBLE_IOCTL(NCP_IOC_GETDENTRYTTL)
 COMPATIBLE_IOCTL(NCP_IOC_SETDENTRYTTL)
+#if defined(CONFIG_ATM) || defined(CONFIG_ATM_MODULE)
 /* Little a */
 COMPATIBLE_IOCTL(ATMSIGD_CTRL)
 COMPATIBLE_IOCTL(ATMARPD_CTRL)
@@ -587,6 +589,7 @@ COMPATIBLE_IOCTL(ATMTCP_CREATE)
 COMPATIBLE_IOCTL(ATMTCP_REMOVE)
 COMPATIBLE_IOCTL(ATMMPC_CTRL)
 COMPATIBLE_IOCTL(ATMMPC_DATA)
+#endif
 /* Big W */
 /* WIOC_GETSUPPORT not yet implemented -E */
 COMPATIBLE_IOCTL(WDIOC_GETSTATUS)
@@ -601,6 +604,7 @@ COMPATIBLE_IOCTL(RNDGETPOOL)
 COMPATIBLE_IOCTL(RNDADDENTROPY)
 COMPATIBLE_IOCTL(RNDZAPENTCNT)
 COMPATIBLE_IOCTL(RNDCLEARPOOL)
+#if defined(CONFIG_BT) || defined(CONFIG_BT_MODULE)
 /* Bluetooth ioctls */
 COMPATIBLE_IOCTL(HCIDEVUP)
 COMPATIBLE_IOCTL(HCIDEVDOWN)
@@ -631,6 +635,8 @@ COMPATIBLE_IOCTL(BNEPCONNADD)
 COMPATIBLE_IOCTL(BNEPCONNDEL)
 COMPATIBLE_IOCTL(BNEPGETCONNLIST)
 COMPATIBLE_IOCTL(BNEPGETCONNINFO)
+#endif
+#ifdef CONFIG_PCI
 /* Misc. */
 COMPATIBLE_IOCTL(0x41545900)           /* ATYIO_CLKR */
 COMPATIBLE_IOCTL(0x41545901)           /* ATYIO_CLKW */
@@ -638,6 +644,8 @@ COMPATIBLE_IOCTL(PCIIOC_CONTROLLER)
 COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_IO)
 COMPATIBLE_IOCTL(PCIIOC_MMAP_IS_MEM)
 COMPATIBLE_IOCTL(PCIIOC_WRITE_COMBINE)
+#endif
+#if defined(CONFIG_USB) || defined(CONFIG_USB_MODULE)
 /* USB */
 COMPATIBLE_IOCTL(USBDEVFS_RESETEP)
 COMPATIBLE_IOCTL(USBDEVFS_SETINTERFACE)
@@ -650,6 +658,8 @@ COMPATIBLE_IOCTL(USBDEVFS_CONNECTINFO)
 COMPATIBLE_IOCTL(USBDEVFS_HUB_PORTINFO)
 COMPATIBLE_IOCTL(USBDEVFS_RESET)
 COMPATIBLE_IOCTL(USBDEVFS_CLEAR_HALT)
+#endif
+#if defined(CONFIG_MTD) || defined(CONFIG_MTD_MODULE)
 /* MTD */
 COMPATIBLE_IOCTL(MEMGETINFO)
 COMPATIBLE_IOCTL(MEMERASE)
@@ -657,13 +667,21 @@ COMPATIBLE_IOCTL(MEMLOCK)
 COMPATIBLE_IOCTL(MEMUNLOCK)
 COMPATIBLE_IOCTL(MEMGETREGIONCOUNT)
 COMPATIBLE_IOCTL(MEMGETREGIONINFO)
+#endif
 /* NBD */
-ULONG_IOCTL(NBD_SET_SOCK)
-ULONG_IOCTL(NBD_SET_BLKSIZE)
-ULONG_IOCTL(NBD_SET_SIZE)
+COMPATIBLE_IOCTL(NBD_SET_SOCK)
+COMPATIBLE_IOCTL(NBD_SET_BLKSIZE)
+COMPATIBLE_IOCTL(NBD_SET_SIZE)
 COMPATIBLE_IOCTL(NBD_DO_IT)
 COMPATIBLE_IOCTL(NBD_CLEAR_SOCK)
 COMPATIBLE_IOCTL(NBD_CLEAR_QUE)
 COMPATIBLE_IOCTL(NBD_PRINT_DEBUG)
-ULONG_IOCTL(NBD_SET_SIZE_BLOCKS)
+COMPATIBLE_IOCTL(NBD_SET_SIZE_BLOCKS)
 COMPATIBLE_IOCTL(NBD_DISCONNECT)
+/* i2c */
+COMPATIBLE_IOCTL(I2C_SLAVE)
+COMPATIBLE_IOCTL(I2C_SLAVE_FORCE)
+COMPATIBLE_IOCTL(I2C_TENBIT)
+COMPATIBLE_IOCTL(I2C_PEC)
+COMPATIBLE_IOCTL(I2C_RETRIES)
+COMPATIBLE_IOCTL(I2C_TIMEOUT)
index cdff9de..6db0056 100644 (file)
@@ -71,18 +71,6 @@ void give_up_console(const struct consw *sw);
 #define CM_MOVE     (3)
 
 /*
- *     Array of consoles built from command line options (console=)
- */
-struct console_cmdline
-{
-       char    name[8];                        /* Name of the driver       */
-       int     index;                          /* Minor dev. to use        */
-       char    *options;                       /* Options for the driver   */
-};
-#define MAX_CMDLINECONSOLES 8
-extern struct console_cmdline console_list[MAX_CMDLINECONSOLES];
-
-/*
  *     The interface for a console, or any other device that
  *     wants to capture console messages (printer driver?)
  */
@@ -106,6 +94,7 @@ struct console
        struct   console *next;
 };
 
+extern int add_preferred_console(char *name, int idx, char *options);
 extern void register_console(struct console *);
 extern int unregister_console(struct console *);
 extern struct console *console_drivers;
index d0180ab..df81e37 100644 (file)
@@ -87,9 +87,6 @@ struct vc_data {
        struct vc_data **vc_display_fg;         /* [!] Ptr to var holding fg console for this display */
        unsigned long   vc_uni_pagedir;
        unsigned long   *vc_uni_pagedir_loc;  /* [!] Location of uni_pagedir variable for this console */
-#ifdef CONFIG_BOOTSPLASH
-       struct splash_data *vc_splash_data;
-#endif
        /* additional information is in vt_kern.h */
 };
 
index 51790ee..bbc983d 100644 (file)
@@ -57,7 +57,7 @@ struct cpufreq_governor;
 struct cpufreq_cpuinfo {
        unsigned int            max_freq;
        unsigned int            min_freq;
-       unsigned int            transition_latency; /* in 10^(-9) s */
+       unsigned int            transition_latency; /* in 10^(-9) s = nanoseconds */
 };
 
 struct cpufreq_real_policy {
@@ -231,17 +231,18 @@ int cpufreq_update_policy(unsigned int cpu);
 /* the proc_intf.c needs this */
 int cpufreq_parse_governor (char *str_governor, unsigned int *policy, struct cpufreq_governor **governor);
 
-#if defined(CONFIG_CPU_FREQ_GOV_USERSPACE) || defined(CONFIG_CPU_FREQ_GOV_USERSPACE_MODULE)
+
 /*********************************************************************
  *                      CPUFREQ USERSPACE GOVERNOR                   *
  *********************************************************************/
 int cpufreq_gov_userspace_init(void);
 
+#ifdef CONFIG_CPU_FREQ_24_API
+
 int cpufreq_setmax(unsigned int cpu);
 int cpufreq_set(unsigned int kHz, unsigned int cpu);
 unsigned int cpufreq_get(unsigned int cpu);
 
-#ifdef CONFIG_CPU_FREQ_24_API
 
 /* /proc/sys/cpu */
 enum {
@@ -289,8 +290,6 @@ enum {
 
 #endif /* CONFIG_CPU_FREQ_24_API */
 
-#endif /* CONFIG_CPU_FREQ_GOV_USERSPACE */
-
 
 /*********************************************************************
  *                       CPUFREQ DEFAULT GOVERNOR                    *
@@ -305,6 +304,7 @@ extern struct cpufreq_governor cpufreq_gov_userspace;
 #define CPUFREQ_DEFAULT_GOVERNOR       &cpufreq_gov_userspace
 #endif
 
+
 /*********************************************************************
  *                     FREQUENCY TABLE HELPERS                       *
  *********************************************************************/
@@ -318,7 +318,6 @@ struct cpufreq_frequency_table {
                                    * order */
 };
 
-#if defined(CONFIG_CPU_FREQ_TABLE) || defined(CONFIG_CPU_FREQ_TABLE_MODULE)
 int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy,
                                    struct cpufreq_frequency_table *table);
 
@@ -340,5 +339,4 @@ void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,
 void cpufreq_frequency_table_put_attr(unsigned int cpu);
 
 
-#endif /* CONFIG_CPU_FREQ_TABLE */
 #endif /* _LINUX_CPUFREQ_H */
index 51020e3..6aa67b1 100644 (file)
@@ -1,42 +1,9 @@
 #ifndef __LINUX_CPUMASK_H
 #define __LINUX_CPUMASK_H
 
-#include <linux/config.h>
-#include <linux/kernel.h>
 #include <linux/threads.h>
-#include <linux/types.h>
-#include <linux/bitmap.h>
-
-#if NR_CPUS > BITS_PER_LONG && NR_CPUS != 1
-#define CPU_ARRAY_SIZE         BITS_TO_LONGS(NR_CPUS)
-
-struct cpumask
-{
-       unsigned long mask[CPU_ARRAY_SIZE];
-};
-
-typedef struct cpumask cpumask_t;
-
-#else
-typedef unsigned long cpumask_t;
-#endif
-
-#ifdef CONFIG_SMP
-#if NR_CPUS > BITS_PER_LONG
-#include <asm-generic/cpumask_array.h>
-#else
-#include <asm-generic/cpumask_arith.h>
-#endif
-#else
-#include <asm-generic/cpumask_up.h>
-#endif
-
-#if NR_CPUS <= 4*BITS_PER_LONG
-#include <asm-generic/cpumask_const_value.h>
-#else
-#include <asm-generic/cpumask_const_reference.h>
-#endif
-
+#include <asm/cpumask.h>
+#include <asm/bug.h>
 
 #ifdef CONFIG_SMP
 
@@ -53,35 +20,31 @@ extern cpumask_t cpu_online_map;
 static inline int next_online_cpu(int cpu, cpumask_t map)
 {
        do
-               cpu = next_cpu_const(cpu, map);
+               cpu = next_cpu_const(cpu, mk_cpumask_const(map));
        while (cpu < NR_CPUS && !cpu_online(cpu));
        return cpu;
 }
 
 #define for_each_cpu(cpu, map)                                         \
-       for (cpu = first_cpu_const(map);                                \
+       for (cpu = first_cpu_const(mk_cpumask_const(map));              \
                cpu < NR_CPUS;                                          \
-               cpu = next_cpu_const(cpu,map))
+               cpu = next_cpu_const(cpu,mk_cpumask_const(map)))
 
 #define for_each_online_cpu(cpu, map)                                  \
-       for (cpu = first_cpu_const(map);                                \
+       for (cpu = first_cpu_const(mk_cpumask_const(map));              \
                cpu < NR_CPUS;                                          \
                cpu = next_online_cpu(cpu,map))
 
-static inline int format_cpumask(char *buf, cpumask_t cpus)
-{
-       int k, len = 0;
+extern int __mask_snprintf_len(char *buf, unsigned int buflen,
+               const unsigned long *maskp, unsigned int maskbytes);
 
-       for (k = sizeof(cpumask_t)/sizeof(long) - 1; k >= 0; --k) {
-               int m;
-               cpumask_t tmp;
+#define cpumask_snprintf(buf, buflen, map)                             \
+       __mask_snprintf_len(buf, buflen, cpus_addr(map), sizeof(map))
 
-               cpus_shift_right(tmp, cpus, BITS_PER_LONG*k);
-               m = sprintf(buf, "%0*lx", (int)(2*sizeof(long)), cpus_coerce(tmp));
-               len += m;
-               buf += m;
-       }
-       return len;
-}
+extern int __mask_parse_len(const char __user *ubuf, unsigned int ubuflen,
+       unsigned long *maskp, unsigned int maskbytes);
+
+#define cpumask_parse(buf, buflen, map)                                        \
+       __mask_parse_len(buf, buflen, cpus_addr(map), sizeof(map))
 
 #endif /* __LINUX_CPUMASK_H */
index f41486e..8f008e1 100644 (file)
@@ -372,7 +372,7 @@ extern int platform_device_register(struct platform_device *);
 extern void platform_device_unregister(struct platform_device *);
 
 extern struct bus_type platform_bus_type;
-extern struct device legacy_bus;
+extern struct device platform_bus;
 
 /* drivers/base/power.c */
 extern void device_shutdown(void);
@@ -383,20 +383,8 @@ extern int firmware_register(struct subsystem *);
 extern void firmware_unregister(struct subsystem *);
 
 /* debugging and troubleshooting/diagnostic helpers. */
-#ifdef CONFIG_DEBUG_DEV_PRINTK
-#define dev_printk(level, dev, format, arg...)                 \
-       do {                                                    \
-               if (!(dev) || !(dev)->driver)                   \
-                       WARN_ON(1);                             \
-               else                                            \
-                       printk(level "%s %s: " format ,         \
-                               (dev)->driver->name ,           \
-                               (dev)->bus_id , ## arg);        \
-       } while (0)
-#else
 #define dev_printk(level, dev, format, arg...) \
        printk(level "%s %s: " format , (dev)->driver->name , (dev)->bus_id , ## arg)
-#endif
 
 #ifdef DEBUG
 #define dev_dbg(dev, format, arg...)           \
index 645fc38..86e9d2e 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/time.h>
 #include <linux/types.h>
 #include <linux/proc_fs.h>
+#include <linux/rtc.h>
+#include <linux/ioport.h>
 
 #include <asm/page.h>
 #include <asm/system.h>
@@ -77,18 +79,23 @@ typedef     struct {
 #define EFI_MAX_MEMORY_TYPE            14
 
 /* Attribute values: */
-#define EFI_MEMORY_UC          0x0000000000000001      /* uncached */
-#define EFI_MEMORY_WC          0x0000000000000002      /* write-coalescing */
-#define EFI_MEMORY_WT          0x0000000000000004      /* write-through */
-#define EFI_MEMORY_WB          0x0000000000000008      /* write-back */
-#define EFI_MEMORY_WP          0x0000000000001000      /* write-protect */
-#define EFI_MEMORY_RP          0x0000000000002000      /* read-protect */
-#define EFI_MEMORY_XP          0x0000000000004000      /* execute-protect */
-#define EFI_MEMORY_RUNTIME     0x8000000000000000      /* range requires runtime mapping */
+#define EFI_MEMORY_UC          ((u64)0x0000000000000001ULL)    /* uncached */
+#define EFI_MEMORY_WC          ((u64)0x0000000000000002ULL)    /* write-coalescing */
+#define EFI_MEMORY_WT          ((u64)0x0000000000000004ULL)    /* write-through */
+#define EFI_MEMORY_WB          ((u64)0x0000000000000008ULL)    /* write-back */
+#define EFI_MEMORY_WP          ((u64)0x0000000000001000ULL)    /* write-protect */
+#define EFI_MEMORY_RP          ((u64)0x0000000000002000ULL)    /* read-protect */
+#define EFI_MEMORY_XP          ((u64)0x0000000000004000ULL)    /* execute-protect */
+#define EFI_MEMORY_RUNTIME     ((u64)0x8000000000000000ULL)    /* range requires runtime mapping */
 #define EFI_MEMORY_DESCRIPTOR_VERSION  1
 
 #define EFI_PAGE_SHIFT         12
 
+/*
+ * For current x86 implementations of EFI, there is
+ * additional padding in the mem descriptors.  This is not
+ * the case in ia64.  Need to have this fixed in the f/w.
+ */
 typedef struct {
        u32 type;
        u32 pad;
@@ -96,6 +103,9 @@ typedef struct {
        u64 virt_addr;
        u64 num_pages;
        u64 attribute;
+#if defined (__i386__)
+       u64 pad1;
+#endif
 } efi_memory_desc_t;
 
 typedef int efi_freemem_callback_t (unsigned long start, unsigned long end, void *arg);
@@ -132,11 +142,12 @@ typedef struct {
  */
 #define EFI_RESET_COLD 0
 #define EFI_RESET_WARM 1
+#define EFI_RESET_SHUTDOWN 2
 
 /*
  * EFI Runtime Services table
  */
-#define EFI_RUNTIME_SERVICES_SIGNATURE 0x5652453544e5552
+#define EFI_RUNTIME_SERVICES_SIGNATURE ((u64)0x5652453544e5552ULL)
 #define EFI_RUNTIME_SERVICES_REVISION  0x00010000
 
 typedef struct {
@@ -169,6 +180,10 @@ typedef efi_status_t efi_set_variable_t (efi_char16_t *name, efi_guid_t *vendor,
 typedef efi_status_t efi_get_next_high_mono_count_t (u32 *count);
 typedef void efi_reset_system_t (int reset_type, efi_status_t status,
                                 unsigned long data_size, efi_char16_t *data);
+typedef efi_status_t efi_set_virtual_address_map_t (unsigned long memory_map_size,
+                                               unsigned long descriptor_size,
+                                               u32 descriptor_version,
+                                               efi_memory_desc_t *virtual_map);
 
 /*
  *  EFI Configuration Table and GUID definitions
@@ -194,12 +209,15 @@ typedef void efi_reset_system_t (int reset_type, efi_status_t status,
 #define HCDP_TABLE_GUID        \
     EFI_GUID(  0xf951938d, 0x620b, 0x42ef, 0x82, 0x79, 0xa8, 0x4b, 0x79, 0x61, 0x78, 0x98 )
 
+#define UGA_IO_PROTOCOL_GUID \
+    EFI_GUID(  0x61a4d49e, 0x6f68, 0x4f1b, 0xb9, 0x22, 0xa8, 0x6e, 0xed, 0xb, 0x7, 0xa2 )
+
 typedef struct {
        efi_guid_t guid;
        unsigned long table;
 } efi_config_table_t;
 
-#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
+#define EFI_SYSTEM_TABLE_SIGNATURE ((u64)0x5453595320494249ULL)
 #define EFI_SYSTEM_TABLE_REVISION  ((1 << 16) | 00)
 
 typedef struct {
@@ -218,6 +236,13 @@ typedef struct {
        unsigned long tables;
 } efi_system_table_t;
 
+struct efi_memory_map {
+       efi_memory_desc_t *phys_map;
+       efi_memory_desc_t *map;
+       int nr_map;
+       unsigned long desc_version;
+};
+
 /*
  * All runtime access to EFI goes through this structure:
  */
@@ -230,6 +255,7 @@ extern struct efi {
        void *sal_systab;               /* SAL system table */
        void *boot_info;                /* boot info table */
        void *hcdp;                     /* HCDP table */
+       void *uga;                      /* UGA table */
        efi_get_time_t *get_time;
        efi_set_time_t *set_time;
        efi_get_wakeup_time_t *get_wakeup_time;
@@ -239,6 +265,7 @@ extern struct efi {
        efi_set_variable_t *set_variable;
        efi_get_next_high_mono_count_t *get_next_high_mono_count;
        efi_reset_system_t *reset_system;
+       efi_set_virtual_address_map_t *set_virtual_address_map;
 } efi;
 
 static inline int
@@ -260,12 +287,25 @@ efi_guid_unparse(efi_guid_t *guid, char *out)
 
 extern void efi_init (void);
 extern void efi_map_pal_code (void);
+extern void efi_map_memmap(void);
 extern void efi_memmap_walk (efi_freemem_callback_t callback, void *arg);
 extern void efi_gettimeofday (struct timespec *ts);
 extern void efi_enter_virtual_mode (void);     /* switch EFI to virtual mode, if possible */
 extern u64 efi_get_iobase (void);
 extern u32 efi_mem_type (unsigned long phys_addr);
 extern u64 efi_mem_attributes (unsigned long phys_addr);
+extern void efi_initialize_iomem_resources(struct resource *code_resource,
+                                       struct resource *data_resource);
+extern efi_status_t phys_efi_get_time(efi_time_t *tm, efi_time_cap_t *tc);
+extern unsigned long inline __init efi_get_time(void);
+extern int inline __init efi_set_rtc_mmss(unsigned long nowtime);
+extern struct efi_memory_map memmap;
+
+#ifdef CONFIG_EFI
+extern int efi_enabled;
+#else
+#define efi_enabled 0
+#endif
 
 /*
  * Variable Attributes
index 7bafeca..5ba81ae 100644 (file)
@@ -352,7 +352,6 @@ struct fb_pixmap {
 struct fb_info;
 struct vm_area_struct;
 struct file;
-struct device;
 
     /*
      *  Frame buffer operations
@@ -413,15 +412,6 @@ struct fb_info {
    struct vc_data *display_fg;         /* Console visible on this display */
    int currcon;                                /* Current VC. */       
    void *pseudo_palette;                /* Fake palette of 16 colors */ 
-   struct device *dev;                  /* pointer to the device for this fb */
-#ifdef CONFIG_BOOTSPLASH
-   struct splash_data *splash_data;
-   unsigned char *splash_pic;
-   int splash_pic_size;
-   int splash_bytes;
-   char *silent_screen_base;           /* real screen base */
-   char fb_cursordata[64];
-#endif
    /* From here on everything is device dependent */
    void *par;  
 };
index b3a714c..ab962f0 100644 (file)
@@ -630,6 +630,7 @@ extern int __break_lease(struct inode *inode, unsigned int flags);
 extern void lease_get_mtime(struct inode *, struct timespec *time);
 extern int lock_may_read(struct inode *, loff_t start, unsigned long count);
 extern int lock_may_write(struct inode *, loff_t start, unsigned long count);
+extern void steal_locks(fl_owner_t from);
 
 struct fasync_struct {
        int     magic;
@@ -1408,5 +1409,8 @@ static inline ino_t parent_ino(struct dentry *dentry)
        return res;
 }
 
+/* kernel/fork.c */
+extern int unshare_files(void);
+
 #endif /* __KERNEL__ */
 #endif /* _LINUX_FS_H */
index b3dd00d..72bda66 100644 (file)
@@ -39,6 +39,7 @@ mark_mm_hugetlb(struct mm_struct *mm, struct vm_area_struct *vma)
 
 #ifndef ARCH_HAS_HUGEPAGE_ONLY_RANGE
 #define is_hugepage_only_range(addr, len)      0
+#define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0)
 #endif
 
 #else /* !CONFIG_HUGETLB_PAGE */
@@ -63,6 +64,7 @@ static inline int is_vm_hugetlb_page(struct vm_area_struct *vma)
 #define is_aligned_hugepage_range(addr, len)   0
 #define pmd_huge(x)    0
 #define is_hugepage_only_range(addr, len)      0
+#define hugetlb_free_pgtables(tlb, prev, start, end) do { } while (0)
 
 #ifndef HPAGE_MASK
 #define HPAGE_MASK     0               /* Keep the compiler happy */
index 1c78b59..d228230 100644 (file)
@@ -43,4 +43,6 @@ struct i2c_rdwr_ioctl_data {
        __u32 nmsgs;                    /* number of i2c_msgs */
 };
 
+#define  I2C_RDRW_IOCTL_MAX_MSGS       42
+
 #endif /* _LINUX_I2C_DEV_H */
index fe10ca8..1d481b7 100644 (file)
@@ -246,11 +246,11 @@ typedef unsigned char     byte;   /* used everywhere */
 /*
  * Timeouts for various operations:
  */
-#define WAIT_DRQ       (5*HZ/100)      /* 50msec - spec allows up to 20ms */
+#define WAIT_DRQ       (HZ/10)         /* 100msec - spec allows up to 20ms */
 #if defined(CONFIG_APM) || defined(CONFIG_APM_MODULE)
 #define WAIT_READY     (5*HZ)          /* 5sec - some laptops are very slow */
 #else
-#define WAIT_READY     (3*HZ/100)      /* 30msec - should be instantaneous */
+#define WAIT_READY     (HZ/10)         /* 100msec - should be instantaneous */
 #endif /* CONFIG_APM || CONFIG_APM_MODULE */
 #define WAIT_PIDENTIFY (10*HZ) /* 10sec  - should be less than 3ms (?), if all ATAPI CD is closed at boot */
 #define WAIT_WORSTCASE (30*HZ) /* 30sec  - worst case when spinning up */
@@ -1693,6 +1693,8 @@ extern void ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, ide_pci_de
 #define GOOD_DMA_DRIVE         1
 
 #ifdef CONFIG_BLK_DEV_IDEDMA_PCI
+extern int ide_build_sglist(ide_drive_t *, struct request *);
+extern int ide_raw_build_sglist(ide_drive_t *, struct request *);
 extern int ide_build_dmatable(ide_drive_t *, struct request *);
 extern void ide_destroy_dmatable(ide_drive_t *);
 extern ide_startstop_t ide_dma_intr(ide_drive_t *);
index 1894762..eff36f4 100644 (file)
@@ -870,6 +870,7 @@ struct input_handler {
        char *name;
 
        struct input_device_id *id_table;
+       struct input_device_id *blacklist;
 
        struct list_head        h_list;
        struct list_head        node;
index f4ff326..459630f 100644 (file)
@@ -10,7 +10,7 @@
 
 /*
  * The 64-bit value is not volatile - you MUST NOT read it
- * without holding read_lock_irq(&xtime_lock).
+ * without sampling the sequence number in xtime_lock.
  * get_jiffies_64() will do this for you as appropriate.
  */
 extern u64 jiffies_64;
index 3fecdf7..def5516 100644 (file)
@@ -89,6 +89,8 @@ extern int session_of_pgrp(int pgrp);
 asmlinkage int printk(const char * fmt, ...)
        __attribute__ ((format (printf, 1, 2)));
 
+unsigned long int_sqrt(unsigned long);
+
 static inline void console_silent(void)
 {
        console_loglevel = 0;
index a7fcf94..f9c6ad7 100644 (file)
@@ -2,7 +2,6 @@
 #define __LINUX_KEYBOARD_H
 
 #include <linux/wait.h>
-#include <linux/input.h>
 
 #define KG_SHIFT       0
 #define KG_CTRL                2
@@ -17,7 +16,7 @@
 
 #define NR_SHIFT       9
 
-#define NR_KEYS                (KEY_MAX+1)
+#define NR_KEYS                255
 #define MAX_NR_KEYMAPS 256
 /* This means 128Kb if all keymaps are allocated. Only the superuser
        may increase the number of keymaps beyond MAX_NR_OF_USER_KEYMAPS. */
index 8412fae..7c5af18 100644 (file)
@@ -24,6 +24,8 @@
 #include <linux/compiler.h>
 
 #ifdef CONFIG_KMOD
+/* modprobe exit status on success, -ve on error.  Return value
+ * usually useless though. */
 extern int request_module(const char * name, ...) __attribute__ ((format (printf, 1, 2)));
 #else
 static inline int request_module(const char * name, ...) { return -ENOSYS; }
index feabeae..53ce430 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/io.h>
 #include <linux/ata.h>
 
+
 /*
  * compile-time options
  */
@@ -66,8 +67,6 @@
 
 /* defines only for the constants which don't work well as enums */
 #define ATA_TAG_POISON         0xfafbfcfdU
-#define ATA_DMA_BOUNDARY       0xffffUL
-#define ATA_DMA_MASK           0xffffffffULL
 
 enum {
        /* various global constants */
@@ -171,6 +170,7 @@ enum {
 };
 
 /* forward declarations */
+struct scsi_device;
 struct ata_port_operations;
 struct ata_port;
 struct ata_queued_cmd;
@@ -247,8 +247,8 @@ struct ata_queued_cmd {
        struct ata_port         *ap;
        struct ata_device       *dev;
 
-       Scsi_Cmnd               *scsicmd;
-       void                    (*scsidone)(Scsi_Cmnd *);
+       struct scsi_cmnd                *scsicmd;
+       void                    (*scsidone)(struct scsi_cmnd *);
 
        struct list_head        node;
        unsigned long           flags;          /* ATA_QCFLAG_xxx */
@@ -403,7 +403,7 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i
 extern void ata_pci_remove_one (struct pci_dev *pdev);
 extern int ata_device_add(struct ata_probe_ent *ent);
 extern int ata_scsi_detect(Scsi_Host_Template *sht);
-extern int ata_scsi_queuecmd(Scsi_Cmnd *cmd, void (*done)(Scsi_Cmnd *));
+extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *));
 extern int ata_scsi_error(struct Scsi_Host *host);
 extern int ata_scsi_release(struct Scsi_Host *host);
 extern int ata_scsi_slave_config(struct scsi_device *sdev);
@@ -427,6 +427,9 @@ extern void ata_bmdma_start_pio (struct ata_queued_cmd *qc);
 extern int pci_test_config_bits(struct pci_dev *pdev, struct pci_bits *bits);
 extern void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat, unsigned int done_late);
 extern void ata_eng_timeout(struct ata_port *ap);
+extern int ata_std_bios_param(struct scsi_device *sdev,
+                             struct block_device *bdev,
+                             sector_t capacity, int geom[]);
 
 
 static inline unsigned long msecs_to_jiffies(unsigned long msecs)
index 0835011..9a5df31 100644 (file)
@@ -212,6 +212,12 @@ static inline int list_empty(const struct list_head *head)
  * list_empty_careful - tests whether a list is
  * empty _and_ checks that no other CPU might be
  * in the process of still modifying either member
+ *
+ * NOTE: using list_empty_careful() without synchronization
+ * can only be safe if the only activity that can happen
+ * to the list entry is list_del_init(). Eg. it cannot be used
+ * if another CPU could re-list_add() it.
+ *
  * @head: the list to test.
  */
 static inline int list_empty_careful(const struct list_head *head)
index 4d41c7c..00dd52b 100644 (file)
 #define COMPAQ_CISS_MAJOR6      110
 #define COMPAQ_CISS_MAJOR7      111
 
-#define VIODASD_MAJOR          112
-#define VIOCD_MAJOR            113
-
 #define ATARAID_MAJOR          114
 
 #define SCSI_DISK8_MAJOR       128
index 98f6166..6b7f9c1 100644 (file)
 
 #define TUN_MINOR           200
 
-struct device;
-
 struct miscdevice 
 {
        int minor;
        const char *name;
        struct file_operations *fops;
        struct list_head list;
-       struct device *dev;
        char devfs_name[64];
 };
 
index 5c57b7f..8810915 100644 (file)
@@ -143,7 +143,7 @@ extern pgprot_t protection_map[16];
 struct vm_operations_struct {
        void (*open)(struct vm_area_struct * area);
        void (*close)(struct vm_area_struct * area);
-       struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int unused);
+       struct page * (*nopage)(struct vm_area_struct * area, unsigned long address, int *type);
        int (*populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
 };
 
@@ -322,8 +322,10 @@ static inline void put_page(struct page *page)
 /*
  * The zone field is never updated after free_area_init_core()
  * sets it, so none of the operations on it need to be atomic.
+ * We'll have up to log2(MAX_NUMNODES * MAX_NR_ZONES) zones
+ * total, so we use NODES_SHIFT here to get enough bits.
  */
-#define ZONE_SHIFT (BITS_PER_LONG - 8)
+#define ZONE_SHIFT (BITS_PER_LONG - NODES_SHIFT - MAX_NR_ZONES_SHIFT)
 
 struct zone;
 extern struct zone *zone_table[];
@@ -405,7 +407,7 @@ static inline int page_mapped(struct page *page)
 extern void show_free_areas(void);
 
 struct page *shmem_nopage(struct vm_area_struct * vma,
-                       unsigned long address, int unused);
+                       unsigned long address, int *type);
 struct file *shmem_file_setup(char * name, loff_t size, unsigned long flags);
 void shmem_lock(struct file * file, int lock);
 int shmem_zero_setup(struct vm_area_struct *);
@@ -487,9 +489,6 @@ static inline int set_page_dirty(struct page *page)
        return __set_page_dirty_buffers(page);
 }
 
-extern long do_mprotect(struct mm_struct *mm, unsigned long start, 
-                       size_t len, unsigned long prot);
-
 /*
  * On a two-level page table, this ends up being trivial. Thus the
  * inlining and the symmetry break with pte_alloc_map() that does all
@@ -520,19 +519,10 @@ extern void exit_mmap(struct mm_struct *);
 
 extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
 
-extern unsigned long __do_mmap_pgoff(struct mm_struct *mm,
-       struct file *file, unsigned long addr,
+extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
        unsigned long len, unsigned long prot,
        unsigned long flag, unsigned long pgoff);
 
-static inline unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
-       unsigned long len, unsigned long prot,
-       unsigned long flag, unsigned long pgoff)
-{
-       return __do_mmap_pgoff(current->mm, file, addr, len,
-                              prot, flag, pgoff);
-}
-
 static inline unsigned long do_mmap(struct file *file, unsigned long addr,
        unsigned long len, unsigned long prot,
        unsigned long flag, unsigned long offset)
@@ -575,7 +565,7 @@ extern unsigned long page_unuse(struct page *);
 extern void truncate_inode_pages(struct address_space *, loff_t);
 
 /* generic vm_area_ops exported for stackable file systems */
-extern struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int);
+struct page *filemap_nopage(struct vm_area_struct *, unsigned long, int *);
 
 /* mm/page-writeback.c */
 int write_one_page(struct page *page, int wait);
index bea51c4..a089e01 100644 (file)
@@ -159,7 +159,10 @@ struct zone {
 #define ZONE_DMA               0
 #define ZONE_NORMAL            1
 #define ZONE_HIGHMEM           2
-#define MAX_NR_ZONES           3
+
+#define MAX_NR_ZONES           3       /* Sync this with MAX_NR_ZONES_SHIFT */
+#define MAX_NR_ZONES_SHIFT     2       /* ceil(log2(MAX_NR_ZONES)) */
+
 #define GFP_ZONEMASK   0x03
 
 /*
@@ -284,8 +287,6 @@ struct ctl_table;
 struct file;
 int min_free_kbytes_sysctl_handler(struct ctl_table *, int, struct file *, 
                                          void *, size_t *);
-extern void setup_per_zone_pages_min(void);
-
 
 #ifdef CONFIG_NUMA
 #define MAX_NR_MEMBLKS BITS_PER_LONG /* Max number of Memory Blocks */
index 4494574..13ff244 100644 (file)
@@ -60,11 +60,10 @@ search_extable(const struct exception_table_entry *first,
 #define __module_cat(a,b) ___module_cat(a,b)
 #define __MODULE_INFO(tag, name, info)                                   \
 static const char __module_cat(name,__LINE__)[]                                  \
-  __attribute_used__                                                     \
   __attribute__((section(".modinfo"),unused)) = __stringify(tag) "=" info
 
-#define MODULE_GENERIC_TABLE(gtype,name)               \
-extern const struct gtype##_id __mod_##gtype##_table   \
+#define MODULE_GENERIC_TABLE(gtype,name)                       \
+extern const struct gtype##_id __mod_##gtype##_table           \
   __attribute__ ((unused, alias(__stringify(name))))
 
 #define THIS_MODULE (&__this_module)
@@ -143,7 +142,6 @@ void *__symbol_get_gpl(const char *symbol);
 #define __CRC_SYMBOL(sym, sec)                                 \
        extern void *__crc_##sym __attribute__((weak));         \
        static const unsigned long __kcrctab_##sym              \
-       __attribute_used__                                      \
        __attribute__((section("__kcrctab" sec), unused))       \
        = (unsigned long) &__crc_##sym;
 #else
@@ -157,7 +155,6 @@ void *__symbol_get_gpl(const char *symbol);
        __attribute__((section("__ksymtab_strings")))           \
        = MODULE_SYMBOL_PREFIX #sym;                            \
        static const struct kernel_symbol __ksymtab_##sym       \
-       __attribute_used__                                      \
        __attribute__((section("__ksymtab" sec), unused))       \
        = { (unsigned long)&sym, __kstrtab_##sym }
 
index cbca007..0a5becb 100644 (file)
@@ -52,7 +52,6 @@ struct kparam_array
 #define __module_param_call(prefix, name, set, get, arg, perm)         \
        static char __param_str_##name[] __initdata = prefix #name;     \
        static struct kernel_param const __param_##name                 \
-       __attribute_used__                                              \
     __attribute__ ((unused,__section__ ("__param"),aligned(sizeof(void *)))) \
        = { __param_str_##name, perm, set, get, arg }
 
index b1fb57c..f5c6209 100644 (file)
@@ -4,13 +4,8 @@
 /*
  * The MS-DOS filesystem constants/structures
  */
-#include <linux/buffer_head.h>
-#include <linux/string.h>
 #include <asm/byteorder.h>
 
-struct statfs;
-
-
 #define SECTOR_SIZE    512             /* sector size (bytes) */
 #define SECTOR_BITS    9               /* log2(SECTOR_SIZE) */
 #define MSDOS_DPB      (MSDOS_DPS)     /* dir entries per block */
@@ -18,6 +13,9 @@ struct statfs;
 #define MSDOS_DPS      (SECTOR_SIZE / sizeof(struct msdos_dir_entry))
 #define MSDOS_DPS_BITS 4               /* log2(MSDOS_DPS) */
 
+
+#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
+
 #define MSDOS_ROOT_INO 1       /* == MINIX_ROOT_INO */
 #define MSDOS_DIR_BITS 5       /* log2(sizeof(struct msdos_dir_entry)) */
 
@@ -25,8 +23,6 @@ struct statfs;
 #define FAT_MAX_DIR_ENTRIES    (65536)
 #define FAT_MAX_DIR_SIZE       (FAT_MAX_DIR_ENTRIES << MSDOS_DIR_BITS)
 
-#define MSDOS_SUPER_MAGIC 0x4d44 /* MD */
-
 #define ATTR_NONE    0 /* no attribute bits */
 #define ATTR_RO      1  /* read-only */
 #define ATTR_HIDDEN  2  /* hidden */
@@ -35,10 +31,10 @@ struct statfs;
 #define ATTR_DIR     16 /* directory */
 #define ATTR_ARCH    32 /* archived */
 
+/* attribute bits that are copied "as is" */
 #define ATTR_UNUSED  (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
-       /* attribute bits that are copied "as is" */
+/* bits that are used by the Windows 95/Windows NT extended FAT */
 #define ATTR_EXT     (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
-       /* bits that are used by the Windows 95/Windows NT extended FAT */
 
 #define CASE_LOWER_BASE 8      /* base is lower case */
 #define CASE_LOWER_EXT  16     /* extension is lower case */
@@ -46,8 +42,12 @@ struct statfs;
 #define DELETED_FLAG 0xe5 /* marks file as deleted when in name[0] */
 #define IS_FREE(n) (!*(n) || *(n) == DELETED_FLAG)
 
+/* valid file mode bits */
 #define MSDOS_VALID_MODE (S_IFREG | S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO)
-       /* valid file mode bits */
+/* Convert attribute bits and a mask to the UNIX mode. */
+#define MSDOS_MKMODE(a, m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
+/* Convert the UNIX mode to MS-DOS attribute bits. */
+#define MSDOS_MKATTR(m) ((m & S_IWUGO) ? ATTR_NONE : ATTR_RO)
 
 #define MSDOS_NAME 11 /* maximum name length */
 #define MSDOS_LONGNAME 256 /* maximum name length */
@@ -55,24 +55,29 @@ struct statfs;
 #define MSDOS_DOT    ".          " /* ".", padded to MSDOS_NAME chars */
 #define MSDOS_DOTDOT "..         " /* "..", padded to MSDOS_NAME chars */
 
-#define MSDOS_FAT12 4084 /* maximum number of clusters in a 12 bit FAT */
-
 /* media of boot sector */
 #define FAT_VALID_MEDIA(x)     ((0xF8 <= (x) && (x) <= 0xFF) || (x) == 0xF0)
 #define FAT_FIRST_ENT(s, x)    ((MSDOS_SB(s)->fat_bits == 32 ? 0x0FFFFF00 : \
        MSDOS_SB(s)->fat_bits == 16 ? 0xFF00 : 0xF00) | (x))
 
+/* maximum number of clusters */
+#define MAX_FAT12 0xFF4
+#define MAX_FAT16 0xFFF4
+#define MAX_FAT32 0x0FFFFFF6
+#define MAX_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? MAX_FAT32 : \
+       MSDOS_SB(s)->fat_bits == 16 ? MAX_FAT16 : MAX_FAT12)
+
 /* bad cluster mark */
 #define BAD_FAT12 0xFF7
 #define BAD_FAT16 0xFFF7
-#define BAD_FAT32 0xFFFFFF7
+#define BAD_FAT32 0x0FFFFFF7
 #define BAD_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? BAD_FAT32 : \
        MSDOS_SB(s)->fat_bits == 16 ? BAD_FAT16 : BAD_FAT12)
 
 /* standard EOF */
 #define EOF_FAT12 0xFFF
 #define EOF_FAT16 0xFFFF
-#define EOF_FAT32 0xFFFFFFF
+#define EOF_FAT32 0x0FFFFFFF
 #define EOF_FAT(s) (MSDOS_SB(s)->fat_bits == 32 ? EOF_FAT32 : \
        MSDOS_SB(s)->fat_bits == 16 ? EOF_FAT16 : EOF_FAT12)
 
@@ -80,8 +85,8 @@ struct statfs;
 #define FAT_ENT_BAD    (BAD_FAT32)
 #define FAT_ENT_EOF    (EOF_FAT32)
 
-#define FAT_FSINFO_SIG1                0x41615252
-#define FAT_FSINFO_SIG2                0x61417272
+#define FAT_FSINFO_SIG1        0x41615252
+#define FAT_FSINFO_SIG2        0x61417272
 #define IS_FSINFO(x)   (CF_LE_L((x)->signature1) == FAT_FSINFO_SIG1    \
                         && CF_LE_L((x)->signature2) == FAT_FSINFO_SIG2)
 
@@ -179,15 +184,10 @@ struct vfat_slot_info {
        loff_t i_pos;                  /* on-disk position of directory entry */
 };
 
-/* Convert attribute bits and a mask to the UNIX mode. */
-#define MSDOS_MKMODE(a,m) (m & (a & ATTR_RO ? S_IRUGO|S_IXUGO : S_IRWXUGO))
-
-/* Convert the UNIX mode to MS-DOS attribute bits. */
-#define MSDOS_MKATTR(m) ((m & S_IWUGO) ? ATTR_NONE : ATTR_RO)
-
-
 #ifdef __KERNEL__
 
+#include <linux/buffer_head.h>
+#include <linux/string.h>
 #include <linux/nls.h>
 #include <linux/msdos_fs_i.h>
 #include <linux/msdos_fs_sb.h>
index 546458d..c79a172 100644 (file)
@@ -47,9 +47,9 @@ struct msdos_sb_info {
        unsigned long data_start;    /* first data sector */
        unsigned long clusters;      /* number of clusters */
        unsigned long root_cluster;  /* first cluster of the root directory */
-       unsigned long fsinfo_sector; /* FAT32 fsinfo offset from start of disk */
+       unsigned long fsinfo_sector; /* sector number of FAT32 fsinfo */
        struct semaphore fat_lock;
-       int prev_free;               /* previously returned free cluster number */
+       int prev_free;               /* previously allocated cluster number */
        int free_clusters;           /* -1 if undefined */
        struct fat_mount_options options;
        struct nls_table *nls_disk;  /* Codepage used on disk */
index 8a3311e..dcb0228 100644 (file)
@@ -35,6 +35,9 @@ enum {
 /* Define PARANOIA to include extra sanity checking code in here & driver */
 #define PARANOIA
 
+/* userspace doesn't need the nbd_device structure */
+#ifdef __KERNEL__
+
 struct nbd_device {
        int flags;
        int harderror;          /* Code of hard error                   */
@@ -53,6 +56,8 @@ struct nbd_device {
        u64 bytesize;
 };
 
+#endif
+
 /* This now IS in some kind of include file... */
 
 /* These are send over network in request/reply magic field */
index 88cc98a..bc4f598 100644 (file)
@@ -8,10 +8,8 @@
 #include <linux/netfilter.h>
 #if defined(__KERNEL__) && defined(CONFIG_BRIDGE_NETFILTER)
 #include <asm/atomic.h>
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
 #include <linux/if_ether.h>
 #endif
-#endif
 
 /* Bridge Hooks */
 /* After promisc drops, checksum checks. */
@@ -71,13 +69,11 @@ static inline
 void nf_bridge_maybe_copy_header(struct sk_buff *skb)
 {
        if (skb->nf_bridge) {
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
                if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
-                       memcpy(skb->data - 18, skb->nf_bridge->hh, 18);
+                       memcpy(skb->data - 18, skb->nf_bridge->data, 18);
                        skb_push(skb, 4);
                } else
-#endif
-                       memcpy(skb->data - 16, skb->nf_bridge->hh, 16);
+                       memcpy(skb->data - 16, skb->nf_bridge->data, 16);
        }
 }
 
@@ -86,11 +82,10 @@ void nf_bridge_save_header(struct sk_buff *skb)
 {
         int header_size = 16;
 
-#if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE)
        if (skb->protocol == __constant_htons(ETH_P_8021Q))
                header_size = 18;
-#endif
-       memcpy(skb->nf_bridge->hh, skb->data - header_size, header_size);
+
+       memcpy(skb->nf_bridge->data, skb->data - header_size, header_size);
 }
 
 struct bridge_skb_cb {
index 90c8aa3..f51f307 100644 (file)
@@ -419,7 +419,7 @@ static inline loff_t
 nfs_size_to_loff_t(__u64 size)
 {
        loff_t maxsz = (((loff_t) ULONG_MAX) << PAGE_CACHE_SHIFT) + PAGE_CACHE_SIZE - 1;
-       if (size > (__u64) maxsz)
+       if (size > maxsz)
                return maxsz;
        return (loff_t) size;
 }
index 006fde0..0b35e71 100644 (file)
@@ -133,6 +133,7 @@ extern void get_full_page_state(struct page_state *ret);
 
 #define inc_page_state(member) mod_page_state(member, 1UL)
 #define dec_page_state(member) mod_page_state(member, 0UL - 1)
+#define add_page_state(member,delta) mod_page_state(member, (delta))
 #define sub_page_state(member,delta) mod_page_state(member, 0UL - (delta))
 
 
index 8fc118d..e552cb0 100644 (file)
@@ -8,7 +8,6 @@
 #include <linux/fs.h>
 #include <linux/list.h>
 #include <linux/highmem.h>
-#include <linux/pagemap.h>
 #include <asm/uaccess.h>
 #include <linux/gfp.h>
 
index 5f982a1..fa33328 100644 (file)
@@ -1,3 +1,14 @@
+/*
+ * linux/include/linux/parser.h
+ *
+ * Header for lib/parser.c
+ * Intended use of these functions is parsing filesystem argument lists,
+ * but could potentially be used anywhere else that simple option=arg
+ * parsing is required.
+ */
+
+
+/* associates an integer enumerator with a pattern string. */
 struct match_token {
        int token;
        char *pattern;
@@ -5,15 +16,16 @@ struct match_token {
 
 typedef struct match_token match_table_t[];
 
+/* Maximum number of arguments that match_token will find in a pattern */
 enum {MAX_OPT_ARGS = 3};
 
+/* Describe the location within a string of a substring */
 typedef struct {
        char *from;
        char *to;
 } substring_t;
 
-int match_token(char *s, match_table_t table, substring_t args[]);
-
+int match_token(char *, match_table_t table, substring_t args[]);
 int match_int(substring_t *, int *result);
 int match_octal(substring_t *, int *result);
 int match_hex(substring_t *, int *result);
index 3893dc6..b88b9d3 100644 (file)
@@ -36,6 +36,7 @@
 #define  PCI_COMMAND_WAIT      0x80    /* Enable address/data stepping */
 #define  PCI_COMMAND_SERR      0x100   /* Enable SERR */
 #define  PCI_COMMAND_FAST_BACK 0x200   /* Enable back-to-back writes */
+#define  PCI_COMMAND_INTX_DISABLE 0x400 /* INTx Emulation Disable */
 
 #define PCI_STATUS             0x06    /* 16 bits */
 #define  PCI_STATUS_CAP_LIST   0x10    /* Support Capability List */
 #define  PCI_CAP_ID_MSI                0x05    /* Message Signalled Interrupts */
 #define  PCI_CAP_ID_CHSWP      0x06    /* CompactPCI HotSwap */
 #define  PCI_CAP_ID_PCIX       0x07    /* PCI-X */
+#define  PCI_CAP_ID_EXP        0x10    /* PCI Express */
+#define  PCI_CAP_ID_MSIX       0x11    /* MSI-X */
 #define PCI_CAP_LIST_NEXT      1       /* Next capability in the list */
 #define PCI_CAP_FLAGS          2       /* Capability defined flags (16 bits) */
 #define PCI_CAP_SIZEOF         4
 #define  PCI_MSI_FLAGS_QSIZE   0x70    /* Message queue size configured */
 #define  PCI_MSI_FLAGS_QMASK   0x0e    /* Maximum queue size available */
 #define  PCI_MSI_FLAGS_ENABLE  0x01    /* MSI feature enabled */
+#define  PCI_MSI_FLAGS_MASKBIT 0x100   /* 64-bit mask bits allowed */
 #define PCI_MSI_RFU            3       /* Rest of capability flags */
 #define PCI_MSI_ADDRESS_LO     4       /* Lower 32 bits */
 #define PCI_MSI_ADDRESS_HI     8       /* Upper 32 bits (if PCI_MSI_FLAGS_64BIT set) */
 #define PCI_MSI_DATA_32                8       /* 16 bits of data for 32-bit devices */
 #define PCI_MSI_DATA_64                12      /* 16 bits of data for 64-bit devices */
+#define PCI_MSI_MASK_BIT       16      /* Mask bits register */
 
 /* CompactPCI Hotswap Register */
 
@@ -468,12 +473,10 @@ struct pci_bus {
 
        char            name[48];
 
-       struct device           *bridge;
-       struct class_device     class_dev;
+       struct  device  * dev;
 };
 
-#define pci_bus_b(n)   list_entry(n, struct pci_bus, node)
-#define to_pci_bus(n)  container_of(n, struct pci_bus, class_dev)
+#define pci_bus_b(n) list_entry(n, struct pci_bus, node)
 
 /*
  * Error values that may be returned by PCI functions.
@@ -609,8 +612,6 @@ struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct
 struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device,
                                unsigned int ss_vendor, unsigned int ss_device,
                                struct pci_dev *from);
-struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn);
-
 int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val);
 int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 *val);
 int pci_bus_read_config_dword (struct pci_bus *bus, unsigned int devfn, int where, u32 *val);
@@ -699,6 +700,18 @@ void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr);
 extern struct pci_dev *isa_bridge;
 #endif
 
+#ifndef CONFIG_PCI_USE_VECTOR
+static inline void pci_scan_msi_device(struct pci_dev *dev) {}
+static inline int pci_enable_msi(struct pci_dev *dev) {return -1;}
+static inline void msi_remove_pci_irq_vectors(struct pci_dev *dev) {}
+#else
+extern void pci_scan_msi_device(struct pci_dev *dev);
+extern int pci_enable_msi(struct pci_dev *dev);
+extern void msi_remove_pci_irq_vectors(struct pci_dev *dev);
+extern int msi_alloc_vectors(struct pci_dev* dev, int *vector, int nvec);
+extern int msi_free_vectors(struct pci_dev* dev, int *vector, int nvec);
+#endif
+
 #endif /* CONFIG_PCI */
 
 /* Include architecture-dependent settings and functions */
@@ -772,7 +785,26 @@ static inline int pci_module_init(struct pci_driver *drv)
 {
        int rc = pci_register_driver (drv);
 
-       return rc < 0 ? rc : 0;
+       if (rc > 0)
+               return 0;
+
+       /* iff CONFIG_HOTPLUG and built into kernel, we should
+        * leave the driver around for future hotplug events.
+        * For the module case, a hotplug daemon of some sort
+        * should load a module in response to an insert event. */
+#if defined(CONFIG_HOTPLUG) && !defined(MODULE)
+       if (rc == 0)
+               return 0;
+#else
+       if (rc == 0)
+               rc = -ENODEV;           
+#endif
+
+       /* if we get here, we need to clean up pci driver instance
+        * and return some sort of error */
+       pci_unregister_driver (drv);
+       
+       return rc;
 }
 
 /*
index a33f552..b6ad8d3 100644 (file)
 
 #define PCI_VENDOR_ID_SGI              0x10a9
 #define PCI_DEVICE_ID_SGI_IOC3         0x0003
+#define PCI_DEVICE_ID_SGI_IOC4         0x100a
 #define PCI_VENDOR_ID_SGI_LITHIUM      0x1002
 
 #define PCI_VENDOR_ID_ACC              0x10aa
 #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE      0x0085
 #define PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA     0x008e
 #define PCI_DEVICE_ID_NVIDIA_ITNT2             0x00A0
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3           0x00d1
-#define PCI_DEVICE_ID_NVIDIA_NFORCE3S                  0x00e1
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE       0x00d5
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA     0x00e3
 #define PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE      0x00e5
 #define PCI_DEVICE_ID_TIGON3_5702      0x1646
 #define PCI_DEVICE_ID_TIGON3_5703      0x1647
 #define PCI_DEVICE_ID_TIGON3_5704      0x1648
+#define PCI_DEVICE_ID_TIGON3_5704S_2   0x1649
 #define PCI_DEVICE_ID_TIGON3_5702FE    0x164d
 #define PCI_DEVICE_ID_TIGON3_5705      0x1653
 #define PCI_DEVICE_ID_TIGON3_5705_2    0x1654
 #define PCI_DEVICE_ID_TIGON3_5705M     0x165d
 #define PCI_DEVICE_ID_TIGON3_5705M_2   0x165e
+#define PCI_DEVICE_ID_TIGON3_5705F     0x166e
 #define PCI_DEVICE_ID_TIGON3_5782      0x1696
 #define PCI_DEVICE_ID_TIGON3_5788      0x169c
 #define PCI_DEVICE_ID_TIGON3_5702X     0x16a6
 #define PCI_DEVICE_ID_INTEL_82443MX_3  0x719b
 #define PCI_DEVICE_ID_INTEL_82443GX_0  0x71a0
 #define PCI_DEVICE_ID_INTEL_82443GX_1  0x71a1
+#define PCI_DEVICE_ID_INTEL_82443GX_2  0x71a2
 #define PCI_DEVICE_ID_INTEL_82372FB_0  0x7600
 #define PCI_DEVICE_ID_INTEL_82372FB_1  0x7601
 #define PCI_DEVICE_ID_INTEL_82372FB_2  0x7602
diff --git a/include/linux/pci_msi.h b/include/linux/pci_msi.h
new file mode 100644 (file)
index 0000000..0e42e65
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+ *     ../include/linux/pci_msi.h
+ *
+ */
+
+#ifndef _ASM_PCI_MSI_H
+#define _ASM_PCI_MSI_H
+
+#include <linux/pci.h>
+
+#define MSI_AUTO -1
+#define NR_REPEATS     23
+#define NR_RESERVED_VECTORS 3 /*FIRST_DEVICE_VECTOR,FIRST_SYSTEM_VECTOR,0x80 */
+
+/*
+ * Assume the maximum number of hot plug slots supported by the system is about
+ * ten. The worstcase is that each of these slots is hot-added with a device,
+ * which has two MSI/MSI-X capable functions. To avoid any MSI-X driver, which
+ * attempts to request all available vectors, NR_HP_RESERVED_VECTORS is defined
+ * as below to ensure at least one message is assigned to each detected MSI/
+ * MSI-X device function.
+ */
+#define NR_HP_RESERVED_VECTORS         20
+
+extern int vector_irq[NR_IRQS];
+extern cpumask_t pending_irq_balance_cpumask[NR_IRQS];
+extern void (*interrupt[NR_IRQS])(void);
+
+#ifdef CONFIG_SMP
+#define set_msi_irq_affinity   set_msi_affinity
+#else
+#define set_msi_irq_affinity   NULL
+static inline void move_msi(int vector) {}
+#endif
+
+#ifndef CONFIG_X86_IO_APIC
+static inline int get_ioapic_vector(struct pci_dev *dev) { return -1;}
+static inline void restore_ioapic_irq_handler(int irq) {}
+#else
+extern void restore_ioapic_irq_handler(int irq);
+#endif
+
+/*
+ * MSI-X Address Register
+ */
+#define PCI_MSIX_FLAGS_QSIZE           0x7FF
+#define PCI_MSIX_FLAGS_ENABLE          (1 << 15)
+#define PCI_MSIX_FLAGS_BIRMASK         (7 << 0)
+#define PCI_MSIX_FLAGS_BITMASK         (1 << 0)
+
+#define PCI_MSIX_ENTRY_LOWER_ADDR_OFFSET       0
+#define PCI_MSIX_ENTRY_UPPER_ADDR_OFFSET       4
+#define PCI_MSIX_ENTRY_DATA_OFFSET             8
+#define PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET      12
+#define PCI_MSIX_ENTRY_SIZE                    16
+
+#define msi_control_reg(base)          (base + PCI_MSI_FLAGS)
+#define msi_lower_address_reg(base)    (base + PCI_MSI_ADDRESS_LO)
+#define msi_upper_address_reg(base)    (base + PCI_MSI_ADDRESS_HI)
+#define msi_data_reg(base, is64bit)    \
+       ( (is64bit == 1) ? base+PCI_MSI_DATA_64 : base+PCI_MSI_DATA_32 )
+#define msi_mask_bits_reg(base, is64bit) \
+       ( (is64bit == 1) ? base+PCI_MSI_MASK_BIT : base+PCI_MSI_MASK_BIT-4)
+#define msi_disable(control)           control &= ~PCI_MSI_FLAGS_ENABLE
+#define multi_msi_capable(control) \
+       (1 << ((control & PCI_MSI_FLAGS_QMASK) >> 1))
+#define multi_msi_enable(control, num) \
+       control |= (((num >> 1) << 4) & PCI_MSI_FLAGS_QSIZE);
+#define is_64bit_address(control)      (control & PCI_MSI_FLAGS_64BIT)
+#define is_mask_bit_support(control)   (control & PCI_MSI_FLAGS_MASKBIT)
+#define msi_enable(control, num) multi_msi_enable(control, num); \
+       control |= PCI_MSI_FLAGS_ENABLE
+
+#define msix_control_reg               msi_control_reg
+#define msix_table_offset_reg(base)    (base + 0x04)
+#define msix_pba_offset_reg(base)      (base + 0x08)
+#define msix_enable(control)           control |= PCI_MSIX_FLAGS_ENABLE
+#define msix_disable(control)          control &= ~PCI_MSIX_FLAGS_ENABLE
+#define msix_table_size(control)       ((control & PCI_MSIX_FLAGS_QSIZE)+1)
+#define multi_msix_capable             msix_table_size
+#define msix_unmask(address)           (address & ~PCI_MSIX_FLAGS_BITMASK)
+#define msix_mask(address)             (address | PCI_MSIX_FLAGS_BITMASK)
+#define msix_is_pending(address)       (address & PCI_MSIX_FLAGS_PENDMASK)
+
+extern char __dbg_str_buf[256];
+#define _DEFINE_DBG_BUFFER     char __dbg_str_buf[256];
+#define _DBG_K_TRACE_ENTRY     ((unsigned int)0x00000001)
+#define _DBG_K_TRACE_EXIT      ((unsigned int)0x00000002)
+#define _DBG_K_INFO            ((unsigned int)0x00000004)
+#define _DBG_K_ERROR           ((unsigned int)0x00000008)
+#define _DBG_K_TRACE   (_DBG_K_TRACE_ENTRY | _DBG_K_TRACE_EXIT)
+
+#define _DEBUG_LEVEL   (_DBG_K_INFO | _DBG_K_ERROR | _DBG_K_TRACE)
+#define _DBG_PRINT( dbg_flags, args... )               \
+if ( _DEBUG_LEVEL & (dbg_flags) )                      \
+{                                                      \
+       int len;                                        \
+       len = sprintf(__dbg_str_buf, "%s:%d: %s ",      \
+               __FILE__, __LINE__, __FUNCTION__ );     \
+       sprintf(__dbg_str_buf + len, args);             \
+       printk(KERN_INFO "%s\n", __dbg_str_buf);        \
+}
+
+#define MSI_FUNCTION_TRACE_ENTER       \
+       _DBG_PRINT (_DBG_K_TRACE_ENTRY, "%s", "[Entry]");
+#define MSI_FUNCTION_TRACE_EXIT                \
+       _DBG_PRINT (_DBG_K_TRACE_EXIT, "%s", "[Entry]");
+
+/*
+ * MSI Defined Data Structures
+ */
+#define MSI_ADDRESS_HEADER             0xfee
+#define MSI_ADDRESS_HEADER_SHIFT       12
+#define MSI_ADDRESS_HEADER_MASK                0xfff000
+#define MSI_TARGET_CPU_SHIFT           4
+#define MSI_TARGET_CPU_MASK            0xff
+#define MSI_DELIVERY_MODE              0
+#define MSI_LEVEL_MODE                 1       /* Edge always assert */
+#define MSI_TRIGGER_MODE               0       /* MSI is edge sensitive */
+#define MSI_LOGICAL_MODE               1
+#define MSI_REDIRECTION_HINT_MODE      0
+#ifdef CONFIG_SMP
+#define MSI_TARGET_CPU                 logical_smp_processor_id()
+#else
+#define MSI_TARGET_CPU                 TARGET_CPUS
+#endif
+
+struct msg_data {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+       __u32   vector          :  8;
+       __u32   delivery_mode   :  3;   /* 000b: FIXED | 001b: lowest prior */
+       __u32   reserved_1      :  3;
+       __u32   level           :  1;   /* 0: deassert | 1: assert */
+       __u32   trigger         :  1;   /* 0: edge | 1: level */
+       __u32   reserved_2      : 16;
+#elif defined(__BIG_ENDIAN_BITFIELD)
+       __u32   reserved_2      : 16;
+       __u32   trigger         :  1;   /* 0: edge | 1: level */
+       __u32   level           :  1;   /* 0: deassert | 1: assert */
+       __u32   reserved_1      :  3;
+       __u32   delivery_mode   :  3;   /* 000b: FIXED | 001b: lowest prior */
+       __u32   vector          :  8;
+#else
+#error "Bitfield endianness not defined! Check your byteorder.h"
+#endif
+} __attribute__ ((packed));
+
+struct msg_address {
+       union {
+               struct {
+#if defined(__LITTLE_ENDIAN_BITFIELD)
+                       __u32   reserved_1      :  2;
+                       __u32   dest_mode       :  1;   /*0:physic | 1:logic */
+                       __u32   redirection_hint:  1;   /*0: dedicated CPU
+                                                         1: lowest priority */
+                       __u32   reserved_2      :  4;
+                       __u32   dest_id         : 24;   /* Destination ID */
+#elif defined(__BIG_ENDIAN_BITFIELD)
+                       __u32   dest_id         : 24;   /* Destination ID */
+                       __u32   reserved_2      :  4;
+                       __u32   redirection_hint:  1;   /*0: dedicated CPU
+                                                         1: lowest priority */
+                       __u32   dest_mode       :  1;   /*0:physic | 1:logic */
+                       __u32   reserved_1      :  2;
+#else
+#error "Bitfield endianness not defined! Check your byteorder.h"
+#endif
+               }u;
+                       __u32  value;
+       }lo_address;
+       __u32   hi_address;
+} __attribute__ ((packed));
+
+struct msi_desc {
+       struct {
+               __u8    type    : 5;    /* {0: unused, 5h:MSI, 11h:MSI-X} */
+               __u8    maskbit : 1;    /* mask-pending bit supported ?   */
+               __u8    reserved: 2;    /* reserved                       */
+               __u8    entry_nr;       /* specific enabled entry         */
+               __u8    default_vector; /* default pre-assigned vector    */
+               __u8    current_cpu;    /* current destination cpu        */
+       }msi_attrib;
+
+       struct {
+               __u16   head;
+               __u16   tail;
+       }link;
+
+       unsigned long mask_base;
+       struct pci_dev *dev;
+};
+
+#endif /* _ASM_PCI_MSI_H */
index 53c5217..594f564 100644 (file)
@@ -8,17 +8,14 @@
 #include <linux/spinlock.h>
 #include <linux/smp.h>
 #include <linux/threads.h>
+#include <linux/percpu.h>
 
 #ifdef CONFIG_SMP
 
-struct __percpu_counter {
-       long count;
-} ____cacheline_aligned;
-
 struct percpu_counter {
        spinlock_t lock;
        long count;
-       struct __percpu_counter counters[NR_CPUS];
+       long *counters;
 };
 
 #if NR_CPUS >= 16
@@ -29,12 +26,14 @@ struct percpu_counter {
 
 static inline void percpu_counter_init(struct percpu_counter *fbc)
 {
-       int i;
-
        spin_lock_init(&fbc->lock);
        fbc->count = 0;
-       for (i = 0; i < NR_CPUS; i++)
-               fbc->counters[i].count = 0;
+       fbc->counters = alloc_percpu(long);
+}
+
+static inline void percpu_counter_destroy(struct percpu_counter *fbc)
+{
+       free_percpu(fbc->counters);
 }
 
 void percpu_counter_mod(struct percpu_counter *fbc, long amount);
@@ -69,6 +68,10 @@ static inline void percpu_counter_init(struct percpu_counter *fbc)
        fbc->count = 0;
 }
 
+static inline void percpu_counter_destroy(struct percpu_counter *fbc)
+{
+}
+
 static inline void
 percpu_counter_mod(struct percpu_counter *fbc, long amount)
 {
index d21868a..d8de4a1 100644 (file)
@@ -131,9 +131,7 @@ extern void proc_tty_unregister_driver(struct tty_driver *driver);
 /*
  * proc_devtree.c
  */
-struct device_node;
 extern void proc_device_tree_init(void);
-extern void proc_device_tree_add_node(struct device_node *, struct proc_dir_entry *);
 
 /*
  * proc_rtas.c
@@ -143,6 +141,8 @@ extern void proc_rtas_init(void);
 extern struct proc_dir_entry *proc_symlink(const char *,
                struct proc_dir_entry *, const char *);
 extern struct proc_dir_entry *proc_mkdir(const char *,struct proc_dir_entry *);
+extern struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode,
+                       struct proc_dir_entry *parent);
 
 static inline struct proc_dir_entry *create_proc_read_entry(const char *name,
        mode_t mode, struct proc_dir_entry *base, 
diff --git a/include/linux/proc_mm.h b/include/linux/proc_mm.h
deleted file mode 100644 (file)
index 254f8b4..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#ifndef __PROC_MM_H
-#define __PROC_MM_H
-
-#include "linux/sched.h"
-
-#define MM_MMAP 54
-#define MM_MUNMAP 55
-#define MM_MPROTECT 56
-#define MM_COPY_SEGMENTS 57
-
-struct mm_mmap {
-       unsigned long addr;
-       unsigned long len;
-       unsigned long prot;
-       unsigned long flags;
-       unsigned long fd;
-       unsigned long offset;
-};
-
-struct mm_munmap {
-       unsigned long addr;
-       unsigned long len;      
-};
-
-struct mm_mprotect {
-       unsigned long addr;
-       unsigned long len;
-        unsigned int prot;
-};
-
-struct proc_mm_op {
-       int op;
-       union {
-               struct mm_mmap mmap;
-               struct mm_munmap munmap;
-               struct mm_mprotect mprotect;
-               int copy_segments;
-       } u;
-};
-
-extern struct mm_struct *proc_mm_get_mm(int fd);
-
-#endif
index 447b5e1..2f65eb5 100644 (file)
@@ -250,7 +250,7 @@ struct dquot_operations {
        void (*free_space) (struct inode *, qsize_t);
        void (*free_inode) (const struct inode *, unsigned long);
        int (*transfer) (struct inode *, struct iattr *);
-       int (*sync_dquot) (struct dquot *);
+       int (*write_dquot) (struct dquot *);
 };
 
 /* Operations handling requests from userspace */
index cfee116..6ea36af 100644 (file)
@@ -1719,7 +1719,7 @@ void reiserfs_allow_writes(struct super_block *s) ;
 void reiserfs_check_lock_depth(char *caller) ;
 void reiserfs_prepare_for_journal(struct super_block *, struct buffer_head *bh, int wait) ;
 void reiserfs_restore_prepared_buffer(struct super_block *, struct buffer_head *bh) ;
-int journal_init(struct super_block *, const char * j_dev_name, int old_format) ;
+int journal_init(struct super_block *, const char * j_dev_name, int old_format, unsigned int) ;
 int journal_release(struct reiserfs_transaction_handle*, struct super_block *) ;
 int journal_release_error(struct reiserfs_transaction_handle*, struct super_block *) ;
 int journal_end(struct reiserfs_transaction_handle *, struct super_block *, unsigned long) ;
index d987793..14e555c 100644 (file)
@@ -206,7 +206,6 @@ struct mm_struct {
        unsigned long rss, total_vm, locked_vm;
        unsigned long def_flags;
        cpumask_t cpu_vm_mask;
-       unsigned long swap_address;
 
        unsigned long saved_auxv[40]; /* for /proc/PID/auxv */
 
index a3cf7dd..d99e973 100644 (file)
@@ -49,6 +49,7 @@ struct serio_dev {
        irqreturn_t (*interrupt)(struct serio *, unsigned char,
                        unsigned int, struct pt_regs *);
        void (*connect)(struct serio *, struct serio_dev *dev);
+       int  (*reconnect)(struct serio *);
        void (*disconnect)(struct serio *);
        void (*cleanup)(struct serio *);
 
@@ -58,12 +59,15 @@ struct serio_dev {
 int serio_open(struct serio *serio, struct serio_dev *dev);
 void serio_close(struct serio *serio);
 void serio_rescan(struct serio *serio);
+void serio_reconnect(struct serio *serio);
 irqreturn_t serio_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct pt_regs *regs);
 
 void serio_register_port(struct serio *serio);
-void serio_register_slave_port(struct serio *serio);
+void serio_register_port_delayed(struct serio *serio);
+void __serio_register_port(struct serio *serio);
 void serio_unregister_port(struct serio *serio);
-void serio_unregister_slave_port(struct serio *serio);
+void serio_unregister_port_delayed(struct serio *serio);
+void __serio_unregister_port(struct serio *serio);
 void serio_register_device(struct serio_dev *dev);
 void serio_unregister_device(struct serio_dev *dev);
 
index b7c23dd..77162e4 100644 (file)
@@ -107,7 +107,7 @@ struct nf_bridge_info {
        struct net_device *netoutdev;
 #endif
        unsigned int mask;
-       unsigned long hh[32 / sizeof(unsigned long)];
+       unsigned long data[32 / sizeof(unsigned long)];
 };
 #endif
 
@@ -764,10 +764,10 @@ static inline struct sk_buff *__skb_dequeue_tail(struct sk_buff_head *list)
 }
 
 /**
- *     skb_dequeue - remove from the head of the queue
+ *     skb_dequeue_tail - remove from the tail of the queue
  *     @list: list to dequeue from
  *
- *     Remove the head of the list. The list lock is taken so the function
+ *     Remove the tail of the list. The list lock is taken so the function
  *     may be used safely with other locking list functions. The tail item is
  *     returned or %NULL if the list is empty.
  */
index 4611a80..b1da606 100644 (file)
@@ -580,6 +580,14 @@ enum {
        NET_SCTP_MAX_BURST               = 12,
 };
 
+/* /proc/sys/net/bridge */
+enum {
+       NET_BRIDGE_NF_CALL_ARPTABLES = 1,
+       NET_BRIDGE_NF_CALL_IPTABLES = 2,
+       NET_BRIDGE_NF_CALL_IP6TABLES = 3,
+       NET_BRIDGE_NF_FILTER_VLAN_TAGGED = 4,
+};
+
 /* CTL_PROC names: */
 
 /* CTL_FS names: */
index 3a2e7bf..d25e5bd 100644 (file)
@@ -386,7 +386,10 @@ struct tcp_sock {
        struct tcp_opt    tcp;
 };
 
-#define tcp_sk(__sk) (&((struct tcp_sock *)__sk)->tcp)
+static inline struct tcp_opt * tcp_sk(const struct sock *__sk)
+{
+       return &((struct tcp_sock *)__sk)->tcp;
+}
 
 #endif
 
index 058d7c3..c9e92e0 100644 (file)
@@ -282,7 +282,7 @@ struct timex {
  */
 extern unsigned long tick_usec;                /* USER_HZ period (usec) */
 extern unsigned long tick_nsec;                /* ACTHZ          period (nsec) */
-#define tickadj ((int)(500/HZ ? : 1))
+extern int tickadj;                    /* amount of adjustment per tick */
 
 /*
  * phase-lock loop variables
index da2d974..1cfb33e 100644 (file)
@@ -28,12 +28,20 @@ struct usb_ep;
  *     for mapping and unmapping the buffer.
  * @length: Length of that data
  * @no_interrupt: If true, hints that no completion irq is needed.
- *     Helpful sometimes with deep request queues.
+ *     Helpful sometimes with deep request queues that are handled
+ *     directly by DMA controllers.
  * @zero: If true, when writing data, makes the last packet be "short"
  *     by adding a zero length packet as needed;
  * @short_not_ok: When reading data, makes short packets be
  *     treated as errors (queue stops advancing till cleanup).
- * @complete: Function called when request completes
+ * @complete: Function called when request completes, so this request and
+ *     its buffer may be re-used.
+ *     Reads terminate with a short packet, or when the buffer fills,
+ *     whichever comes first.  When writes terminate, some data bytes
+ *     will usually still be in flight (often in a hardware fifo).
+ *     Errors (for reads or writes) stop the queue from advancing
+ *     until the completion function returns, so that any transfers
+ *     invalidated by the error may first be dequeued.
  * @context: For use by the completion callback
  * @list: For use by the gadget driver.
  * @status: Reports completion code, zero or a negative errno.
@@ -41,12 +49,13 @@ struct usb_ep;
  *     the completion callback returns.
  *     Code "-ESHUTDOWN" indicates completion caused by device disconnect,
  *     or when the driver disabled the endpoint.
- * @actual: Reports actual bytes transferred.  For reads (OUT
+ * @actual: Reports bytes transferred to/from the buffer.  For reads (OUT
  *     transfers) this may be less than the requested length.  If the
  *     short_not_ok flag is set, short reads are treated as errors
  *     even when status otherwise indicates successful completion.
- *     Note that for writes (IN transfers) the data bytes may still
- *     reside in a device-side FIFO.
+ *     Note that for writes (IN transfers) some data bytes may still
+ *     reside in a device-side FIFO when the request is reported as
+ *     complete.
  *
  * These are allocated/freed through the endpoint they're used with.  The
  * hardware's driver can add extra per-request data to the memory it returns,
@@ -287,6 +296,9 @@ usb_ep_free_buffer (struct usb_ep *ep, void *buf, dma_addr_t dma, unsigned len)
  * Each request is turned into one or more packets.  The controller driver
  * never merges adjacent requests into the same packet.  OUT transfers
  * will sometimes use data that's already buffered in the hardware.
+ * Drivers can rely on the fact that the first byte of the request's buffer
+ * always corresponds to the first byte of some USB packet, for both
+ * IN and OUT transfers.
  *
  * Bulk endpoints can queue any amount of data; the transfer is packetized
  * automatically.  The last packet will be short if the request doesn't fill it
@@ -361,6 +373,9 @@ static inline int usb_ep_dequeue (struct usb_ep *ep, struct usb_request *req)
  *
  * Returns zero, or a negative error code.  On success, this call sets
  * underlying hardware state that blocks data transfers.
+ * Attempts to halt IN endpoints will fail (returning -EAGAIN) if any
+ * transfer requests are still queued, or if the controller hardware
+ * (usually a FIFO) still holds bytes that the host hasn't collected.
  */
 static inline int
 usb_ep_set_halt (struct usb_ep *ep)
@@ -393,8 +408,8 @@ usb_ep_clear_halt (struct usb_ep *ep)
  *
  * FIFO endpoints may have "unclaimed data" in them in certain cases,
  * such as after aborted transfers.  Hosts may not have collected all
- * the IN data written by the gadget driver, as reported by a request
- * completion.  The gadget driver may not have collected all the data
+ * the IN data written by the gadget driver (and reported by a request
+ * completion).  The gadget driver may not have collected all the data
  * written OUT to it by the host.  Drivers that need precise handling for
  * fault reporting or recovery may need to use this call.
  *
index d0d9904..5e6b162 100644 (file)
@@ -87,6 +87,7 @@ struct saa7146_extension
 {
        char    name[32];               /* name of the device */
 #define SAA7146_USE_I2C_IRQ    0x1
+#define SAA7146_I2C_SHORT_DELAY        0x2
        int     flags;
        
        /* pairs of subvendor and subdevice ids for
@@ -162,9 +163,10 @@ int saa7146_unregister_extension(struct saa7146_extension*);
 struct saa7146_format* format_by_fourcc(struct saa7146_dev *dev, int fourcc);
 int saa7146_pgtable_alloc(struct pci_dev *pci, struct saa7146_pgtable *pt);
 void saa7146_pgtable_free(struct pci_dev *pci, struct saa7146_pgtable *pt);
-void saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length );
+int saa7146_pgtable_build_single(struct pci_dev *pci, struct saa7146_pgtable *pt, struct scatterlist *list, int length );
 char *saa7146_vmalloc_build_pgtable(struct pci_dev *pci, long length, struct saa7146_pgtable *pt);
 void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data);
+int saa7146_wait_for_debi_done(struct saa7146_dev *dev);
 
 /* some memory sizes */
 #define SAA7146_I2C_MEM                ( 1*PAGE_SIZE)
@@ -187,6 +189,9 @@ void saa7146_setgpio(struct saa7146_dev *dev, int port, u32 data);
 #define SAA7146_GPIO_OUTLO 0x40
 #define SAA7146_GPIO_OUTHI 0x50
 
+/* debi defines */
+#define DEBINOSWAP 0x000e0000
+
 /* define for the register programming sequencer (rps) */
 #define CMD_NOP                0x00000000  /* No operation */
 #define CMD_CLR_EVENT  0x00000000  /* Clear event */
index 80ccea7..a4e5570 100644 (file)
@@ -149,7 +149,7 @@ struct saa7146_extension_ioctls
 };
 
 /* flags */
-#define SAA7146_EXT_SWAP_ODD_EVEN       0x1     /* needs odd/even fields swapped */
+// #define SAA7146_EXT_SWAP_ODD_EVEN   0x1     /* needs odd/even fields swapped */
 #define SAA7146_USE_PORT_B_FOR_VBI     0x2     /* use input port b for vbi hardware bug workaround */
 
 struct saa7146_ext_vv
@@ -171,12 +171,10 @@ struct saa7146_ext_vv
 
 struct saa7146_use_ops  {
         void (*init)(struct saa7146_dev *, struct saa7146_vv *);
-        void(*open)(struct saa7146_dev *, struct saa7146_fh *);
-        void (*release)(struct saa7146_dev *, struct saa7146_fh *,struct file *);
+        void(*open)(struct saa7146_dev *, struct file *);
+        void (*release)(struct saa7146_dev *, struct file *);
         void (*irq_done)(struct saa7146_dev *, unsigned long status);
        ssize_t (*read)(struct file *, char *, size_t, loff_t *);
-        int (*capture_begin)(struct saa7146_fh *);
-        int (*capture_end)(struct saa7146_fh *);
 };
 
 /* from saa7146_fops.c */
index 171b928..26b5553 100644 (file)
@@ -227,8 +227,7 @@ extern void ax25_cb_add(ax25_cb *);
 struct sock *ax25_find_listener(ax25_address *, int, struct net_device *, int);
 struct sock *ax25_get_socket(ax25_address *, ax25_address *, int);
 extern ax25_cb *ax25_find_cb(ax25_address *, ax25_address *, ax25_digi *, struct net_device *);
-extern struct sock *ax25_addr_match(ax25_address *);
-extern void ax25_send_to_raw(struct sock *, struct sk_buff *, int);
+extern void ax25_send_to_raw(ax25_address *, struct sk_buff *, int);
 extern void ax25_destroy_socket(ax25_cb *);
 extern ax25_cb *ax25_create_cb(void);
 extern void ax25_fillin_cb(ax25_cb *, ax25_dev *);
index 887987f..ca07367 100644 (file)
@@ -81,7 +81,12 @@ static inline int tc_classify(struct sk_buff *skb, struct tcf_proto *tp, struct
        return -1;
 }
 
-
+static inline void tcf_destroy(struct tcf_proto *tp)
+{
+       tp->ops->destroy(tp);
+       module_put(tp->ops->owner);
+       kfree(tp);
+}
 
 extern int register_tcf_proto_ops(struct tcf_proto_ops *ops);
 extern int unregister_tcf_proto_ops(struct tcf_proto_ops *ops);
index bf33562..7edb15d 100644 (file)
@@ -90,7 +90,6 @@
 #include <net/snmp.h>
 #include <net/sctp/structs.h>
 #include <net/sctp/constants.h>
-#include <net/sctp/sm.h>
 
 
 /* Set SCTP_DEBUG flag via config if not already set. */
index ac2eccb..1d85a3e 100644 (file)
@@ -542,24 +542,9 @@ static inline struct inode *SOCK_INODE(struct socket *socket)
 extern void __lock_sock(struct sock *sk);
 extern void __release_sock(struct sock *sk);
 #define sock_owned_by_user(sk) ((sk)->sk_lock.owner)
-#define lock_sock(__sk) \
-do {   might_sleep(); \
-       spin_lock_bh(&((__sk)->sk_lock.slock)); \
-       if ((__sk)->sk_lock.owner) \
-               __lock_sock(__sk); \
-       (__sk)->sk_lock.owner = (void *)1; \
-       spin_unlock_bh(&((__sk)->sk_lock.slock)); \
-} while(0)
 
-#define release_sock(__sk) \
-do {   spin_lock_bh(&((__sk)->sk_lock.slock)); \
-       if ((__sk)->sk_backlog.tail) \
-               __release_sock(__sk); \
-       (__sk)->sk_lock.owner = NULL; \
-        if (waitqueue_active(&((__sk)->sk_lock.wq))) \
-               wake_up(&((__sk)->sk_lock.wq)); \
-       spin_unlock_bh(&((__sk)->sk_lock.slock)); \
-} while(0)
+extern void lock_sock(struct sock *sk);
+extern void release_sock(struct sock *sk);
 
 /* BH context may only use the following locking interface. */
 #define bh_lock_sock(__sk)     spin_lock(&((__sk)->sk_lock.slock))
index 2ae3917..6707207 100644 (file)
@@ -860,7 +860,7 @@ extern void xfrm_policy_flush(void);
 extern void xfrm_policy_kill(struct xfrm_policy *);
 extern int xfrm_sk_policy_insert(struct sock *sk, int dir, struct xfrm_policy *pol);
 extern struct xfrm_policy *xfrm_sk_policy_lookup(struct sock *sk, int dir, struct flowi *fl);
-extern int xfrm_flush_bundles(struct xfrm_state *x);
+extern int xfrm_flush_bundles(void);
 
 extern wait_queue_head_t km_waitq;
 extern void km_state_expired(struct xfrm_state *x, int hard);
index 2d33e13..b7f964d 100644 (file)
@@ -305,6 +305,7 @@ struct scsi_lun {
 #define QUEUED          0x2004
 #define SOFT_ERROR      0x2005
 #define ADD_TO_MLQUEUE  0x2006
+#define TIMEOUT         0x2007
 
 /*
  * Midlevel queue return values.
index 205e0cc..2545140 100644 (file)
@@ -196,6 +196,19 @@ config EPOLL
 
 source "drivers/block/Kconfig.iosched"
 
+config CC_OPTIMIZE_FOR_SIZE
+       bool "Optimize for size" if EMBEDDED
+       default y if ARM || H8300
+       default n
+       help
+         Enabling this option will pass "-Os" instead of "-O2" to gcc
+         resulting in a smaller kernel.
+
+         WARNING: some versions of gcc may generate incorrect code with this
+         option.  If problems are observed, a gcc upgrade may be needed.
+
+         If unsure, say N.
+
 endmenu                # General setup
 
 
index ad8c88a..51aa488 100644 (file)
@@ -130,11 +130,11 @@ fail:
  *     Driverfs is used to check if something is a disk name - it has
  *     all known disks under bus/block/devices.  If the disk name
  *     contains slashes, name of driverfs node has them replaced with
- *     dots.  try_name() does the actual checks, assuming that driverfs
+ *     bangs.  try_name() does the actual checks, assuming that driverfs
  *     is mounted on rootfs /sys.
  */
 
-dev_t name_to_dev_t(char *name)
+dev_t __init name_to_dev_t(char *name)
 {
        char s[32];
        char *p;
@@ -169,7 +169,7 @@ dev_t name_to_dev_t(char *name)
        strcpy(s, name);
        for (p = s; *p; p++)
                if (*p == '/')
-                       *p = '.';
+                       *p = '!';
        res = try_name(s, 0);
        if (res)
                goto done;
index dcf9a5e..b40bd98 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/moduleparam.h>
 #include <linux/writeback.h>
 #include <linux/cpu.h>
+#include <linux/efi.h>
 
 #include <asm/io.h>
 #include <asm/bugs.h>
@@ -121,9 +122,7 @@ extern void time_init(void);
 void (*late_time_init)(void) = NULL;
 extern void softirq_init(void);
 
-int rows, cols;
-
-char *execute_command;
+static char *execute_command;
 
 /* Setup configured maximum number of CPUs to activate */
 static unsigned int max_cpus = NR_CPUS;
@@ -397,7 +396,7 @@ static void __init smp_init(void)
 
 static void rest_init(void)
 {
-       kernel_thread(init, NULL, CLONE_KERNEL);
+       kernel_thread(init, NULL, CLONE_FS | CLONE_SIGHAND);
        unlock_kernel();
        cpu_idle();
 } 
@@ -418,7 +417,6 @@ asmlinkage void __init start_kernel(void)
        lock_kernel();
        printk(linux_banner);
        setup_arch(&command_line);
-       setup_per_zone_pages_min();
        setup_per_cpu_areas();
 
        /*
@@ -472,6 +470,10 @@ asmlinkage void __init start_kernel(void)
        pidmap_init();
        pgtable_cache_init();
        pte_chain_init();
+#ifdef CONFIG_X86
+       if (efi_enabled)
+               efi_enter_virtual_mode();
+#endif
        fork_init(num_physpages);
        proc_caches_init();
        buffer_init();
@@ -499,7 +501,7 @@ asmlinkage void __init start_kernel(void)
        rest_init();
 }
 
-int __initdata initcall_debug;
+static int __initdata initcall_debug;
 
 static int __init initcall_debug_setup(char *str)
 {
index 828962a..91dfedf 100644 (file)
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -59,6 +59,8 @@
  * (c) 1999 Manfred Spraul <manfreds@colorfullife.com>
  * Enforced range limit on SEM_UNDO
  * (c) 2001 Red Hat Inc <alan@redhat.com>
+ * Lockless wakeup
+ * (c) 2003 Manfred Spraul <manfred@colorfullife.com>
  */
 
 #include <linux/config.h>
@@ -118,6 +120,40 @@ void __init sem_init (void)
 #endif
 }
 
+/*
+ * Lockless wakeup algorithm:
+ * Without the check/retry algorithm a lockless wakeup is possible:
+ * - queue.status is initialized to -EINTR before blocking.
+ * - wakeup is performed by
+ *     * unlinking the queue entry from sma->sem_pending
+ *     * setting queue.status to IN_WAKEUP
+ *       This is the notification for the blocked thread that a
+ *       result value is imminent.
+ *     * call wake_up_process
+ *     * set queue.status to the final value.
+ * - the previously blocked thread checks queue.status:
+ *     * if it's IN_WAKEUP, then it must wait until the value changes
+ *     * if it's not -EINTR, then the operation was completed by
+ *       update_queue. semtimedop can return queue.status without
+ *       performing any operation on the semaphore array.
+ *     * otherwise it must acquire the spinlock and check what's up.
+ *
+ * The two-stage algorithm is necessary to protect against the following
+ * races:
+ * - if queue.status is set after wake_up_process, then the woken up idle
+ *   thread could race forward and try (and fail) to acquire sma->lock
+ *   before update_queue had a chance to set queue.status
+ * - if queue.status is written before wake_up_process and if the
+ *   blocked process is woken up by a signal between writing
+ *   queue.status and the wake_up_process, then the woken up
+ *   process could return from semtimedop and die by calling
+ *   sys_exit before wake_up_process is called. Then wake_up_process
+ *   will oops, because the task structure is already invalid.
+ *   (yes, this happened on s390 with sysv msg).
+ *
+ */
+#define IN_WAKEUP      1
+
 static int newary (key_t key, int nsems, int semflg)
 {
        int id;
@@ -331,16 +367,25 @@ static void update_queue (struct sem_array * sma)
        int error;
        struct sem_queue * q;
 
-       for (q = sma->sem_pending; q; q = q->next) {
-                       
+       q = sma->sem_pending;
+       while(q) {
                error = try_atomic_semop(sma, q->sops, q->nsops,
                                         q->undo, q->pid);
 
                /* Does q->sleeper still need to sleep? */
                if (error <= 0) {
-                       q->status = error;
+                       struct sem_queue *n;
                        remove_from_queue(sma,q);
+                       n = q->next;
+                       q->status = IN_WAKEUP;
                        wake_up_process(q->sleeper);
+                       /* hands-off: q will disappear immediately after
+                        * writing q->status.
+                        */
+                       q->status = error;
+                       q = n;
+               } else {
+                       q = q->next;
                }
        }
 }
@@ -409,10 +454,16 @@ static void freeary (struct sem_array *sma, int id)
                un->semid = -1;
 
        /* Wake up all pending processes and let them fail with EIDRM. */
-       for (q = sma->sem_pending; q; q = q->next) {
-               q->status = -EIDRM;
+       q = sma->sem_pending;
+       while(q) {
+               struct sem_queue *n;
+               /* lazy remove_from_queue: we are killing the whole queue */
                q->prev = NULL;
+               n = q->next;
+               q->status = IN_WAKEUP;
                wake_up_process(q->sleeper); /* doesn't sleep */
+               q->status = -EIDRM;     /* hands-off q */
+               q = n;
        }
 
        /* Remove the semaphore set from the ID array*/
@@ -1083,6 +1134,18 @@ retry_undos:
        else
                schedule();
 
+       error = queue.status;
+       while(unlikely(error == IN_WAKEUP)) {
+               cpu_relax();
+               error = queue.status;
+       }
+
+       if (error != -EINTR) {
+               /* fast path: update_queue already obtained all requested
+                * resources */
+               goto out_free;
+       }
+
        sma = sem_lock(semid);
        if(sma==NULL) {
                if(queue.prev != NULL)
@@ -1095,7 +1158,7 @@ retry_undos:
         * If queue.status != -EINTR we are woken up by another process
         */
        error = queue.status;
-       if (queue.status != -EINTR) {
+       if (error != -EINTR) {
                goto out_unlock_free;
        }
 
index 44d3ab9..9bde078 100644 (file)
 
 #include <asm/uaccess.h>
 
-int get_compat_timespec(struct timespec *ts, struct compat_timespec *cts)
+int get_compat_timespec(struct timespec *ts, const struct compat_timespec *cts)
 {
        return (verify_area(VERIFY_READ, cts, sizeof(*cts)) ||
                        __get_user(ts->tv_sec, &cts->tv_sec) ||
                        __get_user(ts->tv_nsec, &cts->tv_nsec)) ? -EFAULT : 0;
 }
 
-int put_compat_timespec(struct timespec *ts, struct compat_timespec *cts)
+int put_compat_timespec(struct timespec *ts, const struct compat_timespec *cts)
 {
        return (verify_area(VERIFY_WRITE, cts, sizeof(*cts)) ||
                        __put_user(ts->tv_sec, &cts->tv_sec) ||
@@ -204,7 +204,8 @@ asmlinkage long compat_sys_sigprocmask(int how, compat_old_sigset_t *set,
        ret = sys_sigprocmask(how, set ? &s : NULL, oset ? &s : NULL);
        set_fs(old_fs);
        if (ret == 0)
-               ret = put_user(s, oset);
+               if (oset)
+                       ret = put_user(s, oset);
        return ret;
 }
 
index 0bfb564..3b5b2e2 100644 (file)
@@ -474,21 +474,29 @@ static inline void __exit_mm(struct task_struct * tsk)
        if (!mm)
                return;
        /*
-        * Serialize with any possible pending coredump:
+        * Serialize with any possible pending coredump.
+        * We must hold mmap_sem around checking core_waiters
+        * and clearing tsk->mm.  The core-inducing thread
+        * will increment core_waiters for each thread in the
+        * group with ->mm != NULL.
         */
+       down_read(&mm->mmap_sem);
        if (mm->core_waiters) {
+               up_read(&mm->mmap_sem);
                down_write(&mm->mmap_sem);
                if (!--mm->core_waiters)
                        complete(mm->core_startup_done);
                up_write(&mm->mmap_sem);
 
                wait_for_completion(&mm->core_done);
+               down_read(&mm->mmap_sem);
        }
        atomic_inc(&mm->mm_count);
        if (mm != tsk->active_mm) BUG();
        /* more a memory barrier than a real lock */
        task_lock(tsk);
        tsk->mm = NULL;
+       up_read(&mm->mmap_sem);
        enter_lazy_tlb(mm, current);
        task_unlock(tsk);
        mmput(mm);
index 381b80b..0603f23 100644 (file)
@@ -642,6 +642,11 @@ static int copy_files(unsigned long clone_flags, struct task_struct * tsk)
                goto out;
        }
 
+       /*
+        * Note: we may be using current for both targets (See exec.c)
+        * This works because we cache current->files (old) as oldf. Don't
+        * break this.
+        */
        tsk->files = NULL;
        error = -ENOMEM;
        newf = kmem_cache_alloc(files_cachep, SLAB_KERNEL);
@@ -731,6 +736,35 @@ out_release:
        goto out;
 }
 
+/*
+ *     Helper to unshare the files of the current task.
+ *     We don't want to expose copy_files internals to
+ *     the exec layer of the kernel.
+ */
+
+int unshare_files(void)
+{
+       struct files_struct *files  = current->files;
+       int rc;
+
+       if(!files)
+               BUG();
+
+       /* This can race but the race causes us to copy when we don't
+          need to and drop the copy */
+       if(atomic_read(&files->count) == 1)
+       {
+               atomic_inc(&files->count);
+               return 0;
+       }
+       rc = copy_files(0, current);
+       if(rc)
+               current->files = files;
+       return rc;
+}
+
+EXPORT_SYMBOL(unshare_files);
+
 static inline int copy_sighand(unsigned long clone_flags, struct task_struct * tsk)
 {
        struct sighand_struct *sig;
index 7eb14ca..4d0b1cf 100644 (file)
@@ -246,7 +246,7 @@ static inline void get_key_refs(union futex_key *key)
  * Drop a reference to the resource addressed by a key.
  * The hash bucket spinlock must not be held.
  */
-static inline void drop_key_refs(union futex_key *key)
+static void drop_key_refs(union futex_key *key)
 {
        if (key->both.ptr != 0) {
                if (key->both.offset & 1)
@@ -260,7 +260,7 @@ static inline void drop_key_refs(union futex_key *key)
  * The hash bucket lock must be held when this is called.
  * Afterwards, the futex_q must not be accessed.
  */
-static inline void wake_futex(struct futex_q *q)
+static void wake_futex(struct futex_q *q)
 {
        list_del_init(&q->list);
        if (q->filp)
@@ -384,7 +384,7 @@ out:
  */
 
 /* The key must be already stored in q->key. */
-static inline void queue_me(struct futex_q *q, int fd, struct file *filp)
+static void queue_me(struct futex_q *q, int fd, struct file *filp)
 {
        struct futex_hash_bucket *bh;
 
index 07096c1..bd0c15a 100644 (file)
@@ -182,16 +182,21 @@ static int wait_for_helper(void *data)
 {
        struct subprocess_info *sub_info = data;
        pid_t pid;
+       struct k_sigaction sa;
+
+       /* Install a handler: if SIGCLD isn't handled sys_wait4 won't
+        * populate the status, but will return -ECHILD. */
+       sa.sa.sa_handler = SIG_IGN;
+       sa.sa.sa_flags = 0;
+       siginitset(&sa.sa.sa_mask, sigmask(SIGCHLD));
+       do_sigaction(SIGCHLD, &sa, (struct k_sigaction *)0);
+       allow_signal(SIGCHLD);
 
-       sub_info->retval = 0;
        pid = kernel_thread(____call_usermodehelper, sub_info, SIGCHLD);
        if (pid < 0)
                sub_info->retval = pid;
        else
-               /* We don't have a SIGCHLD signal handler, so this
-                * always returns -ECHILD, but the important thing is
-                * that it blocks. */
-               sys_wait4(pid, NULL, 0, NULL);
+               sys_wait4(pid, &sub_info->retval, 0, NULL);
 
        complete(sub_info->complete);
        return 0;
@@ -210,7 +215,7 @@ static void __call_usermodehelper(void *data)
         * until that is done.  */
        if (sub_info->wait)
                pid = kernel_thread(wait_for_helper, sub_info,
-                                   CLONE_KERNEL | SIGCHLD);
+                                   CLONE_FS | CLONE_FILES | SIGCHLD);
        else
                pid = kernel_thread(____call_usermodehelper, sub_info,
                                    CLONE_VFORK | SIGCHLD);
index 217d43d..f5863a5 100644 (file)
@@ -83,12 +83,6 @@ NORET_TYPE void panic(const char * fmt, ...)
                 * We can't use the "normal" timers since we just panicked..
                 */
                printk(KERN_EMERG "Rebooting in %d seconds..",panic_timeout);
-#ifdef CONFIG_BOOTSPLASH
-               {
-                       extern int splash_verbose(void);
-                       (void)splash_verbose();
-               }
-#endif
                for (i = 0; i < panic_timeout; i++) {
                        touch_nmi_watchdog();
                        mdelay(1000);
@@ -112,12 +106,6 @@ NORET_TYPE void panic(const char * fmt, ...)
         disabled_wait(caller);
 #endif
        local_irq_enable();
-#ifdef CONFIG_BOOTSPLASH
-       {
-               extern int splash_verbose(void);
-               (void)splash_verbose();
-       }
-#endif
        for (;;)
                ;
 }
index 4894618..033eea4 100644 (file)
@@ -40,7 +40,7 @@ config SOFTWARE_SUSPEND
          involved in suspending. Also in this case there is a risk that buffers
          on disk won't match with saved ones.
 
-         For more information take a look at Documentation/swsusp.txt.
+         For more information take a look at Documentation/power/swsusp.txt.
 
 config PM_DISK
        bool "Suspend-to-Disk Support"
index 281422d..09ae0d3 100644 (file)
@@ -33,7 +33,7 @@
  *
  * More state savers are welcome. Especially for the scsi layer...
  *
- * For TODOs,FIXMEs also look in Documentation/swsusp.txt
+ * For TODOs,FIXMEs also look in Documentation/power/swsusp.txt
  */
 
 #include <linux/module.h>
index ad143a9..0f21e08 100644 (file)
@@ -86,7 +86,19 @@ static unsigned long con_start;      /* Index into log_buf: next char to be sent to c
 static unsigned long log_end;  /* Index into log_buf: most-recently-written-char + 1 */
 static unsigned long logged_chars; /* Number of chars produced since last read+clear operation */
 
-struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];
+/*
+ *     Array of consoles built from command line options (console=)
+ */
+struct console_cmdline
+{
+       char    name[8];                        /* Name of the driver       */
+       int     index;                          /* Minor dev. to use        */
+       char    *options;                       /* Options for the driver   */
+};
+
+#define MAX_CMDLINECONSOLES 8
+
+static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];
 static int preferred_console = -1;
 
 /* Flag: console code may call schedule() */
@@ -97,10 +109,9 @@ static int console_may_schedule;
  */
 static int __init console_setup(char *str)
 {
-       struct console_cmdline *c;
-       char name[sizeof(c->name)];
+       char name[sizeof(console_cmdline[0].name)];
        char *s, *options;
-       int i, idx;
+       int idx;
 
        /*
         *      Decode str into name, index, options.
@@ -125,6 +136,27 @@ static int __init console_setup(char *str)
        idx = simple_strtoul(s, NULL, 10);
        *s = 0;
 
+       add_preferred_console(name, idx, options);
+       return 1;
+}
+
+__setup("console=", console_setup);
+
+/**
+ * add_preferred_console - add a device to the list of preferred consoles.
+ *
+ * The last preferred console added will be used for kernel messages
+ * and stdin/out/err for init.  Normally this is used by console_setup
+ * above to handle user-supplied console arguments; however it can also
+ * be used by arch-specific code either to override the user or more
+ * commonly to provide a default console (ie from PROM variables) when
+ * the user has not supplied one.
+ */
+int __init add_preferred_console(char *name, int idx, char *options)
+{
+       struct console_cmdline *c;
+       int i;
+
        /*
         *      See if this tty is not yet registered, and
         *      if we have a slot free.
@@ -133,23 +165,23 @@ static int __init console_setup(char *str)
                if (strcmp(console_cmdline[i].name, name) == 0 &&
                          console_cmdline[i].index == idx) {
                                preferred_console = i;
-                               return 1;
+                               return 0;
                }
        if (i == MAX_CMDLINECONSOLES)
-               return 1;
+               return -E2BIG;
        preferred_console = i;
        c = &console_cmdline[i];
        memcpy(c->name, name, sizeof(c->name));
+       c->name[sizeof(c->name) - 1] = 0;
        c->options = options;
        c->index = idx;
-       return 1;
+       return 0;
 }
 
-__setup("console=", console_setup);
-
 static int __init log_buf_len_setup(char *str)
 {
        unsigned long size = memparse(str, &str);
+       unsigned long flags;
 
        if (size > log_buf_len) {
                unsigned long start, dest_idx, offset;
@@ -161,7 +193,7 @@ static int __init log_buf_len_setup(char *str)
                        goto out;
                }
 
-               spin_lock_irq(&logbuf_lock);
+               spin_lock_irqsave(&logbuf_lock, flags);
                log_buf_len = size;
                log_buf = new_log_buf;
 
@@ -175,7 +207,7 @@ static int __init log_buf_len_setup(char *str)
                log_start -= offset;
                con_start -= offset;
                log_end -= offset;
-               spin_unlock_irq(&logbuf_lock);
+               spin_unlock_irqrestore(&logbuf_lock, flags);
 
                printk("log_buf_len: %d\n", log_buf_len);
        }
index 8f83bb1..9865f79 100644 (file)
@@ -1023,10 +1023,11 @@ static inline runqueue_t *find_busiest_queue(runqueue_t *this_rq, int this_cpu,
         * the lock held.
         *
         * We fend off statistical fluctuations in runqueue lengths by
-        * saving the runqueue length during the previous load-balancing
-        * operation and using the smaller one the current and saved lengths.
-        * If a runqueue is long enough for a longer amount of time then
-        * we recognize it and pull tasks from it.
+        * saving the runqueue length (as seen by the balancing CPU) during
+        * the previous load-balancing operation and using the smaller one
+        * of the current and saved lengths. If a runqueue is long enough
+        * for a longer amount of time then we recognize it and pull tasks
+        * from it.
         *
         * The 'current runqueue length' is a statistical maximum variable,
         * for that one we take the longer one - to avoid fluctuations in
@@ -1432,6 +1433,7 @@ void scheduling_functions_start_here(void) { }
  */
 asmlinkage void schedule(void)
 {
+       long *switch_count;
        task_t *prev, *next;
        runqueue_t *rq;
        prio_array_t *array;
@@ -1478,32 +1480,25 @@ need_resched:
         * if entering off of a kernel preemption go straight
         * to picking the next task.
         */
-       if (unlikely(preempt_count() & PREEMPT_ACTIVE))
-               goto pick_next_task;
-
-       switch (prev->state) {
-       case TASK_INTERRUPTIBLE:
-               if (unlikely(signal_pending(prev))) {
+       switch_count = &prev->nivcsw;
+       if (prev->state && !(preempt_count() & PREEMPT_ACTIVE)) {
+               switch_count = &prev->nvcsw;
+               if (unlikely((prev->state & TASK_INTERRUPTIBLE) &&
+                               unlikely(signal_pending(prev))))
                        prev->state = TASK_RUNNING;
-                       break;
-               }
-       default:
-               deactivate_task(prev, rq);
-               prev->nvcsw++;
-               break;
-       case TASK_RUNNING:
-               prev->nivcsw++;
+               else
+                       deactivate_task(prev, rq);
        }
-pick_next_task:
+
        if (unlikely(!rq->nr_running)) {
 #ifdef CONFIG_SMP
                load_balance(rq, 1, cpu_to_node_mask(smp_processor_id()));
-               if (rq->nr_running)
-                       goto pick_next_task;
 #endif
-               next = rq->idle;
-               rq->expired_timestamp = 0;
-               goto switch_tasks;
+               if (!rq->nr_running) {
+                       next = rq->idle;
+                       rq->expired_timestamp = 0;
+                       goto switch_tasks;
+               }
        }
 
        array = rq->active;
@@ -1550,6 +1545,7 @@ switch_tasks:
                next->timestamp = now;
                rq->nr_switches++;
                rq->curr = next;
+               ++*switch_count;
 
                prepare_arch_switch(rq, next);
                prev = context_switch(rq, prev, next);
index f25fc21..9aa8ad4 100644 (file)
@@ -1323,8 +1323,6 @@ asmlinkage long sys_setrlimit(unsigned int resource, struct rlimit __user *rlim)
  * either stopped or zombied.  In the zombied case the task won't get
  * reaped till shortly after the call to getrusage(), in both cases the
  * task being examined is in a frozen state so the counters won't change.
- *
- * FIXME! Get the fault counts properly!
  */
 int getrusage(struct task_struct *p, int who, struct rusage __user *ru)
 {
index cf8d5d0..a9c8c19 100644 (file)
@@ -436,18 +436,7 @@ repeat:
 /*
  * Timekeeping variables
  */
-
-/* 
- * Any variables used in low level gettimeofday must be declared
- * inside ARCH_HAS_TIMEVARS. This is requires for x86-64 who
- * can run gettimeofday in user context in a vsyscall. The variables
- * must be mapped in a special way in the low level architecture code
- * then. -AK
- */ 
-
-#ifndef ARCH_HAS_TIMEVARS
 unsigned long tick_usec = TICK_USEC;           /* USER_HZ period (usec) */
-#endif
 unsigned long tick_nsec = TICK_NSEC;           /* ACTHZ period (nsec) */
 
 /* 
@@ -463,6 +452,10 @@ struct timespec wall_to_monotonic __attribute__ ((aligned (16)));
 
 EXPORT_SYMBOL(xtime);
 
+/* Don't completely fail for HZ > 500.  */
+int tickadj = 500/HZ ? : 1;            /* microsecs */
+
+
 /*
  * phase-lock loop variables
  */
@@ -480,9 +473,7 @@ long time_freq = (((NSEC_PER_SEC + HZ/2) % HZ - HZ/2) << SHIFT_USEC) / NSEC_PER_
                                        /* frequency offset (scaled ppm)*/
 long time_adj;                         /* tick adjust (scaled 1 / HZ)  */
 long time_reftime;                     /* time at last adjustment (s)  */
-#ifndef ARCH_HAS_TIMEVARS
 long time_adjust;
-#endif
 long time_next_adjust;
 
 /*
index 8e6836f..9521575 100644 (file)
@@ -24,13 +24,5 @@ config ZLIB_INFLATE
 config ZLIB_DEFLATE
        tristate
 
-
-config DEBUG_KOBJECT
-       bool "print lots of sysfs related debug infos"
-       default n
-       help
-         This option enables DEBUG in drivers/base/*.c and lib/kobject.c
-         If unsure, say N.
-
 endmenu
 
index 2c8ad05..033302f 100644 (file)
@@ -5,7 +5,7 @@
 
 lib-y := errno.o ctype.o string.o vsprintf.o cmdline.o \
         bust_spinlocks.o rbtree.o radix-tree.o dump_stack.o \
-        kobject.o idr.o div64.o parser.o
+        kobject.o idr.o div64.o parser.o int_sqrt.o mask.o
 
 lib-$(CONFIG_RWSEM_GENERIC_SPINLOCK) += rwsem-spinlock.o
 lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
index 4122707..1136003 100644 (file)
@@ -221,7 +221,7 @@ STATIC const ush mask_bits[] = {
     0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
 };
 
-#define NEXTBYTE()  (uch)get_byte()
+#define NEXTBYTE()  ({ int v = get_byte(); if (v < 0) goto underrun; (uch)v; })
 #define NEEDBITS(n) {while(k<(n)){b|=((ulg)NEXTBYTE())<<k;k+=8;}}
 #define DUMPBITS(n) {b>>=(n);k-=(n);}
 
@@ -620,6 +620,9 @@ STATIC int inflate_codes(
 
   /* done */
   return 0;
+
+ underrun:
+  return 4;                    /* Input underrun */
 }
 
 
@@ -676,6 +679,9 @@ DEBG("<stor");
 
   DEBG(">");
   return 0;
+
+ underrun:
+  return 4;                    /* Input underrun */
 }
 
 
@@ -908,6 +914,9 @@ DEBG("dyn7 ");
 
   DEBG(">");
   return 0;
+
+ underrun:
+  return 4;                    /* Input underrun */
 }
 
 
@@ -956,6 +965,9 @@ STATIC int inflate_block(
 
   /* bad block type */
   return 2;
+
+ underrun:
+  return 4;                    /* Input underrun */
 }
 
 
@@ -1079,9 +1091,9 @@ static int gunzip(void)
     ulg orig_len = 0;       /* original uncompressed length */
     int res;
 
-    magic[0] = (unsigned char)get_byte();
-    magic[1] = (unsigned char)get_byte();
-    method = (unsigned char)get_byte();
+    magic[0] = NEXTBYTE();
+    magic[1] = NEXTBYTE();
+    method   = NEXTBYTE();
 
     if (magic[0] != 037 ||
        ((magic[1] != 0213) && (magic[1] != 0236))) {
@@ -1108,29 +1120,29 @@ static int gunzip(void)
            error("Input has invalid flags");
            return -1;
     }
-    (ulg)get_byte();   /* Get timestamp */
-    ((ulg)get_byte()) << 8;
-    ((ulg)get_byte()) << 16;
-    ((ulg)get_byte()) << 24;
+    NEXTBYTE();        /* Get timestamp */
+    NEXTBYTE();
+    NEXTBYTE();
+    NEXTBYTE();
 
-    (void)get_byte();  /* Ignore extra flags for the moment */
-    (void)get_byte();  /* Ignore OS type for the moment */
+    (void)NEXTBYTE();  /* Ignore extra flags for the moment */
+    (void)NEXTBYTE();  /* Ignore OS type for the moment */
 
     if ((flags & EXTRA_FIELD) != 0) {
-           unsigned len = (unsigned)get_byte();
-           len |= ((unsigned)get_byte())<<8;
-           while (len--) (void)get_byte();
+           unsigned len = (unsigned)NEXTBYTE();
+           len |= ((unsigned)NEXTBYTE())<<8;
+           while (len--) (void)NEXTBYTE();
     }
 
     /* Get original file name if it was truncated */
     if ((flags & ORIG_NAME) != 0) {
            /* Discard the old name */
-           while (get_byte() != 0) /* null */ ;
+           while (NEXTBYTE() != 0) /* null */ ;
     } 
 
     /* Discard file comment if any */
     if ((flags & COMMENT) != 0) {
-           while (get_byte() != 0) /* null */ ;
+           while (NEXTBYTE() != 0) /* null */ ;
     }
 
     /* Decompress */
@@ -1147,6 +1159,9 @@ static int gunzip(void)
            case 3:
                    error("out of memory");
                    break;
+           case 4:
+                   error("out of input data");
+                   break;
            default:
                    error("invalid compressed format (other)");
            }
@@ -1157,15 +1172,15 @@ static int gunzip(void)
     /* crc32  (see algorithm.doc)
      * uncompressed input size modulo 2^32
      */
-    orig_crc = (ulg) get_byte();
-    orig_crc |= (ulg) get_byte() << 8;
-    orig_crc |= (ulg) get_byte() << 16;
-    orig_crc |= (ulg) get_byte() << 24;
+    orig_crc = (ulg) NEXTBYTE();
+    orig_crc |= (ulg) NEXTBYTE() << 8;
+    orig_crc |= (ulg) NEXTBYTE() << 16;
+    orig_crc |= (ulg) NEXTBYTE() << 24;
     
-    orig_len = (ulg) get_byte();
-    orig_len |= (ulg) get_byte() << 8;
-    orig_len |= (ulg) get_byte() << 16;
-    orig_len |= (ulg) get_byte() << 24;
+    orig_len = (ulg) NEXTBYTE();
+    orig_len |= (ulg) NEXTBYTE() << 8;
+    orig_len |= (ulg) NEXTBYTE() << 16;
+    orig_len |= (ulg) NEXTBYTE() << 24;
     
     /* Validate decompression */
     if (orig_crc != CRC_VALUE) {
@@ -1177,6 +1192,10 @@ static int gunzip(void)
            return -1;
     }
     return 0;
+
+ underrun:                     /* NEXTBYTE() goto's here if needed */
+    error("out of input data");
+    return -1;
 }
 
 
diff --git a/lib/int_sqrt.c b/lib/int_sqrt.c
new file mode 100644 (file)
index 0000000..a5d2cdc
--- /dev/null
@@ -0,0 +1,32 @@
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+
+/**
+ * int_sqrt - rough approximation to sqrt
+ * @x: integer of which to calculate the sqrt
+ *
+ * A very rough approximation to the sqrt() function.
+ */
+unsigned long int_sqrt(unsigned long x)
+{
+       unsigned long op, res, one;
+
+       op = x;
+       res = 0;
+
+       one = 1 << 30;
+       while (one > op)
+               one >>= 2;
+
+       while (one != 0) {
+               if (op >= res + one) {
+                       op = op - (res + one);
+                       res = res +  2 * one;
+               }
+               res /= 2;
+               one /= 4;
+       }
+       return res;
+}
+EXPORT_SYMBOL(int_sqrt);
index bef56c3..52ee87a 100644 (file)
  * about using the kobject interface.
  */
 
-#include <linux/config.h>
-#ifdef CONFIG_DEBUG_KOBJECT
-#define DEBUG 1
-#else
 #undef DEBUG
-#endif
 
 #include <linux/kobject.h>
 #include <linux/string.h>
@@ -193,8 +188,8 @@ static void kset_hotplug(const char *action, struct kset *kset,
                }
        }
 
-       pr_debug ("%s: %s %s %s %s %s %s %s\n", __FUNCTION__, argv[0], argv[1],
-                 envp[0], envp[1], envp[2], envp[3], envp[4]);
+       pr_debug ("%s: %s %s %s %s %s %s\n", __FUNCTION__, argv[0], argv[1],
+                 envp[0], envp[1], envp[2], envp[3]);
        retval = call_usermodehelper (argv[0], argv, envp, 0);
        if (retval)
                pr_debug ("%s - call_usermodehelper returned %d\n",
@@ -221,7 +216,6 @@ static void kset_hotplug(const char *action, struct kset *kset,
 
 void kobject_init(struct kobject * kobj)
 {
-       WARN_ON(atomic_read(&kobj->refcount));
        atomic_set(&kobj->refcount,1);
        INIT_LIST_HEAD(&kobj->entry);
        kobj->kset = kset_get(kobj->kset);
@@ -449,7 +443,6 @@ struct kobject * kobject_get(struct kobject * kobj)
                atomic_inc(&kobj->refcount);
        } else
                ret = NULL;
-       WARN_ON((kobj != NULL) && (ret==NULL));
        return ret;
 }
 
@@ -470,13 +463,6 @@ void kobject_cleanup(struct kobject * kobj)
        kobj->k_name = NULL;
        if (t && t->release)
                t->release(kobj);
-       else {
-               printk(KERN_ERR "kobject '%s' does not have a release() function, "
-                       "it is broken and must be fixed.\n",
-                       kobj->name);
-               WARN_ON(1);
-       }
-
        if (s)
                kset_put(s);
        if (parent) 
diff --git a/lib/mask.c b/lib/mask.c
new file mode 100644 (file)
index 0000000..231cb05
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * lib/mask.c
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003 Silicon Graphics, Inc.  All Rights Reserved.
+ */
+
+/*
+ * Routines to manipulate multi-word bit masks, such as cpumasks.
+ *
+ * The ascii representation of multi-word bit masks displays each
+ * 32bit word in hex (not zero filled), and for masks longer than
+ * one word, uses a comma separator between words.  Words are
+ * displayed in big-endian order most significant first.  And hex
+ * digits within a word are also in big-endian order, of course.
+ *
+ * Examples:
+ *   A mask with just bit 0 set displays as "1".
+ *   A mask with just bit 127 set displays as "80000000,0,0,0".
+ *   A mask with just bit 64 set displays as "1,0,0".
+ *   A mask with bits 0, 1, 2, 4, 8, 16, 32 and 64 set displays
+ *     as "1,1,10117".  The first "1" is for bit 64, the second
+ *     for bit 32, the third for bit 16, and so forth, to the
+ *     "7", which is for bits 2, 1 and 0.
+ *   A mask with bits 32 through 39 set displays as "ff,0".
+ *
+ * The internal binary representation of masks is as one or
+ * an array of unsigned longs, perhaps wrapped in a struct for
+ * convenient use as an lvalue.  The following code doesn't know
+ * about any such struct details, relying on inline macros in
+ * files such as cpumask.h to pass in an unsigned long pointer
+ * and a length (in bytes), describing the mask contents.
+ * The 32bit words in the array are in little-endian order,
+ * low order word first.  Beware that this is the reverse order
+ * of the ascii representation.
+ *
+ * Even though the size of the input mask is provided in bytes,
+ * the following code may assume that the mask is a multiple of
+ * 32 or 64 bit words long, and ignore any fractional portion
+ * of a word at the end.  The main reason the size is passed in
+ * bytes is because it is so easy to write 'sizeof(somemask_t)'
+ * in the macros.
+ *
+ * Masks are not a single,simple type, like classic 'C'
+ * nul-term strings.  Rather they are a family of types, one
+ * for each different length.  Inline macros are used to pick
+ * up the actual length, where it is known to the compiler, and
+ * pass it down to these routines, which work on any specified
+ * length array of unsigned longs.  Poor man's templates.
+ *
+ * Many of the inline macros don't call into the following
+ * routines.  Some of them call into other kernel routines,
+ * such as memset(), set_bit() or ffs().  Some of them can
+ * accomplish their task right inline, such as returning the
+ * size or address of the unsigned long array, or optimized
+ * versions of the macros for the most common case of an array
+ * of a single unsigned long.
+ */
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/ctype.h>
+#include <linux/slab.h>
+#include <linux/errno.h>
+#include <linux/gfp.h>
+#include <asm/uaccess.h>
+
+#define MAX_HEX_PER_BYTE 4     /* dont need > 4 hex chars to encode byte */
+#define BASE 16                        /* masks are input in hex (base 16) */
+#define NUL ((char)'\0')       /* nul-terminator */
+
+/**
+ * __mask_snprintf_len - represent multi-word bit mask as string.
+ * @buf: The buffer to place the result into
+ * @buflen: The size of the buffer, including the trailing null space
+ * @maskp: Points to beginning of multi-word bit mask.
+ * @maskbytes: Number of bytes in bit mask at maskp.
+ *
+ * This routine is expected to be called from a macro such as:
+ *
+ * #define cpumask_snprintf(buf, buflen, mask) \
+ *   __mask_snprintf_len(buf, buflen, cpus_addr(mask), sizeof(mask))
+ */
+
+int __mask_snprintf_len(char *buf, unsigned int buflen,
+       const unsigned long *maskp, unsigned int maskbytes)
+{
+       u32 *wordp = (u32 *)maskp;
+       int i = maskbytes/sizeof(u32) - 1;
+       int len = 0;
+       char *sep = "";
+
+       while (i >= 1 && wordp[i] == 0)
+               i--;
+       while (i >= 0) {
+               len += snprintf(buf+len, buflen-len, "%s%x", sep, wordp[i]);
+               sep = ",";
+               i--;
+       }
+       return len;
+}
+
+/**
+ * __mask_parse_len - parse user string into maskbytes mask at maskp
+ * @ubuf: The user buffer from which to take the string
+ * @ubuflen: The size of this buffer, including the terminating char
+ * @maskp: Place resulting mask (array of unsigned longs) here
+ * @masklen: Construct mask at @maskp to have exactly @masklen bytes
+ *
+ * @masklen is a multiple of sizeof(unsigned long).  A mask of
+ * @masklen bytes is constructed starting at location @maskp.
+ * The value of this mask is specified by the user provided
+ * string starting at address @ubuf.  Only bytes in the range
+ * [@ubuf, @ubuf+@ubuflen) can be read from user space, and
+ * reading will stop after the first byte that is not a comma
+ * or valid hex digit in the characters [,0-9a-fA-F], or at
+ * the point @ubuf+@ubuflen, whichever comes first.
+ *
+ * Since the user only needs about 2.25 chars per byte to encode
+ * a mask (one char per nibble plus one comma separator or nul
+ * terminator per byte), we blow them off with -EINVAL if they
+ * claim a @ubuflen more than 4 (MAX_HEX_PER_BYTE) times maskbytes.
+ * An empty word (delimited by two consecutive commas, for example)
+ * is taken as zero.  If @buflen is zero, the entire @maskp is set
+ * to zero.
+ *
+ * If the user provides fewer comma-separated ascii words
+ * than there are 32 bit words in maskbytes, we zero fill the
+ * remaining high order words.  If they provide more, they fail
+ * with -EINVAL.  Each comma-separate ascii word is taken as
+ * a hex representation; leading zeros are ignored, and do not
+ * imply octal.  '00e1', 'e1', '00E1', 'E1' are all the same.
+ * If user passes a word that is larger than fits in a u32,
+ * they fail with -EOVERFLOW.
+ */
+
+int __mask_parse_len(const char __user *ubuf, unsigned int ubuflen,
+       unsigned long *maskp, unsigned int maskbytes)
+{
+       char buf[maskbytes * MAX_HEX_PER_BYTE + sizeof(NUL)];
+       char *bp = buf;
+       u32 *wordp = (u32 *)maskp;
+       char *p;
+       int i, j;
+
+       if (ubuflen > maskbytes * MAX_HEX_PER_BYTE)
+               return -EINVAL;
+       if (copy_from_user(buf, ubuf, ubuflen))
+               return -EFAULT;
+       buf[ubuflen] = NUL;
+
+       /*
+        * Put the words into wordp[] in big-endian order,
+        * then go back and reverse them.
+        */
+       memset(wordp, 0, maskbytes);
+       i = j = 0;
+       while ((p = strsep(&bp, ",")) != NULL) {
+               unsigned long long t;
+               if (j == maskbytes/sizeof(u32))
+                       return -EINVAL;
+               t = simple_strtoull(p, 0, BASE);
+               if (t != (u32)t)
+                       return -EOVERFLOW;
+               wordp[j++] = t;
+       }
+       --j;
+       while (i < j) {
+               u32 t = wordp[i];
+               wordp[i] = wordp[j];
+               wordp[j] = t;
+               i++, --j;
+       }
+       return 0;
+}
index 790ec2a..761a57a 100644 (file)
 #include <linux/slab.h>
 #include <linux/string.h>
 
+/**
+ * match_one: - Determines if a string matches a simple pattern
+ * @s: the string to examine for presense of the pattern
+ * @p: the string containing the pattern
+ * @args: array of %MAX_OPT_ARGS &substring_t elements. Used to return match
+ * locations.
+ *
+ * Description: Determines if the pattern @p is present in string @s. Can only
+ * match extremely simple token=arg style patterns. If the pattern is found,
+ * the location(s) of the arguments will be returned in the @args array.
+ */
 static int match_one(char *s, char *p, substring_t args[])
 {
        char *meta;
@@ -74,6 +85,20 @@ static int match_one(char *s, char *p, substring_t args[])
        }
 }
 
+/**
+ * match_token: - Find a token (and optional args) in a string
+ * @s: the string to examine for token/argument pairs
+ * @table: match_table_t describing the set of allowed option tokens and the
+ * arguments that may be associated with them. Must be terminated with a
+ * &struct match_token whose pattern is set to the NULL pointer.
+ * @args: array of %MAX_OPT_ARGS &substring_t elements. Used to return match
+ * locations.
+ *
+ * Description: Detects which if any of a set of token strings has been passed
+ * to it. Tokens can include up to MAX_OPT_ARGS instances of basic c-style
+ * format identifiers which will be taken into account when matching the
+ * tokens, and whose locations will be returned in the @args array.
+ */
 int match_token(char *s, match_table_t table, substring_t args[])
 {
        struct match_token *p;
@@ -84,6 +109,16 @@ int match_token(char *s, match_table_t table, substring_t args[])
        return p->token;
 }
 
+/**
+ * match_number: scan a number in the given base from a substring_t
+ * @s: substring to be scanned
+ * @result: resulting integer on success
+ * @base: base to use when converting string
+ *
+ * Description: Given a &substring_t and a base, attempts to parse the substring
+ * as a number in that base. On success, sets @result to the integer represented
+ * by the string and returns 0. Returns either -ENOMEM or -EINVAL on failure.
+ */
 static int match_number(substring_t *s, int *result, int base)
 {
        char *endp;
@@ -103,27 +138,71 @@ static int match_number(substring_t *s, int *result, int base)
        return ret;
 }
 
+/**
+ * match_int: - scan a decimal representation of an integer from a substring_t
+ * @s: substring_t to be scanned
+ * @result: resulting integer on success
+ *
+ * Description: Attempts to parse the &substring_t @s as a decimal integer. On
+ * success, sets @result to the integer represented by the string and returns 0.
+ * Returns either -ENOMEM or -EINVAL on failure.
+ */
 int match_int(substring_t *s, int *result)
 {
        return match_number(s, result, 0);
 }
 
+/**
+ * match_octal: - scan an octal representation of an integer from a substring_t
+ * @s: substring_t to be scanned
+ * @result: resulting integer on success
+ *
+ * Description: Attempts to parse the &substring_t @s as an octal integer. On
+ * success, sets @result to the integer represented by the string and returns
+ * 0. Returns either -ENOMEM or -EINVAL on failure.
+ */
 int match_octal(substring_t *s, int *result)
 {
        return match_number(s, result, 8);
 }
 
+/**
+ * match_hex: - scan a hex representation of an integer from a substring_t
+ * @s: substring_t to be scanned
+ * @result: resulting integer on success
+ *
+ * Description: Attempts to parse the &substring_t @s as a hexadecimal integer.
+ * On success, sets @result to the integer represented by the string and
+ * returns 0. Returns either -ENOMEM or -EINVAL on failure.
+ */
 int match_hex(substring_t *s, int *result)
 {
        return match_number(s, result, 16);
 }
 
+/**
+ * match_strcpy: - copies the characters from a substring_t to a string
+ * @to: string to copy characters to.
+ * @s: &substring_t to copy
+ *
+ * Description: Copies the set of characters represented by the given
+ * &substring_t @s to the c-style string @to. Caller guarantees that @to is
+ * large enough to hold the characters of @s.
+ */
 void match_strcpy(char *to, substring_t *s)
 {
        memcpy(to, s->from, s->to - s->from);
        to[s->to - s->from] = '\0';
 }
 
+/**
+ * match_strdup: - allocate a new string with the contents of a substring_t
+ * @s: &substring_t to copy
+ *
+ * Description: Allocates and returns a string filled with the contents of
+ * the &substring_t @s. The caller is responsible for freeing the returned
+ * string with kfree().
+ */
 char *match_strdup(substring_t *s)
 {
        char *p = kmalloc(s->to - s->from + 1, GFP_KERNEL);
index ec97d44..c66aba5 100644 (file)
@@ -12,5 +12,3 @@ obj-y                 := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \
                           slab.o swap.o truncate.o vmscan.o $(mmu-y)
 
 obj-$(CONFIG_SWAP)     += page_io.o swap_state.o swapfile.o
-obj-$(CONFIG_PROC_MM)  += proc_mm.o
-
index 7891fef..9d76e24 100644 (file)
@@ -587,13 +587,22 @@ void do_generic_mapping_read(struct address_space *mapping,
                             read_actor_t actor)
 {
        struct inode *inode = mapping->host;
-       unsigned long index, offset;
+       unsigned long index, offset, last;
        struct page *cached_page;
        int error;
 
        cached_page = NULL;
        index = *ppos >> PAGE_CACHE_SHIFT;
        offset = *ppos & ~PAGE_CACHE_MASK;
+       last = (*ppos + desc->count) >> PAGE_CACHE_SHIFT;
+
+       /*
+        * Let the readahead logic know upfront about all
+        * the pages we'll need to satisfy this request
+        */
+       for (; index < last; index++)
+               page_cache_readahead(mapping, ra, filp, index);
+       index = *ppos >> PAGE_CACHE_SHIFT;
 
        for (;;) {
                struct page *page;
@@ -612,7 +621,6 @@ void do_generic_mapping_read(struct address_space *mapping,
                }
 
                cond_resched();
-               page_cache_readahead(mapping, ra, filp, index);
 
                nr = nr - offset;
 find_page:
@@ -990,7 +998,7 @@ static int page_cache_read(struct file * file, unsigned long offset)
  * it in the page cache, and handles the special cases reasonably without
  * having a lot of duplicated code.
  */
-struct page * filemap_nopage(struct vm_area_struct * area, unsigned long address, int unused)
+struct page * filemap_nopage(struct vm_area_struct * area, unsigned long address, int *type)
 {
        int error;
        struct file *file = area->vm_file;
@@ -999,7 +1007,7 @@ struct page * filemap_nopage(struct vm_area_struct * area, unsigned long address
        struct inode *inode = mapping->host;
        struct page *page;
        unsigned long size, pgoff, endoff;
-       int did_readaround = 0;
+       int did_readaround = 0, majmin = VM_FAULT_MINOR;
 
        pgoff = ((address - area->vm_start) >> PAGE_CACHE_SHIFT) + area->vm_pgoff;
        endoff = ((area->vm_end - area->vm_start) >> PAGE_CACHE_SHIFT) + area->vm_pgoff;
@@ -1048,6 +1056,14 @@ retry_find:
                if (ra->mmap_miss > ra->mmap_hit + MMAP_LOTSAMISS)
                        goto no_cached_page;
 
+               /*
+                * To keep the pgmajfault counter straight, we need to
+                * check did_readaround, as this is an inner loop.
+                */
+               if (!did_readaround) {
+                       majmin = VM_FAULT_MAJOR;
+                       inc_page_state(pgmajfault);
+               }
                did_readaround = 1;
                do_page_cache_readahead(mapping, file,
                                pgoff & ~(MMAP_READAROUND-1), MMAP_READAROUND);
@@ -1069,6 +1085,8 @@ success:
         * Found the page and have a reference on it.
         */
        mark_page_accessed(page);
+       if (type)
+               *type = majmin;
        return page;
 
 outside_data_content:
@@ -1104,7 +1122,10 @@ no_cached_page:
        return NULL;
 
 page_not_uptodate:
-       inc_page_state(pgmajfault);
+       if (!did_readaround) {
+               majmin = VM_FAULT_MAJOR;
+               inc_page_state(pgmajfault);
+       }
        lock_page(page);
 
        /* Did it get unhashed while we waited for it? */
index 6823a08..e131a05 100644 (file)
@@ -285,7 +285,7 @@ static void copy_to_high_bio_irq(struct bio *to, struct bio *from)
        struct bio_vec *tovec, *fromvec;
        int i;
 
-       __bio_for_each_segment(tovec, to, i, 0) {
+       bio_for_each_segment(tovec, to, i) {
                fromvec = from->bi_io_vec + i;
 
                /*
@@ -314,7 +314,7 @@ static void bounce_end_io(struct bio *bio, mempool_t *pool)
        /*
         * free up bounce indirect pages used
         */
-       __bio_for_each_segment(bvec, bio, i, 0) {
+       bio_for_each_segment(bvec, bio, i) {
                org_vec = bio_orig->bi_io_vec + i;
                if (bvec->bv_page == org_vec->bv_page)
                        continue;
@@ -437,7 +437,7 @@ static void __blk_queue_bounce(request_queue_t *q, struct bio **bio_orig,
        bio->bi_rw = (*bio_orig)->bi_rw;
 
        bio->bi_vcnt = (*bio_orig)->bi_vcnt;
-       bio->bi_idx = 0;
+       bio->bi_idx = (*bio_orig)->bi_idx;
        bio->bi_size = (*bio_orig)->bi_size;
 
        if (pool == page_pool) {
index 5b73498..16fe20a 100644 (file)
@@ -44,7 +44,6 @@
 #include <linux/highmem.h>
 #include <linux/pagemap.h>
 #include <linux/rmap-locking.h>
-#include <linux/init.h>
 #include <linux/module.h>
 
 #include <asm/pgalloc.h>
@@ -122,12 +121,8 @@ static inline void free_one_pgd(struct mmu_gather *tlb, pgd_t * dir)
        }
        pmd = pmd_offset(dir, 0);
        pgd_clear(dir);
-       for (j = 0; j < PTRS_PER_PMD - PREFETCH_STRIDE/sizeof(*pmd); ++j) {
-               prefetchw(pmd + j + PREFETCH_STRIDE/sizeof(*pmd));
-               free_one_pmd(tlb, pmd + j);
-       }
-       for (; j < PTRS_PER_PMD; j++)
-               free_one_pmd(tlb, pmd + j);
+       for (j = 0; j < PTRS_PER_PMD ; j++)
+               free_one_pmd(tlb, pmd+j);
        pmd_free_tlb(tlb, pmd);
 }
 
@@ -684,25 +679,6 @@ static inline struct page *get_page_map(struct page *page)
        return page;
 }
 
-#ifdef FIXADDR_START
-static struct vm_area_struct fixmap_vma = {
-       /* Catch users - if there are any valid
-          ones, we can make this be "&init_mm" or
-          something.  */
-       .vm_mm = NULL,
-       .vm_page_prot = PAGE_READONLY,
-       .vm_flags = VM_READ | VM_EXEC,
-};
-
-static int init_fixmap_vma(void)
-{
-       fixmap_vma.vm_start = FIXADDR_START;
-       fixmap_vma.vm_end = FIXADDR_TOP;
-       return(0);
-}
-
-__initcall(init_fixmap_vma);
-#endif
 
 int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
                unsigned long start, int len, int write, int force,
@@ -724,8 +700,19 @@ int get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
 
                vma = find_extend_vma(mm, start);
 
-#ifdef FIXADDR_START
-               if (!vma && start >= FIXADDR_START && start < FIXADDR_TOP) {
+#ifdef FIXADDR_USER_START
+               if (!vma &&
+                   start >= FIXADDR_USER_START && start < FIXADDR_USER_END) {
+                       static struct vm_area_struct fixmap_vma = {
+                               /* Catch users - if there are any valid
+                                  ones, we can make this be "&init_mm" or
+                                  something.  */
+                               .vm_mm = NULL,
+                               .vm_start = FIXADDR_USER_START,
+                               .vm_end = FIXADDR_USER_END,
+                               .vm_page_prot = PAGE_READONLY,
+                               .vm_flags = VM_READ | VM_EXEC,
+                       };
                        unsigned long pg = start & PAGE_MASK;
                        pgd_t *pgd;
                        pmd_t *pmd;
@@ -1413,7 +1400,7 @@ do_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
        pte_t entry;
        struct pte_chain *pte_chain;
        int sequence = 0;
-       int ret;
+       int ret = VM_FAULT_MINOR;
 
        if (!vma->vm_ops || !vma->vm_ops->nopage)
                return do_anonymous_page(mm, vma, page_table,
@@ -1427,7 +1414,7 @@ do_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
        }
        smp_rmb();  /* Prevent CPU from reordering lock-free ->nopage() */
 retry:
-       new_page = vma->vm_ops->nopage(vma, address & PAGE_MASK, 0);
+       new_page = vma->vm_ops->nopage(vma, address & PAGE_MASK, &ret);
 
        /* no page was available -- either SIGBUS or OOM */
        if (new_page == NOPAGE_SIGBUS)
@@ -1496,14 +1483,12 @@ retry:
                pte_unmap(page_table);
                page_cache_release(new_page);
                spin_unlock(&mm->page_table_lock);
-               ret = VM_FAULT_MINOR;
                goto out;
        }
 
        /* no need to invalidate: a not-present page shouldn't be cached */
        update_mmu_cache(vma, address, entry);
        spin_unlock(&mm->page_table_lock);
-       ret = VM_FAULT_MAJOR;
        goto out;
 oom:
        ret = VM_FAULT_OOM;
index a9865c9..c76dafc 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -462,11 +462,11 @@ static int vma_merge(struct mm_struct *mm, struct vm_area_struct *prev,
  * The caller must hold down_write(current->mm->mmap_sem).
  */
 
-unsigned long __do_mmap_pgoff(struct mm_struct *mm, struct file * file, 
-                           unsigned long addr, unsigned long len,
-                           unsigned long prot, unsigned long flags,
-                           unsigned long pgoff)
+unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
+                       unsigned long len, unsigned long prot,
+                       unsigned long flags, unsigned long pgoff)
 {
+       struct mm_struct * mm = current->mm;
        struct vm_area_struct * vma, * prev;
        struct inode *inode;
        unsigned int vm_flags;
@@ -1138,7 +1138,11 @@ static void unmap_region(struct mm_struct *mm,
        tlb = tlb_gather_mmu(mm, 0);
        unmap_vmas(&tlb, mm, vma, start, end, &nr_accounted);
        vm_unacct_memory(nr_accounted);
-       free_pgtables(tlb, prev, start, end);
+
+       if (is_hugepage_only_range(start, end - start))
+               hugetlb_free_pgtables(tlb, prev, start, end);
+       else
+               free_pgtables(tlb, prev, start, end);
        tlb_finish_mmu(tlb, start, end);
 }
 
index 0cf2630..31b2777 100644 (file)
@@ -222,8 +222,7 @@ fail:
 }
 
 asmlinkage long
-do_mprotect(struct mm_struct *mm, unsigned long start, size_t len, 
-            unsigned long prot)
+sys_mprotect(unsigned long start, size_t len, unsigned long prot)
 {
        unsigned long vm_flags, nstart, end, tmp;
        struct vm_area_struct * vma, * next, * prev;
@@ -246,9 +245,9 @@ do_mprotect(struct mm_struct *mm, unsigned long start, size_t len,
 
        vm_flags = calc_vm_prot_bits(prot);
 
-       down_write(&mm->mmap_sem);
+       down_write(&current->mm->mmap_sem);
 
-       vma = find_vma_prev(mm, start, &prev);
+       vma = find_vma_prev(current->mm, start, &prev);
        error = -ENOMEM;
        if (!vma)
                goto out;
@@ -327,11 +326,6 @@ do_mprotect(struct mm_struct *mm, unsigned long start, size_t len,
                prev->vm_mm->map_count--;
        }
 out:
-       up_write(&mm->mmap_sem);
+       up_write(&current->mm->mmap_sem);
        return error;
 }
-
-asmlinkage long sys_mprotect(unsigned long start, size_t len, unsigned long prot)
-{
-        return(do_mprotect(current->mm, start, len, prot));
-}
index 0412a20..ce523ef 100644 (file)
@@ -315,6 +315,10 @@ unsigned long do_mremap(unsigned long addr,
        old_len = PAGE_ALIGN(old_len);
        new_len = PAGE_ALIGN(new_len);
 
+       /* Don't allow the degenerate cases */
+       if (!(old_len | new_len))
+               goto out;
+
        /* new_addr is only valid if MREMAP_FIXED is specified */
        if (flags & MREMAP_FIXED) {
                if (new_addr & ~PAGE_MASK)
index 34ac8e1..ed0cee4 100644 (file)
 /* #define DEBUG */
 
 /**
- * int_sqrt - oom_kill.c internal function, rough approximation to sqrt
- * @x: integer of which to calculate the sqrt
- * 
- * A very rough approximation to the sqrt() function.
- */
-static unsigned int int_sqrt(unsigned int x)
-{
-       unsigned int out = x;
-       while (x & ~(unsigned int)1) x >>=2, out >>=1;
-       if (x) out -= out >> 2;
-       return (out ? out : 1);
-}      
-
-/**
  * oom_badness - calculate a numeric value for how bad this task has been
  * @p: task struct of which task we should calculate
  *
@@ -57,7 +43,7 @@ static unsigned int int_sqrt(unsigned int x)
 
 static int badness(struct task_struct *p)
 {
-       int points, cpu_time, run_time;
+       int points, cpu_time, run_time, s;
 
        if (!p->mm)
                return 0;
@@ -77,8 +63,12 @@ static int badness(struct task_struct *p)
        cpu_time = (p->utime + p->stime) >> (SHIFT_HZ + 3);
        run_time = (get_jiffies_64() - p->start_time) >> (SHIFT_HZ + 10);
 
-       points /= int_sqrt(cpu_time);
-       points /= int_sqrt(int_sqrt(run_time));
+       s = int_sqrt(cpu_time);
+       if (s)
+               points /= s;
+       s = int_sqrt(int_sqrt(run_time));
+       if (s)
+               points /= s;
 
        /*
         * Niced processes are most likely less important, so double
index f7e0ff6..622364e 100644 (file)
@@ -267,9 +267,11 @@ free_pages_bulk(struct zone *zone, int count,
 void __free_pages_ok(struct page *page, unsigned int order)
 {
        LIST_HEAD(list);
+       int i;
 
        mod_page_state(pgfree, 1 << order);
-       free_pages_check(__FUNCTION__, page);
+       for (i = 0 ; i < (1 << order) ; ++i)
+               free_pages_check(__FUNCTION__, page + i);
        list_add(&page->list, &list);
        kernel_map_pages(page, 1<<order, 0);
        free_pages_bulk(page_zone(page), 1, &list, order);
@@ -1589,7 +1591,7 @@ void __init page_alloc_init(void)
  *     that the pages_{min,low,high} values for each zone are set correctly 
  *     with respect to min_free_kbytes.
  */
-void setup_per_zone_pages_min(void)
+static void setup_per_zone_pages_min(void)
 {
        unsigned long pages_min = min_free_kbytes >> (PAGE_SHIFT - 10);
        unsigned long lowmem_pages = 0;
@@ -1633,6 +1635,45 @@ void setup_per_zone_pages_min(void)
 }
 
 /*
+ * Initialise min_free_kbytes.
+ *
+ * For small machines we want it small (128k min).  For large machines
+ * we want it large (16MB max).  But it is not linear, because network
+ * bandwidth does not increase linearly with machine size.  We use
+ *
+ *     min_free_kbytes = sqrt(lowmem_kbytes)
+ *
+ * which yields
+ *
+ * 16MB:       128k
+ * 32MB:       181k
+ * 64MB:       256k
+ * 128MB:      362k
+ * 256MB:      512k
+ * 512MB:      724k
+ * 1024MB:     1024k
+ * 2048MB:     1448k
+ * 4096MB:     2048k
+ * 8192MB:     2896k
+ * 16384MB:    4096k
+ */
+static int __init init_per_zone_pages_min(void)
+{
+       unsigned long lowmem_kbytes;
+
+       lowmem_kbytes = nr_free_buffer_pages() * (PAGE_SIZE >> 10);
+
+       min_free_kbytes = int_sqrt(lowmem_kbytes);
+       if (min_free_kbytes < 128)
+               min_free_kbytes = 128;
+       if (min_free_kbytes > 16384)
+               min_free_kbytes = 16384;
+       setup_per_zone_pages_min();
+       return 0;
+}
+module_init(init_per_zone_pages_min)
+
+/*
  * min_free_kbytes_sysctl_handler - just a wrapper around proc_dointvec() so 
  *     that we can call setup_per_zone_pages_min() whenever min_free_kbytes 
  *     changes.
diff --git a/mm/proc_mm.c b/mm/proc_mm.c
deleted file mode 100644 (file)
index 5ceb506..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/* 
- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
- * Licensed under the GPL
- */
-
-#include "linux/mm.h"
-#include "linux/init.h"
-#include "linux/proc_fs.h"
-#include "linux/proc_mm.h"
-#include "linux/file.h"
-#include "asm/uaccess.h"
-#include "asm/mmu_context.h"
-
-static struct file_operations proc_mm_fops;
-
-struct mm_struct *proc_mm_get_mm(int fd)
-{
-       struct mm_struct *ret = ERR_PTR(-EBADF);
-       struct file *file;
-
-       file = fget(fd);
-       if (!file)
-               goto out;
-
-       ret = ERR_PTR(-EINVAL);
-       if(file->f_op != &proc_mm_fops)
-               goto out_fput;
-
-       ret = file->private_data;
- out_fput:
-       fput(file);
- out:
-       return(ret);
-}
-
-extern long do_mmap2(struct mm_struct *mm, unsigned long addr, 
-                    unsigned long len, unsigned long prot, 
-                    unsigned long flags, unsigned long fd,
-                    unsigned long pgoff);
-
-static ssize_t write_proc_mm(struct file *file, const char *buffer,
-                            size_t count, loff_t *ppos)
-{
-       struct mm_struct *mm = file->private_data;
-       struct proc_mm_op req;
-       int n, ret;
-
-       if(count > sizeof(req))
-               return(-EINVAL);
-
-       n = copy_from_user(&req, buffer, count);
-       if(n != 0)
-               return(-EFAULT);
-
-       ret = count;
-       switch(req.op){
-       case MM_MMAP: {
-               struct mm_mmap *map = &req.u.mmap;
-
-               ret = do_mmap2(mm, map->addr, map->len, map->prot, 
-                              map->flags, map->fd, map->offset >> PAGE_SHIFT);
-               if((ret & ~PAGE_MASK) == 0)
-                       ret = count;
-       
-               break;
-       }
-       case MM_MUNMAP: {
-               struct mm_munmap *unmap = &req.u.munmap;
-
-               down_write(&mm->mmap_sem);
-               ret = do_munmap(mm, unmap->addr, unmap->len);
-               up_write(&mm->mmap_sem);
-
-               if(ret == 0)
-                       ret = count;
-               break;
-       }
-       case MM_MPROTECT: {
-               struct mm_mprotect *protect = &req.u.mprotect;
-
-               ret = do_mprotect(mm, protect->addr, protect->len, 
-                                 protect->prot);
-               if(ret == 0)
-                       ret = count;
-               break;
-       }
-
-       case MM_COPY_SEGMENTS: {
-               struct mm_struct *from = proc_mm_get_mm(req.u.copy_segments);
-
-               if(IS_ERR(from)){
-                       ret = PTR_ERR(from);
-                       break;
-               }
-
-               mm_copy_segments(from, mm);
-               break;
-       }
-       default:
-               ret = -EINVAL;
-               break;
-       }
-
-       return(ret);
-}
-
-static int open_proc_mm(struct inode *inode, struct file *file)
-{
-       struct mm_struct *mm = mm_alloc();
-       int ret;
-
-       ret = -ENOMEM;
-       if(mm == NULL)
-               goto out_mem;
-
-       ret = init_new_context(current, mm);
-       if(ret)
-               goto out_free;
-
-       spin_lock(&mmlist_lock);
-       list_add(&mm->mmlist, &current->mm->mmlist);
-       mmlist_nr++;
-       spin_unlock(&mmlist_lock);
-
-       file->private_data = mm;
-
-       return(0);
-
- out_free:
-       mmput(mm);
- out_mem:
-       return(ret);
-}
-
-static int release_proc_mm(struct inode *inode, struct file *file)
-{
-       struct mm_struct *mm = file->private_data;
-
-       mmput(mm);
-       return(0);
-}
-
-static struct file_operations proc_mm_fops = {
-       .open           = open_proc_mm,
-       .release        = release_proc_mm,
-       .write          = write_proc_mm,
-};
-
-static int make_proc_mm(void)
-{
-       struct proc_dir_entry *ent;
-
-       ent = create_proc_entry("mm", 0222, &proc_root);
-       if(ent == NULL){
-               printk("make_proc_mm : Failed to register /proc/mm\n");
-               return(0);
-       }
-       ent->proc_fops = &proc_mm_fops;
-
-       return(0);
-}
-
-__initcall(make_proc_mm);
-
-/*
- * Overrides for Emacs so that we follow Linus's tabbing style.
- * Emacs will notice this stuff at the end of the file and automatically
- * adjust the settings for this buffer only.  This must remain at the end
- * of the file.
- * ---------------------------------------------------------------------------
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
index 36ad938..46a6ff8 100644 (file)
@@ -347,6 +347,8 @@ page_cache_readahead(struct address_space *mapping, struct file_ra_state *ra,
        unsigned min;
        unsigned orig_next_size;
        unsigned actual;
+       int first_access=0;
+       unsigned long preoffset=0;
 
        /*
         * Here we detect the case where the application is performing
@@ -370,16 +372,18 @@ page_cache_readahead(struct address_space *mapping, struct file_ra_state *ra,
        min = get_min_readahead(ra);
        orig_next_size = ra->next_size;
 
-       if (ra->next_size == 0 && offset == 0) {
+       if (ra->next_size == 0) {
                /*
-                * Special case - first read from first page.
+                * Special case - first read.
                 * We'll assume it's a whole-file read, and
                 * grow the window fast.
                 */
+               first_access=1;
                ra->next_size = max / 2;
                goto do_io;
        }
 
+       preoffset = ra->prev_page;
        ra->prev_page = offset;
 
        if (offset >= ra->start && offset <= (ra->start + ra->size)) {
@@ -439,20 +443,44 @@ do_io:
                 * ahead window and get some I/O underway for the new
                 * current window.
                 */
+               if (!first_access && preoffset >= ra->start &&
+                               preoffset < (ra->start + ra->size)) {
+                        /* Heuristic:  If 'n' pages were
+                         * accessed in the current window, there
+                         * is a high probability that around 'n' pages
+                         * shall be used in the next current window.
+                         *
+                         * To minimize lazy-readahead triggered
+                         * in the next current window, read in
+                         * an extra page.
+                         */
+                       ra->next_size = preoffset - ra->start + 2;
+               }
                ra->start = offset;
                ra->size = ra->next_size;
                ra->ahead_start = 0;            /* Invalidate these */
                ra->ahead_size = 0;
                actual = do_page_cache_readahead(mapping, filp, offset,
                                                 ra->size);
-               check_ra_success(ra, ra->size, actual, orig_next_size);
+               if(!first_access) {
+                       /*
+                        * do not adjust the readahead window size the first
+                        * time, the ahead window might get closed if all
+                        * the pages are already in the cache.
+                        */
+                       check_ra_success(ra, ra->size, actual, orig_next_size);
+               }
        } else {
                /*
                 * This read request is within the current window.  It is time
                 * to submit I/O for the ahead window while the application is
-                * crunching through the current window.
+                * about to step into the ahead window.
+                * Heuristic: Defer reading the ahead window till we hit
+                * the last page in the current window. (lazy readahead)
+                * If we read in earlier we run the risk of wasting
+                * the ahead window.
                 */
-               if (ra->ahead_start == 0) {
+               if (ra->ahead_start == 0 && offset == (ra->start + ra->size -1)) {
                        ra->ahead_start = ra->start + ra->size;
                        ra->ahead_size = ra->next_size;
                        actual = do_page_cache_readahead(mapping, filp,
@@ -488,7 +516,7 @@ void handle_ra_miss(struct address_space *mapping,
                const unsigned long max = get_max_readahead(ra);
 
                if (offset != ra->prev_page + 1) {
-                       ra->size = 0;                   /* Not sequential */
+                       ra->size = ra->size?ra->size-1:0; /* Not sequential */
                } else {
                        ra->size++;                     /* A sequential read */
                        if (ra->size >= max) {          /* Resume readahead */
index 13bb8a4..3be8332 100644 (file)
@@ -71,7 +71,7 @@ enum sgp_type {
 };
 
 static int shmem_getpage(struct inode *inode, unsigned long idx,
-                        struct page **pagep, enum sgp_type sgp);
+                        struct page **pagep, enum sgp_type sgp, int *type);
 
 static inline struct page *shmem_dir_alloc(unsigned int gfp_mask)
 {
@@ -540,7 +540,7 @@ static int shmem_notify_change(struct dentry *dentry, struct iattr *attr)
                        if (attr->ia_size & (PAGE_CACHE_SIZE-1)) {
                                (void) shmem_getpage(inode,
                                        attr->ia_size>>PAGE_CACHE_SHIFT,
-                                               &page, SGP_READ);
+                                               &page, SGP_READ, NULL);
                        }
                        /*
                         * Reset SHMEM_PAGEIN flag so that shmem_truncate can
@@ -765,7 +765,7 @@ redirty:
  * vm. If we swap it in we mark it dirty since we also free the swap
  * entry since a page cannot live in both the swap and page cache
  */
-static int shmem_getpage(struct inode *inode, unsigned long idx, struct page **pagep, enum sgp_type sgp)
+static int shmem_getpage(struct inode *inode, unsigned long idx, struct page **pagep, enum sgp_type sgp, int *type)
 {
        struct address_space *mapping = inode->i_mapping;
        struct shmem_inode_info *info = SHMEM_I(inode);
@@ -774,7 +774,7 @@ static int shmem_getpage(struct inode *inode, unsigned long idx, struct page **p
        struct page *swappage;
        swp_entry_t *entry;
        swp_entry_t swap;
-       int error;
+       int error, majmin = VM_FAULT_MINOR;
 
        if (idx >= SHMEM_MAX_INDEX)
                return -EFBIG;
@@ -811,6 +811,10 @@ repeat:
                if (!swappage) {
                        shmem_swp_unmap(entry);
                        spin_unlock(&info->lock);
+                       /* here we actually do the io */
+                       if (majmin == VM_FAULT_MINOR && type)
+                               inc_page_state(pgmajfault);
+                       majmin = VM_FAULT_MAJOR;
                        swapin_readahead(swap);
                        swappage = read_swap_cache_async(swap);
                        if (!swappage) {
@@ -959,6 +963,8 @@ done:
                } else
                        *pagep = ZERO_PAGE(0);
        }
+       if (type)
+               *type = majmin;
        return 0;
 
 failed:
@@ -969,7 +975,7 @@ failed:
        return error;
 }
 
-struct page *shmem_nopage(struct vm_area_struct *vma, unsigned long address, int unused)
+struct page *shmem_nopage(struct vm_area_struct *vma, unsigned long address, int *type)
 {
        struct inode *inode = vma->vm_file->f_dentry->d_inode;
        struct page *page = NULL;
@@ -980,7 +986,7 @@ struct page *shmem_nopage(struct vm_area_struct *vma, unsigned long address, int
        idx += vma->vm_pgoff;
        idx >>= PAGE_CACHE_SHIFT - PAGE_SHIFT;
 
-       error = shmem_getpage(inode, idx, &page, SGP_CACHE);
+       error = shmem_getpage(inode, idx, &page, SGP_CACHE, type);
        if (error)
                return (error == -ENOMEM)? NOPAGE_OOM: NOPAGE_SIGBUS;
 
@@ -1007,7 +1013,7 @@ static int shmem_populate(struct vm_area_struct *vma,
                /*
                 * Will need changing if PAGE_CACHE_SIZE != PAGE_SIZE
                 */
-               err = shmem_getpage(inode, pgoff, &page, sgp);
+               err = shmem_getpage(inode, pgoff, &page, sgp, NULL);
                if (err)
                        return err;
                if (page) {
@@ -1157,7 +1163,7 @@ static int
 shmem_prepare_write(struct file *file, struct page *page, unsigned offset, unsigned to)
 {
        struct inode *inode = page->mapping->host;
-       return shmem_getpage(inode, page->index, &page, SGP_WRITE);
+       return shmem_getpage(inode, page->index, &page, SGP_WRITE, NULL);
 }
 
 static ssize_t
@@ -1214,7 +1220,7 @@ shmem_file_write(struct file *file, const char __user *buf, size_t count, loff_t
                 * But it still may be a good idea to prefault below.
                 */
 
-               err = shmem_getpage(inode, index, &page, SGP_WRITE);
+               err = shmem_getpage(inode, index, &page, SGP_WRITE, NULL);
                if (err)
                        break;
 
@@ -1296,7 +1302,7 @@ static void do_shmem_file_read(struct file *filp, loff_t *ppos, read_descriptor_
                                break;
                }
 
-               desc->error = shmem_getpage(inode, index, &page, SGP_READ);
+               desc->error = shmem_getpage(inode, index, &page, SGP_READ, NULL);
                if (desc->error) {
                        if (desc->error == -EINVAL)
                                desc->error = 0;
@@ -1552,7 +1558,7 @@ static int shmem_symlink(struct inode *dir, struct dentry *dentry, const char *s
                        iput(inode);
                        return -ENOMEM;
                }
-               error = shmem_getpage(inode, 0, &page, SGP_WRITE);
+               error = shmem_getpage(inode, 0, &page, SGP_WRITE, NULL);
                if (error) {
                        vm_unacct_memory(VM_ACCT(1));
                        iput(inode);
@@ -1590,7 +1596,7 @@ static int shmem_follow_link_inline(struct dentry *dentry, struct nameidata *nd)
 static int shmem_readlink(struct dentry *dentry, char __user *buffer, int buflen)
 {
        struct page *page = NULL;
-       int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ);
+       int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL);
        if (res)
                return res;
        res = vfs_readlink(dentry, buffer, buflen, kmap(page));
@@ -1603,7 +1609,7 @@ static int shmem_readlink(struct dentry *dentry, char __user *buffer, int buflen
 static int shmem_follow_link(struct dentry *dentry, struct nameidata *nd)
 {
        struct page *page = NULL;
-       int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ);
+       int res = shmem_getpage(dentry->d_inode, 0, &page, SGP_READ, NULL);
        if (res)
                return res;
        res = vfs_follow_link(nd, kmap(page));
index 8b1d022..5dc19e2 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -815,13 +815,14 @@ static inline void *kmem_getpages(kmem_cache_t *cachep, unsigned long flags)
        void *addr;
 
        flags |= cachep->gfpflags;
-       if (cachep->flags & SLAB_RECLAIM_ACCOUNT)
-               atomic_add(1<<cachep->gfporder, &slab_reclaim_pages);
        addr = (void*)__get_free_pages(flags, cachep->gfporder);
        if (addr) {
                int i = (1 << cachep->gfporder);
                struct page *page = virt_to_page(addr);
 
+               if (cachep->flags & SLAB_RECLAIM_ACCOUNT)
+                       atomic_add(i, &slab_reclaim_pages);
+               add_page_state(nr_slab, i);
                while (i--) {
                        SetPageSlab(page);
                        page++;
@@ -1618,7 +1619,6 @@ static int cache_grow (kmem_cache_t * cachep, int flags)
        do {
                SET_PAGE_CACHE(page, cachep);
                SET_PAGE_SLAB(page, slabp);
-               inc_page_state(nr_slab);
                page++;
        } while (--i);
 
index 6c86da9..a714334 100644 (file)
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -386,17 +386,19 @@ EXPORT_SYMBOL(vm_acct_memory);
 #ifdef CONFIG_SMP
 void percpu_counter_mod(struct percpu_counter *fbc, long amount)
 {
+       long count;
+       long *pcount;
        int cpu = get_cpu();
-       long count = fbc->counters[cpu].count;
 
-       count += amount;
+       pcount = per_cpu_ptr(fbc->counters, cpu);
+       count = *pcount + amount;
        if (count >= FBC_BATCH || count <= -FBC_BATCH) {
                spin_lock(&fbc->lock);
                fbc->count += count;
                spin_unlock(&fbc->lock);
                count = 0;
        }
-       fbc->counters[cpu].count = count;
+       *pcount = count;
        put_cpu();
 }
 EXPORT_SYMBOL(percpu_counter_mod);
index 32fd381..f2da3c9 100644 (file)
@@ -154,7 +154,7 @@ static int shrink_slab(long scanned, unsigned int gfp_mask)
        list_for_each_entry(shrinker, &shrinker_list, list) {
                unsigned long long delta;
 
-               delta = scanned * shrinker->seeks;
+               delta = 4 * (scanned / shrinker->seeks);
                delta *= (*shrinker->shrinker)(0, gfp_mask);
                do_div(delta, pages + 1);
                shrinker->nr += delta;
@@ -779,7 +779,7 @@ shrink_zone(struct zone *zone, int max_scan, unsigned int gfp_mask,
                count = atomic_read(&zone->refill_counter);
                if (count > SWAP_CLUSTER_MAX * 4)
                        count = SWAP_CLUSTER_MAX * 4;
-               atomic_sub(count, &zone->refill_counter);
+               atomic_set(&zone->refill_counter, 0);
                refill_inactive_zone(zone, count, ps, priority);
        }
        return shrink_cache(nr_pages, zone, gfp_mask,
index edddd32..25b33f6 100644 (file)
@@ -23,6 +23,7 @@ static struct ctl_table atalk_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = &proc_dointvec_jiffies,
+               .strategy       = &sysctl_jiffies,
        },
        {
                .ctl_name       = NET_ATALK_AARP_TICK_TIME,
@@ -31,6 +32,7 @@ static struct ctl_table atalk_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = &proc_dointvec_jiffies,
+               .strategy       = &sysctl_jiffies,
        },
        {
                .ctl_name       = NET_ATALK_AARP_RETRANSMIT_LIMIT,
@@ -47,6 +49,7 @@ static struct ctl_table atalk_table[] = {
                .maxlen         = sizeof(int),
                .mode           = 0644,
                .proc_handler   = &proc_dointvec_jiffies,
+               .strategy       = &sysctl_jiffies,
        },
        { 0 },
 };
index 38eaa78..4fb1519 100644 (file)
@@ -228,45 +228,26 @@ ax25_cb *ax25_find_cb(ax25_address *src_addr, ax25_address *dest_addr,
        return NULL;
 }
 
-/*
- *     Look for any matching address - RAW sockets can bind to arbitrary names
- */
-struct sock *ax25_addr_match(ax25_address *addr)
+void ax25_send_to_raw(ax25_address *addr, struct sk_buff *skb, int proto)
 {
-       struct sock *sk = NULL;
        ax25_cb *s;
+       struct sk_buff *copy;
        struct hlist_node *node;
 
        spin_lock_bh(&ax25_list_lock);
        ax25_for_each(s, node, &ax25_list) {
                if (s->sk != NULL && ax25cmp(&s->source_addr, addr) == 0 &&
-                   s->sk->sk_type == SOCK_RAW) {
-                       sk = s->sk;
-                       lock_sock(sk);
-                       break;
-               }
-       }
-
-       spin_unlock_bh(&ax25_list_lock);
-
-       return sk;
-}
-
-void ax25_send_to_raw(struct sock *sk, struct sk_buff *skb, int proto)
-{
-       struct sk_buff *copy;
-       struct hlist_node *node;
-
-       sk_for_each_from(sk, node)
-               if (sk->sk_type == SOCK_RAW &&
-                   sk->sk_protocol == proto &&
-                   atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf) {
+                   s->sk->sk_type == SOCK_RAW &&
+                   s->sk->sk_protocol == proto &&
+                   s->ax25_dev->dev == skb->dev &&
+                   atomic_read(&s->sk->sk_rmem_alloc) <= s->sk->sk_rcvbuf) {
                        if ((copy = skb_clone(skb, GFP_ATOMIC)) == NULL)
-                               return;
-
-                       if (sock_queue_rcv_skb(sk, copy) != 0)
+                               continue;
+                       if (sock_queue_rcv_skb(s->sk, copy) != 0)
                                kfree_skb(copy);
                }
+       }
+       spin_unlock_bh(&ax25_list_lock);
 }
 
 /*
@@ -318,7 +299,7 @@ void ax25_destroy_socket(ax25_cb *ax25)
                                ax25_cb *sax25 = ax25_sk(skb->sk);
 
                                /* Queue the unaccepted socket for death */
-                               sock_set_flag(skb->sk, SOCK_DEAD);
+                               sock_orphan(skb->sk);
 
                                ax25_start_heartbeat(sax25);
                                sax25->state = AX25_STATE_0;
@@ -913,6 +894,7 @@ struct sock *ax25_make_new(struct sock *osk, struct ax25_dev *ax25_dev)
        if (oax25->digipeat != NULL) {
                if ((ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
                        sk_free(sk);
+                       ax25_cb_put(ax25);
                        return NULL;
                }
 
@@ -934,20 +916,25 @@ static int ax25_release(struct socket *sock)
                return 0;
 
        sock_hold(sk);
+       sock_orphan(sk);
        lock_sock(sk);
        ax25 = ax25_sk(sk);
 
        if (sk->sk_type == SOCK_SEQPACKET) {
                switch (ax25->state) {
                case AX25_STATE_0:
+                       release_sock(sk);
                        ax25_disconnect(ax25, 0);
+                       lock_sock(sk);
                        ax25_destroy_socket(ax25);
                        break;
 
                case AX25_STATE_1:
                case AX25_STATE_2:
                        ax25_send_control(ax25, AX25_DISC, AX25_POLLON, AX25_COMMAND);
+                       release_sock(sk);
                        ax25_disconnect(ax25, 0);
+                       lock_sock(sk);
                        ax25_destroy_socket(ax25);
                        break;
 
@@ -980,7 +967,6 @@ static int ax25_release(struct socket *sock)
                        sk->sk_state                = TCP_CLOSE;
                        sk->sk_shutdown            |= SEND_SHUTDOWN;
                        sk->sk_state_change(sk);
-                       sock_set_flag(sk, SOCK_DEAD);
                        sock_set_flag(sk, SOCK_DESTROY);
                        break;
 
@@ -991,12 +977,10 @@ static int ax25_release(struct socket *sock)
                sk->sk_state     = TCP_CLOSE;
                sk->sk_shutdown |= SEND_SHUTDOWN;
                sk->sk_state_change(sk);
-               sock_set_flag(sk, SOCK_DEAD);
                ax25_destroy_socket(ax25);
        }
 
        sock->sk   = NULL;
-       sk->sk_socket = NULL;   /* Not used, but we should do this */
        release_sock(sk);
        sock_put(sk);
 
@@ -1334,11 +1318,13 @@ static int ax25_accept(struct socket *sock, struct socket *newsock, int flags)
 
                release_sock(sk);
                current->state = TASK_INTERRUPTIBLE;
-               if (flags & O_NONBLOCK)
+               if (flags & O_NONBLOCK) {
+                       current->state = TASK_RUNNING;
+                       remove_wait_queue(sk->sk_sleep, &wait);
                        return -EWOULDBLOCK;
+               }
                if (!signal_pending(tsk)) {
                        schedule();
-                       current->state = TASK_RUNNING;
                        lock_sock(sk);
                        continue;
                }
@@ -1633,16 +1619,16 @@ static int ax25_recvmsg(struct kiocb *iocb, struct socket *sock,
        if (msg->msg_namelen != 0) {
                struct sockaddr_ax25 *sax = (struct sockaddr_ax25 *)msg->msg_name;
                ax25_digi digi;
-               ax25_address dest;
+               ax25_address src;
 
-               ax25_addr_parse(skb->mac.raw+1, skb->data-skb->mac.raw-1, NULL, &dest, &digi, NULL, NULL);
+               ax25_addr_parse(skb->mac.raw+1, skb->data-skb->mac.raw-1, &src, NULL, &digi, NULL, NULL);
 
                sax->sax25_family = AF_AX25;
                /* We set this correctly, even though we may not let the
                   application know the digi calls further down (because it
                   did NOT ask to know them).  This could get political... **/
                sax->sax25_ndigis = digi.ndigi;
-               sax->sax25_call   = dest;
+               sax->sax25_call   = src;
 
                if (sax->sax25_ndigis != 0) {
                        int ct;
index 55927bd..e7f9e67 100644 (file)
@@ -147,7 +147,6 @@ int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb)
        }
 
        if (ax25->sk != NULL && ax25->ax25_dev->values[AX25_VALUES_CONMODE] == 2) {
-               bh_lock_sock(ax25->sk);
                if ((!ax25->pidincl && ax25->sk->sk_protocol == pid) ||
                    ax25->pidincl) {
                        if (sock_queue_rcv_skb(ax25->sk, skb) == 0)
@@ -155,7 +154,6 @@ int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb)
                        else
                                ax25->condition |= AX25_COND_OWN_RX_BUSY;
                }
-               bh_unlock_sock(ax25->sk);
        }
 
        return queued;
@@ -195,7 +193,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
 {
        ax25_address src, dest, *next_digi = NULL;
        int type = 0, mine = 0, dama;
-       struct sock *make, *sk, *raw;
+       struct sock *make, *sk;
        ax25_digi dp, reverse_dp;
        ax25_cb *ax25;
        ax25_dev *ax25_dev;
@@ -243,10 +241,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
        if ((*skb->data & ~0x10) == AX25_UI && dp.lastrepeat + 1 == dp.ndigi) {
                skb->h.raw = skb->data + 2;             /* skip control and pid */
 
-               if ((raw = ax25_addr_match(&dest)) != NULL) {
-                       ax25_send_to_raw(raw, skb, skb->data[1]);
-                       release_sock(raw);
-               }
+               ax25_send_to_raw(&dest, skb, skb->data[1]);
 
                if (!mine && ax25cmp(&dest, (ax25_address *)dev->broadcast) != 0) {
                        kfree_skb(skb);
@@ -381,7 +376,6 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
 
                sk->sk_ack_backlog++;
                bh_unlock_sock(sk);
-               sock_put(sk);
        } else {
                if (!mine) {
                        kfree_skb(skb);
@@ -407,6 +401,8 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
            (ax25->digipeat = kmalloc(sizeof(ax25_digi), GFP_ATOMIC)) == NULL) {
                kfree_skb(skb);
                ax25_destroy_socket(ax25);
+               if (sk)
+                       sock_put(sk);
                return 0;
        }
 
@@ -446,6 +442,7 @@ static int ax25_rcv(struct sk_buff *skb, struct net_device *dev,
        if (sk) {
                if (!sock_flag(sk, SOCK_DEAD))
                        sk->sk_data_ready(sk, skb->len);
+               sock_put(sk);
        } else
                kfree_skb(skb);
 
index a406ab2..e6ea63e 100644 (file)
@@ -360,3 +360,4 @@ module_exit(bt_cleanup);
 MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>");
 MODULE_DESCRIPTION("Bluetooth Core ver " VERSION);
 MODULE_LICENSE("GPL");
+MODULE_ALIAS_NETPROTO(PF_BLUETOOTH);
index 19704fd..efa44e1 100644 (file)
@@ -707,4 +707,3 @@ module_exit(bnep_cleanup_module);
 MODULE_DESCRIPTION("Bluetooth BNEP ver " VERSION);
 MODULE_AUTHOR("David Libault <david.libault@inventel.fr>, Maxim Krasnyanskiy <maxk@qualcomm.com>");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS_NETPROTO(PF_BLUETOOTH);
index 1ca3964..9fbef2a 100644 (file)
 #include <asm/uaccess.h>
 #include <asm/checksum.h>
 #include "br_private.h"
+#ifdef CONFIG_SYSCTL
+#include <linux/sysctl.h>
+#endif
 
 
 #define skb_origaddr(skb)       (((struct bridge_skb_cb *) \
-                                (skb->cb))->daddr.ipv4)
+                                (skb->nf_bridge->data))->daddr.ipv4)
 #define store_orig_dstaddr(skb)         (skb_origaddr(skb) = (skb)->nh.iph->daddr)
 #define dnat_took_place(skb)    (skb_origaddr(skb) != (skb)->nh.iph->daddr)
-#define clear_cb(skb)           (memset(&skb_origaddr(skb), 0, \
-                                sizeof(struct bridge_skb_cb)))
 
 #define has_bridge_parent(device)      ((device)->br_port != NULL)
 #define bridge_parent(device)          ((device)->br_port->br->dev)
 
-#define IS_VLAN_IP (skb->protocol == __constant_htons(ETH_P_8021Q) && \
-       hdr->h_vlan_encapsulated_proto == __constant_htons(ETH_P_IP))
-#define IS_VLAN_ARP (skb->protocol == __constant_htons(ETH_P_8021Q) && \
-       hdr->h_vlan_encapsulated_proto == __constant_htons(ETH_P_ARP))
+#ifdef CONFIG_SYSCTL
+static struct ctl_table_header *brnf_sysctl_header;
+static int brnf_call_iptables = 1;
+static int brnf_call_arptables = 1;
+static int brnf_filter_vlan_tagged = 1;
+#else
+#define brnf_filter_vlan_tagged 1
+#endif
+
+#define IS_VLAN_IP (skb->protocol == __constant_htons(ETH_P_8021Q) &&    \
+       hdr->h_vlan_encapsulated_proto == __constant_htons(ETH_P_IP) &&  \
+       brnf_filter_vlan_tagged)
+#define IS_VLAN_ARP (skb->protocol == __constant_htons(ETH_P_8021Q) &&   \
+       hdr->h_vlan_encapsulated_proto == __constant_htons(ETH_P_ARP) && \
+       brnf_filter_vlan_tagged)
 
 /* We need these fake structures to make netfilter happy --
  * lots of places assume that skb->dst != NULL, which isn't
@@ -74,8 +86,7 @@ static struct rtable __fake_rtable = {
                        .metrics                = {[RTAX_MTU - 1] = 1500},
                }
        },
-
-       .rt_flags       = 0
+       .rt_flags       = 0,
 };
 
 
@@ -203,7 +214,6 @@ bridged_dnat:
                                 */
                                nf_bridge->mask |= BRNF_BRIDGED_DNAT;
                                skb->dev = nf_bridge->physindev;
-                               clear_cb(skb);
                                if (skb->protocol ==
                                    __constant_htons(ETH_P_8021Q)) {
                                        skb_push(skb, VLAN_HLEN);
@@ -224,7 +234,6 @@ bridged_dnat:
                dst_hold(skb->dst);
        }
 
-       clear_cb(skb);
        skb->dev = nf_bridge->physindev;
        if (skb->protocol == __constant_htons(ETH_P_8021Q)) {
                skb_push(skb, VLAN_HLEN);
@@ -251,6 +260,11 @@ static unsigned int br_nf_pre_routing(unsigned int hook, struct sk_buff **pskb,
        struct sk_buff *skb = *pskb;
        struct nf_bridge_info *nf_bridge;
 
+#ifdef CONFIG_SYSCTL
+       if (!brnf_call_iptables)
+               return NF_ACCEPT;
+#endif
+
        if (skb->protocol != __constant_htons(ETH_P_IP)) {
                struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)
                                          ((*pskb)->mac.ethernet);
@@ -338,6 +352,7 @@ static unsigned int br_nf_local_in(unsigned int hook, struct sk_buff **pskb,
        return NF_ACCEPT;
 }
 
+
 /* PF_BRIDGE/FORWARD *************************************************/
 static int br_nf_forward_finish(struct sk_buff *skb)
 {
@@ -373,7 +388,7 @@ static int br_nf_forward_finish(struct sk_buff *skb)
  * because of the ipt_physdev.c module. For ARP, indev and outdev are the
  * bridge ports.
  */
-static unsigned int br_nf_forward(unsigned int hook, struct sk_buff **pskb,
+static unsigned int br_nf_forward_ip(unsigned int hook, struct sk_buff **pskb,
    const struct net_device *in, const struct net_device *out,
    int (*okfn)(struct sk_buff *))
 {
@@ -381,9 +396,13 @@ static unsigned int br_nf_forward(unsigned int hook, struct sk_buff **pskb,
        struct nf_bridge_info *nf_bridge;
        struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet);
 
-       if (skb->protocol != __constant_htons(ETH_P_IP) &&
-           skb->protocol != __constant_htons(ETH_P_ARP)) {
-               if (!IS_VLAN_IP && !IS_VLAN_ARP)
+#ifdef CONFIG_SYSCTL
+       if (!skb->nf_bridge)
+               return NF_ACCEPT;
+#endif
+
+       if (skb->protocol != __constant_htons(ETH_P_IP)) {
+               if (!IS_VLAN_IP)
                        return NF_ACCEPT;
                skb_pull(*pskb, VLAN_HLEN);
                (*pskb)->nh.raw += VLAN_HLEN;
@@ -392,34 +411,54 @@ static unsigned int br_nf_forward(unsigned int hook, struct sk_buff **pskb,
 #ifdef CONFIG_NETFILTER_DEBUG
        skb->nf_debug ^= (1 << NF_BR_FORWARD);
 #endif
-       if (skb->protocol == __constant_htons(ETH_P_IP) || IS_VLAN_IP) {
-               nf_bridge = skb->nf_bridge;
-               if (skb->pkt_type == PACKET_OTHERHOST) {
-                       skb->pkt_type = PACKET_HOST;
-                       nf_bridge->mask |= BRNF_PKT_TYPE;
-               }
+       nf_bridge = skb->nf_bridge;
+       if (skb->pkt_type == PACKET_OTHERHOST) {
+               skb->pkt_type = PACKET_HOST;
+               nf_bridge->mask |= BRNF_PKT_TYPE;
+       }
 
-               /* The physdev module checks on this */
-               nf_bridge->mask |= BRNF_BRIDGED;
-               nf_bridge->physoutdev = skb->dev;
+       /* The physdev module checks on this */
+       nf_bridge->mask |= BRNF_BRIDGED;
+       nf_bridge->physoutdev = skb->dev;
 
-               NF_HOOK(PF_INET, NF_IP_FORWARD, skb, bridge_parent(in),
-                       bridge_parent(out), br_nf_forward_finish);
-       } else {
-               struct net_device **d = (struct net_device **)(skb->cb);
-               struct arphdr *arp = skb->nh.arph;
+       NF_HOOK(PF_INET, NF_IP_FORWARD, skb, bridge_parent(in),
+               bridge_parent(out), br_nf_forward_finish);
 
-               if (arp->ar_pln != 4) {
-                       if (IS_VLAN_ARP) {
-                               skb_push(*pskb, VLAN_HLEN);
-                               (*pskb)->nh.raw -= VLAN_HLEN;
-                       }
+       return NF_STOLEN;
+}
+
+static unsigned int br_nf_forward_arp(unsigned int hook, struct sk_buff **pskb,
+   const struct net_device *in, const struct net_device *out,
+   int (*okfn)(struct sk_buff *))
+{
+       struct sk_buff *skb = *pskb;
+       struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet);
+       struct net_device **d = (struct net_device **)(skb->cb);
+
+       if (!brnf_call_arptables)
+               return NF_ACCEPT;
+
+       if (skb->protocol != __constant_htons(ETH_P_ARP)) {
+               if (!IS_VLAN_ARP)
                        return NF_ACCEPT;
+               skb_pull(*pskb, VLAN_HLEN);
+               (*pskb)->nh.raw += VLAN_HLEN;
+       }
+
+#ifdef CONFIG_NETFILTER_DEBUG
+       skb->nf_debug ^= (1 << NF_BR_FORWARD);
+#endif
+
+       if (skb->nh.arph->ar_pln != 4) {
+               if (IS_VLAN_ARP) {
+                       skb_push(*pskb, VLAN_HLEN);
+                       (*pskb)->nh.raw -= VLAN_HLEN;
                }
-               *d = (struct net_device *)in;
-               NF_HOOK(NF_ARP, NF_ARP_FORWARD, skb, (struct net_device *)in,
-                       (struct net_device *)out, br_nf_forward_finish);
+               return NF_ACCEPT;
        }
+       *d = (struct net_device *)in;
+       NF_HOOK(NF_ARP, NF_ARP_FORWARD, skb, (struct net_device *)in,
+               (struct net_device *)out, br_nf_forward_finish);
 
        return NF_STOLEN;
 }
@@ -475,6 +514,11 @@ static unsigned int br_nf_local_out(unsigned int hook, struct sk_buff **pskb,
        struct nf_bridge_info *nf_bridge;
        struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet);
 
+#ifdef CONFIG_SYSCTL
+       if (!skb->nf_bridge)
+               return NF_ACCEPT;
+#endif
+
        if (skb->protocol != __constant_htons(ETH_P_IP) && !IS_VLAN_IP)
                return NF_ACCEPT;
 
@@ -486,7 +530,6 @@ static unsigned int br_nf_local_out(unsigned int hook, struct sk_buff **pskb,
 
        nf_bridge = skb->nf_bridge;
        nf_bridge->physoutdev = skb->dev;
-
        realindev = nf_bridge->physindev;
 
        /* Bridged, take PF_BRIDGE/FORWARD.
@@ -554,29 +597,34 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff **pskb,
        struct vlan_ethhdr *hdr = (struct vlan_ethhdr *)(skb->mac.ethernet);
        struct net_device *realoutdev = bridge_parent(skb->dev);
 
-       /* Be very paranoid. Must be a device driver bug. */
+#ifdef CONFIG_NETFILTER_DEBUG
+       /* Be very paranoid. This probably won't happen anymore, but let's
+        * keep the check just to be sure... */
        if (skb->mac.raw < skb->head || skb->mac.raw + ETH_HLEN > skb->data) {
                printk(KERN_CRIT "br_netfilter: Argh!! br_nf_post_routing: "
                                 "bad mac.raw pointer.");
-               if (skb->dev != NULL) {
-                       printk("[%s]", skb->dev->name);
-                       if (has_bridge_parent(skb->dev))
-                               printk("[%s]", bridge_parent(skb->dev)->name);
-               }
-               printk(" head:%p, raw:%p\n", skb->head, skb->mac.raw);
-               return NF_ACCEPT;
+               goto print_error;
        }
+#endif
+
+#ifdef CONFIG_SYSCTL
+       if (!nf_bridge)
+               return NF_ACCEPT;
+#endif
 
        if (skb->protocol != __constant_htons(ETH_P_IP) && !IS_VLAN_IP)
                return NF_ACCEPT;
 
+#ifdef CONFIG_NETFILTER_DEBUG
        /* Sometimes we get packets with NULL ->dst here (for example,
-        * running a dhcp client daemon triggers this).
+        * running a dhcp client daemon triggers this). This should now
+        * be fixed, but let's keep the check around.
         */
-       if (skb->dst == NULL)
-               return NF_ACCEPT;
+       if (skb->dst == NULL) {
+               printk(KERN_CRIT "br_netfilter: skb->dst == NULL.");
+               goto print_error;
+       }
 
-#ifdef CONFIG_NETFILTER_DEBUG
        skb->nf_debug ^= (1 << NF_IP_POST_ROUTING);
 #endif
 
@@ -603,6 +651,18 @@ static unsigned int br_nf_post_routing(unsigned int hook, struct sk_buff **pskb,
                realoutdev, br_dev_queue_push_xmit);
 
        return NF_STOLEN;
+
+#ifdef CONFIG_NETFILTER_DEBUG
+print_error:
+       if (skb->dev != NULL) {
+               printk("[%s]", skb->dev->name);
+               if (has_bridge_parent(skb->dev))
+                       printk("[%s]", bridge_parent(skb->dev)->name);
+       }
+       printk(" head:%p, raw:%p, data:%p\n", skb->head, skb->mac.raw,
+                                             skb->data);
+       return NF_ACCEPT;
+#endif
 }
 
 
@@ -632,6 +692,13 @@ static unsigned int ipv4_sabotage_out(unsigned int hook, struct sk_buff **pskb,
    const struct net_device *in, const struct net_device *out,
    int (*okfn)(struct sk_buff *))
 {
+       struct sk_buff *skb = *pskb;
+
+#ifdef CONFIG_SYSCTL
+       if (!brnf_call_iptables && !skb->nf_bridge)
+               return NF_ACCEPT;
+#endif
+
        if ((out->hard_start_xmit == br_dev_xmit &&
            okfn != br_nf_forward_finish &&
            okfn != br_nf_local_out_finish &&
@@ -641,7 +708,6 @@ static unsigned int ipv4_sabotage_out(unsigned int hook, struct sk_buff **pskb,
            VLAN_DEV_INFO(out)->real_dev->hard_start_xmit == br_dev_xmit)
 #endif
            ) {
-               struct sk_buff *skb = *pskb;
                struct nf_bridge_info *nf_bridge;
 
                if (!skb->nf_bridge && !nf_bridge_alloc(skb))
@@ -687,7 +753,12 @@ static struct nf_hook_ops br_nf_ops[] = {
          .pf = PF_BRIDGE,
          .hooknum = NF_BR_LOCAL_IN,
          .priority = NF_BR_PRI_BRNF, },
-       { .hook = br_nf_forward,
+       { .hook = br_nf_forward_ip,
+         .owner = THIS_MODULE,
+         .pf = PF_BRIDGE,
+         .hooknum = NF_BR_FORWARD,
+         .priority = NF_BR_PRI_BRNF - 1, },
+       { .hook = br_nf_forward_arp,
          .owner = THIS_MODULE,
          .pf = PF_BRIDGE,
          .hooknum = NF_BR_FORWARD,
@@ -724,6 +795,69 @@ static struct nf_hook_ops br_nf_ops[] = {
          .priority = NF_IP_PRI_FIRST, },
 };
 
+#ifdef CONFIG_SYSCTL
+static
+int brnf_sysctl_call_tables(ctl_table *ctl, int write, struct file * filp,
+                       void *buffer, size_t *lenp)
+{
+       int ret;
+
+       ret = proc_dointvec(ctl, write, filp, buffer, lenp);
+
+       if (write && *(int *)(ctl->data))
+               *(int *)(ctl->data) = 1;
+       return ret;
+}
+
+static ctl_table brnf_table[] = {
+       {
+               .ctl_name       = NET_BRIDGE_NF_CALL_ARPTABLES,
+               .procname       = "bridge-nf-call-arptables",
+               .data           = &brnf_call_arptables,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &brnf_sysctl_call_tables,
+       },
+       {
+               .ctl_name       = NET_BRIDGE_NF_CALL_IPTABLES,
+               .procname       = "bridge-nf-call-iptables",
+               .data           = &brnf_call_iptables,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &brnf_sysctl_call_tables,
+       },
+       {
+               .ctl_name       = NET_BRIDGE_NF_FILTER_VLAN_TAGGED,
+               .procname       = "bridge-nf-filter-vlan-tagged",
+               .data           = &brnf_filter_vlan_tagged,
+               .maxlen         = sizeof(int),
+               .mode           = 0644,
+               .proc_handler   = &brnf_sysctl_call_tables,
+       },
+       { .ctl_name = 0 }
+};
+
+static ctl_table brnf_bridge_table[] = {
+       {
+               .ctl_name       = NET_BRIDGE,
+               .procname       = "bridge",
+               .mode           = 0555,
+               .child          = brnf_table,
+       },
+       { .ctl_name = 0 }
+};
+
+static ctl_table brnf_net_table[] = {
+       {
+               .ctl_name       = CTL_NET,
+               .procname       = "net",
+               .mode           = 0555,
+               .child          = brnf_bridge_table,
+       },
+       { .ctl_name = 0 }
+};
+#endif
+
 int br_netfilter_init(void)
 {
        int i;
@@ -740,6 +874,16 @@ int br_netfilter_init(void)
                return ret;
        }
 
+#ifdef CONFIG_SYSCTL
+       brnf_sysctl_header = register_sysctl_table(brnf_net_table, 0);
+       if (brnf_sysctl_header == NULL) {
+               printk(KERN_WARNING "br_netfilter: can't register to sysctl.\n");
+               for (i = 0; i < ARRAY_SIZE(br_nf_ops); i++)
+                       nf_unregister_hook(&br_nf_ops[i]);
+               return -EFAULT;
+       }
+#endif
+
        printk(KERN_NOTICE "Bridge firewalling registered\n");
 
        return 0;
@@ -751,4 +895,7 @@ void br_netfilter_fini(void)
 
        for (i = ARRAY_SIZE(br_nf_ops) - 1; i >= 0; i--)
                nf_unregister_hook(&br_nf_ops[i]);
+#ifdef CONFIG_SYSCTL
+       unregister_sysctl_table(brnf_sysctl_header);
+#endif
 }
index 4ed9e04..b0e9f66 100644 (file)
@@ -92,7 +92,7 @@ config BRIDGE_EBT_LIMIT
          equivalent of the iptables limit match.
 
          If you want to compile it as a module, say M here and read
-         <file:Documentation/modules.txt>.  If unsure, say `N'.
+         <file:Documentation/kbuild/modules.txt>.  If unsure, say `N'.
 
 config BRIDGE_EBT_MARK
        tristate "ebt: mark filter support"
index 47fff21..30cba1e 100644 (file)
@@ -1543,7 +1543,7 @@ static inline int __handle_bridge(struct sk_buff *skb,
                        struct packet_type **pt_prev, int *ret)
 {
 #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
-       if (skb->dev->br_port) {
+       if (skb->dev->br_port && skb->pkt_type != PACKET_LOOPBACK) {
                *ret = handle_bridge(skb, *pt_prev);
                if (br_handle_frame_hook(skb) == 0)
                        return 1;
index 47ff1bd..4b194b6 100644 (file)
@@ -98,7 +98,7 @@ static int neigh_blackhole(struct sk_buff *skb)
 /*
  * It is random distribution in the interval (1/2)*base...(3/2)*base.
  * It corresponds to default IPv6 settings and is not overridable,
- * because it is really reasonbale choice.
+ * because it is really reasonable choice.
  */
 
 unsigned long neigh_rand_reach_time(unsigned long base)
@@ -120,7 +120,7 @@ static int neigh_forced_gc(struct neigh_table *tbl)
                while ((n = *np) != NULL) {
                        /* Neighbour record may be discarded if:
                           - nobody refers to it.
-                          - it is not premanent
+                          - it is not permanent
                           - (NEW and probably wrong)
                             INCOMPLETE entries are kept at least for
                             n->parms->retrans_time, otherwise we could
@@ -510,7 +510,7 @@ static void neigh_suspect(struct neighbour *neigh)
 {
        struct hh_cache *hh;
 
-       NEIGH_PRINTK2("neigh %p is suspecteded.\n", neigh);
+       NEIGH_PRINTK2("neigh %p is suspected.\n", neigh);
 
        neigh->output = neigh->ops->output;
 
@@ -537,7 +537,7 @@ static void neigh_connect(struct neighbour *neigh)
 
 /*
    Transitions NUD_STALE <-> NUD_REACHABLE do not occur
-   when fast path is built: we have no timers assotiated with
+   when fast path is built: we have no timers associated with
    these states, we do not have time to check state when sending.
    neigh_periodic_timer check periodically neigh->confirmed
    time and moves NUD_REACHABLE -> NUD_STALE.
@@ -962,7 +962,7 @@ static void neigh_hh_init(struct neighbour *n, struct dst_entry *dst,
 
 /* This function can be used in contexts, where only old dev_queue_xmit
    worked, f.e. if you want to override normal output path (eql, shaper),
-   but resoltution is not made yet.
+   but resolution is not made yet.
  */
 
 int neigh_compat_output(struct sk_buff *skb)
@@ -1518,6 +1518,7 @@ struct neigh_sysctl_table {
                        .maxlen         = sizeof(int),
                        .mode           = 0644,
                        .proc_handler   = &proc_dointvec_jiffies,
+                       .strategy       = &sysctl_jiffies,
                },
                {
                        .ctl_name       = NET_NEIGH_DELAY_PROBE_TIME,
@@ -1525,6 +1526,7 @@ struct neigh_sysctl_table {
                        .maxlen         = sizeof(int),
                        .mode           = 0644,
                        .proc_handler   = &proc_dointvec_jiffies,
+                       .strategy       = &sysctl_jiffies,
                },
                {
                        .ctl_name       = NET_NEIGH_GC_STALE_TIME,
@@ -1532,6 +1534,7 @@ struct neigh_sysctl_table {
                        .maxlen         = sizeof(int),
                        .mode           = 0644,
                        .proc_handler   = &proc_dointvec_jiffies,
+                       .strategy       = &sysctl_jiffies,
                },
                {
                        .ctl_name       = NET_NEIGH_UNRES_QLEN,
@@ -1574,6 +1577,7 @@ struct neigh_sysctl_table {
                        .maxlen         = sizeof(int),
                        .mode           = 0644,
                        .proc_handler   = &proc_dointvec_jiffies,
+                       .strategy       = &sysctl_jiffies,
                },
                {
                        .ctl_name       = NET_NEIGH_GC_THRESH1,
index 9d51516..d549d51 100644 (file)
@@ -1119,6 +1119,31 @@ void sock_init_data(struct socket *sock, struct sock *sk)
        atomic_set(&sk->sk_refcnt, 1);
 }
 
+void lock_sock(struct sock *sk)
+{
+       might_sleep();
+       spin_lock_bh(&(sk->sk_lock.slock));
+       if (sk->sk_lock.owner)
+               __lock_sock(sk);
+       sk->sk_lock.owner = (void *)1;
+       spin_unlock_bh(&(sk->sk_lock.slock));
+}
+
+EXPORT_SYMBOL(lock_sock);
+
+void release_sock(struct sock *sk)
+{
+       spin_lock_bh(&(sk->sk_lock.slock));
+       if (sk->sk_backlog.tail)
+               __release_sock(sk);
+       sk->sk_lock.owner = NULL;
+        if (waitqueue_active(&(sk->sk_lock.wq)))
+               wake_up(&(sk->sk_lock.wq));
+       spin_unlock_bh(&(sk->sk_lock.slock));
+}
+
+EXPORT_SYMBOL(release_sock);
+
 EXPORT_SYMBOL(__lock_sock);
 EXPORT_SYMBOL(__release_sock);
 EXPORT_SYMBOL(sk_alloc);
index 46c0c78..642ef77 100644 (file)
@@ -146,7 +146,8 @@ ctl_table core_table[] = {
                .data           = &net_msg_cost,
                .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = &proc_dointvec_jiffies
+               .proc_handler   = &proc_dointvec_jiffies,
+               .strategy       = &sysctl_jiffies,
        },
        {
                .ctl_name       = NET_CORE_MSG_BURST,
@@ -154,7 +155,8 @@ ctl_table core_table[] = {
                .data           = &net_msg_burst,
                .maxlen         = sizeof(int),
                .mode           = 0644,
-               .proc_handler   = &proc_dointvec_jiffies
+               .proc_handler   = &proc_dointvec_jiffies,
+               .strategy       = &sysctl_jiffies,
        },
        {
                .ctl_name       = NET_CORE_OPTMEM_MAX,
index dbf4b46..ce9eb8a 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/random.h>
 #include <net/icmp.h>
 #include <net/udp.h>
-#include <asm/checksum.h>
 
 #define MAX_SG_ONSTACK 4
 
@@ -326,15 +325,7 @@ int esp_input(struct xfrm_state *x, struct xfrm_decap_state *decap, struct sk_bu
                skb->h.raw = skb_pull(skb, sizeof(struct ip_esp_hdr) + esp->conf.ivlen);
                skb->nh.raw += encap_len + sizeof(struct ip_esp_hdr) + esp->conf.ivlen;
                memcpy(skb->nh.raw, workbuf, iph->ihl*4);
-               iph = skb->nh.iph;
-               iph->tot_len = htons(skb->len + (skb->data - skb->nh.raw));
-               iph->check = 0;
-               iph->check = ip_fast_csum(skb->nh.raw, iph->ihl);
-               {
-                       unsigned char *oldmac = skb->mac.raw;
-                       skb->mac.raw += encap_len + sizeof(struct ip_esp_hdr) + esp -> conf.ivlen;
-                       memmove(skb->mac.raw, oldmac, skb->nh.raw - skb->mac.raw);
-               }
+               skb->nh.iph->tot_len = htons(skb->len);
        }
 
        return 0;
index 44f1dff..04e792b 100644 (file)
@@ -417,6 +417,7 @@ static void ip_copy_metadata(struct sk_buff *to, struct sk_buff *from)
        to->nfct = from->nfct;
        nf_conntrack_get(to->nfct);
 #ifdef CONFIG_BRIDGE_NETFILTER
+       nf_bridge_put(to->nf_bridge);
        to->nf_bridge = from->nf_bridge;
        nf_bridge_get(to->nf_bridge);
 #endif
index 3e03fe2..eda86a2 100644 (file)
@@ -91,8 +91,10 @@ static struct recent_ip_tables *r_tables = NULL;
  */
 static spinlock_t recent_lock = SPIN_LOCK_UNLOCKED;
 
+#ifdef CONFIG_PROC_FS
 /* Our /proc/net/ipt_recent entry */
 static struct proc_dir_entry *proc_net_ipt_recent = NULL;
+#endif
 
 /* Function declaration for later. */
 static int
@@ -959,8 +961,10 @@ static int __init init(void)
        int count;
 
        printk(version);
+#ifdef CONFIG_PROC_FS
        proc_net_ipt_recent = proc_mkdir("ipt_recent",proc_net);
        if(!proc_net_ipt_recent) return -ENOMEM;
+#endif
 
        if(ip_list_hash_size && ip_list_hash_size <= ip_list_tot) {
          printk(KERN_WARNING RECENT_NAME ": ip_list_hash_size too small, resetting to default.\n");
index e369c02..9040408 100644 (file)
@@ -93,19 +93,6 @@ int xfrm4_rcv_encap(struct sk_buff *skb, __u16 encap_type)
                iph = skb->nh.iph;
 
                if (x->props.mode) {
-                       if (iph->protocol == 0xfe) {
-                               skb_push(skb, skb->data - skb->nh.raw);
-                               if (!(skb->dev->flags&IFF_LOOPBACK)){
-                                       dst_release(skb->dst);
-                                       skb->dst = NULL;
-                               }
-                               if (skb->sp) {
-                                       secpath_put(skb->sp);
-                                       skb->sp = NULL;
-                               }
-                       netif_rx(skb);
-                       return 0;
-                       }
                        if (iph->protocol != IPPROTO_IPIP)
                                goto drop;
                        skb->nh.raw = skb->data;
index b08ba41..0d4b168 100644 (file)
@@ -2946,6 +2946,7 @@ static struct addrconf_sysctl_table
                        .maxlen         =       sizeof(int),
                        .mode           =       0644,
                        .proc_handler   =       &proc_dointvec_jiffies,
+                       .strategy       =       &sysctl_jiffies,
                },
                {
                        .ctl_name       =       NET_IPV6_RTR_SOLICIT_DELAY,
@@ -2954,6 +2955,7 @@ static struct addrconf_sysctl_table
                        .maxlen         =       sizeof(int),
                        .mode           =       0644,
                        .proc_handler   =       &proc_dointvec_jiffies,
+                       .strategy       =       &sysctl_jiffies,
                },
 #ifdef CONFIG_IPV6_PRIVACY
                {
index fab4283..d7d37e7 100644 (file)
@@ -877,6 +877,7 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from)
        to->nfct = from->nfct;
        nf_conntrack_get(to->nfct);
 #ifdef CONFIG_BRIDGE_NETFILTER
+       nf_bridge_put(to->nf_bridge);
        to->nf_bridge = from->nf_bridge;
        nf_bridge_get(to->nf_bridge);
 #endif
index 7ce6138..f2e7c8b 100644 (file)
@@ -75,6 +75,9 @@
 #include <net/checksum.h>
 #include <linux/proc_fs.h>
 
+#include <linux/netfilter.h>
+#include <linux/netfilter_ipv6.h>
+
 static struct socket *ndisc_socket;
 
 static u32 ndisc_hash(const void *pkey, const struct net_device *dev);
@@ -207,9 +210,8 @@ static struct ndisc_options *ndisc_parse_options(u8 *opt, int opt_len,
                case ND_OPT_MTU:
                case ND_OPT_REDIRECT_HDR:
                        if (ndopts->nd_opt_array[nd_opt->nd_opt_type]) {
-                               ND_PRINTK2((KERN_WARNING
-                                           "ndisc_parse_options(): duplicated ND6 option found: type=%d\n",
-                                           nd_opt->nd_opt_type));
+                               ND_PRINTK2("ndisc_parse_options(): duplicated ND6 option found: type=%d\n",
+                                           nd_opt->nd_opt_type);
                        } else {
                                ndopts->nd_opt_array[nd_opt->nd_opt_type] = nd_opt;
                        }
@@ -498,10 +500,11 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh,
 
        skb->dst = dst;
        idev = in6_dev_get(dst->dev);
-       dst_output(skb);
-
-       ICMP6_INC_STATS(idev, Icmp6OutNeighborAdvertisements);
-       ICMP6_INC_STATS(idev, Icmp6OutMsgs);
+       err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, dst_output);
+       if (!err) {
+               ICMP6_INC_STATS(idev, Icmp6OutNeighborAdvertisements);
+               ICMP6_INC_STATS(idev, Icmp6OutMsgs);
+       }
 
        if (likely(idev != NULL))
                in6_dev_put(idev);
@@ -577,10 +580,11 @@ void ndisc_send_ns(struct net_device *dev, struct neighbour *neigh,
        /* send it! */
        skb->dst = dst;
        idev = in6_dev_get(dst->dev);
-       dst_output(skb);
-
-       ICMP6_INC_STATS(idev, Icmp6OutNeighborSolicits);
-       ICMP6_INC_STATS(idev, Icmp6OutMsgs);
+       err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, dst_output);
+       if (!err) {
+               ICMP6_INC_STATS(idev, Icmp6OutNeighborSolicits);
+               ICMP6_INC_STATS(idev, Icmp6OutMsgs);
+       }
 
        if (likely(idev != NULL))
                in6_dev_put(idev);
@@ -619,6 +623,7 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr,
                                  1, &err);
        if (skb == NULL) {
                ND_PRINTK1("send_ns: alloc skb failed\n");
+               dst_release(dst);
                return;
        }
 
@@ -644,10 +649,11 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr,
        /* send it! */
        skb->dst = dst;
        idev = in6_dev_get(dst->dev);
-       dst_output(skb);
-
-       ICMP6_INC_STATS(idev, Icmp6OutRouterSolicits);
-       ICMP6_INC_STATS(idev, Icmp6OutMsgs);
+       err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, skb, NULL, dst->dev, dst_output);
+       if (!err) {
+               ICMP6_INC_STATS(idev, Icmp6OutRouterSolicits);
+               ICMP6_INC_STATS(idev, Icmp6OutMsgs);
+       }
 
        if (likely(idev != NULL))
                in6_dev_put(idev);
@@ -1166,9 +1172,7 @@ static void ndisc_router_discovery(struct sk_buff *skb)
                                ND_PRINTK0("NDISC: router announcement with mtu = %d\n",
                                           mtu);
                        }
-               }
-
-               if (in6_dev->cnf.mtu6 != mtu) {
+               } else if (in6_dev->cnf.mtu6 != mtu) {
                        in6_dev->cnf.mtu6 = mtu;
 
                        if (rt)
@@ -1406,10 +1410,11 @@ void ndisc_send_redirect(struct sk_buff *skb, struct neighbour *neigh,
 
        buff->dst = dst;
        idev = in6_dev_get(dst->dev);
-       dst_output(buff);
-
-       ICMP6_INC_STATS(idev, Icmp6OutRedirects);
-       ICMP6_INC_STATS(idev, Icmp6OutMsgs);
+       err = NF_HOOK(PF_INET6, NF_IP6_LOCAL_OUT, buff, NULL, dst->dev, dst_output);
+       if (!err) {
+               ICMP6_INC_STATS(idev, Icmp6OutRedirects);
+               ICMP6_INC_STATS(idev, Icmp6OutMsgs);
+       }
 
        if (likely(idev != NULL))
                in6_dev_put(idev);
index 38a6f9a..97373b8 100644 (file)
@@ -532,7 +532,7 @@ static int nr_release(struct socket *sock)
                sk->sk_state    = TCP_CLOSE;
                sk->sk_shutdown |= SEND_SHUTDOWN;
                sk->sk_state_change(sk);
-               sock_set_flag(sk, SOCK_DEAD);
+               sock_orphan(sk);
                sock_set_flag(sk, SOCK_DESTROY);
                sk->sk_socket   = NULL;
                break;
@@ -727,6 +727,8 @@ static int nr_connect(struct socket *sock, struct sockaddr *uaddr,
                                lock_sock(sk);
                                continue;
                        }
+                       current->state = TASK_RUNNING;
+                       remove_wait_queue(sk->sk_sleep, &wait);
                        return -ERESTARTSYS;
                }
                current->state = TASK_RUNNING;
@@ -780,13 +782,18 @@ static int nr_accept(struct socket *sock, struct socket *newsock, int flags)
 
                current->state = TASK_INTERRUPTIBLE;
                release_sock(sk);
-               if (flags & O_NONBLOCK)
+               if (flags & O_NONBLOCK) {
+                       current->state = TASK_RUNNING;
+                       remove_wait_queue(sk->sk_sleep, &wait);
                        return -EWOULDBLOCK;
+               }
                if (!signal_pending(tsk)) {
                        schedule();
                        lock_sock(sk);
                        continue;
                }
+               current->state = TASK_RUNNING;
+               remove_wait_queue(sk->sk_sleep, &wait);
                return -ERESTARTSYS;
        }
        current->state = TASK_RUNNING;
@@ -1377,7 +1384,7 @@ static int __init nr_proto_init(void)
 {
        int i;
 
-       if (nr_ndevs > 0x7fffffff/sizeof(struct net_device)) {
+       if (nr_ndevs > 0x7fffffff/sizeof(struct net_device *)) {
                printk(KERN_ERR "NET/ROM: nr_proto_init - nr_ndevs parameter to large\n");
                return -1;
        }
@@ -1405,6 +1412,7 @@ static int __init nr_proto_init(void)
                dev->base_addr = i;
                if (register_netdev(dev)) {
                        printk(KERN_ERR "NET/ROM: nr_proto_init - unable to register network device\n");
+                       free_netdev(dev);
                        goto fail;
                }
                dev_nr[i] = dev;
@@ -1433,8 +1441,10 @@ static int __init nr_proto_init(void)
        return 0;
 
  fail:
-       while (--i >= 0)
+       while (--i >= 0) {
                unregister_netdev(dev_nr[i]);
+               free_netdev(dev_nr[i]);
+       }
        kfree(dev_nr);
        return -1;
 }
@@ -1474,8 +1484,10 @@ static void __exit nr_exit(void)
 
        for (i = 0; i < nr_ndevs; i++) {
                struct net_device *dev = dev_nr[i];
-               if (dev) 
+               if (dev) {
                        unregister_netdev(dev);
+                       free_netdev(dev);
+               }
        }
 
        kfree(dev_nr);
index a86beca..ffe06bf 100644 (file)
@@ -204,7 +204,6 @@ void nr_setup(struct net_device *dev)
        dev->hard_start_xmit    = nr_xmit;
        dev->open               = nr_open;
        dev->stop               = nr_close;
-       dev->destructor         = free_netdev;
 
        dev->hard_header        = nr_header;
        dev->hard_header_len    = NR_NETWORK_LEN + NR_TRANSPORT_LEN;
index f048d6d..146159e 100644 (file)
@@ -246,6 +246,10 @@ static int packet_rcv_spkt(struct sk_buff *skb, struct net_device *dev,  struct
        if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL)
                goto oom;
 
+       /* drop any routing info */
+       dst_release(skb->dst);
+       skb->dst = NULL;
+
        spkt = (struct sockaddr_pkt*)skb->cb;
 
        skb_push(skb, skb->data-skb->mac.raw);
@@ -486,6 +490,9 @@ static int packet_rcv(struct sk_buff *skb, struct net_device *dev,  struct packe
 
        skb_set_owner_r(skb, sk);
        skb->dev = NULL;
+       dst_release(skb->dst);
+       skb->dst = NULL;
+
        spin_lock(&sk->sk_receive_queue.lock);
        po->stats.tp_packets++;
        __skb_queue_tail(&sk->sk_receive_queue, skb);
index 7d4f138..71a639d 100644 (file)
@@ -359,7 +359,7 @@ void rose_destroy_socket(struct sock *sk)
                sk->sk_timer.data     = (unsigned long)sk;
                add_timer(&sk->sk_timer);
        } else
-               sk_free(sk);
+               sock_put(sk);
 }
 
 /*
@@ -634,7 +634,6 @@ static int rose_release(struct socket *sock)
        }
 
        sock->sk = NULL;
-       sk->sk_socket = NULL;   /* Not used, but we should do this. **/
 
        return 0;
 }
@@ -813,6 +812,8 @@ static int rose_connect(struct socket *sock, struct sockaddr *uaddr, int addr_le
                                schedule();
                                continue;
                        }
+                       current->state = TASK_RUNNING;
+                       remove_wait_queue(sk->sk_sleep, &wait);
                        return -ERESTARTSYS;
                }
                current->state = TASK_RUNNING;
@@ -864,8 +865,11 @@ static int rose_accept(struct socket *sock, struct socket *newsock, int flags)
 
                current->state = TASK_INTERRUPTIBLE;
                release_sock(sk);
-               if (flags & O_NONBLOCK)
+               if (flags & O_NONBLOCK) {
+                       current->state = TASK_RUNNING;
+                       remove_wait_queue(sk->sk_sleep, &wait);
                        return -EWOULDBLOCK;
+               }
                if (!signal_pending(tsk)) {
                        schedule();
                        lock_sock(sk);
@@ -1482,7 +1486,7 @@ static int __init rose_proto_init(void)
 
        rose_callsign = null_ax25_address;
 
-       if (rose_ndevs > 0x7FFFFFFF/sizeof(struct net_device)) {
+       if (rose_ndevs > 0x7FFFFFFF/sizeof(struct net_device *)) {
                printk(KERN_ERR "ROSE: rose_proto_init - rose_ndevs parameter to large\n");
                return -1;
        }
@@ -1503,23 +1507,14 @@ static int __init rose_proto_init(void)
                                   name, rose_setup);
                if (!dev) {
                        printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate memory\n");
-                       while (--i >= 0)
-                               kfree(dev_rose[i]);
-                       return -ENOMEM;
+                       goto fail;
                }
-               dev_rose[i] = dev;
-       }
-
-       for (i = 0; i < rose_ndevs; i++) {
-               if (register_netdev(dev_rose[i])) {
+               if (register_netdev(dev)) {
                        printk(KERN_ERR "ROSE: netdevice regeistration failed\n");
-                       while (--i >= 0) {
-                               unregister_netdev(dev_rose[i]);
-                               kfree(dev_rose[i]);
-                               return -EIO;
-                       }
+                       free_netdev(dev);
+                       goto fail;
                }
-                       
+               dev_rose[i] = dev;
        }
 
        sock_register(&rose_family_ops);
@@ -1542,6 +1537,13 @@ static int __init rose_proto_init(void)
        proc_net_fops_create("rose_routes", S_IRUGO, &rose_routes_fops);
 
        return 0;
+fail:
+       while (--i >= 0) {
+               unregister_netdev(dev_rose[i]);
+               free_netdev(dev_rose[i]);
+       }
+       kfree(dev_rose);
+       return -ENOMEM;
 }
 module_init(rose_proto_init);
 
index 78fa65d..f50691d 100644 (file)
@@ -247,10 +247,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
                        *back = tp->next;
                        spin_unlock_bh(&dev->queue_lock);
                        write_unlock(&qdisc_tree_lock);
-
-                       tp->ops->destroy(tp);
-                       module_put(tp->ops->owner);
-                       kfree(tp);
+                       tcf_destroy(tp);
                        err = 0;
                        goto errout;
                }
index a6d9728..8dfaf3f 100644 (file)
@@ -162,7 +162,7 @@ static void destroy_filters(struct atm_flow_data *flow)
        while ((filter = flow->filter_list)) {
                DPRINTK("destroy_filters: destroying filter %p\n",filter);
                flow->filter_list = filter->next;
-               filter->ops->destroy(filter);
+               tcf_destroy(filter);
        }
 }
 
index d30c5f3..fad828b 100644 (file)
@@ -1705,7 +1705,7 @@ static void cbq_destroy_filters(struct cbq_class *cl)
 
        while ((tp = cl->filter_list) != NULL) {
                cl->filter_list = tp->next;
-               tp->ops->destroy(tp);
+               tcf_destroy(tp);
        }
 }
 
index 2f4ed4c..4bbb60b 100644 (file)
@@ -752,7 +752,7 @@ csz_destroy(struct Qdisc* sch)
 
        while ((tp = q->filter_list) != NULL) {
                q->filter_list = tp->next;
-               tp->ops->destroy(tp);
+               tcf_destroy(tp);
        }
 }
 
index 8db0022..3470a40 100644 (file)
@@ -378,7 +378,7 @@ static void dsmark_destroy(struct Qdisc *sch)
        while (p->filter_list) {
                tp = p->filter_list;
                p->filter_list = tp->next;
-               tp->ops->destroy(tp);
+               tcf_destroy(tp);
        }
        qdisc_destroy(p->q);
        p->q = &noop_qdisc;
index 4cc5d5f..a3216cc 100644 (file)
@@ -1338,7 +1338,7 @@ static void htb_destroy_filters(struct tcf_proto **fl)
 
        while ((tp = *fl) != NULL) {
                *fl = tp->next;
-               tp->ops->destroy(tp);
+               tcf_destroy(tp);
        }
 }
 
index 5a63a85..71ecbcb 100644 (file)
@@ -292,7 +292,7 @@ static void ingress_destroy(struct Qdisc *sch)
        while (p->filter_list) {
                tp = p->filter_list;
                p->filter_list = tp->next;
-               tp->ops->destroy(tp);
+               tcf_destroy(tp);
        }
        memset(p, 0, sizeof(*p));
        p->filter_list = NULL;
index 7691f8a..6c76742 100644 (file)
@@ -162,7 +162,7 @@ prio_destroy(struct Qdisc* sch)
 
        while ((tp = q->filter_list) != NULL) {
                q->filter_list = tp->next;
-               tp->ops->destroy(tp);
+               tcf_destroy(tp);
        }
 
        for (prio=0; prio<q->bands; prio++) {
index e176e96..507f3dd 100644 (file)
        Note that the peak rate TBF is much more tough: with MTU 1500
        P_crit = 150Kbytes/sec. So, if you need greater peak
        rates, use alpha with HZ=1000 :-)
+
+       With classful TBF, limit is just kept for backwards compatibility.
+       It is passed to the default bfifo qdisc - if the inner qdisc is
+       changed the limit is not effective anymore.
 */
 
 struct tbf_sched_data
@@ -136,7 +140,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
        struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data;
        int ret;
 
-       if (skb->len > q->max_size || sch->stats.backlog + skb->len > q->limit) {
+       if (skb->len > q->max_size) {
                sch->stats.drops++;
 #ifdef CONFIG_NET_CLS_POLICE
                if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch))
@@ -152,7 +156,6 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch)
        }       
        
        sch->q.qlen++;
-       sch->stats.backlog += skb->len;
        sch->stats.bytes += skb->len;
        sch->stats.packets++;
        return 0;
@@ -163,10 +166,8 @@ static int tbf_requeue(struct sk_buff *skb, struct Qdisc* sch)
        struct tbf_sched_data *q = (struct tbf_sched_data *)sch->data;
        int ret;
        
-       if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0) {
+       if ((ret = q->qdisc->ops->requeue(skb, q->qdisc)) == 0)
                sch->q.qlen++; 
-               sch->stats.backlog += skb->len;
-       }
        
        return ret;
 }
@@ -178,7 +179,6 @@ static unsigned int tbf_drop(struct Qdisc* sch)
        
        if ((len = q->qdisc->ops->drop(q->qdisc)) != 0) {
                sch->q.qlen--;
-               sch->stats.backlog -= len;
                sch->stats.drops++;
        }
        return len;
@@ -224,7 +224,6 @@ static struct sk_buff *tbf_dequeue(struct Qdisc* sch)
                        q->t_c = now;
                        q->tokens = toks;
                        q->ptokens = ptoks;
-                       sch->stats.backlog -= len;
                        sch->q.qlen--;
                        sch->flags &= ~TCQ_F_THROTTLED;
                        return skb;
@@ -253,7 +252,6 @@ static struct sk_buff *tbf_dequeue(struct Qdisc* sch)
                if (q->qdisc->ops->requeue(skb, q->qdisc) != NET_XMIT_SUCCESS) {
                        /* When requeue fails skb is dropped */ 
                        sch->q.qlen--;
-                       sch->stats.backlog -= len;
                        sch->stats.drops++;
                }       
                
@@ -269,7 +267,6 @@ static void tbf_reset(struct Qdisc* sch)
 
        qdisc_reset(q->qdisc);
        sch->q.qlen = 0;
-       sch->stats.backlog = 0;
        PSCHED_GET_TIME(q->t_c);
        q->tokens = q->buffer;
        q->ptokens = q->mtu;
@@ -456,7 +453,6 @@ static int tbf_graft(struct Qdisc *sch, unsigned long arg, struct Qdisc *new,
        *old = xchg(&q->qdisc, new);
        qdisc_reset(*old);
        sch->q.qlen = 0;
-       sch->stats.backlog = 0;
        sch_tree_unlock(sch);
        
        return 0;
index dba3d14..44b30ef 100644 (file)
@@ -58,6 +58,7 @@
 #include <linux/in.h>
 #include <net/ipv6.h>
 #include <net/sctp/sctp.h>
+#include <net/sctp/sm.h>
 
 /* Forward declarations for internal functions. */
 static void sctp_assoc_bh_rcv(struct sctp_association *asoc);
index d26292a..dc4cb1a 100644 (file)
@@ -53,6 +53,7 @@
 #include <net/sock.h>    /* For skb_set_owner_w */
 
 #include <net/sctp/sctp.h>
+#include <net/sctp/sm.h>
 
 /* Declare internal functions here.  */
 static int sctp_acked(struct sctp_sackhdr *sack, __u32 tsn);
index 0ac8c9b..36b2ec1 100644 (file)
@@ -77,6 +77,7 @@
 #include <linux/socket.h> /* for sa_family_t */
 #include <net/sock.h>
 #include <net/sctp/sctp.h>
+#include <net/sctp/sm.h>
 
 /* WARNING:  Please do not remove the SCTP_STATIC attribute to
  * any of the functions below as they are used to export functions
index 485d770..026ffeb 100644 (file)
@@ -50,6 +50,7 @@
 
 #include <linux/types.h>
 #include <net/sctp/sctp.h>
+#include <net/sctp/sm.h>
 
 /* 1st Level Abstractions.  */
 
index 85f626d..0f97090 100644 (file)
@@ -19,6 +19,8 @@
 #include <linux/list.h>
 #include <linux/spinlock.h>
 #include <linux/workqueue.h>
+#include <linux/notifier.h>
+#include <linux/netdevice.h>
 #include <net/xfrm.h>
 #include <net/ip.h>
 
@@ -690,6 +692,8 @@ static inline int policy_to_flow_dir(int dir)
        };
 }
 
+static int stale_bundle(struct dst_entry *dst);
+
 /* Main function: finds/creates a bundle for given flow.
  *
  * At the moment we eat a raw IP route. Mostly to speed up lookups
@@ -814,10 +818,11 @@ restart:
                }
 
                write_lock_bh(&policy->lock);
-               if (unlikely(policy->dead)) {
+               if (unlikely(policy->dead || stale_bundle(dst))) {
                        /* Wow! While we worked on resolving, this
                         * policy has gone. Retry. It is not paranoia,
                         * we just cannot enlist new bundle to dead object.
+                        * We can't enlist stable bundles either.
                         */
                        write_unlock_bh(&policy->lock);
 
@@ -985,18 +990,27 @@ int __xfrm_route_forward(struct sk_buff *skb, unsigned short family)
 
 static struct dst_entry *xfrm_dst_check(struct dst_entry *dst, u32 cookie)
 {
+       if (!stale_bundle(dst))
+               return dst;
+
+       dst_release(dst);
+       return NULL;
+}
+
+static int stale_bundle(struct dst_entry *dst)
+{
        struct dst_entry *child = dst;
 
        while (child) {
                if (child->obsolete > 0 ||
+                   (child->dev && !netif_running(child->dev)) ||
                    (child->xfrm && child->xfrm->km.state != XFRM_STATE_VALID)) {
-                       dst_release(dst);
-                       return NULL;
+                       return 1;
                }
                child = child->child;
        }
 
-       return dst;
+       return 0;
 }
 
 static void xfrm_dst_destroy(struct dst_entry *dst)
@@ -1022,7 +1036,7 @@ static struct dst_entry *xfrm_negative_advice(struct dst_entry *dst)
        return dst;
 }
 
-static void __xfrm_garbage_collect(void)
+static void xfrm_prune_bundles(int (*func)(struct dst_entry *))
 {
        int i;
        struct xfrm_policy *pol;
@@ -1034,7 +1048,7 @@ static void __xfrm_garbage_collect(void)
                        write_lock(&pol->lock);
                        dstp = &pol->bundles;
                        while ((dst=*dstp) != NULL) {
-                               if (atomic_read(&dst->__refcnt) == 0) {
+                               if (func(dst)) {
                                        *dstp = dst->next;
                                        dst->next = gc_list;
                                        gc_list = dst;
@@ -1054,46 +1068,19 @@ static void __xfrm_garbage_collect(void)
        }
 }
 
-static int bundle_depends_on(struct dst_entry *dst, struct xfrm_state *x)
+static int unused_bundle(struct dst_entry *dst)
 {
-       do {
-               if (dst->xfrm == x)
-                       return 1;
-       } while ((dst = dst->child) != NULL);
-       return 0;
+       return !atomic_read(&dst->__refcnt);
 }
 
-int xfrm_flush_bundles(struct xfrm_state *x)
+static void __xfrm_garbage_collect(void)
 {
-       int i;
-       struct xfrm_policy *pol;
-       struct dst_entry *dst, **dstp, *gc_list = NULL;
-
-       read_lock_bh(&xfrm_policy_lock);
-       for (i=0; i<2*XFRM_POLICY_MAX; i++) {
-               for (pol = xfrm_policy_list[i]; pol; pol = pol->next) {
-                       write_lock(&pol->lock);
-                       dstp = &pol->bundles;
-                       while ((dst=*dstp) != NULL) {
-                               if (bundle_depends_on(dst, x)) {
-                                       *dstp = dst->next;
-                                       dst->next = gc_list;
-                                       gc_list = dst;
-                               } else {
-                                       dstp = &dst->next;
-                               }
-                       }
-                       write_unlock(&pol->lock);
-               }
-       }
-       read_unlock_bh(&xfrm_policy_lock);
-
-       while (gc_list) {
-               dst = gc_list;
-               gc_list = dst->next;
-               dst_free(dst);
-       }
+       xfrm_prune_bundles(unused_bundle);
+}
 
+int xfrm_flush_bundles(void)
+{
+       xfrm_prune_bundles(stale_bundle);
        return 0;
 }
 
@@ -1216,6 +1203,21 @@ void xfrm_policy_put_afinfo(struct xfrm_policy_afinfo *afinfo)
        read_unlock(&afinfo->lock);
 }
 
+static int xfrm_dev_event(struct notifier_block *this, unsigned long event, void *ptr)
+{
+       switch (event) {
+       case NETDEV_DOWN:
+               xfrm_flush_bundles();
+       }
+       return NOTIFY_DONE;
+}
+
+struct notifier_block xfrm_dev_notifier = {
+       xfrm_dev_event,
+       NULL,
+       0
+};
+
 void __init xfrm_policy_init(void)
 {
        xfrm_dst_cache = kmem_cache_create("xfrm_dst_cache",
@@ -1226,6 +1228,7 @@ void __init xfrm_policy_init(void)
                panic("XFRM: failed to allocate xfrm_dst_cache\n");
 
        INIT_WORK(&xfrm_policy_gc_work, xfrm_policy_gc_task, NULL);
+       register_netdevice_notifier(&xfrm_dev_notifier);
 }
 
 void __init xfrm_init(void)
index ab1c1ec..dc70df7 100644 (file)
@@ -219,7 +219,7 @@ static void __xfrm_state_delete(struct xfrm_state *x)
                 * there are DSTs attached to this xfrm_state.
                 */
                if (atomic_read(&x->refcnt) > 2)
-                       xfrm_flush_bundles(x);
+                       xfrm_flush_bundles();
 
                /* All xfrm_state objects are created by one of two possible
                 * paths:
index 74582d6..badd186 100644 (file)
@@ -228,16 +228,15 @@ cmd_gzip = gzip -f -9 < $< > $@
 # >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file
 # note: when using inline perl scripts [perl -e '...$$t=1;...'] in $(cmd_xxx) double $$ your perl vars
 
-exec_cmd = @set -e; \
-       $(if $($(quiet)cmd_$(1)),echo '  $(subst ','\'',$($(quiet)cmd_$(1)))';) \
-       $(cmd_$(1))
-
 if_changed = $(if $(strip $? \
                          $(filter-out $(cmd_$(1)),$(cmd_$@))\
                          $(filter-out $(cmd_$@),$(cmd_$(1)))),\
-       $(call exec_cmd,$(1)); \
+       @set -e; \
+       $(if $($(quiet)cmd_$(1)),echo '  $(subst ','\'',$($(quiet)cmd_$(1)))';) \
+       $(cmd_$(1)); \
        echo 'cmd_$@ := $(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).cmd)
 
+
 # execute the command and also postprocess generated .d dependencies
 # file
 
index 6ff57f7..f1867d3 100644 (file)
@@ -52,16 +52,10 @@ $(modules:.ko=.mod.c): __modpost ;
 # Extract all checksums for all exported symbols
 
 quiet_cmd_modpost = MODPOST
-ifeq ($(origin SUBDIRS),command line)
-      cmd_modpost = scripts/modpost $(filter-out FORCE,$^) \
-                                   $(if $(wildcard modversions),-i modversions)
-__modpost: $(modules:.ko=.o)
-       $(call exec_cmd,modpost)
-else
-      cmd_modpost = scripts/modpost $(filter-out FORCE,$^) -o modversions
+      cmd_modpost = scripts/modpost $(filter-out FORCE,$^)
+
 __modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE
        $(call if_changed,modpost)
-endif
 
 targets += __modpost
 
index 08da496..7dee8c9 100644 (file)
@@ -175,7 +175,7 @@ int conf_string(struct menu *menu)
                        break;
                case '?':
                        /* print help */
-                       if (line[1] == 0) {
+                       if (line[1] == '\n') {
                                help = nohelp_text;
                                if (menu->sym->help)
                                        help = menu->sym->help;
index 16e117d..1fa4d03 100644 (file)
@@ -1172,7 +1172,7 @@ on_treeview1_button_press_event(GtkWidget * widget,
 
        gtk_widget_realize(tree2_w);
        gtk_tree_view_set_cursor(view, path, NULL, FALSE);
-       gtk_widget_grab_focus(GTK_TREE_VIEW(tree2_w));
+       gtk_widget_grab_focus(GTK_WIDGET(tree2_w));
 
        return FALSE;
 }
index ecf5541..ed23df2 100644 (file)
@@ -27,8 +27,8 @@ static void print_line (WINDOW * win, int row, int width);
 static char *get_line (void);
 static void print_position (WINDOW * win, int height, int width);
 
-static int hscroll = 0, fd, file_size, bytes_read;
-static int begin_reached = 1, end_reached = 0, page_length;
+static int hscroll, fd, file_size, bytes_read;
+static int begin_reached = 1, end_reached, page_length;
 static char *buf, *page;
 
 /*
index 841512d..e1ecb50 100755 (executable)
@@ -9,7 +9,7 @@
 #      Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
 #
 # That's the voodoo to see if it's a x86.
-ISX86=`arch | grep -ie i.86`
+ISX86=`echo ${ARCH:=\`arch\`} | grep -ie i.86`
 if [ ! -z $ISX86 ]; then
        PC=1
 else
index 9897935..0b6d7df 100644 (file)
@@ -14,9 +14,9 @@
 #include "modpost.h"
 
 /* Are we using CONFIG_MODVERSIONS? */
-int modversions_enabled = 0;
-/* Warn about undefined symbols? */
-int report_undefined_symbols = 0;
+int modversions = 0;
+/* Do we have vmlinux? */
+int have_vmlinux = 0;
 
 void
 fatal(const char *fmt, ...)
@@ -60,17 +60,6 @@ void *do_nofail(void *ptr, const char *file, int line, const char *expr)
 static struct module *modules;
 
 struct module *
-find_module(char *modname)
-{
-       struct module *mod;
-
-       for (mod = modules; mod; mod = mod->next)
-               if (strcmp(mod->name, modname) == 0)
-                       break;
-       return mod;
-}
-
-struct module *
 new_module(char *modname)
 {
        struct module *mod;
@@ -176,7 +165,7 @@ add_exported_symbol(const char *name, struct module *module, unsigned int *crc)
        struct symbol *s = find_symbol(name);
 
        if (!s) {
-               new_symbol(name, module, crc);
+               new_symbol(name, modules, crc);
                return;
        }
        if (crc) {
@@ -297,7 +286,7 @@ handle_modversions(struct module *mod, struct elf_info *info,
                        crc = (unsigned int) sym->st_value;
                        add_exported_symbol(symname + strlen(CRC_PFX),
                                            mod, &crc);
-                       modversions_enabled = 1;
+                       modversions = 1;
                }
                break;
        case SHN_UNDEF:
@@ -335,6 +324,19 @@ handle_modversions(struct module *mod, struct elf_info *info,
        }
 }
 
+int
+is_vmlinux(const char *modname)
+{
+       const char *myname;
+
+       if ((myname = strrchr(modname, '/')))
+               myname++;
+       else
+               myname = modname;
+
+       return strcmp(myname, "vmlinux") == 0;
+}
+
 void
 read_symbols(char *modname)
 {
@@ -344,17 +346,14 @@ read_symbols(char *modname)
        struct symbol *s;
        Elf_Sym *sym;
 
+       /* When there's no vmlinux, don't print warnings about
+        * unresolved symbols (since there'll be too many ;) */
+       have_vmlinux = is_vmlinux(modname);
+
        parse_elf(&info, modname);
 
        mod = new_module(modname);
 
-       /* When we have vmlinux, print warnings about unresolved
-        * symbols. (Otherwise, there might be too many). */
-       if (strcmp(modname, "vmlinux") == 0) {
-               report_undefined_symbols = 1;
-               mod->skip = 1;
-       }
-
        for (sym = info.symtab_start; sym < info.symtab_stop; sym++) {
                symname = info.strtab + sym->st_name;
 
@@ -367,7 +366,7 @@ read_symbols(char *modname)
         * never passed as an argument to an exported function, so
         * the automatic versioning doesn't pick it up, but it's really
         * important anyhow */
-       if (modversions_enabled) {
+       if (modversions) {
                s = alloc_symbol("struct_module");
                /* add to list */
                s->next = mod->unres;
@@ -432,7 +431,7 @@ add_versions(struct buffer *b, struct module *mod)
        for (s = mod->unres; s; s = s->next) {
                exp = find_symbol(s->name);
                if (!exp || exp->module == mod) {
-                       if (report_undefined_symbols)
+                       if (have_vmlinux)
                                fprintf(stderr, "*** Warning: \"%s\" [%s.ko] "
                                "undefined!\n", s->name, mod->name);
                        continue;
@@ -442,7 +441,7 @@ add_versions(struct buffer *b, struct module *mod)
                s->crc = exp->crc;
        }
 
-       if (!modversions_enabled)
+       if (!modversions)
                return;
 
        buf_printf(b, "\n");
@@ -473,10 +472,7 @@ add_depends(struct buffer *b, struct module *mod, struct module *modules)
        int first = 1;
 
        for (m = modules; m; m = m->next) {
-               if (strcmp(m->name, "vmlinux") == 0)
-                       m->seen = 1;
-               else 
-                       m->seen = 0;
+               m->seen = is_vmlinux(m->name);
        }
 
        buf_printf(b, "\n");
@@ -544,91 +540,19 @@ write_if_changed(struct buffer *b, const char *fname)
        fclose(file);
 }
 
-void
-read_dump(FILE *file)
-{
-       unsigned int crc;
-       char symname[128], modname[4096];
-
-       while (fscanf(file, "%x %128s %4096s", &crc, symname, modname) == 3) {
-               struct module *mod;
-               if (!(mod = find_module(modname))) {
-                       mod = new_module(NOFAIL(strdup(modname)));
-                       mod->skip = 1;
-               }
-               add_exported_symbol(symname, mod, &crc);
-       }
-       if (!feof(file)) {
-               fatal("parse error in symbol dump file\n");
-       }
-}
-
-void
-write_dump(FILE *file)
-{
-       struct symbol *symbol;
-       int n;
-
-       for (n = 0; n < SYMBOL_HASH_SIZE ; n++) {
-               symbol = symbolhash[n];
-               while (symbol) {
-                       symbol = symbol->next;
-               }
-       }
-
-       for (n = 0; n < SYMBOL_HASH_SIZE ; n++) {
-               symbol = symbolhash[n];
-               while (symbol) {
-                       fprintf(file, "0x%08x\t%s\t%s\n", symbol->crc,
-                               symbol->name, symbol->module->name);
-                       symbol = symbol->next;
-               }
-       }
-}
-
 int
 main(int argc, char **argv)
 {
        struct module *mod;
        struct buffer buf = { };
        char fname[SZ];
-       char *read_dumpfile = NULL, *write_dumpfile = NULL;
-       int opt;
-
-       while ((opt = getopt(argc, argv, "i:o:")) != -1) {
-               switch(opt) {
-                       case 'i':
-                               read_dumpfile = optarg;
-                               modversions_enabled = 1;
-                               report_undefined_symbols = 1;
-                               break;
-                       case 'o':
-                               write_dumpfile = optarg;
-                               break;
-                       default:
-                               exit(1);
-               }
-       }
-
-       if (read_dumpfile) {
-               FILE *file = fopen(read_dumpfile, "r");
-               if (!file) {
-                       perror(read_dumpfile);
-                       exit(1);
-               }
-               read_dump(file);
-               if (fclose(file) != 0) {
-                       perror(read_dumpfile);
-                       exit(1);
-               }
-       }
 
-       while (optind < argc) {
-               read_symbols(argv[optind++]);
+       for (; argv[1]; argv++) {
+               read_symbols(argv[1]);
        }
 
        for (mod = modules; mod; mod = mod->next) {
-               if (mod->skip)
+               if (is_vmlinux(mod->name))
                        continue;
 
                buf.pos = 0;
@@ -641,20 +565,6 @@ main(int argc, char **argv)
                sprintf(fname, "%s.mod.c", mod->name);
                write_if_changed(&buf, fname);
        }
-
-       if (write_dumpfile) {
-               FILE *file = fopen(write_dumpfile, "w");
-               if (!file) {
-                       perror(write_dumpfile);
-                       exit(1);
-               }
-               write_dump(file);
-               if (fclose(file) != 0) {
-                       perror(write_dumpfile);
-                       exit(1);
-               }
-       }
-
        return 0;
 }
 
index a931f4f..5861081 100644 (file)
@@ -70,7 +70,6 @@ struct module {
        const char *name;
        struct symbol *unres;
        int seen;
-       int skip;
        struct buffer dev_table_buf;
 };
 
index e9301f2..9ce5b79 100644 (file)
@@ -1515,7 +1515,8 @@ static void selinux_bprm_compute_creds(struct linux_binprm *bprm)
        struct bprm_security_struct *bsec;
        u32 sid;
        struct av_decision avd;
-       int rc;
+       struct itimerval itimer;
+       int rc, i;
 
        secondary_ops->bprm_compute_creds(bprm);
 
@@ -1565,6 +1566,26 @@ static void selinux_bprm_compute_creds(struct linux_binprm *bprm)
                /* Close files for which the new task SID is not authorized. */
                flush_unauthorized_files(current->files);
 
+               /* Check whether the new SID can inherit signal state
+                  from the old SID.  If not, clear itimers to avoid
+                  subsequent signal generation and flush and unblock
+                  signals. This must occur _after_ the task SID has
+                  been updated so that any kill done after the flush
+                  will be checked against the new SID. */
+               rc = avc_has_perm(tsec->osid, tsec->sid, SECCLASS_PROCESS,
+                                 PROCESS__SIGINH, NULL, NULL);
+               if (rc) {
+                       memset(&itimer, 0, sizeof itimer);
+                       for (i = 0; i < 3; i++)
+                               do_setitimer(i, &itimer, NULL);
+                       flush_signals(current);
+                       spin_lock_irq(&current->sighand->siglock);
+                       flush_signal_handlers(current, 1);
+                       sigemptyset(&current->blocked);
+                       recalc_sigpending();
+                       spin_unlock_irq(&current->sighand->siglock);
+               }
+
                /* Wake up the parent if it is waiting so that it can
                   recheck wait permission to the new task SID. */
                wake_up_interruptible(&current->parent->wait_chldexit);
@@ -1738,10 +1759,6 @@ static int selinux_inode_permission(struct inode *inode, int mask,
                return 0;
        }
 
-       if (nd && nd->dentry)
-               return dentry_has_perm(current, nd->mnt, nd->dentry,
-                                      file_mask_to_av(inode->i_mode, mask));
-
        return inode_has_perm(current, inode,
                               file_mask_to_av(inode->i_mode, mask), NULL, NULL);
 }
@@ -1992,8 +2009,7 @@ static int selinux_file_ioctl(struct file *file, unsigned int cmd,
 
                case KDSKBENT:
                case KDSKBSENT:
-                       if (!capable(CAP_SYS_TTY_CONFIG))
-                               error = -EPERM;
+                       error = task_has_capability(current,CAP_SYS_TTY_CONFIG);
                        break;
 
                /* default case assumes that the command will go
index 6d85e60..b497a96 100644 (file)
@@ -66,6 +66,7 @@ static struct av_perm_to_string av_perm_to_string[] = {
    { SECCLASS_PROCESS, PROCESS__SETEXEC, "setexec" },
    { SECCLASS_PROCESS, PROCESS__SETFSCREATE, "setfscreate" },
    { SECCLASS_PROCESS, PROCESS__NOATSECURE, "noatsecure" },
+   { SECCLASS_PROCESS, PROCESS__SIGINH, "siginh" },
    { SECCLASS_MSGQ, MSGQ__ENQUEUE, "enqueue" },
    { SECCLASS_MSG, MSG__SEND, "send" },
    { SECCLASS_MSG, MSG__RECEIVE, "receive" },
index f49a867..876fecf 100644 (file)
 #define PROCESS__SETEXEC                          0x00020000UL
 #define PROCESS__SETFSCREATE                      0x00040000UL
 #define PROCESS__NOATSECURE                       0x00080000UL
+#define PROCESS__SIGINH                           0x00100000UL
 
 #define IPC__SETATTR                              0x00000008UL
 #define IPC__READ                                 0x00000010UL
index ac6398e..fa13896 100644 (file)
@@ -2,8 +2,7 @@
 # Makefile for building the SELinux security server as part of the kernel tree.
 #
 
-EXTRA_CFLAGS += -Isecurity/selinux/include -include security/selinux/ss/global.h
-
+EXTRA_CFLAGS += -Isecurity/selinux/include
 obj-y := ss.o
 
 ss-objs := ebitmap.o hashtab.o symtab.o sidtab.o avtab.o policydb.o services.o
index df67d3a..a1eab29 100644 (file)
@@ -3,6 +3,10 @@
  *
  * Author : Stephen Smalley, <sds@epoch.ncsc.mil>
  */
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/vmalloc.h>
+#include <linux/errno.h>
 #include "avtab.h"
 #include "policydb.h"
 
index 7ea4300..98be57f 100644 (file)
@@ -3,6 +3,9 @@
  *
  * Author : Stephen Smalley, <sds@epoch.ncsc.mil>
  */
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/errno.h>
 #include "ebitmap.h"
 #include "policydb.h"
 
diff --git a/security/selinux/ss/global.h b/security/selinux/ss/global.h
deleted file mode 100644 (file)
index dfb799f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef _SS_GLOBAL_H_
-#define _SS_GLOBAL_H_
-
-#include <linux/kernel.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <linux/ctype.h>
-#include <linux/in.h>
-#include <linux/spinlock.h>
-#include <linux/sched.h>
-#include <linux/vmalloc.h>
-
-#include "flask.h"
-#include "avc.h"
-#include "avc_ss.h"
-#include "security.h"
-
-#endif /* _SS_GLOBAL_H_ */
index 1ecc057..2a6752a 100644 (file)
@@ -3,6 +3,9 @@
  *
  * Author : Stephen Smalley, <sds@epoch.ncsc.mil>
  */
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/errno.h>
 #include "hashtab.h"
 
 struct hashtab *hashtab_create(u32 (*hash_value)(struct hashtab *h, void *key),
index 26fa669..aa1b54c 100644 (file)
@@ -3,6 +3,10 @@
  *
  * Author : Stephen Smalley, <sds@epoch.ncsc.mil>
  */
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/errno.h>
 #include "mls.h"
 #include "policydb.h"
 #include "services.h"
index 9bbd7b5..153a5b2 100644 (file)
@@ -3,6 +3,11 @@
  *
  * Author : Stephen Smalley, <sds@epoch.ncsc.mil>
  */
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include "security.h"
 #include "policydb.h"
 #include "mls.h"
 
index 984c75b..57f0602 100644 (file)
  *     it under the terms of the GNU General Public License version 2,
  *      as published by the Free Software Foundation.
  */
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/spinlock.h>
+#include <linux/errno.h>
+#include <linux/in.h>
+#include <asm/semaphore.h>
+#include "flask.h"
+#include "avc.h"
+#include "avc_ss.h"
+#include "security.h"
 #include "context.h"
 #include "policydb.h"
 #include "sidtab.h"
index b13314a..b9f944c 100644 (file)
@@ -3,6 +3,12 @@
  *
  * Author : Stephen Smalley, <sds@epoch.ncsc.mil>
  */
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/spinlock.h>
+#include <linux/errno.h>
+#include "flask.h"
+#include "security.h"
 #include "sidtab.h"
 
 #define SIDTAB_HASH(sid) \
index 58f4795..24a10d3 100644 (file)
@@ -3,6 +3,10 @@
  *
  * Author : Stephen Smalley, <sds@epoch.ncsc.mil>
  */
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/errno.h>
 #include "symtab.h"
 
 static unsigned int symhash(struct hashtab *h, void *key)
index 2dd650f..053d7b3 100644 (file)
@@ -2779,7 +2779,7 @@ unsigned int snd_pcm_capture_poll(struct file *file, poll_table * wait)
        return mask;
 }
 
-static struct page * snd_pcm_mmap_status_nopage(struct vm_area_struct *area, unsigned long address, int no_share)
+static struct page * snd_pcm_mmap_status_nopage(struct vm_area_struct *area, unsigned long address, int *type)
 {
        snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
        snd_pcm_runtime_t *runtime;
@@ -2791,6 +2791,8 @@ static struct page * snd_pcm_mmap_status_nopage(struct vm_area_struct *area, uns
        page = virt_to_page(runtime->status);
        if (!PageReserved(page))
                get_page(page);
+       if (type)
+               *type = VM_FAULT_MINOR;
        return page;
 }
 
@@ -2817,7 +2819,7 @@ int snd_pcm_mmap_status(snd_pcm_substream_t *substream, struct file *file,
        return 0;
 }
 
-static struct page * snd_pcm_mmap_control_nopage(struct vm_area_struct *area, unsigned long address, int no_share)
+static struct page * snd_pcm_mmap_control_nopage(struct vm_area_struct *area, unsigned long address, int *type)
 {
        snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
        snd_pcm_runtime_t *runtime;
@@ -2829,6 +2831,8 @@ static struct page * snd_pcm_mmap_control_nopage(struct vm_area_struct *area, un
        page = virt_to_page(runtime->control);
        if (!PageReserved(page))
                get_page(page);
+       if (type)
+               *type = VM_FAULT_MINOR;
        return page;
 }
 
@@ -2867,7 +2871,7 @@ static void snd_pcm_mmap_data_close(struct vm_area_struct *area)
        atomic_dec(&substream->runtime->mmap_count);
 }
 
-static struct page * snd_pcm_mmap_data_nopage(struct vm_area_struct *area, unsigned long address, int no_share)
+static struct page * snd_pcm_mmap_data_nopage(struct vm_area_struct *area, unsigned long address, int *type)
 {
        snd_pcm_substream_t *substream = (snd_pcm_substream_t *)area->vm_private_data;
        snd_pcm_runtime_t *runtime;
@@ -2895,6 +2899,8 @@ static struct page * snd_pcm_mmap_data_nopage(struct vm_area_struct *area, unsig
        }
        if (!PageReserved(page))
                get_page(page);
+       if (type)
+               *type = VM_FAULT_MINOR;
        return page;
 }
 
index 34d5b88..8c55477 100644 (file)
@@ -31,6 +31,7 @@
 #include <sound/initval.h>
 #include <linux/kmod.h>
 #include <linux/devfs_fs_kernel.h>
+#include <linux/device.h>
 
 #define SNDRV_OS_MINORS 256
 
@@ -52,6 +53,7 @@ MODULE_PARM_SYNTAX(major, "default:116,skill:devel");
 MODULE_PARM(cards_limit, "i");
 MODULE_PARM_DESC(cards_limit, "Count of soundcards installed in the system.");
 MODULE_PARM_SYNTAX(cards_limit, "default:8,skill:advanced");
+MODULE_ALIAS_CHARDEV_MAJOR(CONFIG_SND_MAJOR);
 #ifdef CONFIG_DEVFS_FS
 MODULE_PARM(device_mode, "i");
 MODULE_PARM_DESC(device_mode, "Device file permission mask for devfs.");
index 3e47589..82a0833 100644 (file)
@@ -25,7 +25,7 @@ config SOUND_CMPCI
        depends on SOUND_PRIME!=n && SOUND && PCI
        help
          Say Y or M if you have a PCI sound card using the CMI8338
-         or the CMI8378 chipset.  Data on these chips are available at
+         or the CMI8738 chipset.  Data on these chips are available at
          <http://www.cmedia.com.tw/>.
 
          A userspace utility to control some internal registers of these
@@ -195,7 +195,7 @@ config SOUND_ES1371
          Ensoniq was bought by Creative Labs, Sound Blaster 64/PCI
          models are either ES1370 or ES1371 based. This driver differs
          slightly from OSS/Free, so PLEASE READ
-         <file:Documentation/sound/es1371>.
+         <file:Documentation/sound/oss/es1371>.
 
 config SOUND_ESSSOLO1
        tristate "ESS Technology Solo1"
index 599245f..5de4c22 100644 (file)
@@ -2876,7 +2876,6 @@ MODULE_DEVICE_TABLE(pci, cmpci_pci_tbl);
 void initialize_chip(struct pci_dev *pcidev)
 {
        struct cm_state *s;
-       mm_segment_t fs;
        int i, val;
 #if defined(CONFIG_SOUND_CMPCI_MIDI) || defined(CONFIG_SOUND_CMPCI_FM)
        unsigned char reg_mask = 0;
@@ -3038,8 +3037,6 @@ void initialize_chip(struct pci_dev *pcidev)
 #endif
                pci_set_master(pcidev); /* enable bus mastering */
                /* initialize the chips */
-               fs = get_fs();
-               set_fs(KERNEL_DS);
                /* set mixer output */
                frobindir(s, DSP_MIX_OUTMIXIDX, 0x1f, 0x1f);
                /* set mixer input */
index f7ded6a..0ffb082 100644 (file)
@@ -10,7 +10,7 @@ config DMASOUND_ATARI
          This driver is also available as a module ( = code which can be
          inserted in and removed from the running kernel whenever you
          want). If you want to compile it as a module, say M here and read
-         <file:Documentation/modules.txt>.
+         <file:Documentation/kbuild/modules.txt>.
 
 config DMASOUND_PMAC
        tristate "PowerMac DMA sound support"
@@ -24,7 +24,7 @@ config DMASOUND_PMAC
          This driver is also available as a module ( = code which can be
          inserted in and removed from the running kernel whenever you
          want). If you want to compile it as a module, say M here and read
-         <file:Documentation/modules.txt>.
+         <file:Documentation/kbuild/modules.txt>.
 
 config DMASOUND_PAULA
        tristate "Amiga DMA sound support"
@@ -38,7 +38,7 @@ config DMASOUND_PAULA
          This driver is also available as a module ( = code which can be
          inserted in and removed from the running kernel whenever you
          want). If you want to compile it as a module, say M here and read
-         <file:Documentation/modules.txt>.
+         <file:Documentation/kbuild/modules.txt>.
 
 config DMASOUND_Q40
        tristate "Q40 sound support"
@@ -52,7 +52,7 @@ config DMASOUND_Q40
          This driver is also available as a module ( = code which can be
          inserted in and removed from the running kernel whenever you
          want). If you want to compile it as a module, say M here and read
-         <file:Documentation/modules.txt>.
+         <file:Documentation/kbuild/modules.txt>.
 
 config DMASOUND
        tristate
index c5a0037..42fae03 100644 (file)
@@ -989,7 +989,7 @@ static int emu10k1_audio_ioctl(struct inode *inode, struct file *file, unsigned
        return 0;
 }
 
-static struct page *emu10k1_mm_nopage (struct vm_area_struct * vma, unsigned long address, int write_access)
+static struct page *emu10k1_mm_nopage (struct vm_area_struct * vma, unsigned long address, int *type)
 {
        struct emu10k1_wavedevice *wave_dev = vma->vm_private_data;
        struct woinst *woinst = wave_dev->woinst;
@@ -1032,6 +1032,8 @@ static struct page *emu10k1_mm_nopage (struct vm_area_struct * vma, unsigned lon
        get_page (dmapage);
 
        DPD(3, "page: %#lx\n", (unsigned long) dmapage);
+       if (type)
+               *type = VM_FAULT_MINOR;
        return dmapage;
 }
 
index 68b8e39..f4f34c5 100644 (file)
@@ -15,7 +15,7 @@
  */
 
 
-#define VIA_VERSION    "1.9.1-ac3-2.5"
+#define VIA_VERSION    "1.9.1-ac4-2.5"
 
 
 #include <linux/config.h>
@@ -1237,7 +1237,6 @@ static int via_chan_set_stereo (struct via_info *card,
                }
        /* unknown */
        default:
-               printk (KERN_WARNING PFX "unknown number of channels\n");
                val = -EINVAL;
                break;
        }
@@ -2116,7 +2115,7 @@ static void via_dsp_cleanup (struct via_info *card)
 
 
 static struct page * via_mm_nopage (struct vm_area_struct * vma,
-                                   unsigned long address, int write_access)
+                                   unsigned long address, int *type)
 {
        struct via_info *card = vma->vm_private_data;
        struct via_channel *chan = &card->ch_out;
@@ -2124,12 +2123,11 @@ static struct page * via_mm_nopage (struct vm_area_struct * vma,
        unsigned long pgoff;
        int rd, wr;
 
-       DPRINTK ("ENTER, start %lXh, ofs %lXh, pgoff %ld, addr %lXh, wr %d\n",
+       DPRINTK ("ENTER, start %lXh, ofs %lXh, pgoff %ld, addr %lXh\n",
                 vma->vm_start,
                 address - vma->vm_start,
                 (address - vma->vm_start) >> PAGE_SHIFT,
-                address,
-                write_access);
+                address);
 
         if (address > vma->vm_end) {
                DPRINTK ("EXIT, returning NOPAGE_SIGBUS\n");
@@ -2167,6 +2165,8 @@ static struct page * via_mm_nopage (struct vm_area_struct * vma,
        DPRINTK ("EXIT, returning page %p for cpuaddr %lXh\n",
                 dmapage, (unsigned long) chan->pgtbl[pgoff].cpuaddr);
        get_page (dmapage);
+       if (type)
+               *type = VM_FAULT_MINOR;
        return dmapage;
 }
 
@@ -3367,7 +3367,7 @@ static int via_dsp_release(struct inode *inode, struct file *file)
 
        if (file->f_mode & FMODE_WRITE) {
                rc = via_dsp_drain_playback (card, &card->ch_out, nonblock);
-               if (rc && rc != ERESTARTSYS)    /* Nobody needs to know about ^C */
+               if (rc && rc != -ERESTARTSYS)   /* Nobody needs to know about ^C */
                        printk (KERN_DEBUG "via_audio: ignoring drain playback error %d\n", rc);
 
                via_chan_free (card, &card->ch_out);
index bbfc12c..cddbb06 100644 (file)
@@ -41,6 +41,7 @@
 #endif
 
 #define VIDC_SOUND_CLOCK       (250000)
+#define VIDC_SOUND_CLOCK_EXT   (176400)
 
 /*
  * When using SERIAL SOUND mode (external DAC), the number of physical
@@ -81,18 +82,10 @@ static unsigned char        vidc_level_r[SOUND_MIXER_NRDEVICES] = {
 static unsigned int    vidc_audio_volume_l;    /* left PCM vol, 0 - 65536 */
 static unsigned int    vidc_audio_volume_r;    /* right PCM vol, 0 - 65536 */
 
-static void    (*old_mksound)(unsigned int hz, unsigned int ticks);
-extern void    (*kd_mksound)(unsigned int hz, unsigned int ticks);
 extern void    vidc_update_filler(int bits, int channels);
 extern int     softoss_dev;
 
 static void
-vidc_mksound(unsigned int hz, unsigned int ticks)
-{
-//     printk("BEEP - %d %d!\n", hz, ticks);
-}
-
-static void
 vidc_mixer_set(int mdev, unsigned int level)
 {
        unsigned int lev_l = level & 0x007f;
@@ -193,28 +186,50 @@ static unsigned int vidc_audio_set_format(int dev, unsigned int fmt)
        return vidc_audio_format;
 }
 
+#define my_abs(i) ((i)<0 ? -(i) : (i))
+
 static int vidc_audio_set_speed(int dev, int rate)
 {
        if (rate) {
-               unsigned int hwctrl, hwrate;
+               unsigned int hwctrl, hwrate, hwrate_ext, rate_int, rate_ext;
+               unsigned int diff_int, diff_ext;
                unsigned int newsize, new2size;
 
-               /*
-                * If we have selected 44.1kHz, use the DAC clock.
-                */
-               if (0 && rate == 44100) {
-                       hwctrl = 0x00000002;
+               hwctrl = 0x00000003;
+
+               /* Using internal clock */
+               hwrate = (((VIDC_SOUND_CLOCK * 2) / rate) + 1) >> 1;
+               if (hwrate < 3)
                        hwrate = 3;
+               if (hwrate > 255)
+                       hwrate = 255;
+
+               /* Using exernal clock */
+               hwrate_ext = (((VIDC_SOUND_CLOCK_EXT * 2) / rate) + 1) >> 1;
+               if (hwrate_ext < 3)
+                       hwrate_ext = 3;
+               if (hwrate_ext > 255)
+                       hwrate_ext = 255;
+
+               rate_int = VIDC_SOUND_CLOCK / hwrate;
+               rate_ext = VIDC_SOUND_CLOCK_EXT / hwrate_ext;
+
+               /* Chose between external and internal clock */
+               diff_int = my_abs(rate_ext-rate);
+               diff_ext = my_abs(rate_int-rate);
+               if (diff_ext < diff_int) {
+                       /*printk("VIDC: external %d %d %d\n", rate, rate_ext, hwrate_ext);*/
+                       hwrate=hwrate_ext;
+                       hwctrl=0x00000002;
+                       /* Allow roughly 0.4% tolerance */
+                       if (diff_ext > (rate/256))
+                               rate=rate_ext;
                } else {
-                       hwctrl = 0x00000003;
-
-                       hwrate = (((VIDC_SOUND_CLOCK * 2) / rate) + 1) >> 1;
-                       if (hwrate < 3)
-                               hwrate = 3;
-                       if (hwrate > 255)
-                               hwrate = 255;
-
-                       rate = VIDC_SOUND_CLOCK / hwrate;
+                       /*printk("VIDC: internal %d %d %d\n", rate, rate_int, hwrate);*/
+                       hwctrl=0x00000003;
+                       /* Allow rougly 0.4% tolerance */
+                       if (diff_int > (rate/256))
+                               rate=rate_int;
                }
 
                vidc_writel(0xb0000000 | (hwrate - 2));
@@ -226,13 +241,14 @@ static int vidc_audio_set_speed(int dev, int rate)
                if (newsize > 4096)
                        newsize = 4096;
                for (new2size = 128; new2size < newsize; new2size <<= 1);
-                       if (new2size - newsize > newsize - (new2size >> 1))
-                               new2size >>= 1;
+               if (new2size - newsize > newsize - (new2size >> 1))
+                       new2size >>= 1;
                if (new2size > 4096) {
                        printk(KERN_ERR "VIDC: error: dma buffer (%d) %d > 4K\n",
                                newsize, new2size);
                        new2size = 4096;
                }
+               /*printk("VIDC: dma size %d\n", new2size);*/
                dma_bufsize = new2size;
                vidc_audio_rate = rate;
        }
@@ -471,8 +487,6 @@ static void __init attach_vidc(struct address_info *hw_config)
                printk(KERN_ERR "%s: IRQ %d is in use\n", name, hw_config->irq);
                goto irq_failed;
        }
-       old_mksound = kd_mksound;
-       kd_mksound = vidc_mksound;
        vidc_adev = adev;
        vidc_mixer_set(SOUND_MIXER_VOLUME, (85 | 85 << 8));
 
@@ -510,9 +524,6 @@ static void __exit unload_vidc(struct address_info *hw_config)
 
        vidc_adev = -1;
 
-       if (old_mksound)
-               kd_mksound = old_mksound;
-
        free_irq(hw_config->irq, &dma_start);
        sound_free_dma(hw_config->dma);
 
index b7ee3d1..5c4038f 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sound driver for Silicon Graphics 320 and 540 Visual Workstations'
- * onboard audio.  See notes in ../../Documentation/sound/vwsnd .
+ * onboard audio.  See notes in ../../Documentation/sound/oss/vwsnd .
  *
  * Copyright 1999 Silicon Graphics, Inc.  All rights reserved.
  *
index 6b675d2..09fb8ff 100644 (file)
@@ -45,6 +45,7 @@
 #include <linux/major.h>
 #include <linux/kmod.h>
 #include <linux/devfs_fs_kernel.h>
+#include <linux/device.h>
 
 #define SOUND_STEP 16
 
@@ -547,6 +548,7 @@ EXPORT_SYMBOL(mod_firmware_load);
 MODULE_DESCRIPTION("Core sound module");
 MODULE_AUTHOR("Alan Cox");
 MODULE_LICENSE("GPL");
+MODULE_ALIAS_CHARDEV_MAJOR(SOUND_MAJOR);
 
 static void __exit cleanup_soundcore(void)
 {
index 2420cab..1706a1b 100644 (file)
 #define USB_SUBCLASS_MIDI_STREAMING    0x03
 #define USB_SUBCLASS_VENDOR_SPEC       0xff
 
-#define USB_DT_CS_DEVICE                0x21
-#define USB_DT_CS_CONFIG                0x22
-#define USB_DT_CS_STRING                0x23
-#define USB_DT_CS_INTERFACE             0x24
-#define USB_DT_CS_ENDPOINT              0x25
-
 #define CS_AUDIO_UNDEFINED             0x20
 #define CS_AUDIO_DEVICE                        0x21
 #define CS_AUDIO_CONFIGURATION         0x22